{"version":3,"file":"reka-ui-DpjoRTrp.js","sources":["../../node_modules/reka-ui/dist/shared/renderSlotFragments.js","../../node_modules/reka-ui/dist/Primitive/Slot.js","../../node_modules/reka-ui/dist/Primitive/Primitive.js","../../node_modules/reka-ui/dist/VisuallyHidden/VisuallyHidden.js","../../node_modules/reka-ui/node_modules/@vueuse/shared/index.mjs","../../node_modules/reka-ui/node_modules/@vueuse/core/index.mjs","../../node_modules/reka-ui/dist/shared/nullish.js","../../node_modules/reka-ui/dist/shared/isValueEqualOrExist.js","../../node_modules/reka-ui/dist/shared/createContext.js","../../node_modules/reka-ui/dist/ConfigProvider/ConfigProvider.js","../../node_modules/reka-ui/dist/shared/useDirection.js","../../node_modules/reka-ui/dist/shared/useForwardExpose.js","../../node_modules/reka-ui/dist/Collapsible/CollapsibleRoot.js","../../node_modules/reka-ui/dist/shared/useArrowNavigation.js","../../node_modules/reka-ui/dist/shared/useId.js","../../node_modules/reka-ui/dist/shared/useStateMachine.js","../../node_modules/reka-ui/dist/Presence/usePresence.js","../../node_modules/reka-ui/dist/Presence/Presence.js","../../node_modules/reka-ui/dist/Collapsible/CollapsibleContent.js","../../node_modules/reka-ui/dist/Collapsible/CollapsibleTrigger.js","../../node_modules/reka-ui/dist/shared/useEmitAsProps.js","../../node_modules/reka-ui/dist/shared/useForwardProps.js","../../node_modules/reka-ui/dist/shared/useForwardPropsEmits.js","../../node_modules/reka-ui/dist/Dialog/DialogRoot.js","../../node_modules/reka-ui/dist/Dialog/DialogTrigger.js","../../node_modules/reka-ui/dist/Teleport/Teleport.js","../../node_modules/reka-ui/dist/shared/handleAndDispatchCustomEvent.js","../../node_modules/reka-ui/dist/DismissableLayer/utils.js","../../node_modules/reka-ui/dist/DismissableLayer/DismissableLayer.js","../../node_modules/reka-ui/dist/shared/getActiveElement.js","../../node_modules/reka-ui/dist/Menu/utils.js","../../node_modules/reka-ui/dist/FocusScope/utils.js","../../node_modules/reka-ui/dist/FocusScope/stack.js","../../node_modules/reka-ui/dist/FocusScope/FocusScope.js","../../node_modules/reka-ui/dist/Dialog/DialogContentImpl.js","../../node_modules/reka-ui/dist/shared/useHideOthers.js","../../node_modules/reka-ui/dist/Dialog/DialogContentModal.js","../../node_modules/reka-ui/dist/Dialog/DialogContentNonModal.js","../../node_modules/reka-ui/dist/Dialog/DialogContent.js","../../node_modules/reka-ui/dist/shared/useBodyScrollLock.js","../../node_modules/reka-ui/dist/Dialog/DialogOverlayImpl.js","../../node_modules/reka-ui/dist/Dialog/DialogOverlay.js","../../node_modules/reka-ui/dist/Dialog/DialogClose.js","../../node_modules/reka-ui/dist/Dialog/DialogTitle.js","../../node_modules/reka-ui/dist/Dialog/DialogDescription.js","../../node_modules/reka-ui/dist/Avatar/AvatarRoot.js","../../node_modules/reka-ui/dist/Avatar/AvatarFallback.js","../../node_modules/reka-ui/dist/Avatar/utils.js","../../node_modules/reka-ui/dist/Avatar/AvatarImage.js","../../node_modules/reka-ui/dist/Primitive/usePrimitiveElement.js","../../node_modules/reka-ui/dist/shared/useKbd.js","../../node_modules/reka-ui/dist/RovingFocus/utils.js","../../node_modules/reka-ui/dist/Collection/Collection.js","../../node_modules/reka-ui/dist/RovingFocus/RovingFocusGroup.js","../../node_modules/reka-ui/dist/shared/useFormControl.js","../../node_modules/reka-ui/dist/VisuallyHidden/VisuallyHiddenInputBubble.js","../../node_modules/reka-ui/dist/VisuallyHidden/VisuallyHiddenInput.js","../../node_modules/reka-ui/dist/Checkbox/CheckboxGroupRoot.js","../../node_modules/reka-ui/dist/RovingFocus/RovingFocusItem.js","../../node_modules/reka-ui/dist/Checkbox/utils.js","../../node_modules/reka-ui/dist/Checkbox/CheckboxRoot.js","../../node_modules/reka-ui/dist/Checkbox/CheckboxIndicator.js","../../node_modules/reka-ui/dist/Popper/PopperRoot.js","../../node_modules/reka-ui/dist/shared/useFilter.js","../../node_modules/reka-ui/dist/Listbox/utils.js","../../node_modules/reka-ui/dist/shared/useTypeahead.js","../../node_modules/reka-ui/dist/shared/arrays.js","../../node_modules/reka-ui/dist/Listbox/ListboxRoot.js","../../node_modules/reka-ui/dist/Combobox/ComboboxRoot.js","../../node_modules/reka-ui/dist/Listbox/ListboxFilter.js","../../node_modules/reka-ui/dist/Combobox/ComboboxInput.js","../../node_modules/reka-ui/dist/Popper/PopperAnchor.js","../../node_modules/reka-ui/dist/Listbox/ListboxGroup.js","../../node_modules/reka-ui/dist/Combobox/ComboboxGroup.js","../../node_modules/reka-ui/dist/Combobox/ComboboxLabel.js","../../node_modules/reka-ui/dist/Popper/utils.js","../../node_modules/reka-ui/dist/shared/useSize.js","../../node_modules/reka-ui/dist/Popper/PopperContent.js","../../node_modules/reka-ui/dist/Listbox/ListboxContent.js","../../node_modules/reka-ui/dist/Combobox/ComboboxContentImpl.js","../../node_modules/reka-ui/dist/Combobox/ComboboxContent.js","../../node_modules/reka-ui/dist/shared/useNonce.js","../../node_modules/reka-ui/dist/Listbox/ListboxItem.js","../../node_modules/reka-ui/dist/Combobox/ComboboxItem.js","../../node_modules/reka-ui/dist/shared/useIsUsingKeyboard.js","../../node_modules/reka-ui/dist/Menu/MenuRoot.js","../../node_modules/reka-ui/dist/Menu/MenuAnchor.js","../../node_modules/reka-ui/dist/Menu/MenuPortal.js","../../node_modules/reka-ui/dist/shared/useFocusGuards.js","../../node_modules/reka-ui/dist/Menu/MenuContentImpl.js","../../node_modules/reka-ui/dist/Menu/MenuRootContentModal.js","../../node_modules/reka-ui/dist/Menu/MenuRootContentNonModal.js","../../node_modules/reka-ui/dist/Menu/MenuContent.js","../../node_modules/reka-ui/dist/Menu/MenuItemImpl.js","../../node_modules/reka-ui/dist/Menu/MenuItem.js","../../node_modules/reka-ui/dist/Menu/MenuSeparator.js","../../node_modules/reka-ui/dist/Menu/MenuLabel.js","../../node_modules/reka-ui/dist/Popover/PopoverRoot.js","../../node_modules/reka-ui/dist/Popover/PopoverTrigger.js","../../node_modules/reka-ui/dist/Popover/PopoverPortal.js","../../node_modules/reka-ui/dist/Popover/PopoverContentImpl.js","../../node_modules/reka-ui/dist/Popover/PopoverContentModal.js","../../node_modules/reka-ui/dist/Popover/PopoverContentNonModal.js","../../node_modules/reka-ui/dist/Popover/PopoverContent.js","../../node_modules/reka-ui/dist/Dialog/DialogPortal.js","../../node_modules/reka-ui/dist/DropdownMenu/DropdownMenuRoot.js","../../node_modules/reka-ui/dist/DropdownMenu/DropdownMenuTrigger.js","../../node_modules/reka-ui/dist/DropdownMenu/DropdownMenuPortal.js","../../node_modules/reka-ui/dist/DropdownMenu/DropdownMenuContent.js","../../node_modules/reka-ui/dist/DropdownMenu/DropdownMenuItem.js","../../node_modules/reka-ui/dist/DropdownMenu/DropdownMenuSeparator.js","../../node_modules/reka-ui/dist/DropdownMenu/DropdownMenuLabel.js","../../node_modules/reka-ui/dist/shared/useGraceArea.js","../../node_modules/reka-ui/dist/Label/Label.js","../../node_modules/reka-ui/dist/shared/clamp.js","../../node_modules/reka-ui/dist/Pagination/PaginationRoot.js","../../node_modules/reka-ui/dist/Pagination/PaginationEllipsis.js","../../node_modules/reka-ui/dist/Pagination/PaginationFirst.js","../../node_modules/reka-ui/dist/Pagination/PaginationLast.js","../../node_modules/reka-ui/dist/Pagination/utils.js","../../node_modules/reka-ui/dist/Pagination/PaginationList.js","../../node_modules/reka-ui/dist/Pagination/PaginationListItem.js","../../node_modules/reka-ui/dist/Pagination/PaginationNext.js","../../node_modules/reka-ui/dist/Pagination/PaginationPrev.js","../../node_modules/reka-ui/dist/RadioGroup/RadioGroupRoot.js","../../node_modules/reka-ui/dist/RadioGroup/utils.js","../../node_modules/reka-ui/dist/RadioGroup/Radio.js","../../node_modules/reka-ui/dist/RadioGroup/RadioGroupItem.js","../../node_modules/reka-ui/dist/RadioGroup/RadioGroupIndicator.js","../../node_modules/reka-ui/dist/Select/BubbleSelect.js","../../node_modules/reka-ui/dist/Select/utils.js","../../node_modules/reka-ui/dist/Select/SelectRoot.js","../../node_modules/reka-ui/dist/Select/SelectTrigger.js","../../node_modules/reka-ui/dist/Select/SelectPortal.js","../../node_modules/reka-ui/dist/Select/SelectItemAlignedPosition.js","../../node_modules/reka-ui/dist/Select/SelectPopperPosition.js","../../node_modules/reka-ui/dist/Select/SelectContentImpl.js","../../node_modules/reka-ui/dist/Select/SelectProvider.js","../../node_modules/reka-ui/dist/Select/SelectContent.js","../../node_modules/reka-ui/dist/Select/SelectItem.js","../../node_modules/reka-ui/dist/Select/SelectItemIndicator.js","../../node_modules/reka-ui/dist/Select/SelectGroup.js","../../node_modules/reka-ui/dist/Select/SelectItemText.js","../../node_modules/reka-ui/dist/Select/SelectViewport.js","../../node_modules/reka-ui/dist/Select/SelectValue.js","../../node_modules/reka-ui/dist/Select/SelectIcon.js","../../node_modules/reka-ui/dist/Slider/utils.js","../../node_modules/reka-ui/dist/Slider/SliderImpl.js","../../node_modules/reka-ui/dist/Slider/SliderHorizontal.js","../../node_modules/reka-ui/dist/Slider/SliderVertical.js","../../node_modules/reka-ui/dist/Slider/SliderRoot.js","../../node_modules/reka-ui/dist/Slider/SliderThumbImpl.js","../../node_modules/reka-ui/dist/Slider/SliderThumb.js","../../node_modules/reka-ui/dist/Slider/SliderTrack.js","../../node_modules/reka-ui/dist/Slider/SliderRange.js","../../node_modules/reka-ui/dist/Switch/SwitchRoot.js","../../node_modules/reka-ui/dist/Switch/SwitchThumb.js","../../node_modules/reka-ui/dist/Tabs/TabsRoot.js","../../node_modules/reka-ui/dist/Tabs/TabsList.js","../../node_modules/reka-ui/dist/Tabs/utils.js","../../node_modules/reka-ui/dist/Tabs/TabsContent.js","../../node_modules/reka-ui/dist/Tabs/TabsTrigger.js","../../node_modules/reka-ui/dist/Toast/ToastProvider.js","../../node_modules/reka-ui/dist/Toast/utils.js","../../node_modules/reka-ui/dist/Toast/ToastAnnounce.js","../../node_modules/reka-ui/dist/Toast/ToastRootImpl.js","../../node_modules/reka-ui/dist/Toast/ToastRoot.js","../../node_modules/reka-ui/dist/Toast/ToastAnnounceExclude.js","../../node_modules/reka-ui/dist/Toast/ToastClose.js","../../node_modules/reka-ui/dist/Toast/FocusProxy.js","../../node_modules/reka-ui/dist/DismissableLayer/DismissableLayerBranch.js","../../node_modules/reka-ui/dist/Toast/ToastViewport.js","../../node_modules/reka-ui/dist/Toast/ToastTitle.js","../../node_modules/reka-ui/dist/Toast/ToastDescription.js","../../node_modules/reka-ui/dist/Tooltip/utils.js","../../node_modules/reka-ui/dist/Tooltip/TooltipProvider.js","../../node_modules/reka-ui/dist/Tooltip/TooltipRoot.js","../../node_modules/reka-ui/dist/Tooltip/TooltipTrigger.js","../../node_modules/reka-ui/dist/Tooltip/TooltipContentImpl.js","../../node_modules/reka-ui/dist/Tooltip/TooltipContentHoverable.js","../../node_modules/reka-ui/dist/Tooltip/TooltipContent.js","../../node_modules/reka-ui/dist/Tooltip/TooltipPortal.js","../../node_modules/reka-ui/dist/Tree/utils.js","../../node_modules/reka-ui/dist/shared/useSelectionBehavior.js","../../node_modules/reka-ui/dist/Tree/TreeRoot.js","../../node_modules/reka-ui/dist/Tree/TreeItem.js"],"sourcesContent":["import { Fragment } from 'vue';\n\nfunction renderSlotFragments(children) {\n if (!children)\n return [];\n return children.flatMap((child) => {\n if (child.type === Fragment)\n return renderSlotFragments(child.children);\n return [child];\n });\n}\n\nexport { renderSlotFragments as r };\n//# sourceMappingURL=renderSlotFragments.js.map\n","import { defineComponent, Comment, mergeProps, cloneVNode } from 'vue';\nimport { r as renderSlotFragments } from '../shared/renderSlotFragments.js';\n\nconst Slot = defineComponent({\n name: \"PrimitiveSlot\",\n inheritAttrs: false,\n setup(_, { attrs, slots }) {\n return () => {\n if (!slots.default)\n return null;\n const childrens = renderSlotFragments(slots.default());\n const firstNonCommentChildrenIndex = childrens.findIndex((child) => child.type !== Comment);\n if (firstNonCommentChildrenIndex === -1)\n return childrens;\n const firstNonCommentChildren = childrens[firstNonCommentChildrenIndex];\n delete firstNonCommentChildren.props?.ref;\n const mergedProps = firstNonCommentChildren.props ? mergeProps(attrs, firstNonCommentChildren.props) : attrs;\n if (attrs.class && firstNonCommentChildren.props?.class)\n delete firstNonCommentChildren.props.class;\n const cloned = cloneVNode(firstNonCommentChildren, mergedProps);\n for (const prop in mergedProps) {\n if (prop.startsWith(\"on\")) {\n cloned.props ||= {};\n cloned.props[prop] = mergedProps[prop];\n }\n }\n if (childrens.length === 1)\n return cloned;\n childrens[firstNonCommentChildrenIndex] = cloned;\n return childrens;\n };\n }\n});\n\nexport { Slot as S };\n//# sourceMappingURL=Slot.js.map\n","import { defineComponent, h } from 'vue';\nimport { S as Slot } from './Slot.js';\n\nconst Primitive = defineComponent({\n name: \"Primitive\",\n inheritAttrs: false,\n props: {\n asChild: {\n type: Boolean,\n default: false\n },\n as: {\n type: [String, Object],\n default: \"div\"\n }\n },\n setup(props, { attrs, slots }) {\n const asTag = props.asChild ? \"template\" : props.as;\n const SELF_CLOSING_TAGS = [\"area\", \"img\", \"input\"];\n if (typeof asTag === \"string\" && SELF_CLOSING_TAGS.includes(asTag))\n return () => h(asTag, attrs);\n if (asTag !== \"template\")\n return () => h(props.as, attrs, { default: slots.default });\n return () => h(Slot, attrs, { default: slots.default });\n }\n});\n\nexport { Primitive as P };\n//# sourceMappingURL=Primitive.js.map\n","import { defineComponent, openBlock, createBlock, unref, withCtx, renderSlot } from 'vue';\nimport { P as Primitive } from '../Primitive/Primitive.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"VisuallyHidden\",\n props: {\n feature: { default: \"focusable\" },\n asChild: { type: Boolean },\n as: { default: \"span\" }\n },\n setup(__props) {\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), {\n as: _ctx.as,\n \"as-child\": _ctx.asChild,\n \"aria-hidden\": _ctx.feature === \"focusable\" ? \"true\" : undefined,\n \"data-hidden\": _ctx.feature === \"fully-hidden\" ? \"\" : undefined,\n tabindex: _ctx.feature === \"fully-hidden\" ? \"-1\" : undefined,\n style: {\n // See: https://github.com/twbs/bootstrap/blob/master/scss/mixins/_screen-reader.scss\n position: \"absolute\",\n border: 0,\n width: \"1px\",\n height: \"1px\",\n padding: 0,\n margin: \"-1px\",\n overflow: \"hidden\",\n clip: \"rect(0, 0, 0, 0)\",\n clipPath: \"inset(50%)\",\n whiteSpace: \"nowrap\",\n wordWrap: \"normal\"\n }\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 8, [\"as\", \"as-child\", \"aria-hidden\", \"data-hidden\", \"tabindex\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=VisuallyHidden.js.map\n","import { shallowRef, watchEffect, readonly, watch, customRef, getCurrentScope, onScopeDispose, effectScope, getCurrentInstance, hasInjectionContext, inject, provide, ref, isRef, unref, toValue as toValue$1, computed, reactive, toRefs as toRefs$1, toRef as toRef$1, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive } from 'vue';\n\nfunction computedEager(fn, options) {\n var _a;\n const result = shallowRef();\n watchEffect(() => {\n result.value = fn();\n }, {\n ...options,\n flush: (_a = options == null ? void 0 : options.flush) != null ? _a : \"sync\"\n });\n return readonly(result);\n}\n\nfunction computedWithControl(source, fn) {\n let v = void 0;\n let track;\n let trigger;\n const dirty = shallowRef(true);\n const update = () => {\n dirty.value = true;\n trigger();\n };\n watch(source, update, { flush: \"sync\" });\n const get = typeof fn === \"function\" ? fn : fn.get;\n const set = typeof fn === \"function\" ? void 0 : fn.set;\n const result = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n if (dirty.value) {\n v = get(v);\n dirty.value = false;\n }\n track();\n return v;\n },\n set(v2) {\n set == null ? void 0 : set(v2);\n }\n };\n });\n if (Object.isExtensible(result))\n result.trigger = update;\n return result;\n}\n\nfunction tryOnScopeDispose(fn) {\n if (getCurrentScope()) {\n onScopeDispose(fn);\n return true;\n }\n return false;\n}\n\nfunction createEventHook() {\n const fns = /* @__PURE__ */ new Set();\n const off = (fn) => {\n fns.delete(fn);\n };\n const clear = () => {\n fns.clear();\n };\n const on = (fn) => {\n fns.add(fn);\n const offFn = () => off(fn);\n tryOnScopeDispose(offFn);\n return {\n off: offFn\n };\n };\n const trigger = (...args) => {\n return Promise.all(Array.from(fns).map((fn) => fn(...args)));\n };\n return {\n on,\n off,\n trigger,\n clear\n };\n}\n\nfunction createGlobalState(stateFactory) {\n let initialized = false;\n let state;\n const scope = effectScope(true);\n return (...args) => {\n if (!initialized) {\n state = scope.run(() => stateFactory(...args));\n initialized = true;\n }\n return state;\n };\n}\n\nconst localProvidedStateMap = /* @__PURE__ */ new WeakMap();\n\nconst injectLocal = (...args) => {\n var _a;\n const key = args[0];\n const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;\n if (instance == null && !hasInjectionContext())\n throw new Error(\"injectLocal must be called in setup\");\n if (instance && localProvidedStateMap.has(instance) && key in localProvidedStateMap.get(instance))\n return localProvidedStateMap.get(instance)[key];\n return inject(...args);\n};\n\nconst provideLocal = (key, value) => {\n var _a;\n const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;\n if (instance == null)\n throw new Error(\"provideLocal must be called in setup\");\n if (!localProvidedStateMap.has(instance))\n localProvidedStateMap.set(instance, /* @__PURE__ */ Object.create(null));\n const localProvidedState = localProvidedStateMap.get(instance);\n localProvidedState[key] = value;\n provide(key, value);\n};\n\nfunction createInjectionState(composable, options) {\n const key = (options == null ? void 0 : options.injectionKey) || Symbol(composable.name || \"InjectionState\");\n const defaultValue = options == null ? void 0 : options.defaultValue;\n const useProvidingState = (...args) => {\n const state = composable(...args);\n provideLocal(key, state);\n return state;\n };\n const useInjectedState = () => injectLocal(key, defaultValue);\n return [useProvidingState, useInjectedState];\n}\n\nfunction createRef(value, deep) {\n if (deep === true) {\n return ref(value);\n } else {\n return shallowRef(value);\n }\n}\n\nfunction createSharedComposable(composable) {\n let subscribers = 0;\n let state;\n let scope;\n const dispose = () => {\n subscribers -= 1;\n if (scope && subscribers <= 0) {\n scope.stop();\n state = void 0;\n scope = void 0;\n }\n };\n return (...args) => {\n subscribers += 1;\n if (!scope) {\n scope = effectScope(true);\n state = scope.run(() => composable(...args));\n }\n tryOnScopeDispose(dispose);\n return state;\n };\n}\n\nfunction extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {\n for (const [key, value] of Object.entries(extend)) {\n if (key === \"value\")\n continue;\n if (isRef(value) && unwrap) {\n Object.defineProperty(ref, key, {\n get() {\n return value.value;\n },\n set(v) {\n value.value = v;\n },\n enumerable\n });\n } else {\n Object.defineProperty(ref, key, { value, enumerable });\n }\n }\n return ref;\n}\n\nfunction get(obj, key) {\n if (key == null)\n return unref(obj);\n return unref(obj)[key];\n}\n\nfunction isDefined(v) {\n return unref(v) != null;\n}\n\nfunction makeDestructurable(obj, arr) {\n if (typeof Symbol !== \"undefined\") {\n const clone = { ...obj };\n Object.defineProperty(clone, Symbol.iterator, {\n enumerable: false,\n value() {\n let index = 0;\n return {\n next: () => ({\n value: arr[index++],\n done: index > arr.length\n })\n };\n }\n });\n return clone;\n } else {\n return Object.assign([...arr], obj);\n }\n}\n\nfunction reactify(fn, options) {\n const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? unref : toValue$1;\n return function(...args) {\n return computed(() => fn.apply(this, args.map((i) => unrefFn(i))));\n };\n}\n\nfunction reactifyObject(obj, optionsOrKeys = {}) {\n let keys = [];\n let options;\n if (Array.isArray(optionsOrKeys)) {\n keys = optionsOrKeys;\n } else {\n options = optionsOrKeys;\n const { includeOwnProperties = true } = optionsOrKeys;\n keys.push(...Object.keys(obj));\n if (includeOwnProperties)\n keys.push(...Object.getOwnPropertyNames(obj));\n }\n return Object.fromEntries(\n keys.map((key) => {\n const value = obj[key];\n return [\n key,\n typeof value === \"function\" ? reactify(value.bind(obj), options) : value\n ];\n })\n );\n}\n\nfunction toReactive(objectRef) {\n if (!isRef(objectRef))\n return reactive(objectRef);\n const proxy = new Proxy({}, {\n get(_, p, receiver) {\n return unref(Reflect.get(objectRef.value, p, receiver));\n },\n set(_, p, value) {\n if (isRef(objectRef.value[p]) && !isRef(value))\n objectRef.value[p].value = value;\n else\n objectRef.value[p] = value;\n return true;\n },\n deleteProperty(_, p) {\n return Reflect.deleteProperty(objectRef.value, p);\n },\n has(_, p) {\n return Reflect.has(objectRef.value, p);\n },\n ownKeys() {\n return Object.keys(objectRef.value);\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true\n };\n }\n });\n return reactive(proxy);\n}\n\nfunction reactiveComputed(fn) {\n return toReactive(computed(fn));\n}\n\nfunction reactiveOmit(obj, ...keys) {\n const flatKeys = keys.flat();\n const predicate = flatKeys[0];\n return reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => !predicate(toValue$1(v), k))) : Object.fromEntries(Object.entries(toRefs$1(obj)).filter((e) => !flatKeys.includes(e[0]))));\n}\n\nconst isClient = typeof window !== \"undefined\" && typeof document !== \"undefined\";\nconst isWorker = typeof WorkerGlobalScope !== \"undefined\" && globalThis instanceof WorkerGlobalScope;\nconst isDef = (val) => typeof val !== \"undefined\";\nconst notNullish = (val) => val != null;\nconst assert = (condition, ...infos) => {\n if (!condition)\n console.warn(...infos);\n};\nconst toString = Object.prototype.toString;\nconst isObject = (val) => toString.call(val) === \"[object Object]\";\nconst now = () => Date.now();\nconst timestamp = () => +Date.now();\nconst clamp = (n, min, max) => Math.min(max, Math.max(min, n));\nconst noop = () => {\n};\nconst rand = (min, max) => {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n};\nconst hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key);\nconst isIOS = /* @__PURE__ */ getIsIOS();\nfunction getIsIOS() {\n var _a, _b;\n return isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((_b = window == null ? void 0 : window.navigator) == null ? void 0 : _b.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));\n}\n\nfunction createFilterWrapper(filter, fn) {\n function wrapper(...args) {\n return new Promise((resolve, reject) => {\n Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);\n });\n }\n return wrapper;\n}\nconst bypassFilter = (invoke) => {\n return invoke();\n};\nfunction debounceFilter(ms, options = {}) {\n let timer;\n let maxTimer;\n let lastRejector = noop;\n const _clearTimeout = (timer2) => {\n clearTimeout(timer2);\n lastRejector();\n lastRejector = noop;\n };\n let lastInvoker;\n const filter = (invoke) => {\n const duration = toValue$1(ms);\n const maxDuration = toValue$1(options.maxWait);\n if (timer)\n _clearTimeout(timer);\n if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {\n if (maxTimer) {\n _clearTimeout(maxTimer);\n maxTimer = null;\n }\n return Promise.resolve(invoke());\n }\n return new Promise((resolve, reject) => {\n lastRejector = options.rejectOnCancel ? reject : resolve;\n lastInvoker = invoke;\n if (maxDuration && !maxTimer) {\n maxTimer = setTimeout(() => {\n if (timer)\n _clearTimeout(timer);\n maxTimer = null;\n resolve(lastInvoker());\n }, maxDuration);\n }\n timer = setTimeout(() => {\n if (maxTimer)\n _clearTimeout(maxTimer);\n maxTimer = null;\n resolve(invoke());\n }, duration);\n });\n };\n return filter;\n}\nfunction throttleFilter(...args) {\n let lastExec = 0;\n let timer;\n let isLeading = true;\n let lastRejector = noop;\n let lastValue;\n let ms;\n let trailing;\n let leading;\n let rejectOnCancel;\n if (!isRef(args[0]) && typeof args[0] === \"object\")\n ({ delay: ms, trailing = true, leading = true, rejectOnCancel = false } = args[0]);\n else\n [ms, trailing = true, leading = true, rejectOnCancel = false] = args;\n const clear = () => {\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n lastRejector();\n lastRejector = noop;\n }\n };\n const filter = (_invoke) => {\n const duration = toValue$1(ms);\n const elapsed = Date.now() - lastExec;\n const invoke = () => {\n return lastValue = _invoke();\n };\n clear();\n if (duration <= 0) {\n lastExec = Date.now();\n return invoke();\n }\n if (elapsed > duration && (leading || !isLeading)) {\n lastExec = Date.now();\n invoke();\n } else if (trailing) {\n lastValue = new Promise((resolve, reject) => {\n lastRejector = rejectOnCancel ? reject : resolve;\n timer = setTimeout(() => {\n lastExec = Date.now();\n isLeading = true;\n resolve(invoke());\n clear();\n }, Math.max(0, duration - elapsed));\n });\n }\n if (!leading && !timer)\n timer = setTimeout(() => isLeading = true, duration);\n isLeading = false;\n return lastValue;\n };\n return filter;\n}\nfunction pausableFilter(extendFilter = bypassFilter, options = {}) {\n const {\n initialState = \"active\"\n } = options;\n const isActive = toRef(initialState === \"active\");\n function pause() {\n isActive.value = false;\n }\n function resume() {\n isActive.value = true;\n }\n const eventFilter = (...args) => {\n if (isActive.value)\n extendFilter(...args);\n };\n return { isActive: readonly(isActive), pause, resume, eventFilter };\n}\n\nfunction cacheStringFunction(fn) {\n const cache = /* @__PURE__ */ Object.create(null);\n return (str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\n}\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, \"-$1\").toLowerCase());\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction((str) => {\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\n\nfunction promiseTimeout(ms, throwOnTimeout = false, reason = \"Timeout\") {\n return new Promise((resolve, reject) => {\n if (throwOnTimeout)\n setTimeout(() => reject(reason), ms);\n else\n setTimeout(resolve, ms);\n });\n}\nfunction identity(arg) {\n return arg;\n}\nfunction createSingletonPromise(fn) {\n let _promise;\n function wrapper() {\n if (!_promise)\n _promise = fn();\n return _promise;\n }\n wrapper.reset = async () => {\n const _prev = _promise;\n _promise = void 0;\n if (_prev)\n await _prev;\n };\n return wrapper;\n}\nfunction invoke(fn) {\n return fn();\n}\nfunction containsProp(obj, ...props) {\n return props.some((k) => k in obj);\n}\nfunction increaseWithUnit(target, delta) {\n var _a;\n if (typeof target === \"number\")\n return target + delta;\n const value = ((_a = target.match(/^-?\\d+\\.?\\d*/)) == null ? void 0 : _a[0]) || \"\";\n const unit = target.slice(value.length);\n const result = Number.parseFloat(value) + delta;\n if (Number.isNaN(result))\n return target;\n return result + unit;\n}\nfunction pxValue(px) {\n return px.endsWith(\"rem\") ? Number.parseFloat(px) * 16 : Number.parseFloat(px);\n}\nfunction objectPick(obj, keys, omitUndefined = false) {\n return keys.reduce((n, k) => {\n if (k in obj) {\n if (!omitUndefined || obj[k] !== void 0)\n n[k] = obj[k];\n }\n return n;\n }, {});\n}\nfunction objectOmit(obj, keys, omitUndefined = false) {\n return Object.fromEntries(Object.entries(obj).filter(([key, value]) => {\n return (!omitUndefined || value !== void 0) && !keys.includes(key);\n }));\n}\nfunction objectEntries(obj) {\n return Object.entries(obj);\n}\nfunction getLifeCycleTarget(target) {\n return target || getCurrentInstance();\n}\nfunction toArray(value) {\n return Array.isArray(value) ? value : [value];\n}\n\nfunction toRef(...args) {\n if (args.length !== 1)\n return toRef$1(...args);\n const r = args[0];\n return typeof r === \"function\" ? readonly(customRef(() => ({ get: r, set: noop }))) : ref(r);\n}\nconst resolveRef = toRef;\n\nfunction reactivePick(obj, ...keys) {\n const flatKeys = keys.flat();\n const predicate = flatKeys[0];\n return reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => predicate(toValue$1(v), k))) : Object.fromEntries(flatKeys.map((k) => [k, toRef(obj, k)])));\n}\n\nfunction refAutoReset(defaultValue, afterMs = 1e4) {\n return customRef((track, trigger) => {\n let value = toValue$1(defaultValue);\n let timer;\n const resetAfter = () => setTimeout(() => {\n value = toValue$1(defaultValue);\n trigger();\n }, toValue$1(afterMs));\n tryOnScopeDispose(() => {\n clearTimeout(timer);\n });\n return {\n get() {\n track();\n return value;\n },\n set(newValue) {\n value = newValue;\n trigger();\n clearTimeout(timer);\n timer = resetAfter();\n }\n };\n });\n}\n\nfunction useDebounceFn(fn, ms = 200, options = {}) {\n return createFilterWrapper(\n debounceFilter(ms, options),\n fn\n );\n}\n\nfunction refDebounced(value, ms = 200, options = {}) {\n const debounced = ref(value.value);\n const updater = useDebounceFn(() => {\n debounced.value = value.value;\n }, ms, options);\n watch(value, () => updater());\n return debounced;\n}\n\nfunction refDefault(source, defaultValue) {\n return computed({\n get() {\n var _a;\n return (_a = source.value) != null ? _a : defaultValue;\n },\n set(value) {\n source.value = value;\n }\n });\n}\n\nfunction useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {\n return createFilterWrapper(\n throttleFilter(ms, trailing, leading, rejectOnCancel),\n fn\n );\n}\n\nfunction refThrottled(value, delay = 200, trailing = true, leading = true) {\n if (delay <= 0)\n return value;\n const throttled = ref(value.value);\n const updater = useThrottleFn(() => {\n throttled.value = value.value;\n }, delay, trailing, leading);\n watch(value, () => updater());\n return throttled;\n}\n\nfunction refWithControl(initial, options = {}) {\n let source = initial;\n let track;\n let trigger;\n const ref = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n return get();\n },\n set(v) {\n set(v);\n }\n };\n });\n function get(tracking = true) {\n if (tracking)\n track();\n return source;\n }\n function set(value, triggering = true) {\n var _a, _b;\n if (value === source)\n return;\n const old = source;\n if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)\n return;\n source = value;\n (_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);\n if (triggering)\n trigger();\n }\n const untrackedGet = () => get(false);\n const silentSet = (v) => set(v, false);\n const peek = () => get(false);\n const lay = (v) => set(v, false);\n return extendRef(\n ref,\n {\n get,\n set,\n untrackedGet,\n silentSet,\n peek,\n lay\n },\n { enumerable: true }\n );\n}\nconst controlledRef = refWithControl;\n\nfunction set(...args) {\n if (args.length === 2) {\n const [ref, value] = args;\n ref.value = value;\n }\n if (args.length === 3) {\n const [target, key, value] = args;\n target[key] = value;\n }\n}\n\nfunction watchWithFilter(source, cb, options = {}) {\n const {\n eventFilter = bypassFilter,\n ...watchOptions\n } = options;\n return watch(\n source,\n createFilterWrapper(\n eventFilter,\n cb\n ),\n watchOptions\n );\n}\n\nfunction watchPausable(source, cb, options = {}) {\n const {\n eventFilter: filter,\n initialState = \"active\",\n ...watchOptions\n } = options;\n const { eventFilter, pause, resume, isActive } = pausableFilter(filter, { initialState });\n const stop = watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter\n }\n );\n return { stop, pause, resume, isActive };\n}\n\nfunction syncRef(left, right, ...[options]) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true,\n direction = \"both\",\n transform = {}\n } = options || {};\n const watchers = [];\n const transformLTR = \"ltr\" in transform && transform.ltr || ((v) => v);\n const transformRTL = \"rtl\" in transform && transform.rtl || ((v) => v);\n if (direction === \"both\" || direction === \"ltr\") {\n watchers.push(watchPausable(\n left,\n (newValue) => {\n watchers.forEach((w) => w.pause());\n right.value = transformLTR(newValue);\n watchers.forEach((w) => w.resume());\n },\n { flush, deep, immediate }\n ));\n }\n if (direction === \"both\" || direction === \"rtl\") {\n watchers.push(watchPausable(\n right,\n (newValue) => {\n watchers.forEach((w) => w.pause());\n left.value = transformRTL(newValue);\n watchers.forEach((w) => w.resume());\n },\n { flush, deep, immediate }\n ));\n }\n const stop = () => {\n watchers.forEach((w) => w.stop());\n };\n return stop;\n}\n\nfunction syncRefs(source, targets, options = {}) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true\n } = options;\n const targetsArray = toArray(targets);\n return watch(\n source,\n (newValue) => targetsArray.forEach((target) => target.value = newValue),\n { flush, deep, immediate }\n );\n}\n\nfunction toRefs(objectRef, options = {}) {\n if (!isRef(objectRef))\n return toRefs$1(objectRef);\n const result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {};\n for (const key in objectRef.value) {\n result[key] = customRef(() => ({\n get() {\n return objectRef.value[key];\n },\n set(v) {\n var _a;\n const replaceRef = (_a = toValue$1(options.replaceRef)) != null ? _a : true;\n if (replaceRef) {\n if (Array.isArray(objectRef.value)) {\n const copy = [...objectRef.value];\n copy[key] = v;\n objectRef.value = copy;\n } else {\n const newObject = { ...objectRef.value, [key]: v };\n Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value));\n objectRef.value = newObject;\n }\n } else {\n objectRef.value[key] = v;\n }\n }\n }));\n }\n return result;\n}\n\nconst toValue = toValue$1;\nconst resolveUnref = toValue$1;\n\nfunction tryOnBeforeMount(fn, sync = true, target) {\n const instance = getLifeCycleTarget(target);\n if (instance)\n onBeforeMount(fn, target);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnBeforeUnmount(fn, target) {\n const instance = getLifeCycleTarget(target);\n if (instance)\n onBeforeUnmount(fn, target);\n}\n\nfunction tryOnMounted(fn, sync = true, target) {\n const instance = getLifeCycleTarget();\n if (instance)\n onMounted(fn, target);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnUnmounted(fn, target) {\n const instance = getLifeCycleTarget(target);\n if (instance)\n onUnmounted(fn, target);\n}\n\nfunction createUntil(r, isNot = false) {\n function toMatch(condition, { flush = \"sync\", deep = false, timeout, throwOnTimeout } = {}) {\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(\n r,\n (v) => {\n if (condition(v) !== isNot) {\n if (stop)\n stop();\n else\n nextTick(() => stop == null ? void 0 : stop());\n resolve(v);\n }\n },\n {\n flush,\n deep,\n immediate: true\n }\n );\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(\n promiseTimeout(timeout, throwOnTimeout).then(() => toValue$1(r)).finally(() => stop == null ? void 0 : stop())\n );\n }\n return Promise.race(promises);\n }\n function toBe(value, options) {\n if (!isRef(value))\n return toMatch((v) => v === value, options);\n const { flush = \"sync\", deep = false, timeout, throwOnTimeout } = options != null ? options : {};\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(\n [r, value],\n ([v1, v2]) => {\n if (isNot !== (v1 === v2)) {\n if (stop)\n stop();\n else\n nextTick(() => stop == null ? void 0 : stop());\n resolve(v1);\n }\n },\n {\n flush,\n deep,\n immediate: true\n }\n );\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(\n promiseTimeout(timeout, throwOnTimeout).then(() => toValue$1(r)).finally(() => {\n stop == null ? void 0 : stop();\n return toValue$1(r);\n })\n );\n }\n return Promise.race(promises);\n }\n function toBeTruthy(options) {\n return toMatch((v) => Boolean(v), options);\n }\n function toBeNull(options) {\n return toBe(null, options);\n }\n function toBeUndefined(options) {\n return toBe(void 0, options);\n }\n function toBeNaN(options) {\n return toMatch(Number.isNaN, options);\n }\n function toContains(value, options) {\n return toMatch((v) => {\n const array = Array.from(v);\n return array.includes(value) || array.includes(toValue$1(value));\n }, options);\n }\n function changed(options) {\n return changedTimes(1, options);\n }\n function changedTimes(n = 1, options) {\n let count = -1;\n return toMatch(() => {\n count += 1;\n return count >= n;\n }, options);\n }\n if (Array.isArray(toValue$1(r))) {\n const instance = {\n toMatch,\n toContains,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n } else {\n const instance = {\n toMatch,\n toBe,\n toBeTruthy,\n toBeNull,\n toBeNaN,\n toBeUndefined,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n }\n}\nfunction until(r) {\n return createUntil(r);\n}\n\nfunction defaultComparator(value, othVal) {\n return value === othVal;\n}\nfunction useArrayDifference(...args) {\n var _a, _b;\n const list = args[0];\n const values = args[1];\n let compareFn = (_a = args[2]) != null ? _a : defaultComparator;\n const {\n symmetric = false\n } = (_b = args[3]) != null ? _b : {};\n if (typeof compareFn === \"string\") {\n const key = compareFn;\n compareFn = (value, othVal) => value[key] === othVal[key];\n }\n const diff1 = computed(() => toValue$1(list).filter((x) => toValue$1(values).findIndex((y) => compareFn(x, y)) === -1));\n if (symmetric) {\n const diff2 = computed(() => toValue$1(values).filter((x) => toValue$1(list).findIndex((y) => compareFn(x, y)) === -1));\n return computed(() => symmetric ? [...toValue$1(diff1), ...toValue$1(diff2)] : toValue$1(diff1));\n } else {\n return diff1;\n }\n}\n\nfunction useArrayEvery(list, fn) {\n return computed(() => toValue$1(list).every((element, index, array) => fn(toValue$1(element), index, array)));\n}\n\nfunction useArrayFilter(list, fn) {\n return computed(() => toValue$1(list).map((i) => toValue$1(i)).filter(fn));\n}\n\nfunction useArrayFind(list, fn) {\n return computed(() => toValue$1(\n toValue$1(list).find((element, index, array) => fn(toValue$1(element), index, array))\n ));\n}\n\nfunction useArrayFindIndex(list, fn) {\n return computed(() => toValue$1(list).findIndex((element, index, array) => fn(toValue$1(element), index, array)));\n}\n\nfunction findLast(arr, cb) {\n let index = arr.length;\n while (index-- > 0) {\n if (cb(arr[index], index, arr))\n return arr[index];\n }\n return void 0;\n}\nfunction useArrayFindLast(list, fn) {\n return computed(() => toValue$1(\n !Array.prototype.findLast ? findLast(toValue$1(list), (element, index, array) => fn(toValue$1(element), index, array)) : toValue$1(list).findLast((element, index, array) => fn(toValue$1(element), index, array))\n ));\n}\n\nfunction isArrayIncludesOptions(obj) {\n return isObject(obj) && containsProp(obj, \"formIndex\", \"comparator\");\n}\nfunction useArrayIncludes(...args) {\n var _a;\n const list = args[0];\n const value = args[1];\n let comparator = args[2];\n let formIndex = 0;\n if (isArrayIncludesOptions(comparator)) {\n formIndex = (_a = comparator.fromIndex) != null ? _a : 0;\n comparator = comparator.comparator;\n }\n if (typeof comparator === \"string\") {\n const key = comparator;\n comparator = (element, value2) => element[key] === toValue$1(value2);\n }\n comparator = comparator != null ? comparator : (element, value2) => element === toValue$1(value2);\n return computed(() => toValue$1(list).slice(formIndex).some((element, index, array) => comparator(\n toValue$1(element),\n toValue$1(value),\n index,\n toValue$1(array)\n )));\n}\n\nfunction useArrayJoin(list, separator) {\n return computed(() => toValue$1(list).map((i) => toValue$1(i)).join(toValue$1(separator)));\n}\n\nfunction useArrayMap(list, fn) {\n return computed(() => toValue$1(list).map((i) => toValue$1(i)).map(fn));\n}\n\nfunction useArrayReduce(list, reducer, ...args) {\n const reduceCallback = (sum, value, index) => reducer(toValue$1(sum), toValue$1(value), index);\n return computed(() => {\n const resolved = toValue$1(list);\n return args.length ? resolved.reduce(reduceCallback, typeof args[0] === \"function\" ? toValue$1(args[0]()) : toValue$1(args[0])) : resolved.reduce(reduceCallback);\n });\n}\n\nfunction useArraySome(list, fn) {\n return computed(() => toValue$1(list).some((element, index, array) => fn(toValue$1(element), index, array)));\n}\n\nfunction uniq(array) {\n return Array.from(new Set(array));\n}\nfunction uniqueElementsBy(array, fn) {\n return array.reduce((acc, v) => {\n if (!acc.some((x) => fn(v, x, array)))\n acc.push(v);\n return acc;\n }, []);\n}\nfunction useArrayUnique(list, compareFn) {\n return computed(() => {\n const resolvedList = toValue$1(list).map((element) => toValue$1(element));\n return compareFn ? uniqueElementsBy(resolvedList, compareFn) : uniq(resolvedList);\n });\n}\n\nfunction useCounter(initialValue = 0, options = {}) {\n let _initialValue = unref(initialValue);\n const count = shallowRef(initialValue);\n const {\n max = Number.POSITIVE_INFINITY,\n min = Number.NEGATIVE_INFINITY\n } = options;\n const inc = (delta = 1) => count.value = Math.max(Math.min(max, count.value + delta), min);\n const dec = (delta = 1) => count.value = Math.min(Math.max(min, count.value - delta), max);\n const get = () => count.value;\n const set = (val) => count.value = Math.max(min, Math.min(max, val));\n const reset = (val = _initialValue) => {\n _initialValue = val;\n return set(val);\n };\n return { count, inc, dec, get, set, reset };\n}\n\nconst REGEX_PARSE = /^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[T\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/i;\nconst REGEX_FORMAT = /[YMDHhms]o|\\[([^\\]]+)\\]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|z{1,4}|SSS/g;\nfunction defaultMeridiem(hours, minutes, isLowercase, hasPeriod) {\n let m = hours < 12 ? \"AM\" : \"PM\";\n if (hasPeriod)\n m = m.split(\"\").reduce((acc, curr) => acc += `${curr}.`, \"\");\n return isLowercase ? m.toLowerCase() : m;\n}\nfunction formatOrdinal(num) {\n const suffixes = [\"th\", \"st\", \"nd\", \"rd\"];\n const v = num % 100;\n return num + (suffixes[(v - 20) % 10] || suffixes[v] || suffixes[0]);\n}\nfunction formatDate(date, formatStr, options = {}) {\n var _a;\n const years = date.getFullYear();\n const month = date.getMonth();\n const days = date.getDate();\n const hours = date.getHours();\n const minutes = date.getMinutes();\n const seconds = date.getSeconds();\n const milliseconds = date.getMilliseconds();\n const day = date.getDay();\n const meridiem = (_a = options.customMeridiem) != null ? _a : defaultMeridiem;\n const stripTimeZone = (dateString) => {\n var _a2;\n return (_a2 = dateString.split(\" \")[1]) != null ? _a2 : \"\";\n };\n const matches = {\n Yo: () => formatOrdinal(years),\n YY: () => String(years).slice(-2),\n YYYY: () => years,\n M: () => month + 1,\n Mo: () => formatOrdinal(month + 1),\n MM: () => `${month + 1}`.padStart(2, \"0\"),\n MMM: () => date.toLocaleDateString(toValue$1(options.locales), { month: \"short\" }),\n MMMM: () => date.toLocaleDateString(toValue$1(options.locales), { month: \"long\" }),\n D: () => String(days),\n Do: () => formatOrdinal(days),\n DD: () => `${days}`.padStart(2, \"0\"),\n H: () => String(hours),\n Ho: () => formatOrdinal(hours),\n HH: () => `${hours}`.padStart(2, \"0\"),\n h: () => `${hours % 12 || 12}`.padStart(1, \"0\"),\n ho: () => formatOrdinal(hours % 12 || 12),\n hh: () => `${hours % 12 || 12}`.padStart(2, \"0\"),\n m: () => String(minutes),\n mo: () => formatOrdinal(minutes),\n mm: () => `${minutes}`.padStart(2, \"0\"),\n s: () => String(seconds),\n so: () => formatOrdinal(seconds),\n ss: () => `${seconds}`.padStart(2, \"0\"),\n SSS: () => `${milliseconds}`.padStart(3, \"0\"),\n d: () => day,\n dd: () => date.toLocaleDateString(toValue$1(options.locales), { weekday: \"narrow\" }),\n ddd: () => date.toLocaleDateString(toValue$1(options.locales), { weekday: \"short\" }),\n dddd: () => date.toLocaleDateString(toValue$1(options.locales), { weekday: \"long\" }),\n A: () => meridiem(hours, minutes),\n AA: () => meridiem(hours, minutes, false, true),\n a: () => meridiem(hours, minutes, true),\n aa: () => meridiem(hours, minutes, true, true),\n z: () => stripTimeZone(date.toLocaleDateString(toValue$1(options.locales), { timeZoneName: \"shortOffset\" })),\n zz: () => stripTimeZone(date.toLocaleDateString(toValue$1(options.locales), { timeZoneName: \"shortOffset\" })),\n zzz: () => stripTimeZone(date.toLocaleDateString(toValue$1(options.locales), { timeZoneName: \"shortOffset\" })),\n zzzz: () => stripTimeZone(date.toLocaleDateString(toValue$1(options.locales), { timeZoneName: \"longOffset\" }))\n };\n return formatStr.replace(REGEX_FORMAT, (match, $1) => {\n var _a2, _b;\n return (_b = $1 != null ? $1 : (_a2 = matches[match]) == null ? void 0 : _a2.call(matches)) != null ? _b : match;\n });\n}\nfunction normalizeDate(date) {\n if (date === null)\n return new Date(Number.NaN);\n if (date === void 0)\n return /* @__PURE__ */ new Date();\n if (date instanceof Date)\n return new Date(date);\n if (typeof date === \"string\" && !/Z$/i.test(date)) {\n const d = date.match(REGEX_PARSE);\n if (d) {\n const m = d[2] - 1 || 0;\n const ms = (d[7] || \"0\").substring(0, 3);\n return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);\n }\n }\n return new Date(date);\n}\nfunction useDateFormat(date, formatStr = \"HH:mm:ss\", options = {}) {\n return computed(() => formatDate(normalizeDate(toValue$1(date)), toValue$1(formatStr), options));\n}\n\nfunction useIntervalFn(cb, interval = 1e3, options = {}) {\n const {\n immediate = true,\n immediateCallback = false\n } = options;\n let timer = null;\n const isActive = shallowRef(false);\n function clean() {\n if (timer) {\n clearInterval(timer);\n timer = null;\n }\n }\n function pause() {\n isActive.value = false;\n clean();\n }\n function resume() {\n const intervalValue = toValue$1(interval);\n if (intervalValue <= 0)\n return;\n isActive.value = true;\n if (immediateCallback)\n cb();\n clean();\n if (isActive.value)\n timer = setInterval(cb, intervalValue);\n }\n if (immediate && isClient)\n resume();\n if (isRef(interval) || typeof interval === \"function\") {\n const stopWatch = watch(interval, () => {\n if (isActive.value && isClient)\n resume();\n });\n tryOnScopeDispose(stopWatch);\n }\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nfunction useInterval(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n immediate = true,\n callback\n } = options;\n const counter = shallowRef(0);\n const update = () => counter.value += 1;\n const reset = () => {\n counter.value = 0;\n };\n const controls = useIntervalFn(\n callback ? () => {\n update();\n callback(counter.value);\n } : update,\n interval,\n { immediate }\n );\n if (exposeControls) {\n return {\n counter,\n reset,\n ...controls\n };\n } else {\n return counter;\n }\n}\n\nfunction useLastChanged(source, options = {}) {\n var _a;\n const ms = shallowRef((_a = options.initialValue) != null ? _a : null);\n watch(\n source,\n () => ms.value = timestamp(),\n options\n );\n return ms;\n}\n\nfunction useTimeoutFn(cb, interval, options = {}) {\n const {\n immediate = true,\n immediateCallback = false\n } = options;\n const isPending = shallowRef(false);\n let timer = null;\n function clear() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n }\n function stop() {\n isPending.value = false;\n clear();\n }\n function start(...args) {\n if (immediateCallback)\n cb();\n clear();\n isPending.value = true;\n timer = setTimeout(() => {\n isPending.value = false;\n timer = null;\n cb(...args);\n }, toValue$1(interval));\n }\n if (immediate) {\n isPending.value = true;\n if (isClient)\n start();\n }\n tryOnScopeDispose(stop);\n return {\n isPending: readonly(isPending),\n start,\n stop\n };\n}\n\nfunction useTimeout(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n callback\n } = options;\n const controls = useTimeoutFn(\n callback != null ? callback : noop,\n interval,\n options\n );\n const ready = computed(() => !controls.isPending.value);\n if (exposeControls) {\n return {\n ready,\n ...controls\n };\n } else {\n return ready;\n }\n}\n\nfunction useToNumber(value, options = {}) {\n const {\n method = \"parseFloat\",\n radix,\n nanToZero\n } = options;\n return computed(() => {\n let resolved = toValue$1(value);\n if (typeof method === \"function\")\n resolved = method(resolved);\n else if (typeof resolved === \"string\")\n resolved = Number[method](resolved, radix);\n if (nanToZero && Number.isNaN(resolved))\n resolved = 0;\n return resolved;\n });\n}\n\nfunction useToString(value) {\n return computed(() => `${toValue$1(value)}`);\n}\n\nfunction useToggle(initialValue = false, options = {}) {\n const {\n truthyValue = true,\n falsyValue = false\n } = options;\n const valueIsRef = isRef(initialValue);\n const _value = shallowRef(initialValue);\n function toggle(value) {\n if (arguments.length) {\n _value.value = value;\n return _value.value;\n } else {\n const truthy = toValue$1(truthyValue);\n _value.value = _value.value === truthy ? toValue$1(falsyValue) : truthy;\n return _value.value;\n }\n }\n if (valueIsRef)\n return toggle;\n else\n return [_value, toggle];\n}\n\nfunction watchArray(source, cb, options) {\n let oldList = (options == null ? void 0 : options.immediate) ? [] : [...typeof source === \"function\" ? source() : Array.isArray(source) ? source : toValue$1(source)];\n return watch(source, (newList, _, onCleanup) => {\n const oldListRemains = Array.from({ length: oldList.length });\n const added = [];\n for (const obj of newList) {\n let found = false;\n for (let i = 0; i < oldList.length; i++) {\n if (!oldListRemains[i] && obj === oldList[i]) {\n oldListRemains[i] = true;\n found = true;\n break;\n }\n }\n if (!found)\n added.push(obj);\n }\n const removed = oldList.filter((_2, i) => !oldListRemains[i]);\n cb(newList, oldList, added, removed, onCleanup);\n oldList = [...newList];\n }, options);\n}\n\nfunction watchAtMost(source, cb, options) {\n const {\n count,\n ...watchOptions\n } = options;\n const current = shallowRef(0);\n const stop = watchWithFilter(\n source,\n (...args) => {\n current.value += 1;\n if (current.value >= toValue$1(count))\n nextTick(() => stop());\n cb(...args);\n },\n watchOptions\n );\n return { count: current, stop };\n}\n\nfunction watchDebounced(source, cb, options = {}) {\n const {\n debounce = 0,\n maxWait = void 0,\n ...watchOptions\n } = options;\n return watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter: debounceFilter(debounce, { maxWait })\n }\n );\n}\n\nfunction watchDeep(source, cb, options) {\n return watch(\n source,\n cb,\n {\n ...options,\n deep: true\n }\n );\n}\n\nfunction watchIgnorable(source, cb, options = {}) {\n const {\n eventFilter = bypassFilter,\n ...watchOptions\n } = options;\n const filteredCb = createFilterWrapper(\n eventFilter,\n cb\n );\n let ignoreUpdates;\n let ignorePrevAsyncUpdates;\n let stop;\n if (watchOptions.flush === \"sync\") {\n const ignore = shallowRef(false);\n ignorePrevAsyncUpdates = () => {\n };\n ignoreUpdates = (updater) => {\n ignore.value = true;\n updater();\n ignore.value = false;\n };\n stop = watch(\n source,\n (...args) => {\n if (!ignore.value)\n filteredCb(...args);\n },\n watchOptions\n );\n } else {\n const disposables = [];\n const ignoreCounter = shallowRef(0);\n const syncCounter = shallowRef(0);\n ignorePrevAsyncUpdates = () => {\n ignoreCounter.value = syncCounter.value;\n };\n disposables.push(\n watch(\n source,\n () => {\n syncCounter.value++;\n },\n { ...watchOptions, flush: \"sync\" }\n )\n );\n ignoreUpdates = (updater) => {\n const syncCounterPrev = syncCounter.value;\n updater();\n ignoreCounter.value += syncCounter.value - syncCounterPrev;\n };\n disposables.push(\n watch(\n source,\n (...args) => {\n const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value;\n ignoreCounter.value = 0;\n syncCounter.value = 0;\n if (ignore)\n return;\n filteredCb(...args);\n },\n watchOptions\n )\n );\n stop = () => {\n disposables.forEach((fn) => fn());\n };\n }\n return { stop, ignoreUpdates, ignorePrevAsyncUpdates };\n}\n\nfunction watchImmediate(source, cb, options) {\n return watch(\n source,\n cb,\n {\n ...options,\n immediate: true\n }\n );\n}\n\nfunction watchOnce(source, cb, options) {\n const stop = watch(source, (...args) => {\n nextTick(() => stop());\n return cb(...args);\n }, options);\n return stop;\n}\n\nfunction watchThrottled(source, cb, options = {}) {\n const {\n throttle = 0,\n trailing = true,\n leading = true,\n ...watchOptions\n } = options;\n return watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter: throttleFilter(throttle, trailing, leading)\n }\n );\n}\n\nfunction watchTriggerable(source, cb, options = {}) {\n let cleanupFn;\n function onEffect() {\n if (!cleanupFn)\n return;\n const fn = cleanupFn;\n cleanupFn = void 0;\n fn();\n }\n function onCleanup(callback) {\n cleanupFn = callback;\n }\n const _cb = (value, oldValue) => {\n onEffect();\n return cb(value, oldValue, onCleanup);\n };\n const res = watchIgnorable(source, _cb, options);\n const { ignoreUpdates } = res;\n const trigger = () => {\n let res2;\n ignoreUpdates(() => {\n res2 = _cb(getWatchSources(source), getOldValue(source));\n });\n return res2;\n };\n return {\n ...res,\n trigger\n };\n}\nfunction getWatchSources(sources) {\n if (isReactive(sources))\n return sources;\n if (Array.isArray(sources))\n return sources.map((item) => toValue$1(item));\n return toValue$1(sources);\n}\nfunction getOldValue(source) {\n return Array.isArray(source) ? source.map(() => void 0) : void 0;\n}\n\nfunction whenever(source, cb, options) {\n const stop = watch(\n source,\n (v, ov, onInvalidate) => {\n if (v) {\n if (options == null ? void 0 : options.once)\n nextTick(() => stop());\n cb(v, ov, onInvalidate);\n }\n },\n {\n ...options,\n once: false\n }\n );\n return stop;\n}\n\nexport { assert, refAutoReset as autoResetRef, bypassFilter, camelize, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createRef, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, computedEager as eagerComputed, extendRef, formatDate, get, getLifeCycleTarget, hasOwn, hyphenate, identity, watchIgnorable as ignorableWatch, increaseWithUnit, injectLocal, invoke, isClient, isDef, isDefined, isIOS, isObject, isWorker, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, provideLocal, pxValue, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toArray, toReactive, toRef, toRefs, toValue, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };\n","import { noop, makeDestructurable, camelize, isClient, toArray, watchImmediate, isObject, tryOnScopeDispose, isIOS, notNullish, tryOnMounted, objectOmit, promiseTimeout, until, injectLocal, provideLocal, pxValue, increaseWithUnit, objectEntries, createRef, createSingletonPromise, useTimeoutFn, pausableWatch, toRef, createEventHook, useIntervalFn, computedWithControl, timestamp, pausableFilter, watchIgnorable, debounceFilter, bypassFilter, createFilterWrapper, toRefs, watchOnce, containsProp, hasOwn, throttleFilter, useDebounceFn, useThrottleFn, tryOnUnmounted, clamp, syncRef, objectPick, watchWithFilter, identity, isDef, whenever, isWorker } from '@vueuse/shared';\nexport * from '@vueuse/shared';\nimport { isRef, shallowRef, ref, watchEffect, computed, inject, defineComponent, h, TransitionGroup, shallowReactive, Fragment, toValue, unref, getCurrentInstance, onMounted, watch, customRef, onUpdated, readonly, reactive, hasInjectionContext, toRaw, nextTick, markRaw, getCurrentScope, isReadonly, onBeforeUpdate } from 'vue';\n\nfunction computedAsync(evaluationCallback, initialState, optionsOrRef) {\n let options;\n if (isRef(optionsOrRef)) {\n options = {\n evaluating: optionsOrRef\n };\n } else {\n options = optionsOrRef || {};\n }\n const {\n lazy = false,\n evaluating = void 0,\n shallow = true,\n onError = noop\n } = options;\n const started = shallowRef(!lazy);\n const current = shallow ? shallowRef(initialState) : ref(initialState);\n let counter = 0;\n watchEffect(async (onInvalidate) => {\n if (!started.value)\n return;\n counter++;\n const counterAtBeginning = counter;\n let hasFinished = false;\n if (evaluating) {\n Promise.resolve().then(() => {\n evaluating.value = true;\n });\n }\n try {\n const result = await evaluationCallback((cancelCallback) => {\n onInvalidate(() => {\n if (evaluating)\n evaluating.value = false;\n if (!hasFinished)\n cancelCallback();\n });\n });\n if (counterAtBeginning === counter)\n current.value = result;\n } catch (e) {\n onError(e);\n } finally {\n if (evaluating && counterAtBeginning === counter)\n evaluating.value = false;\n hasFinished = true;\n }\n });\n if (lazy) {\n return computed(() => {\n started.value = true;\n return current.value;\n });\n } else {\n return current;\n }\n}\n\nfunction computedInject(key, options, defaultSource, treatDefaultAsFactory) {\n let source = inject(key);\n if (defaultSource)\n source = inject(key, defaultSource);\n if (treatDefaultAsFactory)\n source = inject(key, defaultSource, treatDefaultAsFactory);\n if (typeof options === \"function\") {\n return computed((ctx) => options(source, ctx));\n } else {\n return computed({\n get: (ctx) => options.get(source, ctx),\n set: options.set\n });\n }\n}\n\nfunction createReusableTemplate(options = {}) {\n const {\n inheritAttrs = true\n } = options;\n const render = shallowRef();\n const define = /*@__PURE__*/ defineComponent({\n setup(_, { slots }) {\n return () => {\n render.value = slots.default;\n };\n }\n });\n const reuse = /*@__PURE__*/ defineComponent({\n inheritAttrs,\n props: options.props,\n setup(props, { attrs, slots }) {\n return () => {\n var _a;\n if (!render.value && process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] Failed to find the definition of reusable template\");\n const vnode = (_a = render.value) == null ? void 0 : _a.call(render, {\n ...options.props == null ? keysToCamelKebabCase(attrs) : props,\n $slots: slots\n });\n return inheritAttrs && (vnode == null ? void 0 : vnode.length) === 1 ? vnode[0] : vnode;\n };\n }\n });\n return makeDestructurable(\n { define, reuse },\n [define, reuse]\n );\n}\nfunction keysToCamelKebabCase(obj) {\n const newObj = {};\n for (const key in obj)\n newObj[camelize(key)] = obj[key];\n return newObj;\n}\n\nfunction createTemplatePromise(options = {}) {\n let index = 0;\n const instances = ref([]);\n function create(...args) {\n const props = shallowReactive({\n key: index++,\n args,\n promise: void 0,\n resolve: () => {\n },\n reject: () => {\n },\n isResolving: false,\n options\n });\n instances.value.push(props);\n props.promise = new Promise((_resolve, _reject) => {\n props.resolve = (v) => {\n props.isResolving = true;\n return _resolve(v);\n };\n props.reject = _reject;\n }).finally(() => {\n props.promise = void 0;\n const index2 = instances.value.indexOf(props);\n if (index2 !== -1)\n instances.value.splice(index2, 1);\n });\n return props.promise;\n }\n function start(...args) {\n if (options.singleton && instances.value.length > 0)\n return instances.value[0].promise;\n return create(...args);\n }\n const component = /*@__PURE__*/ defineComponent((_, { slots }) => {\n const renderList = () => instances.value.map((props) => {\n var _a;\n return h(Fragment, { key: props.key }, (_a = slots.default) == null ? void 0 : _a.call(slots, props));\n });\n if (options.transition)\n return () => h(TransitionGroup, options.transition, renderList);\n return renderList;\n });\n component.start = start;\n return component;\n}\n\nfunction createUnrefFn(fn) {\n return function(...args) {\n return fn.apply(this, args.map((i) => toValue(i)));\n };\n}\n\nconst defaultWindow = isClient ? window : void 0;\nconst defaultDocument = isClient ? window.document : void 0;\nconst defaultNavigator = isClient ? window.navigator : void 0;\nconst defaultLocation = isClient ? window.location : void 0;\n\nfunction unrefElement(elRef) {\n var _a;\n const plain = toValue(elRef);\n return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;\n}\n\nfunction useEventListener(...args) {\n const cleanups = [];\n const cleanup = () => {\n cleanups.forEach((fn) => fn());\n cleanups.length = 0;\n };\n const register = (el, event, listener, options) => {\n el.addEventListener(event, listener, options);\n return () => el.removeEventListener(event, listener, options);\n };\n const firstParamTargets = computed(() => {\n const test = toArray(toValue(args[0])).filter((e) => e != null);\n return test.every((e) => typeof e !== \"string\") ? test : void 0;\n });\n const stopWatch = watchImmediate(\n () => {\n var _a, _b;\n return [\n (_b = (_a = firstParamTargets.value) == null ? void 0 : _a.map((e) => unrefElement(e))) != null ? _b : [defaultWindow].filter((e) => e != null),\n toArray(toValue(firstParamTargets.value ? args[1] : args[0])),\n toArray(unref(firstParamTargets.value ? args[2] : args[1])),\n // @ts-expect-error - TypeScript gets the correct types, but somehow still complains\n toValue(firstParamTargets.value ? args[3] : args[2])\n ];\n },\n ([raw_targets, raw_events, raw_listeners, raw_options]) => {\n cleanup();\n if (!(raw_targets == null ? void 0 : raw_targets.length) || !(raw_events == null ? void 0 : raw_events.length) || !(raw_listeners == null ? void 0 : raw_listeners.length))\n return;\n const optionsClone = isObject(raw_options) ? { ...raw_options } : raw_options;\n cleanups.push(\n ...raw_targets.flatMap(\n (el) => raw_events.flatMap(\n (event) => raw_listeners.map((listener) => register(el, event, listener, optionsClone))\n )\n )\n );\n },\n { flush: \"post\" }\n );\n const stop = () => {\n stopWatch();\n cleanup();\n };\n tryOnScopeDispose(cleanup);\n return stop;\n}\n\nlet _iOSWorkaround = false;\nfunction onClickOutside(target, handler, options = {}) {\n const { window = defaultWindow, ignore = [], capture = true, detectIframe = false, controls = false } = options;\n if (!window) {\n return controls ? { stop: noop, cancel: noop, trigger: noop } : noop;\n }\n if (isIOS && !_iOSWorkaround) {\n _iOSWorkaround = true;\n const listenerOptions = { passive: true };\n Array.from(window.document.body.children).forEach((el) => useEventListener(el, \"click\", noop, listenerOptions));\n useEventListener(window.document.documentElement, \"click\", noop, listenerOptions);\n }\n let shouldListen = true;\n const shouldIgnore = (event) => {\n return toValue(ignore).some((target2) => {\n if (typeof target2 === \"string\") {\n return Array.from(window.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el));\n } else {\n const el = unrefElement(target2);\n return el && (event.target === el || event.composedPath().includes(el));\n }\n });\n };\n function hasMultipleRoots(target2) {\n const vm = toValue(target2);\n return vm && vm.$.subTree.shapeFlag === 16;\n }\n function checkMultipleRoots(target2, event) {\n const vm = toValue(target2);\n const children = vm.$.subTree && vm.$.subTree.children;\n if (children == null || !Array.isArray(children))\n return false;\n return children.some((child) => child.el === event.target || event.composedPath().includes(child.el));\n }\n const listener = (event) => {\n const el = unrefElement(target);\n if (event.target == null)\n return;\n if (!(el instanceof Element) && hasMultipleRoots(target) && checkMultipleRoots(target, event))\n return;\n if (!el || el === event.target || event.composedPath().includes(el))\n return;\n if (\"detail\" in event && event.detail === 0)\n shouldListen = !shouldIgnore(event);\n if (!shouldListen) {\n shouldListen = true;\n return;\n }\n handler(event);\n };\n let isProcessingClick = false;\n const cleanup = [\n useEventListener(window, \"click\", (event) => {\n if (!isProcessingClick) {\n isProcessingClick = true;\n setTimeout(() => {\n isProcessingClick = false;\n }, 0);\n listener(event);\n }\n }, { passive: true, capture }),\n useEventListener(window, \"pointerdown\", (e) => {\n const el = unrefElement(target);\n shouldListen = !shouldIgnore(e) && !!(el && !e.composedPath().includes(el));\n }, { passive: true }),\n detectIframe && useEventListener(window, \"blur\", (event) => {\n setTimeout(() => {\n var _a;\n const el = unrefElement(target);\n if (((_a = window.document.activeElement) == null ? void 0 : _a.tagName) === \"IFRAME\" && !(el == null ? void 0 : el.contains(window.document.activeElement))) {\n handler(event);\n }\n }, 0);\n }, { passive: true })\n ].filter(Boolean);\n const stop = () => cleanup.forEach((fn) => fn());\n if (controls) {\n return {\n stop,\n cancel: () => {\n shouldListen = false;\n },\n trigger: (event) => {\n shouldListen = true;\n listener(event);\n shouldListen = false;\n }\n };\n }\n return stop;\n}\n\nfunction useMounted() {\n const isMounted = shallowRef(false);\n const instance = getCurrentInstance();\n if (instance) {\n onMounted(() => {\n isMounted.value = true;\n }, instance);\n }\n return isMounted;\n}\n\nfunction useSupported(callback) {\n const isMounted = useMounted();\n return computed(() => {\n isMounted.value;\n return Boolean(callback());\n });\n}\n\nfunction useMutationObserver(target, callback, options = {}) {\n const { window = defaultWindow, ...mutationOptions } = options;\n let observer;\n const isSupported = useSupported(() => window && \"MutationObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const targets = computed(() => {\n const value = toValue(target);\n const items = toArray(value).map(unrefElement).filter(notNullish);\n return new Set(items);\n });\n const stopWatch = watch(\n () => targets.value,\n (targets2) => {\n cleanup();\n if (isSupported.value && targets2.size) {\n observer = new MutationObserver(callback);\n targets2.forEach((el) => observer.observe(el, mutationOptions));\n }\n },\n { immediate: true, flush: \"post\" }\n );\n const takeRecords = () => {\n return observer == null ? void 0 : observer.takeRecords();\n };\n const stop = () => {\n stopWatch();\n cleanup();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop,\n takeRecords\n };\n}\n\nfunction onElementRemoval(target, callback, options = {}) {\n const {\n window = defaultWindow,\n document = window == null ? void 0 : window.document,\n flush = \"sync\"\n } = options;\n if (!window || !document)\n return noop;\n let stopFn;\n const cleanupAndUpdate = (fn) => {\n stopFn == null ? void 0 : stopFn();\n stopFn = fn;\n };\n const stopWatch = watchEffect(() => {\n const el = unrefElement(target);\n if (el) {\n const { stop } = useMutationObserver(\n document,\n (mutationsList) => {\n const targetRemoved = mutationsList.map((mutation) => [...mutation.removedNodes]).flat().some((node) => node === el || node.contains(el));\n if (targetRemoved) {\n callback(mutationsList);\n }\n },\n {\n window,\n childList: true,\n subtree: true\n }\n );\n cleanupAndUpdate(stop);\n }\n }, { flush });\n const stopHandle = () => {\n stopWatch();\n cleanupAndUpdate();\n };\n tryOnScopeDispose(stopHandle);\n return stopHandle;\n}\n\nfunction createKeyPredicate(keyFilter) {\n if (typeof keyFilter === \"function\")\n return keyFilter;\n else if (typeof keyFilter === \"string\")\n return (event) => event.key === keyFilter;\n else if (Array.isArray(keyFilter))\n return (event) => keyFilter.includes(event.key);\n return () => true;\n}\nfunction onKeyStroke(...args) {\n let key;\n let handler;\n let options = {};\n if (args.length === 3) {\n key = args[0];\n handler = args[1];\n options = args[2];\n } else if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n key = true;\n handler = args[0];\n options = args[1];\n } else {\n key = args[0];\n handler = args[1];\n }\n } else {\n key = true;\n handler = args[0];\n }\n const {\n target = defaultWindow,\n eventName = \"keydown\",\n passive = false,\n dedupe = false\n } = options;\n const predicate = createKeyPredicate(key);\n const listener = (e) => {\n if (e.repeat && toValue(dedupe))\n return;\n if (predicate(e))\n handler(e);\n };\n return useEventListener(target, eventName, listener, passive);\n}\nfunction onKeyDown(key, handler, options = {}) {\n return onKeyStroke(key, handler, { ...options, eventName: \"keydown\" });\n}\nfunction onKeyPressed(key, handler, options = {}) {\n return onKeyStroke(key, handler, { ...options, eventName: \"keypress\" });\n}\nfunction onKeyUp(key, handler, options = {}) {\n return onKeyStroke(key, handler, { ...options, eventName: \"keyup\" });\n}\n\nconst DEFAULT_DELAY = 500;\nconst DEFAULT_THRESHOLD = 10;\nfunction onLongPress(target, handler, options) {\n var _a, _b;\n const elementRef = computed(() => unrefElement(target));\n let timeout;\n let posStart;\n let startTimestamp;\n let hasLongPressed = false;\n function clear() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = void 0;\n }\n posStart = void 0;\n startTimestamp = void 0;\n hasLongPressed = false;\n }\n function onRelease(ev) {\n var _a2, _b2, _c;\n const [_startTimestamp, _posStart, _hasLongPressed] = [startTimestamp, posStart, hasLongPressed];\n clear();\n if (!(options == null ? void 0 : options.onMouseUp) || !_posStart || !_startTimestamp)\n return;\n if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n return;\n if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n ev.preventDefault();\n if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n ev.stopPropagation();\n const dx = ev.x - _posStart.x;\n const dy = ev.y - _posStart.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n options.onMouseUp(ev.timeStamp - _startTimestamp, distance, _hasLongPressed);\n }\n function onDown(ev) {\n var _a2, _b2, _c, _d;\n if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n return;\n clear();\n if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n ev.preventDefault();\n if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n ev.stopPropagation();\n posStart = {\n x: ev.x,\n y: ev.y\n };\n startTimestamp = ev.timeStamp;\n timeout = setTimeout(\n () => {\n hasLongPressed = true;\n handler(ev);\n },\n (_d = options == null ? void 0 : options.delay) != null ? _d : DEFAULT_DELAY\n );\n }\n function onMove(ev) {\n var _a2, _b2, _c, _d;\n if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n return;\n if (!posStart || (options == null ? void 0 : options.distanceThreshold) === false)\n return;\n if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n ev.preventDefault();\n if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n ev.stopPropagation();\n const dx = ev.x - posStart.x;\n const dy = ev.y - posStart.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n if (distance >= ((_d = options == null ? void 0 : options.distanceThreshold) != null ? _d : DEFAULT_THRESHOLD))\n clear();\n }\n const listenerOptions = {\n capture: (_a = options == null ? void 0 : options.modifiers) == null ? void 0 : _a.capture,\n once: (_b = options == null ? void 0 : options.modifiers) == null ? void 0 : _b.once\n };\n const cleanup = [\n useEventListener(elementRef, \"pointerdown\", onDown, listenerOptions),\n useEventListener(elementRef, \"pointermove\", onMove, listenerOptions),\n useEventListener(elementRef, [\"pointerup\", \"pointerleave\"], onRelease, listenerOptions)\n ];\n const stop = () => cleanup.forEach((fn) => fn());\n return stop;\n}\n\nfunction isFocusedElementEditable() {\n const { activeElement, body } = document;\n if (!activeElement)\n return false;\n if (activeElement === body)\n return false;\n switch (activeElement.tagName) {\n case \"INPUT\":\n case \"TEXTAREA\":\n return true;\n }\n return activeElement.hasAttribute(\"contenteditable\");\n}\nfunction isTypedCharValid({\n keyCode,\n metaKey,\n ctrlKey,\n altKey\n}) {\n if (metaKey || ctrlKey || altKey)\n return false;\n if (keyCode >= 48 && keyCode <= 57 || keyCode >= 96 && keyCode <= 105)\n return true;\n if (keyCode >= 65 && keyCode <= 90)\n return true;\n return false;\n}\nfunction onStartTyping(callback, options = {}) {\n const { document: document2 = defaultDocument } = options;\n const keydown = (event) => {\n if (!isFocusedElementEditable() && isTypedCharValid(event)) {\n callback(event);\n }\n };\n if (document2)\n useEventListener(document2, \"keydown\", keydown, { passive: true });\n}\n\nfunction templateRef(key, initialValue = null) {\n const instance = getCurrentInstance();\n let _trigger = () => {\n };\n const element = customRef((track, trigger) => {\n _trigger = trigger;\n return {\n get() {\n var _a, _b;\n track();\n return (_b = (_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.$refs[key]) != null ? _b : initialValue;\n },\n set() {\n }\n };\n });\n tryOnMounted(_trigger);\n onUpdated(_trigger);\n return element;\n}\n\nfunction useActiveElement(options = {}) {\n var _a;\n const {\n window = defaultWindow,\n deep = true,\n triggerOnRemoval = false\n } = options;\n const document = (_a = options.document) != null ? _a : window == null ? void 0 : window.document;\n const getDeepActiveElement = () => {\n var _a2;\n let element = document == null ? void 0 : document.activeElement;\n if (deep) {\n while (element == null ? void 0 : element.shadowRoot)\n element = (_a2 = element == null ? void 0 : element.shadowRoot) == null ? void 0 : _a2.activeElement;\n }\n return element;\n };\n const activeElement = shallowRef();\n const trigger = () => {\n activeElement.value = getDeepActiveElement();\n };\n if (window) {\n const listenerOptions = {\n capture: true,\n passive: true\n };\n useEventListener(\n window,\n \"blur\",\n (event) => {\n if (event.relatedTarget !== null)\n return;\n trigger();\n },\n listenerOptions\n );\n useEventListener(\n window,\n \"focus\",\n trigger,\n listenerOptions\n );\n }\n if (triggerOnRemoval) {\n onElementRemoval(activeElement, trigger, { document });\n }\n trigger();\n return activeElement;\n}\n\nfunction useRafFn(fn, options = {}) {\n const {\n immediate = true,\n fpsLimit = void 0,\n window = defaultWindow,\n once = false\n } = options;\n const isActive = shallowRef(false);\n const intervalLimit = computed(() => {\n return fpsLimit ? 1e3 / toValue(fpsLimit) : null;\n });\n let previousFrameTimestamp = 0;\n let rafId = null;\n function loop(timestamp) {\n if (!isActive.value || !window)\n return;\n if (!previousFrameTimestamp)\n previousFrameTimestamp = timestamp;\n const delta = timestamp - previousFrameTimestamp;\n if (intervalLimit.value && delta < intervalLimit.value) {\n rafId = window.requestAnimationFrame(loop);\n return;\n }\n previousFrameTimestamp = timestamp;\n fn({ delta, timestamp });\n if (once) {\n isActive.value = false;\n rafId = null;\n return;\n }\n rafId = window.requestAnimationFrame(loop);\n }\n function resume() {\n if (!isActive.value && window) {\n isActive.value = true;\n previousFrameTimestamp = 0;\n rafId = window.requestAnimationFrame(loop);\n }\n }\n function pause() {\n isActive.value = false;\n if (rafId != null && window) {\n window.cancelAnimationFrame(rafId);\n rafId = null;\n }\n }\n if (immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive: readonly(isActive),\n pause,\n resume\n };\n}\n\nfunction useAnimate(target, keyframes, options) {\n let config;\n let animateOptions;\n if (isObject(options)) {\n config = options;\n animateOptions = objectOmit(options, [\"window\", \"immediate\", \"commitStyles\", \"persist\", \"onReady\", \"onError\"]);\n } else {\n config = { duration: options };\n animateOptions = options;\n }\n const {\n window = defaultWindow,\n immediate = true,\n commitStyles,\n persist,\n playbackRate: _playbackRate = 1,\n onReady,\n onError = (e) => {\n console.error(e);\n }\n } = config;\n const isSupported = useSupported(() => window && HTMLElement && \"animate\" in HTMLElement.prototype);\n const animate = shallowRef(void 0);\n const store = shallowReactive({\n startTime: null,\n currentTime: null,\n timeline: null,\n playbackRate: _playbackRate,\n pending: false,\n playState: immediate ? \"idle\" : \"paused\",\n replaceState: \"active\"\n });\n const pending = computed(() => store.pending);\n const playState = computed(() => store.playState);\n const replaceState = computed(() => store.replaceState);\n const startTime = computed({\n get() {\n return store.startTime;\n },\n set(value) {\n store.startTime = value;\n if (animate.value)\n animate.value.startTime = value;\n }\n });\n const currentTime = computed({\n get() {\n return store.currentTime;\n },\n set(value) {\n store.currentTime = value;\n if (animate.value) {\n animate.value.currentTime = value;\n syncResume();\n }\n }\n });\n const timeline = computed({\n get() {\n return store.timeline;\n },\n set(value) {\n store.timeline = value;\n if (animate.value)\n animate.value.timeline = value;\n }\n });\n const playbackRate = computed({\n get() {\n return store.playbackRate;\n },\n set(value) {\n store.playbackRate = value;\n if (animate.value)\n animate.value.playbackRate = value;\n }\n });\n const play = () => {\n if (animate.value) {\n try {\n animate.value.play();\n syncResume();\n } catch (e) {\n syncPause();\n onError(e);\n }\n } else {\n update();\n }\n };\n const pause = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.pause();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n const reverse = () => {\n var _a;\n if (!animate.value)\n update();\n try {\n (_a = animate.value) == null ? void 0 : _a.reverse();\n syncResume();\n } catch (e) {\n syncPause();\n onError(e);\n }\n };\n const finish = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.finish();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n const cancel = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.cancel();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n watch(() => unrefElement(target), (el) => {\n if (el) {\n update();\n } else {\n animate.value = void 0;\n }\n });\n watch(() => keyframes, (value) => {\n if (animate.value) {\n update();\n const targetEl = unrefElement(target);\n if (targetEl) {\n animate.value.effect = new KeyframeEffect(\n targetEl,\n toValue(value),\n animateOptions\n );\n }\n }\n }, { deep: true });\n tryOnMounted(() => update(true), false);\n tryOnScopeDispose(cancel);\n function update(init) {\n const el = unrefElement(target);\n if (!isSupported.value || !el)\n return;\n if (!animate.value)\n animate.value = el.animate(toValue(keyframes), animateOptions);\n if (persist)\n animate.value.persist();\n if (_playbackRate !== 1)\n animate.value.playbackRate = _playbackRate;\n if (init && !immediate)\n animate.value.pause();\n else\n syncResume();\n onReady == null ? void 0 : onReady(animate.value);\n }\n const listenerOptions = { passive: true };\n useEventListener(animate, [\"cancel\", \"finish\", \"remove\"], syncPause, listenerOptions);\n useEventListener(animate, \"finish\", () => {\n var _a;\n if (commitStyles)\n (_a = animate.value) == null ? void 0 : _a.commitStyles();\n }, listenerOptions);\n const { resume: resumeRef, pause: pauseRef } = useRafFn(() => {\n if (!animate.value)\n return;\n store.pending = animate.value.pending;\n store.playState = animate.value.playState;\n store.replaceState = animate.value.replaceState;\n store.startTime = animate.value.startTime;\n store.currentTime = animate.value.currentTime;\n store.timeline = animate.value.timeline;\n store.playbackRate = animate.value.playbackRate;\n }, { immediate: false });\n function syncResume() {\n if (isSupported.value)\n resumeRef();\n }\n function syncPause() {\n if (isSupported.value && window)\n window.requestAnimationFrame(pauseRef);\n }\n return {\n isSupported,\n animate,\n // actions\n play,\n pause,\n reverse,\n finish,\n cancel,\n // state\n pending,\n playState,\n replaceState,\n startTime,\n currentTime,\n timeline,\n playbackRate\n };\n}\n\nfunction useAsyncQueue(tasks, options) {\n const {\n interrupt = true,\n onError = noop,\n onFinished = noop,\n signal\n } = options || {};\n const promiseState = {\n aborted: \"aborted\",\n fulfilled: \"fulfilled\",\n pending: \"pending\",\n rejected: \"rejected\"\n };\n const initialResult = Array.from(Array.from({ length: tasks.length }), () => ({ state: promiseState.pending, data: null }));\n const result = reactive(initialResult);\n const activeIndex = shallowRef(-1);\n if (!tasks || tasks.length === 0) {\n onFinished();\n return {\n activeIndex,\n result\n };\n }\n function updateResult(state, res) {\n activeIndex.value++;\n result[activeIndex.value].data = res;\n result[activeIndex.value].state = state;\n }\n tasks.reduce((prev, curr) => {\n return prev.then((prevRes) => {\n var _a;\n if (signal == null ? void 0 : signal.aborted) {\n updateResult(promiseState.aborted, new Error(\"aborted\"));\n return;\n }\n if (((_a = result[activeIndex.value]) == null ? void 0 : _a.state) === promiseState.rejected && interrupt) {\n onFinished();\n return;\n }\n const done = curr(prevRes).then((currentRes) => {\n updateResult(promiseState.fulfilled, currentRes);\n if (activeIndex.value === tasks.length - 1)\n onFinished();\n return currentRes;\n });\n if (!signal)\n return done;\n return Promise.race([done, whenAborted(signal)]);\n }).catch((e) => {\n if (signal == null ? void 0 : signal.aborted) {\n updateResult(promiseState.aborted, e);\n return e;\n }\n updateResult(promiseState.rejected, e);\n onError();\n return e;\n });\n }, Promise.resolve());\n return {\n activeIndex,\n result\n };\n}\nfunction whenAborted(signal) {\n return new Promise((resolve, reject) => {\n const error = new Error(\"aborted\");\n if (signal.aborted)\n reject(error);\n else\n signal.addEventListener(\"abort\", () => reject(error), { once: true });\n });\n}\n\nfunction useAsyncState(promise, initialState, options) {\n const {\n immediate = true,\n delay = 0,\n onError = noop,\n onSuccess = noop,\n resetOnExecute = true,\n shallow = true,\n throwError\n } = options != null ? options : {};\n const state = shallow ? shallowRef(initialState) : ref(initialState);\n const isReady = shallowRef(false);\n const isLoading = shallowRef(false);\n const error = shallowRef(void 0);\n async function execute(delay2 = 0, ...args) {\n if (resetOnExecute)\n state.value = initialState;\n error.value = void 0;\n isReady.value = false;\n isLoading.value = true;\n if (delay2 > 0)\n await promiseTimeout(delay2);\n const _promise = typeof promise === \"function\" ? promise(...args) : promise;\n try {\n const data = await _promise;\n state.value = data;\n isReady.value = true;\n onSuccess(data);\n } catch (e) {\n error.value = e;\n onError(e);\n if (throwError)\n throw e;\n } finally {\n isLoading.value = false;\n }\n return state.value;\n }\n if (immediate) {\n execute(delay);\n }\n const shell = {\n state,\n isReady,\n isLoading,\n error,\n execute\n };\n function waitUntilIsLoaded() {\n return new Promise((resolve, reject) => {\n until(isLoading).toBe(false).then(() => resolve(shell)).catch(reject);\n });\n }\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilIsLoaded().then(onFulfilled, onRejected);\n }\n };\n}\n\nconst defaults = {\n array: (v) => JSON.stringify(v),\n object: (v) => JSON.stringify(v),\n set: (v) => JSON.stringify(Array.from(v)),\n map: (v) => JSON.stringify(Object.fromEntries(v)),\n null: () => \"\"\n};\nfunction getDefaultSerialization(target) {\n if (!target)\n return defaults.null;\n if (target instanceof Map)\n return defaults.map;\n else if (target instanceof Set)\n return defaults.set;\n else if (Array.isArray(target))\n return defaults.array;\n else\n return defaults.object;\n}\n\nfunction useBase64(target, options) {\n const base64 = shallowRef(\"\");\n const promise = shallowRef();\n function execute() {\n if (!isClient)\n return;\n promise.value = new Promise((resolve, reject) => {\n try {\n const _target = toValue(target);\n if (_target == null) {\n resolve(\"\");\n } else if (typeof _target === \"string\") {\n resolve(blobToBase64(new Blob([_target], { type: \"text/plain\" })));\n } else if (_target instanceof Blob) {\n resolve(blobToBase64(_target));\n } else if (_target instanceof ArrayBuffer) {\n resolve(window.btoa(String.fromCharCode(...new Uint8Array(_target))));\n } else if (_target instanceof HTMLCanvasElement) {\n resolve(_target.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n } else if (_target instanceof HTMLImageElement) {\n const img = _target.cloneNode(false);\n img.crossOrigin = \"Anonymous\";\n imgLoaded(img).then(() => {\n const canvas = document.createElement(\"canvas\");\n const ctx = canvas.getContext(\"2d\");\n canvas.width = img.width;\n canvas.height = img.height;\n ctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n resolve(canvas.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n }).catch(reject);\n } else if (typeof _target === \"object\") {\n const _serializeFn = (options == null ? void 0 : options.serializer) || getDefaultSerialization(_target);\n const serialized = _serializeFn(_target);\n return resolve(blobToBase64(new Blob([serialized], { type: \"application/json\" })));\n } else {\n reject(new Error(\"target is unsupported types\"));\n }\n } catch (error) {\n reject(error);\n }\n });\n promise.value.then((res) => {\n base64.value = (options == null ? void 0 : options.dataUrl) === false ? res.replace(/^data:.*?;base64,/, \"\") : res;\n });\n return promise.value;\n }\n if (isRef(target) || typeof target === \"function\")\n watch(target, execute, { immediate: true });\n else\n execute();\n return {\n base64,\n promise,\n execute\n };\n}\nfunction imgLoaded(img) {\n return new Promise((resolve, reject) => {\n if (!img.complete) {\n img.onload = () => {\n resolve();\n };\n img.onerror = reject;\n } else {\n resolve();\n }\n });\n}\nfunction blobToBase64(blob) {\n return new Promise((resolve, reject) => {\n const fr = new FileReader();\n fr.onload = (e) => {\n resolve(e.target.result);\n };\n fr.onerror = reject;\n fr.readAsDataURL(blob);\n });\n}\n\nfunction useBattery(options = {}) {\n const { navigator = defaultNavigator } = options;\n const events = [\"chargingchange\", \"chargingtimechange\", \"dischargingtimechange\", \"levelchange\"];\n const isSupported = useSupported(() => navigator && \"getBattery\" in navigator && typeof navigator.getBattery === \"function\");\n const charging = shallowRef(false);\n const chargingTime = shallowRef(0);\n const dischargingTime = shallowRef(0);\n const level = shallowRef(1);\n let battery;\n function updateBatteryInfo() {\n charging.value = this.charging;\n chargingTime.value = this.chargingTime || 0;\n dischargingTime.value = this.dischargingTime || 0;\n level.value = this.level;\n }\n if (isSupported.value) {\n navigator.getBattery().then((_battery) => {\n battery = _battery;\n updateBatteryInfo.call(battery);\n useEventListener(battery, events, updateBatteryInfo, { passive: true });\n });\n }\n return {\n isSupported,\n charging,\n chargingTime,\n dischargingTime,\n level\n };\n}\n\nfunction useBluetooth(options) {\n let {\n acceptAllDevices = false\n } = options || {};\n const {\n filters = void 0,\n optionalServices = void 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => navigator && \"bluetooth\" in navigator);\n const device = shallowRef();\n const error = shallowRef(null);\n watch(device, () => {\n connectToBluetoothGATTServer();\n });\n async function requestDevice() {\n if (!isSupported.value)\n return;\n error.value = null;\n if (filters && filters.length > 0)\n acceptAllDevices = false;\n try {\n device.value = await (navigator == null ? void 0 : navigator.bluetooth.requestDevice({\n acceptAllDevices,\n filters,\n optionalServices\n }));\n } catch (err) {\n error.value = err;\n }\n }\n const server = shallowRef();\n const isConnected = shallowRef(false);\n function reset() {\n isConnected.value = false;\n device.value = void 0;\n server.value = void 0;\n }\n async function connectToBluetoothGATTServer() {\n error.value = null;\n if (device.value && device.value.gatt) {\n useEventListener(device, \"gattserverdisconnected\", reset, { passive: true });\n try {\n server.value = await device.value.gatt.connect();\n isConnected.value = server.value.connected;\n } catch (err) {\n error.value = err;\n }\n }\n }\n tryOnMounted(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.connect();\n });\n tryOnScopeDispose(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.disconnect();\n });\n return {\n isSupported,\n isConnected: readonly(isConnected),\n // Device:\n device,\n requestDevice,\n // Server:\n server,\n // Errors:\n error\n };\n}\n\nconst ssrWidthSymbol = Symbol(\"vueuse-ssr-width\");\nfunction useSSRWidth() {\n const ssrWidth = hasInjectionContext() ? injectLocal(ssrWidthSymbol, null) : null;\n return typeof ssrWidth === \"number\" ? ssrWidth : void 0;\n}\nfunction provideSSRWidth(width, app) {\n if (app !== void 0) {\n app.provide(ssrWidthSymbol, width);\n } else {\n provideLocal(ssrWidthSymbol, width);\n }\n}\n\nfunction useMediaQuery(query, options = {}) {\n const { window = defaultWindow, ssrWidth = useSSRWidth() } = options;\n const isSupported = useSupported(() => window && \"matchMedia\" in window && typeof window.matchMedia === \"function\");\n const ssrSupport = shallowRef(typeof ssrWidth === \"number\");\n const mediaQuery = shallowRef();\n const matches = shallowRef(false);\n const handler = (event) => {\n matches.value = event.matches;\n };\n watchEffect(() => {\n if (ssrSupport.value) {\n ssrSupport.value = !isSupported.value;\n const queryStrings = toValue(query).split(\",\");\n matches.value = queryStrings.some((queryString) => {\n const not = queryString.includes(\"not all\");\n const minWidth = queryString.match(/\\(\\s*min-width:\\s*(-?\\d+(?:\\.\\d*)?[a-z]+\\s*)\\)/);\n const maxWidth = queryString.match(/\\(\\s*max-width:\\s*(-?\\d+(?:\\.\\d*)?[a-z]+\\s*)\\)/);\n let res = Boolean(minWidth || maxWidth);\n if (minWidth && res) {\n res = ssrWidth >= pxValue(minWidth[1]);\n }\n if (maxWidth && res) {\n res = ssrWidth <= pxValue(maxWidth[1]);\n }\n return not ? !res : res;\n });\n return;\n }\n if (!isSupported.value)\n return;\n mediaQuery.value = window.matchMedia(toValue(query));\n matches.value = mediaQuery.value.matches;\n });\n useEventListener(mediaQuery, \"change\", handler, { passive: true });\n return computed(() => matches.value);\n}\n\nconst breakpointsTailwind = {\n \"sm\": 640,\n \"md\": 768,\n \"lg\": 1024,\n \"xl\": 1280,\n \"2xl\": 1536\n};\nconst breakpointsBootstrapV5 = {\n xs: 0,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1400\n};\nconst breakpointsVuetifyV2 = {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1264,\n xl: 1904\n};\nconst breakpointsVuetifyV3 = {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1280,\n xl: 1920,\n xxl: 2560\n};\nconst breakpointsVuetify = breakpointsVuetifyV2;\nconst breakpointsAntDesign = {\n xs: 480,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1600\n};\nconst breakpointsQuasar = {\n xs: 0,\n sm: 600,\n md: 1024,\n lg: 1440,\n xl: 1920\n};\nconst breakpointsSematic = {\n mobileS: 320,\n mobileM: 375,\n mobileL: 425,\n tablet: 768,\n laptop: 1024,\n laptopL: 1440,\n desktop4K: 2560\n};\nconst breakpointsMasterCss = {\n \"3xs\": 360,\n \"2xs\": 480,\n \"xs\": 600,\n \"sm\": 768,\n \"md\": 1024,\n \"lg\": 1280,\n \"xl\": 1440,\n \"2xl\": 1600,\n \"3xl\": 1920,\n \"4xl\": 2560\n};\nconst breakpointsPrimeFlex = {\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200\n};\nconst breakpointsElement = {\n xs: 0,\n sm: 768,\n md: 992,\n lg: 1200,\n xl: 1920\n};\n\nfunction useBreakpoints(breakpoints, options = {}) {\n function getValue(k, delta) {\n let v = toValue(breakpoints[toValue(k)]);\n if (delta != null)\n v = increaseWithUnit(v, delta);\n if (typeof v === \"number\")\n v = `${v}px`;\n return v;\n }\n const { window = defaultWindow, strategy = \"min-width\", ssrWidth = useSSRWidth() } = options;\n const ssrSupport = typeof ssrWidth === \"number\";\n const mounted = ssrSupport ? shallowRef(false) : { value: true };\n if (ssrSupport) {\n tryOnMounted(() => mounted.value = !!window);\n }\n function match(query, size) {\n if (!mounted.value && ssrSupport) {\n return query === \"min\" ? ssrWidth >= pxValue(size) : ssrWidth <= pxValue(size);\n }\n if (!window)\n return false;\n return window.matchMedia(`(${query}-width: ${size})`).matches;\n }\n const greaterOrEqual = (k) => {\n return useMediaQuery(() => `(min-width: ${getValue(k)})`, options);\n };\n const smallerOrEqual = (k) => {\n return useMediaQuery(() => `(max-width: ${getValue(k)})`, options);\n };\n const shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => {\n Object.defineProperty(shortcuts, k, {\n get: () => strategy === \"min-width\" ? greaterOrEqual(k) : smallerOrEqual(k),\n enumerable: true,\n configurable: true\n });\n return shortcuts;\n }, {});\n function current() {\n const points = Object.keys(breakpoints).map((k) => [k, shortcutMethods[k], pxValue(getValue(k))]).sort((a, b) => a[2] - b[2]);\n return computed(() => points.filter(([, v]) => v.value).map(([k]) => k));\n }\n return Object.assign(shortcutMethods, {\n greaterOrEqual,\n smallerOrEqual,\n greater(k) {\n return useMediaQuery(() => `(min-width: ${getValue(k, 0.1)})`, options);\n },\n smaller(k) {\n return useMediaQuery(() => `(max-width: ${getValue(k, -0.1)})`, options);\n },\n between(a, b) {\n return useMediaQuery(() => `(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`, options);\n },\n isGreater(k) {\n return match(\"min\", getValue(k, 0.1));\n },\n isGreaterOrEqual(k) {\n return match(\"min\", getValue(k));\n },\n isSmaller(k) {\n return match(\"max\", getValue(k, -0.1));\n },\n isSmallerOrEqual(k) {\n return match(\"max\", getValue(k));\n },\n isInBetween(a, b) {\n return match(\"min\", getValue(a)) && match(\"max\", getValue(b, -0.1));\n },\n current,\n active() {\n const bps = current();\n return computed(() => bps.value.length === 0 ? \"\" : bps.value.at(strategy === \"min-width\" ? -1 : 0));\n }\n });\n}\n\nfunction useBroadcastChannel(options) {\n const {\n name,\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"BroadcastChannel\" in window);\n const isClosed = shallowRef(false);\n const channel = ref();\n const data = ref();\n const error = shallowRef(null);\n const post = (data2) => {\n if (channel.value)\n channel.value.postMessage(data2);\n };\n const close = () => {\n if (channel.value)\n channel.value.close();\n isClosed.value = true;\n };\n if (isSupported.value) {\n tryOnMounted(() => {\n error.value = null;\n channel.value = new BroadcastChannel(name);\n const listenerOptions = {\n passive: true\n };\n useEventListener(channel, \"message\", (e) => {\n data.value = e.data;\n }, listenerOptions);\n useEventListener(channel, \"messageerror\", (e) => {\n error.value = e;\n }, listenerOptions);\n useEventListener(channel, \"close\", () => {\n isClosed.value = true;\n }, listenerOptions);\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n isSupported,\n channel,\n data,\n post,\n close,\n error,\n isClosed\n };\n}\n\nconst WRITABLE_PROPERTIES = [\n \"hash\",\n \"host\",\n \"hostname\",\n \"href\",\n \"pathname\",\n \"port\",\n \"protocol\",\n \"search\"\n];\nfunction useBrowserLocation(options = {}) {\n const { window = defaultWindow } = options;\n const refs = Object.fromEntries(\n WRITABLE_PROPERTIES.map((key) => [key, ref()])\n );\n for (const [key, ref] of objectEntries(refs)) {\n watch(ref, (value) => {\n if (!(window == null ? void 0 : window.location) || window.location[key] === value)\n return;\n window.location[key] = value;\n });\n }\n const buildState = (trigger) => {\n var _a;\n const { state: state2, length } = (window == null ? void 0 : window.history) || {};\n const { origin } = (window == null ? void 0 : window.location) || {};\n for (const key of WRITABLE_PROPERTIES)\n refs[key].value = (_a = window == null ? void 0 : window.location) == null ? void 0 : _a[key];\n return reactive({\n trigger,\n state: state2,\n length,\n origin,\n ...refs\n });\n };\n const state = ref(buildState(\"load\"));\n if (window) {\n const listenerOptions = { passive: true };\n useEventListener(window, \"popstate\", () => state.value = buildState(\"popstate\"), listenerOptions);\n useEventListener(window, \"hashchange\", () => state.value = buildState(\"hashchange\"), listenerOptions);\n }\n return state;\n}\n\nfunction useCached(refValue, comparator = (a, b) => a === b, options) {\n const { deepRefs = true, ...watchOptions } = options || {};\n const cachedValue = createRef(refValue.value, deepRefs);\n watch(() => refValue.value, (value) => {\n if (!comparator(value, cachedValue.value))\n cachedValue.value = value;\n }, watchOptions);\n return cachedValue;\n}\n\nfunction usePermission(permissionDesc, options = {}) {\n const {\n controls = false,\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"permissions\" in navigator);\n const permissionStatus = shallowRef();\n const desc = typeof permissionDesc === \"string\" ? { name: permissionDesc } : permissionDesc;\n const state = shallowRef();\n const update = () => {\n var _a, _b;\n state.value = (_b = (_a = permissionStatus.value) == null ? void 0 : _a.state) != null ? _b : \"prompt\";\n };\n useEventListener(permissionStatus, \"change\", update, { passive: true });\n const query = createSingletonPromise(async () => {\n if (!isSupported.value)\n return;\n if (!permissionStatus.value) {\n try {\n permissionStatus.value = await navigator.permissions.query(desc);\n } catch (e) {\n permissionStatus.value = void 0;\n } finally {\n update();\n }\n }\n if (controls)\n return toRaw(permissionStatus.value);\n });\n query();\n if (controls) {\n return {\n state,\n isSupported,\n query\n };\n } else {\n return state;\n }\n}\n\nfunction useClipboard(options = {}) {\n const {\n navigator = defaultNavigator,\n read = false,\n source,\n copiedDuring = 1500,\n legacy = false\n } = options;\n const isClipboardApiSupported = useSupported(() => navigator && \"clipboard\" in navigator);\n const permissionRead = usePermission(\"clipboard-read\");\n const permissionWrite = usePermission(\"clipboard-write\");\n const isSupported = computed(() => isClipboardApiSupported.value || legacy);\n const text = shallowRef(\"\");\n const copied = shallowRef(false);\n const timeout = useTimeoutFn(() => copied.value = false, copiedDuring, { immediate: false });\n async function updateText() {\n let useLegacy = !(isClipboardApiSupported.value && isAllowed(permissionRead.value));\n if (!useLegacy) {\n try {\n text.value = await navigator.clipboard.readText();\n } catch (e) {\n useLegacy = true;\n }\n }\n if (useLegacy) {\n text.value = legacyRead();\n }\n }\n if (isSupported.value && read)\n useEventListener([\"copy\", \"cut\"], updateText, { passive: true });\n async function copy(value = toValue(source)) {\n if (isSupported.value && value != null) {\n let useLegacy = !(isClipboardApiSupported.value && isAllowed(permissionWrite.value));\n if (!useLegacy) {\n try {\n await navigator.clipboard.writeText(value);\n } catch (e) {\n useLegacy = true;\n }\n }\n if (useLegacy)\n legacyCopy(value);\n text.value = value;\n copied.value = true;\n timeout.start();\n }\n }\n function legacyCopy(value) {\n const ta = document.createElement(\"textarea\");\n ta.value = value != null ? value : \"\";\n ta.style.position = \"absolute\";\n ta.style.opacity = \"0\";\n document.body.appendChild(ta);\n ta.select();\n document.execCommand(\"copy\");\n ta.remove();\n }\n function legacyRead() {\n var _a, _b, _c;\n return (_c = (_b = (_a = document == null ? void 0 : document.getSelection) == null ? void 0 : _a.call(document)) == null ? void 0 : _b.toString()) != null ? _c : \"\";\n }\n function isAllowed(status) {\n return status === \"granted\" || status === \"prompt\";\n }\n return {\n isSupported,\n text,\n copied,\n copy\n };\n}\n\nfunction useClipboardItems(options = {}) {\n const {\n navigator = defaultNavigator,\n read = false,\n source,\n copiedDuring = 1500\n } = options;\n const isSupported = useSupported(() => navigator && \"clipboard\" in navigator);\n const content = ref([]);\n const copied = shallowRef(false);\n const timeout = useTimeoutFn(() => copied.value = false, copiedDuring, { immediate: false });\n function updateContent() {\n if (isSupported.value) {\n navigator.clipboard.read().then((items) => {\n content.value = items;\n });\n }\n }\n if (isSupported.value && read)\n useEventListener([\"copy\", \"cut\"], updateContent, { passive: true });\n async function copy(value = toValue(source)) {\n if (isSupported.value && value != null) {\n await navigator.clipboard.write(value);\n content.value = value;\n copied.value = true;\n timeout.start();\n }\n }\n return {\n isSupported,\n content,\n copied,\n copy\n };\n}\n\nfunction cloneFnJSON(source) {\n return JSON.parse(JSON.stringify(source));\n}\nfunction useCloned(source, options = {}) {\n const cloned = ref({});\n const isModified = shallowRef(false);\n let _lastSync = false;\n const {\n manual,\n clone = cloneFnJSON,\n // watch options\n deep = true,\n immediate = true\n } = options;\n watch(cloned, () => {\n if (_lastSync) {\n _lastSync = false;\n return;\n }\n isModified.value = true;\n }, {\n deep: true,\n flush: \"sync\"\n });\n function sync() {\n _lastSync = true;\n isModified.value = false;\n cloned.value = clone(toValue(source));\n }\n if (!manual && (isRef(source) || typeof source === \"function\")) {\n watch(source, sync, {\n ...options,\n deep,\n immediate\n });\n } else {\n sync();\n }\n return { cloned, isModified, sync };\n}\n\nconst _global = typeof globalThis !== \"undefined\" ? globalThis : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : {};\nconst globalKey = \"__vueuse_ssr_handlers__\";\nconst handlers = /* @__PURE__ */ getHandlers();\nfunction getHandlers() {\n if (!(globalKey in _global))\n _global[globalKey] = _global[globalKey] || {};\n return _global[globalKey];\n}\nfunction getSSRHandler(key, fallback) {\n return handlers[key] || fallback;\n}\nfunction setSSRHandler(key, fn) {\n handlers[key] = fn;\n}\n\nfunction usePreferredDark(options) {\n return useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n}\n\nfunction guessSerializerType(rawInit) {\n return rawInit == null ? \"any\" : rawInit instanceof Set ? \"set\" : rawInit instanceof Map ? \"map\" : rawInit instanceof Date ? \"date\" : typeof rawInit === \"boolean\" ? \"boolean\" : typeof rawInit === \"string\" ? \"string\" : typeof rawInit === \"object\" ? \"object\" : !Number.isNaN(rawInit) ? \"number\" : \"any\";\n}\n\nconst StorageSerializers = {\n boolean: {\n read: (v) => v === \"true\",\n write: (v) => String(v)\n },\n object: {\n read: (v) => JSON.parse(v),\n write: (v) => JSON.stringify(v)\n },\n number: {\n read: (v) => Number.parseFloat(v),\n write: (v) => String(v)\n },\n any: {\n read: (v) => v,\n write: (v) => String(v)\n },\n string: {\n read: (v) => v,\n write: (v) => String(v)\n },\n map: {\n read: (v) => new Map(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v.entries()))\n },\n set: {\n read: (v) => new Set(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v))\n },\n date: {\n read: (v) => new Date(v),\n write: (v) => v.toISOString()\n }\n};\nconst customStorageEventName = \"vueuse-storage\";\nfunction useStorage(key, defaults, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n },\n initOnMounted\n } = options;\n const data = (shallow ? shallowRef : ref)(typeof defaults === \"function\" ? defaults() : defaults);\n const keyComputed = computed(() => toValue(key));\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorage\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n if (!storage)\n return data;\n const rawInit = toValue(defaults);\n const type = guessSerializerType(rawInit);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n const { pause: pauseWatch, resume: resumeWatch } = pausableWatch(\n data,\n () => write(data.value),\n { flush, deep, eventFilter }\n );\n watch(keyComputed, () => update(), { flush });\n if (window && listenToStorageChanges) {\n tryOnMounted(() => {\n if (storage instanceof Storage)\n useEventListener(window, \"storage\", update, { passive: true });\n else\n useEventListener(window, customStorageEventName, updateFromCustomEvent);\n if (initOnMounted)\n update();\n });\n }\n if (!initOnMounted)\n update();\n function dispatchWriteEvent(oldValue, newValue) {\n if (window) {\n const payload = {\n key: keyComputed.value,\n oldValue,\n newValue,\n storageArea: storage\n };\n window.dispatchEvent(storage instanceof Storage ? new StorageEvent(\"storage\", payload) : new CustomEvent(customStorageEventName, {\n detail: payload\n }));\n }\n }\n function write(v) {\n try {\n const oldValue = storage.getItem(keyComputed.value);\n if (v == null) {\n dispatchWriteEvent(oldValue, null);\n storage.removeItem(keyComputed.value);\n } else {\n const serialized = serializer.write(v);\n if (oldValue !== serialized) {\n storage.setItem(keyComputed.value, serialized);\n dispatchWriteEvent(oldValue, serialized);\n }\n }\n } catch (e) {\n onError(e);\n }\n }\n function read(event) {\n const rawValue = event ? event.newValue : storage.getItem(keyComputed.value);\n if (rawValue == null) {\n if (writeDefaults && rawInit != null)\n storage.setItem(keyComputed.value, serializer.write(rawInit));\n return rawInit;\n } else if (!event && mergeDefaults) {\n const value = serializer.read(rawValue);\n if (typeof mergeDefaults === \"function\")\n return mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n return { ...rawInit, ...value };\n return value;\n } else if (typeof rawValue !== \"string\") {\n return rawValue;\n } else {\n return serializer.read(rawValue);\n }\n }\n function update(event) {\n if (event && event.storageArea !== storage)\n return;\n if (event && event.key == null) {\n data.value = rawInit;\n return;\n }\n if (event && event.key !== keyComputed.value)\n return;\n pauseWatch();\n try {\n if ((event == null ? void 0 : event.newValue) !== serializer.write(data.value))\n data.value = read(event);\n } catch (e) {\n onError(e);\n } finally {\n if (event)\n nextTick(resumeWatch);\n else\n resumeWatch();\n }\n }\n function updateFromCustomEvent(event) {\n update(event.detail);\n }\n return data;\n}\n\nconst CSS_DISABLE_TRANS = \"*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}\";\nfunction useColorMode(options = {}) {\n const {\n selector = \"html\",\n attribute = \"class\",\n initialValue = \"auto\",\n window = defaultWindow,\n storage,\n storageKey = \"vueuse-color-scheme\",\n listenToStorageChanges = true,\n storageRef,\n emitAuto,\n disableTransition = true\n } = options;\n const modes = {\n auto: \"\",\n light: \"light\",\n dark: \"dark\",\n ...options.modes || {}\n };\n const preferredDark = usePreferredDark({ window });\n const system = computed(() => preferredDark.value ? \"dark\" : \"light\");\n const store = storageRef || (storageKey == null ? toRef(initialValue) : useStorage(storageKey, initialValue, storage, { window, listenToStorageChanges }));\n const state = computed(() => store.value === \"auto\" ? system.value : store.value);\n const updateHTMLAttrs = getSSRHandler(\n \"updateHTMLAttrs\",\n (selector2, attribute2, value) => {\n const el = typeof selector2 === \"string\" ? window == null ? void 0 : window.document.querySelector(selector2) : unrefElement(selector2);\n if (!el)\n return;\n const classesToAdd = /* @__PURE__ */ new Set();\n const classesToRemove = /* @__PURE__ */ new Set();\n let attributeToChange = null;\n if (attribute2 === \"class\") {\n const current = value.split(/\\s/g);\n Object.values(modes).flatMap((i) => (i || \"\").split(/\\s/g)).filter(Boolean).forEach((v) => {\n if (current.includes(v))\n classesToAdd.add(v);\n else\n classesToRemove.add(v);\n });\n } else {\n attributeToChange = { key: attribute2, value };\n }\n if (classesToAdd.size === 0 && classesToRemove.size === 0 && attributeToChange === null)\n return;\n let style;\n if (disableTransition) {\n style = window.document.createElement(\"style\");\n style.appendChild(document.createTextNode(CSS_DISABLE_TRANS));\n window.document.head.appendChild(style);\n }\n for (const c of classesToAdd) {\n el.classList.add(c);\n }\n for (const c of classesToRemove) {\n el.classList.remove(c);\n }\n if (attributeToChange) {\n el.setAttribute(attributeToChange.key, attributeToChange.value);\n }\n if (disableTransition) {\n window.getComputedStyle(style).opacity;\n document.head.removeChild(style);\n }\n }\n );\n function defaultOnChanged(mode) {\n var _a;\n updateHTMLAttrs(selector, attribute, (_a = modes[mode]) != null ? _a : mode);\n }\n function onChanged(mode) {\n if (options.onChanged)\n options.onChanged(mode, defaultOnChanged);\n else\n defaultOnChanged(mode);\n }\n watch(state, onChanged, { flush: \"post\", immediate: true });\n tryOnMounted(() => onChanged(state.value));\n const auto = computed({\n get() {\n return emitAuto ? store.value : state.value;\n },\n set(v) {\n store.value = v;\n }\n });\n return Object.assign(auto, { store, system, state });\n}\n\nfunction useConfirmDialog(revealed = shallowRef(false)) {\n const confirmHook = createEventHook();\n const cancelHook = createEventHook();\n const revealHook = createEventHook();\n let _resolve = noop;\n const reveal = (data) => {\n revealHook.trigger(data);\n revealed.value = true;\n return new Promise((resolve) => {\n _resolve = resolve;\n });\n };\n const confirm = (data) => {\n revealed.value = false;\n confirmHook.trigger(data);\n _resolve({ data, isCanceled: false });\n };\n const cancel = (data) => {\n revealed.value = false;\n cancelHook.trigger(data);\n _resolve({ data, isCanceled: true });\n };\n return {\n isRevealed: computed(() => revealed.value),\n reveal,\n confirm,\n cancel,\n onReveal: revealHook.on,\n onConfirm: confirmHook.on,\n onCancel: cancelHook.on\n };\n}\n\nfunction useCountdown(initialCountdown, options) {\n var _a, _b;\n const remaining = shallowRef(toValue(initialCountdown));\n const intervalController = useIntervalFn(() => {\n var _a2, _b2;\n const value = remaining.value - 1;\n remaining.value = value < 0 ? 0 : value;\n (_a2 = options == null ? void 0 : options.onTick) == null ? void 0 : _a2.call(options);\n if (remaining.value <= 0) {\n intervalController.pause();\n (_b2 = options == null ? void 0 : options.onComplete) == null ? void 0 : _b2.call(options);\n }\n }, (_a = options == null ? void 0 : options.interval) != null ? _a : 1e3, { immediate: (_b = options == null ? void 0 : options.immediate) != null ? _b : false });\n const reset = (countdown) => {\n var _a2;\n remaining.value = (_a2 = toValue(countdown)) != null ? _a2 : toValue(initialCountdown);\n };\n const stop = () => {\n intervalController.pause();\n reset();\n };\n const resume = () => {\n if (!intervalController.isActive.value) {\n if (remaining.value > 0) {\n intervalController.resume();\n }\n }\n };\n const start = (countdown) => {\n reset(countdown);\n intervalController.resume();\n };\n return {\n remaining,\n reset,\n stop,\n start,\n pause: intervalController.pause,\n resume,\n isActive: intervalController.isActive\n };\n}\n\nfunction useCssVar(prop, target, options = {}) {\n const { window = defaultWindow, initialValue, observe = false } = options;\n const variable = shallowRef(initialValue);\n const elRef = computed(() => {\n var _a;\n return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);\n });\n function updateCssVar() {\n var _a;\n const key = toValue(prop);\n const el = toValue(elRef);\n if (el && window && key) {\n const value = (_a = window.getComputedStyle(el).getPropertyValue(key)) == null ? void 0 : _a.trim();\n variable.value = value || variable.value || initialValue;\n }\n }\n if (observe) {\n useMutationObserver(elRef, updateCssVar, {\n attributeFilter: [\"style\", \"class\"],\n window\n });\n }\n watch(\n [elRef, () => toValue(prop)],\n (_, old) => {\n if (old[0] && old[1])\n old[0].style.removeProperty(old[1]);\n updateCssVar();\n },\n { immediate: true }\n );\n watch(\n [variable, elRef],\n ([val, el]) => {\n const raw_prop = toValue(prop);\n if ((el == null ? void 0 : el.style) && raw_prop) {\n if (val == null)\n el.style.removeProperty(raw_prop);\n else\n el.style.setProperty(raw_prop, val);\n }\n },\n { immediate: true }\n );\n return variable;\n}\n\nfunction useCurrentElement(rootComponent) {\n const vm = getCurrentInstance();\n const currentElement = computedWithControl(\n () => null,\n () => rootComponent ? unrefElement(rootComponent) : vm.proxy.$el\n );\n onUpdated(currentElement.trigger);\n onMounted(currentElement.trigger);\n return currentElement;\n}\n\nfunction useCycleList(list, options) {\n const state = shallowRef(getInitialValue());\n const listRef = toRef(list);\n const index = computed({\n get() {\n var _a;\n const targetList = listRef.value;\n let index2 = (options == null ? void 0 : options.getIndexOf) ? options.getIndexOf(state.value, targetList) : targetList.indexOf(state.value);\n if (index2 < 0)\n index2 = (_a = options == null ? void 0 : options.fallbackIndex) != null ? _a : 0;\n return index2;\n },\n set(v) {\n set(v);\n }\n });\n function set(i) {\n const targetList = listRef.value;\n const length = targetList.length;\n const index2 = (i % length + length) % length;\n const value = targetList[index2];\n state.value = value;\n return value;\n }\n function shift(delta = 1) {\n return set(index.value + delta);\n }\n function next(n = 1) {\n return shift(n);\n }\n function prev(n = 1) {\n return shift(-n);\n }\n function getInitialValue() {\n var _a, _b;\n return (_b = toValue((_a = options == null ? void 0 : options.initialValue) != null ? _a : toValue(list)[0])) != null ? _b : void 0;\n }\n watch(listRef, () => set(index.value));\n return {\n state,\n index,\n next,\n prev,\n go: set\n };\n}\n\nfunction useDark(options = {}) {\n const {\n valueDark = \"dark\",\n valueLight = \"\"\n } = options;\n const mode = useColorMode({\n ...options,\n onChanged: (mode2, defaultHandler) => {\n var _a;\n if (options.onChanged)\n (_a = options.onChanged) == null ? void 0 : _a.call(options, mode2 === \"dark\", defaultHandler, mode2);\n else\n defaultHandler(mode2);\n },\n modes: {\n dark: valueDark,\n light: valueLight\n }\n });\n const system = computed(() => mode.system.value);\n const isDark = computed({\n get() {\n return mode.value === \"dark\";\n },\n set(v) {\n const modeVal = v ? \"dark\" : \"light\";\n if (system.value === modeVal)\n mode.value = \"auto\";\n else\n mode.value = modeVal;\n }\n });\n return isDark;\n}\n\nfunction fnBypass(v) {\n return v;\n}\nfunction fnSetSource(source, value) {\n return source.value = value;\n}\nfunction defaultDump(clone) {\n return clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\nfunction defaultParse(clone) {\n return clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\nfunction useManualRefHistory(source, options = {}) {\n const {\n clone = false,\n dump = defaultDump(clone),\n parse = defaultParse(clone),\n setSource = fnSetSource\n } = options;\n function _createHistoryRecord() {\n return markRaw({\n snapshot: dump(source.value),\n timestamp: timestamp()\n });\n }\n const last = ref(_createHistoryRecord());\n const undoStack = ref([]);\n const redoStack = ref([]);\n const _setSource = (record) => {\n setSource(source, parse(record.snapshot));\n last.value = record;\n };\n const commit = () => {\n undoStack.value.unshift(last.value);\n last.value = _createHistoryRecord();\n if (options.capacity && undoStack.value.length > options.capacity)\n undoStack.value.splice(options.capacity, Number.POSITIVE_INFINITY);\n if (redoStack.value.length)\n redoStack.value.splice(0, redoStack.value.length);\n };\n const clear = () => {\n undoStack.value.splice(0, undoStack.value.length);\n redoStack.value.splice(0, redoStack.value.length);\n };\n const undo = () => {\n const state = undoStack.value.shift();\n if (state) {\n redoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const redo = () => {\n const state = redoStack.value.shift();\n if (state) {\n undoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const reset = () => {\n _setSource(last.value);\n };\n const history = computed(() => [last.value, ...undoStack.value]);\n const canUndo = computed(() => undoStack.value.length > 0);\n const canRedo = computed(() => redoStack.value.length > 0);\n return {\n source,\n undoStack,\n redoStack,\n last,\n history,\n canUndo,\n canRedo,\n clear,\n commit,\n reset,\n undo,\n redo\n };\n}\n\nfunction useRefHistory(source, options = {}) {\n const {\n deep = false,\n flush = \"pre\",\n eventFilter\n } = options;\n const {\n eventFilter: composedFilter,\n pause,\n resume: resumeTracking,\n isActive: isTracking\n } = pausableFilter(eventFilter);\n const {\n ignoreUpdates,\n ignorePrevAsyncUpdates,\n stop\n } = watchIgnorable(\n source,\n commit,\n { deep, flush, eventFilter: composedFilter }\n );\n function setSource(source2, value) {\n ignorePrevAsyncUpdates();\n ignoreUpdates(() => {\n source2.value = value;\n });\n }\n const manualHistory = useManualRefHistory(source, { ...options, clone: options.clone || deep, setSource });\n const { clear, commit: manualCommit } = manualHistory;\n function commit() {\n ignorePrevAsyncUpdates();\n manualCommit();\n }\n function resume(commitNow) {\n resumeTracking();\n if (commitNow)\n commit();\n }\n function batch(fn) {\n let canceled = false;\n const cancel = () => canceled = true;\n ignoreUpdates(() => {\n fn(cancel);\n });\n if (!canceled)\n commit();\n }\n function dispose() {\n stop();\n clear();\n }\n return {\n ...manualHistory,\n isTracking,\n pause,\n resume,\n commit,\n batch,\n dispose\n };\n}\n\nfunction useDebouncedRefHistory(source, options = {}) {\n const filter = options.debounce ? debounceFilter(options.debounce) : void 0;\n const history = useRefHistory(source, { ...options, eventFilter: filter });\n return {\n ...history\n };\n}\n\nfunction useDeviceMotion(options = {}) {\n const {\n window = defaultWindow,\n requestPermissions = false,\n eventFilter = bypassFilter\n } = options;\n const isSupported = useSupported(() => typeof DeviceMotionEvent !== \"undefined\");\n const requirePermissions = useSupported(() => isSupported.value && \"requestPermission\" in DeviceMotionEvent && typeof DeviceMotionEvent.requestPermission === \"function\");\n const permissionGranted = shallowRef(false);\n const acceleration = ref({ x: null, y: null, z: null });\n const rotationRate = ref({ alpha: null, beta: null, gamma: null });\n const interval = shallowRef(0);\n const accelerationIncludingGravity = ref({\n x: null,\n y: null,\n z: null\n });\n function init() {\n if (window) {\n const onDeviceMotion = createFilterWrapper(\n eventFilter,\n (event) => {\n var _a, _b, _c, _d, _e, _f, _g, _h, _i;\n acceleration.value = {\n x: ((_a = event.acceleration) == null ? void 0 : _a.x) || null,\n y: ((_b = event.acceleration) == null ? void 0 : _b.y) || null,\n z: ((_c = event.acceleration) == null ? void 0 : _c.z) || null\n };\n accelerationIncludingGravity.value = {\n x: ((_d = event.accelerationIncludingGravity) == null ? void 0 : _d.x) || null,\n y: ((_e = event.accelerationIncludingGravity) == null ? void 0 : _e.y) || null,\n z: ((_f = event.accelerationIncludingGravity) == null ? void 0 : _f.z) || null\n };\n rotationRate.value = {\n alpha: ((_g = event.rotationRate) == null ? void 0 : _g.alpha) || null,\n beta: ((_h = event.rotationRate) == null ? void 0 : _h.beta) || null,\n gamma: ((_i = event.rotationRate) == null ? void 0 : _i.gamma) || null\n };\n interval.value = event.interval;\n }\n );\n useEventListener(window, \"devicemotion\", onDeviceMotion, { passive: true });\n }\n }\n const ensurePermissions = async () => {\n if (!requirePermissions.value)\n permissionGranted.value = true;\n if (permissionGranted.value)\n return;\n if (requirePermissions.value) {\n const requestPermission = DeviceMotionEvent.requestPermission;\n try {\n const response = await requestPermission();\n if (response === \"granted\") {\n permissionGranted.value = true;\n init();\n }\n } catch (error) {\n console.error(error);\n }\n }\n };\n if (isSupported.value) {\n if (requestPermissions && requirePermissions.value) {\n ensurePermissions().then(() => init());\n } else {\n init();\n }\n }\n return {\n acceleration,\n accelerationIncludingGravity,\n rotationRate,\n interval,\n isSupported,\n requirePermissions,\n ensurePermissions,\n permissionGranted\n };\n}\n\nfunction useDeviceOrientation(options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"DeviceOrientationEvent\" in window);\n const isAbsolute = shallowRef(false);\n const alpha = shallowRef(null);\n const beta = shallowRef(null);\n const gamma = shallowRef(null);\n if (window && isSupported.value) {\n useEventListener(window, \"deviceorientation\", (event) => {\n isAbsolute.value = event.absolute;\n alpha.value = event.alpha;\n beta.value = event.beta;\n gamma.value = event.gamma;\n }, { passive: true });\n }\n return {\n isSupported,\n isAbsolute,\n alpha,\n beta,\n gamma\n };\n}\n\nfunction useDevicePixelRatio(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const pixelRatio = shallowRef(1);\n const query = useMediaQuery(() => `(resolution: ${pixelRatio.value}dppx)`, options);\n let stop = noop;\n if (window) {\n stop = watchImmediate(query, () => pixelRatio.value = window.devicePixelRatio);\n }\n return {\n pixelRatio: readonly(pixelRatio),\n stop\n };\n}\n\nfunction useDevicesList(options = {}) {\n const {\n navigator = defaultNavigator,\n requestPermissions = false,\n constraints = { audio: true, video: true },\n onUpdated\n } = options;\n const devices = ref([]);\n const videoInputs = computed(() => devices.value.filter((i) => i.kind === \"videoinput\"));\n const audioInputs = computed(() => devices.value.filter((i) => i.kind === \"audioinput\"));\n const audioOutputs = computed(() => devices.value.filter((i) => i.kind === \"audiooutput\"));\n const isSupported = useSupported(() => navigator && navigator.mediaDevices && navigator.mediaDevices.enumerateDevices);\n const permissionGranted = shallowRef(false);\n let stream;\n async function update() {\n if (!isSupported.value)\n return;\n devices.value = await navigator.mediaDevices.enumerateDevices();\n onUpdated == null ? void 0 : onUpdated(devices.value);\n if (stream) {\n stream.getTracks().forEach((t) => t.stop());\n stream = null;\n }\n }\n async function ensurePermissions() {\n const deviceName = constraints.video ? \"camera\" : \"microphone\";\n if (!isSupported.value)\n return false;\n if (permissionGranted.value)\n return true;\n const { state, query } = usePermission(deviceName, { controls: true });\n await query();\n if (state.value !== \"granted\") {\n let granted = true;\n try {\n stream = await navigator.mediaDevices.getUserMedia(constraints);\n } catch (e) {\n stream = null;\n granted = false;\n }\n update();\n permissionGranted.value = granted;\n } else {\n permissionGranted.value = true;\n }\n return permissionGranted.value;\n }\n if (isSupported.value) {\n if (requestPermissions)\n ensurePermissions();\n useEventListener(navigator.mediaDevices, \"devicechange\", update, { passive: true });\n update();\n }\n return {\n devices,\n ensurePermissions,\n permissionGranted,\n videoInputs,\n audioInputs,\n audioOutputs,\n isSupported\n };\n}\n\nfunction useDisplayMedia(options = {}) {\n var _a;\n const enabled = shallowRef((_a = options.enabled) != null ? _a : false);\n const video = options.video;\n const audio = options.audio;\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getDisplayMedia;\n });\n const constraint = { audio, video };\n const stream = shallowRef();\n async function _start() {\n var _a2;\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getDisplayMedia(constraint);\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => useEventListener(t, \"ended\", stop, { passive: true }));\n return stream.value;\n }\n async function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n watch(\n enabled,\n (v) => {\n if (v)\n _start();\n else\n _stop();\n },\n { immediate: true }\n );\n return {\n isSupported,\n stream,\n start,\n stop,\n enabled\n };\n}\n\nfunction useDocumentVisibility(options = {}) {\n const { document = defaultDocument } = options;\n if (!document)\n return shallowRef(\"visible\");\n const visibility = shallowRef(document.visibilityState);\n useEventListener(document, \"visibilitychange\", () => {\n visibility.value = document.visibilityState;\n }, { passive: true });\n return visibility;\n}\n\nfunction useDraggable(target, options = {}) {\n var _a;\n const {\n pointerTypes,\n preventDefault,\n stopPropagation,\n exact,\n onMove,\n onEnd,\n onStart,\n initialValue,\n axis = \"both\",\n draggingElement = defaultWindow,\n containerElement,\n handle: draggingHandle = target,\n buttons = [0]\n } = options;\n const position = ref(\n (_a = toValue(initialValue)) != null ? _a : { x: 0, y: 0 }\n );\n const pressedDelta = ref();\n const filterEvent = (e) => {\n if (pointerTypes)\n return pointerTypes.includes(e.pointerType);\n return true;\n };\n const handleEvent = (e) => {\n if (toValue(preventDefault))\n e.preventDefault();\n if (toValue(stopPropagation))\n e.stopPropagation();\n };\n const start = (e) => {\n var _a2;\n if (!toValue(buttons).includes(e.button))\n return;\n if (toValue(options.disabled) || !filterEvent(e))\n return;\n if (toValue(exact) && e.target !== toValue(target))\n return;\n const container = toValue(containerElement);\n const containerRect = (_a2 = container == null ? void 0 : container.getBoundingClientRect) == null ? void 0 : _a2.call(container);\n const targetRect = toValue(target).getBoundingClientRect();\n const pos = {\n x: e.clientX - (container ? targetRect.left - containerRect.left + container.scrollLeft : targetRect.left),\n y: e.clientY - (container ? targetRect.top - containerRect.top + container.scrollTop : targetRect.top)\n };\n if ((onStart == null ? void 0 : onStart(pos, e)) === false)\n return;\n pressedDelta.value = pos;\n handleEvent(e);\n };\n const move = (e) => {\n if (toValue(options.disabled) || !filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n const container = toValue(containerElement);\n const targetRect = toValue(target).getBoundingClientRect();\n let { x, y } = position.value;\n if (axis === \"x\" || axis === \"both\") {\n x = e.clientX - pressedDelta.value.x;\n if (container)\n x = Math.min(Math.max(0, x), container.scrollWidth - targetRect.width);\n }\n if (axis === \"y\" || axis === \"both\") {\n y = e.clientY - pressedDelta.value.y;\n if (container)\n y = Math.min(Math.max(0, y), container.scrollHeight - targetRect.height);\n }\n position.value = {\n x,\n y\n };\n onMove == null ? void 0 : onMove(position.value, e);\n handleEvent(e);\n };\n const end = (e) => {\n if (toValue(options.disabled) || !filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n pressedDelta.value = void 0;\n onEnd == null ? void 0 : onEnd(position.value, e);\n handleEvent(e);\n };\n if (isClient) {\n const config = () => {\n var _a2;\n return {\n capture: (_a2 = options.capture) != null ? _a2 : true,\n passive: !toValue(preventDefault)\n };\n };\n useEventListener(draggingHandle, \"pointerdown\", start, config);\n useEventListener(draggingElement, \"pointermove\", move, config);\n useEventListener(draggingElement, \"pointerup\", end, config);\n }\n return {\n ...toRefs(position),\n position,\n isDragging: computed(() => !!pressedDelta.value),\n style: computed(\n () => `left:${position.value.x}px;top:${position.value.y}px;`\n )\n };\n}\n\nfunction useDropZone(target, options = {}) {\n var _a, _b;\n const isOverDropZone = shallowRef(false);\n const files = shallowRef(null);\n let counter = 0;\n let isValid = true;\n if (isClient) {\n const _options = typeof options === \"function\" ? { onDrop: options } : options;\n const multiple = (_a = _options.multiple) != null ? _a : true;\n const preventDefaultForUnhandled = (_b = _options.preventDefaultForUnhandled) != null ? _b : false;\n const getFiles = (event) => {\n var _a2, _b2;\n const list = Array.from((_b2 = (_a2 = event.dataTransfer) == null ? void 0 : _a2.files) != null ? _b2 : []);\n return list.length === 0 ? null : multiple ? list : [list[0]];\n };\n const checkDataTypes = (types) => {\n const dataTypes = unref(_options.dataTypes);\n if (typeof dataTypes === \"function\")\n return dataTypes(types);\n if (!(dataTypes == null ? void 0 : dataTypes.length))\n return true;\n if (types.length === 0)\n return false;\n return types.every(\n (type) => dataTypes.some((allowedType) => type.includes(allowedType))\n );\n };\n const checkValidity = (items) => {\n const types = Array.from(items != null ? items : []).map((item) => item.type);\n const dataTypesValid = checkDataTypes(types);\n const multipleFilesValid = multiple || items.length <= 1;\n return dataTypesValid && multipleFilesValid;\n };\n const isSafari = () => /^(?:(?!chrome|android).)*safari/i.test(navigator.userAgent) && !(\"chrome\" in window);\n const handleDragEvent = (event, eventType) => {\n var _a2, _b2, _c, _d, _e, _f;\n const dataTransferItemList = (_a2 = event.dataTransfer) == null ? void 0 : _a2.items;\n isValid = (_b2 = dataTransferItemList && checkValidity(dataTransferItemList)) != null ? _b2 : false;\n if (preventDefaultForUnhandled) {\n event.preventDefault();\n }\n if (!isSafari() && !isValid) {\n if (event.dataTransfer) {\n event.dataTransfer.dropEffect = \"none\";\n }\n return;\n }\n event.preventDefault();\n if (event.dataTransfer) {\n event.dataTransfer.dropEffect = \"copy\";\n }\n const currentFiles = getFiles(event);\n switch (eventType) {\n case \"enter\":\n counter += 1;\n isOverDropZone.value = true;\n (_c = _options.onEnter) == null ? void 0 : _c.call(_options, null, event);\n break;\n case \"over\":\n (_d = _options.onOver) == null ? void 0 : _d.call(_options, null, event);\n break;\n case \"leave\":\n counter -= 1;\n if (counter === 0)\n isOverDropZone.value = false;\n (_e = _options.onLeave) == null ? void 0 : _e.call(_options, null, event);\n break;\n case \"drop\":\n counter = 0;\n isOverDropZone.value = false;\n if (isValid) {\n files.value = currentFiles;\n (_f = _options.onDrop) == null ? void 0 : _f.call(_options, currentFiles, event);\n }\n break;\n }\n };\n useEventListener(target, \"dragenter\", (event) => handleDragEvent(event, \"enter\"));\n useEventListener(target, \"dragover\", (event) => handleDragEvent(event, \"over\"));\n useEventListener(target, \"dragleave\", (event) => handleDragEvent(event, \"leave\"));\n useEventListener(target, \"drop\", (event) => handleDragEvent(event, \"drop\"));\n }\n return {\n files,\n isOverDropZone\n };\n}\n\nfunction useResizeObserver(target, callback, options = {}) {\n const { window = defaultWindow, ...observerOptions } = options;\n let observer;\n const isSupported = useSupported(() => window && \"ResizeObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const targets = computed(() => {\n const _targets = toValue(target);\n return Array.isArray(_targets) ? _targets.map((el) => unrefElement(el)) : [unrefElement(_targets)];\n });\n const stopWatch = watch(\n targets,\n (els) => {\n cleanup();\n if (isSupported.value && window) {\n observer = new ResizeObserver(callback);\n for (const _el of els) {\n if (_el)\n observer.observe(_el, observerOptions);\n }\n }\n },\n { immediate: true, flush: \"post\" }\n );\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nfunction useElementBounding(target, options = {}) {\n const {\n reset = true,\n windowResize = true,\n windowScroll = true,\n immediate = true,\n updateTiming = \"sync\"\n } = options;\n const height = shallowRef(0);\n const bottom = shallowRef(0);\n const left = shallowRef(0);\n const right = shallowRef(0);\n const top = shallowRef(0);\n const width = shallowRef(0);\n const x = shallowRef(0);\n const y = shallowRef(0);\n function recalculate() {\n const el = unrefElement(target);\n if (!el) {\n if (reset) {\n height.value = 0;\n bottom.value = 0;\n left.value = 0;\n right.value = 0;\n top.value = 0;\n width.value = 0;\n x.value = 0;\n y.value = 0;\n }\n return;\n }\n const rect = el.getBoundingClientRect();\n height.value = rect.height;\n bottom.value = rect.bottom;\n left.value = rect.left;\n right.value = rect.right;\n top.value = rect.top;\n width.value = rect.width;\n x.value = rect.x;\n y.value = rect.y;\n }\n function update() {\n if (updateTiming === \"sync\")\n recalculate();\n else if (updateTiming === \"next-frame\")\n requestAnimationFrame(() => recalculate());\n }\n useResizeObserver(target, update);\n watch(() => unrefElement(target), (ele) => !ele && update());\n useMutationObserver(target, update, {\n attributeFilter: [\"style\", \"class\"]\n });\n if (windowScroll)\n useEventListener(\"scroll\", update, { capture: true, passive: true });\n if (windowResize)\n useEventListener(\"resize\", update, { passive: true });\n tryOnMounted(() => {\n if (immediate)\n update();\n });\n return {\n height,\n bottom,\n left,\n right,\n top,\n width,\n x,\n y,\n update\n };\n}\n\nfunction useElementByPoint(options) {\n const {\n x,\n y,\n document = defaultDocument,\n multiple,\n interval = \"requestAnimationFrame\",\n immediate = true\n } = options;\n const isSupported = useSupported(() => {\n if (toValue(multiple))\n return document && \"elementsFromPoint\" in document;\n return document && \"elementFromPoint\" in document;\n });\n const element = shallowRef(null);\n const cb = () => {\n var _a, _b;\n element.value = toValue(multiple) ? (_a = document == null ? void 0 : document.elementsFromPoint(toValue(x), toValue(y))) != null ? _a : [] : (_b = document == null ? void 0 : document.elementFromPoint(toValue(x), toValue(y))) != null ? _b : null;\n };\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n return {\n isSupported,\n element,\n ...controls\n };\n}\n\nfunction useElementHover(el, options = {}) {\n const {\n delayEnter = 0,\n delayLeave = 0,\n triggerOnRemoval = false,\n window = defaultWindow\n } = options;\n const isHovered = shallowRef(false);\n let timer;\n const toggle = (entering) => {\n const delay = entering ? delayEnter : delayLeave;\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n }\n if (delay)\n timer = setTimeout(() => isHovered.value = entering, delay);\n else\n isHovered.value = entering;\n };\n if (!window)\n return isHovered;\n useEventListener(el, \"mouseenter\", () => toggle(true), { passive: true });\n useEventListener(el, \"mouseleave\", () => toggle(false), { passive: true });\n if (triggerOnRemoval) {\n onElementRemoval(\n computed(() => unrefElement(el)),\n () => toggle(false)\n );\n }\n return isHovered;\n}\n\nfunction useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) {\n const { window = defaultWindow, box = \"content-box\" } = options;\n const isSVG = computed(() => {\n var _a, _b;\n return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes(\"svg\");\n });\n const width = shallowRef(initialSize.width);\n const height = shallowRef(initialSize.height);\n const { stop: stop1 } = useResizeObserver(\n target,\n ([entry]) => {\n const boxSize = box === \"border-box\" ? entry.borderBoxSize : box === \"content-box\" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;\n if (window && isSVG.value) {\n const $elem = unrefElement(target);\n if ($elem) {\n const rect = $elem.getBoundingClientRect();\n width.value = rect.width;\n height.value = rect.height;\n }\n } else {\n if (boxSize) {\n const formatBoxSize = toArray(boxSize);\n width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);\n height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);\n } else {\n width.value = entry.contentRect.width;\n height.value = entry.contentRect.height;\n }\n }\n },\n options\n );\n tryOnMounted(() => {\n const ele = unrefElement(target);\n if (ele) {\n width.value = \"offsetWidth\" in ele ? ele.offsetWidth : initialSize.width;\n height.value = \"offsetHeight\" in ele ? ele.offsetHeight : initialSize.height;\n }\n });\n const stop2 = watch(\n () => unrefElement(target),\n (ele) => {\n width.value = ele ? initialSize.width : 0;\n height.value = ele ? initialSize.height : 0;\n }\n );\n function stop() {\n stop1();\n stop2();\n }\n return {\n width,\n height,\n stop\n };\n}\n\nfunction useIntersectionObserver(target, callback, options = {}) {\n const {\n root,\n rootMargin = \"0px\",\n threshold = 0,\n window = defaultWindow,\n immediate = true\n } = options;\n const isSupported = useSupported(() => window && \"IntersectionObserver\" in window);\n const targets = computed(() => {\n const _target = toValue(target);\n return toArray(_target).map(unrefElement).filter(notNullish);\n });\n let cleanup = noop;\n const isActive = shallowRef(immediate);\n const stopWatch = isSupported.value ? watch(\n () => [targets.value, unrefElement(root), isActive.value],\n ([targets2, root2]) => {\n cleanup();\n if (!isActive.value)\n return;\n if (!targets2.length)\n return;\n const observer = new IntersectionObserver(\n callback,\n {\n root: unrefElement(root2),\n rootMargin,\n threshold\n }\n );\n targets2.forEach((el) => el && observer.observe(el));\n cleanup = () => {\n observer.disconnect();\n cleanup = noop;\n };\n },\n { immediate, flush: \"post\" }\n ) : noop;\n const stop = () => {\n cleanup();\n stopWatch();\n isActive.value = false;\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n isActive,\n pause() {\n cleanup();\n isActive.value = false;\n },\n resume() {\n isActive.value = true;\n },\n stop\n };\n}\n\nfunction useElementVisibility(element, options = {}) {\n const {\n window = defaultWindow,\n scrollTarget,\n threshold = 0,\n rootMargin,\n once = false\n } = options;\n const elementIsVisible = shallowRef(false);\n const { stop } = useIntersectionObserver(\n element,\n (intersectionObserverEntries) => {\n let isIntersecting = elementIsVisible.value;\n let latestTime = 0;\n for (const entry of intersectionObserverEntries) {\n if (entry.time >= latestTime) {\n latestTime = entry.time;\n isIntersecting = entry.isIntersecting;\n }\n }\n elementIsVisible.value = isIntersecting;\n if (once) {\n watchOnce(elementIsVisible, () => {\n stop();\n });\n }\n },\n {\n root: scrollTarget,\n window,\n threshold,\n rootMargin: toValue(rootMargin)\n }\n );\n return elementIsVisible;\n}\n\nconst events = /* @__PURE__ */ new Map();\n\nfunction useEventBus(key) {\n const scope = getCurrentScope();\n function on(listener) {\n var _a;\n const listeners = events.get(key) || /* @__PURE__ */ new Set();\n listeners.add(listener);\n events.set(key, listeners);\n const _off = () => off(listener);\n (_a = scope == null ? void 0 : scope.cleanups) == null ? void 0 : _a.push(_off);\n return _off;\n }\n function once(listener) {\n function _listener(...args) {\n off(_listener);\n listener(...args);\n }\n return on(_listener);\n }\n function off(listener) {\n const listeners = events.get(key);\n if (!listeners)\n return;\n listeners.delete(listener);\n if (!listeners.size)\n reset();\n }\n function reset() {\n events.delete(key);\n }\n function emit(event, payload) {\n var _a;\n (_a = events.get(key)) == null ? void 0 : _a.forEach((v) => v(event, payload));\n }\n return { on, once, off, emit, reset };\n}\n\nfunction resolveNestedOptions$1(options) {\n if (options === true)\n return {};\n return options;\n}\nfunction useEventSource(url, events = [], options = {}) {\n const event = shallowRef(null);\n const data = shallowRef(null);\n const status = shallowRef(\"CONNECTING\");\n const eventSource = ref(null);\n const error = shallowRef(null);\n const urlRef = toRef(url);\n const lastEventId = shallowRef(null);\n let explicitlyClosed = false;\n let retried = 0;\n const {\n withCredentials = false,\n immediate = true,\n autoConnect = true,\n autoReconnect\n } = options;\n const close = () => {\n if (isClient && eventSource.value) {\n eventSource.value.close();\n eventSource.value = null;\n status.value = \"CLOSED\";\n explicitlyClosed = true;\n }\n };\n const _init = () => {\n if (explicitlyClosed || typeof urlRef.value === \"undefined\")\n return;\n const es = new EventSource(urlRef.value, { withCredentials });\n status.value = \"CONNECTING\";\n eventSource.value = es;\n es.onopen = () => {\n status.value = \"OPEN\";\n error.value = null;\n };\n es.onerror = (e) => {\n status.value = \"CLOSED\";\n error.value = e;\n if (es.readyState === 2 && !explicitlyClosed && autoReconnect) {\n es.close();\n const {\n retries = -1,\n delay = 1e3,\n onFailed\n } = resolveNestedOptions$1(autoReconnect);\n retried += 1;\n if (typeof retries === \"number\" && (retries < 0 || retried < retries))\n setTimeout(_init, delay);\n else if (typeof retries === \"function\" && retries())\n setTimeout(_init, delay);\n else\n onFailed == null ? void 0 : onFailed();\n }\n };\n es.onmessage = (e) => {\n event.value = null;\n data.value = e.data;\n lastEventId.value = e.lastEventId;\n };\n for (const event_name of events) {\n useEventListener(es, event_name, (e) => {\n event.value = event_name;\n data.value = e.data || null;\n }, { passive: true });\n }\n };\n const open = () => {\n if (!isClient)\n return;\n close();\n explicitlyClosed = false;\n retried = 0;\n _init();\n };\n if (immediate)\n open();\n if (autoConnect)\n watch(urlRef, open);\n tryOnScopeDispose(close);\n return {\n eventSource,\n event,\n data,\n status,\n error,\n open,\n close,\n lastEventId\n };\n}\n\nfunction useEyeDropper(options = {}) {\n const { initialValue = \"\" } = options;\n const isSupported = useSupported(() => typeof window !== \"undefined\" && \"EyeDropper\" in window);\n const sRGBHex = shallowRef(initialValue);\n async function open(openOptions) {\n if (!isSupported.value)\n return;\n const eyeDropper = new window.EyeDropper();\n const result = await eyeDropper.open(openOptions);\n sRGBHex.value = result.sRGBHex;\n return result;\n }\n return { isSupported, sRGBHex, open };\n}\n\nfunction useFavicon(newIcon = null, options = {}) {\n const {\n baseUrl = \"\",\n rel = \"icon\",\n document = defaultDocument\n } = options;\n const favicon = toRef(newIcon);\n const applyIcon = (icon) => {\n const elements = document == null ? void 0 : document.head.querySelectorAll(`link[rel*=\"${rel}\"]`);\n if (!elements || elements.length === 0) {\n const link = document == null ? void 0 : document.createElement(\"link\");\n if (link) {\n link.rel = rel;\n link.href = `${baseUrl}${icon}`;\n link.type = `image/${icon.split(\".\").pop()}`;\n document == null ? void 0 : document.head.append(link);\n }\n return;\n }\n elements == null ? void 0 : elements.forEach((el) => el.href = `${baseUrl}${icon}`);\n };\n watch(\n favicon,\n (i, o) => {\n if (typeof i === \"string\" && i !== o)\n applyIcon(i);\n },\n { immediate: true }\n );\n return favicon;\n}\n\nconst payloadMapping = {\n json: \"application/json\",\n text: \"text/plain\"\n};\nfunction isFetchOptions(obj) {\n return obj && containsProp(obj, \"immediate\", \"refetch\", \"initialData\", \"timeout\", \"beforeFetch\", \"afterFetch\", \"onFetchError\", \"fetch\", \"updateDataOnError\");\n}\nconst reAbsolute = /^(?:[a-z][a-z\\d+\\-.]*:)?\\/\\//i;\nfunction isAbsoluteURL(url) {\n return reAbsolute.test(url);\n}\nfunction headersToObject(headers) {\n if (typeof Headers !== \"undefined\" && headers instanceof Headers)\n return Object.fromEntries(headers.entries());\n return headers;\n}\nfunction combineCallbacks(combination, ...callbacks) {\n if (combination === \"overwrite\") {\n return async (ctx) => {\n let callback;\n for (let i = callbacks.length - 1; i >= 0; i--) {\n if (callbacks[i] != null) {\n callback = callbacks[i];\n break;\n }\n }\n if (callback)\n return { ...ctx, ...await callback(ctx) };\n return ctx;\n };\n } else {\n return async (ctx) => {\n for (const callback of callbacks) {\n if (callback)\n ctx = { ...ctx, ...await callback(ctx) };\n }\n return ctx;\n };\n }\n}\nfunction createFetch(config = {}) {\n const _combination = config.combination || \"chain\";\n const _options = config.options || {};\n const _fetchOptions = config.fetchOptions || {};\n function useFactoryFetch(url, ...args) {\n const computedUrl = computed(() => {\n const baseUrl = toValue(config.baseUrl);\n const targetUrl = toValue(url);\n return baseUrl && !isAbsoluteURL(targetUrl) ? joinPaths(baseUrl, targetUrl) : targetUrl;\n });\n let options = _options;\n let fetchOptions = _fetchOptions;\n if (args.length > 0) {\n if (isFetchOptions(args[0])) {\n options = {\n ...options,\n ...args[0],\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[0].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[0].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[0].onFetchError)\n };\n } else {\n fetchOptions = {\n ...fetchOptions,\n ...args[0],\n headers: {\n ...headersToObject(fetchOptions.headers) || {},\n ...headersToObject(args[0].headers) || {}\n }\n };\n }\n }\n if (args.length > 1 && isFetchOptions(args[1])) {\n options = {\n ...options,\n ...args[1],\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[1].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[1].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[1].onFetchError)\n };\n }\n return useFetch(computedUrl, fetchOptions, options);\n }\n return useFactoryFetch;\n}\nfunction useFetch(url, ...args) {\n var _a;\n const supportsAbort = typeof AbortController === \"function\";\n let fetchOptions = {};\n let options = {\n immediate: true,\n refetch: false,\n timeout: 0,\n updateDataOnError: false\n };\n const config = {\n method: \"GET\",\n type: \"text\",\n payload: void 0\n };\n if (args.length > 0) {\n if (isFetchOptions(args[0]))\n options = { ...options, ...args[0] };\n else\n fetchOptions = args[0];\n }\n if (args.length > 1) {\n if (isFetchOptions(args[1]))\n options = { ...options, ...args[1] };\n }\n const {\n fetch = (_a = defaultWindow) == null ? void 0 : _a.fetch,\n initialData,\n timeout\n } = options;\n const responseEvent = createEventHook();\n const errorEvent = createEventHook();\n const finallyEvent = createEventHook();\n const isFinished = shallowRef(false);\n const isFetching = shallowRef(false);\n const aborted = shallowRef(false);\n const statusCode = shallowRef(null);\n const response = shallowRef(null);\n const error = shallowRef(null);\n const data = shallowRef(initialData || null);\n const canAbort = computed(() => supportsAbort && isFetching.value);\n let controller;\n let timer;\n const abort = () => {\n if (supportsAbort) {\n controller == null ? void 0 : controller.abort();\n controller = new AbortController();\n controller.signal.onabort = () => aborted.value = true;\n fetchOptions = {\n ...fetchOptions,\n signal: controller.signal\n };\n }\n };\n const loading = (isLoading) => {\n isFetching.value = isLoading;\n isFinished.value = !isLoading;\n };\n if (timeout)\n timer = useTimeoutFn(abort, timeout, { immediate: false });\n let executeCounter = 0;\n const execute = async (throwOnFailed = false) => {\n var _a2, _b;\n abort();\n loading(true);\n error.value = null;\n statusCode.value = null;\n aborted.value = false;\n executeCounter += 1;\n const currentExecuteCounter = executeCounter;\n const defaultFetchOptions = {\n method: config.method,\n headers: {}\n };\n const payload = toValue(config.payload);\n if (payload) {\n const headers = headersToObject(defaultFetchOptions.headers);\n const proto = Object.getPrototypeOf(payload);\n if (!config.payloadType && payload && (proto === Object.prototype || Array.isArray(proto)) && !(payload instanceof FormData))\n config.payloadType = \"json\";\n if (config.payloadType)\n headers[\"Content-Type\"] = (_a2 = payloadMapping[config.payloadType]) != null ? _a2 : config.payloadType;\n defaultFetchOptions.body = config.payloadType === \"json\" ? JSON.stringify(payload) : payload;\n }\n let isCanceled = false;\n const context = {\n url: toValue(url),\n options: {\n ...defaultFetchOptions,\n ...fetchOptions\n },\n cancel: () => {\n isCanceled = true;\n }\n };\n if (options.beforeFetch)\n Object.assign(context, await options.beforeFetch(context));\n if (isCanceled || !fetch) {\n loading(false);\n return Promise.resolve(null);\n }\n let responseData = null;\n if (timer)\n timer.start();\n return fetch(\n context.url,\n {\n ...defaultFetchOptions,\n ...context.options,\n headers: {\n ...headersToObject(defaultFetchOptions.headers),\n ...headersToObject((_b = context.options) == null ? void 0 : _b.headers)\n }\n }\n ).then(async (fetchResponse) => {\n response.value = fetchResponse;\n statusCode.value = fetchResponse.status;\n responseData = await fetchResponse.clone()[config.type]();\n if (!fetchResponse.ok) {\n data.value = initialData || null;\n throw new Error(fetchResponse.statusText);\n }\n if (options.afterFetch) {\n ({ data: responseData } = await options.afterFetch({\n data: responseData,\n response: fetchResponse,\n context,\n execute\n }));\n }\n data.value = responseData;\n responseEvent.trigger(fetchResponse);\n return fetchResponse;\n }).catch(async (fetchError) => {\n let errorData = fetchError.message || fetchError.name;\n if (options.onFetchError) {\n ({ error: errorData, data: responseData } = await options.onFetchError({\n data: responseData,\n error: fetchError,\n response: response.value,\n context,\n execute\n }));\n }\n error.value = errorData;\n if (options.updateDataOnError)\n data.value = responseData;\n errorEvent.trigger(fetchError);\n if (throwOnFailed)\n throw fetchError;\n return null;\n }).finally(() => {\n if (currentExecuteCounter === executeCounter)\n loading(false);\n if (timer)\n timer.stop();\n finallyEvent.trigger(null);\n });\n };\n const refetch = toRef(options.refetch);\n watch(\n [\n refetch,\n toRef(url)\n ],\n ([refetch2]) => refetch2 && execute(),\n { deep: true }\n );\n const shell = {\n isFinished: readonly(isFinished),\n isFetching: readonly(isFetching),\n statusCode,\n response,\n error,\n data,\n canAbort,\n aborted,\n abort,\n execute,\n onFetchResponse: responseEvent.on,\n onFetchError: errorEvent.on,\n onFetchFinally: finallyEvent.on,\n // method\n get: setMethod(\"GET\"),\n put: setMethod(\"PUT\"),\n post: setMethod(\"POST\"),\n delete: setMethod(\"DELETE\"),\n patch: setMethod(\"PATCH\"),\n head: setMethod(\"HEAD\"),\n options: setMethod(\"OPTIONS\"),\n // type\n json: setType(\"json\"),\n text: setType(\"text\"),\n blob: setType(\"blob\"),\n arrayBuffer: setType(\"arrayBuffer\"),\n formData: setType(\"formData\")\n };\n function setMethod(method) {\n return (payload, payloadType) => {\n if (!isFetching.value) {\n config.method = method;\n config.payload = payload;\n config.payloadType = payloadType;\n if (isRef(config.payload)) {\n watch(\n [\n refetch,\n toRef(config.payload)\n ],\n ([refetch2]) => refetch2 && execute(),\n { deep: true }\n );\n }\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n };\n }\n return void 0;\n };\n }\n function waitUntilFinished() {\n return new Promise((resolve, reject) => {\n until(isFinished).toBe(true).then(() => resolve(shell)).catch(reject);\n });\n }\n function setType(type) {\n return () => {\n if (!isFetching.value) {\n config.type = type;\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n };\n }\n return void 0;\n };\n }\n if (options.immediate)\n Promise.resolve().then(() => execute());\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n };\n}\nfunction joinPaths(start, end) {\n if (!start.endsWith(\"/\") && !end.startsWith(\"/\")) {\n return `${start}/${end}`;\n }\n if (start.endsWith(\"/\") && end.startsWith(\"/\")) {\n return `${start.slice(0, -1)}${end}`;\n }\n return `${start}${end}`;\n}\n\nconst DEFAULT_OPTIONS = {\n multiple: true,\n accept: \"*\",\n reset: false,\n directory: false\n};\nfunction prepareInitialFiles(files) {\n if (!files)\n return null;\n if (files instanceof FileList)\n return files;\n const dt = new DataTransfer();\n for (const file of files) {\n dt.items.add(file);\n }\n return dt.files;\n}\nfunction useFileDialog(options = {}) {\n const {\n document = defaultDocument\n } = options;\n const files = ref(prepareInitialFiles(options.initialFiles));\n const { on: onChange, trigger: changeTrigger } = createEventHook();\n const { on: onCancel, trigger: cancelTrigger } = createEventHook();\n let input;\n if (document) {\n input = document.createElement(\"input\");\n input.type = \"file\";\n input.onchange = (event) => {\n const result = event.target;\n files.value = result.files;\n changeTrigger(files.value);\n };\n input.oncancel = () => {\n cancelTrigger();\n };\n }\n const reset = () => {\n files.value = null;\n if (input && input.value) {\n input.value = \"\";\n changeTrigger(null);\n }\n };\n const open = (localOptions) => {\n if (!input)\n return;\n const _options = {\n ...DEFAULT_OPTIONS,\n ...options,\n ...localOptions\n };\n input.multiple = _options.multiple;\n input.accept = _options.accept;\n input.webkitdirectory = _options.directory;\n if (hasOwn(_options, \"capture\"))\n input.capture = _options.capture;\n if (_options.reset)\n reset();\n input.click();\n };\n return {\n files: readonly(files),\n open,\n reset,\n onCancel,\n onChange\n };\n}\n\nfunction useFileSystemAccess(options = {}) {\n const {\n window: _window = defaultWindow,\n dataType = \"Text\"\n } = options;\n const window = _window;\n const isSupported = useSupported(() => window && \"showSaveFilePicker\" in window && \"showOpenFilePicker\" in window);\n const fileHandle = shallowRef();\n const data = shallowRef();\n const file = shallowRef();\n const fileName = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.name) != null ? _b : \"\";\n });\n const fileMIME = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.type) != null ? _b : \"\";\n });\n const fileSize = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.size) != null ? _b : 0;\n });\n const fileLastModified = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.lastModified) != null ? _b : 0;\n });\n async function open(_options = {}) {\n if (!isSupported.value)\n return;\n const [handle] = await window.showOpenFilePicker({ ...toValue(options), ..._options });\n fileHandle.value = handle;\n await updateData();\n }\n async function create(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker({ ...options, ..._options });\n data.value = void 0;\n await updateData();\n }\n async function save(_options = {}) {\n if (!isSupported.value)\n return;\n if (!fileHandle.value)\n return saveAs(_options);\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function saveAs(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker({ ...options, ..._options });\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function updateFile() {\n var _a;\n file.value = await ((_a = fileHandle.value) == null ? void 0 : _a.getFile());\n }\n async function updateData() {\n var _a, _b;\n await updateFile();\n const type = toValue(dataType);\n if (type === \"Text\")\n data.value = await ((_a = file.value) == null ? void 0 : _a.text());\n else if (type === \"ArrayBuffer\")\n data.value = await ((_b = file.value) == null ? void 0 : _b.arrayBuffer());\n else if (type === \"Blob\")\n data.value = file.value;\n }\n watch(() => toValue(dataType), updateData);\n return {\n isSupported,\n data,\n file,\n fileName,\n fileMIME,\n fileSize,\n fileLastModified,\n open,\n create,\n save,\n saveAs,\n updateData\n };\n}\n\nfunction useFocus(target, options = {}) {\n const { initialValue = false, focusVisible = false, preventScroll = false } = options;\n const innerFocused = shallowRef(false);\n const targetElement = computed(() => unrefElement(target));\n const listenerOptions = { passive: true };\n useEventListener(targetElement, \"focus\", (event) => {\n var _a, _b;\n if (!focusVisible || ((_b = (_a = event.target).matches) == null ? void 0 : _b.call(_a, \":focus-visible\")))\n innerFocused.value = true;\n }, listenerOptions);\n useEventListener(targetElement, \"blur\", () => innerFocused.value = false, listenerOptions);\n const focused = computed({\n get: () => innerFocused.value,\n set(value) {\n var _a, _b;\n if (!value && innerFocused.value)\n (_a = targetElement.value) == null ? void 0 : _a.blur();\n else if (value && !innerFocused.value)\n (_b = targetElement.value) == null ? void 0 : _b.focus({ preventScroll });\n }\n });\n watch(\n targetElement,\n () => {\n focused.value = initialValue;\n },\n { immediate: true, flush: \"post\" }\n );\n return { focused };\n}\n\nconst EVENT_FOCUS_IN = \"focusin\";\nconst EVENT_FOCUS_OUT = \"focusout\";\nconst PSEUDO_CLASS_FOCUS_WITHIN = \":focus-within\";\nfunction useFocusWithin(target, options = {}) {\n const { window = defaultWindow } = options;\n const targetElement = computed(() => unrefElement(target));\n const _focused = shallowRef(false);\n const focused = computed(() => _focused.value);\n const activeElement = useActiveElement(options);\n if (!window || !activeElement.value) {\n return { focused };\n }\n const listenerOptions = { passive: true };\n useEventListener(targetElement, EVENT_FOCUS_IN, () => _focused.value = true, listenerOptions);\n useEventListener(targetElement, EVENT_FOCUS_OUT, () => {\n var _a, _b, _c;\n return _focused.value = (_c = (_b = (_a = targetElement.value) == null ? void 0 : _a.matches) == null ? void 0 : _b.call(_a, PSEUDO_CLASS_FOCUS_WITHIN)) != null ? _c : false;\n }, listenerOptions);\n return { focused };\n}\n\nfunction useFps(options) {\n var _a;\n const fps = shallowRef(0);\n if (typeof performance === \"undefined\")\n return fps;\n const every = (_a = options == null ? void 0 : options.every) != null ? _a : 10;\n let last = performance.now();\n let ticks = 0;\n useRafFn(() => {\n ticks += 1;\n if (ticks >= every) {\n const now = performance.now();\n const diff = now - last;\n fps.value = Math.round(1e3 / (diff / ticks));\n last = now;\n ticks = 0;\n }\n });\n return fps;\n}\n\nconst eventHandlers = [\n \"fullscreenchange\",\n \"webkitfullscreenchange\",\n \"webkitendfullscreen\",\n \"mozfullscreenchange\",\n \"MSFullscreenChange\"\n];\nfunction useFullscreen(target, options = {}) {\n const {\n document = defaultDocument,\n autoExit = false\n } = options;\n const targetRef = computed(() => {\n var _a;\n return (_a = unrefElement(target)) != null ? _a : document == null ? void 0 : document.documentElement;\n });\n const isFullscreen = shallowRef(false);\n const requestMethod = computed(() => {\n return [\n \"requestFullscreen\",\n \"webkitRequestFullscreen\",\n \"webkitEnterFullscreen\",\n \"webkitEnterFullScreen\",\n \"webkitRequestFullScreen\",\n \"mozRequestFullScreen\",\n \"msRequestFullscreen\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const exitMethod = computed(() => {\n return [\n \"exitFullscreen\",\n \"webkitExitFullscreen\",\n \"webkitExitFullScreen\",\n \"webkitCancelFullScreen\",\n \"mozCancelFullScreen\",\n \"msExitFullscreen\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const fullscreenEnabled = computed(() => {\n return [\n \"fullScreen\",\n \"webkitIsFullScreen\",\n \"webkitDisplayingFullscreen\",\n \"mozFullScreen\",\n \"msFullscreenElement\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const fullscreenElementMethod = [\n \"fullscreenElement\",\n \"webkitFullscreenElement\",\n \"mozFullScreenElement\",\n \"msFullscreenElement\"\n ].find((m) => document && m in document);\n const isSupported = useSupported(() => targetRef.value && document && requestMethod.value !== void 0 && exitMethod.value !== void 0 && fullscreenEnabled.value !== void 0);\n const isCurrentElementFullScreen = () => {\n if (fullscreenElementMethod)\n return (document == null ? void 0 : document[fullscreenElementMethod]) === targetRef.value;\n return false;\n };\n const isElementFullScreen = () => {\n if (fullscreenEnabled.value) {\n if (document && document[fullscreenEnabled.value] != null) {\n return document[fullscreenEnabled.value];\n } else {\n const target2 = targetRef.value;\n if ((target2 == null ? void 0 : target2[fullscreenEnabled.value]) != null) {\n return Boolean(target2[fullscreenEnabled.value]);\n }\n }\n }\n return false;\n };\n async function exit() {\n if (!isSupported.value || !isFullscreen.value)\n return;\n if (exitMethod.value) {\n if ((document == null ? void 0 : document[exitMethod.value]) != null) {\n await document[exitMethod.value]();\n } else {\n const target2 = targetRef.value;\n if ((target2 == null ? void 0 : target2[exitMethod.value]) != null)\n await target2[exitMethod.value]();\n }\n }\n isFullscreen.value = false;\n }\n async function enter() {\n if (!isSupported.value || isFullscreen.value)\n return;\n if (isElementFullScreen())\n await exit();\n const target2 = targetRef.value;\n if (requestMethod.value && (target2 == null ? void 0 : target2[requestMethod.value]) != null) {\n await target2[requestMethod.value]();\n isFullscreen.value = true;\n }\n }\n async function toggle() {\n await (isFullscreen.value ? exit() : enter());\n }\n const handlerCallback = () => {\n const isElementFullScreenValue = isElementFullScreen();\n if (!isElementFullScreenValue || isElementFullScreenValue && isCurrentElementFullScreen())\n isFullscreen.value = isElementFullScreenValue;\n };\n const listenerOptions = { capture: false, passive: true };\n useEventListener(document, eventHandlers, handlerCallback, listenerOptions);\n useEventListener(() => unrefElement(targetRef), eventHandlers, handlerCallback, listenerOptions);\n if (autoExit)\n tryOnScopeDispose(exit);\n return {\n isSupported,\n isFullscreen,\n enter,\n exit,\n toggle\n };\n}\n\nfunction mapGamepadToXbox360Controller(gamepad) {\n return computed(() => {\n if (gamepad.value) {\n return {\n buttons: {\n a: gamepad.value.buttons[0],\n b: gamepad.value.buttons[1],\n x: gamepad.value.buttons[2],\n y: gamepad.value.buttons[3]\n },\n bumper: {\n left: gamepad.value.buttons[4],\n right: gamepad.value.buttons[5]\n },\n triggers: {\n left: gamepad.value.buttons[6],\n right: gamepad.value.buttons[7]\n },\n stick: {\n left: {\n horizontal: gamepad.value.axes[0],\n vertical: gamepad.value.axes[1],\n button: gamepad.value.buttons[10]\n },\n right: {\n horizontal: gamepad.value.axes[2],\n vertical: gamepad.value.axes[3],\n button: gamepad.value.buttons[11]\n }\n },\n dpad: {\n up: gamepad.value.buttons[12],\n down: gamepad.value.buttons[13],\n left: gamepad.value.buttons[14],\n right: gamepad.value.buttons[15]\n },\n back: gamepad.value.buttons[8],\n start: gamepad.value.buttons[9]\n };\n }\n return null;\n });\n}\nfunction useGamepad(options = {}) {\n const {\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"getGamepads\" in navigator);\n const gamepads = ref([]);\n const onConnectedHook = createEventHook();\n const onDisconnectedHook = createEventHook();\n const stateFromGamepad = (gamepad) => {\n const hapticActuators = [];\n const vibrationActuator = \"vibrationActuator\" in gamepad ? gamepad.vibrationActuator : null;\n if (vibrationActuator)\n hapticActuators.push(vibrationActuator);\n if (gamepad.hapticActuators)\n hapticActuators.push(...gamepad.hapticActuators);\n return {\n id: gamepad.id,\n index: gamepad.index,\n connected: gamepad.connected,\n mapping: gamepad.mapping,\n timestamp: gamepad.timestamp,\n vibrationActuator: gamepad.vibrationActuator,\n hapticActuators,\n axes: gamepad.axes.map((axes) => axes),\n buttons: gamepad.buttons.map((button) => ({ pressed: button.pressed, touched: button.touched, value: button.value }))\n };\n };\n const updateGamepadState = () => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n for (const gamepad of _gamepads) {\n if (gamepad && gamepads.value[gamepad.index])\n gamepads.value[gamepad.index] = stateFromGamepad(gamepad);\n }\n };\n const { isActive, pause, resume } = useRafFn(updateGamepadState);\n const onGamepadConnected = (gamepad) => {\n if (!gamepads.value.some(({ index }) => index === gamepad.index)) {\n gamepads.value.push(stateFromGamepad(gamepad));\n onConnectedHook.trigger(gamepad.index);\n }\n resume();\n };\n const onGamepadDisconnected = (gamepad) => {\n gamepads.value = gamepads.value.filter((x) => x.index !== gamepad.index);\n onDisconnectedHook.trigger(gamepad.index);\n };\n const listenerOptions = { passive: true };\n useEventListener(\"gamepadconnected\", (e) => onGamepadConnected(e.gamepad), listenerOptions);\n useEventListener(\"gamepaddisconnected\", (e) => onGamepadDisconnected(e.gamepad), listenerOptions);\n tryOnMounted(() => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n for (const gamepad of _gamepads) {\n if (gamepad && gamepads.value[gamepad.index])\n onGamepadConnected(gamepad);\n }\n });\n pause();\n return {\n isSupported,\n onConnected: onConnectedHook.on,\n onDisconnected: onDisconnectedHook.on,\n gamepads,\n pause,\n resume,\n isActive\n };\n}\n\nfunction useGeolocation(options = {}) {\n const {\n enableHighAccuracy = true,\n maximumAge = 3e4,\n timeout = 27e3,\n navigator = defaultNavigator,\n immediate = true\n } = options;\n const isSupported = useSupported(() => navigator && \"geolocation\" in navigator);\n const locatedAt = shallowRef(null);\n const error = shallowRef(null);\n const coords = ref({\n accuracy: 0,\n latitude: Number.POSITIVE_INFINITY,\n longitude: Number.POSITIVE_INFINITY,\n altitude: null,\n altitudeAccuracy: null,\n heading: null,\n speed: null\n });\n function updatePosition(position) {\n locatedAt.value = position.timestamp;\n coords.value = position.coords;\n error.value = null;\n }\n let watcher;\n function resume() {\n if (isSupported.value) {\n watcher = navigator.geolocation.watchPosition(\n updatePosition,\n (err) => error.value = err,\n {\n enableHighAccuracy,\n maximumAge,\n timeout\n }\n );\n }\n }\n if (immediate)\n resume();\n function pause() {\n if (watcher && navigator)\n navigator.geolocation.clearWatch(watcher);\n }\n tryOnScopeDispose(() => {\n pause();\n });\n return {\n isSupported,\n coords,\n locatedAt,\n error,\n resume,\n pause\n };\n}\n\nconst defaultEvents$1 = [\"mousemove\", \"mousedown\", \"resize\", \"keydown\", \"touchstart\", \"wheel\"];\nconst oneMinute = 6e4;\nfunction useIdle(timeout = oneMinute, options = {}) {\n const {\n initialState = false,\n listenForVisibilityChange = true,\n events = defaultEvents$1,\n window = defaultWindow,\n eventFilter = throttleFilter(50)\n } = options;\n const idle = shallowRef(initialState);\n const lastActive = shallowRef(timestamp());\n let timer;\n const reset = () => {\n idle.value = false;\n clearTimeout(timer);\n timer = setTimeout(() => idle.value = true, timeout);\n };\n const onEvent = createFilterWrapper(\n eventFilter,\n () => {\n lastActive.value = timestamp();\n reset();\n }\n );\n if (window) {\n const document = window.document;\n const listenerOptions = { passive: true };\n for (const event of events)\n useEventListener(window, event, onEvent, listenerOptions);\n if (listenForVisibilityChange) {\n useEventListener(document, \"visibilitychange\", () => {\n if (!document.hidden)\n onEvent();\n }, listenerOptions);\n }\n reset();\n }\n return {\n idle,\n lastActive,\n reset\n };\n}\n\nasync function loadImage(options) {\n return new Promise((resolve, reject) => {\n const img = new Image();\n const { src, srcset, sizes, class: clazz, loading, crossorigin, referrerPolicy, width, height, decoding, fetchPriority, ismap, usemap } = options;\n img.src = src;\n if (srcset != null)\n img.srcset = srcset;\n if (sizes != null)\n img.sizes = sizes;\n if (clazz != null)\n img.className = clazz;\n if (loading != null)\n img.loading = loading;\n if (crossorigin != null)\n img.crossOrigin = crossorigin;\n if (referrerPolicy != null)\n img.referrerPolicy = referrerPolicy;\n if (width != null)\n img.width = width;\n if (height != null)\n img.height = height;\n if (decoding != null)\n img.decoding = decoding;\n if (fetchPriority != null)\n img.fetchPriority = fetchPriority;\n if (ismap != null)\n img.isMap = ismap;\n if (usemap != null)\n img.useMap = usemap;\n img.onload = () => resolve(img);\n img.onerror = reject;\n });\n}\nfunction useImage(options, asyncStateOptions = {}) {\n const state = useAsyncState(\n () => loadImage(toValue(options)),\n void 0,\n {\n resetOnExecute: true,\n ...asyncStateOptions\n }\n );\n watch(\n () => toValue(options),\n () => state.execute(asyncStateOptions.delay),\n { deep: true }\n );\n return state;\n}\n\nfunction resolveElement(el) {\n if (typeof Window !== \"undefined\" && el instanceof Window)\n return el.document.documentElement;\n if (typeof Document !== \"undefined\" && el instanceof Document)\n return el.documentElement;\n return el;\n}\n\nconst ARRIVED_STATE_THRESHOLD_PIXELS = 1;\nfunction useScroll(element, options = {}) {\n const {\n throttle = 0,\n idle = 200,\n onStop = noop,\n onScroll = noop,\n offset = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n },\n eventListenerOptions = {\n capture: false,\n passive: true\n },\n behavior = \"auto\",\n window = defaultWindow,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const internalX = shallowRef(0);\n const internalY = shallowRef(0);\n const x = computed({\n get() {\n return internalX.value;\n },\n set(x2) {\n scrollTo(x2, void 0);\n }\n });\n const y = computed({\n get() {\n return internalY.value;\n },\n set(y2) {\n scrollTo(void 0, y2);\n }\n });\n function scrollTo(_x, _y) {\n var _a, _b, _c, _d;\n if (!window)\n return;\n const _element = toValue(element);\n if (!_element)\n return;\n (_c = _element instanceof Document ? window.document.body : _element) == null ? void 0 : _c.scrollTo({\n top: (_a = toValue(_y)) != null ? _a : y.value,\n left: (_b = toValue(_x)) != null ? _b : x.value,\n behavior: toValue(behavior)\n });\n const scrollContainer = ((_d = _element == null ? void 0 : _element.document) == null ? void 0 : _d.documentElement) || (_element == null ? void 0 : _element.documentElement) || _element;\n if (x != null)\n internalX.value = scrollContainer.scrollLeft;\n if (y != null)\n internalY.value = scrollContainer.scrollTop;\n }\n const isScrolling = shallowRef(false);\n const arrivedState = reactive({\n left: true,\n right: false,\n top: true,\n bottom: false\n });\n const directions = reactive({\n left: false,\n right: false,\n top: false,\n bottom: false\n });\n const onScrollEnd = (e) => {\n if (!isScrolling.value)\n return;\n isScrolling.value = false;\n directions.left = false;\n directions.right = false;\n directions.top = false;\n directions.bottom = false;\n onStop(e);\n };\n const onScrollEndDebounced = useDebounceFn(onScrollEnd, throttle + idle);\n const setArrivedState = (target) => {\n var _a;\n if (!window)\n return;\n const el = ((_a = target == null ? void 0 : target.document) == null ? void 0 : _a.documentElement) || (target == null ? void 0 : target.documentElement) || unrefElement(target);\n const { display, flexDirection, direction } = getComputedStyle(el);\n const directionMultipler = direction === \"rtl\" ? -1 : 1;\n const scrollLeft = el.scrollLeft;\n directions.left = scrollLeft < internalX.value;\n directions.right = scrollLeft > internalX.value;\n const left = Math.abs(scrollLeft * directionMultipler) <= (offset.left || 0);\n const right = Math.abs(scrollLeft * directionMultipler) + el.clientWidth >= el.scrollWidth - (offset.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n if (display === \"flex\" && flexDirection === \"row-reverse\") {\n arrivedState.left = right;\n arrivedState.right = left;\n } else {\n arrivedState.left = left;\n arrivedState.right = right;\n }\n internalX.value = scrollLeft;\n let scrollTop = el.scrollTop;\n if (target === window.document && !scrollTop)\n scrollTop = window.document.body.scrollTop;\n directions.top = scrollTop < internalY.value;\n directions.bottom = scrollTop > internalY.value;\n const top = Math.abs(scrollTop) <= (offset.top || 0);\n const bottom = Math.abs(scrollTop) + el.clientHeight >= el.scrollHeight - (offset.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n if (display === \"flex\" && flexDirection === \"column-reverse\") {\n arrivedState.top = bottom;\n arrivedState.bottom = top;\n } else {\n arrivedState.top = top;\n arrivedState.bottom = bottom;\n }\n internalY.value = scrollTop;\n };\n const onScrollHandler = (e) => {\n var _a;\n if (!window)\n return;\n const eventTarget = (_a = e.target.documentElement) != null ? _a : e.target;\n setArrivedState(eventTarget);\n isScrolling.value = true;\n onScrollEndDebounced(e);\n onScroll(e);\n };\n useEventListener(\n element,\n \"scroll\",\n throttle ? useThrottleFn(onScrollHandler, throttle, true, false) : onScrollHandler,\n eventListenerOptions\n );\n tryOnMounted(() => {\n try {\n const _element = toValue(element);\n if (!_element)\n return;\n setArrivedState(_element);\n } catch (e) {\n onError(e);\n }\n });\n useEventListener(\n element,\n \"scrollend\",\n onScrollEnd,\n eventListenerOptions\n );\n return {\n x,\n y,\n isScrolling,\n arrivedState,\n directions,\n measure() {\n const _element = toValue(element);\n if (window && _element)\n setArrivedState(_element);\n }\n };\n}\n\nfunction useInfiniteScroll(element, onLoadMore, options = {}) {\n var _a;\n const {\n direction = \"bottom\",\n interval = 100,\n canLoadMore = () => true\n } = options;\n const state = reactive(useScroll(\n element,\n {\n ...options,\n offset: {\n [direction]: (_a = options.distance) != null ? _a : 0,\n ...options.offset\n }\n }\n ));\n const promise = ref();\n const isLoading = computed(() => !!promise.value);\n const observedElement = computed(() => {\n return resolveElement(toValue(element));\n });\n const isElementVisible = useElementVisibility(observedElement);\n function checkAndLoad() {\n state.measure();\n if (!observedElement.value || !isElementVisible.value || !canLoadMore(observedElement.value))\n return;\n const { scrollHeight, clientHeight, scrollWidth, clientWidth } = observedElement.value;\n const isNarrower = direction === \"bottom\" || direction === \"top\" ? scrollHeight <= clientHeight : scrollWidth <= clientWidth;\n if (state.arrivedState[direction] || isNarrower) {\n if (!promise.value) {\n promise.value = Promise.all([\n onLoadMore(state),\n new Promise((resolve) => setTimeout(resolve, interval))\n ]).finally(() => {\n promise.value = null;\n nextTick(() => checkAndLoad());\n });\n }\n }\n }\n const stop = watch(\n () => [state.arrivedState[direction], isElementVisible.value],\n checkAndLoad,\n { immediate: true }\n );\n tryOnUnmounted(stop);\n return {\n isLoading,\n reset() {\n nextTick(() => checkAndLoad());\n }\n };\n}\n\nconst defaultEvents = [\"mousedown\", \"mouseup\", \"keydown\", \"keyup\"];\nfunction useKeyModifier(modifier, options = {}) {\n const {\n events = defaultEvents,\n document = defaultDocument,\n initial = null\n } = options;\n const state = shallowRef(initial);\n if (document) {\n events.forEach((listenerEvent) => {\n useEventListener(document, listenerEvent, (evt) => {\n if (typeof evt.getModifierState === \"function\")\n state.value = evt.getModifierState(modifier);\n }, { passive: true });\n });\n }\n return state;\n}\n\nfunction useLocalStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.localStorage, options);\n}\n\nconst DefaultMagicKeysAliasMap = {\n ctrl: \"control\",\n command: \"meta\",\n cmd: \"meta\",\n option: \"alt\",\n up: \"arrowup\",\n down: \"arrowdown\",\n left: \"arrowleft\",\n right: \"arrowright\"\n};\n\nfunction useMagicKeys(options = {}) {\n const {\n reactive: useReactive = false,\n target = defaultWindow,\n aliasMap = DefaultMagicKeysAliasMap,\n passive = true,\n onEventFired = noop\n } = options;\n const current = reactive(/* @__PURE__ */ new Set());\n const obj = {\n toJSON() {\n return {};\n },\n current\n };\n const refs = useReactive ? reactive(obj) : obj;\n const metaDeps = /* @__PURE__ */ new Set();\n const usedKeys = /* @__PURE__ */ new Set();\n function setRefs(key, value) {\n if (key in refs) {\n if (useReactive)\n refs[key] = value;\n else\n refs[key].value = value;\n }\n }\n function reset() {\n current.clear();\n for (const key of usedKeys)\n setRefs(key, false);\n }\n function updateRefs(e, value) {\n var _a, _b;\n const key = (_a = e.key) == null ? void 0 : _a.toLowerCase();\n const code = (_b = e.code) == null ? void 0 : _b.toLowerCase();\n const values = [code, key].filter(Boolean);\n if (key) {\n if (value)\n current.add(key);\n else\n current.delete(key);\n }\n for (const key2 of values) {\n usedKeys.add(key2);\n setRefs(key2, value);\n }\n if (key === \"meta\" && !value) {\n metaDeps.forEach((key2) => {\n current.delete(key2);\n setRefs(key2, false);\n });\n metaDeps.clear();\n } else if (typeof e.getModifierState === \"function\" && e.getModifierState(\"Meta\") && value) {\n [...current, ...values].forEach((key2) => metaDeps.add(key2));\n }\n }\n useEventListener(target, \"keydown\", (e) => {\n updateRefs(e, true);\n return onEventFired(e);\n }, { passive });\n useEventListener(target, \"keyup\", (e) => {\n updateRefs(e, false);\n return onEventFired(e);\n }, { passive });\n useEventListener(\"blur\", reset, { passive });\n useEventListener(\"focus\", reset, { passive });\n const proxy = new Proxy(\n refs,\n {\n get(target2, prop, rec) {\n if (typeof prop !== \"string\")\n return Reflect.get(target2, prop, rec);\n prop = prop.toLowerCase();\n if (prop in aliasMap)\n prop = aliasMap[prop];\n if (!(prop in refs)) {\n if (/[+_-]/.test(prop)) {\n const keys = prop.split(/[+_-]/g).map((i) => i.trim());\n refs[prop] = computed(() => keys.map((key) => toValue(proxy[key])).every(Boolean));\n } else {\n refs[prop] = shallowRef(false);\n }\n }\n const r = Reflect.get(target2, prop, rec);\n return useReactive ? toValue(r) : r;\n }\n }\n );\n return proxy;\n}\n\nfunction usingElRef(source, cb) {\n if (toValue(source))\n cb(toValue(source));\n}\nfunction timeRangeToArray(timeRanges) {\n let ranges = [];\n for (let i = 0; i < timeRanges.length; ++i)\n ranges = [...ranges, [timeRanges.start(i), timeRanges.end(i)]];\n return ranges;\n}\nfunction tracksToArray(tracks) {\n return Array.from(tracks).map(({ label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }, id) => ({ id, label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }));\n}\nconst defaultOptions = {\n src: \"\",\n tracks: []\n};\nfunction useMediaControls(target, options = {}) {\n target = toRef(target);\n options = {\n ...defaultOptions,\n ...options\n };\n const {\n document = defaultDocument\n } = options;\n const listenerOptions = { passive: true };\n const currentTime = shallowRef(0);\n const duration = shallowRef(0);\n const seeking = shallowRef(false);\n const volume = shallowRef(1);\n const waiting = shallowRef(false);\n const ended = shallowRef(false);\n const playing = shallowRef(false);\n const rate = shallowRef(1);\n const stalled = shallowRef(false);\n const buffered = ref([]);\n const tracks = ref([]);\n const selectedTrack = shallowRef(-1);\n const isPictureInPicture = shallowRef(false);\n const muted = shallowRef(false);\n const supportsPictureInPicture = document && \"pictureInPictureEnabled\" in document;\n const sourceErrorEvent = createEventHook();\n const playbackErrorEvent = createEventHook();\n const disableTrack = (track) => {\n usingElRef(target, (el) => {\n if (track) {\n const id = typeof track === \"number\" ? track : track.id;\n el.textTracks[id].mode = \"disabled\";\n } else {\n for (let i = 0; i < el.textTracks.length; ++i)\n el.textTracks[i].mode = \"disabled\";\n }\n selectedTrack.value = -1;\n });\n };\n const enableTrack = (track, disableTracks = true) => {\n usingElRef(target, (el) => {\n const id = typeof track === \"number\" ? track : track.id;\n if (disableTracks)\n disableTrack();\n el.textTracks[id].mode = \"showing\";\n selectedTrack.value = id;\n });\n };\n const togglePictureInPicture = () => {\n return new Promise((resolve, reject) => {\n usingElRef(target, async (el) => {\n if (supportsPictureInPicture) {\n if (!isPictureInPicture.value) {\n el.requestPictureInPicture().then(resolve).catch(reject);\n } else {\n document.exitPictureInPicture().then(resolve).catch(reject);\n }\n }\n });\n });\n };\n watchEffect(() => {\n if (!document)\n return;\n const el = toValue(target);\n if (!el)\n return;\n const src = toValue(options.src);\n let sources = [];\n if (!src)\n return;\n if (typeof src === \"string\")\n sources = [{ src }];\n else if (Array.isArray(src))\n sources = src;\n else if (isObject(src))\n sources = [src];\n el.querySelectorAll(\"source\").forEach((e) => {\n e.remove();\n });\n sources.forEach(({ src: src2, type, media }) => {\n const source = document.createElement(\"source\");\n source.setAttribute(\"src\", src2);\n source.setAttribute(\"type\", type || \"\");\n source.setAttribute(\"media\", media || \"\");\n useEventListener(source, \"error\", sourceErrorEvent.trigger, listenerOptions);\n el.appendChild(source);\n });\n el.load();\n });\n watch([target, volume], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.volume = volume.value;\n });\n watch([target, muted], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.muted = muted.value;\n });\n watch([target, rate], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.playbackRate = rate.value;\n });\n watchEffect(() => {\n if (!document)\n return;\n const textTracks = toValue(options.tracks);\n const el = toValue(target);\n if (!textTracks || !textTracks.length || !el)\n return;\n el.querySelectorAll(\"track\").forEach((e) => e.remove());\n textTracks.forEach(({ default: isDefault, kind, label, src, srcLang }, i) => {\n const track = document.createElement(\"track\");\n track.default = isDefault || false;\n track.kind = kind;\n track.label = label;\n track.src = src;\n track.srclang = srcLang;\n if (track.default)\n selectedTrack.value = i;\n el.appendChild(track);\n });\n });\n const { ignoreUpdates: ignoreCurrentTimeUpdates } = watchIgnorable(currentTime, (time) => {\n const el = toValue(target);\n if (!el)\n return;\n el.currentTime = time;\n });\n const { ignoreUpdates: ignorePlayingUpdates } = watchIgnorable(playing, (isPlaying) => {\n const el = toValue(target);\n if (!el)\n return;\n if (isPlaying) {\n el.play().catch((e) => {\n playbackErrorEvent.trigger(e);\n throw e;\n });\n } else {\n el.pause();\n }\n });\n useEventListener(\n target,\n \"timeupdate\",\n () => ignoreCurrentTimeUpdates(() => currentTime.value = toValue(target).currentTime),\n listenerOptions\n );\n useEventListener(\n target,\n \"durationchange\",\n () => duration.value = toValue(target).duration,\n listenerOptions\n );\n useEventListener(\n target,\n \"progress\",\n () => buffered.value = timeRangeToArray(toValue(target).buffered),\n listenerOptions\n );\n useEventListener(\n target,\n \"seeking\",\n () => seeking.value = true,\n listenerOptions\n );\n useEventListener(\n target,\n \"seeked\",\n () => seeking.value = false,\n listenerOptions\n );\n useEventListener(\n target,\n [\"waiting\", \"loadstart\"],\n () => {\n waiting.value = true;\n ignorePlayingUpdates(() => playing.value = false);\n },\n listenerOptions\n );\n useEventListener(\n target,\n \"loadeddata\",\n () => waiting.value = false,\n listenerOptions\n );\n useEventListener(\n target,\n \"playing\",\n () => {\n waiting.value = false;\n ended.value = false;\n ignorePlayingUpdates(() => playing.value = true);\n },\n listenerOptions\n );\n useEventListener(\n target,\n \"ratechange\",\n () => rate.value = toValue(target).playbackRate,\n listenerOptions\n );\n useEventListener(\n target,\n \"stalled\",\n () => stalled.value = true,\n listenerOptions\n );\n useEventListener(\n target,\n \"ended\",\n () => ended.value = true,\n listenerOptions\n );\n useEventListener(\n target,\n \"pause\",\n () => ignorePlayingUpdates(() => playing.value = false),\n listenerOptions\n );\n useEventListener(\n target,\n \"play\",\n () => ignorePlayingUpdates(() => playing.value = true),\n listenerOptions\n );\n useEventListener(\n target,\n \"enterpictureinpicture\",\n () => isPictureInPicture.value = true,\n listenerOptions\n );\n useEventListener(\n target,\n \"leavepictureinpicture\",\n () => isPictureInPicture.value = false,\n listenerOptions\n );\n useEventListener(\n target,\n \"volumechange\",\n () => {\n const el = toValue(target);\n if (!el)\n return;\n volume.value = el.volume;\n muted.value = el.muted;\n },\n listenerOptions\n );\n const listeners = [];\n const stop = watch([target], () => {\n const el = toValue(target);\n if (!el)\n return;\n stop();\n listeners[0] = useEventListener(el.textTracks, \"addtrack\", () => tracks.value = tracksToArray(el.textTracks), listenerOptions);\n listeners[1] = useEventListener(el.textTracks, \"removetrack\", () => tracks.value = tracksToArray(el.textTracks), listenerOptions);\n listeners[2] = useEventListener(el.textTracks, \"change\", () => tracks.value = tracksToArray(el.textTracks), listenerOptions);\n });\n tryOnScopeDispose(() => listeners.forEach((listener) => listener()));\n return {\n currentTime,\n duration,\n waiting,\n seeking,\n ended,\n stalled,\n buffered,\n playing,\n rate,\n // Volume\n volume,\n muted,\n // Tracks\n tracks,\n selectedTrack,\n enableTrack,\n disableTrack,\n // Picture in Picture\n supportsPictureInPicture,\n togglePictureInPicture,\n isPictureInPicture,\n // Events\n onSourceError: sourceErrorEvent.on,\n onPlaybackError: playbackErrorEvent.on\n };\n}\n\nfunction useMemoize(resolver, options) {\n const initCache = () => {\n if (options == null ? void 0 : options.cache)\n return shallowReactive(options.cache);\n return shallowReactive(/* @__PURE__ */ new Map());\n };\n const cache = initCache();\n const generateKey = (...args) => (options == null ? void 0 : options.getKey) ? options.getKey(...args) : JSON.stringify(args);\n const _loadData = (key, ...args) => {\n cache.set(key, resolver(...args));\n return cache.get(key);\n };\n const loadData = (...args) => _loadData(generateKey(...args), ...args);\n const deleteData = (...args) => {\n cache.delete(generateKey(...args));\n };\n const clearData = () => {\n cache.clear();\n };\n const memoized = (...args) => {\n const key = generateKey(...args);\n if (cache.has(key))\n return cache.get(key);\n return _loadData(key, ...args);\n };\n memoized.load = loadData;\n memoized.delete = deleteData;\n memoized.clear = clearData;\n memoized.generateKey = generateKey;\n memoized.cache = cache;\n return memoized;\n}\n\nfunction useMemory(options = {}) {\n const memory = ref();\n const isSupported = useSupported(() => typeof performance !== \"undefined\" && \"memory\" in performance);\n if (isSupported.value) {\n const { interval = 1e3 } = options;\n useIntervalFn(() => {\n memory.value = performance.memory;\n }, interval, { immediate: options.immediate, immediateCallback: options.immediateCallback });\n }\n return { isSupported, memory };\n}\n\nconst UseMouseBuiltinExtractors = {\n page: (event) => [event.pageX, event.pageY],\n client: (event) => [event.clientX, event.clientY],\n screen: (event) => [event.screenX, event.screenY],\n movement: (event) => event instanceof MouseEvent ? [event.movementX, event.movementY] : null\n};\nfunction useMouse(options = {}) {\n const {\n type = \"page\",\n touch = true,\n resetOnTouchEnds = false,\n initialValue = { x: 0, y: 0 },\n window = defaultWindow,\n target = window,\n scroll = true,\n eventFilter\n } = options;\n let _prevMouseEvent = null;\n let _prevScrollX = 0;\n let _prevScrollY = 0;\n const x = shallowRef(initialValue.x);\n const y = shallowRef(initialValue.y);\n const sourceType = shallowRef(null);\n const extractor = typeof type === \"function\" ? type : UseMouseBuiltinExtractors[type];\n const mouseHandler = (event) => {\n const result = extractor(event);\n _prevMouseEvent = event;\n if (result) {\n [x.value, y.value] = result;\n sourceType.value = \"mouse\";\n }\n if (window) {\n _prevScrollX = window.scrollX;\n _prevScrollY = window.scrollY;\n }\n };\n const touchHandler = (event) => {\n if (event.touches.length > 0) {\n const result = extractor(event.touches[0]);\n if (result) {\n [x.value, y.value] = result;\n sourceType.value = \"touch\";\n }\n }\n };\n const scrollHandler = () => {\n if (!_prevMouseEvent || !window)\n return;\n const pos = extractor(_prevMouseEvent);\n if (_prevMouseEvent instanceof MouseEvent && pos) {\n x.value = pos[0] + window.scrollX - _prevScrollX;\n y.value = pos[1] + window.scrollY - _prevScrollY;\n }\n };\n const reset = () => {\n x.value = initialValue.x;\n y.value = initialValue.y;\n };\n const mouseHandlerWrapper = eventFilter ? (event) => eventFilter(() => mouseHandler(event), {}) : (event) => mouseHandler(event);\n const touchHandlerWrapper = eventFilter ? (event) => eventFilter(() => touchHandler(event), {}) : (event) => touchHandler(event);\n const scrollHandlerWrapper = eventFilter ? () => eventFilter(() => scrollHandler(), {}) : () => scrollHandler();\n if (target) {\n const listenerOptions = { passive: true };\n useEventListener(target, [\"mousemove\", \"dragover\"], mouseHandlerWrapper, listenerOptions);\n if (touch && type !== \"movement\") {\n useEventListener(target, [\"touchstart\", \"touchmove\"], touchHandlerWrapper, listenerOptions);\n if (resetOnTouchEnds)\n useEventListener(target, \"touchend\", reset, listenerOptions);\n }\n if (scroll && type === \"page\")\n useEventListener(window, \"scroll\", scrollHandlerWrapper, listenerOptions);\n }\n return {\n x,\n y,\n sourceType\n };\n}\n\nfunction useMouseInElement(target, options = {}) {\n const {\n handleOutside = true,\n window = defaultWindow\n } = options;\n const type = options.type || \"page\";\n const { x, y, sourceType } = useMouse(options);\n const targetRef = shallowRef(target != null ? target : window == null ? void 0 : window.document.body);\n const elementX = shallowRef(0);\n const elementY = shallowRef(0);\n const elementPositionX = shallowRef(0);\n const elementPositionY = shallowRef(0);\n const elementHeight = shallowRef(0);\n const elementWidth = shallowRef(0);\n const isOutside = shallowRef(true);\n let stop = () => {\n };\n if (window) {\n stop = watch(\n [targetRef, x, y],\n () => {\n const el = unrefElement(targetRef);\n if (!el || !(el instanceof Element))\n return;\n const {\n left,\n top,\n width,\n height\n } = el.getBoundingClientRect();\n elementPositionX.value = left + (type === \"page\" ? window.pageXOffset : 0);\n elementPositionY.value = top + (type === \"page\" ? window.pageYOffset : 0);\n elementHeight.value = height;\n elementWidth.value = width;\n const elX = x.value - elementPositionX.value;\n const elY = y.value - elementPositionY.value;\n isOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height;\n if (handleOutside || !isOutside.value) {\n elementX.value = elX;\n elementY.value = elY;\n }\n },\n { immediate: true }\n );\n useEventListener(\n document,\n \"mouseleave\",\n () => isOutside.value = true,\n { passive: true }\n );\n }\n return {\n x,\n y,\n sourceType,\n elementX,\n elementY,\n elementPositionX,\n elementPositionY,\n elementHeight,\n elementWidth,\n isOutside,\n stop\n };\n}\n\nfunction useMousePressed(options = {}) {\n const {\n touch = true,\n drag = true,\n capture = false,\n initialValue = false,\n window = defaultWindow\n } = options;\n const pressed = shallowRef(initialValue);\n const sourceType = shallowRef(null);\n if (!window) {\n return {\n pressed,\n sourceType\n };\n }\n const onPressed = (srcType) => (event) => {\n var _a;\n pressed.value = true;\n sourceType.value = srcType;\n (_a = options.onPressed) == null ? void 0 : _a.call(options, event);\n };\n const onReleased = (event) => {\n var _a;\n pressed.value = false;\n sourceType.value = null;\n (_a = options.onReleased) == null ? void 0 : _a.call(options, event);\n };\n const target = computed(() => unrefElement(options.target) || window);\n const listenerOptions = { passive: true, capture };\n useEventListener(target, \"mousedown\", onPressed(\"mouse\"), listenerOptions);\n useEventListener(window, \"mouseleave\", onReleased, listenerOptions);\n useEventListener(window, \"mouseup\", onReleased, listenerOptions);\n if (drag) {\n useEventListener(target, \"dragstart\", onPressed(\"mouse\"), listenerOptions);\n useEventListener(window, \"drop\", onReleased, listenerOptions);\n useEventListener(window, \"dragend\", onReleased, listenerOptions);\n }\n if (touch) {\n useEventListener(target, \"touchstart\", onPressed(\"touch\"), listenerOptions);\n useEventListener(window, \"touchend\", onReleased, listenerOptions);\n useEventListener(window, \"touchcancel\", onReleased, listenerOptions);\n }\n return {\n pressed,\n sourceType\n };\n}\n\nfunction useNavigatorLanguage(options = {}) {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"language\" in navigator);\n const language = shallowRef(navigator == null ? void 0 : navigator.language);\n useEventListener(window, \"languagechange\", () => {\n if (navigator)\n language.value = navigator.language;\n }, { passive: true });\n return {\n isSupported,\n language\n };\n}\n\nfunction useNetwork(options = {}) {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"connection\" in navigator);\n const isOnline = shallowRef(true);\n const saveData = shallowRef(false);\n const offlineAt = shallowRef(void 0);\n const onlineAt = shallowRef(void 0);\n const downlink = shallowRef(void 0);\n const downlinkMax = shallowRef(void 0);\n const rtt = shallowRef(void 0);\n const effectiveType = shallowRef(void 0);\n const type = shallowRef(\"unknown\");\n const connection = isSupported.value && navigator.connection;\n function updateNetworkInformation() {\n if (!navigator)\n return;\n isOnline.value = navigator.onLine;\n offlineAt.value = isOnline.value ? void 0 : Date.now();\n onlineAt.value = isOnline.value ? Date.now() : void 0;\n if (connection) {\n downlink.value = connection.downlink;\n downlinkMax.value = connection.downlinkMax;\n effectiveType.value = connection.effectiveType;\n rtt.value = connection.rtt;\n saveData.value = connection.saveData;\n type.value = connection.type;\n }\n }\n const listenerOptions = { passive: true };\n if (window) {\n useEventListener(window, \"offline\", () => {\n isOnline.value = false;\n offlineAt.value = Date.now();\n }, listenerOptions);\n useEventListener(window, \"online\", () => {\n isOnline.value = true;\n onlineAt.value = Date.now();\n }, listenerOptions);\n }\n if (connection)\n useEventListener(connection, \"change\", updateNetworkInformation, listenerOptions);\n updateNetworkInformation();\n return {\n isSupported,\n isOnline: readonly(isOnline),\n saveData: readonly(saveData),\n offlineAt: readonly(offlineAt),\n onlineAt: readonly(onlineAt),\n downlink: readonly(downlink),\n downlinkMax: readonly(downlinkMax),\n effectiveType: readonly(effectiveType),\n rtt: readonly(rtt),\n type: readonly(type)\n };\n}\n\nfunction useNow(options = {}) {\n const {\n controls: exposeControls = false,\n interval = \"requestAnimationFrame\"\n } = options;\n const now = ref(/* @__PURE__ */ new Date());\n const update = () => now.value = /* @__PURE__ */ new Date();\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(update, { immediate: true }) : useIntervalFn(update, interval, { immediate: true });\n if (exposeControls) {\n return {\n now,\n ...controls\n };\n } else {\n return now;\n }\n}\n\nfunction useObjectUrl(object) {\n const url = shallowRef();\n const release = () => {\n if (url.value)\n URL.revokeObjectURL(url.value);\n url.value = void 0;\n };\n watch(\n () => toValue(object),\n (newObject) => {\n release();\n if (newObject)\n url.value = URL.createObjectURL(newObject);\n },\n { immediate: true }\n );\n tryOnScopeDispose(release);\n return readonly(url);\n}\n\nfunction useClamp(value, min, max) {\n if (typeof value === \"function\" || isReadonly(value))\n return computed(() => clamp(toValue(value), toValue(min), toValue(max)));\n const _value = ref(value);\n return computed({\n get() {\n return _value.value = clamp(_value.value, toValue(min), toValue(max));\n },\n set(value2) {\n _value.value = clamp(value2, toValue(min), toValue(max));\n }\n });\n}\n\nfunction useOffsetPagination(options) {\n const {\n total = Number.POSITIVE_INFINITY,\n pageSize = 10,\n page = 1,\n onPageChange = noop,\n onPageSizeChange = noop,\n onPageCountChange = noop\n } = options;\n const currentPageSize = useClamp(pageSize, 1, Number.POSITIVE_INFINITY);\n const pageCount = computed(() => Math.max(\n 1,\n Math.ceil(toValue(total) / toValue(currentPageSize))\n ));\n const currentPage = useClamp(page, 1, pageCount);\n const isFirstPage = computed(() => currentPage.value === 1);\n const isLastPage = computed(() => currentPage.value === pageCount.value);\n if (isRef(page)) {\n syncRef(page, currentPage, {\n direction: isReadonly(page) ? \"ltr\" : \"both\"\n });\n }\n if (isRef(pageSize)) {\n syncRef(pageSize, currentPageSize, {\n direction: isReadonly(pageSize) ? \"ltr\" : \"both\"\n });\n }\n function prev() {\n currentPage.value--;\n }\n function next() {\n currentPage.value++;\n }\n const returnValue = {\n currentPage,\n currentPageSize,\n pageCount,\n isFirstPage,\n isLastPage,\n prev,\n next\n };\n watch(currentPage, () => {\n onPageChange(reactive(returnValue));\n });\n watch(currentPageSize, () => {\n onPageSizeChange(reactive(returnValue));\n });\n watch(pageCount, () => {\n onPageCountChange(reactive(returnValue));\n });\n return returnValue;\n}\n\nfunction useOnline(options = {}) {\n const { isOnline } = useNetwork(options);\n return isOnline;\n}\n\nfunction usePageLeave(options = {}) {\n const { window = defaultWindow } = options;\n const isLeft = shallowRef(false);\n const handler = (event) => {\n if (!window)\n return;\n event = event || window.event;\n const from = event.relatedTarget || event.toElement;\n isLeft.value = !from;\n };\n if (window) {\n const listenerOptions = { passive: true };\n useEventListener(window, \"mouseout\", handler, listenerOptions);\n useEventListener(window.document, \"mouseleave\", handler, listenerOptions);\n useEventListener(window.document, \"mouseenter\", handler, listenerOptions);\n }\n return isLeft;\n}\n\nfunction useScreenOrientation(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"screen\" in window && \"orientation\" in window.screen);\n const screenOrientation = isSupported.value ? window.screen.orientation : {};\n const orientation = ref(screenOrientation.type);\n const angle = shallowRef(screenOrientation.angle || 0);\n if (isSupported.value) {\n useEventListener(window, \"orientationchange\", () => {\n orientation.value = screenOrientation.type;\n angle.value = screenOrientation.angle;\n }, { passive: true });\n }\n const lockOrientation = (type) => {\n if (isSupported.value && typeof screenOrientation.lock === \"function\")\n return screenOrientation.lock(type);\n return Promise.reject(new Error(\"Not supported\"));\n };\n const unlockOrientation = () => {\n if (isSupported.value && typeof screenOrientation.unlock === \"function\")\n screenOrientation.unlock();\n };\n return {\n isSupported,\n orientation,\n angle,\n lockOrientation,\n unlockOrientation\n };\n}\n\nfunction useParallax(target, options = {}) {\n const {\n deviceOrientationTiltAdjust = (i) => i,\n deviceOrientationRollAdjust = (i) => i,\n mouseTiltAdjust = (i) => i,\n mouseRollAdjust = (i) => i,\n window = defaultWindow\n } = options;\n const orientation = reactive(useDeviceOrientation({ window }));\n const screenOrientation = reactive(useScreenOrientation({ window }));\n const {\n elementX: x,\n elementY: y,\n elementWidth: width,\n elementHeight: height\n } = useMouseInElement(target, { handleOutside: false, window });\n const source = computed(() => {\n if (orientation.isSupported && (orientation.alpha != null && orientation.alpha !== 0 || orientation.gamma != null && orientation.gamma !== 0)) {\n return \"deviceOrientation\";\n }\n return \"mouse\";\n });\n const roll = computed(() => {\n if (source.value === \"deviceOrientation\") {\n let value;\n switch (screenOrientation.orientation) {\n case \"landscape-primary\":\n value = orientation.gamma / 90;\n break;\n case \"landscape-secondary\":\n value = -orientation.gamma / 90;\n break;\n case \"portrait-primary\":\n value = -orientation.beta / 90;\n break;\n case \"portrait-secondary\":\n value = orientation.beta / 90;\n break;\n default:\n value = -orientation.beta / 90;\n }\n return deviceOrientationRollAdjust(value);\n } else {\n const value = -(y.value - height.value / 2) / height.value;\n return mouseRollAdjust(value);\n }\n });\n const tilt = computed(() => {\n if (source.value === \"deviceOrientation\") {\n let value;\n switch (screenOrientation.orientation) {\n case \"landscape-primary\":\n value = orientation.beta / 90;\n break;\n case \"landscape-secondary\":\n value = -orientation.beta / 90;\n break;\n case \"portrait-primary\":\n value = orientation.gamma / 90;\n break;\n case \"portrait-secondary\":\n value = -orientation.gamma / 90;\n break;\n default:\n value = orientation.gamma / 90;\n }\n return deviceOrientationTiltAdjust(value);\n } else {\n const value = (x.value - width.value / 2) / width.value;\n return mouseTiltAdjust(value);\n }\n });\n return { roll, tilt, source };\n}\n\nfunction useParentElement(element = useCurrentElement()) {\n const parentElement = shallowRef();\n const update = () => {\n const el = unrefElement(element);\n if (el)\n parentElement.value = el.parentElement;\n };\n tryOnMounted(update);\n watch(() => toValue(element), update);\n return parentElement;\n}\n\nfunction usePerformanceObserver(options, callback) {\n const {\n window = defaultWindow,\n immediate = true,\n ...performanceOptions\n } = options;\n const isSupported = useSupported(() => window && \"PerformanceObserver\" in window);\n let observer;\n const stop = () => {\n observer == null ? void 0 : observer.disconnect();\n };\n const start = () => {\n if (isSupported.value) {\n stop();\n observer = new PerformanceObserver(callback);\n observer.observe(performanceOptions);\n }\n };\n tryOnScopeDispose(stop);\n if (immediate)\n start();\n return {\n isSupported,\n start,\n stop\n };\n}\n\nconst defaultState = {\n x: 0,\n y: 0,\n pointerId: 0,\n pressure: 0,\n tiltX: 0,\n tiltY: 0,\n width: 0,\n height: 0,\n twist: 0,\n pointerType: null\n};\nconst keys = /* @__PURE__ */ Object.keys(defaultState);\nfunction usePointer(options = {}) {\n const {\n target = defaultWindow\n } = options;\n const isInside = shallowRef(false);\n const state = ref(options.initialValue || {});\n Object.assign(state.value, defaultState, state.value);\n const handler = (event) => {\n isInside.value = true;\n if (options.pointerTypes && !options.pointerTypes.includes(event.pointerType))\n return;\n state.value = objectPick(event, keys, false);\n };\n if (target) {\n const listenerOptions = { passive: true };\n useEventListener(target, [\"pointerdown\", \"pointermove\", \"pointerup\"], handler, listenerOptions);\n useEventListener(target, \"pointerleave\", () => isInside.value = false, listenerOptions);\n }\n return {\n ...toRefs(state),\n isInside\n };\n}\n\nfunction usePointerLock(target, options = {}) {\n const { document = defaultDocument } = options;\n const isSupported = useSupported(() => document && \"pointerLockElement\" in document);\n const element = shallowRef();\n const triggerElement = shallowRef();\n let targetElement;\n if (isSupported.value) {\n const listenerOptions = { passive: true };\n useEventListener(document, \"pointerlockchange\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n element.value = document.pointerLockElement;\n if (!element.value)\n targetElement = triggerElement.value = null;\n }\n }, listenerOptions);\n useEventListener(document, \"pointerlockerror\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n const action = document.pointerLockElement ? \"release\" : \"acquire\";\n throw new Error(`Failed to ${action} pointer lock.`);\n }\n }, listenerOptions);\n }\n async function lock(e) {\n var _a;\n if (!isSupported.value)\n throw new Error(\"Pointer Lock API is not supported by your browser.\");\n triggerElement.value = e instanceof Event ? e.currentTarget : null;\n targetElement = e instanceof Event ? (_a = unrefElement(target)) != null ? _a : triggerElement.value : unrefElement(e);\n if (!targetElement)\n throw new Error(\"Target element undefined.\");\n targetElement.requestPointerLock();\n return await until(element).toBe(targetElement);\n }\n async function unlock() {\n if (!element.value)\n return false;\n document.exitPointerLock();\n await until(element).toBeNull();\n return true;\n }\n return {\n isSupported,\n element,\n triggerElement,\n lock,\n unlock\n };\n}\n\nfunction usePointerSwipe(target, options = {}) {\n const targetRef = toRef(target);\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart,\n disableTextSelect = false\n } = options;\n const posStart = reactive({ x: 0, y: 0 });\n const updatePosStart = (x, y) => {\n posStart.x = x;\n posStart.y = y;\n };\n const posEnd = reactive({ x: 0, y: 0 });\n const updatePosEnd = (x, y) => {\n posEnd.x = x;\n posEnd.y = y;\n };\n const distanceX = computed(() => posStart.x - posEnd.x);\n const distanceY = computed(() => posStart.y - posEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(distanceX.value), abs(distanceY.value)) >= threshold);\n const isSwiping = shallowRef(false);\n const isPointerDown = shallowRef(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return \"none\";\n if (abs(distanceX.value) > abs(distanceY.value)) {\n return distanceX.value > 0 ? \"left\" : \"right\";\n } else {\n return distanceY.value > 0 ? \"up\" : \"down\";\n }\n });\n const eventIsAllowed = (e) => {\n var _a, _b, _c;\n const isReleasingButton = e.buttons === 0;\n const isPrimaryButton = e.buttons === 1;\n return (_c = (_b = (_a = options.pointerTypes) == null ? void 0 : _a.includes(e.pointerType)) != null ? _b : isReleasingButton || isPrimaryButton) != null ? _c : true;\n };\n const listenerOptions = { passive: true };\n const stops = [\n useEventListener(target, \"pointerdown\", (e) => {\n if (!eventIsAllowed(e))\n return;\n isPointerDown.value = true;\n const eventTarget = e.target;\n eventTarget == null ? void 0 : eventTarget.setPointerCapture(e.pointerId);\n const { clientX: x, clientY: y } = e;\n updatePosStart(x, y);\n updatePosEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }, listenerOptions),\n useEventListener(target, \"pointermove\", (e) => {\n if (!eventIsAllowed(e))\n return;\n if (!isPointerDown.value)\n return;\n const { clientX: x, clientY: y } = e;\n updatePosEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }, listenerOptions),\n useEventListener(target, \"pointerup\", (e) => {\n if (!eventIsAllowed(e))\n return;\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isPointerDown.value = false;\n isSwiping.value = false;\n }, listenerOptions)\n ];\n tryOnMounted(() => {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"none\");\n if (disableTextSelect) {\n (_d = (_c = targetRef.value) == null ? void 0 : _c.style) == null ? void 0 : _d.setProperty(\"-webkit-user-select\", \"none\");\n (_f = (_e = targetRef.value) == null ? void 0 : _e.style) == null ? void 0 : _f.setProperty(\"-ms-user-select\", \"none\");\n (_h = (_g = targetRef.value) == null ? void 0 : _g.style) == null ? void 0 : _h.setProperty(\"user-select\", \"none\");\n }\n });\n const stop = () => stops.forEach((s) => s());\n return {\n isSwiping: readonly(isSwiping),\n direction: readonly(direction),\n posStart: readonly(posStart),\n posEnd: readonly(posEnd),\n distanceX,\n distanceY,\n stop\n };\n}\n\nfunction usePreferredColorScheme(options) {\n const isLight = useMediaQuery(\"(prefers-color-scheme: light)\", options);\n const isDark = useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n return computed(() => {\n if (isDark.value)\n return \"dark\";\n if (isLight.value)\n return \"light\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredContrast(options) {\n const isMore = useMediaQuery(\"(prefers-contrast: more)\", options);\n const isLess = useMediaQuery(\"(prefers-contrast: less)\", options);\n const isCustom = useMediaQuery(\"(prefers-contrast: custom)\", options);\n return computed(() => {\n if (isMore.value)\n return \"more\";\n if (isLess.value)\n return \"less\";\n if (isCustom.value)\n return \"custom\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredLanguages(options = {}) {\n const { window = defaultWindow } = options;\n if (!window)\n return ref([\"en\"]);\n const navigator = window.navigator;\n const value = ref(navigator.languages);\n useEventListener(window, \"languagechange\", () => {\n value.value = navigator.languages;\n }, { passive: true });\n return value;\n}\n\nfunction usePreferredReducedMotion(options) {\n const isReduced = useMediaQuery(\"(prefers-reduced-motion: reduce)\", options);\n return computed(() => {\n if (isReduced.value)\n return \"reduce\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredReducedTransparency(options) {\n const isReduced = useMediaQuery(\"(prefers-reduced-transparency: reduce)\", options);\n return computed(() => {\n if (isReduced.value)\n return \"reduce\";\n return \"no-preference\";\n });\n}\n\nfunction usePrevious(value, initialValue) {\n const previous = shallowRef(initialValue);\n watch(\n toRef(value),\n (_, oldValue) => {\n previous.value = oldValue;\n },\n { flush: \"sync\" }\n );\n return readonly(previous);\n}\n\nconst topVarName = \"--vueuse-safe-area-top\";\nconst rightVarName = \"--vueuse-safe-area-right\";\nconst bottomVarName = \"--vueuse-safe-area-bottom\";\nconst leftVarName = \"--vueuse-safe-area-left\";\nfunction useScreenSafeArea() {\n const top = shallowRef(\"\");\n const right = shallowRef(\"\");\n const bottom = shallowRef(\"\");\n const left = shallowRef(\"\");\n if (isClient) {\n const topCssVar = useCssVar(topVarName);\n const rightCssVar = useCssVar(rightVarName);\n const bottomCssVar = useCssVar(bottomVarName);\n const leftCssVar = useCssVar(leftVarName);\n topCssVar.value = \"env(safe-area-inset-top, 0px)\";\n rightCssVar.value = \"env(safe-area-inset-right, 0px)\";\n bottomCssVar.value = \"env(safe-area-inset-bottom, 0px)\";\n leftCssVar.value = \"env(safe-area-inset-left, 0px)\";\n update();\n useEventListener(\"resize\", useDebounceFn(update), { passive: true });\n }\n function update() {\n top.value = getValue(topVarName);\n right.value = getValue(rightVarName);\n bottom.value = getValue(bottomVarName);\n left.value = getValue(leftVarName);\n }\n return {\n top,\n right,\n bottom,\n left,\n update\n };\n}\nfunction getValue(position) {\n return getComputedStyle(document.documentElement).getPropertyValue(position);\n}\n\nfunction useScriptTag(src, onLoaded = noop, options = {}) {\n const {\n immediate = true,\n manual = false,\n type = \"text/javascript\",\n async = true,\n crossOrigin,\n referrerPolicy,\n noModule,\n defer,\n document = defaultDocument,\n attrs = {}\n } = options;\n const scriptTag = shallowRef(null);\n let _promise = null;\n const loadScript = (waitForScriptLoad) => new Promise((resolve, reject) => {\n const resolveWithElement = (el2) => {\n scriptTag.value = el2;\n resolve(el2);\n return el2;\n };\n if (!document) {\n resolve(false);\n return;\n }\n let shouldAppend = false;\n let el = document.querySelector(`script[src=\"${toValue(src)}\"]`);\n if (!el) {\n el = document.createElement(\"script\");\n el.type = type;\n el.async = async;\n el.src = toValue(src);\n if (defer)\n el.defer = defer;\n if (crossOrigin)\n el.crossOrigin = crossOrigin;\n if (noModule)\n el.noModule = noModule;\n if (referrerPolicy)\n el.referrerPolicy = referrerPolicy;\n Object.entries(attrs).forEach(([name, value]) => el == null ? void 0 : el.setAttribute(name, value));\n shouldAppend = true;\n } else if (el.hasAttribute(\"data-loaded\")) {\n resolveWithElement(el);\n }\n const listenerOptions = {\n passive: true\n };\n useEventListener(el, \"error\", (event) => reject(event), listenerOptions);\n useEventListener(el, \"abort\", (event) => reject(event), listenerOptions);\n useEventListener(el, \"load\", () => {\n el.setAttribute(\"data-loaded\", \"true\");\n onLoaded(el);\n resolveWithElement(el);\n }, listenerOptions);\n if (shouldAppend)\n el = document.head.appendChild(el);\n if (!waitForScriptLoad)\n resolveWithElement(el);\n });\n const load = (waitForScriptLoad = true) => {\n if (!_promise)\n _promise = loadScript(waitForScriptLoad);\n return _promise;\n };\n const unload = () => {\n if (!document)\n return;\n _promise = null;\n if (scriptTag.value)\n scriptTag.value = null;\n const el = document.querySelector(`script[src=\"${toValue(src)}\"]`);\n if (el)\n document.head.removeChild(el);\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnUnmounted(unload);\n return { scriptTag, load, unload };\n}\n\nfunction checkOverflowScroll(ele) {\n const style = window.getComputedStyle(ele);\n if (style.overflowX === \"scroll\" || style.overflowY === \"scroll\" || style.overflowX === \"auto\" && ele.clientWidth < ele.scrollWidth || style.overflowY === \"auto\" && ele.clientHeight < ele.scrollHeight) {\n return true;\n } else {\n const parent = ele.parentNode;\n if (!parent || parent.tagName === \"BODY\")\n return false;\n return checkOverflowScroll(parent);\n }\n}\nfunction preventDefault(rawEvent) {\n const e = rawEvent || window.event;\n const _target = e.target;\n if (checkOverflowScroll(_target))\n return false;\n if (e.touches.length > 1)\n return true;\n if (e.preventDefault)\n e.preventDefault();\n return false;\n}\nconst elInitialOverflow = /* @__PURE__ */ new WeakMap();\nfunction useScrollLock(element, initialState = false) {\n const isLocked = shallowRef(initialState);\n let stopTouchMoveListener = null;\n let initialOverflow = \"\";\n watch(toRef(element), (el) => {\n const target = resolveElement(toValue(el));\n if (target) {\n const ele = target;\n if (!elInitialOverflow.get(ele))\n elInitialOverflow.set(ele, ele.style.overflow);\n if (ele.style.overflow !== \"hidden\")\n initialOverflow = ele.style.overflow;\n if (ele.style.overflow === \"hidden\")\n return isLocked.value = true;\n if (isLocked.value)\n return ele.style.overflow = \"hidden\";\n }\n }, {\n immediate: true\n });\n const lock = () => {\n const el = resolveElement(toValue(element));\n if (!el || isLocked.value)\n return;\n if (isIOS) {\n stopTouchMoveListener = useEventListener(\n el,\n \"touchmove\",\n (e) => {\n preventDefault(e);\n },\n { passive: false }\n );\n }\n el.style.overflow = \"hidden\";\n isLocked.value = true;\n };\n const unlock = () => {\n const el = resolveElement(toValue(element));\n if (!el || !isLocked.value)\n return;\n if (isIOS)\n stopTouchMoveListener == null ? void 0 : stopTouchMoveListener();\n el.style.overflow = initialOverflow;\n elInitialOverflow.delete(el);\n isLocked.value = false;\n };\n tryOnScopeDispose(unlock);\n return computed({\n get() {\n return isLocked.value;\n },\n set(v) {\n if (v)\n lock();\n else unlock();\n }\n });\n}\n\nfunction useSessionStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.sessionStorage, options);\n}\n\nfunction useShare(shareOptions = {}, options = {}) {\n const { navigator = defaultNavigator } = options;\n const _navigator = navigator;\n const isSupported = useSupported(() => _navigator && \"canShare\" in _navigator);\n const share = async (overrideOptions = {}) => {\n if (isSupported.value) {\n const data = {\n ...toValue(shareOptions),\n ...toValue(overrideOptions)\n };\n let granted = true;\n if (data.files && _navigator.canShare)\n granted = _navigator.canShare({ files: data.files });\n if (granted)\n return _navigator.share(data);\n }\n };\n return {\n isSupported,\n share\n };\n}\n\nconst defaultSortFn = (source, compareFn) => source.sort(compareFn);\nconst defaultCompare = (a, b) => a - b;\nfunction useSorted(...args) {\n var _a, _b, _c, _d;\n const [source] = args;\n let compareFn = defaultCompare;\n let options = {};\n if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n options = args[1];\n compareFn = (_a = options.compareFn) != null ? _a : defaultCompare;\n } else {\n compareFn = (_b = args[1]) != null ? _b : defaultCompare;\n }\n } else if (args.length > 2) {\n compareFn = (_c = args[1]) != null ? _c : defaultCompare;\n options = (_d = args[2]) != null ? _d : {};\n }\n const {\n dirty = false,\n sortFn = defaultSortFn\n } = options;\n if (!dirty)\n return computed(() => sortFn([...toValue(source)], compareFn));\n watchEffect(() => {\n const result = sortFn(toValue(source), compareFn);\n if (isRef(source))\n source.value = result;\n else\n source.splice(0, source.length, ...result);\n });\n return source;\n}\n\nfunction useSpeechRecognition(options = {}) {\n const {\n interimResults = true,\n continuous = true,\n maxAlternatives = 1,\n window = defaultWindow\n } = options;\n const lang = toRef(options.lang || \"en-US\");\n const isListening = shallowRef(false);\n const isFinal = shallowRef(false);\n const result = shallowRef(\"\");\n const error = shallowRef(void 0);\n let recognition;\n const start = () => {\n isListening.value = true;\n };\n const stop = () => {\n isListening.value = false;\n };\n const toggle = (value = !isListening.value) => {\n if (value) {\n start();\n } else {\n stop();\n }\n };\n const SpeechRecognition = window && (window.SpeechRecognition || window.webkitSpeechRecognition);\n const isSupported = useSupported(() => SpeechRecognition);\n if (isSupported.value) {\n recognition = new SpeechRecognition();\n recognition.continuous = continuous;\n recognition.interimResults = interimResults;\n recognition.lang = toValue(lang);\n recognition.maxAlternatives = maxAlternatives;\n recognition.onstart = () => {\n isListening.value = true;\n isFinal.value = false;\n };\n watch(lang, (lang2) => {\n if (recognition && !isListening.value)\n recognition.lang = lang2;\n });\n recognition.onresult = (event) => {\n const currentResult = event.results[event.resultIndex];\n const { transcript } = currentResult[0];\n isFinal.value = currentResult.isFinal;\n result.value = transcript;\n error.value = void 0;\n };\n recognition.onerror = (event) => {\n error.value = event;\n };\n recognition.onend = () => {\n isListening.value = false;\n recognition.lang = toValue(lang);\n };\n watch(isListening, (newValue, oldValue) => {\n if (newValue === oldValue)\n return;\n if (newValue)\n recognition.start();\n else\n recognition.stop();\n });\n }\n tryOnScopeDispose(() => {\n stop();\n });\n return {\n isSupported,\n isListening,\n isFinal,\n recognition,\n result,\n error,\n toggle,\n start,\n stop\n };\n}\n\nfunction useSpeechSynthesis(text, options = {}) {\n const {\n pitch = 1,\n rate = 1,\n volume = 1,\n window = defaultWindow\n } = options;\n const synth = window && window.speechSynthesis;\n const isSupported = useSupported(() => synth);\n const isPlaying = shallowRef(false);\n const status = shallowRef(\"init\");\n const spokenText = toRef(text || \"\");\n const lang = toRef(options.lang || \"en-US\");\n const error = shallowRef(void 0);\n const toggle = (value = !isPlaying.value) => {\n isPlaying.value = value;\n };\n const bindEventsForUtterance = (utterance2) => {\n utterance2.lang = toValue(lang);\n utterance2.voice = toValue(options.voice) || null;\n utterance2.pitch = toValue(pitch);\n utterance2.rate = toValue(rate);\n utterance2.volume = volume;\n utterance2.onstart = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onpause = () => {\n isPlaying.value = false;\n status.value = \"pause\";\n };\n utterance2.onresume = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onend = () => {\n isPlaying.value = false;\n status.value = \"end\";\n };\n utterance2.onerror = (event) => {\n error.value = event;\n };\n };\n const utterance = computed(() => {\n isPlaying.value = false;\n status.value = \"init\";\n const newUtterance = new SpeechSynthesisUtterance(spokenText.value);\n bindEventsForUtterance(newUtterance);\n return newUtterance;\n });\n const speak = () => {\n synth.cancel();\n if (utterance)\n synth.speak(utterance.value);\n };\n const stop = () => {\n synth.cancel();\n isPlaying.value = false;\n };\n if (isSupported.value) {\n bindEventsForUtterance(utterance.value);\n watch(lang, (lang2) => {\n if (utterance.value && !isPlaying.value)\n utterance.value.lang = lang2;\n });\n if (options.voice) {\n watch(options.voice, () => {\n synth.cancel();\n });\n }\n watch(isPlaying, () => {\n if (isPlaying.value)\n synth.resume();\n else\n synth.pause();\n });\n }\n tryOnScopeDispose(() => {\n isPlaying.value = false;\n });\n return {\n isSupported,\n isPlaying,\n status,\n utterance,\n error,\n stop,\n toggle,\n speak\n };\n}\n\nfunction useStepper(steps, initialStep) {\n const stepsRef = ref(steps);\n const stepNames = computed(() => Array.isArray(stepsRef.value) ? stepsRef.value : Object.keys(stepsRef.value));\n const index = ref(stepNames.value.indexOf(initialStep != null ? initialStep : stepNames.value[0]));\n const current = computed(() => at(index.value));\n const isFirst = computed(() => index.value === 0);\n const isLast = computed(() => index.value === stepNames.value.length - 1);\n const next = computed(() => stepNames.value[index.value + 1]);\n const previous = computed(() => stepNames.value[index.value - 1]);\n function at(index2) {\n if (Array.isArray(stepsRef.value))\n return stepsRef.value[index2];\n return stepsRef.value[stepNames.value[index2]];\n }\n function get(step) {\n if (!stepNames.value.includes(step))\n return;\n return at(stepNames.value.indexOf(step));\n }\n function goTo(step) {\n if (stepNames.value.includes(step))\n index.value = stepNames.value.indexOf(step);\n }\n function goToNext() {\n if (isLast.value)\n return;\n index.value++;\n }\n function goToPrevious() {\n if (isFirst.value)\n return;\n index.value--;\n }\n function goBackTo(step) {\n if (isAfter(step))\n goTo(step);\n }\n function isNext(step) {\n return stepNames.value.indexOf(step) === index.value + 1;\n }\n function isPrevious(step) {\n return stepNames.value.indexOf(step) === index.value - 1;\n }\n function isCurrent(step) {\n return stepNames.value.indexOf(step) === index.value;\n }\n function isBefore(step) {\n return index.value < stepNames.value.indexOf(step);\n }\n function isAfter(step) {\n return index.value > stepNames.value.indexOf(step);\n }\n return {\n steps: stepsRef,\n stepNames,\n index,\n current,\n next,\n previous,\n isFirst,\n isLast,\n at,\n get,\n goTo,\n goToNext,\n goToPrevious,\n goBackTo,\n isNext,\n isPrevious,\n isCurrent,\n isBefore,\n isAfter\n };\n}\n\nfunction useStorageAsync(key, initialValue, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const rawInit = toValue(initialValue);\n const type = guessSerializerType(rawInit);\n const data = (shallow ? shallowRef : ref)(toValue(initialValue));\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorageAsync\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n async function read(event) {\n if (!storage || event && event.key !== key)\n return;\n try {\n const rawValue = event ? event.newValue : await storage.getItem(key);\n if (rawValue == null) {\n data.value = rawInit;\n if (writeDefaults && rawInit !== null)\n await storage.setItem(key, await serializer.write(rawInit));\n } else if (mergeDefaults) {\n const value = await serializer.read(rawValue);\n if (typeof mergeDefaults === \"function\")\n data.value = mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n data.value = { ...rawInit, ...value };\n else data.value = value;\n } else {\n data.value = await serializer.read(rawValue);\n }\n } catch (e) {\n onError(e);\n }\n }\n read();\n if (window && listenToStorageChanges)\n useEventListener(window, \"storage\", (e) => Promise.resolve().then(() => read(e)), { passive: true });\n if (storage) {\n watchWithFilter(\n data,\n async () => {\n try {\n if (data.value == null)\n await storage.removeItem(key);\n else\n await storage.setItem(key, await serializer.write(data.value));\n } catch (e) {\n onError(e);\n }\n },\n {\n flush,\n deep,\n eventFilter\n }\n );\n }\n return data;\n}\n\nlet _id = 0;\nfunction useStyleTag(css, options = {}) {\n const isLoaded = shallowRef(false);\n const {\n document = defaultDocument,\n immediate = true,\n manual = false,\n id = `vueuse_styletag_${++_id}`\n } = options;\n const cssRef = shallowRef(css);\n let stop = () => {\n };\n const load = () => {\n if (!document)\n return;\n const el = document.getElementById(id) || document.createElement(\"style\");\n if (!el.isConnected) {\n el.id = id;\n if (options.media)\n el.media = options.media;\n document.head.appendChild(el);\n }\n if (isLoaded.value)\n return;\n stop = watch(\n cssRef,\n (value) => {\n el.textContent = value;\n },\n { immediate: true }\n );\n isLoaded.value = true;\n };\n const unload = () => {\n if (!document || !isLoaded.value)\n return;\n stop();\n document.head.removeChild(document.getElementById(id));\n isLoaded.value = false;\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnScopeDispose(unload);\n return {\n id,\n css: cssRef,\n unload,\n load,\n isLoaded: readonly(isLoaded)\n };\n}\n\nfunction useSwipe(target, options = {}) {\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart,\n passive = true\n } = options;\n const coordsStart = reactive({ x: 0, y: 0 });\n const coordsEnd = reactive({ x: 0, y: 0 });\n const diffX = computed(() => coordsStart.x - coordsEnd.x);\n const diffY = computed(() => coordsStart.y - coordsEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(diffX.value), abs(diffY.value)) >= threshold);\n const isSwiping = shallowRef(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return \"none\";\n if (abs(diffX.value) > abs(diffY.value)) {\n return diffX.value > 0 ? \"left\" : \"right\";\n } else {\n return diffY.value > 0 ? \"up\" : \"down\";\n }\n });\n const getTouchEventCoords = (e) => [e.touches[0].clientX, e.touches[0].clientY];\n const updateCoordsStart = (x, y) => {\n coordsStart.x = x;\n coordsStart.y = y;\n };\n const updateCoordsEnd = (x, y) => {\n coordsEnd.x = x;\n coordsEnd.y = y;\n };\n const listenerOptions = { passive, capture: !passive };\n const onTouchEnd = (e) => {\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isSwiping.value = false;\n };\n const stops = [\n useEventListener(target, \"touchstart\", (e) => {\n if (e.touches.length !== 1)\n return;\n const [x, y] = getTouchEventCoords(e);\n updateCoordsStart(x, y);\n updateCoordsEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }, listenerOptions),\n useEventListener(target, \"touchmove\", (e) => {\n if (e.touches.length !== 1)\n return;\n const [x, y] = getTouchEventCoords(e);\n updateCoordsEnd(x, y);\n if (listenerOptions.capture && !listenerOptions.passive && Math.abs(diffX.value) > Math.abs(diffY.value))\n e.preventDefault();\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }, listenerOptions),\n useEventListener(target, [\"touchend\", \"touchcancel\"], onTouchEnd, listenerOptions)\n ];\n const stop = () => stops.forEach((s) => s());\n return {\n isSwiping,\n direction,\n coordsStart,\n coordsEnd,\n lengthX: diffX,\n lengthY: diffY,\n stop,\n // TODO: Remove in the next major version\n isPassiveEventSupported: true\n };\n}\n\nfunction useTemplateRefsList() {\n const refs = ref([]);\n refs.value.set = (el) => {\n if (el)\n refs.value.push(el);\n };\n onBeforeUpdate(() => {\n refs.value.length = 0;\n });\n return refs;\n}\n\nfunction useTextDirection(options = {}) {\n const {\n document = defaultDocument,\n selector = \"html\",\n observe = false,\n initialValue = \"ltr\"\n } = options;\n function getValue() {\n var _a, _b;\n return (_b = (_a = document == null ? void 0 : document.querySelector(selector)) == null ? void 0 : _a.getAttribute(\"dir\")) != null ? _b : initialValue;\n }\n const dir = ref(getValue());\n tryOnMounted(() => dir.value = getValue());\n if (observe && document) {\n useMutationObserver(\n document.querySelector(selector),\n () => dir.value = getValue(),\n { attributes: true }\n );\n }\n return computed({\n get() {\n return dir.value;\n },\n set(v) {\n var _a, _b;\n dir.value = v;\n if (!document)\n return;\n if (dir.value)\n (_a = document.querySelector(selector)) == null ? void 0 : _a.setAttribute(\"dir\", dir.value);\n else\n (_b = document.querySelector(selector)) == null ? void 0 : _b.removeAttribute(\"dir\");\n }\n });\n}\n\nfunction getRangesFromSelection(selection) {\n var _a;\n const rangeCount = (_a = selection.rangeCount) != null ? _a : 0;\n return Array.from({ length: rangeCount }, (_, i) => selection.getRangeAt(i));\n}\nfunction useTextSelection(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const selection = ref(null);\n const text = computed(() => {\n var _a, _b;\n return (_b = (_a = selection.value) == null ? void 0 : _a.toString()) != null ? _b : \"\";\n });\n const ranges = computed(() => selection.value ? getRangesFromSelection(selection.value) : []);\n const rects = computed(() => ranges.value.map((range) => range.getBoundingClientRect()));\n function onSelectionChange() {\n selection.value = null;\n if (window)\n selection.value = window.getSelection();\n }\n if (window)\n useEventListener(window.document, \"selectionchange\", onSelectionChange, { passive: true });\n return {\n text,\n rects,\n ranges,\n selection\n };\n}\n\nfunction tryRequestAnimationFrame(window = defaultWindow, fn) {\n if (window && typeof window.requestAnimationFrame === \"function\") {\n window.requestAnimationFrame(fn);\n } else {\n fn();\n }\n}\nfunction useTextareaAutosize(options = {}) {\n var _a, _b;\n const { window = defaultWindow } = options;\n const textarea = toRef(options == null ? void 0 : options.element);\n const input = toRef((_a = options == null ? void 0 : options.input) != null ? _a : \"\");\n const styleProp = (_b = options == null ? void 0 : options.styleProp) != null ? _b : \"height\";\n const textareaScrollHeight = shallowRef(1);\n const textareaOldWidth = shallowRef(0);\n function triggerResize() {\n var _a2;\n if (!textarea.value)\n return;\n let height = \"\";\n textarea.value.style[styleProp] = \"1px\";\n textareaScrollHeight.value = (_a2 = textarea.value) == null ? void 0 : _a2.scrollHeight;\n const _styleTarget = toValue(options == null ? void 0 : options.styleTarget);\n if (_styleTarget)\n _styleTarget.style[styleProp] = `${textareaScrollHeight.value}px`;\n else\n height = `${textareaScrollHeight.value}px`;\n textarea.value.style[styleProp] = height;\n }\n watch([input, textarea], () => nextTick(triggerResize), { immediate: true });\n watch(textareaScrollHeight, () => {\n var _a2;\n return (_a2 = options == null ? void 0 : options.onResize) == null ? void 0 : _a2.call(options);\n });\n useResizeObserver(textarea, ([{ contentRect }]) => {\n if (textareaOldWidth.value === contentRect.width)\n return;\n tryRequestAnimationFrame(window, () => {\n textareaOldWidth.value = contentRect.width;\n triggerResize();\n });\n });\n if (options == null ? void 0 : options.watch)\n watch(options.watch, triggerResize, { immediate: true, deep: true });\n return {\n textarea,\n input,\n triggerResize\n };\n}\n\nfunction useThrottledRefHistory(source, options = {}) {\n const { throttle = 200, trailing = true } = options;\n const filter = throttleFilter(throttle, trailing);\n const history = useRefHistory(source, { ...options, eventFilter: filter });\n return {\n ...history\n };\n}\n\nconst DEFAULT_UNITS = [\n { max: 6e4, value: 1e3, name: \"second\" },\n { max: 276e4, value: 6e4, name: \"minute\" },\n { max: 72e6, value: 36e5, name: \"hour\" },\n { max: 5184e5, value: 864e5, name: \"day\" },\n { max: 24192e5, value: 6048e5, name: \"week\" },\n { max: 28512e6, value: 2592e6, name: \"month\" },\n { max: Number.POSITIVE_INFINITY, value: 31536e6, name: \"year\" }\n];\nconst DEFAULT_MESSAGES = {\n justNow: \"just now\",\n past: (n) => n.match(/\\d/) ? `${n} ago` : n,\n future: (n) => n.match(/\\d/) ? `in ${n}` : n,\n month: (n, past) => n === 1 ? past ? \"last month\" : \"next month\" : `${n} month${n > 1 ? \"s\" : \"\"}`,\n year: (n, past) => n === 1 ? past ? \"last year\" : \"next year\" : `${n} year${n > 1 ? \"s\" : \"\"}`,\n day: (n, past) => n === 1 ? past ? \"yesterday\" : \"tomorrow\" : `${n} day${n > 1 ? \"s\" : \"\"}`,\n week: (n, past) => n === 1 ? past ? \"last week\" : \"next week\" : `${n} week${n > 1 ? \"s\" : \"\"}`,\n hour: (n) => `${n} hour${n > 1 ? \"s\" : \"\"}`,\n minute: (n) => `${n} minute${n > 1 ? \"s\" : \"\"}`,\n second: (n) => `${n} second${n > 1 ? \"s\" : \"\"}`,\n invalid: \"\"\n};\nfunction DEFAULT_FORMATTER(date) {\n return date.toISOString().slice(0, 10);\n}\nfunction useTimeAgo(time, options = {}) {\n const {\n controls: exposeControls = false,\n updateInterval = 3e4\n } = options;\n const { now, ...controls } = useNow({ interval: updateInterval, controls: true });\n const timeAgo = computed(() => formatTimeAgo(new Date(toValue(time)), options, toValue(now)));\n if (exposeControls) {\n return {\n timeAgo,\n ...controls\n };\n } else {\n return timeAgo;\n }\n}\nfunction formatTimeAgo(from, options = {}, now = Date.now()) {\n var _a;\n const {\n max,\n messages = DEFAULT_MESSAGES,\n fullDateFormatter = DEFAULT_FORMATTER,\n units = DEFAULT_UNITS,\n showSecond = false,\n rounding = \"round\"\n } = options;\n const roundFn = typeof rounding === \"number\" ? (n) => +n.toFixed(rounding) : Math[rounding];\n const diff = +now - +from;\n const absDiff = Math.abs(diff);\n function getValue(diff2, unit) {\n return roundFn(Math.abs(diff2) / unit.value);\n }\n function format(diff2, unit) {\n const val = getValue(diff2, unit);\n const past = diff2 > 0;\n const str = applyFormat(unit.name, val, past);\n return applyFormat(past ? \"past\" : \"future\", str, past);\n }\n function applyFormat(name, val, isPast) {\n const formatter = messages[name];\n if (typeof formatter === \"function\")\n return formatter(val, isPast);\n return formatter.replace(\"{0}\", val.toString());\n }\n if (absDiff < 6e4 && !showSecond)\n return messages.justNow;\n if (typeof max === \"number\" && absDiff > max)\n return fullDateFormatter(new Date(from));\n if (typeof max === \"string\") {\n const unitMax = (_a = units.find((i) => i.name === max)) == null ? void 0 : _a.max;\n if (unitMax && absDiff > unitMax)\n return fullDateFormatter(new Date(from));\n }\n for (const [idx, unit] of units.entries()) {\n const val = getValue(diff, unit);\n if (val <= 0 && units[idx - 1])\n return format(diff, units[idx - 1]);\n if (absDiff < unit.max)\n return format(diff, unit);\n }\n return messages.invalid;\n}\n\nfunction useTimeoutPoll(fn, interval, options = {}) {\n const {\n immediate = true,\n immediateCallback = false\n } = options;\n const { start } = useTimeoutFn(loop, interval, { immediate });\n const isActive = shallowRef(false);\n async function loop() {\n if (!isActive.value)\n return;\n await fn();\n start();\n }\n function resume() {\n if (!isActive.value) {\n isActive.value = true;\n if (immediateCallback)\n fn();\n start();\n }\n }\n function pause() {\n isActive.value = false;\n }\n if (immediate && isClient)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nfunction useTimestamp(options = {}) {\n const {\n controls: exposeControls = false,\n offset = 0,\n immediate = true,\n interval = \"requestAnimationFrame\",\n callback\n } = options;\n const ts = shallowRef(timestamp() + offset);\n const update = () => ts.value = timestamp() + offset;\n const cb = callback ? () => {\n update();\n callback(ts.value);\n } : update;\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n if (exposeControls) {\n return {\n timestamp: ts,\n ...controls\n };\n } else {\n return ts;\n }\n}\n\nfunction useTitle(newTitle = null, options = {}) {\n var _a, _b, _c;\n const {\n document = defaultDocument,\n restoreOnUnmount = (t) => t\n } = options;\n const originalTitle = (_a = document == null ? void 0 : document.title) != null ? _a : \"\";\n const title = toRef((_b = newTitle != null ? newTitle : document == null ? void 0 : document.title) != null ? _b : null);\n const isReadonly = !!(newTitle && typeof newTitle === \"function\");\n function format(t) {\n if (!(\"titleTemplate\" in options))\n return t;\n const template = options.titleTemplate || \"%s\";\n return typeof template === \"function\" ? template(t) : toValue(template).replace(/%s/g, t);\n }\n watch(\n title,\n (newValue, oldValue) => {\n if (newValue !== oldValue && document)\n document.title = format(newValue != null ? newValue : \"\");\n },\n { immediate: true }\n );\n if (options.observe && !options.titleTemplate && document && !isReadonly) {\n useMutationObserver(\n (_c = document.head) == null ? void 0 : _c.querySelector(\"title\"),\n () => {\n if (document && document.title !== title.value)\n title.value = format(document.title);\n },\n { childList: true }\n );\n }\n tryOnScopeDispose(() => {\n if (restoreOnUnmount) {\n const restoredTitle = restoreOnUnmount(originalTitle, title.value || \"\");\n if (restoredTitle != null && document)\n document.title = restoredTitle;\n }\n });\n return title;\n}\n\nconst _TransitionPresets = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nconst TransitionPresets = /* @__PURE__ */ Object.assign({}, { linear: identity }, _TransitionPresets);\nfunction createEasingFunction([p0, p1, p2, p3]) {\n const a = (a1, a2) => 1 - 3 * a2 + 3 * a1;\n const b = (a1, a2) => 3 * a2 - 6 * a1;\n const c = (a1) => 3 * a1;\n const calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;\n const getSlope = (t, a1, a2) => 3 * a(a1, a2) * t * t + 2 * b(a1, a2) * t + c(a1);\n const getTforX = (x) => {\n let aGuessT = x;\n for (let i = 0; i < 4; ++i) {\n const currentSlope = getSlope(aGuessT, p0, p2);\n if (currentSlope === 0)\n return aGuessT;\n const currentX = calcBezier(aGuessT, p0, p2) - x;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n };\n return (x) => p0 === p1 && p2 === p3 ? x : calcBezier(getTforX(x), p1, p3);\n}\nfunction lerp(a, b, alpha) {\n return a + alpha * (b - a);\n}\nfunction toVec(t) {\n return (typeof t === \"number\" ? [t] : t) || [];\n}\nfunction executeTransition(source, from, to, options = {}) {\n var _a, _b;\n const fromVal = toValue(from);\n const toVal = toValue(to);\n const v1 = toVec(fromVal);\n const v2 = toVec(toVal);\n const duration = (_a = toValue(options.duration)) != null ? _a : 1e3;\n const startedAt = Date.now();\n const endAt = Date.now() + duration;\n const trans = typeof options.transition === \"function\" ? options.transition : (_b = toValue(options.transition)) != null ? _b : identity;\n const ease = typeof trans === \"function\" ? trans : createEasingFunction(trans);\n return new Promise((resolve) => {\n source.value = fromVal;\n const tick = () => {\n var _a2;\n if ((_a2 = options.abort) == null ? void 0 : _a2.call(options)) {\n resolve();\n return;\n }\n const now = Date.now();\n const alpha = ease((now - startedAt) / duration);\n const arr = toVec(source.value).map((n, i) => lerp(v1[i], v2[i], alpha));\n if (Array.isArray(source.value))\n source.value = arr.map((n, i) => {\n var _a3, _b2;\n return lerp((_a3 = v1[i]) != null ? _a3 : 0, (_b2 = v2[i]) != null ? _b2 : 0, alpha);\n });\n else if (typeof source.value === \"number\")\n source.value = arr[0];\n if (now < endAt) {\n requestAnimationFrame(tick);\n } else {\n source.value = toVal;\n resolve();\n }\n };\n tick();\n });\n}\nfunction useTransition(source, options = {}) {\n let currentId = 0;\n const sourceVal = () => {\n const v = toValue(source);\n return typeof v === \"number\" ? v : v.map(toValue);\n };\n const outputRef = ref(sourceVal());\n watch(sourceVal, async (to) => {\n var _a, _b;\n if (toValue(options.disabled))\n return;\n const id = ++currentId;\n if (options.delay)\n await promiseTimeout(toValue(options.delay));\n if (id !== currentId)\n return;\n const toVal = Array.isArray(to) ? to.map(toValue) : toValue(to);\n (_a = options.onStarted) == null ? void 0 : _a.call(options);\n await executeTransition(outputRef, outputRef.value, toVal, {\n ...options,\n abort: () => {\n var _a2;\n return id !== currentId || ((_a2 = options.abort) == null ? void 0 : _a2.call(options));\n }\n });\n (_b = options.onFinished) == null ? void 0 : _b.call(options);\n }, { deep: true });\n watch(() => toValue(options.disabled), (disabled) => {\n if (disabled) {\n currentId++;\n outputRef.value = sourceVal();\n }\n });\n tryOnScopeDispose(() => {\n currentId++;\n });\n return computed(() => toValue(options.disabled) ? sourceVal() : outputRef.value);\n}\n\nfunction useUrlSearchParams(mode = \"history\", options = {}) {\n const {\n initialValue = {},\n removeNullishValues = true,\n removeFalsyValues = false,\n write: enableWrite = true,\n writeMode = \"replace\",\n window = defaultWindow\n } = options;\n if (!window)\n return reactive(initialValue);\n const state = reactive({});\n function getRawParams() {\n if (mode === \"history\") {\n return window.location.search || \"\";\n } else if (mode === \"hash\") {\n const hash = window.location.hash || \"\";\n const index = hash.indexOf(\"?\");\n return index > 0 ? hash.slice(index) : \"\";\n } else {\n return (window.location.hash || \"\").replace(/^#/, \"\");\n }\n }\n function constructQuery(params) {\n const stringified = params.toString();\n if (mode === \"history\")\n return `${stringified ? `?${stringified}` : \"\"}${window.location.hash || \"\"}`;\n if (mode === \"hash-params\")\n return `${window.location.search || \"\"}${stringified ? `#${stringified}` : \"\"}`;\n const hash = window.location.hash || \"#\";\n const index = hash.indexOf(\"?\");\n if (index > 0)\n return `${window.location.search || \"\"}${hash.slice(0, index)}${stringified ? `?${stringified}` : \"\"}`;\n return `${window.location.search || \"\"}${hash}${stringified ? `?${stringified}` : \"\"}`;\n }\n function read() {\n return new URLSearchParams(getRawParams());\n }\n function updateState(params) {\n const unusedKeys = new Set(Object.keys(state));\n for (const key of params.keys()) {\n const paramsForKey = params.getAll(key);\n state[key] = paramsForKey.length > 1 ? paramsForKey : params.get(key) || \"\";\n unusedKeys.delete(key);\n }\n Array.from(unusedKeys).forEach((key) => delete state[key]);\n }\n const { pause, resume } = pausableWatch(\n state,\n () => {\n const params = new URLSearchParams(\"\");\n Object.keys(state).forEach((key) => {\n const mapEntry = state[key];\n if (Array.isArray(mapEntry))\n mapEntry.forEach((value) => params.append(key, value));\n else if (removeNullishValues && mapEntry == null)\n params.delete(key);\n else if (removeFalsyValues && !mapEntry)\n params.delete(key);\n else\n params.set(key, mapEntry);\n });\n write(params, false);\n },\n { deep: true }\n );\n function write(params, shouldUpdate) {\n pause();\n if (shouldUpdate)\n updateState(params);\n if (writeMode === \"replace\") {\n window.history.replaceState(\n window.history.state,\n window.document.title,\n window.location.pathname + constructQuery(params)\n );\n } else {\n window.history.pushState(\n window.history.state,\n window.document.title,\n window.location.pathname + constructQuery(params)\n );\n }\n resume();\n }\n function onChanged() {\n if (!enableWrite)\n return;\n write(read(), true);\n }\n const listenerOptions = { passive: true };\n useEventListener(window, \"popstate\", onChanged, listenerOptions);\n if (mode !== \"history\")\n useEventListener(window, \"hashchange\", onChanged, listenerOptions);\n const initial = read();\n if (initial.keys().next().value)\n updateState(initial);\n else\n Object.assign(state, initialValue);\n return state;\n}\n\nfunction useUserMedia(options = {}) {\n var _a, _b;\n const enabled = shallowRef((_a = options.enabled) != null ? _a : false);\n const autoSwitch = shallowRef((_b = options.autoSwitch) != null ? _b : true);\n const constraints = ref(options.constraints);\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getUserMedia;\n });\n const stream = shallowRef();\n function getDeviceOptions(type) {\n switch (type) {\n case \"video\": {\n if (constraints.value)\n return constraints.value.video || false;\n break;\n }\n case \"audio\": {\n if (constraints.value)\n return constraints.value.audio || false;\n break;\n }\n }\n }\n async function _start() {\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getUserMedia({\n video: getDeviceOptions(\"video\"),\n audio: getDeviceOptions(\"audio\")\n });\n return stream.value;\n }\n function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n async function restart() {\n _stop();\n return await start();\n }\n watch(\n enabled,\n (v) => {\n if (v)\n _start();\n else _stop();\n },\n { immediate: true }\n );\n watch(\n constraints,\n () => {\n if (autoSwitch.value && stream.value)\n restart();\n },\n { immediate: true }\n );\n tryOnScopeDispose(() => {\n stop();\n });\n return {\n isSupported,\n stream,\n start,\n stop,\n restart,\n constraints,\n enabled,\n autoSwitch\n };\n}\n\nfunction useVModel(props, key, emit, options = {}) {\n var _a, _b, _c;\n const {\n clone = false,\n passive = false,\n eventName,\n deep = false,\n defaultValue,\n shouldEmit\n } = options;\n const vm = getCurrentInstance();\n const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));\n let event = eventName;\n if (!key) {\n key = \"modelValue\";\n }\n event = event || `update:${key.toString()}`;\n const cloneFn = (val) => !clone ? val : typeof clone === \"function\" ? clone(val) : cloneFnJSON(val);\n const getValue = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;\n const triggerEmit = (value) => {\n if (shouldEmit) {\n if (shouldEmit(value))\n _emit(event, value);\n } else {\n _emit(event, value);\n }\n };\n if (passive) {\n const initialValue = getValue();\n const proxy = ref(initialValue);\n let isUpdating = false;\n watch(\n () => props[key],\n (v) => {\n if (!isUpdating) {\n isUpdating = true;\n proxy.value = cloneFn(v);\n nextTick(() => isUpdating = false);\n }\n }\n );\n watch(\n proxy,\n (v) => {\n if (!isUpdating && (v !== props[key] || deep))\n triggerEmit(v);\n },\n { deep }\n );\n return proxy;\n } else {\n return computed({\n get() {\n return getValue();\n },\n set(value) {\n triggerEmit(value);\n }\n });\n }\n}\n\nfunction useVModels(props, emit, options = {}) {\n const ret = {};\n for (const key in props) {\n ret[key] = useVModel(\n props,\n key,\n emit,\n options\n );\n }\n return ret;\n}\n\nfunction useVibrate(options) {\n const {\n pattern = [],\n interval = 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => typeof navigator !== \"undefined\" && \"vibrate\" in navigator);\n const patternRef = toRef(pattern);\n let intervalControls;\n const vibrate = (pattern2 = patternRef.value) => {\n if (isSupported.value)\n navigator.vibrate(pattern2);\n };\n const stop = () => {\n if (isSupported.value)\n navigator.vibrate(0);\n intervalControls == null ? void 0 : intervalControls.pause();\n };\n if (interval > 0) {\n intervalControls = useIntervalFn(\n vibrate,\n interval,\n {\n immediate: false,\n immediateCallback: false\n }\n );\n }\n return {\n isSupported,\n pattern,\n intervalControls,\n vibrate,\n stop\n };\n}\n\nfunction useVirtualList(list, options) {\n const { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef } = \"itemHeight\" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list);\n return {\n list: currentList,\n scrollTo,\n containerProps: {\n ref: containerRef,\n onScroll: () => {\n calculateRange();\n },\n style: containerStyle\n },\n wrapperProps\n };\n}\nfunction useVirtualListResources(list) {\n const containerRef = shallowRef(null);\n const size = useElementSize(containerRef);\n const currentList = ref([]);\n const source = shallowRef(list);\n const state = ref({ start: 0, end: 10 });\n return { state, source, currentList, size, containerRef };\n}\nfunction createGetViewCapacity(state, source, itemSize) {\n return (containerSize) => {\n if (typeof itemSize === \"number\")\n return Math.ceil(containerSize / itemSize);\n const { start = 0 } = state.value;\n let sum = 0;\n let capacity = 0;\n for (let i = start; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n capacity = i;\n if (sum > containerSize)\n break;\n }\n return capacity - start;\n };\n}\nfunction createGetOffset(source, itemSize) {\n return (scrollDirection) => {\n if (typeof itemSize === \"number\")\n return Math.floor(scrollDirection / itemSize) + 1;\n let sum = 0;\n let offset = 0;\n for (let i = 0; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n if (sum >= scrollDirection) {\n offset = i;\n break;\n }\n }\n return offset + 1;\n };\n}\nfunction createCalculateRange(type, overscan, getOffset, getViewCapacity, { containerRef, state, currentList, source }) {\n return () => {\n const element = containerRef.value;\n if (element) {\n const offset = getOffset(type === \"vertical\" ? element.scrollTop : element.scrollLeft);\n const viewCapacity = getViewCapacity(type === \"vertical\" ? element.clientHeight : element.clientWidth);\n const from = offset - overscan;\n const to = offset + viewCapacity + overscan;\n state.value = {\n start: from < 0 ? 0 : from,\n end: to > source.value.length ? source.value.length : to\n };\n currentList.value = source.value.slice(state.value.start, state.value.end).map((ele, index) => ({\n data: ele,\n index: index + state.value.start\n }));\n }\n };\n}\nfunction createGetDistance(itemSize, source) {\n return (index) => {\n if (typeof itemSize === \"number\") {\n const size2 = index * itemSize;\n return size2;\n }\n const size = source.value.slice(0, index).reduce((sum, _, i) => sum + itemSize(i), 0);\n return size;\n };\n}\nfunction useWatchForSizes(size, list, containerRef, calculateRange) {\n watch([size.width, size.height, list, containerRef], () => {\n calculateRange();\n });\n}\nfunction createComputedTotalSize(itemSize, source) {\n return computed(() => {\n if (typeof itemSize === \"number\")\n return source.value.length * itemSize;\n return source.value.reduce((sum, _, index) => sum + itemSize(index), 0);\n });\n}\nconst scrollToDictionaryForElementScrollKey = {\n horizontal: \"scrollLeft\",\n vertical: \"scrollTop\"\n};\nfunction createScrollTo(type, calculateRange, getDistance, containerRef) {\n return (index) => {\n if (containerRef.value) {\n containerRef.value[scrollToDictionaryForElementScrollKey[type]] = getDistance(index);\n calculateRange();\n }\n };\n}\nfunction useHorizontalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowX: \"auto\" };\n const { itemWidth, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemWidth);\n const getOffset = createGetOffset(source, itemWidth);\n const calculateRange = createCalculateRange(\"horizontal\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceLeft = createGetDistance(itemWidth, source);\n const offsetLeft = computed(() => getDistanceLeft(state.value.start));\n const totalWidth = createComputedTotalSize(itemWidth, source);\n useWatchForSizes(size, list, containerRef, calculateRange);\n const scrollTo = createScrollTo(\"horizontal\", calculateRange, getDistanceLeft, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n height: \"100%\",\n width: `${totalWidth.value - offsetLeft.value}px`,\n marginLeft: `${offsetLeft.value}px`,\n display: \"flex\"\n }\n };\n });\n return {\n scrollTo,\n calculateRange,\n wrapperProps,\n containerStyle,\n currentList,\n containerRef\n };\n}\nfunction useVerticalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowY: \"auto\" };\n const { itemHeight, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemHeight);\n const getOffset = createGetOffset(source, itemHeight);\n const calculateRange = createCalculateRange(\"vertical\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceTop = createGetDistance(itemHeight, source);\n const offsetTop = computed(() => getDistanceTop(state.value.start));\n const totalHeight = createComputedTotalSize(itemHeight, source);\n useWatchForSizes(size, list, containerRef, calculateRange);\n const scrollTo = createScrollTo(\"vertical\", calculateRange, getDistanceTop, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n width: \"100%\",\n height: `${totalHeight.value - offsetTop.value}px`,\n marginTop: `${offsetTop.value}px`\n }\n };\n });\n return {\n calculateRange,\n scrollTo,\n containerStyle,\n wrapperProps,\n currentList,\n containerRef\n };\n}\n\nfunction useWakeLock(options = {}) {\n const {\n navigator = defaultNavigator,\n document = defaultDocument\n } = options;\n const requestedType = shallowRef(false);\n const sentinel = shallowRef(null);\n const documentVisibility = useDocumentVisibility({ document });\n const isSupported = useSupported(() => navigator && \"wakeLock\" in navigator);\n const isActive = computed(() => !!sentinel.value && documentVisibility.value === \"visible\");\n if (isSupported.value) {\n useEventListener(sentinel, \"release\", () => {\n var _a, _b;\n requestedType.value = (_b = (_a = sentinel.value) == null ? void 0 : _a.type) != null ? _b : false;\n }, { passive: true });\n whenever(\n () => documentVisibility.value === \"visible\" && (document == null ? void 0 : document.visibilityState) === \"visible\" && requestedType.value,\n (type) => {\n requestedType.value = false;\n forceRequest(type);\n }\n );\n }\n async function forceRequest(type) {\n var _a;\n await ((_a = sentinel.value) == null ? void 0 : _a.release());\n sentinel.value = isSupported.value ? await navigator.wakeLock.request(type) : null;\n }\n async function request(type) {\n if (documentVisibility.value === \"visible\")\n await forceRequest(type);\n else\n requestedType.value = type;\n }\n async function release() {\n requestedType.value = false;\n const s = sentinel.value;\n sentinel.value = null;\n await (s == null ? void 0 : s.release());\n }\n return {\n sentinel,\n isSupported,\n isActive,\n request,\n forceRequest,\n release\n };\n}\n\nfunction useWebNotification(options = {}) {\n const {\n window = defaultWindow,\n requestPermissions: _requestForPermissions = true\n } = options;\n const defaultWebNotificationOptions = options;\n const isSupported = useSupported(() => {\n if (!window || !(\"Notification\" in window))\n return false;\n if (Notification.permission === \"granted\")\n return true;\n try {\n const notification2 = new Notification(\"\");\n notification2.onshow = () => {\n notification2.close();\n };\n } catch (e) {\n if (e.name === \"TypeError\")\n return false;\n }\n return true;\n });\n const permissionGranted = shallowRef(isSupported.value && \"permission\" in Notification && Notification.permission === \"granted\");\n const notification = ref(null);\n const ensurePermissions = async () => {\n if (!isSupported.value)\n return;\n if (!permissionGranted.value && Notification.permission !== \"denied\") {\n const result = await Notification.requestPermission();\n if (result === \"granted\")\n permissionGranted.value = true;\n }\n return permissionGranted.value;\n };\n const { on: onClick, trigger: clickTrigger } = createEventHook();\n const { on: onShow, trigger: showTrigger } = createEventHook();\n const { on: onError, trigger: errorTrigger } = createEventHook();\n const { on: onClose, trigger: closeTrigger } = createEventHook();\n const show = async (overrides) => {\n if (!isSupported.value || !permissionGranted.value)\n return;\n const options2 = Object.assign({}, defaultWebNotificationOptions, overrides);\n notification.value = new Notification(options2.title || \"\", options2);\n notification.value.onclick = clickTrigger;\n notification.value.onshow = showTrigger;\n notification.value.onerror = errorTrigger;\n notification.value.onclose = closeTrigger;\n return notification.value;\n };\n const close = () => {\n if (notification.value)\n notification.value.close();\n notification.value = null;\n };\n if (_requestForPermissions)\n tryOnMounted(ensurePermissions);\n tryOnScopeDispose(close);\n if (isSupported.value && window) {\n const document = window.document;\n useEventListener(document, \"visibilitychange\", (e) => {\n e.preventDefault();\n if (document.visibilityState === \"visible\") {\n close();\n }\n });\n }\n return {\n isSupported,\n notification,\n ensurePermissions,\n permissionGranted,\n show,\n close,\n onClick,\n onShow,\n onError,\n onClose\n };\n}\n\nconst DEFAULT_PING_MESSAGE = \"ping\";\nfunction resolveNestedOptions(options) {\n if (options === true)\n return {};\n return options;\n}\nfunction useWebSocket(url, options = {}) {\n const {\n onConnected,\n onDisconnected,\n onError,\n onMessage,\n immediate = true,\n autoConnect = true,\n autoClose = true,\n protocols = []\n } = options;\n const data = ref(null);\n const status = shallowRef(\"CLOSED\");\n const wsRef = ref();\n const urlRef = toRef(url);\n let heartbeatPause;\n let heartbeatResume;\n let explicitlyClosed = false;\n let retried = 0;\n let bufferedData = [];\n let retryTimeout;\n let pongTimeoutWait;\n const _sendBuffer = () => {\n if (bufferedData.length && wsRef.value && status.value === \"OPEN\") {\n for (const buffer of bufferedData)\n wsRef.value.send(buffer);\n bufferedData = [];\n }\n };\n const resetRetry = () => {\n if (retryTimeout != null) {\n clearTimeout(retryTimeout);\n retryTimeout = void 0;\n }\n };\n const resetHeartbeat = () => {\n clearTimeout(pongTimeoutWait);\n pongTimeoutWait = void 0;\n };\n const close = (code = 1e3, reason) => {\n resetRetry();\n if (!isClient && !isWorker || !wsRef.value)\n return;\n explicitlyClosed = true;\n resetHeartbeat();\n heartbeatPause == null ? void 0 : heartbeatPause();\n wsRef.value.close(code, reason);\n wsRef.value = void 0;\n };\n const send = (data2, useBuffer = true) => {\n if (!wsRef.value || status.value !== \"OPEN\") {\n if (useBuffer)\n bufferedData.push(data2);\n return false;\n }\n _sendBuffer();\n wsRef.value.send(data2);\n return true;\n };\n const _init = () => {\n if (explicitlyClosed || typeof urlRef.value === \"undefined\")\n return;\n const ws = new WebSocket(urlRef.value, protocols);\n wsRef.value = ws;\n status.value = \"CONNECTING\";\n ws.onopen = () => {\n status.value = \"OPEN\";\n retried = 0;\n onConnected == null ? void 0 : onConnected(ws);\n heartbeatResume == null ? void 0 : heartbeatResume();\n _sendBuffer();\n };\n ws.onclose = (ev) => {\n status.value = \"CLOSED\";\n resetHeartbeat();\n heartbeatPause == null ? void 0 : heartbeatPause();\n onDisconnected == null ? void 0 : onDisconnected(ws, ev);\n if (!explicitlyClosed && options.autoReconnect && (wsRef.value == null || ws === wsRef.value)) {\n const {\n retries = -1,\n delay = 1e3,\n onFailed\n } = resolveNestedOptions(options.autoReconnect);\n const checkRetires = typeof retries === \"function\" ? retries : () => typeof retries === \"number\" && (retries < 0 || retried < retries);\n if (checkRetires(retried)) {\n retried += 1;\n retryTimeout = setTimeout(_init, delay);\n } else {\n onFailed == null ? void 0 : onFailed();\n }\n }\n };\n ws.onerror = (e) => {\n onError == null ? void 0 : onError(ws, e);\n };\n ws.onmessage = (e) => {\n if (options.heartbeat) {\n resetHeartbeat();\n const {\n message = DEFAULT_PING_MESSAGE,\n responseMessage = message\n } = resolveNestedOptions(options.heartbeat);\n if (e.data === toValue(responseMessage))\n return;\n }\n data.value = e.data;\n onMessage == null ? void 0 : onMessage(ws, e);\n };\n };\n if (options.heartbeat) {\n const {\n message = DEFAULT_PING_MESSAGE,\n interval = 1e3,\n pongTimeout = 1e3\n } = resolveNestedOptions(options.heartbeat);\n const { pause, resume } = useIntervalFn(\n () => {\n send(toValue(message), false);\n if (pongTimeoutWait != null)\n return;\n pongTimeoutWait = setTimeout(() => {\n close();\n explicitlyClosed = false;\n }, pongTimeout);\n },\n interval,\n { immediate: false }\n );\n heartbeatPause = pause;\n heartbeatResume = resume;\n }\n if (autoClose) {\n if (isClient)\n useEventListener(\"beforeunload\", () => close(), { passive: true });\n tryOnScopeDispose(close);\n }\n const open = () => {\n if (!isClient && !isWorker)\n return;\n close();\n explicitlyClosed = false;\n retried = 0;\n _init();\n };\n if (immediate)\n open();\n if (autoConnect)\n watch(urlRef, open);\n return {\n data,\n status,\n close,\n send,\n open,\n ws: wsRef\n };\n}\n\nfunction useWebWorker(arg0, workerOptions, options) {\n const {\n window = defaultWindow\n } = options != null ? options : {};\n const data = ref(null);\n const worker = shallowRef();\n const post = (...args) => {\n if (!worker.value)\n return;\n worker.value.postMessage(...args);\n };\n const terminate = function terminate2() {\n if (!worker.value)\n return;\n worker.value.terminate();\n };\n if (window) {\n if (typeof arg0 === \"string\")\n worker.value = new Worker(arg0, workerOptions);\n else if (typeof arg0 === \"function\")\n worker.value = arg0();\n else\n worker.value = arg0;\n worker.value.onmessage = (e) => {\n data.value = e.data;\n };\n tryOnScopeDispose(() => {\n if (worker.value)\n worker.value.terminate();\n });\n }\n return {\n data,\n post,\n terminate,\n worker\n };\n}\n\nfunction depsParser(deps, localDeps) {\n if (deps.length === 0 && localDeps.length === 0)\n return \"\";\n const depsString = deps.map((dep) => `'${dep}'`).toString();\n const depsFunctionString = localDeps.filter((dep) => typeof dep === \"function\").map((fn) => {\n const str = fn.toString();\n if (str.trim().startsWith(\"function\")) {\n return str;\n } else {\n const name = fn.name;\n return `const ${name} = ${str}`;\n }\n }).join(\";\");\n const importString = `importScripts(${depsString});`;\n return `${depsString.trim() === \"\" ? \"\" : importString} ${depsFunctionString}`;\n}\n\nfunction jobRunner(userFunc) {\n return (e) => {\n const userFuncArgs = e.data[0];\n return Promise.resolve(userFunc.apply(void 0, userFuncArgs)).then((result) => {\n postMessage([\"SUCCESS\", result]);\n }).catch((error) => {\n postMessage([\"ERROR\", error]);\n });\n };\n}\n\nfunction createWorkerBlobUrl(fn, deps, localDeps) {\n const blobCode = `${depsParser(deps, localDeps)}; onmessage=(${jobRunner})(${fn})`;\n const blob = new Blob([blobCode], { type: \"text/javascript\" });\n const url = URL.createObjectURL(blob);\n return url;\n}\n\nfunction useWebWorkerFn(fn, options = {}) {\n const {\n dependencies = [],\n localDependencies = [],\n timeout,\n window = defaultWindow\n } = options;\n const worker = ref();\n const workerStatus = shallowRef(\"PENDING\");\n const promise = ref({});\n const timeoutId = shallowRef();\n const workerTerminate = (status = \"PENDING\") => {\n if (worker.value && worker.value._url && window) {\n worker.value.terminate();\n URL.revokeObjectURL(worker.value._url);\n promise.value = {};\n worker.value = void 0;\n window.clearTimeout(timeoutId.value);\n workerStatus.value = status;\n }\n };\n workerTerminate();\n tryOnScopeDispose(workerTerminate);\n const generateWorker = () => {\n const blobUrl = createWorkerBlobUrl(fn, dependencies, localDependencies);\n const newWorker = new Worker(blobUrl);\n newWorker._url = blobUrl;\n newWorker.onmessage = (e) => {\n const { resolve = () => {\n }, reject = () => {\n } } = promise.value;\n const [status, result] = e.data;\n switch (status) {\n case \"SUCCESS\":\n resolve(result);\n workerTerminate(status);\n break;\n default:\n reject(result);\n workerTerminate(\"ERROR\");\n break;\n }\n };\n newWorker.onerror = (e) => {\n const { reject = () => {\n } } = promise.value;\n e.preventDefault();\n reject(e);\n workerTerminate(\"ERROR\");\n };\n if (timeout) {\n timeoutId.value = setTimeout(\n () => workerTerminate(\"TIMEOUT_EXPIRED\"),\n timeout\n );\n }\n return newWorker;\n };\n const callWorker = (...fnArgs) => new Promise((resolve, reject) => {\n var _a;\n promise.value = {\n resolve,\n reject\n };\n (_a = worker.value) == null ? void 0 : _a.postMessage([[...fnArgs]]);\n workerStatus.value = \"RUNNING\";\n });\n const workerFn = (...fnArgs) => {\n if (workerStatus.value === \"RUNNING\") {\n console.error(\n \"[useWebWorkerFn] You can only run one instance of the worker at a time.\"\n );\n return Promise.reject();\n }\n worker.value = generateWorker();\n return callWorker(...fnArgs);\n };\n return {\n workerFn,\n workerStatus,\n workerTerminate\n };\n}\n\nfunction useWindowFocus(options = {}) {\n const { window = defaultWindow } = options;\n if (!window)\n return shallowRef(false);\n const focused = shallowRef(window.document.hasFocus());\n const listenerOptions = { passive: true };\n useEventListener(window, \"blur\", () => {\n focused.value = false;\n }, listenerOptions);\n useEventListener(window, \"focus\", () => {\n focused.value = true;\n }, listenerOptions);\n return focused;\n}\n\nfunction useWindowScroll(options = {}) {\n const { window = defaultWindow, ...rest } = options;\n return useScroll(window, rest);\n}\n\nfunction useWindowSize(options = {}) {\n const {\n window = defaultWindow,\n initialWidth = Number.POSITIVE_INFINITY,\n initialHeight = Number.POSITIVE_INFINITY,\n listenOrientation = true,\n includeScrollbar = true,\n type = \"inner\"\n } = options;\n const width = shallowRef(initialWidth);\n const height = shallowRef(initialHeight);\n const update = () => {\n if (window) {\n if (type === \"outer\") {\n width.value = window.outerWidth;\n height.value = window.outerHeight;\n } else if (type === \"visual\" && window.visualViewport) {\n const { width: visualViewportWidth, height: visualViewportHeight, scale } = window.visualViewport;\n width.value = Math.round(visualViewportWidth * scale);\n height.value = Math.round(visualViewportHeight * scale);\n } else if (includeScrollbar) {\n width.value = window.innerWidth;\n height.value = window.innerHeight;\n } else {\n width.value = window.document.documentElement.clientWidth;\n height.value = window.document.documentElement.clientHeight;\n }\n }\n };\n update();\n tryOnMounted(update);\n const listenerOptions = { passive: true };\n useEventListener(\"resize\", update, listenerOptions);\n if (window && type === \"visual\" && window.visualViewport) {\n useEventListener(window.visualViewport, \"resize\", update, listenerOptions);\n }\n if (listenOrientation) {\n const matches = useMediaQuery(\"(orientation: portrait)\");\n watch(matches, () => update());\n }\n return { width, height };\n}\n\nexport { DefaultMagicKeysAliasMap, StorageSerializers, TransitionPresets, computedAsync as asyncComputed, breakpointsAntDesign, breakpointsBootstrapV5, breakpointsElement, breakpointsMasterCss, breakpointsPrimeFlex, breakpointsQuasar, breakpointsSematic, breakpointsTailwind, breakpointsVuetify, breakpointsVuetifyV2, breakpointsVuetifyV3, cloneFnJSON, computedAsync, computedInject, createFetch, createReusableTemplate, createTemplatePromise, createUnrefFn, customStorageEventName, defaultDocument, defaultLocation, defaultNavigator, defaultWindow, executeTransition, formatTimeAgo, getSSRHandler, mapGamepadToXbox360Controller, onClickOutside, onElementRemoval, onKeyDown, onKeyPressed, onKeyStroke, onKeyUp, onLongPress, onStartTyping, provideSSRWidth, setSSRHandler, templateRef, unrefElement, useActiveElement, useAnimate, useAsyncQueue, useAsyncState, useBase64, useBattery, useBluetooth, useBreakpoints, useBroadcastChannel, useBrowserLocation, useCached, useClipboard, useClipboardItems, useCloned, useColorMode, useConfirmDialog, useCountdown, useCssVar, useCurrentElement, useCycleList, useDark, useDebouncedRefHistory, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDisplayMedia, useDocumentVisibility, useDraggable, useDropZone, useElementBounding, useElementByPoint, useElementHover, useElementSize, useElementVisibility, useEventBus, useEventListener, useEventSource, useEyeDropper, useFavicon, useFetch, useFileDialog, useFileSystemAccess, useFocus, useFocusWithin, useFps, useFullscreen, useGamepad, useGeolocation, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useKeyModifier, useLocalStorage, useMagicKeys, useManualRefHistory, useMediaControls, useMediaQuery, useMemoize, useMemory, useMounted, useMouse, useMouseInElement, useMousePressed, useMutationObserver, useNavigatorLanguage, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, useParallax, useParentElement, usePerformanceObserver, usePermission, usePointer, usePointerLock, usePointerSwipe, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, usePreferredReducedTransparency, usePrevious, useRafFn, useRefHistory, useResizeObserver, useSSRWidth, useScreenOrientation, useScreenSafeArea, useScriptTag, useScroll, useScrollLock, useSessionStorage, useShare, useSorted, useSpeechRecognition, useSpeechSynthesis, useStepper, useStorage, useStorageAsync, useStyleTag, useSupported, useSwipe, useTemplateRefsList, useTextDirection, useTextSelection, useTextareaAutosize, useThrottledRefHistory, useTimeAgo, useTimeoutPoll, useTimestamp, useTitle, useTransition, useUrlSearchParams, useUserMedia, useVModel, useVModels, useVibrate, useVirtualList, useWakeLock, useWebNotification, useWebSocket, useWebWorker, useWebWorkerFn, useWindowFocus, useWindowScroll, useWindowSize };\n","function isNullish(value) {\n return value === null || value === undefined;\n}\n\nexport { isNullish as i };\n//# sourceMappingURL=nullish.js.map\n","import { isEqual } from 'ohash';\nimport { i as isNullish } from './nullish.js';\n\nfunction isValueEqualOrExist(base, current) {\n if (isNullish(base))\n return false;\n if (Array.isArray(base)) {\n return base.some((val) => isEqual(val, current));\n } else {\n return isEqual(base, current);\n }\n}\n\nexport { isValueEqualOrExist as i };\n//# sourceMappingURL=isValueEqualOrExist.js.map\n","import { inject, provide } from 'vue';\n\nfunction createContext(providerComponentName, contextName) {\n const symbolDescription = typeof providerComponentName === \"string\" && !contextName ? `${providerComponentName}Context` : contextName;\n const injectionKey = Symbol(symbolDescription);\n const injectContext = (fallback) => {\n const context = inject(injectionKey, fallback);\n if (context)\n return context;\n if (context === null)\n return context;\n throw new Error(\n `Injection \\`${injectionKey.toString()}\\` not found. Component must be used within ${Array.isArray(providerComponentName) ? `one of the following components: ${providerComponentName.join(\n \", \"\n )}` : `\\`${providerComponentName}\\``}`\n );\n };\n const provideContext = (contextValue) => {\n provide(injectionKey, contextValue);\n return contextValue;\n };\n return [injectContext, provideContext];\n}\n\nexport { createContext as c };\n//# sourceMappingURL=createContext.js.map\n","import { defineComponent, toRefs, renderSlot } from 'vue';\nimport { c as createContext } from '../shared/createContext.js';\n\nconst [injectConfigProviderContext, provideConfigProviderContext] = createContext(\"ConfigProvider\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n ...{\n inheritAttrs: false\n },\n __name: \"ConfigProvider\",\n props: {\n dir: { default: \"ltr\" },\n locale: { default: \"en\" },\n scrollBody: { type: [Boolean, Object], default: true },\n nonce: { default: undefined },\n useId: { type: Function, default: undefined }\n },\n setup(__props) {\n const props = __props;\n const { dir, locale, scrollBody, nonce } = toRefs(props);\n provideConfigProviderContext({\n dir,\n locale,\n scrollBody,\n nonce,\n useId: props.useId\n });\n return (_ctx, _cache) => {\n return renderSlot(_ctx.$slots, \"default\");\n };\n }\n});\n\nexport { _sfc_main as _, injectConfigProviderContext as i };\n//# sourceMappingURL=ConfigProvider.js.map\n","import { ref, computed } from 'vue';\nimport { i as injectConfigProviderContext } from '../ConfigProvider/ConfigProvider.js';\n\nfunction useDirection(dir) {\n const context = injectConfigProviderContext({\n dir: ref(\"ltr\")\n });\n return computed(() => dir?.value || context.dir?.value || \"ltr\");\n}\n\nexport { useDirection as u };\n//# sourceMappingURL=useDirection.js.map\n","import { unrefElement } from '@vueuse/core';\nimport { getCurrentInstance, ref, computed } from 'vue';\n\nfunction useForwardExpose() {\n const instance = getCurrentInstance();\n const currentRef = ref();\n const currentElement = computed(() => {\n return [\"#text\", \"#comment\"].includes(currentRef.value?.$el.nodeName) ? currentRef.value?.$el.nextElementSibling : unrefElement(currentRef);\n });\n const localExpose = Object.assign({}, instance.exposed);\n const ret = {};\n for (const key in instance.props) {\n Object.defineProperty(ret, key, {\n enumerable: true,\n configurable: true,\n get: () => instance.props[key]\n });\n }\n if (Object.keys(localExpose).length > 0) {\n for (const key in localExpose) {\n Object.defineProperty(ret, key, {\n enumerable: true,\n configurable: true,\n get: () => localExpose[key]\n });\n }\n }\n Object.defineProperty(ret, \"$el\", {\n enumerable: true,\n configurable: true,\n get: () => instance.vnode.el\n });\n instance.exposed = ret;\n function forwardRef(ref2) {\n currentRef.value = ref2;\n if (!ref2)\n return;\n Object.defineProperty(ret, \"$el\", {\n enumerable: true,\n configurable: true,\n get: () => ref2 instanceof Element ? ref2 : ref2.$el\n });\n instance.exposed = ret;\n }\n return { forwardRef, currentRef, currentElement };\n}\n\nexport { useForwardExpose as u };\n//# sourceMappingURL=useForwardExpose.js.map\n","import { defineComponent, toRefs, openBlock, createBlock, unref, withCtx, renderSlot } from 'vue';\nimport { useVModel } from '@vueuse/core';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { c as createContext } from '../shared/createContext.js';\n\nconst [injectCollapsibleRootContext, provideCollapsibleRootContext] = createContext(\"CollapsibleRoot\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"CollapsibleRoot\",\n props: {\n defaultOpen: { type: Boolean, default: false },\n open: { type: Boolean, default: undefined },\n disabled: { type: Boolean },\n unmountOnHide: { type: Boolean, default: true },\n asChild: { type: Boolean },\n as: {}\n },\n emits: [\"update:open\"],\n setup(__props, { expose: __expose, emit: __emit }) {\n const props = __props;\n const emit = __emit;\n const open = useVModel(props, \"open\", emit, {\n defaultValue: props.defaultOpen,\n passive: props.open === undefined\n });\n const { disabled, unmountOnHide } = toRefs(props);\n provideCollapsibleRootContext({\n contentId: \"\",\n disabled,\n open,\n unmountOnHide,\n onOpenToggle: () => {\n open.value = !open.value;\n }\n });\n __expose({ open });\n useForwardExpose();\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), {\n as: _ctx.as,\n \"as-child\": props.asChild,\n \"data-state\": unref(open) ? \"open\" : \"closed\",\n \"data-disabled\": unref(disabled) ? \"\" : undefined\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", { open: unref(open) })\n ]),\n _: 3\n }, 8, [\"as\", \"as-child\", \"data-state\", \"data-disabled\"]);\n };\n }\n});\n\nexport { _sfc_main as _, injectCollapsibleRootContext as i };\n//# sourceMappingURL=CollapsibleRoot.js.map\n","const ignoredElement = [\"INPUT\", \"TEXTAREA\"];\nfunction useArrowNavigation(e, currentElement, parentElement, options = {}) {\n if (!currentElement || options.enableIgnoredElement && ignoredElement.includes(currentElement.nodeName))\n return null;\n const {\n arrowKeyOptions = \"both\",\n attributeName = \"[data-reka-collection-item]\",\n itemsArray = [],\n loop = true,\n dir = \"ltr\",\n preventScroll = true,\n focus = false\n } = options;\n const [right, left, up, down, home, end] = [\n e.key === \"ArrowRight\",\n e.key === \"ArrowLeft\",\n e.key === \"ArrowUp\",\n e.key === \"ArrowDown\",\n e.key === \"Home\",\n e.key === \"End\"\n ];\n const goingVertical = up || down;\n const goingHorizontal = right || left;\n if (!home && !end && (!goingVertical && !goingHorizontal || arrowKeyOptions === \"vertical\" && goingHorizontal || arrowKeyOptions === \"horizontal\" && goingVertical)) {\n return null;\n }\n const allCollectionItems = parentElement ? Array.from(parentElement.querySelectorAll(attributeName)) : itemsArray;\n if (!allCollectionItems.length)\n return null;\n if (preventScroll)\n e.preventDefault();\n let item = null;\n if (goingHorizontal || goingVertical) {\n const goForward = goingVertical ? down : dir === \"ltr\" ? right : left;\n item = findNextFocusableElement(allCollectionItems, currentElement, {\n goForward,\n loop\n });\n } else if (home) {\n item = allCollectionItems.at(0) || null;\n } else if (end) {\n item = allCollectionItems.at(-1) || null;\n }\n if (focus)\n item?.focus();\n return item;\n}\nfunction findNextFocusableElement(elements, currentElement, options, iterations = elements.length) {\n if (--iterations === 0)\n return null;\n const index = elements.indexOf(currentElement);\n const newIndex = options.goForward ? index + 1 : index - 1;\n if (!options.loop && (newIndex < 0 || newIndex >= elements.length))\n return null;\n const adjustedNewIndex = (newIndex + elements.length) % elements.length;\n const candidate = elements[adjustedNewIndex];\n if (!candidate)\n return null;\n const isDisabled = candidate.hasAttribute(\"disabled\") && candidate.getAttribute(\"disabled\") !== \"false\";\n if (isDisabled) {\n return findNextFocusableElement(\n elements,\n candidate,\n options,\n iterations\n );\n }\n return candidate;\n}\n\nexport { useArrowNavigation as u };\n//# sourceMappingURL=useArrowNavigation.js.map\n","import * as vue from 'vue';\nimport { i as injectConfigProviderContext } from '../ConfigProvider/ConfigProvider.js';\n\nlet count = 0;\nfunction useId(deterministicId, prefix = \"reka\") {\n if (deterministicId)\n return deterministicId;\n const configProviderContext = injectConfigProviderContext({ useId: undefined });\n if (vue.useId) {\n return `${prefix}-${vue.useId()}`;\n } else if (configProviderContext.useId) {\n return `${prefix}-${configProviderContext.useId()}`;\n }\n return `${prefix}-${++count}`;\n}\n\nexport { useId as u };\n//# sourceMappingURL=useId.js.map\n","import { ref } from 'vue';\n\nfunction useStateMachine(initialState, machine) {\n const state = ref(initialState);\n function reducer(event) {\n const nextState = machine[state.value][event];\n return nextState ?? state.value;\n }\n const dispatch = (event) => {\n state.value = reducer(event);\n };\n return {\n state,\n dispatch\n };\n}\n\nexport { useStateMachine as u };\n//# sourceMappingURL=useStateMachine.js.map\n","import { ref, watch, nextTick, onUnmounted, computed } from 'vue';\nimport { isClient } from '@vueuse/shared';\nimport { defaultWindow } from '@vueuse/core';\nimport { u as useStateMachine } from '../shared/useStateMachine.js';\n\nfunction usePresence(present, node) {\n const stylesRef = ref({});\n const prevAnimationNameRef = ref(\"none\");\n const prevPresentRef = ref(present);\n const initialState = present.value ? \"mounted\" : \"unmounted\";\n let timeoutId;\n const ownerWindow = node.value?.ownerDocument.defaultView ?? defaultWindow;\n const { state, dispatch } = useStateMachine(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 const dispatchCustomEvent = (name) => {\n if (isClient) {\n const customEvent = new CustomEvent(name, { bubbles: false, cancelable: false });\n node.value?.dispatchEvent(customEvent);\n }\n };\n watch(\n present,\n async (currentPresent, prevPresent) => {\n const hasPresentChanged = prevPresent !== currentPresent;\n await nextTick();\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.value;\n const currentAnimationName = getAnimationName(node.value);\n if (currentPresent) {\n dispatch(\"MOUNT\");\n dispatchCustomEvent(\"enter\");\n if (currentAnimationName === \"none\")\n dispatchCustomEvent(\"after-enter\");\n } else if (currentAnimationName === \"none\" || stylesRef.value?.display === \"none\") {\n dispatch(\"UNMOUNT\");\n dispatchCustomEvent(\"leave\");\n dispatchCustomEvent(\"after-leave\");\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (prevPresent && isAnimating) {\n dispatch(\"ANIMATION_OUT\");\n dispatchCustomEvent(\"leave\");\n } else {\n dispatch(\"UNMOUNT\");\n dispatchCustomEvent(\"after-leave\");\n }\n }\n }\n },\n { immediate: true }\n );\n const handleAnimationEnd = (event) => {\n const currentAnimationName = getAnimationName(node.value);\n const isCurrentAnimation = currentAnimationName.includes(\n event.animationName\n );\n const directionName = state.value === \"mounted\" ? \"enter\" : \"leave\";\n if (event.target === node.value && isCurrentAnimation) {\n dispatchCustomEvent(`after-${directionName}`);\n dispatch(\"ANIMATION_END\");\n if (!prevPresentRef.value) {\n const currentFillMode = node.value.style.animationFillMode;\n node.value.style.animationFillMode = \"forwards\";\n timeoutId = ownerWindow?.setTimeout(() => {\n if (node.value?.style.animationFillMode === \"forwards\") {\n node.value.style.animationFillMode = currentFillMode;\n }\n });\n }\n }\n if (event.target === node.value && currentAnimationName === \"none\")\n dispatch(\"ANIMATION_END\");\n };\n const handleAnimationStart = (event) => {\n if (event.target === node.value) {\n prevAnimationNameRef.value = getAnimationName(node.value);\n }\n };\n const watcher = watch(\n node,\n (newNode, oldNode) => {\n if (newNode) {\n stylesRef.value = getComputedStyle(newNode);\n newNode.addEventListener(\"animationstart\", handleAnimationStart);\n newNode.addEventListener(\"animationcancel\", handleAnimationEnd);\n newNode.addEventListener(\"animationend\", handleAnimationEnd);\n } else {\n dispatch(\"ANIMATION_END\");\n if (timeoutId !== undefined)\n ownerWindow?.clearTimeout(timeoutId);\n oldNode?.removeEventListener(\"animationstart\", handleAnimationStart);\n oldNode?.removeEventListener(\"animationcancel\", handleAnimationEnd);\n oldNode?.removeEventListener(\"animationend\", handleAnimationEnd);\n }\n },\n { immediate: true }\n );\n const stateWatcher = watch(state, () => {\n const currentAnimationName = getAnimationName(node.value);\n prevAnimationNameRef.value = state.value === \"mounted\" ? currentAnimationName : \"none\";\n });\n onUnmounted(() => {\n watcher();\n stateWatcher();\n });\n const isPresent = computed(\n () => [\"mounted\", \"unmountSuspended\"].includes(state.value)\n );\n return {\n isPresent\n };\n}\nfunction getAnimationName(node) {\n return node ? getComputedStyle(node).animationName || \"none\" : \"none\";\n}\n\nexport { usePresence as u };\n//# sourceMappingURL=usePresence.js.map\n","import { defineComponent, toRefs, ref, getCurrentInstance, h } from 'vue';\nimport { u as usePresence } from './usePresence.js';\nimport { unrefElement } from '@vueuse/core';\nimport { r as renderSlotFragments } from '../shared/renderSlotFragments.js';\n\nconst Presence = defineComponent({\n name: \"Presence\",\n props: {\n present: {\n type: Boolean,\n required: true\n },\n forceMount: {\n type: Boolean\n }\n },\n slots: {},\n setup(props, { slots, expose }) {\n const { present, forceMount } = toRefs(props);\n const node = ref();\n const { isPresent } = usePresence(present, node);\n expose({ present: isPresent });\n let children = slots.default({ present: isPresent.value });\n children = renderSlotFragments(children || []);\n const instance = getCurrentInstance();\n if (children && children?.length > 1) {\n const componentName = instance?.parent?.type.name ? `<${instance.parent.type.name} />` : \"component\";\n throw new Error(\n [\n `Detected an invalid children for \\`${componentName}\\` for \\`Presence\\` component.`,\n \"\",\n \"Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.\",\n \"You can apply a few solutions:\",\n [\n \"Provide a single child element so that `presence` directive attach correctly.\",\n \"Ensure the first child is an actual element instead of a raw text node or comment node.\"\n ].map((line) => ` - ${line}`).join(\"\\n\")\n ].join(\"\\n\")\n );\n }\n return () => {\n if (forceMount.value || present.value || isPresent.value) {\n return h(slots.default({ present: isPresent.value })[0], {\n ref: (v) => {\n const el = unrefElement(v);\n if (typeof el?.hasAttribute === \"undefined\")\n return el;\n if (el?.hasAttribute(\"data-reka-popper-content-wrapper\"))\n node.value = el.firstElementChild;\n else\n node.value = el;\n return el;\n }\n });\n } else {\n return null;\n }\n };\n }\n});\n\nexport { Presence as P };\n//# sourceMappingURL=Presence.js.map\n","import { defineComponent, ref, computed, watch, nextTick, onMounted, openBlock, createBlock, unref, withCtx, createVNode, mergeProps, renderSlot, createCommentVNode } from 'vue';\nimport { useEventListener } from '@vueuse/core';\nimport { u as useId } from '../shared/useId.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Presence } from '../Presence/Presence.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { i as injectCollapsibleRootContext } from './CollapsibleRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n ...{\n inheritAttrs: false\n },\n __name: \"CollapsibleContent\",\n props: {\n forceMount: { type: Boolean },\n asChild: { type: Boolean },\n as: {}\n },\n emits: [\"contentFound\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const rootContext = injectCollapsibleRootContext();\n rootContext.contentId ||= useId(undefined, \"reka-collapsible-content\");\n const presentRef = ref();\n const { forwardRef, currentElement } = useForwardExpose();\n const width = ref(0);\n const height = ref(0);\n const isOpen = computed(() => rootContext.open.value);\n const isMountAnimationPrevented = ref(isOpen.value);\n const currentStyle = ref();\n watch(\n () => [isOpen.value, presentRef.value?.present],\n async () => {\n await nextTick();\n const node = currentElement.value;\n if (!node)\n return;\n currentStyle.value = currentStyle.value || {\n transitionDuration: node.style.transitionDuration,\n animationName: node.style.animationName\n };\n node.style.transitionDuration = \"0s\";\n node.style.animationName = \"none\";\n const rect = node.getBoundingClientRect();\n height.value = rect.height;\n width.value = rect.width;\n if (!isMountAnimationPrevented.value) {\n node.style.transitionDuration = currentStyle.value.transitionDuration;\n node.style.animationName = currentStyle.value.animationName;\n }\n },\n {\n immediate: true\n }\n );\n const skipAnimation = computed(() => isMountAnimationPrevented.value && rootContext.open.value);\n onMounted(() => {\n requestAnimationFrame(() => {\n isMountAnimationPrevented.value = false;\n });\n });\n useEventListener(currentElement, \"beforematch\", (ev) => {\n requestAnimationFrame(() => {\n rootContext.onOpenToggle();\n emits(\"contentFound\");\n });\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Presence), {\n ref_key: \"presentRef\",\n ref: presentRef,\n present: _ctx.forceMount || unref(rootContext).open.value,\n \"force-mount\": true\n }, {\n default: withCtx(({ present }) => [\n createVNode(unref(Primitive), mergeProps(_ctx.$attrs, {\n id: unref(rootContext).contentId,\n ref: unref(forwardRef),\n \"as-child\": props.asChild,\n as: _ctx.as,\n hidden: !present ? unref(rootContext).unmountOnHide.value ? \"\" : \"until-found\" : undefined,\n \"data-state\": skipAnimation.value ? undefined : unref(rootContext).open.value ? \"open\" : \"closed\",\n \"data-disabled\": unref(rootContext).disabled?.value ? \"\" : undefined,\n style: {\n [`--reka-collapsible-content-height`]: `${height.value}px`,\n [`--reka-collapsible-content-width`]: `${width.value}px`\n }\n }), {\n default: withCtx(() => [\n (unref(rootContext).unmountOnHide.value ? present : true) ? renderSlot(_ctx.$slots, \"default\", { key: 0 }) : createCommentVNode(\"\", true)\n ]),\n _: 2\n }, 1040, [\"id\", \"as-child\", \"as\", \"hidden\", \"data-state\", \"data-disabled\", \"style\"])\n ]),\n _: 3\n }, 8, [\"present\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=CollapsibleContent.js.map\n","import { defineComponent, openBlock, createBlock, unref, withCtx, renderSlot } from 'vue';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { i as injectCollapsibleRootContext } from './CollapsibleRoot.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"CollapsibleTrigger\",\n props: {\n asChild: { type: Boolean },\n as: { default: \"button\" }\n },\n setup(__props) {\n const props = __props;\n useForwardExpose();\n const rootContext = injectCollapsibleRootContext();\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), {\n type: _ctx.as === \"button\" ? \"button\" : undefined,\n as: _ctx.as,\n \"as-child\": props.asChild,\n \"aria-controls\": unref(rootContext).contentId,\n \"aria-expanded\": unref(rootContext).open.value,\n \"data-state\": unref(rootContext).open.value ? \"open\" : \"closed\",\n \"data-disabled\": unref(rootContext).disabled?.value ? \"\" : undefined,\n disabled: unref(rootContext).disabled?.value,\n onClick: unref(rootContext).onOpenToggle\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 8, [\"type\", \"as\", \"as-child\", \"aria-controls\", \"aria-expanded\", \"data-state\", \"data-disabled\", \"disabled\", \"onClick\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=CollapsibleTrigger.js.map\n","import { getCurrentInstance, toHandlerKey, camelize } from 'vue';\n\nfunction useEmitAsProps(emit) {\n const vm = getCurrentInstance();\n const events = vm?.type.emits;\n const result = {};\n if (!events?.length) {\n console.warn(\n `No emitted event found. Please check component: ${vm?.type.__name}`\n );\n }\n events?.forEach((ev) => {\n result[toHandlerKey(camelize(ev))] = (...arg) => emit(ev, ...arg);\n });\n return result;\n}\n\nexport { useEmitAsProps as u };\n//# sourceMappingURL=useEmitAsProps.js.map\n","import { getCurrentInstance, toRef, computed, camelize } from 'vue';\n\nfunction useForwardProps(props) {\n const vm = getCurrentInstance();\n const defaultProps = Object.keys(vm?.type.props ?? {}).reduce((prev, curr) => {\n const defaultValue = (vm?.type.props[curr]).default;\n if (defaultValue !== undefined)\n prev[curr] = defaultValue;\n return prev;\n }, {});\n const refProps = toRef(props);\n return computed(() => {\n const preservedProps = {};\n const assignedProps = vm?.vnode.props ?? {};\n Object.keys(assignedProps).forEach((key) => {\n preservedProps[camelize(key)] = assignedProps[key];\n });\n return Object.keys({ ...defaultProps, ...preservedProps }).reduce((prev, curr) => {\n if (refProps.value[curr] !== undefined)\n prev[curr] = refProps.value[curr];\n return prev;\n }, {});\n });\n}\n\nexport { useForwardProps as u };\n//# sourceMappingURL=useForwardProps.js.map\n","import { computed } from 'vue';\nimport { u as useEmitAsProps } from './useEmitAsProps.js';\nimport { u as useForwardProps } from './useForwardProps.js';\n\nfunction useForwardPropsEmits(props, emit) {\n const parsedProps = useForwardProps(props);\n const emitsAsProps = emit ? useEmitAsProps(emit) : {};\n return computed(() => ({\n ...parsedProps.value,\n ...emitsAsProps\n }));\n}\n\nexport { useForwardPropsEmits as u };\n//# sourceMappingURL=useForwardPropsEmits.js.map\n","import { defineComponent, ref, toRefs, renderSlot, unref } from 'vue';\nimport { useVModel } from '@vueuse/core';\nimport { c as createContext } from '../shared/createContext.js';\n\nconst [injectDialogRootContext, provideDialogRootContext] = createContext(\"DialogRoot\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n ...{\n inheritAttrs: false\n },\n __name: \"DialogRoot\",\n props: {\n open: { type: Boolean, default: undefined },\n defaultOpen: { type: Boolean, default: false },\n modal: { type: Boolean, default: true }\n },\n emits: [\"update:open\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emit = __emit;\n const open = useVModel(props, \"open\", emit, {\n defaultValue: props.defaultOpen,\n passive: props.open === undefined\n });\n const triggerElement = ref();\n const contentElement = ref();\n const { modal } = toRefs(props);\n provideDialogRootContext({\n open,\n modal,\n openModal: () => {\n open.value = true;\n },\n onOpenChange: (value) => {\n open.value = value;\n },\n onOpenToggle: () => {\n open.value = !open.value;\n },\n contentId: \"\",\n titleId: \"\",\n descriptionId: \"\",\n triggerElement,\n contentElement\n });\n return (_ctx, _cache) => {\n return renderSlot(_ctx.$slots, \"default\", { open: unref(open) });\n };\n }\n});\n\nexport { _sfc_main as _, injectDialogRootContext as i };\n//# sourceMappingURL=DialogRoot.js.map\n","import { defineComponent, onMounted, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from 'vue';\nimport { i as injectDialogRootContext } from './DialogRoot.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { u as useId } from '../shared/useId.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"DialogTrigger\",\n props: {\n asChild: { type: Boolean },\n as: { default: \"button\" }\n },\n setup(__props) {\n const props = __props;\n const rootContext = injectDialogRootContext();\n const { forwardRef, currentElement } = useForwardExpose();\n rootContext.contentId ||= useId(undefined, \"reka-dialog-content\");\n onMounted(() => {\n rootContext.triggerElement.value = currentElement.value;\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), mergeProps(props, {\n ref: unref(forwardRef),\n type: _ctx.as === \"button\" ? \"button\" : undefined,\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": unref(rootContext).open.value || false,\n \"aria-controls\": unref(rootContext).open.value ? unref(rootContext).contentId : undefined,\n \"data-state\": unref(rootContext).open.value ? \"open\" : \"closed\",\n onClick: unref(rootContext).onOpenToggle\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16, [\"type\", \"aria-expanded\", \"aria-controls\", \"data-state\", \"onClick\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=DialogTrigger.js.map\n","import { defineComponent, unref, openBlock, createBlock, Teleport, renderSlot, createCommentVNode } from 'vue';\nimport { useMounted } from '@vueuse/core';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"Teleport\",\n props: {\n to: { default: \"body\" },\n disabled: { type: Boolean },\n defer: { type: Boolean },\n forceMount: { type: Boolean }\n },\n setup(__props) {\n const isMounted = useMounted();\n return (_ctx, _cache) => {\n return unref(isMounted) || _ctx.forceMount ? (openBlock(), createBlock(Teleport, {\n key: 0,\n to: _ctx.to,\n disabled: _ctx.disabled,\n defer: _ctx.defer\n }, [\n renderSlot(_ctx.$slots, \"default\")\n ], 8, [\"to\", \"disabled\", \"defer\"])) : createCommentVNode(\"\", true);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=Teleport.js.map\n","function handleAndDispatchCustomEvent(name, handler, detail) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, {\n bubbles: false,\n cancelable: true,\n detail\n });\n if (handler)\n target.addEventListener(name, handler, { once: true });\n target.dispatchEvent(event);\n}\n\nexport { handleAndDispatchCustomEvent as h };\n//# sourceMappingURL=handleAndDispatchCustomEvent.js.map\n","import { isClient } from '@vueuse/shared';\nimport { ref, watchEffect, nextTick } from 'vue';\nimport { h as handleAndDispatchCustomEvent } from '../shared/handleAndDispatchCustomEvent.js';\n\nconst POINTER_DOWN_OUTSIDE = \"dismissableLayer.pointerDownOutside\";\nconst FOCUS_OUTSIDE = \"dismissableLayer.focusOutside\";\nfunction isLayerExist(layerElement, targetElement) {\n const targetLayer = targetElement.closest(\n \"[data-dismissable-layer]\"\n );\n const mainLayer = layerElement.dataset.dismissableLayer === \"\" ? layerElement : layerElement.querySelector(\n \"[data-dismissable-layer]\"\n );\n const nodeList = Array.from(\n layerElement.ownerDocument.querySelectorAll(\"[data-dismissable-layer]\")\n );\n if (targetLayer && mainLayer === targetLayer || nodeList.indexOf(mainLayer) < nodeList.indexOf(targetLayer)) {\n return true;\n } else {\n return false;\n }\n}\nfunction usePointerDownOutside(onPointerDownOutside, element) {\n const ownerDocument = element?.value?.ownerDocument ?? globalThis?.document;\n const isPointerInsideDOMTree = ref(false);\n const handleClickRef = ref(() => {\n });\n watchEffect((cleanupFn) => {\n if (!isClient)\n return;\n const handlePointerDown = async (event) => {\n const target = event.target;\n if (!element?.value)\n return;\n if (isLayerExist(element.value, target)) {\n isPointerInsideDOMTree.value = false;\n return;\n }\n if (event.target && !isPointerInsideDOMTree.value) {\n let handleAndDispatchPointerDownOutsideEvent = function() {\n handleAndDispatchCustomEvent(\n POINTER_DOWN_OUTSIDE,\n onPointerDownOutside,\n eventDetail\n );\n };\n const eventDetail = { originalEvent: event };\n if (event.pointerType === \"touch\") {\n ownerDocument.removeEventListener(\"click\", handleClickRef.value);\n handleClickRef.value = handleAndDispatchPointerDownOutsideEvent;\n ownerDocument.addEventListener(\"click\", handleClickRef.value, {\n once: true\n });\n } else {\n handleAndDispatchPointerDownOutsideEvent();\n }\n } else {\n ownerDocument.removeEventListener(\"click\", handleClickRef.value);\n }\n isPointerInsideDOMTree.value = false;\n };\n const timerId = window.setTimeout(() => {\n ownerDocument.addEventListener(\"pointerdown\", handlePointerDown);\n }, 0);\n cleanupFn(() => {\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener(\"pointerdown\", handlePointerDown);\n ownerDocument.removeEventListener(\"click\", handleClickRef.value);\n });\n });\n return {\n onPointerDownCapture: () => isPointerInsideDOMTree.value = true\n };\n}\nfunction useFocusOutside(onFocusOutside, element) {\n const ownerDocument = element?.value?.ownerDocument ?? globalThis?.document;\n const isFocusInsideDOMTree = ref(false);\n watchEffect((cleanupFn) => {\n if (!isClient)\n return;\n const handleFocus = async (event) => {\n if (!element?.value)\n return;\n await nextTick();\n if (!element.value || isLayerExist(element.value, event.target))\n return;\n if (event.target && !isFocusInsideDOMTree.value) {\n const eventDetail = { originalEvent: event };\n handleAndDispatchCustomEvent(\n FOCUS_OUTSIDE,\n onFocusOutside,\n eventDetail\n );\n }\n };\n ownerDocument.addEventListener(\"focusin\", handleFocus);\n cleanupFn(() => ownerDocument.removeEventListener(\"focusin\", handleFocus));\n });\n return {\n onFocusCapture: () => isFocusInsideDOMTree.value = true,\n onBlurCapture: () => isFocusInsideDOMTree.value = false\n };\n}\n\nexport { useFocusOutside as a, usePointerDownOutside as u };\n//# sourceMappingURL=utils.js.map\n","import { defineComponent, computed, watchEffect, openBlock, createBlock, unref, normalizeStyle, withCtx, renderSlot, reactive, nextTick } from 'vue';\nimport { onKeyStroke } from '@vueuse/core';\nimport { u as usePointerDownOutside, a as useFocusOutside } from './utils.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\n\nconst context = reactive({\n layersRoot: /* @__PURE__ */ new Set(),\n layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),\n branches: /* @__PURE__ */ new Set()\n});\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"DismissableLayer\",\n props: {\n disableOutsidePointerEvents: { type: Boolean, default: false },\n asChild: { type: Boolean },\n as: {}\n },\n emits: [\"escapeKeyDown\", \"pointerDownOutside\", \"focusOutside\", \"interactOutside\", \"dismiss\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const { forwardRef, currentElement: layerElement } = useForwardExpose();\n const ownerDocument = computed(\n () => layerElement.value?.ownerDocument ?? globalThis.document\n );\n const layers = computed(() => context.layersRoot);\n const index = computed(() => {\n return layerElement.value ? Array.from(layers.value).indexOf(layerElement.value) : -1;\n });\n const isBodyPointerEventsDisabled = computed(() => {\n return context.layersWithOutsidePointerEventsDisabled.size > 0;\n });\n const isPointerEventsEnabled = computed(() => {\n const localLayers = Array.from(layers.value);\n const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);\n const highestLayerWithOutsidePointerEventsDisabledIndex = localLayers.indexOf(highestLayerWithOutsidePointerEventsDisabled);\n return index.value >= highestLayerWithOutsidePointerEventsDisabledIndex;\n });\n const pointerDownOutside = usePointerDownOutside(async (event) => {\n const isPointerDownOnBranch = [...context.branches].some(\n (branch) => branch?.contains(event.target)\n );\n if (!isPointerEventsEnabled.value || isPointerDownOnBranch)\n return;\n emits(\"pointerDownOutside\", event);\n emits(\"interactOutside\", event);\n await nextTick();\n if (!event.defaultPrevented)\n emits(\"dismiss\");\n }, layerElement);\n const focusOutside = useFocusOutside((event) => {\n const isFocusInBranch = [...context.branches].some(\n (branch) => branch?.contains(event.target)\n );\n if (isFocusInBranch)\n return;\n emits(\"focusOutside\", event);\n emits(\"interactOutside\", event);\n if (!event.defaultPrevented)\n emits(\"dismiss\");\n }, layerElement);\n onKeyStroke(\"Escape\", (event) => {\n const isHighestLayer = index.value === layers.value.size - 1;\n if (!isHighestLayer)\n return;\n emits(\"escapeKeyDown\", event);\n if (!event.defaultPrevented)\n emits(\"dismiss\");\n });\n let originalBodyPointerEvents;\n watchEffect((cleanupFn) => {\n if (!layerElement.value)\n return;\n if (props.disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = ownerDocument.value.body.style.pointerEvents;\n ownerDocument.value.body.style.pointerEvents = \"none\";\n }\n context.layersWithOutsidePointerEventsDisabled.add(layerElement.value);\n }\n layers.value.add(layerElement.value);\n cleanupFn(() => {\n if (props.disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {\n ownerDocument.value.body.style.pointerEvents = originalBodyPointerEvents;\n }\n });\n });\n watchEffect((cleanupFn) => {\n cleanupFn(() => {\n if (!layerElement.value)\n return;\n layers.value.delete(layerElement.value);\n context.layersWithOutsidePointerEventsDisabled.delete(layerElement.value);\n });\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), {\n ref: unref(forwardRef),\n \"as-child\": _ctx.asChild,\n as: _ctx.as,\n \"data-dismissable-layer\": \"\",\n style: normalizeStyle({\n pointerEvents: isBodyPointerEventsDisabled.value ? isPointerEventsEnabled.value ? \"auto\" : \"none\" : undefined\n }),\n onFocusCapture: unref(focusOutside).onFocusCapture,\n onBlurCapture: unref(focusOutside).onBlurCapture,\n onPointerdownCapture: unref(pointerDownOutside).onPointerDownCapture\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 8, [\"as-child\", \"as\", \"style\", \"onFocusCapture\", \"onBlurCapture\", \"onPointerdownCapture\"]);\n };\n }\n});\n\nexport { _sfc_main as _, context as c };\n//# sourceMappingURL=DismissableLayer.js.map\n","function getActiveElement() {\n let activeElement = document.activeElement;\n if (activeElement == null) {\n return null;\n }\n while (activeElement != null && activeElement.shadowRoot != null && activeElement.shadowRoot.activeElement != null) {\n activeElement = activeElement.shadowRoot.activeElement;\n }\n return activeElement;\n}\n\nexport { getActiveElement as g };\n//# sourceMappingURL=getActiveElement.js.map\n","import { g as getActiveElement } from '../shared/getActiveElement.js';\n\nconst ITEM_SELECT = \"menu.itemSelect\";\nconst SELECTION_KEYS = [\"Enter\", \" \"];\nconst FIRST_KEYS = [\"ArrowDown\", \"PageUp\", \"Home\"];\nconst LAST_KEYS = [\"ArrowUp\", \"PageDown\", \"End\"];\nconst FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS];\nconst SUB_OPEN_KEYS = {\n ltr: [...SELECTION_KEYS, \"ArrowRight\"],\n rtl: [...SELECTION_KEYS, \"ArrowLeft\"]\n};\nconst SUB_CLOSE_KEYS = {\n ltr: [\"ArrowLeft\"],\n rtl: [\"ArrowRight\"]\n};\nfunction getOpenState(open) {\n return open ? \"open\" : \"closed\";\n}\nfunction isIndeterminate(checked) {\n return checked === \"indeterminate\";\n}\nfunction getCheckedState(checked) {\n return isIndeterminate(checked) ? \"indeterminate\" : checked ? \"checked\" : \"unchecked\";\n}\nfunction focusFirst(candidates) {\n const PREVIOUSLY_FOCUSED_ELEMENT = getActiveElement();\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT)\n return;\n candidate.focus();\n if (getActiveElement() !== PREVIOUSLY_FOCUSED_ELEMENT)\n return;\n }\n}\nfunction isPointInPolygon(point, polygon) {\n const { x, y } = point;\n let inside = false;\n for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {\n const xi = polygon[i].x;\n const yi = polygon[i].y;\n const xj = polygon[j].x;\n const yj = polygon[j].y;\n const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;\n if (intersect)\n inside = !inside;\n }\n return inside;\n}\nfunction isPointerInGraceArea(event, area) {\n if (!area)\n return false;\n const cursorPos = { x: event.clientX, y: event.clientY };\n return isPointInPolygon(cursorPos, area);\n}\nfunction isMouseEvent(event) {\n return event.pointerType === \"mouse\";\n}\n\nexport { FIRST_LAST_KEYS as F, ITEM_SELECT as I, LAST_KEYS as L, SELECTION_KEYS as S, getCheckedState as a, isPointerInGraceArea as b, isMouseEvent as c, SUB_CLOSE_KEYS as d, SUB_OPEN_KEYS as e, focusFirst as f, getOpenState as g, isIndeterminate as i };\n//# sourceMappingURL=utils.js.map\n","import { g as getActiveElement } from '../shared/getActiveElement.js';\n\nconst AUTOFOCUS_ON_MOUNT = \"focusScope.autoFocusOnMount\";\nconst AUTOFOCUS_ON_UNMOUNT = \"focusScope.autoFocusOnUnmount\";\nconst EVENT_OPTIONS = { bubbles: false, cancelable: true };\nfunction focusFirst(candidates, { select = false } = {}) {\n const previouslyFocusedElement = getActiveElement();\n for (const candidate of candidates) {\n focus(candidate, { select });\n if (getActiveElement() !== previouslyFocusedElement)\n return true;\n }\n}\nfunction getTabbableEdges(container) {\n const candidates = getTabbableCandidates(container);\n const first = findVisible(candidates, container);\n const last = findVisible(candidates.reverse(), container);\n return [first, last];\n}\nfunction getTabbableCandidates(container) {\n const nodes = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node) => {\n const isHiddenInput = node.tagName === \"INPUT\" && node.type === \"hidden\";\n if (node.disabled || node.hidden || isHiddenInput)\n return NodeFilter.FILTER_SKIP;\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n }\n });\n while (walker.nextNode()) nodes.push(walker.currentNode);\n return nodes;\n}\nfunction findVisible(elements, container) {\n for (const element of elements) {\n if (!isHidden(element, { upTo: container }))\n return element;\n }\n}\nfunction isHidden(node, { upTo }) {\n if (getComputedStyle(node).visibility === \"hidden\")\n return true;\n while (node) {\n if (upTo !== undefined && node === upTo)\n return false;\n if (getComputedStyle(node).display === \"none\")\n return true;\n node = node.parentElement;\n }\n return false;\n}\nfunction isSelectableInput(element) {\n return element instanceof HTMLInputElement && \"select\" in element;\n}\nfunction focus(element, { select = false } = {}) {\n if (element && element.focus) {\n const previouslyFocusedElement = getActiveElement();\n element.focus({ preventScroll: true });\n if (element !== previouslyFocusedElement && isSelectableInput(element) && select) {\n element.select();\n }\n }\n}\n\nexport { AUTOFOCUS_ON_MOUNT as A, EVENT_OPTIONS as E, focus as a, AUTOFOCUS_ON_UNMOUNT as b, getTabbableEdges as c, focusFirst as f, getTabbableCandidates as g };\n//# sourceMappingURL=utils.js.map\n","import { createGlobalState } from '@vueuse/core';\nimport { ref } from 'vue';\n\nconst useFocusStackState = createGlobalState(() => {\n const stack = ref([]);\n return stack;\n});\nfunction createFocusScopesStack() {\n const stack = useFocusStackState();\n return {\n add(focusScope) {\n const activeFocusScope = stack.value[0];\n if (focusScope !== activeFocusScope)\n activeFocusScope?.pause();\n stack.value = arrayRemove(stack.value, focusScope);\n stack.value.unshift(focusScope);\n },\n remove(focusScope) {\n stack.value = arrayRemove(stack.value, focusScope);\n stack.value[0]?.resume();\n }\n };\n}\nfunction arrayRemove(array, item) {\n const updatedArray = [...array];\n const index = updatedArray.indexOf(item);\n if (index !== -1)\n updatedArray.splice(index, 1);\n return updatedArray;\n}\nfunction removeLinks(items) {\n return items.filter((item) => item.tagName !== \"A\");\n}\n\nexport { createFocusScopesStack as c, removeLinks as r };\n//# sourceMappingURL=stack.js.map\n","import { defineComponent, ref, reactive, watchEffect, nextTick, openBlock, createBlock, unref, withCtx, renderSlot } from 'vue';\nimport { isClient } from '@vueuse/shared';\nimport { A as AUTOFOCUS_ON_MOUNT, f as focusFirst, g as getTabbableCandidates, a as focus, b as AUTOFOCUS_ON_UNMOUNT, E as EVENT_OPTIONS, c as getTabbableEdges } from './utils.js';\nimport { c as createFocusScopesStack, r as removeLinks } from './stack.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { g as getActiveElement } from '../shared/getActiveElement.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"FocusScope\",\n props: {\n loop: { type: Boolean, default: false },\n trapped: { type: Boolean, default: false },\n asChild: { type: Boolean },\n as: {}\n },\n emits: [\"mountAutoFocus\", \"unmountAutoFocus\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const { currentRef, currentElement } = useForwardExpose();\n const lastFocusedElementRef = ref(null);\n const focusScopesStack = createFocusScopesStack();\n const focusScope = reactive({\n paused: false,\n pause() {\n this.paused = true;\n },\n resume() {\n this.paused = false;\n }\n });\n watchEffect((cleanupFn) => {\n if (!isClient)\n return;\n const container = currentElement.value;\n if (!props.trapped)\n return;\n function handleFocusIn(event) {\n if (focusScope.paused || !container)\n return;\n const target = event.target;\n if (container.contains(target))\n lastFocusedElementRef.value = target;\n else focus(lastFocusedElementRef.value, { select: true });\n }\n function handleFocusOut(event) {\n if (focusScope.paused || !container)\n return;\n const relatedTarget = event.relatedTarget;\n if (relatedTarget === null)\n return;\n if (!container.contains(relatedTarget))\n focus(lastFocusedElementRef.value, { select: true });\n }\n function handleMutations(mutations) {\n const isLastFocusedElementExist = container.contains(lastFocusedElementRef.value);\n if (!isLastFocusedElementExist)\n focus(container);\n }\n document.addEventListener(\"focusin\", handleFocusIn);\n document.addEventListener(\"focusout\", handleFocusOut);\n const mutationObserver = new MutationObserver(handleMutations);\n if (container)\n mutationObserver.observe(container, { childList: true, subtree: true });\n cleanupFn(() => {\n document.removeEventListener(\"focusin\", handleFocusIn);\n document.removeEventListener(\"focusout\", handleFocusOut);\n mutationObserver.disconnect();\n });\n });\n watchEffect(async (cleanupFn) => {\n const container = currentElement.value;\n await nextTick();\n if (!container)\n return;\n focusScopesStack.add(focusScope);\n const previouslyFocusedElement = getActiveElement();\n const hasFocusedCandidate = container.contains(previouslyFocusedElement);\n if (!hasFocusedCandidate) {\n const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_MOUNT, (ev) => emits(\"mountAutoFocus\", ev));\n container.dispatchEvent(mountEvent);\n if (!mountEvent.defaultPrevented) {\n focusFirst(removeLinks(getTabbableCandidates(container)), {\n select: true\n });\n if (getActiveElement() === previouslyFocusedElement)\n focus(container);\n }\n }\n cleanupFn(() => {\n container.removeEventListener(AUTOFOCUS_ON_MOUNT, (ev) => emits(\"mountAutoFocus\", ev));\n const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);\n const unmountEventHandler = (ev) => {\n emits(\"unmountAutoFocus\", ev);\n };\n container.addEventListener(AUTOFOCUS_ON_UNMOUNT, unmountEventHandler);\n container.dispatchEvent(unmountEvent);\n setTimeout(() => {\n if (!unmountEvent.defaultPrevented)\n focus(previouslyFocusedElement ?? document.body, { select: true });\n container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, unmountEventHandler);\n focusScopesStack.remove(focusScope);\n }, 0);\n });\n });\n function handleKeyDown(event) {\n if (!props.loop && !props.trapped)\n return;\n if (focusScope.paused)\n return;\n const isTabKey = event.key === \"Tab\" && !event.altKey && !event.ctrlKey && !event.metaKey;\n const focusedElement = getActiveElement();\n if (isTabKey && focusedElement) {\n const container = event.currentTarget;\n const [first, last] = getTabbableEdges(container);\n const hasTabbableElementsInside = first && last;\n if (!hasTabbableElementsInside) {\n if (focusedElement === container)\n event.preventDefault();\n } else {\n if (!event.shiftKey && focusedElement === last) {\n event.preventDefault();\n if (props.loop)\n focus(first, { select: true });\n } else if (event.shiftKey && focusedElement === first) {\n event.preventDefault();\n if (props.loop)\n focus(last, { select: true });\n }\n }\n }\n }\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), {\n ref_key: \"currentRef\",\n ref: currentRef,\n tabindex: \"-1\",\n \"as-child\": _ctx.asChild,\n as: _ctx.as,\n onKeydown: handleKeyDown\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 8, [\"as-child\", \"as\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=FocusScope.js.map\n","import { defineComponent, onMounted, openBlock, createBlock, unref, withCtx, createVNode, mergeProps, renderSlot } from 'vue';\nimport { _ as _sfc_main$2 } from '../DismissableLayer/DismissableLayer.js';\nimport { g as getOpenState } from '../Menu/utils.js';\nimport { u as useWarning } from './utils.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { u as useId } from '../shared/useId.js';\nimport { g as getActiveElement } from '../shared/getActiveElement.js';\nimport { _ as _sfc_main$1 } from '../FocusScope/FocusScope.js';\nimport { i as injectDialogRootContext } from './DialogRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"DialogContentImpl\",\n props: {\n forceMount: { type: Boolean },\n trapFocus: { type: Boolean },\n disableOutsidePointerEvents: { type: Boolean },\n asChild: { type: Boolean },\n as: {}\n },\n emits: [\"escapeKeyDown\", \"pointerDownOutside\", \"focusOutside\", \"interactOutside\", \"openAutoFocus\", \"closeAutoFocus\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const rootContext = injectDialogRootContext();\n const { forwardRef, currentElement: contentElement } = useForwardExpose();\n rootContext.titleId ||= useId(undefined, \"reka-dialog-title\");\n rootContext.descriptionId ||= useId(undefined, \"reka-dialog-description\");\n onMounted(() => {\n rootContext.contentElement = contentElement;\n if (getActiveElement() !== document.body)\n rootContext.triggerElement.value = getActiveElement();\n });\n if (process.env.NODE_ENV !== \"production\") {\n useWarning({\n titleName: \"DialogTitle\",\n contentName: \"DialogContent\",\n componentLink: \"dialog.html#title\",\n titleId: rootContext.titleId,\n descriptionId: rootContext.descriptionId,\n contentElement\n });\n }\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), {\n \"as-child\": \"\",\n loop: \"\",\n trapped: props.trapFocus,\n onMountAutoFocus: _cache[5] || (_cache[5] = ($event) => emits(\"openAutoFocus\", $event)),\n onUnmountAutoFocus: _cache[6] || (_cache[6] = ($event) => emits(\"closeAutoFocus\", $event))\n }, {\n default: withCtx(() => [\n createVNode(unref(_sfc_main$2), mergeProps({\n id: unref(rootContext).contentId,\n ref: unref(forwardRef),\n as: _ctx.as,\n \"as-child\": _ctx.asChild,\n \"disable-outside-pointer-events\": _ctx.disableOutsidePointerEvents,\n role: \"dialog\",\n \"aria-describedby\": unref(rootContext).descriptionId,\n \"aria-labelledby\": unref(rootContext).titleId,\n \"data-state\": unref(getOpenState)(unref(rootContext).open.value)\n }, _ctx.$attrs, {\n onDismiss: _cache[0] || (_cache[0] = ($event) => unref(rootContext).onOpenChange(false)),\n onEscapeKeyDown: _cache[1] || (_cache[1] = ($event) => emits(\"escapeKeyDown\", $event)),\n onFocusOutside: _cache[2] || (_cache[2] = ($event) => emits(\"focusOutside\", $event)),\n onInteractOutside: _cache[3] || (_cache[3] = ($event) => emits(\"interactOutside\", $event)),\n onPointerDownOutside: _cache[4] || (_cache[4] = ($event) => emits(\"pointerDownOutside\", $event))\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16, [\"id\", \"as\", \"as-child\", \"disable-outside-pointer-events\", \"aria-describedby\", \"aria-labelledby\", \"data-state\"])\n ]),\n _: 3\n }, 8, [\"trapped\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=DialogContentImpl.js.map\n","import { unrefElement } from '@vueuse/core';\nimport { hideOthers } from 'aria-hidden';\nimport { watch, onUnmounted } from 'vue';\n\nfunction useHideOthers(target) {\n let undo;\n watch(() => unrefElement(target), (el) => {\n if (el)\n undo = hideOthers(el);\n else if (undo)\n undo();\n });\n onUnmounted(() => {\n if (undo)\n undo();\n });\n}\n\nexport { useHideOthers as u };\n//# sourceMappingURL=useHideOthers.js.map\n","import { defineComponent, openBlock, createBlock, mergeProps, unref, withCtx, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from './DialogContentImpl.js';\nimport { u as useEmitAsProps } from '../shared/useEmitAsProps.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { u as useHideOthers } from '../shared/useHideOthers.js';\nimport { i as injectDialogRootContext } from './DialogRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"DialogContentModal\",\n props: {\n forceMount: { type: Boolean },\n trapFocus: { type: Boolean },\n disableOutsidePointerEvents: { type: Boolean },\n asChild: { type: Boolean },\n as: {}\n },\n emits: [\"escapeKeyDown\", \"pointerDownOutside\", \"focusOutside\", \"interactOutside\", \"openAutoFocus\", \"closeAutoFocus\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const rootContext = injectDialogRootContext();\n const emitsAsProps = useEmitAsProps(emits);\n const { forwardRef, currentElement } = useForwardExpose();\n useHideOthers(currentElement);\n return (_ctx, _cache) => {\n return openBlock(), createBlock(_sfc_main$1, mergeProps({ ...props, ...unref(emitsAsProps) }, {\n ref: unref(forwardRef),\n \"trap-focus\": unref(rootContext).open.value,\n \"disable-outside-pointer-events\": true,\n onCloseAutoFocus: _cache[0] || (_cache[0] = (event) => {\n if (!event.defaultPrevented) {\n event.preventDefault();\n unref(rootContext).triggerElement.value?.focus();\n }\n }),\n onPointerDownOutside: _cache[1] || (_cache[1] = (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.preventDefault();\n }),\n onFocusOutside: _cache[2] || (_cache[2] = (event) => {\n event.preventDefault();\n })\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16, [\"trap-focus\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=DialogContentModal.js.map\n","import { defineComponent, ref, openBlock, createBlock, mergeProps, unref, withCtx, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from './DialogContentImpl.js';\nimport { u as useEmitAsProps } from '../shared/useEmitAsProps.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { i as injectDialogRootContext } from './DialogRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"DialogContentNonModal\",\n props: {\n forceMount: { type: Boolean },\n trapFocus: { type: Boolean },\n disableOutsidePointerEvents: { type: Boolean },\n asChild: { type: Boolean },\n as: {}\n },\n emits: [\"escapeKeyDown\", \"pointerDownOutside\", \"focusOutside\", \"interactOutside\", \"openAutoFocus\", \"closeAutoFocus\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const emitsAsProps = useEmitAsProps(emits);\n useForwardExpose();\n const rootContext = injectDialogRootContext();\n const hasInteractedOutsideRef = ref(false);\n const hasPointerDownOutsideRef = ref(false);\n return (_ctx, _cache) => {\n return openBlock(), createBlock(_sfc_main$1, mergeProps({ ...props, ...unref(emitsAsProps) }, {\n \"trap-focus\": false,\n \"disable-outside-pointer-events\": false,\n onCloseAutoFocus: _cache[0] || (_cache[0] = (event) => {\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.value) unref(rootContext).triggerElement.value?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.value = false;\n hasPointerDownOutsideRef.value = false;\n }),\n onInteractOutside: _cache[1] || (_cache[1] = (event) => {\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.value = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.value = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = unref(rootContext).triggerElement.value?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.value) {\n event.preventDefault();\n }\n })\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=DialogContentNonModal.js.map\n","import { defineComponent, openBlock, createBlock, unref, withCtx, mergeProps, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from './DialogContentModal.js';\nimport { _ as _sfc_main$2 } from './DialogContentNonModal.js';\nimport { u as useEmitAsProps } from '../shared/useEmitAsProps.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Presence } from '../Presence/Presence.js';\nimport { i as injectDialogRootContext } from './DialogRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"DialogContent\",\n props: {\n forceMount: { type: Boolean },\n trapFocus: { type: Boolean },\n disableOutsidePointerEvents: { type: Boolean },\n asChild: { type: Boolean },\n as: {}\n },\n emits: [\"escapeKeyDown\", \"pointerDownOutside\", \"focusOutside\", \"interactOutside\", \"openAutoFocus\", \"closeAutoFocus\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const rootContext = injectDialogRootContext();\n const emitsAsProps = useEmitAsProps(emits);\n const { forwardRef } = useForwardExpose();\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Presence), {\n present: _ctx.forceMount || unref(rootContext).open.value\n }, {\n default: withCtx(() => [\n unref(rootContext).modal.value ? (openBlock(), createBlock(_sfc_main$1, mergeProps({\n key: 0,\n ref: unref(forwardRef)\n }, { ...props, ...unref(emitsAsProps), ..._ctx.$attrs }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16)) : (openBlock(), createBlock(_sfc_main$2, mergeProps({\n key: 1,\n ref: unref(forwardRef)\n }, { ...props, ...unref(emitsAsProps), ..._ctx.$attrs }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16))\n ]),\n _: 3\n }, 8, [\"present\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=DialogContent.js.map\n","import { createSharedComposable, useEventListener } from '@vueuse/core';\nimport { isClient, isIOS, tryOnBeforeUnmount } from '@vueuse/shared';\nimport { ref, computed, watch, nextTick } from 'vue';\nimport { defu } from 'defu';\nimport { i as injectConfigProviderContext } from '../ConfigProvider/ConfigProvider.js';\n\nconst useBodyLockStackCount = createSharedComposable(() => {\n const map = ref(/* @__PURE__ */ new Map());\n const initialOverflow = ref();\n const locked = computed(() => {\n for (const value of map.value.values()) {\n if (value)\n return true;\n }\n return false;\n });\n const context = injectConfigProviderContext({\n scrollBody: ref(true)\n });\n let stopTouchMoveListener = null;\n const resetBodyStyle = () => {\n document.body.style.paddingRight = \"\";\n document.body.style.marginRight = \"\";\n document.body.style.pointerEvents = \"\";\n document.body.style.removeProperty(\"--scrollbar-width\");\n document.body.style.overflow = initialOverflow.value ?? \"\";\n isIOS && stopTouchMoveListener?.();\n initialOverflow.value = undefined;\n };\n watch(locked, (val, oldVal) => {\n if (!isClient)\n return;\n if (!val) {\n if (oldVal)\n resetBodyStyle();\n return;\n }\n if (initialOverflow.value === undefined)\n initialOverflow.value = document.body.style.overflow;\n const verticalScrollbarWidth = window.innerWidth - document.documentElement.clientWidth;\n const defaultConfig = { padding: verticalScrollbarWidth, margin: 0 };\n const config = context.scrollBody?.value ? typeof context.scrollBody.value === \"object\" ? defu({\n padding: context.scrollBody.value.padding === true ? verticalScrollbarWidth : context.scrollBody.value.padding,\n margin: context.scrollBody.value.margin === true ? verticalScrollbarWidth : context.scrollBody.value.margin\n }, defaultConfig) : defaultConfig : { padding: 0, margin: 0 };\n if (verticalScrollbarWidth > 0) {\n document.body.style.paddingRight = typeof config.padding === \"number\" ? `${config.padding}px` : String(config.padding);\n document.body.style.marginRight = typeof config.margin === \"number\" ? `${config.margin}px` : String(config.margin);\n document.body.style.setProperty(\"--scrollbar-width\", `${verticalScrollbarWidth}px`);\n document.body.style.overflow = \"hidden\";\n }\n if (isIOS) {\n stopTouchMoveListener = useEventListener(\n document,\n \"touchmove\",\n (e) => preventDefault(e),\n { passive: false }\n );\n }\n nextTick(() => {\n document.body.style.pointerEvents = \"none\";\n document.body.style.overflow = \"hidden\";\n });\n }, { immediate: true, flush: \"sync\" });\n return map;\n});\nfunction useBodyScrollLock(initialState) {\n const id = Math.random().toString(36).substring(2, 7);\n const map = useBodyLockStackCount();\n map.value.set(id, initialState ?? false);\n const locked = computed({\n get: () => map.value.get(id) ?? false,\n set: (value) => map.value.set(id, value)\n });\n tryOnBeforeUnmount(() => {\n map.value.delete(id);\n });\n return locked;\n}\nfunction checkOverflowScroll(ele) {\n const style = window.getComputedStyle(ele);\n if (style.overflowX === \"scroll\" || style.overflowY === \"scroll\" || style.overflowX === \"auto\" && ele.clientWidth < ele.scrollWidth || style.overflowY === \"auto\" && ele.clientHeight < ele.scrollHeight) {\n return true;\n } else {\n const parent = ele.parentNode;\n if (!(parent instanceof Element) || parent.tagName === \"BODY\")\n return false;\n return checkOverflowScroll(parent);\n }\n}\nfunction preventDefault(rawEvent) {\n const e = rawEvent || window.event;\n const _target = e.target;\n if (_target instanceof Element && checkOverflowScroll(_target))\n return false;\n if (e.touches.length > 1)\n return true;\n if (e.preventDefault && e.cancelable)\n e.preventDefault();\n return false;\n}\n\nexport { useBodyScrollLock as u };\n//# sourceMappingURL=useBodyScrollLock.js.map\n","import { defineComponent, openBlock, createBlock, unref, withCtx, renderSlot } from 'vue';\nimport { u as useBodyScrollLock } from '../shared/useBodyScrollLock.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { i as injectDialogRootContext } from './DialogRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"DialogOverlayImpl\",\n props: {\n asChild: { type: Boolean },\n as: {}\n },\n setup(__props) {\n const rootContext = injectDialogRootContext();\n useBodyScrollLock(true);\n useForwardExpose();\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), {\n as: _ctx.as,\n \"as-child\": _ctx.asChild,\n \"data-state\": unref(rootContext).open.value ? \"open\" : \"closed\",\n style: { \"pointer-events\": \"auto\" }\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 8, [\"as\", \"as-child\", \"data-state\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=DialogOverlayImpl.js.map\n","import { defineComponent, unref, openBlock, createBlock, withCtx, createVNode, mergeProps, renderSlot, createCommentVNode } from 'vue';\nimport { _ as _sfc_main$1 } from './DialogOverlayImpl.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Presence } from '../Presence/Presence.js';\nimport { i as injectDialogRootContext } from './DialogRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"DialogOverlay\",\n props: {\n forceMount: { type: Boolean },\n asChild: { type: Boolean },\n as: {}\n },\n setup(__props) {\n const rootContext = injectDialogRootContext();\n const { forwardRef } = useForwardExpose();\n return (_ctx, _cache) => {\n return unref(rootContext)?.modal.value ? (openBlock(), createBlock(unref(Presence), {\n key: 0,\n present: _ctx.forceMount || unref(rootContext).open.value\n }, {\n default: withCtx(() => [\n createVNode(_sfc_main$1, mergeProps(_ctx.$attrs, {\n ref: unref(forwardRef),\n as: _ctx.as,\n \"as-child\": _ctx.asChild\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16, [\"as\", \"as-child\"])\n ]),\n _: 3\n }, 8, [\"present\"])) : createCommentVNode(\"\", true);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=DialogOverlay.js.map\n","import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from 'vue';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { i as injectDialogRootContext } from './DialogRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"DialogClose\",\n props: {\n asChild: { type: Boolean },\n as: { default: \"button\" }\n },\n setup(__props) {\n const props = __props;\n useForwardExpose();\n const rootContext = injectDialogRootContext();\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), mergeProps(props, {\n type: _ctx.as === \"button\" ? \"button\" : undefined,\n onClick: _cache[0] || (_cache[0] = ($event) => unref(rootContext).onOpenChange(false))\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16, [\"type\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=DialogClose.js.map\n","import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from 'vue';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { i as injectDialogRootContext } from './DialogRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"DialogTitle\",\n props: {\n asChild: { type: Boolean },\n as: { default: \"h2\" }\n },\n setup(__props) {\n const props = __props;\n const rootContext = injectDialogRootContext();\n useForwardExpose();\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), mergeProps(props, {\n id: unref(rootContext).titleId\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16, [\"id\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=DialogTitle.js.map\n","import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from 'vue';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { i as injectDialogRootContext } from './DialogRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"DialogDescription\",\n props: {\n asChild: { type: Boolean },\n as: { default: \"p\" }\n },\n setup(__props) {\n const props = __props;\n useForwardExpose();\n const rootContext = injectDialogRootContext();\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), mergeProps(props, {\n id: unref(rootContext).descriptionId\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16, [\"id\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=DialogDescription.js.map\n","import { defineComponent, ref, openBlock, createBlock, unref, withCtx, renderSlot } from 'vue';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { c as createContext } from '../shared/createContext.js';\n\nconst [injectAvatarRootContext, provideAvatarRootContext] = createContext(\"AvatarRoot\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"AvatarRoot\",\n props: {\n asChild: { type: Boolean },\n as: { default: \"span\" }\n },\n setup(__props) {\n useForwardExpose();\n provideAvatarRootContext({\n imageLoadingStatus: ref(\"loading\")\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), {\n \"as-child\": _ctx.asChild,\n as: _ctx.as\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 8, [\"as-child\", \"as\"]);\n };\n }\n});\n\nexport { _sfc_main as _, injectAvatarRootContext as i };\n//# sourceMappingURL=AvatarRoot.js.map\n","import { defineComponent, ref, watch, unref, openBlock, createBlock, withCtx, renderSlot, createCommentVNode } from 'vue';\nimport { i as injectAvatarRootContext } from './AvatarRoot.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"AvatarFallback\",\n props: {\n delayMs: { default: 0 },\n asChild: { type: Boolean },\n as: { default: \"span\" }\n },\n setup(__props) {\n const props = __props;\n const rootContext = injectAvatarRootContext();\n useForwardExpose();\n const canRender = ref(false);\n let timeout;\n watch(rootContext.imageLoadingStatus, (value) => {\n if (value === \"loading\") {\n canRender.value = false;\n if (props.delayMs) {\n timeout = setTimeout(() => {\n canRender.value = true;\n clearTimeout(timeout);\n }, props.delayMs);\n } else {\n canRender.value = true;\n }\n }\n }, { immediate: true });\n return (_ctx, _cache) => {\n return canRender.value && unref(rootContext).imageLoadingStatus.value !== \"loaded\" ? (openBlock(), createBlock(unref(Primitive), {\n key: 0,\n \"as-child\": _ctx.asChild,\n as: _ctx.as\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 8, [\"as-child\", \"as\"])) : createCommentVNode(\"\", true);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=AvatarFallback.js.map\n","import { ref, onMounted, watch, onUnmounted } from 'vue';\n\nfunction useImageLoadingStatus(src, referrerPolicy) {\n const loadingStatus = ref(\"idle\");\n const isMounted = ref(false);\n const updateStatus = (status) => () => {\n if (isMounted.value)\n loadingStatus.value = status;\n };\n onMounted(() => {\n isMounted.value = true;\n watch([() => src.value, () => referrerPolicy?.value], ([src2, referrer]) => {\n if (!src2) {\n loadingStatus.value = \"error\";\n } else {\n const image = new window.Image();\n loadingStatus.value = \"loading\";\n image.onload = updateStatus(\"loaded\");\n image.onerror = updateStatus(\"error\");\n image.src = src2;\n if (referrer) {\n image.referrerPolicy = referrer;\n }\n }\n }, { immediate: true });\n });\n onUnmounted(() => {\n isMounted.value = false;\n });\n return loadingStatus;\n}\n\nexport { useImageLoadingStatus as u };\n//# sourceMappingURL=utils.js.map\n","import { defineComponent, toRefs, watch, withDirectives, openBlock, createBlock, unref, withCtx, renderSlot, vShow } from 'vue';\nimport { u as useImageLoadingStatus } from './utils.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { i as injectAvatarRootContext } from './AvatarRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"AvatarImage\",\n props: {\n src: {},\n referrerPolicy: {},\n asChild: { type: Boolean },\n as: { default: \"img\" }\n },\n emits: [\"loadingStatusChange\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const { src, referrerPolicy } = toRefs(props);\n useForwardExpose();\n const rootContext = injectAvatarRootContext();\n const imageLoadingStatus = useImageLoadingStatus(src, referrerPolicy);\n watch(\n imageLoadingStatus,\n (newValue) => {\n emits(\"loadingStatusChange\", newValue);\n if (newValue !== \"idle\")\n rootContext.imageLoadingStatus.value = newValue;\n },\n { immediate: true }\n );\n return (_ctx, _cache) => {\n return withDirectives((openBlock(), createBlock(unref(Primitive), {\n role: \"img\",\n \"as-child\": _ctx.asChild,\n as: _ctx.as,\n src: unref(src),\n \"referrer-policy\": unref(referrerPolicy)\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 8, [\"as-child\", \"as\", \"src\", \"referrer-policy\"])), [\n [vShow, unref(imageLoadingStatus) === \"loaded\"]\n ]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=AvatarImage.js.map\n","import { unrefElement } from '@vueuse/core';\nimport { ref, computed } from 'vue';\n\nfunction usePrimitiveElement() {\n const primitiveElement = ref();\n const currentElement = computed(() => [\"#text\", \"#comment\"].includes(primitiveElement.value?.$el.nodeName) ? primitiveElement.value?.$el.nextElementSibling : unrefElement(primitiveElement));\n return {\n primitiveElement,\n currentElement\n };\n}\n\nexport { usePrimitiveElement as u };\n//# sourceMappingURL=usePrimitiveElement.js.map\n","function useKbd() {\n return {\n ALT: \"Alt\",\n ARROW_DOWN: \"ArrowDown\",\n ARROW_LEFT: \"ArrowLeft\",\n ARROW_RIGHT: \"ArrowRight\",\n ARROW_UP: \"ArrowUp\",\n BACKSPACE: \"Backspace\",\n CAPS_LOCK: \"CapsLock\",\n CONTROL: \"Control\",\n DELETE: \"Delete\",\n END: \"End\",\n ENTER: \"Enter\",\n ESCAPE: \"Escape\",\n F1: \"F1\",\n F10: \"F10\",\n F11: \"F11\",\n F12: \"F12\",\n F2: \"F2\",\n F3: \"F3\",\n F4: \"F4\",\n F5: \"F5\",\n F6: \"F6\",\n F7: \"F7\",\n F8: \"F8\",\n F9: \"F9\",\n HOME: \"Home\",\n META: \"Meta\",\n PAGE_DOWN: \"PageDown\",\n PAGE_UP: \"PageUp\",\n SHIFT: \"Shift\",\n SPACE: \" \",\n TAB: \"Tab\",\n CTRL: \"Control\",\n ASTERISK: \"*\",\n SPACE_CODE: \"Space\"\n };\n}\n\nexport { useKbd as u };\n//# sourceMappingURL=useKbd.js.map\n","import { g as getActiveElement } from '../shared/getActiveElement.js';\n\nconst ENTRY_FOCUS = \"rovingFocusGroup.onEntryFocus\";\nconst EVENT_OPTIONS = { bubbles: false, cancelable: true };\nconst MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\")\n return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key))\n return undefined;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key))\n return undefined;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = getActiveElement();\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT)\n return;\n candidate.focus({ preventScroll });\n if (getActiveElement() !== PREVIOUSLY_FOCUSED_ELEMENT)\n return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\n\nexport { ENTRY_FOCUS as E, MAP_KEY_TO_FOCUS_INTENT as M, EVENT_OPTIONS as a, focusFirst as f, getFocusIntent as g, wrapArray as w };\n//# sourceMappingURL=utils.js.map\n","import { ref, provide, inject, defineComponent, watch, h, watchEffect, markRaw, computed } from 'vue';\nimport { u as usePrimitiveElement } from '../Primitive/usePrimitiveElement.js';\nimport { S as Slot } from '../Primitive/Slot.js';\n\nconst ITEM_DATA_ATTR = \"data-reka-collection-item\";\nfunction useCollection(options = {}) {\n const { key = \"\", isProvider = false } = options;\n const injectionKey = `${key}CollectionProvider`;\n let context;\n if (isProvider) {\n const itemMap = ref(/* @__PURE__ */ new Map());\n const collectionRef = ref();\n context = {\n collectionRef,\n itemMap\n };\n provide(injectionKey, context);\n } else {\n context = inject(injectionKey);\n }\n const getItems = (includeDisabledItem = false) => {\n const collectionNode = context.collectionRef.value;\n if (!collectionNode)\n return [];\n const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));\n const items = Array.from(context.itemMap.value.values());\n const orderedItems = items.sort(\n (a, b) => orderedNodes.indexOf(a.ref) - orderedNodes.indexOf(b.ref)\n );\n if (includeDisabledItem)\n return orderedItems;\n else\n return orderedItems.filter((i) => i.ref.dataset.disabled !== \"\");\n };\n const CollectionSlot = defineComponent({\n name: \"CollectionSlot\",\n setup(_, { slots }) {\n const { primitiveElement, currentElement } = usePrimitiveElement();\n watch(currentElement, () => {\n context.collectionRef.value = currentElement.value;\n });\n return () => h(Slot, { ref: primitiveElement }, slots);\n }\n });\n const CollectionItem = defineComponent({\n name: \"CollectionItem\",\n inheritAttrs: false,\n props: {\n value: {\n // It accepts any value\n validator: () => true\n }\n },\n setup(props, { slots, attrs }) {\n const { primitiveElement, currentElement } = usePrimitiveElement();\n watchEffect((cleanupFn) => {\n if (currentElement.value) {\n const key2 = markRaw(currentElement.value);\n context.itemMap.value.set(key2, { ref: currentElement.value, value: props.value });\n cleanupFn(() => context.itemMap.value.delete(key2));\n }\n });\n return () => h(Slot, { ...attrs, [ITEM_DATA_ATTR]: \"\", ref: primitiveElement }, slots);\n }\n });\n const reactiveItems = computed(() => Array.from(context.itemMap.value.values()));\n const itemMapSize = computed(() => context.itemMap.value.size);\n return { getItems, reactiveItems, itemMapSize, CollectionSlot, CollectionItem };\n}\n\nexport { useCollection as u };\n//# sourceMappingURL=Collection.js.map\n","import { defineComponent, toRefs, ref, openBlock, createBlock, unref, withCtx, createVNode, renderSlot } from 'vue';\nimport { useVModel } from '@vueuse/core';\nimport { f as focusFirst, E as ENTRY_FOCUS, a as EVENT_OPTIONS } from './utils.js';\nimport { u as useCollection } from '../Collection/Collection.js';\nimport { u as useDirection } from '../shared/useDirection.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { c as createContext } from '../shared/createContext.js';\n\nconst [injectRovingFocusGroupContext, provideRovingFocusGroupContext] = createContext(\"RovingFocusGroup\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"RovingFocusGroup\",\n props: {\n orientation: { default: undefined },\n dir: {},\n loop: { type: Boolean, default: false },\n currentTabStopId: {},\n defaultCurrentTabStopId: {},\n preventScrollOnEntryFocus: { type: Boolean, default: false },\n asChild: { type: Boolean },\n as: {}\n },\n emits: [\"entryFocus\", \"update:currentTabStopId\"],\n setup(__props, { expose: __expose, emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const { loop, orientation, dir: propDir } = toRefs(props);\n const dir = useDirection(propDir);\n const currentTabStopId = useVModel(props, \"currentTabStopId\", emits, {\n defaultValue: props.defaultCurrentTabStopId,\n passive: props.currentTabStopId === undefined\n });\n const isTabbingBackOut = ref(false);\n const isClickFocus = ref(false);\n const focusableItemsCount = ref(0);\n const { getItems, CollectionSlot } = useCollection({ isProvider: true });\n function handleFocus(event) {\n const isKeyboardFocus = !isClickFocus.value;\n if (event.currentTarget && event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut.value) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n emits(\"entryFocus\", entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().map((i) => i.ref).filter((i) => i.dataset.disabled !== \"\");\n const activeItem = items.find((item) => item.getAttribute(\"data-active\") === \"true\");\n const currentItem = items.find(\n (item) => item.id === currentTabStopId.value\n );\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n focusFirst(candidateItems, props.preventScrollOnEntryFocus);\n }\n }\n isClickFocus.value = false;\n }\n function handleMouseUp() {\n setTimeout(() => {\n isClickFocus.value = false;\n }, 1);\n }\n __expose({\n getItems\n });\n provideRovingFocusGroupContext({\n loop,\n dir,\n orientation,\n currentTabStopId,\n onItemFocus: (tabStopId) => {\n currentTabStopId.value = tabStopId;\n },\n onItemShiftTab: () => {\n isTabbingBackOut.value = true;\n },\n onFocusableItemAdd: () => {\n focusableItemsCount.value++;\n },\n onFocusableItemRemove: () => {\n focusableItemsCount.value--;\n }\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(CollectionSlot), null, {\n default: withCtx(() => [\n createVNode(unref(Primitive), {\n tabindex: isTabbingBackOut.value || focusableItemsCount.value === 0 ? -1 : 0,\n \"data-orientation\": unref(orientation),\n as: _ctx.as,\n \"as-child\": _ctx.asChild,\n dir: unref(dir),\n style: { \"outline\": \"none\" },\n onMousedown: _cache[0] || (_cache[0] = ($event) => isClickFocus.value = true),\n onMouseup: handleMouseUp,\n onFocus: handleFocus,\n onBlur: _cache[1] || (_cache[1] = ($event) => isTabbingBackOut.value = false)\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 8, [\"tabindex\", \"data-orientation\", \"as\", \"as-child\", \"dir\"])\n ]),\n _: 3\n });\n };\n }\n});\n\nexport { _sfc_main as _, injectRovingFocusGroupContext as i };\n//# sourceMappingURL=RovingFocusGroup.js.map\n","import { toValue, unrefElement } from '@vueuse/core';\nimport { computed } from 'vue';\n\nfunction useFormControl(el) {\n return computed(() => toValue(el) ? Boolean(unrefElement(el)?.closest(\"form\")) : true);\n}\n\nexport { useFormControl as u };\n//# sourceMappingURL=useFormControl.js.map\n","import { defineComponent, computed, watch, openBlock, createBlock, mergeProps } from 'vue';\nimport { _ as _sfc_main$1 } from './VisuallyHidden.js';\nimport { u as usePrimitiveElement } from '../Primitive/usePrimitiveElement.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n ...{\n inheritAttrs: false\n },\n __name: \"VisuallyHiddenInputBubble\",\n props: {\n name: {},\n value: {},\n checked: { type: Boolean, default: undefined },\n required: { type: Boolean },\n disabled: { type: Boolean },\n feature: { default: \"fully-hidden\" }\n },\n setup(__props) {\n const props = __props;\n const { primitiveElement, currentElement } = usePrimitiveElement();\n const valueState = computed(() => props.checked ?? props.value);\n watch(valueState, (cur, prev) => {\n if (!currentElement.value)\n return;\n const input = currentElement.value;\n const inputProto = window.HTMLInputElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(inputProto, \"value\");\n const setValue = descriptor.set;\n if (setValue && cur !== prev) {\n const inputEvent = new Event(\"input\", { bubbles: true });\n const changeEvent = new Event(\"change\", { bubbles: true });\n setValue.call(input, cur);\n input.dispatchEvent(inputEvent);\n input.dispatchEvent(changeEvent);\n }\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(_sfc_main$1, mergeProps({\n ref_key: \"primitiveElement\",\n ref: primitiveElement\n }, { ...props, ..._ctx.$attrs }, { as: \"input\" }), null, 16);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=VisuallyHiddenInputBubble.js.map\n","import { defineComponent, computed, openBlock, createElementBlock, Fragment, renderList, createBlock, mergeProps } from 'vue';\nimport { _ as _sfc_main$1 } from './VisuallyHiddenInputBubble.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n ...{\n inheritAttrs: false\n },\n __name: \"VisuallyHiddenInput\",\n props: {\n name: {},\n value: {},\n checked: { type: Boolean, default: undefined },\n required: { type: Boolean },\n disabled: { type: Boolean },\n feature: { default: \"fully-hidden\" }\n },\n setup(__props) {\n const props = __props;\n const parsedValue = computed(() => {\n if (typeof props.value === \"string\" || typeof props.value === \"number\" || typeof props.value === \"boolean\") {\n return [{ name: props.name, value: props.value }];\n } else if (typeof props.value === \"object\" && Array.isArray(props.value)) {\n return props.value.flatMap((obj, index) => {\n if (typeof obj === \"object\")\n return Object.entries(obj).map(([key, value]) => ({ name: `[${props.name}][${index}][${key}]`, value }));\n else\n return { name: `[${props.name}][${index}]`, value: obj };\n });\n } else if (props.value !== null && typeof props.value === \"object\" && !Array.isArray(props.value)) {\n return Object.entries(props.value).map(([key, value]) => ({ name: `[${props.name}][${key}]`, value }));\n }\n return [];\n });\n return (_ctx, _cache) => {\n return openBlock(true), createElementBlock(Fragment, null, renderList(parsedValue.value, (parsed) => {\n return openBlock(), createBlock(_sfc_main$1, mergeProps({\n key: parsed.name,\n ref_for: true\n }, { ...props, ..._ctx.$attrs }, {\n name: parsed.name,\n value: parsed.value\n }), null, 16, [\"name\", \"value\"]);\n }), 128);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=VisuallyHiddenInput.js.map\n","import { defineComponent, toRefs, computed, openBlock, createBlock, resolveDynamicComponent, unref, mergeProps, withCtx, renderSlot, createCommentVNode } from 'vue';\nimport { _ as _sfc_main$1 } from '../RovingFocus/RovingFocusGroup.js';\nimport { useVModel } from '@vueuse/core';\nimport { u as useDirection } from '../shared/useDirection.js';\nimport { u as usePrimitiveElement } from '../Primitive/usePrimitiveElement.js';\nimport { u as useFormControl } from '../shared/useFormControl.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { _ as _sfc_main$2 } from '../VisuallyHidden/VisuallyHiddenInput.js';\nimport { c as createContext } from '../shared/createContext.js';\n\nconst [injectCheckboxGroupRootContext, provideCheckboxGroupRootContext] = createContext(\"CheckboxGroupRoot\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"CheckboxGroupRoot\",\n props: {\n defaultValue: {},\n modelValue: {},\n rovingFocus: { type: Boolean, default: true },\n disabled: { type: Boolean },\n as: {},\n asChild: { type: Boolean },\n dir: {},\n orientation: {},\n loop: { type: Boolean },\n name: {},\n required: { type: Boolean }\n },\n emits: [\"update:modelValue\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const { disabled, rovingFocus, dir: propDir } = toRefs(props);\n const dir = useDirection(propDir);\n const { primitiveElement, currentElement } = usePrimitiveElement();\n const isFormControl = useFormControl(currentElement);\n const modelValue = useVModel(props, \"modelValue\", emits, {\n defaultValue: props.defaultValue ?? [],\n passive: props.modelValue === undefined\n });\n const rovingFocusProps = computed(() => {\n return rovingFocus.value ? { loop: props.loop, dir: dir.value, orientation: props.orientation } : {};\n });\n provideCheckboxGroupRootContext({\n modelValue,\n rovingFocus,\n disabled\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(resolveDynamicComponent(unref(rovingFocus) ? unref(_sfc_main$1) : unref(Primitive)), mergeProps({\n ref_key: \"primitiveElement\",\n ref: primitiveElement,\n as: _ctx.as,\n \"as-child\": _ctx.asChild\n }, rovingFocusProps.value), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\"),\n unref(isFormControl) && _ctx.name ? (openBlock(), createBlock(unref(_sfc_main$2), {\n key: 0,\n name: _ctx.name,\n value: unref(modelValue),\n required: _ctx.required\n }, null, 8, [\"name\", \"value\", \"required\"])) : createCommentVNode(\"\", true)\n ]),\n _: 3\n }, 16, [\"as\", \"as-child\"]);\n };\n }\n});\n\nexport { _sfc_main as _, injectCheckboxGroupRootContext as i };\n//# sourceMappingURL=CheckboxGroupRoot.js.map\n","import { defineComponent, computed, onMounted, onUnmounted, openBlock, createBlock, unref, withCtx, createVNode, renderSlot, nextTick } from 'vue';\nimport { g as getFocusIntent, w as wrapArray, f as focusFirst } from './utils.js';\nimport { u as useCollection } from '../Collection/Collection.js';\nimport { i as injectRovingFocusGroupContext } from './RovingFocusGroup.js';\nimport { u as useId } from '../shared/useId.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"RovingFocusItem\",\n props: {\n tabStopId: {},\n focusable: { type: Boolean, default: true },\n active: { type: Boolean, default: true },\n allowShiftKey: { type: Boolean },\n asChild: { type: Boolean },\n as: { default: \"span\" }\n },\n setup(__props) {\n const props = __props;\n const context = injectRovingFocusGroupContext();\n const randomId = useId();\n const id = computed(() => props.tabStopId || randomId);\n const isCurrentTabStop = computed(\n () => context.currentTabStopId.value === id.value\n );\n const { getItems, CollectionItem } = useCollection();\n onMounted(() => {\n if (props.focusable)\n context.onFocusableItemAdd();\n });\n onUnmounted(() => {\n if (props.focusable)\n context.onFocusableItemRemove();\n });\n function handleKeydown(event) {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget)\n return;\n const focusIntent = getFocusIntent(\n event,\n context.orientation.value,\n context.dir.value\n );\n if (focusIntent !== undefined) {\n if (event.metaKey || event.ctrlKey || event.altKey || (props.allowShiftKey ? false : event.shiftKey))\n return;\n event.preventDefault();\n let candidateNodes = [...getItems().map((i) => i.ref).filter((i) => i.dataset.disabled !== \"\")];\n if (focusIntent === \"last\") {\n candidateNodes.reverse();\n } else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\")\n candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(\n event.currentTarget\n );\n candidateNodes = context.loop.value ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n nextTick(() => focusFirst(candidateNodes));\n }\n }\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(CollectionItem), null, {\n default: withCtx(() => [\n createVNode(unref(Primitive), {\n tabindex: isCurrentTabStop.value ? 0 : -1,\n \"data-orientation\": unref(context).orientation.value,\n \"data-active\": _ctx.active,\n \"data-disabled\": !_ctx.focusable ? \"\" : undefined,\n as: _ctx.as,\n \"as-child\": _ctx.asChild,\n onMousedown: _cache[0] || (_cache[0] = (event) => {\n if (!_ctx.focusable) event.preventDefault();\n else unref(context).onItemFocus(id.value);\n }),\n onFocus: _cache[1] || (_cache[1] = ($event) => unref(context).onItemFocus(id.value)),\n onKeydown: handleKeydown\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 8, [\"tabindex\", \"data-orientation\", \"data-active\", \"data-disabled\", \"as\", \"as-child\"])\n ]),\n _: 3\n });\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=RovingFocusItem.js.map\n","function isIndeterminate(checked) {\n return checked === \"indeterminate\";\n}\nfunction getState(checked) {\n return isIndeterminate(checked) ? \"indeterminate\" : checked ? \"checked\" : \"unchecked\";\n}\n\nexport { getState as g, isIndeterminate as i };\n//# sourceMappingURL=utils.js.map\n","import { defineComponent, computed, openBlock, createBlock, resolveDynamicComponent, unref, mergeProps, withKeys, withModifiers, withCtx, renderSlot, createCommentVNode } from 'vue';\nimport { _ as _sfc_main$1 } from '../RovingFocus/RovingFocusItem.js';\nimport { i as isIndeterminate, g as getState } from './utils.js';\nimport { isEqual } from 'ohash';\nimport { useVModel } from '@vueuse/core';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { i as injectCheckboxGroupRootContext } from './CheckboxGroupRoot.js';\nimport { i as isNullish } from '../shared/nullish.js';\nimport { i as isValueEqualOrExist } from '../shared/isValueEqualOrExist.js';\nimport { u as useFormControl } from '../shared/useFormControl.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { _ as _sfc_main$2 } from '../VisuallyHidden/VisuallyHiddenInput.js';\nimport { c as createContext } from '../shared/createContext.js';\n\nconst [injectCheckboxRootContext, provideCheckboxRootContext] = createContext(\"CheckboxRoot\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n ...{\n inheritAttrs: false\n },\n __name: \"CheckboxRoot\",\n props: {\n defaultValue: { type: [Boolean, String] },\n modelValue: { type: [Boolean, String, null], default: undefined },\n disabled: { type: Boolean },\n value: { default: \"on\" },\n id: {},\n asChild: { type: Boolean },\n as: { default: \"button\" },\n name: {},\n required: { type: Boolean }\n },\n emits: [\"update:modelValue\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const { forwardRef, currentElement } = useForwardExpose();\n const checkboxGroupContext = injectCheckboxGroupRootContext(null);\n const modelValue = useVModel(props, \"modelValue\", emits, {\n defaultValue: props.defaultValue,\n passive: props.modelValue === undefined\n });\n const disabled = computed(() => checkboxGroupContext?.disabled.value || props.disabled);\n const checkboxState = computed(() => {\n if (!isNullish(checkboxGroupContext?.modelValue.value)) {\n return isValueEqualOrExist(checkboxGroupContext.modelValue.value, props.value);\n } else {\n return modelValue.value === \"indeterminate\" ? \"indeterminate\" : modelValue.value;\n }\n });\n function handleClick() {\n if (!isNullish(checkboxGroupContext?.modelValue.value)) {\n const modelValueArray = [...checkboxGroupContext.modelValue.value || []];\n if (isValueEqualOrExist(modelValueArray, props.value)) {\n const index = modelValueArray.findIndex((i) => isEqual(i, props.value));\n modelValueArray.splice(index, 1);\n } else {\n modelValueArray.push(props.value);\n }\n checkboxGroupContext.modelValue.value = modelValueArray;\n } else {\n modelValue.value = isIndeterminate(modelValue.value) ? true : !modelValue.value;\n }\n }\n const isFormControl = useFormControl(currentElement);\n const ariaLabel = computed(() => props.id && currentElement.value ? document.querySelector(`[for=\"${props.id}\"]`)?.innerText : undefined);\n provideCheckboxRootContext({\n disabled,\n state: checkboxState\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(resolveDynamicComponent(unref(checkboxGroupContext)?.rovingFocus.value ? unref(_sfc_main$1) : unref(Primitive)), mergeProps(_ctx.$attrs, {\n id: _ctx.id,\n ref: unref(forwardRef),\n role: \"checkbox\",\n \"as-child\": _ctx.asChild,\n as: _ctx.as,\n type: _ctx.as === \"button\" ? \"button\" : undefined,\n \"aria-checked\": unref(isIndeterminate)(checkboxState.value) ? \"mixed\" : checkboxState.value,\n \"aria-required\": _ctx.required,\n \"aria-label\": _ctx.$attrs[\"aria-label\"] || ariaLabel.value,\n \"data-state\": unref(getState)(checkboxState.value),\n \"data-disabled\": disabled.value ? \"\" : undefined,\n disabled: disabled.value,\n focusable: unref(checkboxGroupContext)?.rovingFocus.value ? !disabled.value : undefined,\n onKeydown: withKeys(withModifiers(() => {\n }, [\"prevent\"]), [\"enter\"]),\n onClick: handleClick\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", {\n modelValue: unref(modelValue),\n state: checkboxState.value\n }),\n unref(isFormControl) && _ctx.name && !unref(checkboxGroupContext) ? (openBlock(), createBlock(unref(_sfc_main$2), {\n key: 0,\n type: \"checkbox\",\n checked: !!checkboxState.value,\n name: _ctx.name,\n value: _ctx.value,\n disabled: disabled.value,\n required: _ctx.required\n }, null, 8, [\"checked\", \"name\", \"value\", \"disabled\", \"required\"])) : createCommentVNode(\"\", true)\n ]),\n _: 3\n }, 16, [\"id\", \"as-child\", \"as\", \"type\", \"aria-checked\", \"aria-required\", \"aria-label\", \"data-state\", \"data-disabled\", \"disabled\", \"focusable\", \"onKeydown\"]);\n };\n }\n});\n\nexport { _sfc_main as _, injectCheckboxRootContext as i };\n//# sourceMappingURL=CheckboxRoot.js.map\n","import { defineComponent, openBlock, createBlock, unref, withCtx, createVNode, mergeProps, renderSlot } from 'vue';\nimport { i as isIndeterminate, g as getState } from './utils.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { i as injectCheckboxRootContext } from './CheckboxRoot.js';\nimport { P as Presence } from '../Presence/Presence.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"CheckboxIndicator\",\n props: {\n forceMount: { type: Boolean },\n asChild: { type: Boolean },\n as: { default: \"span\" }\n },\n setup(__props) {\n const { forwardRef } = useForwardExpose();\n const rootContext = injectCheckboxRootContext();\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Presence), {\n present: _ctx.forceMount || unref(isIndeterminate)(unref(rootContext).state.value) || unref(rootContext).state.value === true\n }, {\n default: withCtx(() => [\n createVNode(unref(Primitive), mergeProps({\n ref: unref(forwardRef),\n \"data-state\": unref(getState)(unref(rootContext).state.value),\n \"data-disabled\": unref(rootContext).disabled.value ? \"\" : undefined,\n style: { pointerEvents: \"none\" },\n \"as-child\": _ctx.asChild,\n as: _ctx.as\n }, _ctx.$attrs), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16, [\"data-state\", \"data-disabled\", \"as-child\", \"as\"])\n ]),\n _: 3\n }, 8, [\"present\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=CheckboxIndicator.js.map\n","import { defineComponent, ref, renderSlot } from 'vue';\nimport { c as createContext } from '../shared/createContext.js';\n\nconst [injectPopperRootContext, providePopperRootContext] = createContext(\"PopperRoot\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n ...{\n inheritAttrs: false\n },\n __name: \"PopperRoot\",\n setup(__props) {\n const anchor = ref();\n providePopperRootContext({\n anchor,\n onAnchorChange: (element) => anchor.value = element\n });\n return (_ctx, _cache) => {\n return renderSlot(_ctx.$slots, \"default\");\n };\n }\n});\n\nexport { _sfc_main as _, injectPopperRootContext as i };\n//# sourceMappingURL=PopperRoot.js.map\n","import { computed, unref } from 'vue';\n\nfunction useFilter(options) {\n const computedOptions = computed(() => unref(options));\n const collator = computed(() => new Intl.Collator(\"en\", { usage: \"search\", ...computedOptions.value }));\n const startsWith = (string, substring) => {\n if (substring.length === 0)\n return true;\n string = string.normalize(\"NFC\");\n substring = substring.normalize(\"NFC\");\n return collator.value.compare(string.slice(0, substring.length), substring) === 0;\n };\n const endsWith = (string, substring) => {\n if (substring.length === 0)\n return true;\n string = string.normalize(\"NFC\");\n substring = substring.normalize(\"NFC\");\n return collator.value.compare(string.slice(-substring.length), substring) === 0;\n };\n const contains = (string, substring) => {\n if (substring.length === 0)\n return true;\n string = string.normalize(\"NFC\");\n substring = substring.normalize(\"NFC\");\n let scan = 0;\n const sliceLen = substring.length;\n for (; scan + sliceLen <= string.length; scan++) {\n const slice = string.slice(scan, scan + sliceLen);\n if (collator.value.compare(substring, slice) === 0)\n return true;\n }\n return false;\n };\n return {\n startsWith,\n endsWith,\n contains\n };\n}\n\nexport { useFilter as u };\n//# sourceMappingURL=useFilter.js.map\n","import { isEqual } from 'ohash';\n\nfunction queryCheckedElement(parentEl) {\n return parentEl?.querySelector(\"[data-state=checked]\");\n}\nfunction valueComparator(value, currentValue, comparator) {\n if (value === undefined)\n return false;\n else if (Array.isArray(value))\n return value.some((val) => compare(val, currentValue, comparator));\n else\n return compare(value, currentValue, comparator);\n}\nfunction compare(value, currentValue, comparator) {\n if (value === undefined || currentValue === undefined)\n return false;\n if (typeof value === \"string\")\n return value === currentValue;\n if (typeof comparator === \"function\")\n return comparator(value, currentValue);\n if (typeof comparator === \"string\")\n return value?.[comparator] === currentValue?.[comparator];\n return isEqual(value, currentValue);\n}\n\nexport { compare as c, queryCheckedElement as q, valueComparator as v };\n//# sourceMappingURL=utils.js.map\n","import { refAutoReset } from '@vueuse/shared';\nimport { g as getActiveElement } from './getActiveElement.js';\n\nfunction useTypeahead(callback) {\n const search = refAutoReset(\"\", 1e3);\n const handleTypeaheadSearch = (key, items) => {\n search.value = search.value + key;\n {\n const currentItem = getActiveElement();\n const itemsWithTextValue = items.map((item) => ({\n ...item,\n textValue: item.value?.textValue ?? item.ref.textContent?.trim() ?? \"\"\n }));\n const currentMatch = itemsWithTextValue.find((item) => item.ref === currentItem);\n const values = itemsWithTextValue.map((item) => item.textValue);\n const nextMatch = getNextMatch(values, search.value, currentMatch?.textValue);\n const newItem = itemsWithTextValue.find((item) => item.textValue === nextMatch);\n if (newItem)\n newItem.ref.focus();\n return newItem?.ref;\n }\n };\n const resetTypeahead = () => {\n search.value = \"\";\n };\n return {\n search,\n handleTypeaheadSearch,\n resetTypeahead\n };\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nfunction getNextMatch(values, search, currentMatch) {\n const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);\n const normalizedSearch = isRepeated ? search[0] : search;\n const currentMatchIndex = currentMatch ? values.indexOf(currentMatch) : -1;\n let wrappedValues = wrapArray(values, Math.max(currentMatchIndex, 0));\n const excludeCurrentMatch = normalizedSearch.length === 1;\n if (excludeCurrentMatch)\n wrappedValues = wrappedValues.filter((v) => v !== currentMatch);\n const nextMatch = wrappedValues.find(\n (value) => value.toLowerCase().startsWith(normalizedSearch.toLowerCase())\n );\n return nextMatch !== currentMatch ? nextMatch : undefined;\n}\n\nexport { getNextMatch as g, useTypeahead as u, wrapArray as w };\n//# sourceMappingURL=useTypeahead.js.map\n","import { isEqual } from 'ohash';\n\nfunction areEqual(arrayA, arrayB) {\n if (arrayA.length !== arrayB.length)\n return false;\n for (let index = 0; index < arrayA.length; index++) {\n if (arrayA[index] !== arrayB[index])\n return false;\n }\n return true;\n}\nfunction findValuesBetween(array, start, end) {\n const startIndex = array.findIndex((i) => isEqual(i, start));\n const endIndex = array.findIndex((i) => isEqual(i, end));\n if (startIndex === -1 || endIndex === -1)\n return [];\n const [minIndex, maxIndex] = [startIndex, endIndex].sort((a, b) => a - b);\n return array.slice(minIndex, maxIndex + 1);\n}\n\nexport { areEqual as a, findValuesBetween as f };\n//# sourceMappingURL=arrays.js.map\n","import { defineComponent, toRefs, ref, watch, nextTick, openBlock, createBlock, unref, withCtx, renderSlot, createCommentVNode } from 'vue';\nimport { useVModel, createEventHook } from '@vueuse/core';\nimport { c as compare } from './utils.js';\nimport { u as useCollection } from '../Collection/Collection.js';\nimport '@floating-ui/vue';\nimport { g as getFocusIntent } from '../RovingFocus/utils.js';\nimport { u as useTypeahead } from '../shared/useTypeahead.js';\nimport { u as usePrimitiveElement } from '../Primitive/usePrimitiveElement.js';\nimport { u as useDirection } from '../shared/useDirection.js';\nimport { u as useFormControl } from '../shared/useFormControl.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { _ as _sfc_main$1 } from '../VisuallyHidden/VisuallyHiddenInput.js';\nimport { c as createContext } from '../shared/createContext.js';\nimport { f as findValuesBetween } from '../shared/arrays.js';\nimport { u as useKbd } from '../shared/useKbd.js';\n\nconst [injectListboxRootContext, provideListboxRootContext] = createContext(\"ListboxRoot\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"ListboxRoot\",\n props: {\n modelValue: {},\n defaultValue: {},\n multiple: { type: Boolean },\n orientation: { default: \"vertical\" },\n dir: {},\n disabled: { type: Boolean },\n selectionBehavior: { default: \"toggle\" },\n highlightOnHover: { type: Boolean },\n by: {},\n asChild: { type: Boolean },\n as: {},\n name: {},\n required: { type: Boolean }\n },\n emits: [\"update:modelValue\", \"highlight\", \"entryFocus\", \"leave\"],\n setup(__props, { expose: __expose, emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const { multiple, highlightOnHover, orientation, disabled, selectionBehavior, dir: propDir } = toRefs(props);\n const { getItems } = useCollection({ isProvider: true });\n const { handleTypeaheadSearch } = useTypeahead();\n const { primitiveElement, currentElement } = usePrimitiveElement();\n const kbd = useKbd();\n const dir = useDirection(propDir);\n const isFormControl = useFormControl(currentElement);\n const firstValue = ref();\n const isUserAction = ref(false);\n const focusable = ref(true);\n const modelValue = useVModel(props, \"modelValue\", emits, {\n defaultValue: props.defaultValue ?? (multiple.value ? [] : undefined),\n passive: props.modelValue === undefined,\n deep: true\n });\n function onValueChange(val) {\n isUserAction.value = true;\n if (props.multiple) {\n const modelArray = Array.isArray(modelValue.value) ? [...modelValue.value] : [];\n const index = modelArray.findIndex((i) => compare(i, val, props.by));\n if (props.selectionBehavior === \"toggle\") {\n index === -1 ? modelArray.push(val) : modelArray.splice(index, 1);\n modelValue.value = modelArray;\n } else {\n modelValue.value = [val];\n firstValue.value = val;\n }\n } else {\n if (props.selectionBehavior === \"toggle\") {\n if (compare(modelValue.value, val, props.by))\n modelValue.value = undefined;\n else\n modelValue.value = val;\n } else {\n modelValue.value = val;\n }\n }\n setTimeout(() => {\n isUserAction.value = false;\n }, 1);\n }\n const highlightedElement = ref(null);\n const previousElement = ref(null);\n const isVirtual = ref(false);\n const isComposing = ref(false);\n const virtualFocusHook = createEventHook();\n const virtualKeydownHook = createEventHook();\n const virtualHighlightHook = createEventHook();\n function getCollectionItem() {\n return getItems().map((i) => i.ref).filter((i) => i.dataset.disabled !== \"\");\n }\n function changeHighlight(el, scrollIntoView = true) {\n if (!el)\n return;\n highlightedElement.value = el;\n if (focusable.value)\n highlightedElement.value.focus();\n if (scrollIntoView)\n highlightedElement.value.scrollIntoView({ block: \"nearest\" });\n const highlightedItem = getItems().find((i) => i.ref === el);\n emits(\"highlight\", highlightedItem);\n }\n function highlightItem(value) {\n if (isVirtual.value) {\n virtualHighlightHook.trigger(value);\n } else {\n const item = getItems().find((i) => compare(i.value, value, props.by));\n if (item) {\n highlightedElement.value = item.ref;\n changeHighlight(item.ref);\n }\n }\n }\n function onKeydownEnter(event) {\n if (highlightedElement.value && highlightedElement.value.isConnected) {\n event.preventDefault();\n event.stopPropagation();\n if (!isComposing.value) {\n highlightedElement.value.click();\n }\n }\n }\n function onKeydownTypeAhead(event) {\n if (!focusable.value)\n return;\n isUserAction.value = true;\n if (isVirtual.value) {\n virtualKeydownHook.trigger(event);\n } else {\n const isMetaKey = event.altKey || event.ctrlKey || event.metaKey;\n if (isMetaKey && event.key === \"a\" && multiple.value) {\n const collection = getItems();\n const values = collection.map((i) => i.value);\n modelValue.value = [...values];\n event.preventDefault();\n changeHighlight(collection[collection.length - 1].ref);\n } else if (!isMetaKey) {\n const el = handleTypeaheadSearch(event.key, getItems());\n if (el)\n changeHighlight(el);\n }\n }\n setTimeout(() => {\n isUserAction.value = false;\n }, 1);\n }\n function onCompositionStart() {\n isComposing.value = true;\n }\n function onCompositionEnd() {\n requestAnimationFrame(() => {\n isComposing.value = false;\n });\n }\n function highlightFirstItem() {\n nextTick(() => {\n const event = new KeyboardEvent(\"keydown\", { key: \"PageUp\" });\n onKeydownNavigation(event);\n });\n }\n function onLeave(event) {\n const el = highlightedElement.value;\n if (el?.isConnected) {\n previousElement.value = el;\n }\n highlightedElement.value = null;\n emits(\"leave\", event);\n }\n function onEnter(event) {\n const entryFocusEvent = new CustomEvent(\"listbox.entryFocus\", { bubbles: false, cancelable: true });\n event.currentTarget?.dispatchEvent(entryFocusEvent);\n emits(\"entryFocus\", entryFocusEvent);\n if (entryFocusEvent.defaultPrevented)\n return;\n if (previousElement.value) {\n changeHighlight(previousElement.value);\n } else {\n const el = getCollectionItem()?.[0];\n changeHighlight(el);\n }\n }\n function onKeydownNavigation(event) {\n const intent = getFocusIntent(event, orientation.value, dir.value);\n if (!intent)\n return;\n let collection = getCollectionItem();\n if (highlightedElement.value) {\n if (intent === \"last\") {\n collection.reverse();\n } else if (intent === \"prev\" || intent === \"next\") {\n if (intent === \"prev\")\n collection.reverse();\n const currentIndex = collection.indexOf(highlightedElement.value);\n collection = collection.slice(currentIndex + 1);\n }\n handleMultipleReplace(event, collection[0]);\n }\n if (collection.length) {\n const index = !highlightedElement.value && intent === \"prev\" ? collection.length - 1 : 0;\n changeHighlight(collection[index]);\n }\n if (isVirtual.value)\n return virtualKeydownHook.trigger(event);\n }\n function handleMultipleReplace(event, targetEl) {\n if (isVirtual.value || props.selectionBehavior !== \"replace\" || !multiple.value || !Array.isArray(modelValue.value))\n return;\n const isMetaKey = event.altKey || event.ctrlKey || event.metaKey;\n if (isMetaKey && !event.shiftKey)\n return;\n if (event.shiftKey) {\n const collection = getItems().filter((i) => i.ref.dataset.disabled !== \"\");\n let lastValue = collection.find((i) => i.ref === targetEl)?.value;\n if (event.key === kbd.END)\n lastValue = collection[collection.length - 1].value;\n else if (event.key === kbd.HOME)\n lastValue = collection[0].value;\n if (!lastValue || !firstValue.value)\n return;\n const values = findValuesBetween(collection.map((i) => i.value), firstValue.value, lastValue);\n modelValue.value = values;\n }\n }\n async function highlightSelected(event) {\n await nextTick();\n if (isVirtual.value) {\n virtualFocusHook.trigger(event);\n } else {\n const collection = getCollectionItem();\n const item = collection.find((i) => i.dataset.state === \"checked\");\n if (item)\n changeHighlight(item);\n else if (collection.length)\n changeHighlight(collection[0]);\n }\n }\n watch(modelValue, () => {\n if (!isUserAction.value) {\n nextTick(() => {\n highlightSelected();\n });\n }\n }, { immediate: true, deep: true });\n __expose({\n highlightedElement,\n highlightItem,\n highlightFirstItem,\n highlightSelected,\n getItems\n });\n provideListboxRootContext({\n modelValue,\n // @ts-expect-error ignoring\n onValueChange,\n multiple,\n orientation,\n dir,\n disabled,\n highlightOnHover,\n highlightedElement,\n isVirtual,\n virtualFocusHook,\n virtualKeydownHook,\n virtualHighlightHook,\n by: props.by,\n firstValue,\n selectionBehavior,\n focusable,\n onLeave,\n onEnter,\n changeHighlight,\n onKeydownEnter,\n onKeydownNavigation,\n onKeydownTypeAhead,\n onCompositionStart,\n onCompositionEnd,\n highlightFirstItem\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), {\n ref_key: \"primitiveElement\",\n ref: primitiveElement,\n as: _ctx.as,\n \"as-child\": _ctx.asChild,\n dir: unref(dir),\n \"data-disabled\": unref(disabled) ? \"\" : undefined,\n onPointerleave: onLeave,\n onFocusout: _cache[0] || (_cache[0] = async (event) => {\n const target = event.relatedTarget || event.target;\n await nextTick();\n if (highlightedElement.value && unref(currentElement) && !unref(currentElement).contains(target)) {\n onLeave(event);\n }\n })\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", { modelValue: unref(modelValue) }),\n unref(isFormControl) && _ctx.name ? (openBlock(), createBlock(unref(_sfc_main$1), {\n key: 0,\n name: _ctx.name,\n value: unref(modelValue),\n disabled: unref(disabled),\n required: _ctx.required\n }, null, 8, [\"name\", \"value\", \"disabled\", \"required\"])) : createCommentVNode(\"\", true)\n ]),\n _: 3\n }, 8, [\"as\", \"as-child\", \"dir\", \"data-disabled\"]);\n };\n }\n});\n\nexport { _sfc_main as _, injectListboxRootContext as i };\n//# sourceMappingURL=ListboxRoot.js.map\n","import { defineComponent, toRefs, ref, computed, reactive, watch, nextTick, getCurrentInstance, onMounted, openBlock, createBlock, unref, withCtx, createVNode, mergeProps, isRef, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from '../Popper/PopperRoot.js';\nimport { useVModel, createEventHook } from '@vueuse/core';\nimport { u as usePrimitiveElement } from '../Primitive/usePrimitiveElement.js';\nimport { u as useDirection } from '../shared/useDirection.js';\nimport { u as useFilter } from '../shared/useFilter.js';\nimport { _ as _sfc_main$2 } from '../Listbox/ListboxRoot.js';\nimport { c as createContext } from '../shared/createContext.js';\n\nconst [injectComboboxRootContext, provideComboboxRootContext] = createContext(\"ComboboxRoot\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"ComboboxRoot\",\n props: {\n open: { type: Boolean, default: undefined },\n defaultOpen: { type: Boolean },\n resetSearchTermOnBlur: { type: Boolean, default: true },\n resetSearchTermOnSelect: { type: Boolean, default: true },\n ignoreFilter: { type: Boolean },\n modelValue: {},\n defaultValue: {},\n multiple: { type: Boolean },\n dir: {},\n disabled: { type: Boolean },\n highlightOnHover: { type: Boolean },\n by: {},\n asChild: { type: Boolean },\n as: {},\n name: {},\n required: { type: Boolean }\n },\n emits: [\"update:modelValue\", \"highlight\", \"update:open\"],\n setup(__props, { expose: __expose, emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const { primitiveElement, currentElement: parentElement } = usePrimitiveElement();\n const { multiple, disabled, ignoreFilter, resetSearchTermOnSelect, dir: propDir } = toRefs(props);\n const dir = useDirection(propDir);\n const modelValue = useVModel(props, \"modelValue\", emits, {\n // @ts-expect-error ignore the type error here\n defaultValue: props.defaultValue ?? (multiple.value ? [] : undefined),\n passive: props.modelValue === undefined,\n deep: true\n });\n const open = useVModel(props, \"open\", emits, {\n defaultValue: props.defaultOpen,\n passive: props.open === undefined\n });\n async function onOpenChange(val) {\n open.value = val;\n filterState.search = \"\";\n if (val) {\n await nextTick();\n primitiveElement.value?.highlightSelected();\n isUserInputted.value = true;\n } else {\n isUserInputted.value = false;\n }\n inputElement.value?.focus();\n setTimeout(() => {\n if (!val && props.resetSearchTermOnBlur)\n resetSearchTerm.trigger();\n }, 1);\n }\n const resetSearchTerm = createEventHook();\n const isUserInputted = ref(false);\n const isVirtual = ref(false);\n const inputElement = ref();\n const triggerElement = ref();\n const highlightedElement = computed(() => primitiveElement.value?.highlightedElement ?? undefined);\n const allItems = ref(/* @__PURE__ */ new Map());\n const allGroups = ref(/* @__PURE__ */ new Map());\n const { contains } = useFilter({ sensitivity: \"base\" });\n const filterState = reactive({\n search: \"\",\n filtered: {\n /** The count of all visible items. */\n count: 0,\n /** Map from visible item id to its search score. */\n items: /* @__PURE__ */ new Map(),\n /** Set of groups with at least one visible item. */\n groups: /* @__PURE__ */ new Set()\n }\n });\n function filterItems() {\n if (!filterState.search || props.ignoreFilter || isVirtual.value) {\n filterState.filtered.count = allItems.value.size;\n return;\n }\n filterState.filtered.groups = /* @__PURE__ */ new Set();\n let itemCount = 0;\n for (const [id, value] of allItems.value) {\n const score = contains(value, filterState.search);\n filterState.filtered.items.set(id, score ? 1 : 0);\n if (score)\n itemCount++;\n }\n for (const [groupId, group] of allGroups.value) {\n for (const itemId of group) {\n if (filterState.filtered.items.get(itemId) > 0) {\n filterState.filtered.groups.add(groupId);\n break;\n }\n }\n }\n filterState.filtered.count = itemCount;\n }\n watch([() => filterState.search, () => allItems.value.size], () => {\n filterItems();\n }, { immediate: true });\n watch(() => open.value, () => {\n nextTick(() => {\n if (open.value)\n filterItems();\n });\n }, { flush: \"post\" });\n const inst = getCurrentInstance();\n onMounted(() => {\n if (inst?.exposed) {\n inst.exposed.highlightItem = primitiveElement.value?.highlightItem;\n inst.exposed.highlightFirstItem = primitiveElement.value?.highlightFirstItem;\n inst.exposed.highlightSelected = primitiveElement.value?.highlightSelected;\n }\n });\n __expose({\n filtered: computed(() => filterState.filtered),\n highlightedElement,\n highlightItem: primitiveElement.value?.highlightItem,\n highlightFirstItem: primitiveElement.value?.highlightFirstItem,\n highlightSelected: primitiveElement.value?.highlightSelected\n });\n provideComboboxRootContext({\n modelValue,\n multiple,\n disabled,\n open,\n onOpenChange,\n contentId: \"\",\n isUserInputted,\n isVirtual,\n inputElement,\n highlightedElement,\n onInputElementChange: (val) => inputElement.value = val,\n triggerElement,\n onTriggerElementChange: (val) => triggerElement.value = val,\n parentElement,\n resetSearchTermOnSelect,\n onResetSearchTerm: resetSearchTerm.on,\n allItems,\n allGroups,\n filterState,\n ignoreFilter\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), null, {\n default: withCtx(() => [\n createVNode(unref(_sfc_main$2), mergeProps({\n ref_key: \"primitiveElement\",\n ref: primitiveElement\n }, _ctx.$attrs, {\n modelValue: unref(modelValue),\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),\n style: {\n pointerEvents: unref(open) ? \"auto\" : undefined\n },\n as: _ctx.as,\n \"as-child\": _ctx.asChild,\n dir: unref(dir),\n multiple: unref(multiple),\n name: _ctx.name,\n required: _ctx.required,\n disabled: unref(disabled),\n \"highlight-on-hover\": true,\n by: props.by,\n onHighlight: _cache[1] || (_cache[1] = ($event) => emits(\"highlight\", $event))\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", {\n open: unref(open),\n modelValue: unref(modelValue)\n })\n ]),\n _: 3\n }, 16, [\"modelValue\", \"style\", \"as\", \"as-child\", \"dir\", \"multiple\", \"name\", \"required\", \"disabled\", \"by\"])\n ]),\n _: 3\n });\n };\n }\n});\n\nexport { _sfc_main as _, injectComboboxRootContext as i };\n//# sourceMappingURL=ComboboxRoot.js.map\n","import { defineComponent, computed, ref, watchSyncEffect, onMounted, openBlock, createBlock, unref, withKeys, withModifiers, withCtx, renderSlot } from 'vue';\nimport { useVModel } from '@vueuse/core';\nimport '@floating-ui/vue';\nimport { u as usePrimitiveElement } from '../Primitive/usePrimitiveElement.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { i as injectListboxRootContext } from './ListboxRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"ListboxFilter\",\n props: {\n modelValue: {},\n autoFocus: { type: Boolean },\n disabled: { type: Boolean },\n asChild: { type: Boolean },\n as: { default: \"input\" }\n },\n emits: [\"update:modelValue\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const modelValue = useVModel(props, \"modelValue\", emits, {\n defaultValue: \"\",\n passive: props.modelValue === undefined\n });\n const rootContext = injectListboxRootContext();\n rootContext.focusable.value = false;\n const { primitiveElement, currentElement } = usePrimitiveElement();\n const disabled = computed(() => props.disabled || rootContext.disabled.value || false);\n const activedescendant = ref();\n watchSyncEffect(() => activedescendant.value = rootContext.highlightedElement.value?.id);\n onMounted(() => {\n setTimeout(() => {\n if (props.autoFocus)\n currentElement.value?.focus();\n }, 1);\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), {\n ref_key: \"primitiveElement\",\n ref: primitiveElement,\n as: _ctx.as,\n \"as-child\": _ctx.asChild,\n value: unref(modelValue),\n disabled: disabled.value ? \"\" : undefined,\n \"data-disabled\": disabled.value ? \"\" : undefined,\n \"aria-disabled\": disabled.value ?? undefined,\n \"aria-activedescendant\": activedescendant.value,\n type: \"text\",\n onKeydown: [\n withKeys(withModifiers(unref(rootContext).onKeydownNavigation, [\"prevent\"]), [\"down\", \"up\", \"home\", \"end\"]),\n withKeys(unref(rootContext).onKeydownEnter, [\"enter\"])\n ],\n onInput: _cache[0] || (_cache[0] = (event) => {\n modelValue.value = event.target.value;\n unref(rootContext).highlightFirstItem(event);\n }),\n onCompositionstart: unref(rootContext).onCompositionStart,\n onCompositionend: unref(rootContext).onCompositionEnd\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", { modelValue: unref(modelValue) })\n ]),\n _: 3\n }, 8, [\"as\", \"as-child\", \"value\", \"disabled\", \"data-disabled\", \"aria-disabled\", \"aria-activedescendant\", \"onKeydown\", \"onCompositionstart\", \"onCompositionend\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=ListboxFilter.js.map\n","import { defineComponent, onMounted, watch, openBlock, createBlock, unref, isRef, withKeys, withModifiers, withCtx, renderSlot, nextTick } from 'vue';\nimport { useVModel } from '@vueuse/core';\nimport { i as injectComboboxRootContext } from './ComboboxRoot.js';\nimport { u as usePrimitiveElement } from '../Primitive/usePrimitiveElement.js';\nimport { _ as _sfc_main$1 } from '../Listbox/ListboxFilter.js';\nimport { i as injectListboxRootContext } from '../Listbox/ListboxRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"ComboboxInput\",\n props: {\n displayValue: {},\n modelValue: {},\n autoFocus: { type: Boolean },\n disabled: { type: Boolean },\n asChild: { type: Boolean },\n as: { default: \"input\" }\n },\n emits: [\"update:modelValue\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const rootContext = injectComboboxRootContext();\n const listboxContext = injectListboxRootContext();\n const { primitiveElement, currentElement } = usePrimitiveElement();\n const modelValue = useVModel(props, \"modelValue\", emits, {\n passive: props.modelValue === undefined\n });\n onMounted(() => {\n if (currentElement.value)\n rootContext.onInputElementChange(currentElement.value);\n });\n function handleKeyDown(ev) {\n if (!rootContext.open.value)\n rootContext.onOpenChange(true);\n }\n function handleInput(event) {\n const target = event.target;\n if (!rootContext.open.value) {\n rootContext.onOpenChange(true);\n nextTick(() => {\n if (target.value) {\n rootContext.filterState.search = target.value;\n listboxContext.highlightFirstItem(event);\n }\n });\n } else {\n rootContext.filterState.search = target.value;\n }\n }\n function resetSearchTerm() {\n const rootModelValue = rootContext.modelValue.value;\n if (props.displayValue) {\n modelValue.value = props.displayValue(rootModelValue);\n } else if (!rootContext.multiple.value && rootModelValue && !Array.isArray(rootModelValue)) {\n if (typeof rootModelValue !== \"object\")\n modelValue.value = rootModelValue.toString();\n else modelValue.value = \"\";\n } else {\n modelValue.value = \"\";\n }\n nextTick(() => {\n modelValue.value = modelValue.value;\n });\n }\n rootContext.onResetSearchTerm(() => {\n resetSearchTerm();\n });\n watch(rootContext.modelValue, async () => {\n if (!rootContext.isUserInputted.value && rootContext.resetSearchTermOnSelect.value)\n resetSearchTerm();\n }, { immediate: true, deep: true });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), {\n ref_key: \"primitiveElement\",\n ref: primitiveElement,\n modelValue: unref(modelValue),\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),\n as: _ctx.as,\n \"as-child\": _ctx.asChild,\n \"auto-focus\": _ctx.autoFocus,\n \"aria-expanded\": unref(rootContext).open.value,\n \"aria-controls\": unref(rootContext).contentId,\n \"aria-autocomplete\": \"list\",\n role: \"combobox\",\n autocomplete: \"false\",\n onInput: handleInput,\n onKeydown: withKeys(withModifiers(handleKeyDown, [\"prevent\"]), [\"down\", \"up\"])\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 8, [\"modelValue\", \"as\", \"as-child\", \"auto-focus\", \"aria-expanded\", \"aria-controls\", \"onKeydown\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=ComboboxInput.js.map\n","import { defineComponent, watchPostEffect, openBlock, createBlock, unref, withCtx, renderSlot } from 'vue';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { i as injectPopperRootContext } from './PopperRoot.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"PopperAnchor\",\n props: {\n reference: {},\n asChild: { type: Boolean },\n as: {}\n },\n setup(__props) {\n const props = __props;\n const { forwardRef, currentElement } = useForwardExpose();\n const rootContext = injectPopperRootContext();\n watchPostEffect(() => {\n rootContext.onAnchorChange(props.reference ?? currentElement.value);\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), {\n ref: unref(forwardRef),\n as: _ctx.as,\n \"as-child\": _ctx.asChild\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 8, [\"as\", \"as-child\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=PopperAnchor.js.map\n","import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from 'vue';\nimport { u as useId } from '../shared/useId.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { c as createContext } from '../shared/createContext.js';\n\nconst [injectListboxGroupContext, provideListboxGroupContext] = createContext(\"ListboxGroup\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"ListboxGroup\",\n props: {\n asChild: { type: Boolean },\n as: {}\n },\n setup(__props) {\n const props = __props;\n const id = useId(undefined, \"reka-listbox-group\");\n provideListboxGroupContext({ id });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), mergeProps({ role: \"group\" }, props, { \"aria-labelledby\": unref(id) }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16, [\"aria-labelledby\"]);\n };\n }\n});\n\nexport { _sfc_main as _, injectListboxGroupContext as i };\n//# sourceMappingURL=ListboxGroup.js.map\n","import { defineComponent, computed, onMounted, onUnmounted, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from 'vue';\nimport { u as useId } from '../shared/useId.js';\nimport { _ as _sfc_main$1 } from '../Listbox/ListboxGroup.js';\nimport { c as createContext } from '../shared/createContext.js';\nimport { i as injectComboboxRootContext } from './ComboboxRoot.js';\n\nconst [injectComboboxGroupContext, provideComboboxGroupContext] = createContext(\"ComboboxGroup\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"ComboboxGroup\",\n props: {\n asChild: { type: Boolean },\n as: {}\n },\n setup(__props) {\n const props = __props;\n const id = useId(undefined, \"reka-combobox-group\");\n const rootContext = injectComboboxRootContext();\n const isRender = computed(() => rootContext.ignoreFilter.value ? true : !rootContext.filterState.search ? true : rootContext.filterState.filtered.groups.has(id));\n const context = provideComboboxGroupContext({\n id,\n labelId: \"\"\n });\n onMounted(() => {\n if (!rootContext.allGroups.value.has(id))\n rootContext.allGroups.value.set(id, /* @__PURE__ */ new Set());\n });\n onUnmounted(() => {\n rootContext.allGroups.value.delete(id);\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), mergeProps({\n id: unref(id),\n \"aria-labelledby\": unref(context).labelId\n }, props, {\n hidden: isRender.value ? undefined : true\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16, [\"id\", \"aria-labelledby\", \"hidden\"]);\n };\n }\n});\n\nexport { _sfc_main as _, injectComboboxGroupContext as i };\n//# sourceMappingURL=ComboboxGroup.js.map\n","import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from 'vue';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { i as injectComboboxGroupContext } from './ComboboxGroup.js';\nimport { u as useId } from '../shared/useId.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"ComboboxLabel\",\n props: {\n for: {},\n asChild: { type: Boolean },\n as: { default: \"div\" }\n },\n setup(__props) {\n const props = __props;\n useForwardExpose();\n const groupContext = injectComboboxGroupContext({ id: \"\", labelId: \"\" });\n groupContext.labelId ||= useId(undefined, \"reka-combobox-group-label\");\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), mergeProps(props, {\n id: unref(groupContext).labelId\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16, [\"id\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=ComboboxLabel.js.map\n","function isNotNull(value) {\n return value !== null;\n}\nfunction transformOrigin(options) {\n return {\n name: \"transformOrigin\",\n options,\n fn(data) {\n const { placement, rects, middlewareData } = data;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n const isArrowHidden = cannotCenterArrow;\n const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;\n const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n const noArrowAlign = { start: \"0%\", center: \"50%\", end: \"100%\" }[placedAlign];\n const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2;\n const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2;\n let x = \"\";\n let y = \"\";\n if (placedSide === \"bottom\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${-arrowHeight}px`;\n } else if (placedSide === \"top\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${rects.floating.height + arrowHeight}px`;\n } else if (placedSide === \"right\") {\n x = `${-arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n } else if (placedSide === \"left\") {\n x = `${rects.floating.width + arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n }\n return { data: { x, y } };\n }\n };\n}\nfunction getSideAndAlignFromPlacement(placement) {\n const [side, align = \"center\"] = placement.split(\"-\");\n return [side, align];\n}\n\nexport { getSideAndAlignFromPlacement as g, isNotNull as i, transformOrigin as t };\n//# sourceMappingURL=utils.js.map\n","import { unrefElement } from '@vueuse/core';\nimport { ref, computed, onMounted } from 'vue';\n\nfunction useSize(element) {\n const size = ref();\n const width = computed(() => size.value?.width ?? 0);\n const height = computed(() => size.value?.height ?? 0);\n onMounted(() => {\n const el = unrefElement(element);\n if (el) {\n size.value = { width: el.offsetWidth, height: el.offsetHeight };\n const resizeObserver = new ResizeObserver((entries) => {\n if (!Array.isArray(entries))\n return;\n if (!entries.length)\n return;\n const entry = entries[0];\n let width2;\n let height2;\n if (\"borderBoxSize\" in entry) {\n const borderSizeEntry = entry.borderBoxSize;\n const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;\n width2 = borderSize.inlineSize;\n height2 = borderSize.blockSize;\n } else {\n width2 = el.offsetWidth;\n height2 = el.offsetHeight;\n }\n size.value = { width: width2, height: height2 };\n });\n resizeObserver.observe(el, { box: \"border-box\" });\n return () => resizeObserver.unobserve(el);\n } else {\n size.value = undefined;\n }\n });\n return {\n width,\n height\n };\n}\n\nexport { useSize as u };\n//# sourceMappingURL=useSize.js.map\n","import { defineComponent, mergeDefaults, ref, computed, watchPostEffect, watchEffect, openBlock, createElementBlock, normalizeStyle, unref, createVNode, mergeProps, withCtx, renderSlot } from 'vue';\nimport { computedEager } from '@vueuse/core';\nimport { offset, flip, shift, limitShift, size, arrow, hide, useFloating, autoUpdate } from '@floating-ui/vue';\nimport { i as isNotNull, t as transformOrigin, g as getSideAndAlignFromPlacement } from './utils.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { u as useSize } from '../shared/useSize.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { c as createContext } from '../shared/createContext.js';\nimport { i as injectPopperRootContext } from './PopperRoot.js';\n\nconst PopperContentPropsDefaultValue = {\n side: \"bottom\",\n sideOffset: 0,\n align: \"center\",\n alignOffset: 0,\n arrowPadding: 0,\n avoidCollisions: true,\n collisionBoundary: () => [],\n collisionPadding: 0,\n sticky: \"partial\",\n hideWhenDetached: false,\n positionStrategy: \"fixed\",\n updatePositionStrategy: \"optimized\",\n prioritizePosition: false\n};\nconst [injectPopperContentContext, providePopperContentContext] = createContext(\"PopperContent\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n ...{\n inheritAttrs: false\n },\n __name: \"PopperContent\",\n props: /* @__PURE__ */ mergeDefaults({\n side: {},\n sideOffset: {},\n align: {},\n alignOffset: {},\n avoidCollisions: { type: Boolean },\n collisionBoundary: {},\n collisionPadding: {},\n arrowPadding: {},\n sticky: {},\n hideWhenDetached: { type: Boolean },\n positionStrategy: {},\n updatePositionStrategy: {},\n disableUpdateOnLayoutShift: { type: Boolean },\n prioritizePosition: { type: Boolean },\n reference: {},\n asChild: { type: Boolean },\n as: {}\n }, {\n ...PopperContentPropsDefaultValue\n }),\n emits: [\"placed\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const rootContext = injectPopperRootContext();\n const { forwardRef, currentElement: contentElement } = useForwardExpose();\n const floatingRef = ref();\n const arrow$1 = ref();\n const { width: arrowWidth, height: arrowHeight } = useSize(arrow$1);\n const desiredPlacement = computed(\n () => props.side + (props.align !== \"center\" ? `-${props.align}` : \"\")\n );\n const collisionPadding = computed(() => {\n return typeof props.collisionPadding === \"number\" ? props.collisionPadding : { top: 0, right: 0, bottom: 0, left: 0, ...props.collisionPadding };\n });\n const boundary = computed(() => {\n return Array.isArray(props.collisionBoundary) ? props.collisionBoundary : [props.collisionBoundary];\n });\n const detectOverflowOptions = computed(() => {\n return {\n padding: collisionPadding.value,\n boundary: boundary.value.filter(isNotNull),\n // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries\n altBoundary: boundary.value.length > 0\n };\n });\n const computedMiddleware = computedEager(() => {\n return [\n offset({\n mainAxis: props.sideOffset + arrowHeight.value,\n alignmentAxis: props.alignOffset\n }),\n props.prioritizePosition && props.avoidCollisions && flip({\n ...detectOverflowOptions.value\n }),\n props.avoidCollisions && shift({\n mainAxis: true,\n crossAxis: !!props.prioritizePosition,\n limiter: props.sticky === \"partial\" ? limitShift() : undefined,\n ...detectOverflowOptions.value\n }),\n !props.prioritizePosition && props.avoidCollisions && flip({\n ...detectOverflowOptions.value\n }),\n size({\n ...detectOverflowOptions.value,\n apply: ({ elements, rects, availableWidth, availableHeight }) => {\n const { width: anchorWidth, height: anchorHeight } = rects.reference;\n const contentStyle = elements.floating.style;\n contentStyle.setProperty(\n \"--reka-popper-available-width\",\n `${availableWidth}px`\n );\n contentStyle.setProperty(\n \"--reka-popper-available-height\",\n `${availableHeight}px`\n );\n contentStyle.setProperty(\n \"--reka-popper-anchor-width\",\n `${anchorWidth}px`\n );\n contentStyle.setProperty(\n \"--reka-popper-anchor-height\",\n `${anchorHeight}px`\n );\n }\n }),\n arrow$1.value && arrow({ element: arrow$1.value, padding: props.arrowPadding }),\n transformOrigin({\n arrowWidth: arrowWidth.value,\n arrowHeight: arrowHeight.value\n }),\n props.hideWhenDetached && hide({ strategy: \"referenceHidden\", ...detectOverflowOptions.value })\n ];\n });\n const reference = computed(() => props.reference ?? rootContext.anchor.value);\n const { floatingStyles, placement, isPositioned, middlewareData, update } = useFloating(\n reference,\n floatingRef,\n {\n strategy: props.positionStrategy,\n placement: desiredPlacement,\n whileElementsMounted: (...args) => {\n const cleanup = autoUpdate(...args, {\n layoutShift: !props.disableUpdateOnLayoutShift,\n animationFrame: props.updatePositionStrategy === \"always\"\n });\n return cleanup;\n },\n middleware: computedMiddleware\n }\n );\n const placedSide = computed(\n () => getSideAndAlignFromPlacement(placement.value)[0]\n );\n const placedAlign = computed(\n () => getSideAndAlignFromPlacement(placement.value)[1]\n );\n watchPostEffect(() => {\n if (isPositioned.value)\n emits(\"placed\");\n });\n const cannotCenterArrow = computed(\n () => middlewareData.value.arrow?.centerOffset !== 0\n );\n const contentZIndex = ref(\"\");\n watchEffect(() => {\n if (contentElement.value)\n contentZIndex.value = window.getComputedStyle(contentElement.value).zIndex;\n });\n const arrowX = computed(() => middlewareData.value.arrow?.x ?? 0);\n const arrowY = computed(() => middlewareData.value.arrow?.y ?? 0);\n providePopperContentContext({\n placedSide,\n onArrowChange: (element) => arrow$1.value = element,\n arrowX,\n arrowY,\n shouldHideArrow: cannotCenterArrow\n });\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(\"div\", {\n ref_key: \"floatingRef\",\n ref: floatingRef,\n \"data-reka-popper-content-wrapper\": \"\",\n style: normalizeStyle({\n ...unref(floatingStyles),\n transform: unref(isPositioned) ? unref(floatingStyles).transform : \"translate(0, -200%)\",\n // keep off the page when measuring\n minWidth: \"max-content\",\n zIndex: contentZIndex.value,\n [\"--reka-popper-transform-origin\"]: [\n unref(middlewareData).transformOrigin?.x,\n unref(middlewareData).transformOrigin?.y\n ].join(\" \"),\n // hide the content if using the hide middleware and should be hidden\n // set visibility to hidden and disable pointer events so the UI behaves\n // as if the PopperContent isn't there at all\n ...unref(middlewareData).hide?.referenceHidden && {\n visibility: \"hidden\",\n pointerEvents: \"none\"\n }\n })\n }, [\n createVNode(unref(Primitive), mergeProps({ ref: unref(forwardRef) }, _ctx.$attrs, {\n \"as-child\": props.asChild,\n as: _ctx.as,\n \"data-side\": placedSide.value,\n \"data-align\": placedAlign.value,\n style: {\n // if the PopperContent hasn't been placed yet (not all measurements done)\n // we prevent animations so that users's animation don't kick in too early referring wrong sides\n animation: !unref(isPositioned) ? \"none\" : undefined\n }\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16, [\"as-child\", \"as\", \"data-side\", \"data-align\", \"style\"])\n ], 4);\n };\n }\n});\n\nexport { PopperContentPropsDefaultValue as P, _sfc_main as _, injectPopperContentContext as i };\n//# sourceMappingURL=PopperContent.js.map\n","import { defineComponent, openBlock, createBlock, unref, withCtx, createVNode, withModifiers, withKeys, renderSlot } from 'vue';\nimport { u as useCollection } from '../Collection/Collection.js';\nimport '@floating-ui/vue';\nimport { refAutoReset } from '@vueuse/shared';\nimport { i as injectListboxRootContext } from './ListboxRoot.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"ListboxContent\",\n props: {\n asChild: { type: Boolean },\n as: {}\n },\n setup(__props) {\n const { CollectionSlot } = useCollection();\n const rootContext = injectListboxRootContext();\n const isClickFocus = refAutoReset(false, 10);\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(CollectionSlot), null, {\n default: withCtx(() => [\n createVNode(unref(Primitive), {\n role: \"listbox\",\n as: _ctx.as,\n \"as-child\": _ctx.asChild,\n tabindex: unref(rootContext).focusable.value ? unref(rootContext).highlightedElement.value ? \"-1\" : \"0\" : undefined,\n \"aria-orientation\": unref(rootContext).orientation.value,\n \"aria-multiselectable\": !!unref(rootContext).multiple.value,\n \"data-orientation\": unref(rootContext).orientation.value,\n onMousedown: _cache[0] || (_cache[0] = withModifiers(($event) => isClickFocus.value = true, [\"left\"])),\n onFocus: _cache[1] || (_cache[1] = (ev) => {\n if (unref(isClickFocus))\n return;\n unref(rootContext).onEnter(ev);\n }),\n onKeydown: [\n _cache[2] || (_cache[2] = withKeys(withModifiers((event) => {\n unref(rootContext).focusable.value ? unref(rootContext).onKeydownNavigation(event) : undefined;\n }, [\"prevent\"]), [\"down\", \"up\", \"left\", \"right\", \"home\", \"end\"])),\n withKeys(unref(rootContext).onKeydownEnter, [\"enter\"]),\n unref(rootContext).onKeydownTypeAhead\n ]\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 8, [\"as\", \"as-child\", \"tabindex\", \"aria-orientation\", \"aria-multiselectable\", \"data-orientation\", \"onKeydown\"])\n ]),\n _: 3\n });\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=ListboxContent.js.map\n","import { defineComponent, toRefs, computed, ref, onMounted, onUnmounted, openBlock, createBlock, unref, withCtx, createVNode, resolveDynamicComponent, mergeProps, renderSlot } from 'vue';\nimport { _ as _sfc_main$2 } from '../DismissableLayer/DismissableLayer.js';\nimport { _ as _sfc_main$3 } from '../Popper/PopperContent.js';\nimport { u as useBodyScrollLock } from '../shared/useBodyScrollLock.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { u as useHideOthers } from '../shared/useHideOthers.js';\nimport { u as useForwardProps } from '../shared/useForwardProps.js';\nimport { _ as _sfc_main$1 } from '../Listbox/ListboxContent.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { c as createContext } from '../shared/createContext.js';\nimport { i as injectComboboxRootContext } from './ComboboxRoot.js';\n\nconst [injectComboboxContentContext, provideComboboxContentContext] = createContext(\"ComboboxContent\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"ComboboxContentImpl\",\n props: {\n position: { default: \"inline\" },\n bodyLock: { type: Boolean },\n side: {},\n sideOffset: {},\n align: {},\n alignOffset: {},\n avoidCollisions: { type: Boolean },\n collisionBoundary: {},\n collisionPadding: {},\n arrowPadding: {},\n sticky: {},\n hideWhenDetached: { type: Boolean },\n positionStrategy: {},\n updatePositionStrategy: {},\n disableUpdateOnLayoutShift: { type: Boolean },\n prioritizePosition: { type: Boolean },\n reference: {},\n asChild: { type: Boolean },\n as: {},\n disableOutsidePointerEvents: { type: Boolean }\n },\n emits: [\"escapeKeyDown\", \"pointerDownOutside\", \"focusOutside\", \"interactOutside\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const { position } = toRefs(props);\n const rootContext = injectComboboxRootContext();\n const { forwardRef, currentElement } = useForwardExpose();\n useBodyScrollLock(props.bodyLock);\n useHideOthers(rootContext.parentElement);\n const pickedProps = computed(() => {\n if (props.position === \"popper\")\n return props;\n else return {};\n });\n const forwardedProps = useForwardProps(pickedProps.value);\n const popperStyle = {\n // Ensure border-box for floating-ui calculations\n \"boxSizing\": \"border-box\",\n \"--reka-combobox-content-transform-origin\": \"var(--reka-popper-transform-origin)\",\n \"--reka-combobox-content-available-width\": \"var(--reka-popper-available-width)\",\n \"--reka-combobox-content-available-height\": \"var(--reka-popper-available-height)\",\n \"--reka-combobox-trigger-width\": \"var(--reka-popper-anchor-width)\",\n \"--reka-combobox-trigger-height\": \"var(--reka-popper-anchor-height)\"\n };\n provideComboboxContentContext({ position });\n const isInputWithinContent = ref(false);\n onMounted(() => {\n if (rootContext.inputElement.value) {\n isInputWithinContent.value = currentElement.value.contains(rootContext.inputElement.value);\n if (isInputWithinContent.value) {\n rootContext.inputElement.value.focus();\n }\n }\n });\n onUnmounted(() => {\n if (isInputWithinContent.value) {\n rootContext.triggerElement.value?.focus();\n }\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), { \"as-child\": \"\" }, {\n default: withCtx(() => [\n createVNode(unref(_sfc_main$2), {\n \"as-child\": \"\",\n \"disable-outside-pointer-events\": _ctx.disableOutsidePointerEvents,\n onDismiss: _cache[0] || (_cache[0] = ($event) => unref(rootContext).onOpenChange(false)),\n onFocusOutside: _cache[1] || (_cache[1] = (ev) => {\n if (unref(rootContext).parentElement.value?.contains(ev.target)) ev.preventDefault();\n emits(\"focusOutside\", ev);\n }),\n onInteractOutside: _cache[2] || (_cache[2] = ($event) => emits(\"interactOutside\", $event)),\n onEscapeKeyDown: _cache[3] || (_cache[3] = ($event) => emits(\"escapeKeyDown\", $event)),\n onPointerDownOutside: _cache[4] || (_cache[4] = (ev) => {\n if (unref(rootContext).parentElement.value?.contains(ev.target)) ev.preventDefault();\n emits(\"pointerDownOutside\", ev);\n })\n }, {\n default: withCtx(() => [\n (openBlock(), createBlock(resolveDynamicComponent(unref(position) === \"popper\" ? unref(_sfc_main$3) : unref(Primitive)), mergeProps({ ..._ctx.$attrs, ...unref(forwardedProps) }, {\n id: unref(rootContext).contentId,\n ref: unref(forwardRef),\n \"data-state\": unref(rootContext).open.value ? \"open\" : \"closed\",\n style: {\n // flex layout so we can place the scroll buttons properly\n display: \"flex\",\n flexDirection: \"column\",\n // reset the outline by default as the content MAY get focused\n outline: \"none\",\n ...unref(position) === \"popper\" ? popperStyle : {}\n }\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16, [\"id\", \"data-state\", \"style\"]))\n ]),\n _: 3\n }, 8, [\"disable-outside-pointer-events\"])\n ]),\n _: 3\n });\n };\n }\n});\n\nexport { _sfc_main as _, injectComboboxContentContext as i };\n//# sourceMappingURL=ComboboxContentImpl.js.map\n","import { defineComponent, openBlock, createBlock, unref, withCtx, createVNode, mergeProps, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from './ComboboxContentImpl.js';\nimport { u as useForwardPropsEmits } from '../shared/useForwardPropsEmits.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { u as useId } from '../shared/useId.js';\nimport { P as Presence } from '../Presence/Presence.js';\nimport { i as injectComboboxRootContext } from './ComboboxRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"ComboboxContent\",\n props: {\n forceMount: { type: Boolean },\n position: {},\n bodyLock: { type: Boolean },\n side: {},\n sideOffset: {},\n align: {},\n alignOffset: {},\n avoidCollisions: { type: Boolean },\n collisionBoundary: {},\n collisionPadding: {},\n arrowPadding: {},\n sticky: {},\n hideWhenDetached: { type: Boolean },\n positionStrategy: {},\n updatePositionStrategy: {},\n disableUpdateOnLayoutShift: { type: Boolean },\n prioritizePosition: { type: Boolean },\n reference: {},\n asChild: { type: Boolean },\n as: {},\n disableOutsidePointerEvents: { type: Boolean }\n },\n emits: [\"escapeKeyDown\", \"pointerDownOutside\", \"focusOutside\", \"interactOutside\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const forwarded = useForwardPropsEmits(props, emits);\n const { forwardRef } = useForwardExpose();\n const rootContext = injectComboboxRootContext();\n rootContext.contentId ||= useId(undefined, \"reka-combobox-content\");\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Presence), {\n present: _ctx.forceMount || unref(rootContext).open.value\n }, {\n default: withCtx(() => [\n createVNode(_sfc_main$1, mergeProps({ ...unref(forwarded), ..._ctx.$attrs }, { ref: unref(forwardRef) }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16)\n ]),\n _: 3\n }, 8, [\"present\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=ComboboxContent.js.map\n","import { ref, computed } from 'vue';\nimport { i as injectConfigProviderContext } from '../ConfigProvider/ConfigProvider.js';\n\nfunction useNonce(nonce) {\n const context = injectConfigProviderContext({\n nonce: ref()\n });\n return computed(() => nonce?.value || context.nonce?.value);\n}\n\nexport { useNonce as u };\n//# sourceMappingURL=useNonce.js.map\n","import { defineComponent, computed, openBlock, createBlock, unref, withCtx, withMemo, createVNode, mergeProps, withKeys, withModifiers, renderSlot } from 'vue';\nimport '@floating-ui/vue';\nimport { v as valueComparator } from './utils.js';\nimport { u as useCollection } from '../Collection/Collection.js';\nimport { u as useId } from '../shared/useId.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { c as createContext } from '../shared/createContext.js';\nimport { h as handleAndDispatchCustomEvent } from '../shared/handleAndDispatchCustomEvent.js';\nimport { i as injectListboxRootContext } from './ListboxRoot.js';\n\nconst LISTBOX_SELECT = \"listbox.select\";\nconst [injectListboxItemContext, provideListboxItemContext] = createContext(\"ListboxItem\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"ListboxItem\",\n props: {\n value: {},\n disabled: { type: Boolean },\n asChild: { type: Boolean },\n as: { default: \"div\" }\n },\n emits: [\"select\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const id = useId(undefined, \"reka-listbox-item\");\n const { CollectionItem } = useCollection();\n const { forwardRef, currentElement } = useForwardExpose();\n const rootContext = injectListboxRootContext();\n const isHighlighted = computed(() => currentElement.value === rootContext.highlightedElement.value);\n const isSelected = computed(() => valueComparator(rootContext.modelValue.value, props.value, rootContext.by));\n const disabled = computed(() => rootContext.disabled.value || props.disabled);\n async function handleSelect(ev) {\n emits(\"select\", ev);\n if (ev?.defaultPrevented)\n return;\n if (!disabled.value && ev) {\n rootContext.onValueChange(props.value);\n rootContext.changeHighlight(currentElement.value);\n }\n }\n function handleSelectCustomEvent(ev) {\n const eventDetail = { originalEvent: ev, value: props.value };\n handleAndDispatchCustomEvent(LISTBOX_SELECT, handleSelect, eventDetail);\n }\n provideListboxItemContext({\n isSelected\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(CollectionItem), { value: _ctx.value }, {\n default: withCtx(() => [\n withMemo([isHighlighted.value, isSelected.value], () => createVNode(unref(Primitive), mergeProps({ id: unref(id) }, _ctx.$attrs, {\n ref: unref(forwardRef),\n role: \"option\",\n tabindex: unref(rootContext).focusable.value ? isHighlighted.value ? \"0\" : \"-1\" : -1,\n \"aria-selected\": isSelected.value,\n as: _ctx.as,\n \"as-child\": _ctx.asChild,\n disabled: disabled.value ? \"\" : undefined,\n \"data-disabled\": disabled.value ? \"\" : undefined,\n \"data-highlighted\": isHighlighted.value ? \"\" : undefined,\n \"data-state\": isSelected.value ? \"checked\" : \"unchecked\",\n onClick: handleSelectCustomEvent,\n onKeydown: withKeys(withModifiers(handleSelectCustomEvent, [\"prevent\"]), [\"space\"]),\n onPointermove: _cache[0] || (_cache[0] = (event) => {\n if (unref(rootContext).highlightedElement.value === unref(currentElement))\n return;\n if (unref(rootContext).highlightOnHover.value)\n unref(rootContext).changeHighlight(unref(currentElement), false);\n else\n unref(rootContext).focusable.value ? undefined : unref(rootContext).changeHighlight(unref(currentElement), false);\n })\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16, [\"id\", \"tabindex\", \"aria-selected\", \"as\", \"as-child\", \"disabled\", \"data-disabled\", \"data-highlighted\", \"data-state\", \"onKeydown\"]), _cache, 1)\n ]),\n _: 3\n }, 8, [\"value\"]);\n };\n }\n});\n\nexport { _sfc_main as _, injectListboxItemContext as i };\n//# sourceMappingURL=ListboxItem.js.map\n","import { defineComponent, computed, onMounted, onUnmounted, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot, createTextVNode, toDisplayString, createCommentVNode } from 'vue';\nimport { u as useId } from '../shared/useId.js';\nimport { u as usePrimitiveElement } from '../Primitive/usePrimitiveElement.js';\nimport { _ as _sfc_main$1 } from '../Listbox/ListboxItem.js';\nimport { i as injectComboboxRootContext } from './ComboboxRoot.js';\nimport { i as injectComboboxGroupContext } from './ComboboxGroup.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"ComboboxItem\",\n props: {\n textValue: {},\n value: {},\n disabled: { type: Boolean },\n asChild: { type: Boolean },\n as: {}\n },\n emits: [\"select\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const id = useId(undefined, \"reka-combobox-item\");\n const rootContext = injectComboboxRootContext();\n const groupContext = injectComboboxGroupContext(null);\n const { primitiveElement, currentElement } = usePrimitiveElement();\n if (props.value === \"\") {\n throw new Error(\n \"A must have a value prop that is not an empty string. This is because the Combobox value can be set to an empty string to clear the selection and show the placeholder.\"\n );\n }\n const isRender = computed(() => {\n if (rootContext.isVirtual.value || rootContext.ignoreFilter.value || !rootContext.filterState.search) {\n return true;\n } else {\n const filteredCurrentItem = rootContext.filterState.filtered.items.get(id);\n if (filteredCurrentItem === undefined) {\n return true;\n }\n return filteredCurrentItem > 0;\n }\n });\n onMounted(() => {\n rootContext.allItems.value.set(id, props.textValue || currentElement.value.textContent || currentElement.value.innerText);\n const groupId = groupContext?.id;\n if (groupId) {\n if (!rootContext.allGroups.value.has(groupId)) {\n rootContext.allGroups.value.set(groupId, /* @__PURE__ */ new Set([id]));\n } else {\n rootContext.allGroups.value.get(groupId)?.add(id);\n }\n }\n });\n onUnmounted(() => {\n rootContext.allItems.value.delete(id);\n });\n return (_ctx, _cache) => {\n return isRender.value ? (openBlock(), createBlock(unref(_sfc_main$1), mergeProps({ key: 0 }, props, {\n id: unref(id),\n ref_key: \"primitiveElement\",\n ref: primitiveElement,\n onSelect: _cache[0] || (_cache[0] = (event) => {\n emits(\"select\", event);\n if (event.defaultPrevented)\n return;\n if (!unref(rootContext).multiple.value) {\n event.preventDefault();\n unref(rootContext).onOpenChange(false);\n unref(rootContext).modelValue.value = props.value;\n }\n })\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", {}, () => [\n createTextVNode(toDisplayString(_ctx.value), 1)\n ])\n ]),\n _: 3\n }, 16, [\"id\"])) : createCommentVNode(\"\", true);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=ComboboxItem.js.map\n","import { createSharedComposable, useEventListener } from '@vueuse/core';\nimport { ref, onMounted } from 'vue';\n\nfunction useIsUsingKeyboardImpl() {\n const isUsingKeyboard = ref(false);\n onMounted(() => {\n useEventListener(\"keydown\", () => {\n isUsingKeyboard.value = true;\n }, { capture: true, passive: true });\n useEventListener([\"pointerdown\", \"pointermove\"], () => {\n isUsingKeyboard.value = false;\n }, { capture: true, passive: true });\n });\n return isUsingKeyboard;\n}\nconst useIsUsingKeyboard = createSharedComposable(useIsUsingKeyboardImpl);\n\nexport { useIsUsingKeyboard as u };\n//# sourceMappingURL=useIsUsingKeyboard.js.map\n","import { defineComponent, toRefs, ref, openBlock, createBlock, unref, withCtx, renderSlot } from 'vue';\nimport { useVModel } from '@vueuse/core';\nimport { _ as _sfc_main$1 } from '../Popper/PopperRoot.js';\nimport { u as useIsUsingKeyboard } from '../shared/useIsUsingKeyboard.js';\nimport { u as useDirection } from '../shared/useDirection.js';\nimport { c as createContext } from '../shared/createContext.js';\n\nconst [injectMenuContext, provideMenuContext] = createContext([\"MenuRoot\", \"MenuSub\"], \"MenuContext\");\nconst [injectMenuRootContext, provideMenuRootContext] = createContext(\"MenuRoot\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"MenuRoot\",\n props: {\n open: { type: Boolean, default: false },\n dir: {},\n modal: { type: Boolean, default: true }\n },\n emits: [\"update:open\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const { modal, dir: propDir } = toRefs(props);\n const dir = useDirection(propDir);\n const open = useVModel(props, \"open\", emits);\n const content = ref();\n const isUsingKeyboardRef = useIsUsingKeyboard();\n provideMenuContext({\n open,\n onOpenChange: (value) => {\n open.value = value;\n },\n content,\n onContentChange: (element) => {\n content.value = element;\n }\n });\n provideMenuRootContext({\n onClose: () => {\n open.value = false;\n },\n isUsingKeyboardRef,\n dir,\n modal\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), null, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n });\n };\n }\n});\n\nexport { _sfc_main as _, injectMenuRootContext as a, injectMenuContext as i, provideMenuContext as p };\n//# sourceMappingURL=MenuRoot.js.map\n","import { defineComponent, openBlock, createBlock, unref, normalizeProps, guardReactiveProps, withCtx, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from '../Popper/PopperAnchor.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"MenuAnchor\",\n props: {\n reference: {},\n asChild: { type: Boolean },\n as: {}\n },\n setup(__props) {\n const props = __props;\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), normalizeProps(guardReactiveProps(props)), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=MenuAnchor.js.map\n","import { defineComponent, openBlock, createBlock, unref, normalizeProps, guardReactiveProps, withCtx, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from '../Teleport/Teleport.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"MenuPortal\",\n props: {\n to: {},\n disabled: { type: Boolean },\n defer: { type: Boolean },\n forceMount: { type: Boolean }\n },\n setup(__props) {\n const props = __props;\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), normalizeProps(guardReactiveProps(props)), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=MenuPortal.js.map\n","import { isClient } from '@vueuse/shared';\nimport { watchEffect } from 'vue';\n\nlet count = 0;\nfunction useFocusGuards() {\n watchEffect((cleanupFn) => {\n if (!isClient)\n return;\n const edgeGuards = document.querySelectorAll(\"[data-reka-focus-guard]\");\n document.body.insertAdjacentElement(\n \"afterbegin\",\n edgeGuards[0] ?? createFocusGuard()\n );\n document.body.insertAdjacentElement(\n \"beforeend\",\n edgeGuards[1] ?? createFocusGuard()\n );\n count++;\n cleanupFn(() => {\n if (count === 1) {\n document.querySelectorAll(\"[data-reka-focus-guard]\").forEach((node) => node.remove());\n }\n count--;\n });\n });\n}\nfunction createFocusGuard() {\n const element = document.createElement(\"span\");\n element.setAttribute(\"data-reka-focus-guard\", \"\");\n element.tabIndex = 0;\n element.style.outline = \"none\";\n element.style.opacity = \"0\";\n element.style.position = \"fixed\";\n element.style.pointerEvents = \"none\";\n return element;\n}\n\nexport { useFocusGuards as u };\n//# sourceMappingURL=useFocusGuards.js.map\n","import { defineComponent, mergeDefaults, toRefs, ref, watch, onUnmounted, openBlock, createBlock, unref, withCtx, createVNode, renderSlot } from 'vue';\nimport { g as getOpenState, b as isPointerInGraceArea, F as FIRST_LAST_KEYS, L as LAST_KEYS, f as focusFirst, c as isMouseEvent } from './utils.js';\nimport { _ as _sfc_main$2 } from '../DismissableLayer/DismissableLayer.js';\nimport { P as PopperContentPropsDefaultValue, _ as _sfc_main$4 } from '../Popper/PopperContent.js';\nimport { _ as _sfc_main$3 } from '../RovingFocus/RovingFocusGroup.js';\nimport { u as useBodyScrollLock } from '../shared/useBodyScrollLock.js';\nimport { i as injectMenuContext, a as injectMenuRootContext } from './MenuRoot.js';\nimport { u as useFocusGuards } from '../shared/useFocusGuards.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { u as useTypeahead } from '../shared/useTypeahead.js';\nimport { _ as _sfc_main$1 } from '../FocusScope/FocusScope.js';\nimport { c as createContext } from '../shared/createContext.js';\nimport { u as useArrowNavigation } from '../shared/useArrowNavigation.js';\nimport { g as getActiveElement } from '../shared/getActiveElement.js';\n\nconst [injectMenuContentContext, provideMenuContentContext] = createContext(\"MenuContent\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"MenuContentImpl\",\n props: /* @__PURE__ */ mergeDefaults({\n loop: { type: Boolean },\n disableOutsidePointerEvents: { type: Boolean },\n disableOutsideScroll: { type: Boolean },\n trapFocus: { type: Boolean },\n side: {},\n sideOffset: {},\n align: {},\n alignOffset: {},\n avoidCollisions: { type: Boolean },\n collisionBoundary: {},\n collisionPadding: {},\n arrowPadding: {},\n sticky: {},\n hideWhenDetached: { type: Boolean },\n positionStrategy: {},\n updatePositionStrategy: {},\n disableUpdateOnLayoutShift: { type: Boolean },\n prioritizePosition: { type: Boolean },\n reference: {},\n asChild: { type: Boolean },\n as: {}\n }, {\n ...PopperContentPropsDefaultValue\n }),\n emits: [\"escapeKeyDown\", \"pointerDownOutside\", \"focusOutside\", \"interactOutside\", \"entryFocus\", \"openAutoFocus\", \"closeAutoFocus\", \"dismiss\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const menuContext = injectMenuContext();\n const rootContext = injectMenuRootContext();\n const { trapFocus, disableOutsidePointerEvents, loop } = toRefs(props);\n useFocusGuards();\n useBodyScrollLock(disableOutsidePointerEvents.value);\n const searchRef = ref(\"\");\n const timerRef = ref(0);\n const pointerGraceTimerRef = ref(0);\n const pointerGraceIntentRef = ref(null);\n const pointerDirRef = ref(\"right\");\n const lastPointerXRef = ref(0);\n const currentItemId = ref(null);\n const rovingFocusGroupRef = ref();\n const { forwardRef, currentElement: contentElement } = useForwardExpose();\n const { handleTypeaheadSearch } = useTypeahead();\n watch(contentElement, (el) => {\n menuContext.onContentChange(el);\n });\n onUnmounted(() => {\n window.clearTimeout(timerRef.value);\n });\n function isPointerMovingToSubmenu(event) {\n const isMovingTowards = pointerDirRef.value === pointerGraceIntentRef.value?.side;\n return isMovingTowards && isPointerInGraceArea(event, pointerGraceIntentRef.value?.area);\n }\n async function handleMountAutoFocus(event) {\n emits(\"openAutoFocus\", event);\n if (event.defaultPrevented)\n return;\n event.preventDefault();\n contentElement.value?.focus({\n preventScroll: true\n });\n }\n function handleKeyDown(event) {\n if (event.defaultPrevented)\n return;\n const target = event.target;\n const isKeyDownInside = target.closest(\"[data-reka-menu-content]\") === event.currentTarget;\n const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n const isCharacterKey = event.key.length === 1;\n const el = useArrowNavigation(\n event,\n getActiveElement(),\n contentElement.value,\n {\n loop: loop.value,\n arrowKeyOptions: \"vertical\",\n dir: rootContext?.dir.value,\n focus: true,\n attributeName: \"[data-reka-collection-item]:not([data-disabled])\"\n }\n );\n if (el)\n return el?.focus();\n if (event.code === \"Space\")\n return;\n const collectionItems = rovingFocusGroupRef.value?.getItems() ?? [];\n if (isKeyDownInside) {\n if (event.key === \"Tab\")\n event.preventDefault();\n if (!isModifierKey && isCharacterKey)\n handleTypeaheadSearch(event.key, collectionItems);\n }\n if (event.target !== contentElement.value)\n return;\n if (!FIRST_LAST_KEYS.includes(event.key))\n return;\n event.preventDefault();\n const candidateNodes = [...collectionItems.map((item) => item.ref)];\n if (LAST_KEYS.includes(event.key))\n candidateNodes.reverse();\n focusFirst(candidateNodes);\n }\n function handleBlur(event) {\n if (!event?.currentTarget?.contains?.(event.target)) {\n window.clearTimeout(timerRef.value);\n searchRef.value = \"\";\n }\n }\n function handlePointerMove(event) {\n if (!isMouseEvent(event))\n return;\n const target = event.target;\n const pointerXHasChanged = lastPointerXRef.value !== event.clientX;\n if (event?.currentTarget?.contains(target) && pointerXHasChanged) {\n const newDir = event.clientX > lastPointerXRef.value ? \"right\" : \"left\";\n pointerDirRef.value = newDir;\n lastPointerXRef.value = event.clientX;\n }\n }\n provideMenuContentContext({\n onItemEnter: (event) => {\n if (isPointerMovingToSubmenu(event))\n return true;\n else\n return false;\n },\n onItemLeave: (event) => {\n if (isPointerMovingToSubmenu(event))\n return;\n contentElement.value?.focus();\n currentItemId.value = null;\n },\n onTriggerLeave: (event) => {\n if (isPointerMovingToSubmenu(event))\n return true;\n else\n return false;\n },\n searchRef,\n pointerGraceTimerRef,\n onPointerGraceIntentChange: (intent) => {\n pointerGraceIntentRef.value = intent;\n }\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), {\n \"as-child\": \"\",\n trapped: unref(trapFocus),\n onMountAutoFocus: handleMountAutoFocus,\n onUnmountAutoFocus: _cache[7] || (_cache[7] = ($event) => emits(\"closeAutoFocus\", $event))\n }, {\n default: withCtx(() => [\n createVNode(unref(_sfc_main$2), {\n \"as-child\": \"\",\n \"disable-outside-pointer-events\": unref(disableOutsidePointerEvents),\n onEscapeKeyDown: _cache[2] || (_cache[2] = ($event) => emits(\"escapeKeyDown\", $event)),\n onPointerDownOutside: _cache[3] || (_cache[3] = ($event) => emits(\"pointerDownOutside\", $event)),\n onFocusOutside: _cache[4] || (_cache[4] = ($event) => emits(\"focusOutside\", $event)),\n onInteractOutside: _cache[5] || (_cache[5] = ($event) => emits(\"interactOutside\", $event)),\n onDismiss: _cache[6] || (_cache[6] = ($event) => emits(\"dismiss\"))\n }, {\n default: withCtx(() => [\n createVNode(unref(_sfc_main$3), {\n ref_key: \"rovingFocusGroupRef\",\n ref: rovingFocusGroupRef,\n \"current-tab-stop-id\": currentItemId.value,\n \"onUpdate:currentTabStopId\": _cache[0] || (_cache[0] = ($event) => currentItemId.value = $event),\n \"as-child\": \"\",\n orientation: \"vertical\",\n dir: unref(rootContext).dir.value,\n loop: unref(loop),\n onEntryFocus: _cache[1] || (_cache[1] = (event) => {\n emits(\"entryFocus\", event);\n if (!unref(rootContext).isUsingKeyboardRef.value) event.preventDefault();\n })\n }, {\n default: withCtx(() => [\n createVNode(unref(_sfc_main$4), {\n ref: unref(forwardRef),\n role: \"menu\",\n as: _ctx.as,\n \"as-child\": _ctx.asChild,\n \"aria-orientation\": \"vertical\",\n \"data-reka-menu-content\": \"\",\n \"data-state\": unref(getOpenState)(unref(menuContext).open.value),\n dir: unref(rootContext).dir.value,\n side: _ctx.side,\n \"side-offset\": _ctx.sideOffset,\n align: _ctx.align,\n \"align-offset\": _ctx.alignOffset,\n \"avoid-collisions\": _ctx.avoidCollisions,\n \"collision-boundary\": _ctx.collisionBoundary,\n \"collision-padding\": _ctx.collisionPadding,\n \"arrow-padding\": _ctx.arrowPadding,\n \"prioritize-position\": _ctx.prioritizePosition,\n \"position-strategy\": _ctx.positionStrategy,\n \"update-position-strategy\": _ctx.updatePositionStrategy,\n sticky: _ctx.sticky,\n \"hide-when-detached\": _ctx.hideWhenDetached,\n reference: _ctx.reference,\n onKeydown: handleKeyDown,\n onBlur: handleBlur,\n onPointermove: handlePointerMove\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 8, [\"as\", \"as-child\", \"data-state\", \"dir\", \"side\", \"side-offset\", \"align\", \"align-offset\", \"avoid-collisions\", \"collision-boundary\", \"collision-padding\", \"arrow-padding\", \"prioritize-position\", \"position-strategy\", \"update-position-strategy\", \"sticky\", \"hide-when-detached\", \"reference\"])\n ]),\n _: 3\n }, 8, [\"current-tab-stop-id\", \"dir\", \"loop\"])\n ]),\n _: 3\n }, 8, [\"disable-outside-pointer-events\"])\n ]),\n _: 3\n }, 8, [\"trapped\"]);\n };\n }\n});\n\nexport { _sfc_main as _, injectMenuContentContext as i };\n//# sourceMappingURL=MenuContentImpl.js.map\n","import { defineComponent, openBlock, createBlock, mergeProps, unref, withModifiers, withCtx, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from './MenuContentImpl.js';\nimport { u as useForwardPropsEmits } from '../shared/useForwardPropsEmits.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { u as useHideOthers } from '../shared/useHideOthers.js';\nimport { i as injectMenuContext } from './MenuRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"MenuRootContentModal\",\n props: {\n loop: { type: Boolean },\n side: {},\n sideOffset: {},\n align: {},\n alignOffset: {},\n avoidCollisions: { type: Boolean },\n collisionBoundary: {},\n collisionPadding: {},\n arrowPadding: {},\n sticky: {},\n hideWhenDetached: { type: Boolean },\n positionStrategy: {},\n updatePositionStrategy: {},\n disableUpdateOnLayoutShift: { type: Boolean },\n prioritizePosition: { type: Boolean },\n reference: {},\n asChild: { type: Boolean },\n as: {}\n },\n emits: [\"escapeKeyDown\", \"pointerDownOutside\", \"focusOutside\", \"interactOutside\", \"entryFocus\", \"openAutoFocus\", \"closeAutoFocus\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const forwarded = useForwardPropsEmits(props, emits);\n const menuContext = injectMenuContext();\n const { forwardRef, currentElement } = useForwardExpose();\n useHideOthers(currentElement);\n return (_ctx, _cache) => {\n return openBlock(), createBlock(_sfc_main$1, mergeProps(unref(forwarded), {\n ref: unref(forwardRef),\n \"trap-focus\": unref(menuContext).open.value,\n \"disable-outside-pointer-events\": unref(menuContext).open.value,\n \"disable-outside-scroll\": true,\n onDismiss: _cache[0] || (_cache[0] = ($event) => unref(menuContext).onOpenChange(false)),\n onFocusOutside: _cache[1] || (_cache[1] = withModifiers(($event) => emits(\"focusOutside\", $event), [\"prevent\"]))\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16, [\"trap-focus\", \"disable-outside-pointer-events\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=MenuRootContentModal.js.map\n","import { defineComponent, openBlock, createBlock, mergeProps, unref, withCtx, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from './MenuContentImpl.js';\nimport { u as useForwardPropsEmits } from '../shared/useForwardPropsEmits.js';\nimport { i as injectMenuContext } from './MenuRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"MenuRootContentNonModal\",\n props: {\n loop: { type: Boolean },\n side: {},\n sideOffset: {},\n align: {},\n alignOffset: {},\n avoidCollisions: { type: Boolean },\n collisionBoundary: {},\n collisionPadding: {},\n arrowPadding: {},\n sticky: {},\n hideWhenDetached: { type: Boolean },\n positionStrategy: {},\n updatePositionStrategy: {},\n disableUpdateOnLayoutShift: { type: Boolean },\n prioritizePosition: { type: Boolean },\n reference: {},\n asChild: { type: Boolean },\n as: {}\n },\n emits: [\"escapeKeyDown\", \"pointerDownOutside\", \"focusOutside\", \"interactOutside\", \"entryFocus\", \"openAutoFocus\", \"closeAutoFocus\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const forwarded = useForwardPropsEmits(props, emits);\n const menuContext = injectMenuContext();\n return (_ctx, _cache) => {\n return openBlock(), createBlock(_sfc_main$1, mergeProps(unref(forwarded), {\n \"trap-focus\": false,\n \"disable-outside-pointer-events\": false,\n \"disable-outside-scroll\": false,\n onDismiss: _cache[0] || (_cache[0] = ($event) => unref(menuContext).onOpenChange(false))\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=MenuRootContentNonModal.js.map\n","import { defineComponent, openBlock, createBlock, unref, withCtx, normalizeProps, mergeProps, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from './MenuRootContentModal.js';\nimport { _ as _sfc_main$2 } from './MenuRootContentNonModal.js';\nimport { u as useForwardPropsEmits } from '../shared/useForwardPropsEmits.js';\nimport { P as Presence } from '../Presence/Presence.js';\nimport { i as injectMenuContext, a as injectMenuRootContext } from './MenuRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"MenuContent\",\n props: {\n forceMount: { type: Boolean },\n loop: { type: Boolean },\n side: {},\n sideOffset: {},\n align: {},\n alignOffset: {},\n avoidCollisions: { type: Boolean },\n collisionBoundary: {},\n collisionPadding: {},\n arrowPadding: {},\n sticky: {},\n hideWhenDetached: { type: Boolean },\n positionStrategy: {},\n updatePositionStrategy: {},\n disableUpdateOnLayoutShift: { type: Boolean },\n prioritizePosition: { type: Boolean },\n reference: {},\n asChild: { type: Boolean },\n as: {}\n },\n emits: [\"escapeKeyDown\", \"pointerDownOutside\", \"focusOutside\", \"interactOutside\", \"entryFocus\", \"openAutoFocus\", \"closeAutoFocus\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const forwarded = useForwardPropsEmits(props, emits);\n const menuContext = injectMenuContext();\n const rootContext = injectMenuRootContext();\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Presence), {\n present: _ctx.forceMount || unref(menuContext).open.value\n }, {\n default: withCtx(() => [\n unref(rootContext).modal.value ? (openBlock(), createBlock(_sfc_main$1, normalizeProps(mergeProps({ key: 0 }, { ..._ctx.$attrs, ...unref(forwarded) })), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16)) : (openBlock(), createBlock(_sfc_main$2, normalizeProps(mergeProps({ key: 1 }, { ..._ctx.$attrs, ...unref(forwarded) })), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16))\n ]),\n _: 3\n }, 8, [\"present\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=MenuContent.js.map\n","import { defineComponent, ref, openBlock, createBlock, unref, withCtx, createVNode, mergeProps, nextTick, renderSlot } from 'vue';\nimport { c as isMouseEvent } from './utils.js';\nimport { u as useCollection } from '../Collection/Collection.js';\nimport { i as injectMenuContentContext } from './MenuContentImpl.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n ...{\n inheritAttrs: false\n },\n __name: \"MenuItemImpl\",\n props: {\n disabled: { type: Boolean },\n textValue: {},\n asChild: { type: Boolean },\n as: {}\n },\n setup(__props) {\n const props = __props;\n const contentContext = injectMenuContentContext();\n const { forwardRef } = useForwardExpose();\n const { CollectionItem } = useCollection();\n const isFocused = ref(false);\n async function handlePointerMove(event) {\n if (event.defaultPrevented)\n return;\n if (!isMouseEvent(event))\n return;\n if (props.disabled) {\n contentContext.onItemLeave(event);\n } else {\n const defaultPrevented = contentContext.onItemEnter(event);\n if (!defaultPrevented) {\n const item = event.currentTarget;\n item?.focus({ preventScroll: true });\n }\n }\n }\n async function handlePointerLeave(event) {\n await nextTick();\n if (event.defaultPrevented)\n return;\n if (!isMouseEvent(event))\n return;\n contentContext.onItemLeave(event);\n }\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(CollectionItem), {\n value: { textValue: _ctx.textValue }\n }, {\n default: withCtx(() => [\n createVNode(unref(Primitive), mergeProps({\n ref: unref(forwardRef),\n role: \"menuitem\",\n tabindex: \"-1\"\n }, _ctx.$attrs, {\n as: _ctx.as,\n \"as-child\": _ctx.asChild,\n \"aria-disabled\": _ctx.disabled || undefined,\n \"data-disabled\": _ctx.disabled ? \"\" : undefined,\n \"data-highlighted\": isFocused.value ? \"\" : undefined,\n onPointermove: handlePointerMove,\n onPointerleave: handlePointerLeave,\n onFocus: _cache[0] || (_cache[0] = async (event) => {\n await nextTick();\n if (event.defaultPrevented || _ctx.disabled) return;\n isFocused.value = true;\n }),\n onBlur: _cache[1] || (_cache[1] = async (event) => {\n await nextTick();\n if (event.defaultPrevented) return;\n isFocused.value = false;\n })\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16, [\"as\", \"as-child\", \"aria-disabled\", \"data-disabled\", \"data-highlighted\"])\n ]),\n _: 3\n }, 8, [\"value\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=MenuItemImpl.js.map\n","import { defineComponent, ref, openBlock, createBlock, mergeProps, unref, nextTick, withCtx, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from './MenuItemImpl.js';\nimport { S as SELECTION_KEYS, I as ITEM_SELECT } from './utils.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { a as injectMenuRootContext } from './MenuRoot.js';\nimport { i as injectMenuContentContext } from './MenuContentImpl.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"MenuItem\",\n props: {\n disabled: { type: Boolean },\n textValue: {},\n asChild: { type: Boolean },\n as: {}\n },\n emits: [\"select\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const { forwardRef, currentElement } = useForwardExpose();\n const rootContext = injectMenuRootContext();\n const contentContext = injectMenuContentContext();\n const isPointerDownRef = ref(false);\n async function handleSelect() {\n const menuItem = currentElement.value;\n if (!props.disabled && menuItem) {\n const itemSelectEvent = new CustomEvent(ITEM_SELECT, {\n bubbles: true,\n cancelable: true\n });\n emits(\"select\", itemSelectEvent);\n await nextTick();\n if (itemSelectEvent.defaultPrevented)\n isPointerDownRef.value = false;\n else rootContext.onClose();\n }\n }\n return (_ctx, _cache) => {\n return openBlock(), createBlock(_sfc_main$1, mergeProps(props, {\n ref: unref(forwardRef),\n onClick: handleSelect,\n onPointerdown: _cache[0] || (_cache[0] = () => {\n isPointerDownRef.value = true;\n }),\n onPointerup: _cache[1] || (_cache[1] = async (event) => {\n await nextTick();\n if (event.defaultPrevented) return;\n if (!isPointerDownRef.value) event.currentTarget?.click();\n }),\n onKeydown: _cache[2] || (_cache[2] = async (event) => {\n const isTypingAhead = unref(contentContext).searchRef.value !== \"\";\n if (_ctx.disabled || isTypingAhead && event.key === \" \") return;\n if (unref(SELECTION_KEYS).includes(event.key)) {\n event.currentTarget.click();\n event.preventDefault();\n }\n })\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=MenuItem.js.map\n","import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from 'vue';\nimport { P as Primitive } from '../Primitive/Primitive.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"MenuSeparator\",\n props: {\n asChild: { type: Boolean },\n as: {}\n },\n setup(__props) {\n const props = __props;\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), mergeProps(props, {\n role: \"separator\",\n \"aria-orientation\": \"horizontal\"\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=MenuSeparator.js.map\n","import { defineComponent, openBlock, createBlock, unref, normalizeProps, guardReactiveProps, withCtx, renderSlot } from 'vue';\nimport { P as Primitive } from '../Primitive/Primitive.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"MenuLabel\",\n props: {\n asChild: { type: Boolean },\n as: { default: \"div\" }\n },\n setup(__props) {\n const props = __props;\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), normalizeProps(guardReactiveProps(props)), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=MenuLabel.js.map\n","import { defineComponent, toRefs, ref, openBlock, createBlock, unref, withCtx, renderSlot } from 'vue';\nimport { useVModel } from '@vueuse/core';\nimport { _ as _sfc_main$1 } from '../Popper/PopperRoot.js';\nimport { c as createContext } from '../shared/createContext.js';\n\nconst [injectPopoverRootContext, providePopoverRootContext] = createContext(\"PopoverRoot\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"PopoverRoot\",\n props: {\n defaultOpen: { type: Boolean, default: false },\n open: { type: Boolean, default: undefined },\n modal: { type: Boolean, default: false }\n },\n emits: [\"update:open\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emit = __emit;\n const { modal } = toRefs(props);\n const open = useVModel(props, \"open\", emit, {\n defaultValue: props.defaultOpen,\n passive: props.open === undefined\n });\n const triggerElement = ref();\n const hasCustomAnchor = ref(false);\n providePopoverRootContext({\n contentId: \"\",\n triggerId: \"\",\n modal,\n open,\n onOpenChange: (value) => {\n open.value = value;\n },\n onOpenToggle: () => {\n open.value = !open.value;\n },\n triggerElement,\n hasCustomAnchor\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), null, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", { open: unref(open) })\n ]),\n _: 3\n });\n };\n }\n});\n\nexport { _sfc_main as _, injectPopoverRootContext as i };\n//# sourceMappingURL=PopoverRoot.js.map\n","import { defineComponent, onMounted, openBlock, createBlock, resolveDynamicComponent, unref, withCtx, createVNode, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from '../Popper/PopperAnchor.js';\nimport { i as injectPopoverRootContext } from './PopoverRoot.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { u as useId } from '../shared/useId.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"PopoverTrigger\",\n props: {\n asChild: { type: Boolean },\n as: { default: \"button\" }\n },\n setup(__props) {\n const props = __props;\n const rootContext = injectPopoverRootContext();\n const { forwardRef, currentElement: triggerElement } = useForwardExpose();\n rootContext.triggerId ||= useId(undefined, \"reka-popover-trigger\");\n onMounted(() => {\n rootContext.triggerElement.value = triggerElement.value;\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(resolveDynamicComponent(unref(rootContext).hasCustomAnchor.value ? unref(Primitive) : unref(_sfc_main$1)), { \"as-child\": \"\" }, {\n default: withCtx(() => [\n createVNode(unref(Primitive), {\n id: unref(rootContext).triggerId,\n ref: unref(forwardRef),\n type: _ctx.as === \"button\" ? \"button\" : undefined,\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": unref(rootContext).open.value,\n \"aria-controls\": unref(rootContext).contentId,\n \"data-state\": unref(rootContext).open.value ? \"open\" : \"closed\",\n as: _ctx.as,\n \"as-child\": props.asChild,\n onClick: unref(rootContext).onOpenToggle\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 8, [\"id\", \"type\", \"aria-expanded\", \"aria-controls\", \"data-state\", \"as\", \"as-child\", \"onClick\"])\n ]),\n _: 3\n });\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=PopoverTrigger.js.map\n","import { defineComponent, openBlock, createBlock, unref, normalizeProps, guardReactiveProps, withCtx, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from '../Teleport/Teleport.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"PopoverPortal\",\n props: {\n to: {},\n disabled: { type: Boolean },\n defer: { type: Boolean },\n forceMount: { type: Boolean }\n },\n setup(__props) {\n const props = __props;\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), normalizeProps(guardReactiveProps(props)), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=PopoverPortal.js.map\n","import { defineComponent, openBlock, createBlock, unref, withCtx, createVNode, mergeProps, renderSlot } from 'vue';\nimport { _ as _sfc_main$3 } from '../Popper/PopperContent.js';\nimport { _ as _sfc_main$2 } from '../DismissableLayer/DismissableLayer.js';\nimport { reactiveOmit } from '@vueuse/shared';\nimport { u as useForwardProps } from '../shared/useForwardProps.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { u as useFocusGuards } from '../shared/useFocusGuards.js';\nimport { _ as _sfc_main$1 } from '../FocusScope/FocusScope.js';\nimport { i as injectPopoverRootContext } from './PopoverRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"PopoverContentImpl\",\n props: {\n trapFocus: { type: Boolean },\n side: {},\n sideOffset: {},\n align: {},\n alignOffset: {},\n avoidCollisions: { type: Boolean },\n collisionBoundary: {},\n collisionPadding: {},\n arrowPadding: {},\n sticky: {},\n hideWhenDetached: { type: Boolean },\n positionStrategy: {},\n updatePositionStrategy: {},\n disableUpdateOnLayoutShift: { type: Boolean },\n prioritizePosition: { type: Boolean },\n reference: {},\n asChild: { type: Boolean },\n as: {},\n disableOutsidePointerEvents: { type: Boolean }\n },\n emits: [\"escapeKeyDown\", \"pointerDownOutside\", \"focusOutside\", \"interactOutside\", \"openAutoFocus\", \"closeAutoFocus\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const forwarded = useForwardProps(reactiveOmit(props, \"trapFocus\", \"disableOutsidePointerEvents\"));\n const { forwardRef } = useForwardExpose();\n const rootContext = injectPopoverRootContext();\n useFocusGuards();\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), {\n \"as-child\": \"\",\n loop: \"\",\n trapped: _ctx.trapFocus,\n onMountAutoFocus: _cache[5] || (_cache[5] = ($event) => emits(\"openAutoFocus\", $event)),\n onUnmountAutoFocus: _cache[6] || (_cache[6] = ($event) => emits(\"closeAutoFocus\", $event))\n }, {\n default: withCtx(() => [\n createVNode(unref(_sfc_main$2), {\n \"as-child\": \"\",\n \"disable-outside-pointer-events\": _ctx.disableOutsidePointerEvents,\n onPointerDownOutside: _cache[0] || (_cache[0] = ($event) => emits(\"pointerDownOutside\", $event)),\n onInteractOutside: _cache[1] || (_cache[1] = ($event) => emits(\"interactOutside\", $event)),\n onEscapeKeyDown: _cache[2] || (_cache[2] = ($event) => emits(\"escapeKeyDown\", $event)),\n onFocusOutside: _cache[3] || (_cache[3] = ($event) => emits(\"focusOutside\", $event)),\n onDismiss: _cache[4] || (_cache[4] = ($event) => unref(rootContext).onOpenChange(false))\n }, {\n default: withCtx(() => [\n createVNode(unref(_sfc_main$3), mergeProps(unref(forwarded), {\n id: unref(rootContext).contentId,\n ref: unref(forwardRef),\n \"data-state\": unref(rootContext).open.value ? \"open\" : \"closed\",\n \"aria-labelledby\": unref(rootContext).triggerId,\n style: {\n \"--reka-popover-content-transform-origin\": \"var(--reka-popper-transform-origin)\",\n \"--reka-popover-content-available-width\": \"var(--reka-popper-available-width)\",\n \"--reka-popover-content-available-height\": \"var(--reka-popper-available-height)\",\n \"--reka-popover-trigger-width\": \"var(--reka-popper-anchor-width)\",\n \"--reka-popover-trigger-height\": \"var(--reka-popper-anchor-height)\"\n },\n role: \"dialog\"\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16, [\"id\", \"data-state\", \"aria-labelledby\"])\n ]),\n _: 3\n }, 8, [\"disable-outside-pointer-events\"])\n ]),\n _: 3\n }, 8, [\"trapped\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=PopoverContentImpl.js.map\n","import { defineComponent, ref, openBlock, createBlock, mergeProps, unref, withModifiers, withCtx, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from './PopoverContentImpl.js';\nimport { u as useBodyScrollLock } from '../shared/useBodyScrollLock.js';\nimport { u as useForwardPropsEmits } from '../shared/useForwardPropsEmits.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { u as useHideOthers } from '../shared/useHideOthers.js';\nimport { i as injectPopoverRootContext } from './PopoverRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"PopoverContentModal\",\n props: {\n side: {},\n sideOffset: {},\n align: {},\n alignOffset: {},\n avoidCollisions: { type: Boolean },\n collisionBoundary: {},\n collisionPadding: {},\n arrowPadding: {},\n sticky: {},\n hideWhenDetached: { type: Boolean },\n positionStrategy: {},\n updatePositionStrategy: {},\n disableUpdateOnLayoutShift: { type: Boolean },\n prioritizePosition: { type: Boolean },\n reference: {},\n asChild: { type: Boolean },\n as: {},\n disableOutsidePointerEvents: { type: Boolean }\n },\n emits: [\"escapeKeyDown\", \"pointerDownOutside\", \"focusOutside\", \"interactOutside\", \"openAutoFocus\", \"closeAutoFocus\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const rootContext = injectPopoverRootContext();\n const isRightClickOutsideRef = ref(false);\n useBodyScrollLock(true);\n const forwarded = useForwardPropsEmits(props, emits);\n const { forwardRef, currentElement } = useForwardExpose();\n useHideOthers(currentElement);\n return (_ctx, _cache) => {\n return openBlock(), createBlock(_sfc_main$1, mergeProps(unref(forwarded), {\n ref: unref(forwardRef),\n \"trap-focus\": unref(rootContext).open.value,\n \"disable-outside-pointer-events\": \"\",\n onCloseAutoFocus: _cache[0] || (_cache[0] = withModifiers(\n (event) => {\n emits(\"closeAutoFocus\", event);\n if (!isRightClickOutsideRef.value) unref(rootContext).triggerElement.value?.focus();\n },\n [\"prevent\"]\n )),\n onPointerDownOutside: _cache[1] || (_cache[1] = (event) => {\n emits(\"pointerDownOutside\", event);\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n isRightClickOutsideRef.value = isRightClick;\n }),\n onFocusOutside: _cache[2] || (_cache[2] = withModifiers(() => {\n }, [\"prevent\"]))\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16, [\"trap-focus\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=PopoverContentModal.js.map\n","import { defineComponent, ref, openBlock, createBlock, mergeProps, unref, withCtx, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from './PopoverContentImpl.js';\nimport { u as useForwardPropsEmits } from '../shared/useForwardPropsEmits.js';\nimport { i as injectPopoverRootContext } from './PopoverRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"PopoverContentNonModal\",\n props: {\n side: {},\n sideOffset: {},\n align: {},\n alignOffset: {},\n avoidCollisions: { type: Boolean },\n collisionBoundary: {},\n collisionPadding: {},\n arrowPadding: {},\n sticky: {},\n hideWhenDetached: { type: Boolean },\n positionStrategy: {},\n updatePositionStrategy: {},\n disableUpdateOnLayoutShift: { type: Boolean },\n prioritizePosition: { type: Boolean },\n reference: {},\n asChild: { type: Boolean },\n as: {},\n disableOutsidePointerEvents: { type: Boolean }\n },\n emits: [\"escapeKeyDown\", \"pointerDownOutside\", \"focusOutside\", \"interactOutside\", \"openAutoFocus\", \"closeAutoFocus\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const rootContext = injectPopoverRootContext();\n const hasInteractedOutsideRef = ref(false);\n const hasPointerDownOutsideRef = ref(false);\n const forwarded = useForwardPropsEmits(props, emits);\n return (_ctx, _cache) => {\n return openBlock(), createBlock(_sfc_main$1, mergeProps(unref(forwarded), {\n \"trap-focus\": false,\n \"disable-outside-pointer-events\": false,\n onCloseAutoFocus: _cache[0] || (_cache[0] = (event) => {\n emits(\"closeAutoFocus\", event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.value) unref(rootContext).triggerElement.value?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.value = false;\n hasPointerDownOutsideRef.value = false;\n }),\n onInteractOutside: _cache[1] || (_cache[1] = async (event) => {\n emits(\"interactOutside\", event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.value = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.value = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = unref(rootContext).triggerElement.value?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.value) {\n event.preventDefault();\n }\n })\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=PopoverContentNonModal.js.map\n","import { defineComponent, openBlock, createBlock, unref, withCtx, mergeProps, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from './PopoverContentModal.js';\nimport { _ as _sfc_main$2 } from './PopoverContentNonModal.js';\nimport { u as useForwardPropsEmits } from '../shared/useForwardPropsEmits.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { u as useId } from '../shared/useId.js';\nimport { P as Presence } from '../Presence/Presence.js';\nimport { i as injectPopoverRootContext } from './PopoverRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"PopoverContent\",\n props: {\n forceMount: { type: Boolean },\n side: {},\n sideOffset: {},\n align: {},\n alignOffset: {},\n avoidCollisions: { type: Boolean },\n collisionBoundary: {},\n collisionPadding: {},\n arrowPadding: {},\n sticky: {},\n hideWhenDetached: { type: Boolean },\n positionStrategy: {},\n updatePositionStrategy: {},\n disableUpdateOnLayoutShift: { type: Boolean },\n prioritizePosition: { type: Boolean },\n reference: {},\n asChild: { type: Boolean },\n as: {},\n disableOutsidePointerEvents: { type: Boolean }\n },\n emits: [\"escapeKeyDown\", \"pointerDownOutside\", \"focusOutside\", \"interactOutside\", \"openAutoFocus\", \"closeAutoFocus\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const rootContext = injectPopoverRootContext();\n const forwarded = useForwardPropsEmits(props, emits);\n const { forwardRef } = useForwardExpose();\n rootContext.contentId ||= useId(undefined, \"reka-popover-content\");\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Presence), {\n present: _ctx.forceMount || unref(rootContext).open.value\n }, {\n default: withCtx(() => [\n unref(rootContext).modal.value ? (openBlock(), createBlock(_sfc_main$1, mergeProps({ key: 0 }, unref(forwarded), { ref: unref(forwardRef) }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16)) : (openBlock(), createBlock(_sfc_main$2, mergeProps({ key: 1 }, unref(forwarded), { ref: unref(forwardRef) }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16))\n ]),\n _: 3\n }, 8, [\"present\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=PopoverContent.js.map\n","import { defineComponent, openBlock, createBlock, unref, normalizeProps, guardReactiveProps, withCtx, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from '../Teleport/Teleport.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"DialogPortal\",\n props: {\n to: {},\n disabled: { type: Boolean },\n defer: { type: Boolean },\n forceMount: { type: Boolean }\n },\n setup(__props) {\n const props = __props;\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), normalizeProps(guardReactiveProps(props)), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=DialogPortal.js.map\n","import { defineComponent, ref, toRefs, openBlock, createBlock, unref, isRef, withCtx, renderSlot } from 'vue';\nimport { useVModel } from '@vueuse/core';\nimport { _ as _sfc_main$1 } from '../Menu/MenuRoot.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { u as useDirection } from '../shared/useDirection.js';\nimport { c as createContext } from '../shared/createContext.js';\n\nconst [injectDropdownMenuRootContext, provideDropdownMenuRootContext] = createContext(\"DropdownMenuRoot\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"DropdownMenuRoot\",\n props: {\n defaultOpen: { type: Boolean },\n open: { type: Boolean, default: undefined },\n dir: {},\n modal: { type: Boolean, default: true }\n },\n emits: [\"update:open\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emit = __emit;\n useForwardExpose();\n const open = useVModel(props, \"open\", emit, {\n defaultValue: props.defaultOpen,\n passive: props.open === undefined\n });\n const triggerElement = ref();\n const { modal, dir: propDir } = toRefs(props);\n const dir = useDirection(propDir);\n provideDropdownMenuRootContext({\n open,\n onOpenChange: (value) => {\n open.value = value;\n },\n onOpenToggle: () => {\n open.value = !open.value;\n },\n triggerId: \"\",\n triggerElement,\n contentId: \"\",\n modal,\n dir\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), {\n open: unref(open),\n \"onUpdate:open\": _cache[0] || (_cache[0] = ($event) => isRef(open) ? open.value = $event : null),\n dir: unref(dir),\n modal: unref(modal)\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", { open: unref(open) })\n ]),\n _: 3\n }, 8, [\"open\", \"dir\", \"modal\"]);\n };\n }\n});\n\nexport { _sfc_main as _, injectDropdownMenuRootContext as i };\n//# sourceMappingURL=DropdownMenuRoot.js.map\n","import { defineComponent, onMounted, openBlock, createBlock, unref, withCtx, createVNode, nextTick, withKeys, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from '../Menu/MenuAnchor.js';\nimport { i as injectDropdownMenuRootContext } from './DropdownMenuRoot.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { u as useId } from '../shared/useId.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"DropdownMenuTrigger\",\n props: {\n disabled: { type: Boolean },\n asChild: { type: Boolean },\n as: { default: \"button\" }\n },\n setup(__props) {\n const props = __props;\n const rootContext = injectDropdownMenuRootContext();\n const { forwardRef, currentElement: triggerElement } = useForwardExpose();\n onMounted(() => {\n rootContext.triggerElement = triggerElement;\n });\n rootContext.triggerId ||= useId(undefined, \"reka-dropdown-menu-trigger\");\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), { \"as-child\": \"\" }, {\n default: withCtx(() => [\n createVNode(unref(Primitive), {\n id: unref(rootContext).triggerId,\n ref: unref(forwardRef),\n type: _ctx.as === \"button\" ? \"button\" : undefined,\n \"as-child\": props.asChild,\n as: _ctx.as,\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": unref(rootContext).open.value,\n \"aria-controls\": unref(rootContext).open.value ? unref(rootContext).contentId : undefined,\n \"data-disabled\": _ctx.disabled ? \"\" : undefined,\n disabled: _ctx.disabled,\n \"data-state\": unref(rootContext).open.value ? \"open\" : \"closed\",\n onClick: _cache[0] || (_cache[0] = async (event) => {\n if (!_ctx.disabled && event.button === 0 && event.ctrlKey === false) {\n unref(rootContext)?.onOpenToggle();\n await nextTick();\n if (unref(rootContext).open.value) event.preventDefault();\n }\n }),\n onKeydown: _cache[1] || (_cache[1] = withKeys(\n (event) => {\n if (_ctx.disabled) return;\n if ([\"Enter\", \" \"].includes(event.key)) unref(rootContext).onOpenToggle();\n if (event.key === \"ArrowDown\") unref(rootContext).onOpenChange(true);\n if ([\"Enter\", \" \", \"ArrowDown\"].includes(event.key))\n event.preventDefault();\n },\n [\"enter\", \"space\", \"arrow-down\"]\n ))\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 8, [\"id\", \"type\", \"as-child\", \"as\", \"aria-expanded\", \"aria-controls\", \"data-disabled\", \"disabled\", \"data-state\"])\n ]),\n _: 3\n });\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=DropdownMenuTrigger.js.map\n","import { defineComponent, openBlock, createBlock, unref, normalizeProps, guardReactiveProps, withCtx, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from '../Menu/MenuPortal.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"DropdownMenuPortal\",\n props: {\n to: {},\n disabled: { type: Boolean },\n defer: { type: Boolean },\n forceMount: { type: Boolean }\n },\n setup(__props) {\n const props = __props;\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), normalizeProps(guardReactiveProps(props)), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=DropdownMenuPortal.js.map\n","import { defineComponent, ref, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from '../Menu/MenuContent.js';\nimport { u as useForwardPropsEmits } from '../shared/useForwardPropsEmits.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { u as useId } from '../shared/useId.js';\nimport { i as injectDropdownMenuRootContext } from './DropdownMenuRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"DropdownMenuContent\",\n props: {\n forceMount: { type: Boolean },\n loop: { type: Boolean },\n side: {},\n sideOffset: {},\n align: {},\n alignOffset: {},\n avoidCollisions: { type: Boolean },\n collisionBoundary: {},\n collisionPadding: {},\n arrowPadding: {},\n sticky: {},\n hideWhenDetached: { type: Boolean },\n positionStrategy: {},\n updatePositionStrategy: {},\n disableUpdateOnLayoutShift: { type: Boolean },\n prioritizePosition: { type: Boolean },\n reference: {},\n asChild: { type: Boolean },\n as: {}\n },\n emits: [\"escapeKeyDown\", \"pointerDownOutside\", \"focusOutside\", \"interactOutside\", \"closeAutoFocus\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const forwarded = useForwardPropsEmits(props, emits);\n useForwardExpose();\n const rootContext = injectDropdownMenuRootContext();\n const hasInteractedOutsideRef = ref(false);\n function handleCloseAutoFocus(event) {\n if (event.defaultPrevented)\n return;\n if (!hasInteractedOutsideRef.value) {\n setTimeout(() => {\n rootContext.triggerElement.value?.focus();\n }, 0);\n }\n hasInteractedOutsideRef.value = false;\n event.preventDefault();\n }\n rootContext.contentId ||= useId(undefined, \"reka-dropdown-menu-content\");\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), mergeProps(unref(forwarded), {\n id: unref(rootContext).contentId,\n \"aria-labelledby\": unref(rootContext)?.triggerId,\n style: {\n \"--reka-dropdown-menu-content-transform-origin\": \"var(--reka-popper-transform-origin)\",\n \"--reka-dropdown-menu-content-available-width\": \"var(--reka-popper-available-width)\",\n \"--reka-dropdown-menu-content-available-height\": \"var(--reka-popper-available-height)\",\n \"--reka-dropdown-menu-trigger-width\": \"var(--reka-popper-anchor-width)\",\n \"--reka-dropdown-menu-trigger-height\": \"var(--reka-popper-anchor-height)\"\n },\n onCloseAutoFocus: handleCloseAutoFocus,\n onInteractOutside: _cache[0] || (_cache[0] = (event) => {\n if (event.defaultPrevented) return;\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (!unref(rootContext).modal.value || isRightClick) hasInteractedOutsideRef.value = true;\n if (unref(rootContext).triggerElement.value?.contains(event.target)) event.preventDefault();\n })\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16, [\"id\", \"aria-labelledby\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=DropdownMenuContent.js.map\n","import { defineComponent, openBlock, createBlock, unref, normalizeProps, guardReactiveProps, withCtx, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from '../Menu/MenuItem.js';\nimport { u as useEmitAsProps } from '../shared/useEmitAsProps.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"DropdownMenuItem\",\n props: {\n disabled: { type: Boolean },\n textValue: {},\n asChild: { type: Boolean },\n as: {}\n },\n emits: [\"select\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const emitsAsProps = useEmitAsProps(emits);\n useForwardExpose();\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), normalizeProps(guardReactiveProps({ ...props, ...unref(emitsAsProps) })), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=DropdownMenuItem.js.map\n","import { defineComponent, openBlock, createBlock, unref, normalizeProps, guardReactiveProps, withCtx, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from '../Menu/MenuSeparator.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"DropdownMenuSeparator\",\n props: {\n asChild: { type: Boolean },\n as: {}\n },\n setup(__props) {\n const props = __props;\n useForwardExpose();\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), normalizeProps(guardReactiveProps(props)), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=DropdownMenuSeparator.js.map\n","import { defineComponent, openBlock, createBlock, unref, normalizeProps, guardReactiveProps, withCtx, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from '../Menu/MenuLabel.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"DropdownMenuLabel\",\n props: {\n asChild: { type: Boolean },\n as: {}\n },\n setup(__props) {\n const props = __props;\n useForwardExpose();\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), normalizeProps(guardReactiveProps(props)), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=DropdownMenuLabel.js.map\n","import { ref, watchEffect } from 'vue';\nimport { refAutoReset, createEventHook } from '@vueuse/shared';\n\nfunction useGraceArea(triggerElement, containerElement) {\n const isPointerInTransit = refAutoReset(false, 300);\n const pointerGraceArea = ref(null);\n const pointerExit = createEventHook();\n function handleRemoveGraceArea() {\n pointerGraceArea.value = null;\n isPointerInTransit.value = false;\n }\n function handleCreateGraceArea(event, hoverTarget) {\n const currentTarget = event.currentTarget;\n const exitPoint = { x: event.clientX, y: event.clientY };\n const exitSide = getExitSideFromRect(exitPoint, currentTarget.getBoundingClientRect());\n const paddedExitPoints = getPaddedExitPoints(exitPoint, exitSide);\n const hoverTargetPoints = getPointsFromRect(hoverTarget.getBoundingClientRect());\n const graceArea = getHull([...paddedExitPoints, ...hoverTargetPoints]);\n pointerGraceArea.value = graceArea;\n isPointerInTransit.value = true;\n }\n watchEffect((cleanupFn) => {\n if (triggerElement.value && containerElement.value) {\n const handleTriggerLeave = (event) => handleCreateGraceArea(event, containerElement.value);\n const handleContentLeave = (event) => handleCreateGraceArea(event, triggerElement.value);\n triggerElement.value.addEventListener(\"pointerleave\", handleTriggerLeave);\n containerElement.value.addEventListener(\"pointerleave\", handleContentLeave);\n cleanupFn(() => {\n triggerElement.value?.removeEventListener(\"pointerleave\", handleTriggerLeave);\n containerElement.value?.removeEventListener(\"pointerleave\", handleContentLeave);\n });\n }\n });\n watchEffect((cleanupFn) => {\n if (pointerGraceArea.value) {\n const handleTrackPointerGrace = (event) => {\n if (!pointerGraceArea.value)\n return;\n const target = event.target;\n const pointerPosition = { x: event.clientX, y: event.clientY };\n const hasEnteredTarget = triggerElement.value?.contains(target) || containerElement.value?.contains(target);\n const isPointerOutsideGraceArea = !isPointInPolygon(pointerPosition, pointerGraceArea.value);\n const isAnotherGraceAreaTrigger = !!target.closest(\"[data-grace-area-trigger]\");\n if (hasEnteredTarget) {\n handleRemoveGraceArea();\n } else if (isPointerOutsideGraceArea || isAnotherGraceAreaTrigger) {\n handleRemoveGraceArea();\n pointerExit.trigger();\n }\n };\n triggerElement.value?.ownerDocument.addEventListener(\"pointermove\", handleTrackPointerGrace);\n cleanupFn(() => triggerElement.value?.ownerDocument.removeEventListener(\"pointermove\", handleTrackPointerGrace));\n }\n });\n return {\n isPointerInTransit,\n onPointerExit: pointerExit.on\n };\n}\nfunction getExitSideFromRect(point, rect) {\n const top = Math.abs(rect.top - point.y);\n const bottom = Math.abs(rect.bottom - point.y);\n const right = Math.abs(rect.right - point.x);\n const left = Math.abs(rect.left - point.x);\n switch (Math.min(top, bottom, right, left)) {\n case left:\n return \"left\";\n case right:\n return \"right\";\n case top:\n return \"top\";\n case bottom:\n return \"bottom\";\n default:\n throw new Error(\"unreachable\");\n }\n}\nfunction getPaddedExitPoints(exitPoint, exitSide, padding = 5) {\n const paddedExitPoints = [];\n switch (exitSide) {\n case \"top\":\n paddedExitPoints.push(\n { x: exitPoint.x - padding, y: exitPoint.y + padding },\n { x: exitPoint.x + padding, y: exitPoint.y + padding }\n );\n break;\n case \"bottom\":\n paddedExitPoints.push(\n { x: exitPoint.x - padding, y: exitPoint.y - padding },\n { x: exitPoint.x + padding, y: exitPoint.y - padding }\n );\n break;\n case \"left\":\n paddedExitPoints.push(\n { x: exitPoint.x + padding, y: exitPoint.y - padding },\n { x: exitPoint.x + padding, y: exitPoint.y + padding }\n );\n break;\n case \"right\":\n paddedExitPoints.push(\n { x: exitPoint.x - padding, y: exitPoint.y - padding },\n { x: exitPoint.x - padding, y: exitPoint.y + padding }\n );\n break;\n }\n return paddedExitPoints;\n}\nfunction getPointsFromRect(rect) {\n const { top, right, bottom, left } = rect;\n return [\n { x: left, y: top },\n { x: right, y: top },\n { x: right, y: bottom },\n { x: left, y: bottom }\n ];\n}\nfunction isPointInPolygon(point, polygon) {\n const { x, y } = point;\n let inside = false;\n for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {\n const xi = polygon[i].x;\n const yi = polygon[i].y;\n const xj = polygon[j].x;\n const yj = polygon[j].y;\n const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;\n if (intersect)\n inside = !inside;\n }\n return inside;\n}\nfunction getHull(points) {\n const newPoints = points.slice();\n newPoints.sort((a, b) => {\n if (a.x < b.x)\n return -1;\n else if (a.x > b.x)\n return 1;\n else if (a.y < b.y)\n return -1;\n else if (a.y > b.y)\n return 1;\n else return 0;\n });\n return getHullPresorted(newPoints);\n}\nfunction getHullPresorted(points) {\n if (points.length <= 1)\n return points.slice();\n const upperHull = [];\n for (let i = 0; i < points.length; i++) {\n const p = points[i];\n while (upperHull.length >= 2) {\n const q = upperHull[upperHull.length - 1];\n const r = upperHull[upperHull.length - 2];\n if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x))\n upperHull.pop();\n else break;\n }\n upperHull.push(p);\n }\n upperHull.pop();\n const lowerHull = [];\n for (let i = points.length - 1; i >= 0; i--) {\n const p = points[i];\n while (lowerHull.length >= 2) {\n const q = lowerHull[lowerHull.length - 1];\n const r = lowerHull[lowerHull.length - 2];\n if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x))\n lowerHull.pop();\n else break;\n }\n lowerHull.push(p);\n }\n lowerHull.pop();\n if (upperHull.length === 1 && lowerHull.length === 1 && upperHull[0].x === lowerHull[0].x && upperHull[0].y === lowerHull[0].y) {\n return upperHull;\n } else {\n return upperHull.concat(lowerHull);\n }\n}\n\nexport { useGraceArea as u };\n//# sourceMappingURL=useGraceArea.js.map\n","import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from 'vue';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"Label\",\n props: {\n for: {},\n asChild: { type: Boolean },\n as: { default: \"label\" }\n },\n setup(__props) {\n const props = __props;\n useForwardExpose();\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), mergeProps(props, {\n onMousedown: _cache[0] || (_cache[0] = (event) => {\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault();\n })\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=Label.js.map\n","function clamp(value, min = Number.NEGATIVE_INFINITY, max = Number.POSITIVE_INFINITY) {\n return Math.min(max, Math.max(min, value));\n}\nfunction roundToStepPrecision(value, step) {\n let roundedValue = value;\n const stepString = step.toString();\n const pointIndex = stepString.indexOf(\".\");\n const precision = pointIndex >= 0 ? stepString.length - pointIndex : 0;\n if (precision > 0) {\n const pow = 10 ** precision;\n roundedValue = Math.round(roundedValue * pow) / pow;\n }\n return roundedValue;\n}\nfunction snapValueToStep(value, min, max, step) {\n min = Number(min);\n max = Number(max);\n const remainder = (value - (Number.isNaN(min) ? 0 : min)) % step;\n let snappedValue = roundToStepPrecision(Math.abs(remainder) * 2 >= step ? value + Math.sign(remainder) * (step - Math.abs(remainder)) : value - remainder, step);\n if (!Number.isNaN(min)) {\n if (snappedValue < min)\n snappedValue = min;\n else if (!Number.isNaN(max) && snappedValue > max)\n snappedValue = min + Math.floor(roundToStepPrecision((max - min) / step, step)) * step;\n } else if (!Number.isNaN(max) && snappedValue > max) {\n snappedValue = Math.floor(roundToStepPrecision(max / step, step)) * step;\n }\n snappedValue = roundToStepPrecision(snappedValue, step);\n return snappedValue;\n}\n\nexport { clamp as c, snapValueToStep as s };\n//# sourceMappingURL=clamp.js.map\n","import { defineComponent, toRefs, computed, openBlock, createBlock, unref, withCtx, renderSlot } from 'vue';\nimport { useVModel } from '@vueuse/core';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { c as createContext } from '../shared/createContext.js';\n\nconst [injectPaginationRootContext, providePaginationRootContext] = createContext(\"PaginationRoot\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"PaginationRoot\",\n props: {\n page: {},\n defaultPage: { default: 1 },\n itemsPerPage: {},\n total: { default: 0 },\n siblingCount: { default: 2 },\n disabled: { type: Boolean },\n showEdges: { type: Boolean, default: false },\n asChild: { type: Boolean },\n as: { default: \"nav\" }\n },\n emits: [\"update:page\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const { siblingCount, disabled, showEdges } = toRefs(props);\n useForwardExpose();\n const page = useVModel(props, \"page\", emits, {\n defaultValue: props.defaultPage,\n passive: props.page === undefined\n });\n const pageCount = computed(() => Math.max(1, Math.ceil(props.total / (props.itemsPerPage || 1))));\n providePaginationRootContext({\n page,\n onPageChange(value) {\n page.value = value;\n },\n pageCount,\n siblingCount,\n disabled,\n showEdges\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), {\n as: _ctx.as,\n \"as-child\": _ctx.asChild\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", {\n page: unref(page),\n pageCount: pageCount.value\n })\n ]),\n _: 3\n }, 8, [\"as\", \"as-child\"]);\n };\n }\n});\n\nexport { _sfc_main as _, injectPaginationRootContext as i };\n//# sourceMappingURL=PaginationRoot.js.map\n","import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot, createTextVNode } from 'vue';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"PaginationEllipsis\",\n props: {\n asChild: { type: Boolean },\n as: {}\n },\n setup(__props) {\n const props = __props;\n useForwardExpose();\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), mergeProps(props, { \"data-type\": \"ellipsis\" }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", {}, () => [\n _cache[0] || (_cache[0] = createTextVNode(\"…\"))\n ])\n ]),\n _: 3\n }, 16);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=PaginationEllipsis.js.map\n","import { defineComponent, computed, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot, createTextVNode } from 'vue';\nimport { i as injectPaginationRootContext } from './PaginationRoot.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"PaginationFirst\",\n props: {\n asChild: { type: Boolean },\n as: { default: \"button\" }\n },\n setup(__props) {\n const props = __props;\n const rootContext = injectPaginationRootContext();\n useForwardExpose();\n const disabled = computed(() => rootContext.page.value === 1 || rootContext.disabled.value);\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), mergeProps(props, {\n \"aria-label\": \"First Page\",\n type: _ctx.as === \"button\" ? \"button\" : undefined,\n disabled: disabled.value,\n onClick: _cache[0] || (_cache[0] = ($event) => !disabled.value && unref(rootContext).onPageChange(1))\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", {}, () => [\n _cache[1] || (_cache[1] = createTextVNode(\"First page\"))\n ])\n ]),\n _: 3\n }, 16, [\"type\", \"disabled\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=PaginationFirst.js.map\n","import { defineComponent, computed, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot, createTextVNode } from 'vue';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { i as injectPaginationRootContext } from './PaginationRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"PaginationLast\",\n props: {\n asChild: { type: Boolean },\n as: { default: \"button\" }\n },\n setup(__props) {\n const props = __props;\n const rootContext = injectPaginationRootContext();\n useForwardExpose();\n const disabled = computed(() => rootContext.page.value === rootContext.pageCount.value || rootContext.disabled.value);\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), mergeProps(props, {\n \"aria-label\": \"Last Page\",\n type: _ctx.as === \"button\" ? \"button\" : undefined,\n disabled: disabled.value,\n onClick: _cache[0] || (_cache[0] = ($event) => !disabled.value && unref(rootContext).onPageChange(unref(rootContext).pageCount.value))\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", {}, () => [\n _cache[1] || (_cache[1] = createTextVNode(\"Last page\"))\n ])\n ]),\n _: 3\n }, 16, [\"type\", \"disabled\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=PaginationLast.js.map\n","function range(start, end) {\n const length = end - start + 1;\n return Array.from({ length }, (_, idx) => idx + start);\n}\nfunction transform(items) {\n return items.map((value) => {\n if (typeof value === \"number\")\n return { type: \"page\", value };\n return { type: \"ellipsis\" };\n });\n}\nconst ELLIPSIS = \"ellipsis\";\nfunction getRange(currentPage, pageCount, siblingCount, showEdges) {\n const firstPageIndex = 1;\n const lastPageIndex = pageCount;\n const leftSiblingIndex = Math.max(currentPage - siblingCount, firstPageIndex);\n const rightSiblingIndex = Math.min(currentPage + siblingCount, lastPageIndex);\n if (showEdges) {\n const totalPageNumbers = Math.min(2 * siblingCount + 5, pageCount);\n const itemCount = totalPageNumbers - 2;\n const showLeftEllipsis = leftSiblingIndex > firstPageIndex + 2 && Math.abs(lastPageIndex - itemCount - firstPageIndex + 1) > 2 && Math.abs(leftSiblingIndex - firstPageIndex) > 2;\n const showRightEllipsis = rightSiblingIndex < lastPageIndex - 2 && Math.abs(lastPageIndex - itemCount) > 2 && Math.abs(lastPageIndex - rightSiblingIndex) > 2;\n if (!showLeftEllipsis && showRightEllipsis) {\n const leftRange = range(1, itemCount);\n return [...leftRange, ELLIPSIS, lastPageIndex];\n }\n if (showLeftEllipsis && !showRightEllipsis) {\n const rightRange = range(lastPageIndex - itemCount + 1, lastPageIndex);\n return [firstPageIndex, ELLIPSIS, ...rightRange];\n }\n if (showLeftEllipsis && showRightEllipsis) {\n const middleRange = range(leftSiblingIndex, rightSiblingIndex);\n return [firstPageIndex, ELLIPSIS, ...middleRange, ELLIPSIS, lastPageIndex];\n }\n const fullRange = range(firstPageIndex, lastPageIndex);\n return fullRange;\n } else {\n const itemCount = siblingCount * 2 + 1;\n if (pageCount < itemCount)\n return range(1, lastPageIndex);\n else if (currentPage <= siblingCount + 1)\n return range(firstPageIndex, itemCount);\n else if (pageCount - currentPage <= siblingCount)\n return range(pageCount - itemCount + 1, lastPageIndex);\n else\n return range(leftSiblingIndex, rightSiblingIndex);\n }\n}\n\nexport { getRange as g, transform as t };\n//# sourceMappingURL=utils.js.map\n","import { defineComponent, computed, openBlock, createBlock, unref, normalizeProps, guardReactiveProps, withCtx, renderSlot } from 'vue';\nimport { t as transform, g as getRange } from './utils.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { i as injectPaginationRootContext } from './PaginationRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"PaginationList\",\n props: {\n asChild: { type: Boolean },\n as: {}\n },\n setup(__props) {\n const props = __props;\n useForwardExpose();\n const rootContext = injectPaginationRootContext();\n const transformedRange = computed(() => {\n return transform(\n getRange(\n rootContext.page.value,\n rootContext.pageCount.value,\n rootContext.siblingCount.value,\n rootContext.showEdges.value\n )\n );\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), normalizeProps(guardReactiveProps(props)), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", { items: transformedRange.value })\n ]),\n _: 3\n }, 16);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=PaginationList.js.map\n","import { defineComponent, computed, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot, createTextVNode, toDisplayString } from 'vue';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { i as injectPaginationRootContext } from './PaginationRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"PaginationListItem\",\n props: {\n value: {},\n asChild: { type: Boolean },\n as: { default: \"button\" }\n },\n setup(__props) {\n const props = __props;\n useForwardExpose();\n const rootContext = injectPaginationRootContext();\n const isSelected = computed(() => rootContext.page.value === props.value);\n const disabled = computed(() => rootContext.disabled.value);\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), mergeProps(props, {\n \"data-type\": \"page\",\n \"aria-label\": `Page ${_ctx.value}`,\n \"aria-current\": isSelected.value ? \"page\" : undefined,\n \"data-selected\": isSelected.value ? \"true\" : undefined,\n disabled: disabled.value,\n type: _ctx.as === \"button\" ? \"button\" : undefined,\n onClick: _cache[0] || (_cache[0] = ($event) => !disabled.value && unref(rootContext).onPageChange(_ctx.value))\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", {}, () => [\n createTextVNode(toDisplayString(_ctx.value), 1)\n ])\n ]),\n _: 3\n }, 16, [\"aria-label\", \"aria-current\", \"data-selected\", \"disabled\", \"type\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=PaginationListItem.js.map\n","import { defineComponent, computed, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot, createTextVNode } from 'vue';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { i as injectPaginationRootContext } from './PaginationRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"PaginationNext\",\n props: {\n asChild: { type: Boolean },\n as: { default: \"button\" }\n },\n setup(__props) {\n const props = __props;\n useForwardExpose();\n const rootContext = injectPaginationRootContext();\n const disabled = computed(() => rootContext.page.value === rootContext.pageCount.value || rootContext.disabled.value);\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), mergeProps(props, {\n \"aria-label\": \"Next Page\",\n type: _ctx.as === \"button\" ? \"button\" : undefined,\n disabled: disabled.value,\n onClick: _cache[0] || (_cache[0] = ($event) => !disabled.value && unref(rootContext).onPageChange(unref(rootContext).page.value + 1))\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", {}, () => [\n _cache[1] || (_cache[1] = createTextVNode(\"Next page\"))\n ])\n ]),\n _: 3\n }, 16, [\"type\", \"disabled\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=PaginationNext.js.map\n","import { defineComponent, computed, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot, createTextVNode } from 'vue';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { i as injectPaginationRootContext } from './PaginationRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"PaginationPrev\",\n props: {\n asChild: { type: Boolean },\n as: { default: \"button\" }\n },\n setup(__props) {\n const props = __props;\n useForwardExpose();\n const rootContext = injectPaginationRootContext();\n const disabled = computed(() => rootContext.page.value === 1 || rootContext.disabled.value);\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), mergeProps(props, {\n \"aria-label\": \"Previous Page\",\n type: _ctx.as === \"button\" ? \"button\" : undefined,\n disabled: disabled.value,\n onClick: _cache[0] || (_cache[0] = ($event) => !disabled.value && unref(rootContext).onPageChange(unref(rootContext).page.value - 1))\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", {}, () => [\n _cache[1] || (_cache[1] = createTextVNode(\"Prev page\"))\n ])\n ]),\n _: 3\n }, 16, [\"type\", \"disabled\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=PaginationPrev.js.map\n","import { defineComponent, toRefs, openBlock, createBlock, unref, withCtx, createVNode, renderSlot, createCommentVNode } from 'vue';\nimport { useVModel } from '@vueuse/core';\nimport { _ as _sfc_main$1 } from '../RovingFocus/RovingFocusGroup.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { u as useDirection } from '../shared/useDirection.js';\nimport { u as useFormControl } from '../shared/useFormControl.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { _ as _sfc_main$2 } from '../VisuallyHidden/VisuallyHiddenInput.js';\nimport { c as createContext } from '../shared/createContext.js';\n\nconst [injectRadioGroupRootContext, provideRadioGroupRootContext] = createContext(\"RadioGroupRoot\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"RadioGroupRoot\",\n props: {\n modelValue: {},\n defaultValue: {},\n disabled: { type: Boolean, default: false },\n orientation: { default: undefined },\n dir: {},\n loop: { type: Boolean, default: true },\n asChild: { type: Boolean },\n as: {},\n name: {},\n required: { type: Boolean, default: false }\n },\n emits: [\"update:modelValue\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const { forwardRef, currentElement } = useForwardExpose();\n const modelValue = useVModel(props, \"modelValue\", emits, {\n defaultValue: props.defaultValue,\n passive: props.modelValue === undefined\n });\n const { disabled, loop, orientation, name, required, dir: propDir } = toRefs(props);\n const dir = useDirection(propDir);\n const isFormControl = useFormControl(currentElement);\n provideRadioGroupRootContext({\n modelValue,\n changeModelValue: (value) => {\n modelValue.value = value;\n },\n disabled,\n loop,\n orientation,\n name: name?.value,\n required\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), {\n \"as-child\": \"\",\n orientation: unref(orientation),\n dir: unref(dir),\n loop: unref(loop)\n }, {\n default: withCtx(() => [\n createVNode(unref(Primitive), {\n ref: unref(forwardRef),\n role: \"radiogroup\",\n \"data-disabled\": unref(disabled) ? \"\" : undefined,\n \"as-child\": _ctx.asChild,\n as: _ctx.as,\n \"aria-orientation\": unref(orientation),\n \"aria-required\": unref(required),\n dir: unref(dir)\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", { modelValue: unref(modelValue) }),\n unref(isFormControl) && unref(name) ? (openBlock(), createBlock(unref(_sfc_main$2), {\n key: 0,\n required: unref(required),\n disabled: unref(disabled),\n value: unref(modelValue),\n name: unref(name)\n }, null, 8, [\"required\", \"disabled\", \"value\", \"name\"])) : createCommentVNode(\"\", true)\n ]),\n _: 3\n }, 8, [\"data-disabled\", \"as-child\", \"as\", \"aria-orientation\", \"aria-required\", \"dir\"])\n ]),\n _: 3\n }, 8, [\"orientation\", \"dir\", \"loop\"]);\n };\n }\n});\n\nexport { _sfc_main as _, injectRadioGroupRootContext as i };\n//# sourceMappingURL=RadioGroupRoot.js.map\n","import { h as handleAndDispatchCustomEvent } from '../shared/handleAndDispatchCustomEvent.js';\n\nconst RADIO_SELECT = \"radio.select\";\nfunction handleSelect(event, value, callback) {\n const eventDetail = { originalEvent: event, value };\n handleAndDispatchCustomEvent(RADIO_SELECT, callback, eventDetail);\n}\n\nexport { handleSelect as h };\n//# sourceMappingURL=utils.js.map\n","import { defineComponent, toRefs, computed, openBlock, createBlock, unref, mergeProps, withModifiers, withCtx, renderSlot, createCommentVNode } from 'vue';\nimport { useVModel } from '@vueuse/core';\nimport { h as handleSelect } from './utils.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { u as useFormControl } from '../shared/useFormControl.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { _ as _sfc_main$1 } from '../VisuallyHidden/VisuallyHiddenInput.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"Radio\",\n props: {\n id: {},\n value: {},\n disabled: { type: Boolean, default: false },\n checked: { type: Boolean, default: undefined },\n asChild: { type: Boolean },\n as: { default: \"button\" },\n name: {},\n required: { type: Boolean }\n },\n emits: [\"update:checked\", \"select\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const checked = useVModel(props, \"checked\", emits, {\n passive: props.checked === undefined\n });\n const { value } = toRefs(props);\n const { forwardRef, currentElement: triggerElement } = useForwardExpose();\n const isFormControl = useFormControl(triggerElement);\n const ariaLabel = computed(() => props.id && triggerElement.value ? document.querySelector(`[for=\"${props.id}\"]`)?.innerText ?? props.value : undefined);\n function handleClick(event) {\n handleSelect(event, props.value, (ev) => {\n emits(\"select\", ev);\n if (ev?.defaultPrevented)\n return;\n checked.value = true;\n if (isFormControl.value) {\n ev.stopPropagation();\n }\n });\n }\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), mergeProps(_ctx.$attrs, {\n id: _ctx.id,\n ref: unref(forwardRef),\n role: \"radio\",\n type: _ctx.as === \"button\" ? \"button\" : undefined,\n as: _ctx.as,\n \"aria-checked\": unref(checked),\n \"aria-label\": ariaLabel.value,\n \"as-child\": _ctx.asChild,\n disabled: _ctx.disabled ? \"\" : undefined,\n \"data-state\": unref(checked) ? \"checked\" : \"unchecked\",\n \"data-disabled\": _ctx.disabled ? \"\" : undefined,\n value: unref(value),\n required: _ctx.required,\n name: _ctx.name,\n onClick: withModifiers(handleClick, [\"stop\"])\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", { checked: unref(checked) }),\n unref(isFormControl) && _ctx.name ? (openBlock(), createBlock(unref(_sfc_main$1), {\n key: 0,\n type: \"radio\",\n tabindex: \"-1\",\n value: unref(value),\n checked: !!unref(checked),\n name: _ctx.name,\n disabled: _ctx.disabled,\n required: _ctx.required\n }, null, 8, [\"value\", \"checked\", \"name\", \"disabled\", \"required\"])) : createCommentVNode(\"\", true)\n ]),\n _: 3\n }, 16, [\"id\", \"type\", \"as\", \"aria-checked\", \"aria-label\", \"as-child\", \"disabled\", \"data-state\", \"data-disabled\", \"value\", \"required\", \"name\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=Radio.js.map\n","import { defineComponent, computed, ref, openBlock, createBlock, unref, withCtx, createVNode, mergeProps, withKeys, withModifiers, renderSlot } from 'vue';\nimport { _ as _sfc_main$2 } from './Radio.js';\nimport { _ as _sfc_main$1 } from '../RovingFocus/RovingFocusItem.js';\nimport { useEventListener } from '@vueuse/core';\nimport { isEqual } from 'ohash';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { i as injectRadioGroupRootContext } from './RadioGroupRoot.js';\nimport { c as createContext } from '../shared/createContext.js';\n\nconst [injectRadioGroupItemContext, provideRadiogroupItemContext] = createContext(\"RadioGroupItem\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n ...{\n inheritAttrs: false\n },\n __name: \"RadioGroupItem\",\n props: {\n id: {},\n value: {},\n disabled: { type: Boolean, default: false },\n asChild: { type: Boolean },\n as: { default: \"button\" },\n name: {},\n required: { type: Boolean }\n },\n emits: [\"select\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const { forwardRef, currentElement } = useForwardExpose();\n const rootContext = injectRadioGroupRootContext();\n const disabled = computed(() => rootContext.disabled.value || props.disabled);\n const required = computed(() => rootContext.required.value || props.required);\n const checked = computed(() => isEqual(rootContext.modelValue?.value, props.value));\n provideRadiogroupItemContext({ disabled, checked });\n const isArrowKeyPressed = ref(false);\n const ARROW_KEYS = [\"ArrowUp\", \"ArrowDown\", \"ArrowLeft\", \"ArrowRight\"];\n useEventListener(\"keydown\", (event) => {\n if (ARROW_KEYS.includes(event.key))\n isArrowKeyPressed.value = true;\n });\n useEventListener(\"keyup\", () => {\n isArrowKeyPressed.value = false;\n });\n function handleFocus() {\n setTimeout(() => {\n if (isArrowKeyPressed.value)\n currentElement.value?.click();\n }, 0);\n }\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), {\n checked: checked.value,\n disabled: disabled.value,\n \"as-child\": \"\",\n focusable: !disabled.value,\n active: checked.value\n }, {\n default: withCtx(() => [\n createVNode(_sfc_main$2, mergeProps({ ..._ctx.$attrs, ...props }, {\n ref: unref(forwardRef),\n checked: checked.value,\n required: required.value,\n disabled: disabled.value,\n \"onUpdate:checked\": _cache[0] || (_cache[0] = ($event) => unref(rootContext).changeModelValue(_ctx.value)),\n onSelect: _cache[1] || (_cache[1] = ($event) => emits(\"select\", $event)),\n onKeydown: _cache[2] || (_cache[2] = withKeys(withModifiers(() => {\n }, [\"prevent\"]), [\"enter\"])),\n onFocus: handleFocus\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", {\n checked: checked.value,\n required: required.value,\n disabled: disabled.value\n })\n ]),\n _: 3\n }, 16, [\"checked\", \"required\", \"disabled\"])\n ]),\n _: 3\n }, 8, [\"checked\", \"disabled\", \"focusable\", \"active\"]);\n };\n }\n});\n\nexport { _sfc_main as _, injectRadioGroupItemContext as i };\n//# sourceMappingURL=RadioGroupItem.js.map\n","import { defineComponent, openBlock, createBlock, unref, withCtx, createVNode, mergeProps, renderSlot } from 'vue';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { i as injectRadioGroupItemContext } from './RadioGroupItem.js';\nimport { P as Presence } from '../Presence/Presence.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"RadioGroupIndicator\",\n props: {\n forceMount: { type: Boolean },\n asChild: { type: Boolean },\n as: { default: \"span\" }\n },\n setup(__props) {\n const { forwardRef } = useForwardExpose();\n const itemContext = injectRadioGroupItemContext();\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Presence), {\n present: _ctx.forceMount || unref(itemContext).checked.value\n }, {\n default: withCtx(() => [\n createVNode(unref(Primitive), mergeProps({\n ref: unref(forwardRef),\n \"data-state\": unref(itemContext).checked.value ? \"checked\" : \"unchecked\",\n \"data-disabled\": unref(itemContext).disabled.value ? \"\" : undefined,\n \"as-child\": _ctx.asChild,\n as: _ctx.as\n }, _ctx.$attrs), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16, [\"data-state\", \"data-disabled\", \"as-child\", \"as\"])\n ]),\n _: 3\n }, 8, [\"present\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=RadioGroupIndicator.js.map\n","import { defineComponent, ref, watch, openBlock, createBlock, unref, withCtx, createElementVNode, mergeProps, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from '../VisuallyHidden/VisuallyHidden.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"BubbleSelect\",\n props: {\n autocomplete: {},\n autofocus: { type: Boolean },\n disabled: { type: Boolean },\n form: {},\n multiple: { type: Boolean },\n name: {},\n required: { type: Boolean },\n size: {},\n value: {}\n },\n setup(__props) {\n const props = __props;\n const selectElement = ref();\n watch(() => props.value, (cur, prev) => {\n const selectProto = window.HTMLSelectElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(\n selectProto,\n \"value\"\n );\n const setValue = descriptor.set;\n if (cur !== prev && setValue) {\n const event = new Event(\"change\", { bubbles: true });\n setValue.call(selectElement.value, cur);\n selectElement.value?.dispatchEvent(event);\n }\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), { \"as-child\": \"\" }, {\n default: withCtx(() => [\n createElementVNode(\"select\", mergeProps({\n ref_key: \"selectElement\",\n ref: selectElement\n }, props), [\n renderSlot(_ctx.$slots, \"default\")\n ], 16)\n ]),\n _: 3\n });\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=BubbleSelect.js.map\n","import { isEqual } from 'ohash';\n\nconst OPEN_KEYS = [\" \", \"Enter\", \"ArrowUp\", \"ArrowDown\"];\nconst SELECTION_KEYS = [\" \", \"Enter\"];\nconst CONTENT_MARGIN = 10;\nfunction valueComparator(value, currentValue, comparator) {\n if (value === undefined)\n return false;\n else if (Array.isArray(value))\n return value.some((val) => compare(val, currentValue, comparator));\n else\n return compare(value, currentValue, comparator);\n}\nfunction compare(value, currentValue, comparator) {\n if (value === undefined || currentValue === undefined)\n return false;\n if (typeof value === \"string\")\n return value === currentValue;\n if (typeof comparator === \"function\")\n return comparator(value, currentValue);\n if (typeof comparator === \"string\")\n return value?.[comparator] === currentValue?.[comparator];\n return isEqual(value, currentValue);\n}\n\nexport { CONTENT_MARGIN as C, OPEN_KEYS as O, SELECTION_KEYS as S, compare as c, valueComparator as v };\n//# sourceMappingURL=utils.js.map\n","import { defineComponent, toRefs, ref, computed, openBlock, createBlock, unref, withCtx, renderSlot, createElementBlock, createCommentVNode, Fragment, renderList, mergeProps } from 'vue';\nimport { _ as _sfc_main$2 } from './BubbleSelect.js';\nimport { _ as _sfc_main$1 } from '../Popper/PopperRoot.js';\nimport { useVModel } from '@vueuse/core';\nimport { c as compare } from './utils.js';\nimport { u as useCollection } from '../Collection/Collection.js';\nimport { u as useDirection } from '../shared/useDirection.js';\nimport { u as useFormControl } from '../shared/useFormControl.js';\nimport { c as createContext } from '../shared/createContext.js';\nimport { i as isNullish } from '../shared/nullish.js';\n\nconst _hoisted_1 = {\n key: 0,\n value: \"\"\n};\nconst [injectSelectRootContext, provideSelectRootContext] = createContext(\"SelectRoot\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n ...{\n inheritAttrs: false\n },\n __name: \"SelectRoot\",\n props: {\n open: { type: Boolean, default: undefined },\n defaultOpen: { type: Boolean },\n defaultValue: {},\n modelValue: { default: undefined },\n by: {},\n dir: {},\n multiple: { type: Boolean },\n autocomplete: {},\n disabled: { type: Boolean },\n name: {},\n required: { type: Boolean }\n },\n emits: [\"update:modelValue\", \"update:open\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const { required, disabled, multiple, dir: propDir } = toRefs(props);\n const modelValue = useVModel(props, \"modelValue\", emits, {\n defaultValue: props.defaultValue ?? (multiple.value ? [] : undefined),\n passive: props.modelValue === undefined,\n deep: true\n });\n const open = useVModel(props, \"open\", emits, {\n defaultValue: props.defaultOpen,\n passive: props.open === undefined\n });\n const triggerElement = ref();\n const valueElement = ref();\n const triggerPointerDownPosRef = ref({\n x: 0,\n y: 0\n });\n const isEmptyModelValue = computed(() => {\n if (multiple.value && Array.isArray(modelValue.value))\n return modelValue.value?.length === 0;\n else\n return isNullish(modelValue.value);\n });\n useCollection({ isProvider: true });\n const dir = useDirection(propDir);\n const isFormControl = useFormControl(triggerElement);\n const optionsSet = ref(/* @__PURE__ */ new Set());\n const nativeSelectKey = computed(() => {\n return Array.from(optionsSet.value).map((option) => option.value).join(\";\");\n });\n function handleValueChange(value) {\n if (multiple.value) {\n const array = Array.isArray(modelValue.value) ? [...modelValue.value] : [];\n const index = array.findIndex((i) => compare(i, value, props.by));\n index === -1 ? array.push(value) : array.splice(index, 1);\n modelValue.value = [...array];\n } else {\n modelValue.value = value;\n }\n }\n provideSelectRootContext({\n triggerElement,\n onTriggerChange: (node) => {\n triggerElement.value = node;\n },\n valueElement,\n onValueElementChange: (node) => {\n valueElement.value = node;\n },\n contentId: \"\",\n modelValue,\n // @ts-expect-error Missing infer for AcceptableValue\n onValueChange: handleValueChange,\n by: props.by,\n open,\n multiple,\n required,\n onOpenChange: (value) => {\n open.value = value;\n },\n dir,\n triggerPointerDownPosRef,\n disabled,\n isEmptyModelValue,\n optionsSet,\n onOptionAdd: (option) => optionsSet.value.add(option),\n onOptionRemove: (option) => optionsSet.value.delete(option)\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), null, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", {\n modelValue: unref(modelValue),\n open: unref(open)\n }),\n unref(isFormControl) ? (openBlock(), createBlock(_sfc_main$2, {\n key: nativeSelectKey.value,\n \"aria-hidden\": \"true\",\n tabindex: \"-1\",\n multiple: unref(multiple),\n required: unref(required),\n name: _ctx.name,\n autocomplete: _ctx.autocomplete,\n disabled: unref(disabled),\n value: unref(modelValue)\n }, {\n default: withCtx(() => [\n unref(isNullish)(unref(modelValue)) ? (openBlock(), createElementBlock(\"option\", _hoisted_1)) : createCommentVNode(\"\", true),\n (openBlock(true), createElementBlock(Fragment, null, renderList(Array.from(optionsSet.value), (option) => {\n return openBlock(), createElementBlock(\"option\", mergeProps({\n key: option.value ?? \"\",\n ref_for: true\n }, option), null, 16);\n }), 128))\n ]),\n _: 1\n }, 8, [\"multiple\", \"required\", \"name\", \"autocomplete\", \"disabled\", \"value\"])) : createCommentVNode(\"\", true)\n ]),\n _: 3\n });\n };\n }\n});\n\nexport { _sfc_main as _, injectSelectRootContext as i, provideSelectRootContext as p };\n//# sourceMappingURL=SelectRoot.js.map\n","import { defineComponent, computed, onMounted, openBlock, createBlock, unref, withCtx, createVNode, withModifiers, renderSlot } from 'vue';\nimport { O as OPEN_KEYS } from './utils.js';\nimport { _ as _sfc_main$1 } from '../Popper/PopperAnchor.js';\nimport { u as useCollection } from '../Collection/Collection.js';\nimport { i as injectSelectRootContext } from './SelectRoot.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { u as useId } from '../shared/useId.js';\nimport { u as useTypeahead } from '../shared/useTypeahead.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"SelectTrigger\",\n props: {\n disabled: { type: Boolean },\n reference: {},\n asChild: { type: Boolean },\n as: { default: \"button\" }\n },\n setup(__props) {\n const props = __props;\n const rootContext = injectSelectRootContext();\n const { forwardRef, currentElement: triggerElement } = useForwardExpose();\n const isDisabled = computed(() => rootContext.disabled?.value || props.disabled);\n rootContext.contentId ||= useId(undefined, \"reka-select-content\");\n onMounted(() => {\n rootContext.onTriggerChange(triggerElement.value);\n });\n const { getItems } = useCollection();\n const { search, handleTypeaheadSearch, resetTypeahead } = useTypeahead();\n function handleOpen() {\n if (!isDisabled.value) {\n rootContext.onOpenChange(true);\n resetTypeahead();\n }\n }\n function handlePointerOpen(event) {\n handleOpen();\n rootContext.triggerPointerDownPosRef.value = {\n x: Math.round(event.pageX),\n y: Math.round(event.pageY)\n };\n }\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), {\n \"as-child\": \"\",\n reference: _ctx.reference\n }, {\n default: withCtx(() => [\n createVNode(unref(Primitive), {\n ref: unref(forwardRef),\n role: \"combobox\",\n type: _ctx.as === \"button\" ? \"button\" : undefined,\n \"aria-controls\": unref(rootContext).contentId,\n \"aria-expanded\": unref(rootContext).open.value || false,\n \"aria-required\": unref(rootContext).required?.value,\n \"aria-autocomplete\": \"none\",\n disabled: isDisabled.value,\n dir: unref(rootContext)?.dir.value,\n \"data-state\": unref(rootContext)?.open.value ? \"open\" : \"closed\",\n \"data-disabled\": isDisabled.value ? \"\" : undefined,\n \"data-placeholder\": unref(rootContext).modelValue?.value ? undefined : \"\",\n \"as-child\": _ctx.asChild,\n as: _ctx.as,\n onClick: _cache[0] || (_cache[0] = (event) => {\n event?.currentTarget?.focus();\n }),\n onPointerdown: _cache[1] || (_cache[1] = (event) => {\n if (event.pointerType === \"touch\")\n return event.preventDefault();\n const target = event.target;\n if (target.hasPointerCapture(event.pointerId)) {\n target.releasePointerCapture(event.pointerId);\n }\n if (event.button === 0 && event.ctrlKey === false) {\n handlePointerOpen(event);\n event.preventDefault();\n }\n }),\n onPointerup: _cache[2] || (_cache[2] = withModifiers(\n (event) => {\n if (event.pointerType === \"touch\")\n handlePointerOpen(event);\n },\n [\"prevent\"]\n )),\n onKeydown: _cache[3] || (_cache[3] = (event) => {\n const isTypingAhead = unref(search) !== \"\";\n const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n if (!isModifierKey && event.key.length === 1) {\n if (isTypingAhead && event.key === \" \") return;\n }\n unref(handleTypeaheadSearch)(event.key, unref(getItems)());\n if (unref(OPEN_KEYS).includes(event.key)) {\n handleOpen();\n event.preventDefault();\n }\n })\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 8, [\"type\", \"aria-controls\", \"aria-expanded\", \"aria-required\", \"disabled\", \"dir\", \"data-state\", \"data-disabled\", \"data-placeholder\", \"as-child\", \"as\"])\n ]),\n _: 3\n }, 8, [\"reference\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=SelectTrigger.js.map\n","import { defineComponent, openBlock, createBlock, unref, normalizeProps, guardReactiveProps, withCtx, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from '../Teleport/Teleport.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"SelectPortal\",\n props: {\n to: {},\n disabled: { type: Boolean },\n defer: { type: Boolean },\n forceMount: { type: Boolean }\n },\n setup(__props) {\n const props = __props;\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), normalizeProps(guardReactiveProps(props)), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=SelectPortal.js.map\n","import { defineComponent, ref, onMounted, nextTick, openBlock, createElementBlock, normalizeStyle, createVNode, unref, mergeProps, withCtx, renderSlot } from 'vue';\nimport { C as CONTENT_MARGIN } from './utils.js';\nimport { u as useCollection } from '../Collection/Collection.js';\nimport { useResizeObserver } from '@vueuse/core';\nimport { i as injectSelectContentContext } from './SelectContentImpl.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { c as createContext } from '../shared/createContext.js';\nimport { i as injectSelectRootContext } from './SelectRoot.js';\nimport { c as clamp } from '../shared/clamp.js';\n\nconst [injectSelectItemAlignedPositionContext, provideSelectItemAlignedPositionContext] = createContext(\"SelectItemAlignedPosition\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n ...{\n inheritAttrs: false\n },\n __name: \"SelectItemAlignedPosition\",\n props: {\n asChild: { type: Boolean },\n as: {}\n },\n emits: [\"placed\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const { getItems } = useCollection();\n const rootContext = injectSelectRootContext();\n const contentContext = injectSelectContentContext();\n const shouldExpandOnScrollRef = ref(false);\n const shouldRepositionRef = ref(true);\n const contentWrapperElement = ref();\n const { forwardRef, currentElement: contentElement } = useForwardExpose();\n const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;\n function position() {\n if (rootContext.triggerElement.value && rootContext.valueElement.value && contentWrapperElement.value && contentElement.value && viewport?.value && selectedItem?.value && selectedItemText?.value) {\n const triggerRect = rootContext.triggerElement.value.getBoundingClientRect();\n const contentRect = contentElement.value.getBoundingClientRect();\n const valueNodeRect = rootContext.valueElement.value.getBoundingClientRect();\n const itemTextRect = selectedItemText.value.getBoundingClientRect();\n if (rootContext.dir.value !== \"rtl\") {\n const itemTextOffset = itemTextRect.left - contentRect.left;\n const left = valueNodeRect.left - itemTextOffset;\n const leftDelta = triggerRect.left - left;\n const minContentWidth = triggerRect.width + leftDelta;\n const contentWidth = Math.max(minContentWidth, contentRect.width);\n const rightEdge = window.innerWidth - CONTENT_MARGIN;\n const clampedLeft = clamp(left, CONTENT_MARGIN, Math.max(CONTENT_MARGIN, rightEdge - contentWidth));\n contentWrapperElement.value.style.minWidth = `${minContentWidth}px`;\n contentWrapperElement.value.style.left = `${clampedLeft}px`;\n } else {\n const itemTextOffset = contentRect.right - itemTextRect.right;\n const right = window.innerWidth - valueNodeRect.right - itemTextOffset;\n const rightDelta = window.innerWidth - triggerRect.right - right;\n const minContentWidth = triggerRect.width + rightDelta;\n const contentWidth = Math.max(minContentWidth, contentRect.width);\n const leftEdge = window.innerWidth - CONTENT_MARGIN;\n const clampedRight = clamp(\n right,\n CONTENT_MARGIN,\n Math.max(CONTENT_MARGIN, leftEdge - contentWidth)\n );\n contentWrapperElement.value.style.minWidth = `${minContentWidth}px`;\n contentWrapperElement.value.style.right = `${clampedRight}px`;\n }\n const items = getItems().map((i) => i.ref);\n const availableHeight = window.innerHeight - CONTENT_MARGIN * 2;\n const itemsHeight = viewport.value.scrollHeight;\n const contentStyles = window.getComputedStyle(contentElement.value);\n const contentBorderTopWidth = Number.parseInt(\n contentStyles.borderTopWidth,\n 10\n );\n const contentPaddingTop = Number.parseInt(contentStyles.paddingTop, 10);\n const contentBorderBottomWidth = Number.parseInt(\n contentStyles.borderBottomWidth,\n 10\n );\n const contentPaddingBottom = Number.parseInt(\n contentStyles.paddingBottom,\n 10\n );\n const fullContentHeight = contentBorderTopWidth + contentPaddingTop + itemsHeight + contentPaddingBottom + contentBorderBottomWidth;\n const minContentHeight = Math.min(\n selectedItem.value.offsetHeight * 5,\n fullContentHeight\n );\n const viewportStyles = window.getComputedStyle(viewport.value);\n const viewportPaddingTop = Number.parseInt(viewportStyles.paddingTop, 10);\n const viewportPaddingBottom = Number.parseInt(\n viewportStyles.paddingBottom,\n 10\n );\n const topEdgeToTriggerMiddle = triggerRect.top + triggerRect.height / 2 - CONTENT_MARGIN;\n const triggerMiddleToBottomEdge = availableHeight - topEdgeToTriggerMiddle;\n const selectedItemHalfHeight = selectedItem.value.offsetHeight / 2;\n const itemOffsetMiddle = selectedItem.value.offsetTop + selectedItemHalfHeight;\n const contentTopToItemMiddle = contentBorderTopWidth + contentPaddingTop + itemOffsetMiddle;\n const itemMiddleToContentBottom = fullContentHeight - contentTopToItemMiddle;\n const willAlignWithoutTopOverflow = contentTopToItemMiddle <= topEdgeToTriggerMiddle;\n if (willAlignWithoutTopOverflow) {\n const isLastItem = selectedItem.value === items[items.length - 1];\n contentWrapperElement.value.style.bottom = `${0}px`;\n const viewportOffsetBottom = contentElement.value.clientHeight - viewport.value.offsetTop - viewport.value.offsetHeight;\n const clampedTriggerMiddleToBottomEdge = Math.max(\n triggerMiddleToBottomEdge,\n selectedItemHalfHeight + (isLastItem ? viewportPaddingBottom : 0) + viewportOffsetBottom + contentBorderBottomWidth\n );\n const height = contentTopToItemMiddle + clampedTriggerMiddleToBottomEdge;\n contentWrapperElement.value.style.height = `${height}px`;\n } else {\n const isFirstItem = selectedItem.value === items[0];\n contentWrapperElement.value.style.top = `${0}px`;\n const clampedTopEdgeToTriggerMiddle = Math.max(\n topEdgeToTriggerMiddle,\n contentBorderTopWidth + viewport.value.offsetTop + (isFirstItem ? viewportPaddingTop : 0) + selectedItemHalfHeight\n );\n const height = clampedTopEdgeToTriggerMiddle + itemMiddleToContentBottom;\n contentWrapperElement.value.style.height = `${height}px`;\n viewport.value.scrollTop = contentTopToItemMiddle - topEdgeToTriggerMiddle + viewport.value.offsetTop;\n }\n contentWrapperElement.value.style.margin = `${CONTENT_MARGIN}px 0`;\n contentWrapperElement.value.style.minHeight = `${minContentHeight}px`;\n contentWrapperElement.value.style.maxHeight = `${availableHeight}px`;\n emits(\"placed\");\n requestAnimationFrame(() => shouldExpandOnScrollRef.value = true);\n }\n }\n const contentZIndex = ref(\"\");\n onMounted(async () => {\n await nextTick();\n position();\n if (contentElement.value)\n contentZIndex.value = window.getComputedStyle(contentElement.value).zIndex;\n });\n function handleScrollButtonChange(node) {\n if (node && shouldRepositionRef.value === true) {\n position();\n focusSelectedItem?.();\n shouldRepositionRef.value = false;\n }\n }\n useResizeObserver(rootContext.triggerElement, () => {\n position();\n });\n provideSelectItemAlignedPositionContext({\n contentWrapper: contentWrapperElement,\n shouldExpandOnScrollRef,\n onScrollButtonChange: handleScrollButtonChange\n });\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(\"div\", {\n ref_key: \"contentWrapperElement\",\n ref: contentWrapperElement,\n style: normalizeStyle({\n display: \"flex\",\n flexDirection: \"column\",\n position: \"fixed\",\n zIndex: contentZIndex.value\n })\n }, [\n createVNode(unref(Primitive), mergeProps({\n ref: unref(forwardRef),\n style: {\n // When we get the height of the content, it includes borders. If we were to set\n // the height without having `boxSizing: 'border-box'` it would be too big.\n boxSizing: \"border-box\",\n // We need to ensure the content doesn't get taller than the wrapper\n maxHeight: \"100%\"\n }\n }, { ..._ctx.$attrs, ...props }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16)\n ], 4);\n };\n }\n});\n\nexport { _sfc_main as _, injectSelectItemAlignedPositionContext as i };\n//# sourceMappingURL=SelectItemAlignedPosition.js.map\n","import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from 'vue';\nimport '@floating-ui/vue';\nimport { C as CONTENT_MARGIN } from './utils.js';\nimport { _ as _sfc_main$1 } from '../Popper/PopperContent.js';\nimport { u as useForwardProps } from '../shared/useForwardProps.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"SelectPopperPosition\",\n props: {\n side: {},\n sideOffset: {},\n align: { default: \"start\" },\n alignOffset: {},\n avoidCollisions: { type: Boolean },\n collisionBoundary: {},\n collisionPadding: { default: CONTENT_MARGIN },\n arrowPadding: {},\n sticky: {},\n hideWhenDetached: { type: Boolean },\n positionStrategy: {},\n updatePositionStrategy: {},\n disableUpdateOnLayoutShift: { type: Boolean },\n prioritizePosition: { type: Boolean },\n reference: {},\n asChild: { type: Boolean },\n as: {}\n },\n setup(__props) {\n const props = __props;\n const forwarded = useForwardProps(props);\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), mergeProps(unref(forwarded), { style: {\n // Ensure border-box for floating-ui calculations\n \"boxSizing\": \"border-box\",\n \"--reka-select-content-transform-origin\": \"var(--reka-popper-transform-origin)\",\n \"--reka-select-content-available-width\": \"var(--reka-popper-available-width)\",\n \"--reka-select-content-available-height\": \"var(--reka-popper-available-height)\",\n \"--reka-select-trigger-width\": \"var(--reka-popper-anchor-width)\",\n \"--reka-select-trigger-height\": \"var(--reka-popper-anchor-height)\"\n } }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=SelectPopperPosition.js.map\n","import { defineComponent, ref, watch, watchEffect, computed, openBlock, createBlock, unref, withCtx, createVNode, withModifiers, resolveDynamicComponent, mergeProps, renderSlot } from 'vue';\nimport { unrefElement } from '@vueuse/core';\nimport { _ as _sfc_main$4 } from './SelectItemAlignedPosition.js';\nimport { _ as _sfc_main$3 } from './SelectPopperPosition.js';\nimport { _ as _sfc_main$2 } from '../DismissableLayer/DismissableLayer.js';\nimport { f as focusFirst } from '../Menu/utils.js';\nimport { u as useBodyScrollLock } from '../shared/useBodyScrollLock.js';\nimport { v as valueComparator } from './utils.js';\nimport { u as useCollection } from '../Collection/Collection.js';\nimport { u as useFocusGuards } from '../shared/useFocusGuards.js';\nimport { u as useHideOthers } from '../shared/useHideOthers.js';\nimport { u as useTypeahead } from '../shared/useTypeahead.js';\nimport { u as useForwardProps } from '../shared/useForwardProps.js';\nimport { _ as _sfc_main$1 } from '../FocusScope/FocusScope.js';\nimport { c as createContext } from '../shared/createContext.js';\nimport { i as injectSelectRootContext } from './SelectRoot.js';\n\nconst SelectContentDefaultContextValue = {\n onViewportChange: () => {\n },\n itemTextRefCallback: () => {\n },\n itemRefCallback: () => {\n }\n};\nconst [injectSelectContentContext, provideSelectContentContext] = createContext(\"SelectContent\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"SelectContentImpl\",\n props: {\n position: { default: \"item-aligned\" },\n bodyLock: { type: Boolean, default: true },\n side: {},\n sideOffset: {},\n align: { default: \"start\" },\n alignOffset: {},\n avoidCollisions: { type: Boolean },\n collisionBoundary: {},\n collisionPadding: {},\n arrowPadding: {},\n sticky: {},\n hideWhenDetached: { type: Boolean },\n positionStrategy: {},\n updatePositionStrategy: {},\n disableUpdateOnLayoutShift: { type: Boolean },\n prioritizePosition: { type: Boolean },\n reference: {},\n asChild: { type: Boolean },\n as: {}\n },\n emits: [\"closeAutoFocus\", \"escapeKeyDown\", \"pointerDownOutside\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const rootContext = injectSelectRootContext();\n useFocusGuards();\n useBodyScrollLock(props.bodyLock);\n const { CollectionSlot, getItems } = useCollection();\n const content = ref();\n useHideOthers(content);\n const { search, handleTypeaheadSearch } = useTypeahead();\n const viewport = ref();\n const selectedItem = ref();\n const selectedItemText = ref();\n const isPositioned = ref(false);\n const firstValidItemFoundRef = ref(false);\n const firstSelectedItemInArrayFoundRef = ref(false);\n function focusSelectedItem() {\n if (selectedItem.value && content.value)\n focusFirst([selectedItem.value, content.value]);\n }\n watch(isPositioned, () => {\n focusSelectedItem();\n });\n const { onOpenChange, triggerPointerDownPosRef } = rootContext;\n watchEffect((cleanupFn) => {\n if (!content.value)\n return;\n let pointerMoveDelta = { x: 0, y: 0 };\n const handlePointerMove = (event) => {\n pointerMoveDelta = {\n x: Math.abs(\n Math.round(event.pageX) - (triggerPointerDownPosRef.value?.x ?? 0)\n ),\n y: Math.abs(\n Math.round(event.pageY) - (triggerPointerDownPosRef.value?.y ?? 0)\n )\n };\n };\n const handlePointerUp = (event) => {\n if (event.pointerType === \"touch\")\n return;\n if (pointerMoveDelta.x <= 10 && pointerMoveDelta.y <= 10) {\n event.preventDefault();\n } else {\n if (!content.value?.contains(event.target))\n onOpenChange(false);\n }\n document.removeEventListener(\"pointermove\", handlePointerMove);\n triggerPointerDownPosRef.value = null;\n };\n if (triggerPointerDownPosRef.value !== null) {\n document.addEventListener(\"pointermove\", handlePointerMove);\n document.addEventListener(\"pointerup\", handlePointerUp, {\n capture: true,\n once: true\n });\n }\n cleanupFn(() => {\n document.removeEventListener(\"pointermove\", handlePointerMove);\n document.removeEventListener(\"pointerup\", handlePointerUp, {\n capture: true\n });\n });\n });\n function handleKeyDown(event) {\n const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n if (event.key === \"Tab\")\n event.preventDefault();\n if (!isModifierKey && event.key.length === 1)\n handleTypeaheadSearch(event.key, getItems());\n if ([\"ArrowUp\", \"ArrowDown\", \"Home\", \"End\"].includes(event.key)) {\n const collectionItems = getItems().map((i) => i.ref);\n let candidateNodes = [...collectionItems];\n if ([\"ArrowUp\", \"End\"].includes(event.key))\n candidateNodes = candidateNodes.slice().reverse();\n if ([\"ArrowUp\", \"ArrowDown\"].includes(event.key)) {\n const currentElement = event.target;\n const currentIndex = candidateNodes.indexOf(currentElement);\n candidateNodes = candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n event.preventDefault();\n }\n }\n const pickedProps = computed(() => {\n if (props.position === \"popper\")\n return props;\n else return {};\n });\n const forwardedProps = useForwardProps(pickedProps.value);\n provideSelectContentContext({\n content,\n viewport,\n onViewportChange: (node) => {\n viewport.value = node;\n },\n itemRefCallback: (node, value, disabled) => {\n const isFirstValidItem = !firstValidItemFoundRef.value && !disabled;\n const isSelectedItem = valueComparator(rootContext.modelValue.value, value, rootContext.by);\n if (rootContext.multiple.value) {\n if (firstSelectedItemInArrayFoundRef.value) {\n return;\n }\n if (isSelectedItem || isFirstValidItem) {\n selectedItem.value = node;\n if (isSelectedItem) {\n firstSelectedItemInArrayFoundRef.value = true;\n }\n }\n } else {\n if (isSelectedItem || isFirstValidItem) {\n selectedItem.value = node;\n }\n }\n if (isFirstValidItem) {\n firstValidItemFoundRef.value = true;\n }\n },\n selectedItem,\n selectedItemText,\n onItemLeave: () => {\n content.value?.focus();\n },\n itemTextRefCallback: (node, value, disabled) => {\n const isFirstValidItem = !firstValidItemFoundRef.value && !disabled;\n const isSelectedItem = valueComparator(rootContext.modelValue.value, value, rootContext.by);\n if (isSelectedItem || isFirstValidItem)\n selectedItemText.value = node;\n },\n focusSelectedItem,\n position: props.position,\n isPositioned,\n searchRef: search\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(CollectionSlot), null, {\n default: withCtx(() => [\n createVNode(unref(_sfc_main$1), {\n \"as-child\": \"\",\n onMountAutoFocus: _cache[6] || (_cache[6] = withModifiers(() => {\n }, [\"prevent\"])),\n onUnmountAutoFocus: _cache[7] || (_cache[7] = (event) => {\n emits(\"closeAutoFocus\", event);\n if (event.defaultPrevented) return;\n unref(rootContext).triggerElement.value?.focus({ preventScroll: true });\n event.preventDefault();\n })\n }, {\n default: withCtx(() => [\n createVNode(unref(_sfc_main$2), {\n \"as-child\": \"\",\n \"disable-outside-pointer-events\": \"\",\n onFocusOutside: _cache[2] || (_cache[2] = withModifiers(() => {\n }, [\"prevent\"])),\n onDismiss: _cache[3] || (_cache[3] = ($event) => unref(rootContext).onOpenChange(false)),\n onEscapeKeyDown: _cache[4] || (_cache[4] = ($event) => emits(\"escapeKeyDown\", $event)),\n onPointerDownOutside: _cache[5] || (_cache[5] = ($event) => emits(\"pointerDownOutside\", $event))\n }, {\n default: withCtx(() => [\n (openBlock(), createBlock(resolveDynamicComponent(\n _ctx.position === \"popper\" ? _sfc_main$3 : _sfc_main$4\n ), mergeProps({ ..._ctx.$attrs, ...unref(forwardedProps) }, {\n id: unref(rootContext).contentId,\n ref: (vnode) => {\n content.value = unref(unrefElement)(vnode);\n return undefined;\n },\n role: \"listbox\",\n \"data-state\": unref(rootContext).open.value ? \"open\" : \"closed\",\n dir: unref(rootContext).dir.value,\n style: {\n // flex layout so we can place the scroll buttons properly\n display: \"flex\",\n flexDirection: \"column\",\n // reset the outline by default as the content MAY get focused\n outline: \"none\"\n },\n onContextmenu: _cache[0] || (_cache[0] = withModifiers(() => {\n }, [\"prevent\"])),\n onPlaced: _cache[1] || (_cache[1] = ($event) => isPositioned.value = true),\n onKeydown: handleKeyDown\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16, [\"id\", \"data-state\", \"dir\", \"onKeydown\"]))\n ]),\n _: 3\n })\n ]),\n _: 3\n })\n ]),\n _: 3\n });\n };\n }\n});\n\nexport { SelectContentDefaultContextValue as S, _sfc_main as _, injectSelectContentContext as i, provideSelectContentContext as p };\n//# sourceMappingURL=SelectContentImpl.js.map\n","import { defineComponent, renderSlot } from 'vue';\nimport { p as provideSelectRootContext } from './SelectRoot.js';\nimport { p as provideSelectContentContext, S as SelectContentDefaultContextValue } from './SelectContentImpl.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n ...{\n inheritAttrs: false\n },\n __name: \"SelectProvider\",\n props: {\n context: {}\n },\n setup(__props) {\n const props = __props;\n provideSelectRootContext(props.context);\n provideSelectContentContext(SelectContentDefaultContextValue);\n return (_ctx, _cache) => {\n return renderSlot(_ctx.$slots, \"default\");\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=SelectProvider.js.map\n","import { defineComponent, ref, onMounted, computed, openBlock, createBlock, unref, withCtx, createVNode, normalizeProps, guardReactiveProps, renderSlot, createElementBlock, Teleport, createCommentVNode } from 'vue';\nimport { _ as _sfc_main$1 } from './SelectContentImpl.js';\nimport { _ as _sfc_main$2 } from './SelectProvider.js';\nimport { u as useForwardPropsEmits } from '../shared/useForwardPropsEmits.js';\nimport { P as Presence } from '../Presence/Presence.js';\nimport { i as injectSelectRootContext } from './SelectRoot.js';\n\nconst _hoisted_1 = { key: 1 };\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n ...{\n inheritAttrs: false\n },\n __name: \"SelectContent\",\n props: {\n forceMount: { type: Boolean },\n position: {},\n bodyLock: { type: Boolean },\n side: {},\n sideOffset: {},\n align: {},\n alignOffset: {},\n avoidCollisions: { type: Boolean },\n collisionBoundary: {},\n collisionPadding: {},\n arrowPadding: {},\n sticky: {},\n hideWhenDetached: { type: Boolean },\n positionStrategy: {},\n updatePositionStrategy: {},\n disableUpdateOnLayoutShift: { type: Boolean },\n prioritizePosition: { type: Boolean },\n reference: {},\n asChild: { type: Boolean },\n as: {}\n },\n emits: [\"closeAutoFocus\", \"escapeKeyDown\", \"pointerDownOutside\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const forwarded = useForwardPropsEmits(props, emits);\n const rootContext = injectSelectRootContext();\n const fragment = ref();\n onMounted(() => {\n fragment.value = new DocumentFragment();\n });\n const presenceRef = ref();\n const renderPresence = computed(() => props.forceMount || rootContext.open.value);\n return (_ctx, _cache) => {\n return renderPresence.value ? (openBlock(), createBlock(unref(Presence), {\n key: 0,\n ref_key: \"presenceRef\",\n ref: presenceRef,\n present: true\n }, {\n default: withCtx(() => [\n createVNode(_sfc_main$1, normalizeProps(guardReactiveProps({ ...unref(forwarded), ..._ctx.$attrs })), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16)\n ]),\n _: 3\n }, 512)) : !presenceRef.value?.present && fragment.value ? (openBlock(), createElementBlock(\"div\", _hoisted_1, [\n (openBlock(), createBlock(Teleport, { to: fragment.value }, [\n createVNode(_sfc_main$2, { context: unref(rootContext) }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 8, [\"context\"])\n ], 8, [\"to\"]))\n ])) : createCommentVNode(\"\", true);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=SelectContent.js.map\n","import { defineComponent, toRefs, computed, ref, onMounted, openBlock, createBlock, unref, withCtx, createVNode, withModifiers, renderSlot, nextTick } from 'vue';\nimport { v as valueComparator, S as SELECTION_KEYS } from './utils.js';\nimport { u as useCollection } from '../Collection/Collection.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { u as useId } from '../shared/useId.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { c as createContext } from '../shared/createContext.js';\nimport { h as handleAndDispatchCustomEvent } from '../shared/handleAndDispatchCustomEvent.js';\nimport { g as getActiveElement } from '../shared/getActiveElement.js';\nimport { i as injectSelectRootContext } from './SelectRoot.js';\nimport { i as injectSelectContentContext } from './SelectContentImpl.js';\n\nconst [injectSelectItemContext, provideSelectItemContext] = createContext(\"SelectItem\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"SelectItem\",\n props: {\n value: {},\n disabled: { type: Boolean },\n textValue: {},\n asChild: { type: Boolean },\n as: {}\n },\n emits: [\"select\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const { disabled } = toRefs(props);\n const rootContext = injectSelectRootContext();\n const contentContext = injectSelectContentContext();\n const { forwardRef, currentElement } = useForwardExpose();\n const { CollectionItem } = useCollection();\n const isSelected = computed(() => valueComparator(rootContext.modelValue?.value, props.value, rootContext.by));\n const isFocused = ref(false);\n const textValue = ref(props.textValue ?? \"\");\n const textId = useId(undefined, \"reka-select-item-text\");\n const SELECT_SELECT = \"select.select\";\n async function handleSelectCustomEvent(ev) {\n if (ev.defaultPrevented)\n return;\n const eventDetail = { originalEvent: ev, value: props.value };\n handleAndDispatchCustomEvent(SELECT_SELECT, handleSelect, eventDetail);\n }\n async function handleSelect(ev) {\n await nextTick();\n emits(\"select\", ev);\n if (ev.defaultPrevented)\n return;\n if (!disabled.value) {\n rootContext.onValueChange(props.value);\n if (!rootContext.multiple.value)\n rootContext.onOpenChange(false);\n }\n }\n async function handlePointerMove(event) {\n await nextTick();\n if (event.defaultPrevented)\n return;\n if (disabled.value) {\n contentContext.onItemLeave?.();\n } else {\n event.currentTarget.focus({ preventScroll: true });\n }\n }\n async function handlePointerLeave(event) {\n await nextTick();\n if (event.defaultPrevented)\n return;\n if (event.currentTarget === getActiveElement())\n contentContext.onItemLeave?.();\n }\n async function handleKeyDown(event) {\n await nextTick();\n if (event.defaultPrevented)\n return;\n const isTypingAhead = contentContext.searchRef?.value !== \"\";\n if (isTypingAhead && event.key === \" \")\n return;\n if (SELECTION_KEYS.includes(event.key))\n handleSelectCustomEvent(event);\n if (event.key === \" \")\n event.preventDefault();\n }\n if (props.value === \"\") {\n throw new Error(\n \"A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.\"\n );\n }\n onMounted(() => {\n if (!currentElement.value)\n return;\n contentContext.itemRefCallback(\n currentElement.value,\n props.value,\n props.disabled\n );\n });\n provideSelectItemContext({\n value: props.value,\n disabled,\n textId,\n isSelected,\n onItemTextChange: (node) => {\n textValue.value = ((textValue.value || node?.textContent) ?? \"\").trim();\n }\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(CollectionItem), {\n value: { textValue: textValue.value }\n }, {\n default: withCtx(() => [\n createVNode(unref(Primitive), {\n ref: unref(forwardRef),\n role: \"option\",\n \"aria-labelledby\": unref(textId),\n \"data-highlighted\": isFocused.value ? \"\" : undefined,\n \"aria-selected\": isSelected.value,\n \"data-state\": isSelected.value ? \"checked\" : \"unchecked\",\n \"aria-disabled\": unref(disabled) || undefined,\n \"data-disabled\": unref(disabled) ? \"\" : undefined,\n tabindex: unref(disabled) ? undefined : -1,\n as: _ctx.as,\n \"as-child\": _ctx.asChild,\n onFocus: _cache[0] || (_cache[0] = ($event) => isFocused.value = true),\n onBlur: _cache[1] || (_cache[1] = ($event) => isFocused.value = false),\n onPointerup: handleSelectCustomEvent,\n onPointerdown: _cache[2] || (_cache[2] = (event) => {\n event.currentTarget.focus({ preventScroll: true });\n }),\n onTouchend: _cache[3] || (_cache[3] = withModifiers(() => {\n }, [\"prevent\", \"stop\"])),\n onPointermove: handlePointerMove,\n onPointerleave: handlePointerLeave,\n onKeydown: handleKeyDown\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 8, [\"aria-labelledby\", \"data-highlighted\", \"aria-selected\", \"data-state\", \"aria-disabled\", \"data-disabled\", \"tabindex\", \"as\", \"as-child\"])\n ]),\n _: 3\n }, 8, [\"value\"]);\n };\n }\n});\n\nexport { _sfc_main as _, injectSelectItemContext as i };\n//# sourceMappingURL=SelectItem.js.map\n","import { defineComponent, unref, openBlock, createBlock, mergeProps, withCtx, renderSlot, createCommentVNode } from 'vue';\nimport { i as injectSelectItemContext } from './SelectItem.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"SelectItemIndicator\",\n props: {\n asChild: { type: Boolean },\n as: { default: \"span\" }\n },\n setup(__props) {\n const props = __props;\n const itemContext = injectSelectItemContext();\n return (_ctx, _cache) => {\n return unref(itemContext).isSelected.value ? (openBlock(), createBlock(unref(Primitive), mergeProps({\n key: 0,\n \"aria-hidden\": \"true\"\n }, props), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16)) : createCommentVNode(\"\", true);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=SelectItemIndicator.js.map\n","import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from 'vue';\nimport { u as useId } from '../shared/useId.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { c as createContext } from '../shared/createContext.js';\n\nconst [injectSelectGroupContext, provideSelectGroupContext] = createContext(\"SelectGroup\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"SelectGroup\",\n props: {\n asChild: { type: Boolean },\n as: {}\n },\n setup(__props) {\n const props = __props;\n const id = useId(undefined, \"reka-select-group\");\n provideSelectGroupContext({ id });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), mergeProps({ role: \"group\" }, props, { \"aria-labelledby\": unref(id) }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16, [\"aria-labelledby\"]);\n };\n }\n});\n\nexport { _sfc_main as _, injectSelectGroupContext as i };\n//# sourceMappingURL=SelectGroup.js.map\n","import { defineComponent, computed, onMounted, onBeforeUnmount, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from 'vue';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { i as injectSelectRootContext } from './SelectRoot.js';\nimport { i as injectSelectContentContext } from './SelectContentImpl.js';\nimport { i as injectSelectItemContext } from './SelectItem.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n ...{\n inheritAttrs: false\n },\n __name: \"SelectItemText\",\n props: {\n asChild: { type: Boolean },\n as: { default: \"span\" }\n },\n setup(__props) {\n const props = __props;\n const rootContext = injectSelectRootContext();\n const contentContext = injectSelectContentContext();\n const itemContext = injectSelectItemContext();\n const { forwardRef, currentElement: itemTextElement } = useForwardExpose();\n const optionProps = computed(() => {\n return {\n value: itemContext.value,\n disabled: itemContext.disabled.value,\n textContent: itemTextElement.value?.textContent ?? itemContext.value?.toString() ?? \"\"\n };\n });\n onMounted(() => {\n if (!itemTextElement.value)\n return;\n itemContext.onItemTextChange(itemTextElement.value);\n contentContext.itemTextRefCallback(\n itemTextElement.value,\n itemContext.value,\n itemContext.disabled.value\n );\n rootContext.onOptionAdd(optionProps.value);\n });\n onBeforeUnmount(() => {\n rootContext.onOptionRemove(optionProps.value);\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), mergeProps({\n id: unref(itemContext).textId,\n ref: unref(forwardRef)\n }, { ...props, ..._ctx.$attrs }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16, [\"id\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=SelectItemText.js.map\n","import { defineComponent, toRefs, onMounted, ref, openBlock, createElementBlock, Fragment, createVNode, unref, mergeProps, withCtx, renderSlot, createTextVNode } from 'vue';\nimport { C as CONTENT_MARGIN } from './utils.js';\nimport { u as useNonce } from '../shared/useNonce.js';\nimport { i as injectSelectItemAlignedPositionContext } from './SelectItemAlignedPosition.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { i as injectSelectContentContext } from './SelectContentImpl.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"SelectViewport\",\n props: {\n nonce: {},\n asChild: { type: Boolean },\n as: {}\n },\n setup(__props) {\n const props = __props;\n const { nonce: propNonce } = toRefs(props);\n const nonce = useNonce(propNonce);\n const contentContext = injectSelectContentContext();\n const alignedPositionContext = contentContext.position === \"item-aligned\" ? injectSelectItemAlignedPositionContext() : undefined;\n const { forwardRef, currentElement } = useForwardExpose();\n onMounted(() => {\n contentContext?.onViewportChange(currentElement.value);\n });\n const prevScrollTopRef = ref(0);\n function handleScroll(event) {\n const viewport = event.currentTarget;\n const { shouldExpandOnScrollRef, contentWrapper } = alignedPositionContext ?? {};\n if (shouldExpandOnScrollRef?.value && contentWrapper?.value) {\n const scrolledBy = Math.abs(prevScrollTopRef.value - viewport.scrollTop);\n if (scrolledBy > 0) {\n const availableHeight = window.innerHeight - CONTENT_MARGIN * 2;\n const cssMinHeight = Number.parseFloat(\n contentWrapper.value.style.minHeight\n );\n const cssHeight = Number.parseFloat(contentWrapper.value.style.height);\n const prevHeight = Math.max(cssMinHeight, cssHeight);\n if (prevHeight < availableHeight) {\n const nextHeight = prevHeight + scrolledBy;\n const clampedNextHeight = Math.min(availableHeight, nextHeight);\n const heightDiff = nextHeight - clampedNextHeight;\n contentWrapper.value.style.height = `${clampedNextHeight}px`;\n if (contentWrapper.value.style.bottom === \"0px\") {\n viewport.scrollTop = heightDiff > 0 ? heightDiff : 0;\n contentWrapper.value.style.justifyContent = \"flex-end\";\n }\n }\n }\n }\n prevScrollTopRef.value = viewport.scrollTop;\n }\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(Fragment, null, [\n createVNode(unref(Primitive), mergeProps({\n ref: unref(forwardRef),\n \"data-reka-select-viewport\": \"\",\n role: \"presentation\"\n }, { ..._ctx.$attrs, ...props }, {\n style: {\n // we use position: 'relative' here on the `viewport` so that when we call\n // `selectedItem.offsetTop` in calculations, the offset is relative to the viewport\n // (independent of the scrollUpButton).\n position: \"relative\",\n flex: 1,\n overflow: \"hidden auto\"\n },\n onScroll: handleScroll\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16),\n createVNode(unref(Primitive), {\n as: \"style\",\n nonce: unref(nonce)\n }, {\n default: withCtx(() => _cache[0] || (_cache[0] = [\n createTextVNode(\" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-reka-select-viewport]::-webkit-scrollbar { display: none; } \")\n ])),\n _: 1\n }, 8, [\"nonce\"])\n ], 64);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=SelectViewport.js.map\n","import { defineComponent, onMounted, computed, openBlock, createBlock, unref, withCtx, renderSlot, createTextVNode, toDisplayString } from 'vue';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { i as injectSelectRootContext } from './SelectRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"SelectValue\",\n props: {\n placeholder: { default: \"\" },\n asChild: { type: Boolean },\n as: { default: \"span\" }\n },\n setup(__props) {\n const props = __props;\n const { forwardRef, currentElement } = useForwardExpose();\n const rootContext = injectSelectRootContext();\n onMounted(() => {\n rootContext.valueElement = currentElement;\n });\n const selectedLabel = computed(() => {\n let list = [];\n const options = Array.from(rootContext.optionsSet.value);\n const getOption = (value) => options.find((option) => option.value === value);\n if (Array.isArray(rootContext.modelValue.value)) {\n list = rootContext.modelValue.value.map((value) => getOption(value)?.textContent ?? \"\");\n } else {\n list = [getOption(rootContext.modelValue.value)?.textContent ?? \"\"];\n }\n return list.filter(Boolean);\n });\n const slotText = computed(() => {\n return selectedLabel.value.length ? selectedLabel.value.join(\", \") : props.placeholder;\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), {\n ref: unref(forwardRef),\n as: _ctx.as,\n \"as-child\": _ctx.asChild,\n style: { pointerEvents: \"none\" },\n \"data-placeholder\": selectedLabel.value.length ? undefined : props.placeholder\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", {\n selectedLabel: selectedLabel.value,\n modelValue: unref(rootContext).modelValue.value\n }, () => [\n createTextVNode(toDisplayString(slotText.value), 1)\n ])\n ]),\n _: 3\n }, 8, [\"as\", \"as-child\", \"data-placeholder\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=SelectValue.js.map\n","import { defineComponent, openBlock, createBlock, unref, withCtx, renderSlot, createTextVNode } from 'vue';\nimport { P as Primitive } from '../Primitive/Primitive.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"SelectIcon\",\n props: {\n asChild: { type: Boolean },\n as: { default: \"span\" }\n },\n setup(__props) {\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), {\n \"aria-hidden\": \"true\",\n as: _ctx.as,\n \"as-child\": _ctx.asChild\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", {}, () => [\n _cache[0] || (_cache[0] = createTextVNode(\"▼\"))\n ])\n ]),\n _: 3\n }, 8, [\"as\", \"as-child\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=SelectIcon.js.map\n","import { c as createContext } from '../shared/createContext.js';\nimport { c as clamp } from '../shared/clamp.js';\n\nfunction getNextSortedValues(prevValues = [], nextValue, atIndex) {\n const nextValues = [...prevValues];\n nextValues[atIndex] = nextValue;\n return nextValues.sort((a, b) => a - b);\n}\nfunction convertValueToPercentage(value, min, max) {\n const maxSteps = max - min;\n const percentPerStep = 100 / maxSteps;\n const percentage = percentPerStep * (value - min);\n return clamp(percentage, 0, 100);\n}\nfunction getLabel(index, totalValues) {\n if (totalValues > 2)\n return `Value ${index + 1} of ${totalValues}`;\n else if (totalValues === 2)\n return [\"Minimum\", \"Maximum\"][index];\n else\n return undefined;\n}\nfunction getClosestValueIndex(values, nextValue) {\n if (values.length === 1)\n return 0;\n const distances = values.map((value) => Math.abs(value - nextValue));\n const closestDistance = Math.min(...distances);\n return distances.indexOf(closestDistance);\n}\nfunction getThumbInBoundsOffset(width, left, direction) {\n const halfWidth = width / 2;\n const halfPercent = 50;\n const offset = linearScale([0, halfPercent], [0, halfWidth]);\n return (halfWidth - offset(left) * direction) * direction;\n}\nfunction getStepsBetweenValues(values) {\n return values.slice(0, -1).map((value, index) => values[index + 1] - value);\n}\nfunction hasMinStepsBetweenValues(values, minStepsBetweenValues) {\n if (minStepsBetweenValues > 0) {\n const stepsBetweenValues = getStepsBetweenValues(values);\n const actualMinStepsBetweenValues = Math.min(...stepsBetweenValues);\n return actualMinStepsBetweenValues >= minStepsBetweenValues;\n }\n return true;\n}\nfunction linearScale(input, output) {\n return (value) => {\n if (input[0] === input[1] || output[0] === output[1])\n return output[0];\n const ratio = (output[1] - output[0]) / (input[1] - input[0]);\n return output[0] + ratio * (value - input[0]);\n };\n}\nfunction getDecimalCount(value) {\n return (String(value).split(\".\")[1] || \"\").length;\n}\nfunction roundValue(value, decimalCount) {\n const rounder = 10 ** decimalCount;\n return Math.round(value * rounder) / rounder;\n}\nconst PAGE_KEYS = [\"PageUp\", \"PageDown\"];\nconst ARROW_KEYS = [\"ArrowUp\", \"ArrowDown\", \"ArrowLeft\", \"ArrowRight\"];\nconst BACK_KEYS = {\n \"from-left\": [\"Home\", \"PageDown\", \"ArrowDown\", \"ArrowLeft\"],\n \"from-right\": [\"Home\", \"PageDown\", \"ArrowDown\", \"ArrowRight\"],\n \"from-bottom\": [\"Home\", \"PageDown\", \"ArrowDown\", \"ArrowLeft\"],\n \"from-top\": [\"Home\", \"PageDown\", \"ArrowUp\", \"ArrowLeft\"]\n};\nconst [injectSliderOrientationContext, provideSliderOrientationContext] = createContext([\"SliderVertical\", \"SliderHorizontal\"]);\n\nexport { ARROW_KEYS as A, BACK_KEYS as B, PAGE_KEYS as P, getDecimalCount as a, getNextSortedValues as b, convertValueToPercentage as c, getLabel as d, getThumbInBoundsOffset as e, getClosestValueIndex as g, hasMinStepsBetweenValues as h, injectSliderOrientationContext as i, linearScale as l, provideSliderOrientationContext as p, roundValue as r };\n//# sourceMappingURL=utils.js.map\n","import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from 'vue';\nimport { P as PAGE_KEYS, A as ARROW_KEYS } from './utils.js';\nimport { i as injectSliderRootContext } from './SliderRoot.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"SliderImpl\",\n props: {\n asChild: { type: Boolean },\n as: { default: \"span\" }\n },\n emits: [\"slideStart\", \"slideMove\", \"slideEnd\", \"homeKeyDown\", \"endKeyDown\", \"stepKeyDown\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const rootContext = injectSliderRootContext();\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), mergeProps({ \"data-slider-impl\": \"\" }, props, {\n onKeydown: _cache[0] || (_cache[0] = (event) => {\n if (event.key === \"Home\") {\n emits(\"homeKeyDown\", event);\n event.preventDefault();\n } else if (event.key === \"End\") {\n emits(\"endKeyDown\", event);\n event.preventDefault();\n } else if (unref(PAGE_KEYS).concat(unref(ARROW_KEYS)).includes(event.key)) {\n emits(\"stepKeyDown\", event);\n event.preventDefault();\n }\n }),\n onPointerdown: _cache[1] || (_cache[1] = (event) => {\n const target = event.target;\n target.setPointerCapture(event.pointerId);\n event.preventDefault();\n if (unref(rootContext).thumbElements.value.includes(target)) {\n target.focus();\n } else {\n emits(\"slideStart\", event);\n }\n }),\n onPointermove: _cache[2] || (_cache[2] = (event) => {\n const target = event.target;\n if (target.hasPointerCapture(event.pointerId)) emits(\"slideMove\", event);\n }),\n onPointerup: _cache[3] || (_cache[3] = (event) => {\n const target = event.target;\n if (target.hasPointerCapture(event.pointerId)) {\n target.releasePointerCapture(event.pointerId);\n emits(\"slideEnd\", event);\n }\n })\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=SliderImpl.js.map\n","import { defineComponent, toRefs, ref, computed, openBlock, createBlock, unref, normalizeStyle, withCtx, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from './SliderImpl.js';\nimport { p as provideSliderOrientationContext, B as BACK_KEYS, l as linearScale } from './utils.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { i as injectSliderRootContext } from './SliderRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"SliderHorizontal\",\n props: {\n dir: {},\n min: {},\n max: {},\n inverted: { type: Boolean }\n },\n emits: [\"slideEnd\", \"slideStart\", \"slideMove\", \"homeKeyDown\", \"endKeyDown\", \"stepKeyDown\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const { max, min, dir, inverted } = toRefs(props);\n const { forwardRef, currentElement: sliderElement } = useForwardExpose();\n const rootContext = injectSliderRootContext();\n const offsetPosition = ref();\n const rectRef = ref();\n const isSlidingFromLeft = computed(() => dir?.value === \"ltr\" && !inverted.value || dir?.value !== \"ltr\" && inverted.value);\n function getValueFromPointerEvent(event, slideStart) {\n const rect = rectRef.value || sliderElement.value.getBoundingClientRect();\n const thumb = [...rootContext.thumbElements.value][rootContext.valueIndexToChangeRef.value];\n const thumbWidth = rootContext.thumbAlignment.value === \"contain\" ? thumb.clientWidth : 0;\n if (!offsetPosition.value && !slideStart && rootContext.thumbAlignment.value === \"contain\") {\n offsetPosition.value = event.clientX - thumb.getBoundingClientRect().left;\n }\n const input = [0, rect.width - thumbWidth];\n const output = isSlidingFromLeft.value ? [min.value, max.value] : [max.value, min.value];\n const value = linearScale(input, output);\n rectRef.value = rect;\n const position = slideStart ? event.clientX - rect.left - thumbWidth / 2 : event.clientX - rect.left - (offsetPosition.value ?? 0);\n return value(position);\n }\n provideSliderOrientationContext({\n startEdge: isSlidingFromLeft.value ? \"left\" : \"right\",\n endEdge: isSlidingFromLeft.value ? \"right\" : \"left\",\n direction: isSlidingFromLeft.value ? 1 : -1,\n size: \"width\"\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(_sfc_main$1, {\n ref: unref(forwardRef),\n dir: unref(dir),\n \"data-orientation\": \"horizontal\",\n style: normalizeStyle({\n [\"--reka-slider-thumb-transform\"]: !isSlidingFromLeft.value && unref(rootContext).thumbAlignment.value === \"overflow\" ? \"translateX(50%)\" : \"translateX(-50%)\"\n }),\n onSlideStart: _cache[0] || (_cache[0] = (event) => {\n const value = getValueFromPointerEvent(event, true);\n emits(\"slideStart\", value);\n }),\n onSlideMove: _cache[1] || (_cache[1] = (event) => {\n const value = getValueFromPointerEvent(event);\n emits(\"slideMove\", value);\n }),\n onSlideEnd: _cache[2] || (_cache[2] = () => {\n rectRef.value = undefined;\n offsetPosition.value = undefined;\n emits(\"slideEnd\");\n }),\n onStepKeyDown: _cache[3] || (_cache[3] = (event) => {\n const slideDirection = isSlidingFromLeft.value ? \"from-left\" : \"from-right\";\n const isBackKey = unref(BACK_KEYS)[slideDirection].includes(event.key);\n emits(\"stepKeyDown\", event, isBackKey ? -1 : 1);\n }),\n onEndKeyDown: _cache[4] || (_cache[4] = ($event) => emits(\"endKeyDown\", $event)),\n onHomeKeyDown: _cache[5] || (_cache[5] = ($event) => emits(\"homeKeyDown\", $event))\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 8, [\"dir\", \"style\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=SliderHorizontal.js.map\n","import { defineComponent, toRefs, ref, computed, openBlock, createBlock, unref, normalizeStyle, withCtx, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from './SliderImpl.js';\nimport { p as provideSliderOrientationContext, B as BACK_KEYS, l as linearScale } from './utils.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { i as injectSliderRootContext } from './SliderRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"SliderVertical\",\n props: {\n min: {},\n max: {},\n inverted: { type: Boolean }\n },\n emits: [\"slideEnd\", \"slideStart\", \"slideMove\", \"homeKeyDown\", \"endKeyDown\", \"stepKeyDown\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const { max, min, inverted } = toRefs(props);\n const rootContext = injectSliderRootContext();\n const { forwardRef, currentElement: sliderElement } = useForwardExpose();\n const offsetPosition = ref();\n const rectRef = ref();\n const isSlidingFromBottom = computed(() => !inverted.value);\n function getValueFromPointerEvent(event, slideStart) {\n const rect = rectRef.value || sliderElement.value.getBoundingClientRect();\n const thumb = [...rootContext.thumbElements.value][rootContext.valueIndexToChangeRef.value];\n const thumbHeight = rootContext.thumbAlignment.value === \"contain\" ? thumb.clientHeight : 0;\n if (!offsetPosition.value && !slideStart && rootContext.thumbAlignment.value === \"contain\") {\n offsetPosition.value = event.clientY - thumb.getBoundingClientRect().top;\n }\n const input = [0, rect.height - thumbHeight];\n const output = isSlidingFromBottom.value ? [max.value, min.value] : [min.value, max.value];\n const value = linearScale(input, output);\n const position = slideStart ? event.clientY - rect.top - thumbHeight / 2 : event.clientY - rect.top - (offsetPosition.value ?? 0);\n rectRef.value = rect;\n return value(position);\n }\n provideSliderOrientationContext({\n startEdge: isSlidingFromBottom.value ? \"bottom\" : \"top\",\n endEdge: isSlidingFromBottom.value ? \"top\" : \"bottom\",\n size: \"height\",\n direction: isSlidingFromBottom.value ? 1 : -1\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(_sfc_main$1, {\n ref: unref(forwardRef),\n \"data-orientation\": \"vertical\",\n style: normalizeStyle({\n [\"--reka-slider-thumb-transform\"]: !isSlidingFromBottom.value && unref(rootContext).thumbAlignment.value === \"overflow\" ? \"translateY(-50%)\" : \"translateY(50%)\"\n }),\n onSlideStart: _cache[0] || (_cache[0] = (event) => {\n const value = getValueFromPointerEvent(event, true);\n emits(\"slideStart\", value);\n }),\n onSlideMove: _cache[1] || (_cache[1] = (event) => {\n const value = getValueFromPointerEvent(event);\n emits(\"slideMove\", value);\n }),\n onSlideEnd: _cache[2] || (_cache[2] = () => {\n rectRef.value = undefined;\n offsetPosition.value = undefined;\n emits(\"slideEnd\");\n }),\n onStepKeyDown: _cache[3] || (_cache[3] = (event) => {\n const slideDirection = isSlidingFromBottom.value ? \"from-bottom\" : \"from-top\";\n const isBackKey = unref(BACK_KEYS)[slideDirection].includes(event.key);\n emits(\"stepKeyDown\", event, isBackKey ? -1 : 1);\n }),\n onEndKeyDown: _cache[4] || (_cache[4] = ($event) => emits(\"endKeyDown\", $event)),\n onHomeKeyDown: _cache[5] || (_cache[5] = ($event) => emits(\"homeKeyDown\", $event))\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 8, [\"style\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=SliderVertical.js.map\n","import { defineComponent, toRefs, computed, ref, openBlock, createBlock, unref, withCtx, resolveDynamicComponent, mergeProps, renderSlot, createCommentVNode, toRaw } from 'vue';\nimport { _ as _sfc_main$1 } from './SliderHorizontal.js';\nimport { _ as _sfc_main$2 } from './SliderVertical.js';\nimport { useVModel } from '@vueuse/core';\nimport { P as PAGE_KEYS, A as ARROW_KEYS, g as getClosestValueIndex, a as getDecimalCount, r as roundValue, b as getNextSortedValues, h as hasMinStepsBetweenValues } from './utils.js';\nimport { u as useCollection } from '../Collection/Collection.js';\nimport { u as useDirection } from '../shared/useDirection.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { u as useFormControl } from '../shared/useFormControl.js';\nimport { _ as _sfc_main$3 } from '../VisuallyHidden/VisuallyHiddenInput.js';\nimport { c as createContext } from '../shared/createContext.js';\nimport { c as clamp } from '../shared/clamp.js';\n\nconst [injectSliderRootContext, provideSliderRootContext] = createContext(\"SliderRoot\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n ...{\n inheritAttrs: false\n },\n __name: \"SliderRoot\",\n props: {\n defaultValue: { default: () => [0] },\n modelValue: {},\n disabled: { type: Boolean, default: false },\n orientation: { default: \"horizontal\" },\n dir: {},\n inverted: { type: Boolean, default: false },\n min: { default: 0 },\n max: { default: 100 },\n step: { default: 1 },\n minStepsBetweenThumbs: { default: 0 },\n thumbAlignment: { default: \"contain\" },\n asChild: { type: Boolean },\n as: { default: \"span\" },\n name: {},\n required: { type: Boolean }\n },\n emits: [\"update:modelValue\", \"valueCommit\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const { min, max, step, minStepsBetweenThumbs, orientation, disabled, thumbAlignment, dir: propDir } = toRefs(props);\n const dir = useDirection(propDir);\n const { forwardRef, currentElement } = useForwardExpose();\n const isFormControl = useFormControl(currentElement);\n const { CollectionSlot } = useCollection({ isProvider: true });\n const modelValue = useVModel(props, \"modelValue\", emits, {\n defaultValue: props.defaultValue,\n passive: props.modelValue === undefined\n });\n const currentModelValue = computed(() => Array.isArray(modelValue.value) ? [...modelValue.value] : []);\n const valueIndexToChangeRef = ref(0);\n const valuesBeforeSlideStartRef = ref(currentModelValue.value);\n function handleSlideStart(value) {\n const closestIndex = getClosestValueIndex(currentModelValue.value, value);\n updateValues(value, closestIndex);\n }\n function handleSlideMove(value) {\n updateValues(value, valueIndexToChangeRef.value);\n }\n function handleSlideEnd() {\n const prevValue = valuesBeforeSlideStartRef.value[valueIndexToChangeRef.value];\n const nextValue = currentModelValue.value[valueIndexToChangeRef.value];\n const hasChanged = nextValue !== prevValue;\n if (hasChanged)\n emits(\"valueCommit\", toRaw(currentModelValue.value));\n }\n function updateValues(value, atIndex, { commit } = { commit: false }) {\n const decimalCount = getDecimalCount(step.value);\n const snapToStep = roundValue(Math.round((value - min.value) / step.value) * step.value + min.value, decimalCount);\n const nextValue = clamp(snapToStep, min.value, max.value);\n const nextValues = getNextSortedValues(currentModelValue.value, nextValue, atIndex);\n if (hasMinStepsBetweenValues(nextValues, minStepsBetweenThumbs.value * step.value)) {\n valueIndexToChangeRef.value = nextValues.indexOf(nextValue);\n const hasChanged = String(nextValues) !== String(modelValue.value);\n if (hasChanged && commit)\n emits(\"valueCommit\", nextValues);\n if (hasChanged) {\n thumbElements.value[valueIndexToChangeRef.value]?.focus();\n modelValue.value = nextValues;\n }\n }\n }\n const thumbElements = ref([]);\n provideSliderRootContext({\n modelValue,\n currentModelValue,\n valueIndexToChangeRef,\n thumbElements,\n orientation,\n min,\n max,\n disabled,\n thumbAlignment\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(CollectionSlot), null, {\n default: withCtx(() => [\n (openBlock(), createBlock(resolveDynamicComponent(unref(orientation) === \"horizontal\" ? _sfc_main$1 : _sfc_main$2), mergeProps(_ctx.$attrs, {\n ref: unref(forwardRef),\n \"as-child\": _ctx.asChild,\n as: _ctx.as,\n min: unref(min),\n max: unref(max),\n dir: unref(dir),\n inverted: _ctx.inverted,\n \"aria-disabled\": unref(disabled),\n \"data-disabled\": unref(disabled) ? \"\" : undefined,\n onPointerdown: _cache[0] || (_cache[0] = () => {\n if (!unref(disabled)) valuesBeforeSlideStartRef.value = currentModelValue.value;\n }),\n onSlideStart: _cache[1] || (_cache[1] = ($event) => !unref(disabled) && handleSlideStart($event)),\n onSlideMove: _cache[2] || (_cache[2] = ($event) => !unref(disabled) && handleSlideMove($event)),\n onSlideEnd: _cache[3] || (_cache[3] = ($event) => !unref(disabled) && handleSlideEnd()),\n onHomeKeyDown: _cache[4] || (_cache[4] = ($event) => !unref(disabled) && updateValues(unref(min), 0, { commit: true })),\n onEndKeyDown: _cache[5] || (_cache[5] = ($event) => !unref(disabled) && updateValues(unref(max), currentModelValue.value.length - 1, { commit: true })),\n onStepKeyDown: _cache[6] || (_cache[6] = (event, direction) => {\n if (!unref(disabled)) {\n const isPageKey = unref(PAGE_KEYS).includes(event.key);\n const isSkipKey = isPageKey || event.shiftKey && unref(ARROW_KEYS).includes(event.key);\n const multiplier = isSkipKey ? 10 : 1;\n const atIndex = valueIndexToChangeRef.value;\n const value = currentModelValue.value[atIndex];\n const stepInDirection = unref(step) * multiplier * direction;\n updateValues(value + stepInDirection, atIndex, { commit: true });\n }\n })\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", { modelValue: unref(modelValue) }),\n unref(isFormControl) && _ctx.name ? (openBlock(), createBlock(unref(_sfc_main$3), {\n key: 0,\n type: \"number\",\n value: unref(modelValue),\n name: _ctx.name,\n required: _ctx.required,\n disabled: unref(disabled),\n step: unref(step)\n }, null, 8, [\"value\", \"name\", \"required\", \"disabled\", \"step\"])) : createCommentVNode(\"\", true)\n ]),\n _: 3\n }, 16, [\"as-child\", \"as\", \"min\", \"max\", \"dir\", \"inverted\", \"aria-disabled\", \"data-disabled\"]))\n ]),\n _: 3\n });\n };\n }\n});\n\nexport { _sfc_main as _, injectSliderRootContext as i };\n//# sourceMappingURL=SliderRoot.js.map\n","import { defineComponent, computed, onMounted, onUnmounted, openBlock, createBlock, unref, withCtx, createVNode, mergeProps, renderSlot } from 'vue';\nimport { useMounted } from '@vueuse/core';\nimport { u as useCollection } from '../Collection/Collection.js';\nimport { i as injectSliderOrientationContext, c as convertValueToPercentage, d as getLabel, e as getThumbInBoundsOffset } from './utils.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { u as useSize } from '../shared/useSize.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { i as injectSliderRootContext } from './SliderRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n ...{\n inheritAttrs: false\n },\n __name: \"SliderThumbImpl\",\n props: {\n index: {},\n asChild: { type: Boolean },\n as: {}\n },\n setup(__props) {\n const props = __props;\n const rootContext = injectSliderRootContext();\n const orientation = injectSliderOrientationContext();\n const { forwardRef, currentElement: thumbElement } = useForwardExpose();\n const { CollectionItem } = useCollection();\n const value = computed(() => rootContext.modelValue?.value?.[props.index]);\n const percent = computed(() => value.value === undefined ? 0 : convertValueToPercentage(value.value, rootContext.min.value ?? 0, rootContext.max.value ?? 100));\n const label = computed(() => getLabel(props.index, rootContext.modelValue?.value?.length ?? 0));\n const size = useSize(thumbElement);\n const orientationSize = computed(() => size[orientation.size].value);\n const thumbInBoundsOffset = computed(() => {\n if (rootContext.thumbAlignment.value === \"overflow\" || !orientationSize.value) {\n return 0;\n } else {\n return getThumbInBoundsOffset(orientationSize.value, percent.value, orientation.direction);\n }\n });\n const isMounted = useMounted();\n onMounted(() => {\n rootContext.thumbElements.value.push(thumbElement.value);\n });\n onUnmounted(() => {\n const i = rootContext.thumbElements.value.findIndex((i2) => i2 === thumbElement.value) ?? -1;\n rootContext.thumbElements.value.splice(i, 1);\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(CollectionItem), null, {\n default: withCtx(() => [\n createVNode(unref(Primitive), mergeProps(_ctx.$attrs, {\n ref: unref(forwardRef),\n role: \"slider\",\n tabindex: unref(rootContext).disabled.value ? undefined : 0,\n \"aria-label\": _ctx.$attrs[\"aria-label\"] || label.value,\n \"data-disabled\": unref(rootContext).disabled.value ? \"\" : undefined,\n \"data-orientation\": unref(rootContext).orientation.value,\n \"aria-valuenow\": value.value,\n \"aria-valuemin\": unref(rootContext).min.value,\n \"aria-valuemax\": unref(rootContext).max.value,\n \"aria-orientation\": unref(rootContext).orientation.value,\n \"as-child\": _ctx.asChild,\n as: _ctx.as,\n style: {\n transform: \"var(--reka-slider-thumb-transform)\",\n position: \"absolute\",\n [unref(orientation).startEdge]: `calc(${percent.value}% + ${thumbInBoundsOffset.value}px)`,\n /**\n * There will be no value on initial render while we work out the index so we hide thumbs\n * without a value, otherwise SSR will render them in the wrong position before they\n * snap into the correct position during hydration which would be visually jarring for\n * slower connections.\n */\n display: !unref(isMounted) && value.value === undefined ? \"none\" : undefined\n },\n onFocus: _cache[0] || (_cache[0] = () => {\n unref(rootContext).valueIndexToChangeRef.value = _ctx.index;\n })\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16, [\"tabindex\", \"aria-label\", \"data-disabled\", \"data-orientation\", \"aria-valuenow\", \"aria-valuemin\", \"aria-valuemax\", \"aria-orientation\", \"as-child\", \"as\", \"style\"])\n ]),\n _: 3\n });\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=SliderThumbImpl.js.map\n","import { defineComponent, computed, openBlock, createBlock, mergeProps, unref, withCtx, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from './SliderThumbImpl.js';\nimport { u as useCollection } from '../Collection/Collection.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"SliderThumb\",\n props: {\n asChild: { type: Boolean },\n as: { default: \"span\" }\n },\n setup(__props) {\n const props = __props;\n const { getItems } = useCollection();\n const { forwardRef, currentElement: thumbElement } = useForwardExpose();\n const index = computed(() => thumbElement.value ? getItems(true).findIndex((i) => i.ref === thumbElement.value) : -1);\n return (_ctx, _cache) => {\n return openBlock(), createBlock(_sfc_main$1, mergeProps({ ref: unref(forwardRef) }, props, { index: index.value }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16, [\"index\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=SliderThumb.js.map\n","import { defineComponent, openBlock, createBlock, unref, withCtx, renderSlot } from 'vue';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { i as injectSliderRootContext } from './SliderRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"SliderTrack\",\n props: {\n asChild: { type: Boolean },\n as: { default: \"span\" }\n },\n setup(__props) {\n const rootContext = injectSliderRootContext();\n useForwardExpose();\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), {\n \"as-child\": _ctx.asChild,\n as: _ctx.as,\n \"data-disabled\": unref(rootContext).disabled.value ? \"\" : undefined,\n \"data-orientation\": unref(rootContext).orientation.value\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 8, [\"as-child\", \"as\", \"data-disabled\", \"data-orientation\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=SliderTrack.js.map\n","import { defineComponent, computed, openBlock, createBlock, unref, normalizeStyle, withCtx, renderSlot } from 'vue';\nimport { i as injectSliderOrientationContext, c as convertValueToPercentage } from './utils.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { i as injectSliderRootContext } from './SliderRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"SliderRange\",\n props: {\n asChild: { type: Boolean },\n as: { default: \"span\" }\n },\n setup(__props) {\n const rootContext = injectSliderRootContext();\n const orientation = injectSliderOrientationContext();\n useForwardExpose();\n const percentages = computed(() => rootContext.currentModelValue.value.map(\n (value) => convertValueToPercentage(value, rootContext.min.value, rootContext.max.value)\n ));\n const offsetStart = computed(() => rootContext.currentModelValue.value.length > 1 ? Math.min(...percentages.value) : 0);\n const offsetEnd = computed(() => 100 - Math.max(...percentages.value, 0));\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), {\n \"data-disabled\": unref(rootContext).disabled.value ? \"\" : undefined,\n \"data-orientation\": unref(rootContext).orientation.value,\n \"as-child\": _ctx.asChild,\n as: _ctx.as,\n style: normalizeStyle({\n [unref(orientation).startEdge]: `${offsetStart.value}%`,\n [unref(orientation).endEdge]: `${offsetEnd.value}%`\n })\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 8, [\"data-disabled\", \"data-orientation\", \"as-child\", \"as\", \"style\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=SliderRange.js.map\n","import { defineComponent, toRefs, computed, openBlock, createBlock, unref, mergeProps, withKeys, withModifiers, withCtx, renderSlot, createCommentVNode } from 'vue';\nimport { useVModel } from '@vueuse/core';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { u as useFormControl } from '../shared/useFormControl.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { _ as _sfc_main$1 } from '../VisuallyHidden/VisuallyHiddenInput.js';\nimport { c as createContext } from '../shared/createContext.js';\n\nconst [injectSwitchRootContext, provideSwitchRootContext] = createContext(\"SwitchRoot\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"SwitchRoot\",\n props: {\n defaultValue: { type: Boolean },\n modelValue: { type: [Boolean, null], default: undefined },\n disabled: { type: Boolean },\n id: {},\n value: { default: \"on\" },\n asChild: { type: Boolean },\n as: { default: \"button\" },\n name: {},\n required: { type: Boolean }\n },\n emits: [\"update:modelValue\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emit = __emit;\n const { disabled } = toRefs(props);\n const modelValue = useVModel(props, \"modelValue\", emit, {\n defaultValue: props.defaultValue,\n passive: props.modelValue === undefined\n });\n function toggleCheck() {\n if (disabled.value)\n return;\n modelValue.value = !modelValue.value;\n }\n const { forwardRef, currentElement } = useForwardExpose();\n const isFormControl = useFormControl(currentElement);\n const ariaLabel = computed(() => props.id && currentElement.value ? document.querySelector(`[for=\"${props.id}\"]`)?.innerText : undefined);\n provideSwitchRootContext({\n modelValue,\n toggleCheck,\n disabled\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), mergeProps(_ctx.$attrs, {\n id: _ctx.id,\n ref: unref(forwardRef),\n role: \"switch\",\n type: _ctx.as === \"button\" ? \"button\" : undefined,\n value: _ctx.value,\n \"aria-label\": _ctx.$attrs[\"aria-label\"] || ariaLabel.value,\n \"aria-checked\": unref(modelValue),\n \"aria-required\": _ctx.required,\n \"data-state\": unref(modelValue) ? \"checked\" : \"unchecked\",\n \"data-disabled\": unref(disabled) ? \"\" : undefined,\n \"as-child\": _ctx.asChild,\n as: _ctx.as,\n disabled: unref(disabled),\n onClick: toggleCheck,\n onKeydown: withKeys(withModifiers(toggleCheck, [\"prevent\"]), [\"enter\"])\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", { modelValue: unref(modelValue) }),\n unref(isFormControl) && _ctx.name ? (openBlock(), createBlock(unref(_sfc_main$1), {\n key: 0,\n type: \"checkbox\",\n name: _ctx.name,\n disabled: unref(disabled),\n required: _ctx.required,\n value: _ctx.value,\n checked: !!unref(modelValue)\n }, null, 8, [\"name\", \"disabled\", \"required\", \"value\", \"checked\"])) : createCommentVNode(\"\", true)\n ]),\n _: 3\n }, 16, [\"id\", \"type\", \"value\", \"aria-label\", \"aria-checked\", \"aria-required\", \"data-state\", \"data-disabled\", \"as-child\", \"as\", \"disabled\", \"onKeydown\"]);\n };\n }\n});\n\nexport { _sfc_main as _, injectSwitchRootContext as i };\n//# sourceMappingURL=SwitchRoot.js.map\n","import { defineComponent, openBlock, createBlock, unref, withCtx, renderSlot } from 'vue';\nimport { i as injectSwitchRootContext } from './SwitchRoot.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"SwitchThumb\",\n props: {\n asChild: { type: Boolean },\n as: { default: \"span\" }\n },\n setup(__props) {\n const rootContext = injectSwitchRootContext();\n useForwardExpose();\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), {\n \"data-state\": unref(rootContext).modelValue?.value ? \"checked\" : \"unchecked\",\n \"data-disabled\": unref(rootContext).disabled.value ? \"\" : undefined,\n \"as-child\": _ctx.asChild,\n as: _ctx.as\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 8, [\"data-state\", \"data-disabled\", \"as-child\", \"as\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=SwitchThumb.js.map\n","import { defineComponent, toRefs, ref, openBlock, createBlock, unref, withCtx, renderSlot } from 'vue';\nimport { useVModel } from '@vueuse/core';\nimport { u as useDirection } from '../shared/useDirection.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { u as useId } from '../shared/useId.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { c as createContext } from '../shared/createContext.js';\n\nconst [injectTabsRootContext, provideTabsRootContext] = createContext(\"TabsRoot\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"TabsRoot\",\n props: {\n defaultValue: {},\n orientation: { default: \"horizontal\" },\n dir: {},\n activationMode: { default: \"automatic\" },\n modelValue: {},\n unmountOnHide: { type: Boolean, default: true },\n asChild: { type: Boolean },\n as: {}\n },\n emits: [\"update:modelValue\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const { orientation, unmountOnHide, dir: propDir } = toRefs(props);\n const dir = useDirection(propDir);\n useForwardExpose();\n const modelValue = useVModel(props, \"modelValue\", emits, {\n defaultValue: props.defaultValue,\n passive: props.modelValue === undefined\n });\n const tabsList = ref();\n provideTabsRootContext({\n modelValue,\n changeModelValue: (value) => {\n modelValue.value = value;\n },\n orientation,\n dir,\n unmountOnHide,\n activationMode: props.activationMode,\n baseId: useId(undefined, \"reka-tabs\"),\n tabsList\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), {\n dir: unref(dir),\n \"data-orientation\": unref(orientation),\n \"as-child\": _ctx.asChild,\n as: _ctx.as\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", { modelValue: unref(modelValue) })\n ]),\n _: 3\n }, 8, [\"dir\", \"data-orientation\", \"as-child\", \"as\"]);\n };\n }\n});\n\nexport { _sfc_main as _, injectTabsRootContext as i };\n//# sourceMappingURL=TabsRoot.js.map\n","import { defineComponent, toRefs, openBlock, createBlock, unref, withCtx, createVNode, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from '../RovingFocus/RovingFocusGroup.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { i as injectTabsRootContext } from './TabsRoot.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"TabsList\",\n props: {\n loop: { type: Boolean, default: true },\n asChild: { type: Boolean },\n as: {}\n },\n setup(__props) {\n const props = __props;\n const { loop } = toRefs(props);\n const { forwardRef, currentElement } = useForwardExpose();\n const context = injectTabsRootContext();\n context.tabsList = currentElement;\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), {\n \"as-child\": \"\",\n orientation: unref(context).orientation.value,\n dir: unref(context).dir.value,\n loop: unref(loop)\n }, {\n default: withCtx(() => [\n createVNode(unref(Primitive), {\n ref: unref(forwardRef),\n role: \"tablist\",\n \"as-child\": _ctx.asChild,\n as: _ctx.as,\n \"aria-orientation\": unref(context).orientation.value\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 8, [\"as-child\", \"as\", \"aria-orientation\"])\n ]),\n _: 3\n }, 8, [\"orientation\", \"dir\", \"loop\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=TabsList.js.map\n","function makeTriggerId(baseId, value) {\n return `${baseId}-trigger-${value}`;\n}\nfunction makeContentId(baseId, value) {\n return `${baseId}-content-${value}`;\n}\n\nexport { makeContentId as a, makeTriggerId as m };\n//# sourceMappingURL=utils.js.map\n","import { defineComponent, computed, ref, onMounted, openBlock, createBlock, unref, withCtx, createVNode, normalizeStyle, renderSlot, createCommentVNode } from 'vue';\nimport { m as makeTriggerId, a as makeContentId } from './utils.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Presence } from '../Presence/Presence.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { i as injectTabsRootContext } from './TabsRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"TabsContent\",\n props: {\n value: {},\n forceMount: { type: Boolean },\n asChild: { type: Boolean },\n as: {}\n },\n setup(__props) {\n const props = __props;\n const { forwardRef } = useForwardExpose();\n const rootContext = injectTabsRootContext();\n const triggerId = computed(() => makeTriggerId(rootContext.baseId, props.value));\n const contentId = computed(() => makeContentId(rootContext.baseId, props.value));\n const isSelected = computed(() => props.value === rootContext.modelValue.value);\n const isMountAnimationPreventedRef = ref(isSelected.value);\n onMounted(() => {\n requestAnimationFrame(() => {\n isMountAnimationPreventedRef.value = false;\n });\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Presence), {\n present: _ctx.forceMount || isSelected.value,\n \"force-mount\": \"\"\n }, {\n default: withCtx(({ present }) => [\n createVNode(unref(Primitive), {\n id: contentId.value,\n ref: unref(forwardRef),\n \"as-child\": _ctx.asChild,\n as: _ctx.as,\n role: \"tabpanel\",\n \"data-state\": isSelected.value ? \"active\" : \"inactive\",\n \"data-orientation\": unref(rootContext).orientation.value,\n \"aria-labelledby\": triggerId.value,\n hidden: !present,\n tabindex: \"0\",\n style: normalizeStyle({\n animationDuration: isMountAnimationPreventedRef.value ? \"0s\" : undefined\n })\n }, {\n default: withCtx(() => [\n (unref(rootContext).unmountOnHide.value ? present : true) ? renderSlot(_ctx.$slots, \"default\", { key: 0 }) : createCommentVNode(\"\", true)\n ]),\n _: 2\n }, 1032, [\"id\", \"as-child\", \"as\", \"data-state\", \"data-orientation\", \"aria-labelledby\", \"hidden\", \"style\"])\n ]),\n _: 3\n }, 8, [\"present\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=TabsContent.js.map\n","import { defineComponent, computed, openBlock, createBlock, unref, withCtx, createVNode, withModifiers, withKeys, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from '../RovingFocus/RovingFocusItem.js';\nimport { m as makeTriggerId, a as makeContentId } from './utils.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { i as injectTabsRootContext } from './TabsRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"TabsTrigger\",\n props: {\n value: {},\n disabled: { type: Boolean, default: false },\n asChild: { type: Boolean },\n as: { default: \"button\" }\n },\n setup(__props) {\n const props = __props;\n const { forwardRef } = useForwardExpose();\n const rootContext = injectTabsRootContext();\n const triggerId = computed(() => makeTriggerId(rootContext.baseId, props.value));\n const contentId = computed(() => makeContentId(rootContext.baseId, props.value));\n const isSelected = computed(() => props.value === rootContext.modelValue.value);\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), {\n \"as-child\": \"\",\n focusable: !_ctx.disabled,\n active: isSelected.value\n }, {\n default: withCtx(() => [\n createVNode(unref(Primitive), {\n id: triggerId.value,\n ref: unref(forwardRef),\n role: \"tab\",\n type: _ctx.as === \"button\" ? \"button\" : undefined,\n as: _ctx.as,\n \"as-child\": _ctx.asChild,\n \"aria-selected\": isSelected.value ? \"true\" : \"false\",\n \"aria-controls\": contentId.value,\n \"data-state\": isSelected.value ? \"active\" : \"inactive\",\n disabled: _ctx.disabled,\n \"data-disabled\": _ctx.disabled ? \"\" : undefined,\n \"data-orientation\": unref(rootContext).orientation.value,\n onMousedown: _cache[0] || (_cache[0] = withModifiers((event) => {\n if (!_ctx.disabled && event.ctrlKey === false) {\n unref(rootContext).changeModelValue(_ctx.value);\n } else {\n event.preventDefault();\n }\n }, [\"left\"])),\n onKeydown: _cache[1] || (_cache[1] = withKeys(($event) => unref(rootContext).changeModelValue(_ctx.value), [\"enter\", \"space\"])),\n onFocus: _cache[2] || (_cache[2] = () => {\n const isAutomaticActivation = unref(rootContext).activationMode !== \"manual\";\n if (!isSelected.value && !_ctx.disabled && isAutomaticActivation) {\n unref(rootContext).changeModelValue(_ctx.value);\n }\n })\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 8, [\"id\", \"type\", \"as\", \"as-child\", \"aria-selected\", \"aria-controls\", \"data-state\", \"disabled\", \"data-disabled\", \"data-orientation\"])\n ]),\n _: 3\n }, 8, [\"focusable\", \"active\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=TabsTrigger.js.map\n","import { defineComponent, toRefs, ref, renderSlot } from 'vue';\nimport { u as useCollection } from '../Collection/Collection.js';\nimport { c as createContext } from '../shared/createContext.js';\n\nconst [injectToastProviderContext, provideToastProviderContext] = createContext(\"ToastProvider\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n ...{\n inheritAttrs: false\n },\n __name: \"ToastProvider\",\n props: {\n label: { default: \"Notification\" },\n duration: { default: 5e3 },\n swipeDirection: { default: \"right\" },\n swipeThreshold: { default: 50 }\n },\n setup(__props) {\n const props = __props;\n const { label, duration, swipeDirection, swipeThreshold } = toRefs(props);\n useCollection({ isProvider: true });\n const viewport = ref();\n const toastCount = ref(0);\n const isFocusedToastEscapeKeyDownRef = ref(false);\n const isClosePausedRef = ref(false);\n if (props.label && typeof props.label === \"string\" && !props.label.trim()) {\n const error = \"Invalid prop `label` supplied to `ToastProvider`. Expected non-empty `string`.\";\n throw new Error(error);\n }\n provideToastProviderContext({\n label,\n duration,\n swipeDirection,\n swipeThreshold,\n toastCount,\n viewport,\n onViewportChange(el) {\n viewport.value = el;\n },\n onToastAdd() {\n toastCount.value++;\n },\n onToastRemove() {\n toastCount.value--;\n },\n isFocusedToastEscapeKeyDownRef,\n isClosePausedRef\n });\n return (_ctx, _cache) => {\n return renderSlot(_ctx.$slots, \"default\");\n };\n }\n});\n\nexport { _sfc_main as _, injectToastProviderContext as i };\n//# sourceMappingURL=ToastProvider.js.map\n","const TOAST_SWIPE_START = \"toast.swipeStart\";\nconst TOAST_SWIPE_MOVE = \"toast.swipeMove\";\nconst TOAST_SWIPE_CANCEL = \"toast.swipeCancel\";\nconst TOAST_SWIPE_END = \"toast.swipeEnd\";\nconst VIEWPORT_PAUSE = \"toast.viewportPause\";\nconst VIEWPORT_RESUME = \"toast.viewportResume\";\nfunction handleAndDispatchCustomEvent(name, handler, detail) {\n const currentTarget = detail.originalEvent.currentTarget;\n const event = new CustomEvent(name, {\n bubbles: false,\n cancelable: true,\n detail\n });\n if (handler)\n currentTarget.addEventListener(name, handler, { once: true });\n currentTarget.dispatchEvent(event);\n}\nfunction isDeltaInDirection(delta, direction, threshold = 0) {\n const deltaX = Math.abs(delta.x);\n const deltaY = Math.abs(delta.y);\n const isDeltaX = deltaX > deltaY;\n if (direction === \"left\" || direction === \"right\")\n return isDeltaX && deltaX > threshold;\n else\n return !isDeltaX && deltaY > threshold;\n}\nfunction isHTMLElement(node) {\n return node.nodeType === node.ELEMENT_NODE;\n}\nfunction getAnnounceTextContent(container) {\n const textContent = [];\n const childNodes = Array.from(container.childNodes);\n childNodes.forEach((node) => {\n if (node.nodeType === node.TEXT_NODE && node.textContent)\n textContent.push(node.textContent);\n if (isHTMLElement(node)) {\n const isHidden = node.ariaHidden || node.hidden || node.style.display === \"none\";\n const isExcluded = node.dataset.rekaToastAnnounceExclude === \"\";\n if (!isHidden) {\n if (isExcluded) {\n const altText = node.dataset.rekaToastAnnounceAlt;\n if (altText)\n textContent.push(altText);\n } else {\n textContent.push(...getAnnounceTextContent(node));\n }\n }\n }\n });\n return textContent;\n}\n\nexport { TOAST_SWIPE_MOVE as T, VIEWPORT_PAUSE as V, VIEWPORT_RESUME as a, TOAST_SWIPE_START as b, TOAST_SWIPE_END as c, TOAST_SWIPE_CANCEL as d, getAnnounceTextContent as g, handleAndDispatchCustomEvent as h, isDeltaInDirection as i };\n//# sourceMappingURL=utils.js.map\n","import { defineComponent, ref, unref, openBlock, createBlock, withCtx, createTextVNode, toDisplayString, renderSlot, createCommentVNode } from 'vue';\nimport { useTimeout } from '@vueuse/shared';\nimport { useRafFn } from '@vueuse/core';\nimport { i as injectToastProviderContext } from './ToastProvider.js';\nimport { _ as _sfc_main$1 } from '../VisuallyHidden/VisuallyHidden.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"ToastAnnounce\",\n setup(__props) {\n const providerContext = injectToastProviderContext();\n const isAnnounced = useTimeout(1e3);\n const renderAnnounceText = ref(false);\n useRafFn(() => {\n renderAnnounceText.value = true;\n });\n return (_ctx, _cache) => {\n return unref(isAnnounced) || renderAnnounceText.value ? (openBlock(), createBlock(unref(_sfc_main$1), { key: 0 }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(unref(providerContext).label.value) + \" \", 1),\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n })) : createCommentVNode(\"\", true);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=ToastAnnounce.js.map\n","import { defineComponent, ref, computed, watchEffect, watch, onMounted, onUnmounted, openBlock, createElementBlock, Fragment, createBlock, withCtx, createTextVNode, toDisplayString, createCommentVNode, unref, Teleport, createVNode, mergeProps, withModifiers, renderSlot } from 'vue';\nimport { g as getAnnounceTextContent, V as VIEWPORT_PAUSE, a as VIEWPORT_RESUME, h as handleAndDispatchCustomEvent, T as TOAST_SWIPE_MOVE, i as isDeltaInDirection, b as TOAST_SWIPE_START, c as TOAST_SWIPE_END, d as TOAST_SWIPE_CANCEL } from './utils.js';\nimport { useRafFn, onKeyStroke } from '@vueuse/core';\nimport { _ as _sfc_main$1 } from './ToastAnnounce.js';\nimport { isClient } from '@vueuse/shared';\nimport { u as useCollection } from '../Collection/Collection.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { c as createContext } from '../shared/createContext.js';\nimport { g as getActiveElement } from '../shared/getActiveElement.js';\nimport { i as injectToastProviderContext } from './ToastProvider.js';\n\nconst [injectToastRootContext, provideToastRootContext] = createContext(\"ToastRoot\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n ...{\n inheritAttrs: false\n },\n __name: \"ToastRootImpl\",\n props: {\n type: {},\n open: { type: Boolean, default: false },\n duration: {},\n asChild: { type: Boolean },\n as: { default: \"li\" }\n },\n emits: [\"close\", \"escapeKeyDown\", \"pause\", \"resume\", \"swipeStart\", \"swipeMove\", \"swipeCancel\", \"swipeEnd\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const { forwardRef, currentElement } = useForwardExpose();\n const { CollectionItem } = useCollection();\n const providerContext = injectToastProviderContext();\n const pointerStartRef = ref(null);\n const swipeDeltaRef = ref(null);\n const duration = computed(\n () => typeof props.duration === \"number\" ? props.duration : providerContext.duration.value\n );\n const closeTimerStartTimeRef = ref(0);\n const closeTimerRemainingTimeRef = ref(duration.value);\n const closeTimerRef = ref(0);\n const remainingTime = ref(duration.value);\n const remainingRaf = useRafFn(() => {\n const elapsedTime = (/* @__PURE__ */ new Date()).getTime() - closeTimerStartTimeRef.value;\n remainingTime.value = Math.max(closeTimerRemainingTimeRef.value - elapsedTime, 0);\n }, { fpsLimit: 60 });\n function startTimer(duration2) {\n if (duration2 <= 0 || duration2 === Number.POSITIVE_INFINITY)\n return;\n if (!isClient)\n return;\n window.clearTimeout(closeTimerRef.value);\n closeTimerStartTimeRef.value = (/* @__PURE__ */ new Date()).getTime();\n closeTimerRef.value = window.setTimeout(handleClose, duration2);\n }\n function handleClose(event) {\n const isNonPointerEvent = event?.pointerType === \"\";\n const isFocusInToast = currentElement.value?.contains(getActiveElement());\n if (isFocusInToast && isNonPointerEvent)\n providerContext.viewport.value?.focus();\n if (isNonPointerEvent) {\n providerContext.isClosePausedRef.value = false;\n }\n emits(\"close\");\n }\n const announceTextContent = computed(() => currentElement.value ? getAnnounceTextContent(currentElement.value) : null);\n if (props.type && ![\"foreground\", \"background\"].includes(props.type)) {\n const error = \"Invalid prop `type` supplied to `Toast`. Expected `foreground | background`.\";\n throw new Error(error);\n }\n watchEffect((cleanupFn) => {\n const viewport = providerContext.viewport.value;\n if (viewport) {\n const handleResume = () => {\n startTimer(closeTimerRemainingTimeRef.value);\n remainingRaf.resume();\n emits(\"resume\");\n };\n const handlePause = () => {\n const elapsedTime = (/* @__PURE__ */ new Date()).getTime() - closeTimerStartTimeRef.value;\n closeTimerRemainingTimeRef.value = closeTimerRemainingTimeRef.value - elapsedTime;\n window.clearTimeout(closeTimerRef.value);\n remainingRaf.pause();\n emits(\"pause\");\n };\n viewport.addEventListener(VIEWPORT_PAUSE, handlePause);\n viewport.addEventListener(VIEWPORT_RESUME, handleResume);\n return () => {\n viewport.removeEventListener(VIEWPORT_PAUSE, handlePause);\n viewport.removeEventListener(VIEWPORT_RESUME, handleResume);\n };\n }\n });\n watch(() => [props.open, duration.value], () => {\n closeTimerRemainingTimeRef.value = duration.value;\n if (props.open && !providerContext.isClosePausedRef.value)\n startTimer(duration.value);\n }, { immediate: true });\n onKeyStroke(\"Escape\", (event) => {\n emits(\"escapeKeyDown\", event);\n if (!event.defaultPrevented) {\n providerContext.isFocusedToastEscapeKeyDownRef.value = true;\n handleClose();\n }\n });\n onMounted(() => {\n providerContext.onToastAdd();\n });\n onUnmounted(() => {\n providerContext.onToastRemove();\n });\n provideToastRootContext({ onClose: handleClose });\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(Fragment, null, [\n announceTextContent.value ? (openBlock(), createBlock(_sfc_main$1, {\n key: 0,\n role: \"alert\",\n \"aria-live\": _ctx.type === \"foreground\" ? \"assertive\" : \"polite\",\n \"aria-atomic\": \"true\"\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(announceTextContent.value), 1)\n ]),\n _: 1\n }, 8, [\"aria-live\"])) : createCommentVNode(\"\", true),\n unref(providerContext).viewport.value ? (openBlock(), createBlock(Teleport, {\n key: 1,\n to: unref(providerContext).viewport.value\n }, [\n createVNode(unref(CollectionItem), null, {\n default: withCtx(() => [\n createVNode(unref(Primitive), mergeProps({\n ref: unref(forwardRef),\n role: \"alert\",\n \"aria-live\": \"off\",\n \"aria-atomic\": \"true\",\n tabindex: \"0\"\n }, _ctx.$attrs, {\n as: _ctx.as,\n \"as-child\": _ctx.asChild,\n \"data-state\": _ctx.open ? \"open\" : \"closed\",\n \"data-swipe-direction\": unref(providerContext).swipeDirection.value,\n style: { userSelect: \"none\", touchAction: \"none\" },\n onPointerdown: _cache[0] || (_cache[0] = withModifiers((event) => {\n pointerStartRef.value = { x: event.clientX, y: event.clientY };\n }, [\"left\"])),\n onPointermove: _cache[1] || (_cache[1] = (event) => {\n if (!pointerStartRef.value) return;\n const x = event.clientX - pointerStartRef.value.x;\n const y = event.clientY - pointerStartRef.value.y;\n const hasSwipeMoveStarted = Boolean(swipeDeltaRef.value);\n const isHorizontalSwipe = [\"left\", \"right\"].includes(unref(providerContext).swipeDirection.value);\n const clamp = [\"left\", \"up\"].includes(unref(providerContext).swipeDirection.value) ? Math.min : Math.max;\n const clampedX = isHorizontalSwipe ? clamp(0, x) : 0;\n const clampedY = !isHorizontalSwipe ? clamp(0, y) : 0;\n const moveStartBuffer = event.pointerType === \"touch\" ? 10 : 2;\n const delta = { x: clampedX, y: clampedY };\n const eventDetail = { originalEvent: event, delta };\n if (hasSwipeMoveStarted) {\n swipeDeltaRef.value = delta;\n unref(handleAndDispatchCustomEvent)(unref(TOAST_SWIPE_MOVE), (ev) => emits(\"swipeMove\", ev), eventDetail);\n } else if (unref(isDeltaInDirection)(delta, unref(providerContext).swipeDirection.value, moveStartBuffer)) {\n swipeDeltaRef.value = delta;\n unref(handleAndDispatchCustomEvent)(unref(TOAST_SWIPE_START), (ev) => emits(\"swipeStart\", ev), eventDetail);\n event.target.setPointerCapture(event.pointerId);\n } else if (Math.abs(x) > moveStartBuffer || Math.abs(y) > moveStartBuffer) {\n pointerStartRef.value = null;\n }\n }),\n onPointerup: _cache[2] || (_cache[2] = (event) => {\n const delta = swipeDeltaRef.value;\n const target = event.target;\n if (target.hasPointerCapture(event.pointerId)) {\n target.releasePointerCapture(event.pointerId);\n }\n swipeDeltaRef.value = null;\n pointerStartRef.value = null;\n if (delta) {\n const toast = event.currentTarget;\n const eventDetail = { originalEvent: event, delta };\n if (unref(isDeltaInDirection)(delta, unref(providerContext).swipeDirection.value, unref(providerContext).swipeThreshold.value)) {\n unref(handleAndDispatchCustomEvent)(unref(TOAST_SWIPE_END), (ev) => emits(\"swipeEnd\", ev), eventDetail);\n } else {\n unref(handleAndDispatchCustomEvent)(unref(TOAST_SWIPE_CANCEL), (ev) => emits(\"swipeCancel\", ev), eventDetail);\n }\n toast?.addEventListener(\"click\", (event2) => event2.preventDefault(), {\n once: true\n });\n }\n })\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", {\n remaining: remainingTime.value,\n duration: duration.value\n })\n ]),\n _: 3\n }, 16, [\"as\", \"as-child\", \"data-state\", \"data-swipe-direction\"])\n ]),\n _: 3\n })\n ], 8, [\"to\"])) : createCommentVNode(\"\", true)\n ], 64);\n };\n }\n});\n\nexport { _sfc_main as _, injectToastRootContext as i };\n//# sourceMappingURL=ToastRootImpl.js.map\n","import { defineComponent, openBlock, createBlock, unref, withCtx, createVNode, mergeProps, renderSlot } from 'vue';\nimport { useVModel } from '@vueuse/core';\nimport { _ as _sfc_main$1 } from './ToastRootImpl.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Presence } from '../Presence/Presence.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"ToastRoot\",\n props: {\n defaultOpen: { type: Boolean, default: true },\n forceMount: { type: Boolean },\n type: { default: \"foreground\" },\n open: { type: Boolean, default: undefined },\n duration: {},\n asChild: { type: Boolean },\n as: { default: \"li\" }\n },\n emits: [\"escapeKeyDown\", \"pause\", \"resume\", \"swipeStart\", \"swipeMove\", \"swipeCancel\", \"swipeEnd\", \"update:open\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const { forwardRef } = useForwardExpose();\n const open = useVModel(props, \"open\", emits, {\n defaultValue: props.defaultOpen,\n passive: props.open === undefined\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Presence), {\n present: _ctx.forceMount || unref(open)\n }, {\n default: withCtx(() => [\n createVNode(_sfc_main$1, mergeProps({\n ref: unref(forwardRef),\n open: unref(open),\n type: _ctx.type,\n as: _ctx.as,\n \"as-child\": _ctx.asChild,\n duration: _ctx.duration\n }, _ctx.$attrs, {\n onClose: _cache[0] || (_cache[0] = ($event) => open.value = false),\n onPause: _cache[1] || (_cache[1] = ($event) => emits(\"pause\")),\n onResume: _cache[2] || (_cache[2] = ($event) => emits(\"resume\")),\n onEscapeKeyDown: _cache[3] || (_cache[3] = ($event) => emits(\"escapeKeyDown\", $event)),\n onSwipeStart: _cache[4] || (_cache[4] = (event) => {\n emits(\"swipeStart\", event);\n event.currentTarget.setAttribute(\"data-swipe\", \"start\");\n }),\n onSwipeMove: _cache[5] || (_cache[5] = (event) => {\n emits(\"swipeMove\", event);\n const { x, y } = event.detail.delta;\n const target = event.currentTarget;\n target.setAttribute(\"data-swipe\", \"move\");\n target.style.setProperty(\"--reka-toast-swipe-move-x\", `${x}px`);\n target.style.setProperty(\"--reka-toast-swipe-move-y\", `${y}px`);\n }),\n onSwipeCancel: _cache[6] || (_cache[6] = (event) => {\n emits(\"swipeCancel\", event);\n const target = event.currentTarget;\n target.setAttribute(\"data-swipe\", \"cancel\");\n target.style.removeProperty(\"--reka-toast-swipe-move-x\");\n target.style.removeProperty(\"--reka-toast-swipe-move-y\");\n target.style.removeProperty(\"--reka-toast-swipe-end-x\");\n target.style.removeProperty(\"--reka-toast-swipe-end-y\");\n }),\n onSwipeEnd: _cache[7] || (_cache[7] = (event) => {\n emits(\"swipeEnd\", event);\n const { x, y } = event.detail.delta;\n const target = event.currentTarget;\n target.setAttribute(\"data-swipe\", \"end\");\n target.style.removeProperty(\"--reka-toast-swipe-move-x\");\n target.style.removeProperty(\"--reka-toast-swipe-move-y\");\n target.style.setProperty(\"--reka-toast-swipe-end-x\", `${x}px`);\n target.style.setProperty(\"--reka-toast-swipe-end-y\", `${y}px`);\n open.value = false;\n })\n }), {\n default: withCtx(({ remaining, duration: _duration }) => [\n renderSlot(_ctx.$slots, \"default\", {\n remaining,\n duration: _duration,\n open: unref(open)\n })\n ]),\n _: 3\n }, 16, [\"open\", \"type\", \"as\", \"as-child\", \"duration\"])\n ]),\n _: 3\n }, 8, [\"present\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=ToastRoot.js.map\n","import { defineComponent, openBlock, createBlock, unref, withCtx, renderSlot } from 'vue';\nimport { P as Primitive } from '../Primitive/Primitive.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"ToastAnnounceExclude\",\n props: {\n altText: {},\n asChild: { type: Boolean },\n as: {}\n },\n setup(__props) {\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), {\n as: _ctx.as,\n \"as-child\": _ctx.asChild,\n \"data-reka-toast-announce-exclude\": \"\",\n \"data-reka-toast-announce-alt\": _ctx.altText || undefined\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 8, [\"as\", \"as-child\", \"data-reka-toast-announce-alt\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=ToastAnnounceExclude.js.map\n","import { defineComponent, openBlock, createBlock, withCtx, createVNode, unref, mergeProps, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from './ToastAnnounceExclude.js';\nimport { i as injectToastRootContext } from './ToastRootImpl.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"ToastClose\",\n props: {\n asChild: { type: Boolean },\n as: { default: \"button\" }\n },\n setup(__props) {\n const props = __props;\n const rootContext = injectToastRootContext();\n const { forwardRef } = useForwardExpose();\n return (_ctx, _cache) => {\n return openBlock(), createBlock(_sfc_main$1, { \"as-child\": \"\" }, {\n default: withCtx(() => [\n createVNode(unref(Primitive), mergeProps(props, {\n ref: unref(forwardRef),\n type: _ctx.as === \"button\" ? \"button\" : undefined,\n onClick: unref(rootContext).onClose\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16, [\"type\", \"onClick\"])\n ]),\n _: 3\n });\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=ToastClose.js.map\n","import { defineComponent, openBlock, createBlock, unref, withCtx, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from '../VisuallyHidden/VisuallyHidden.js';\nimport { i as injectToastProviderContext } from './ToastProvider.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"FocusProxy\",\n emits: [\"focusFromOutsideViewport\"],\n setup(__props, { emit: __emit }) {\n const emits = __emit;\n const providerContext = injectToastProviderContext();\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), {\n \"aria-hidden\": \"true\",\n tabindex: \"0\",\n style: { \"position\": \"fixed\" },\n onFocus: _cache[0] || (_cache[0] = (event) => {\n const prevFocusedElement = event.relatedTarget;\n const isFocusFromOutsideViewport = !unref(providerContext).viewport.value?.contains(prevFocusedElement);\n if (isFocusFromOutsideViewport) emits(\"focusFromOutsideViewport\");\n })\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n });\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=FocusProxy.js.map\n","import { defineComponent, onMounted, onUnmounted, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from 'vue';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { c as context } from './DismissableLayer.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"DismissableLayerBranch\",\n props: {\n asChild: { type: Boolean },\n as: {}\n },\n setup(__props) {\n const props = __props;\n const { forwardRef, currentElement } = useForwardExpose();\n onMounted(() => {\n context.branches.add(currentElement.value);\n });\n onUnmounted(() => {\n context.branches.delete(currentElement.value);\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), mergeProps({ ref: unref(forwardRef) }, props), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=DismissableLayerBranch.js.map\n","import { defineComponent, toRefs, computed, ref, onMounted, watchEffect, openBlock, createBlock, unref, normalizeStyle, withCtx, createCommentVNode, createVNode, mergeProps, renderSlot } from 'vue';\nimport { onKeyStroke, unrefElement } from '@vueuse/core';\nimport { _ as _sfc_main$2 } from './FocusProxy.js';\nimport { f as focusFirst, g as getTabbableCandidates } from '../FocusScope/utils.js';\nimport { V as VIEWPORT_PAUSE, a as VIEWPORT_RESUME } from './utils.js';\nimport { _ as _sfc_main$1 } from '../DismissableLayer/DismissableLayerBranch.js';\nimport { u as useCollection } from '../Collection/Collection.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { g as getActiveElement } from '../shared/getActiveElement.js';\nimport { i as injectToastProviderContext } from './ToastProvider.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n ...{\n inheritAttrs: false\n },\n __name: \"ToastViewport\",\n props: {\n hotkey: { default: () => [\"F8\"] },\n label: { type: [String, Function], default: \"Notifications ({hotkey})\" },\n asChild: { type: Boolean },\n as: { default: \"ol\" }\n },\n setup(__props) {\n const props = __props;\n const { hotkey, label } = toRefs(props);\n const { forwardRef, currentElement } = useForwardExpose();\n const { CollectionSlot, getItems } = useCollection();\n const providerContext = injectToastProviderContext();\n const hasToasts = computed(() => providerContext.toastCount.value > 0);\n const headFocusProxyRef = ref();\n const tailFocusProxyRef = ref();\n const hotkeyMessage = computed(() => hotkey.value.join(\"+\").replace(/Key/g, \"\").replace(/Digit/g, \"\"));\n onKeyStroke(hotkey.value, () => {\n currentElement.value.focus();\n });\n onMounted(() => {\n providerContext.onViewportChange(currentElement.value);\n });\n watchEffect((cleanupFn) => {\n const viewport = currentElement.value;\n if (hasToasts.value && viewport) {\n const handlePause = () => {\n if (!providerContext.isClosePausedRef.value) {\n const pauseEvent = new CustomEvent(VIEWPORT_PAUSE);\n viewport.dispatchEvent(pauseEvent);\n providerContext.isClosePausedRef.value = true;\n }\n };\n const handleResume = () => {\n if (providerContext.isClosePausedRef.value) {\n const resumeEvent = new CustomEvent(VIEWPORT_RESUME);\n viewport.dispatchEvent(resumeEvent);\n providerContext.isClosePausedRef.value = false;\n }\n };\n const handleFocusOutResume = (event) => {\n const isFocusMovingOutside = !viewport.contains(event.relatedTarget);\n if (isFocusMovingOutside)\n handleResume();\n };\n const handlePointerLeaveResume = () => {\n const isFocusInside = viewport.contains(getActiveElement());\n if (!isFocusInside)\n handleResume();\n };\n const handleKeyDown = (event) => {\n const isMetaKey = event.altKey || event.ctrlKey || event.metaKey;\n const isTabKey = event.key === \"Tab\" && !isMetaKey;\n if (isTabKey) {\n const focusedElement = getActiveElement();\n const isTabbingBackwards = event.shiftKey;\n const targetIsViewport = event.target === viewport;\n if (targetIsViewport && isTabbingBackwards) {\n headFocusProxyRef.value?.focus();\n return;\n }\n const tabbingDirection = isTabbingBackwards ? \"backwards\" : \"forwards\";\n const sortedCandidates = getSortedTabbableCandidates({ tabbingDirection });\n const index = sortedCandidates.findIndex((candidate) => candidate === focusedElement);\n if (focusFirst(sortedCandidates.slice(index + 1))) {\n event.preventDefault();\n } else {\n isTabbingBackwards ? headFocusProxyRef.value?.focus() : tailFocusProxyRef.value?.focus();\n }\n }\n };\n viewport.addEventListener(\"focusin\", handlePause);\n viewport.addEventListener(\"focusout\", handleFocusOutResume);\n viewport.addEventListener(\"pointermove\", handlePause);\n viewport.addEventListener(\"pointerleave\", handlePointerLeaveResume);\n viewport.addEventListener(\"keydown\", handleKeyDown);\n window.addEventListener(\"blur\", handlePause);\n window.addEventListener(\"focus\", handleResume);\n cleanupFn(() => {\n viewport.removeEventListener(\"focusin\", handlePause);\n viewport.removeEventListener(\"focusout\", handleFocusOutResume);\n viewport.removeEventListener(\"pointermove\", handlePause);\n viewport.removeEventListener(\"pointerleave\", handlePointerLeaveResume);\n viewport.removeEventListener(\"keydown\", handleKeyDown);\n window.removeEventListener(\"blur\", handlePause);\n window.removeEventListener(\"focus\", handleResume);\n });\n }\n });\n function getSortedTabbableCandidates({ tabbingDirection }) {\n const toastItems = getItems().map((i) => i.ref);\n const tabbableCandidates = toastItems.map((toastNode) => {\n const toastTabbableCandidates = [toastNode, ...getTabbableCandidates(toastNode)];\n return tabbingDirection === \"forwards\" ? toastTabbableCandidates : toastTabbableCandidates.reverse();\n });\n return (tabbingDirection === \"forwards\" ? tabbableCandidates.reverse() : tabbableCandidates).flat();\n }\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), {\n role: \"region\",\n \"aria-label\": typeof unref(label) === \"string\" ? unref(label).replace(\"{hotkey}\", hotkeyMessage.value) : unref(label)(hotkeyMessage.value),\n tabindex: \"-1\",\n style: normalizeStyle({\n // incase list has size when empty (e.g. padding), we remove pointer events so\n // it doesn't prevent interactions with page elements that it overlays\n pointerEvents: hasToasts.value ? undefined : \"none\"\n })\n }, {\n default: withCtx(() => [\n hasToasts.value ? (openBlock(), createBlock(_sfc_main$2, {\n key: 0,\n ref: (node) => {\n headFocusProxyRef.value = unref(unrefElement)(node);\n return undefined;\n },\n onFocusFromOutsideViewport: _cache[0] || (_cache[0] = () => {\n const tabbableCandidates = getSortedTabbableCandidates({\n tabbingDirection: \"forwards\"\n });\n unref(focusFirst)(tabbableCandidates);\n })\n }, null, 512)) : createCommentVNode(\"\", true),\n createVNode(unref(CollectionSlot), null, {\n default: withCtx(() => [\n createVNode(unref(Primitive), mergeProps({\n ref: unref(forwardRef),\n tabindex: \"-1\",\n as: _ctx.as,\n \"as-child\": _ctx.asChild\n }, _ctx.$attrs), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16, [\"as\", \"as-child\"])\n ]),\n _: 3\n }),\n hasToasts.value ? (openBlock(), createBlock(_sfc_main$2, {\n key: 1,\n ref: (node) => {\n tailFocusProxyRef.value = unref(unrefElement)(node);\n return undefined;\n },\n onFocusFromOutsideViewport: _cache[1] || (_cache[1] = () => {\n const tabbableCandidates = getSortedTabbableCandidates({\n tabbingDirection: \"backwards\"\n });\n unref(focusFirst)(tabbableCandidates);\n })\n }, null, 512)) : createCommentVNode(\"\", true)\n ]),\n _: 3\n }, 8, [\"aria-label\", \"style\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=ToastViewport.js.map\n","import { defineComponent, openBlock, createBlock, unref, normalizeProps, guardReactiveProps, withCtx, renderSlot } from 'vue';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"ToastTitle\",\n props: {\n asChild: { type: Boolean },\n as: {}\n },\n setup(__props) {\n const props = __props;\n useForwardExpose();\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), normalizeProps(guardReactiveProps(props)), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=ToastTitle.js.map\n","import { defineComponent, openBlock, createBlock, unref, normalizeProps, guardReactiveProps, withCtx, renderSlot } from 'vue';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"ToastDescription\",\n props: {\n asChild: { type: Boolean },\n as: {}\n },\n setup(__props) {\n const props = __props;\n useForwardExpose();\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), normalizeProps(guardReactiveProps(props)), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=ToastDescription.js.map\n","const TOOLTIP_OPEN = \"tooltip.open\";\n\nexport { TOOLTIP_OPEN as T };\n//# sourceMappingURL=utils.js.map\n","import { defineComponent, toRefs, ref, renderSlot } from 'vue';\nimport { useTimeoutFn } from '@vueuse/shared';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { c as createContext } from '../shared/createContext.js';\n\nconst [injectTooltipProviderContext, provideTooltipProviderContext] = createContext(\"TooltipProvider\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n ...{\n inheritAttrs: false\n },\n __name: \"TooltipProvider\",\n props: {\n delayDuration: { default: 700 },\n skipDelayDuration: { default: 300 },\n disableHoverableContent: { type: Boolean, default: false },\n disableClosingTrigger: { type: Boolean },\n disabled: { type: Boolean },\n ignoreNonKeyboardFocus: { type: Boolean, default: false }\n },\n setup(__props) {\n const props = __props;\n const { delayDuration, skipDelayDuration, disableHoverableContent, disableClosingTrigger, ignoreNonKeyboardFocus, disabled } = toRefs(props);\n useForwardExpose();\n const isOpenDelayed = ref(true);\n const isPointerInTransitRef = ref(false);\n const { start: startTimer, stop: clearTimer } = useTimeoutFn(() => {\n isOpenDelayed.value = true;\n }, skipDelayDuration, { immediate: false });\n provideTooltipProviderContext({\n isOpenDelayed,\n delayDuration,\n onOpen() {\n clearTimer();\n isOpenDelayed.value = false;\n },\n onClose() {\n startTimer();\n },\n isPointerInTransitRef,\n disableHoverableContent,\n disableClosingTrigger,\n disabled,\n ignoreNonKeyboardFocus\n });\n return (_ctx, _cache) => {\n return renderSlot(_ctx.$slots, \"default\");\n };\n }\n});\n\nexport { _sfc_main as _, injectTooltipProviderContext as i };\n//# sourceMappingURL=TooltipProvider.js.map\n","import { defineComponent, computed, watch, ref, openBlock, createBlock, unref, withCtx, renderSlot } from 'vue';\nimport { useVModel, useTimeoutFn } from '@vueuse/core';\nimport { _ as _sfc_main$1 } from '../Popper/PopperRoot.js';\nimport { T as TOOLTIP_OPEN } from './utils.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { i as injectTooltipProviderContext } from './TooltipProvider.js';\nimport { c as createContext } from '../shared/createContext.js';\n\nconst [injectTooltipRootContext, provideTooltipRootContext] = createContext(\"TooltipRoot\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"TooltipRoot\",\n props: {\n defaultOpen: { type: Boolean, default: false },\n open: { type: Boolean, default: undefined },\n delayDuration: { default: undefined },\n disableHoverableContent: { type: Boolean, default: undefined },\n disableClosingTrigger: { type: Boolean, default: undefined },\n disabled: { type: Boolean, default: undefined },\n ignoreNonKeyboardFocus: { type: Boolean, default: undefined }\n },\n emits: [\"update:open\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emit = __emit;\n useForwardExpose();\n const providerContext = injectTooltipProviderContext();\n const disableHoverableContent = computed(() => props.disableHoverableContent ?? providerContext.disableHoverableContent.value);\n const disableClosingTrigger = computed(() => props.disableClosingTrigger ?? providerContext.disableClosingTrigger.value);\n const disableTooltip = computed(() => props.disabled ?? providerContext.disabled.value);\n const delayDuration = computed(() => props.delayDuration ?? providerContext.delayDuration.value);\n const ignoreNonKeyboardFocus = computed(() => props.ignoreNonKeyboardFocus ?? providerContext.ignoreNonKeyboardFocus.value);\n const open = useVModel(props, \"open\", emit, {\n defaultValue: props.defaultOpen,\n passive: props.open === undefined\n });\n watch(open, (isOpen) => {\n if (!providerContext.onClose)\n return;\n if (isOpen) {\n providerContext.onOpen();\n document.dispatchEvent(new CustomEvent(TOOLTIP_OPEN));\n } else {\n providerContext.onClose();\n }\n });\n const wasOpenDelayedRef = ref(false);\n const trigger = ref();\n const stateAttribute = computed(() => {\n if (!open.value)\n return \"closed\";\n return wasOpenDelayedRef.value ? \"delayed-open\" : \"instant-open\";\n });\n const { start: startTimer, stop: clearTimer } = useTimeoutFn(() => {\n wasOpenDelayedRef.value = true;\n open.value = true;\n }, delayDuration, { immediate: false });\n function handleOpen() {\n clearTimer();\n wasOpenDelayedRef.value = false;\n open.value = true;\n }\n function handleClose() {\n clearTimer();\n open.value = false;\n }\n function handleDelayedOpen() {\n startTimer();\n }\n provideTooltipRootContext({\n contentId: \"\",\n open,\n stateAttribute,\n trigger,\n onTriggerChange(el) {\n trigger.value = el;\n },\n onTriggerEnter() {\n if (providerContext.isOpenDelayed.value)\n handleDelayedOpen();\n else handleOpen();\n },\n onTriggerLeave() {\n if (disableHoverableContent.value) {\n handleClose();\n } else {\n clearTimer();\n }\n },\n onOpen: handleOpen,\n onClose: handleClose,\n disableHoverableContent,\n disableClosingTrigger,\n disabled: disableTooltip,\n ignoreNonKeyboardFocus\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), null, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", { open: unref(open) })\n ]),\n _: 3\n });\n };\n }\n});\n\nexport { _sfc_main as _, injectTooltipRootContext as i };\n//# sourceMappingURL=TooltipRoot.js.map\n","import { defineComponent, ref, computed, onMounted, openBlock, createBlock, unref, withCtx, createVNode, mergeProps, toHandlers, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from '../Popper/PopperAnchor.js';\nimport { i as injectTooltipRootContext } from './TooltipRoot.js';\nimport { u as useId } from '../shared/useId.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { i as injectTooltipProviderContext } from './TooltipProvider.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"TooltipTrigger\",\n props: {\n reference: {},\n asChild: { type: Boolean },\n as: { default: \"button\" }\n },\n setup(__props) {\n const props = __props;\n const rootContext = injectTooltipRootContext();\n const providerContext = injectTooltipProviderContext();\n rootContext.contentId ||= useId(undefined, \"reka-tooltip-content\");\n const { forwardRef, currentElement: triggerElement } = useForwardExpose();\n const isPointerDown = ref(false);\n const hasPointerMoveOpened = ref(false);\n const tooltipListeners = computed(() => {\n if (rootContext.disabled.value)\n return {};\n return {\n click: handleClick,\n focus: handleFocus,\n pointermove: handlePointerMove,\n pointerleave: handlePointerLeave,\n pointerdown: handlePointerDown,\n blur: handleBlur\n };\n });\n onMounted(() => {\n rootContext.onTriggerChange(triggerElement.value);\n });\n function handlePointerUp() {\n setTimeout(() => {\n isPointerDown.value = false;\n }, 1);\n }\n function handlePointerDown() {\n isPointerDown.value = true;\n document.addEventListener(\"pointerup\", handlePointerUp, { once: true });\n }\n function handlePointerMove(event) {\n if (event.pointerType === \"touch\")\n return;\n if (!hasPointerMoveOpened.value && !providerContext.isPointerInTransitRef.value) {\n rootContext.onTriggerEnter();\n hasPointerMoveOpened.value = true;\n }\n }\n function handlePointerLeave() {\n rootContext.onTriggerLeave();\n hasPointerMoveOpened.value = false;\n }\n function handleFocus(event) {\n if (isPointerDown.value)\n return;\n if (rootContext.ignoreNonKeyboardFocus.value && !event.target.matches?.(\":focus-visible\"))\n return;\n rootContext.onOpen();\n }\n function handleBlur() {\n rootContext.onClose();\n }\n function handleClick() {\n if (!rootContext.disableClosingTrigger.value)\n rootContext.onClose();\n }\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), {\n \"as-child\": \"\",\n reference: _ctx.reference\n }, {\n default: withCtx(() => [\n createVNode(unref(Primitive), mergeProps({\n ref: unref(forwardRef),\n \"aria-describedby\": unref(rootContext).open.value ? unref(rootContext).contentId : undefined,\n \"data-state\": unref(rootContext).stateAttribute.value,\n as: _ctx.as,\n \"as-child\": props.asChild,\n \"data-grace-area-trigger\": \"\"\n }, toHandlers(tooltipListeners.value)), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16, [\"aria-describedby\", \"data-state\", \"as\", \"as-child\"])\n ]),\n _: 3\n }, 8, [\"reference\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=TooltipTrigger.js.map\n","import { defineComponent, useSlots, computed, onMounted, openBlock, createBlock, unref, withModifiers, withCtx, createVNode, mergeProps, renderSlot, createTextVNode, toDisplayString, Comment } from 'vue';\nimport { useEventListener } from '@vueuse/core';\nimport { T as TOOLTIP_OPEN } from './utils.js';\nimport { _ as _sfc_main$2 } from '../Popper/PopperContent.js';\nimport { _ as _sfc_main$1 } from '../DismissableLayer/DismissableLayer.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { _ as _sfc_main$3 } from '../VisuallyHidden/VisuallyHidden.js';\nimport { i as injectTooltipRootContext } from './TooltipRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"TooltipContentImpl\",\n props: {\n ariaLabel: {},\n asChild: { type: Boolean },\n as: {},\n side: { default: \"top\" },\n sideOffset: { default: 0 },\n align: { default: \"center\" },\n alignOffset: {},\n avoidCollisions: { type: Boolean, default: true },\n collisionBoundary: { default: () => [] },\n collisionPadding: { default: 0 },\n arrowPadding: { default: 0 },\n sticky: { default: \"partial\" },\n hideWhenDetached: { type: Boolean, default: false },\n positionStrategy: {},\n updatePositionStrategy: {}\n },\n emits: [\"escapeKeyDown\", \"pointerDownOutside\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const rootContext = injectTooltipRootContext();\n const { forwardRef } = useForwardExpose();\n const slot = useSlots();\n const defaultSlot = computed(() => slot.default?.({}));\n const ariaLabel = computed(() => {\n if (props.ariaLabel)\n return props.ariaLabel;\n let content = \"\";\n function recursiveTextSearch(node) {\n if (typeof node.children === \"string\" && node.type !== Comment)\n content += node.children;\n else if (Array.isArray(node.children))\n node.children.forEach((child) => recursiveTextSearch(child));\n }\n defaultSlot.value?.forEach((node) => recursiveTextSearch(node));\n return content;\n });\n const popperContentProps = computed(() => {\n const { ariaLabel: _, ...restProps } = props;\n return restProps;\n });\n onMounted(() => {\n useEventListener(window, \"scroll\", (event) => {\n const target = event.target;\n if (target?.contains(rootContext.trigger.value))\n rootContext.onClose();\n });\n useEventListener(window, TOOLTIP_OPEN, rootContext.onClose);\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), {\n \"as-child\": \"\",\n \"disable-outside-pointer-events\": false,\n onEscapeKeyDown: _cache[0] || (_cache[0] = ($event) => emits(\"escapeKeyDown\", $event)),\n onPointerDownOutside: _cache[1] || (_cache[1] = (event) => {\n if (unref(rootContext).disableClosingTrigger.value && unref(rootContext).trigger.value?.contains(event.target))\n event.preventDefault();\n emits(\"pointerDownOutside\", event);\n }),\n onFocusOutside: _cache[2] || (_cache[2] = withModifiers(() => {\n }, [\"prevent\"])),\n onDismiss: _cache[3] || (_cache[3] = ($event) => unref(rootContext).onClose())\n }, {\n default: withCtx(() => [\n createVNode(unref(_sfc_main$2), mergeProps({\n ref: unref(forwardRef),\n \"data-state\": unref(rootContext).stateAttribute.value\n }, { ..._ctx.$attrs, ...popperContentProps.value }, { style: {\n \"--reka-tooltip-content-transform-origin\": \"var(--reka-popper-transform-origin)\",\n \"--reka-tooltip-content-available-width\": \"var(--reka-popper-available-width)\",\n \"--reka-tooltip-content-available-height\": \"var(--reka-popper-available-height)\",\n \"--reka-tooltip-trigger-width\": \"var(--reka-popper-anchor-width)\",\n \"--reka-tooltip-trigger-height\": \"var(--reka-popper-anchor-height)\"\n } }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\"),\n createVNode(unref(_sfc_main$3), {\n id: unref(rootContext).contentId,\n role: \"tooltip\"\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(ariaLabel.value), 1)\n ]),\n _: 1\n }, 8, [\"id\"])\n ]),\n _: 3\n }, 16, [\"data-state\"])\n ]),\n _: 3\n });\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=TooltipContentImpl.js.map\n","import { defineComponent, openBlock, createBlock, mergeProps, unref, withCtx, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from './TooltipContentImpl.js';\nimport { u as useForwardProps } from '../shared/useForwardProps.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { u as useGraceArea } from '../shared/useGraceArea.js';\nimport { i as injectTooltipRootContext } from './TooltipRoot.js';\nimport { i as injectTooltipProviderContext } from './TooltipProvider.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"TooltipContentHoverable\",\n props: {\n ariaLabel: {},\n asChild: { type: Boolean },\n as: {},\n side: {},\n sideOffset: {},\n align: {},\n alignOffset: {},\n avoidCollisions: { type: Boolean },\n collisionBoundary: {},\n collisionPadding: {},\n arrowPadding: {},\n sticky: {},\n hideWhenDetached: { type: Boolean },\n positionStrategy: {},\n updatePositionStrategy: {}\n },\n setup(__props) {\n const props = __props;\n const forwardedProps = useForwardProps(props);\n const { forwardRef, currentElement } = useForwardExpose();\n const { trigger, onClose } = injectTooltipRootContext();\n const providerContext = injectTooltipProviderContext();\n const { isPointerInTransit, onPointerExit } = useGraceArea(trigger, currentElement);\n providerContext.isPointerInTransitRef = isPointerInTransit;\n onPointerExit(() => {\n onClose();\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(_sfc_main$1, mergeProps({ ref: unref(forwardRef) }, unref(forwardedProps)), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=TooltipContentHoverable.js.map\n","import { defineComponent, openBlock, createBlock, unref, withCtx, resolveDynamicComponent, mergeProps, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from './TooltipContentImpl.js';\nimport { _ as _sfc_main$2 } from './TooltipContentHoverable.js';\nimport { u as useForwardPropsEmits } from '../shared/useForwardPropsEmits.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { P as Presence } from '../Presence/Presence.js';\nimport { i as injectTooltipRootContext } from './TooltipRoot.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"TooltipContent\",\n props: {\n forceMount: { type: Boolean },\n ariaLabel: {},\n asChild: { type: Boolean },\n as: {},\n side: { default: \"top\" },\n sideOffset: {},\n align: {},\n alignOffset: {},\n avoidCollisions: { type: Boolean },\n collisionBoundary: {},\n collisionPadding: {},\n arrowPadding: {},\n sticky: {},\n hideWhenDetached: { type: Boolean },\n positionStrategy: {},\n updatePositionStrategy: {}\n },\n emits: [\"escapeKeyDown\", \"pointerDownOutside\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const rootContext = injectTooltipRootContext();\n const forwarded = useForwardPropsEmits(props, emits);\n const { forwardRef } = useForwardExpose();\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Presence), {\n present: _ctx.forceMount || unref(rootContext).open.value\n }, {\n default: withCtx(() => [\n (openBlock(), createBlock(resolveDynamicComponent(unref(rootContext).disableHoverableContent.value ? _sfc_main$1 : _sfc_main$2), mergeProps({ ref: unref(forwardRef) }, unref(forwarded)), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16))\n ]),\n _: 3\n }, 8, [\"present\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=TooltipContent.js.map\n","import { defineComponent, openBlock, createBlock, unref, normalizeProps, guardReactiveProps, withCtx, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from '../Teleport/Teleport.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"TooltipPortal\",\n props: {\n to: {},\n disabled: { type: Boolean },\n defer: { type: Boolean },\n forceMount: { type: Boolean }\n },\n setup(__props) {\n const props = __props;\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), normalizeProps(guardReactiveProps(props)), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=TooltipPortal.js.map\n","function flatten(items) {\n return items.reduce((acc, item) => {\n acc.push(item);\n if (item.children)\n acc.push(...flatten(item.children));\n return acc;\n }, []);\n}\n\nexport { flatten as f };\n//# sourceMappingURL=utils.js.map\n","import { ref } from 'vue';\nimport { f as findValuesBetween } from './arrays.js';\n\nfunction useSelectionBehavior(modelValue, props) {\n const firstValue = ref();\n const onSelectItem = (val, condition) => {\n if (props.multiple && Array.isArray(modelValue.value)) {\n if (props.selectionBehavior === \"replace\") {\n modelValue.value = [val];\n firstValue.value = val;\n } else {\n const index = modelValue.value.findIndex((v) => condition(v));\n if (index !== -1)\n modelValue.value.splice(index, 1);\n else\n modelValue.value.push(val);\n }\n } else {\n if (props.selectionBehavior === \"replace\") {\n modelValue.value = { ...val };\n } else {\n if (!Array.isArray(modelValue.value) && condition(modelValue.value))\n modelValue.value = undefined;\n else\n modelValue.value = { ...val };\n }\n }\n return modelValue.value;\n };\n function handleMultipleReplace(intent, currentElement, getItems, options) {\n if (!firstValue?.value || !props.multiple || !Array.isArray(modelValue.value))\n return;\n const collection = getItems().filter((i) => i.ref.dataset.disabled !== \"\");\n const lastValue = collection.find((i) => i.ref === currentElement)?.value;\n if (!lastValue)\n return;\n let value = null;\n switch (intent) {\n case \"prev\":\n case \"next\": {\n value = findValuesBetween(options, firstValue.value, lastValue);\n break;\n }\n case \"first\": {\n value = findValuesBetween(options, firstValue.value, options?.[0]);\n break;\n }\n case \"last\": {\n value = findValuesBetween(options, firstValue.value, options?.[options.length - 1]);\n break;\n }\n }\n modelValue.value = value;\n }\n return {\n firstValue,\n onSelectItem,\n handleMultipleReplace\n };\n}\n\nexport { useSelectionBehavior as u };\n//# sourceMappingURL=useSelectionBehavior.js.map\n","import { defineComponent, toRefs, ref, computed, openBlock, createBlock, unref, withCtx, createVNode, withKeys, withModifiers, renderSlot, nextTick } from 'vue';\nimport { createEventHook, useVModel } from '@vueuse/core';\nimport { _ as _sfc_main$1 } from '../RovingFocus/RovingFocusGroup.js';\nimport { M as MAP_KEY_TO_FOCUS_INTENT } from '../RovingFocus/utils.js';\nimport { f as flatten } from './utils.js';\nimport { u as useTypeahead } from '../shared/useTypeahead.js';\nimport { u as useDirection } from '../shared/useDirection.js';\nimport { u as useSelectionBehavior } from '../shared/useSelectionBehavior.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { c as createContext } from '../shared/createContext.js';\nimport { g as getActiveElement } from '../shared/getActiveElement.js';\n\nconst [injectTreeRootContext, provideTreeRootContext] = createContext(\"TreeRoot\");\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"TreeRoot\",\n props: {\n modelValue: {},\n defaultValue: {},\n items: {},\n expanded: {},\n defaultExpanded: {},\n getKey: {},\n getChildren: { type: Function, default: (val) => val.children },\n selectionBehavior: { default: \"toggle\" },\n multiple: { type: Boolean },\n dir: {},\n disabled: { type: Boolean },\n propagateSelect: { type: Boolean },\n asChild: { type: Boolean },\n as: { default: \"ul\" }\n },\n emits: [\"update:modelValue\", \"update:expanded\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const { items, multiple, disabled, propagateSelect, dir: propDir } = toRefs(props);\n const { handleTypeaheadSearch } = useTypeahead();\n const dir = useDirection(propDir);\n const rovingFocusGroupRef = ref();\n const isVirtual = ref(false);\n const virtualKeydownHook = createEventHook();\n const modelValue = useVModel(props, \"modelValue\", emits, {\n // @ts-expect-error idk\n defaultValue: props.defaultValue ?? (multiple.value ? [] : undefined),\n passive: props.modelValue === undefined,\n deep: true\n });\n const expanded = useVModel(props, \"expanded\", emits, {\n // @ts-expect-error idk\n defaultValue: props.defaultExpanded ?? [],\n passive: props.expanded === undefined,\n deep: true\n });\n const { onSelectItem, handleMultipleReplace } = useSelectionBehavior(modelValue, props);\n const selectedKeys = computed(() => {\n if (multiple.value && Array.isArray(modelValue.value))\n return modelValue.value.map((i) => props.getKey(i));\n else\n return [props.getKey(modelValue.value ?? {})];\n });\n function flattenItems(items2, level = 1, parentItem) {\n return items2.reduce((acc, item, index) => {\n const key = props.getKey(item);\n const children = props.getChildren(item);\n const isExpanded = expanded.value.includes(key);\n const flattenedItem = {\n _id: key,\n value: item,\n index,\n level,\n parentItem,\n hasChildren: !!children,\n bind: {\n \"value\": item,\n level,\n \"aria-setsize\": items2.length,\n \"aria-posinset\": index + 1\n }\n };\n acc.push(flattenedItem);\n if (children && isExpanded)\n acc.push(...flattenItems(children, level + 1, item));\n return acc;\n }, []);\n }\n const expandedItems = computed(() => {\n const items2 = props.items;\n expanded.value.map((i) => i);\n return flattenItems(items2 ?? []);\n });\n function handleKeydown(event) {\n if (isVirtual.value) {\n virtualKeydownHook.trigger(event);\n } else {\n const collections = rovingFocusGroupRef.value?.getItems() ?? [];\n handleTypeaheadSearch(event.key, collections);\n }\n }\n function handleKeydownNavigation(event) {\n if (isVirtual.value)\n return;\n const intent = MAP_KEY_TO_FOCUS_INTENT[event.key];\n nextTick(() => {\n handleMultipleReplace(\n intent,\n getActiveElement(),\n rovingFocusGroupRef.value?.getItems,\n expandedItems.value.map((i) => i.value)\n );\n });\n }\n provideTreeRootContext({\n modelValue,\n selectedKeys,\n onSelect: (val) => {\n const condition = (baseValue) => props.getKey(baseValue ?? {}) === props.getKey(val);\n const exist = props.multiple && Array.isArray(modelValue.value) ? modelValue.value?.findIndex(condition) !== -1 : undefined;\n onSelectItem(val, condition);\n if (props.propagateSelect && props.multiple && Array.isArray(modelValue.value)) {\n const children = flatten(props.getChildren(val) ?? []);\n if (exist) {\n modelValue.value = [...modelValue.value].filter((i) => !children.some((child) => props.getKey(i ?? {}) === props.getKey(child)));\n } else {\n modelValue.value = [...modelValue.value, ...children];\n }\n }\n },\n expanded,\n onToggle(val) {\n const children = val ? props.getChildren(val) : undefined;\n if (!children)\n return;\n const key = props.getKey(val) ?? val;\n if (expanded.value.includes(key))\n expanded.value = expanded.value.filter((val2) => val2 !== key);\n else\n expanded.value.push(key);\n },\n getKey: props.getKey,\n getChildren: props.getChildren,\n items,\n expandedItems,\n disabled,\n multiple,\n dir,\n propagateSelect,\n isVirtual,\n virtualKeydownHook,\n handleMultipleReplace\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), {\n ref_key: \"rovingFocusGroupRef\",\n ref: rovingFocusGroupRef,\n \"as-child\": \"\",\n orientation: \"vertical\",\n dir: unref(dir)\n }, {\n default: withCtx(() => [\n createVNode(unref(Primitive), {\n role: \"tree\",\n as: _ctx.as,\n \"as-child\": _ctx.asChild,\n \"aria-multiselectable\": unref(multiple) ? true : undefined,\n onKeydown: [\n handleKeydown,\n withKeys(withModifiers(handleKeydownNavigation, [\"shift\"]), [\"up\", \"down\"])\n ]\n }, {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", {\n flattenItems: expandedItems.value,\n modelValue: unref(modelValue),\n expanded: unref(expanded)\n })\n ]),\n _: 3\n }, 8, [\"as\", \"as-child\", \"aria-multiselectable\", \"onKeydown\"])\n ]),\n _: 3\n }, 8, [\"dir\"]);\n };\n }\n});\n\nexport { _sfc_main as _, injectTreeRootContext as i };\n//# sourceMappingURL=TreeRoot.js.map\n","import { defineComponent, computed, openBlock, createBlock, unref, withCtx, createVNode, mergeProps, withKeys, withModifiers, renderSlot } from 'vue';\nimport { _ as _sfc_main$1 } from '../RovingFocus/RovingFocusItem.js';\nimport { u as useCollection } from '../Collection/Collection.js';\nimport { f as flatten } from './utils.js';\nimport { i as injectTreeRootContext } from './TreeRoot.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\nimport { g as getActiveElement } from '../shared/getActiveElement.js';\nimport { h as handleAndDispatchCustomEvent } from '../shared/handleAndDispatchCustomEvent.js';\n\nconst TREE_SELECT = \"tree.select\";\nconst TREE_TOGGLE = \"tree.toggle\";\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n ...{\n inheritAttrs: false\n },\n __name: \"TreeItem\",\n props: {\n value: {},\n level: {},\n asChild: { type: Boolean },\n as: { default: \"li\" }\n },\n emits: [\"select\", \"toggle\"],\n setup(__props, { expose: __expose, emit: __emit }) {\n const props = __props;\n const emits = __emit;\n const rootContext = injectTreeRootContext();\n const { getItems } = useCollection();\n const hasChildren = computed(() => !!rootContext.getChildren(props.value));\n const isExpanded = computed(() => {\n const key = rootContext.getKey(props.value);\n return rootContext.expanded.value.includes(key);\n });\n const isSelected = computed(() => {\n const key = rootContext.getKey(props.value);\n return rootContext.selectedKeys.value.includes(key);\n });\n const isIndeterminate = computed(() => {\n if (rootContext.propagateSelect.value && isSelected.value && hasChildren.value && Array.isArray(rootContext.modelValue.value)) {\n const children = flatten(rootContext.getChildren(props.value) || []);\n return !children.every((child) => rootContext.modelValue.value.find((v) => rootContext.getKey(v) === rootContext.getKey(child)));\n } else {\n return undefined;\n }\n });\n function handleKeydownRight(ev) {\n if (!hasChildren.value)\n return;\n if (isExpanded.value) {\n const collection = getItems().map((i) => i.ref);\n const currentElement = getActiveElement();\n const currentIndex = collection.indexOf(currentElement);\n const list = [...collection].slice(currentIndex);\n const nextElement = list.find((el) => Number(el.getAttribute(\"data-indent\")) === props.level + 1);\n if (nextElement)\n nextElement.focus();\n } else {\n handleToggleCustomEvent(ev);\n }\n }\n function handleKeydownLeft(ev) {\n if (isExpanded.value) {\n handleToggleCustomEvent(ev);\n } else {\n const collection = getItems().map((i) => i.ref);\n const currentElement = getActiveElement();\n const currentIndex = collection.indexOf(currentElement);\n const list = [...collection].slice(0, currentIndex).reverse();\n const parentElement = list.find((el) => Number(el.getAttribute(\"data-indent\")) === props.level - 1);\n if (parentElement)\n parentElement.focus();\n }\n }\n async function handleSelect(ev) {\n emits(\"select\", ev);\n if (ev?.defaultPrevented)\n return;\n rootContext.onSelect(props.value);\n }\n async function handleToggle(ev) {\n emits(\"toggle\", ev);\n if (ev?.defaultPrevented)\n return;\n rootContext.onToggle(props.value);\n }\n async function handleSelectCustomEvent(ev) {\n if (!ev)\n return;\n const eventDetail = { originalEvent: ev, value: props.value, isExpanded: isExpanded.value, isSelected: isSelected.value };\n handleAndDispatchCustomEvent(TREE_SELECT, handleSelect, eventDetail);\n }\n async function handleToggleCustomEvent(ev) {\n if (!ev)\n return;\n const eventDetail = { originalEvent: ev, value: props.value, isExpanded: isExpanded.value, isSelected: isSelected.value };\n handleAndDispatchCustomEvent(TREE_TOGGLE, handleToggle, eventDetail);\n }\n __expose({\n isExpanded,\n isSelected,\n isIndeterminate,\n handleToggle: () => rootContext.onToggle(props.value),\n handleSelect: () => rootContext.onSelect(props.value)\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(_sfc_main$1), {\n \"as-child\": \"\",\n value: _ctx.value,\n \"allow-shift-key\": \"\"\n }, {\n default: withCtx(() => [\n createVNode(unref(Primitive), mergeProps(_ctx.$attrs, {\n role: \"treeitem\",\n as: _ctx.as,\n \"as-child\": _ctx.asChild,\n \"aria-selected\": isSelected.value,\n \"aria-expanded\": hasChildren.value ? isExpanded.value : undefined,\n \"aria-level\": _ctx.level,\n \"data-indent\": _ctx.level,\n \"data-selected\": isSelected.value ? \"\" : undefined,\n \"data-expanded\": isExpanded.value ? \"\" : undefined,\n onKeydown: [\n withKeys(withModifiers(handleSelectCustomEvent, [\"self\", \"prevent\"]), [\"enter\", \"space\"]),\n _cache[0] || (_cache[0] = withKeys(withModifiers((ev) => unref(rootContext).dir.value === \"ltr\" ? handleKeydownRight(ev) : handleKeydownLeft(ev), [\"prevent\"]), [\"right\"])),\n _cache[1] || (_cache[1] = withKeys(withModifiers((ev) => unref(rootContext).dir.value === \"ltr\" ? handleKeydownLeft(ev) : handleKeydownRight(ev), [\"prevent\"]), [\"left\"]))\n ],\n onClick: _cache[2] || (_cache[2] = withModifiers((ev) => {\n handleSelectCustomEvent(ev);\n handleToggleCustomEvent(ev);\n }, [\"stop\"]))\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\", {\n isExpanded: isExpanded.value,\n isSelected: isSelected.value,\n isIndeterminate: isIndeterminate.value,\n handleSelect: () => unref(rootContext).onSelect(_ctx.value),\n handleToggle: () => unref(rootContext).onToggle(_ctx.value)\n })\n ]),\n _: 3\n }, 16, [\"as\", \"as-child\", \"aria-selected\", \"aria-expanded\", \"aria-level\", \"data-indent\", \"data-selected\", \"data-expanded\", \"onKeydown\"])\n ]),\n _: 3\n }, 8, [\"value\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=TreeItem.js.map\n"],"names":["renderSlotFragments","children","child","Fragment","Slot","defineComponent","_","attrs","slots","childrens","firstNonCommentChildrenIndex","Comment","firstNonCommentChildren","_a","mergedProps","mergeProps","_b","cloned","cloneVNode","prop","Primitive","props","asTag","h","_sfc_main","__props","_ctx","_cache","openBlock","createBlock","unref","withCtx","renderSlot","computedEager","fn","options","result","shallowRef","watchEffect","readonly","tryOnScopeDispose","getCurrentScope","onScopeDispose","createEventHook","fns","off","offFn","args","createGlobalState","stateFactory","initialized","state","scope","effectScope","createSharedComposable","composable","subscribers","dispose","toReactive","objectRef","isRef","reactive","proxy","p","receiver","value","reactiveComputed","computed","reactiveOmit","obj","keys","flatKeys","predicate","toRefs$1","k","v","toValue$1","e","isClient","isDef","val","toString","isObject","noop","isIOS","getIsIOS","getLifeCycleTarget","target","getCurrentInstance","toArray","refAutoReset","defaultValue","afterMs","customRef","track","trigger","timer","resetAfter","newValue","toValue","tryOnBeforeUnmount","onBeforeUnmount","useTimeoutFn","cb","interval","immediate","immediateCallback","isPending","clear","stop","start","useTimeout","exposeControls","callback","controls","ready","watchImmediate","source","watch","defaultWindow","unrefElement","elRef","plain","useEventListener","cleanups","cleanup","register","el","event","listener","firstParamTargets","test","stopWatch","raw_targets","raw_events","raw_listeners","raw_options","optionsClone","useMounted","isMounted","instance","onMounted","useSupported","createKeyPredicate","keyFilter","onKeyStroke","key","handler","eventName","passive","dedupe","useRafFn","fpsLimit","window","once","isActive","intervalLimit","previousFrameTimestamp","rafId","loop","timestamp","delta","resume","pause","cloneFnJSON","useResizeObserver","observerOptions","observer","isSupported","targets","_targets","els","_el","useVModel","emit","_c","clone","deep","shouldEmit","vm","_emit","cloneFn","getValue","triggerEmit","initialValue","ref","isUpdating","nextTick","isNullish","isValueEqualOrExist","base","current","isEqual","createContext","providerComponentName","contextName","symbolDescription","injectionKey","fallback","context","inject","contextValue","provide","injectConfigProviderContext","provideConfigProviderContext","useDirection","dir","useForwardExpose","currentRef","currentElement","localExpose","ret","forwardRef","ref2","injectCollapsibleRootContext","provideCollapsibleRootContext","__expose","__emit","open","disabled","unmountOnHide","toRefs","ignoredElement","useArrowNavigation","parentElement","arrowKeyOptions","attributeName","itemsArray","preventScroll","focus","right","left","up","down","home","end","goingVertical","goingHorizontal","allCollectionItems","item","findNextFocusableElement","elements","iterations","index","newIndex","adjustedNewIndex","candidate","count","useId","deterministicId","prefix","configProviderContext","vue.useId","useStateMachine","initialState","machine","reducer","usePresence","present","node","stylesRef","prevAnimationNameRef","prevPresentRef","timeoutId","ownerWindow","dispatch","dispatchCustomEvent","name","customEvent","currentPresent","prevPresent","hasPresentChanged","prevAnimationName","currentAnimationName","getAnimationName","handleAnimationEnd","isCurrentAnimation","directionName","currentFillMode","handleAnimationStart","watcher","newNode","oldNode","stateWatcher","onUnmounted","Presence","expose","forceMount","isPresent","componentName","line","emits","rootContext","presentRef","width","height","isOpen","isMountAnimationPrevented","currentStyle","rect","skipAnimation","ev","createVNode","createCommentVNode","useEmitAsProps","events","toHandlerKey","camelize","arg","useForwardProps","defaultProps","prev","curr","refProps","toRef","preservedProps","assignedProps","useForwardPropsEmits","parsedProps","emitsAsProps","injectDialogRootContext","provideDialogRootContext","triggerElement","contentElement","modal","Teleport","handleAndDispatchCustomEvent","detail","POINTER_DOWN_OUTSIDE","FOCUS_OUTSIDE","isLayerExist","layerElement","targetElement","targetLayer","mainLayer","nodeList","usePointerDownOutside","onPointerDownOutside","element","ownerDocument","isPointerInsideDOMTree","handleClickRef","cleanupFn","handlePointerDown","handleAndDispatchPointerDownOutsideEvent","eventDetail","timerId","useFocusOutside","onFocusOutside","isFocusInsideDOMTree","handleFocus","layers","isBodyPointerEventsDisabled","isPointerEventsEnabled","localLayers","highestLayerWithOutsidePointerEventsDisabled","highestLayerWithOutsidePointerEventsDisabledIndex","pointerDownOutside","isPointerDownOnBranch","branch","focusOutside","originalBodyPointerEvents","normalizeStyle","getActiveElement","activeElement","ITEM_SELECT","SELECTION_KEYS","FIRST_KEYS","LAST_KEYS","FIRST_LAST_KEYS","getOpenState","focusFirst","candidates","PREVIOUSLY_FOCUSED_ELEMENT","isPointInPolygon","point","polygon","x","y","inside","j","xi","yi","xj","yj","isPointerInGraceArea","area","cursorPos","isMouseEvent","AUTOFOCUS_ON_MOUNT","AUTOFOCUS_ON_UNMOUNT","EVENT_OPTIONS","select","previouslyFocusedElement","getTabbableEdges","container","getTabbableCandidates","first","findVisible","last","nodes","walker","isHiddenInput","isHidden","upTo","isSelectableInput","useFocusStackState","createFocusScopesStack","stack","focusScope","activeFocusScope","arrayRemove","array","updatedArray","removeLinks","items","lastFocusedElementRef","focusScopesStack","handleFocusIn","handleFocusOut","relatedTarget","handleMutations","mutations","mutationObserver","mountEvent","unmountEvent","unmountEventHandler","handleKeyDown","isTabKey","focusedElement","_sfc_main$1","$event","_sfc_main$2","useHideOthers","undo","hideOthers","originalEvent","ctrlLeftClick","hasInteractedOutsideRef","hasPointerDownOutsideRef","useBodyLockStackCount","map","initialOverflow","locked","stopTouchMoveListener","resetBodyStyle","oldVal","verticalScrollbarWidth","defaultConfig","config","defu","preventDefault","useBodyScrollLock","id","checkOverflowScroll","ele","style","parent","rawEvent","_target","injectAvatarRootContext","provideAvatarRootContext","canRender","timeout","useImageLoadingStatus","src","referrerPolicy","loadingStatus","updateStatus","status","src2","referrer","image","imageLoadingStatus","withDirectives","vShow","usePrimitiveElement","primitiveElement","useKbd","ENTRY_FOCUS","MAP_KEY_TO_FOCUS_INTENT","getDirectionAwareKey","getFocusIntent","orientation","wrapArray","startIndex","ITEM_DATA_ATTR","useCollection","isProvider","itemMap","getItems","includeDisabledItem","collectionNode","orderedNodes","orderedItems","a","b","i","CollectionSlot","CollectionItem","key2","markRaw","reactiveItems","itemMapSize","injectRovingFocusGroupContext","provideRovingFocusGroupContext","propDir","currentTabStopId","isTabbingBackOut","isClickFocus","focusableItemsCount","isKeyboardFocus","entryFocusEvent","activeItem","currentItem","candidateItems","handleMouseUp","tabStopId","useFormControl","valueState","cur","input","inputProto","setValue","inputEvent","changeEvent","parsedValue","createElementBlock","renderList","parsed","injectCheckboxGroupRootContext","provideCheckboxGroupRootContext","randomId","isCurrentTabStop","handleKeydown","focusIntent","candidateNodes","currentIndex","isIndeterminate","checked","getState","injectCheckboxRootContext","provideCheckboxRootContext","checkboxGroupContext","modelValue","checkboxState","handleClick","modelValueArray","isFormControl","ariaLabel","resolveDynamicComponent","withKeys","withModifiers","injectPopperRootContext","providePopperRootContext","anchor","useFilter","computedOptions","collator","string","substring","scan","sliceLen","slice","valueComparator","currentValue","comparator","compare","useTypeahead","search","itemsWithTextValue","currentMatch","values","nextMatch","getNextMatch","newItem","normalizedSearch","char","currentMatchIndex","wrappedValues","findValuesBetween","endIndex","minIndex","maxIndex","injectListboxRootContext","provideListboxRootContext","multiple","highlightOnHover","selectionBehavior","handleTypeaheadSearch","kbd","firstValue","isUserAction","focusable","onValueChange","modelArray","highlightedElement","previousElement","isVirtual","isComposing","virtualFocusHook","virtualKeydownHook","virtualHighlightHook","getCollectionItem","changeHighlight","scrollIntoView","highlightedItem","highlightItem","onKeydownEnter","onKeydownTypeAhead","isMetaKey","collection","onCompositionStart","onCompositionEnd","highlightFirstItem","onKeydownNavigation","onLeave","onEnter","intent","handleMultipleReplace","targetEl","lastValue","highlightSelected","injectComboboxRootContext","provideComboboxRootContext","ignoreFilter","resetSearchTermOnSelect","onOpenChange","filterState","isUserInputted","inputElement","resetSearchTerm","allItems","allGroups","contains","filterItems","itemCount","score","groupId","group","itemId","inst","activedescendant","watchSyncEffect","listboxContext","handleInput","rootModelValue","watchPostEffect","injectListboxGroupContext","provideListboxGroupContext","injectComboboxGroupContext","provideComboboxGroupContext","isRender","groupContext","isNotNull","transformOrigin","data","placement","rects","middlewareData","isArrowHidden","arrowWidth","arrowHeight","placedSide","placedAlign","getSideAndAlignFromPlacement","noArrowAlign","arrowXCenter","arrowYCenter","side","align","useSize","size","resizeObserver","entries","entry","width2","height2","borderSizeEntry","borderSize","PopperContentPropsDefaultValue","injectPopperContentContext","providePopperContentContext","mergeDefaults","floatingRef","arrow$1","desiredPlacement","collisionPadding","boundary","detectOverflowOptions","computedMiddleware","offset","flip","shift","limitShift","availableWidth","availableHeight","anchorWidth","anchorHeight","contentStyle","arrow","hide","reference","floatingStyles","isPositioned","useFloating","autoUpdate","cannotCenterArrow","contentZIndex","arrowX","arrowY","injectComboboxContentContext","provideComboboxContentContext","position","pickedProps","forwardedProps","popperStyle","isInputWithinContent","_sfc_main$3","forwarded","useNonce","nonce","LISTBOX_SELECT","injectListboxItemContext","provideListboxItemContext","isHighlighted","isSelected","handleSelect","handleSelectCustomEvent","withMemo","filteredCurrentItem","createTextVNode","toDisplayString","useIsUsingKeyboardImpl","isUsingKeyboard","useIsUsingKeyboard","injectMenuContext","provideMenuContext","injectMenuRootContext","provideMenuRootContext","content","isUsingKeyboardRef","normalizeProps","guardReactiveProps","useFocusGuards","edgeGuards","createFocusGuard","injectMenuContentContext","provideMenuContentContext","menuContext","trapFocus","disableOutsidePointerEvents","searchRef","timerRef","pointerGraceTimerRef","pointerGraceIntentRef","pointerDirRef","lastPointerXRef","currentItemId","rovingFocusGroupRef","isPointerMovingToSubmenu","handleMountAutoFocus","isKeyDownInside","isModifierKey","isCharacterKey","collectionItems","handleBlur","handlePointerMove","pointerXHasChanged","newDir","_sfc_main$4","contentContext","isFocused","handlePointerLeave","isPointerDownRef","menuItem","itemSelectEvent","isTypingAhead","injectPopoverRootContext","providePopoverRootContext","hasCustomAnchor","isRightClickOutsideRef","isRightClick","injectDropdownMenuRootContext","provideDropdownMenuRootContext","handleCloseAutoFocus","useGraceArea","containerElement","isPointerInTransit","pointerGraceArea","pointerExit","handleRemoveGraceArea","handleCreateGraceArea","hoverTarget","currentTarget","exitPoint","exitSide","getExitSideFromRect","paddedExitPoints","getPaddedExitPoints","hoverTargetPoints","getPointsFromRect","graceArea","getHull","handleTriggerLeave","handleContentLeave","handleTrackPointerGrace","pointerPosition","hasEnteredTarget","isPointerOutsideGraceArea","isAnotherGraceAreaTrigger","top","bottom","padding","points","newPoints","getHullPresorted","upperHull","q","lowerHull","clamp","min","max","injectPaginationRootContext","providePaginationRootContext","siblingCount","showEdges","page","pageCount","range","length","idx","transform","ELLIPSIS","getRange","currentPage","lastPageIndex","leftSiblingIndex","rightSiblingIndex","showLeftEllipsis","showRightEllipsis","rightRange","middleRange","transformedRange","injectRadioGroupRootContext","provideRadioGroupRootContext","required","RADIO_SELECT","injectRadioGroupItemContext","provideRadiogroupItemContext","isArrowKeyPressed","ARROW_KEYS","itemContext","selectElement","selectProto","createElementVNode","OPEN_KEYS","CONTENT_MARGIN","_hoisted_1","injectSelectRootContext","provideSelectRootContext","valueElement","triggerPointerDownPosRef","isEmptyModelValue","optionsSet","nativeSelectKey","option","handleValueChange","isDisabled","resetTypeahead","handleOpen","handlePointerOpen","_d","injectSelectItemAlignedPositionContext","provideSelectItemAlignedPositionContext","injectSelectContentContext","shouldExpandOnScrollRef","shouldRepositionRef","contentWrapperElement","viewport","selectedItem","selectedItemText","focusSelectedItem","triggerRect","contentRect","valueNodeRect","itemTextRect","itemTextOffset","leftDelta","minContentWidth","contentWidth","rightEdge","clampedLeft","rightDelta","leftEdge","clampedRight","itemsHeight","contentStyles","contentBorderTopWidth","contentPaddingTop","contentBorderBottomWidth","contentPaddingBottom","fullContentHeight","minContentHeight","viewportStyles","viewportPaddingTop","viewportPaddingBottom","topEdgeToTriggerMiddle","triggerMiddleToBottomEdge","selectedItemHalfHeight","itemOffsetMiddle","contentTopToItemMiddle","itemMiddleToContentBottom","isLastItem","viewportOffsetBottom","clampedTriggerMiddleToBottomEdge","isFirstItem","handleScrollButtonChange","SelectContentDefaultContextValue","provideSelectContentContext","firstValidItemFoundRef","firstSelectedItemInArrayFoundRef","pointerMoveDelta","handlePointerUp","isFirstValidItem","isSelectedItem","vnode","fragment","presenceRef","renderPresence","injectSelectItemContext","provideSelectItemContext","textValue","textId","SELECT_SELECT","injectSelectGroupContext","provideSelectGroupContext","itemTextElement","optionProps","propNonce","alignedPositionContext","prevScrollTopRef","handleScroll","contentWrapper","scrolledBy","cssMinHeight","cssHeight","prevHeight","nextHeight","clampedNextHeight","heightDiff","selectedLabel","list","getOption","slotText","getNextSortedValues","prevValues","nextValue","atIndex","nextValues","convertValueToPercentage","percentage","getLabel","totalValues","getClosestValueIndex","distances","closestDistance","getThumbInBoundsOffset","direction","halfWidth","linearScale","getStepsBetweenValues","hasMinStepsBetweenValues","minStepsBetweenValues","stepsBetweenValues","output","ratio","getDecimalCount","roundValue","decimalCount","rounder","PAGE_KEYS","BACK_KEYS","injectSliderOrientationContext","provideSliderOrientationContext","injectSliderRootContext","inverted","sliderElement","offsetPosition","rectRef","isSlidingFromLeft","getValueFromPointerEvent","slideStart","thumb","thumbWidth","slideDirection","isBackKey","isSlidingFromBottom","thumbHeight","provideSliderRootContext","step","minStepsBetweenThumbs","thumbAlignment","currentModelValue","valueIndexToChangeRef","valuesBeforeSlideStartRef","handleSlideStart","closestIndex","updateValues","handleSlideMove","handleSlideEnd","prevValue","toRaw","commit","snapToStep","hasChanged","thumbElements","multiplier","stepInDirection","thumbElement","percent","label","orientationSize","thumbInBoundsOffset","i2","percentages","offsetStart","offsetEnd","injectSwitchRootContext","provideSwitchRootContext","toggleCheck","injectTabsRootContext","provideTabsRootContext","tabsList","makeTriggerId","baseId","makeContentId","triggerId","contentId","isMountAnimationPreventedRef","isAutomaticActivation","injectToastProviderContext","provideToastProviderContext","duration","swipeDirection","swipeThreshold","toastCount","isFocusedToastEscapeKeyDownRef","isClosePausedRef","error","TOAST_SWIPE_START","TOAST_SWIPE_MOVE","TOAST_SWIPE_CANCEL","TOAST_SWIPE_END","VIEWPORT_PAUSE","VIEWPORT_RESUME","isDeltaInDirection","threshold","deltaX","deltaY","isDeltaX","isHTMLElement","getAnnounceTextContent","textContent","isExcluded","altText","providerContext","isAnnounced","renderAnnounceText","injectToastRootContext","provideToastRootContext","pointerStartRef","swipeDeltaRef","closeTimerStartTimeRef","closeTimerRemainingTimeRef","closeTimerRef","remainingTime","remainingRaf","elapsedTime","startTimer","duration2","handleClose","isNonPointerEvent","announceTextContent","handleResume","handlePause","hasSwipeMoveStarted","isHorizontalSwipe","clampedX","clampedY","moveStartBuffer","toast","event2","remaining","_duration","prevFocusedElement","hotkey","hasToasts","headFocusProxyRef","tailFocusProxyRef","hotkeyMessage","pauseEvent","resumeEvent","handleFocusOutResume","handlePointerLeaveResume","isTabbingBackwards","sortedCandidates","getSortedTabbableCandidates","tabbingDirection","tabbableCandidates","toastNode","toastTabbableCandidates","TOOLTIP_OPEN","injectTooltipProviderContext","provideTooltipProviderContext","delayDuration","skipDelayDuration","disableHoverableContent","disableClosingTrigger","ignoreNonKeyboardFocus","isOpenDelayed","isPointerInTransitRef","clearTimer","injectTooltipRootContext","provideTooltipRootContext","disableTooltip","wasOpenDelayedRef","stateAttribute","handleDelayedOpen","isPointerDown","hasPointerMoveOpened","tooltipListeners","toHandlers","slot","useSlots","defaultSlot","recursiveTextSearch","popperContentProps","restProps","onClose","onPointerExit","flatten","acc","useSelectionBehavior","onSelectItem","condition","injectTreeRootContext","provideTreeRootContext","propagateSelect","expanded","selectedKeys","flattenItems","items2","level","parentItem","isExpanded","flattenedItem","expandedItems","collections","handleKeydownNavigation","baseValue","exist","val2","TREE_SELECT","TREE_TOGGLE","hasChildren","handleKeydownRight","nextElement","handleToggleCustomEvent","handleKeydownLeft","handleToggle"],"mappings":"ojCAEA,SAASA,GAAoBC,EAAU,CACrC,OAAKA,EAEEA,EAAS,QAASC,GACnBA,EAAM,OAASC,GACVH,GAAoBE,EAAM,QAAQ,EACpC,CAACA,CAAK,CACd,EALQ,CAAE,CAMb,CC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q,EAAMsQ,CAAW,EAAE,IAAI,QAAU,MAAQ02B,EAAmBj2B,CAAE,EAAIo2B,EAAkBp2B,CAAE,EAAG,CAAC,SAAS,CAAC,EAAG,CAAC,OAAO,CAAC,GACzKlR,EAAO,CAAC,IAAMA,EAAO,CAAC,EAAI4gB,GAASC,GAAe3P,GAAO/Q,EAAMsQ,CAAW,EAAE,IAAI,QAAU,MAAQ62B,EAAkBp2B,CAAE,EAAIi2B,EAAmBj2B,CAAE,EAAG,CAAC,SAAS,CAAC,EAAG,CAAC,MAAM,CAAC,EACzK,EACD,QAASlR,EAAO,CAAC,IAAMA,EAAO,CAAC,EAAI6gB,GAAe3P,GAAO,CACvD2a,EAAwB3a,CAAE,EAC1Bm2B,EAAwBn2B,CAAE,CACxC,EAAe,CAAC,MAAM,CAAC,EACvB,CAAW,EAAG,CACF,QAAS9Q,EAAQ,IAAM,CACrBC,EAAWN,EAAK,OAAQ,UAAW,CACjC,WAAYymC,EAAW,MACvB,WAAY7a,EAAW,MACvB,gBAAiB5L,EAAgB,MACjC,aAAc,IAAM5f,EAAMsQ,CAAW,EAAE,SAAS1Q,EAAK,KAAK,EAC1D,aAAc,IAAMI,EAAMsQ,CAAW,EAAE,SAAS1Q,EAAK,KAAK,CAC3D,CAAA,CACf,CAAa,EACD,EAAG,CACJ,EAAE,GAAI,CAAC,KAAM,WAAY,gBAAiB,gBAAiB,aAAc,cAAe,gBAAiB,gBAAiB,WAAW,CAAC,CACjJ,CAAS,EACD,EAAG,CACX,EAAS,EAAG,CAAC,OAAO,CAAC,EAErB,CACA,CAAC","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185]}