import { i as __toESM, r as __exportAll, t as require_react } from "./react-DMmEJb6B.js"; import { t as require_jsx_runtime } from "./react_jsx-runtime.js"; import { C as getWindow, E as isHTMLElement, f as useStableCallback, l as mergeProps, n as EMPTY_ARRAY, p as useRefWithInit, r as EMPTY_OBJECT, s as useMergedRefs, t as useRenderElement, u as useIsoLayoutEffect } from "./useRenderElement-3Cwvu1gO.js"; import { t as useButton } from "./useButton-CBy-cFDk.js"; import { a as fieldValidityMapping, i as useFieldRootContext, n as useLabelableId, r as useLabelableContext, t as useRegisterFieldControl } from "./useRegisterFieldControl-CPlvTQh-.js"; import { t as useFormContext } from "./FormContext-D8skpAva.js"; import { _ as useBaseUiId, g as ownerDocument, h as windowResize, l as none, n as cancelOpen, s as itemPress, t as createChangeEventDetails } from "./createBaseUIEventDetails-CJxlTiBH.js"; import { $ as addEventListener, A as useStore, F as useDismiss, I as useClick, K as DROPDOWN_COLLISION_AVOIDANCE, L as FloatingFocusManager, Mt as getFloatingFocusElement, N as createSelector, Ot as isVirtualClick, P as platform, Tt as rectToClientRect, W as FloatingPortal, Wt as isWebKit, Z as useValueAsRef, _ as FOCUSABLE_POPUP_PROPS, a as useAnchoredPopupScrollLock, c as useAnchorPositioning, d as inertValue, et as popupStateMapping, f as getDisabledMountTransitionStyles, h as useFloatingRootContext, i as useOnFirstRender, it as useOpenChangeComplete, k as Store, lt as useTimeout, m as useToolbarRootContext, n as useOpenInteractionType, nt as triggerOpenStateMapping, o as usePositioner, ot as transitionStatusMapping, p as COMPOSITE_KEYS, rt as useTransitionStatus, s as InternalBackdrop, st as useAnimationFrame, t as usePreviousValue, tt as pressableTriggerOpenStateMapping, u as useDirection } from "./usePreviousValue-rDCHxn0g.js"; import { n as contains, r as getTarget } from "./shadowDom-kQ51Rhp9.js"; import { t as useControlled } from "./useControlled-B7gU8wdF.js"; import { a as useListNavigation, i as useTypeahead, n as getPseudoElementBounds, o as IndexGuessBehavior, r as CompositeList, s as useCompositeListItem, t as Separator } from "./Separator-CTGaP8Tv.js"; import { n as visuallyHidden, r as visuallyHiddenInput, t as useValueChanged } from "./useValueChanged-C6oHa1CC.js"; //#region ../node_modules/@base-ui/react/esm/utils/useRegisteredLabelId.js var import_react = /* @__PURE__ */ __toESM(require_react(), 1); var import_jsx_runtime = require_jsx_runtime(); function useRegisteredLabelId(idProp, setLabelId) { const id = useBaseUiId(idProp); useIsoLayoutEffect(() => { setLabelId(id); return () => { setLabelId(void 0); }; }, [id, setLabelId]); return id; } //#endregion //#region ../node_modules/@base-ui/react/esm/internals/labelable-provider/useLabel.js function useLabel(params = {}) { const { id: idProp, fallbackControlId, native = false, setLabelId: setLabelIdProp, focusControl: focusControlProp } = params; const { controlId: contextControlId, setLabelId: setContextLabelId } = useLabelableContext(); const id = useRegisteredLabelId(idProp, useStableCallback((nextLabelId) => { setContextLabelId(nextLabelId); setLabelIdProp?.(nextLabelId); })); const resolvedControlId = contextControlId ?? fallbackControlId; function focusControl(event) { if (focusControlProp) { focusControlProp(event, resolvedControlId); return; } if (!resolvedControlId) return; const controlElement = ownerDocument(event.currentTarget).getElementById(resolvedControlId); if (isHTMLElement(controlElement)) focusElementWithVisible(controlElement); } function handleInteraction(event) { if (getTarget(event.nativeEvent)?.closest("button,input,select,textarea")) return; if (!event.defaultPrevented && event.detail > 1) event.preventDefault(); if (native) return; focusControl(event); } return native ? { id, htmlFor: resolvedControlId ?? void 0, onMouseDown: handleInteraction } : { id, onClick: handleInteraction, onPointerDown(event) { event.preventDefault(); } }; } function focusElementWithVisible(element) { element.focus({ focusVisible: true }); } //#endregion //#region ../node_modules/@base-ui/react/esm/select/root/SelectRootContext.js var SelectRootContext = /* @__PURE__ */ import_react.createContext(null); SelectRootContext.displayName = "SelectRootContext"; var SelectFloatingContext = /* @__PURE__ */ import_react.createContext(null); SelectFloatingContext.displayName = "SelectFloatingContext"; function useSelectRootContext() { const context = import_react.useContext(SelectRootContext); if (context === null) throw new Error("Base UI: SelectRootContext is missing. Select parts must be placed within ."); return context; } function useSelectFloatingContext() { const context = import_react.useContext(SelectFloatingContext); if (context === null) throw new Error("Base UI: SelectFloatingContext is missing. Select parts must be placed within ."); return context; } //#endregion //#region ../node_modules/@base-ui/react/esm/internals/itemEquality.js var defaultItemEquality = (itemValue, selectedValue) => Object.is(itemValue, selectedValue); function compareItemEquality(itemValue, selectedValue, comparer) { if (itemValue == null || selectedValue == null) return Object.is(itemValue, selectedValue); return comparer(itemValue, selectedValue); } function selectedValueIncludes(selectedValues, itemValue, comparer) { if (!selectedValues || selectedValues.length === 0) return false; return selectedValues.some((selectedValue) => { if (selectedValue === void 0) return false; return compareItemEquality(itemValue, selectedValue, comparer); }); } function findItemIndex(itemValues, selectedValue, comparer) { if (!itemValues || itemValues.length === 0) return -1; return itemValues.findIndex((itemValue) => { if (itemValue === void 0) return false; return compareItemEquality(itemValue, selectedValue, comparer); }); } function removeItem(selectedValues, itemValue, comparer) { return selectedValues.filter((selectedValue) => !compareItemEquality(itemValue, selectedValue, comparer)); } //#endregion //#region ../node_modules/@base-ui/react/esm/internals/serializeValue.js function serializeValue(value) { if (value == null) return ""; if (typeof value === "string") return value; try { return JSON.stringify(value); } catch { return String(value); } } //#endregion //#region ../node_modules/@base-ui/react/esm/internals/resolveValueLabel.js function isGroupedItems(items) { return items != null && items.length > 0 && typeof items[0] === "object" && items[0] != null && "items" in items[0]; } /** * Checks if the items array contains an item with a null value that has a non-null label. */ function hasNullItemLabel(items) { if (!Array.isArray(items)) return items != null && "null" in items; const arrayItems = items; if (isGroupedItems(arrayItems)) { for (const group of arrayItems) for (const item of group.items) if (item && item.value == null && item.label != null) return true; return false; } for (const item of arrayItems) if (item && item.value == null && item.label != null) return true; return false; } function stringifyAsLabel(item, itemToStringLabel) { if (itemToStringLabel && item != null) return itemToStringLabel(item) ?? ""; if (item && typeof item === "object") { if ("label" in item && item.label != null) return String(item.label); if ("value" in item) return String(item.value); } return serializeValue(item); } function stringifyAsValue(item, itemToStringValue) { if (itemToStringValue && item != null) return itemToStringValue(item) ?? ""; if (item && typeof item === "object" && "value" in item && "label" in item) return serializeValue(item.value); return serializeValue(item); } function resolveSelectedLabel(value, items, itemToStringLabel) { function fallback() { return stringifyAsLabel(value, itemToStringLabel); } if (itemToStringLabel && value != null) return itemToStringLabel(value); if (value && typeof value === "object" && "label" in value && value.label != null) return value.label; if (items && !Array.isArray(items)) return items[value] ?? fallback(); if (Array.isArray(items)) { const arrayItems = items; const flatItems = isGroupedItems(arrayItems) ? arrayItems.flatMap((group) => group.items) : arrayItems; if (value == null || typeof value !== "object") { const match = flatItems.find((item) => item.value === value); if (match && match.label != null) return match.label; return fallback(); } if ("value" in value) { const match = flatItems.find((item) => item && item.value === value.value); if (match && match.label != null) return match.label; } } return fallback(); } function resolveMultipleLabels(values, items, itemToStringLabel) { return values.reduce((acc, value, index) => { if (index > 0) acc.push(", "); acc.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Fragment, { children: resolveSelectedLabel(value, items, itemToStringLabel) }, index)); return acc; }, []); } //#endregion //#region ../node_modules/@base-ui/react/esm/select/store.js var selectors = { id: createSelector((state) => state.id), labelId: createSelector((state) => state.labelId), modal: createSelector((state) => state.modal), multiple: createSelector((state) => state.multiple), items: createSelector((state) => state.items), itemToStringLabel: createSelector((state) => state.itemToStringLabel), itemToStringValue: createSelector((state) => state.itemToStringValue), isItemEqualToValue: createSelector((state) => state.isItemEqualToValue), value: createSelector((state) => state.value), hasSelectedValue: createSelector((state) => { const { value, multiple, itemToStringValue } = state; if (value == null) return false; if (multiple && Array.isArray(value)) return value.length > 0; return stringifyAsValue(value, itemToStringValue) !== ""; }), hasNullItemLabel: createSelector((state, enabled) => { return enabled ? hasNullItemLabel(state.items) : false; }), open: createSelector((state) => state.open), mounted: createSelector((state) => state.mounted), forceMount: createSelector((state) => state.forceMount), transitionStatus: createSelector((state) => state.transitionStatus), openMethod: createSelector((state) => state.openMethod), activeIndex: createSelector((state) => state.activeIndex), selectedIndex: createSelector((state) => state.selectedIndex), isActive: createSelector((state, index) => state.activeIndex === index), isSelected: createSelector((state, index, itemValue) => { const comparer = state.isItemEqualToValue; const storeValue = state.value; if (state.multiple) return Array.isArray(storeValue) && storeValue.some((selectedItem) => compareItemEquality(itemValue, selectedItem, comparer)); if (state.selectedIndex === index && state.selectedIndex !== null) return true; return compareItemEquality(itemValue, storeValue, comparer); }), isSelectedByFocus: createSelector((state, index) => { return state.selectedIndex === index; }), popupProps: createSelector((state) => state.popupProps), triggerProps: createSelector((state) => state.triggerProps), triggerElement: createSelector((state) => state.triggerElement), positionerElement: createSelector((state) => state.positionerElement), listElement: createSelector((state) => state.listElement), popupSide: createSelector((state) => state.popupSide), scrollUpArrowVisible: createSelector((state) => state.scrollUpArrowVisible), scrollDownArrowVisible: createSelector((state) => state.scrollDownArrowVisible), hasScrollArrows: createSelector((state) => state.hasScrollArrows) }; //#endregion //#region ../node_modules/@base-ui/react/esm/internals/clamp.js function clamp(val, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) { return Math.max(min, Math.min(val, max)); } function getMaxScrollOffset(scrollSize, clientSize) { return Math.max(0, scrollSize - clientSize); } function normalizeScrollOffset(value, max) { if (max <= 0) return 0; const clamped = clamp(value, 0, max); const startDistance = clamped; const endDistance = max - clamped; const withinStartTolerance = startDistance <= 1; const withinEndTolerance = endDistance <= 1; if (withinStartTolerance && withinEndTolerance) return startDistance <= endDistance ? 0 : max; if (withinStartTolerance) return 0; if (withinEndTolerance) return max; return clamped; } //#endregion //#region ../node_modules/@base-ui/react/esm/select/root/SelectRoot.js /** * Groups all parts of the select. * Doesn't render its own HTML element. * * Documentation: [Base UI Select](https://base-ui.com/react/components/select) */ function SelectRoot(props) { const { id, value: valueProp, defaultValue = null, onValueChange, open: openProp, defaultOpen = false, onOpenChange, name: nameProp, form, autoComplete, disabled: disabledProp = false, readOnly = false, required = false, modal = true, actionsRef, inputRef, onOpenChangeComplete, items, multiple = false, itemToStringLabel, itemToStringValue, isItemEqualToValue = defaultItemEquality, highlightItemOnHover = true, children } = props; const { clearErrors } = useFormContext(); const { setDirty, setTouched, setFocused, shouldValidateOnChange, validityData, setFilled, name: fieldName, disabled: fieldDisabled, validation, validationMode } = useFieldRootContext(); const generatedId = useLabelableId({ id }); const disabled = fieldDisabled || disabledProp; const name = fieldName ?? nameProp; const [value, setValueUnwrapped] = useControlled({ controlled: valueProp, default: multiple ? defaultValue ?? EMPTY_ARRAY : defaultValue, name: "Select", state: "value" }); const [open, setOpenUnwrapped] = useControlled({ controlled: openProp, default: defaultOpen, name: "Select", state: "open" }); const listRef = import_react.useRef([]); const labelsRef = import_react.useRef([]); const popupRef = import_react.useRef(null); const scrollHandlerRef = import_react.useRef(null); const scrollArrowsMountedCountRef = import_react.useRef(0); const valueRef = import_react.useRef(null); const valuesRef = import_react.useRef([]); const typingRef = import_react.useRef(false); const keyboardActiveRef = import_react.useRef(false); const firstItemTextRef = import_react.useRef(null); const selectedItemTextRef = import_react.useRef(null); const selectionRef = import_react.useRef({ allowSelectedMouseUp: false, allowUnselectedMouseUp: false, dragY: 0 }); const alignItemWithTriggerActiveRef = import_react.useRef(false); const { mounted, setMounted, transitionStatus } = useTransitionStatus(open); const { openMethod, triggerProps: interactionTypeProps } = useOpenInteractionType(open); const store = useRefWithInit(() => new Store({ id: generatedId, labelId: void 0, modal, multiple, itemToStringLabel, itemToStringValue, isItemEqualToValue, value, open, mounted, transitionStatus, items, forceMount: false, openMethod: null, activeIndex: null, selectedIndex: null, popupProps: {}, triggerProps: {}, triggerElement: null, positionerElement: null, listElement: null, popupSide: null, scrollUpArrowVisible: false, scrollDownArrowVisible: false, hasScrollArrows: false })).current; const activeIndex = useStore(store, selectors.activeIndex); const selectedIndex = useStore(store, selectors.selectedIndex); const triggerElement = useStore(store, selectors.triggerElement); const positionerElement = useStore(store, selectors.positionerElement); const previousOpenMethod = usePreviousValue(openMethod); const renderedOpenMethod = openMethod ?? previousOpenMethod; const serializedValue = import_react.useMemo(() => { if (multiple && Array.isArray(value) && value.length === 0) return ""; return stringifyAsValue(value, itemToStringValue); }, [ multiple, value, itemToStringValue ]); const fieldStringValue = import_react.useMemo(() => { if (multiple && Array.isArray(value)) return value.map((currentValue) => stringifyAsValue(currentValue, itemToStringValue)); return stringifyAsValue(value, itemToStringValue); }, [ multiple, value, itemToStringValue ]); useRegisterFieldControl(useValueAsRef(store.state.triggerElement), generatedId, value, useStableCallback(() => fieldStringValue)); const initialValueRef = import_react.useRef(value); const hasSelectedValue = multiple ? Array.isArray(value) && value.length > 0 : value != null; useIsoLayoutEffect(() => { if (value !== initialValueRef.current) store.set("forceMount", true); }, [store, value]); useIsoLayoutEffect(() => { setFilled(hasSelectedValue); }, [hasSelectedValue, setFilled]); useIsoLayoutEffect(function syncSelectedIndex() { const registry = valuesRef.current; let nextIndex; if (multiple) { const currentValue = Array.isArray(value) ? value : []; if (currentValue.length === 0) nextIndex = null; else { const lastValue = currentValue[currentValue.length - 1]; const lastIndex = findItemIndex(registry, lastValue, isItemEqualToValue); nextIndex = lastIndex === -1 ? null : lastIndex; } } else { const index = findItemIndex(registry, value, isItemEqualToValue); nextIndex = index === -1 ? null : index; } if (nextIndex === null) selectedItemTextRef.current = null; if (open) return; store.set("selectedIndex", nextIndex); }, [ hasSelectedValue, multiple, open, value, valuesRef, isItemEqualToValue, store, selectedItemTextRef ]); useValueChanged(value, () => { clearErrors(name); setDirty(value !== validityData.initialValue); if (shouldValidateOnChange()) validation.commit(value); else validation.commit(value, true); }); const setOpen = useStableCallback((nextOpen, eventDetails) => { onOpenChange?.(nextOpen, eventDetails); if (eventDetails.isCanceled) return; setOpenUnwrapped(nextOpen); if (!nextOpen && (eventDetails.reason === "focus-out" || eventDetails.reason === "outside-press")) { setTouched(true); setFocused(false); if (validationMode === "onBlur") validation.commit(value); } if (!nextOpen && store.state.activeIndex !== null) { const activeOption = listRef.current[store.state.activeIndex]; queueMicrotask(() => { activeOption?.setAttribute("tabindex", "-1"); }); } }); const handleUnmount = useStableCallback(() => { setMounted(false); store.update({ activeIndex: null, openMethod: null }); onOpenChangeComplete?.(false); }); useOpenChangeComplete({ enabled: !actionsRef, open, ref: popupRef, onComplete() { if (!open) handleUnmount(); } }); import_react.useImperativeHandle(actionsRef, () => ({ unmount: handleUnmount }), [handleUnmount]); const setValue = useStableCallback((nextValue, eventDetails) => { onValueChange?.(nextValue, eventDetails); if (eventDetails.isCanceled) return; setValueUnwrapped(nextValue); }); const handleScrollArrowVisibility = useStableCallback(() => { const scroller = store.state.listElement || popupRef.current; if (!scroller) return; const maxScrollTop = getMaxScrollOffset(scroller.scrollHeight, scroller.clientHeight); const scrollTop = normalizeScrollOffset(scroller.scrollTop, maxScrollTop); const shouldShowUp = scrollTop > 0; const shouldShowDown = scrollTop < maxScrollTop; if (store.state.scrollUpArrowVisible !== shouldShowUp) store.set("scrollUpArrowVisible", shouldShowUp); if (store.state.scrollDownArrowVisible !== shouldShowDown) store.set("scrollDownArrowVisible", shouldShowDown); }); const floatingContext = useFloatingRootContext({ open, onOpenChange: setOpen, elements: { reference: triggerElement, floating: positionerElement } }); const click = useClick(floatingContext, { enabled: !readOnly && !disabled, event: "mousedown" }); const dismiss = useDismiss(floatingContext); const listNavigation = useListNavigation(floatingContext, { enabled: !readOnly && !disabled, listRef, activeIndex, selectedIndex, disabledIndices: EMPTY_ARRAY, onNavigate(nextActiveIndex) { if (nextActiveIndex === null && !open) return; store.set("activeIndex", nextActiveIndex); }, focusItemOnHover: highlightItemOnHover }); const typeahead = useTypeahead(floatingContext, { enabled: !readOnly && !disabled && (open || !multiple), listRef: labelsRef, activeIndex, selectedIndex, onMatch(index) { if (open) store.set("activeIndex", index); else setValue(valuesRef.current[index], createChangeEventDetails("none")); }, onTyping(typing) { typingRef.current = typing; } }); const mergedTriggerProps = import_react.useMemo(() => { const triggerInteractionProps = mergeProps(typeahead.reference, listNavigation.reference, dismiss.reference, click.reference, interactionTypeProps); if (generatedId) triggerInteractionProps.id = generatedId; return triggerInteractionProps; }, [ click.reference, typeahead.reference, listNavigation.reference, dismiss.reference, interactionTypeProps, generatedId ]); const popupProps = import_react.useMemo(() => mergeProps(FOCUSABLE_POPUP_PROPS, typeahead.floating, listNavigation.floating, dismiss.floating), [ typeahead.floating, listNavigation.floating, dismiss.floating ]); const itemProps = listNavigation.item ?? EMPTY_OBJECT; useOnFirstRender(() => { store.update({ popupProps, triggerProps: mergedTriggerProps }); }); useIsoLayoutEffect(() => { store.update({ id: generatedId, modal, multiple, value, open, mounted, transitionStatus, popupProps, triggerProps: mergedTriggerProps, items, itemToStringLabel, itemToStringValue, isItemEqualToValue, openMethod: renderedOpenMethod }); }, [ store, generatedId, modal, multiple, value, open, mounted, transitionStatus, popupProps, mergedTriggerProps, items, itemToStringLabel, itemToStringValue, isItemEqualToValue, renderedOpenMethod ]); const contextValue = import_react.useMemo(() => ({ store, name, required, disabled, readOnly, multiple, highlightItemOnHover, setValue, setOpen, listRef, popupRef, scrollHandlerRef, handleScrollArrowVisibility, scrollArrowsMountedCountRef, itemProps, events: floatingContext.context.events, valueRef, valuesRef, labelsRef, typingRef, selectionRef, firstItemTextRef, selectedItemTextRef, validation, onOpenChangeComplete, keyboardActiveRef, alignItemWithTriggerActiveRef, initialValueRef }), [ store, name, required, disabled, readOnly, multiple, highlightItemOnHover, setValue, setOpen, itemProps, floatingContext.context.events, validation, onOpenChangeComplete, handleScrollArrowVisibility ]); const ref = useMergedRefs(inputRef, validation.inputRef); const hasMultipleSelection = multiple && Array.isArray(value) && value.length > 0; const hiddenInputName = multiple ? void 0 : name; const hiddenInputs = import_react.useMemo(() => { if (!multiple || !Array.isArray(value) || !name) return null; return value.map((v) => { const currentSerializedValue = stringifyAsValue(v, itemToStringValue); return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { type: "hidden", form, name, value: currentSerializedValue }, currentSerializedValue); }); }, [ multiple, value, form, name, itemToStringValue ]); return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectRootContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SelectFloatingContext.Provider, { value: floatingContext, children: [ children, /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { ...validation.getInputValidationProps({ onFocus() { store.state.triggerElement?.focus({ focusVisible: true }); }, onChange(event) { if (event.nativeEvent.defaultPrevented || disabled || readOnly) { event.preventBaseUIHandler?.(); return; } const nextValue = event.currentTarget.value; const details = createChangeEventDetails(none, event.nativeEvent); function handleChange() { if (multiple) return; const matchingValue = valuesRef.current.find((v) => { if (stringifyAsValue(v, itemToStringValue).toLowerCase() === nextValue.toLowerCase()) return true; if (stringifyAsLabel(v, itemToStringLabel).toLowerCase() === nextValue.toLowerCase()) return true; return false; }); if (matchingValue != null) { setDirty(matchingValue !== validityData.initialValue); setValue(matchingValue, details); if (shouldValidateOnChange()) validation.commit(matchingValue); } } store.set("forceMount", true); queueMicrotask(handleChange); } }), id: generatedId && hiddenInputName == null ? `${generatedId}-hidden-input` : void 0, form, name: hiddenInputName, autoComplete, value: serializedValue, disabled, required: required && !hasMultipleSelection, readOnly, ref, style: name ? visuallyHiddenInput : visuallyHidden, tabIndex: -1, "aria-hidden": true, suppressHydrationWarning: true }), hiddenInputs ] }) }); } //#endregion //#region ../node_modules/@base-ui/react/esm/utils/resolveAriaLabelledBy.js function getDefaultLabelId(id) { return id == null ? void 0 : `${id}-label`; } function resolveAriaLabelledBy(fieldLabelId, localLabelId) { return fieldLabelId ?? localLabelId; } //#endregion //#region ../node_modules/@base-ui/react/esm/select/label/SelectLabel.js /** * An accessible label that is automatically associated with the select trigger. * Renders a `
` element. * * Documentation: [Base UI Select](https://base-ui.com/react/components/select) */ var SelectLabel = /* @__PURE__ */ import_react.forwardRef(function SelectLabel(componentProps, forwardedRef) { const { render, className, style, ...elementProps } = componentProps; const elementPropsWithoutId = elementProps; delete elementPropsWithoutId.id; const fieldRootContext = useFieldRootContext(); const { store } = useSelectRootContext(); const triggerElement = useStore(store, selectors.triggerElement); const rootId = useStore(store, selectors.id); const labelProps = useLabel({ id: getDefaultLabelId(rootId), fallbackControlId: triggerElement?.id ?? rootId, setLabelId(nextLabelId) { store.set("labelId", nextLabelId); } }); return useRenderElement("div", componentProps, { ref: forwardedRef, state: fieldRootContext.state, props: [labelProps, elementProps], stateAttributesMapping: fieldValidityMapping }); }); SelectLabel.displayName = "SelectLabel"; //#endregion //#region ../node_modules/@base-ui/react/esm/select/trigger/SelectTrigger.js var BOUNDARY_OFFSET = 2; var SELECTED_DELAY = 400; var stateAttributesMapping$4 = { ...pressableTriggerOpenStateMapping, ...fieldValidityMapping, popupSide: (side) => side ? { "data-popup-side": side } : null, value: () => null }; /** * A button that opens the select popup. * Renders a `