{"ast":null,"code":"import _objectSpread from \"C:/Users/user/Desktop/portreact/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";\nimport _createForOfIteratorHelper from \"C:/Users/user/Desktop/portreact/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js\";\nimport _toArray from \"C:/Users/user/Desktop/portreact/node_modules/@babel/runtime/helpers/esm/toArray.js\";\nimport _objectWithoutProperties from \"C:/Users/user/Desktop/portreact/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\";\nimport _slicedToArray from \"C:/Users/user/Desktop/portreact/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";\nvar _excluded = [\"__scopeSelect\", \"disabled\"],\n  _excluded2 = [\"__scopeSelect\", \"className\", \"style\", \"children\", \"placeholder\"],\n  _excluded3 = [\"__scopeSelect\", \"children\"],\n  _excluded4 = [\"__scopeSelect\", \"position\", \"onCloseAutoFocus\", \"onEscapeKeyDown\", \"onPointerDownOutside\", \"side\", \"sideOffset\", \"align\", \"alignOffset\", \"arrowPadding\", \"collisionBoundary\", \"collisionPadding\", \"sticky\", \"hideWhenDetached\", \"avoidCollisions\"],\n  _excluded5 = [\"__scopeSelect\", \"onPlaced\"],\n  _excluded6 = [\"__scopeSelect\", \"align\", \"collisionPadding\"],\n  _excluded7 = [\"__scopeSelect\"],\n  _excluded8 = [\"__scopeSelect\"],\n  _excluded9 = [\"__scopeSelect\"],\n  _excluded10 = [\"__scopeSelect\", \"value\", \"disabled\", \"textValue\"],\n  _excluded11 = [\"__scopeSelect\", \"className\", \"style\"],\n  _excluded12 = [\"__scopeSelect\"],\n  _excluded13 = [\"__scopeSelect\", \"onAutoScroll\"],\n  _excluded14 = [\"__scopeSelect\"],\n  _excluded15 = [\"__scopeSelect\"],\n  _excluded16 = [\"value\"];\nimport $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\";\nvar $cc7e05a45900e73f$var$OPEN_KEYS = [' ', 'Enter', 'ArrowUp', 'ArrowDown'];\nvar $cc7e05a45900e73f$var$SELECTION_KEYS = [' ', 'Enter'];\n/* -------------------------------------------------------------------------------------------------\n * Select\n * -----------------------------------------------------------------------------------------------*/\nvar $cc7e05a45900e73f$var$SELECT_NAME = 'Select';\nvar _$01b9c$createCollect = $01b9c$createCollection($cc7e05a45900e73f$var$SELECT_NAME),\n  _$01b9c$createCollect2 = _slicedToArray(_$01b9c$createCollect, 3),\n  $cc7e05a45900e73f$var$Collection = _$01b9c$createCollect2[0],\n  $cc7e05a45900e73f$var$useCollection = _$01b9c$createCollect2[1],\n  $cc7e05a45900e73f$var$createCollectionScope = _$01b9c$createCollect2[2];\nvar _$01b9c$createContext = $01b9c$createContextScope($cc7e05a45900e73f$var$SELECT_NAME, [$cc7e05a45900e73f$var$createCollectionScope, $01b9c$createPopperScope]),\n  _$01b9c$createContext2 = _slicedToArray(_$01b9c$createContext, 2),\n  $cc7e05a45900e73f$var$createSelectContext = _$01b9c$createContext2[0],\n  $cc7e05a45900e73f$export$286727a75dc039bd = _$01b9c$createContext2[1];\nvar $cc7e05a45900e73f$var$usePopperScope = $01b9c$createPopperScope();\nvar _$cc7e05a45900e73f$va = $cc7e05a45900e73f$var$createSelectContext($cc7e05a45900e73f$var$SELECT_NAME),\n  _$cc7e05a45900e73f$va2 = _slicedToArray(_$cc7e05a45900e73f$va, 2),\n  $cc7e05a45900e73f$var$SelectProvider = _$cc7e05a45900e73f$va2[0],\n  $cc7e05a45900e73f$var$useSelectContext = _$cc7e05a45900e73f$va2[1];\nvar _$cc7e05a45900e73f$va3 = $cc7e05a45900e73f$var$createSelectContext($cc7e05a45900e73f$var$SELECT_NAME),\n  _$cc7e05a45900e73f$va4 = _slicedToArray(_$cc7e05a45900e73f$va3, 2),\n  $cc7e05a45900e73f$var$SelectNativeOptionsProvider = _$cc7e05a45900e73f$va4[0],\n  $cc7e05a45900e73f$var$useSelectNativeOptionsContext = _$cc7e05a45900e73f$va4[1];\nvar $cc7e05a45900e73f$export$ef9b1a59e592288f = function $cc7e05a45900e73f$export$ef9b1a59e592288f(props) {\n  var __scopeSelect = props.__scopeSelect,\n    children = props.children,\n    openProp = props.open,\n    defaultOpen = props.defaultOpen,\n    onOpenChange = props.onOpenChange,\n    valueProp = props.value,\n    defaultValue = props.defaultValue,\n    onValueChange = props.onValueChange,\n    dir = props.dir,\n    name = props.name,\n    autoComplete = props.autoComplete,\n    disabled = props.disabled,\n    required = props.required;\n  var popperScope = $cc7e05a45900e73f$var$usePopperScope(__scopeSelect);\n  var _$01b9c$useState = $01b9c$useState(null),\n    _$01b9c$useState2 = _slicedToArray(_$01b9c$useState, 2),\n    trigger = _$01b9c$useState2[0],\n    setTrigger = _$01b9c$useState2[1];\n  var _$01b9c$useState3 = $01b9c$useState(null),\n    _$01b9c$useState4 = _slicedToArray(_$01b9c$useState3, 2),\n    valueNode = _$01b9c$useState4[0],\n    setValueNode = _$01b9c$useState4[1];\n  var _$01b9c$useState5 = $01b9c$useState(false),\n    _$01b9c$useState6 = _slicedToArray(_$01b9c$useState5, 2),\n    valueNodeHasChildren = _$01b9c$useState6[0],\n    setValueNodeHasChildren = _$01b9c$useState6[1];\n  var direction = $01b9c$useDirection(dir);\n  var _$01b9c$useControllab = $01b9c$useControllableState({\n      prop: openProp,\n      defaultProp: defaultOpen,\n      onChange: onOpenChange\n    }),\n    _$01b9c$useControllab2 = _slicedToArray(_$01b9c$useControllab, 2),\n    _$01b9c$useControllab3 = _$01b9c$useControllab2[0],\n    open = _$01b9c$useControllab3 === void 0 ? false : _$01b9c$useControllab3,\n    setOpen = _$01b9c$useControllab2[1];\n  var _$01b9c$useControllab4 = $01b9c$useControllableState({\n      prop: valueProp,\n      defaultProp: defaultValue,\n      onChange: onValueChange\n    }),\n    _$01b9c$useControllab5 = _slicedToArray(_$01b9c$useControllab4, 2),\n    value = _$01b9c$useControllab5[0],\n    setValue = _$01b9c$useControllab5[1];\n  var triggerPointerDownPosRef = $01b9c$useRef(null); // We set this to true by default so that events bubble to forms without JS (SSR)\n  var isFormControl = trigger ? Boolean(trigger.closest('form')) : true;\n  var _$01b9c$useState7 = $01b9c$useState(new Set()),\n    _$01b9c$useState8 = _slicedToArray(_$01b9c$useState7, 2),\n    nativeOptionsSet = _$01b9c$useState8[0],\n    setNativeOptionsSet = _$01b9c$useState8[1]; // 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  var nativeSelectKey = Array.from(nativeOptionsSet).map(function (option) {\n    return option.props.value;\n  }).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(function (option) {\n      setNativeOptionsSet(function (prev) {\n        return new Set(prev).add(option);\n      });\n    }, []),\n    onNativeOptionRemove: $01b9c$useCallback(function (option) {\n      setNativeOptionsSet(function (prev) {\n        var 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: function onChange(event) {\n      return setValue(event.target.value);\n    },\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 * -----------------------------------------------------------------------------------------------*/\nvar $cc7e05a45900e73f$var$TRIGGER_NAME = 'SelectTrigger';\nvar $cc7e05a45900e73f$export$3ac1e88a1c0b9f1 = /*#__PURE__*/$01b9c$forwardRef(function (props, forwardedRef) {\n  var __scopeSelect = props.__scopeSelect,\n    _props$disabled = props.disabled,\n    disabled = _props$disabled === void 0 ? false : _props$disabled,\n    triggerProps = _objectWithoutProperties(props, _excluded);\n  var popperScope = $cc7e05a45900e73f$var$usePopperScope(__scopeSelect);\n  var context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$TRIGGER_NAME, __scopeSelect);\n  var isDisabled = context.disabled || disabled;\n  var composedRefs = $01b9c$useComposedRefs(forwardedRef, context.onTriggerChange);\n  var getItems = $cc7e05a45900e73f$var$useCollection(__scopeSelect);\n  var _$cc7e05a45900e73f$va5 = $cc7e05a45900e73f$var$useTypeaheadSearch(function (search) {\n      var enabledItems = getItems().filter(function (item) {\n        return !item.disabled;\n      });\n      var currentItem = enabledItems.find(function (item) {\n        return item.value === context.value;\n      });\n      var nextItem = $cc7e05a45900e73f$var$findNextItem(enabledItems, search, currentItem);\n      if (nextItem !== undefined) context.onValueChange(nextItem.value);\n    }),\n    _$cc7e05a45900e73f$va6 = _slicedToArray(_$cc7e05a45900e73f$va5, 3),\n    searchRef = _$cc7e05a45900e73f$va6[0],\n    handleTypeaheadSearch = _$cc7e05a45900e73f$va6[1],\n    resetTypeahead = _$cc7e05a45900e73f$va6[2];\n  var handleOpen = function 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, function (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, function (event) {\n      // prevent implicit pointer capture\n      // https://www.w3.org/TR/pointerevents3/#implicit-pointer-capture\n      var 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, function (event) {\n      var isTypingAhead = searchRef.current !== '';\n      var 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 * -----------------------------------------------------------------------------------------------*/\nvar $cc7e05a45900e73f$var$VALUE_NAME = 'SelectValue';\nvar $cc7e05a45900e73f$export$e288731fd71264f0 = /*#__PURE__*/$01b9c$forwardRef(function (props, forwardedRef) {\n  // We ignore `className` and `style` as this part shouldn't be styled.\n  var __scopeSelect = props.__scopeSelect,\n    className = props.className,\n    style = props.style,\n    children = props.children,\n    placeholder = props.placeholder,\n    valueProps = _objectWithoutProperties(props, _excluded2);\n  var context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$VALUE_NAME, __scopeSelect);\n  var onValueNodeHasChildrenChange = context.onValueNodeHasChildrenChange;\n  var hasChildren = children !== undefined;\n  var composedRefs = $01b9c$useComposedRefs(forwardedRef, context.onValueNodeChange);\n  $01b9c$useLayoutEffect(function () {\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 * -----------------------------------------------------------------------------------------------*/\nvar $cc7e05a45900e73f$var$ICON_NAME = 'SelectIcon';\nvar $cc7e05a45900e73f$export$99b400cabb58c515 = /*#__PURE__*/$01b9c$forwardRef(function (props, forwardedRef) {\n  var __scopeSelect = props.__scopeSelect,\n    children = props.children,\n    iconProps = _objectWithoutProperties(props, _excluded3);\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 * -----------------------------------------------------------------------------------------------*/\nvar $cc7e05a45900e73f$var$PORTAL_NAME = 'SelectPortal';\nvar $cc7e05a45900e73f$export$b2af6c9944296213 = function $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 * -----------------------------------------------------------------------------------------------*/\nvar $cc7e05a45900e73f$var$CONTENT_NAME = 'SelectContent';\nvar $cc7e05a45900e73f$export$c973a4b3cb86a03d = /*#__PURE__*/$01b9c$forwardRef(function (props, forwardedRef) {\n  var context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$CONTENT_NAME, props.__scopeSelect);\n  var _$01b9c$useState9 = $01b9c$useState(),\n    _$01b9c$useState10 = _slicedToArray(_$01b9c$useState9, 2),\n    fragment = _$01b9c$useState10[0],\n    setFragment = _$01b9c$useState10[1]; // setting the fragment in `useLayoutEffect` as `DocumentFragment` doesn't exist on the server\n  $01b9c$useLayoutEffect(function () {\n    setFragment(new DocumentFragment());\n  }, []);\n  if (!context.open) {\n    var 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 * -----------------------------------------------------------------------------------------------*/\nvar $cc7e05a45900e73f$var$CONTENT_MARGIN = 10;\nvar _$cc7e05a45900e73f$va7 = $cc7e05a45900e73f$var$createSelectContext($cc7e05a45900e73f$var$CONTENT_NAME),\n  _$cc7e05a45900e73f$va8 = _slicedToArray(_$cc7e05a45900e73f$va7, 2),\n  $cc7e05a45900e73f$var$SelectContentProvider = _$cc7e05a45900e73f$va8[0],\n  $cc7e05a45900e73f$var$useSelectContentContext = _$cc7e05a45900e73f$va8[1];\nvar $cc7e05a45900e73f$var$CONTENT_IMPL_NAME = 'SelectContentImpl';\nvar $cc7e05a45900e73f$var$SelectContentImpl = /*#__PURE__*/$01b9c$forwardRef(function (props, forwardedRef) {\n  var __scopeSelect = props.__scopeSelect,\n    _props$position = props.position,\n    position = _props$position === void 0 ? 'item-aligned' : _props$position,\n    onCloseAutoFocus = props.onCloseAutoFocus,\n    onEscapeKeyDown = props.onEscapeKeyDown,\n    onPointerDownOutside = props.onPointerDownOutside,\n    //\n    // PopperContent props\n    side = props.side,\n    sideOffset = props.sideOffset,\n    align = props.align,\n    alignOffset = props.alignOffset,\n    arrowPadding = props.arrowPadding,\n    collisionBoundary = props.collisionBoundary,\n    collisionPadding = props.collisionPadding,\n    sticky = props.sticky,\n    hideWhenDetached = props.hideWhenDetached,\n    avoidCollisions = props.avoidCollisions,\n    contentProps = _objectWithoutProperties(props, _excluded4);\n  var context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$CONTENT_NAME, __scopeSelect);\n  var _$01b9c$useState11 = $01b9c$useState(null),\n    _$01b9c$useState12 = _slicedToArray(_$01b9c$useState11, 2),\n    content = _$01b9c$useState12[0],\n    setContent = _$01b9c$useState12[1];\n  var _$01b9c$useState13 = $01b9c$useState(null),\n    _$01b9c$useState14 = _slicedToArray(_$01b9c$useState13, 2),\n    viewport = _$01b9c$useState14[0],\n    setViewport = _$01b9c$useState14[1];\n  var composedRefs = $01b9c$useComposedRefs(forwardedRef, function (node) {\n    return setContent(node);\n  });\n  var _$01b9c$useState15 = $01b9c$useState(null),\n    _$01b9c$useState16 = _slicedToArray(_$01b9c$useState15, 2),\n    selectedItem = _$01b9c$useState16[0],\n    setSelectedItem = _$01b9c$useState16[1];\n  var _$01b9c$useState17 = $01b9c$useState(null),\n    _$01b9c$useState18 = _slicedToArray(_$01b9c$useState17, 2),\n    selectedItemText = _$01b9c$useState18[0],\n    setSelectedItemText = _$01b9c$useState18[1];\n  var getItems = $cc7e05a45900e73f$var$useCollection(__scopeSelect);\n  var _$01b9c$useState19 = $01b9c$useState(false),\n    _$01b9c$useState20 = _slicedToArray(_$01b9c$useState19, 2),\n    isPositioned = _$01b9c$useState20[0],\n    setIsPositioned = _$01b9c$useState20[1];\n  var firstValidItemFoundRef = $01b9c$useRef(false); // aria-hide everything except the content (better supported equivalent to setting aria-modal)\n  $01b9c$useEffect(function () {\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  var focusFirst = $01b9c$useCallback(function (candidates) {\n    var _getItems$map = getItems().map(function (item) {\n        return item.ref.current;\n      }),\n      _getItems$map2 = _toArray(_getItems$map),\n      firstItem = _getItems$map2[0],\n      restItems = _getItems$map2.slice(1);\n    var _restItems$slice = restItems.slice(-1),\n      _restItems$slice2 = _slicedToArray(_restItems$slice, 1),\n      lastItem = _restItems$slice2[0];\n    var PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n    var _iterator = _createForOfIteratorHelper(candidates),\n      _step;\n    try {\n      for (_iterator.s(); !(_step = _iterator.n()).done;) {\n        var candidate = _step.value;\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    } catch (err) {\n      _iterator.e(err);\n    } finally {\n      _iterator.f();\n    }\n  }, [getItems, viewport]);\n  var focusSelectedItem = $01b9c$useCallback(function () {\n    return focusFirst([selectedItem, content]);\n  }, [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(function () {\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  var onOpenChange = context.onOpenChange,\n    triggerPointerDownPosRef = context.triggerPointerDownPosRef;\n  $01b9c$useEffect(function () {\n    if (content) {\n      var pointerMoveDelta = {\n        x: 0,\n        y: 0\n      };\n      var handlePointerMove = function 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      var handlePointerUp = function 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 function () {\n        document.removeEventListener('pointermove', handlePointerMove);\n        document.removeEventListener('pointerup', handlePointerUp, {\n          capture: true\n        });\n      };\n    }\n  }, [content, onOpenChange, triggerPointerDownPosRef]);\n  $01b9c$useEffect(function () {\n    var close = function close() {\n      return onOpenChange(false);\n    };\n    window.addEventListener('blur', close);\n    window.addEventListener('resize', close);\n    return function () {\n      window.removeEventListener('blur', close);\n      window.removeEventListener('resize', close);\n    };\n  }, [onOpenChange]);\n  var _$cc7e05a45900e73f$va9 = $cc7e05a45900e73f$var$useTypeaheadSearch(function (search) {\n      var enabledItems = getItems().filter(function (item) {\n        return !item.disabled;\n      });\n      var currentItem = enabledItems.find(function (item) {\n        return item.ref.current === document.activeElement;\n      });\n      var 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(function () {\n          return nextItem.ref.current.focus();\n        });\n    }),\n    _$cc7e05a45900e73f$va10 = _slicedToArray(_$cc7e05a45900e73f$va9, 2),\n    searchRef = _$cc7e05a45900e73f$va10[0],\n    handleTypeaheadSearch = _$cc7e05a45900e73f$va10[1];\n  var itemRefCallback = $01b9c$useCallback(function (node, value, disabled) {\n    var isFirstValidItem = !firstValidItemFoundRef.current && !disabled;\n    var 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  var handleItemLeave = $01b9c$useCallback(function () {\n    return content === null || content === void 0 ? void 0 : content.focus();\n  }, [content]);\n  var itemTextRefCallback = $01b9c$useCallback(function (node, value, disabled) {\n    var isFirstValidItem = !firstValidItemFoundRef.current && !disabled;\n    var isSelectedItem = context.value !== undefined && context.value === value;\n    if (isSelectedItem || isFirstValidItem) setSelectedItemText(node);\n  }, [context.value]);\n  var SelectPosition = position === 'popper' ? $cc7e05a45900e73f$var$SelectPopperPosition : $cc7e05a45900e73f$var$SelectItemAlignedPosition; // Silently ignore props that are not supported by `SelectItemAlignedPosition`\n  var 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: function onMountAutoFocus(event) {\n      // we prevent open autofocus because we manually focus the selected item\n      event.preventDefault();\n    },\n    onUnmountAutoFocus: $01b9c$composeEventHandlers(onCloseAutoFocus, function (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: function onFocusOutside(event) {\n      return event.preventDefault();\n    },\n    onDismiss: function onDismiss() {\n      return context.onOpenChange(false);\n    }\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: function onContextMenu(event) {\n      return event.preventDefault();\n    }\n  }, contentProps, popperContentProps, {\n    onPlaced: function onPlaced() {\n      return setIsPositioned(true);\n    },\n    ref: composedRefs,\n    style: _objectSpread({\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    onKeyDown: $01b9c$composeEventHandlers(contentProps.onKeyDown, function (event) {\n      var 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        var items = getItems().filter(function (item) {\n          return !item.disabled;\n        });\n        var candidateNodes = items.map(function (item) {\n          return item.ref.current;\n        });\n        if (['ArrowUp', 'End'].includes(event.key)) candidateNodes = candidateNodes.slice().reverse();\n        if (['ArrowUp', 'ArrowDown'].includes(event.key)) {\n          var currentElement = event.target;\n          var 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(function () {\n          return focusFirst(candidateNodes);\n        });\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 * -----------------------------------------------------------------------------------------------*/\nvar $cc7e05a45900e73f$var$ITEM_ALIGNED_POSITION_NAME = 'SelectItemAlignedPosition';\nvar $cc7e05a45900e73f$var$SelectItemAlignedPosition = /*#__PURE__*/$01b9c$forwardRef(function (props, forwardedRef) {\n  var __scopeSelect = props.__scopeSelect,\n    onPlaced = props.onPlaced,\n    popperProps = _objectWithoutProperties(props, _excluded5);\n  var context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$CONTENT_NAME, __scopeSelect);\n  var contentContext = $cc7e05a45900e73f$var$useSelectContentContext($cc7e05a45900e73f$var$CONTENT_NAME, __scopeSelect);\n  var _$01b9c$useState21 = $01b9c$useState(null),\n    _$01b9c$useState22 = _slicedToArray(_$01b9c$useState21, 2),\n    contentWrapper = _$01b9c$useState22[0],\n    setContentWrapper = _$01b9c$useState22[1];\n  var _$01b9c$useState23 = $01b9c$useState(null),\n    _$01b9c$useState24 = _slicedToArray(_$01b9c$useState23, 2),\n    content = _$01b9c$useState24[0],\n    setContent = _$01b9c$useState24[1];\n  var composedRefs = $01b9c$useComposedRefs(forwardedRef, function (node) {\n    return setContent(node);\n  });\n  var getItems = $cc7e05a45900e73f$var$useCollection(__scopeSelect);\n  var shouldExpandOnScrollRef = $01b9c$useRef(false);\n  var shouldRepositionRef = $01b9c$useRef(true);\n  var viewport = contentContext.viewport,\n    selectedItem = contentContext.selectedItem,\n    selectedItemText = contentContext.selectedItemText,\n    focusSelectedItem = contentContext.focusSelectedItem;\n  var position = $01b9c$useCallback(function () {\n    if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {\n      var triggerRect = context.trigger.getBoundingClientRect(); // -----------------------------------------------------------------------------------------\n      //  Horizontal positioning\n      // -----------------------------------------------------------------------------------------\n      var contentRect = content.getBoundingClientRect();\n      var valueNodeRect = context.valueNode.getBoundingClientRect();\n      var itemTextRect = selectedItemText.getBoundingClientRect();\n      if (context.dir !== 'rtl') {\n        var itemTextOffset = itemTextRect.left - contentRect.left;\n        var left = valueNodeRect.left - itemTextOffset;\n        var leftDelta = triggerRect.left - left;\n        var minContentWidth = triggerRect.width + leftDelta;\n        var contentWidth = Math.max(minContentWidth, contentRect.width);\n        var rightEdge = window.innerWidth - $cc7e05a45900e73f$var$CONTENT_MARGIN;\n        var 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        var _itemTextOffset = contentRect.right - itemTextRect.right;\n        var right = window.innerWidth - valueNodeRect.right - _itemTextOffset;\n        var rightDelta = window.innerWidth - triggerRect.right - right;\n        var _minContentWidth = triggerRect.width + rightDelta;\n        var _contentWidth = Math.max(_minContentWidth, contentRect.width);\n        var leftEdge = window.innerWidth - $cc7e05a45900e73f$var$CONTENT_MARGIN;\n        var 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      var items = getItems();\n      var availableHeight = window.innerHeight - $cc7e05a45900e73f$var$CONTENT_MARGIN * 2;\n      var itemsHeight = viewport.scrollHeight;\n      var contentStyles = window.getComputedStyle(content);\n      var contentBorderTopWidth = parseInt(contentStyles.borderTopWidth, 10);\n      var contentPaddingTop = parseInt(contentStyles.paddingTop, 10);\n      var contentBorderBottomWidth = parseInt(contentStyles.borderBottomWidth, 10);\n      var contentPaddingBottom = parseInt(contentStyles.paddingBottom, 10);\n      var fullContentHeight = contentBorderTopWidth + contentPaddingTop + itemsHeight + contentPaddingBottom + contentBorderBottomWidth; // prettier-ignore\n      var minContentHeight = Math.min(selectedItem.offsetHeight * 5, fullContentHeight);\n      var viewportStyles = window.getComputedStyle(viewport);\n      var viewportPaddingTop = parseInt(viewportStyles.paddingTop, 10);\n      var viewportPaddingBottom = parseInt(viewportStyles.paddingBottom, 10);\n      var topEdgeToTriggerMiddle = triggerRect.top + triggerRect.height / 2 - $cc7e05a45900e73f$var$CONTENT_MARGIN;\n      var triggerMiddleToBottomEdge = availableHeight - topEdgeToTriggerMiddle;\n      var selectedItemHalfHeight = selectedItem.offsetHeight / 2;\n      var itemOffsetMiddle = selectedItem.offsetTop + selectedItemHalfHeight;\n      var contentTopToItemMiddle = contentBorderTopWidth + contentPaddingTop + itemOffsetMiddle;\n      var itemMiddleToContentBottom = fullContentHeight - contentTopToItemMiddle;\n      var willAlignWithoutTopOverflow = contentTopToItemMiddle <= topEdgeToTriggerMiddle;\n      if (willAlignWithoutTopOverflow) {\n        var isLastItem = selectedItem === items[items.length - 1].ref.current;\n        contentWrapper.style.bottom = \"0px\";\n        var viewportOffsetBottom = content.clientHeight - viewport.offsetTop - viewport.offsetHeight;\n        var clampedTriggerMiddleToBottomEdge = Math.max(triggerMiddleToBottomEdge, selectedItemHalfHeight + (isLastItem ? viewportPaddingBottom : 0) + viewportOffsetBottom + contentBorderBottomWidth);\n        var height = contentTopToItemMiddle + clampedTriggerMiddleToBottomEdge;\n        contentWrapper.style.height = height + 'px';\n      } else {\n        var isFirstItem = selectedItem === items[0].ref.current;\n        contentWrapper.style.top = \"0px\";\n        var clampedTopEdgeToTriggerMiddle = Math.max(topEdgeToTriggerMiddle, contentBorderTopWidth + viewport.offsetTop + (isFirstItem ? viewportPaddingTop : 0) + selectedItemHalfHeight);\n        var _height = clampedTopEdgeToTriggerMiddle + itemMiddleToContentBottom;\n        contentWrapper.style.height = _height + 'px';\n        viewport.scrollTop = contentTopToItemMiddle - topEdgeToTriggerMiddle + viewport.offsetTop;\n      }\n      contentWrapper.style.margin = \"\".concat($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(function () {\n        return shouldExpandOnScrollRef.current = true;\n      });\n    }\n  }, [getItems, context.trigger, context.valueNode, contentWrapper, content, viewport, selectedItem, selectedItemText, context.dir, onPlaced]);\n  $01b9c$useLayoutEffect(function () {\n    return position();\n  }, [position]); // copy z-index from content to wrapper\n  var _$01b9c$useState25 = $01b9c$useState(),\n    _$01b9c$useState26 = _slicedToArray(_$01b9c$useState25, 2),\n    contentZIndex = _$01b9c$useState26[0],\n    setContentZIndex = _$01b9c$useState26[1];\n  $01b9c$useLayoutEffect(function () {\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  var handleScrollButtonChange = $01b9c$useCallback(function (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: _objectSpread({\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/*#__PURE__*/\nObject.assign($cc7e05a45900e73f$var$SelectItemAlignedPosition, {\n  displayName: $cc7e05a45900e73f$var$ITEM_ALIGNED_POSITION_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * SelectPopperPosition\n * -----------------------------------------------------------------------------------------------*/\nvar $cc7e05a45900e73f$var$POPPER_POSITION_NAME = 'SelectPopperPosition';\nvar $cc7e05a45900e73f$var$SelectPopperPosition = /*#__PURE__*/$01b9c$forwardRef(function (props, forwardedRef) {\n  var __scopeSelect = props.__scopeSelect,\n    _props$align = props.align,\n    align = _props$align === void 0 ? 'start' : _props$align,\n    _props$collisionPaddi = props.collisionPadding,\n    collisionPadding = _props$collisionPaddi === void 0 ? $cc7e05a45900e73f$var$CONTENT_MARGIN : _props$collisionPaddi,\n    popperProps = _objectWithoutProperties(props, _excluded6);\n  var 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: _objectSpread(_objectSpread({\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 * -----------------------------------------------------------------------------------------------*/\nvar _$cc7e05a45900e73f$va11 = $cc7e05a45900e73f$var$createSelectContext($cc7e05a45900e73f$var$CONTENT_NAME, {}),\n  _$cc7e05a45900e73f$va12 = _slicedToArray(_$cc7e05a45900e73f$va11, 2),\n  $cc7e05a45900e73f$var$SelectViewportProvider = _$cc7e05a45900e73f$va12[0],\n  $cc7e05a45900e73f$var$useSelectViewportContext = _$cc7e05a45900e73f$va12[1];\nvar $cc7e05a45900e73f$var$VIEWPORT_NAME = 'SelectViewport';\nvar $cc7e05a45900e73f$export$9ed6e7b40248d36d = /*#__PURE__*/$01b9c$forwardRef(function (props, forwardedRef) {\n  var __scopeSelect = props.__scopeSelect,\n    viewportProps = _objectWithoutProperties(props, _excluded7);\n  var contentContext = $cc7e05a45900e73f$var$useSelectContentContext($cc7e05a45900e73f$var$VIEWPORT_NAME, __scopeSelect);\n  var viewportContext = $cc7e05a45900e73f$var$useSelectViewportContext($cc7e05a45900e73f$var$VIEWPORT_NAME, __scopeSelect);\n  var composedRefs = $01b9c$useComposedRefs(forwardedRef, contentContext.onViewportChange);\n  var 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: _objectSpread({\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    onScroll: $01b9c$composeEventHandlers(viewportProps.onScroll, function (event) {\n      var viewport = event.currentTarget;\n      var contentWrapper = viewportContext.contentWrapper,\n        shouldExpandOnScrollRef = viewportContext.shouldExpandOnScrollRef;\n      if (shouldExpandOnScrollRef !== null && shouldExpandOnScrollRef !== void 0 && shouldExpandOnScrollRef.current && contentWrapper) {\n        var scrolledBy = Math.abs(prevScrollTopRef.current - viewport.scrollTop);\n        if (scrolledBy > 0) {\n          var availableHeight = window.innerHeight - $cc7e05a45900e73f$var$CONTENT_MARGIN * 2;\n          var cssMinHeight = parseFloat(contentWrapper.style.minHeight);\n          var cssHeight = parseFloat(contentWrapper.style.height);\n          var prevHeight = Math.max(cssMinHeight, cssHeight);\n          if (prevHeight < availableHeight) {\n            var nextHeight = prevHeight + scrolledBy;\n            var clampedNextHeight = Math.min(availableHeight, nextHeight);\n            var 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 * -----------------------------------------------------------------------------------------------*/\nvar $cc7e05a45900e73f$var$GROUP_NAME = 'SelectGroup';\nvar _$cc7e05a45900e73f$va13 = $cc7e05a45900e73f$var$createSelectContext($cc7e05a45900e73f$var$GROUP_NAME),\n  _$cc7e05a45900e73f$va14 = _slicedToArray(_$cc7e05a45900e73f$va13, 2),\n  $cc7e05a45900e73f$var$SelectGroupContextProvider = _$cc7e05a45900e73f$va14[0],\n  $cc7e05a45900e73f$var$useSelectGroupContext = _$cc7e05a45900e73f$va14[1];\nvar $cc7e05a45900e73f$export$ee25a334c55de1f4 = /*#__PURE__*/$01b9c$forwardRef(function (props, forwardedRef) {\n  var __scopeSelect = props.__scopeSelect,\n    groupProps = _objectWithoutProperties(props, _excluded8);\n  var 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 * -----------------------------------------------------------------------------------------------*/\nvar $cc7e05a45900e73f$var$LABEL_NAME = 'SelectLabel';\nvar $cc7e05a45900e73f$export$f67338d29bd972f8 = /*#__PURE__*/$01b9c$forwardRef(function (props, forwardedRef) {\n  var __scopeSelect = props.__scopeSelect,\n    labelProps = _objectWithoutProperties(props, _excluded9);\n  var 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 * -----------------------------------------------------------------------------------------------*/\nvar $cc7e05a45900e73f$var$ITEM_NAME = 'SelectItem';\nvar _$cc7e05a45900e73f$va15 = $cc7e05a45900e73f$var$createSelectContext($cc7e05a45900e73f$var$ITEM_NAME),\n  _$cc7e05a45900e73f$va16 = _slicedToArray(_$cc7e05a45900e73f$va15, 2),\n  $cc7e05a45900e73f$var$SelectItemContextProvider = _$cc7e05a45900e73f$va16[0],\n  $cc7e05a45900e73f$var$useSelectItemContext = _$cc7e05a45900e73f$va16[1];\nvar $cc7e05a45900e73f$export$13ef48a934230896 = /*#__PURE__*/$01b9c$forwardRef(function (props, forwardedRef) {\n  var __scopeSelect = props.__scopeSelect,\n    value = props.value,\n    _props$disabled2 = props.disabled,\n    disabled = _props$disabled2 === void 0 ? false : _props$disabled2,\n    textValueProp = props.textValue,\n    itemProps = _objectWithoutProperties(props, _excluded10);\n  var context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$ITEM_NAME, __scopeSelect);\n  var contentContext = $cc7e05a45900e73f$var$useSelectContentContext($cc7e05a45900e73f$var$ITEM_NAME, __scopeSelect);\n  var isSelected = context.value === value;\n  var _$01b9c$useState27 = $01b9c$useState(textValueProp !== null && textValueProp !== void 0 ? textValueProp : ''),\n    _$01b9c$useState28 = _slicedToArray(_$01b9c$useState27, 2),\n    textValue = _$01b9c$useState28[0],\n    setTextValue = _$01b9c$useState28[1];\n  var _$01b9c$useState29 = $01b9c$useState(false),\n    _$01b9c$useState30 = _slicedToArray(_$01b9c$useState29, 2),\n    isFocused = _$01b9c$useState30[0],\n    setIsFocused = _$01b9c$useState30[1];\n  var composedRefs = $01b9c$useComposedRefs(forwardedRef, function (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  var textId = $01b9c$useId();\n  var handleSelect = function 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(function (node) {\n      setTextValue(function (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, function () {\n      return setIsFocused(true);\n    }),\n    onBlur: $01b9c$composeEventHandlers(itemProps.onBlur, function () {\n      return setIsFocused(false);\n    }),\n    onPointerUp: $01b9c$composeEventHandlers(itemProps.onPointerUp, handleSelect),\n    onPointerMove: $01b9c$composeEventHandlers(itemProps.onPointerMove, function (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, function (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, function (event) {\n      var _contentContext$searc;\n      var 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 * -----------------------------------------------------------------------------------------------*/\nvar $cc7e05a45900e73f$var$ITEM_TEXT_NAME = 'SelectItemText';\nvar $cc7e05a45900e73f$export$3572fb0fb821ff49 = /*#__PURE__*/$01b9c$forwardRef(function (props, forwardedRef) {\n  // We ignore `className` and `style` as this part shouldn't be styled.\n  var __scopeSelect = props.__scopeSelect,\n    className = props.className,\n    style = props.style,\n    itemTextProps = _objectWithoutProperties(props, _excluded11);\n  var context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$ITEM_TEXT_NAME, __scopeSelect);\n  var contentContext = $cc7e05a45900e73f$var$useSelectContentContext($cc7e05a45900e73f$var$ITEM_TEXT_NAME, __scopeSelect);\n  var itemContext = $cc7e05a45900e73f$var$useSelectItemContext($cc7e05a45900e73f$var$ITEM_TEXT_NAME, __scopeSelect);\n  var nativeOptionsContext = $cc7e05a45900e73f$var$useSelectNativeOptionsContext($cc7e05a45900e73f$var$ITEM_TEXT_NAME, __scopeSelect);\n  var _$01b9c$useState31 = $01b9c$useState(null),\n    _$01b9c$useState32 = _slicedToArray(_$01b9c$useState31, 2),\n    itemTextNode = _$01b9c$useState32[0],\n    setItemTextNode = _$01b9c$useState32[1];\n  var composedRefs = $01b9c$useComposedRefs(forwardedRef, function (node) {\n    return setItemTextNode(node);\n  }, itemContext.onItemTextChange, function (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  var textContent = itemTextNode === null || itemTextNode === void 0 ? void 0 : itemTextNode.textContent;\n  var nativeOption = $01b9c$useMemo(function () {\n    return /*#__PURE__*/$01b9c$createElement(\"option\", {\n      key: itemContext.value,\n      value: itemContext.value,\n      disabled: itemContext.disabled\n    }, textContent);\n  }, [itemContext.disabled, itemContext.value, textContent]);\n  var onNativeOptionAdd = nativeOptionsContext.onNativeOptionAdd,\n    onNativeOptionRemove = nativeOptionsContext.onNativeOptionRemove;\n  $01b9c$useLayoutEffect(function () {\n    onNativeOptionAdd(nativeOption);\n    return function () {\n      return onNativeOptionRemove(nativeOption);\n    };\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 * -----------------------------------------------------------------------------------------------*/\nvar $cc7e05a45900e73f$var$ITEM_INDICATOR_NAME = 'SelectItemIndicator';\nvar $cc7e05a45900e73f$export$6b9198de19accfe6 = /*#__PURE__*/$01b9c$forwardRef(function (props, forwardedRef) {\n  var __scopeSelect = props.__scopeSelect,\n    itemIndicatorProps = _objectWithoutProperties(props, _excluded12);\n  var 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 * -----------------------------------------------------------------------------------------------*/\nvar $cc7e05a45900e73f$var$SCROLL_UP_BUTTON_NAME = 'SelectScrollUpButton';\nvar $cc7e05a45900e73f$export$d8117927658af6d7 = /*#__PURE__*/$01b9c$forwardRef(function (props, forwardedRef) {\n  var contentContext = $cc7e05a45900e73f$var$useSelectContentContext($cc7e05a45900e73f$var$SCROLL_UP_BUTTON_NAME, props.__scopeSelect);\n  var viewportContext = $cc7e05a45900e73f$var$useSelectViewportContext($cc7e05a45900e73f$var$SCROLL_UP_BUTTON_NAME, props.__scopeSelect);\n  var _$01b9c$useState33 = $01b9c$useState(false),\n    _$01b9c$useState34 = _slicedToArray(_$01b9c$useState33, 2),\n    canScrollUp1 = _$01b9c$useState34[0],\n    setCanScrollUp = _$01b9c$useState34[1];\n  var composedRefs = $01b9c$useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);\n  $01b9c$useLayoutEffect(function () {\n    if (contentContext.viewport && contentContext.isPositioned) {\n      var handleScroll = function handleScroll() {\n        var canScrollUp = viewport.scrollTop > 0;\n        setCanScrollUp(canScrollUp);\n      };\n      var viewport = contentContext.viewport;\n      handleScroll();\n      viewport.addEventListener('scroll', handleScroll);\n      return function () {\n        return viewport.removeEventListener('scroll', handleScroll);\n      };\n    }\n  }, [contentContext.viewport, contentContext.isPositioned]);\n  return canScrollUp1 ? /*#__PURE__*/$01b9c$createElement($cc7e05a45900e73f$var$SelectScrollButtonImpl, $01b9c$babelruntimehelpersesmextends({}, props, {\n    ref: composedRefs,\n    onAutoScroll: function onAutoScroll() {\n      var viewport = contentContext.viewport,\n        selectedItem = contentContext.selectedItem;\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 * -----------------------------------------------------------------------------------------------*/\nvar $cc7e05a45900e73f$var$SCROLL_DOWN_BUTTON_NAME = 'SelectScrollDownButton';\nvar $cc7e05a45900e73f$export$ff951e476c12189 = /*#__PURE__*/$01b9c$forwardRef(function (props, forwardedRef) {\n  var contentContext = $cc7e05a45900e73f$var$useSelectContentContext($cc7e05a45900e73f$var$SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);\n  var viewportContext = $cc7e05a45900e73f$var$useSelectViewportContext($cc7e05a45900e73f$var$SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);\n  var _$01b9c$useState35 = $01b9c$useState(false),\n    _$01b9c$useState36 = _slicedToArray(_$01b9c$useState35, 2),\n    canScrollDown1 = _$01b9c$useState36[0],\n    setCanScrollDown = _$01b9c$useState36[1];\n  var composedRefs = $01b9c$useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);\n  $01b9c$useLayoutEffect(function () {\n    if (contentContext.viewport && contentContext.isPositioned) {\n      var handleScroll = function handleScroll() {\n        var 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        var canScrollDown = Math.ceil(viewport.scrollTop) < maxScroll;\n        setCanScrollDown(canScrollDown);\n      };\n      var viewport = contentContext.viewport;\n      handleScroll();\n      viewport.addEventListener('scroll', handleScroll);\n      return function () {\n        return viewport.removeEventListener('scroll', handleScroll);\n      };\n    }\n  }, [contentContext.viewport, contentContext.isPositioned]);\n  return canScrollDown1 ? /*#__PURE__*/$01b9c$createElement($cc7e05a45900e73f$var$SelectScrollButtonImpl, $01b9c$babelruntimehelpersesmextends({}, props, {\n    ref: composedRefs,\n    onAutoScroll: function onAutoScroll() {\n      var viewport = contentContext.viewport,\n        selectedItem = contentContext.selectedItem;\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});\nvar $cc7e05a45900e73f$var$SelectScrollButtonImpl = /*#__PURE__*/$01b9c$forwardRef(function (props, forwardedRef) {\n  var __scopeSelect = props.__scopeSelect,\n    onAutoScroll = props.onAutoScroll,\n    scrollIndicatorProps = _objectWithoutProperties(props, _excluded13);\n  var contentContext = $cc7e05a45900e73f$var$useSelectContentContext('SelectScrollButton', __scopeSelect);\n  var autoScrollTimerRef = $01b9c$useRef(null);\n  var getItems = $cc7e05a45900e73f$var$useCollection(__scopeSelect);\n  var clearAutoScrollTimer = $01b9c$useCallback(function () {\n    if (autoScrollTimerRef.current !== null) {\n      window.clearInterval(autoScrollTimerRef.current);\n      autoScrollTimerRef.current = null;\n    }\n  }, []);\n  $01b9c$useEffect(function () {\n    return function () {\n      return clearAutoScrollTimer();\n    };\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(function () {\n    var _activeItem$ref$curre;\n    var activeItem = getItems().find(function (item) {\n      return item.ref.current === document.activeElement;\n    });\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: _objectSpread({\n      flexShrink: 0\n    }, scrollIndicatorProps.style),\n    onPointerDown: $01b9c$composeEventHandlers(scrollIndicatorProps.onPointerDown, function () {\n      if (autoScrollTimerRef.current === null) autoScrollTimerRef.current = window.setInterval(onAutoScroll, 50);\n    }),\n    onPointerMove: $01b9c$composeEventHandlers(scrollIndicatorProps.onPointerMove, function () {\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, function () {\n      clearAutoScrollTimer();\n    })\n  }));\n});\n/* -------------------------------------------------------------------------------------------------\n * SelectSeparator\n * -----------------------------------------------------------------------------------------------*/\nvar $cc7e05a45900e73f$var$SEPARATOR_NAME = 'SelectSeparator';\nvar $cc7e05a45900e73f$export$eba4b1df07cb1d3 = /*#__PURE__*/$01b9c$forwardRef(function (props, forwardedRef) {\n  var __scopeSelect = props.__scopeSelect,\n    separatorProps = _objectWithoutProperties(props, _excluded14);\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 * -----------------------------------------------------------------------------------------------*/\nvar $cc7e05a45900e73f$var$ARROW_NAME = 'SelectArrow';\nvar $cc7e05a45900e73f$export$314f4cb8f8099628 = /*#__PURE__*/$01b9c$forwardRef(function (props, forwardedRef) {\n  var __scopeSelect = props.__scopeSelect,\n    arrowProps = _objectWithoutProperties(props, _excluded15);\n  var popperScope = $cc7e05a45900e73f$var$usePopperScope(__scopeSelect);\n  var context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$ARROW_NAME, __scopeSelect);\n  var 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/* -----------------------------------------------------------------------------------------------*/\nvar $cc7e05a45900e73f$var$BubbleSelect = /*#__PURE__*/$01b9c$forwardRef(function (props, forwardedRef) {\n  var value = props.value,\n    selectProps = _objectWithoutProperties(props, _excluded16);\n  var ref = $01b9c$useRef(null);\n  var composedRefs = $01b9c$useComposedRefs(forwardedRef, ref);\n  var prevValue = $01b9c$usePrevious(value); // Bubble value change to parents (e.g form change event)\n  $01b9c$useEffect(function () {\n    var select = ref.current;\n    var selectProto = window.HTMLSelectElement.prototype;\n    var descriptor = Object.getOwnPropertyDescriptor(selectProto, 'value');\n    var setValue = descriptor.set;\n    if (prevValue !== value && setValue) {\n      var 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  var handleSearchChange = $01b9c$useCallbackRef(onSearchChange);\n  var searchRef = $01b9c$useRef('');\n  var timerRef = $01b9c$useRef(0);\n  var handleTypeaheadSearch = $01b9c$useCallback(function (key) {\n    var 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(function () {\n        return updateSearch('');\n      }, 1000);\n    })(search);\n  }, [handleSearchChange]);\n  var resetTypeahead = $01b9c$useCallback(function () {\n    searchRef.current = '';\n    window.clearTimeout(timerRef.current);\n  }, []);\n  $01b9c$useEffect(function () {\n    return function () {\n      return window.clearTimeout(timerRef.current);\n    };\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  var isRepeated = search.length > 1 && Array.from(search).every(function (char) {\n    return char === search[0];\n  });\n  var normalizedSearch = isRepeated ? search[0] : search;\n  var currentItemIndex = currentItem ? items.indexOf(currentItem) : -1;\n  var wrappedItems = $cc7e05a45900e73f$var$wrapArray(items, Math.max(currentItemIndex, 0));\n  var excludeCurrentItem = normalizedSearch.length === 1;\n  if (excludeCurrentItem) wrappedItems = wrappedItems.filter(function (v) {\n    return v !== currentItem;\n  });\n  var nextItem = wrappedItems.find(function (item) {\n    return item.textValue.toLowerCase().startsWith(normalizedSearch.toLowerCase());\n  });\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(function (_, index) {\n    return array[(startIndex + index) % array.length];\n  });\n}\nvar $cc7e05a45900e73f$export$be92b6f5f03c0fe9 = $cc7e05a45900e73f$export$ef9b1a59e592288f;\nvar $cc7e05a45900e73f$export$41fb9f06171c75f4 = $cc7e05a45900e73f$export$3ac1e88a1c0b9f1;\nvar $cc7e05a45900e73f$export$4c8d1a57a761ef94 = $cc7e05a45900e73f$export$e288731fd71264f0;\nvar $cc7e05a45900e73f$export$f04a61298a47a40f = $cc7e05a45900e73f$export$99b400cabb58c515;\nvar $cc7e05a45900e73f$export$602eac185826482c = $cc7e05a45900e73f$export$b2af6c9944296213;\nvar $cc7e05a45900e73f$export$7c6e2c02157bb7d2 = $cc7e05a45900e73f$export$c973a4b3cb86a03d;\nvar $cc7e05a45900e73f$export$d5c6c08dc2d3ca7 = $cc7e05a45900e73f$export$9ed6e7b40248d36d;\nvar $cc7e05a45900e73f$export$eb2fcfdbd7ba97d4 = $cc7e05a45900e73f$export$ee25a334c55de1f4;\nvar $cc7e05a45900e73f$export$b04be29aa201d4f5 = $cc7e05a45900e73f$export$f67338d29bd972f8;\nvar $cc7e05a45900e73f$export$6d08773d2e66f8f2 = $cc7e05a45900e73f$export$13ef48a934230896;\nvar $cc7e05a45900e73f$export$d6e5bf9c43ea9319 = $cc7e05a45900e73f$export$3572fb0fb821ff49;\nvar $cc7e05a45900e73f$export$c3468e2714d175fa = $cc7e05a45900e73f$export$6b9198de19accfe6;\nvar $cc7e05a45900e73f$export$2f60d3ec9ad468f2 = $cc7e05a45900e73f$export$d8117927658af6d7;\nvar $cc7e05a45900e73f$export$bf1aedc3039c8d63 = $cc7e05a45900e73f$export$ff951e476c12189;\nvar $cc7e05a45900e73f$export$1ff3c3f08ae963c0 = $cc7e05a45900e73f$export$eba4b1df07cb1d3;\nvar $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","_$01b9c$createCollect","$01b9c$createCollection","_$01b9c$createCollect2","_slicedToArray","$cc7e05a45900e73f$var$Collection","$cc7e05a45900e73f$var$useCollection","$cc7e05a45900e73f$var$createCollectionScope","_$01b9c$createContext","$01b9c$createContextScope","$01b9c$createPopperScope","_$01b9c$createContext2","$cc7e05a45900e73f$var$createSelectContext","$cc7e05a45900e73f$export$286727a75dc039bd","$cc7e05a45900e73f$var$usePopperScope","_$cc7e05a45900e73f$va","_$cc7e05a45900e73f$va2","$cc7e05a45900e73f$var$SelectProvider","$cc7e05a45900e73f$var$useSelectContext","_$cc7e05a45900e73f$va3","_$cc7e05a45900e73f$va4","$cc7e05a45900e73f$var$SelectNativeOptionsProvider","$cc7e05a45900e73f$var$useSelectNativeOptionsContext","$cc7e05a45900e73f$export$ef9b1a59e592288f","Select","props","__scopeSelect","children","openProp","open","defaultOpen","onOpenChange","valueProp","value","defaultValue","onValueChange","dir","name","autoComplete","disabled","required","popperScope","_$01b9c$useState","$01b9c$useState","_$01b9c$useState2","trigger","setTrigger","_$01b9c$useState3","_$01b9c$useState4","valueNode","setValueNode","_$01b9c$useState5","_$01b9c$useState6","valueNodeHasChildren","setValueNodeHasChildren","direction","$01b9c$useDirection","_$01b9c$useControllab","$01b9c$useControllableState","prop","defaultProp","onChange","_$01b9c$useControllab2","_$01b9c$useControllab3","setOpen","_$01b9c$useControllab4","_$01b9c$useControllab5","setValue","triggerPointerDownPosRef","$01b9c$useRef","isFormControl","Boolean","closest","_$01b9c$useState7","Set","_$01b9c$useState8","nativeOptionsSet","setNativeOptionsSet","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","_props$disabled","triggerProps","_objectWithoutProperties","_excluded","context","isDisabled","composedRefs","$01b9c$useComposedRefs","getItems","_$cc7e05a45900e73f$va5","$cc7e05a45900e73f$var$useTypeaheadSearch","search","enabledItems","filter","item","currentItem","find","nextItem","$cc7e05a45900e73f$var$findNextItem","_$cc7e05a45900e73f$va6","searchRef","handleTypeaheadSearch","resetTypeahead","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","_excluded2","hasChildren","$01b9c$useLayoutEffect","span","pointerEvents","$cc7e05a45900e73f$var$ICON_NAME","$cc7e05a45900e73f$export$99b400cabb58c515","iconProps","_excluded3","$cc7e05a45900e73f$var$PORTAL_NAME","$cc7e05a45900e73f$export$b2af6c9944296213","SelectPortal","$01b9c$Portal","$cc7e05a45900e73f$var$CONTENT_NAME","$cc7e05a45900e73f$export$c973a4b3cb86a03d","_$01b9c$useState9","_$01b9c$useState10","fragment","setFragment","DocumentFragment","frag","$01b9c$createPortal","$cc7e05a45900e73f$var$SelectContentProvider","Slot","$cc7e05a45900e73f$var$SelectContentImpl","$cc7e05a45900e73f$var$CONTENT_MARGIN","_$cc7e05a45900e73f$va7","_$cc7e05a45900e73f$va8","$cc7e05a45900e73f$var$useSelectContentContext","$cc7e05a45900e73f$var$CONTENT_IMPL_NAME","position","_props$position","onCloseAutoFocus","onEscapeKeyDown","onPointerDownOutside","side","sideOffset","align","alignOffset","arrowPadding","collisionBoundary","collisionPadding","sticky","hideWhenDetached","avoidCollisions","contentProps","_excluded4","_$01b9c$useState11","_$01b9c$useState12","content","setContent","_$01b9c$useState13","_$01b9c$useState14","viewport","setViewport","node","_$01b9c$useState15","_$01b9c$useState16","selectedItem","setSelectedItem","_$01b9c$useState17","_$01b9c$useState18","selectedItemText","setSelectedItemText","_$01b9c$useState19","_$01b9c$useState20","isPositioned","setIsPositioned","firstValidItemFoundRef","$01b9c$useEffect","$01b9c$hideOthers","$01b9c$useFocusGuards","focusFirst","candidates","_getItems$map","_getItems$map2","_toArray","firstItem","restItems","slice","_restItems$slice","_restItems$slice2","lastItem","PREVIOUSLY_FOCUSED_ELEMENT","document","activeElement","_iterator","_createForOfIteratorHelper","_step","s","n","done","candidate","scrollIntoView","block","scrollTop","scrollHeight","err","e","f","focusSelectedItem","pointerMoveDelta","handlePointerMove","_triggerPointerDownPo","_triggerPointerDownPo2","_triggerPointerDownPo3","_triggerPointerDownPo4","abs","handlePointerUp","contains","removeEventListener","addEventListener","capture","once","close","window","_$cc7e05a45900e73f$va9","setTimeout","_$cc7e05a45900e73f$va10","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","_objectSpread","display","flexDirection","outline","items","candidateNodes","reverse","currentElement","currentIndex","indexOf","$cc7e05a45900e73f$var$ITEM_ALIGNED_POSITION_NAME","popperProps","_excluded5","contentContext","_$01b9c$useState21","_$01b9c$useState22","contentWrapper","setContentWrapper","_$01b9c$useState23","_$01b9c$useState24","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","concat","minHeight","maxHeight","requestAnimationFrame","_$01b9c$useState25","_$01b9c$useState26","contentZIndex","setContentZIndex","zIndex","handleScrollButtonChange","$cc7e05a45900e73f$var$SelectViewportProvider","onScrollButtonChange","div","boxSizing","$cc7e05a45900e73f$var$POPPER_POSITION_NAME","_props$align","_props$collisionPaddi","_excluded6","$01b9c$Content","_$cc7e05a45900e73f$va11","_$cc7e05a45900e73f$va12","$cc7e05a45900e73f$var$useSelectViewportContext","$cc7e05a45900e73f$var$VIEWPORT_NAME","$cc7e05a45900e73f$export$9ed6e7b40248d36d","viewportProps","_excluded7","viewportContext","prevScrollTopRef","$01b9c$Fragment","dangerouslySetInnerHTML","__html","flex","overflow","onScroll","scrolledBy","cssMinHeight","parseFloat","cssHeight","prevHeight","nextHeight","clampedNextHeight","heightDiff","justifyContent","$cc7e05a45900e73f$var$GROUP_NAME","_$cc7e05a45900e73f$va13","_$cc7e05a45900e73f$va14","$cc7e05a45900e73f$var$SelectGroupContextProvider","$cc7e05a45900e73f$var$useSelectGroupContext","$cc7e05a45900e73f$export$ee25a334c55de1f4","groupProps","_excluded8","groupId","$cc7e05a45900e73f$var$LABEL_NAME","$cc7e05a45900e73f$export$f67338d29bd972f8","labelProps","_excluded9","groupContext","$cc7e05a45900e73f$var$ITEM_NAME","_$cc7e05a45900e73f$va15","_$cc7e05a45900e73f$va16","$cc7e05a45900e73f$var$SelectItemContextProvider","$cc7e05a45900e73f$var$useSelectItemContext","$cc7e05a45900e73f$export$13ef48a934230896","_props$disabled2","textValueProp","textValue","itemProps","_excluded10","isSelected","_$01b9c$useState27","_$01b9c$useState28","setTextValue","_$01b9c$useState29","_$01b9c$useState30","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","_excluded11","itemContext","nativeOptionsContext","_$01b9c$useState31","_$01b9c$useState32","itemTextNode","setItemTextNode","_contentContext$itemT","nativeOption","$01b9c$useMemo","$cc7e05a45900e73f$var$ITEM_INDICATOR_NAME","$cc7e05a45900e73f$export$6b9198de19accfe6","itemIndicatorProps","_excluded12","$cc7e05a45900e73f$var$SCROLL_UP_BUTTON_NAME","$cc7e05a45900e73f$export$d8117927658af6d7","_$01b9c$useState33","_$01b9c$useState34","canScrollUp1","setCanScrollUp","handleScroll","canScrollUp","$cc7e05a45900e73f$var$SelectScrollButtonImpl","onAutoScroll","$cc7e05a45900e73f$var$SCROLL_DOWN_BUTTON_NAME","$cc7e05a45900e73f$export$ff951e476c12189","_$01b9c$useState35","_$01b9c$useState36","canScrollDown1","setCanScrollDown","maxScroll","canScrollDown","ceil","scrollIndicatorProps","_excluded13","autoScrollTimerRef","clearAutoScrollTimer","clearInterval","_activeItem$ref$curre","activeItem","flexShrink","setInterval","_contentContext$onIte3","$cc7e05a45900e73f$var$SEPARATOR_NAME","$cc7e05a45900e73f$export$eba4b1df07cb1d3","separatorProps","_excluded14","$cc7e05a45900e73f$var$ARROW_NAME","$cc7e05a45900e73f$export$314f4cb8f8099628","arrowProps","_excluded15","$01b9c$Arrow","selectProps","_excluded16","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\\portreact\\node_modules\\@radix-ui\\react-select\\dist\\packages\\react\\select\\src\\index.ts","C:\\Users\\user\\Desktop\\portreact\\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,IAAMA,+BAAS,GAAG,CAAC,GAAD,EAAM,OAAN,EAAe,SAAf,EAA0B,WAA1B,CAAlB;AACA,IAAMC,oCAAc,GAAG,CAAC,GAAD,EAAM,OAAN,CAAvB;AAEA;;;AAIA,IAAMC,iCAAW,GAAG,QAApB;AAGA,IAAAC,qBAAA,GAA2DC,uBAAgB,CAGzEF,iCAHyE,CAA3E;EAAAG,sBAAA,GAAAC,cAAA,CAAAH,qBAAA;EAAOI,gCAAD,GAAAF,sBAAA;EAAaG,mCAAb,GAAAH,sBAAA;EAA4BI,2CAA5B,GAAAJ,sBAAA;AAMN,IAAAK,qBAAA,GAAiDC,yBAAkB,CAACT,iCAAD,EAAc,CAC/EO,2CAD+E,EAE/EG,wBAF+E,CAAd,CAAnE;EAAAC,sBAAA,GAAAP,cAAA,CAAAI,qBAAA;EAAOI,yCAAD,GAAAD,sBAAA;EAAsBE,yCAAtB,GAAAF,sBAAA;AAIN,IAAMG,oCAAc,GAAGJ,wBAAiB,EAAxC;AAoBA,IAAAK,qBAAA,GAA2CH,yCAAmB,CAAqBZ,iCAArB,CAA9D;EAAAgB,sBAAA,GAAAZ,cAAA,CAAAW,qBAAA;EAAOE,oCAAD,GAAAD,sBAAA;EAAiBE,sCAAjB,GAAAF,sBAAA;AAQN,IAAAG,sBAAA,GACEP,yCAAmB,CAAkCZ,iCAAlC,CADrB;EAAAoB,sBAAA,GAAAhB,cAAA,CAAAe,sBAAA;EAAOE,iDAAD,GAAAD,sBAAA;EAA8BE,mDAA9B,GAAAF,sBAAA;AAkBN,IAAMG,yCAA6B,GAAI,SAAjCA,yCAA6BC,CAAIC,KA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