import { c as $880e95eb8b93ba9a$export$ecf600387e221c37, d as $e1995378a142960e$export$18af5c7a9e9b3664, e as $e1995378a142960e$export$bf788dd355e3a401, f as $e1995378a142960e$export$fb8073518f34e6ec, g as $23b9f4fcf0fe224b$export$fd11f34e1d07f134, h as $7135fc7d473fd974$export$4feb769f8ddf26c5, i as $7135fc7d473fd974$export$d40e14dec8b060a8, j as $23b9f4fcf0fe224b$export$8258a0665a675899 } from "./SelectionManager-CabSdgMq.js";
import { e as $8ae05eaa5c114e9c$export$7f54fc3180508a52, k as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, d as $bdb11010cef70236$export$f680877a34711e37, b as $3ef42575df84b30b$export$9d1611c77c2fe928, j as $bdb11010cef70236$export$b4cc09c592e8fdb8, p as $ff5963eb1fccf552$export$e08e3b67e392101e, a as $64fa3d84918910a7$export$29f1550f4b0d4415, l as $df56164dff5785e2$export$4338b53315abf666, h as $64fa3d84918910a7$export$4d86445c2cf5e3, i as $64fa3d84918910a7$export$2881499e37b75b9a, o as $64fa3d84918910a7$export$c62b8e45d58ddad9, f as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8 } from "./utils-cvK1vxO7.js";
import React__default, { useRef, createContext, forwardRef, useContext, useCallback, useMemo, useEffect } from "react";
import { c as $62d8ded9296f3872$export$cfa2225e87938781, d as $982254629710d113$export$b95089534ab7c1fd, e as $453cc9f0df89c0a5$export$77d5aafae4e095b2, b as $325a3faab7a68acd$export$a16aca283550c30d, f as $2a25aae57d74318e$export$a05409b8bb224a5a, g as $431f98aba6844401$export$6615d83f6de245ce, h as $72a5793c14baf454$export$e0e4026c12a8bdbb } from "./Separator-BPvqJny4.js";
import { a as $8e6cc465cc68f603$export$b0d3ecf7112093a7 } from "./context-DCAZLyDS.js";
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "./Text-AxKZjtFm.js";
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-D2C6R0DK.js";
import { a as $e72dd72e1c76a225$export$ba9d38c0f1bf2b36, $ as $e72dd72e1c76a225$export$2f645645f7bca764, b as $cdc5a6778b766db2$export$a9d04c5684123369 } from "./useListState-Xsk-aOvN.js";
import { a as $ea8dcbcb9ea1b556$export$7e924b3091a3bd18 } from "./usePress-CBQIDzpQ.js";
import { B as $c87311424ea30a05$export$9ac100e40613ea10, C as $c87311424ea30a05$export$78551043582a6a98, w as $6179b936705e76d3$export$ae780daf29e6d456, l as $507fabe10e71c6fb$export$b9b3dfddab17db27 } from "./useHover-LmGemtHE.js";
import { $ as $9ab94262bd0047c7$export$420e68273165f4ec, a as $f7dceffc5ad7768b$export$4e328f61c538687f } from "./useFocusRing-CUxgjvAY.js";
import { $ as $d191a55c9702f145$export$8467354a121f1b9f } from "./useLabel-C8umX0gk.js";
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-DMOmz986.js";
import { b as $9bf71ea28793e738$export$20e40289641fbbb6 } from "./FocusScope-DJApHXhY.js";
function $a5fa973c1850dd36$export$ccaea96c28e8b9e7(props, ref) {
  let { collection, onLoadMore, scrollOffset = 1 } = props;
  let sentinelObserver = useRef(null);
  let triggerLoadMore = $8ae05eaa5c114e9c$export$7f54fc3180508a52((entries) => {
    for (let entry of entries)
      if (entry.isIntersecting && onLoadMore) onLoadMore();
  });
  $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
    if (ref.current) {
      sentinelObserver.current = new IntersectionObserver(triggerLoadMore, {
        root: $62d8ded9296f3872$export$cfa2225e87938781(ref === null || ref === void 0 ? void 0 : ref.current),
        rootMargin: `0px ${100 * scrollOffset}% ${100 * scrollOffset}% ${100 * scrollOffset}%`
      });
      sentinelObserver.current.observe(ref.current);
    }
    return () => {
      if (sentinelObserver.current) sentinelObserver.current.disconnect();
    };
  }, [
    collection,
    triggerLoadMore,
    ref,
    scrollOffset
  ]);
}
const $b1f0cad8af73213b$export$3585ede4d035bf14 = /* @__PURE__ */ new WeakMap();
function $b1f0cad8af73213b$var$normalizeKey(key) {
  if (typeof key === "string") return key.replace(/\s*/g, "");
  return "" + key;
}
function $b1f0cad8af73213b$export$9145995848b05025(state, itemKey) {
  let data = $b1f0cad8af73213b$export$3585ede4d035bf14.get(state);
  if (!data) throw new Error("Unknown list");
  return `${data.id}-option-${$b1f0cad8af73213b$var$normalizeKey(itemKey)}`;
}
function $c132121280ec012d$export$50eacbbf140a3141(props, state, ref) {
  let domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
    labelable: true
  });
  let selectionBehavior = props.selectionBehavior || "toggle";
  let linkBehavior = props.linkBehavior || (selectionBehavior === "replace" ? "action" : "override");
  if (selectionBehavior === "toggle" && linkBehavior === "action")
    linkBehavior = "override";
  let { listProps } = $982254629710d113$export$b95089534ab7c1fd({
    ...props,
    ref,
    selectionManager: state.selectionManager,
    collection: state.collection,
    disabledKeys: state.disabledKeys,
    linkBehavior
  });
  let { focusWithinProps } = $9ab94262bd0047c7$export$420e68273165f4ec({
    onFocusWithin: props.onFocus,
    onBlurWithin: props.onBlur,
    onFocusWithinChange: props.onFocusChange
  });
  let id = $bdb11010cef70236$export$f680877a34711e37(props.id);
  $b1f0cad8af73213b$export$3585ede4d035bf14.set(state, {
    id,
    shouldUseVirtualFocus: props.shouldUseVirtualFocus,
    shouldSelectOnPressUp: props.shouldSelectOnPressUp,
    shouldFocusOnHover: props.shouldFocusOnHover,
    isVirtualized: props.isVirtualized,
    onAction: props.onAction,
    linkBehavior
  });
  let { labelProps, fieldProps } = $d191a55c9702f145$export$8467354a121f1b9f({
    ...props,
    id,
    // listbox is not an HTML input element so it
    // shouldn't be labeled by a <label> element.
    labelElementType: "span"
  });
  return {
    labelProps,
    listBoxProps: $3ef42575df84b30b$export$9d1611c77c2fe928(domProps, focusWithinProps, state.selectionManager.selectionMode === "multiple" ? {
      "aria-multiselectable": "true"
    } : {}, {
      role: "listbox",
      ...$3ef42575df84b30b$export$9d1611c77c2fe928(fieldProps, listProps)
    })
  };
}
function $293f70390ea03370$export$497855f14858aa34(props, state, ref) {
  var _item_props, _item_props1;
  let { key } = props;
  let data = $b1f0cad8af73213b$export$3585ede4d035bf14.get(state);
  var _props_isDisabled;
  let isDisabled = (_props_isDisabled = props.isDisabled) !== null && _props_isDisabled !== void 0 ? _props_isDisabled : state.selectionManager.isDisabled(key);
  var _props_isSelected;
  let isSelected = (_props_isSelected = props.isSelected) !== null && _props_isSelected !== void 0 ? _props_isSelected : state.selectionManager.isSelected(key);
  var _props_shouldSelectOnPressUp;
  let shouldSelectOnPressUp = (_props_shouldSelectOnPressUp = props.shouldSelectOnPressUp) !== null && _props_shouldSelectOnPressUp !== void 0 ? _props_shouldSelectOnPressUp : data === null || data === void 0 ? void 0 : data.shouldSelectOnPressUp;
  var _props_shouldFocusOnHover;
  let shouldFocusOnHover = (_props_shouldFocusOnHover = props.shouldFocusOnHover) !== null && _props_shouldFocusOnHover !== void 0 ? _props_shouldFocusOnHover : data === null || data === void 0 ? void 0 : data.shouldFocusOnHover;
  var _props_shouldUseVirtualFocus;
  let shouldUseVirtualFocus = (_props_shouldUseVirtualFocus = props.shouldUseVirtualFocus) !== null && _props_shouldUseVirtualFocus !== void 0 ? _props_shouldUseVirtualFocus : data === null || data === void 0 ? void 0 : data.shouldUseVirtualFocus;
  var _props_isVirtualized;
  let isVirtualized = (_props_isVirtualized = props.isVirtualized) !== null && _props_isVirtualized !== void 0 ? _props_isVirtualized : data === null || data === void 0 ? void 0 : data.isVirtualized;
  let labelId = $bdb11010cef70236$export$b4cc09c592e8fdb8();
  let descriptionId = $bdb11010cef70236$export$b4cc09c592e8fdb8();
  let optionProps = {
    role: "option",
    "aria-disabled": isDisabled || void 0,
    "aria-selected": state.selectionManager.selectionMode !== "none" ? isSelected : void 0
  };
  if (!($c87311424ea30a05$export$9ac100e40613ea10() && $c87311424ea30a05$export$78551043582a6a98())) {
    optionProps["aria-label"] = props["aria-label"];
    optionProps["aria-labelledby"] = labelId;
    optionProps["aria-describedby"] = descriptionId;
  }
  let item = state.collection.getItem(key);
  if (isVirtualized) {
    let index = Number(item === null || item === void 0 ? void 0 : item.index);
    optionProps["aria-posinset"] = Number.isNaN(index) ? void 0 : index + 1;
    optionProps["aria-setsize"] = $453cc9f0df89c0a5$export$77d5aafae4e095b2(state.collection);
  }
  let onAction = (data === null || data === void 0 ? void 0 : data.onAction) ? () => {
    var _data_onAction;
    return data === null || data === void 0 ? void 0 : (_data_onAction = data.onAction) === null || _data_onAction === void 0 ? void 0 : _data_onAction.call(data, key);
  } : void 0;
  let id = $b1f0cad8af73213b$export$9145995848b05025(state, key);
  let { itemProps, isPressed, isFocused, hasAction, allowsSelection } = $880e95eb8b93ba9a$export$ecf600387e221c37({
    selectionManager: state.selectionManager,
    key,
    ref,
    shouldSelectOnPressUp,
    allowsDifferentPressOrigin: shouldSelectOnPressUp && shouldFocusOnHover,
    isVirtualized,
    shouldUseVirtualFocus,
    isDisabled,
    onAction: onAction || (item === null || item === void 0 ? void 0 : (_item_props = item.props) === null || _item_props === void 0 ? void 0 : _item_props.onAction) ? $ff5963eb1fccf552$export$e08e3b67e392101e(item === null || item === void 0 ? void 0 : (_item_props1 = item.props) === null || _item_props1 === void 0 ? void 0 : _item_props1.onAction, onAction) : void 0,
    linkBehavior: data === null || data === void 0 ? void 0 : data.linkBehavior,
    id
  });
  let { hoverProps } = $6179b936705e76d3$export$ae780daf29e6d456({
    isDisabled: isDisabled || !shouldFocusOnHover,
    onHoverStart() {
      if (!$507fabe10e71c6fb$export$b9b3dfddab17db27()) {
        state.selectionManager.setFocused(true);
        state.selectionManager.setFocusedKey(key);
      }
    }
  });
  let domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(item === null || item === void 0 ? void 0 : item.props);
  delete domProps.id;
  let linkProps = $ea8dcbcb9ea1b556$export$7e924b3091a3bd18(item === null || item === void 0 ? void 0 : item.props);
  return {
    optionProps: {
      ...optionProps,
      ...$3ef42575df84b30b$export$9d1611c77c2fe928(domProps, itemProps, hoverProps, linkProps),
      id
    },
    labelProps: {
      id: labelId
    },
    descriptionProps: {
      id: descriptionId
    },
    isFocused,
    isFocusVisible: isFocused && state.selectionManager.isFocused && $507fabe10e71c6fb$export$b9b3dfddab17db27(),
    isSelected,
    isDisabled,
    isPressed,
    allowsSelection,
    hasAction
  };
}
function $af383d3bef1cfdc9$export$c3f9f39876e4bc7(props) {
  let { heading, "aria-label": ariaLabel } = props;
  let headingId = $bdb11010cef70236$export$f680877a34711e37();
  return {
    itemProps: {
      role: "presentation"
    },
    headingProps: heading ? {
      // Techincally, listbox cannot contain headings according to ARIA.
      // We hide the heading from assistive technology, using role="presentation",
      // and only use it as a visual label for the nested group.
      id: headingId,
      role: "presentation"
    } : {},
    groupProps: {
      role: "group",
      "aria-label": ariaLabel,
      "aria-labelledby": heading ? headingId : void 0
    }
  };
}
const $612b8eb6cb90e02d$export$d188a835a7bc5783 = /* @__PURE__ */ createContext({});
const $612b8eb6cb90e02d$export$f55761759794cf55 = /* @__PURE__ */ createContext(null);
const $612b8eb6cb90e02d$export$62ed72bc21f6b8a6 = /* @__PURE__ */ forwardRef(function DropIndicator(props, ref) {
  let { render } = useContext($612b8eb6cb90e02d$export$f55761759794cf55);
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, render(props, ref));
});
function $612b8eb6cb90e02d$export$971707d8a129a1f7(dragAndDropHooks, dropState) {
  var _dragAndDropHooks_isVirtualDragging;
  let renderDropIndicator = dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.renderDropIndicator;
  let isVirtualDragging = dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : (_dragAndDropHooks_isVirtualDragging = dragAndDropHooks.isVirtualDragging) === null || _dragAndDropHooks_isVirtualDragging === void 0 ? void 0 : _dragAndDropHooks_isVirtualDragging.call(dragAndDropHooks);
  let fn = useCallback((target) => {
    if (isVirtualDragging || (dropState === null || dropState === void 0 ? void 0 : dropState.isDropTarget(target))) return renderDropIndicator ? renderDropIndicator(target) : /* @__PURE__ */ React__default.createElement($612b8eb6cb90e02d$export$62ed72bc21f6b8a6, {
      target
    });
  }, [
    dropState === null || dropState === void 0 ? void 0 : dropState.target,
    isVirtualDragging,
    renderDropIndicator
  ]);
  return (dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDropIndicator) ? fn : void 0;
}
function $612b8eb6cb90e02d$export$d1e8e3fbb7461f6(selectionManager, dragAndDropHooks, dropState) {
  var _dragAndDropHooks_isVirtualDragging, _dropState_target;
  let focusedKey = selectionManager.focusedKey;
  let dropTargetKey = null;
  if ((dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : (_dragAndDropHooks_isVirtualDragging = dragAndDropHooks.isVirtualDragging) === null || _dragAndDropHooks_isVirtualDragging === void 0 ? void 0 : _dragAndDropHooks_isVirtualDragging.call(dragAndDropHooks)) && (dropState === null || dropState === void 0 ? void 0 : (_dropState_target = dropState.target) === null || _dropState_target === void 0 ? void 0 : _dropState_target.type) === "item") {
    dropTargetKey = dropState.target.key;
    if (dropState.target.dropPosition === "after") {
      let nextKey = dropState.collection.getKeyAfter(dropTargetKey);
      let lastDescendantKey = null;
      if (nextKey != null) {
        var _dropState_collection_getItem;
        var _dropState_collection_getItem_level;
        let targetLevel = (_dropState_collection_getItem_level = (_dropState_collection_getItem = dropState.collection.getItem(dropTargetKey)) === null || _dropState_collection_getItem === void 0 ? void 0 : _dropState_collection_getItem.level) !== null && _dropState_collection_getItem_level !== void 0 ? _dropState_collection_getItem_level : 0;
        while (nextKey) {
          let node = dropState.collection.getItem(nextKey);
          if (!node) break;
          if (node.type !== "item") {
            nextKey = dropState.collection.getKeyAfter(nextKey);
            continue;
          }
          var _node_level;
          if (((_node_level = node.level) !== null && _node_level !== void 0 ? _node_level : 0) <= targetLevel) break;
          lastDescendantKey = nextKey;
          nextKey = dropState.collection.getKeyAfter(nextKey);
        }
      }
      var _ref;
      dropTargetKey = (_ref = nextKey !== null && nextKey !== void 0 ? nextKey : lastDescendantKey) !== null && _ref !== void 0 ? _ref : dropTargetKey;
    }
  }
  return useMemo(() => {
    return new Set([
      focusedKey,
      dropTargetKey
    ].filter((k) => k != null));
  }, [
    focusedKey,
    dropTargetKey
  ]);
}
const $eed445e0843c11d0$export$7ff8f37d2d81a48d = /* @__PURE__ */ createContext(null);
const $eed445e0843c11d0$export$7c5906fe4f1f2af2 = /* @__PURE__ */ createContext(null);
const $eed445e0843c11d0$export$41f133550aa26f48 = /* @__PURE__ */ forwardRef(function ListBox(props, ref) {
  [props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $eed445e0843c11d0$export$7ff8f37d2d81a48d);
  let state = useContext($eed445e0843c11d0$export$7c5906fe4f1f2af2);
  if (state) return /* @__PURE__ */ React__default.createElement($eed445e0843c11d0$var$ListBoxInner, {
    state,
    props,
    listBoxRef: ref
  });
  return /* @__PURE__ */ React__default.createElement($e1995378a142960e$export$bf788dd355e3a401, {
    content: /* @__PURE__ */ React__default.createElement($e1995378a142960e$export$fb8073518f34e6ec, props)
  }, (collection) => /* @__PURE__ */ React__default.createElement($eed445e0843c11d0$var$StandaloneListBox, {
    props,
    listBoxRef: ref,
    collection
  }));
});
function $eed445e0843c11d0$var$StandaloneListBox({ props, listBoxRef, collection }) {
  props = {
    ...props,
    collection,
    children: null,
    items: null
  };
  let { layoutDelegate } = useContext($7135fc7d473fd974$export$4feb769f8ddf26c5);
  let state = $e72dd72e1c76a225$export$2f645645f7bca764({
    ...props,
    layoutDelegate
  });
  return /* @__PURE__ */ React__default.createElement($eed445e0843c11d0$var$ListBoxInner, {
    state,
    props,
    listBoxRef
  });
}
function $eed445e0843c11d0$var$ListBoxInner({ state: inputState, props, listBoxRef }) {
  [props, listBoxRef] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, listBoxRef, $8e6cc465cc68f603$export$b0d3ecf7112093a7);
  let { dragAndDropHooks, layout = "stack", orientation = "vertical", filter } = props;
  let state = $e72dd72e1c76a225$export$ba9d38c0f1bf2b36(inputState, filter);
  let { collection, selectionManager } = state;
  let isListDraggable = !!(dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDraggableCollectionState);
  let isListDroppable = !!(dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDroppableCollectionState);
  let { direction } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
  let { disabledBehavior, disabledKeys } = selectionManager;
  let collator = $325a3faab7a68acd$export$a16aca283550c30d({
    usage: "search",
    sensitivity: "base"
  });
  let { isVirtualized, layoutDelegate, dropTargetDelegate: ctxDropTargetDelegate, CollectionRoot } = useContext($7135fc7d473fd974$export$4feb769f8ddf26c5);
  let keyboardDelegate = useMemo(() => props.keyboardDelegate || new $2a25aae57d74318e$export$a05409b8bb224a5a({
    collection,
    collator,
    ref: listBoxRef,
    disabledKeys,
    disabledBehavior,
    layout,
    orientation,
    direction,
    layoutDelegate
  }), [
    collection,
    collator,
    listBoxRef,
    disabledBehavior,
    disabledKeys,
    orientation,
    direction,
    props.keyboardDelegate,
    layout,
    layoutDelegate
  ]);
  let { listBoxProps } = $c132121280ec012d$export$50eacbbf140a3141({
    ...props,
    shouldSelectOnPressUp: isListDraggable || props.shouldSelectOnPressUp,
    keyboardDelegate,
    isVirtualized
  }, state, listBoxRef);
  let dragHooksProvided = useRef(isListDraggable);
  let dropHooksProvided = useRef(isListDroppable);
  useEffect(() => {
    if (process.env.NODE_ENV === "production") return;
    if (dragHooksProvided.current !== isListDraggable) console.warn("Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.");
    if (dropHooksProvided.current !== isListDroppable) console.warn("Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.");
  }, [
    isListDraggable,
    isListDroppable
  ]);
  let dragState = void 0;
  let dropState = void 0;
  let droppableCollection = void 0;
  let isRootDropTarget = false;
  let dragPreview = null;
  let preview = useRef(null);
  if (isListDraggable && dragAndDropHooks) {
    dragState = dragAndDropHooks.useDraggableCollectionState({
      collection,
      selectionManager,
      preview: dragAndDropHooks.renderDragPreview ? preview : void 0
    });
    dragAndDropHooks.useDraggableCollection({}, dragState, listBoxRef);
    let DragPreview = dragAndDropHooks.DragPreview;
    dragPreview = dragAndDropHooks.renderDragPreview ? /* @__PURE__ */ React__default.createElement(DragPreview, {
      ref: preview
    }, dragAndDropHooks.renderDragPreview) : null;
  }
  if (isListDroppable && dragAndDropHooks) {
    dropState = dragAndDropHooks.useDroppableCollectionState({
      collection,
      selectionManager
    });
    let dropTargetDelegate = dragAndDropHooks.dropTargetDelegate || ctxDropTargetDelegate || new dragAndDropHooks.ListDropTargetDelegate(collection, listBoxRef, {
      orientation,
      layout,
      direction
    });
    droppableCollection = dragAndDropHooks.useDroppableCollection({
      keyboardDelegate,
      dropTargetDelegate
    }, dropState, listBoxRef);
    isRootDropTarget = dropState.isDropTarget({
      type: "root"
    });
  }
  let { focusProps, isFocused, isFocusVisible } = $f7dceffc5ad7768b$export$4e328f61c538687f();
  let isEmpty = state.collection.size === 0;
  let renderValues = {
    isDropTarget: isRootDropTarget,
    isEmpty,
    isFocused,
    isFocusVisible,
    layout: props.layout || "stack",
    state
  };
  let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
    className: props.className,
    style: props.style,
    defaultClassName: "react-aria-ListBox",
    values: renderValues
  });
  let emptyState = null;
  if (isEmpty && props.renderEmptyState) emptyState = /* @__PURE__ */ React__default.createElement("div", {
    // eslint-disable-next-line
    role: "option",
    style: {
      display: "contents"
    }
  }, props.renderEmptyState(renderValues));
  let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
    global: true
  });
  return /* @__PURE__ */ React__default.createElement($9bf71ea28793e738$export$20e40289641fbbb6, null, /* @__PURE__ */ React__default.createElement("div", {
    ...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, listBoxProps, focusProps, droppableCollection === null || droppableCollection === void 0 ? void 0 : droppableCollection.collectionProps),
    ref: listBoxRef,
    slot: props.slot || void 0,
    onScroll: props.onScroll,
    "data-drop-target": isRootDropTarget || void 0,
    "data-empty": isEmpty || void 0,
    "data-focused": isFocused || void 0,
    "data-focus-visible": isFocusVisible || void 0,
    "data-layout": props.layout || "stack",
    "data-orientation": props.orientation || "vertical"
  }, /* @__PURE__ */ React__default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
    values: [
      [
        $eed445e0843c11d0$export$7ff8f37d2d81a48d,
        props
      ],
      [
        $eed445e0843c11d0$export$7c5906fe4f1f2af2,
        state
      ],
      [
        $612b8eb6cb90e02d$export$d188a835a7bc5783,
        {
          dragAndDropHooks,
          dragState,
          dropState
        }
      ],
      [
        $431f98aba6844401$export$6615d83f6de245ce,
        {
          elementType: "div"
        }
      ],
      [
        $612b8eb6cb90e02d$export$f55761759794cf55,
        {
          render: $eed445e0843c11d0$var$ListBoxDropIndicatorWrapper
        }
      ],
      [
        $7135fc7d473fd974$export$d40e14dec8b060a8,
        {
          name: "ListBoxSection",
          render: $eed445e0843c11d0$var$ListBoxSectionInner
        }
      ]
    ]
  }, /* @__PURE__ */ React__default.createElement(CollectionRoot, {
    collection,
    scrollRef: listBoxRef,
    persistedKeys: $612b8eb6cb90e02d$export$d1e8e3fbb7461f6(selectionManager, dragAndDropHooks, dropState),
    renderDropIndicator: $612b8eb6cb90e02d$export$971707d8a129a1f7(dragAndDropHooks, dropState)
  })), emptyState, dragPreview));
}
function $eed445e0843c11d0$var$ListBoxSectionInner(props, ref, section, className = "react-aria-ListBoxSection") {
  let state = useContext($eed445e0843c11d0$export$7c5906fe4f1f2af2);
  let { dragAndDropHooks, dropState } = useContext($612b8eb6cb90e02d$export$d188a835a7bc5783);
  let { CollectionBranch } = useContext($7135fc7d473fd974$export$4feb769f8ddf26c5);
  let [headingRef, heading] = $64fa3d84918910a7$export$9d4c57ee4c6ffdd8();
  var _props_arialabel;
  let { headingProps, groupProps } = $af383d3bef1cfdc9$export$c3f9f39876e4bc7({
    heading,
    "aria-label": (_props_arialabel = props["aria-label"]) !== null && _props_arialabel !== void 0 ? _props_arialabel : void 0
  });
  let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
    defaultClassName: className,
    className: props.className,
    style: props.style,
    values: {}
  });
  let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
    global: true
  });
  delete DOMProps.id;
  return /* @__PURE__ */ React__default.createElement("section", {
    ...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, groupProps),
    ref
  }, /* @__PURE__ */ React__default.createElement($72a5793c14baf454$export$e0e4026c12a8bdbb.Provider, {
    value: {
      ...headingProps,
      ref: headingRef
    }
  }, /* @__PURE__ */ React__default.createElement(CollectionBranch, {
    collection: state.collection,
    parent: section,
    renderDropIndicator: $612b8eb6cb90e02d$export$971707d8a129a1f7(dragAndDropHooks, dropState)
  })));
}
const $eed445e0843c11d0$export$a11e76429ed99b4 = /* @__PURE__ */ $e1995378a142960e$export$18af5c7a9e9b3664($23b9f4fcf0fe224b$export$fd11f34e1d07f134, function ListBoxItem(props, forwardedRef, item) {
  let ref = $df56164dff5785e2$export$4338b53315abf666(forwardedRef);
  let state = useContext($eed445e0843c11d0$export$7c5906fe4f1f2af2);
  let { dragAndDropHooks, dragState, dropState } = useContext($612b8eb6cb90e02d$export$d188a835a7bc5783);
  let { optionProps, labelProps, descriptionProps, ...states } = $293f70390ea03370$export$497855f14858aa34({
    key: item.key,
    "aria-label": props === null || props === void 0 ? void 0 : props["aria-label"]
  }, state, ref);
  let { hoverProps, isHovered } = $6179b936705e76d3$export$ae780daf29e6d456({
    isDisabled: !states.allowsSelection && !states.hasAction,
    onHoverStart: item.props.onHoverStart,
    onHoverChange: item.props.onHoverChange,
    onHoverEnd: item.props.onHoverEnd
  });
  let draggableItem = null;
  if (dragState && dragAndDropHooks) draggableItem = dragAndDropHooks.useDraggableItem({
    key: item.key
  }, dragState);
  let droppableItem = null;
  if (dropState && dragAndDropHooks) droppableItem = dragAndDropHooks.useDroppableItem({
    target: {
      type: "item",
      key: item.key,
      dropPosition: "on"
    }
  }, dropState, ref);
  let isDragging = dragState && dragState.isDragging(item.key);
  let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
    ...props,
    id: void 0,
    children: props.children,
    defaultClassName: "react-aria-ListBoxItem",
    values: {
      ...states,
      isHovered,
      selectionMode: state.selectionManager.selectionMode,
      selectionBehavior: state.selectionManager.selectionBehavior,
      allowsDragging: !!dragState,
      isDragging,
      isDropTarget: droppableItem === null || droppableItem === void 0 ? void 0 : droppableItem.isDropTarget
    }
  });
  useEffect(() => {
    if (!item.textValue && process.env.NODE_ENV !== "production") console.warn("A `textValue` prop is required for <ListBoxItem> elements with non-plain text children in order to support accessibility features such as type to select.");
  }, [
    item.textValue
  ]);
  let ElementType = props.href ? "a" : "div";
  let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
    global: true
  });
  delete DOMProps.id;
  delete DOMProps.onClick;
  return /* @__PURE__ */ React__default.createElement(ElementType, {
    ...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, optionProps, hoverProps, draggableItem === null || draggableItem === void 0 ? void 0 : draggableItem.dragProps, droppableItem === null || droppableItem === void 0 ? void 0 : droppableItem.dropProps),
    ref,
    "data-allows-dragging": !!dragState || void 0,
    "data-selected": states.isSelected || void 0,
    "data-disabled": states.isDisabled || void 0,
    "data-hovered": isHovered || void 0,
    "data-focused": states.isFocused || void 0,
    "data-focus-visible": states.isFocusVisible || void 0,
    "data-pressed": states.isPressed || void 0,
    "data-dragging": isDragging || void 0,
    "data-drop-target": (droppableItem === null || droppableItem === void 0 ? void 0 : droppableItem.isDropTarget) || void 0,
    "data-selection-mode": state.selectionManager.selectionMode === "none" ? void 0 : state.selectionManager.selectionMode
  }, /* @__PURE__ */ React__default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
    values: [
      [
        $514c0188e459b4c0$export$9afb8bc826b033ea,
        {
          slots: {
            [$64fa3d84918910a7$export$c62b8e45d58ddad9]: labelProps,
            label: labelProps,
            description: descriptionProps
          }
        }
      ]
    ]
  }, renderProps.children));
});
function $eed445e0843c11d0$var$ListBoxDropIndicatorWrapper(props, ref) {
  ref = $df56164dff5785e2$export$4338b53315abf666(ref);
  let { dragAndDropHooks, dropState } = useContext($612b8eb6cb90e02d$export$d188a835a7bc5783);
  let { dropIndicatorProps, isHidden, isDropTarget } = dragAndDropHooks.useDropIndicator(props, dropState, ref);
  if (isHidden) return null;
  return /* @__PURE__ */ React__default.createElement($eed445e0843c11d0$var$ListBoxDropIndicatorForwardRef, {
    ...props,
    dropIndicatorProps,
    isDropTarget,
    ref
  });
}
function $eed445e0843c11d0$var$ListBoxDropIndicator(props, ref) {
  let { dropIndicatorProps, isDropTarget, ...otherProps } = props;
  let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
    ...otherProps,
    defaultClassName: "react-aria-DropIndicator",
    values: {
      isDropTarget
    }
  });
  return /* @__PURE__ */ React__default.createElement("div", {
    ...dropIndicatorProps,
    ...renderProps,
    // eslint-disable-next-line
    role: "option",
    ref,
    "data-drop-target": isDropTarget || void 0
  });
}
const $eed445e0843c11d0$var$ListBoxDropIndicatorForwardRef = /* @__PURE__ */ forwardRef($eed445e0843c11d0$var$ListBoxDropIndicator);
$e1995378a142960e$export$18af5c7a9e9b3664($23b9f4fcf0fe224b$export$8258a0665a675899, function ListBoxLoadingIndicator(props, ref, item) {
  let state = useContext($eed445e0843c11d0$export$7c5906fe4f1f2af2);
  let { isLoading, onLoadMore, scrollOffset, ...otherProps } = props;
  let sentinelRef = useRef(null);
  let memoedLoadMoreProps = useMemo(() => ({
    onLoadMore,
    collection: state === null || state === void 0 ? void 0 : state.collection,
    sentinelRef,
    scrollOffset
  }), [
    onLoadMore,
    scrollOffset,
    state === null || state === void 0 ? void 0 : state.collection
  ]);
  $a5fa973c1850dd36$export$ccaea96c28e8b9e7(memoedLoadMoreProps, sentinelRef);
  let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
    ...otherProps,
    id: void 0,
    children: item.rendered,
    defaultClassName: "react-aria-ListBoxLoadingIndicator",
    values: null
  });
  let optionProps = {
    // For Android talkback
    tabIndex: -1
  };
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("div", {
    style: {
      position: "relative",
      width: 0,
      height: 0
    },
    inert: $cdc5a6778b766db2$export$a9d04c5684123369(true)
  }, /* @__PURE__ */ React__default.createElement("div", {
    "data-testid": "loadMoreSentinel",
    ref: sentinelRef,
    style: {
      position: "absolute",
      height: 1,
      width: 1
    }
  })), isLoading && renderProps.children && /* @__PURE__ */ React__default.createElement("div", {
    ...$3ef42575df84b30b$export$9d1611c77c2fe928($65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
      global: true
    }), optionProps),
    ...renderProps,
    // aria-selected isn't needed here since this option is not selectable.
    // eslint-disable-next-line jsx-a11y/role-has-required-aria-props
    role: "option",
    ref
  }, renderProps.children));
});
export {
  $eed445e0843c11d0$export$41f133550aa26f48 as $,
  $eed445e0843c11d0$export$a11e76429ed99b4 as a,
  $612b8eb6cb90e02d$export$62ed72bc21f6b8a6 as b,
  $eed445e0843c11d0$export$7ff8f37d2d81a48d as c,
  $eed445e0843c11d0$export$7c5906fe4f1f2af2 as d,
  $b1f0cad8af73213b$export$3585ede4d035bf14 as e,
  $b1f0cad8af73213b$export$9145995848b05025 as f
};
