{"ast":null,"code":"import $01b9c$babelruntimehelpersesmextends from \"@babel/runtime/helpers/esm/extends\";\nimport { useState as $01b9c$useState, useRef as $01b9c$useRef, createElement as $01b9c$createElement, useCallback as $01b9c$useCallback, forwardRef as $01b9c$forwardRef, useEffect as $01b9c$useEffect, Fragment as $01b9c$Fragment, useMemo as $01b9c$useMemo } from \"react\";\nimport { createPortal as $01b9c$createPortal } from \"react-dom\";\nimport { clamp as $01b9c$clamp } from \"@radix-ui/number\";\nimport { composeEventHandlers as $01b9c$composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection as $01b9c$createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs as $01b9c$useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope as $01b9c$createContextScope } from \"@radix-ui/react-context\";\nimport { useDirection as $01b9c$useDirection } from \"@radix-ui/react-direction\";\nimport { DismissableLayer as $01b9c$DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards as $01b9c$useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope as $01b9c$FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId as $01b9c$useId } from \"@radix-ui/react-id\";\nimport { createPopperScope as $01b9c$createPopperScope, Root as $01b9c$Root, Anchor as $01b9c$Anchor, Content as $01b9c$Content, Arrow as $01b9c$Arrow } from \"@radix-ui/react-popper\";\nimport { Portal as $01b9c$Portal } from \"@radix-ui/react-portal\";\nimport { Primitive as $01b9c$Primitive } from \"@radix-ui/react-primitive\";\nimport { Slot as $01b9c$Slot } from \"@radix-ui/react-slot\";\nimport { useCallbackRef as $01b9c$useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState as $01b9c$useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useLayoutEffect as $01b9c$useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { usePrevious as $01b9c$usePrevious } from \"@radix-ui/react-use-previous\";\nimport { VisuallyHidden as $01b9c$VisuallyHidden } from \"@radix-ui/react-visually-hidden\";\nimport { hideOthers as $01b9c$hideOthers } from \"aria-hidden\";\nimport { RemoveScroll as $01b9c$RemoveScroll } from \"react-remove-scroll\";\nconst $cc7e05a45900e73f$var$OPEN_KEYS = [' ', 'Enter', 'ArrowUp', 'ArrowDown'];\nconst $cc7e05a45900e73f$var$SELECTION_KEYS = [' ', 'Enter'];\n/* -------------------------------------------------------------------------------------------------\n * Select\n * -----------------------------------------------------------------------------------------------*/\nconst $cc7e05a45900e73f$var$SELECT_NAME = 'Select';\nconst [$cc7e05a45900e73f$var$Collection, $cc7e05a45900e73f$var$useCollection, $cc7e05a45900e73f$var$createCollectionScope] = $01b9c$createCollection($cc7e05a45900e73f$var$SELECT_NAME);\nconst [$cc7e05a45900e73f$var$createSelectContext, $cc7e05a45900e73f$export$286727a75dc039bd] = $01b9c$createContextScope($cc7e05a45900e73f$var$SELECT_NAME, [$cc7e05a45900e73f$var$createCollectionScope, $01b9c$createPopperScope]);\nconst $cc7e05a45900e73f$var$usePopperScope = $01b9c$createPopperScope();\nconst [$cc7e05a45900e73f$var$SelectProvider, $cc7e05a45900e73f$var$useSelectContext] = $cc7e05a45900e73f$var$createSelectContext($cc7e05a45900e73f$var$SELECT_NAME);\nconst [$cc7e05a45900e73f$var$SelectNativeOptionsProvider, $cc7e05a45900e73f$var$useSelectNativeOptionsContext] = $cc7e05a45900e73f$var$createSelectContext($cc7e05a45900e73f$var$SELECT_NAME);\nconst $cc7e05a45900e73f$export$ef9b1a59e592288f = props => {\n  const {\n    __scopeSelect: __scopeSelect,\n    children: children,\n    open: openProp,\n    defaultOpen: defaultOpen,\n    onOpenChange: onOpenChange,\n    value: valueProp,\n    defaultValue: defaultValue,\n    onValueChange: onValueChange,\n    dir: dir,\n    name: name,\n    autoComplete: autoComplete,\n    disabled: disabled,\n    required: required\n  } = props;\n  const popperScope = $cc7e05a45900e73f$var$usePopperScope(__scopeSelect);\n  const [trigger, setTrigger] = $01b9c$useState(null);\n  const [valueNode, setValueNode] = $01b9c$useState(null);\n  const [valueNodeHasChildren, setValueNodeHasChildren] = $01b9c$useState(false);\n  const direction = $01b9c$useDirection(dir);\n  const [open = false, setOpen] = $01b9c$useControllableState({\n    prop: openProp,\n    defaultProp: defaultOpen,\n    onChange: onOpenChange\n  });\n  const [value, setValue] = $01b9c$useControllableState({\n    prop: valueProp,\n    defaultProp: defaultValue,\n    onChange: onValueChange\n  });\n  const triggerPointerDownPosRef = $01b9c$useRef(null); // We set this to true by default so that events bubble to forms without JS (SSR)\n  const isFormControl = trigger ? Boolean(trigger.closest('form')) : true;\n  const [nativeOptionsSet, setNativeOptionsSet] = $01b9c$useState(new Set()); // The native `select` only associates the correct default value if the corresponding\n  // `option` is rendered as a child **at the same time** as itself.\n  // Because it might take a few renders for our items to gather the information to build\n  // the native `option`(s), we generate a key on the `select` to make sure React re-builds it\n  // each time the options change.\n  const nativeSelectKey = Array.from(nativeOptionsSet).map(option => option.props.value).join(';');\n  return /*#__PURE__*/$01b9c$createElement($01b9c$Root, popperScope, /*#__PURE__*/$01b9c$createElement($cc7e05a45900e73f$var$SelectProvider, {\n    required: required,\n    scope: __scopeSelect,\n    trigger: trigger,\n    onTriggerChange: setTrigger,\n    valueNode: valueNode,\n    onValueNodeChange: setValueNode,\n    valueNodeHasChildren: valueNodeHasChildren,\n    onValueNodeHasChildrenChange: setValueNodeHasChildren,\n    contentId: $01b9c$useId(),\n    value: value,\n    onValueChange: setValue,\n    open: open,\n    onOpenChange: setOpen,\n    dir: direction,\n    triggerPointerDownPosRef: triggerPointerDownPosRef,\n    disabled: disabled\n  }, /*#__PURE__*/$01b9c$createElement($cc7e05a45900e73f$var$Collection.Provider, {\n    scope: __scopeSelect\n  }, /*#__PURE__*/$01b9c$createElement($cc7e05a45900e73f$var$SelectNativeOptionsProvider, {\n    scope: props.__scopeSelect,\n    onNativeOptionAdd: $01b9c$useCallback(option => {\n      setNativeOptionsSet(prev => new Set(prev).add(option));\n    }, []),\n    onNativeOptionRemove: $01b9c$useCallback(option => {\n      setNativeOptionsSet(prev => {\n        const optionsSet = new Set(prev);\n        optionsSet.delete(option);\n        return optionsSet;\n      });\n    }, [])\n  }, children)), isFormControl ? /*#__PURE__*/$01b9c$createElement($cc7e05a45900e73f$var$BubbleSelect, {\n    key: nativeSelectKey,\n    \"aria-hidden\": true,\n    required: required,\n    tabIndex: -1,\n    name: name,\n    autoComplete: autoComplete,\n    value: value // enable form autofill\n    ,\n\n    onChange: event => setValue(event.target.value),\n    disabled: disabled\n  }, value === undefined ? /*#__PURE__*/$01b9c$createElement(\"option\", {\n    value: \"\"\n  }) : null, Array.from(nativeOptionsSet)) : null));\n};\n/*#__PURE__*/\nObject.assign($cc7e05a45900e73f$export$ef9b1a59e592288f, {\n  displayName: $cc7e05a45900e73f$var$SELECT_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * SelectTrigger\n * -----------------------------------------------------------------------------------------------*/\nconst $cc7e05a45900e73f$var$TRIGGER_NAME = 'SelectTrigger';\nconst $cc7e05a45900e73f$export$3ac1e88a1c0b9f1 = /*#__PURE__*/$01b9c$forwardRef((props, forwardedRef) => {\n  const {\n    __scopeSelect: __scopeSelect,\n    disabled = false,\n    ...triggerProps\n  } = props;\n  const popperScope = $cc7e05a45900e73f$var$usePopperScope(__scopeSelect);\n  const context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$TRIGGER_NAME, __scopeSelect);\n  const isDisabled = context.disabled || disabled;\n  const composedRefs = $01b9c$useComposedRefs(forwardedRef, context.onTriggerChange);\n  const getItems = $cc7e05a45900e73f$var$useCollection(__scopeSelect);\n  const [searchRef, handleTypeaheadSearch, resetTypeahead] = $cc7e05a45900e73f$var$useTypeaheadSearch(search => {\n    const enabledItems = getItems().filter(item => !item.disabled);\n    const currentItem = enabledItems.find(item => item.value === context.value);\n    const nextItem = $cc7e05a45900e73f$var$findNextItem(enabledItems, search, currentItem);\n    if (nextItem !== undefined) context.onValueChange(nextItem.value);\n  });\n  const handleOpen = () => {\n    if (!isDisabled) {\n      context.onOpenChange(true); // reset typeahead when we open\n      resetTypeahead();\n    }\n  };\n  return /*#__PURE__*/$01b9c$createElement($01b9c$Anchor, $01b9c$babelruntimehelpersesmextends({\n    asChild: true\n  }, popperScope), /*#__PURE__*/$01b9c$createElement($01b9c$Primitive.button, $01b9c$babelruntimehelpersesmextends({\n    type: \"button\",\n    role: \"combobox\",\n    \"aria-controls\": context.contentId,\n    \"aria-expanded\": context.open,\n    \"aria-required\": context.required,\n    \"aria-autocomplete\": \"none\",\n    dir: context.dir,\n    \"data-state\": context.open ? 'open' : 'closed',\n    disabled: isDisabled,\n    \"data-disabled\": isDisabled ? '' : undefined,\n    \"data-placeholder\": context.value === undefined ? '' : undefined\n  }, triggerProps, {\n    ref: composedRefs // Enable compatibility with native label or custom `Label` \"click\" for Safari:\n    ,\n\n    onClick: $01b9c$composeEventHandlers(triggerProps.onClick, event => {\n      // Whilst browsers generally have no issue focusing the trigger when clicking\n      // on a label, Safari seems to struggle with the fact that there's no `onClick`.\n      // We force `focus` in this case. Note: this doesn't create any other side-effect\n      // because we are preventing default in `onPointerDown` so effectively\n      // this only runs for a label \"click\"\n      event.currentTarget.focus();\n    }),\n    onPointerDown: $01b9c$composeEventHandlers(triggerProps.onPointerDown, event => {\n      // prevent implicit pointer capture\n      // https://www.w3.org/TR/pointerevents3/#implicit-pointer-capture\n      const target = event.target;\n      if (target.hasPointerCapture(event.pointerId)) target.releasePointerCapture(event.pointerId);\n      // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)\n      // but not when the control key is pressed (avoiding MacOS right click)\n      if (event.button === 0 && event.ctrlKey === false) {\n        handleOpen();\n        context.triggerPointerDownPosRef.current = {\n          x: Math.round(event.pageX),\n          y: Math.round(event.pageY)\n        }; // prevent trigger from stealing focus from the active item after opening.\n        event.preventDefault();\n      }\n    }),\n    onKeyDown: $01b9c$composeEventHandlers(triggerProps.onKeyDown, event => {\n      const isTypingAhead = searchRef.current !== '';\n      const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n      if (!isModifierKey && event.key.length === 1) handleTypeaheadSearch(event.key);\n      if (isTypingAhead && event.key === ' ') return;\n      if ($cc7e05a45900e73f$var$OPEN_KEYS.includes(event.key)) {\n        handleOpen();\n        event.preventDefault();\n      }\n    })\n  })));\n});\n/*#__PURE__*/\nObject.assign($cc7e05a45900e73f$export$3ac1e88a1c0b9f1, {\n  displayName: $cc7e05a45900e73f$var$TRIGGER_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * SelectValue\n * -----------------------------------------------------------------------------------------------*/\nconst $cc7e05a45900e73f$var$VALUE_NAME = 'SelectValue';\nconst $cc7e05a45900e73f$export$e288731fd71264f0 = /*#__PURE__*/$01b9c$forwardRef((props, forwardedRef) => {\n  // We ignore `className` and `style` as this part shouldn't be styled.\n  const {\n    __scopeSelect: __scopeSelect,\n    className: className,\n    style: style,\n    children: children,\n    placeholder: placeholder,\n    ...valueProps\n  } = props;\n  const context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$VALUE_NAME, __scopeSelect);\n  const {\n    onValueNodeHasChildrenChange: onValueNodeHasChildrenChange\n  } = context;\n  const hasChildren = children !== undefined;\n  const composedRefs = $01b9c$useComposedRefs(forwardedRef, context.onValueNodeChange);\n  $01b9c$useLayoutEffect(() => {\n    onValueNodeHasChildrenChange(hasChildren);\n  }, [onValueNodeHasChildrenChange, hasChildren]);\n  return /*#__PURE__*/$01b9c$createElement($01b9c$Primitive.span, $01b9c$babelruntimehelpersesmextends({}, valueProps, {\n    ref: composedRefs // we don't want events from the portalled `SelectValue` children to bubble\n    ,\n\n    style: {\n      pointerEvents: 'none'\n    }\n  }), context.value === undefined && placeholder !== undefined ? placeholder : children);\n});\n/*#__PURE__*/\nObject.assign($cc7e05a45900e73f$export$e288731fd71264f0, {\n  displayName: $cc7e05a45900e73f$var$VALUE_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * SelectIcon\n * -----------------------------------------------------------------------------------------------*/\nconst $cc7e05a45900e73f$var$ICON_NAME = 'SelectIcon';\nconst $cc7e05a45900e73f$export$99b400cabb58c515 = /*#__PURE__*/$01b9c$forwardRef((props, forwardedRef) => {\n  const {\n    __scopeSelect: __scopeSelect,\n    children: children,\n    ...iconProps\n  } = props;\n  return /*#__PURE__*/$01b9c$createElement($01b9c$Primitive.span, $01b9c$babelruntimehelpersesmextends({\n    \"aria-hidden\": true\n  }, iconProps, {\n    ref: forwardedRef\n  }), children || '▼');\n});\n/*#__PURE__*/\nObject.assign($cc7e05a45900e73f$export$99b400cabb58c515, {\n  displayName: $cc7e05a45900e73f$var$ICON_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * SelectPortal\n * -----------------------------------------------------------------------------------------------*/\nconst $cc7e05a45900e73f$var$PORTAL_NAME = 'SelectPortal';\nconst $cc7e05a45900e73f$export$b2af6c9944296213 = props => {\n  return /*#__PURE__*/$01b9c$createElement($01b9c$Portal, $01b9c$babelruntimehelpersesmextends({\n    asChild: true\n  }, props));\n};\n/*#__PURE__*/\nObject.assign($cc7e05a45900e73f$export$b2af6c9944296213, {\n  displayName: $cc7e05a45900e73f$var$PORTAL_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * SelectContent\n * -----------------------------------------------------------------------------------------------*/\nconst $cc7e05a45900e73f$var$CONTENT_NAME = 'SelectContent';\nconst $cc7e05a45900e73f$export$c973a4b3cb86a03d = /*#__PURE__*/$01b9c$forwardRef((props, forwardedRef) => {\n  const context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$CONTENT_NAME, props.__scopeSelect);\n  const [fragment, setFragment] = $01b9c$useState(); // setting the fragment in `useLayoutEffect` as `DocumentFragment` doesn't exist on the server\n  $01b9c$useLayoutEffect(() => {\n    setFragment(new DocumentFragment());\n  }, []);\n  if (!context.open) {\n    const frag = fragment;\n    return frag ? /*#__PURE__*/$01b9c$createPortal( /*#__PURE__*/$01b9c$createElement($cc7e05a45900e73f$var$SelectContentProvider, {\n      scope: props.__scopeSelect\n    }, /*#__PURE__*/$01b9c$createElement($cc7e05a45900e73f$var$Collection.Slot, {\n      scope: props.__scopeSelect\n    }, /*#__PURE__*/$01b9c$createElement(\"div\", null, props.children))), frag) : null;\n  }\n  return /*#__PURE__*/$01b9c$createElement($cc7e05a45900e73f$var$SelectContentImpl, $01b9c$babelruntimehelpersesmextends({}, props, {\n    ref: forwardedRef\n  }));\n});\n/*#__PURE__*/\nObject.assign($cc7e05a45900e73f$export$c973a4b3cb86a03d, {\n  displayName: $cc7e05a45900e73f$var$CONTENT_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * SelectContentImpl\n * -----------------------------------------------------------------------------------------------*/\nconst $cc7e05a45900e73f$var$CONTENT_MARGIN = 10;\nconst [$cc7e05a45900e73f$var$SelectContentProvider, $cc7e05a45900e73f$var$useSelectContentContext] = $cc7e05a45900e73f$var$createSelectContext($cc7e05a45900e73f$var$CONTENT_NAME);\nconst $cc7e05a45900e73f$var$CONTENT_IMPL_NAME = 'SelectContentImpl';\nconst $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/$01b9c$forwardRef((props, forwardedRef) => {\n  const {\n    __scopeSelect: __scopeSelect,\n    position = 'item-aligned',\n    onCloseAutoFocus: onCloseAutoFocus,\n    onEscapeKeyDown: onEscapeKeyDown,\n    onPointerDownOutside: onPointerDownOutside,\n    side:\n    //\n    // PopperContent props\n    side,\n    sideOffset: sideOffset,\n    align: align,\n    alignOffset: alignOffset,\n    arrowPadding: arrowPadding,\n    collisionBoundary: collisionBoundary,\n    collisionPadding: collisionPadding,\n    sticky: sticky,\n    hideWhenDetached: hideWhenDetached,\n    avoidCollisions: avoidCollisions,\n    //\n    ...contentProps\n  } = props;\n  const context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$CONTENT_NAME, __scopeSelect);\n  const [content, setContent] = $01b9c$useState(null);\n  const [viewport, setViewport] = $01b9c$useState(null);\n  const composedRefs = $01b9c$useComposedRefs(forwardedRef, node => setContent(node));\n  const [selectedItem, setSelectedItem] = $01b9c$useState(null);\n  const [selectedItemText, setSelectedItemText] = $01b9c$useState(null);\n  const getItems = $cc7e05a45900e73f$var$useCollection(__scopeSelect);\n  const [isPositioned, setIsPositioned] = $01b9c$useState(false);\n  const firstValidItemFoundRef = $01b9c$useRef(false); // aria-hide everything except the content (better supported equivalent to setting aria-modal)\n  $01b9c$useEffect(() => {\n    if (content) return $01b9c$hideOthers(content);\n  }, [content]); // Make sure the whole tree has focus guards as our `Select` may be\n  // the last element in the DOM (because of the `Portal`)\n  $01b9c$useFocusGuards();\n  const focusFirst = $01b9c$useCallback(candidates => {\n    const [firstItem, ...restItems] = getItems().map(item => item.ref.current);\n    const [lastItem] = restItems.slice(-1);\n    const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n    for (const candidate of candidates) {\n      // if focus is already where we want to go, we don't want to keep going through the candidates\n      if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n      candidate === null || candidate === void 0 || candidate.scrollIntoView({\n        block: 'nearest'\n      }); // viewport might have padding so scroll to its edges when focusing first/last items.\n      if (candidate === firstItem && viewport) viewport.scrollTop = 0;\n      if (candidate === lastItem && viewport) viewport.scrollTop = viewport.scrollHeight;\n      candidate === null || candidate === void 0 || candidate.focus();\n      if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n    }\n  }, [getItems, viewport]);\n  const focusSelectedItem = $01b9c$useCallback(() => focusFirst([selectedItem, content]), [focusFirst, selectedItem, content]); // Since this is not dependent on layout, we want to ensure this runs at the same time as\n  // other effects across components. Hence why we don't call `focusSelectedItem` inside `position`.\n  $01b9c$useEffect(() => {\n    if (isPositioned) focusSelectedItem();\n  }, [isPositioned, focusSelectedItem]); // prevent selecting items on `pointerup` in some cases after opening from `pointerdown`\n  // and close on `pointerup` outside.\n  const {\n    onOpenChange: onOpenChange,\n    triggerPointerDownPosRef: triggerPointerDownPosRef\n  } = context;\n  $01b9c$useEffect(() => {\n    if (content) {\n      let pointerMoveDelta = {\n        x: 0,\n        y: 0\n      };\n      const handlePointerMove = event => {\n        var _triggerPointerDownPo, _triggerPointerDownPo2, _triggerPointerDownPo3, _triggerPointerDownPo4;\n        pointerMoveDelta = {\n          x: Math.abs(Math.round(event.pageX) - ((_triggerPointerDownPo = (_triggerPointerDownPo2 = triggerPointerDownPosRef.current) === null || _triggerPointerDownPo2 === void 0 ? void 0 : _triggerPointerDownPo2.x) !== null && _triggerPointerDownPo !== void 0 ? _triggerPointerDownPo : 0)),\n          y: Math.abs(Math.round(event.pageY) - ((_triggerPointerDownPo3 = (_triggerPointerDownPo4 = triggerPointerDownPosRef.current) === null || _triggerPointerDownPo4 === void 0 ? void 0 : _triggerPointerDownPo4.y) !== null && _triggerPointerDownPo3 !== void 0 ? _triggerPointerDownPo3 : 0))\n        };\n      };\n      const handlePointerUp = event => {\n        // If the pointer hasn't moved by a certain threshold then we prevent selecting item on `pointerup`.\n        if (pointerMoveDelta.x <= 10 && pointerMoveDelta.y <= 10) event.preventDefault();else\n          // otherwise, if the event was outside the content, close.\n          if (!content.contains(event.target)) onOpenChange(false);\n        document.removeEventListener('pointermove', handlePointerMove);\n        triggerPointerDownPosRef.current = null;\n      };\n      if (triggerPointerDownPosRef.current !== null) {\n        document.addEventListener('pointermove', handlePointerMove);\n        document.addEventListener('pointerup', handlePointerUp, {\n          capture: true,\n          once: true\n        });\n      }\n      return () => {\n        document.removeEventListener('pointermove', handlePointerMove);\n        document.removeEventListener('pointerup', handlePointerUp, {\n          capture: true\n        });\n      };\n    }\n  }, [content, onOpenChange, triggerPointerDownPosRef]);\n  $01b9c$useEffect(() => {\n    const close = () => onOpenChange(false);\n    window.addEventListener('blur', close);\n    window.addEventListener('resize', close);\n    return () => {\n      window.removeEventListener('blur', close);\n      window.removeEventListener('resize', close);\n    };\n  }, [onOpenChange]);\n  const [searchRef, handleTypeaheadSearch] = $cc7e05a45900e73f$var$useTypeaheadSearch(search => {\n    const enabledItems = getItems().filter(item => !item.disabled);\n    const currentItem = enabledItems.find(item => item.ref.current === document.activeElement);\n    const nextItem = $cc7e05a45900e73f$var$findNextItem(enabledItems, search, currentItem);\n    if (nextItem)\n      /**\n      * Imperative focus during keydown is risky so we prevent React's batching updates\n      * to avoid potential bugs. See: https://github.com/facebook/react/issues/20332\n      */\n      setTimeout(() => nextItem.ref.current.focus());\n  });\n  const itemRefCallback = $01b9c$useCallback((node, value, disabled) => {\n    const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;\n    const isSelectedItem = context.value !== undefined && context.value === value;\n    if (isSelectedItem || isFirstValidItem) {\n      setSelectedItem(node);\n      if (isFirstValidItem) firstValidItemFoundRef.current = true;\n    }\n  }, [context.value]);\n  const handleItemLeave = $01b9c$useCallback(() => content === null || content === void 0 ? void 0 : content.focus(), [content]);\n  const itemTextRefCallback = $01b9c$useCallback((node, value, disabled) => {\n    const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;\n    const isSelectedItem = context.value !== undefined && context.value === value;\n    if (isSelectedItem || isFirstValidItem) setSelectedItemText(node);\n  }, [context.value]);\n  const SelectPosition = position === 'popper' ? $cc7e05a45900e73f$var$SelectPopperPosition : $cc7e05a45900e73f$var$SelectItemAlignedPosition; // Silently ignore props that are not supported by `SelectItemAlignedPosition`\n  const popperContentProps = SelectPosition === $cc7e05a45900e73f$var$SelectPopperPosition ? {\n    side: side,\n    sideOffset: sideOffset,\n    align: align,\n    alignOffset: alignOffset,\n    arrowPadding: arrowPadding,\n    collisionBoundary: collisionBoundary,\n    collisionPadding: collisionPadding,\n    sticky: sticky,\n    hideWhenDetached: hideWhenDetached,\n    avoidCollisions: avoidCollisions\n  } : {};\n  return /*#__PURE__*/$01b9c$createElement($cc7e05a45900e73f$var$SelectContentProvider, {\n    scope: __scopeSelect,\n    content: content,\n    viewport: viewport,\n    onViewportChange: setViewport,\n    itemRefCallback: itemRefCallback,\n    selectedItem: selectedItem,\n    onItemLeave: handleItemLeave,\n    itemTextRefCallback: itemTextRefCallback,\n    focusSelectedItem: focusSelectedItem,\n    selectedItemText: selectedItemText,\n    position: position,\n    isPositioned: isPositioned,\n    searchRef: searchRef\n  }, /*#__PURE__*/$01b9c$createElement($01b9c$RemoveScroll, {\n    as: $01b9c$Slot,\n    allowPinchZoom: true\n  }, /*#__PURE__*/$01b9c$createElement($01b9c$FocusScope, {\n    asChild: true // we make sure we're not trapping once it's been closed\n    ,\n\n    trapped: context.open,\n    onMountAutoFocus: event => {\n      // we prevent open autofocus because we manually focus the selected item\n      event.preventDefault();\n    },\n    onUnmountAutoFocus: $01b9c$composeEventHandlers(onCloseAutoFocus, event => {\n      var _context$trigger;\n      (_context$trigger = context.trigger) === null || _context$trigger === void 0 || _context$trigger.focus({\n        preventScroll: true\n      });\n      event.preventDefault();\n    })\n  }, /*#__PURE__*/$01b9c$createElement($01b9c$DismissableLayer, {\n    asChild: true,\n    disableOutsidePointerEvents: true,\n    onEscapeKeyDown: onEscapeKeyDown,\n    onPointerDownOutside: onPointerDownOutside // When focus is trapped, a focusout event may still happen.\n    ,\n\n    onFocusOutside: event => event.preventDefault(),\n    onDismiss: () => context.onOpenChange(false)\n  }, /*#__PURE__*/$01b9c$createElement(SelectPosition, $01b9c$babelruntimehelpersesmextends({\n    role: \"listbox\",\n    id: context.contentId,\n    \"data-state\": context.open ? 'open' : 'closed',\n    dir: context.dir,\n    onContextMenu: event => event.preventDefault()\n  }, contentProps, popperContentProps, {\n    onPlaced: () => setIsPositioned(true),\n    ref: composedRefs,\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      ...contentProps.style\n    },\n    onKeyDown: $01b9c$composeEventHandlers(contentProps.onKeyDown, event => {\n      const isModifierKey = event.ctrlKey || event.altKey || event.metaKey; // select should not be navigated using tab key so we prevent it\n      if (event.key === 'Tab') event.preventDefault();\n      if (!isModifierKey && event.key.length === 1) handleTypeaheadSearch(event.key);\n      if (['ArrowUp', 'ArrowDown', 'Home', 'End'].includes(event.key)) {\n        const items = getItems().filter(item => !item.disabled);\n        let candidateNodes = items.map(item => item.ref.current);\n        if (['ArrowUp', 'End'].includes(event.key)) 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        /**\n        * Imperative focus during keydown is risky so we prevent React's batching updates\n        * to avoid potential bugs. See: https://github.com/facebook/react/issues/20332\n        */\n        setTimeout(() => focusFirst(candidateNodes));\n        event.preventDefault();\n      }\n    })\n  }))))));\n});\n/*#__PURE__*/\nObject.assign($cc7e05a45900e73f$var$SelectContentImpl, {\n  displayName: $cc7e05a45900e73f$var$CONTENT_IMPL_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * SelectItemAlignedPosition\n * -----------------------------------------------------------------------------------------------*/\nconst $cc7e05a45900e73f$var$ITEM_ALIGNED_POSITION_NAME = 'SelectItemAlignedPosition';\nconst $cc7e05a45900e73f$var$SelectItemAlignedPosition = /*#__PURE__*/$01b9c$forwardRef((props, forwardedRef) => {\n  const {\n    __scopeSelect: __scopeSelect,\n    onPlaced: onPlaced,\n    ...popperProps\n  } = props;\n  const context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$CONTENT_NAME, __scopeSelect);\n  const contentContext = $cc7e05a45900e73f$var$useSelectContentContext($cc7e05a45900e73f$var$CONTENT_NAME, __scopeSelect);\n  const [contentWrapper, setContentWrapper] = $01b9c$useState(null);\n  const [content, setContent] = $01b9c$useState(null);\n  const composedRefs = $01b9c$useComposedRefs(forwardedRef, node => setContent(node));\n  const getItems = $cc7e05a45900e73f$var$useCollection(__scopeSelect);\n  const shouldExpandOnScrollRef = $01b9c$useRef(false);\n  const shouldRepositionRef = $01b9c$useRef(true);\n  const {\n    viewport: viewport,\n    selectedItem: selectedItem,\n    selectedItemText: selectedItemText,\n    focusSelectedItem: focusSelectedItem\n  } = contentContext;\n  const position = $01b9c$useCallback(() => {\n    if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {\n      const triggerRect = context.trigger.getBoundingClientRect(); // -----------------------------------------------------------------------------------------\n      //  Horizontal positioning\n      // -----------------------------------------------------------------------------------------\n      const contentRect = content.getBoundingClientRect();\n      const valueNodeRect = context.valueNode.getBoundingClientRect();\n      const itemTextRect = selectedItemText.getBoundingClientRect();\n      if (context.dir !== '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 - $cc7e05a45900e73f$var$CONTENT_MARGIN;\n        const clampedLeft = $01b9c$clamp(left, [$cc7e05a45900e73f$var$CONTENT_MARGIN, rightEdge - contentWidth]);\n        contentWrapper.style.minWidth = minContentWidth + 'px';\n        contentWrapper.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 - $cc7e05a45900e73f$var$CONTENT_MARGIN;\n        const clampedRight = $01b9c$clamp(right, [$cc7e05a45900e73f$var$CONTENT_MARGIN, leftEdge - contentWidth]);\n        contentWrapper.style.minWidth = minContentWidth + 'px';\n        contentWrapper.style.right = clampedRight + 'px';\n      } // -----------------------------------------------------------------------------------------\n      // Vertical positioning\n      // -----------------------------------------------------------------------------------------\n      const items = getItems();\n      const availableHeight = window.innerHeight - $cc7e05a45900e73f$var$CONTENT_MARGIN * 2;\n      const itemsHeight = viewport.scrollHeight;\n      const contentStyles = window.getComputedStyle(content);\n      const contentBorderTopWidth = parseInt(contentStyles.borderTopWidth, 10);\n      const contentPaddingTop = parseInt(contentStyles.paddingTop, 10);\n      const contentBorderBottomWidth = parseInt(contentStyles.borderBottomWidth, 10);\n      const contentPaddingBottom = parseInt(contentStyles.paddingBottom, 10);\n      const fullContentHeight = contentBorderTopWidth + contentPaddingTop + itemsHeight + contentPaddingBottom + contentBorderBottomWidth; // prettier-ignore\n      const minContentHeight = Math.min(selectedItem.offsetHeight * 5, fullContentHeight);\n      const viewportStyles = window.getComputedStyle(viewport);\n      const viewportPaddingTop = parseInt(viewportStyles.paddingTop, 10);\n      const viewportPaddingBottom = parseInt(viewportStyles.paddingBottom, 10);\n      const topEdgeToTriggerMiddle = triggerRect.top + triggerRect.height / 2 - $cc7e05a45900e73f$var$CONTENT_MARGIN;\n      const triggerMiddleToBottomEdge = availableHeight - topEdgeToTriggerMiddle;\n      const selectedItemHalfHeight = selectedItem.offsetHeight / 2;\n      const itemOffsetMiddle = selectedItem.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 === items[items.length - 1].ref.current;\n        contentWrapper.style.bottom = \"0px\";\n        const viewportOffsetBottom = content.clientHeight - viewport.offsetTop - viewport.offsetHeight;\n        const clampedTriggerMiddleToBottomEdge = Math.max(triggerMiddleToBottomEdge, selectedItemHalfHeight + (isLastItem ? viewportPaddingBottom : 0) + viewportOffsetBottom + contentBorderBottomWidth);\n        const height = contentTopToItemMiddle + clampedTriggerMiddleToBottomEdge;\n        contentWrapper.style.height = height + 'px';\n      } else {\n        const isFirstItem = selectedItem === items[0].ref.current;\n        contentWrapper.style.top = \"0px\";\n        const clampedTopEdgeToTriggerMiddle = Math.max(topEdgeToTriggerMiddle, contentBorderTopWidth + viewport.offsetTop + (isFirstItem ? viewportPaddingTop : 0) + selectedItemHalfHeight);\n        const height = clampedTopEdgeToTriggerMiddle + itemMiddleToContentBottom;\n        contentWrapper.style.height = height + 'px';\n        viewport.scrollTop = contentTopToItemMiddle - topEdgeToTriggerMiddle + viewport.offsetTop;\n      }\n      contentWrapper.style.margin = `${$cc7e05a45900e73f$var$CONTENT_MARGIN}px 0`;\n      contentWrapper.style.minHeight = minContentHeight + 'px';\n      contentWrapper.style.maxHeight = availableHeight + 'px'; // -----------------------------------------------------------------------------------------\n      onPlaced === null || onPlaced === void 0 || onPlaced(); // we don't want the initial scroll position adjustment to trigger \"expand on scroll\"\n      // so we explicitly turn it on only after they've registered.\n      requestAnimationFrame(() => shouldExpandOnScrollRef.current = true);\n    }\n  }, [getItems, context.trigger, context.valueNode, contentWrapper, content, viewport, selectedItem, selectedItemText, context.dir, onPlaced]);\n  $01b9c$useLayoutEffect(() => position(), [position]); // copy z-index from content to wrapper\n  const [contentZIndex, setContentZIndex] = $01b9c$useState();\n  $01b9c$useLayoutEffect(() => {\n    if (content) setContentZIndex(window.getComputedStyle(content).zIndex);\n  }, [content]); // When the viewport becomes scrollable at the top, the scroll up button will mount.\n  // Because it is part of the normal flow, it will push down the viewport, thus throwing our\n  // trigger => selectedItem alignment off by the amount the viewport was pushed down.\n  // We wait for this to happen and then re-run the positining logic one more time to account for it.\n  const handleScrollButtonChange = $01b9c$useCallback(node => {\n    if (node && shouldRepositionRef.current === true) {\n      position();\n      focusSelectedItem === null || focusSelectedItem === void 0 || focusSelectedItem();\n      shouldRepositionRef.current = false;\n    }\n  }, [position, focusSelectedItem]);\n  return /*#__PURE__*/$01b9c$createElement($cc7e05a45900e73f$var$SelectViewportProvider, {\n    scope: __scopeSelect,\n    contentWrapper: contentWrapper,\n    shouldExpandOnScrollRef: shouldExpandOnScrollRef,\n    onScrollButtonChange: handleScrollButtonChange\n  }, /*#__PURE__*/$01b9c$createElement(\"div\", {\n    ref: setContentWrapper,\n    style: {\n      display: 'flex',\n      flexDirection: 'column',\n      position: 'fixed',\n      zIndex: contentZIndex\n    }\n  }, /*#__PURE__*/$01b9c$createElement($01b9c$Primitive.div, $01b9c$babelruntimehelpersesmextends({}, popperProps, {\n    ref: composedRefs,\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      ...popperProps.style\n    }\n  }))));\n});\n/*#__PURE__*/\nObject.assign($cc7e05a45900e73f$var$SelectItemAlignedPosition, {\n  displayName: $cc7e05a45900e73f$var$ITEM_ALIGNED_POSITION_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * SelectPopperPosition\n * -----------------------------------------------------------------------------------------------*/\nconst $cc7e05a45900e73f$var$POPPER_POSITION_NAME = 'SelectPopperPosition';\nconst $cc7e05a45900e73f$var$SelectPopperPosition = /*#__PURE__*/$01b9c$forwardRef((props, forwardedRef) => {\n  const {\n    __scopeSelect: __scopeSelect,\n    align = 'start',\n    collisionPadding = $cc7e05a45900e73f$var$CONTENT_MARGIN,\n    ...popperProps\n  } = props;\n  const popperScope = $cc7e05a45900e73f$var$usePopperScope(__scopeSelect);\n  return /*#__PURE__*/$01b9c$createElement($01b9c$Content, $01b9c$babelruntimehelpersesmextends({}, popperScope, popperProps, {\n    ref: forwardedRef,\n    align: align,\n    collisionPadding: collisionPadding,\n    style: {\n      // Ensure border-box for floating-ui calculations\n      boxSizing: 'border-box',\n      ...popperProps.style,\n      '--radix-select-content-transform-origin': 'var(--radix-popper-transform-origin)',\n      '--radix-select-content-available-width': 'var(--radix-popper-available-width)',\n      '--radix-select-content-available-height': 'var(--radix-popper-available-height)',\n      '--radix-select-trigger-width': 'var(--radix-popper-anchor-width)',\n      '--radix-select-trigger-height': 'var(--radix-popper-anchor-height)'\n    }\n  }));\n});\n/*#__PURE__*/\nObject.assign($cc7e05a45900e73f$var$SelectPopperPosition, {\n  displayName: $cc7e05a45900e73f$var$POPPER_POSITION_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * SelectViewport\n * -----------------------------------------------------------------------------------------------*/\nconst [$cc7e05a45900e73f$var$SelectViewportProvider, $cc7e05a45900e73f$var$useSelectViewportContext] = $cc7e05a45900e73f$var$createSelectContext($cc7e05a45900e73f$var$CONTENT_NAME, {});\nconst $cc7e05a45900e73f$var$VIEWPORT_NAME = 'SelectViewport';\nconst $cc7e05a45900e73f$export$9ed6e7b40248d36d = /*#__PURE__*/$01b9c$forwardRef((props, forwardedRef) => {\n  const {\n    __scopeSelect: __scopeSelect,\n    ...viewportProps\n  } = props;\n  const contentContext = $cc7e05a45900e73f$var$useSelectContentContext($cc7e05a45900e73f$var$VIEWPORT_NAME, __scopeSelect);\n  const viewportContext = $cc7e05a45900e73f$var$useSelectViewportContext($cc7e05a45900e73f$var$VIEWPORT_NAME, __scopeSelect);\n  const composedRefs = $01b9c$useComposedRefs(forwardedRef, contentContext.onViewportChange);\n  const prevScrollTopRef = $01b9c$useRef(0);\n  return /*#__PURE__*/$01b9c$createElement($01b9c$Fragment, null, /*#__PURE__*/$01b9c$createElement(\"style\", {\n    dangerouslySetInnerHTML: {\n      __html: `[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`\n    }\n  }), /*#__PURE__*/$01b9c$createElement($cc7e05a45900e73f$var$Collection.Slot, {\n    scope: __scopeSelect\n  }, /*#__PURE__*/$01b9c$createElement($01b9c$Primitive.div, $01b9c$babelruntimehelpersesmextends({\n    \"data-radix-select-viewport\": \"\",\n    role: \"presentation\"\n  }, viewportProps, {\n    ref: composedRefs,\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: 'auto',\n      ...viewportProps.style\n    },\n    onScroll: $01b9c$composeEventHandlers(viewportProps.onScroll, event => {\n      const viewport = event.currentTarget;\n      const {\n        contentWrapper: contentWrapper,\n        shouldExpandOnScrollRef: shouldExpandOnScrollRef\n      } = viewportContext;\n      if (shouldExpandOnScrollRef !== null && shouldExpandOnScrollRef !== void 0 && shouldExpandOnScrollRef.current && contentWrapper) {\n        const scrolledBy = Math.abs(prevScrollTopRef.current - viewport.scrollTop);\n        if (scrolledBy > 0) {\n          const availableHeight = window.innerHeight - $cc7e05a45900e73f$var$CONTENT_MARGIN * 2;\n          const cssMinHeight = parseFloat(contentWrapper.style.minHeight);\n          const cssHeight = parseFloat(contentWrapper.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.style.height = clampedNextHeight + 'px';\n            if (contentWrapper.style.bottom === '0px') {\n              viewport.scrollTop = heightDiff > 0 ? heightDiff : 0; // ensure the content stays pinned to the bottom\n              contentWrapper.style.justifyContent = 'flex-end';\n            }\n          }\n        }\n      }\n      prevScrollTopRef.current = viewport.scrollTop;\n    })\n  }))));\n});\n/*#__PURE__*/\nObject.assign($cc7e05a45900e73f$export$9ed6e7b40248d36d, {\n  displayName: $cc7e05a45900e73f$var$VIEWPORT_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * SelectGroup\n * -----------------------------------------------------------------------------------------------*/\nconst $cc7e05a45900e73f$var$GROUP_NAME = 'SelectGroup';\nconst [$cc7e05a45900e73f$var$SelectGroupContextProvider, $cc7e05a45900e73f$var$useSelectGroupContext] = $cc7e05a45900e73f$var$createSelectContext($cc7e05a45900e73f$var$GROUP_NAME);\nconst $cc7e05a45900e73f$export$ee25a334c55de1f4 = /*#__PURE__*/$01b9c$forwardRef((props, forwardedRef) => {\n  const {\n    __scopeSelect: __scopeSelect,\n    ...groupProps\n  } = props;\n  const groupId = $01b9c$useId();\n  return /*#__PURE__*/$01b9c$createElement($cc7e05a45900e73f$var$SelectGroupContextProvider, {\n    scope: __scopeSelect,\n    id: groupId\n  }, /*#__PURE__*/$01b9c$createElement($01b9c$Primitive.div, $01b9c$babelruntimehelpersesmextends({\n    role: \"group\",\n    \"aria-labelledby\": groupId\n  }, groupProps, {\n    ref: forwardedRef\n  })));\n});\n/*#__PURE__*/\nObject.assign($cc7e05a45900e73f$export$ee25a334c55de1f4, {\n  displayName: $cc7e05a45900e73f$var$GROUP_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * SelectLabel\n * -----------------------------------------------------------------------------------------------*/\nconst $cc7e05a45900e73f$var$LABEL_NAME = 'SelectLabel';\nconst $cc7e05a45900e73f$export$f67338d29bd972f8 = /*#__PURE__*/$01b9c$forwardRef((props, forwardedRef) => {\n  const {\n    __scopeSelect: __scopeSelect,\n    ...labelProps\n  } = props;\n  const groupContext = $cc7e05a45900e73f$var$useSelectGroupContext($cc7e05a45900e73f$var$LABEL_NAME, __scopeSelect);\n  return /*#__PURE__*/$01b9c$createElement($01b9c$Primitive.div, $01b9c$babelruntimehelpersesmextends({\n    id: groupContext.id\n  }, labelProps, {\n    ref: forwardedRef\n  }));\n});\n/*#__PURE__*/\nObject.assign($cc7e05a45900e73f$export$f67338d29bd972f8, {\n  displayName: $cc7e05a45900e73f$var$LABEL_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * SelectItem\n * -----------------------------------------------------------------------------------------------*/\nconst $cc7e05a45900e73f$var$ITEM_NAME = 'SelectItem';\nconst [$cc7e05a45900e73f$var$SelectItemContextProvider, $cc7e05a45900e73f$var$useSelectItemContext] = $cc7e05a45900e73f$var$createSelectContext($cc7e05a45900e73f$var$ITEM_NAME);\nconst $cc7e05a45900e73f$export$13ef48a934230896 = /*#__PURE__*/$01b9c$forwardRef((props, forwardedRef) => {\n  const {\n    __scopeSelect: __scopeSelect,\n    value: value,\n    disabled = false,\n    textValue: textValueProp,\n    ...itemProps\n  } = props;\n  const context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$ITEM_NAME, __scopeSelect);\n  const contentContext = $cc7e05a45900e73f$var$useSelectContentContext($cc7e05a45900e73f$var$ITEM_NAME, __scopeSelect);\n  const isSelected = context.value === value;\n  const [textValue, setTextValue] = $01b9c$useState(textValueProp !== null && textValueProp !== void 0 ? textValueProp : '');\n  const [isFocused, setIsFocused] = $01b9c$useState(false);\n  const composedRefs = $01b9c$useComposedRefs(forwardedRef, node => {\n    var _contentContext$itemR;\n    return (_contentContext$itemR = contentContext.itemRefCallback) === null || _contentContext$itemR === void 0 ? void 0 : _contentContext$itemR.call(contentContext, node, value, disabled);\n  });\n  const textId = $01b9c$useId();\n  const handleSelect = () => {\n    if (!disabled) {\n      context.onValueChange(value);\n      context.onOpenChange(false);\n    }\n  };\n  return /*#__PURE__*/$01b9c$createElement($cc7e05a45900e73f$var$SelectItemContextProvider, {\n    scope: __scopeSelect,\n    value: value,\n    disabled: disabled,\n    textId: textId,\n    isSelected: isSelected,\n    onItemTextChange: $01b9c$useCallback(node => {\n      setTextValue(prevTextValue => {\n        var _node$textContent;\n        return prevTextValue || ((_node$textContent = node === null || node === void 0 ? void 0 : node.textContent) !== null && _node$textContent !== void 0 ? _node$textContent : '').trim();\n      });\n    }, [])\n  }, /*#__PURE__*/$01b9c$createElement($cc7e05a45900e73f$var$Collection.ItemSlot, {\n    scope: __scopeSelect,\n    value: value,\n    disabled: disabled,\n    textValue: textValue\n  }, /*#__PURE__*/$01b9c$createElement($01b9c$Primitive.div, $01b9c$babelruntimehelpersesmextends({\n    role: \"option\",\n    \"aria-labelledby\": textId,\n    \"data-highlighted\": isFocused ? '' : undefined // `isFocused` caveat fixes stuttering in VoiceOver\n    ,\n\n    \"aria-selected\": isSelected && isFocused,\n    \"data-state\": isSelected ? 'checked' : 'unchecked',\n    \"aria-disabled\": disabled || undefined,\n    \"data-disabled\": disabled ? '' : undefined,\n    tabIndex: disabled ? undefined : -1\n  }, itemProps, {\n    ref: composedRefs,\n    onFocus: $01b9c$composeEventHandlers(itemProps.onFocus, () => setIsFocused(true)),\n    onBlur: $01b9c$composeEventHandlers(itemProps.onBlur, () => setIsFocused(false)),\n    onPointerUp: $01b9c$composeEventHandlers(itemProps.onPointerUp, handleSelect),\n    onPointerMove: $01b9c$composeEventHandlers(itemProps.onPointerMove, event => {\n      if (disabled) {\n        var _contentContext$onIte;\n        (_contentContext$onIte = contentContext.onItemLeave) === null || _contentContext$onIte === void 0 || _contentContext$onIte.call(contentContext);\n      } else\n        // even though safari doesn't support this option, it's acceptable\n        // as it only means it might scroll a few pixels when using the pointer.\n        event.currentTarget.focus({\n          preventScroll: true\n        });\n    }),\n    onPointerLeave: $01b9c$composeEventHandlers(itemProps.onPointerLeave, event => {\n      if (event.currentTarget === document.activeElement) {\n        var _contentContext$onIte2;\n        (_contentContext$onIte2 = contentContext.onItemLeave) === null || _contentContext$onIte2 === void 0 || _contentContext$onIte2.call(contentContext);\n      }\n    }),\n    onKeyDown: $01b9c$composeEventHandlers(itemProps.onKeyDown, event => {\n      var _contentContext$searc;\n      const isTypingAhead = ((_contentContext$searc = contentContext.searchRef) === null || _contentContext$searc === void 0 ? void 0 : _contentContext$searc.current) !== '';\n      if (isTypingAhead && event.key === ' ') return;\n      if ($cc7e05a45900e73f$var$SELECTION_KEYS.includes(event.key)) handleSelect(); // prevent page scroll if using the space key to select an item\n      if (event.key === ' ') event.preventDefault();\n    })\n  }))));\n});\n/*#__PURE__*/\nObject.assign($cc7e05a45900e73f$export$13ef48a934230896, {\n  displayName: $cc7e05a45900e73f$var$ITEM_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * SelectItemText\n * -----------------------------------------------------------------------------------------------*/\nconst $cc7e05a45900e73f$var$ITEM_TEXT_NAME = 'SelectItemText';\nconst $cc7e05a45900e73f$export$3572fb0fb821ff49 = /*#__PURE__*/$01b9c$forwardRef((props, forwardedRef) => {\n  // We ignore `className` and `style` as this part shouldn't be styled.\n  const {\n    __scopeSelect: __scopeSelect,\n    className: className,\n    style: style,\n    ...itemTextProps\n  } = props;\n  const context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$ITEM_TEXT_NAME, __scopeSelect);\n  const contentContext = $cc7e05a45900e73f$var$useSelectContentContext($cc7e05a45900e73f$var$ITEM_TEXT_NAME, __scopeSelect);\n  const itemContext = $cc7e05a45900e73f$var$useSelectItemContext($cc7e05a45900e73f$var$ITEM_TEXT_NAME, __scopeSelect);\n  const nativeOptionsContext = $cc7e05a45900e73f$var$useSelectNativeOptionsContext($cc7e05a45900e73f$var$ITEM_TEXT_NAME, __scopeSelect);\n  const [itemTextNode, setItemTextNode] = $01b9c$useState(null);\n  const composedRefs = $01b9c$useComposedRefs(forwardedRef, node => setItemTextNode(node), itemContext.onItemTextChange, node => {\n    var _contentContext$itemT;\n    return (_contentContext$itemT = contentContext.itemTextRefCallback) === null || _contentContext$itemT === void 0 ? void 0 : _contentContext$itemT.call(contentContext, node, itemContext.value, itemContext.disabled);\n  });\n  const textContent = itemTextNode === null || itemTextNode === void 0 ? void 0 : itemTextNode.textContent;\n  const nativeOption = $01b9c$useMemo(() => /*#__PURE__*/$01b9c$createElement(\"option\", {\n    key: itemContext.value,\n    value: itemContext.value,\n    disabled: itemContext.disabled\n  }, textContent), [itemContext.disabled, itemContext.value, textContent]);\n  const {\n    onNativeOptionAdd: onNativeOptionAdd,\n    onNativeOptionRemove: onNativeOptionRemove\n  } = nativeOptionsContext;\n  $01b9c$useLayoutEffect(() => {\n    onNativeOptionAdd(nativeOption);\n    return () => onNativeOptionRemove(nativeOption);\n  }, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]);\n  return /*#__PURE__*/$01b9c$createElement($01b9c$Fragment, null, /*#__PURE__*/$01b9c$createElement($01b9c$Primitive.span, $01b9c$babelruntimehelpersesmextends({\n    id: itemContext.textId\n  }, itemTextProps, {\n    ref: composedRefs\n  })), itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? /*#__PURE__*/$01b9c$createPortal(itemTextProps.children, context.valueNode) : null);\n});\n/*#__PURE__*/\nObject.assign($cc7e05a45900e73f$export$3572fb0fb821ff49, {\n  displayName: $cc7e05a45900e73f$var$ITEM_TEXT_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * SelectItemIndicator\n * -----------------------------------------------------------------------------------------------*/\nconst $cc7e05a45900e73f$var$ITEM_INDICATOR_NAME = 'SelectItemIndicator';\nconst $cc7e05a45900e73f$export$6b9198de19accfe6 = /*#__PURE__*/$01b9c$forwardRef((props, forwardedRef) => {\n  const {\n    __scopeSelect: __scopeSelect,\n    ...itemIndicatorProps\n  } = props;\n  const itemContext = $cc7e05a45900e73f$var$useSelectItemContext($cc7e05a45900e73f$var$ITEM_INDICATOR_NAME, __scopeSelect);\n  return itemContext.isSelected ? /*#__PURE__*/$01b9c$createElement($01b9c$Primitive.span, $01b9c$babelruntimehelpersesmextends({\n    \"aria-hidden\": true\n  }, itemIndicatorProps, {\n    ref: forwardedRef\n  })) : null;\n});\n/*#__PURE__*/\nObject.assign($cc7e05a45900e73f$export$6b9198de19accfe6, {\n  displayName: $cc7e05a45900e73f$var$ITEM_INDICATOR_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * SelectScrollUpButton\n * -----------------------------------------------------------------------------------------------*/\nconst $cc7e05a45900e73f$var$SCROLL_UP_BUTTON_NAME = 'SelectScrollUpButton';\nconst $cc7e05a45900e73f$export$d8117927658af6d7 = /*#__PURE__*/$01b9c$forwardRef((props, forwardedRef) => {\n  const contentContext = $cc7e05a45900e73f$var$useSelectContentContext($cc7e05a45900e73f$var$SCROLL_UP_BUTTON_NAME, props.__scopeSelect);\n  const viewportContext = $cc7e05a45900e73f$var$useSelectViewportContext($cc7e05a45900e73f$var$SCROLL_UP_BUTTON_NAME, props.__scopeSelect);\n  const [canScrollUp1, setCanScrollUp] = $01b9c$useState(false);\n  const composedRefs = $01b9c$useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);\n  $01b9c$useLayoutEffect(() => {\n    if (contentContext.viewport && contentContext.isPositioned) {\n      const viewport = contentContext.viewport;\n      function handleScroll() {\n        const canScrollUp = viewport.scrollTop > 0;\n        setCanScrollUp(canScrollUp);\n      }\n      handleScroll();\n      viewport.addEventListener('scroll', handleScroll);\n      return () => viewport.removeEventListener('scroll', handleScroll);\n    }\n  }, [contentContext.viewport, contentContext.isPositioned]);\n  return canScrollUp1 ? /*#__PURE__*/$01b9c$createElement($cc7e05a45900e73f$var$SelectScrollButtonImpl, $01b9c$babelruntimehelpersesmextends({}, props, {\n    ref: composedRefs,\n    onAutoScroll: () => {\n      const {\n        viewport: viewport,\n        selectedItem: selectedItem\n      } = contentContext;\n      if (viewport && selectedItem) viewport.scrollTop = viewport.scrollTop - selectedItem.offsetHeight;\n    }\n  })) : null;\n});\n/*#__PURE__*/\nObject.assign($cc7e05a45900e73f$export$d8117927658af6d7, {\n  displayName: $cc7e05a45900e73f$var$SCROLL_UP_BUTTON_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * SelectScrollDownButton\n * -----------------------------------------------------------------------------------------------*/\nconst $cc7e05a45900e73f$var$SCROLL_DOWN_BUTTON_NAME = 'SelectScrollDownButton';\nconst $cc7e05a45900e73f$export$ff951e476c12189 = /*#__PURE__*/$01b9c$forwardRef((props, forwardedRef) => {\n  const contentContext = $cc7e05a45900e73f$var$useSelectContentContext($cc7e05a45900e73f$var$SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);\n  const viewportContext = $cc7e05a45900e73f$var$useSelectViewportContext($cc7e05a45900e73f$var$SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);\n  const [canScrollDown1, setCanScrollDown] = $01b9c$useState(false);\n  const composedRefs = $01b9c$useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);\n  $01b9c$useLayoutEffect(() => {\n    if (contentContext.viewport && contentContext.isPositioned) {\n      const viewport = contentContext.viewport;\n      function handleScroll() {\n        const maxScroll = viewport.scrollHeight - viewport.clientHeight; // we use Math.ceil here because if the UI is zoomed-in\n        // `scrollTop` is not always reported as an integer\n        const canScrollDown = Math.ceil(viewport.scrollTop) < maxScroll;\n        setCanScrollDown(canScrollDown);\n      }\n      handleScroll();\n      viewport.addEventListener('scroll', handleScroll);\n      return () => viewport.removeEventListener('scroll', handleScroll);\n    }\n  }, [contentContext.viewport, contentContext.isPositioned]);\n  return canScrollDown1 ? /*#__PURE__*/$01b9c$createElement($cc7e05a45900e73f$var$SelectScrollButtonImpl, $01b9c$babelruntimehelpersesmextends({}, props, {\n    ref: composedRefs,\n    onAutoScroll: () => {\n      const {\n        viewport: viewport,\n        selectedItem: selectedItem\n      } = contentContext;\n      if (viewport && selectedItem) viewport.scrollTop = viewport.scrollTop + selectedItem.offsetHeight;\n    }\n  })) : null;\n});\n/*#__PURE__*/\nObject.assign($cc7e05a45900e73f$export$ff951e476c12189, {\n  displayName: $cc7e05a45900e73f$var$SCROLL_DOWN_BUTTON_NAME\n});\nconst $cc7e05a45900e73f$var$SelectScrollButtonImpl = /*#__PURE__*/$01b9c$forwardRef((props, forwardedRef) => {\n  const {\n    __scopeSelect: __scopeSelect,\n    onAutoScroll: onAutoScroll,\n    ...scrollIndicatorProps\n  } = props;\n  const contentContext = $cc7e05a45900e73f$var$useSelectContentContext('SelectScrollButton', __scopeSelect);\n  const autoScrollTimerRef = $01b9c$useRef(null);\n  const getItems = $cc7e05a45900e73f$var$useCollection(__scopeSelect);\n  const clearAutoScrollTimer = $01b9c$useCallback(() => {\n    if (autoScrollTimerRef.current !== null) {\n      window.clearInterval(autoScrollTimerRef.current);\n      autoScrollTimerRef.current = null;\n    }\n  }, []);\n  $01b9c$useEffect(() => {\n    return () => clearAutoScrollTimer();\n  }, [clearAutoScrollTimer]); // When the viewport becomes scrollable on either side, the relevant scroll button will mount.\n  // Because it is part of the normal flow, it will push down (top button) or shrink (bottom button)\n  // the viewport, potentially causing the active item to now be partially out of view.\n  // We re-run the `scrollIntoView` logic to make sure it stays within the viewport.\n  $01b9c$useLayoutEffect(() => {\n    var _activeItem$ref$curre;\n    const activeItem = getItems().find(item => item.ref.current === document.activeElement);\n    activeItem === null || activeItem === void 0 || (_activeItem$ref$curre = activeItem.ref.current) === null || _activeItem$ref$curre === void 0 || _activeItem$ref$curre.scrollIntoView({\n      block: 'nearest'\n    });\n  }, [getItems]);\n  return /*#__PURE__*/$01b9c$createElement($01b9c$Primitive.div, $01b9c$babelruntimehelpersesmextends({\n    \"aria-hidden\": true\n  }, scrollIndicatorProps, {\n    ref: forwardedRef,\n    style: {\n      flexShrink: 0,\n      ...scrollIndicatorProps.style\n    },\n    onPointerDown: $01b9c$composeEventHandlers(scrollIndicatorProps.onPointerDown, () => {\n      if (autoScrollTimerRef.current === null) autoScrollTimerRef.current = window.setInterval(onAutoScroll, 50);\n    }),\n    onPointerMove: $01b9c$composeEventHandlers(scrollIndicatorProps.onPointerMove, () => {\n      var _contentContext$onIte3;\n      (_contentContext$onIte3 = contentContext.onItemLeave) === null || _contentContext$onIte3 === void 0 || _contentContext$onIte3.call(contentContext);\n      if (autoScrollTimerRef.current === null) autoScrollTimerRef.current = window.setInterval(onAutoScroll, 50);\n    }),\n    onPointerLeave: $01b9c$composeEventHandlers(scrollIndicatorProps.onPointerLeave, () => {\n      clearAutoScrollTimer();\n    })\n  }));\n});\n/* -------------------------------------------------------------------------------------------------\n * SelectSeparator\n * -----------------------------------------------------------------------------------------------*/\nconst $cc7e05a45900e73f$var$SEPARATOR_NAME = 'SelectSeparator';\nconst $cc7e05a45900e73f$export$eba4b1df07cb1d3 = /*#__PURE__*/$01b9c$forwardRef((props, forwardedRef) => {\n  const {\n    __scopeSelect: __scopeSelect,\n    ...separatorProps\n  } = props;\n  return /*#__PURE__*/$01b9c$createElement($01b9c$Primitive.div, $01b9c$babelruntimehelpersesmextends({\n    \"aria-hidden\": true\n  }, separatorProps, {\n    ref: forwardedRef\n  }));\n});\n/*#__PURE__*/\nObject.assign($cc7e05a45900e73f$export$eba4b1df07cb1d3, {\n  displayName: $cc7e05a45900e73f$var$SEPARATOR_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * SelectArrow\n * -----------------------------------------------------------------------------------------------*/\nconst $cc7e05a45900e73f$var$ARROW_NAME = 'SelectArrow';\nconst $cc7e05a45900e73f$export$314f4cb8f8099628 = /*#__PURE__*/$01b9c$forwardRef((props, forwardedRef) => {\n  const {\n    __scopeSelect: __scopeSelect,\n    ...arrowProps\n  } = props;\n  const popperScope = $cc7e05a45900e73f$var$usePopperScope(__scopeSelect);\n  const context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$ARROW_NAME, __scopeSelect);\n  const contentContext = $cc7e05a45900e73f$var$useSelectContentContext($cc7e05a45900e73f$var$ARROW_NAME, __scopeSelect);\n  return context.open && contentContext.position === 'popper' ? /*#__PURE__*/$01b9c$createElement($01b9c$Arrow, $01b9c$babelruntimehelpersesmextends({}, popperScope, arrowProps, {\n    ref: forwardedRef\n  })) : null;\n});\n/*#__PURE__*/\nObject.assign($cc7e05a45900e73f$export$314f4cb8f8099628, {\n  displayName: $cc7e05a45900e73f$var$ARROW_NAME\n});\n/* -----------------------------------------------------------------------------------------------*/\nconst $cc7e05a45900e73f$var$BubbleSelect = /*#__PURE__*/$01b9c$forwardRef((props, forwardedRef) => {\n  const {\n    value: value,\n    ...selectProps\n  } = props;\n  const ref = $01b9c$useRef(null);\n  const composedRefs = $01b9c$useComposedRefs(forwardedRef, ref);\n  const prevValue = $01b9c$usePrevious(value); // Bubble value change to parents (e.g form change event)\n  $01b9c$useEffect(() => {\n    const select = ref.current;\n    const selectProto = window.HTMLSelectElement.prototype;\n    const descriptor = Object.getOwnPropertyDescriptor(selectProto, 'value');\n    const setValue = descriptor.set;\n    if (prevValue !== value && setValue) {\n      const event = new Event('change', {\n        bubbles: true\n      });\n      setValue.call(select, value);\n      select.dispatchEvent(event);\n    }\n  }, [prevValue, value]);\n  /**\n  * We purposefully use a `select` here to support form autofill as much\n  * as possible.\n  *\n  * We purposefully do not add the `value` attribute here to allow the value\n  * to be set programatically and bubble to any parent form `onChange` event.\n  * Adding the `value` will cause React to consider the programatic\n  * dispatch a duplicate and it will get swallowed.\n  *\n  * We use `VisuallyHidden` rather than `display: \"none\"` because Safari autofill\n  * won't work otherwise.\n  */\n  return /*#__PURE__*/$01b9c$createElement($01b9c$VisuallyHidden, {\n    asChild: true\n  }, /*#__PURE__*/$01b9c$createElement(\"select\", $01b9c$babelruntimehelpersesmextends({}, selectProps, {\n    ref: composedRefs,\n    defaultValue: value\n  })));\n});\n$cc7e05a45900e73f$var$BubbleSelect.displayName = 'BubbleSelect';\nfunction $cc7e05a45900e73f$var$useTypeaheadSearch(onSearchChange) {\n  const handleSearchChange = $01b9c$useCallbackRef(onSearchChange);\n  const searchRef = $01b9c$useRef('');\n  const timerRef = $01b9c$useRef(0);\n  const handleTypeaheadSearch = $01b9c$useCallback(key => {\n    const search = searchRef.current + key;\n    handleSearchChange(search);\n    (function updateSearch(value) {\n      searchRef.current = value;\n      window.clearTimeout(timerRef.current); // Reset `searchRef` 1 second after it was last updated\n      if (value !== '') timerRef.current = window.setTimeout(() => updateSearch(''), 1000);\n    })(search);\n  }, [handleSearchChange]);\n  const resetTypeahead = $01b9c$useCallback(() => {\n    searchRef.current = '';\n    window.clearTimeout(timerRef.current);\n  }, []);\n  $01b9c$useEffect(() => {\n    return () => window.clearTimeout(timerRef.current);\n  }, []);\n  return [searchRef, handleTypeaheadSearch, resetTypeahead];\n}\n/**\n * This is the \"meat\" of the typeahead matching logic. It takes in a list of items,\n * the search and the current item, and returns the next item (or `undefined`).\n *\n * We normalize the search because if a user has repeatedly pressed a character,\n * we want the exact same behavior as if we only had that one character\n * (ie. cycle through items starting with that character)\n *\n * We also reorder the items by wrapping the array around the current item.\n * This is so we always look forward from the current item, and picking the first\n * item will always be the correct one.\n *\n * Finally, if the normalized search is exactly one character, we exclude the\n * current item from the values because otherwise it would be the first to match always\n * and focus would never move. This is as opposed to the regular case, where we\n * don't want focus to move if the current item still matches.\n */\nfunction $cc7e05a45900e73f$var$findNextItem(items, search, currentItem) {\n  const isRepeated = search.length > 1 && Array.from(search).every(char => char === search[0]);\n  const normalizedSearch = isRepeated ? search[0] : search;\n  const currentItemIndex = currentItem ? items.indexOf(currentItem) : -1;\n  let wrappedItems = $cc7e05a45900e73f$var$wrapArray(items, Math.max(currentItemIndex, 0));\n  const excludeCurrentItem = normalizedSearch.length === 1;\n  if (excludeCurrentItem) wrappedItems = wrappedItems.filter(v => v !== currentItem);\n  const nextItem = wrappedItems.find(item => item.textValue.toLowerCase().startsWith(normalizedSearch.toLowerCase()));\n  return nextItem !== currentItem ? nextItem : undefined;\n}\n/**\n * Wraps an array around itself at a given start index\n * Example: `wrapArray(['a', 'b', 'c', 'd'], 2) === ['c', 'd', 'a', 'b']`\n */\nfunction $cc7e05a45900e73f$var$wrapArray(array, startIndex) {\n  return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nconst $cc7e05a45900e73f$export$be92b6f5f03c0fe9 = $cc7e05a45900e73f$export$ef9b1a59e592288f;\nconst $cc7e05a45900e73f$export$41fb9f06171c75f4 = $cc7e05a45900e73f$export$3ac1e88a1c0b9f1;\nconst $cc7e05a45900e73f$export$4c8d1a57a761ef94 = $cc7e05a45900e73f$export$e288731fd71264f0;\nconst $cc7e05a45900e73f$export$f04a61298a47a40f = $cc7e05a45900e73f$export$99b400cabb58c515;\nconst $cc7e05a45900e73f$export$602eac185826482c = $cc7e05a45900e73f$export$b2af6c9944296213;\nconst $cc7e05a45900e73f$export$7c6e2c02157bb7d2 = $cc7e05a45900e73f$export$c973a4b3cb86a03d;\nconst $cc7e05a45900e73f$export$d5c6c08dc2d3ca7 = $cc7e05a45900e73f$export$9ed6e7b40248d36d;\nconst $cc7e05a45900e73f$export$eb2fcfdbd7ba97d4 = $cc7e05a45900e73f$export$ee25a334c55de1f4;\nconst $cc7e05a45900e73f$export$b04be29aa201d4f5 = $cc7e05a45900e73f$export$f67338d29bd972f8;\nconst $cc7e05a45900e73f$export$6d08773d2e66f8f2 = $cc7e05a45900e73f$export$13ef48a934230896;\nconst $cc7e05a45900e73f$export$d6e5bf9c43ea9319 = $cc7e05a45900e73f$export$3572fb0fb821ff49;\nconst $cc7e05a45900e73f$export$c3468e2714d175fa = $cc7e05a45900e73f$export$6b9198de19accfe6;\nconst $cc7e05a45900e73f$export$2f60d3ec9ad468f2 = $cc7e05a45900e73f$export$d8117927658af6d7;\nconst $cc7e05a45900e73f$export$bf1aedc3039c8d63 = $cc7e05a45900e73f$export$ff951e476c12189;\nconst $cc7e05a45900e73f$export$1ff3c3f08ae963c0 = $cc7e05a45900e73f$export$eba4b1df07cb1d3;\nconst $cc7e05a45900e73f$export$21b07c8f274aebd5 = $cc7e05a45900e73f$export$314f4cb8f8099628;\nexport { $cc7e05a45900e73f$export$286727a75dc039bd as createSelectScope, $cc7e05a45900e73f$export$ef9b1a59e592288f as Select, $cc7e05a45900e73f$export$3ac1e88a1c0b9f1 as SelectTrigger, $cc7e05a45900e73f$export$e288731fd71264f0 as SelectValue, $cc7e05a45900e73f$export$99b400cabb58c515 as SelectIcon, $cc7e05a45900e73f$export$b2af6c9944296213 as SelectPortal, $cc7e05a45900e73f$export$c973a4b3cb86a03d as SelectContent, $cc7e05a45900e73f$export$9ed6e7b40248d36d as SelectViewport, $cc7e05a45900e73f$export$ee25a334c55de1f4 as SelectGroup, $cc7e05a45900e73f$export$f67338d29bd972f8 as SelectLabel, $cc7e05a45900e73f$export$13ef48a934230896 as SelectItem, $cc7e05a45900e73f$export$3572fb0fb821ff49 as SelectItemText, $cc7e05a45900e73f$export$6b9198de19accfe6 as SelectItemIndicator, $cc7e05a45900e73f$export$d8117927658af6d7 as SelectScrollUpButton, $cc7e05a45900e73f$export$ff951e476c12189 as SelectScrollDownButton, $cc7e05a45900e73f$export$eba4b1df07cb1d3 as SelectSeparator, $cc7e05a45900e73f$export$314f4cb8f8099628 as SelectArrow, $cc7e05a45900e73f$export$be92b6f5f03c0fe9 as Root, $cc7e05a45900e73f$export$41fb9f06171c75f4 as Trigger, $cc7e05a45900e73f$export$4c8d1a57a761ef94 as Value, $cc7e05a45900e73f$export$f04a61298a47a40f as Icon, $cc7e05a45900e73f$export$602eac185826482c as Portal, $cc7e05a45900e73f$export$7c6e2c02157bb7d2 as Content, $cc7e05a45900e73f$export$d5c6c08dc2d3ca7 as Viewport, $cc7e05a45900e73f$export$eb2fcfdbd7ba97d4 as Group, $cc7e05a45900e73f$export$b04be29aa201d4f5 as Label, $cc7e05a45900e73f$export$6d08773d2e66f8f2 as Item, $cc7e05a45900e73f$export$d6e5bf9c43ea9319 as ItemText, $cc7e05a45900e73f$export$c3468e2714d175fa as ItemIndicator, $cc7e05a45900e73f$export$2f60d3ec9ad468f2 as ScrollUpButton, $cc7e05a45900e73f$export$bf1aedc3039c8d63 as ScrollDownButton, $cc7e05a45900e73f$export$1ff3c3f08ae963c0 as Separator, $cc7e05a45900e73f$export$21b07c8f274aebd5 as Arrow };","map":{"version":3,"names":["$cc7e05a45900e73f$var$OPEN_KEYS","$cc7e05a45900e73f$var$SELECTION_KEYS","$cc7e05a45900e73f$var$SELECT_NAME","$cc7e05a45900e73f$var$Collection","$cc7e05a45900e73f$var$useCollection","$cc7e05a45900e73f$var$createCollectionScope","$01b9c$createCollection","$cc7e05a45900e73f$var$createSelectContext","$cc7e05a45900e73f$export$286727a75dc039bd","$01b9c$createContextScope","$01b9c$createPopperScope","$cc7e05a45900e73f$var$usePopperScope","$cc7e05a45900e73f$var$SelectProvider","$cc7e05a45900e73f$var$useSelectContext","$cc7e05a45900e73f$var$SelectNativeOptionsProvider","$cc7e05a45900e73f$var$useSelectNativeOptionsContext","$cc7e05a45900e73f$export$ef9b1a59e592288f","props","__scopeSelect","children","open","openProp","defaultOpen","onOpenChange","value","valueProp","defaultValue","onValueChange","dir","name","autoComplete","disabled","required","popperScope","trigger","setTrigger","$01b9c$useState","valueNode","setValueNode","valueNodeHasChildren","setValueNodeHasChildren","direction","$01b9c$useDirection","setOpen","$01b9c$useControllableState","prop","defaultProp","onChange","setValue","triggerPointerDownPosRef","$01b9c$useRef","isFormControl","Boolean","closest","nativeOptionsSet","setNativeOptionsSet","Set","nativeSelectKey","Array","from","map","option","join","$01b9c$createElement","$01b9c$Root","scope","onTriggerChange","onValueNodeChange","onValueNodeHasChildrenChange","contentId","$01b9c$useId","Provider","onNativeOptionAdd","$01b9c$useCallback","prev","add","onNativeOptionRemove","optionsSet","delete","$cc7e05a45900e73f$var$BubbleSelect","key","tabIndex","event","target","undefined","Object","assign","displayName","$cc7e05a45900e73f$var$TRIGGER_NAME","$cc7e05a45900e73f$export$3ac1e88a1c0b9f1","$01b9c$forwardRef","forwardedRef","triggerProps","context","isDisabled","composedRefs","$01b9c$useComposedRefs","getItems","searchRef","handleTypeaheadSearch","resetTypeahead","$cc7e05a45900e73f$var$useTypeaheadSearch","search","enabledItems","filter","item","currentItem","find","nextItem","$cc7e05a45900e73f$var$findNextItem","handleOpen","$01b9c$Anchor","$01b9c$babelruntimehelpersesmextends","asChild","$01b9c$Primitive","button","type","role","ref","onClick","$01b9c$composeEventHandlers","currentTarget","focus","onPointerDown","hasPointerCapture","pointerId","releasePointerCapture","ctrlKey","current","x","Math","round","pageX","y","pageY","preventDefault","onKeyDown","isTypingAhead","isModifierKey","altKey","metaKey","length","includes","$cc7e05a45900e73f$var$VALUE_NAME","$cc7e05a45900e73f$export$e288731fd71264f0","className","style","placeholder","valueProps","hasChildren","$01b9c$useLayoutEffect","span","pointerEvents","$cc7e05a45900e73f$var$ICON_NAME","$cc7e05a45900e73f$export$99b400cabb58c515","iconProps","$cc7e05a45900e73f$var$PORTAL_NAME","$cc7e05a45900e73f$export$b2af6c9944296213","$01b9c$Portal","$cc7e05a45900e73f$var$CONTENT_NAME","$cc7e05a45900e73f$export$c973a4b3cb86a03d","fragment","setFragment","DocumentFragment","frag","$01b9c$createPortal","$cc7e05a45900e73f$var$SelectContentProvider","Slot","$cc7e05a45900e73f$var$SelectContentImpl","$cc7e05a45900e73f$var$CONTENT_MARGIN","$cc7e05a45900e73f$var$useSelectContentContext","$cc7e05a45900e73f$var$CONTENT_IMPL_NAME","position","onCloseAutoFocus","onEscapeKeyDown","onPointerDownOutside","side","sideOffset","align","alignOffset","arrowPadding","collisionBoundary","collisionPadding","sticky","hideWhenDetached","avoidCollisions","contentProps","content","setContent","viewport","setViewport","node","selectedItem","setSelectedItem","selectedItemText","setSelectedItemText","isPositioned","setIsPositioned","firstValidItemFoundRef","$01b9c$useEffect","$01b9c$hideOthers","$01b9c$useFocusGuards","focusFirst","candidates","firstItem","restItems","lastItem","slice","PREVIOUSLY_FOCUSED_ELEMENT","document","activeElement","candidate","scrollIntoView","block","scrollTop","scrollHeight","focusSelectedItem","pointerMoveDelta","handlePointerMove","_triggerPointerDownPo","_triggerPointerDownPo2","_triggerPointerDownPo3","_triggerPointerDownPo4","abs","handlePointerUp","contains","removeEventListener","addEventListener","capture","once","close","window","setTimeout","itemRefCallback","isFirstValidItem","isSelectedItem","handleItemLeave","itemTextRefCallback","SelectPosition","$cc7e05a45900e73f$var$SelectPopperPosition","$cc7e05a45900e73f$var$SelectItemAlignedPosition","popperContentProps","onViewportChange","onItemLeave","$01b9c$RemoveScroll","as","$01b9c$Slot","allowPinchZoom","$01b9c$FocusScope","trapped","onMountAutoFocus","onUnmountAutoFocus","_context$trigger","preventScroll","$01b9c$DismissableLayer","disableOutsidePointerEvents","onFocusOutside","onDismiss","id","onContextMenu","onPlaced","display","flexDirection","outline","items","candidateNodes","reverse","currentElement","currentIndex","indexOf","$cc7e05a45900e73f$var$ITEM_ALIGNED_POSITION_NAME","popperProps","contentContext","contentWrapper","setContentWrapper","shouldExpandOnScrollRef","shouldRepositionRef","triggerRect","getBoundingClientRect","contentRect","valueNodeRect","itemTextRect","itemTextOffset","left","leftDelta","minContentWidth","width","contentWidth","max","rightEdge","innerWidth","clampedLeft","$01b9c$clamp","minWidth","right","rightDelta","leftEdge","clampedRight","availableHeight","innerHeight","itemsHeight","contentStyles","getComputedStyle","contentBorderTopWidth","parseInt","borderTopWidth","contentPaddingTop","paddingTop","contentBorderBottomWidth","borderBottomWidth","contentPaddingBottom","paddingBottom","fullContentHeight","minContentHeight","min","offsetHeight","viewportStyles","viewportPaddingTop","viewportPaddingBottom","topEdgeToTriggerMiddle","top","height","triggerMiddleToBottomEdge","selectedItemHalfHeight","itemOffsetMiddle","offsetTop","contentTopToItemMiddle","itemMiddleToContentBottom","willAlignWithoutTopOverflow","isLastItem","bottom","viewportOffsetBottom","clientHeight","clampedTriggerMiddleToBottomEdge","isFirstItem","clampedTopEdgeToTriggerMiddle","margin","minHeight","maxHeight","requestAnimationFrame","contentZIndex","setContentZIndex","zIndex","handleScrollButtonChange","$cc7e05a45900e73f$var$SelectViewportProvider","onScrollButtonChange","div","boxSizing","$cc7e05a45900e73f$var$POPPER_POSITION_NAME","$01b9c$Content","$cc7e05a45900e73f$var$useSelectViewportContext","$cc7e05a45900e73f$var$VIEWPORT_NAME","$cc7e05a45900e73f$export$9ed6e7b40248d36d","viewportProps","viewportContext","prevScrollTopRef","$01b9c$Fragment","dangerouslySetInnerHTML","__html","flex","overflow","onScroll","scrolledBy","cssMinHeight","parseFloat","cssHeight","prevHeight","nextHeight","clampedNextHeight","heightDiff","justifyContent","$cc7e05a45900e73f$var$GROUP_NAME","$cc7e05a45900e73f$var$SelectGroupContextProvider","$cc7e05a45900e73f$var$useSelectGroupContext","$cc7e05a45900e73f$export$ee25a334c55de1f4","groupProps","groupId","$cc7e05a45900e73f$var$LABEL_NAME","$cc7e05a45900e73f$export$f67338d29bd972f8","labelProps","groupContext","$cc7e05a45900e73f$var$ITEM_NAME","$cc7e05a45900e73f$var$SelectItemContextProvider","$cc7e05a45900e73f$var$useSelectItemContext","$cc7e05a45900e73f$export$13ef48a934230896","textValue","textValueProp","itemProps","isSelected","setTextValue","isFocused","setIsFocused","_contentContext$itemR","call","textId","handleSelect","onItemTextChange","prevTextValue","_node$textContent","textContent","trim","ItemSlot","onFocus","onBlur","onPointerUp","onPointerMove","_contentContext$onIte","onPointerLeave","_contentContext$onIte2","_contentContext$searc","$cc7e05a45900e73f$var$ITEM_TEXT_NAME","$cc7e05a45900e73f$export$3572fb0fb821ff49","itemTextProps","itemContext","nativeOptionsContext","itemTextNode","setItemTextNode","_contentContext$itemT","nativeOption","$01b9c$useMemo","$cc7e05a45900e73f$var$ITEM_INDICATOR_NAME","$cc7e05a45900e73f$export$6b9198de19accfe6","itemIndicatorProps","$cc7e05a45900e73f$var$SCROLL_UP_BUTTON_NAME","$cc7e05a45900e73f$export$d8117927658af6d7","canScrollUp1","setCanScrollUp","handleScroll","canScrollUp","$cc7e05a45900e73f$var$SelectScrollButtonImpl","onAutoScroll","$cc7e05a45900e73f$var$SCROLL_DOWN_BUTTON_NAME","$cc7e05a45900e73f$export$ff951e476c12189","canScrollDown1","setCanScrollDown","maxScroll","canScrollDown","ceil","scrollIndicatorProps","autoScrollTimerRef","clearAutoScrollTimer","clearInterval","_activeItem$ref$curre","activeItem","flexShrink","setInterval","_contentContext$onIte3","$cc7e05a45900e73f$var$SEPARATOR_NAME","$cc7e05a45900e73f$export$eba4b1df07cb1d3","separatorProps","$cc7e05a45900e73f$var$ARROW_NAME","$cc7e05a45900e73f$export$314f4cb8f8099628","arrowProps","$01b9c$Arrow","selectProps","prevValue","$01b9c$usePrevious","select","selectProto","HTMLSelectElement","prototype","descriptor","getOwnPropertyDescriptor","set","Event","bubbles","dispatchEvent","$01b9c$VisuallyHidden","useTypeaheadSearch","onSearchChange","handleSearchChange","$01b9c$useCallbackRef","timerRef","updateSearch","clearTimeout","findNextItem","isRepeated","every","char","normalizedSearch","currentItemIndex","wrappedItems","$cc7e05a45900e73f$var$wrapArray","excludeCurrentItem","v","toLowerCase","startsWith","wrapArray","array","startIndex","_","index","$cc7e05a45900e73f$export$be92b6f5f03c0fe9","$cc7e05a45900e73f$export$41fb9f06171c75f4","$cc7e05a45900e73f$export$4c8d1a57a761ef94","$cc7e05a45900e73f$export$f04a61298a47a40f","$cc7e05a45900e73f$export$602eac185826482c","$cc7e05a45900e73f$export$7c6e2c02157bb7d2","$cc7e05a45900e73f$export$d5c6c08dc2d3ca7","$cc7e05a45900e73f$export$eb2fcfdbd7ba97d4","$cc7e05a45900e73f$export$b04be29aa201d4f5","$cc7e05a45900e73f$export$6d08773d2e66f8f2","$cc7e05a45900e73f$export$d6e5bf9c43ea9319","$cc7e05a45900e73f$export$c3468e2714d175fa","$cc7e05a45900e73f$export$2f60d3ec9ad468f2","$cc7e05a45900e73f$export$bf1aedc3039c8d63","$cc7e05a45900e73f$export$1ff3c3f08ae963c0","$cc7e05a45900e73f$export$21b07c8f274aebd5"],"sources":["C:\\Users\\user\\Desktop\\05portreact\\node_modules\\@radix-ui\\react-select\\dist\\packages\\react\\select\\src\\index.ts","C:\\Users\\user\\Desktop\\05portreact\\node_modules\\@radix-ui\\react-select\\dist\\packages\\react\\select\\src\\Select.tsx"],"sourcesContent":["export {\n  createSelectScope,\n  //\n  Select,\n  SelectTrigger,\n  SelectValue,\n  SelectIcon,\n  SelectPortal,\n  SelectContent,\n  SelectViewport,\n  SelectGroup,\n  SelectLabel,\n  SelectItem,\n  SelectItemText,\n  SelectItemIndicator,\n  SelectScrollUpButton,\n  SelectScrollDownButton,\n  SelectSeparator,\n  SelectArrow,\n  //\n  Root,\n  Trigger,\n  Value,\n  Icon,\n  Portal,\n  Content,\n  Viewport,\n  Group,\n  Label,\n  Item,\n  ItemText,\n  ItemIndicator,\n  ScrollUpButton,\n  ScrollDownButton,\n  Separator,\n  Arrow,\n} from './Select';\nexport type {\n  SelectProps,\n  SelectTriggerProps,\n  SelectValueProps,\n  SelectIconProps,\n  SelectPortalProps,\n  SelectContentProps,\n  SelectViewportProps,\n  SelectGroupProps,\n  SelectLabelProps,\n  SelectItemProps,\n  SelectItemTextProps,\n  SelectItemIndicatorProps,\n  SelectScrollUpButtonProps,\n  SelectScrollDownButtonProps,\n  SelectSeparatorProps,\n  SelectArrowProps,\n} from './Select';\n","import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { clamp } from '@radix-ui/number';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createCollection } from '@radix-ui/react-collection';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useDirection } from '@radix-ui/react-direction';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\nimport { useFocusGuards } from '@radix-ui/react-focus-guards';\nimport { FocusScope } from '@radix-ui/react-focus-scope';\nimport { useId } from '@radix-ui/react-id';\nimport * as PopperPrimitive from '@radix-ui/react-popper';\nimport { createPopperScope } from '@radix-ui/react-popper';\nimport { Portal as PortalPrimitive } from '@radix-ui/react-portal';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\nimport { usePrevious } from '@radix-ui/react-use-previous';\nimport { VisuallyHidden } from '@radix-ui/react-visually-hidden';\nimport { hideOthers } from 'aria-hidden';\nimport { RemoveScroll } from 'react-remove-scroll';\n\nimport type * as Radix from '@radix-ui/react-primitive';\nimport type { Scope } from '@radix-ui/react-context';\n\ntype Direction = 'ltr' | 'rtl';\n\nconst OPEN_KEYS = [' ', 'Enter', 'ArrowUp', 'ArrowDown'];\nconst SELECTION_KEYS = [' ', 'Enter'];\n\n/* -------------------------------------------------------------------------------------------------\n * Select\n * -----------------------------------------------------------------------------------------------*/\n\nconst SELECT_NAME = 'Select';\n\ntype ItemData = { value: string; disabled: boolean; textValue: string };\nconst [Collection, useCollection, createCollectionScope] = createCollection<\n  SelectItemElement,\n  ItemData\n>(SELECT_NAME);\n\ntype ScopedProps<P> = P & { __scopeSelect?: Scope };\nconst [createSelectContext, createSelectScope] = createContextScope(SELECT_NAME, [\n  createCollectionScope,\n  createPopperScope,\n]);\nconst usePopperScope = createPopperScope();\n\ntype SelectContextValue = {\n  trigger: SelectTriggerElement | null;\n  onTriggerChange(node: SelectTriggerElement | null): void;\n  valueNode: SelectValueElement | null;\n  onValueNodeChange(node: SelectValueElement): void;\n  valueNodeHasChildren: boolean;\n  onValueNodeHasChildrenChange(hasChildren: boolean): void;\n  contentId: string;\n  value?: string;\n  onValueChange(value: string): void;\n  open: boolean;\n  required?: boolean;\n  onOpenChange(open: boolean): void;\n  dir: SelectProps['dir'];\n  triggerPointerDownPosRef: React.MutableRefObject<{ x: number; y: number } | null>;\n  disabled?: boolean;\n};\n\nconst [SelectProvider, useSelectContext] = createSelectContext<SelectContextValue>(SELECT_NAME);\n\ntype NativeOption = React.ReactElement<React.ComponentProps<'option'>>;\n\ntype SelectNativeOptionsContextValue = {\n  onNativeOptionAdd(option: NativeOption): void;\n  onNativeOptionRemove(option: NativeOption): void;\n};\nconst [SelectNativeOptionsProvider, useSelectNativeOptionsContext] =\n  createSelectContext<SelectNativeOptionsContextValue>(SELECT_NAME);\n\ninterface SelectProps {\n  children?: React.ReactNode;\n  value?: string;\n  defaultValue?: string;\n  onValueChange?(value: string): void;\n  open?: boolean;\n  defaultOpen?: boolean;\n  onOpenChange?(open: boolean): void;\n  dir?: Direction;\n  name?: string;\n  autoComplete?: string;\n  disabled?: boolean;\n  required?: boolean;\n}\n\nconst Select: React.FC<SelectProps> = (props: ScopedProps<SelectProps>) => {\n  const {\n    __scopeSelect,\n    children,\n    open: openProp,\n    defaultOpen,\n    onOpenChange,\n    value: valueProp,\n    defaultValue,\n    onValueChange,\n    dir,\n    name,\n    autoComplete,\n    disabled,\n    required,\n  } = props;\n  const popperScope = usePopperScope(__scopeSelect);\n  const [trigger, setTrigger] = React.useState<SelectTriggerElement | null>(null);\n  const [valueNode, setValueNode] = React.useState<SelectValueElement | null>(null);\n  const [valueNodeHasChildren, setValueNodeHasChildren] = React.useState(false);\n  const direction = useDirection(dir);\n  const [open = false, setOpen] = useControllableState({\n    prop: openProp,\n    defaultProp: defaultOpen,\n    onChange: onOpenChange,\n  });\n  const [value, setValue] = useControllableState({\n    prop: valueProp,\n    defaultProp: defaultValue,\n    onChange: onValueChange,\n  });\n  const triggerPointerDownPosRef = React.useRef<{ x: number; y: number } | null>(null);\n\n  // We set this to true by default so that events bubble to forms without JS (SSR)\n  const isFormControl = trigger ? Boolean(trigger.closest('form')) : true;\n  const [nativeOptionsSet, setNativeOptionsSet] = React.useState(new Set<NativeOption>());\n\n  // The native `select` only associates the correct default value if the corresponding\n  // `option` is rendered as a child **at the same time** as itself.\n  // Because it might take a few renders for our items to gather the information to build\n  // the native `option`(s), we generate a key on the `select` to make sure React re-builds it\n  // each time the options change.\n  const nativeSelectKey = Array.from(nativeOptionsSet)\n    .map((option) => option.props.value)\n    .join(';');\n\n  return (\n    <PopperPrimitive.Root {...popperScope}>\n      <SelectProvider\n        required={required}\n        scope={__scopeSelect}\n        trigger={trigger}\n        onTriggerChange={setTrigger}\n        valueNode={valueNode}\n        onValueNodeChange={setValueNode}\n        valueNodeHasChildren={valueNodeHasChildren}\n        onValueNodeHasChildrenChange={setValueNodeHasChildren}\n        contentId={useId()}\n        value={value}\n        onValueChange={setValue}\n        open={open}\n        onOpenChange={setOpen}\n        dir={direction}\n        triggerPointerDownPosRef={triggerPointerDownPosRef}\n        disabled={disabled}\n      >\n        <Collection.Provider scope={__scopeSelect}>\n          <SelectNativeOptionsProvider\n            scope={props.__scopeSelect}\n            onNativeOptionAdd={React.useCallback((option) => {\n              setNativeOptionsSet((prev) => new Set(prev).add(option));\n            }, [])}\n            onNativeOptionRemove={React.useCallback((option) => {\n              setNativeOptionsSet((prev) => {\n                const optionsSet = new Set(prev);\n                optionsSet.delete(option);\n                return optionsSet;\n              });\n            }, [])}\n          >\n            {children}\n          </SelectNativeOptionsProvider>\n        </Collection.Provider>\n\n        {isFormControl ? (\n          <BubbleSelect\n            key={nativeSelectKey}\n            aria-hidden\n            required={required}\n            tabIndex={-1}\n            name={name}\n            autoComplete={autoComplete}\n            value={value}\n            // enable form autofill\n            onChange={(event) => setValue(event.target.value)}\n            disabled={disabled}\n          >\n            {value === undefined ? <option value=\"\" /> : null}\n            {Array.from(nativeOptionsSet)}\n          </BubbleSelect>\n        ) : null}\n      </SelectProvider>\n    </PopperPrimitive.Root>\n  );\n};\n\nSelect.displayName = SELECT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'SelectTrigger';\n\ntype SelectTriggerElement = React.ElementRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface SelectTriggerProps extends PrimitiveButtonProps {}\n\nconst SelectTrigger = React.forwardRef<SelectTriggerElement, SelectTriggerProps>(\n  (props: ScopedProps<SelectTriggerProps>, forwardedRef) => {\n    const { __scopeSelect, disabled = false, ...triggerProps } = props;\n    const popperScope = usePopperScope(__scopeSelect);\n    const context = useSelectContext(TRIGGER_NAME, __scopeSelect);\n    const isDisabled = context.disabled || disabled;\n    const composedRefs = useComposedRefs(forwardedRef, context.onTriggerChange);\n    const getItems = useCollection(__scopeSelect);\n\n    const [searchRef, handleTypeaheadSearch, resetTypeahead] = useTypeaheadSearch((search) => {\n      const enabledItems = getItems().filter((item) => !item.disabled);\n      const currentItem = enabledItems.find((item) => item.value === context.value);\n      const nextItem = findNextItem(enabledItems, search, currentItem);\n      if (nextItem !== undefined) {\n        context.onValueChange(nextItem.value);\n      }\n    });\n\n    const handleOpen = () => {\n      if (!isDisabled) {\n        context.onOpenChange(true);\n        // reset typeahead when we open\n        resetTypeahead();\n      }\n    };\n\n    return (\n      <PopperPrimitive.Anchor asChild {...popperScope}>\n        <Primitive.button\n          type=\"button\"\n          role=\"combobox\"\n          aria-controls={context.contentId}\n          aria-expanded={context.open}\n          aria-required={context.required}\n          aria-autocomplete=\"none\"\n          dir={context.dir}\n          data-state={context.open ? 'open' : 'closed'}\n          disabled={isDisabled}\n          data-disabled={isDisabled ? '' : undefined}\n          data-placeholder={context.value === undefined ? '' : undefined}\n          {...triggerProps}\n          ref={composedRefs}\n          // Enable compatibility with native label or custom `Label` \"click\" for Safari:\n          onClick={composeEventHandlers(triggerProps.onClick, (event) => {\n            // Whilst browsers generally have no issue focusing the trigger when clicking\n            // on a label, Safari seems to struggle with the fact that there's no `onClick`.\n            // We force `focus` in this case. Note: this doesn't create any other side-effect\n            // because we are preventing default in `onPointerDown` so effectively\n            // this only runs for a label \"click\"\n            event.currentTarget.focus();\n          })}\n          onPointerDown={composeEventHandlers(triggerProps.onPointerDown, (event) => {\n            // prevent implicit pointer capture\n            // https://www.w3.org/TR/pointerevents3/#implicit-pointer-capture\n            const target = event.target as HTMLElement;\n            if (target.hasPointerCapture(event.pointerId)) {\n              target.releasePointerCapture(event.pointerId);\n            }\n\n            // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)\n            // but not when the control key is pressed (avoiding MacOS right click)\n            if (event.button === 0 && event.ctrlKey === false) {\n              handleOpen();\n              context.triggerPointerDownPosRef.current = {\n                x: Math.round(event.pageX),\n                y: Math.round(event.pageY),\n              };\n              // prevent trigger from stealing focus from the active item after opening.\n              event.preventDefault();\n            }\n          })}\n          onKeyDown={composeEventHandlers(triggerProps.onKeyDown, (event) => {\n            const isTypingAhead = searchRef.current !== '';\n            const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n            if (!isModifierKey && event.key.length === 1) handleTypeaheadSearch(event.key);\n            if (isTypingAhead && event.key === ' ') return;\n            if (OPEN_KEYS.includes(event.key)) {\n              handleOpen();\n              event.preventDefault();\n            }\n          })}\n        />\n      </PopperPrimitive.Anchor>\n    );\n  }\n);\n\nSelectTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectValue\n * -----------------------------------------------------------------------------------------------*/\n\nconst VALUE_NAME = 'SelectValue';\n\ntype SelectValueElement = React.ElementRef<typeof Primitive.span>;\ntype PrimitiveSpanProps = Radix.ComponentPropsWithoutRef<typeof Primitive.span>;\ninterface SelectValueProps extends Omit<PrimitiveSpanProps, 'placeholder'> {\n  placeholder?: React.ReactNode;\n}\n\nconst SelectValue = React.forwardRef<SelectValueElement, SelectValueProps>(\n  (props: ScopedProps<SelectValueProps>, forwardedRef) => {\n    // We ignore `className` and `style` as this part shouldn't be styled.\n    const { __scopeSelect, className, style, children, placeholder, ...valueProps } = props;\n    const context = useSelectContext(VALUE_NAME, __scopeSelect);\n    const { onValueNodeHasChildrenChange } = context;\n    const hasChildren = children !== undefined;\n    const composedRefs = useComposedRefs(forwardedRef, context.onValueNodeChange);\n\n    useLayoutEffect(() => {\n      onValueNodeHasChildrenChange(hasChildren);\n    }, [onValueNodeHasChildrenChange, hasChildren]);\n\n    return (\n      <Primitive.span\n        {...valueProps}\n        ref={composedRefs}\n        // we don't want events from the portalled `SelectValue` children to bubble\n        // through the item they came from\n        style={{ pointerEvents: 'none' }}\n      >\n        {context.value === undefined && placeholder !== undefined ? placeholder : children}\n      </Primitive.span>\n    );\n  }\n);\n\nSelectValue.displayName = VALUE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectIcon\n * -----------------------------------------------------------------------------------------------*/\n\nconst ICON_NAME = 'SelectIcon';\n\ntype SelectIconElement = React.ElementRef<typeof Primitive.span>;\ninterface SelectIconProps extends PrimitiveSpanProps {}\n\nconst SelectIcon = React.forwardRef<SelectIconElement, SelectIconProps>(\n  (props: ScopedProps<SelectIconProps>, forwardedRef) => {\n    const { __scopeSelect, children, ...iconProps } = props;\n    return (\n      <Primitive.span aria-hidden {...iconProps} ref={forwardedRef}>\n        {children || '▼'}\n      </Primitive.span>\n    );\n  }\n);\n\nSelectIcon.displayName = ICON_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'SelectPortal';\n\ntype PortalProps = React.ComponentPropsWithoutRef<typeof PortalPrimitive>;\ninterface SelectPortalProps extends Omit<PortalProps, 'asChild'> {\n  children?: React.ReactNode;\n}\n\nconst SelectPortal: React.FC<SelectPortalProps> = (props: ScopedProps<SelectPortalProps>) => {\n  return <PortalPrimitive asChild {...props} />;\n};\n\nSelectPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'SelectContent';\n\ntype SelectContentElement = SelectContentImplElement;\ninterface SelectContentProps extends SelectContentImplProps {}\n\nconst SelectContent = React.forwardRef<SelectContentElement, SelectContentProps>(\n  (props: ScopedProps<SelectContentProps>, forwardedRef) => {\n    const context = useSelectContext(CONTENT_NAME, props.__scopeSelect);\n    const [fragment, setFragment] = React.useState<DocumentFragment>();\n\n    // setting the fragment in `useLayoutEffect` as `DocumentFragment` doesn't exist on the server\n    useLayoutEffect(() => {\n      setFragment(new DocumentFragment());\n    }, []);\n\n    if (!context.open) {\n      const frag = fragment as Element | undefined;\n      return frag\n        ? ReactDOM.createPortal(\n            <SelectContentProvider scope={props.__scopeSelect}>\n              <Collection.Slot scope={props.__scopeSelect}>\n                <div>{props.children}</div>\n              </Collection.Slot>\n            </SelectContentProvider>,\n            frag\n          )\n        : null;\n    }\n\n    return <SelectContentImpl {...props} ref={forwardedRef} />;\n  }\n);\n\nSelectContent.displayName = CONTENT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectContentImpl\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_MARGIN = 10;\n\ntype SelectContentContextValue = {\n  content?: SelectContentElement | null;\n  viewport?: SelectViewportElement | null;\n  onViewportChange?: (node: SelectViewportElement | null) => void;\n  itemRefCallback?: (node: SelectItemElement | null, value: string, disabled: boolean) => void;\n  selectedItem?: SelectItemElement | null;\n  onItemLeave?: () => void;\n  itemTextRefCallback?: (\n    node: SelectItemTextElement | null,\n    value: string,\n    disabled: boolean\n  ) => void;\n  focusSelectedItem?: () => void;\n  selectedItemText?: SelectItemTextElement | null;\n  position?: SelectContentProps['position'];\n  isPositioned?: boolean;\n  searchRef?: React.RefObject<string>;\n};\n\nconst [SelectContentProvider, useSelectContentContext] =\n  createSelectContext<SelectContentContextValue>(CONTENT_NAME);\n\nconst CONTENT_IMPL_NAME = 'SelectContentImpl';\n\ntype SelectContentImplElement = SelectPopperPositionElement | SelectItemAlignedPositionElement;\ntype DismissableLayerProps = React.ComponentPropsWithoutRef<typeof DismissableLayer>;\ntype FocusScopeProps = Radix.ComponentPropsWithoutRef<typeof FocusScope>;\n\ntype SelectPopperPrivateProps = { onPlaced?: PopperContentProps['onPlaced'] };\n\ninterface SelectContentImplProps\n  extends Omit<SelectPopperPositionProps, keyof SelectPopperPrivateProps>,\n    Omit<SelectItemAlignedPositionProps, keyof SelectPopperPrivateProps> {\n  /**\n   * Event handler called when auto-focusing on close.\n   * Can be prevented.\n   */\n  onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];\n  /**\n   * Event handler called when the escape key is down.\n   * Can be prevented.\n   */\n  onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown'];\n  /**\n   * Event handler called when the a `pointerdown` event happens outside of the `DismissableLayer`.\n   * Can be prevented.\n   */\n  onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside'];\n\n  position?: 'item-aligned' | 'popper';\n}\n\nconst SelectContentImpl = React.forwardRef<SelectContentImplElement, SelectContentImplProps>(\n  (props: ScopedProps<SelectContentImplProps>, forwardedRef) => {\n    const {\n      __scopeSelect,\n      position = 'item-aligned',\n      onCloseAutoFocus,\n      onEscapeKeyDown,\n      onPointerDownOutside,\n      //\n      // PopperContent props\n      side,\n      sideOffset,\n      align,\n      alignOffset,\n      arrowPadding,\n      collisionBoundary,\n      collisionPadding,\n      sticky,\n      hideWhenDetached,\n      avoidCollisions,\n      //\n      ...contentProps\n    } = props;\n    const context = useSelectContext(CONTENT_NAME, __scopeSelect);\n    const [content, setContent] = React.useState<SelectContentImplElement | null>(null);\n    const [viewport, setViewport] = React.useState<SelectViewportElement | null>(null);\n    const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));\n    const [selectedItem, setSelectedItem] = React.useState<SelectItemElement | null>(null);\n    const [selectedItemText, setSelectedItemText] = React.useState<SelectItemTextElement | null>(\n      null\n    );\n    const getItems = useCollection(__scopeSelect);\n    const [isPositioned, setIsPositioned] = React.useState(false);\n    const firstValidItemFoundRef = React.useRef(false);\n\n    // aria-hide everything except the content (better supported equivalent to setting aria-modal)\n    React.useEffect(() => {\n      if (content) return hideOthers(content);\n    }, [content]);\n\n    // Make sure the whole tree has focus guards as our `Select` may be\n    // the last element in the DOM (because of the `Portal`)\n    useFocusGuards();\n\n    const focusFirst = React.useCallback(\n      (candidates: Array<HTMLElement | null>) => {\n        const [firstItem, ...restItems] = getItems().map((item) => item.ref.current);\n        const [lastItem] = restItems.slice(-1);\n\n        const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n        for (const candidate of candidates) {\n          // if focus is already where we want to go, we don't want to keep going through the candidates\n          if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n          candidate?.scrollIntoView({ block: 'nearest' });\n          // viewport might have padding so scroll to its edges when focusing first/last items.\n          if (candidate === firstItem && viewport) viewport.scrollTop = 0;\n          if (candidate === lastItem && viewport) viewport.scrollTop = viewport.scrollHeight;\n          candidate?.focus();\n          if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n        }\n      },\n      [getItems, viewport]\n    );\n\n    const focusSelectedItem = React.useCallback(\n      () => focusFirst([selectedItem, content]),\n      [focusFirst, selectedItem, content]\n    );\n\n    // Since this is not dependent on layout, we want to ensure this runs at the same time as\n    // other effects across components. Hence why we don't call `focusSelectedItem` inside `position`.\n    React.useEffect(() => {\n      if (isPositioned) {\n        focusSelectedItem();\n      }\n    }, [isPositioned, focusSelectedItem]);\n\n    // prevent selecting items on `pointerup` in some cases after opening from `pointerdown`\n    // and close on `pointerup` outside.\n    const { onOpenChange, triggerPointerDownPosRef } = context;\n    React.useEffect(() => {\n      if (content) {\n        let pointerMoveDelta = { x: 0, y: 0 };\n\n        const handlePointerMove = (event: PointerEvent) => {\n          pointerMoveDelta = {\n            x: Math.abs(Math.round(event.pageX) - (triggerPointerDownPosRef.current?.x ?? 0)),\n            y: Math.abs(Math.round(event.pageY) - (triggerPointerDownPosRef.current?.y ?? 0)),\n          };\n        };\n        const handlePointerUp = (event: PointerEvent) => {\n          // If the pointer hasn't moved by a certain threshold then we prevent selecting item on `pointerup`.\n          if (pointerMoveDelta.x <= 10 && pointerMoveDelta.y <= 10) {\n            event.preventDefault();\n          } else {\n            // otherwise, if the event was outside the content, close.\n            if (!content.contains(event.target as HTMLElement)) {\n              onOpenChange(false);\n            }\n          }\n          document.removeEventListener('pointermove', handlePointerMove);\n          triggerPointerDownPosRef.current = null;\n        };\n\n        if (triggerPointerDownPosRef.current !== null) {\n          document.addEventListener('pointermove', handlePointerMove);\n          document.addEventListener('pointerup', handlePointerUp, { capture: true, once: true });\n        }\n\n        return () => {\n          document.removeEventListener('pointermove', handlePointerMove);\n          document.removeEventListener('pointerup', handlePointerUp, { capture: true });\n        };\n      }\n    }, [content, onOpenChange, triggerPointerDownPosRef]);\n\n    React.useEffect(() => {\n      const close = () => onOpenChange(false);\n      window.addEventListener('blur', close);\n      window.addEventListener('resize', close);\n      return () => {\n        window.removeEventListener('blur', close);\n        window.removeEventListener('resize', close);\n      };\n    }, [onOpenChange]);\n\n    const [searchRef, handleTypeaheadSearch] = useTypeaheadSearch((search) => {\n      const enabledItems = getItems().filter((item) => !item.disabled);\n      const currentItem = enabledItems.find((item) => item.ref.current === document.activeElement);\n      const nextItem = findNextItem(enabledItems, search, currentItem);\n      if (nextItem) {\n        /**\n         * Imperative focus during keydown is risky so we prevent React's batching updates\n         * to avoid potential bugs. See: https://github.com/facebook/react/issues/20332\n         */\n        setTimeout(() => (nextItem.ref.current as HTMLElement).focus());\n      }\n    });\n\n    const itemRefCallback = React.useCallback(\n      (node: SelectItemElement | null, value: string, disabled: boolean) => {\n        const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;\n        const isSelectedItem = context.value !== undefined && context.value === value;\n        if (isSelectedItem || isFirstValidItem) {\n          setSelectedItem(node);\n          if (isFirstValidItem) firstValidItemFoundRef.current = true;\n        }\n      },\n      [context.value]\n    );\n    const handleItemLeave = React.useCallback(() => content?.focus(), [content]);\n    const itemTextRefCallback = React.useCallback(\n      (node: SelectItemTextElement | null, value: string, disabled: boolean) => {\n        const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;\n        const isSelectedItem = context.value !== undefined && context.value === value;\n        if (isSelectedItem || isFirstValidItem) {\n          setSelectedItemText(node);\n        }\n      },\n      [context.value]\n    );\n\n    const SelectPosition = position === 'popper' ? SelectPopperPosition : SelectItemAlignedPosition;\n\n    // Silently ignore props that are not supported by `SelectItemAlignedPosition`\n    const popperContentProps =\n      SelectPosition === SelectPopperPosition\n        ? {\n            side,\n            sideOffset,\n            align,\n            alignOffset,\n            arrowPadding,\n            collisionBoundary,\n            collisionPadding,\n            sticky,\n            hideWhenDetached,\n            avoidCollisions,\n          }\n        : {};\n\n    return (\n      <SelectContentProvider\n        scope={__scopeSelect}\n        content={content}\n        viewport={viewport}\n        onViewportChange={setViewport}\n        itemRefCallback={itemRefCallback}\n        selectedItem={selectedItem}\n        onItemLeave={handleItemLeave}\n        itemTextRefCallback={itemTextRefCallback}\n        focusSelectedItem={focusSelectedItem}\n        selectedItemText={selectedItemText}\n        position={position}\n        isPositioned={isPositioned}\n        searchRef={searchRef}\n      >\n        <RemoveScroll as={Slot} allowPinchZoom>\n          <FocusScope\n            asChild\n            // we make sure we're not trapping once it's been closed\n            // (closed !== unmounted when animating out)\n            trapped={context.open}\n            onMountAutoFocus={(event) => {\n              // we prevent open autofocus because we manually focus the selected item\n              event.preventDefault();\n            }}\n            onUnmountAutoFocus={composeEventHandlers(onCloseAutoFocus, (event) => {\n              context.trigger?.focus({ preventScroll: true });\n              event.preventDefault();\n            })}\n          >\n            <DismissableLayer\n              asChild\n              disableOutsidePointerEvents\n              onEscapeKeyDown={onEscapeKeyDown}\n              onPointerDownOutside={onPointerDownOutside}\n              // When focus is trapped, a focusout event may still happen.\n              // We make sure we don't trigger our `onDismiss` in such case.\n              onFocusOutside={(event) => event.preventDefault()}\n              onDismiss={() => context.onOpenChange(false)}\n            >\n              <SelectPosition\n                role=\"listbox\"\n                id={context.contentId}\n                data-state={context.open ? 'open' : 'closed'}\n                dir={context.dir}\n                onContextMenu={(event) => event.preventDefault()}\n                {...contentProps}\n                {...popperContentProps}\n                onPlaced={() => setIsPositioned(true)}\n                ref={composedRefs}\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                  ...contentProps.style,\n                }}\n                onKeyDown={composeEventHandlers(contentProps.onKeyDown, (event) => {\n                  const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n\n                  // select should not be navigated using tab key so we prevent it\n                  if (event.key === 'Tab') event.preventDefault();\n\n                  if (!isModifierKey && event.key.length === 1) handleTypeaheadSearch(event.key);\n\n                  if (['ArrowUp', 'ArrowDown', 'Home', 'End'].includes(event.key)) {\n                    const items = getItems().filter((item) => !item.disabled);\n                    let candidateNodes = items.map((item) => item.ref.current!);\n\n                    if (['ArrowUp', 'End'].includes(event.key)) {\n                      candidateNodes = candidateNodes.slice().reverse();\n                    }\n                    if (['ArrowUp', 'ArrowDown'].includes(event.key)) {\n                      const currentElement = event.target as SelectItemElement;\n                      const currentIndex = candidateNodes.indexOf(currentElement);\n                      candidateNodes = candidateNodes.slice(currentIndex + 1);\n                    }\n\n                    /**\n                     * Imperative focus during keydown is risky so we prevent React's batching updates\n                     * to avoid potential bugs. See: https://github.com/facebook/react/issues/20332\n                     */\n                    setTimeout(() => focusFirst(candidateNodes));\n\n                    event.preventDefault();\n                  }\n                })}\n              />\n            </DismissableLayer>\n          </FocusScope>\n        </RemoveScroll>\n      </SelectContentProvider>\n    );\n  }\n);\n\nSelectContentImpl.displayName = CONTENT_IMPL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectItemAlignedPosition\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_ALIGNED_POSITION_NAME = 'SelectItemAlignedPosition';\n\ntype SelectItemAlignedPositionElement = React.ElementRef<typeof Primitive.div>;\ninterface SelectItemAlignedPositionProps extends PrimitiveDivProps, SelectPopperPrivateProps {}\n\nconst SelectItemAlignedPosition = React.forwardRef<\n  SelectItemAlignedPositionElement,\n  SelectItemAlignedPositionProps\n>((props: ScopedProps<SelectItemAlignedPositionProps>, forwardedRef) => {\n  const { __scopeSelect, onPlaced, ...popperProps } = props;\n  const context = useSelectContext(CONTENT_NAME, __scopeSelect);\n  const contentContext = useSelectContentContext(CONTENT_NAME, __scopeSelect);\n  const [contentWrapper, setContentWrapper] = React.useState<HTMLDivElement | null>(null);\n  const [content, setContent] = React.useState<SelectItemAlignedPositionElement | null>(null);\n  const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));\n  const getItems = useCollection(__scopeSelect);\n  const shouldExpandOnScrollRef = React.useRef(false);\n  const shouldRepositionRef = React.useRef(true);\n\n  const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;\n  const position = React.useCallback(() => {\n    if (\n      context.trigger &&\n      context.valueNode &&\n      contentWrapper &&\n      content &&\n      viewport &&\n      selectedItem &&\n      selectedItemText\n    ) {\n      const triggerRect = context.trigger.getBoundingClientRect();\n\n      // -----------------------------------------------------------------------------------------\n      //  Horizontal positioning\n      // -----------------------------------------------------------------------------------------\n      const contentRect = content.getBoundingClientRect();\n      const valueNodeRect = context.valueNode.getBoundingClientRect();\n      const itemTextRect = selectedItemText.getBoundingClientRect();\n\n      if (context.dir !== '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, rightEdge - contentWidth]);\n\n        contentWrapper.style.minWidth = minContentWidth + 'px';\n        contentWrapper.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(right, [CONTENT_MARGIN, leftEdge - contentWidth]);\n\n        contentWrapper.style.minWidth = minContentWidth + 'px';\n        contentWrapper.style.right = clampedRight + 'px';\n      }\n\n      // -----------------------------------------------------------------------------------------\n      // Vertical positioning\n      // -----------------------------------------------------------------------------------------\n      const items = getItems();\n      const availableHeight = window.innerHeight - CONTENT_MARGIN * 2;\n      const itemsHeight = viewport.scrollHeight;\n\n      const contentStyles = window.getComputedStyle(content);\n      const contentBorderTopWidth = parseInt(contentStyles.borderTopWidth, 10);\n      const contentPaddingTop = parseInt(contentStyles.paddingTop, 10);\n      const contentBorderBottomWidth = parseInt(contentStyles.borderBottomWidth, 10);\n      const contentPaddingBottom = parseInt(contentStyles.paddingBottom, 10);\n      const fullContentHeight = contentBorderTopWidth + contentPaddingTop + itemsHeight + contentPaddingBottom + contentBorderBottomWidth; // prettier-ignore\n      const minContentHeight = Math.min(selectedItem.offsetHeight * 5, fullContentHeight);\n\n      const viewportStyles = window.getComputedStyle(viewport);\n      const viewportPaddingTop = parseInt(viewportStyles.paddingTop, 10);\n      const viewportPaddingBottom = parseInt(viewportStyles.paddingBottom, 10);\n\n      const topEdgeToTriggerMiddle = triggerRect.top + triggerRect.height / 2 - CONTENT_MARGIN;\n      const triggerMiddleToBottomEdge = availableHeight - topEdgeToTriggerMiddle;\n\n      const selectedItemHalfHeight = selectedItem.offsetHeight / 2;\n      const itemOffsetMiddle = selectedItem.offsetTop + selectedItemHalfHeight;\n      const contentTopToItemMiddle = contentBorderTopWidth + contentPaddingTop + itemOffsetMiddle;\n      const itemMiddleToContentBottom = fullContentHeight - contentTopToItemMiddle;\n\n      const willAlignWithoutTopOverflow = contentTopToItemMiddle <= topEdgeToTriggerMiddle;\n\n      if (willAlignWithoutTopOverflow) {\n        const isLastItem = selectedItem === items[items.length - 1].ref.current;\n        contentWrapper.style.bottom = 0 + 'px';\n        const viewportOffsetBottom =\n          content.clientHeight - viewport.offsetTop - viewport.offsetHeight;\n        const clampedTriggerMiddleToBottomEdge = Math.max(\n          triggerMiddleToBottomEdge,\n          selectedItemHalfHeight +\n            // viewport might have padding bottom, include it to avoid a scrollable viewport\n            (isLastItem ? viewportPaddingBottom : 0) +\n            viewportOffsetBottom +\n            contentBorderBottomWidth\n        );\n        const height = contentTopToItemMiddle + clampedTriggerMiddleToBottomEdge;\n        contentWrapper.style.height = height + 'px';\n      } else {\n        const isFirstItem = selectedItem === items[0].ref.current;\n        contentWrapper.style.top = 0 + 'px';\n        const clampedTopEdgeToTriggerMiddle = Math.max(\n          topEdgeToTriggerMiddle,\n          contentBorderTopWidth +\n            viewport.offsetTop +\n            // viewport might have padding top, include it to avoid a scrollable viewport\n            (isFirstItem ? viewportPaddingTop : 0) +\n            selectedItemHalfHeight\n        );\n        const height = clampedTopEdgeToTriggerMiddle + itemMiddleToContentBottom;\n        contentWrapper.style.height = height + 'px';\n        viewport.scrollTop = contentTopToItemMiddle - topEdgeToTriggerMiddle + viewport.offsetTop;\n      }\n\n      contentWrapper.style.margin = `${CONTENT_MARGIN}px 0`;\n      contentWrapper.style.minHeight = minContentHeight + 'px';\n      contentWrapper.style.maxHeight = availableHeight + 'px';\n      // -----------------------------------------------------------------------------------------\n\n      onPlaced?.();\n\n      // we don't want the initial scroll position adjustment to trigger \"expand on scroll\"\n      // so we explicitly turn it on only after they've registered.\n      requestAnimationFrame(() => (shouldExpandOnScrollRef.current = true));\n    }\n  }, [\n    getItems,\n    context.trigger,\n    context.valueNode,\n    contentWrapper,\n    content,\n    viewport,\n    selectedItem,\n    selectedItemText,\n    context.dir,\n    onPlaced,\n  ]);\n\n  useLayoutEffect(() => position(), [position]);\n\n  // copy z-index from content to wrapper\n  const [contentZIndex, setContentZIndex] = React.useState<string>();\n  useLayoutEffect(() => {\n    if (content) setContentZIndex(window.getComputedStyle(content).zIndex);\n  }, [content]);\n\n  // When the viewport becomes scrollable at the top, the scroll up button will mount.\n  // Because it is part of the normal flow, it will push down the viewport, thus throwing our\n  // trigger => selectedItem alignment off by the amount the viewport was pushed down.\n  // We wait for this to happen and then re-run the positining logic one more time to account for it.\n  const handleScrollButtonChange = React.useCallback(\n    (node: SelectScrollButtonImplElement | null) => {\n      if (node && shouldRepositionRef.current === true) {\n        position();\n        focusSelectedItem?.();\n        shouldRepositionRef.current = false;\n      }\n    },\n    [position, focusSelectedItem]\n  );\n\n  return (\n    <SelectViewportProvider\n      scope={__scopeSelect}\n      contentWrapper={contentWrapper}\n      shouldExpandOnScrollRef={shouldExpandOnScrollRef}\n      onScrollButtonChange={handleScrollButtonChange}\n    >\n      <div\n        ref={setContentWrapper}\n        style={{\n          display: 'flex',\n          flexDirection: 'column',\n          position: 'fixed',\n          zIndex: contentZIndex,\n        }}\n      >\n        <Primitive.div\n          {...popperProps}\n          ref={composedRefs}\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            ...popperProps.style,\n          }}\n        />\n      </div>\n    </SelectViewportProvider>\n  );\n});\n\nSelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectPopperPosition\n * -----------------------------------------------------------------------------------------------*/\n\nconst POPPER_POSITION_NAME = 'SelectPopperPosition';\n\ntype SelectPopperPositionElement = React.ElementRef<typeof PopperPrimitive.Content>;\ntype PopperContentProps = React.ComponentPropsWithoutRef<typeof PopperPrimitive.Content>;\ninterface SelectPopperPositionProps extends PopperContentProps, SelectPopperPrivateProps {}\n\nconst SelectPopperPosition = React.forwardRef<\n  SelectPopperPositionElement,\n  SelectPopperPositionProps\n>((props: ScopedProps<SelectPopperPositionProps>, forwardedRef) => {\n  const {\n    __scopeSelect,\n    align = 'start',\n    collisionPadding = CONTENT_MARGIN,\n    ...popperProps\n  } = props;\n  const popperScope = usePopperScope(__scopeSelect);\n\n  return (\n    <PopperPrimitive.Content\n      {...popperScope}\n      {...popperProps}\n      ref={forwardedRef}\n      align={align}\n      collisionPadding={collisionPadding}\n      style={{\n        // Ensure border-box for floating-ui calculations\n        boxSizing: 'border-box',\n        ...popperProps.style,\n        // re-namespace exposed content custom properties\n        ...{\n          '--radix-select-content-transform-origin': 'var(--radix-popper-transform-origin)',\n          '--radix-select-content-available-width': 'var(--radix-popper-available-width)',\n          '--radix-select-content-available-height': 'var(--radix-popper-available-height)',\n          '--radix-select-trigger-width': 'var(--radix-popper-anchor-width)',\n          '--radix-select-trigger-height': 'var(--radix-popper-anchor-height)',\n        },\n      }}\n    />\n  );\n});\n\nSelectPopperPosition.displayName = POPPER_POSITION_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectViewport\n * -----------------------------------------------------------------------------------------------*/\n\ntype SelectViewportContextValue = {\n  contentWrapper?: HTMLDivElement | null;\n  shouldExpandOnScrollRef?: React.RefObject<boolean>;\n  onScrollButtonChange?: (node: SelectScrollButtonImplElement | null) => void;\n};\n\nconst [SelectViewportProvider, useSelectViewportContext] =\n  createSelectContext<SelectViewportContextValue>(CONTENT_NAME, {});\n\nconst VIEWPORT_NAME = 'SelectViewport';\n\ntype SelectViewportElement = React.ElementRef<typeof Primitive.div>;\ntype PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface SelectViewportProps extends PrimitiveDivProps {}\n\nconst SelectViewport = React.forwardRef<SelectViewportElement, SelectViewportProps>(\n  (props: ScopedProps<SelectViewportProps>, forwardedRef) => {\n    const { __scopeSelect, ...viewportProps } = props;\n    const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect);\n    const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);\n    const composedRefs = useComposedRefs(forwardedRef, contentContext.onViewportChange);\n    const prevScrollTopRef = React.useRef(0);\n    return (\n      <>\n        {/* Hide scrollbars cross-browser and enable momentum scroll for touch devices */}\n        <style\n          dangerouslySetInnerHTML={{\n            __html: `[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`,\n          }}\n        />\n        <Collection.Slot scope={__scopeSelect}>\n          <Primitive.div\n            data-radix-select-viewport=\"\"\n            role=\"presentation\"\n            {...viewportProps}\n            ref={composedRefs}\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: 'auto',\n              ...viewportProps.style,\n            }}\n            onScroll={composeEventHandlers(viewportProps.onScroll, (event) => {\n              const viewport = event.currentTarget;\n              const { contentWrapper, shouldExpandOnScrollRef } = viewportContext;\n              if (shouldExpandOnScrollRef?.current && contentWrapper) {\n                const scrolledBy = Math.abs(prevScrollTopRef.current - viewport.scrollTop);\n                if (scrolledBy > 0) {\n                  const availableHeight = window.innerHeight - CONTENT_MARGIN * 2;\n                  const cssMinHeight = parseFloat(contentWrapper.style.minHeight);\n                  const cssHeight = parseFloat(contentWrapper.style.height);\n                  const prevHeight = Math.max(cssMinHeight, cssHeight);\n\n                  if (prevHeight < availableHeight) {\n                    const nextHeight = prevHeight + scrolledBy;\n                    const clampedNextHeight = Math.min(availableHeight, nextHeight);\n                    const heightDiff = nextHeight - clampedNextHeight;\n\n                    contentWrapper.style.height = clampedNextHeight + 'px';\n                    if (contentWrapper.style.bottom === '0px') {\n                      viewport.scrollTop = heightDiff > 0 ? heightDiff : 0;\n                      // ensure the content stays pinned to the bottom\n                      contentWrapper.style.justifyContent = 'flex-end';\n                    }\n                  }\n                }\n              }\n              prevScrollTopRef.current = viewport.scrollTop;\n            })}\n          />\n        </Collection.Slot>\n      </>\n    );\n  }\n);\n\nSelectViewport.displayName = VIEWPORT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst GROUP_NAME = 'SelectGroup';\n\ntype SelectGroupContextValue = { id: string };\n\nconst [SelectGroupContextProvider, useSelectGroupContext] =\n  createSelectContext<SelectGroupContextValue>(GROUP_NAME);\n\ntype SelectGroupElement = React.ElementRef<typeof Primitive.div>;\ninterface SelectGroupProps extends PrimitiveDivProps {}\n\nconst SelectGroup = React.forwardRef<SelectGroupElement, SelectGroupProps>(\n  (props: ScopedProps<SelectGroupProps>, forwardedRef) => {\n    const { __scopeSelect, ...groupProps } = props;\n    const groupId = useId();\n    return (\n      <SelectGroupContextProvider scope={__scopeSelect} id={groupId}>\n        <Primitive.div role=\"group\" aria-labelledby={groupId} {...groupProps} ref={forwardedRef} />\n      </SelectGroupContextProvider>\n    );\n  }\n);\n\nSelectGroup.displayName = GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectLabel\n * -----------------------------------------------------------------------------------------------*/\n\nconst LABEL_NAME = 'SelectLabel';\n\ntype SelectLabelElement = React.ElementRef<typeof Primitive.div>;\ninterface SelectLabelProps extends PrimitiveDivProps {}\n\nconst SelectLabel = React.forwardRef<SelectLabelElement, SelectLabelProps>(\n  (props: ScopedProps<SelectLabelProps>, forwardedRef) => {\n    const { __scopeSelect, ...labelProps } = props;\n    const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);\n    return <Primitive.div id={groupContext.id} {...labelProps} ref={forwardedRef} />;\n  }\n);\n\nSelectLabel.displayName = LABEL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'SelectItem';\n\ntype SelectItemContextValue = {\n  value: string;\n  disabled: boolean;\n  textId: string;\n  isSelected: boolean;\n  onItemTextChange(node: SelectItemTextElement | null): void;\n};\n\nconst [SelectItemContextProvider, useSelectItemContext] =\n  createSelectContext<SelectItemContextValue>(ITEM_NAME);\n\ntype SelectItemElement = React.ElementRef<typeof Primitive.div>;\ninterface SelectItemProps extends PrimitiveDivProps {\n  value: string;\n  disabled?: boolean;\n  textValue?: string;\n}\n\nconst SelectItem = React.forwardRef<SelectItemElement, SelectItemProps>(\n  (props: ScopedProps<SelectItemProps>, forwardedRef) => {\n    const {\n      __scopeSelect,\n      value,\n      disabled = false,\n      textValue: textValueProp,\n      ...itemProps\n    } = props;\n    const context = useSelectContext(ITEM_NAME, __scopeSelect);\n    const contentContext = useSelectContentContext(ITEM_NAME, __scopeSelect);\n    const isSelected = context.value === value;\n    const [textValue, setTextValue] = React.useState(textValueProp ?? '');\n    const [isFocused, setIsFocused] = React.useState(false);\n    const composedRefs = useComposedRefs(forwardedRef, (node) =>\n      contentContext.itemRefCallback?.(node, value, disabled)\n    );\n    const textId = useId();\n\n    const handleSelect = () => {\n      if (!disabled) {\n        context.onValueChange(value);\n        context.onOpenChange(false);\n      }\n    };\n\n    return (\n      <SelectItemContextProvider\n        scope={__scopeSelect}\n        value={value}\n        disabled={disabled}\n        textId={textId}\n        isSelected={isSelected}\n        onItemTextChange={React.useCallback((node) => {\n          setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? '').trim());\n        }, [])}\n      >\n        <Collection.ItemSlot\n          scope={__scopeSelect}\n          value={value}\n          disabled={disabled}\n          textValue={textValue}\n        >\n          <Primitive.div\n            role=\"option\"\n            aria-labelledby={textId}\n            data-highlighted={isFocused ? '' : undefined}\n            // `isFocused` caveat fixes stuttering in VoiceOver\n            aria-selected={isSelected && isFocused}\n            data-state={isSelected ? 'checked' : 'unchecked'}\n            aria-disabled={disabled || undefined}\n            data-disabled={disabled ? '' : undefined}\n            tabIndex={disabled ? undefined : -1}\n            {...itemProps}\n            ref={composedRefs}\n            onFocus={composeEventHandlers(itemProps.onFocus, () => setIsFocused(true))}\n            onBlur={composeEventHandlers(itemProps.onBlur, () => setIsFocused(false))}\n            onPointerUp={composeEventHandlers(itemProps.onPointerUp, handleSelect)}\n            onPointerMove={composeEventHandlers(itemProps.onPointerMove, (event) => {\n              if (disabled) {\n                contentContext.onItemLeave?.();\n              } else {\n                // even though safari doesn't support this option, it's acceptable\n                // as it only means it might scroll a few pixels when using the pointer.\n                event.currentTarget.focus({ preventScroll: true });\n              }\n            })}\n            onPointerLeave={composeEventHandlers(itemProps.onPointerLeave, (event) => {\n              if (event.currentTarget === document.activeElement) {\n                contentContext.onItemLeave?.();\n              }\n            })}\n            onKeyDown={composeEventHandlers(itemProps.onKeyDown, (event) => {\n              const isTypingAhead = contentContext.searchRef?.current !== '';\n              if (isTypingAhead && event.key === ' ') return;\n              if (SELECTION_KEYS.includes(event.key)) handleSelect();\n              // prevent page scroll if using the space key to select an item\n              if (event.key === ' ') event.preventDefault();\n            })}\n          />\n        </Collection.ItemSlot>\n      </SelectItemContextProvider>\n    );\n  }\n);\n\nSelectItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectItemText\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_TEXT_NAME = 'SelectItemText';\n\ntype SelectItemTextElement = React.ElementRef<typeof Primitive.span>;\ninterface SelectItemTextProps extends PrimitiveSpanProps {}\n\nconst SelectItemText = React.forwardRef<SelectItemTextElement, SelectItemTextProps>(\n  (props: ScopedProps<SelectItemTextProps>, forwardedRef) => {\n    // We ignore `className` and `style` as this part shouldn't be styled.\n    const { __scopeSelect, className, style, ...itemTextProps } = props;\n    const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect);\n    const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect);\n    const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect);\n    const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect);\n    const [itemTextNode, setItemTextNode] = React.useState<SelectItemTextElement | null>(null);\n    const composedRefs = useComposedRefs(\n      forwardedRef,\n      (node) => setItemTextNode(node),\n      itemContext.onItemTextChange,\n      (node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled)\n    );\n\n    const textContent = itemTextNode?.textContent;\n    const nativeOption = React.useMemo(\n      () => (\n        <option key={itemContext.value} value={itemContext.value} disabled={itemContext.disabled}>\n          {textContent}\n        </option>\n      ),\n      [itemContext.disabled, itemContext.value, textContent]\n    );\n\n    const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;\n    useLayoutEffect(() => {\n      onNativeOptionAdd(nativeOption);\n      return () => onNativeOptionRemove(nativeOption);\n    }, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]);\n\n    return (\n      <>\n        <Primitive.span id={itemContext.textId} {...itemTextProps} ref={composedRefs} />\n\n        {/* Portal the select item text into the trigger value node */}\n        {itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren\n          ? ReactDOM.createPortal(itemTextProps.children, context.valueNode)\n          : null}\n      </>\n    );\n  }\n);\n\nSelectItemText.displayName = ITEM_TEXT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectItemIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_INDICATOR_NAME = 'SelectItemIndicator';\n\ntype SelectItemIndicatorElement = React.ElementRef<typeof Primitive.span>;\ninterface SelectItemIndicatorProps extends PrimitiveSpanProps {}\n\nconst SelectItemIndicator = React.forwardRef<SelectItemIndicatorElement, SelectItemIndicatorProps>(\n  (props: ScopedProps<SelectItemIndicatorProps>, forwardedRef) => {\n    const { __scopeSelect, ...itemIndicatorProps } = props;\n    const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);\n    return itemContext.isSelected ? (\n      <Primitive.span aria-hidden {...itemIndicatorProps} ref={forwardedRef} />\n    ) : null;\n  }\n);\n\nSelectItemIndicator.displayName = ITEM_INDICATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectScrollUpButton\n * -----------------------------------------------------------------------------------------------*/\n\nconst SCROLL_UP_BUTTON_NAME = 'SelectScrollUpButton';\n\ntype SelectScrollUpButtonElement = SelectScrollButtonImplElement;\ninterface SelectScrollUpButtonProps extends Omit<SelectScrollButtonImplProps, 'onAutoScroll'> {}\n\nconst SelectScrollUpButton = React.forwardRef<\n  SelectScrollUpButtonElement,\n  SelectScrollUpButtonProps\n>((props: ScopedProps<SelectScrollUpButtonProps>, forwardedRef) => {\n  const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);\n  const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);\n  const [canScrollUp, setCanScrollUp] = React.useState(false);\n  const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);\n\n  useLayoutEffect(() => {\n    if (contentContext.viewport && contentContext.isPositioned) {\n      const viewport = contentContext.viewport;\n      function handleScroll() {\n        const canScrollUp = viewport.scrollTop > 0;\n        setCanScrollUp(canScrollUp);\n      }\n      handleScroll();\n      viewport.addEventListener('scroll', handleScroll);\n      return () => viewport.removeEventListener('scroll', handleScroll);\n    }\n  }, [contentContext.viewport, contentContext.isPositioned]);\n\n  return canScrollUp ? (\n    <SelectScrollButtonImpl\n      {...props}\n      ref={composedRefs}\n      onAutoScroll={() => {\n        const { viewport, selectedItem } = contentContext;\n        if (viewport && selectedItem) {\n          viewport.scrollTop = viewport.scrollTop - selectedItem.offsetHeight;\n        }\n      }}\n    />\n  ) : null;\n});\n\nSelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectScrollDownButton\n * -----------------------------------------------------------------------------------------------*/\n\nconst SCROLL_DOWN_BUTTON_NAME = 'SelectScrollDownButton';\n\ntype SelectScrollDownButtonElement = SelectScrollButtonImplElement;\ninterface SelectScrollDownButtonProps extends Omit<SelectScrollButtonImplProps, 'onAutoScroll'> {}\n\nconst SelectScrollDownButton = React.forwardRef<\n  SelectScrollDownButtonElement,\n  SelectScrollDownButtonProps\n>((props: ScopedProps<SelectScrollDownButtonProps>, forwardedRef) => {\n  const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);\n  const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);\n  const [canScrollDown, setCanScrollDown] = React.useState(false);\n  const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);\n\n  useLayoutEffect(() => {\n    if (contentContext.viewport && contentContext.isPositioned) {\n      const viewport = contentContext.viewport;\n      function handleScroll() {\n        const maxScroll = viewport.scrollHeight - viewport.clientHeight;\n        // we use Math.ceil here because if the UI is zoomed-in\n        // `scrollTop` is not always reported as an integer\n        const canScrollDown = Math.ceil(viewport.scrollTop) < maxScroll;\n        setCanScrollDown(canScrollDown);\n      }\n      handleScroll();\n      viewport.addEventListener('scroll', handleScroll);\n      return () => viewport.removeEventListener('scroll', handleScroll);\n    }\n  }, [contentContext.viewport, contentContext.isPositioned]);\n\n  return canScrollDown ? (\n    <SelectScrollButtonImpl\n      {...props}\n      ref={composedRefs}\n      onAutoScroll={() => {\n        const { viewport, selectedItem } = contentContext;\n        if (viewport && selectedItem) {\n          viewport.scrollTop = viewport.scrollTop + selectedItem.offsetHeight;\n        }\n      }}\n    />\n  ) : null;\n});\n\nSelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;\n\ntype SelectScrollButtonImplElement = React.ElementRef<typeof Primitive.div>;\ninterface SelectScrollButtonImplProps extends PrimitiveDivProps {\n  onAutoScroll(): void;\n}\n\nconst SelectScrollButtonImpl = React.forwardRef<\n  SelectScrollButtonImplElement,\n  SelectScrollButtonImplProps\n>((props: ScopedProps<SelectScrollButtonImplProps>, forwardedRef) => {\n  const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props;\n  const contentContext = useSelectContentContext('SelectScrollButton', __scopeSelect);\n  const autoScrollTimerRef = React.useRef<number | null>(null);\n  const getItems = useCollection(__scopeSelect);\n\n  const clearAutoScrollTimer = React.useCallback(() => {\n    if (autoScrollTimerRef.current !== null) {\n      window.clearInterval(autoScrollTimerRef.current);\n      autoScrollTimerRef.current = null;\n    }\n  }, []);\n\n  React.useEffect(() => {\n    return () => clearAutoScrollTimer();\n  }, [clearAutoScrollTimer]);\n\n  // When the viewport becomes scrollable on either side, the relevant scroll button will mount.\n  // Because it is part of the normal flow, it will push down (top button) or shrink (bottom button)\n  // the viewport, potentially causing the active item to now be partially out of view.\n  // We re-run the `scrollIntoView` logic to make sure it stays within the viewport.\n  useLayoutEffect(() => {\n    const activeItem = getItems().find((item) => item.ref.current === document.activeElement);\n    activeItem?.ref.current?.scrollIntoView({ block: 'nearest' });\n  }, [getItems]);\n\n  return (\n    <Primitive.div\n      aria-hidden\n      {...scrollIndicatorProps}\n      ref={forwardedRef}\n      style={{ flexShrink: 0, ...scrollIndicatorProps.style }}\n      onPointerDown={composeEventHandlers(scrollIndicatorProps.onPointerDown, () => {\n        if (autoScrollTimerRef.current === null) {\n          autoScrollTimerRef.current = window.setInterval(onAutoScroll, 50);\n        }\n      })}\n      onPointerMove={composeEventHandlers(scrollIndicatorProps.onPointerMove, () => {\n        contentContext.onItemLeave?.();\n        if (autoScrollTimerRef.current === null) {\n          autoScrollTimerRef.current = window.setInterval(onAutoScroll, 50);\n        }\n      })}\n      onPointerLeave={composeEventHandlers(scrollIndicatorProps.onPointerLeave, () => {\n        clearAutoScrollTimer();\n      })}\n    />\n  );\n});\n\n/* -------------------------------------------------------------------------------------------------\n * SelectSeparator\n * -----------------------------------------------------------------------------------------------*/\n\nconst SEPARATOR_NAME = 'SelectSeparator';\n\ntype SelectSeparatorElement = React.ElementRef<typeof Primitive.div>;\ninterface SelectSeparatorProps extends PrimitiveDivProps {}\n\nconst SelectSeparator = React.forwardRef<SelectSeparatorElement, SelectSeparatorProps>(\n  (props: ScopedProps<SelectSeparatorProps>, forwardedRef) => {\n    const { __scopeSelect, ...separatorProps } = props;\n    return <Primitive.div aria-hidden {...separatorProps} ref={forwardedRef} />;\n  }\n);\n\nSelectSeparator.displayName = SEPARATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * SelectArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'SelectArrow';\n\ntype SelectArrowElement = React.ElementRef<typeof PopperPrimitive.Arrow>;\ntype PopperArrowProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Arrow>;\ninterface SelectArrowProps extends PopperArrowProps {}\n\nconst SelectArrow = React.forwardRef<SelectArrowElement, SelectArrowProps>(\n  (props: ScopedProps<SelectArrowProps>, forwardedRef) => {\n    const { __scopeSelect, ...arrowProps } = props;\n    const popperScope = usePopperScope(__scopeSelect);\n    const context = useSelectContext(ARROW_NAME, __scopeSelect);\n    const contentContext = useSelectContentContext(ARROW_NAME, __scopeSelect);\n    return context.open && contentContext.position === 'popper' ? (\n      <PopperPrimitive.Arrow {...popperScope} {...arrowProps} ref={forwardedRef} />\n    ) : null;\n  }\n);\n\nSelectArrow.displayName = ARROW_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst BubbleSelect = React.forwardRef<HTMLSelectElement, React.ComponentPropsWithoutRef<'select'>>(\n  (props, forwardedRef) => {\n    const { value, ...selectProps } = props;\n    const ref = React.useRef<HTMLSelectElement>(null);\n    const composedRefs = useComposedRefs(forwardedRef, ref);\n    const prevValue = usePrevious(value);\n\n    // Bubble value change to parents (e.g form change event)\n    React.useEffect(() => {\n      const select = ref.current!;\n      const selectProto = window.HTMLSelectElement.prototype;\n      const descriptor = Object.getOwnPropertyDescriptor(\n        selectProto,\n        'value'\n      ) as PropertyDescriptor;\n      const setValue = descriptor.set;\n      if (prevValue !== value && setValue) {\n        const event = new Event('change', { bubbles: true });\n        setValue.call(select, value);\n        select.dispatchEvent(event);\n      }\n    }, [prevValue, value]);\n\n    /**\n     * We purposefully use a `select` here to support form autofill as much\n     * as possible.\n     *\n     * We purposefully do not add the `value` attribute here to allow the value\n     * to be set programatically and bubble to any parent form `onChange` event.\n     * Adding the `value` will cause React to consider the programatic\n     * dispatch a duplicate and it will get swallowed.\n     *\n     * We use `VisuallyHidden` rather than `display: \"none\"` because Safari autofill\n     * won't work otherwise.\n     */\n    return (\n      <VisuallyHidden asChild>\n        <select {...selectProps} ref={composedRefs} defaultValue={value} />\n      </VisuallyHidden>\n    );\n  }\n);\n\nBubbleSelect.displayName = 'BubbleSelect';\n\nfunction useTypeaheadSearch(onSearchChange: (search: string) => void) {\n  const handleSearchChange = useCallbackRef(onSearchChange);\n  const searchRef = React.useRef('');\n  const timerRef = React.useRef(0);\n\n  const handleTypeaheadSearch = React.useCallback(\n    (key: string) => {\n      const search = searchRef.current + key;\n      handleSearchChange(search);\n\n      (function updateSearch(value: string) {\n        searchRef.current = value;\n        window.clearTimeout(timerRef.current);\n        // Reset `searchRef` 1 second after it was last updated\n        if (value !== '') timerRef.current = window.setTimeout(() => updateSearch(''), 1000);\n      })(search);\n    },\n    [handleSearchChange]\n  );\n\n  const resetTypeahead = React.useCallback(() => {\n    searchRef.current = '';\n    window.clearTimeout(timerRef.current);\n  }, []);\n\n  React.useEffect(() => {\n    return () => window.clearTimeout(timerRef.current);\n  }, []);\n\n  return [searchRef, handleTypeaheadSearch, resetTypeahead] as const;\n}\n\n/**\n * This is the \"meat\" of the typeahead matching logic. It takes in a list of items,\n * the search and the current item, and returns the next item (or `undefined`).\n *\n * We normalize the search because if a user has repeatedly pressed a character,\n * we want the exact same behavior as if we only had that one character\n * (ie. cycle through items starting with that character)\n *\n * We also reorder the items by wrapping the array around the current item.\n * This is so we always look forward from the current item, and picking the first\n * item will always be the correct one.\n *\n * Finally, if the normalized search is exactly one character, we exclude the\n * current item from the values because otherwise it would be the first to match always\n * and focus would never move. This is as opposed to the regular case, where we\n * don't want focus to move if the current item still matches.\n */\nfunction findNextItem<T extends { textValue: string }>(\n  items: T[],\n  search: string,\n  currentItem?: T\n) {\n  const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);\n  const normalizedSearch = isRepeated ? search[0] : search;\n  const currentItemIndex = currentItem ? items.indexOf(currentItem) : -1;\n  let wrappedItems = wrapArray(items, Math.max(currentItemIndex, 0));\n  const excludeCurrentItem = normalizedSearch.length === 1;\n  if (excludeCurrentItem) wrappedItems = wrappedItems.filter((v) => v !== currentItem);\n  const nextItem = wrappedItems.find((item) =>\n    item.textValue.toLowerCase().startsWith(normalizedSearch.toLowerCase())\n  );\n  return nextItem !== currentItem ? nextItem : undefined;\n}\n\n/**\n * Wraps an array around itself at a given start index\n * Example: `wrapArray(['a', 'b', 'c', 'd'], 2) === ['c', 'd', 'a', 'b']`\n */\nfunction wrapArray<T>(array: T[], startIndex: number) {\n  return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\n\nconst Root = Select;\nconst Trigger = SelectTrigger;\nconst Value = SelectValue;\nconst Icon = SelectIcon;\nconst Portal = SelectPortal;\nconst Content = SelectContent;\nconst Viewport = SelectViewport;\nconst Group = SelectGroup;\nconst Label = SelectLabel;\nconst Item = SelectItem;\nconst ItemText = SelectItemText;\nconst ItemIndicator = SelectItemIndicator;\nconst ScrollUpButton = SelectScrollUpButton;\nconst ScrollDownButton = SelectScrollDownButton;\nconst Separator = SelectSeparator;\nconst Arrow = SelectArrow;\n\nexport {\n  createSelectScope,\n  //\n  Select,\n  SelectTrigger,\n  SelectValue,\n  SelectIcon,\n  SelectPortal,\n  SelectContent,\n  SelectViewport,\n  SelectGroup,\n  SelectLabel,\n  SelectItem,\n  SelectItemText,\n  SelectItemIndicator,\n  SelectScrollUpButton,\n  SelectScrollDownButton,\n  SelectSeparator,\n  SelectArrow,\n  //\n  Root,\n  Trigger,\n  Value,\n  Icon,\n  Portal,\n  Content,\n  Viewport,\n  Group,\n  Label,\n  Item,\n  ItemText,\n  ItemIndicator,\n  ScrollUpButton,\n  ScrollDownButton,\n  Separator,\n  Arrow,\n};\nexport type {\n  SelectProps,\n  SelectTriggerProps,\n  SelectValueProps,\n  SelectIconProps,\n  SelectPortalProps,\n  SelectContentProps,\n  SelectViewportProps,\n  SelectGroupProps,\n  SelectLabelProps,\n  SelectItemProps,\n  SelectItemTextProps,\n  SelectItemIndicatorProps,\n  SelectScrollUpButtonProps,\n  SelectScrollDownButtonProps,\n  SelectSeparatorProps,\n  SelectArrowProps,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AC8BA,MAAMA,+BAAS,GAAG,CAAC,GAAD,EAAM,OAAN,EAAe,SAAf,EAA0B,WAA1B,CAAlB;AACA,MAAMC,oCAAc,GAAG,CAAC,GAAD,EAAM,OAAN,CAAvB;AAEA;;;AAIA,MAAMC,iCAAW,GAAG,QAApB;AAGA,MAAM,CAACC,gCAAD,EAAaC,mCAAb,EAA4BC,2CAA5B,IAAqDC,uBAAgB,CAGzEJ,iCAHyE,CAA3E;AAMA,MAAM,CAACK,yCAAD,EAAsBC,yCAAtB,IAA2CC,yBAAkB,CAACP,iCAAD,EAAc,CAC/EG,2CAD+E,EAE/EK,wBAF+E,CAAd,CAAnE;AAIA,MAAMC,oCAAc,GAAGD,wBAAiB,EAAxC;AAoBA,MAAM,CAACE,oCAAD,EAAiBC,sCAAjB,IAAqCN,yCAAmB,CAAqBL,iCAArB,CAA9D;AAQA,MAAM,CAACY,iDAAD,EAA8BC,mDAA9B,IACJR,yCAAmB,CAAkCL,iCAAlC,CADrB;AAkBA,MAAMc,yCAA6B,GAAIC,KAAD,IAAqC;EACzE,MAAM;mBACJC,aADI;cAEJC,QAFI;IAGJC,IAAI,EAAEC,QAHF;iBAIJ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