tfy-web-components 0.0.44 → 0.0.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Button-BdNaawKV.js → Button-HHEfL8b9.js} +5 -4
- package/dist/{Button-BdNaawKV.js.map → Button-HHEfL8b9.js.map} +1 -1
- package/dist/CSPContext-Cldo9QDp.js +13 -0
- package/dist/CSPContext-Cldo9QDp.js.map +1 -0
- package/dist/{CompositeItem-EOSJycCk.js → CompositeItem-ClTKQQ4f.js} +3 -3
- package/dist/{CompositeItem-EOSJycCk.js.map → CompositeItem-ClTKQQ4f.js.map} +1 -1
- package/dist/{CompositeRoot-DnijP7Jm.js → CompositeRoot-CR4V84Em.js} +9 -47
- package/dist/CompositeRoot-CR4V84Em.js.map +1 -0
- package/dist/DropdownMenu-B_tIHJUl.js +3304 -0
- package/dist/DropdownMenu-B_tIHJUl.js.map +1 -0
- package/dist/{Input-D0UuCXLs.js → Input-BS9fWUAf.js} +3 -3
- package/dist/{Input-D0UuCXLs.js.map → Input-BS9fWUAf.js.map} +1 -1
- package/dist/{Modal-BFnf68oS.js → Modal-CJj8wP0E.js} +10 -10
- package/dist/{Modal-BFnf68oS.js.map → Modal-CJj8wP0E.js.map} +1 -1
- package/dist/Popover-DOpJ7QW-.js +400 -0
- package/dist/Popover-DOpJ7QW-.js.map +1 -0
- package/dist/{Popover-B6z7exNd.js → PopoverPopup-Dd6Z5rv7.js} +25 -498
- package/dist/PopoverPopup-Dd6Z5rv7.js.map +1 -0
- package/dist/{PrehydrationScript--08s8Mfl.js → PrehydrationScript-BfRb7l5u.js} +5 -12
- package/dist/PrehydrationScript-BfRb7l5u.js.map +1 -0
- package/dist/Select-OlnvlAXg.js +2187 -0
- package/dist/Select-OlnvlAXg.js.map +1 -0
- package/dist/{useValueAsRef-BfFRcMg6.js → addEventListener-D-i9O6BG.js} +8 -8
- package/dist/addEventListener-D-i9O6BG.js.map +1 -0
- package/dist/clamp-D7_nsB8C.js +30 -0
- package/dist/clamp-D7_nsB8C.js.map +1 -0
- package/dist/components/atoms/Accordion.d.ts +11 -4
- package/dist/components/atoms/Accordion.es.js +115 -59
- package/dist/components/atoms/Accordion.es.js.map +1 -1
- package/dist/components/atoms/Avatar.es.js +9 -9
- package/dist/components/atoms/Avatar.es.js.map +1 -1
- package/dist/components/atoms/Badge.d.ts +5 -6
- package/dist/components/atoms/Badge.es.js +80 -43
- package/dist/components/atoms/Badge.es.js.map +1 -1
- package/dist/components/atoms/Button.d.ts +1 -1
- package/dist/components/atoms/Button.es.js +2 -2
- package/dist/components/atoms/ButtonGroup.es.js +1 -1
- package/dist/components/atoms/Combobox.d.ts +34 -0
- package/dist/components/atoms/Combobox.es.js +3252 -0
- package/dist/components/atoms/Combobox.es.js.map +1 -0
- package/dist/components/atoms/ContextMenu.d.ts +12 -0
- package/dist/components/atoms/ContextMenu.es.js +259 -0
- package/dist/components/atoms/ContextMenu.es.js.map +1 -0
- package/dist/components/atoms/DropdownMenu.d.ts +51 -0
- package/dist/components/atoms/DropdownMenu.es.js +31 -0
- package/dist/components/atoms/DropdownMenu.es.js.map +1 -0
- package/dist/components/atoms/IconButton.d.ts +1 -1
- package/dist/components/atoms/IconButton.es.js +3 -3
- package/dist/components/atoms/IconButton.es.js.map +1 -1
- package/dist/components/atoms/IconProvider.es.js +3 -1
- package/dist/components/atoms/IconProvider.es.js.map +1 -1
- package/dist/components/atoms/Modal.es.js +1 -1
- package/dist/components/atoms/OverflowButton.es.js +2 -2
- package/dist/components/atoms/PaginationDot.d.ts +14 -0
- package/dist/components/atoms/PaginationDot.es.js +58 -0
- package/dist/components/atoms/PaginationDot.es.js.map +1 -0
- package/dist/components/atoms/PaginationItem.d.ts +15 -0
- package/dist/components/atoms/PaginationItem.es.js +87 -0
- package/dist/components/atoms/PaginationItem.es.js.map +1 -0
- package/dist/components/atoms/Popover.d.ts +10 -0
- package/dist/components/atoms/Popover.es.js +50 -0
- package/dist/components/atoms/Popover.es.js.map +1 -0
- package/dist/components/atoms/Select.d.ts +63 -0
- package/dist/components/atoms/Select.es.js +23 -0
- package/dist/components/atoms/Select.es.js.map +1 -0
- package/dist/components/atoms/Switch.es.js +7 -6
- package/dist/components/atoms/Switch.es.js.map +1 -1
- package/dist/components/atoms/TabButton.es.js +14 -12
- package/dist/components/atoms/TabButton.es.js.map +1 -1
- package/dist/components/atoms/Tag.d.ts +2 -2
- package/dist/components/atoms/Tag.es.js +66 -33
- package/dist/components/atoms/Tag.es.js.map +1 -1
- package/dist/components/atoms/Tooltip.es.js +1153 -19
- package/dist/components/atoms/Tooltip.es.js.map +1 -1
- package/dist/components/atoms/stories/OverlayThemePanels.d.ts +8 -0
- package/dist/components/molecules/Alert.es.js +3 -3
- package/dist/components/molecules/CopyField.es.js +2 -2
- package/dist/components/molecules/CustomDrawer.es.js +1 -1
- package/dist/components/molecules/Dialog.es.js +1 -1
- package/dist/components/molecules/ImagesPreview.es.js +2 -2
- package/dist/components/molecules/Input.es.js +2 -2
- package/dist/components/molecules/Markdown.es.js +1 -1
- package/dist/components/molecules/Pagination.d.ts +58 -0
- package/dist/components/molecules/Pagination.es.js +267 -0
- package/dist/components/molecules/Pagination.es.js.map +1 -0
- package/dist/components/molecules/SimpleCodeEditor.es.js +3 -3
- package/dist/components/molecules/SimpleCodeEditor.es.js.map +1 -1
- package/dist/components/molecules/TagGroup.d.ts +11 -0
- package/dist/components/molecules/TagGroup.es.js +59 -0
- package/dist/components/molecules/TagGroup.es.js.map +1 -0
- package/dist/components/molecules/ToggleButton.es.js +2 -2
- package/dist/components/molecules/agent-chat/AssistantMessage.d.ts +3 -1
- package/dist/components/molecules/agent-chat.es.js +4 -3
- package/dist/components/molecules/agent-chat.es.js.map +1 -1
- package/dist/{composite-BDBV1Jsx.js → composite-CH__oBQH.js} +2 -2
- package/dist/{composite-BDBV1Jsx.js.map → composite-CH__oBQH.js.map} +1 -1
- package/dist/composite-Dzn8P1fl.js +551 -0
- package/dist/composite-Dzn8P1fl.js.map +1 -0
- package/dist/constants-BzjgA7aT.js +103 -0
- package/dist/constants-BzjgA7aT.js.map +1 -0
- package/dist/{index-B6xFUIBK.js → element-BI1c88Lp.js} +69 -111
- package/dist/element-BI1c88Lp.js.map +1 -0
- package/dist/error-nCTLdGUr.js +6 -0
- package/dist/{error-FX4R42W-.js.map → error-nCTLdGUr.js.map} +1 -1
- package/dist/index.d.ts +10 -2
- package/dist/index.es.js +61 -11
- package/dist/index.es.js.map +1 -1
- package/dist/{inertValue-IJM5NA30.js → inertValue-C1Ml1s55.js} +2 -2
- package/dist/{inertValue-IJM5NA30.js.map → inertValue-C1Ml1s55.js.map} +1 -1
- package/dist/isElementDisabled-CcmHYLra.js +47 -0
- package/dist/isElementDisabled-CcmHYLra.js.map +1 -0
- package/dist/new-components/atoms/Alert.d.ts +7 -1
- package/dist/new-components/atoms/Alert.es.js +23 -4
- package/dist/new-components/atoms/Alert.es.js.map +1 -1
- package/dist/new-components/atoms/Checkbox.es.js +8 -7
- package/dist/new-components/atoms/Checkbox.es.js.map +1 -1
- package/dist/new-components/atoms/EmptyState.d.ts +3 -0
- package/dist/new-components/atoms/EmptyState.es.js +9 -4
- package/dist/new-components/atoms/EmptyState.es.js.map +1 -1
- package/dist/new-components/atoms/Popover.es.js +3 -2
- package/dist/new-components/atoms/Popover.es.js.map +1 -1
- package/dist/new-components/atoms/Radio.es.js +13 -24
- package/dist/new-components/atoms/Radio.es.js.map +1 -1
- package/dist/new-components/atoms/SegmentedControl.es.js +7 -7
- package/dist/new-components/atoms/Slider.es.js +14 -43
- package/dist/new-components/atoms/Slider.es.js.map +1 -1
- package/dist/new-components/atoms/Toast.d.ts +7 -12
- package/dist/new-components/atoms/Toast.es.js +211 -182
- package/dist/new-components/atoms/Toast.es.js.map +1 -1
- package/dist/new-components/atoms/Toggletip.es.js +3 -2
- package/dist/new-components/atoms/Toggletip.es.js.map +1 -1
- package/dist/new-components/atoms/stories/ThemeComparison.d.ts +2 -1
- package/dist/serializeValue-BLvnTy3o.js +17 -0
- package/dist/serializeValue-BLvnTy3o.js.map +1 -0
- package/dist/stringifyLocale-DOx30wH1.js +13 -0
- package/dist/stringifyLocale-DOx30wH1.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/theme.css +1 -2
- package/dist/tokens.css +3 -0
- package/dist/{useAnimationFrame-DwhymJoW.js → useAnimationFrame-DqvuRtgK.js} +2 -2
- package/dist/{useAnimationFrame-DwhymJoW.js.map → useAnimationFrame-DqvuRtgK.js.map} +1 -1
- package/dist/{useAriaLabelledBy-C9SDiruE.js → useAriaLabelledBy-C_Zzl94S.js} +3 -3
- package/dist/{useAriaLabelledBy-C9SDiruE.js.map → useAriaLabelledBy-C_Zzl94S.js.map} +1 -1
- package/dist/{useBaseUiId-jtgiQp--.js → useBaseUiId-DCE1GVlg.js} +57 -37
- package/dist/{useBaseUiId-jtgiQp--.js.map → useBaseUiId-DCE1GVlg.js.map} +1 -1
- package/dist/{useButton-BalOc_EL.js → useButton-CtXDdeoI.js} +4 -4
- package/dist/{useButton-BalOc_EL.js.map → useButton-CtXDdeoI.js.map} +1 -1
- package/dist/{CompositeList-D4xmSZ5V.js → useCompositeListItem-DlAKWsHE.js} +59 -59
- package/dist/useCompositeListItem-DlAKWsHE.js.map +1 -0
- package/dist/{useControlled-BSyYkg5C.js → useControlled-DMDWXIzj.js} +2 -2
- package/dist/{useControlled-BSyYkg5C.js.map → useControlled-DMDWXIzj.js.map} +1 -1
- package/dist/useFocus-BGyXJhul.js +137 -0
- package/dist/useFocus-BGyXJhul.js.map +1 -0
- package/dist/{useIsoLayoutEffect-e9VA-ICd.js → useIsoLayoutEffect-D2lpsB9D.js} +8 -4
- package/dist/{useIsoLayoutEffect-e9VA-ICd.js.map → useIsoLayoutEffect-D2lpsB9D.js.map} +1 -1
- package/dist/{usePopupHandleStore-DYUo-Fyk.js → usePopupHandleStore-9hGUXtn5.js} +1966 -2002
- package/dist/usePopupHandleStore-9hGUXtn5.js.map +1 -0
- package/dist/{Tooltip-6R-t7wt1.js → usePositioner-CAWMEP8L.js} +17 -1403
- package/dist/usePositioner-CAWMEP8L.js.map +1 -0
- package/dist/{useOpenInteractionType-BnUZ2Eio.js → useScrollLock-QpeWQmdB.js} +74 -58
- package/dist/useScrollLock-QpeWQmdB.js.map +1 -0
- package/dist/{useLabelableId-CQqNbBk1.js → useSetFieldFocused-BO2Y66f_.js} +27 -35
- package/dist/useSetFieldFocused-BO2Y66f_.js.map +1 -0
- package/dist/{useTimeout-BXf1hDIL.js → useTimeout-D1vYJgq4.js} +3 -3
- package/dist/{useTimeout-BXf1hDIL.js.map → useTimeout-D1vYJgq4.js.map} +1 -1
- package/dist/{useTransitionStatus-C9gg_XJ-.js → useTransitionStatus-CHrs3i5F.js} +3 -3
- package/dist/{useTransitionStatus-C9gg_XJ-.js.map → useTransitionStatus-CHrs3i5F.js.map} +1 -1
- package/dist/useTriggerFocusGuards-Ss68N7Fe.js +100 -0
- package/dist/useTriggerFocusGuards-Ss68N7Fe.js.map +1 -0
- package/dist/useValueChanged-BnlOop8k.js +16 -0
- package/dist/useValueChanged-BnlOop8k.js.map +1 -0
- package/dist/utilities.css +38 -0
- package/package.json +2 -1
- package/dist/CompositeList-D4xmSZ5V.js.map +0 -1
- package/dist/CompositeRoot-DnijP7Jm.js.map +0 -1
- package/dist/Popover-B6z7exNd.js.map +0 -1
- package/dist/PrehydrationScript--08s8Mfl.js.map +0 -1
- package/dist/Tooltip-6R-t7wt1.js.map +0 -1
- package/dist/composite-rAI4IlWK.js +0 -66
- package/dist/composite-rAI4IlWK.js.map +0 -1
- package/dist/error-FX4R42W-.js +0 -6
- package/dist/index-B6xFUIBK.js.map +0 -1
- package/dist/shadowDom-CRvvf3qf.js +0 -52
- package/dist/shadowDom-CRvvf3qf.js.map +0 -1
- package/dist/useLabelableId-CQqNbBk1.js.map +0 -1
- package/dist/useOpenInteractionType-BnUZ2Eio.js.map +0 -1
- package/dist/usePopupHandleStore-DYUo-Fyk.js.map +0 -1
- package/dist/useValueAsRef-BfFRcMg6.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Combobox.es.js","sources":["../../../node_modules/@base-ui/react/floating-ui-react/hooks/gridNavigation.mjs","../../../node_modules/@base-ui/react/combobox/root/ComboboxRootContext.mjs","../../../node_modules/@base-ui/react/combobox/store.mjs","../../../node_modules/@base-ui/react/combobox/root/utils/index.mjs","../../../node_modules/@base-ui/react/internals/filter.mjs","../../../node_modules/@base-ui/react/combobox/root/utils/useFilter.mjs","../../../node_modules/@base-ui/react/utils/scrollable.mjs","../../../node_modules/@base-ui/react/combobox/root/utils/constants.mjs","../../../node_modules/@base-ui/react/combobox/items/itemCollection.mjs","../../../node_modules/@base-ui/react/combobox/root/AriaCombobox.mjs","../../../node_modules/@base-ui/react/combobox/root/ComboboxRoot.mjs","../../../node_modules/@base-ui/react/combobox/input/ComboboxInputDataAttributes.mjs","../../../node_modules/@base-ui/react/combobox/utils/stateAttributesMapping.mjs","../../../node_modules/@base-ui/react/combobox/chips/ComboboxChipsContext.mjs","../../../node_modules/@base-ui/react/combobox/positioner/ComboboxPositionerContext.mjs","../../../node_modules/@base-ui/react/combobox/utils/ComboboxInternalDismissButton.mjs","../../../node_modules/@base-ui/react/combobox/utils/parts.mjs","../../../node_modules/@base-ui/react/combobox/input/ComboboxInput.mjs","../../../node_modules/@base-ui/react/combobox/utils/handleInputPress.mjs","../../../node_modules/@base-ui/react/combobox/input-group/ComboboxInputGroup.mjs","../../../node_modules/@base-ui/react/combobox/trigger/ComboboxTrigger.mjs","../../../node_modules/@base-ui/react/combobox/collection/GroupCollectionContext.mjs","../../../node_modules/@base-ui/react/combobox/collection/ComboboxCollection.mjs","../../../node_modules/@base-ui/react/combobox/list/ComboboxList.mjs","../../../node_modules/@base-ui/react/internals/useInitialLiveRegionTextMutation.mjs","../../../node_modules/@base-ui/react/combobox/portal/ComboboxPortalContext.mjs","../../../node_modules/@base-ui/react/combobox/portal/ComboboxPortal.mjs","../../../node_modules/@base-ui/react/combobox/positioner/ComboboxPositioner.mjs","../../../node_modules/@base-ui/react/combobox/popup/ComboboxPopup.mjs","../../../node_modules/@base-ui/react/combobox/group/ComboboxGroupContext.mjs","../../../node_modules/@base-ui/react/combobox/group/ComboboxGroup.mjs","../../../node_modules/@base-ui/react/combobox/group-label/ComboboxGroupLabel.mjs","../../../node_modules/@base-ui/react/combobox/item/ComboboxItemContext.mjs","../../../node_modules/@base-ui/react/combobox/row/ComboboxRowContext.mjs","../../../node_modules/@base-ui/react/combobox/item/ComboboxItem.mjs","../../../node_modules/@base-ui/react/combobox/item-indicator/ComboboxItemIndicator.mjs","../../../node_modules/@base-ui/react/combobox/chips/ComboboxChips.mjs","../../../node_modules/@base-ui/react/combobox/chip/ComboboxChipContext.mjs","../../../node_modules/@base-ui/react/combobox/chip/ComboboxChip.mjs","../../../node_modules/@base-ui/react/combobox/chip-remove/ComboboxChipRemove.mjs","../../../node_modules/@base-ui/react/combobox/empty/ComboboxEmpty.mjs","../../../node_modules/@base-ui/react/combobox/clear/ComboboxClear.mjs","../../../node_modules/@base-ui/react/combobox/separator/ComboboxSeparator.mjs","../../../src/components/atoms/Combobox.tsx"],"sourcesContent":["import { getGridNavigatedIndex, isIndexOutOfListBounds } from \"../utils/composite.mjs\";\n/**\n * Positional arguments are deliberate: property names of an options object\n * don't minify, and the signature is locked to the caller via `typeof` on the\n * `grid` option of `useListNavigation`.\n *\n * The injected grid navigator only ever operates on a uniform 1x1 grid (sizes are\n * always `1x1` and packing is never dense), so the cell-map machinery that supports\n * multi-cell items collapses to an identity transform over the item list. Calling\n * `getGridNavigatedIndex` directly keeps the cell-map helpers\n * (`createGridCellMap`/`getGridCellIndexOfCorner`/`getGridCellIndices`) out of\n * grid-combobox bundles.\n */\nexport function gridNavigation(event, prevIndex, listRef, orientation, loopFocus, rtl, disabledIndices, minIndex, maxIndex, cols = 2) {\n const nextIndex = getGridNavigatedIndex(listRef.current, {\n event,\n orientation,\n loopFocus,\n rtl,\n cols,\n disabledIndices,\n minIndex,\n maxIndex,\n // An out-of-range previous index falls back to the first enabled item.\n prevIndex: prevIndex > maxIndex ? minIndex : prevIndex,\n stopEvent: true\n });\n\n // `getGridNavigatedIndex` can return an out-of-bounds sentinel (e.g. `-1` when there is no\n // previous item to move from); surface that as `undefined` so the caller treats it as\n // \"no navigation\" rather than highlighting index `-1`.\n return isIndexOutOfListBounds(listRef.current, nextIndex) ? undefined : nextIndex;\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const ComboboxRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") ComboboxRootContext.displayName = \"ComboboxRootContext\";\nexport const ComboboxFloatingContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") ComboboxFloatingContext.displayName = \"ComboboxFloatingContext\";\nexport const ComboboxDerivedItemsContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") ComboboxDerivedItemsContext.displayName = \"ComboboxDerivedItemsContext\";\nexport const ComboboxHasItemsContext = /*#__PURE__*/React.createContext(false);\n// `inputValue` can't be placed in the store.\n// https://github.com/mui/base-ui/issues/2703\nif (process.env.NODE_ENV !== \"production\") ComboboxHasItemsContext.displayName = \"ComboboxHasItemsContext\";\nexport const ComboboxInputValueContext = /*#__PURE__*/React.createContext('');\nif (process.env.NODE_ENV !== \"production\") ComboboxInputValueContext.displayName = \"ComboboxInputValueContext\";\nexport function useComboboxRootContext() {\n const context = React.useContext(ComboboxRootContext);\n if (!context) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: ComboboxRootContext is missing. Combobox parts must be placed within <Combobox.Root>.' : _formatErrorMessage(22));\n }\n return context;\n}\nexport function useComboboxFloatingContext() {\n const context = React.useContext(ComboboxFloatingContext);\n if (!context) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: ComboboxFloatingContext is missing. Combobox parts must be placed within <Combobox.Root>.' : _formatErrorMessage(23));\n }\n return context;\n}\nexport function useComboboxDerivedItemsContext() {\n const context = React.useContext(ComboboxDerivedItemsContext);\n if (!context) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: ComboboxItemsContext is missing. Combobox parts must be placed within <Combobox.Root>.' : _formatErrorMessage(24));\n }\n return context;\n}\nexport function useComboboxInputValueContext() {\n return React.useContext(ComboboxInputValueContext);\n}\nexport function useComboboxHasItemsContext() {\n return React.useContext(ComboboxHasItemsContext);\n}","import { compareItemEquality } from \"../internals/itemEquality.mjs\";\nimport { hasNullItemLabel } from \"../internals/resolveValueLabel.mjs\";\n\n/**\n * Non-reactive values shared with the combobox parts. Nothing here is observable through\n * `selectors`, so writing to a ref never notifies subscribers.\n */\n\nexport const selectors = {\n id: state => state.id,\n labelId: state => state.labelId,\n items: state => state.items,\n selectedValue: state => state.selectedValue,\n hasSelectionChips: state => {\n const selectedValue = state.selectedValue;\n return Array.isArray(selectedValue) && selectedValue.length > 0;\n },\n hasSelectedValue: state => {\n const {\n selectedValue,\n selectionMode\n } = state;\n if (selectedValue == null) {\n return false;\n }\n if (selectionMode === 'multiple' && Array.isArray(selectedValue)) {\n return selectedValue.length > 0;\n }\n return true;\n },\n hasNullItemLabel: (state, enabled) => {\n return enabled ? hasNullItemLabel(state.items) : false;\n },\n open: state => state.open,\n mounted: state => state.mounted,\n forceMounted: state => state.forceMounted,\n inline: state => state.inline,\n activeIndex: state => state.activeIndex,\n selectedIndex: state => state.selectedIndex,\n isActive: (state, index) => state.activeIndex === index,\n isSelected: (state, itemValue) => {\n const comparer = state.isItemEqualToValue;\n const selectedValue = state.selectedValue;\n if (Array.isArray(selectedValue)) {\n return selectedValue.some(selectedItem => compareItemEquality(itemValue, selectedItem, comparer));\n }\n return compareItemEquality(itemValue, selectedValue, comparer);\n },\n transitionStatus: state => state.transitionStatus,\n popupProps: state => state.popupProps,\n listProps: state => state.listProps,\n inputProps: state => state.inputProps,\n triggerProps: state => state.triggerProps,\n itemRoot: state => state.itemRoot,\n positionerElement: state => state.positionerElement,\n listElement: state => state.listElement,\n popupId: state => state.popupId,\n triggerElement: state => state.triggerElement,\n inputElement: state => state.inputElement,\n inputGroupElement: state => state.inputGroupElement,\n popupSide: state => state.popupSide,\n openMethod: state => state.openMethod,\n inputInsidePopup: state => state.inputInsidePopup,\n inputOwnsFormValue: state => state.inputOwnsFormValue,\n selectionMode: state => state.selectionMode,\n name: state => state.name,\n form: state => state.form,\n disabled: state => state.disabled,\n readOnly: state => state.readOnly,\n required: state => state.required,\n grid: state => state.grid,\n virtualized: state => state.virtualized,\n itemToStringLabel: state => state.itemToStringLabel,\n isItemEqualToValue: state => state.isItemEqualToValue,\n modal: state => state.modal,\n autoHighlight: state => state.autoHighlight\n};","import { stringifyAsLabel } from \"../../../internals/resolveValueLabel.mjs\";\n/**\n * Derives the default id assigned to `Combobox.Popup` when the input is rendered inside it.\n * Shared by the popup (which applies it) and the trigger (which references it via `aria-controls`)\n * so the convention only lives in one place.\n */\nexport function getComboboxPopupId(rootId) {\n return rootId == null ? undefined : `${rootId}-popup`;\n}\n\n/**\n * Enhanced filter using Intl.Collator for more robust string matching.\n * Uses the provided `itemToStringLabel` function if available, otherwise falls back to:\n * • When `item` is an object with a `value` property, that property is used.\n * • When `item` is a primitive (e.g. `string`), it is used directly.\n */\nexport function createCollatorItemFilter(collatorFilter, itemToStringLabel) {\n return (item, query) => {\n if (item == null) {\n return false;\n }\n return collatorFilter.contains(item, query, itemToStringLabel);\n };\n}\n\n/**\n * Enhanced filter for single selection mode using Intl.Collator that shows all items\n * when query is empty or matches the current selection, making it easier to browse options.\n */\nexport function createSingleSelectionCollatorFilter(collatorFilter, itemToStringLabel, selectedValue) {\n return (item, query) => {\n if (item == null) {\n return false;\n }\n if (!query) {\n return true;\n }\n const selectedValueToString = itemToStringLabel?.selected ?? itemToStringLabel;\n const selectedString = selectedValue != null ? stringifyAsLabel(selectedValue, selectedValueToString) : '';\n\n // Handle case-insensitive matching consistently\n if (selectedString && collatorFilter.contains(selectedString, query) && selectedString.length === query.length) {\n return true;\n }\n return collatorFilter.contains(item, query, itemToStringLabel);\n };\n}","import { stringifyLocale } from '@base-ui/utils/stringifyLocale';\nimport { stringifyAsLabel } from \"./resolveValueLabel.mjs\";\nconst filterCache = new Map();\nexport function getFilter(options = {}) {\n const {\n locale,\n ...restOptions\n } = options;\n const collatorOptions = {\n usage: 'search',\n sensitivity: 'base',\n ignorePunctuation: true,\n ...restOptions\n };\n const cacheKey = `${stringifyLocale(locale)}|${JSON.stringify(collatorOptions)}`;\n const cachedFilter = filterCache.get(cacheKey);\n if (cachedFilter) {\n return cachedFilter;\n }\n const collator = new Intl.Collator(locale, collatorOptions);\n const filter = {\n contains(item, query, itemToString) {\n if (!query) {\n return true;\n }\n const itemString = stringifyAsLabel(item, itemToString);\n for (let i = 0; i <= itemString.length - query.length; i += 1) {\n if (collator.compare(itemString.slice(i, i + query.length), query) === 0) {\n return true;\n }\n }\n return false;\n },\n startsWith(item, query, itemToString) {\n if (!query) {\n return true;\n }\n const itemString = stringifyAsLabel(item, itemToString);\n return collator.compare(itemString.slice(0, query.length), query) === 0;\n },\n endsWith(item, query, itemToString) {\n if (!query) {\n return true;\n }\n const itemString = stringifyAsLabel(item, itemToString);\n const queryLength = query.length;\n return itemString.length >= queryLength && collator.compare(itemString.slice(itemString.length - queryLength), query) === 0;\n }\n };\n filterCache.set(cacheKey, filter);\n return filter;\n}","'use client';\n\nimport * as React from 'react';\nimport { createCollatorItemFilter, createSingleSelectionCollatorFilter } from \"./index.mjs\";\nimport { getFilter } from \"../../../internals/filter.mjs\";\n/**\n * Matches items against a query using `Intl.Collator` for robust string matching.\n */\nexport const useCoreFilter = getFilter;\n/**\n * Matches items against a query using `Intl.Collator` for robust string matching.\n */\nexport function useComboboxFilter(options = {}) {\n const {\n multiple = false,\n value,\n ...collatorOptions\n } = options;\n const coreFilter = getFilter(collatorOptions);\n const contains = React.useCallback((item, query, itemToString) => {\n if (multiple) {\n return createCollatorItemFilter(coreFilter, itemToString)(item, query);\n }\n return createSingleSelectionCollatorFilter(coreFilter, itemToString, value)(item, query);\n }, [coreFilter, value, multiple]);\n return React.useMemo(() => ({\n ...coreFilter,\n contains\n }), [contains, coreFilter]);\n}","import { getComputedStyle, getParentNode, isElement, isHTMLElement, isLastTraversableNode } from '@floating-ui/utils/dom';\nexport function isScrollableY(element, allowOverflowIntent = false) {\n const {\n overflowY\n } = getComputedStyle(element);\n if (overflowY !== 'auto' && overflowY !== 'scroll') {\n return false;\n }\n // When `allowOverflowIntent` is true, a container that overflows only once extra space is\n // added (e.g. drawer keyboard scroll slack) still counts, as long as it has layout size on\n // the axis.\n return allowOverflowIntent ? element.clientHeight > 0 : element.scrollHeight > element.clientHeight;\n}\nexport function isScrollableX(element, allowOverflowIntent = false) {\n const {\n overflowX\n } = getComputedStyle(element);\n if (overflowX !== 'auto' && overflowX !== 'scroll') {\n return false;\n }\n return allowOverflowIntent ? element.clientWidth > 0 : element.scrollWidth > element.clientWidth;\n}\nexport function isScrollable(element, axis, allowOverflowIntent = false) {\n return axis === 'vertical' ? isScrollableY(element, allowOverflowIntent) : isScrollableX(element, allowOverflowIntent);\n}\nexport function findScrollableAncestor(target, root, axis, allowOverflowIntent = false) {\n // `getParentNode` crosses shadow boundaries (and slots), so a target inside a shadow root\n // still walks up to scrollable ancestors in the light DOM. Non-HTML targets (SVG, MathML)\n // can't scroll, but their HTML ancestors can.\n let node = target;\n while (isElement(node) && node !== root && !isLastTraversableNode(node)) {\n if (isHTMLElement(node) && isScrollable(node, axis, allowOverflowIntent)) {\n return node;\n }\n node = getParentNode(node);\n }\n return null;\n}\nexport function findScrollableTouchTarget(target, root, axis = 'vertical', allowOverflowIntent = false) {\n return findScrollableAncestor(target, root, axis, allowOverflowIntent) ?? (isScrollable(root, axis, allowOverflowIntent) ? root : null);\n}","export const NO_ACTIVE_VALUE = Symbol('none');\nexport const INITIAL_LAST_HIGHLIGHT = {\n value: NO_ACTIVE_VALUE,\n index: -1\n};","import { compareItemEquality, defaultItemEquality } from \"../../internals/itemEquality.mjs\";\nexport function findCollectionItem(valueToItem, itemValue, isEqual) {\n const exactItem = valueToItem.get(itemValue);\n if (exactItem !== undefined || isEqual === defaultItemEquality) {\n return exactItem;\n }\n for (const [derivedValue, item] of valueToItem) {\n if (compareItemEquality(derivedValue, itemValue, isEqual)) {\n return item;\n }\n }\n return undefined;\n}\n\n/**\n * An opaque collection created by `createItems()`.\n *\n * It carries the source item and derived value types so the root can infer the list item and\n * selection value types.\n *\n * Pass it directly to the root's `items` prop; it has no public members.\n */\n\n/**\n * Internal shape of a collection. The extra members let the root project items to\n * their values and resolve a selected value back to its label while items are unmounted.\n */","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nimport { useControlled } from '@base-ui/utils/useControlled';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useOnFirstRender } from '@base-ui/utils/useOnFirstRender';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\nimport { useValueAsRef } from '@base-ui/utils/useValueAsRef';\nimport { visuallyHidden, visuallyHiddenInput } from '@base-ui/utils/visuallyHidden';\nimport { useRefWithInit } from '@base-ui/utils/useRefWithInit';\nimport { ReactStore } from '@base-ui/utils/store';\nimport { EMPTY_ARRAY, EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { isHTMLElement } from '@floating-ui/utils/dom';\nimport { getOverflowAncestors, useDismiss, useFloatingRootContext, useListNavigation, useClick } from \"../../floating-ui-react/index.mjs\";\nimport { gridNavigation } from \"../../floating-ui-react/hooks/gridNavigation.mjs\";\nimport { activeElement, closest, contains, getTarget } from \"../../floating-ui-react/utils.mjs\";\nimport { createChangeEventDetails, createGenericEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { getHighlightReason } from \"../../utils/getHighlightReason.mjs\";\nimport { ComboboxFloatingContext, ComboboxDerivedItemsContext, ComboboxHasItemsContext, ComboboxRootContext, ComboboxInputValueContext } from \"./ComboboxRootContext.mjs\";\nimport { selectors } from \"../store.mjs\";\nimport { attachPreventUnmountOnClose } from \"../../utils/popups/popupStoreUtils.mjs\";\nimport { useFieldRootContext } from \"../../internals/field-root-context/FieldRootContext.mjs\";\nimport { useRegisterFieldControl } from \"../../internals/field-register-control/useRegisterFieldControl.mjs\";\nimport { useFormContext } from \"../../internals/form-context/FormContext.mjs\";\nimport { useLabelableId } from \"../../internals/labelable-provider/useLabelableId.mjs\";\nimport { createCollatorItemFilter } from \"./utils/index.mjs\";\nimport { useCoreFilter } from \"./utils/useFilter.mjs\";\nimport { useUnmountAfterClose } from \"../../internals/useUnmountAfterClose.mjs\";\nimport { useOpenInteractionType } from \"../../utils/useOpenInteractionType.mjs\";\nimport { isScrollableY } from \"../../utils/scrollable.mjs\";\nimport { useValueChanged } from \"../../internals/useValueChanged.mjs\";\nimport { NOOP } from \"../../internals/noop.mjs\";\nimport { FOCUSABLE_POPUP_PROPS } from \"../../utils/popups/index.mjs\";\nimport { mergeProps } from \"../../merge-props/index.mjs\";\nimport { stringifyAsLabel, stringifyAsValue, flattenLeafItems, isGroupedItems } from \"../../internals/resolveValueLabel.mjs\";\nimport { compareItemEquality, defaultItemEquality, findItemIndex, findSelectionIndex, isSelectedValueDirty, removeItem, selectedValueIncludes } from \"../../internals/itemEquality.mjs\";\nimport { INITIAL_LAST_HIGHLIGHT, NO_ACTIVE_VALUE } from \"./utils/constants.mjs\";\nimport { useDirection } from \"../../internals/direction-context/DirectionContext.mjs\";\nimport { findCollectionItem } from \"../items/itemCollection.mjs\";\n\n/**\n * @internal\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport function AriaCombobox(props) {\n const {\n id: idProp,\n onOpenChangeComplete: onOpenChangeCompleteProp,\n defaultSelectedValue = null,\n selectedValue: selectedValueProp,\n onSelectedValueChange,\n defaultInputValue,\n inputValue: inputValueProp,\n open: openProp,\n defaultOpen = false,\n selectionMode,\n onItemHighlighted: onItemHighlightedProp,\n name: nameProp,\n form,\n disabled: disabledProp = false,\n readOnly = false,\n required = false,\n inputRef: inputRefProp,\n grid = false,\n items: itemsProp,\n filteredItems: filteredItemsProp,\n filter: filterProp,\n filterQuery: filterQueryProp,\n openOnInputClick = true,\n autoHighlight = false,\n keepHighlight = false,\n highlightItemOnHover = true,\n loopFocus = true,\n itemToStringLabel: itemToStringLabelProp,\n itemToStringValue,\n isItemEqualToValue = defaultItemEquality,\n virtualized = false,\n inline: inlineProp = false,\n fillInputOnItemPress = true,\n modal = false,\n limit = -1,\n autoComplete = 'list',\n formAutoComplete,\n locale,\n submitOnItemClick = false\n } = props;\n const {\n clearErrors\n } = useFormContext();\n const {\n setDirty,\n validityData,\n setFilled,\n name: fieldName,\n disabled: fieldDisabled,\n setTouched,\n setFocused,\n validationMode,\n validation\n } = useFieldRootContext();\n const direction = useDirection();\n const id = useLabelableId({\n id: idProp\n });\n const collatorFilter = useCoreFilter({\n locale\n });\n\n // Plain items are arrays; normalized `createItems()` collections are objects.\n const collection = Array.isArray(itemsProp) ? null : itemsProp;\n if (collection && typeof collection.label !== 'function') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: the `items` prop received an object that is not a collection, ' + 'so its items cannot be read. Pass an array of items, an array of groups with items, ' + 'or the result of `createItems()`. ' + 'See https://base-ui.com/react/components/combobox#createitems' : _formatErrorMessage(100));\n }\n const items = collection ? collection.data : itemsProp;\n const itemToValue = collection?.value;\n\n // A projected collection's items live in the source domain, not the selection-value domain the\n // store matches against, so they are withheld from the store.\n const storeItems = itemToValue ? undefined : items;\n\n // The externally filtered items projected to their selection values, with a lookup back to the\n // source items. Declared before `itemToStringLabel`, which resolves labels from it on the\n // first render (initial input value).\n const externalWindow = React.useMemo(() => {\n if (!filteredItemsProp || !itemToValue) {\n return undefined;\n }\n const flat = flattenLeafItems(filteredItemsProp);\n const values = flat.map(itemToValue);\n let valueToItem;\n return {\n values,\n findItem(itemValue, isEqual) {\n if (!valueToItem) {\n valueToItem = new Map();\n for (let i = 0; i < values.length; i += 1) {\n if (!valueToItem.has(values[i])) {\n valueToItem.set(values[i], flat[i]);\n }\n }\n }\n return findCollectionItem(valueToItem, itemValue, isEqual);\n }\n };\n }, [filteredItemsProp, itemToValue]);\n\n // Labels selection values from current props only: collection data first, then the current\n // external window, then the prop. Nothing from a past window is remembered — keeping a value\n // resolvable over time means keeping its item in the collection's data.\n const itemToStringLabel = React.useMemo(() => {\n if (!collection) {\n return itemToStringLabelProp;\n }\n return itemValue => {\n return collection.label(itemValue, isItemEqualToValue, unresolvedValue => {\n const externalItem = externalWindow?.findItem(unresolvedValue, isItemEqualToValue);\n if (externalItem != null) {\n return collection.itemLabel(externalItem);\n }\n return stringifyAsLabel(unresolvedValue, itemToStringLabelProp);\n });\n };\n }, [collection, itemToStringLabelProp, externalWindow, isItemEqualToValue]);\n const filterItemToString = React.useMemo(() => {\n if (!collection) {\n return itemToStringLabelProp;\n }\n return Object.assign(item => collection.itemLabel(item), {\n selected: value => stringifyAsLabel(value, itemToStringLabel)\n });\n }, [collection, itemToStringLabel, itemToStringLabelProp]);\n function stringifyValueLabel(item) {\n return stringifyAsLabel(item, itemToStringLabel);\n }\n const [queryChangedAfterOpen, setQueryChangedAfterOpen] = React.useState(false);\n const [closeQuery, setCloseQuery] = React.useState(null);\n const previousCloseQueryRef = React.useRef(closeQuery);\n const listRef = React.useRef([]);\n const labelsRef = React.useRef([]);\n const popupRef = React.useRef(null);\n const inputRef = React.useRef(null);\n const startDismissRef = React.useRef(null);\n const endDismissRef = React.useRef(null);\n const emptyRef = React.useRef(null);\n const hadInputClearRef = React.useRef(false);\n const chipsContainerRef = React.useRef(null);\n const clearRef = React.useRef(null);\n const selectionEventRef = React.useRef(null);\n const lastHighlightRef = React.useRef(INITIAL_LAST_HIGHLIGHT);\n const pendingQueryHighlightRef = React.useRef(null);\n\n /**\n * Contains the currently visible list of item values post-filtering.\n */\n const valuesRef = React.useRef([]);\n /**\n * The item element that received the last `pointerdown`, used to detect whether a\n * `mouseup` on an item belongs to a drag-select gesture that started elsewhere.\n */\n const pointerDownItemRef = React.useRef(null);\n const disabled = fieldDisabled || disabledProp;\n const name = fieldName ?? nameProp;\n const multiple = selectionMode === 'multiple';\n const single = selectionMode === 'single';\n const hasInputValue = inputValueProp !== undefined || defaultInputValue !== undefined;\n const hasItems = items !== undefined;\n const hasFilteredItemsProp = filteredItemsProp !== undefined;\n let autoHighlightMode;\n if (autoHighlight === 'always') {\n autoHighlightMode = 'always';\n } else {\n autoHighlightMode = autoHighlight ? 'input-change' : false;\n }\n const [selectedValue, setSelectedValueUnwrapped] = useControlled({\n controlled: selectedValueProp,\n default: multiple ? defaultSelectedValue ?? EMPTY_ARRAY : defaultSelectedValue,\n name: 'Combobox',\n state: 'selectedValue'\n });\n const filter = React.useMemo(() => {\n if (filterProp === null) {\n return () => true;\n }\n if (filterProp !== undefined) {\n return filterProp;\n }\n // `shouldBypassFiltering` already empties the query whenever a single selection's label\n // matches it exactly, so the filter never needs a selection-aware variant here.\n return createCollatorItemFilter(collatorFilter, filterItemToString);\n }, [filterProp, collatorFilter, filterItemToString]);\n\n // If neither inputValue nor defaultInputValue are provided, derive it from the\n // selected value for single mode so the input reflects the selection on mount.\n const initialDefaultInputValue = useRefWithInit(() => {\n if (hasInputValue) {\n return defaultInputValue ?? '';\n }\n if (single) {\n return stringifyValueLabel(selectedValue);\n }\n return '';\n }).current;\n const [inputValue, setInputValueUnwrapped] = useControlled({\n controlled: inputValueProp,\n default: initialDefaultInputValue,\n name: 'Combobox',\n state: 'inputValue'\n });\n const [open, setOpenUnwrapped] = useControlled({\n controlled: openProp,\n default: defaultOpen,\n name: 'Combobox',\n state: 'open'\n });\n const isGrouped = isGroupedItems(items);\n const query = !open && closeQuery !== null ? closeQuery : String(inputValue).trim();\n const selectedLabelString = single ? stringifyValueLabel(selectedValue) : '';\n const shouldBypassFiltering = single && !queryChangedAfterOpen && query !== '' && selectedLabelString.length === query.length && collatorFilter.contains(selectedLabelString, query);\n const filterQuery = shouldBypassFiltering ? '' : filterQueryProp ?? query;\n const shouldIgnoreExternalFiltering = hasItems && hasFilteredItemsProp && shouldBypassFiltering && (!collection || collection.hasValue(selectedValue, isItemEqualToValue));\n const flatItems = React.useMemo(() => items ? flattenLeafItems(items) : EMPTY_ARRAY, [items]);\n const filteredItems = React.useMemo(() => {\n if (filteredItemsProp && !shouldIgnoreExternalFiltering) {\n return filteredItemsProp;\n }\n if (!items) {\n return EMPTY_ARRAY;\n }\n if (isGrouped) {\n const groupedItems = items;\n const resultingGroups = [];\n let currentCount = 0;\n for (const group of groupedItems) {\n if (limit > -1 && currentCount >= limit) {\n break;\n }\n const remainingLimit = limit > -1 ? limit - currentCount : Infinity;\n const itemsToTake = filterQuery === '' ? group.items.slice(0, remainingLimit) : [];\n if (filterQuery !== '') {\n for (const item of group.items) {\n if (itemsToTake.length >= remainingLimit) {\n break;\n }\n if (filter(item, filterQuery, filterItemToString)) {\n itemsToTake.push(item);\n }\n }\n }\n if (itemsToTake.length > 0) {\n const newGroup = {\n ...group,\n items: itemsToTake\n };\n resultingGroups.push(newGroup);\n currentCount += itemsToTake.length;\n }\n }\n return resultingGroups;\n }\n if (filterQuery === '') {\n return limit > -1 ? flatItems.slice(0, limit) :\n // The cast here is done as `flatItems` is readonly.\n // valuesRef.current, a mutable ref, can be set to `flatFilteredValues`, which may\n // reference this exact readonly value, creating a mutation risk.\n // However, <Combobox.Item> can never mutate this value as the mutating effect\n // bails early when `items` is provided, and this is only ever returned\n // when `items` is provided due to the early return at the top of this hook.\n flatItems;\n }\n const limitedItems = [];\n for (const item of flatItems) {\n if (limit > -1 && limitedItems.length >= limit) {\n break;\n }\n if (filter(item, filterQuery, filterItemToString)) {\n limitedItems.push(item);\n }\n }\n return limitedItems;\n }, [filteredItemsProp, shouldIgnoreExternalFiltering, items, isGrouped, filterQuery, limit, filter, filterItemToString, flatItems]);\n\n /**\n * The filtered items flattened across groups and projected to their selection values.\n */\n const flatFilteredValues = React.useMemo(() => {\n if (externalWindow && filteredItems === filteredItemsProp) {\n return externalWindow.values;\n }\n // Explicit type argument: inferring it from a union of both shapes resolves `Item` to\n // `Group<Item>`, which tsc rejects and tsgo does not.\n const flat = flattenLeafItems(filteredItems);\n return itemToValue ? flat.map(item => itemToValue(item)) : flat;\n }, [filteredItems, filteredItemsProp, externalWindow, itemToValue]);\n const store = useRefWithInit(() => {\n // An inline list open on the first render never gets a closed pass of the closed-state\n // sync effect below, and `items`-prop lists don't self-register their index the way\n // individually rendered `<Combobox.Item>`s do, so the selected item was never highlighted.\n // Seeding the index here lets list navigation highlight and scroll to the selection on\n // mount. Computed once by construction, so a selection or list that resolves after mount\n // doesn't move an existing highlight or scroll the list away.\n let initialSelectedIndex = null;\n if (inlineProp && open && hasItems && selectionMode !== 'none') {\n initialSelectedIndex = findSelectionIndex(flatFilteredValues, selectedValue, isItemEqualToValue, multiple);\n }\n return new ReactStore({\n id,\n labelId: undefined,\n selectedValue,\n open,\n items: storeItems,\n selectionMode,\n name,\n form,\n disabled,\n readOnly,\n required,\n grid,\n virtualized,\n openOnInputClick,\n itemToStringLabel,\n isItemEqualToValue,\n modal,\n autoHighlight: autoHighlightMode,\n submitOnItemClick,\n hasInputValue,\n mounted: false,\n forceMounted: false,\n transitionStatus: 'idle',\n inline: inlineProp,\n activeIndex: null,\n selectedIndex: initialSelectedIndex,\n popupProps: {},\n listProps: {},\n inputProps: {},\n triggerProps: {},\n itemRoot: {\n props: EMPTY_OBJECT,\n id,\n selectionMode,\n disabled,\n readOnly,\n isItemEqualToValue\n },\n positionerElement: null,\n listElement: null,\n popupId: undefined,\n triggerElement: null,\n inputElement: null,\n inputGroupElement: null,\n popupSide: null,\n openMethod: null,\n inputInsidePopup: true,\n // Avoid duplicate names in the server HTML. Popup inputs aren't rendered\n // until after hydration, so the hidden input takes over then if needed.\n inputOwnsFormValue: selectionMode === 'none'\n }, {\n // Placeholder callbacks replaced on first render\n onOpenChangeComplete: NOOP,\n setOpen: NOOP,\n setInputValue: NOOP,\n setSelectedValue: NOOP,\n setIndices: NOOP,\n handleSelection: NOOP,\n forceMount: NOOP,\n requestSubmit: NOOP,\n listRef,\n labelsRef,\n popupRef,\n emptyRef,\n inputRef,\n startDismissRef,\n endDismissRef,\n chipsContainerRef,\n clearRef,\n valuesRef,\n pointerDownItemRef,\n selectionEventRef\n }, selectors);\n }).current;\n const fieldRawValue = selectionMode === 'none' ? inputValue : selectedValue;\n const fieldStringValue = React.useMemo(() => {\n if (selectionMode === 'none') {\n return fieldRawValue;\n }\n if (Array.isArray(selectedValue)) {\n return selectedValue.map(value => stringifyAsValue(value, itemToStringValue));\n }\n return stringifyAsValue(selectedValue, itemToStringValue);\n }, [fieldRawValue, itemToStringValue, selectionMode, selectedValue]);\n const onItemHighlighted = useStableCallback(onItemHighlightedProp);\n const onOpenChangeComplete = useStableCallback(onOpenChangeCompleteProp);\n const activeIndex = store.useState('activeIndex');\n const selectedIndex = store.useState('selectedIndex');\n const positionerElement = store.useState('positionerElement');\n const listElement = store.useState('listElement');\n const triggerElement = store.useState('triggerElement');\n const inputElement = store.useState('inputElement');\n const inputGroupElement = store.useState('inputGroupElement');\n const inline = store.useState('inline');\n const inputInsidePopup = store.useState('inputInsidePopup');\n const inputOwnsFormValue = store.useState('inputOwnsFormValue');\n const inputMatchesSelectedValue = single && !inputInsidePopup && inputValue === selectedLabelString;\n const triggerRef = useValueAsRef(triggerElement);\n const {\n openMethod,\n triggerProps\n } = useOpenInteractionType(open);\n const getStringifiedValueForForm = useStableCallback(() => fieldStringValue);\n useRegisterFieldControl(inputInsidePopup ? triggerRef : inputRef, id, fieldRawValue, getStringifiedValueForForm, !disabled, nameProp);\n const forceMount = useStableCallback(() => {\n if (items) {\n // Ensure typeahead works on a closed list.\n labelsRef.current = flatFilteredValues.map(stringifyValueLabel);\n } else {\n store.set('forceMounted', true);\n }\n });\n\n /**\n * Emits `onItemHighlighted` for the item at `index`, or clears the highlight when `index` is `-1`\n * (a no-op if nothing was highlighted). Keeps `lastHighlightRef` in sync with what was emitted.\n */\n const emitHighlight = useStableCallback((value, index, type, event) => {\n if (index === -1) {\n if (lastHighlightRef.current === INITIAL_LAST_HIGHLIGHT) {\n return;\n }\n lastHighlightRef.current = INITIAL_LAST_HIGHLIGHT;\n } else {\n lastHighlightRef.current = {\n value,\n index\n };\n }\n onItemHighlighted(value, createGenericEventDetails(type, event, {\n index\n }));\n });\n const setIndices = useStableCallback(options => {\n const update = {};\n if (options.activeIndex !== undefined) {\n update.activeIndex = options.activeIndex;\n }\n if (options.selectedIndex !== undefined) {\n update.selectedIndex = options.selectedIndex;\n }\n store.update(update);\n const activeIndexOption = options.activeIndex;\n if (activeIndexOption === undefined) {\n return;\n }\n const type = options.type || REASONS.none;\n if (activeIndexOption === null) {\n emitHighlight(undefined, -1, type, options.event);\n } else {\n emitHighlight(valuesRef.current[activeIndexOption], activeIndexOption, type, options.event);\n }\n });\n const setInputValue = useStableCallback((next, eventDetails) => {\n props.onInputValueChange?.(next, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n\n // A canceled selection clear must not suppress close-completion cleanup.\n hadInputClearRef.current = eventDetails.reason === REASONS.inputClear;\n\n // If user is typing, ensure we don't auto-highlight on open due to a race\n // with the post-open effect that sets this flag.\n if (eventDetails.reason === REASONS.inputChange) {\n // A controlled popup may ignore a close request. Resuming input proves the popup\n // is remaining open, so release the query captured for an exit animation.\n if (open && closeQuery !== null) {\n setCloseQuery(null);\n }\n const event = eventDetails.event;\n const inputType = event.inputType;\n // Treat composition commits as typed input; autofill may omit `inputType` or\n // report `insertReplacementText`.\n const isTypedInput = event.type === 'compositionend' || inputType != null && inputType !== '' && inputType !== 'insertReplacementText';\n if (isTypedInput) {\n const hasQuery = next.trim() !== '';\n if (hasQuery) {\n setQueryChangedAfterOpen(true);\n }\n // Defer index updates until after the filtered items have been derived to ensure\n // `onItemHighlighted` receives the latest item.\n pendingQueryHighlightRef.current = {\n hasQuery\n };\n\n // Virtualized lists own their scroller. Reset regular lists directly so a stale\n // composite registry cannot select a reordered item and scrolling cannot escape\n // the popup.\n const list = store.state.listElement;\n if (!store.state.virtualized && list) {\n const popup = popupRef.current;\n for (const ancestor of getOverflowAncestors(list.firstElementChild ?? list)) {\n if (!isHTMLElement(ancestor) || (popup ? !contains(popup, ancestor) : ancestor.getAttribute('role') === 'dialog')) {\n break;\n }\n if (isScrollableY(ancestor)) {\n ancestor.scrollTop = 0;\n break;\n }\n }\n }\n if (hasQuery && autoHighlightMode && store.state.activeIndex == null && (open || inline)) {\n store.set('activeIndex', 0);\n }\n }\n } else if (eventDetails.reason === REASONS.inputClear && next === '' && store.state.inputInsidePopup) {\n // A programmatic clear of an active query (e.g. after selecting an item with the\n // input inside the popup): restore the highlight to the selected item.\n pendingQueryHighlightRef.current = {\n hasQuery: false,\n selection: true\n };\n }\n setInputValueUnwrapped(next);\n });\n const handleInterruptedReopen = useStableCallback(isInputChange => {\n // Preserve values supplied with the reopen rather than owned by the interrupted close.\n const clearsPendingInput = !isInputChange && inputInsidePopup && !inline && inputValue !== '' && (String(inputValue).trim() === closeQuery || inputValue === selectedLabelString);\n\n // Keep the flag while a visible filter survives so the `items` sync cannot overwrite it.\n if (!isInputChange && (clearsPendingInput || inputValue === '' || inputMatchesSelectedValue)) {\n setQueryChangedAfterOpen(false);\n }\n setCloseQuery(null);\n if (clearsPendingInput) {\n // Cleanup clears omit the selection flag and reopening gesture.\n setInputValue('', createChangeEventDetails(REASONS.inputClear));\n }\n });\n const [preventUnmountOnClose, setPreventUnmountOnClose] = React.useState(false);\n const setOpen = useStableCallback((nextOpen, eventDetails) => {\n if (open === nextOpen) {\n return;\n }\n\n // If the `Empty` component is not used, the positioner or popup should be hidden\n // with CSS. In this case, allow the Escape key to bubble to close a parent popup\n // if there are no items to show.\n if (eventDetails.reason === REASONS.escapeKey && hasItems && flatFilteredValues.length === 0 && !emptyRef.current) {\n eventDetails.allowPropagation();\n }\n const openEventDetails = eventDetails;\n const shouldPreventUnmountOnClose = attachPreventUnmountOnClose(openEventDetails);\n props.onOpenChange?.(nextOpen, openEventDetails);\n\n // A typed request must not highlight a later open: discard it when its own open is\n // rejected, or when any other open change goes through.\n if (pendingQueryHighlightRef.current?.hasQuery && eventDetails.reason === REASONS.inputChange === eventDetails.isCanceled) {\n pendingQueryHighlightRef.current = null;\n }\n if (eventDetails.isCanceled) {\n return;\n }\n if (nextOpen && closeQuery !== null) {\n // `ComboboxInput` calls `setInputValue` before `setOpen`, so on an input-change reopen\n // `inputValue` is still the pre-keystroke value and the typed filter always survives.\n handleInterruptedReopen(eventDetails.reason === REASONS.inputChange);\n }\n if (!nextOpen && queryChangedAfterOpen) {\n if (single) {\n if (!inline) {\n setCloseQuery(query);\n }\n // Avoid a flicker when closing the popup with an empty query.\n if (query === '') {\n setQueryChangedAfterOpen(false);\n }\n } else if (multiple) {\n if (!inline) {\n // Freeze the current query so filtering remains stable while exiting.\n setCloseQuery(query);\n }\n if (inputInsidePopup) {\n setIndices({\n activeIndex: null\n });\n }\n\n // Clear the input immediately on close while retaining filtering via closeQuery for exit animations\n // if the input is outside the popup. When the input is inside the popup, defer the clear until\n // unmount so the filtered list doesn't flash to unfiltered during the exit animation.\n if (!inputInsidePopup || inline) {\n setInputValue('', createChangeEventDetails(REASONS.inputClear, eventDetails.event, undefined, {\n isItemPress: eventDetails.reason === REASONS.itemPress\n }));\n }\n }\n }\n if (!nextOpen) {\n setPreventUnmountOnClose(shouldPreventUnmountOnClose());\n }\n setOpenUnwrapped(nextOpen);\n if (!nextOpen && inputInsidePopup && (eventDetails.reason === REASONS.focusOut || eventDetails.reason === REASONS.outsidePress)) {\n setTouched(true);\n setFocused(false);\n if (validationMode === 'onBlur') {\n const valueToValidate = selectionMode === 'none' ? inputValue : selectedValue;\n validation.commit(valueToValidate);\n }\n }\n });\n const setSelectedValue = useStableCallback((nextValue, eventDetails) => {\n // Cast to `any` due to conditional value type (single vs. multiple).\n // The runtime implementation already ensures the correct value shape.\n onSelectedValueChange?.(nextValue, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n setSelectedValueUnwrapped(nextValue);\n const shouldFillInput = selectionMode === 'none' && popupRef.current && fillInputOnItemPress || single && !store.state.inputInsidePopup;\n if (shouldFillInput) {\n setInputValue(stringifyValueLabel(nextValue), createChangeEventDetails(eventDetails.reason, eventDetails.event));\n }\n });\n const handleSelection = useStableCallback((event, itemValue) => {\n const targetEl = getTarget(event);\n const overrideEvent = selectionEventRef.current ?? event;\n selectionEventRef.current = null;\n const eventDetails = createChangeEventDetails(REASONS.itemPress, overrideEvent);\n\n // Let the link handle the click.\n const href = closest(targetEl, 'a')?.getAttribute('href');\n if (href) {\n if (href.startsWith('#')) {\n setOpen(false, eventDetails);\n }\n return;\n }\n if (multiple) {\n const currentSelectedValue = Array.isArray(selectedValue) ? selectedValue : [];\n const isCurrentlySelected = selectedValueIncludes(currentSelectedValue, itemValue, isItemEqualToValue);\n const nextValue = isCurrentlySelected ? removeItem(currentSelectedValue, itemValue, isItemEqualToValue) : [...currentSelectedValue, itemValue];\n setSelectedValue(nextValue, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n const wasFiltering = inputRef.current ? inputRef.current.value.trim() !== '' : false;\n if (!wasFiltering) {\n return;\n }\n if (store.state.inputInsidePopup) {\n setInputValue('', createChangeEventDetails(REASONS.inputClear, eventDetails.event, undefined, {\n isItemPress: true\n }));\n // A newly selected item stays highlighted through the clear; a deselection\n // falls back to the standard selection anchor.\n const pendingHighlight = pendingQueryHighlightRef.current;\n if (pendingHighlight && !isCurrentlySelected) {\n pendingHighlight.toggledValue = itemValue;\n }\n } else {\n setOpen(false, eventDetails);\n }\n } else {\n setSelectedValue(itemValue, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n setOpen(false, eventDetails);\n }\n });\n const requestSubmit = useStableCallback(() => {\n const formElement = validation.inputRef.current?.form ?? store.state.inputElement?.form;\n if (formElement && typeof formElement.requestSubmit === 'function') {\n formElement.requestSubmit();\n }\n });\n const handleUnmountCleanup = useStableCallback(() => {\n onOpenChangeComplete?.(false);\n setQueryChangedAfterOpen(false);\n setCloseQuery(null);\n if (selectionMode === 'none') {\n setIndices({\n activeIndex: null,\n selectedIndex: null\n });\n } else {\n setIndices({\n activeIndex: null\n });\n }\n\n // Multiple selection mode:\n // If the user typed a filter and didn't select in multiple mode, clear the input\n // after close completes to avoid mid-exit flicker and start fresh on next open.\n if (multiple && inputRef.current && inputRef.current.value !== '' && !hadInputClearRef.current) {\n setInputValue('', createChangeEventDetails(REASONS.inputClear));\n }\n\n // Single selection mode:\n // - If input is rendered inside the popup, clear it so the next open is blank\n // - If input is outside the popup, sync it to the selected value\n if (single) {\n if (store.state.inputInsidePopup) {\n if (inputRef.current && inputRef.current.value !== '') {\n setInputValue('', createChangeEventDetails(REASONS.inputClear));\n }\n } else {\n const stringVal = stringifyValueLabel(selectedValue);\n if (inputRef.current && inputRef.current.value !== stringVal) {\n // If no selection was made, treat this as clearing the typed filter.\n const reason = stringVal === '' ? REASONS.inputClear : REASONS.none;\n setInputValue(stringVal, createChangeEventDetails(reason));\n }\n }\n }\n });\n\n // Support composing the Dialog component around an inline combobox.\n // `[role=\"dialog\"]` is more interoperable than using a context, e.g. it can work\n // with third-party modal libraries, though the limitation is that the closest\n // `role=dialog` part must be the animated element.\n const resolvedPopupRef = React.useMemo(() => {\n if (inline && positionerElement) {\n return {\n current: closest(positionerElement, '[role=\"dialog\"]')\n };\n }\n return popupRef;\n }, [inline, positionerElement]);\n const {\n mounted,\n transitionStatus,\n forceUnmount: handleUnmount\n } = useUnmountAfterClose({\n open,\n ref: resolvedPopupRef,\n preventUnmountOnClose,\n setPreventUnmountOnClose,\n onUnmount: handleUnmountCleanup\n });\n React.useImperativeHandle(props.actionsRef, () => ({\n unmount: handleUnmount,\n close: () => setOpen(false, createChangeEventDetails(REASONS.imperativeAction))\n }), [handleUnmount, setOpen]);\n useIsoLayoutEffect(function syncSelectedIndex() {\n const closeQueryReleased = previousCloseQueryRef.current !== null && closeQuery === null;\n previousCloseQueryRef.current = closeQuery;\n\n // Closing indexes against the frozen filtered list. Reopening releases that query, so its\n // rendered coordinates must be synchronized again even though the popup is already open.\n if (open && (!closeQueryReleased || !hasItems)) {\n return;\n }\n\n // State-driven (not tied to the internal event path) so controlled closes\n // also clear a pointerdown that never received a matching item mouseup.\n if (!open) {\n pointerDownItemRef.current = null;\n }\n if (selectionMode === 'none') {\n return;\n }\n\n // Without `items`, look the selection up in the live registry of mounted item\n // values (the list stays mounted while closed when closed-state features need\n // it — trigger interaction and rendered-label autofill force-mount it). Mounted\n // items re-assert the index themselves when their registration moves; when\n // nothing is mounted the lookup resolves to `null` and each item re-registers\n // the index on the next open.\n // Keep the selected index in the coordinates of the list that is actually rendered.\n const registry = hasItems ? flatFilteredValues : valuesRef.current;\n setIndices({\n selectedIndex: findSelectionIndex(registry, selectedValue, isItemEqualToValue, multiple)\n });\n }, [open, closeQuery, selectedValue, selectionMode, multiple, hasItems, flatFilteredValues, isItemEqualToValue, setIndices]);\n useIsoLayoutEffect(() => {\n if (items) {\n valuesRef.current = flatFilteredValues;\n listRef.current.length = flatFilteredValues.length;\n }\n }, [items, flatFilteredValues]);\n useIsoLayoutEffect(() => {\n // Controlled closes can bypass `setOpen`, and their exit animation may be interrupted.\n if (!open && pendingQueryHighlightRef.current?.hasQuery) {\n pendingQueryHighlightRef.current = null;\n }\n }, [open]);\n useIsoLayoutEffect(() => {\n // A kept-mounted dialog hides its inline list on close. Discard query-clear restoration\n // before it can overwrite the cleared highlight or report an item from the unfiltered list.\n if (!open && inline && resolvedPopupRef.current) {\n pendingQueryHighlightRef.current = null;\n return;\n }\n const candidateItems = hasItems || hasFilteredItemsProp ? flatFilteredValues : valuesRef.current;\n const pendingHighlight = pendingQueryHighlightRef.current;\n if (pendingHighlight) {\n // A directly rendered list remains visible when the popup state is closed, while a\n // kept-mounted Positioner is hidden and should stay inert.\n const listIsNavigable = open || inline || store.state.positionerElement?.hidden === false;\n if (pendingHighlight.hasQuery) {\n const input = inputRef.current;\n // Keep the request while results or a controlled popup opening are pending,\n // but do not restore an inline highlight after focus has left the input.\n if (!autoHighlightMode || String(inputValue).trim() === '' || inline && autoHighlightMode !== 'always' && (!input || activeElement(input.ownerDocument) !== input)) {\n pendingQueryHighlightRef.current = null;\n } else if (listIsNavigable && (\n // Individually rendered items register without re-running this effect, and their\n // registry has holes mid-reindex, so resolve their request immediately.\n candidateItems[0] !== undefined || !hasItems && !hasFilteredItemsProp)) {\n store.set('activeIndex', 0);\n pendingQueryHighlightRef.current = null;\n }\n } else if (String(inputValue).trim() === '') {\n // Only handle the clear once it has committed (a controlled input may reject it),\n // so a restore cannot fire while a query is still active.\n pendingQueryHighlightRef.current = null;\n if (listIsNavigable) {\n const clearedBySelection = pendingHighlight.selection;\n if (autoHighlightMode === 'always' && !clearedBySelection && store.state.selectionMode === 'none') {\n // There is no selection to restore in Autocomplete. Keep the first-item reset\n // synchronous so list navigation sees it before a directly rendered list closes.\n store.set('activeIndex', 0);\n }\n\n // Items re-mounted by the clear publish their composite indices in a follow-up\n // commit, so the item registries are mid-update here. Defer past React's cascade.\n queueMicrotask(() => {\n if (!store.state.open && (!store.state.inline || resolvedPopupRef.current) || inputRef.current && inputRef.current.value.trim() !== '') {\n return;\n }\n\n // Return the highlight to the selected item, the same anchor the popup uses\n // when it first opens. Read the selection through the store so consumers can\n // pass an inline `isItemEqualToValue` or a fresh `selectedValue` array without\n // re-running this effect on every render.\n const currentSelectedValue = store.state.selectedValue;\n const isMultiple = store.state.selectionMode === 'multiple';\n const hasSelection = isMultiple && Array.isArray(currentSelectedValue) ? currentSelectedValue.length > 0 : store.state.selectionMode !== 'none' && currentSelectedValue != null;\n if (hasSelection) {\n const registry = hasItems || hasFilteredItemsProp ? flatFilteredValues : valuesRef.current;\n // A selection-driven clear keeps the just-selected item highlighted;\n // otherwise return to the open anchor. A selection that is no longer in\n // the list drops the highlight rather than leaving it on whichever item\n // now occupies that index.\n // `findItemIndex` resolves to -1 when no value was toggled.\n const toggledIndex = findItemIndex(registry, pendingHighlight.toggledValue, store.state.isItemEqualToValue);\n store.set('activeIndex', toggledIndex !== -1 ? toggledIndex : findSelectionIndex(registry, currentSelectedValue, store.state.isItemEqualToValue, isMultiple));\n } else if (clearedBySelection) {\n store.set('activeIndex', null);\n } else if (autoHighlightMode === 'always') {\n store.set('activeIndex', 0);\n }\n });\n }\n }\n }\n if (!open && !inline) {\n return;\n }\n const storeActiveIndex = store.state.activeIndex;\n if (storeActiveIndex == null) {\n if (autoHighlightMode === 'always' && candidateItems.length > 0) {\n store.set('activeIndex', 0);\n return;\n }\n emitHighlight(undefined, -1, REASONS.none);\n return;\n }\n if (storeActiveIndex >= candidateItems.length) {\n emitHighlight(undefined, -1, REASONS.none);\n store.set('activeIndex', null);\n return;\n }\n const itemValue = candidateItems[storeActiveIndex];\n const previouslyHighlightedItemValue = lastHighlightRef.current.value;\n const isSameItem = previouslyHighlightedItemValue !== NO_ACTIVE_VALUE && compareItemEquality(itemValue, previouslyHighlightedItemValue, store.state.isItemEqualToValue);\n if (lastHighlightRef.current.index !== storeActiveIndex || !isSameItem) {\n emitHighlight(itemValue, storeActiveIndex, REASONS.none);\n }\n }, [activeIndex, autoHighlightMode, emitHighlight, hasFilteredItemsProp, hasItems, flatFilteredValues, inline, open, resolvedPopupRef, store,\n // Reruns the effect when the query changes without affecting the deps above, such as\n // clearing the input when no items are filtered out (individually rendered items).\n inputValue]);\n useIsoLayoutEffect(() => {\n if (selectionMode === 'none') {\n setFilled(String(inputValue) !== '');\n return;\n }\n setFilled(multiple ? Array.isArray(selectedValue) && selectedValue.length > 0 : selectedValue != null);\n }, [setFilled, selectionMode, inputValue, selectedValue, multiple]);\n\n // Ensures that the active index is not set to 0 when the list is empty.\n // This avoids needing to press ArrowDown twice under certain conditions.\n React.useEffect(() => {\n if (hasItems && autoHighlightMode && flatFilteredValues.length === 0) {\n setIndices({\n activeIndex: null\n });\n }\n }, [hasItems, autoHighlightMode, flatFilteredValues.length, setIndices]);\n function handleQueryChanged() {\n if (open && query !== '' && query !== String(initialDefaultInputValue) && !inputMatchesSelectedValue) {\n setQueryChangedAfterOpen(true);\n }\n }\n function handleOpenChanged() {\n // A controlled `open` prop can interrupt the close without calling `setOpen`.\n if (open && closeQuery !== null) {\n handleInterruptedReopen(false);\n }\n }\n\n // These sync triggers can run in the same commit while still seeing the pre-commit `inputValue`.\n // This render-scoped flag prevents duplicate callbacks and resets so canceled writes can retry.\n let syncedSelectedLabel = false;\n function syncInputToSelectedLabel() {\n if (!syncedSelectedLabel && inputValue !== selectedLabelString) {\n syncedSelectedLabel = true;\n setInputValue(selectedLabelString, createChangeEventDetails(REASONS.none));\n }\n }\n function handleSelectedValueChanged() {\n if (selectionMode === 'none') {\n return;\n }\n clearErrors(name);\n setDirty(isSelectedValueDirty(selectedValue, validityData.initialValue, isItemEqualToValue));\n validation.change(selectedValue);\n if (single && !hasInputValue && !inputInsidePopup) {\n syncInputToSelectedLabel();\n }\n }\n\n // The label catches accessor changes while the items identity restores the selected label after\n // a one-step input clear followed by a data reload. The shared sync prevents duplicate writes\n // when both change in the same commit.\n function syncInputAfterItemsOrLabelChange() {\n if (single && !hasInputValue && !inputInsidePopup && !queryChangedAfterOpen) {\n syncInputToSelectedLabel();\n }\n }\n function handleInputValueChanged() {\n if (selectionMode !== 'none') {\n return;\n }\n clearErrors(name);\n setDirty(inputValue !== validityData.initialValue);\n validation.change(inputValue);\n }\n useValueChanged(query, handleQueryChanged);\n useValueChanged(open, handleOpenChanged);\n useValueChanged(selectedValue, handleSelectedValueChanged);\n useValueChanged(selectedLabelString, syncInputAfterItemsOrLabelChange);\n useValueChanged(items, syncInputAfterItemsOrLabelChange);\n useValueChanged(inputValue, handleInputValueChanged);\n const floatingRootContext = useFloatingRootContext({\n open: inline ? true : open,\n onOpenChange: setOpen,\n elements: {\n reference: inputInsidePopup ? triggerElement : inputElement,\n floating: positionerElement\n }\n });\n const ariaHasPopup = grid ? 'grid' : 'listbox';\n // An inline list isn't gated on `open`: it renders for as long as it's in the tree, so the\n // combobox is permanently expanded even while the internal open state is `false`.\n const expanded = open || inline;\n const ariaExpanded = expanded ? 'true' : 'false';\n const role = React.useMemo(() => {\n const isPlainInput = inputElement?.tagName === 'INPUT';\n // During SSR and initial hydration, the input ref is not available yet.\n // Assume an input-like control so combobox ARIA attributes are present.\n const shouldTreatAsInput = inputElement == null || isPlainInput;\n // A non-input control only takes on combobox semantics while the list is exposed, which for\n // an inline list is the whole time.\n const shouldApplyAria = shouldTreatAsInput || expanded;\n const reference = shouldTreatAsInput ? {\n autoComplete: 'off',\n spellCheck: 'false',\n autoCorrect: 'off',\n autoCapitalize: 'none'\n } : {};\n if (shouldApplyAria) {\n reference.role = 'combobox';\n reference['aria-expanded'] = ariaExpanded;\n reference['aria-haspopup'] = ariaHasPopup;\n reference['aria-controls'] = expanded ? listElement?.id : undefined;\n // `readOnly` accepts no input, so no completion of any kind is offered.\n reference['aria-autocomplete'] = readOnly ? 'none' : autoComplete;\n }\n return {\n reference,\n floating: {\n role: 'presentation'\n }\n };\n }, [inputElement, expanded, ariaExpanded, ariaHasPopup, listElement?.id, autoComplete, readOnly]);\n\n // `readOnly` locks the value, not the interaction: the popup opens and can be browsed.\n // Value changes stay blocked in `ComboboxItem`, `ComboboxInput`'s keydown, `ComboboxTrigger`'s\n // typeahead, the clear/remove parts, and the hidden input's autofill handler.\n const click = useClick(floatingRootContext, {\n enabled: !disabled && openOnInputClick,\n event: 'mousedown-only',\n toggle: false,\n // Apply a small delay for touch to let mobile viewport/keyboard positioning settle.\n // This avoids top-bottom flip flickers if the preferred position is \"top\" when first tapping.\n touchOpenDelay: inputInsidePopup ? 0 : 100,\n reason: REASONS.inputPress\n });\n const dismiss = useDismiss(floatingRootContext, {\n enabled: !disabled && !inline,\n outsidePressEvent: {\n mouse: 'sloppy',\n // The visual viewport (affected by the mobile software keyboard) can be\n // somewhat small. The user may want to scroll the screen to see more of\n // the popup.\n touch: 'intentional'\n },\n // Without a popup, let the Escape key bubble the event up to other popups' handlers.\n bubbles: inline ? true : undefined,\n outsidePress(event) {\n const target = getTarget(event);\n return !contains(triggerElement, target) && !contains(clearRef.current, target) && !contains(chipsContainerRef.current, target) && !contains(inputGroupElement, target);\n }\n });\n const listNavigation = useListNavigation(floatingRootContext, {\n enabled: !disabled,\n id,\n listRef,\n activeIndex,\n selectedIndex,\n virtual: true,\n loopFocus,\n allowEscape: loopFocus && !autoHighlightMode,\n focusItemOnOpen: queryChangedAfterOpen || selectionMode === 'none' && !autoHighlightMode ? false : 'auto',\n focusItemOnHover: highlightItemOnHover,\n resetOnPointerLeave: !keepHighlight,\n orientation: grid ? 'horizontal' : undefined,\n rtl: direction === 'rtl',\n disabledIndices: EMPTY_ARRAY,\n grid: grid ? gridNavigation : undefined,\n onNavigate(nextActiveIndex, event) {\n // Ignore automatic navigation while closed, including selected-index sync for inline lists.\n // Inline lists remain navigable while `open` is false, so still allow resets (clearing the\n // highlight when an unbound inline list unmounts, e.g. in a closed dialog).\n if (!event && !open && !(inline && nextActiveIndex === null) || transitionStatus === 'ending') {\n return;\n }\n setIndices({\n activeIndex: nextActiveIndex,\n type: getHighlightReason(event),\n event: event?.nativeEvent\n });\n }\n });\n const inputProps = React.useMemo(() => mergeProps(listNavigation.reference, {\n onKeyDown(event) {\n // In grid mode the navigation hook treats ArrowLeft/ArrowRight as horizontal\n // grid movement. When the input has focus and no item is highlighted the user\n // is still editing the query, so let the input keep its native caret behavior.\n if (grid && store.state.activeIndex == null && (event.key === 'ArrowLeft' || event.key === 'ArrowRight')) {\n event.preventBaseUIHandler();\n }\n }\n }, dismiss.reference, click.reference, role.reference), [listNavigation.reference, dismiss.reference, click.reference, role.reference, grid, store]);\n const popupProps = React.useMemo(() => mergeProps(FOCUSABLE_POPUP_PROPS, dismiss.floating), [dismiss.floating]);\n const listProps = React.useMemo(() => mergeProps(listNavigation.floating, role.floating), [listNavigation.floating, role.floating]);\n const itemRoot = React.useMemo(() => {\n const listNavigationItemProps = listNavigation.item;\n return {\n // Combobox keeps focus on the input; item focus would incorrectly sync\n // list navigation state from DOM focus.\n props: listNavigationItemProps ? {\n ...listNavigationItemProps,\n onFocus: undefined\n } : EMPTY_OBJECT,\n id,\n selectionMode,\n disabled,\n readOnly,\n isItemEqualToValue\n };\n }, [listNavigation.item, id, selectionMode, disabled, readOnly, isItemEqualToValue]);\n store.useContextCallback('setOpen', setOpen);\n store.useContextCallback('setInputValue', setInputValue);\n store.useContextCallback('setSelectedValue', setSelectedValue);\n store.useContextCallback('setIndices', setIndices);\n store.useContextCallback('handleSelection', handleSelection);\n store.useContextCallback('forceMount', forceMount);\n store.useContextCallback('requestSubmit', requestSubmit);\n store.useContextCallback('onOpenChangeComplete', onOpenChangeCompleteProp);\n\n // The prop bags must be in the store before the parts render: they read them with `useStore`\n // during render, and a layout effect commits only after all children have rendered.\n useOnFirstRender(() => {\n store.update({\n inline: inlineProp,\n popupProps,\n listProps,\n inputProps,\n triggerProps,\n itemRoot\n });\n });\n const syncedValues = {\n id,\n selectedValue,\n open,\n mounted,\n transitionStatus,\n items: storeItems,\n inline: inlineProp,\n popupProps,\n listProps,\n inputProps,\n triggerProps,\n itemRoot,\n openMethod,\n selectionMode,\n name,\n form,\n disabled,\n readOnly,\n required,\n grid,\n virtualized,\n openOnInputClick,\n itemToStringLabel,\n modal,\n autoHighlight: autoHighlightMode,\n isItemEqualToValue,\n submitOnItemClick,\n hasInputValue\n };\n useIsoLayoutEffect(() => {\n // `inputOwnsFormValue` is derived here rather than during render because `ComboboxInput`\n // writes it from a ref callback earlier in the same commit, and it has to land in this same\n // `update` so subscribers never observe an intermediate snapshot. That is also why\n // `store.useSyncedValues` can't be used yet: it would need a second write. The dependencies\n // are derived from `syncedValues` so a newly synchronized field can't be forgotten here.\n store.update({\n ...syncedValues,\n inputOwnsFormValue: selectionMode === 'none' && (inlineProp || !store.state.inputInsidePopup)\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [store, ...Object.values(syncedValues)]);\n const hiddenInputRef = useMergedRefs(inputRefProp, validation.inputRef);\n const itemsContextValue = React.useMemo(() => ({\n query,\n hasItems,\n filteredItems,\n flatFilteredValues\n }), [query, hasItems, filteredItems, flatFilteredValues]);\n const serializedValue = React.useMemo(() => {\n if (Array.isArray(fieldRawValue)) {\n return '';\n }\n return stringifyAsValue(fieldRawValue, itemToStringValue);\n }, [fieldRawValue, itemToStringValue]);\n const hasMultipleSelection = multiple && Array.isArray(selectedValue) && selectedValue.length > 0;\n const hiddenInputName = multiple || selectionMode === 'none' && inputOwnsFormValue ? undefined : name;\n const hiddenInputs = React.useMemo(() => {\n if (!multiple || !Array.isArray(selectedValue) || !name) {\n return null;\n }\n return selectedValue.map(value => {\n const currentSerializedValue = stringifyAsValue(value, itemToStringValue);\n return /*#__PURE__*/_jsx(\"input\", {\n type: \"hidden\",\n form: form,\n name: name,\n value: currentSerializedValue,\n disabled: disabled\n }, currentSerializedValue);\n });\n }, [multiple, selectedValue, form, name, itemToStringValue, disabled]);\n const children = /*#__PURE__*/_jsxs(React.Fragment, {\n children: [props.children, /*#__PURE__*/_jsx(\"input\", {\n ...validation.getValidationProps(disabled, {\n // Move focus when the hidden input is focused.\n onFocus() {\n if (inputInsidePopup) {\n triggerElement?.focus();\n return;\n }\n (inputRef.current || triggerElement)?.focus();\n },\n // Handle browser autofill.\n onChange(event) {\n // Workaround for https://github.com/react/react/issues/9023\n if (event.nativeEvent.defaultPrevented || disabled || readOnly) {\n return;\n }\n const nextValue = event.currentTarget.value;\n const nextValueLower = nextValue.toLowerCase();\n const details = createChangeEventDetails(REASONS.none, event.nativeEvent);\n const findSerializedMatchIndex = () => valuesRef.current.findIndex(candidate => stringifyAsValue(candidate, itemToStringValue).toLowerCase() === nextValueLower || stringifyValueLabel(candidate).toLowerCase() === nextValueLower);\n function handleChange() {\n // Browser autofill only writes a single scalar value.\n if (multiple) {\n return;\n }\n if (selectionMode === 'none') {\n setInputValue(nextValue, details);\n return;\n }\n\n // Preserve the original serialized matching, then fall back to rendered text,\n // which browsers can autofill for primitive values like `value=\"US\">United States`.\n let matchingIndex = findSerializedMatchIndex();\n if (matchingIndex === -1) {\n matchingIndex = valuesRef.current.findIndex((_, index) => {\n const renderedLabel = labelsRef.current[index];\n return renderedLabel != null && renderedLabel.toLowerCase() === nextValueLower;\n });\n }\n const matchingValue = matchingIndex === -1 ? undefined : valuesRef.current[matchingIndex];\n if (matchingValue != null) {\n // `setSelectedValue` may be canceled by `onValueChange`; rely on\n // `useValueChanged` to mark the field dirty and run validation only\n // when the value actually changes.\n setSelectedValue?.(matchingValue, details);\n }\n }\n\n // Only single-selection autofill matches against the registered values/labels.\n // `multiple` ignores autofill and `none` just writes the input value, so avoid the\n // sticky `forceMounted` mount (which never resets) for those modes.\n if (single) {\n forceMount();\n if (items && findSerializedMatchIndex() === -1) {\n // `forceMount` only refreshes the derived labels for the `items` prop. When\n // serialized matching misses, also mount the list so rendered labels (which can\n // differ from the serialized values) are registered for autofill matching.\n store.set('forceMounted', true);\n }\n }\n queueMicrotask(handleChange);\n }\n }),\n id: id && hiddenInputName == null ? `${id}-hidden-input` : undefined,\n form: form,\n name: hiddenInputName,\n autoComplete: formAutoComplete,\n disabled: disabled,\n required: required && !hasMultipleSelection,\n readOnly: readOnly,\n value: serializedValue,\n ref: hiddenInputRef,\n style: hiddenInputName ? visuallyHiddenInput : visuallyHidden,\n tabIndex: -1,\n \"aria-hidden\": true,\n suppressHydrationWarning: true\n }), hiddenInputs]\n });\n return /*#__PURE__*/_jsx(ComboboxRootContext.Provider, {\n value: store,\n children: /*#__PURE__*/_jsx(ComboboxFloatingContext.Provider, {\n value: floatingRootContext,\n children: /*#__PURE__*/_jsx(ComboboxHasItemsContext.Provider, {\n value: hasItems,\n children: /*#__PURE__*/_jsx(ComboboxDerivedItemsContext.Provider, {\n value: itemsContextValue,\n children: /*#__PURE__*/_jsx(ComboboxInputValueContext.Provider, {\n value: inputValue,\n children: children\n })\n })\n })\n })\n });\n}","'use client';\n\nimport * as React from 'react';\nimport { AriaCombobox } from \"./AriaCombobox.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Groups all parts of the combobox.\n * Doesn't render its own HTML element.\n *\n * Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)\n */\nexport function ComboboxRoot(props) {\n const {\n multiple = false,\n defaultValue,\n value,\n onValueChange,\n autoComplete,\n ...other\n } = props;\n return /*#__PURE__*/_jsx(AriaCombobox, {\n ...other,\n selectionMode: multiple ? 'multiple' : 'single',\n selectedValue: value,\n defaultSelectedValue: defaultValue,\n onSelectedValueChange: onValueChange,\n formAutoComplete: autoComplete\n });\n}","import { CommonTriggerDataAttributes } from \"../../utils/popupStateMapping.mjs\";\n\n/**\n * Present when the corresponding popup is open.\n */\nexport const popupOpen = CommonTriggerDataAttributes.popupOpen;\n/**\n * Present when the input is pressed.\n */\nexport const pressed = CommonTriggerDataAttributes.pressed;\n/**\n * Present when the component is disabled.\n */\nexport const disabled = 'data-disabled';\n/**\n * Present when the component is readonly.\n */\nexport const readonly = 'data-readonly';\n/**\n * Indicates which side the corresponding popup is positioned relative to its anchor.\n * @type {'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start' | null}\n */\nexport const popupSide = 'data-popup-side';\n/**\n * Present when the component is required.\n */\nexport const required = 'data-required';\n/**\n * Present when the component is in a valid state (when wrapped in Field.Root).\n */\nexport const valid = 'data-valid';\n/**\n * Present when the component is in an invalid state (when wrapped in Field.Root).\n */\nexport const invalid = 'data-invalid';\n/**\n * Present when the component has been touched (when wrapped in Field.Root).\n */\nexport const touched = 'data-touched';\n/**\n * Present when the component's value has changed (when wrapped in Field.Root).\n */\nexport const dirty = 'data-dirty';\n/**\n * Present when the component has a value (when wrapped in Field.Root).\n */\nexport const filled = 'data-filled';\n/**\n * Present when the input is focused (when wrapped in Field.Root).\n */\nexport const focused = 'data-focused';\n/**\n * Present when the corresponding items list is empty.\n */\nexport const listEmpty = 'data-list-empty';","import { pressableTriggerOpenStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport { fieldValidityMapping } from \"../../internals/field-constants/constants.mjs\";\nimport * as ComboboxInputDataAttributes from \"../input/ComboboxInputDataAttributes.mjs\";\nexport const triggerStateAttributesMapping = {\n ...pressableTriggerOpenStateMapping,\n ...fieldValidityMapping,\n popupSide: side => side ? {\n [ComboboxInputDataAttributes.popupSide]: side\n } : null,\n listEmpty: empty => empty ? {\n [ComboboxInputDataAttributes.listEmpty]: ''\n } : null\n};","'use client';\n\nimport * as React from 'react';\nexport const ComboboxChipsContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") ComboboxChipsContext.displayName = \"ComboboxChipsContext\";\nexport function useComboboxChipsContext() {\n return React.useContext(ComboboxChipsContext);\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const ComboboxPositionerContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") ComboboxPositionerContext.displayName = \"ComboboxPositionerContext\";\nexport function useComboboxPositionerContext(optional) {\n const context = React.useContext(ComboboxPositionerContext);\n if (context === undefined && !optional) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: <Combobox.Popup> and <Combobox.Arrow> must be used within the <Combobox.Positioner> component' : _formatErrorMessage(21));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\nimport { visuallyHiddenInput } from '@base-ui/utils/visuallyHidden';\nimport { useButton } from \"../../internals/use-button/index.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useComboboxRootContext } from \"../root/ComboboxRootContext.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * @internal\n */\nexport const ComboboxInternalDismissButton = /*#__PURE__*/React.forwardRef(function ComboboxInternalDismissButton(_, forwardedRef) {\n const store = useComboboxRootContext();\n const {\n buttonRef,\n getButtonProps\n } = useButton({\n native: false\n });\n const mergedRef = useMergedRefs(forwardedRef, buttonRef);\n function handleDismiss(event) {\n store.context.setOpen(false, createChangeEventDetails(REASONS.closePress, event.nativeEvent, event.currentTarget));\n }\n const dismissProps = getButtonProps({\n onClick: handleDismiss\n });\n return /*#__PURE__*/_jsx(\"span\", {\n ref: mergedRef,\n ...dismissProps,\n \"aria-label\": \"Dismiss\",\n tabIndex: undefined,\n style: visuallyHiddenInput\n });\n});\nif (process.env.NODE_ENV !== \"production\") ComboboxInternalDismissButton.displayName = \"ComboboxInternalDismissButton\";","'use client';\n\nimport { useComboboxDerivedItemsContext } from \"../root/ComboboxRootContext.mjs\";\n/**\n * The popup side is only meaningful while the positioner is mounted, as the store retains the\n * last resolved side after the popup unmounts.\n */\nexport function usePopupSide(store) {\n const mounted = store.useState('mounted');\n const popupSide = store.useState('popupSide');\n const positionerElement = store.useState('positionerElement');\n return mounted && positionerElement ? popupSide : null;\n}\n\n/**\n * Whether the filtered list has no items to show.\n */\nexport function useListEmpty() {\n return useComboboxDerivedItemsContext().filteredItems.length === 0;\n}\n\n/**\n * The arrow keys that move the chip highlight backwards and forwards, in that order.\n */\nexport function getChipNavigationKeys(direction) {\n return direction === 'rtl' ? ['ArrowRight', 'ArrowLeft'] : ['ArrowLeft', 'ArrowRight'];\n}\n\n/**\n * Where the highlight lands once the chip at `index` is removed, or `undefined` for no highlight.\n */\nexport function getIndexAfterChipRemoval(index, chipCount) {\n const nextIndex = index >= chipCount - 1 ? chipCount - 2 : index;\n return nextIndex >= 0 ? nextIndex : undefined;\n}\n\n/**\n * Commits the highlighted item by clicking it, tagging the originating event so the item's\n * handler can attribute the selection to it.\n */\nexport function clickHighlightedItem(store, activeIndex, nativeEvent) {\n const listItem = store.context.listRef.current[activeIndex];\n if (listItem) {\n store.context.selectionEventRef.current = nativeEvent;\n listItem.click();\n store.context.selectionEventRef.current = null;\n }\n}","'use client';\n\nimport * as React from 'react';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { platform } from '@base-ui/utils/platform';\nimport { useBaseUiId } from \"../../internals/useBaseUiId.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useComboboxInputValueContext, useComboboxRootContext } from \"../root/ComboboxRootContext.mjs\";\nimport { triggerStateAttributesMapping } from \"../utils/stateAttributesMapping.mjs\";\nimport { DEFAULT_FIELD_ROOT_CONTEXT, FieldRootContext, useFieldRootContext } from \"../../internals/field-root-context/FieldRootContext.mjs\";\nimport { useSetFieldFocused } from \"../../internals/field-root-context/useSetFieldFocused.mjs\";\nimport { DEFAULT_FIELD_STATE_ATTRIBUTES } from \"../../internals/field-constants/constants.mjs\";\nimport { useLabelableContext } from \"../../internals/labelable-provider/LabelableContext.mjs\";\nimport { useComboboxChipsContext } from \"../chips/ComboboxChipsContext.mjs\";\nimport { stopEvent } from \"../../floating-ui-react/utils.mjs\";\nimport { useComboboxPositionerContext } from \"../positioner/ComboboxPositionerContext.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { getHighlightReason } from \"../../utils/getHighlightReason.mjs\";\nimport { useDirection } from \"../../internals/direction-context/DirectionContext.mjs\";\nimport { ComboboxInternalDismissButton } from \"../utils/ComboboxInternalDismissButton.mjs\";\nimport { clickHighlightedItem, getChipNavigationKeys, useListEmpty, usePopupSide } from \"../utils/parts.mjs\";\n\n/**\n * A text input to search for items in the list.\n * Renders an `<input>` element.\n *\n * Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const ComboboxInput = /*#__PURE__*/React.forwardRef(function ComboboxInput(componentProps, forwardedRef) {\n const {\n render,\n className,\n disabled: disabledProp = false,\n id: idProp,\n style,\n ...elementProps\n } = componentProps;\n const {\n state: fieldState,\n disabled: fieldDisabled,\n setTouched,\n validationMode,\n validation\n } = useFieldRootContext();\n const {\n labelId: fieldLabelId\n } = useLabelableContext();\n const comboboxChipsContext = useComboboxChipsContext();\n const positioning = useComboboxPositionerContext(true);\n const hasPositionerParent = Boolean(positioning);\n const store = useComboboxRootContext();\n // `inputValue` can't be placed in the store.\n // https://github.com/mui/base-ui/issues/2703\n const inputValue = useComboboxInputValueContext();\n const direction = useDirection();\n const required = store.useState('required');\n const comboboxDisabled = store.useState('disabled');\n const readOnly = store.useState('readOnly');\n const name = store.useState('name');\n const form = store.useState('form');\n const selectionMode = store.useState('selectionMode');\n const autoHighlightMode = store.useState('autoHighlight');\n const inputProps = store.useState('inputProps');\n const triggerProps = store.useState('triggerProps');\n const open = store.useState('open');\n const mounted = store.useState('mounted');\n const selectedValue = store.useState('selectedValue');\n const rootId = store.useState('id');\n const inline = store.useState('inline');\n const modal = store.useState('modal');\n const autoHighlightEnabled = Boolean(autoHighlightMode);\n const popupSide = usePopupSide(store);\n const disabled = fieldDisabled || comboboxDisabled || disabledProp;\n const listEmpty = useListEmpty();\n const setFocused = useSetFieldFocused(disabled, store.context.inputRef);\n const isInsidePopup = hasPositionerParent || inline;\n const focusManagerModal = !isInsidePopup || modal;\n const id = useBaseUiId(idProp ?? (!isInsidePopup ? rootId : undefined));\n const fieldStateForInput = hasPositionerParent ? DEFAULT_FIELD_STATE_ATTRIBUTES : fieldState;\n const [composingValue, setComposingValue] = React.useState(null);\n const isComposingRef = React.useRef(false);\n const lastActiveIndexRef = React.useRef(null);\n\n // Restore the saved highlight on refocus only within the same open cycle.\n useIsoLayoutEffect(() => {\n if (!open) {\n lastActiveIndexRef.current = null;\n }\n }, [open]);\n const inputOwnsFormValue = selectionMode === 'none' && !hasPositionerParent;\n const setInputElement = useStableCallback(element => {\n const nextIsInsidePopup = hasPositionerParent || store.state.inline;\n if (nextIsInsidePopup && !store.state.hasInputValue) {\n store.context.setInputValue('', createChangeEventDetails(REASONS.none));\n }\n store.update({\n inputElement: element,\n inputInsidePopup: nextIsInsidePopup,\n inputOwnsFormValue\n });\n });\n const validationProps = hasPositionerParent ? elementProps : validation.getValidationProps(disabled, elementProps);\n function clearHighlight(event) {\n store.context.setIndices({\n activeIndex: null,\n selectedIndex: null,\n type: getHighlightReason(event),\n event\n });\n }\n const state = {\n ...fieldStateForInput,\n open,\n disabled,\n readOnly,\n popupSide,\n listEmpty\n };\n function handleKeyDown(event) {\n if (!comboboxChipsContext) {\n return undefined;\n }\n let nextIndex;\n const renderedChipsCount = comboboxChipsContext.chipsRef.current.length;\n const [previousChipKey] = getChipNavigationKeys(direction);\n if (event.key === previousChipKey && (event.currentTarget.selectionStart ?? 0) === 0 && selectedValue.length > 0) {\n event.preventDefault();\n nextIndex = renderedChipsCount > 0 ? renderedChipsCount - 1 : undefined;\n }\n return nextIndex;\n }\n const element = useRenderElement('input', componentProps, {\n state,\n ref: [forwardedRef, store.context.inputRef, setInputElement],\n props: [inputProps, triggerProps, {\n value: composingValue ?? inputValue,\n 'aria-readonly': readOnly || undefined,\n 'aria-required': required || undefined,\n 'aria-labelledby': fieldLabelId,\n disabled,\n readOnly,\n required: selectionMode === 'none' ? required : undefined,\n form,\n ...(inputOwnsFormValue && name && {\n name\n }),\n id,\n onFocus() {\n setFocused(true);\n if (!inline) {\n return;\n }\n const nextActiveIndex = lastActiveIndexRef.current;\n lastActiveIndexRef.current = null;\n if (nextActiveIndex == null ||\n // `valuesRef` can be sparse, so guard against restoring a removed slot.\n !Object.hasOwn(store.context.valuesRef.current, nextActiveIndex)) {\n return;\n }\n store.context.setIndices({\n activeIndex: nextActiveIndex\n });\n },\n onBlur() {\n setTouched(true);\n setFocused(false);\n const activeIndex = store.state.activeIndex;\n if (inline && activeIndex !== null && autoHighlightMode !== 'always') {\n lastActiveIndexRef.current = activeIndex;\n store.context.setIndices({\n activeIndex: null\n });\n }\n if (validationMode === 'onBlur') {\n const valueToValidate = selectionMode === 'none' ? inputValue : selectedValue;\n validation.commit(valueToValidate);\n }\n },\n onCompositionStart(event) {\n if (platform.os.android) {\n return;\n }\n isComposingRef.current = true;\n setComposingValue(event.currentTarget.value);\n },\n onCompositionEnd(event) {\n isComposingRef.current = false;\n const next = event.currentTarget.value;\n setComposingValue(null);\n store.context.setInputValue(next, createChangeEventDetails(REASONS.inputChange, event.nativeEvent));\n },\n onChange(event) {\n const nativeEvent = event.nativeEvent;\n // Autofill may not provide `inputType` (Chrome) or may report\n // `insertReplacementText` (Firefox).\n const inputType = nativeEvent.inputType;\n const autofillLikeInput = !inputType || inputType === 'insertReplacementText';\n // During composition the input is always considered typed into.\n const shouldOpenOnInput = isComposingRef.current || !autofillLikeInput;\n function maybeOpenOnInput(trimmed) {\n if (readOnly || disabled || !trimmed || !shouldOpenOnInput) {\n return;\n }\n store.context.setOpen(true, createChangeEventDetails(REASONS.inputChange, nativeEvent));\n // When autoHighlight is enabled, keep the highlight (will be set to 0 in root).\n if (!autoHighlightEnabled) {\n clearHighlight(nativeEvent);\n }\n }\n\n // During IME composition, avoid propagating controlled updates to prevent\n // filtering the options prematurely so `Empty` won't show incorrectly.\n // We can't rely on this check for Android due to how it handles composition\n // events with some keyboards (e.g. Samsung keyboard with predictive text on\n // treats all text as always-composing).\n // https://github.com/mui/base-ui/issues/2942\n if (isComposingRef.current) {\n const nextVal = event.currentTarget.value;\n setComposingValue(nextVal);\n if (nextVal === '' && !store.state.openOnInputClick && !store.state.inputInsidePopup) {\n store.context.setOpen(false, createChangeEventDetails(REASONS.inputClear, nativeEvent));\n }\n const trimmed = nextVal.trim();\n const shouldMaintainHighlight = autoHighlightEnabled && trimmed !== '';\n maybeOpenOnInput(trimmed);\n if (open && store.state.activeIndex !== null && !shouldMaintainHighlight) {\n clearHighlight(nativeEvent);\n }\n return;\n }\n const inputChangeDetails = createChangeEventDetails(REASONS.inputChange, nativeEvent);\n store.context.setInputValue(event.currentTarget.value, inputChangeDetails);\n if (inputChangeDetails.isCanceled) {\n return;\n }\n const empty = event.currentTarget.value === '';\n const clearDetails = createChangeEventDetails(REASONS.inputClear, nativeEvent);\n if (empty && !store.state.inputInsidePopup) {\n if (selectionMode === 'single') {\n store.context.setSelectedValue(null, clearDetails);\n }\n if (!store.state.openOnInputClick) {\n store.context.setOpen(false, clearDetails);\n }\n }\n maybeOpenOnInput(event.currentTarget.value.trim());\n\n // When the user types, ensure the list resets its highlight so that\n // virtual focus returns to the input (aria-activedescendant is\n // cleared).\n if (open && store.state.activeIndex !== null && !autoHighlightEnabled) {\n clearHighlight(nativeEvent);\n }\n },\n onKeyDown(event) {\n if (event.ctrlKey || event.shiftKey || event.altKey || event.metaKey) {\n return;\n }\n if (disabled || readOnly) {\n // Browsing can highlight an item, and Enter there must not submit the form.\n if (readOnly && event.key === 'Enter' && open && store.state.activeIndex !== null) {\n stopEvent(event);\n }\n return;\n }\n const input = event.currentTarget;\n const scrollAmount = input.scrollWidth - input.clientWidth;\n const isRTL = direction === 'rtl';\n if (event.key === 'Home') {\n stopEvent(event);\n const cursor = platform.engine.gecko && isRTL ? input.value.length : 0;\n input.setSelectionRange(cursor, cursor);\n input.scrollLeft = 0;\n return;\n }\n if (event.key === 'End') {\n stopEvent(event);\n const cursor = platform.engine.gecko && isRTL ? 0 : input.value.length;\n input.setSelectionRange(cursor, cursor);\n input.scrollLeft = isRTL ? -scrollAmount : scrollAmount;\n return;\n }\n if (!mounted && event.key === 'Escape') {\n const isClear = selectionMode === 'multiple' && Array.isArray(selectedValue) ? selectedValue.length === 0 : selectedValue === null;\n const details = createChangeEventDetails(REASONS.escapeKey, event.nativeEvent);\n const value = selectionMode === 'multiple' ? [] : null;\n store.context.setInputValue('', details);\n store.context.setSelectedValue(value, details);\n if (!isClear && !store.state.inline && !details.isPropagationAllowed) {\n event.stopPropagation();\n }\n return;\n }\n\n // Handle deletion when the input is empty.\n if (comboboxChipsContext && event.key === 'Backspace' && input.value === '' && Array.isArray(selectedValue) && selectedValue.length > 0) {\n const renderedChipsCount = comboboxChipsContext.chipsRef.current.length;\n const removalIndex = renderedChipsCount > 0 ? renderedChipsCount - 1 : selectedValue.length - 1;\n const newValue = selectedValue.filter((_, index) => index !== removalIndex);\n // If the removed item was also the active (highlighted) item, clear highlight\n clearHighlight(event.nativeEvent);\n store.context.setSelectedValue(newValue, createChangeEventDetails(REASONS.none, event.nativeEvent));\n return;\n }\n const nextIndex = handleKeyDown(event);\n if (nextIndex !== undefined) {\n comboboxChipsContext?.chipsRef.current[nextIndex]?.focus();\n }\n\n // event.isComposing\n if (event.which === 229) {\n return;\n }\n if (event.key === 'Enter' && open) {\n const activeIndex = store.state.activeIndex;\n const nativeEvent = event.nativeEvent;\n if (activeIndex === null) {\n if (inline) {\n return;\n }\n\n // Allow form submission when no item is highlighted.\n store.context.setOpen(false, createChangeEventDetails(REASONS.none, nativeEvent));\n return;\n }\n stopEvent(event);\n clickHighlightedItem(store, activeIndex, nativeEvent);\n }\n }\n }, validationProps],\n stateAttributesMapping: triggerStateAttributesMapping\n });\n const renderedInput = hasPositionerParent ? /*#__PURE__*/_jsx(FieldRootContext.Provider, {\n value: DEFAULT_FIELD_ROOT_CONTEXT,\n children: element\n }) : element;\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [open && focusManagerModal && /*#__PURE__*/_jsx(ComboboxInternalDismissButton, {\n ref: store.context.startDismissRef\n }), renderedInput]\n });\n});\nif (process.env.NODE_ENV !== \"production\") ComboboxInput.displayName = \"ComboboxInput\";","import { isElement } from '@floating-ui/utils/dom';\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { getTarget, isInteractiveElement } from \"../../floating-ui-react/utils/element.mjs\";\nexport function handleInputPress(event, store, disabled, shouldIgnoreTarget) {\n if (event.baseUIHandlerPrevented) {\n return;\n }\n const target = getTarget(event.nativeEvent);\n const targetElement = isElement(target) ? target : null;\n if (targetElement !== event.currentTarget && (shouldIgnoreTarget?.(targetElement) || isInteractiveElement(targetElement))) {\n return;\n }\n event.preventDefault();\n if (disabled) {\n return;\n }\n store.context.inputRef.current?.focus();\n if (store.state.openOnInputClick) {\n store.context.setOpen(true, createChangeEventDetails(REASONS.inputPress, event.nativeEvent));\n }\n}","'use client';\n\nimport * as React from 'react';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useFieldRootContext } from \"../../internals/field-root-context/FieldRootContext.mjs\";\nimport { useComboboxRootContext } from \"../root/ComboboxRootContext.mjs\";\nimport { triggerStateAttributesMapping } from \"../utils/stateAttributesMapping.mjs\";\nimport { handleInputPress } from \"../utils/handleInputPress.mjs\";\nimport { useListEmpty, usePopupSide } from \"../utils/parts.mjs\";\nimport { contains } from \"../../floating-ui-react/utils/element.mjs\";\n\n/**\n * A wrapper for the input and its associated controls.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)\n */\nexport const ComboboxInputGroup = /*#__PURE__*/React.forwardRef(function ComboboxInputGroup(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n const {\n state: fieldState\n } = useFieldRootContext();\n const store = useComboboxRootContext();\n const open = store.useState('open');\n const comboboxDisabled = store.useState('disabled');\n const readOnly = store.useState('readOnly');\n const hasSelectedValue = store.useState('hasSelectedValue');\n const selectionMode = store.useState('selectionMode');\n const popupSide = usePopupSide(store);\n const disabled = comboboxDisabled;\n const listEmpty = useListEmpty();\n const placeholder = selectionMode === 'none' ? false : !hasSelectedValue;\n const state = {\n ...fieldState,\n open,\n disabled,\n readOnly,\n popupSide,\n listEmpty,\n placeholder\n };\n const setInputGroupElement = useStableCallback(element => {\n store.set('inputGroupElement', element);\n });\n return useRenderElement('div', componentProps, {\n ref: [forwardedRef, setInputGroupElement],\n props: [{\n role: 'group',\n onMouseDown(event) {\n handleInputPress(event, store, disabled, target => {\n return contains(store.context.chipsContainerRef.current, target);\n });\n }\n }, elementProps],\n state,\n stateAttributesMapping: triggerStateAttributesMapping\n });\n});\nif (process.env.NODE_ENV !== \"production\") ComboboxInputGroup.displayName = \"ComboboxInputGroup\";","'use client';\n\nimport * as React from 'react';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { ownerDocument } from '@base-ui/utils/owner';\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useButton } from \"../../internals/use-button/index.mjs\";\nimport { useComboboxFloatingContext, useComboboxInputValueContext, useComboboxRootContext } from \"../root/ComboboxRootContext.mjs\";\nimport { triggerStateAttributesMapping } from \"../utils/stateAttributesMapping.mjs\";\nimport { useFieldRootContext } from \"../../internals/field-root-context/FieldRootContext.mjs\";\nimport { useSetFieldFocused } from \"../../internals/field-root-context/useSetFieldFocused.mjs\";\nimport { useLabelableContext } from \"../../internals/labelable-provider/LabelableContext.mjs\";\nimport { stopEvent, contains, getTarget } from \"../../floating-ui-react/utils.mjs\";\nimport { isMouseWithinBounds } from \"../../utils/getPseudoElementBounds.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useClick, useTypeahead } from \"../../floating-ui-react/index.mjs\";\nimport { useLabelableId } from \"../../internals/labelable-provider/useLabelableId.mjs\";\nimport { resolveAriaLabelledBy } from \"../../utils/resolveAriaLabelledBy.mjs\";\nimport { getComboboxPopupId } from \"../root/utils/index.mjs\";\nimport { useListEmpty, usePopupSide } from \"../utils/parts.mjs\";\n\n/**\n * A button that opens the popup.\n * Renders a `<button>` element.\n *\n * Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)\n */\nexport const ComboboxTrigger = /*#__PURE__*/React.forwardRef(function ComboboxTrigger(componentProps, forwardedRef) {\n const {\n render,\n className,\n nativeButton = true,\n disabled: disabledProp = false,\n id: idProp,\n style,\n ...elementProps\n } = componentProps;\n const {\n state: fieldState,\n disabled: fieldDisabled,\n setTouched,\n validationMode,\n validation\n } = useFieldRootContext();\n const {\n labelId: fieldLabelId\n } = useLabelableContext();\n const store = useComboboxRootContext();\n const selectionMode = store.useState('selectionMode');\n const comboboxDisabled = store.useState('disabled');\n const readOnly = store.useState('readOnly');\n const required = store.useState('required');\n const positionerElement = store.useState('positionerElement');\n const listElement = store.useState('listElement');\n const storedPopupId = store.useState('popupId');\n const triggerProps = store.useState('triggerProps');\n const inputInsidePopup = store.useState('inputInsidePopup');\n const rootId = store.useState('id');\n const comboboxLabelId = store.useState('labelId');\n const open = store.useState('open');\n const selectedValue = store.useState('selectedValue');\n const activeIndex = store.useState('activeIndex');\n const selectedIndex = store.useState('selectedIndex');\n const hasSelectedValue = store.useState('hasSelectedValue');\n const floatingRootContext = useComboboxFloatingContext();\n const inputValue = useComboboxInputValueContext();\n const focusTimeout = useTimeout();\n const disabled = fieldDisabled || comboboxDisabled || disabledProp;\n const listEmpty = useListEmpty();\n const popupSide = usePopupSide(store);\n const triggerRef = React.useRef(null);\n const setFocused = useSetFieldFocused(disabled, triggerRef);\n useLabelableId({\n id: inputInsidePopup ? idProp : undefined\n });\n const id = inputInsidePopup ? idProp ?? rootId : idProp;\n const ariaLabelledBy = resolveAriaLabelledBy(fieldLabelId, comboboxLabelId);\n let ariaControls;\n if (open && inputInsidePopup) {\n // Fall back to the default id while the popup registers its own (custom ids are stored once the\n // popup mounts), so `aria-controls` is set on the same commit `open` becomes `true`.\n ariaControls = storedPopupId ?? getComboboxPopupId(rootId);\n } else if (open) {\n ariaControls = listElement?.id;\n }\n const currentPointerTypeRef = React.useRef('');\n function trackPointerType(event) {\n currentPointerTypeRef.current = event.pointerType;\n }\n const {\n reference: triggerTypeaheadProps\n } = useTypeahead(floatingRootContext, {\n // Typeahead on a closed trigger commits a value rather than moving a highlight, so it stays\n // gated on `readOnly`.\n enabled: !open && !readOnly && !comboboxDisabled && selectionMode === 'single',\n listRef: store.context.labelsRef,\n activeIndex,\n selectedIndex,\n onMatch(index) {\n const nextSelectedValue = store.context.valuesRef.current[index];\n if (nextSelectedValue !== undefined) {\n store.context.setSelectedValue(nextSelectedValue, createChangeEventDetails(REASONS.none));\n }\n }\n });\n const {\n reference: triggerClickProps\n } = useClick(floatingRootContext, {\n enabled: !comboboxDisabled,\n event: 'mousedown'\n });\n const {\n buttonRef,\n getButtonProps\n } = useButton({\n native: nativeButton,\n disabled\n });\n const state = {\n ...fieldState,\n readOnly,\n open,\n disabled,\n popupSide,\n listEmpty,\n placeholder: selectionMode === 'none' ? false : !hasSelectedValue\n };\n const setTriggerElement = useStableCallback(element => {\n store.set('triggerElement', element);\n });\n const element = useRenderElement('button', componentProps, {\n ref: [forwardedRef, buttonRef, triggerRef, setTriggerElement],\n state,\n props: [triggerProps, triggerClickProps, triggerTypeaheadProps, {\n id,\n tabIndex: inputInsidePopup ? 0 : -1,\n role: inputInsidePopup ? 'combobox' : undefined,\n 'aria-expanded': open,\n 'aria-haspopup': inputInsidePopup ? 'dialog' : 'listbox',\n 'aria-controls': ariaControls,\n 'aria-required': inputInsidePopup ? required || undefined : undefined,\n // Only valid alongside the `combobox` role; without it the trigger is a plain button, and\n // the `Combobox.Input` outside the popup already carries `aria-readonly`.\n 'aria-readonly': inputInsidePopup ? readOnly || undefined : undefined,\n 'aria-labelledby': ariaLabelledBy,\n onPointerDown: trackPointerType,\n onPointerEnter: trackPointerType,\n onFocus() {\n setFocused(true);\n if (disabled) {\n return;\n }\n focusTimeout.start(0, store.context.forceMount);\n },\n onBlur(event) {\n // If focus is moving into the popup, don't count it as a blur.\n if (contains(positionerElement, event.relatedTarget)) {\n return;\n }\n setTouched(true);\n setFocused(false);\n if (validationMode === 'onBlur') {\n const valueToValidate = selectionMode === 'none' ? inputValue : selectedValue;\n validation.commit(valueToValidate);\n }\n },\n onMouseDown(event) {\n if (disabled) {\n return;\n }\n if (!inputInsidePopup) {\n floatingRootContext.set('domReferenceElement', event.currentTarget);\n }\n\n // Ensure items are registered for initial selection highlight.\n store.context.forceMount();\n if (currentPointerTypeRef.current !== 'touch') {\n store.context.inputRef.current?.focus();\n if (!inputInsidePopup) {\n event.preventDefault();\n }\n }\n if (open) {\n return;\n }\n const doc = ownerDocument(event.currentTarget);\n function handleMouseUp(mouseEvent) {\n const currentTriggerElement = store.state.triggerElement;\n if (!currentTriggerElement) {\n return;\n }\n const mouseUpTarget = getTarget(mouseEvent);\n const positioner = store.state.positionerElement;\n const list = store.state.listElement;\n if (contains(currentTriggerElement, mouseUpTarget) || contains(positioner, mouseUpTarget) || contains(list, mouseUpTarget)) {\n return;\n }\n if (isMouseWithinBounds(mouseEvent, currentTriggerElement)) {\n return;\n }\n store.context.setOpen(false, createChangeEventDetails(REASONS.cancelOpen, mouseEvent));\n }\n if (inputInsidePopup) {\n doc.addEventListener('mouseup', handleMouseUp, {\n once: true\n });\n }\n },\n onKeyDown(event) {\n if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {\n stopEvent(event);\n store.context.setOpen(true, createChangeEventDetails(REASONS.listNavigation, event.nativeEvent));\n store.context.inputRef.current?.focus();\n }\n }\n }, validation.getValidationProps(disabled, elementProps), getButtonProps],\n stateAttributesMapping: triggerStateAttributesMapping\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") ComboboxTrigger.displayName = \"ComboboxTrigger\";","'use client';\n\nimport * as React from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst GroupCollectionContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") GroupCollectionContext.displayName = \"GroupCollectionContext\";\nexport function useGroupCollectionContext() {\n return React.useContext(GroupCollectionContext);\n}\nexport function GroupCollectionProvider(props) {\n const {\n children,\n items\n } = props;\n const contextValue = React.useMemo(() => ({\n items\n }), [items]);\n return /*#__PURE__*/_jsx(GroupCollectionContext.Provider, {\n value: contextValue,\n children: children\n });\n}","'use client';\n\nimport * as React from 'react';\nimport { useComboboxDerivedItemsContext } from \"../root/ComboboxRootContext.mjs\";\nimport { useGroupCollectionContext } from \"./GroupCollectionContext.mjs\";\n\n/**\n * Renders filtered list items.\n * Doesn't render its own HTML element.\n *\n * If rendering a flat list, pass a function child to the `List` component instead, which implicitly wraps it.\n *\n * Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function ComboboxCollection(props) {\n const {\n children\n } = props;\n const {\n filteredItems\n } = useComboboxDerivedItemsContext();\n const groupContext = useGroupCollectionContext();\n const itemsToRender = groupContext ? groupContext.items : filteredItems;\n return /*#__PURE__*/_jsx(React.Fragment, {\n children: itemsToRender.map(children)\n });\n}","'use client';\n\nimport * as React from 'react';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useComboboxDerivedItemsContext, useComboboxFloatingContext, useComboboxRootContext } from \"../root/ComboboxRootContext.mjs\";\nimport { useComboboxPositionerContext } from \"../positioner/ComboboxPositionerContext.mjs\";\nimport { ComboboxCollection } from \"../collection/ComboboxCollection.mjs\";\nimport { CompositeList } from \"../../internals/composite/list/CompositeList.mjs\";\nimport { stopEvent } from \"../../floating-ui-react/utils.mjs\";\nimport { clickHighlightedItem } from \"../utils/parts.mjs\";\n\n/**\n * A list container for the items.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const ComboboxList = /*#__PURE__*/React.forwardRef(function ComboboxList(componentProps, forwardedRef) {\n var _ComboboxCollection;\n const {\n render,\n className,\n style,\n children,\n ...elementProps\n } = componentProps;\n const store = useComboboxRootContext();\n const floatingRootContext = useComboboxFloatingContext();\n const hasPositionerContext = Boolean(useComboboxPositionerContext(true));\n const {\n filteredItems,\n hasItems\n } = useComboboxDerivedItemsContext();\n const selectionMode = store.useState('selectionMode');\n const grid = store.useState('grid');\n const readOnly = store.useState('readOnly');\n const listProps = store.useState('listProps');\n const virtualized = store.useState('virtualized');\n const forceMounted = store.useState('forceMounted');\n const multiple = selectionMode === 'multiple';\n const empty = filteredItems.length === 0;\n const setPositionerElement = useStableCallback(element => {\n store.set('positionerElement', element);\n });\n const setListElement = useStableCallback(element => {\n store.set('listElement', element);\n });\n\n // Support \"closed template\" API: if children is a function, implicitly wrap it\n // with a Combobox.Collection that reads items from context/root.\n // Ensures this component's `listProps` subscription does not cause <Combobox.Item>\n // to re-render on every active index change.\n const resolvedChildren = React.useMemo(() => {\n if (typeof children === 'function') {\n return _ComboboxCollection || (_ComboboxCollection = /*#__PURE__*/_jsx(ComboboxCollection, {\n children: children\n }));\n }\n return children;\n }, [children]);\n const state = {\n empty\n };\n const floatingId = floatingRootContext.useState('floatingId');\n const element = useRenderElement('div', componentProps, {\n state,\n ref: [forwardedRef, setListElement, hasPositionerContext ? null : setPositionerElement],\n props: [listProps, {\n children: resolvedChildren,\n tabIndex: -1,\n id: floatingId,\n role: grid ? 'grid' : 'listbox',\n 'aria-multiselectable': multiple ? 'true' : undefined,\n // On a grid the attribute describes cell editability, not selection, so it's left to the\n // combobox element in that mode.\n 'aria-readonly': !grid && readOnly ? true : undefined,\n onKeyDown(event) {\n if (store.state.disabled || store.state.readOnly) {\n return;\n }\n if (event.key === 'Enter') {\n const activeIndex = store.state.activeIndex;\n if (activeIndex == null) {\n // Allow form submission when no item is highlighted.\n return;\n }\n stopEvent(event);\n clickHighlightedItem(store, activeIndex, event.nativeEvent);\n }\n }\n }, elementProps]\n });\n if (virtualized) {\n return element;\n }\n\n // With the `items` prop, typeahead labels are derived from the items so they survive the list\n // unmounting (unmounting clears the registered labels). Rendered labels only need to be\n // registered when the list is force-mounted to match browser autofill against rendered text.\n const labelsRef = hasItems && !forceMounted ? undefined : store.context.labelsRef;\n return /*#__PURE__*/_jsx(CompositeList, {\n elementsRef: store.context.listRef,\n labelsRef: labelsRef,\n children: element\n });\n});\nif (process.env.NODE_ENV !== \"production\") ComboboxList.displayName = \"ComboboxList\";","'use client';\n\nimport * as React from 'react';\nimport { platform } from '@base-ui/utils/platform';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\n\n// Word Joiner is invisible and zero-width, so it forces a text mutation without shifting layout.\nconst LIVE_REGION_MARKER = '\\u2060';\n// Safari VoiceOver needed roughly 200ms to reliably notice the initial polite live-region change.\nexport const INITIAL_LIVE_REGION_TEXT_MUTATION_RESET_DELAY = 200;\nfunction findLastTextNode(root) {\n const walker = root.ownerDocument.createTreeWalker(root, NodeFilter.SHOW_TEXT);\n let lastTextNode = null;\n while (walker.nextNode()) {\n const textNode = walker.currentNode;\n if (textNode.nodeValue !== '') {\n lastTextNode = textNode;\n }\n }\n return lastTextNode;\n}\n\n/**\n * @param present Whether the live region element is currently rendered. Lets a conditionally\n * rendered region re-run the marker each time its element (re)appears with text.\n */\nexport function useInitialLiveRegionTextMutation(present = true) {\n const timeout = useTimeout();\n const rootRef = React.useRef(null);\n\n // Only the initial mounted announcement needs the marker; later text updates announce naturally.\n React.useEffect(() => {\n if (!present || platform.os.ios) {\n return undefined;\n }\n const root = rootRef.current;\n if (root == null) {\n return undefined;\n }\n const textNode = findLastTextNode(root);\n if (textNode == null) {\n return undefined;\n }\n const originalValue = textNode.data;\n const markedValue = `${originalValue}${LIVE_REGION_MARKER}`;\n textNode.nodeValue = markedValue;\n timeout.start(INITIAL_LIVE_REGION_TEXT_MUTATION_RESET_DELAY, () => {\n if (textNode.nodeValue === markedValue) {\n textNode.nodeValue = originalValue;\n }\n });\n return () => {\n timeout.clear();\n if (textNode.nodeValue === markedValue) {\n textNode.nodeValue = originalValue;\n }\n };\n }, [present, rootRef, timeout]);\n return rootRef;\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const ComboboxPortalContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") ComboboxPortalContext.displayName = \"ComboboxPortalContext\";\nexport function useComboboxPortalContext() {\n const context = React.useContext(ComboboxPortalContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: <Combobox.Portal> is missing.' : _formatErrorMessage(20));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { FloatingPortal } from \"../../floating-ui-react/index.mjs\";\nimport { useComboboxRootContext } from \"../root/ComboboxRootContext.mjs\";\nimport { ComboboxPortalContext } from \"./ComboboxPortalContext.mjs\";\n\n/**\n * A portal element that moves the popup to a different part of the DOM.\n * By default, the portal element is appended to `<body>`.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const ComboboxPortal = /*#__PURE__*/React.forwardRef(function ComboboxPortal(props, forwardedRef) {\n const {\n keepMounted = false,\n ...portalProps\n } = props;\n const store = useComboboxRootContext();\n const mounted = store.useState('mounted');\n const forceMounted = store.useState('forceMounted');\n const shouldRender = mounted || keepMounted || forceMounted;\n if (!shouldRender) {\n return null;\n }\n return /*#__PURE__*/_jsx(ComboboxPortalContext.Provider, {\n value: keepMounted,\n children: /*#__PURE__*/_jsx(FloatingPortal, {\n ref: forwardedRef,\n ...portalProps\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") ComboboxPortal.displayName = \"ComboboxPortal\";","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { inertValue } from '@base-ui/utils/inertValue';\nimport { useComboboxFloatingContext, useComboboxRootContext } from \"../root/ComboboxRootContext.mjs\";\nimport { ComboboxPositionerContext } from \"./ComboboxPositionerContext.mjs\";\nimport { useListEmpty } from \"../utils/parts.mjs\";\nimport { useAnchorPositioning } from \"../../internals/useAnchorPositioning.mjs\";\nimport { useComboboxPortalContext } from \"../portal/ComboboxPortalContext.mjs\";\nimport { DROPDOWN_COLLISION_AVOIDANCE } from \"../../internals/constants.mjs\";\nimport { InternalBackdrop } from \"../../utils/InternalBackdrop.mjs\";\nimport { usePositioner } from \"../../utils/usePositioner.mjs\";\nimport { useAnchoredPopupScrollLock } from \"../../utils/useAnchoredPopupScrollLock.mjs\";\n\n/**\n * Positions the popup against the trigger.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const ComboboxPositioner = /*#__PURE__*/React.forwardRef(function ComboboxPositioner(componentProps, forwardedRef) {\n const {\n render,\n className,\n anchor,\n // `useAnchorPositioning` applies the same defaults to the undefined values; the names\n // remain destructured to exclude the props from `elementProps`.\n positionMethod,\n side,\n align,\n sideOffset,\n alignOffset,\n collisionBoundary = 'clipping-ancestors',\n collisionPadding,\n arrowPadding,\n sticky,\n disableAnchorTracking = false,\n collisionAvoidance = DROPDOWN_COLLISION_AVOIDANCE,\n style: styleProp,\n ...elementProps\n } = componentProps;\n const store = useComboboxRootContext();\n const floatingRootContext = useComboboxFloatingContext();\n const keepMounted = useComboboxPortalContext();\n const modal = store.useState('modal');\n const open = store.useState('open');\n const mounted = store.useState('mounted');\n const openMethod = store.useState('openMethod');\n const positionerElement = store.useState('positionerElement');\n const triggerElement = store.useState('triggerElement');\n const inputElement = store.useState('inputElement');\n const inputGroupElement = store.useState('inputGroupElement');\n const inputInsidePopup = store.useState('inputInsidePopup');\n const transitionStatus = store.useState('transitionStatus');\n const empty = useListEmpty();\n const resolvedAnchor = anchor ?? (inputInsidePopup ? triggerElement : inputGroupElement ?? inputElement);\n const positioning = useAnchorPositioning({\n anchor: resolvedAnchor,\n floatingRootContext,\n positionMethod,\n mounted,\n side,\n sideOffset,\n align,\n alignOffset,\n arrowPadding,\n collisionBoundary,\n collisionPadding,\n sticky,\n disableAnchorTracking,\n keepMounted,\n collisionAvoidance,\n lazyFlip: true\n });\n useAnchoredPopupScrollLock(open && modal, openMethod === 'touch', positionerElement, triggerElement);\n const state = {\n open,\n side: positioning.side,\n align: positioning.align,\n anchorHidden: positioning.anchorHidden,\n empty\n };\n useIsoLayoutEffect(() => {\n store.set('popupSide', positioning.side);\n }, [store, positioning.side]);\n const setPositionerElement = useStableCallback(element => {\n store.set('positionerElement', element);\n });\n const element = usePositioner(componentProps, state, {\n styles: positioning.positionerStyles,\n transitionStatus,\n props: elementProps,\n refs: [forwardedRef, setPositionerElement],\n hidden: !mounted,\n inert: !open\n });\n return /*#__PURE__*/_jsxs(ComboboxPositionerContext.Provider, {\n value: positioning,\n children: [mounted && modal && /*#__PURE__*/_jsx(InternalBackdrop, {\n inert: inertValue(!open),\n cutout: inputGroupElement ?? inputElement ?? triggerElement\n }), element]\n });\n});\nif (process.env.NODE_ENV !== \"production\") ComboboxPositioner.displayName = \"ComboboxPositioner\";","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { FloatingFocusManager } from \"../../floating-ui-react/index.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useComboboxFloatingContext, useComboboxRootContext } from \"../root/ComboboxRootContext.mjs\";\nimport { popupStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport { useComboboxPositionerContext } from \"../positioner/ComboboxPositionerContext.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\nimport { transitionStatusMapping } from \"../../internals/stateAttributesMapping.mjs\";\nimport { contains, getTarget } from \"../../floating-ui-react/utils.mjs\";\nimport { getDisabledMountTransitionStyles } from \"../../internals/getDisabledMountTransitionStyles.mjs\";\nimport { ComboboxInternalDismissButton } from \"../utils/ComboboxInternalDismissButton.mjs\";\nimport { getComboboxPopupId } from \"../root/utils/index.mjs\";\nimport { useListEmpty } from \"../utils/parts.mjs\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst stateAttributesMapping = {\n ...popupStateMapping,\n ...transitionStatusMapping\n};\n\n/**\n * A container for the list.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)\n */\nexport const ComboboxPopup = /*#__PURE__*/React.forwardRef(function ComboboxPopup(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n initialFocus,\n finalFocus,\n ...elementProps\n } = componentProps;\n const store = useComboboxRootContext();\n const positioning = useComboboxPositionerContext();\n const floatingRootContext = useComboboxFloatingContext();\n const mounted = store.useState('mounted');\n const open = store.useState('open');\n const openMethod = store.useState('openMethod');\n const popupProps = store.useState('popupProps');\n const transitionStatus = store.useState('transitionStatus');\n const inputInsidePopup = store.useState('inputInsidePopup');\n const inputElement = store.useState('inputElement');\n const modal = store.useState('modal');\n const rootId = store.useState('id');\n const empty = useListEmpty();\n const popupId = elementProps.id ?? (inputInsidePopup ? getComboboxPopupId(rootId) : undefined);\n useIsoLayoutEffect(() => {\n // Prefer the rendered DOM id, which a `render` prop element or function may override.\n store.set('popupId', store.context.popupRef.current?.id || popupId);\n return () => {\n store.set('popupId', undefined);\n };\n }, [store, popupId]);\n useOpenChangeComplete({\n open,\n ref: store.context.popupRef,\n onComplete() {\n if (open) {\n store.context.onOpenChangeComplete(true);\n }\n }\n });\n const state = {\n open,\n side: positioning.side,\n align: positioning.align,\n anchorHidden: positioning.anchorHidden,\n transitionStatus,\n empty\n };\n const element = useRenderElement('div', componentProps, {\n state,\n ref: [forwardedRef, store.context.popupRef],\n props: [popupProps, {\n id: popupId,\n role: inputInsidePopup ? 'dialog' : 'presentation',\n onFocus(event) {\n const target = getTarget(event.nativeEvent);\n if (openMethod !== 'touch' && (contains(store.state.listElement, target) || target === event.currentTarget)) {\n store.context.inputRef.current?.focus();\n }\n }\n }, getDisabledMountTransitionStyles(transitionStatus), elementProps],\n stateAttributesMapping\n });\n\n // Default initial focus logic:\n // If opened by touch, focus the popup element to prevent the virtual keyboard from opening\n // (this is required for Android specifically as iOS handles this automatically).\n const computedDefaultInitialFocus = inputInsidePopup ? interactionType => interactionType === 'touch' ? store.context.popupRef.current : inputElement : false;\n const resolvedInitialFocus = initialFocus === undefined ? computedDefaultInitialFocus : initialFocus;\n let resolvedFinalFocus;\n if (finalFocus != null) {\n resolvedFinalFocus = finalFocus;\n } else {\n resolvedFinalFocus = inputInsidePopup ? undefined : false;\n }\n const focusManagerModal = !inputInsidePopup || modal;\n return /*#__PURE__*/_jsx(FloatingFocusManager, {\n context: floatingRootContext,\n disabled: !mounted,\n modal: focusManagerModal,\n openInteractionType: openMethod,\n initialFocus: resolvedInitialFocus,\n returnFocus: resolvedFinalFocus,\n getInsideElements: () => [store.context.startDismissRef.current, store.context.endDismissRef.current],\n children: /*#__PURE__*/_jsxs(React.Fragment, {\n children: [element, focusManagerModal && /*#__PURE__*/_jsx(ComboboxInternalDismissButton, {\n ref: store.context.endDismissRef\n })]\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") ComboboxPopup.displayName = \"ComboboxPopup\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const ComboboxGroupContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") ComboboxGroupContext.displayName = \"ComboboxGroupContext\";\nexport function useComboboxGroupContext() {\n const context = React.useContext(ComboboxGroupContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: ComboboxGroupContext is missing. ComboboxGroup parts must be placed within <Combobox.Group>.' : _formatErrorMessage(18));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { ComboboxGroupContext } from \"./ComboboxGroupContext.mjs\";\nimport { GroupCollectionProvider } from \"../collection/GroupCollectionContext.mjs\";\nimport { useComboboxRootContext } from \"../root/ComboboxRootContext.mjs\";\n\n/**\n * Groups related items with the corresponding label.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const ComboboxGroup = /*#__PURE__*/React.forwardRef(function ComboboxGroup(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n items,\n ...elementProps\n } = componentProps;\n const store = useComboboxRootContext();\n const grid = store.useState('grid');\n const [labelId, setLabelId] = React.useState();\n const contextValue = React.useMemo(() => ({\n labelId,\n setLabelId,\n items\n }), [labelId, setLabelId, items]);\n const element = useRenderElement('div', componentProps, {\n ref: forwardedRef,\n props: [{\n // `group` is not a valid owned element of `grid`, and `row` must be owned\n // by `grid`, `rowgroup`, or `treegrid`.\n role: grid ? 'rowgroup' : 'group',\n 'aria-labelledby': labelId\n }, elementProps]\n });\n const wrappedElement = /*#__PURE__*/_jsx(ComboboxGroupContext.Provider, {\n value: contextValue,\n children: element\n });\n if (items) {\n return /*#__PURE__*/_jsx(GroupCollectionProvider, {\n items: items,\n children: wrappedElement\n });\n }\n return wrappedElement;\n});\nif (process.env.NODE_ENV !== \"production\") ComboboxGroup.displayName = \"ComboboxGroup\";","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useBaseUiId } from \"../../internals/useBaseUiId.mjs\";\nimport { useComboboxGroupContext } from \"../group/ComboboxGroupContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\n\n/**\n * An accessible label that is automatically associated with its parent group.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)\n */\nexport const ComboboxGroupLabel = /*#__PURE__*/React.forwardRef(function ComboboxGroupLabel(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n id: idProp,\n ...elementProps\n } = componentProps;\n const {\n setLabelId\n } = useComboboxGroupContext();\n const id = useBaseUiId(idProp);\n useIsoLayoutEffect(() => {\n setLabelId(id);\n return () => {\n setLabelId(currentId => currentId === id ? undefined : currentId);\n };\n }, [id, setLabelId]);\n const element = useRenderElement('div', componentProps, {\n ref: forwardedRef,\n props: [{\n id,\n 'aria-hidden': true\n }, elementProps]\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") ComboboxGroupLabel.displayName = \"ComboboxGroupLabel\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const ComboboxItemContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") ComboboxItemContext.displayName = \"ComboboxItemContext\";\nexport function useComboboxItemContext() {\n const context = React.useContext(ComboboxItemContext);\n if (!context) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: ComboboxItemContext is missing. ComboboxItem parts must be placed within <Combobox.Item>.' : _formatErrorMessage(19));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nexport const ComboboxRowContext = /*#__PURE__*/React.createContext(false);\nif (process.env.NODE_ENV !== \"production\") ComboboxRowContext.displayName = \"ComboboxRowContext\";\nexport function useComboboxRowContext() {\n return React.useContext(ComboboxRowContext);\n}","'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useComboboxRootContext, useComboboxHasItemsContext, useComboboxDerivedItemsContext } from \"../root/ComboboxRootContext.mjs\";\nimport { useCompositeListItem } from \"../../internals/composite/list/useCompositeListItem.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { ComboboxItemContext } from \"./ComboboxItemContext.mjs\";\nimport { useButton } from \"../../internals/use-button/index.mjs\";\nimport { useComboboxRowContext } from \"../row/ComboboxRowContext.mjs\";\nimport { compareItemEquality, findItemIndex, resolveSelectedIndex } from \"../../internals/itemEquality.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction ComboboxItemInner(props) {\n const {\n componentProps,\n forwardedRef,\n virtualized,\n indexFromFilter\n } = props;\n const {\n render,\n className,\n style,\n value: itemValue = null,\n index: indexProp,\n disabled: disabledProp = false,\n nativeButton = false,\n ...elementProps\n } = componentProps;\n const textRef = React.useRef(null);\n const listItem = useCompositeListItem({\n guess: true,\n index: indexProp,\n textRef\n });\n const store = useComboboxRootContext();\n const isRow = useComboboxRowContext();\n const hasItems = useComboboxHasItemsContext();\n const {\n props: itemProps,\n id: rootId,\n selectionMode,\n disabled: rootDisabled,\n readOnly,\n isItemEqualToValue\n } = store.useState('itemRoot');\n const disabled = rootDisabled || disabledProp;\n const selectable = selectionMode !== 'none';\n const index = indexProp ?? indexFromFilter ?? listItem.index;\n const hasRegistered = index !== -1;\n const highlighted = store.useState('isActive', index);\n const matchesSelectedValue = store.useState('isSelected', itemValue);\n const itemRef = React.useRef(null);\n const id = rootId != null && hasRegistered ? `${rootId}-${index}` : undefined;\n const selected = matchesSelectedValue && selectable;\n useIsoLayoutEffect(() => {\n const shouldRun = hasRegistered && (virtualized || indexProp != null);\n if (!shouldRun) {\n return undefined;\n }\n const list = store.context.listRef.current;\n list[index] = itemRef.current;\n return () => {\n delete list[index];\n };\n }, [hasRegistered, virtualized, index, indexProp, store]);\n useIsoLayoutEffect(() => {\n if (!hasRegistered || hasItems) {\n return undefined;\n }\n const visibleValues = store.context.valuesRef.current;\n visibleValues[index] = itemValue;\n return () => {\n delete visibleValues[index];\n };\n }, [hasRegistered, hasItems, index, itemValue, store]);\n useIsoLayoutEffect(() => {\n if (!hasRegistered || hasItems) {\n return;\n }\n\n // Runs while closed as well (the list can stay mounted via `keepMounted` or a\n // force-mount) so the index tracks the item's composite position, keeping features\n // like closed-trigger typeahead in sync when the rendered order changes.\n const selectedValue = store.state.selectedValue;\n let nextIndex = store.state.selectedIndex;\n if (store.state.selectionMode === 'multiple' && Array.isArray(selectedValue)) {\n nextIndex = resolveSelectedIndex(index, itemValue, store.context.valuesRef.current, selectedValue, isItemEqualToValue, nextIndex);\n } else if (compareItemEquality(itemValue, selectedValue, isItemEqualToValue)) {\n nextIndex = index;\n }\n store.set('selectedIndex', nextIndex);\n }, [hasRegistered, hasItems, store, index, itemValue, isItemEqualToValue]);\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n focusableWhenDisabled: true,\n native: nativeButton,\n composite: true\n });\n const state = {\n disabled,\n selected,\n highlighted\n };\n function commitSelection(nativeEvent) {\n function selectItem() {\n store.context.handleSelection(nativeEvent, itemValue);\n }\n if (store.state.submitOnItemClick) {\n ReactDOM.flushSync(selectItem);\n store.context.requestSubmit();\n } else {\n selectItem();\n }\n }\n const defaultProps = {\n id,\n role: isRow ? 'gridcell' : 'option',\n 'aria-selected': selectable ? selected : undefined,\n // Focusable items steal focus from the input upon mouseup.\n // Warn if the user renders a natively focusable element like `<button>`,\n // as it should be a `<div>` instead.\n tabIndex: undefined,\n onPointerDownCapture(event) {\n // The compat `mouseup` only fires for the primary pointer, so a non-primary\n // touch must not overwrite the shared ref — a mismatch would make the primary\n // pointer's release read as a drag-select and commit a second time after `click`.\n if (event.isPrimary) {\n store.context.pointerDownItemRef.current = event.currentTarget;\n }\n event.preventDefault();\n },\n onMouseDown(event) {\n // iOS Safari can emit a synthetic mousedown for touch taps without a preceding\n // pointerdown. Prevent default here too so tapping an item does not blur the input.\n event.preventDefault();\n },\n onClick(event) {\n if (disabled || readOnly) {\n return;\n }\n commitSelection(event.nativeEvent);\n },\n onMouseUp(event) {\n const pointerStartedOnItem = store.context.pointerDownItemRef.current === event.currentTarget;\n store.context.pointerDownItemRef.current = null;\n if (disabled || readOnly || event.button !== 0 || pointerStartedOnItem || !highlighted) {\n return;\n }\n commitSelection(event.nativeEvent);\n }\n };\n const element = useRenderElement('div', componentProps, {\n ref: [buttonRef, forwardedRef, listItem.ref, itemRef],\n state,\n props: [itemProps, defaultProps, elementProps, getButtonProps]\n });\n const contextValue = React.useMemo(() => ({\n selected,\n textRef\n }), [selected, textRef]);\n return /*#__PURE__*/_jsx(ComboboxItemContext.Provider, {\n value: contextValue,\n children: element\n });\n}\n\n/**\n * Resolves the index from the filtered items for the virtualized fallback (no `index` prop).\n * Isolated here so that this per-keystroke subscription to the derived-items context is only\n * paid by virtualized items. Those re-render on every input change anyway — the parent\n * virtualizer re-windows the list as the filtered set changes — so the extra subscription costs\n * them nothing, while it keeps every non-virtualized item off that context.\n */\nfunction ComboboxItemVirtualizedIndex(props) {\n const {\n componentProps,\n forwardedRef\n } = props;\n const store = useComboboxRootContext();\n const isItemEqualToValue = store.useState('isItemEqualToValue');\n const {\n flatFilteredValues\n } = useComboboxDerivedItemsContext();\n const lookupValue = componentProps.value ?? null;\n const indexFromFilter = findItemIndex(flatFilteredValues, lookupValue, isItemEqualToValue);\n\n // Only reached when `virtualized` is true (see the wrapper below).\n return /*#__PURE__*/_jsx(ComboboxItemInner, {\n componentProps: componentProps,\n forwardedRef: forwardedRef,\n virtualized: true,\n indexFromFilter: indexFromFilter\n });\n}\n\n/**\n * An individual item in the list.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)\n */\nexport const ComboboxItem = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function ComboboxItem(componentProps, forwardedRef) {\n const store = useComboboxRootContext();\n const virtualized = store.useState('virtualized');\n\n // `virtualized` (and whether an item provides an explicit `index`) must be stable for an\n // item's lifetime: the two branches return different component types, so flipping it at\n // runtime remounts the item and resets its refs and effects.\n if (virtualized && componentProps.index == null) {\n return /*#__PURE__*/_jsx(ComboboxItemVirtualizedIndex, {\n componentProps: componentProps,\n forwardedRef: forwardedRef\n });\n }\n return /*#__PURE__*/_jsx(ComboboxItemInner, {\n componentProps: componentProps,\n forwardedRef: forwardedRef,\n virtualized: virtualized,\n indexFromFilter: undefined\n });\n}));\nif (process.env.NODE_ENV !== \"production\") ComboboxItem.displayName = \"ComboboxItem\";","'use client';\n\nimport * as React from 'react';\nimport { useComboboxItemContext } from \"../item/ComboboxItemContext.mjs\";\nimport { ItemIndicator } from \"../../utils/ItemIndicator.mjs\";\n\n/**\n * Indicates whether the item is selected.\n * Renders a `<span>` element.\n *\n * Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const ComboboxItemIndicator = /*#__PURE__*/React.forwardRef(function ComboboxItemIndicator(componentProps, forwardedRef) {\n const {\n selected\n } = useComboboxItemContext();\n const shouldRender = componentProps.keepMounted || selected;\n if (!shouldRender) {\n return null;\n }\n return /*#__PURE__*/_jsx(ItemIndicator, {\n ...componentProps,\n selected: selected,\n ref: forwardedRef\n });\n});\nif (process.env.NODE_ENV !== \"production\") ComboboxItemIndicator.displayName = \"ComboboxItemIndicator\";","'use client';\n\nimport * as React from 'react';\nimport { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { ComboboxChipsContext } from \"./ComboboxChipsContext.mjs\";\nimport { CompositeList } from \"../../internals/composite/list/CompositeList.mjs\";\nimport { useComboboxRootContext } from \"../root/ComboboxRootContext.mjs\";\nimport { handleInputPress } from \"../utils/handleInputPress.mjs\";\n\n/**\n * A container for the chips in a multiselectable input.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const ComboboxChips = /*#__PURE__*/React.forwardRef(function ComboboxChips(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n const store = useComboboxRootContext();\n const hasSelectionChips = store.useState('hasSelectionChips');\n const chipsRef = React.useRef([]);\n const element = useRenderElement('div', componentProps, {\n ref: [forwardedRef, store.context.chipsContainerRef],\n // NVDA enters browse mode instead of staying in focus mode when navigating with\n // arrow keys inside a container unless it has a toolbar role.\n props: [hasSelectionChips ? {\n role: 'toolbar'\n } : EMPTY_OBJECT, {\n onMouseDown(event) {\n handleInputPress(event, store, store.state.disabled);\n }\n }, elementProps]\n });\n const contextValue = React.useMemo(() => ({\n chipsRef\n }), []);\n return /*#__PURE__*/_jsx(ComboboxChipsContext.Provider, {\n value: contextValue,\n children: /*#__PURE__*/_jsx(CompositeList, {\n elementsRef: chipsRef,\n children: element\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") ComboboxChips.displayName = \"ComboboxChips\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const ComboboxChipContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") ComboboxChipContext.displayName = \"ComboboxChipContext\";\nexport function useComboboxChipContext() {\n const context = React.useContext(ComboboxChipContext);\n if (!context) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: ComboboxChipContext is missing. ComboboxChip parts must be placed within <Combobox.Chip>.' : _formatErrorMessage(17));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useComboboxChipsContext } from \"../chips/ComboboxChipsContext.mjs\";\nimport { useComboboxRootContext } from \"../root/ComboboxRootContext.mjs\";\nimport { useCompositeListItem } from \"../../internals/composite/list/useCompositeListItem.mjs\";\nimport { ComboboxChipContext } from \"./ComboboxChipContext.mjs\";\nimport { stopEvent } from \"../../floating-ui-react/utils.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useDirection } from \"../../internals/direction-context/DirectionContext.mjs\";\nimport { getChipNavigationKeys, getIndexAfterChipRemoval } from \"../utils/parts.mjs\";\n\n/**\n * An individual chip that represents a value in a multiselectable input.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const ComboboxChip = /*#__PURE__*/React.forwardRef(function ComboboxChip(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n const store = useComboboxRootContext();\n const {\n chipsRef\n } = useComboboxChipsContext();\n const direction = useDirection();\n const disabled = store.useState('disabled');\n const readOnly = store.useState('readOnly');\n const selectedValue = store.useState('selectedValue');\n const {\n ref,\n index\n } = useCompositeListItem();\n function handleKeyDown(event) {\n let nextIndex = index;\n const [previousChipKey, nextChipKey] = getChipNavigationKeys(direction);\n if (event.key === previousChipKey) {\n event.preventDefault();\n if (index > 0) {\n nextIndex = index - 1;\n } else {\n nextIndex = undefined;\n }\n } else if (event.key === nextChipKey) {\n event.preventDefault();\n if (index < chipsRef.current.length - 1) {\n nextIndex = index + 1;\n } else {\n nextIndex = undefined;\n }\n } else if (event.key === 'Backspace' || event.key === 'Delete') {\n nextIndex = getIndexAfterChipRemoval(index, selectedValue.length);\n stopEvent(event);\n\n // Commit the removal before focusing so `chipsRef` reflects the remaining chips.\n ReactDOM.flushSync(() => {\n store.context.setIndices({\n activeIndex: null,\n selectedIndex: null,\n type: REASONS.keyboard,\n event: event.nativeEvent\n });\n store.context.setSelectedValue(selectedValue.filter((_, i) => i !== index), createChangeEventDetails(REASONS.none, event.nativeEvent));\n });\n } else if (event.key === 'Enter' || event.key === ' ') {\n stopEvent(event);\n nextIndex = undefined;\n } else if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {\n stopEvent(event);\n // The input may mount when opening.\n ReactDOM.flushSync(() => {\n store.context.setOpen(true, createChangeEventDetails(REASONS.listNavigation, event.nativeEvent));\n });\n nextIndex = undefined;\n } else if (\n // Check for printable characters (letters, numbers, symbols)\n event.key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey) {\n nextIndex = undefined;\n }\n return nextIndex;\n }\n const state = {\n disabled\n };\n const element = useRenderElement('div', componentProps, {\n ref: [forwardedRef, ref],\n state,\n props: [{\n tabIndex: -1,\n 'aria-disabled': disabled || undefined,\n 'aria-readonly': readOnly || undefined,\n onKeyDown(event) {\n if (disabled || readOnly) {\n return;\n }\n const nextIndex = handleKeyDown(event);\n if (nextIndex === undefined) {\n store.context.inputRef.current?.focus();\n } else {\n chipsRef.current[nextIndex]?.focus();\n }\n }\n }, elementProps]\n });\n const contextValue = React.useMemo(() => ({\n index\n }), [index]);\n return /*#__PURE__*/_jsx(ComboboxChipContext.Provider, {\n value: contextValue,\n children: element\n });\n});\nif (process.env.NODE_ENV !== \"production\") ComboboxChip.displayName = \"ComboboxChip\";","'use client';\n\nimport * as React from 'react';\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useComboboxRootContext } from \"../root/ComboboxRootContext.mjs\";\nimport { useComboboxChipContext } from \"../chip/ComboboxChipContext.mjs\";\nimport { useButton } from \"../../internals/use-button/index.mjs\";\nimport { stopEvent } from \"../../floating-ui-react/utils.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { getHighlightReason } from \"../../utils/getHighlightReason.mjs\";\nimport { findItemIndex } from \"../../internals/itemEquality.mjs\";\n\n/**\n * A button to remove a chip.\n * Renders a `<button>` element.\n *\n * Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)\n */\nexport const ComboboxChipRemove = /*#__PURE__*/React.forwardRef(function ComboboxChipRemove(componentProps, forwardedRef) {\n const {\n render,\n className,\n disabled: disabledProp = false,\n nativeButton = true,\n style,\n ...elementProps\n } = componentProps;\n const store = useComboboxRootContext();\n const {\n index\n } = useComboboxChipContext();\n const comboboxDisabled = store.useState('disabled');\n const readOnly = store.useState('readOnly');\n const selectedValue = store.useState('selectedValue');\n const isItemEqualToValue = store.useState('isItemEqualToValue');\n const disabled = comboboxDisabled || disabledProp;\n const {\n buttonRef,\n getButtonProps\n } = useButton({\n native: nativeButton,\n disabled: disabled || readOnly,\n focusableWhenDisabled: true\n });\n const state = {\n disabled\n };\n function clearActiveIndexForRemovedItem(removedItem, event) {\n const activeIndex = store.state.activeIndex;\n if (activeIndex == null) {\n return;\n }\n\n // Try current visible list first; if not found, it's filtered out.\n // No need to clear highlight in that case since it can't equal activeIndex.\n const removedIndex = findItemIndex(store.context.valuesRef.current, removedItem, isItemEqualToValue);\n if (removedIndex !== -1 && activeIndex === removedIndex) {\n store.context.setIndices({\n activeIndex: null,\n type: getHighlightReason(event),\n event\n });\n }\n }\n function removeChip(event) {\n const eventDetails = createChangeEventDetails(REASONS.chipRemovePress, event.nativeEvent);\n const removedItem = selectedValue[index];\n clearActiveIndexForRemovedItem(removedItem, event.nativeEvent);\n store.context.setSelectedValue(selectedValue.filter((_, i) => i !== index), eventDetails);\n store.context.inputRef.current?.focus();\n return eventDetails;\n }\n const element = useRenderElement('button', componentProps, {\n ref: [forwardedRef, buttonRef],\n state,\n props: [{\n tabIndex: -1,\n onMouseDown(event) {\n event.preventDefault();\n },\n onClick(event) {\n const eventDetails = removeChip(event);\n if (!eventDetails.isPropagationAllowed) {\n event.stopPropagation();\n }\n },\n onKeyDown(event) {\n if (event.key === 'Enter' || event.key === ' ') {\n const eventDetails = removeChip(event);\n if (!eventDetails.isPropagationAllowed) {\n stopEvent(event);\n }\n }\n }\n }, elementProps, getButtonProps]\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") ComboboxChipRemove.displayName = \"ComboboxChipRemove\";","'use client';\n\nimport * as React from 'react';\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useComboboxDerivedItemsContext, useComboboxRootContext } from \"../root/ComboboxRootContext.mjs\";\nimport { useInitialLiveRegionTextMutation } from \"../../internals/useInitialLiveRegionTextMutation.mjs\";\n\n/**\n * Renders its children only when the list is empty.\n * Requires the `items` prop on the root component.\n * Announces changes politely to screen readers.\n * This component's root element must remain mounted in the DOM to announce\n * changes consistently across screen readers. Avoid hiding or removing the\n * component itself with `display: none`, `hidden`, `aria-hidden`, or conditional\n * rendering. Prefer updating or conditionally rendering its children instead.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)\n */\nexport const ComboboxEmpty = /*#__PURE__*/React.forwardRef(function ComboboxEmpty(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n children: childrenProp,\n ...elementProps\n } = componentProps;\n const {\n filteredItems\n } = useComboboxDerivedItemsContext();\n const store = useComboboxRootContext();\n const emptyRef = useInitialLiveRegionTextMutation();\n const children = filteredItems.length === 0 ? childrenProp : null;\n return useRenderElement('div', componentProps, {\n ref: [forwardedRef, store.context.emptyRef, emptyRef],\n props: [{\n children,\n role: 'status',\n 'aria-live': 'polite',\n 'aria-atomic': true\n }, elementProps]\n });\n});\nif (process.env.NODE_ENV !== \"production\") ComboboxEmpty.displayName = \"ComboboxEmpty\";","'use client';\n\nimport * as React from 'react';\nimport { useComboboxInputValueContext, useComboboxRootContext } from \"../root/ComboboxRootContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useButton } from \"../../internals/use-button/index.mjs\";\nimport { useFieldRootContext } from \"../../internals/field-root-context/FieldRootContext.mjs\";\nimport { useTransitionStatus } from \"../../internals/useTransitionStatus.mjs\";\nimport { transitionStatusMapping } from \"../../internals/stateAttributesMapping.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { getHighlightReason } from \"../../utils/getHighlightReason.mjs\";\nimport { triggerOpenStateMapping } from \"../../utils/popupStateMapping.mjs\";\nconst stateAttributesMapping = {\n ...transitionStatusMapping,\n ...triggerOpenStateMapping\n};\n\n/**\n * Clears the value when clicked.\n * Renders a `<button>` element.\n *\n * Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)\n */\nexport const ComboboxClear = /*#__PURE__*/React.forwardRef(function ComboboxClear(componentProps, forwardedRef) {\n const {\n render,\n className,\n disabled: disabledProp = false,\n nativeButton = true,\n keepMounted = false,\n style,\n ...elementProps\n } = componentProps;\n const {\n disabled: fieldDisabled\n } = useFieldRootContext();\n const store = useComboboxRootContext();\n const selectionMode = store.useState('selectionMode');\n const comboboxDisabled = store.useState('disabled');\n const readOnly = store.useState('readOnly');\n const open = store.useState('open');\n const selectedValue = store.useState('selectedValue');\n const hasSelectionChips = store.useState('hasSelectionChips');\n const inputValue = useComboboxInputValueContext();\n let visible = false;\n if (selectionMode === 'none') {\n visible = inputValue !== '';\n } else if (selectionMode === 'single') {\n visible = selectedValue != null;\n } else {\n visible = hasSelectionChips;\n }\n const disabled = fieldDisabled || comboboxDisabled || disabledProp;\n const {\n buttonRef,\n getButtonProps\n } = useButton({\n native: nativeButton,\n disabled\n });\n const {\n mounted,\n transitionStatus,\n setMounted\n } = useTransitionStatus(visible);\n const state = {\n disabled,\n visible,\n open,\n transitionStatus\n };\n useOpenChangeComplete({\n open: visible,\n ref: store.context.clearRef,\n onComplete() {\n if (!visible) {\n setMounted(false);\n }\n }\n });\n const element = useRenderElement('button', componentProps, {\n state,\n ref: [forwardedRef, buttonRef, store.context.clearRef],\n props: [{\n tabIndex: -1,\n children: 'x',\n // Avoid stealing focus from the input.\n onMouseDown(event) {\n event.preventDefault();\n },\n onClick(event) {\n if (disabled || readOnly) {\n return;\n }\n const type = getHighlightReason(event);\n store.context.setInputValue('', createChangeEventDetails(REASONS.clearPress, event.nativeEvent));\n if (selectionMode !== 'none') {\n store.context.setSelectedValue(Array.isArray(selectedValue) ? [] : null, createChangeEventDetails(REASONS.clearPress, event.nativeEvent));\n // A distinct object shape: `Store.update` iterates own keys, so passing an explicit\n // `selectedIndex: undefined` would overwrite the state instead of leaving it alone.\n store.context.setIndices({\n activeIndex: null,\n selectedIndex: null,\n type,\n event: event.nativeEvent\n });\n } else {\n store.context.setIndices({\n activeIndex: null,\n type,\n event: event.nativeEvent\n });\n }\n store.context.inputRef.current?.focus();\n }\n }, elementProps, getButtonProps],\n stateAttributesMapping\n });\n const shouldRender = keepMounted || mounted;\n if (!shouldRender) {\n return null;\n }\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") ComboboxClear.displayName = \"ComboboxClear\";","'use client';\n\nimport { ListboxSeparator } from \"../../utils/listbox-separator/ListboxSeparator.mjs\";\n/**\n * A visual separator between items or groups.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Combobox](https://base-ui.com/react/components/combobox)\n */\nexport const ComboboxSeparator = ListboxSeparator;","import { Combobox as ComboboxPrimitive } from '@base-ui/react/combobox'\n\nimport {\n dropdownItemVariants,\n dropdownLabelVariants,\n dropdownListVariants,\n type DropdownMenuLabelProps,\n dropdownPanelVariants,\n dropdownSeparatorVariants,\n} from '@/components/atoms/DropdownMenu'\nimport IconProvider from '@/components/atoms/IconProvider'\nimport {\n selectAttachedClass,\n selectChipVariants,\n SelectTrailing,\n type SelectTriggerProps,\n selectTriggerVariants,\n trailingPadding,\n} from '@/components/atoms/Select'\nimport { cn } from '@/lib/utils'\n\nconst Combobox = ComboboxPrimitive.Root\n\ntype ComboboxInputProps = ComboboxPrimitive.Input.Props &\n Pick<SelectTriggerProps, 'attached' | 'clearLabel' | 'invalid' | 'showClear' | 'variant' | 'wrapperClassName'>\n\nfunction ComboboxInput({\n attached,\n className,\n clearLabel = 'Clear',\n invalid,\n showClear = false,\n variant,\n wrapperClassName,\n ...props\n}: ComboboxInputProps) {\n const isInvalid = invalid ?? false\n return (\n <ComboboxPrimitive.InputGroup\n data-slot=\"combobox-input-group\"\n className={cn(\n selectTriggerVariants({ invalid: isInvalid, variant }),\n selectAttachedClass(attached),\n 'w-80 max-w-full has-[[data-disabled]]:opacity-50',\n 'focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-border-focus',\n wrapperClassName,\n )}\n >\n <IconProvider icon=\"magnifying-glass\" size=\"16\" className=\"shrink-0 text-icon-secondary\" />\n <ComboboxPrimitive.Input\n data-slot=\"combobox-input\"\n aria-invalid={isInvalid || undefined}\n className={cn(\n 'h-full min-w-0 flex-1 bg-transparent text-text-primary outline-none placeholder:text-text-placeholder disabled:cursor-not-allowed',\n className,\n )}\n {...props}\n />\n {isInvalid ? <IconProvider icon=\"triangle-exclamation\" size=\"16\" className=\"text-status-text-error\" /> : null}\n {showClear ? (\n <>\n <ComboboxPrimitive.Clear\n data-slot=\"combobox-clear\"\n aria-label={clearLabel}\n className=\"flex size-4 shrink-0 items-center justify-center rounded-sm text-icon-primary focus-ring\"\n >\n <IconProvider icon=\"xmark\" size=\"12\" />\n </ComboboxPrimitive.Clear>\n <span aria-hidden=\"true\" className=\"h-4 w-px shrink-0 bg-border-subtle\" />\n </>\n ) : null}\n <ComboboxPrimitive.Trigger\n data-slot=\"combobox-trigger\"\n aria-label=\"Open\"\n className=\"flex size-4 shrink-0 items-center justify-center rounded-sm text-icon-secondary focus-ring\"\n >\n <IconProvider icon=\"chevron-down\" size=\"16\" className=\"transition-transform in-data-popup-open:rotate-180\" />\n </ComboboxPrimitive.Trigger>\n </ComboboxPrimitive.InputGroup>\n )\n}\n\ntype ComboboxTriggerProps = ComboboxPrimitive.Trigger.Props &\n Pick<\n SelectTriggerProps,\n 'attached' | 'clearLabel' | 'invalid' | 'onClear' | 'showClear' | 'variant' | 'wrapperClassName'\n >\n\n/** Select-look trigger for a combobox whose search field lives in the popup (see ComboboxPopupInput). */\nfunction ComboboxTrigger({\n attached,\n className,\n clearLabel = 'Clear selection',\n disabled = false,\n invalid,\n onClear,\n showClear = false,\n variant,\n wrapperClassName,\n ...props\n}: ComboboxTriggerProps) {\n const isInvalid = invalid ?? false\n const padding = isInvalid\n ? showClear\n ? trailingPadding.invalidClear\n : trailingPadding.invalid\n : showClear\n ? trailingPadding.clear\n : trailingPadding.plain\n\n return (\n <div\n data-slot=\"combobox-trigger-wrapper\"\n className={cn('group/select relative w-80 max-w-full has-[[data-disabled]]:opacity-50', wrapperClassName)}\n >\n <ComboboxPrimitive.Trigger\n data-slot=\"combobox-trigger\"\n aria-invalid={isInvalid || undefined}\n disabled={disabled}\n className={cn(\n selectTriggerVariants({ invalid: isInvalid, variant }),\n padding,\n selectAttachedClass(attached),\n 'cursor-pointer focus-ring data-disabled:cursor-not-allowed data-popup-open:outline-2 data-popup-open:outline-offset-2 data-popup-open:outline-border-focus',\n className,\n )}\n {...props}\n />\n <SelectTrailing\n clearLabel={clearLabel}\n disabled={disabled}\n invalid={isInvalid}\n onClear={onClear}\n showClear={showClear}\n />\n </div>\n )\n}\n\nfunction ComboboxPopupInput({\n className,\n wrapperClassName,\n ...props\n}: ComboboxPrimitive.Input.Props & { wrapperClassName?: string }) {\n return (\n <div\n data-slot=\"combobox-popup-input-wrapper\"\n className={cn(\n 'mb-space-4 flex h-8 shrink-0 items-center gap-space-8 border-b border-border-subtle px-space-8 pb-space-4 box-content',\n wrapperClassName,\n )}\n >\n <IconProvider icon=\"magnifying-glass\" size=\"16\" className=\"shrink-0 text-icon-secondary\" />\n <ComboboxPrimitive.Input\n data-slot=\"combobox-popup-input\"\n className={cn(\n 'h-full min-w-0 flex-1 bg-transparent font-lab text-body-md text-text-primary outline-none placeholder:text-text-placeholder',\n className,\n )}\n {...props}\n />\n </div>\n )\n}\n\ntype ComboboxContentProps = ComboboxPrimitive.Popup.Props &\n Pick<ComboboxPrimitive.Positioner.Props, 'align' | 'collisionAvoidance' | 'side' | 'sideOffset'> & {\n container?: ComboboxPrimitive.Portal.Props['container']\n positionerClassName?: string\n }\n\nfunction ComboboxContent({\n align = 'start',\n className,\n collisionAvoidance,\n container,\n positionerClassName,\n side = 'bottom',\n sideOffset = 8,\n ...props\n}: ComboboxContentProps) {\n return (\n <ComboboxPrimitive.Portal container={container}>\n <ComboboxPrimitive.Positioner\n data-slot=\"combobox-positioner\"\n align={align}\n collisionAvoidance={collisionAvoidance}\n side={side}\n sideOffset={sideOffset}\n className={cn('isolate z-[1600] outline-none', positionerClassName)}\n >\n <ComboboxPrimitive.Popup\n data-slot=\"combobox-content\"\n className={cn(dropdownPanelVariants({ motion: 'select', width: 'trigger' }), className)}\n {...props}\n />\n </ComboboxPrimitive.Positioner>\n </ComboboxPrimitive.Portal>\n )\n}\n\ntype ComboboxListProps = ComboboxPrimitive.List.Props\n\nfunction ComboboxList({ className, ...props }: ComboboxListProps) {\n return (\n <ComboboxPrimitive.List\n data-slot=\"combobox-list\"\n className={cn(dropdownListVariants(), 'empty:hidden', className)}\n {...props}\n />\n )\n}\n\ntype ComboboxItemProps = ComboboxPrimitive.Item.Props\n\nfunction ComboboxItem({ children, className, ...props }: ComboboxItemProps) {\n return (\n <ComboboxPrimitive.Item data-slot=\"combobox-item\" className={cn(dropdownItemVariants(), className)} {...props}>\n <span className=\"flex min-w-0 flex-1 items-center gap-space-8 truncate\">{children}</span>\n <ComboboxPrimitive.ItemIndicator className=\"flex shrink-0 text-icon-brand\">\n <IconProvider icon=\"check\" size=\"16\" />\n </ComboboxPrimitive.ItemIndicator>\n </ComboboxPrimitive.Item>\n )\n}\n\ntype ComboboxEmptyProps = ComboboxPrimitive.Empty.Props\n\nfunction ComboboxEmpty({ className, ...props }: ComboboxEmptyProps) {\n return (\n <ComboboxPrimitive.Empty\n data-slot=\"combobox-empty\"\n className={cn(\n 'flex justify-center px-space-8 py-space-12 font-lab text-body-md text-text-secondary empty:hidden',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props) {\n return (\n <ComboboxPrimitive.Group\n data-slot=\"combobox-group\"\n className={cn('flex flex-col gap-space-2', className)}\n {...props}\n />\n )\n}\n\ntype ComboboxLabelProps = ComboboxPrimitive.GroupLabel.Props & Pick<DropdownMenuLabelProps, 'caps'>\n\nfunction ComboboxLabel({ caps, className, ...props }: ComboboxLabelProps) {\n return (\n <ComboboxPrimitive.GroupLabel\n data-slot=\"combobox-label\"\n className={cn(dropdownLabelVariants({ caps }), className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxSeparator({ className, ...props }: ComboboxPrimitive.Separator.Props) {\n return (\n <ComboboxPrimitive.Separator\n data-slot=\"combobox-separator\"\n className={cn(dropdownSeparatorVariants(), className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxChips({ className, ...props }: ComboboxPrimitive.Chips.Props) {\n return (\n <ComboboxPrimitive.Chips\n data-slot=\"combobox-chips\"\n className={cn('flex w-80 max-w-full flex-wrap gap-space-4', className)}\n {...props}\n />\n )\n}\n\ntype ComboboxChipProps = ComboboxPrimitive.Chip.Props & {\n removeLabel?: string\n}\n\nfunction ComboboxChip({ children, className, removeLabel = 'Remove', ...props }: ComboboxChipProps) {\n return (\n <ComboboxPrimitive.Chip\n data-slot=\"combobox-chip\"\n className={cn(selectChipVariants(), 'outline-none data-highlighted:border-border-default', className)}\n {...props}\n >\n {children}\n <ComboboxPrimitive.ChipRemove\n aria-label={removeLabel}\n className=\"flex size-2.25 shrink-0 items-center justify-center rounded-sm text-icon-secondary focus-ring hover:text-icon-primary\"\n >\n <IconProvider icon=\"xmark\" size={0.75} />\n </ComboboxPrimitive.ChipRemove>\n </ComboboxPrimitive.Chip>\n )\n}\n\nexport {\n Combobox,\n ComboboxChip,\n ComboboxChips,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxGroup,\n ComboboxInput,\n ComboboxItem,\n ComboboxLabel,\n ComboboxList,\n ComboboxPopupInput,\n ComboboxSeparator,\n ComboboxTrigger,\n}\nexport type {\n ComboboxChipProps,\n ComboboxContentProps,\n ComboboxEmptyProps,\n ComboboxInputProps,\n ComboboxItemProps,\n ComboboxLabelProps,\n ComboboxListProps,\n ComboboxTriggerProps,\n}\n"],"names":["_formatErrorMessage","REASONS.none","REASONS.inputClear","REASONS.inputChange","REASONS.escapeKey","REASONS.itemPress","REASONS.focusOut","REASONS.outsidePress","REASONS.imperativeAction","REASONS.inputPress","listNavigation","_jsx","_jsxs","ComboboxInputDataAttributes.popupSide","ComboboxInputDataAttributes.listEmpty","ComboboxInternalDismissButton","REASONS.closePress","popupSide","ComboboxInput","listEmpty","element","platform.os.android","platform.engine.gecko","ComboboxInputGroup","ComboboxTrigger","REASONS.cancelOpen","REASONS.listNavigation","ComboboxList","platform.os.ios","ComboboxPortal","ComboboxPositioner","stateAttributesMapping","ComboboxPopup","ComboboxGroup","ComboboxGroupLabel","ComboboxItem","ComboboxItemIndicator","ComboboxChips","ComboboxChip","REASONS.keyboard","ComboboxChipRemove","REASONS.chipRemovePress","ComboboxEmpty","ComboboxClear","REASONS.clearPress","ComboboxSeparator","ComboboxPrimitive.Root","ComboboxPrimitive.InputGroup","cn","ComboboxPrimitive.Input","ComboboxPrimitive.Clear","ComboboxPrimitive.Trigger","ComboboxPrimitive.Portal","ComboboxPrimitive.Positioner","ComboboxPrimitive.Popup","ComboboxPrimitive.List","ComboboxPrimitive.Item","ComboboxPrimitive.ItemIndicator","ComboboxPrimitive.Empty","ComboboxPrimitive.Group","ComboboxPrimitive.GroupLabel","ComboboxPrimitive.Separator","ComboboxPrimitive.Chips","ComboboxPrimitive.Chip","ComboboxPrimitive.ChipRemove"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaO,SAAS,eAAe,OAAO,WAAW,SAAS,aAAa,WAAW,KAAK,iBAAiB,UAAU,UAAU,OAAO,GAAG;AACpI,QAAM,YAAY,sBAAsB,QAAQ,SAAS;AAAA,IACvD;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAEA,WAAW,YAAY,WAAW,WAAW;AAAA,IAC7C,WAAW;AAAA,EACf,CAAG;AAKD,SAAO,uBAAuB,QAAQ,SAAS,SAAS,IAAI,SAAY;AAC1E;AC5BO,MAAM,sBAAmC,sBAAM,cAAc,MAAS;AAC7E,IAAI,QAAQ,IAAI,aAAa,aAAc,qBAAoB,cAAc;AACtE,MAAM,0BAAuC,sBAAM,cAAc,MAAS;AACjF,IAAI,QAAQ,IAAI,aAAa,aAAc,yBAAwB,cAAc;AAC1E,MAAM,8BAA2C,sBAAM,cAAc,MAAS;AACrF,IAAI,QAAQ,IAAI,aAAa,aAAc,6BAA4B,cAAc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