import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "./Button-npzfSoYo.js";
import { b as $3ef42575df84b30b$export$9d1611c77c2fe928, d as $bdb11010cef70236$export$f680877a34711e37, p as $ff5963eb1fccf552$export$e08e3b67e392101e, a as $64fa3d84918910a7$export$29f1550f4b0d4415, $ as $64fa3d84918910a7$export$fabf2dc03a41866e, h as $64fa3d84918910a7$export$4d86445c2cf5e3, f as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, g as $64fa3d84918910a7$export$ef03459518577ad4, i as $64fa3d84918910a7$export$2881499e37b75b9a } from "./utils-cvK1vxO7.js";
import { a as $2baaea4c71418dea$export$294aa081a6c6f55d, $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "./FieldError-B8BgFmIQ.js";
import { $ as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "./Form-Cq3fu75_.js";
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447 } from "./Label-DWVaNd2E.js";
import { c as $eed445e0843c11d0$export$7ff8f37d2d81a48d, d as $eed445e0843c11d0$export$7c5906fe4f1f2af2 } from "./ListBox-D0Stb4wr.js";
import { o as $168583247155ddda$export$dc9c12ed27dd1b49, l as $de32f1b87079253c$export$d2f961adcb0afbe, p as $07b14b47974efb58$export$9b9a0cd73afb7ca4 } from "./Dialog-CQ8H6Noi.js";
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "./Text-AxKZjtFm.js";
import { s as $fb3050f43d946246$export$e32c88dfddc6e1d8, e as $e1995378a142960e$export$bf788dd355e3a401 } from "./SelectionManager-CabSdgMq.js";
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-D2C6R0DK.js";
import { $ as $fc909762b330b746$export$61c6a8c84e605fb6, f as $9daab02d461809db$export$683480f191c0e3ea } from "./OverlayArrow-DivvkAVb.js";
import React__default, { useMemo, useRef, useCallback, useState, forwardRef, createContext, useContext } from "react";
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-eaZiN2tE.js";
import { a as $e93e671b31057976$export$b8473d3665f3a75a, $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10 } from "./useFormValidation-CUtZcedF.js";
import { $ as $a0d645289fe9b86b$export$e7f05e985daf4b5f } from "./useSingleSelectListState-DattSD7d.js";
import { a as $f7dceffc5ad7768b$export$4e328f61c538687f } from "./useFocusRing-CUxgjvAY.js";
import { b as $325a3faab7a68acd$export$a16aca283550c30d, f as $2a25aae57d74318e$export$a05409b8bb224a5a } from "./Separator-BPvqJny4.js";
import { v as $507fabe10e71c6fb$export$8397ddfc504fdb9a } from "./useHover-LmGemtHE.js";
import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-yV9VVy9R.js";
import { a as $5c3e21d68f1c4674$export$a966af930f325cab } from "./VisuallyHidden-X6SggVVO.js";
const $58aed456727eb0f3$export$703601b7e90536f8 = /* @__PURE__ */ new WeakMap();
function $58aed456727eb0f3$export$e64b2f635402ca43(props, state, ref) {
  let { keyboardDelegate, isDisabled, isRequired, name, form, validationBehavior = "aria" } = props;
  let collator = $325a3faab7a68acd$export$a16aca283550c30d({
    usage: "search",
    sensitivity: "base"
  });
  let delegate = useMemo(() => keyboardDelegate || new $2a25aae57d74318e$export$a05409b8bb224a5a(state.collection, state.disabledKeys, ref, collator), [
    keyboardDelegate,
    state.collection,
    state.disabledKeys,
    collator,
    ref
  ]);
  let { menuTriggerProps, menuProps } = $168583247155ddda$export$dc9c12ed27dd1b49({
    isDisabled,
    type: "listbox"
  }, state, ref);
  let onKeyDown = (e) => {
    switch (e.key) {
      case "ArrowLeft": {
        var _delegate_getKeyAbove, _delegate_getFirstKey;
        e.preventDefault();
        let key = state.selectedKey != null ? (_delegate_getKeyAbove = delegate.getKeyAbove) === null || _delegate_getKeyAbove === void 0 ? void 0 : _delegate_getKeyAbove.call(delegate, state.selectedKey) : (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === void 0 ? void 0 : _delegate_getFirstKey.call(delegate);
        if (key) state.setSelectedKey(key);
        break;
      }
      case "ArrowRight": {
        var _delegate_getKeyBelow, _delegate_getFirstKey1;
        e.preventDefault();
        let key = state.selectedKey != null ? (_delegate_getKeyBelow = delegate.getKeyBelow) === null || _delegate_getKeyBelow === void 0 ? void 0 : _delegate_getKeyBelow.call(delegate, state.selectedKey) : (_delegate_getFirstKey1 = delegate.getFirstKey) === null || _delegate_getFirstKey1 === void 0 ? void 0 : _delegate_getFirstKey1.call(delegate);
        if (key) state.setSelectedKey(key);
        break;
      }
    }
  };
  let { typeSelectProps } = $fb3050f43d946246$export$e32c88dfddc6e1d8({
    keyboardDelegate: delegate,
    selectionManager: state.selectionManager,
    onTypeSelect(key) {
      state.setSelectedKey(key);
    }
  });
  let { isInvalid, validationErrors, validationDetails } = state.displayValidation;
  let { labelProps, fieldProps, descriptionProps, errorMessageProps } = $2baaea4c71418dea$export$294aa081a6c6f55d({
    ...props,
    labelElementType: "span",
    isInvalid,
    errorMessage: props.errorMessage || validationErrors
  });
  typeSelectProps.onKeyDown = typeSelectProps.onKeyDownCapture;
  delete typeSelectProps.onKeyDownCapture;
  let domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
    labelable: true
  });
  let triggerProps = $3ef42575df84b30b$export$9d1611c77c2fe928(typeSelectProps, menuTriggerProps, fieldProps);
  let valueId = $bdb11010cef70236$export$f680877a34711e37();
  $58aed456727eb0f3$export$703601b7e90536f8.set(state, {
    isDisabled,
    isRequired,
    name,
    form,
    validationBehavior
  });
  return {
    labelProps: {
      ...labelProps,
      onClick: () => {
        if (!props.isDisabled) {
          var _ref_current;
          (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();
          $507fabe10e71c6fb$export$8397ddfc504fdb9a("keyboard");
        }
      }
    },
    triggerProps: $3ef42575df84b30b$export$9d1611c77c2fe928(domProps, {
      ...triggerProps,
      isDisabled,
      onKeyDown: $ff5963eb1fccf552$export$e08e3b67e392101e(triggerProps.onKeyDown, onKeyDown, props.onKeyDown),
      onKeyUp: props.onKeyUp,
      "aria-labelledby": [
        valueId,
        triggerProps["aria-labelledby"],
        triggerProps["aria-label"] && !triggerProps["aria-labelledby"] ? triggerProps.id : null
      ].filter(Boolean).join(" "),
      onFocus(e) {
        if (state.isFocused) return;
        if (props.onFocus) props.onFocus(e);
        if (props.onFocusChange) props.onFocusChange(true);
        state.setFocused(true);
      },
      onBlur(e) {
        if (state.isOpen) return;
        if (props.onBlur) props.onBlur(e);
        if (props.onFocusChange) props.onFocusChange(false);
        state.setFocused(false);
      }
    }),
    valueProps: {
      id: valueId
    },
    menuProps: {
      ...menuProps,
      autoFocus: state.focusStrategy || true,
      shouldSelectOnPressUp: true,
      shouldFocusOnHover: true,
      disallowEmptySelection: true,
      linkBehavior: "selection",
      onBlur: (e) => {
        if (e.currentTarget.contains(e.relatedTarget)) return;
        if (props.onBlur) props.onBlur(e);
        if (props.onFocusChange) props.onFocusChange(false);
        state.setFocused(false);
      },
      "aria-labelledby": [
        fieldProps["aria-labelledby"],
        triggerProps["aria-label"] && !fieldProps["aria-labelledby"] ? triggerProps.id : null
      ].filter(Boolean).join(" ")
    },
    descriptionProps,
    errorMessageProps,
    isInvalid,
    validationErrors,
    validationDetails,
    hiddenSelectProps: {
      isDisabled,
      name,
      label: props.label,
      state,
      triggerRef: ref,
      form
    }
  };
}
function $bdd25dc72710631f$export$f809e80f58e251d1(props, state, triggerRef) {
  let data = $58aed456727eb0f3$export$703601b7e90536f8.get(state) || {};
  let { autoComplete, name = data.name, form = data.form, isDisabled = data.isDisabled } = props;
  let { validationBehavior, isRequired } = data;
  let { visuallyHiddenProps } = $5c3e21d68f1c4674$export$a966af930f325cab({
    style: {
      // Prevent page scrolling.
      position: "fixed",
      top: 0,
      left: 0
    }
  });
  $99facab73266f662$export$5add1d006293d136(props.selectRef, state.defaultSelectedKey, state.setSelectedKey);
  $e93e671b31057976$export$b8473d3665f3a75a({
    validationBehavior,
    focus: () => {
      var _triggerRef_current;
      return (_triggerRef_current = triggerRef.current) === null || _triggerRef_current === void 0 ? void 0 : _triggerRef_current.focus();
    }
  }, state, props.selectRef);
  let onChange = useCallback((e) => state.setSelectedKey(e.currentTarget.value), [
    state.setSelectedKey
  ]);
  var _state_selectedKey;
  return {
    containerProps: {
      ...visuallyHiddenProps,
      "aria-hidden": true,
      // @ts-ignore
      ["data-react-aria-prevent-focus"]: true,
      // @ts-ignore
      ["data-a11y-ignore"]: "aria-hidden-focus"
    },
    inputProps: {
      style: {
        display: "none"
      }
    },
    selectProps: {
      tabIndex: -1,
      autoComplete,
      disabled: isDisabled,
      required: validationBehavior === "native" && isRequired,
      name,
      form,
      value: (_state_selectedKey = state.selectedKey) !== null && _state_selectedKey !== void 0 ? _state_selectedKey : "",
      onChange,
      onInput: onChange
    }
  };
}
function $bdd25dc72710631f$export$cbd84cdb2e668835(props) {
  let { state, triggerRef, label, name, form, isDisabled } = props;
  let selectRef = useRef(null);
  let inputRef = useRef(null);
  let { containerProps, selectProps } = $bdd25dc72710631f$export$f809e80f58e251d1({
    ...props,
    selectRef: state.collection.size <= 300 ? selectRef : inputRef
  }, state, triggerRef);
  if (state.collection.size <= 300) return /* @__PURE__ */ React__default.createElement("div", {
    ...containerProps,
    "data-testid": "hidden-select-container"
  }, /* @__PURE__ */ React__default.createElement("label", null, label, /* @__PURE__ */ React__default.createElement("select", {
    ...selectProps,
    ref: selectRef
  }, /* @__PURE__ */ React__default.createElement("option", null), [
    ...state.collection.getKeys()
  ].map((key) => {
    let item = state.collection.getItem(key);
    if (item && item.type === "item") return /* @__PURE__ */ React__default.createElement("option", {
      key: item.key,
      value: item.key
    }, item.textValue);
  }))));
  else if (name) {
    let data = $58aed456727eb0f3$export$703601b7e90536f8.get(state) || {};
    let { validationBehavior } = data;
    var _state_selectedKey;
    let inputProps = {
      type: "hidden",
      autoComplete: selectProps.autoComplete,
      name,
      form,
      disabled: isDisabled,
      value: (_state_selectedKey = state.selectedKey) !== null && _state_selectedKey !== void 0 ? _state_selectedKey : ""
    };
    if (validationBehavior === "native")
      return /* @__PURE__ */ React__default.createElement("input", {
        ...inputProps,
        ref: inputRef,
        style: {
          display: "none"
        },
        type: "text",
        required: selectProps.required,
        onChange: () => {
        }
      });
    return /* @__PURE__ */ React__default.createElement("input", {
      ...inputProps,
      ref: inputRef
    });
  }
  return null;
}
function $2bc3a590c5373a4e$export$5159ec8b34d4ec12(props) {
  let triggerState = $fc909762b330b746$export$61c6a8c84e605fb6(props);
  let [focusStrategy, setFocusStrategy] = useState(null);
  let listState = $a0d645289fe9b86b$export$e7f05e985daf4b5f({
    ...props,
    onSelectionChange: (key) => {
      if (props.onSelectionChange != null) props.onSelectionChange(key);
      triggerState.close();
      validationState.commitValidation();
    }
  });
  let validationState = $e5be200c675c3b3a$export$fc1a364ae1f3ff10({
    ...props,
    value: listState.selectedKey
  });
  let [isFocused, setFocused] = useState(false);
  let [initialSelectedKey] = useState(listState.selectedKey);
  var _props_defaultSelectedKey;
  return {
    ...validationState,
    ...listState,
    ...triggerState,
    defaultSelectedKey: (_props_defaultSelectedKey = props.defaultSelectedKey) !== null && _props_defaultSelectedKey !== void 0 ? _props_defaultSelectedKey : initialSelectedKey,
    focusStrategy,
    open(focusStrategy2 = null) {
      if (listState.collection.size !== 0) {
        setFocusStrategy(focusStrategy2);
        triggerState.open();
      }
    },
    toggle(focusStrategy2 = null) {
      if (listState.collection.size !== 0) {
        setFocusStrategy(focusStrategy2);
        triggerState.toggle();
      }
    },
    isFocused,
    setFocused
  };
}
var $e038a7e7a6d81989$exports = {};
$e038a7e7a6d81989$exports = {
  "colorSwatchPicker": `تغييرات الألوان`,
  "dropzoneLabel": `DropZone`,
  "selectPlaceholder": `حدد عنصرًا`,
  "tableResizer": `أداة تغيير الحجم`
};
var $0ec14741b0133644$exports = {};
$0ec14741b0133644$exports = {
  "colorSwatchPicker": `Цветови мостри`,
  "dropzoneLabel": `DropZone`,
  "selectPlaceholder": `Изберете предмет`,
  "tableResizer": `Преоразмерител`
};
var $642f7badf2405784$exports = {};
$642f7badf2405784$exports = {
  "colorSwatchPicker": `Vzorky barev`,
  "dropzoneLabel": `Místo pro přetažení`,
  "selectPlaceholder": `Vyberte položku`,
  "tableResizer": `Změna velikosti`
};
var $30cee8d2535734ec$exports = {};
$30cee8d2535734ec$exports = {
  "colorSwatchPicker": `Farveprøver`,
  "dropzoneLabel": `DropZone`,
  "selectPlaceholder": `Vælg et element`,
  "tableResizer": `Størrelsesændring`
};
var $c302d0504fca332a$exports = {};
$c302d0504fca332a$exports = {
  "colorSwatchPicker": `Farbfelder`,
  "dropzoneLabel": `Ablegebereich`,
  "selectPlaceholder": `Element wählen`,
  "tableResizer": `Größenanpassung`
};
var $0d0703f2bd7e421c$exports = {};
$0d0703f2bd7e421c$exports = {
  "colorSwatchPicker": `Χρωματικά δείγματα`,
  "dropzoneLabel": `DropZone`,
  "selectPlaceholder": `Επιλέξτε ένα αντικείμενο`,
  "tableResizer": `Αλλαγή μεγέθους`
};
var $cafa55beb2fc5ef3$exports = {};
$cafa55beb2fc5ef3$exports = {
  "selectPlaceholder": `Select an item`,
  "tableResizer": `Resizer`,
  "dropzoneLabel": `DropZone`,
  "colorSwatchPicker": `Color swatches`
};
var $18ac2ceede598103$exports = {};
$18ac2ceede598103$exports = {
  "colorSwatchPicker": `Muestras de colores`,
  "dropzoneLabel": `DropZone`,
  "selectPlaceholder": `Seleccionar un artículo`,
  "tableResizer": `Cambiador de tamaño`
};
var $718705a15b8a633a$exports = {};
$718705a15b8a633a$exports = {
  "colorSwatchPicker": `Värvinäidised`,
  "dropzoneLabel": `DropZone`,
  "selectPlaceholder": `Valige üksus`,
  "tableResizer": `Suuruse muutja`
};
var $bf36dae9ecc81ce0$exports = {};
$bf36dae9ecc81ce0$exports = {
  "colorSwatchPicker": `Värimallit`,
  "dropzoneLabel": `DropZone`,
  "selectPlaceholder": `Valitse kohde`,
  "tableResizer": `Koon muuttaja`
};
var $0b4828edb010b855$exports = {};
$0b4828edb010b855$exports = {
  "colorSwatchPicker": `Échantillons de couleurs`,
  "dropzoneLabel": `DropZone`,
  "selectPlaceholder": `Sélectionner un élément`,
  "tableResizer": `Redimensionneur`
};
var $0030f210b040e540$exports = {};
$0030f210b040e540$exports = {
  "colorSwatchPicker": `דוגמיות צבע`,
  "dropzoneLabel": `DropZone`,
  "selectPlaceholder": `בחר פריט`,
  "tableResizer": `שינוי גודל`
};
var $1f0ebacf5a0c0fa1$exports = {};
$1f0ebacf5a0c0fa1$exports = {
  "colorSwatchPicker": `Uzorci boja`,
  "dropzoneLabel": `Zona spuštanja`,
  "selectPlaceholder": `Odaberite stavku`,
  "tableResizer": `Promjena veličine`
};
var $3a706ba61f3d6bba$exports = {};
$3a706ba61f3d6bba$exports = {
  "colorSwatchPicker": `Színtárak`,
  "dropzoneLabel": `DropZone`,
  "selectPlaceholder": `Válasszon ki egy elemet`,
  "tableResizer": `Átméretező`
};
var $0d17809e74607796$exports = {};
$0d17809e74607796$exports = {
  "colorSwatchPicker": `Campioni di colore`,
  "dropzoneLabel": `Zona di rilascio`,
  "selectPlaceholder": `Seleziona un elemento`,
  "tableResizer": `Ridimensionamento`
};
var $65a71f9a56f1398f$exports = {};
$65a71f9a56f1398f$exports = {
  "colorSwatchPicker": `カラースウォッチ`,
  "dropzoneLabel": `ドロップゾーン`,
  "selectPlaceholder": `項目を選択`,
  "tableResizer": `サイズ変更ツール`
};
var $e5efad074a74abef$exports = {};
$e5efad074a74abef$exports = {
  "colorSwatchPicker": `색상 견본`,
  "dropzoneLabel": `드롭 영역`,
  "selectPlaceholder": `항목 선택`,
  "tableResizer": `크기 조정기`
};
var $d70c2a849e55c607$exports = {};
$d70c2a849e55c607$exports = {
  "colorSwatchPicker": `Spalvų pavyzdžiai`,
  "dropzoneLabel": `„DropZone“`,
  "selectPlaceholder": `Pasirinkite elementą`,
  "tableResizer": `Dydžio keitiklis`
};
var $009bbbb440d0e907$exports = {};
$009bbbb440d0e907$exports = {
  "colorSwatchPicker": `Krāsu paraugi`,
  "dropzoneLabel": `DropZone`,
  "selectPlaceholder": `Izvēlēties vienumu`,
  "tableResizer": `Izmēra mainītājs`
};
var $9366fe642464ee83$exports = {};
$9366fe642464ee83$exports = {
  "colorSwatchPicker": `Fargekart`,
  "dropzoneLabel": `Droppsone`,
  "selectPlaceholder": `Velg et element`,
  "tableResizer": `Størrelsesendrer`
};
var $62f9bc1f98ea21de$exports = {};
$62f9bc1f98ea21de$exports = {
  "colorSwatchPicker": `kleurstalen`,
  "dropzoneLabel": `DropZone`,
  "selectPlaceholder": `Selecteer een item`,
  "tableResizer": `Resizer`
};
var $4ec2e5b6623b1b76$exports = {};
$4ec2e5b6623b1b76$exports = {
  "colorSwatchPicker": `Próbki kolorów`,
  "dropzoneLabel": `Strefa upuszczania`,
  "selectPlaceholder": `Wybierz element`,
  "tableResizer": `Zmiana rozmiaru`
};
var $e25098e26647cc04$exports = {};
$e25098e26647cc04$exports = {
  "colorSwatchPicker": `Amostras de cores`,
  "dropzoneLabel": `DropZone`,
  "selectPlaceholder": `Selecione um item`,
  "tableResizer": `Redimensionador`
};
var $dd39c57d242c8156$exports = {};
$dd39c57d242c8156$exports = {
  "colorSwatchPicker": `Amostras de cores`,
  "dropzoneLabel": `DropZone`,
  "selectPlaceholder": `Selecione um item`,
  "tableResizer": `Redimensionador`
};
var $3b4c1ba5afd57b35$exports = {};
$3b4c1ba5afd57b35$exports = {
  "colorSwatchPicker": `Specimene de culoare`,
  "dropzoneLabel": `Zonă de plasare`,
  "selectPlaceholder": `Selectați un element`,
  "tableResizer": `Instrument de redimensionare`
};
var $a455b2cda79eb746$exports = {};
$a455b2cda79eb746$exports = {
  "colorSwatchPicker": `Цветовые образцы`,
  "dropzoneLabel": `DropZone`,
  "selectPlaceholder": `Выберите элемент`,
  "tableResizer": `Средство изменения размера`
};
var $b983ca1383d5b960$exports = {};
$b983ca1383d5b960$exports = {
  "colorSwatchPicker": `Vzorkovníky farieb`,
  "dropzoneLabel": `DropZone`,
  "selectPlaceholder": `Vyberte položku`,
  "tableResizer": `Nástroj na zmenu veľkosti`
};
var $32a515ef673b0655$exports = {};
$32a515ef673b0655$exports = {
  "colorSwatchPicker": `Barvne palete`,
  "dropzoneLabel": `DropZone`,
  "selectPlaceholder": `Izberite element`,
  "tableResizer": `Spreminjanje velikosti`
};
var $89434176ab35446b$exports = {};
$89434176ab35446b$exports = {
  "colorSwatchPicker": `Uzorci boje`,
  "dropzoneLabel": `DropZone`,
  "selectPlaceholder": `Izaberite stavku`,
  "tableResizer": `Promena veličine`
};
var $727da781aca847f9$exports = {};
$727da781aca847f9$exports = {
  "colorSwatchPicker": `Färgrutor`,
  "dropzoneLabel": `DropZone`,
  "selectPlaceholder": `Välj en artikel`,
  "tableResizer": `Storleksändrare`
};
var $fcd2d84b9a2d489c$exports = {};
$fcd2d84b9a2d489c$exports = {
  "colorSwatchPicker": `Renk örnekleri`,
  "dropzoneLabel": `Bırakma Bölgesi`,
  "selectPlaceholder": `Bir öğe seçin`,
  "tableResizer": `Yeniden boyutlandırıcı`
};
var $2422ac328687ee23$exports = {};
$2422ac328687ee23$exports = {
  "colorSwatchPicker": `Зразки кольорів`,
  "dropzoneLabel": `DropZone`,
  "selectPlaceholder": `Виберіть елемент`,
  "tableResizer": `Засіб змінення розміру`
};
var $c9a532d1c973af61$exports = {};
$c9a532d1c973af61$exports = {
  "colorSwatchPicker": `颜色色板`,
  "dropzoneLabel": `放置区域`,
  "selectPlaceholder": `选择一个项目`,
  "tableResizer": `尺寸调整器`
};
var $34de119f14549a4b$exports = {};
$34de119f14549a4b$exports = {
  "colorSwatchPicker": `色票`,
  "dropzoneLabel": `放置區`,
  "selectPlaceholder": `選取項目`,
  "tableResizer": `大小調整器`
};
var $df39c1238ae2b5f3$exports = {};
$df39c1238ae2b5f3$exports = {
  "ar-AE": $e038a7e7a6d81989$exports,
  "bg-BG": $0ec14741b0133644$exports,
  "cs-CZ": $642f7badf2405784$exports,
  "da-DK": $30cee8d2535734ec$exports,
  "de-DE": $c302d0504fca332a$exports,
  "el-GR": $0d0703f2bd7e421c$exports,
  "en-US": $cafa55beb2fc5ef3$exports,
  "es-ES": $18ac2ceede598103$exports,
  "et-EE": $718705a15b8a633a$exports,
  "fi-FI": $bf36dae9ecc81ce0$exports,
  "fr-FR": $0b4828edb010b855$exports,
  "he-IL": $0030f210b040e540$exports,
  "hr-HR": $1f0ebacf5a0c0fa1$exports,
  "hu-HU": $3a706ba61f3d6bba$exports,
  "it-IT": $0d17809e74607796$exports,
  "ja-JP": $65a71f9a56f1398f$exports,
  "ko-KR": $e5efad074a74abef$exports,
  "lt-LT": $d70c2a849e55c607$exports,
  "lv-LV": $009bbbb440d0e907$exports,
  "nb-NO": $9366fe642464ee83$exports,
  "nl-NL": $62f9bc1f98ea21de$exports,
  "pl-PL": $4ec2e5b6623b1b76$exports,
  "pt-BR": $e25098e26647cc04$exports,
  "pt-PT": $dd39c57d242c8156$exports,
  "ro-RO": $3b4c1ba5afd57b35$exports,
  "ru-RU": $a455b2cda79eb746$exports,
  "sk-SK": $b983ca1383d5b960$exports,
  "sl-SI": $32a515ef673b0655$exports,
  "sr-SP": $89434176ab35446b$exports,
  "sv-SE": $727da781aca847f9$exports,
  "tr-TR": $fcd2d84b9a2d489c$exports,
  "uk-UA": $2422ac328687ee23$exports,
  "zh-CN": $c9a532d1c973af61$exports,
  "zh-TW": $34de119f14549a4b$exports
};
function $parcel$interopDefault(a) {
  return a && a.__esModule ? a.default : a;
}
const $82d7e5349645de74$export$7540cee5be7dc19b = /* @__PURE__ */ createContext(null);
const $82d7e5349645de74$export$ef445b55be0601bd = /* @__PURE__ */ createContext(null);
const $82d7e5349645de74$export$ef9b1a59e592288f = /* @__PURE__ */ forwardRef(function Select(props, ref) {
  [props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $82d7e5349645de74$export$7540cee5be7dc19b);
  let { children, isDisabled = false, isInvalid = false, isRequired = false } = props;
  let content = useMemo(() => typeof children === "function" ? children({
    isOpen: false,
    isDisabled,
    isInvalid,
    isRequired,
    isFocused: false,
    isFocusVisible: false,
    defaultChildren: null
  }) : children, [
    children,
    isDisabled,
    isInvalid,
    isRequired
  ]);
  return /* @__PURE__ */ React__default.createElement($e1995378a142960e$export$bf788dd355e3a401, {
    content
  }, (collection) => /* @__PURE__ */ React__default.createElement($82d7e5349645de74$var$SelectInner, {
    props,
    collection,
    selectRef: ref
  }));
});
const $82d7e5349645de74$var$CLEAR_CONTEXTS = [
  $01b77f81d0f07f68$export$75b6ee27786ba447,
  $d2b4bc8c273e7be6$export$24d547caef80ccd1,
  $514c0188e459b4c0$export$9afb8bc826b033ea
];
function $82d7e5349645de74$var$SelectInner({ props, selectRef: ref, collection }) {
  let { validationBehavior: formValidationBehavior } = $64fa3d84918910a7$export$fabf2dc03a41866e($d3e0e05bdfcf66bd$export$c24727297075ec6a) || {};
  var _props_validationBehavior, _ref;
  let validationBehavior = (_ref = (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== void 0 ? _props_validationBehavior : formValidationBehavior) !== null && _ref !== void 0 ? _ref : "native";
  let state = $2bc3a590c5373a4e$export$5159ec8b34d4ec12({
    ...props,
    collection,
    children: void 0,
    validationBehavior
  });
  let { isFocusVisible, focusProps } = $f7dceffc5ad7768b$export$4e328f61c538687f({
    within: true
  });
  let buttonRef = useRef(null);
  let [labelRef, label] = $64fa3d84918910a7$export$9d4c57ee4c6ffdd8(!props["aria-label"] && !props["aria-labelledby"]);
  let { labelProps, triggerProps, valueProps, menuProps, descriptionProps, errorMessageProps, hiddenSelectProps, ...validation } = $58aed456727eb0f3$export$e64b2f635402ca43({
    ...$64fa3d84918910a7$export$ef03459518577ad4(props),
    label,
    validationBehavior
  }, state, buttonRef);
  let [buttonWidth, setButtonWidth] = useState(null);
  let onResize = useCallback(() => {
    if (buttonRef.current) setButtonWidth(buttonRef.current.offsetWidth + "px");
  }, [
    buttonRef
  ]);
  $9daab02d461809db$export$683480f191c0e3ea({
    ref: buttonRef,
    onResize
  });
  let renderPropsState = useMemo(() => ({
    isOpen: state.isOpen,
    isFocused: state.isFocused,
    isFocusVisible,
    isDisabled: props.isDisabled || false,
    isInvalid: validation.isInvalid || false,
    isRequired: props.isRequired || false
  }), [
    state.isOpen,
    state.isFocused,
    isFocusVisible,
    props.isDisabled,
    validation.isInvalid,
    props.isRequired
  ]);
  let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
    ...props,
    values: renderPropsState,
    defaultClassName: "react-aria-Select"
  });
  let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
    global: true
  });
  delete DOMProps.id;
  let scrollRef = useRef(null);
  return /* @__PURE__ */ React__default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
    values: [
      [
        $82d7e5349645de74$export$7540cee5be7dc19b,
        props
      ],
      [
        $82d7e5349645de74$export$ef445b55be0601bd,
        state
      ],
      [
        $82d7e5349645de74$export$f8f745c04421623f,
        valueProps
      ],
      [
        $01b77f81d0f07f68$export$75b6ee27786ba447,
        {
          ...labelProps,
          ref: labelRef,
          elementType: "span"
        }
      ],
      [
        $d2b4bc8c273e7be6$export$24d547caef80ccd1,
        {
          ...triggerProps,
          ref: buttonRef,
          isPressed: state.isOpen,
          autoFocus: props.autoFocus
        }
      ],
      [
        $de32f1b87079253c$export$d2f961adcb0afbe,
        state
      ],
      [
        $07b14b47974efb58$export$9b9a0cd73afb7ca4,
        {
          trigger: "Select",
          triggerRef: buttonRef,
          scrollRef,
          placement: "bottom start",
          style: {
            "--trigger-width": buttonWidth
          },
          "aria-labelledby": menuProps["aria-labelledby"],
          clearContexts: $82d7e5349645de74$var$CLEAR_CONTEXTS
        }
      ],
      [
        $eed445e0843c11d0$export$7ff8f37d2d81a48d,
        {
          ...menuProps,
          ref: scrollRef
        }
      ],
      [
        $eed445e0843c11d0$export$7c5906fe4f1f2af2,
        state
      ],
      [
        $514c0188e459b4c0$export$9afb8bc826b033ea,
        {
          slots: {
            description: descriptionProps,
            errorMessage: errorMessageProps
          }
        }
      ],
      [
        $ee014567cb39d3f0$export$ff05c3ac10437e03,
        validation
      ]
    ]
  }, /* @__PURE__ */ React__default.createElement("div", {
    ...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, focusProps),
    ref,
    slot: props.slot || void 0,
    "data-focused": state.isFocused || void 0,
    "data-focus-visible": isFocusVisible || void 0,
    "data-open": state.isOpen || void 0,
    "data-disabled": props.isDisabled || void 0,
    "data-invalid": validation.isInvalid || void 0,
    "data-required": props.isRequired || void 0
  }, renderProps.children, /* @__PURE__ */ React__default.createElement($bdd25dc72710631f$export$cbd84cdb2e668835, {
    ...hiddenSelectProps,
    autoComplete: props.autoComplete
  })));
}
const $82d7e5349645de74$export$f8f745c04421623f = /* @__PURE__ */ createContext(null);
const $82d7e5349645de74$export$e288731fd71264f0 = /* @__PURE__ */ forwardRef(function SelectValue(props, ref) {
  var _state_selectedItem, _state_selectedItem1;
  [props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $82d7e5349645de74$export$f8f745c04421623f);
  let state = useContext($82d7e5349645de74$export$ef445b55be0601bd);
  let { placeholder } = $64fa3d84918910a7$export$fabf2dc03a41866e($82d7e5349645de74$export$7540cee5be7dc19b);
  let selectedItem = state.selectedKey != null ? state.collection.getItem(state.selectedKey) : null;
  let rendered = selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.props.children;
  if (typeof rendered === "function") {
    let fn = rendered;
    rendered = fn({
      isHovered: false,
      isPressed: false,
      isSelected: false,
      isFocused: false,
      isFocusVisible: false,
      isDisabled: false,
      selectionMode: "single",
      selectionBehavior: "toggle"
    });
  }
  let stringFormatter = $fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault($df39c1238ae2b5f3$exports), "react-aria-components");
  var _ref, _state_selectedItem_value, _state_selectedItem_textValue;
  let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
    ...props,
    defaultChildren: (_ref = rendered !== null && rendered !== void 0 ? rendered : placeholder) !== null && _ref !== void 0 ? _ref : stringFormatter.format("selectPlaceholder"),
    defaultClassName: "react-aria-SelectValue",
    values: {
      selectedItem: (_state_selectedItem_value = (_state_selectedItem = state.selectedItem) === null || _state_selectedItem === void 0 ? void 0 : _state_selectedItem.value) !== null && _state_selectedItem_value !== void 0 ? _state_selectedItem_value : null,
      selectedText: (_state_selectedItem_textValue = (_state_selectedItem1 = state.selectedItem) === null || _state_selectedItem1 === void 0 ? void 0 : _state_selectedItem1.textValue) !== null && _state_selectedItem_textValue !== void 0 ? _state_selectedItem_textValue : null,
      isPlaceholder: !selectedItem
    }
  });
  let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
    global: true
  });
  return /* @__PURE__ */ React__default.createElement("span", {
    ref,
    ...DOMProps,
    ...renderProps,
    "data-placeholder": !selectedItem || void 0
  }, /* @__PURE__ */ React__default.createElement($514c0188e459b4c0$export$9afb8bc826b033ea.Provider, {
    value: void 0
  }, renderProps.children));
});
export {
  $82d7e5349645de74$export$ef9b1a59e592288f as $,
  $82d7e5349645de74$export$e288731fd71264f0 as a,
  $82d7e5349645de74$export$ef445b55be0601bd as b
};
