import {
  clsx_default
} from "./chunk-U7P2NEEE.js";
import {
  autoUpdate,
  detectOverflow,
  evaluate,
  flip,
  floor,
  getComputedStyle as getComputedStyle2,
  isElement,
  max,
  min,
  offset,
  round,
  shift,
  size,
  useFloating
} from "./chunk-VD6JC5CW.js";
import {
  require_react_dom
} from "./chunk-LY7AAJIB.js";
import {
  require_react
} from "./chunk-OHBLVYYI.js";
import {
  __commonJS,
  __toESM
} from "./chunk-V4OQ3NZ2.js";

// node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js
var require_use_sync_external_store_with_selector_development = __commonJS({
  "node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js"(exports) {
    "use strict";
    (function() {
      function is(x10, y10) {
        return x10 === y10 && (0 !== x10 || 1 / x10 === 1 / y10) || x10 !== x10 && y10 !== y10;
      }
      "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
      var React3 = require_react(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore = React3.useSyncExternalStore, useRef4 = React3.useRef, useEffect6 = React3.useEffect, useMemo2 = React3.useMemo, useDebugValue = React3.useDebugValue;
      exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
        var instRef = useRef4(null);
        if (null === instRef.current) {
          var inst = { hasValue: false, value: null };
          instRef.current = inst;
        } else inst = instRef.current;
        instRef = useMemo2(
          function() {
            function memoizedSelector(nextSnapshot) {
              if (!hasMemo) {
                hasMemo = true;
                memoizedSnapshot = nextSnapshot;
                nextSnapshot = selector(nextSnapshot);
                if (void 0 !== isEqual && inst.hasValue) {
                  var currentSelection = inst.value;
                  if (isEqual(currentSelection, nextSnapshot))
                    return memoizedSelection = currentSelection;
                }
                return memoizedSelection = nextSnapshot;
              }
              currentSelection = memoizedSelection;
              if (objectIs(memoizedSnapshot, nextSnapshot))
                return currentSelection;
              var nextSelection = selector(nextSnapshot);
              if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
                return memoizedSnapshot = nextSnapshot, currentSelection;
              memoizedSnapshot = nextSnapshot;
              return memoizedSelection = nextSelection;
            }
            var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
            return [
              function() {
                return memoizedSelector(getSnapshot());
              },
              null === maybeGetServerSnapshot ? void 0 : function() {
                return memoizedSelector(maybeGetServerSnapshot());
              }
            ];
          },
          [getSnapshot, getServerSnapshot, selector, isEqual]
        );
        var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
        useEffect6(
          function() {
            inst.hasValue = true;
            inst.value = value;
          },
          [value]
        );
        useDebugValue(value);
        return value;
      };
      "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
    })();
  }
});

// node_modules/use-sync-external-store/with-selector.js
var require_with_selector = __commonJS({
  "node_modules/use-sync-external-store/with-selector.js"(exports, module) {
    "use strict";
    if (false) {
      module.exports = null;
    } else {
      module.exports = require_use_sync_external_store_with_selector_development();
    }
  }
});

// node_modules/react-aria/dist/private/utils/domHelpers.mjs
var $d447af545b77c9f1$export$b204af158042fbac = (el) => {
  return el?.ownerDocument ?? document;
};
var $d447af545b77c9f1$export$f21a1ffae260145a = (el) => {
  if (el && "window" in el && el.window === el) return el;
  const doc = $d447af545b77c9f1$export$b204af158042fbac(el);
  return doc.defaultView || window;
};
function $d447af545b77c9f1$var$isNode(value) {
  return value !== null && typeof value === "object" && "nodeType" in value && typeof value.nodeType === "number";
}
function $d447af545b77c9f1$export$af51f0f06c0f328a(node) {
  return $d447af545b77c9f1$var$isNode(node) && node.nodeType === Node.DOCUMENT_FRAGMENT_NODE && "host" in node;
}

// node_modules/react-stately/dist/private/flags/flags.mjs
var $6a20a7989e6c817a$var$_shadowDOM = false;
function $6a20a7989e6c817a$export$98658e8c59125e6a() {
  return $6a20a7989e6c817a$var$_shadowDOM;
}

// node_modules/react-aria/dist/private/utils/shadowdom/DOMFunctions.mjs
function $23f2114a1b82827e$export$4282f70798064fe0(node, otherNode) {
  if (!(0, $6a20a7989e6c817a$export$98658e8c59125e6a)()) return otherNode && node ? node.contains(otherNode) : false;
  if (!node || !otherNode) return false;
  let currentNode = otherNode;
  while (currentNode !== null) {
    if (currentNode === node) return true;
    if (currentNode.tagName === "SLOT" && currentNode.assignedSlot)
      currentNode = currentNode.assignedSlot.parentNode;
    else if ((0, $d447af545b77c9f1$export$af51f0f06c0f328a)(currentNode))
      currentNode = currentNode.host;
    else currentNode = currentNode.parentNode;
  }
  return false;
}
var $23f2114a1b82827e$export$cd4e5573fbe2b576 = (doc = document) => {
  if (!(0, $6a20a7989e6c817a$export$98658e8c59125e6a)()) return doc.activeElement;
  let activeElement2 = doc.activeElement;
  while (activeElement2 && "shadowRoot" in activeElement2 && activeElement2.shadowRoot?.activeElement) activeElement2 = activeElement2.shadowRoot.activeElement;
  return activeElement2;
};
function $23f2114a1b82827e$export$e58f029f0fbfdb29(event) {
  if ((0, $6a20a7989e6c817a$export$98658e8c59125e6a)() && event.target instanceof Element && event.target.shadowRoot) {
    if ("composedPath" in event) return event.composedPath()[0] ?? null;
    else if ("composedPath" in event.nativeEvent) return event.nativeEvent.composedPath()[0] ?? null;
  }
  return event.target;
}

// node_modules/react-aria/dist/private/utils/focusWithoutScrolling.mjs
function $1969ac565cfec8d0$export$de79e2c695e052f3(element) {
  if ($1969ac565cfec8d0$var$supportsPreventScroll()) element.focus({
    preventScroll: true
  });
  else {
    let scrollableElements = $1969ac565cfec8d0$var$getScrollableElements(element);
    element.focus();
    $1969ac565cfec8d0$var$restoreScrollPosition(scrollableElements);
  }
}
var $1969ac565cfec8d0$var$supportsPreventScrollCached = null;
function $1969ac565cfec8d0$var$supportsPreventScroll() {
  if ($1969ac565cfec8d0$var$supportsPreventScrollCached == null) {
    $1969ac565cfec8d0$var$supportsPreventScrollCached = false;
    try {
      let focusElem = document.createElement("div");
      focusElem.focus({
        get preventScroll() {
          $1969ac565cfec8d0$var$supportsPreventScrollCached = true;
          return true;
        }
      });
    } catch {
    }
  }
  return $1969ac565cfec8d0$var$supportsPreventScrollCached;
}
function $1969ac565cfec8d0$var$getScrollableElements(element) {
  let parent = element.parentNode;
  let scrollableElements = [];
  let rootScrollingElement = document.scrollingElement || document.documentElement;
  while (parent instanceof HTMLElement && parent !== rootScrollingElement) {
    if (parent.offsetHeight < parent.scrollHeight || parent.offsetWidth < parent.scrollWidth) scrollableElements.push({
      element: parent,
      scrollTop: parent.scrollTop,
      scrollLeft: parent.scrollLeft
    });
    parent = parent.parentNode;
  }
  if (rootScrollingElement instanceof HTMLElement) scrollableElements.push({
    element: rootScrollingElement,
    scrollTop: rootScrollingElement.scrollTop,
    scrollLeft: rootScrollingElement.scrollLeft
  });
  return scrollableElements;
}
function $1969ac565cfec8d0$var$restoreScrollPosition(scrollableElements) {
  for (let { element, scrollTop, scrollLeft } of scrollableElements) {
    element.scrollTop = scrollTop;
    element.scrollLeft = scrollLeft;
  }
}

// node_modules/react-aria/dist/private/utils/isElementVisible.mjs
var $ae77152785188400$var$supportsCheckVisibility = typeof Element !== "undefined" && "checkVisibility" in Element.prototype;
function $ae77152785188400$var$isStyleVisible(element) {
  const windowObject = (0, $d447af545b77c9f1$export$f21a1ffae260145a)(element);
  if (!(element instanceof windowObject.HTMLElement) && !(element instanceof windowObject.SVGElement)) return false;
  let { display, visibility } = element.style;
  let isVisible = display !== "none" && visibility !== "hidden" && visibility !== "collapse";
  if (isVisible) {
    const { getComputedStyle: getComputedStyle3 } = element.ownerDocument.defaultView;
    let { display: computedDisplay, visibility: computedVisibility } = getComputedStyle3(element);
    isVisible = computedDisplay !== "none" && computedVisibility !== "hidden" && computedVisibility !== "collapse";
  }
  return isVisible;
}
function $ae77152785188400$var$isAttributeVisible(element, childElement) {
  return !element.hasAttribute("hidden") && // Ignore HiddenSelect when tree walking.
  !element.hasAttribute("data-react-aria-prevent-focus") && (element.nodeName === "DETAILS" && childElement && childElement.nodeName !== "SUMMARY" ? element.hasAttribute("open") : true);
}
function $ae77152785188400$export$e989c0fffaa6b27a(element, childElement) {
  if ($ae77152785188400$var$supportsCheckVisibility) return element.checkVisibility({
    visibilityProperty: true
  }) && !element.closest("[data-react-aria-prevent-focus]");
  return element.nodeName !== "#comment" && $ae77152785188400$var$isStyleVisible(element) && $ae77152785188400$var$isAttributeVisible(element, childElement) && (!element.parentElement || $ae77152785188400$export$e989c0fffaa6b27a(element.parentElement, element));
}

// node_modules/react-aria/dist/private/utils/isFocusable.mjs
var $3b8b240c1bf84ab9$var$focusableElements = [
  "input:not([disabled]):not([type=hidden])",
  "select:not([disabled])",
  "textarea:not([disabled])",
  "button:not([disabled])",
  "a[href]",
  "area[href]",
  "summary",
  "iframe",
  "object",
  "embed",
  "audio[controls]",
  "video[controls]",
  '[contenteditable]:not([contenteditable^="false"])',
  "permission"
];
var $3b8b240c1bf84ab9$var$FOCUSABLE_ELEMENT_SELECTOR = $3b8b240c1bf84ab9$var$focusableElements.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
$3b8b240c1bf84ab9$var$focusableElements.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
var $3b8b240c1bf84ab9$var$TABBABLE_ELEMENT_SELECTOR = $3b8b240c1bf84ab9$var$focusableElements.join(':not([hidden]):not([tabindex="-1"]),');
function $3b8b240c1bf84ab9$export$4c063cf1350e6fed(element, options) {
  return element.matches($3b8b240c1bf84ab9$var$FOCUSABLE_ELEMENT_SELECTOR) && !$3b8b240c1bf84ab9$var$isInert(element) && (options?.skipVisibilityCheck || (0, $ae77152785188400$export$e989c0fffaa6b27a)(element));
}
function $3b8b240c1bf84ab9$var$isInert(element) {
  let node = element;
  while (node != null) {
    if (node instanceof node.ownerDocument.defaultView.HTMLElement && node.inert) return true;
    node = node.parentElement;
  }
  return false;
}

// node_modules/react-aria/dist/private/utils/useLayoutEffect.mjs
var import_react = __toESM(require_react(), 1);
var $c4867b2f328c2698$export$e5c5a5f917a5871c = typeof document !== "undefined" ? (0, import_react.default).useLayoutEffect : () => {
};

// node_modules/react-aria/dist/private/interactions/utils.mjs
var import_react2 = __toESM(require_react(), 1);
function $a92dc41f639950be$export$525bc4921d56d4a(nativeEvent) {
  let event = nativeEvent;
  event.nativeEvent = nativeEvent;
  event.isDefaultPrevented = () => event.defaultPrevented;
  event.isPropagationStopped = () => event.cancelBubble;
  event.persist = () => {
  };
  return event;
}
function $a92dc41f639950be$export$c2b7abe5d61ec696(event, target) {
  Object.defineProperty(event, "target", {
    value: target
  });
  Object.defineProperty(event, "currentTarget", {
    value: target
  });
}
function $a92dc41f639950be$export$715c682d09d639cc(onBlur) {
  let stateRef = (0, import_react2.useRef)({
    isFocused: false,
    observer: null
  });
  (0, $c4867b2f328c2698$export$e5c5a5f917a5871c)(() => {
    const state = stateRef.current;
    return () => {
      if (state.observer) {
        state.observer.disconnect();
        state.observer = null;
      }
    };
  }, []);
  return (0, import_react2.useCallback)((e9) => {
    let eventTarget = (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9);
    if (eventTarget instanceof HTMLButtonElement || eventTarget instanceof HTMLInputElement || eventTarget instanceof HTMLTextAreaElement || eventTarget instanceof HTMLSelectElement) {
      stateRef.current.isFocused = true;
      let target = eventTarget;
      let onBlurHandler = (e10) => {
        stateRef.current.isFocused = false;
        if (target.disabled) {
          let event = $a92dc41f639950be$export$525bc4921d56d4a(e10);
          onBlur?.(event);
        }
        if (stateRef.current.observer) {
          stateRef.current.observer.disconnect();
          stateRef.current.observer = null;
        }
      };
      target.addEventListener("focusout", onBlurHandler, {
        once: true
      });
      stateRef.current.observer = new MutationObserver(() => {
        if (stateRef.current.isFocused && target.disabled) {
          stateRef.current.observer?.disconnect();
          let relatedTargetEl = target === (0, $23f2114a1b82827e$export$cd4e5573fbe2b576)() ? null : (0, $23f2114a1b82827e$export$cd4e5573fbe2b576)();
          target.dispatchEvent(new FocusEvent("blur", {
            relatedTarget: relatedTargetEl
          }));
          target.dispatchEvent(new FocusEvent("focusout", {
            bubbles: true,
            relatedTarget: relatedTargetEl
          }));
        }
      });
      stateRef.current.observer.observe(target, {
        attributes: true,
        attributeFilter: [
          "disabled"
        ]
      });
    }
  }, [
    onBlur
  ]);
}
var $a92dc41f639950be$export$fda7da73ab5d4c48 = false;
function $a92dc41f639950be$export$cabe61c495ee3649(target) {
  while (target && !(0, $3b8b240c1bf84ab9$export$4c063cf1350e6fed)(target, {
    skipVisibilityCheck: true
  })) target = target.parentElement;
  let window2 = (0, $d447af545b77c9f1$export$f21a1ffae260145a)(target);
  let activeElement2 = window2.document.activeElement;
  if (!activeElement2 || activeElement2 === target) return;
  $a92dc41f639950be$export$fda7da73ab5d4c48 = true;
  let isRefocusing = false;
  let onBlur = (e9) => {
    if ((0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9) === activeElement2 || isRefocusing) e9.stopImmediatePropagation();
  };
  let onFocusOut = (e9) => {
    if ((0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9) === activeElement2 || isRefocusing) {
      e9.stopImmediatePropagation();
      if (!target && !isRefocusing) {
        isRefocusing = true;
        (0, $1969ac565cfec8d0$export$de79e2c695e052f3)(activeElement2);
        cleanup2();
      }
    }
  };
  let onFocus = (e9) => {
    if ((0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9) === target || isRefocusing) e9.stopImmediatePropagation();
  };
  let onFocusIn = (e9) => {
    if ((0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9) === target || isRefocusing) {
      e9.stopImmediatePropagation();
      if (!isRefocusing) {
        isRefocusing = true;
        (0, $1969ac565cfec8d0$export$de79e2c695e052f3)(activeElement2);
        cleanup2();
      }
    }
  };
  window2.addEventListener("blur", onBlur, true);
  window2.addEventListener("focusout", onFocusOut, true);
  window2.addEventListener("focusin", onFocusIn, true);
  window2.addEventListener("focus", onFocus, true);
  let cleanup2 = () => {
    cancelAnimationFrame(raf);
    window2.removeEventListener("blur", onBlur, true);
    window2.removeEventListener("focusout", onFocusOut, true);
    window2.removeEventListener("focusin", onFocusIn, true);
    window2.removeEventListener("focus", onFocus, true);
    $a92dc41f639950be$export$fda7da73ab5d4c48 = false;
    isRefocusing = false;
  };
  let raf = requestAnimationFrame(cleanup2);
  return cleanup2;
}

// node_modules/react-aria/dist/private/utils/platform.mjs
function $2add3ce32c6007eb$var$testUserAgent(re4) {
  if (typeof window === "undefined" || window.navigator == null) return false;
  let brands = window.navigator["userAgentData"]?.brands;
  return Array.isArray(brands) && brands.some((brand) => re4.test(brand.brand)) || re4.test(window.navigator.userAgent);
}
function $2add3ce32c6007eb$var$testPlatform(re4) {
  return typeof window !== "undefined" && window.navigator != null ? re4.test(window.navigator["userAgentData"]?.platform || window.navigator.platform) : false;
}
function $2add3ce32c6007eb$var$cached(fn) {
  if (false) return fn;
  let res = null;
  return () => {
    if (res == null) res = fn();
    return res;
  };
}
var $2add3ce32c6007eb$export$9ac100e40613ea10 = $2add3ce32c6007eb$var$cached(function() {
  return $2add3ce32c6007eb$var$testPlatform(/^Mac/i);
});
var $2add3ce32c6007eb$export$186c6964ca17d99 = $2add3ce32c6007eb$var$cached(function() {
  return $2add3ce32c6007eb$var$testPlatform(/^iPhone/i);
});
var $2add3ce32c6007eb$export$7bef049ce92e4224 = $2add3ce32c6007eb$var$cached(function() {
  return $2add3ce32c6007eb$var$testPlatform(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
  $2add3ce32c6007eb$export$9ac100e40613ea10() && navigator.maxTouchPoints > 1;
});
var $2add3ce32c6007eb$export$fedb369cb70207f1 = $2add3ce32c6007eb$var$cached(function() {
  return $2add3ce32c6007eb$export$186c6964ca17d99() || $2add3ce32c6007eb$export$7bef049ce92e4224();
});
var $2add3ce32c6007eb$export$e1865c3bedcd822b = $2add3ce32c6007eb$var$cached(function() {
  return $2add3ce32c6007eb$export$9ac100e40613ea10() || $2add3ce32c6007eb$export$fedb369cb70207f1();
});
var $2add3ce32c6007eb$export$78551043582a6a98 = $2add3ce32c6007eb$var$cached(function() {
  return $2add3ce32c6007eb$var$testUserAgent(/AppleWebKit/i) && !$2add3ce32c6007eb$export$6446a186d09e379e();
});
var $2add3ce32c6007eb$export$6446a186d09e379e = $2add3ce32c6007eb$var$cached(function() {
  return $2add3ce32c6007eb$var$testUserAgent(/Chrome/i);
});
var $2add3ce32c6007eb$export$a11b0059900ceec8 = $2add3ce32c6007eb$var$cached(function() {
  return $2add3ce32c6007eb$var$testUserAgent(/Android/i);
});
var $2add3ce32c6007eb$export$b7d78993b74f766d = $2add3ce32c6007eb$var$cached(function() {
  return $2add3ce32c6007eb$var$testUserAgent(/Firefox/i);
});

// node_modules/react-aria/dist/private/utils/isVirtualEvent.mjs
function $b5c62b033c25b96d$export$60278871457622de(event) {
  if (event.pointerType === "" && event.isTrusted) return true;
  if ((0, $2add3ce32c6007eb$export$a11b0059900ceec8)() && event.pointerType) return event.type === "click" && event.buttons === 1;
  return event.detail === 0 && !event.pointerType;
}
function $b5c62b033c25b96d$export$29bf1b5f2c56cf63(event) {
  return !(0, $2add3ce32c6007eb$export$a11b0059900ceec8)() && event.width === 0 && event.height === 0 || event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === "mouse";
}

// node_modules/react-aria/dist/private/utils/openLink.mjs
var import_react3 = __toESM(require_react(), 1);
var $caaf0dd3060ed57c$var$RouterContext = (0, import_react3.createContext)({
  isNative: true,
  open: $caaf0dd3060ed57c$var$openSyntheticLink,
  useHref: (href) => href
});
function $caaf0dd3060ed57c$export$95185d699e05d4d7(target, modifiers, setOpening = true) {
  let { metaKey, ctrlKey, altKey, shiftKey } = modifiers;
  if ((0, $2add3ce32c6007eb$export$b7d78993b74f766d)() && window.event?.type?.startsWith("key") && target.target === "_blank") {
    if ((0, $2add3ce32c6007eb$export$9ac100e40613ea10)()) metaKey = true;
    else ctrlKey = true;
  }
  let event = (0, $2add3ce32c6007eb$export$78551043582a6a98)() && (0, $2add3ce32c6007eb$export$9ac100e40613ea10)() && !(0, $2add3ce32c6007eb$export$7bef049ce92e4224)() && true ? new KeyboardEvent("keydown", {
    keyIdentifier: "Enter",
    metaKey,
    ctrlKey,
    altKey,
    shiftKey
  }) : new MouseEvent("click", {
    metaKey,
    ctrlKey,
    altKey,
    shiftKey,
    detail: 1,
    bubbles: true,
    cancelable: true
  });
  $caaf0dd3060ed57c$export$95185d699e05d4d7.isOpening = setOpening;
  (0, $1969ac565cfec8d0$export$de79e2c695e052f3)(target);
  target.dispatchEvent(event);
  $caaf0dd3060ed57c$export$95185d699e05d4d7.isOpening = false;
}
$caaf0dd3060ed57c$export$95185d699e05d4d7.isOpening = false;
function $caaf0dd3060ed57c$var$getSyntheticLink(target, open) {
  if (target instanceof HTMLAnchorElement) open(target);
  else if (target.hasAttribute("data-href")) {
    let link = document.createElement("a");
    link.href = target.getAttribute("data-href");
    if (target.hasAttribute("data-target")) link.target = target.getAttribute("data-target");
    if (target.hasAttribute("data-rel")) link.rel = target.getAttribute("data-rel");
    if (target.hasAttribute("data-download")) link.download = target.getAttribute("data-download");
    if (target.hasAttribute("data-ping")) link.ping = target.getAttribute("data-ping");
    if (target.hasAttribute("data-referrer-policy")) link.referrerPolicy = target.getAttribute("data-referrer-policy");
    target.appendChild(link);
    open(link);
    target.removeChild(link);
  }
}
function $caaf0dd3060ed57c$var$openSyntheticLink(target, modifiers) {
  $caaf0dd3060ed57c$var$getSyntheticLink(target, (link) => $caaf0dd3060ed57c$export$95185d699e05d4d7(link, modifiers));
}

// node_modules/react-aria/dist/private/ssr/SSRProvider.mjs
var import_react4 = __toESM(require_react(), 1);
var $c7eafbbe1ea5834e$var$defaultContext = {
  prefix: String(Math.round(Math.random() * 1e10)),
  current: 0
};
var $c7eafbbe1ea5834e$var$SSRContext = (0, import_react4.default).createContext($c7eafbbe1ea5834e$var$defaultContext);
var $c7eafbbe1ea5834e$var$IsSSRContext = (0, import_react4.default).createContext(false);
var $c7eafbbe1ea5834e$var$canUseDOM = Boolean(typeof window !== "undefined" && window.document && window.document.createElement);
var $c7eafbbe1ea5834e$var$componentIds = /* @__PURE__ */ new WeakMap();
function $c7eafbbe1ea5834e$var$useCounter(isDisabled2 = false) {
  let ctx = (0, import_react4.useContext)($c7eafbbe1ea5834e$var$SSRContext);
  let ref = (0, import_react4.useRef)(null);
  if (ref.current === null && !isDisabled2) {
    let currentOwner = (0, import_react4.default).__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;
    if (currentOwner) {
      let prevComponentValue = $c7eafbbe1ea5834e$var$componentIds.get(currentOwner);
      if (prevComponentValue == null)
        $c7eafbbe1ea5834e$var$componentIds.set(currentOwner, {
          id: ctx.current,
          state: currentOwner.memoizedState
        });
      else if (currentOwner.memoizedState !== prevComponentValue.state) {
        ctx.current = prevComponentValue.id;
        $c7eafbbe1ea5834e$var$componentIds.delete(currentOwner);
      }
    }
    ref.current = ++ctx.current;
  }
  return ref.current;
}
function $c7eafbbe1ea5834e$var$useLegacySSRSafeId(defaultId) {
  let ctx = (0, import_react4.useContext)($c7eafbbe1ea5834e$var$SSRContext);
  if (ctx === $c7eafbbe1ea5834e$var$defaultContext && !$c7eafbbe1ea5834e$var$canUseDOM && true) console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
  let counter = $c7eafbbe1ea5834e$var$useCounter(!!defaultId);
  let prefix = ctx === $c7eafbbe1ea5834e$var$defaultContext && false ? "react-aria" : `react-aria${ctx.prefix}`;
  return defaultId || `${prefix}-${counter}`;
}
function $c7eafbbe1ea5834e$var$useModernSSRSafeId(defaultId) {
  let id = (0, import_react4.default).useId();
  let [didSSR] = (0, import_react4.useState)($c7eafbbe1ea5834e$export$535bd6ca7f90a273());
  let prefix = didSSR || false ? "react-aria" : `react-aria${$c7eafbbe1ea5834e$var$defaultContext.prefix}`;
  return defaultId || `${prefix}-${id}`;
}
var $c7eafbbe1ea5834e$export$619500959fc48b26 = typeof (0, import_react4.default)["useId"] === "function" ? $c7eafbbe1ea5834e$var$useModernSSRSafeId : $c7eafbbe1ea5834e$var$useLegacySSRSafeId;
function $c7eafbbe1ea5834e$var$getSnapshot() {
  return false;
}
function $c7eafbbe1ea5834e$var$getServerSnapshot() {
  return true;
}
function $c7eafbbe1ea5834e$var$subscribe(onStoreChange) {
  return () => {
  };
}
function $c7eafbbe1ea5834e$export$535bd6ca7f90a273() {
  if (typeof (0, import_react4.default)["useSyncExternalStore"] === "function") return (0, import_react4.default)["useSyncExternalStore"]($c7eafbbe1ea5834e$var$subscribe, $c7eafbbe1ea5834e$var$getSnapshot, $c7eafbbe1ea5834e$var$getServerSnapshot);
  return (0, import_react4.useContext)($c7eafbbe1ea5834e$var$IsSSRContext);
}

// node_modules/react-aria/dist/private/interactions/useFocusVisible.mjs
var import_react5 = __toESM(require_react(), 1);
var $8f5a2122b0992be3$var$currentModality = null;
var $8f5a2122b0992be3$var$currentPointerType = "keyboard";
var $8f5a2122b0992be3$export$901e90a13c50a14e = /* @__PURE__ */ new Set();
var $8f5a2122b0992be3$export$d90243b58daecda7 = /* @__PURE__ */ new Map();
var $8f5a2122b0992be3$var$hasEventBeforeFocus = false;
var $8f5a2122b0992be3$var$hasBlurredWindowRecently = false;
var $8f5a2122b0992be3$var$FOCUS_VISIBLE_INPUT_KEYS = {
  Tab: true,
  Escape: true
};
function $8f5a2122b0992be3$var$triggerChangeHandlers(modality, e9) {
  for (let handler of $8f5a2122b0992be3$export$901e90a13c50a14e) handler(modality, e9);
}
function $8f5a2122b0992be3$var$isValidKey(e9) {
  return !(e9.metaKey || !(0, $2add3ce32c6007eb$export$9ac100e40613ea10)() && e9.altKey || e9.ctrlKey || e9.key === "Control" || e9.key === "Shift" || e9.key === "Meta");
}
function $8f5a2122b0992be3$var$handleKeyboardEvent(e9) {
  $8f5a2122b0992be3$var$hasEventBeforeFocus = true;
  if (!(0, $caaf0dd3060ed57c$export$95185d699e05d4d7).isOpening && $8f5a2122b0992be3$var$isValidKey(e9)) {
    $8f5a2122b0992be3$var$currentModality = "keyboard";
    $8f5a2122b0992be3$var$currentPointerType = "keyboard";
    $8f5a2122b0992be3$var$triggerChangeHandlers("keyboard", e9);
  }
}
function $8f5a2122b0992be3$var$handlePointerEvent(e9) {
  $8f5a2122b0992be3$var$currentModality = "pointer";
  $8f5a2122b0992be3$var$currentPointerType = "pointerType" in e9 ? e9.pointerType : "mouse";
  if (e9.type === "mousedown" || e9.type === "pointerdown") {
    $8f5a2122b0992be3$var$hasEventBeforeFocus = true;
    $8f5a2122b0992be3$var$triggerChangeHandlers("pointer", e9);
  }
}
function $8f5a2122b0992be3$var$handleClickEvent(e9) {
  if (!(0, $caaf0dd3060ed57c$export$95185d699e05d4d7).isOpening && (0, $b5c62b033c25b96d$export$60278871457622de)(e9)) {
    $8f5a2122b0992be3$var$hasEventBeforeFocus = true;
    $8f5a2122b0992be3$var$currentModality = "virtual";
    $8f5a2122b0992be3$var$currentPointerType = "virtual";
  }
}
function $8f5a2122b0992be3$var$handleFocusEvent(e9) {
  let ownerWindow = (0, $d447af545b77c9f1$export$f21a1ffae260145a)((0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9));
  let ownerDocument = (0, $d447af545b77c9f1$export$b204af158042fbac)((0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9));
  if ((0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9) === ownerWindow || (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9) === ownerDocument || (0, $a92dc41f639950be$export$fda7da73ab5d4c48) || !e9.isTrusted) return;
  if (!$8f5a2122b0992be3$var$hasEventBeforeFocus && !$8f5a2122b0992be3$var$hasBlurredWindowRecently) {
    $8f5a2122b0992be3$var$currentModality = "virtual";
    $8f5a2122b0992be3$var$currentPointerType = "virtual";
    $8f5a2122b0992be3$var$triggerChangeHandlers("virtual", e9);
  }
  $8f5a2122b0992be3$var$hasEventBeforeFocus = false;
  $8f5a2122b0992be3$var$hasBlurredWindowRecently = false;
}
function $8f5a2122b0992be3$var$handleWindowBlur() {
  if (0, $a92dc41f639950be$export$fda7da73ab5d4c48) return;
  $8f5a2122b0992be3$var$hasEventBeforeFocus = false;
  $8f5a2122b0992be3$var$hasBlurredWindowRecently = true;
}
function $8f5a2122b0992be3$var$setupGlobalFocusEvents(element) {
  if (typeof window === "undefined" || typeof document === "undefined") return;
  const windowObject = (0, $d447af545b77c9f1$export$f21a1ffae260145a)(element);
  const documentObject = (0, $d447af545b77c9f1$export$b204af158042fbac)(element);
  if ($8f5a2122b0992be3$export$d90243b58daecda7.get(windowObject)) return;
  let focus = windowObject.HTMLElement.prototype.focus;
  windowObject.HTMLElement.prototype.focus = function() {
    $8f5a2122b0992be3$var$hasEventBeforeFocus = true;
    focus.apply(this, arguments);
  };
  documentObject.addEventListener("keydown", $8f5a2122b0992be3$var$handleKeyboardEvent, true);
  documentObject.addEventListener("keyup", $8f5a2122b0992be3$var$handleKeyboardEvent, true);
  documentObject.addEventListener("click", $8f5a2122b0992be3$var$handleClickEvent, true);
  windowObject.addEventListener("focus", $8f5a2122b0992be3$var$handleFocusEvent, true);
  windowObject.addEventListener("blur", $8f5a2122b0992be3$var$handleWindowBlur, false);
  if (typeof PointerEvent !== "undefined") {
    documentObject.addEventListener("pointerdown", $8f5a2122b0992be3$var$handlePointerEvent, true);
    documentObject.addEventListener("pointermove", $8f5a2122b0992be3$var$handlePointerEvent, true);
    documentObject.addEventListener("pointerup", $8f5a2122b0992be3$var$handlePointerEvent, true);
  } else if (false) {
    documentObject.addEventListener("mousedown", $8f5a2122b0992be3$var$handlePointerEvent, true);
    documentObject.addEventListener("mousemove", $8f5a2122b0992be3$var$handlePointerEvent, true);
    documentObject.addEventListener("mouseup", $8f5a2122b0992be3$var$handlePointerEvent, true);
  }
  windowObject.addEventListener("beforeunload", () => {
    $8f5a2122b0992be3$var$tearDownWindowFocusTracking(element);
  }, {
    once: true
  });
  $8f5a2122b0992be3$export$d90243b58daecda7.set(windowObject, {
    focus
  });
}
var $8f5a2122b0992be3$var$tearDownWindowFocusTracking = (element, loadListener) => {
  const windowObject = (0, $d447af545b77c9f1$export$f21a1ffae260145a)(element);
  const documentObject = (0, $d447af545b77c9f1$export$b204af158042fbac)(element);
  if (loadListener) documentObject.removeEventListener("DOMContentLoaded", loadListener);
  if (!$8f5a2122b0992be3$export$d90243b58daecda7.has(windowObject)) return;
  windowObject.HTMLElement.prototype.focus = $8f5a2122b0992be3$export$d90243b58daecda7.get(windowObject).focus;
  documentObject.removeEventListener("keydown", $8f5a2122b0992be3$var$handleKeyboardEvent, true);
  documentObject.removeEventListener("keyup", $8f5a2122b0992be3$var$handleKeyboardEvent, true);
  documentObject.removeEventListener("click", $8f5a2122b0992be3$var$handleClickEvent, true);
  windowObject.removeEventListener("focus", $8f5a2122b0992be3$var$handleFocusEvent, true);
  windowObject.removeEventListener("blur", $8f5a2122b0992be3$var$handleWindowBlur, false);
  if (typeof PointerEvent !== "undefined") {
    documentObject.removeEventListener("pointerdown", $8f5a2122b0992be3$var$handlePointerEvent, true);
    documentObject.removeEventListener("pointermove", $8f5a2122b0992be3$var$handlePointerEvent, true);
    documentObject.removeEventListener("pointerup", $8f5a2122b0992be3$var$handlePointerEvent, true);
  } else if (false) {
    documentObject.removeEventListener("mousedown", $8f5a2122b0992be3$var$handlePointerEvent, true);
    documentObject.removeEventListener("mousemove", $8f5a2122b0992be3$var$handlePointerEvent, true);
    documentObject.removeEventListener("mouseup", $8f5a2122b0992be3$var$handlePointerEvent, true);
  }
  $8f5a2122b0992be3$export$d90243b58daecda7.delete(windowObject);
};
function $8f5a2122b0992be3$export$2f1888112f558a7d(element) {
  const documentObject = (0, $d447af545b77c9f1$export$b204af158042fbac)(element);
  let loadListener;
  if (documentObject.readyState !== "loading") $8f5a2122b0992be3$var$setupGlobalFocusEvents(element);
  else {
    loadListener = () => {
      $8f5a2122b0992be3$var$setupGlobalFocusEvents(element);
    };
    documentObject.addEventListener("DOMContentLoaded", loadListener);
  }
  return () => $8f5a2122b0992be3$var$tearDownWindowFocusTracking(element, loadListener);
}
if (typeof document !== "undefined") $8f5a2122b0992be3$export$2f1888112f558a7d();
function $8f5a2122b0992be3$export$b9b3dfddab17db27() {
  return $8f5a2122b0992be3$var$currentModality !== "pointer";
}
function $8f5a2122b0992be3$export$630ff653c5ada6a9() {
  return $8f5a2122b0992be3$var$currentModality;
}
var $8f5a2122b0992be3$var$nonTextInputTypes = /* @__PURE__ */ new Set([
  "checkbox",
  "radio",
  "range",
  "color",
  "file",
  "image",
  "button",
  "submit",
  "reset"
]);
function $8f5a2122b0992be3$var$isKeyboardFocusEvent(isTextInput, modality, e9) {
  let eventTarget = e9 ? (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9) : void 0;
  let document1 = (0, $d447af545b77c9f1$export$b204af158042fbac)(eventTarget);
  let ownerWindow = (0, $d447af545b77c9f1$export$f21a1ffae260145a)(eventTarget);
  const IHTMLInputElement = typeof ownerWindow !== "undefined" ? ownerWindow.HTMLInputElement : HTMLInputElement;
  const IHTMLTextAreaElement = typeof ownerWindow !== "undefined" ? ownerWindow.HTMLTextAreaElement : HTMLTextAreaElement;
  const IHTMLElement = typeof ownerWindow !== "undefined" ? ownerWindow.HTMLElement : HTMLElement;
  const IKeyboardEvent = typeof ownerWindow !== "undefined" ? ownerWindow.KeyboardEvent : KeyboardEvent;
  let activeElement2 = (0, $23f2114a1b82827e$export$cd4e5573fbe2b576)(document1);
  isTextInput = isTextInput || activeElement2 instanceof IHTMLInputElement && !$8f5a2122b0992be3$var$nonTextInputTypes.has(activeElement2.type) || activeElement2 instanceof IHTMLTextAreaElement || activeElement2 instanceof IHTMLElement && activeElement2.isContentEditable;
  return !(isTextInput && modality === "keyboard" && e9 instanceof IKeyboardEvent && !$8f5a2122b0992be3$var$FOCUS_VISIBLE_INPUT_KEYS[e9.key]);
}
function $8f5a2122b0992be3$export$ec71b4b83ac08ec3(fn, deps, opts) {
  $8f5a2122b0992be3$var$setupGlobalFocusEvents();
  (0, import_react5.useEffect)(() => {
    if (opts?.enabled === false) return;
    let handler = (modality, e9) => {
      if (!$8f5a2122b0992be3$var$isKeyboardFocusEvent(!!opts?.isTextInput, modality, e9)) return;
      fn($8f5a2122b0992be3$export$b9b3dfddab17db27());
    };
    $8f5a2122b0992be3$export$901e90a13c50a14e.add(handler);
    return () => {
      $8f5a2122b0992be3$export$901e90a13c50a14e.delete(handler);
    };
  }, deps);
}

// node_modules/react-aria/dist/private/utils/runAfterTransition.mjs
var $081cb5757e08788e$var$transitionsByElement = /* @__PURE__ */ new Map();
var $081cb5757e08788e$var$transitionCallbacks = /* @__PURE__ */ new Set();
function $081cb5757e08788e$var$setupGlobalEvents() {
  if (typeof window === "undefined") return;
  function isTransitionEvent(event) {
    return "propertyName" in event;
  }
  let onTransitionStart = (e9) => {
    let eventTarget = (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9);
    if (!isTransitionEvent(e9) || !eventTarget) return;
    let transitions = $081cb5757e08788e$var$transitionsByElement.get(eventTarget);
    if (!transitions) {
      transitions = /* @__PURE__ */ new Set();
      $081cb5757e08788e$var$transitionsByElement.set(eventTarget, transitions);
      eventTarget.addEventListener("transitioncancel", onTransitionEnd, {
        once: true
      });
    }
    transitions.add(e9.propertyName);
  };
  let onTransitionEnd = (e9) => {
    let eventTarget = (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9);
    if (!isTransitionEvent(e9) || !eventTarget) return;
    let properties = $081cb5757e08788e$var$transitionsByElement.get(eventTarget);
    if (!properties) return;
    properties.delete(e9.propertyName);
    if (properties.size === 0) {
      eventTarget.removeEventListener("transitioncancel", onTransitionEnd);
      $081cb5757e08788e$var$transitionsByElement.delete(eventTarget);
    }
    if ($081cb5757e08788e$var$transitionsByElement.size === 0) {
      for (let cb of $081cb5757e08788e$var$transitionCallbacks) cb();
      $081cb5757e08788e$var$transitionCallbacks.clear();
    }
  };
  document.body.addEventListener("transitionrun", onTransitionStart);
  document.body.addEventListener("transitionend", onTransitionEnd);
}
if (typeof document !== "undefined") {
  if (document.readyState !== "loading") $081cb5757e08788e$var$setupGlobalEvents();
  else document.addEventListener("DOMContentLoaded", $081cb5757e08788e$var$setupGlobalEvents);
}
function $081cb5757e08788e$var$cleanupDetachedElements() {
  for (const [eventTarget] of $081cb5757e08788e$var$transitionsByElement)
    if ("isConnected" in eventTarget && !eventTarget.isConnected) $081cb5757e08788e$var$transitionsByElement.delete(eventTarget);
}
function $081cb5757e08788e$export$24490316f764c430(fn) {
  requestAnimationFrame(() => {
    $081cb5757e08788e$var$cleanupDetachedElements();
    if ($081cb5757e08788e$var$transitionsByElement.size === 0) fn();
    else $081cb5757e08788e$var$transitionCallbacks.add(fn);
  });
}

// node_modules/react-aria/dist/private/interactions/focusSafely.mjs
function $f192c2f16961cbe0$export$80f3e147d781571c(element) {
  if (!element.isConnected) return;
  const ownerDocument = (0, $d447af545b77c9f1$export$b204af158042fbac)(element);
  if ((0, $8f5a2122b0992be3$export$630ff653c5ada6a9)() === "virtual") {
    let lastFocusedElement = (0, $23f2114a1b82827e$export$cd4e5573fbe2b576)(ownerDocument);
    (0, $081cb5757e08788e$export$24490316f764c430)(() => {
      const activeElement2 = (0, $23f2114a1b82827e$export$cd4e5573fbe2b576)(ownerDocument);
      if ((activeElement2 === lastFocusedElement || activeElement2 === ownerDocument.body) && element.isConnected) (0, $1969ac565cfec8d0$export$de79e2c695e052f3)(element);
    });
  } else (0, $1969ac565cfec8d0$export$de79e2c695e052f3)(element);
}

// node_modules/react-aria/dist/private/focus/FocusScope.mjs
var import_react6 = __toESM(require_react(), 1);
var $535772f9d2c1f38d$var$FocusContext = (0, import_react6.default).createContext(null);
function $535772f9d2c1f38d$var$isElementInScope(element, scope) {
  if (!element) return false;
  if (!scope) return false;
  return scope.some((node) => (0, $23f2114a1b82827e$export$4282f70798064fe0)(node, element));
}
var $535772f9d2c1f38d$var$Tree = class _$535772f9d2c1f38d$var$Tree {
  constructor() {
    this.fastMap = /* @__PURE__ */ new Map();
    this.root = new $535772f9d2c1f38d$var$TreeNode({
      scopeRef: null
    });
    this.fastMap.set(null, this.root);
  }
  get size() {
    return this.fastMap.size;
  }
  getTreeNode(data) {
    return this.fastMap.get(data);
  }
  addTreeNode(scopeRef, parent, nodeToRestore) {
    let parentNode = this.fastMap.get(parent ?? null);
    if (!parentNode) return;
    let node = new $535772f9d2c1f38d$var$TreeNode({
      scopeRef
    });
    parentNode.addChild(node);
    node.parent = parentNode;
    this.fastMap.set(scopeRef, node);
    if (nodeToRestore) node.nodeToRestore = nodeToRestore;
  }
  addNode(node) {
    this.fastMap.set(node.scopeRef, node);
  }
  removeTreeNode(scopeRef) {
    if (scopeRef === null) return;
    let node = this.fastMap.get(scopeRef);
    if (!node) return;
    let parentNode = node.parent;
    for (let current of this.traverse()) if (current !== node && node.nodeToRestore && current.nodeToRestore && node.scopeRef && node.scopeRef.current && $535772f9d2c1f38d$var$isElementInScope(current.nodeToRestore, node.scopeRef.current)) current.nodeToRestore = node.nodeToRestore;
    let children = node.children;
    if (parentNode) {
      parentNode.removeChild(node);
      if (children.size > 0) children.forEach((child) => parentNode && parentNode.addChild(child));
    }
    this.fastMap.delete(node.scopeRef);
  }
  // Pre Order Depth First
  *traverse(node = this.root) {
    if (node.scopeRef != null) yield node;
    if (node.children.size > 0) for (let child of node.children) yield* this.traverse(child);
  }
  clone() {
    let newTree = new _$535772f9d2c1f38d$var$Tree();
    for (let node of this.traverse()) newTree.addTreeNode(node.scopeRef, node.parent?.scopeRef ?? null, node.nodeToRestore);
    return newTree;
  }
};
var $535772f9d2c1f38d$var$TreeNode = class {
  constructor(props) {
    this.children = /* @__PURE__ */ new Set();
    this.contain = false;
    this.scopeRef = props.scopeRef;
  }
  addChild(node) {
    this.children.add(node);
    node.parent = this;
  }
  removeChild(node) {
    this.children.delete(node);
    node.parent = void 0;
  }
};
var $535772f9d2c1f38d$export$d06fae2ee68b101e = new $535772f9d2c1f38d$var$Tree();

// node_modules/react-aria/dist/private/utils/chain.mjs
function $a4e76a5424781910$export$e08e3b67e392101e(...callbacks) {
  return (...args) => {
    for (let callback of callbacks) if (typeof callback === "function") callback(...args);
  };
}

// node_modules/react-aria/dist/private/utils/useValueEffect.mjs
var import_react7 = __toESM(require_react(), 1);

// node_modules/react-aria/dist/private/utils/useId.mjs
var import_react8 = __toESM(require_react(), 1);
var $390e54f620492c70$var$canUseDOM = Boolean(typeof window !== "undefined" && window.document && window.document.createElement);
var $390e54f620492c70$export$d41a04c74483c6ef = /* @__PURE__ */ new Map();
var $390e54f620492c70$var$registry;
if (typeof FinalizationRegistry !== "undefined") $390e54f620492c70$var$registry = new FinalizationRegistry((heldValue) => {
  $390e54f620492c70$export$d41a04c74483c6ef.delete(heldValue);
});
function $390e54f620492c70$export$cd8c9cb68f842629(idA, idB) {
  if (idA === idB) return idA;
  let setIdsA = $390e54f620492c70$export$d41a04c74483c6ef.get(idA);
  if (setIdsA) {
    setIdsA.forEach((ref) => ref.current = idB);
    return idB;
  }
  let setIdsB = $390e54f620492c70$export$d41a04c74483c6ef.get(idB);
  if (setIdsB) {
    setIdsB.forEach((ref) => ref.current = idA);
    return idA;
  }
  return idB;
}

// node_modules/react-aria/dist/private/utils/mergeRefs.mjs
function $4064df0d6f9620e1$export$c9058316764c140e(...refs) {
  if (refs.length === 1 && refs[0]) return refs[0];
  return (value) => {
    let hasCleanup = false;
    const cleanups = refs.map((ref) => {
      const cleanup2 = $4064df0d6f9620e1$var$setRef(ref, value);
      hasCleanup ||= typeof cleanup2 == "function";
      return cleanup2;
    });
    if (hasCleanup) return () => {
      cleanups.forEach((cleanup2, i16) => {
        if (typeof cleanup2 === "function") cleanup2();
        else $4064df0d6f9620e1$var$setRef(refs[i16], null);
      });
    };
  };
}
function $4064df0d6f9620e1$var$setRef(ref, value) {
  if (typeof ref === "function") return ref(value);
  else if (ref != null) ref.current = value;
}

// node_modules/react-aria/dist/private/utils/mergeProps.mjs
function $bbaa08b3cd72f041$export$9d1611c77c2fe928(...args) {
  let result = {
    ...args[0]
  };
  for (let i16 = 1; i16 < args.length; i16++) {
    let props = args[i16];
    for (let key in props) {
      let a28 = result[key];
      let b14 = props[key];
      if (typeof a28 === "function" && typeof b14 === "function" && // This is a lot faster than a regex.
      key[0] === "o" && key[1] === "n" && key.charCodeAt(2) >= /* 'A' */
      65 && key.charCodeAt(2) <= /* 'Z' */
      90) result[key] = (0, $a4e76a5424781910$export$e08e3b67e392101e)(a28, b14);
      else if ((key === "className" || key === "UNSAFE_className") && typeof a28 === "string" && typeof b14 === "string") result[key] = (0, clsx_default)(a28, b14);
      else if (key === "id" && a28 && b14) result.id = (0, $390e54f620492c70$export$cd8c9cb68f842629)(a28, b14);
      else if (key === "ref" && a28 && b14) result.ref = (0, $4064df0d6f9620e1$export$c9058316764c140e)(a28, b14);
      else result[key] = b14 !== void 0 ? b14 : a28;
    }
  }
  return result;
}

// node_modules/react-aria/dist/private/interactions/useFocus.mjs
var import_react9 = __toESM(require_react(), 1);
function $1e74c67db218ce67$export$f8168d8dd8fd66e6(props) {
  let { isDisabled: isDisabled2, onFocus: onFocusProp, onBlur: onBlurProp, onFocusChange } = props;
  const onBlur = (0, import_react9.useCallback)((e9) => {
    if ((0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9) === e9.currentTarget) {
      if (onBlurProp) onBlurProp(e9);
      if (onFocusChange) onFocusChange(false);
      return true;
    }
  }, [
    onBlurProp,
    onFocusChange
  ]);
  const onSyntheticFocus = (0, $a92dc41f639950be$export$715c682d09d639cc)(onBlur);
  const onFocus = (0, import_react9.useCallback)((e9) => {
    let eventTarget = (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9);
    const ownerDocument = (0, $d447af545b77c9f1$export$b204af158042fbac)(eventTarget);
    const activeElement2 = ownerDocument ? (0, $23f2114a1b82827e$export$cd4e5573fbe2b576)(ownerDocument) : (0, $23f2114a1b82827e$export$cd4e5573fbe2b576)();
    if (eventTarget === e9.currentTarget && eventTarget === activeElement2) {
      if (onFocusProp) onFocusProp(e9);
      if (onFocusChange) onFocusChange(true);
      onSyntheticFocus(e9);
    }
  }, [
    onFocusChange,
    onFocusProp,
    onSyntheticFocus
  ]);
  return {
    focusProps: {
      onFocus: !isDisabled2 && (onFocusProp || onFocusChange || onBlurProp) ? onFocus : void 0,
      onBlur: !isDisabled2 && (onBlurProp || onFocusChange) ? onBlur : void 0
    }
  };
}

// node_modules/react-aria/dist/private/utils/useGlobalListeners.mjs
var import_react10 = __toESM(require_react(), 1);
function $48a7d519b337145d$export$4eaf04e54aa8eed6() {
  let globalListeners = (0, import_react10.useRef)(/* @__PURE__ */ new Map());
  let addGlobalListener = (0, import_react10.useCallback)((eventTarget, type, listener, options) => {
    let fn = options?.once ? (...args) => {
      globalListeners.current.delete(listener);
      listener(...args);
    } : listener;
    globalListeners.current.set(listener, {
      type,
      eventTarget,
      fn,
      options
    });
    eventTarget.addEventListener(type, fn, options);
  }, []);
  let removeGlobalListener = (0, import_react10.useCallback)((eventTarget, type, listener, options) => {
    let fn = globalListeners.current.get(listener)?.fn || listener;
    eventTarget.removeEventListener(type, fn, options);
    globalListeners.current.delete(listener);
  }, []);
  let removeAllGlobalListeners = (0, import_react10.useCallback)(() => {
    globalListeners.current.forEach((value, key) => {
      removeGlobalListener(value.eventTarget, value.type, key, value.options);
    });
  }, [
    removeGlobalListener
  ]);
  (0, import_react10.useEffect)(() => {
    return removeAllGlobalListeners;
  }, [
    removeAllGlobalListeners
  ]);
  return {
    addGlobalListener,
    removeGlobalListener,
    removeAllGlobalListeners
  };
}

// node_modules/react-aria/dist/private/interactions/useFocusWithin.mjs
var import_react11 = __toESM(require_react(), 1);
function $2c9edc598a03d523$export$420e68273165f4ec(props) {
  let { isDisabled: isDisabled2, onBlurWithin, onFocusWithin, onFocusWithinChange } = props;
  let state = (0, import_react11.useRef)({
    isFocusWithin: false
  });
  let { addGlobalListener, removeAllGlobalListeners } = (0, $48a7d519b337145d$export$4eaf04e54aa8eed6)();
  let onBlur = (0, import_react11.useCallback)((e9) => {
    if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e9.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9))) return;
    if (state.current.isFocusWithin && !(0, $23f2114a1b82827e$export$4282f70798064fe0)(e9.currentTarget, e9.relatedTarget)) {
      state.current.isFocusWithin = false;
      removeAllGlobalListeners();
      if (onBlurWithin) onBlurWithin(e9);
      if (onFocusWithinChange) onFocusWithinChange(false);
    }
  }, [
    onBlurWithin,
    onFocusWithinChange,
    state,
    removeAllGlobalListeners
  ]);
  let onSyntheticFocus = (0, $a92dc41f639950be$export$715c682d09d639cc)(onBlur);
  let onFocus = (0, import_react11.useCallback)((e9) => {
    if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e9.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9))) return;
    let eventTarget = (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9);
    const ownerDocument = (0, $d447af545b77c9f1$export$b204af158042fbac)(eventTarget);
    const activeElement2 = (0, $23f2114a1b82827e$export$cd4e5573fbe2b576)(ownerDocument);
    if (!state.current.isFocusWithin && activeElement2 === eventTarget) {
      if (onFocusWithin) onFocusWithin(e9);
      if (onFocusWithinChange) onFocusWithinChange(true);
      state.current.isFocusWithin = true;
      onSyntheticFocus(e9);
      let currentTarget = e9.currentTarget;
      addGlobalListener(ownerDocument, "focus", (e10) => {
        let eventTarget2 = (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e10);
        if (state.current.isFocusWithin && !(0, $23f2114a1b82827e$export$4282f70798064fe0)(currentTarget, eventTarget2)) {
          let nativeEvent = new ownerDocument.defaultView.FocusEvent("blur", {
            relatedTarget: eventTarget2
          });
          (0, $a92dc41f639950be$export$c2b7abe5d61ec696)(nativeEvent, currentTarget);
          let event = (0, $a92dc41f639950be$export$525bc4921d56d4a)(nativeEvent);
          onBlur(event);
        }
      }, {
        capture: true
      });
    }
  }, [
    onFocusWithin,
    onFocusWithinChange,
    onSyntheticFocus,
    addGlobalListener,
    onBlur
  ]);
  if (isDisabled2) return {
    focusWithinProps: {
      // These cannot be null, that would conflict in mergeProps
      onFocus: void 0,
      onBlur: void 0
    }
  };
  return {
    focusWithinProps: {
      onFocus,
      onBlur
    }
  };
}

// node_modules/react-aria/dist/private/focus/useFocusRing.mjs
var import_react12 = __toESM(require_react(), 1);
function $0c4a58759813079a$export$4e328f61c538687f(props = {}) {
  let { autoFocus = false, isTextInput, within } = props;
  let state = (0, import_react12.useRef)({
    isFocused: false,
    isFocusVisible: autoFocus || (0, $8f5a2122b0992be3$export$b9b3dfddab17db27)()
  });
  let [isFocused, setFocused] = (0, import_react12.useState)(false);
  let [isFocusVisibleState, setFocusVisible] = (0, import_react12.useState)(() => state.current.isFocused && state.current.isFocusVisible);
  let updateState = (0, import_react12.useCallback)(() => setFocusVisible(state.current.isFocused && state.current.isFocusVisible), []);
  let onFocusChange = (0, import_react12.useCallback)((isFocused2) => {
    state.current.isFocused = isFocused2;
    state.current.isFocusVisible = (0, $8f5a2122b0992be3$export$b9b3dfddab17db27)();
    setFocused(isFocused2);
    updateState();
  }, [
    updateState
  ]);
  (0, $8f5a2122b0992be3$export$ec71b4b83ac08ec3)((isFocusVisible) => {
    state.current.isFocusVisible = isFocusVisible;
    updateState();
  }, [
    isTextInput,
    isFocused
  ], {
    enabled: isFocused,
    isTextInput
  });
  let { focusProps } = (0, $1e74c67db218ce67$export$f8168d8dd8fd66e6)({
    isDisabled: within,
    onFocusChange
  });
  let { focusWithinProps } = (0, $2c9edc598a03d523$export$420e68273165f4ec)({
    isDisabled: !within,
    onFocusWithinChange: onFocusChange
  });
  return {
    isFocused,
    isFocusVisible: isFocusVisibleState,
    focusProps: within ? focusWithinProps : focusProps
  };
}

// node_modules/react-aria/dist/private/focus/FocusRing.mjs
var import_react13 = __toESM(require_react(), 1);

// node_modules/react-aria/dist/private/focus/useHasTabbableChild.mjs
var import_react14 = __toESM(require_react(), 1);

// node_modules/react-aria/dist/private/interactions/createEventHandler.mjs
function $8dba16319206abb6$export$48d1ea6320830260(handler) {
  if (!handler) return void 0;
  let shouldStopPropagation = true;
  return (e9) => {
    let event = {
      ...e9,
      preventDefault() {
        e9.preventDefault();
      },
      isDefaultPrevented() {
        return e9.isDefaultPrevented();
      },
      stopPropagation() {
        if (shouldStopPropagation && true) console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.");
        else shouldStopPropagation = true;
      },
      continuePropagation() {
        shouldStopPropagation = false;
      },
      isPropagationStopped() {
        return shouldStopPropagation;
      }
    };
    handler(event);
    if (shouldStopPropagation) e9.stopPropagation();
  };
}

// node_modules/react-aria/dist/private/interactions/useKeyboard.mjs
function $8296dad1a4c5e0dc$export$8f71654801c2f7cd(props) {
  return {
    keyboardProps: props.isDisabled ? {} : {
      onKeyDown: (0, $8dba16319206abb6$export$48d1ea6320830260)(props.onKeyDown),
      onKeyUp: (0, $8dba16319206abb6$export$48d1ea6320830260)(props.onKeyUp)
    }
  };
}

// node_modules/react-aria/dist/private/utils/useObjectRef.mjs
var import_react15 = __toESM(require_react(), 1);
function $03e8ab2d84d7657a$export$4338b53315abf666(ref) {
  const objRef = (0, import_react15.useRef)(null);
  const cleanupRef = (0, import_react15.useRef)(void 0);
  const refEffect = (0, import_react15.useCallback)((instance) => {
    if (typeof ref === "function") {
      const refCallback = ref;
      const refCleanup = refCallback(instance);
      return () => {
        if (typeof refCleanup === "function") refCleanup();
        else refCallback(null);
      };
    } else if (ref) {
      ref.current = instance;
      return () => {
        ref.current = null;
      };
    }
  }, [
    ref
  ]);
  return (0, import_react15.useMemo)(() => ({
    get current() {
      return objRef.current;
    },
    set current(value) {
      objRef.current = value;
      if (cleanupRef.current) {
        cleanupRef.current();
        cleanupRef.current = void 0;
      }
      if (value != null) cleanupRef.current = refEffect(value);
    }
  }), [
    refEffect
  ]);
}

// node_modules/react-aria/dist/private/utils/useSyncRef.mjs
function $b7115c395c64f7b5$export$4debdb1a3f0fa79e(context, ref) {
  (0, $c4867b2f328c2698$export$e5c5a5f917a5871c)(() => {
    if (context && context.ref && ref) {
      context.ref.current = ref.current;
      return () => {
        if (context.ref) context.ref.current = null;
      };
    }
  });
}

// node_modules/react-aria/dist/private/interactions/useFocusable.mjs
var import_react16 = __toESM(require_react(), 1);
var $d1116acdf220c2da$export$f9762fab77588ecb = (0, import_react16.default).createContext(null);
function $d1116acdf220c2da$var$useFocusableContext(ref) {
  let context = (0, import_react16.useContext)($d1116acdf220c2da$export$f9762fab77588ecb) || {};
  (0, $b7115c395c64f7b5$export$4debdb1a3f0fa79e)(context, ref);
  let { ref: _9, ...otherProps } = context;
  return otherProps;
}
var $d1116acdf220c2da$export$13f3202a3e5ddd5 = (0, import_react16.default).forwardRef(function FocusableProvider(props, ref) {
  let { children, ...otherProps } = props;
  let objRef = (0, $03e8ab2d84d7657a$export$4338b53315abf666)(ref);
  let context = {
    ...otherProps,
    ref: objRef
  };
  return (0, import_react16.default).createElement($d1116acdf220c2da$export$f9762fab77588ecb.Provider, {
    value: context
  }, children);
});
function $d1116acdf220c2da$export$4c014de7c8940b4c(props, domRef) {
  let { focusProps } = (0, $1e74c67db218ce67$export$f8168d8dd8fd66e6)(props);
  let { keyboardProps } = (0, $8296dad1a4c5e0dc$export$8f71654801c2f7cd)(props);
  let interactions = (0, $bbaa08b3cd72f041$export$9d1611c77c2fe928)(focusProps, keyboardProps);
  let domProps = $d1116acdf220c2da$var$useFocusableContext(domRef);
  let interactionProps = props.isDisabled ? {} : domProps;
  let autoFocusRef = (0, import_react16.useRef)(props.autoFocus);
  (0, import_react16.useEffect)(() => {
    if (autoFocusRef.current && domRef.current) (0, $f192c2f16961cbe0$export$80f3e147d781571c)(domRef.current);
    autoFocusRef.current = false;
  }, [
    domRef
  ]);
  let tabIndex = props.excludeFromTabOrder ? -1 : 0;
  if (props.isDisabled) tabIndex = void 0;
  return {
    focusableProps: (0, $bbaa08b3cd72f041$export$9d1611c77c2fe928)({
      ...interactions,
      tabIndex
    }, interactionProps)
  };
}
var $d1116acdf220c2da$export$35a3bebf7ef2d934 = (0, import_react16.forwardRef)(({ children, ...props }, ref) => {
  ref = (0, $03e8ab2d84d7657a$export$4338b53315abf666)(ref);
  let { focusableProps } = $d1116acdf220c2da$export$4c014de7c8940b4c(props, ref);
  let child = (0, import_react16.default).Children.only(children);
  (0, import_react16.useEffect)(() => {
    if (false) return;
    let el = ref.current;
    if (!el || !(el instanceof (0, $d447af545b77c9f1$export$f21a1ffae260145a)(el).Element)) {
      console.error("<Focusable> child must forward its ref to a DOM element.");
      return;
    }
    if (!props.isDisabled && !(0, $3b8b240c1bf84ab9$export$4c063cf1350e6fed)(el)) {
      console.warn("<Focusable> child must be focusable. Please ensure the tabIndex prop is passed through.");
      return;
    }
    if (el.localName !== "button" && el.localName !== "input" && el.localName !== "select" && el.localName !== "textarea" && el.localName !== "a" && el.localName !== "area" && el.localName !== "summary" && el.localName !== "img" && el.localName !== "svg") {
      let role = el.getAttribute("role");
      if (!role) console.warn("<Focusable> child must have an interactive ARIA role.");
      else if (
        // https://w3c.github.io/aria/#widget_roles
        role !== "application" && role !== "button" && role !== "checkbox" && role !== "combobox" && role !== "gridcell" && role !== "link" && role !== "menuitem" && role !== "menuitemcheckbox" && role !== "menuitemradio" && role !== "option" && role !== "radio" && role !== "searchbox" && role !== "separator" && role !== "slider" && role !== "spinbutton" && role !== "switch" && role !== "tab" && role !== "tabpanel" && role !== "textbox" && role !== "treeitem" && // aria-describedby is also announced on these roles
        role !== "img" && role !== "meter" && role !== "progressbar"
      ) console.warn(`<Focusable> child must have an interactive ARIA role. Got "${role}".`);
    }
  }, [
    ref,
    props.isDisabled
  ]);
  let childRef = parseInt((0, import_react16.default).version, 10) < 19 ? child.ref : child.props.ref;
  return (0, import_react16.default).cloneElement(child, {
    ...(0, $bbaa08b3cd72f041$export$9d1611c77c2fe928)(focusableProps, child.props),
    // @ts-ignore
    ref: (0, $4064df0d6f9620e1$export$c9058316764c140e)(childRef, ref)
  });
});

// node_modules/react-aria/dist/private/interactions/textSelection.mjs
var $cbf007e418543821$var$state = "default";
var $cbf007e418543821$var$savedUserSelect = "";
var $cbf007e418543821$var$modifiedElementMap = /* @__PURE__ */ new WeakMap();
function $cbf007e418543821$export$16a4697467175487(target) {
  if ((0, $2add3ce32c6007eb$export$fedb369cb70207f1)()) {
    if ($cbf007e418543821$var$state === "default") {
      const documentObject = (0, $d447af545b77c9f1$export$b204af158042fbac)(target);
      $cbf007e418543821$var$savedUserSelect = documentObject.documentElement.style.webkitUserSelect;
      documentObject.documentElement.style.webkitUserSelect = "none";
    }
    $cbf007e418543821$var$state = "disabled";
  } else if (target instanceof HTMLElement || target instanceof SVGElement) {
    let property = "userSelect" in target.style ? "userSelect" : "webkitUserSelect";
    $cbf007e418543821$var$modifiedElementMap.set(target, target.style[property]);
    target.style[property] = "none";
  }
}
function $cbf007e418543821$export$b0d6fa1ab32e3295(target) {
  if ((0, $2add3ce32c6007eb$export$fedb369cb70207f1)()) {
    if ($cbf007e418543821$var$state !== "disabled") return;
    $cbf007e418543821$var$state = "restoring";
    setTimeout(() => {
      (0, $081cb5757e08788e$export$24490316f764c430)(() => {
        if ($cbf007e418543821$var$state === "restoring") {
          const documentObject = (0, $d447af545b77c9f1$export$b204af158042fbac)(target);
          if (documentObject.documentElement.style.webkitUserSelect === "none") documentObject.documentElement.style.webkitUserSelect = $cbf007e418543821$var$savedUserSelect || "";
          $cbf007e418543821$var$savedUserSelect = "";
          $cbf007e418543821$var$state = "default";
        }
      });
    }, 300);
  } else if (target instanceof HTMLElement || target instanceof SVGElement) {
    if (target && $cbf007e418543821$var$modifiedElementMap.has(target)) {
      let targetOldUserSelect = $cbf007e418543821$var$modifiedElementMap.get(target);
      let property = "userSelect" in target.style ? "userSelect" : "webkitUserSelect";
      if (target.style[property] === "none") target.style[property] = targetOldUserSelect;
      if (target.getAttribute("style") === "") target.removeAttribute("style");
      $cbf007e418543821$var$modifiedElementMap.delete(target);
    }
  }
}

// node_modules/react-aria/dist/private/utils/getNonce.mjs
function $2b2d34ff061957fb$var$getWebpackNonce(doc) {
  let ownerWindow = doc?.defaultView;
  return ownerWindow?.__webpack_nonce__ || globalThis["__webpack_nonce__"] || void 0;
}
var $2b2d34ff061957fb$var$nonceCache = /* @__PURE__ */ new WeakMap();
function $2b2d34ff061957fb$export$2b85b721e524d74b(doc) {
  let d14 = doc ?? (typeof document !== "undefined" ? document : void 0);
  if (!d14) return $2b2d34ff061957fb$var$getWebpackNonce(d14);
  if ($2b2d34ff061957fb$var$nonceCache.has(d14)) return $2b2d34ff061957fb$var$nonceCache.get(d14);
  let meta = d14.querySelector('meta[property="csp-nonce"]');
  let nonce = meta && meta instanceof (0, $d447af545b77c9f1$export$f21a1ffae260145a)(meta).HTMLMetaElement && (meta.nonce || meta.content) || $2b2d34ff061957fb$var$getWebpackNonce(d14) || void 0;
  if (nonce !== void 0) $2b2d34ff061957fb$var$nonceCache.set(d14, nonce);
  return nonce;
}

// node_modules/react-aria/dist/private/interactions/context.mjs
var import_react17 = __toESM(require_react(), 1);
var $24f9a20f226ad820$export$5165eccb35aaadb5 = (0, import_react17.default).createContext({
  register: () => {
  }
});
$24f9a20f226ad820$export$5165eccb35aaadb5.displayName = "PressResponderContext";

// node_modules/react-aria/dist/private/utils/useEffectEvent.mjs
var import_react18 = __toESM(require_react(), 1);
var $fe16bffc7a557bf0$var$useEarlyEffect = (0, import_react18.default)["useInsertionEffect"] ?? (0, $c4867b2f328c2698$export$e5c5a5f917a5871c);
function $fe16bffc7a557bf0$export$7f54fc3180508a52(fn) {
  const ref = (0, import_react18.useRef)(null);
  $fe16bffc7a557bf0$var$useEarlyEffect(() => {
    ref.current = fn;
  }, [
    fn
  ]);
  return (0, import_react18.useCallback)((...args) => {
    const f22 = ref.current;
    return f22?.(...args);
  }, []);
}

// node_modules/react-aria/dist/private/interactions/usePress.mjs
var import_react_dom = __toESM(require_react_dom(), 1);
var import_react19 = __toESM(require_react(), 1);
function $d27d541f9569d26d$var$usePressResponderContext(props) {
  let context = (0, import_react19.useContext)((0, $24f9a20f226ad820$export$5165eccb35aaadb5));
  if (context) {
    let { register, ref, ...contextProps } = context;
    props = (0, $bbaa08b3cd72f041$export$9d1611c77c2fe928)(contextProps, props);
    register();
  }
  (0, $b7115c395c64f7b5$export$4debdb1a3f0fa79e)(context, props.ref);
  return props;
}
var $d27d541f9569d26d$var$PressEvent = class {
  #shouldStopPropagation;
  constructor(type, pointerType, originalEvent, state) {
    this.#shouldStopPropagation = true;
    let currentTarget = state?.target ?? originalEvent.currentTarget;
    const rect = currentTarget?.getBoundingClientRect();
    let x10, y10 = 0;
    let clientX, clientY = null;
    if (originalEvent.clientX != null && originalEvent.clientY != null) {
      clientX = originalEvent.clientX;
      clientY = originalEvent.clientY;
    }
    if (rect) {
      if (clientX != null && clientY != null) {
        x10 = clientX - rect.left;
        y10 = clientY - rect.top;
      } else {
        x10 = rect.width / 2;
        y10 = rect.height / 2;
      }
    }
    this.type = type;
    this.pointerType = pointerType;
    this.target = originalEvent.currentTarget;
    this.shiftKey = originalEvent.shiftKey;
    this.metaKey = originalEvent.metaKey;
    this.ctrlKey = originalEvent.ctrlKey;
    this.altKey = originalEvent.altKey;
    this.x = x10;
    this.y = y10;
    this.key = originalEvent.key;
  }
  continuePropagation() {
    this.#shouldStopPropagation = false;
  }
  get shouldStopPropagation() {
    return this.#shouldStopPropagation;
  }
};
var $d27d541f9569d26d$var$LINK_CLICKED = /* @__PURE__ */ Symbol("linkClicked");
var $d27d541f9569d26d$var$STYLE_ID = "react-aria-pressable-style";
var $d27d541f9569d26d$var$PRESSABLE_ATTRIBUTE = "data-react-aria-pressable";
function $d27d541f9569d26d$export$45712eceda6fad21(props) {
  let { onPress, onPressChange, onPressStart, onPressEnd, onPressUp, onClick, isDisabled: isDisabled2, isPressed: isPressedProp, preventFocusOnPress, shouldCancelOnPointerExit, allowTextSelectionOnPress, ref: domRef, ...domProps } = $d27d541f9569d26d$var$usePressResponderContext(props);
  let [isPressed, setPressed] = (0, import_react19.useState)(false);
  let ref = (0, import_react19.useRef)({
    isPressed: false,
    ignoreEmulatedMouseEvents: false,
    didFirePressStart: false,
    isTriggeringEvent: false,
    activePointerId: null,
    target: null,
    isOverTarget: false,
    pointerType: null,
    disposables: []
  });
  let { addGlobalListener, removeAllGlobalListeners } = (0, $48a7d519b337145d$export$4eaf04e54aa8eed6)();
  let triggerPressStart = (0, import_react19.useCallback)((originalEvent, pointerType) => {
    let state = ref.current;
    if (isDisabled2 || state.didFirePressStart) return false;
    let shouldStopPropagation = true;
    state.isTriggeringEvent = true;
    if (onPressStart) {
      let event = new $d27d541f9569d26d$var$PressEvent("pressstart", pointerType, originalEvent);
      onPressStart(event);
      shouldStopPropagation = event.shouldStopPropagation;
    }
    if (onPressChange) onPressChange(true);
    state.isTriggeringEvent = false;
    state.didFirePressStart = true;
    setPressed(true);
    return shouldStopPropagation;
  }, [
    isDisabled2,
    onPressStart,
    onPressChange
  ]);
  let triggerPressEnd = (0, import_react19.useCallback)((originalEvent, pointerType, wasPressed = true) => {
    let state = ref.current;
    if (!state.didFirePressStart) return false;
    state.didFirePressStart = false;
    state.isTriggeringEvent = true;
    let shouldStopPropagation = true;
    if (onPressEnd) {
      let event = new $d27d541f9569d26d$var$PressEvent("pressend", pointerType, originalEvent);
      onPressEnd(event);
      shouldStopPropagation = event.shouldStopPropagation;
    }
    if (onPressChange) onPressChange(false);
    setPressed(false);
    if (onPress && wasPressed && !isDisabled2) {
      let event = new $d27d541f9569d26d$var$PressEvent("press", pointerType, originalEvent);
      onPress(event);
      shouldStopPropagation &&= event.shouldStopPropagation;
    }
    state.isTriggeringEvent = false;
    return shouldStopPropagation;
  }, [
    isDisabled2,
    onPressEnd,
    onPressChange,
    onPress
  ]);
  let triggerPressEndEvent = (0, $fe16bffc7a557bf0$export$7f54fc3180508a52)(triggerPressEnd);
  let triggerPressUp = (0, import_react19.useCallback)((originalEvent, pointerType) => {
    let state = ref.current;
    if (isDisabled2) return false;
    if (onPressUp) {
      state.isTriggeringEvent = true;
      let event = new $d27d541f9569d26d$var$PressEvent("pressup", pointerType, originalEvent);
      onPressUp(event);
      state.isTriggeringEvent = false;
      return event.shouldStopPropagation;
    }
    return true;
  }, [
    isDisabled2,
    onPressUp
  ]);
  let triggerPressUpEvent = (0, $fe16bffc7a557bf0$export$7f54fc3180508a52)(triggerPressUp);
  let cancel = (0, import_react19.useCallback)((e9) => {
    let state = ref.current;
    if (state.isPressed && state.target) {
      if (state.didFirePressStart && state.pointerType != null) triggerPressEnd($d27d541f9569d26d$var$createEvent(state.target, e9), state.pointerType, false);
      state.isPressed = false;
      state.isOverTarget = false;
      state.activePointerId = null;
      state.pointerType = null;
      removeAllGlobalListeners();
      if (!allowTextSelectionOnPress) (0, $cbf007e418543821$export$b0d6fa1ab32e3295)(state.target);
      for (let dispose of state.disposables) dispose();
      state.disposables = [];
    }
  }, [
    allowTextSelectionOnPress,
    removeAllGlobalListeners,
    triggerPressEnd
  ]);
  let cancelEvent = (0, $fe16bffc7a557bf0$export$7f54fc3180508a52)(cancel);
  let cancelOnPointerExit = (0, import_react19.useCallback)((e9) => {
    if (shouldCancelOnPointerExit) cancel(e9);
  }, [
    shouldCancelOnPointerExit,
    cancel
  ]);
  let triggerClick = (0, import_react19.useCallback)((e9) => {
    if (isDisabled2) return;
    onClick?.(e9);
  }, [
    isDisabled2,
    onClick
  ]);
  let triggerSyntheticClick = (0, import_react19.useCallback)((e9, target) => {
    if (isDisabled2) return;
    if (onClick) {
      let event = new MouseEvent("click", e9);
      (0, $a92dc41f639950be$export$c2b7abe5d61ec696)(event, target);
      onClick((0, $a92dc41f639950be$export$525bc4921d56d4a)(event));
    }
  }, [
    isDisabled2,
    onClick
  ]);
  let pressProps = (0, import_react19.useMemo)(() => {
    let state = ref.current;
    let pressProps2 = {
      onKeyDown(e9) {
        if ($d27d541f9569d26d$var$isValidKeyboardEvent(e9.nativeEvent, e9.currentTarget) && (0, $23f2114a1b82827e$export$4282f70798064fe0)(e9.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9))) {
          if ($d27d541f9569d26d$var$shouldPreventDefaultKeyboard((0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9), e9.key)) e9.preventDefault();
          let shouldStopPropagation = true;
          if (!state.isPressed && !e9.repeat) {
            state.target = e9.currentTarget;
            state.isPressed = true;
            state.pointerType = "keyboard";
            shouldStopPropagation = triggerPressStart(e9, "keyboard");
          }
          let originalTarget = e9.currentTarget;
          let pressUp = (e10) => {
            if ($d27d541f9569d26d$var$isValidKeyboardEvent(e10, originalTarget) && !e10.repeat && (0, $23f2114a1b82827e$export$4282f70798064fe0)(originalTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e10)) && state.target)
              triggerPressUpEvent($d27d541f9569d26d$var$createEvent(state.target, e10), "keyboard");
          };
          addGlobalListener((0, $d447af545b77c9f1$export$b204af158042fbac)(e9.currentTarget), "keyup", (0, $a4e76a5424781910$export$e08e3b67e392101e)(pressUp, onKeyUp), true);
          if (shouldStopPropagation) e9.stopPropagation();
          if (e9.metaKey && (0, $2add3ce32c6007eb$export$9ac100e40613ea10)()) state.metaKeyEvents?.set(e9.key, e9.nativeEvent);
        } else if (e9.key === "Meta") state.metaKeyEvents = /* @__PURE__ */ new Map();
      },
      onClick(e9) {
        if (e9 && !(0, $23f2114a1b82827e$export$4282f70798064fe0)(e9.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9))) return;
        if (e9 && e9.button === 0 && !state.isTriggeringEvent && !(0, $caaf0dd3060ed57c$export$95185d699e05d4d7).isOpening) {
          let shouldStopPropagation = true;
          if (isDisabled2) e9.preventDefault();
          if (!state.ignoreEmulatedMouseEvents && !state.isPressed && (state.pointerType === "virtual" || (0, $b5c62b033c25b96d$export$60278871457622de)(e9.nativeEvent))) {
            let stopPressStart = triggerPressStart(e9, "virtual");
            let stopPressUp = triggerPressUpEvent(e9, "virtual");
            let stopPressEnd = triggerPressEndEvent(e9, "virtual");
            triggerClick(e9);
            shouldStopPropagation = stopPressStart && stopPressUp && stopPressEnd;
          } else if (state.isPressed && state.pointerType !== "keyboard") {
            let pointerType = state.pointerType || e9.nativeEvent.pointerType || "virtual";
            let stopPressUp = triggerPressUpEvent($d27d541f9569d26d$var$createEvent(e9.currentTarget, e9), pointerType);
            let stopPressEnd = triggerPressEndEvent($d27d541f9569d26d$var$createEvent(e9.currentTarget, e9), pointerType, true);
            shouldStopPropagation = stopPressUp && stopPressEnd;
            state.isOverTarget = false;
            triggerClick(e9);
            cancelEvent(e9);
          }
          state.ignoreEmulatedMouseEvents = false;
          if (shouldStopPropagation) e9.stopPropagation();
        }
      }
    };
    let onKeyUp = (e9) => {
      if (state.isPressed && state.target && $d27d541f9569d26d$var$isValidKeyboardEvent(e9, state.target)) {
        if ($d27d541f9569d26d$var$shouldPreventDefaultKeyboard((0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9), e9.key)) e9.preventDefault();
        let target = (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9);
        let wasPressed = (0, $23f2114a1b82827e$export$4282f70798064fe0)(state.target, target);
        triggerPressEndEvent($d27d541f9569d26d$var$createEvent(state.target, e9), "keyboard", wasPressed);
        if (wasPressed) triggerSyntheticClick(e9, state.target);
        removeAllGlobalListeners();
        if (e9.key !== "Enter" && $d27d541f9569d26d$var$isHTMLAnchorLink(state.target) && (0, $23f2114a1b82827e$export$4282f70798064fe0)(state.target, target) && !e9[$d27d541f9569d26d$var$LINK_CLICKED]) {
          e9[$d27d541f9569d26d$var$LINK_CLICKED] = true;
          (0, $caaf0dd3060ed57c$export$95185d699e05d4d7)(state.target, e9, false);
        }
        state.isPressed = false;
        state.metaKeyEvents?.delete(e9.key);
      } else if (e9.key === "Meta" && state.metaKeyEvents?.size) {
        let events = state.metaKeyEvents;
        state.metaKeyEvents = void 0;
        for (let event of events.values()) state.target?.dispatchEvent(new KeyboardEvent("keyup", event));
      }
    };
    if (typeof PointerEvent !== "undefined") {
      pressProps2.onPointerDown = (e9) => {
        if (e9.button !== 0 || !(0, $23f2114a1b82827e$export$4282f70798064fe0)(e9.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9))) return;
        if ((0, $b5c62b033c25b96d$export$29bf1b5f2c56cf63)(e9.nativeEvent)) {
          state.pointerType = "virtual";
          return;
        }
        state.pointerType = e9.pointerType;
        let shouldStopPropagation = true;
        if (!state.isPressed) {
          state.isPressed = true;
          state.isOverTarget = true;
          state.activePointerId = e9.pointerId;
          state.target = e9.currentTarget;
          if (!allowTextSelectionOnPress) (0, $cbf007e418543821$export$16a4697467175487)(state.target);
          shouldStopPropagation = triggerPressStart(e9, state.pointerType);
          let target = (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9);
          if ("releasePointerCapture" in target) {
            if ("hasPointerCapture" in target) {
              if (target.hasPointerCapture(e9.pointerId)) target.releasePointerCapture(e9.pointerId);
            } else target.releasePointerCapture(e9.pointerId);
          }
          addGlobalListener((0, $d447af545b77c9f1$export$b204af158042fbac)(e9.currentTarget), "pointerup", onPointerUp, false);
          addGlobalListener((0, $d447af545b77c9f1$export$b204af158042fbac)(e9.currentTarget), "pointercancel", onPointerCancel, false);
        }
        if (shouldStopPropagation) e9.stopPropagation();
      };
      pressProps2.onMouseDown = (e9) => {
        if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e9.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9))) return;
        if (e9.button === 0) {
          if (preventFocusOnPress) {
            let dispose = (0, $a92dc41f639950be$export$cabe61c495ee3649)(e9.target);
            if (dispose) state.disposables.push(dispose);
          }
          e9.stopPropagation();
        }
      };
      pressProps2.onPointerUp = (e9) => {
        if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e9.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9)) || state.pointerType === "virtual") return;
        if (e9.button === 0 && !state.isPressed)
          triggerPressUpEvent(e9, state.pointerType || e9.pointerType);
      };
      pressProps2.onPointerEnter = (e9) => {
        if (e9.pointerId === state.activePointerId && state.target && !state.isOverTarget && state.pointerType != null) {
          state.isOverTarget = true;
          triggerPressStart($d27d541f9569d26d$var$createEvent(state.target, e9), state.pointerType);
        }
      };
      pressProps2.onPointerLeave = (e9) => {
        if (e9.pointerId === state.activePointerId && state.target && state.isOverTarget && state.pointerType != null) {
          state.isOverTarget = false;
          triggerPressEndEvent($d27d541f9569d26d$var$createEvent(state.target, e9), state.pointerType, false);
          cancelOnPointerExit(e9);
        }
      };
      let onPointerUp = (e9) => {
        if (e9.pointerId === state.activePointerId && state.isPressed && e9.button === 0 && state.target) {
          if ((0, $23f2114a1b82827e$export$4282f70798064fe0)(state.target, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9)) && state.pointerType != null) {
            let clicked = false;
            let timeout = setTimeout(() => {
              if (state.isPressed && state.target instanceof HTMLElement) {
                if (clicked)
                  cancelEvent(e9);
                else {
                  (0, $1969ac565cfec8d0$export$de79e2c695e052f3)(state.target);
                  state.target.click();
                }
              }
            }, 80);
            addGlobalListener(e9.currentTarget, "click", () => clicked = true, true);
            state.disposables.push(() => clearTimeout(timeout));
          } else
            cancelEvent(e9);
          state.isOverTarget = false;
        }
      };
      let onPointerCancel = (e9) => {
        cancelEvent(e9);
      };
      pressProps2.onDragStart = (e9) => {
        if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e9.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9))) return;
        cancelEvent(e9);
      };
    } else if (false) {
      pressProps2.onMouseDown = (e9) => {
        if (e9.button !== 0 || !(0, $23f2114a1b82827e$export$4282f70798064fe0)(e9.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9))) return;
        if (state.ignoreEmulatedMouseEvents) {
          e9.stopPropagation();
          return;
        }
        state.isPressed = true;
        state.isOverTarget = true;
        state.target = e9.currentTarget;
        state.pointerType = (0, $b5c62b033c25b96d$export$60278871457622de)(e9.nativeEvent) ? "virtual" : "mouse";
        let shouldStopPropagation = (0, import_react_dom.flushSync)(() => triggerPressStart(e9, state.pointerType));
        if (shouldStopPropagation) e9.stopPropagation();
        if (preventFocusOnPress) {
          let dispose = (0, $a92dc41f639950be$export$cabe61c495ee3649)(e9.target);
          if (dispose) state.disposables.push(dispose);
        }
        addGlobalListener((0, $d447af545b77c9f1$export$b204af158042fbac)(e9.currentTarget), "mouseup", onMouseUp, false);
      };
      pressProps2.onMouseEnter = (e9) => {
        if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e9.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9))) return;
        let shouldStopPropagation = true;
        if (state.isPressed && !state.ignoreEmulatedMouseEvents && state.pointerType != null) {
          state.isOverTarget = true;
          shouldStopPropagation = triggerPressStart(e9, state.pointerType);
        }
        if (shouldStopPropagation) e9.stopPropagation();
      };
      pressProps2.onMouseLeave = (e9) => {
        if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e9.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9))) return;
        let shouldStopPropagation = true;
        if (state.isPressed && !state.ignoreEmulatedMouseEvents && state.pointerType != null) {
          state.isOverTarget = false;
          shouldStopPropagation = triggerPressEndEvent(e9, state.pointerType, false);
          cancelOnPointerExit(e9);
        }
        if (shouldStopPropagation) e9.stopPropagation();
      };
      pressProps2.onMouseUp = (e9) => {
        if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e9.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9))) return;
        if (!state.ignoreEmulatedMouseEvents && e9.button === 0 && !state.isPressed)
          triggerPressUpEvent(e9, state.pointerType || "mouse");
      };
      let onMouseUp = (e9) => {
        if (e9.button !== 0) return;
        if (state.ignoreEmulatedMouseEvents) {
          state.ignoreEmulatedMouseEvents = false;
          return;
        }
        if (state.target && (0, $23f2114a1b82827e$export$4282f70798064fe0)(state.target, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9)) && state.pointerType != null) ;
        else
          cancelEvent(e9);
        state.isOverTarget = false;
      };
      pressProps2.onTouchStart = (e9) => {
        if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e9.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9))) return;
        let touch = $d27d541f9569d26d$var$getTouchFromEvent(e9.nativeEvent);
        if (!touch) return;
        state.activePointerId = touch.identifier;
        state.ignoreEmulatedMouseEvents = true;
        state.isOverTarget = true;
        state.isPressed = true;
        state.target = e9.currentTarget;
        state.pointerType = "touch";
        if (!allowTextSelectionOnPress) (0, $cbf007e418543821$export$16a4697467175487)(state.target);
        let shouldStopPropagation = triggerPressStart($d27d541f9569d26d$var$createTouchEvent(state.target, e9), state.pointerType);
        if (shouldStopPropagation) e9.stopPropagation();
        addGlobalListener((0, $d447af545b77c9f1$export$f21a1ffae260145a)(e9.currentTarget), "scroll", onScroll, true);
      };
      pressProps2.onTouchMove = (e9) => {
        if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e9.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9))) return;
        if (!state.isPressed) {
          e9.stopPropagation();
          return;
        }
        let touch = $d27d541f9569d26d$var$getTouchById(e9.nativeEvent, state.activePointerId);
        let shouldStopPropagation = true;
        if (touch && $d27d541f9569d26d$var$isOverTarget(touch, e9.currentTarget)) {
          if (!state.isOverTarget && state.pointerType != null) {
            state.isOverTarget = true;
            shouldStopPropagation = triggerPressStart($d27d541f9569d26d$var$createTouchEvent(state.target, e9), state.pointerType);
          }
        } else if (state.isOverTarget && state.pointerType != null) {
          state.isOverTarget = false;
          shouldStopPropagation = triggerPressEndEvent($d27d541f9569d26d$var$createTouchEvent(state.target, e9), state.pointerType, false);
          cancelOnPointerExit($d27d541f9569d26d$var$createTouchEvent(state.target, e9));
        }
        if (shouldStopPropagation) e9.stopPropagation();
      };
      pressProps2.onTouchEnd = (e9) => {
        if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e9.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9))) return;
        if (!state.isPressed) {
          e9.stopPropagation();
          return;
        }
        let touch = $d27d541f9569d26d$var$getTouchById(e9.nativeEvent, state.activePointerId);
        let shouldStopPropagation = true;
        if (touch && $d27d541f9569d26d$var$isOverTarget(touch, e9.currentTarget) && state.pointerType != null) {
          triggerPressUpEvent($d27d541f9569d26d$var$createTouchEvent(state.target, e9), state.pointerType);
          shouldStopPropagation = triggerPressEndEvent($d27d541f9569d26d$var$createTouchEvent(state.target, e9), state.pointerType);
          triggerSyntheticClick(e9.nativeEvent, state.target);
        } else if (state.isOverTarget && state.pointerType != null)
          shouldStopPropagation = triggerPressEndEvent($d27d541f9569d26d$var$createTouchEvent(state.target, e9), state.pointerType, false);
        if (shouldStopPropagation) e9.stopPropagation();
        state.isPressed = false;
        state.activePointerId = null;
        state.isOverTarget = false;
        state.ignoreEmulatedMouseEvents = true;
        if (state.target && !allowTextSelectionOnPress) (0, $cbf007e418543821$export$b0d6fa1ab32e3295)(state.target);
        removeAllGlobalListeners();
      };
      pressProps2.onTouchCancel = (e9) => {
        if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e9.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9))) return;
        e9.stopPropagation();
        if (state.isPressed)
          cancelEvent($d27d541f9569d26d$var$createTouchEvent(state.target, e9));
      };
      let onScroll = (e9) => {
        if (state.isPressed && (0, $23f2114a1b82827e$export$4282f70798064fe0)((0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9), state.target))
          cancelEvent({
            currentTarget: state.target,
            shiftKey: false,
            ctrlKey: false,
            metaKey: false,
            altKey: false
          });
      };
      pressProps2.onDragStart = (e9) => {
        if (!(0, $23f2114a1b82827e$export$4282f70798064fe0)(e9.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9))) return;
        cancelEvent(e9);
      };
    }
    return pressProps2;
  }, [
    addGlobalListener,
    isDisabled2,
    preventFocusOnPress,
    removeAllGlobalListeners,
    allowTextSelectionOnPress,
    cancelOnPointerExit,
    triggerPressStart,
    triggerClick,
    triggerSyntheticClick
  ]);
  (0, import_react19.useEffect)(() => {
    if (!domRef || false) return;
    const ownerDocument = (0, $d447af545b77c9f1$export$b204af158042fbac)(domRef.current);
    if (!ownerDocument || !ownerDocument.head || ownerDocument.getElementById($d27d541f9569d26d$var$STYLE_ID)) return;
    const style = ownerDocument.createElement("style");
    style.id = $d27d541f9569d26d$var$STYLE_ID;
    let nonce = (0, $2b2d34ff061957fb$export$2b85b721e524d74b)(ownerDocument);
    if (nonce) style.nonce = nonce;
    style.textContent = `
@layer {
  [${$d27d541f9569d26d$var$PRESSABLE_ATTRIBUTE}] {
    touch-action: pan-x pan-y pinch-zoom;
  }
}
    `.trim();
    ownerDocument.head.prepend(style);
  }, [
    domRef
  ]);
  (0, import_react19.useEffect)(() => {
    let state = ref.current;
    return () => {
      if (!allowTextSelectionOnPress) (0, $cbf007e418543821$export$b0d6fa1ab32e3295)(state.target ?? void 0);
      for (let dispose of state.disposables) dispose();
      state.disposables = [];
    };
  }, [
    allowTextSelectionOnPress
  ]);
  return {
    isPressed: isPressedProp || isPressed,
    pressProps: (0, $bbaa08b3cd72f041$export$9d1611c77c2fe928)(domProps, pressProps, {
      [$d27d541f9569d26d$var$PRESSABLE_ATTRIBUTE]: true
    })
  };
}
function $d27d541f9569d26d$var$isHTMLAnchorLink(target) {
  return target.tagName === "A" && target.hasAttribute("href");
}
function $d27d541f9569d26d$var$isValidKeyboardEvent(event, currentTarget) {
  const { key, code } = event;
  const element = currentTarget;
  const role = element.getAttribute("role");
  return (key === "Enter" || key === " " || key === "Spacebar" || code === "Space") && !(element instanceof (0, $d447af545b77c9f1$export$f21a1ffae260145a)(element).HTMLInputElement && !$d27d541f9569d26d$var$isValidInputKey(element, key) || element instanceof (0, $d447af545b77c9f1$export$f21a1ffae260145a)(element).HTMLTextAreaElement || element.isContentEditable) && // Links should only trigger with Enter key
  !((role === "link" || !role && $d27d541f9569d26d$var$isHTMLAnchorLink(element)) && key !== "Enter");
}
function $d27d541f9569d26d$var$createEvent(target, e9) {
  let clientX = e9.clientX;
  let clientY = e9.clientY;
  return {
    currentTarget: target,
    shiftKey: e9.shiftKey,
    ctrlKey: e9.ctrlKey,
    metaKey: e9.metaKey,
    altKey: e9.altKey,
    clientX,
    clientY,
    key: e9.key
  };
}
function $d27d541f9569d26d$var$shouldPreventDefaultUp(target) {
  if (target instanceof HTMLInputElement) return false;
  if (target instanceof HTMLButtonElement) return target.type !== "submit" && target.type !== "reset";
  if ($d27d541f9569d26d$var$isHTMLAnchorLink(target)) return false;
  return true;
}
function $d27d541f9569d26d$var$shouldPreventDefaultKeyboard(target, key) {
  if (target instanceof HTMLInputElement) return !$d27d541f9569d26d$var$isValidInputKey(target, key);
  return $d27d541f9569d26d$var$shouldPreventDefaultUp(target);
}
var $d27d541f9569d26d$var$nonTextInputTypes = /* @__PURE__ */ new Set([
  "checkbox",
  "radio",
  "range",
  "color",
  "file",
  "image",
  "button",
  "submit",
  "reset"
]);
function $d27d541f9569d26d$var$isValidInputKey(target, key) {
  return target.type === "checkbox" || target.type === "radio" ? key === " " : $d27d541f9569d26d$var$nonTextInputTypes.has(target.type);
}

// node_modules/react-aria/dist/private/interactions/Pressable.mjs
var import_react20 = __toESM(require_react(), 1);
var $15e7830bf6471d45$export$27c701ed9e449e99 = (0, import_react20.default).forwardRef(({ children, ...props }, ref) => {
  ref = (0, $03e8ab2d84d7657a$export$4338b53315abf666)(ref);
  let { pressProps } = (0, $d27d541f9569d26d$export$45712eceda6fad21)({
    ...props,
    ref
  });
  let { focusableProps } = (0, $d1116acdf220c2da$export$4c014de7c8940b4c)(props, ref);
  let child = (0, import_react20.default).Children.only(children);
  (0, import_react20.useEffect)(() => {
    if (false) return;
    let el = ref.current;
    if (!el || !(el instanceof (0, $d447af545b77c9f1$export$f21a1ffae260145a)(el).Element)) {
      console.error("<Pressable> child must forward its ref to a DOM element.");
      return;
    }
    if (!props.isDisabled && !(0, $3b8b240c1bf84ab9$export$4c063cf1350e6fed)(el)) {
      console.warn("<Pressable> child must be focusable. Please ensure the tabIndex prop is passed through.");
      return;
    }
    if (el.localName !== "button" && el.localName !== "input" && el.localName !== "select" && el.localName !== "textarea" && el.localName !== "a" && el.localName !== "area" && el.localName !== "summary") {
      let role = el.getAttribute("role");
      if (!role) console.warn("<Pressable> child must have an interactive ARIA role.");
      else if (
        // https://w3c.github.io/aria/#widget_roles
        role !== "application" && role !== "button" && role !== "checkbox" && role !== "combobox" && role !== "gridcell" && role !== "link" && role !== "menuitem" && role !== "menuitemcheckbox" && role !== "menuitemradio" && role !== "option" && role !== "radio" && role !== "searchbox" && role !== "separator" && role !== "slider" && role !== "spinbutton" && role !== "switch" && role !== "tab" && role !== "textbox" && role !== "treeitem"
      ) console.warn(`<Pressable> child must have an interactive ARIA role. Got "${role}".`);
    }
  }, [
    ref,
    props.isDisabled
  ]);
  let childRef = parseInt((0, import_react20.default).version, 10) < 19 ? child.ref : child.props.ref;
  return (0, import_react20.default).cloneElement(child, {
    ...(0, $bbaa08b3cd72f041$export$9d1611c77c2fe928)(pressProps, focusableProps, child.props),
    // @ts-ignore
    ref: (0, $4064df0d6f9620e1$export$c9058316764c140e)(childRef, ref)
  });
});

// node_modules/react-aria/dist/private/interactions/PressResponder.mjs
var import_react21 = __toESM(require_react(), 1);
var $0d47b37c475c5231$export$3351871ee4b288b8 = (0, import_react21.default).forwardRef(({ children, ...props }, ref) => {
  let isRegistered = (0, import_react21.useRef)(false);
  let prevContext = (0, import_react21.useContext)((0, $24f9a20f226ad820$export$5165eccb35aaadb5));
  let context = (0, $bbaa08b3cd72f041$export$9d1611c77c2fe928)(prevContext || {}, {
    ...props,
    register() {
      isRegistered.current = true;
      if (prevContext) prevContext.register();
    }
  });
  context.ref = (0, $03e8ab2d84d7657a$export$4338b53315abf666)(ref || prevContext?.ref);
  (0, $b7115c395c64f7b5$export$4debdb1a3f0fa79e)(prevContext, context.ref);
  (0, import_react21.useEffect)(() => {
    if (!isRegistered.current) {
      if (true) console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component.");
      isRegistered.current = true;
    }
  }, []);
  return (0, import_react21.default).createElement((0, $24f9a20f226ad820$export$5165eccb35aaadb5).Provider, {
    value: context
  }, children);
});

// node_modules/react-aria/dist/private/interactions/useHover.mjs
var import_react22 = __toESM(require_react(), 1);
var $e969f22b6713ca4a$var$globalIgnoreEmulatedMouseEvents = false;
var $e969f22b6713ca4a$var$hoverCount = 0;
function $e969f22b6713ca4a$var$setGlobalIgnoreEmulatedMouseEvents() {
  $e969f22b6713ca4a$var$globalIgnoreEmulatedMouseEvents = true;
  setTimeout(() => {
    $e969f22b6713ca4a$var$globalIgnoreEmulatedMouseEvents = false;
  }, 500);
}
function $e969f22b6713ca4a$var$handleGlobalPointerEvent(e9) {
  if (e9.pointerType === "touch") $e969f22b6713ca4a$var$setGlobalIgnoreEmulatedMouseEvents();
}
function $e969f22b6713ca4a$var$setupGlobalTouchEvents() {
  let ownerDocument = (0, $d447af545b77c9f1$export$b204af158042fbac)(null);
  if (typeof ownerDocument === "undefined") return;
  if ($e969f22b6713ca4a$var$hoverCount === 0) {
    if (typeof PointerEvent !== "undefined") ownerDocument.addEventListener("pointerup", $e969f22b6713ca4a$var$handleGlobalPointerEvent);
    else if (false) ownerDocument.addEventListener("touchend", $e969f22b6713ca4a$var$setGlobalIgnoreEmulatedMouseEvents);
  }
  $e969f22b6713ca4a$var$hoverCount++;
  return () => {
    $e969f22b6713ca4a$var$hoverCount--;
    if ($e969f22b6713ca4a$var$hoverCount > 0) return;
    if (typeof PointerEvent !== "undefined") ownerDocument.removeEventListener("pointerup", $e969f22b6713ca4a$var$handleGlobalPointerEvent);
    else if (false) ownerDocument.removeEventListener("touchend", $e969f22b6713ca4a$var$setGlobalIgnoreEmulatedMouseEvents);
  };
}
function $e969f22b6713ca4a$export$ae780daf29e6d456(props) {
  let { onHoverStart, onHoverChange, onHoverEnd, isDisabled: isDisabled2 } = props;
  let [isHovered, setHovered] = (0, import_react22.useState)(false);
  let state = (0, import_react22.useRef)({
    isHovered: false,
    ignoreEmulatedMouseEvents: false,
    pointerType: "",
    target: null
  }).current;
  (0, import_react22.useEffect)($e969f22b6713ca4a$var$setupGlobalTouchEvents, []);
  let { addGlobalListener, removeAllGlobalListeners } = (0, $48a7d519b337145d$export$4eaf04e54aa8eed6)();
  let { hoverProps, triggerHoverEnd } = (0, import_react22.useMemo)(() => {
    let triggerHoverStart = (event, pointerType) => {
      state.pointerType = pointerType;
      if (isDisabled2 || pointerType === "touch" || state.isHovered || !(0, $23f2114a1b82827e$export$4282f70798064fe0)(event.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(event))) return;
      state.isHovered = true;
      let target = event.currentTarget;
      state.target = target;
      addGlobalListener((0, $d447af545b77c9f1$export$b204af158042fbac)((0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(event)), "pointerover", (e9) => {
        if (state.isHovered && state.target && !(0, $23f2114a1b82827e$export$4282f70798064fe0)(state.target, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9))) triggerHoverEnd2(e9, e9.pointerType);
      }, {
        capture: true
      });
      if (onHoverStart) onHoverStart({
        type: "hoverstart",
        target,
        pointerType
      });
      if (onHoverChange) onHoverChange(true);
      setHovered(true);
    };
    let triggerHoverEnd2 = (event, pointerType) => {
      let target = state.target;
      state.pointerType = "";
      state.target = null;
      if (pointerType === "touch" || !state.isHovered || !target) return;
      state.isHovered = false;
      removeAllGlobalListeners();
      if (onHoverEnd) onHoverEnd({
        type: "hoverend",
        target,
        pointerType
      });
      if (onHoverChange) onHoverChange(false);
      setHovered(false);
    };
    let hoverProps2 = {};
    if (typeof PointerEvent !== "undefined") {
      hoverProps2.onPointerEnter = (e9) => {
        if ($e969f22b6713ca4a$var$globalIgnoreEmulatedMouseEvents && e9.pointerType === "mouse") return;
        triggerHoverStart(e9, e9.pointerType);
      };
      hoverProps2.onPointerLeave = (e9) => {
        if (!isDisabled2 && (0, $23f2114a1b82827e$export$4282f70798064fe0)(e9.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9))) triggerHoverEnd2(e9, e9.pointerType);
      };
    } else if (false) {
      hoverProps2.onTouchStart = () => {
        state.ignoreEmulatedMouseEvents = true;
      };
      hoverProps2.onMouseEnter = (e9) => {
        if (!state.ignoreEmulatedMouseEvents && !$e969f22b6713ca4a$var$globalIgnoreEmulatedMouseEvents) triggerHoverStart(e9, "mouse");
        state.ignoreEmulatedMouseEvents = false;
      };
      hoverProps2.onMouseLeave = (e9) => {
        if (!isDisabled2 && (0, $23f2114a1b82827e$export$4282f70798064fe0)(e9.currentTarget, (0, $23f2114a1b82827e$export$e58f029f0fbfdb29)(e9))) triggerHoverEnd2(e9, "mouse");
      };
    }
    return {
      hoverProps: hoverProps2,
      triggerHoverEnd: triggerHoverEnd2
    };
  }, [
    onHoverStart,
    onHoverChange,
    onHoverEnd,
    isDisabled2,
    state,
    addGlobalListener,
    removeAllGlobalListeners
  ]);
  (0, import_react22.useEffect)(() => {
    if (isDisabled2) triggerHoverEnd({
      currentTarget: state.target
    }, state.pointerType);
  }, [
    isDisabled2
  ]);
  return {
    hoverProps,
    isHovered
  };
}

// node_modules/react-aria/dist/private/interactions/useInteractOutside.mjs
var import_react23 = __toESM(require_react(), 1);

// node_modules/react-aria/dist/private/interactions/useMove.mjs
var import_react24 = __toESM(require_react(), 1);

// node_modules/react-aria/dist/private/utils/useEvent.mjs
var import_react25 = __toESM(require_react(), 1);

// node_modules/react-aria/dist/private/interactions/useScrollWheel.mjs
var import_react26 = __toESM(require_react(), 1);

// node_modules/react-aria/dist/private/utils/useDescription.mjs
var import_react27 = __toESM(require_react(), 1);

// node_modules/react-aria/dist/private/interactions/useLongPress.mjs
var import_react28 = __toESM(require_react(), 1);

// node_modules/@headlessui/react/dist/hooks/use-active-press.js
var import_react33 = __toESM(require_react(), 1);

// node_modules/@headlessui/react/dist/utils/env.js
var i = Object.defineProperty;
var d = (t14, e9, n17) => e9 in t14 ? i(t14, e9, { enumerable: true, configurable: true, writable: true, value: n17 }) : t14[e9] = n17;
var r = (t14, e9, n17) => (d(t14, typeof e9 != "symbol" ? e9 + "" : e9, n17), n17);
var o = class {
  constructor() {
    r(this, "current", this.detect());
    r(this, "handoffState", "pending");
    r(this, "currentId", 0);
  }
  set(e9) {
    this.current !== e9 && (this.handoffState = "pending", this.currentId = 0, this.current = e9);
  }
  reset() {
    this.set(this.detect());
  }
  nextId() {
    return ++this.currentId;
  }
  get isServer() {
    return this.current === "server";
  }
  get isClient() {
    return this.current === "client";
  }
  detect() {
    return typeof window == "undefined" || typeof document == "undefined" ? "server" : "client";
  }
  handoff() {
    this.handoffState === "pending" && (this.handoffState = "complete");
  }
  get isHandoffComplete() {
    return this.handoffState === "complete";
  }
};
var s = new o();

// node_modules/@headlessui/react/dist/utils/owner.js
function l(n17) {
  var u25;
  return s.isServer ? null : n17 == null ? document : (u25 = n17 == null ? void 0 : n17.ownerDocument) != null ? u25 : document;
}
function r2(n17) {
  var u25, o19;
  return s.isServer ? null : n17 == null ? document : (o19 = (u25 = n17 == null ? void 0 : n17.getRootNode) == null ? void 0 : u25.call(n17)) != null ? o19 : document;
}
function e(n17) {
  var u25, o19;
  return (o19 = (u25 = r2(n17)) == null ? void 0 : u25.activeElement) != null ? o19 : null;
}
function d2(n17) {
  return e(n17) === n17;
}

// node_modules/@headlessui/react/dist/hooks/use-disposables.js
var import_react29 = __toESM(require_react(), 1);

// node_modules/@headlessui/react/dist/utils/micro-task.js
function t(e9) {
  typeof queueMicrotask == "function" ? queueMicrotask(e9) : Promise.resolve().then(e9).catch((o19) => setTimeout(() => {
    throw o19;
  }));
}

// node_modules/@headlessui/react/dist/utils/disposables.js
function o2() {
  let s21 = [], r21 = { addEventListener(e9, t14, n17, i16) {
    return e9.addEventListener(t14, n17, i16), r21.add(() => e9.removeEventListener(t14, n17, i16));
  }, requestAnimationFrame(...e9) {
    let t14 = requestAnimationFrame(...e9);
    return r21.add(() => cancelAnimationFrame(t14));
  }, nextFrame(...e9) {
    return r21.requestAnimationFrame(() => r21.requestAnimationFrame(...e9));
  }, setTimeout(...e9) {
    let t14 = setTimeout(...e9);
    return r21.add(() => clearTimeout(t14));
  }, microTask(...e9) {
    let t14 = { current: true };
    return t(() => {
      t14.current && e9[0]();
    }), r21.add(() => {
      t14.current = false;
    });
  }, style(e9, t14, n17) {
    let i16 = e9.style.getPropertyValue(t14);
    return Object.assign(e9.style, { [t14]: n17 }), this.add(() => {
      Object.assign(e9.style, { [t14]: i16 });
    });
  }, group(e9) {
    let t14 = o2();
    return e9(t14), this.add(() => t14.dispose());
  }, add(e9) {
    return s21.includes(e9) || s21.push(e9), () => {
      let t14 = s21.indexOf(e9);
      if (t14 >= 0) for (let n17 of s21.splice(t14, 1)) n17();
    };
  }, dispose() {
    for (let e9 of s21.splice(0)) e9();
  } };
  return r21;
}

// node_modules/@headlessui/react/dist/hooks/use-disposables.js
function p() {
  let [e9] = (0, import_react29.useState)(o2);
  return (0, import_react29.useEffect)(() => () => e9.dispose(), [e9]), e9;
}

// node_modules/@headlessui/react/dist/hooks/use-event.js
var import_react32 = __toESM(require_react(), 1);

// node_modules/@headlessui/react/dist/hooks/use-latest-value.js
var import_react31 = __toESM(require_react(), 1);

// node_modules/@headlessui/react/dist/hooks/use-iso-morphic-effect.js
var import_react30 = __toESM(require_react(), 1);
var n = (e9, t14) => {
  s.isServer ? (0, import_react30.useEffect)(e9, t14) : (0, import_react30.useLayoutEffect)(e9, t14);
};

// node_modules/@headlessui/react/dist/hooks/use-latest-value.js
function s3(e9) {
  let r21 = (0, import_react31.useRef)(e9);
  return n(() => {
    r21.current = e9;
  }, [e9]), r21;
}

// node_modules/@headlessui/react/dist/hooks/use-event.js
var o4 = function(t14) {
  let e9 = s3(t14);
  return import_react32.default.useCallback((...r21) => e9.current(...r21), [e9]);
};

// node_modules/@headlessui/react/dist/hooks/use-active-press.js
function E(e9) {
  let t14 = e9.width / 2, n17 = e9.height / 2;
  return { top: e9.clientY - n17, right: e9.clientX + t14, bottom: e9.clientY + n17, left: e9.clientX - t14 };
}
function P(e9, t14) {
  return !(!e9 || !t14 || e9.right < t14.left || e9.left > t14.right || e9.bottom < t14.top || e9.top > t14.bottom);
}
function w({ disabled: e9 = false } = {}) {
  let t14 = (0, import_react33.useRef)(null), [n17, l19] = (0, import_react33.useState)(false), r21 = p(), o19 = o4(() => {
    t14.current = null, l19(false), r21.dispose();
  }), f22 = o4((s21) => {
    if (r21.dispose(), t14.current === null) {
      t14.current = s21.currentTarget, l19(true);
      {
        let i16 = l(s21.currentTarget);
        r21.addEventListener(i16, "pointerup", o19, false), r21.addEventListener(i16, "pointermove", (c21) => {
          if (t14.current) {
            let p13 = E(c21);
            l19(P(p13, t14.current.getBoundingClientRect()));
          }
        }, false), r21.addEventListener(i16, "pointercancel", o19, false);
      }
    }
  });
  return { pressed: n17, pressProps: e9 ? {} : { onPointerDown: f22, onPointerUp: o19, onClick: o19 } };
}

// node_modules/@headlessui/react/dist/hooks/use-slot.js
var import_react34 = __toESM(require_react(), 1);
function n2(e9) {
  return (0, import_react34.useMemo)(() => e9, Object.values(e9));
}

// node_modules/@headlessui/react/dist/internal/disabled.js
var import_react35 = __toESM(require_react(), 1);
var e2 = (0, import_react35.createContext)(void 0);
function a3() {
  return (0, import_react35.useContext)(e2);
}
function l2({ value: t14, children: o19 }) {
  return import_react35.default.createElement(e2.Provider, { value: t14 }, o19);
}

// node_modules/@headlessui/react/dist/utils/render.js
var import_react36 = __toESM(require_react(), 1);

// node_modules/@headlessui/react/dist/utils/class-names.js
function t4(...r21) {
  return Array.from(new Set(r21.flatMap((n17) => typeof n17 == "string" ? n17.split(" ") : []))).filter(Boolean).join(" ");
}

// node_modules/@headlessui/react/dist/utils/match.js
function u(r21, n17, ...a28) {
  if (r21 in n17) {
    let e9 = n17[r21];
    return typeof e9 == "function" ? e9(...a28) : e9;
  }
  let t14 = new Error(`Tried to handle "${r21}" but there is no handler defined. Only defined handlers are: ${Object.keys(n17).map((e9) => `"${e9}"`).join(", ")}.`);
  throw Error.captureStackTrace && Error.captureStackTrace(t14, u), t14;
}

// node_modules/@headlessui/react/dist/utils/render.js
var A = ((a28) => (a28[a28.None = 0] = "None", a28[a28.RenderStrategy = 1] = "RenderStrategy", a28[a28.Static = 2] = "Static", a28))(A || {});
var C = ((t14) => (t14[t14.Unmount = 0] = "Unmount", t14[t14.Hidden = 1] = "Hidden", t14))(C || {});
function K() {
  let e9 = I();
  return (0, import_react36.useCallback)((r21) => U({ mergeRefs: e9, ...r21 }), [e9]);
}
function U({ ourProps: e9, theirProps: r21, slot: t14, defaultTag: a28, features: o19, visible: n17 = true, name: i16, mergeRefs: l19 }) {
  l19 = l19 != null ? l19 : H;
  let s21 = P2(r21, e9);
  if (n17) return F(s21, t14, a28, i16, l19);
  let y10 = o19 != null ? o19 : 0;
  if (y10 & 2) {
    let { static: f22 = false, ...u25 } = s21;
    if (f22) return F(u25, t14, a28, i16, l19);
  }
  if (y10 & 1) {
    let { unmount: f22 = true, ...u25 } = s21;
    return u(f22 ? 0 : 1, { [0]() {
      return null;
    }, [1]() {
      return F({ ...u25, hidden: true, style: { display: "none" } }, t14, a28, i16, l19);
    } });
  }
  return F(s21, t14, a28, i16, l19);
}
function F(e9, r21 = {}, t14, a28, o19) {
  let { as: n17 = t14, children: i16, refName: l19 = "ref", ...s21 } = h(e9, ["unmount", "static"]), y10 = e9.ref !== void 0 ? { [l19]: e9.ref } : {}, f22 = typeof i16 == "function" ? i16(r21) : i16;
  f22 = E2(f22), "className" in s21 && s21.className && typeof s21.className == "function" && (s21.className = s21.className(r21)), s21["aria-labelledby"] && s21["aria-labelledby"] === s21.id && (s21["aria-labelledby"] = void 0);
  let u25 = {};
  if (r21) {
    let d14 = false, p13 = [];
    for (let [c21, T10] of Object.entries(r21)) typeof T10 == "boolean" && (d14 = true), T10 === true && p13.push(c21.replace(/([A-Z])/g, (g6) => `-${g6.toLowerCase()}`));
    if (d14) {
      u25["data-headlessui-state"] = p13.join(" ");
      for (let c21 of p13) u25[`data-${c21}`] = "";
    }
  }
  if (b(n17) && (Object.keys(m2(s21)).length > 0 || Object.keys(m2(u25)).length > 0)) if (!(0, import_react36.isValidElement)(f22) || Array.isArray(f22) && f22.length > 1 || L(f22)) {
    if (Object.keys(m2(s21)).length > 0) throw new Error(['Passing props on "Fragment"!', "", `The current component <${a28} /> is rendering a "Fragment".`, "However we need to passthrough the following props:", Object.keys(m2(s21)).concat(Object.keys(m2(u25))).map((d14) => `  - ${d14}`).join(`
`), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".', "Render a single element as the child so that we can forward the props onto that element."].map((d14) => `  - ${d14}`).join(`
`)].join(`
`));
  } else {
    let d14 = f22.props, p13 = d14 == null ? void 0 : d14.className, c21 = typeof p13 == "function" ? (...R8) => t4(p13(...R8), s21.className) : t4(p13, s21.className), T10 = c21 ? { className: c21 } : {}, g6 = P2(f22.props, m2(h(s21, ["ref"])));
    for (let R8 in u25) R8 in g6 && delete u25[R8];
    return (0, import_react36.cloneElement)(f22, Object.assign({}, g6, u25, y10, { ref: o19(D(f22), y10.ref) }, T10));
  }
  return (0, import_react36.createElement)(n17, Object.assign({}, h(s21, ["ref"]), !b(n17) && y10, !b(n17) && u25), f22);
}
function I() {
  let e9 = (0, import_react36.useRef)([]), r21 = (0, import_react36.useCallback)((t14) => {
    for (let a28 of e9.current) a28 != null && (typeof a28 == "function" ? a28(t14) : a28.current = t14);
  }, []);
  return (...t14) => {
    if (!t14.every((a28) => a28 == null)) return e9.current = t14, r21;
  };
}
function H(...e9) {
  return e9.every((r21) => r21 == null) ? void 0 : (r21) => {
    for (let t14 of e9) t14 != null && (typeof t14 == "function" ? t14(r21) : t14.current = r21);
  };
}
function P2(...e9) {
  var a28;
  if (e9.length === 0) return {};
  if (e9.length === 1) return e9[0];
  let r21 = {}, t14 = {};
  for (let o19 of e9) for (let n17 in o19) n17.startsWith("on") && typeof o19[n17] == "function" ? ((a28 = t14[n17]) != null || (t14[n17] = []), t14[n17].push(o19[n17])) : r21[n17] = o19[n17];
  if (r21.disabled || r21["aria-disabled"]) for (let o19 in t14) /^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(o19) && (t14[o19] = [(n17) => {
    var i16;
    return (i16 = n17 == null ? void 0 : n17.preventDefault) == null ? void 0 : i16.call(n17);
  }]);
  for (let o19 in t14) Object.assign(r21, { [o19](n17, ...i16) {
    let l19 = t14[o19];
    for (let s21 of l19) {
      if ((n17 instanceof Event || (n17 == null ? void 0 : n17.nativeEvent) instanceof Event) && n17.defaultPrevented) return;
      s21(n17, ...i16);
    }
  } });
  return r21;
}
function V(...e9) {
  var a28;
  if (e9.length === 0) return {};
  if (e9.length === 1) return e9[0];
  let r21 = {}, t14 = {};
  for (let o19 of e9) for (let n17 in o19) n17.startsWith("on") && typeof o19[n17] == "function" ? ((a28 = t14[n17]) != null || (t14[n17] = []), t14[n17].push(o19[n17])) : r21[n17] = o19[n17];
  for (let o19 in t14) Object.assign(r21, { [o19](...n17) {
    let i16 = t14[o19];
    for (let l19 of i16) l19 == null || l19(...n17);
  } });
  return r21;
}
function Y(e9) {
  var r21;
  return Object.assign((0, import_react36.forwardRef)(e9), { displayName: (r21 = e9.displayName) != null ? r21 : e9.name });
}
function m2(e9) {
  let r21 = Object.assign({}, e9);
  for (let t14 in r21) r21[t14] === void 0 && delete r21[t14];
  return r21;
}
function h(e9, r21 = []) {
  let t14 = Object.assign({}, e9);
  for (let a28 of r21) a28 in t14 && delete t14[a28];
  return t14;
}
function D(e9) {
  return import_react36.default.version.split(".")[0] >= "19" ? e9.props.ref : e9.ref;
}
function E2(e9) {
  if (e9 != null && e9.$$typeof === /* @__PURE__ */ Symbol.for("react.lazy")) {
    let r21 = e9._payload;
    if (r21 != null && r21.status === "fulfilled") return E2(r21.value);
  }
  return e9;
}
function b(e9) {
  return e9 === import_react36.Fragment || e9 === /* @__PURE__ */ Symbol.for("react.fragment");
}
function L(e9) {
  return b(e9.type);
}

// node_modules/@headlessui/react/dist/components/button/button.js
var R = "button";
function v2(s21, n17) {
  var r21;
  let p13 = a3(), { disabled: e9 = p13 || false, autoFocus: t14 = false, ...o19 } = s21, { isFocusVisible: a28, focusProps: l19 } = $0c4a58759813079a$export$4e328f61c538687f({ autoFocus: t14 }), { isHovered: u25, hoverProps: i16 } = $e969f22b6713ca4a$export$ae780daf29e6d456({ isDisabled: e9 }), { pressed: T10, pressProps: d14 } = w({ disabled: e9 }), f22 = V({ ref: n17, type: (r21 = o19.type) != null ? r21 : "button", disabled: e9 || void 0, autoFocus: t14 }, l19, i16, d14), m10 = n2({ disabled: e9, hover: u25, focus: a28, active: T10, autofocus: t14 });
  return K()({ ourProps: f22, theirProps: o19, slot: m10, defaultTag: R, name: "Button" });
}
var L2 = Y(v2);

// node_modules/@headlessui/react/dist/components/checkbox/checkbox.js
var import_react46 = __toESM(require_react(), 1);

// node_modules/@headlessui/react/dist/hooks/use-controllable.js
var import_react37 = __toESM(require_react(), 1);
var import_react_dom2 = __toESM(require_react_dom(), 1);
function b2(l19, r21, c21) {
  let [i16, s21] = (0, import_react37.useState)(c21), e9 = l19 !== void 0, t14 = (0, import_react37.useRef)(e9), u25 = (0, import_react37.useRef)(false), d14 = (0, import_react37.useRef)(false);
  return e9 && !t14.current && !u25.current ? (u25.current = true, t14.current = e9, console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")) : !e9 && t14.current && !d14.current && (d14.current = true, t14.current = e9, console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")), [e9 ? l19 : i16, o4((n17) => (e9 || (0, import_react_dom2.flushSync)(() => s21(n17)), r21 == null ? void 0 : r21(n17)))];
}

// node_modules/@headlessui/react/dist/hooks/use-default-value.js
var import_react38 = __toESM(require_react(), 1);
function l3(e9) {
  let [t14] = (0, import_react38.useState)(e9);
  return t14;
}

// node_modules/@headlessui/react/dist/hooks/use-id.js
var import_react39 = __toESM(require_react(), 1);

// node_modules/@headlessui/react/dist/internal/form-fields.js
var import_react41 = __toESM(require_react(), 1);
var import_react_dom3 = __toESM(require_react_dom(), 1);

// node_modules/@headlessui/react/dist/utils/form.js
var import_react40 = __toESM(require_react(), 1);
function p2(t14 = {}, i16 = null, n17 = []) {
  for (let [e9, o19] of Object.entries(t14)) s4(n17, r5(i16, e9), o19);
  return n17;
}
function r5(t14, i16) {
  return t14 ? t14 + "[" + i16 + "]" : i16;
}
function s4(t14, i16, n17) {
  if (Array.isArray(n17)) for (let [e9, o19] of n17.entries()) s4(t14, r5(i16, e9.toString()), o19);
  else n17 instanceof Date ? t14.push([i16, n17.toISOString()]) : typeof n17 == "boolean" ? t14.push([i16, n17 ? "1" : "0"]) : typeof n17 == "string" ? t14.push([i16, n17]) : typeof n17 == "number" ? t14.push([i16, `${n17}`]) : n17 == null ? t14.push([i16, ""]) : c2(n17) && !(0, import_react40.isValidElement)(n17) && p2(n17, i16, t14);
}
function g(t14) {
  var n17, e9;
  let i16 = (n17 = t14 == null ? void 0 : t14.form) != null ? n17 : t14.closest("form");
  if (i16) {
    for (let o19 of i16.elements) if (o19 !== t14 && (o19.tagName === "INPUT" && o19.type === "submit" || o19.tagName === "BUTTON" && o19.type === "submit" || o19.nodeName === "INPUT" && o19.type === "image")) {
      o19.click();
      return;
    }
    (e9 = i16.requestSubmit) == null || e9.call(i16);
  }
}
function c2(t14) {
  if (Object.prototype.toString.call(t14) !== "[object Object]") return false;
  let i16 = Object.getPrototypeOf(t14);
  return i16 === null || Object.getPrototypeOf(i16) === null;
}

// node_modules/@headlessui/react/dist/internal/hidden.js
var a5 = "span";
var s5 = ((e9) => (e9[e9.None = 1] = "None", e9[e9.Focusable = 2] = "Focusable", e9[e9.Hidden = 4] = "Hidden", e9))(s5 || {});
function l4(t14, r21) {
  var n17;
  let { features: d14 = 1, ...e9 } = t14, o19 = { ref: r21, "aria-hidden": (d14 & 2) === 2 ? true : (n17 = e9["aria-hidden"]) != null ? n17 : void 0, hidden: (d14 & 4) === 4 ? true : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(d14 & 4) === 4 && (d14 & 2) !== 2 && { display: "none" } } };
  return K()({ ourProps: o19, theirProps: e9, slot: {}, defaultTag: a5, name: "Hidden" });
}
var f4 = Y(l4);

// node_modules/@headlessui/react/dist/internal/form-fields.js
var f5 = (0, import_react41.createContext)(null);
function W(t14) {
  let [e9, r21] = (0, import_react41.useState)(null);
  return import_react41.default.createElement(f5.Provider, { value: { target: e9 } }, t14.children, import_react41.default.createElement(f4, { features: s5.Hidden, ref: r21 }));
}
function c3({ children: t14 }) {
  let e9 = (0, import_react41.useContext)(f5);
  if (!e9) return import_react41.default.createElement(import_react41.default.Fragment, null, t14);
  let { target: r21 } = e9;
  return r21 ? (0, import_react_dom3.createPortal)(import_react41.default.createElement(import_react41.default.Fragment, null, t14), r21) : null;
}
function j2({ data: t14, form: e9, disabled: r21, onReset: n17, overrides: F7 }) {
  let [i16, a28] = (0, import_react41.useState)(null), p13 = p();
  return (0, import_react41.useEffect)(() => {
    if (n17 && i16) return p13.addEventListener(i16, "reset", n17);
  }, [i16, e9, n17]), import_react41.default.createElement(c3, null, import_react41.default.createElement(C2, { setForm: a28, formId: e9 }), p2(t14).map(([s21, v11]) => import_react41.default.createElement(f4, { features: s5.Hidden, ...m2({ key: s21, as: "input", type: "hidden", hidden: true, readOnly: true, form: e9, disabled: r21, name: s21, value: v11, ...F7 }) })));
}
function C2({ setForm: t14, formId: e9 }) {
  return (0, import_react41.useEffect)(() => {
    if (e9) {
      let r21 = document.getElementById(e9);
      r21 && t14(r21);
    }
  }, [t14, e9]), e9 ? null : import_react41.default.createElement(f4, { features: s5.Hidden, as: "input", type: "hidden", hidden: true, readOnly: true, ref: (r21) => {
    if (!r21) return;
    let n17 = r21.closest("form");
    n17 && t14(n17);
  } });
}

// node_modules/@headlessui/react/dist/internal/id.js
var import_react42 = __toESM(require_react(), 1);
var e3 = (0, import_react42.createContext)(void 0);
function u4() {
  return (0, import_react42.useContext)(e3);
}
function f6({ id: t14, children: r21 }) {
  return import_react42.default.createElement(e3.Provider, { value: t14 }, r21);
}

// node_modules/@headlessui/react/dist/utils/dom.js
function o7(e9) {
  return typeof e9 != "object" || e9 === null ? false : "nodeType" in e9;
}
function t5(e9) {
  return o7(e9) && "tagName" in e9;
}
function n5(e9) {
  return t5(e9) && "accessKey" in e9;
}
function i4(e9) {
  return t5(e9) && "tabIndex" in e9;
}
function r6(e9) {
  return t5(e9) && "style" in e9;
}
function u5(e9) {
  return n5(e9) && e9.nodeName === "IFRAME";
}
function l5(e9) {
  return n5(e9) && e9.nodeName === "INPUT";
}
function m4(e9) {
  return n5(e9) && e9.nodeName === "LABEL";
}
function a6(e9) {
  return n5(e9) && e9.nodeName === "FIELDSET";
}
function E4(e9) {
  return n5(e9) && e9.nodeName === "LEGEND";
}
function L3(e9) {
  return t5(e9) ? e9.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]') : false;
}

// node_modules/@headlessui/react/dist/utils/bugs.js
function s6(l19) {
  let e9 = l19.parentElement, t14 = null;
  for (; e9 && !a6(e9); ) E4(e9) && (t14 = e9), e9 = e9.parentElement;
  let i16 = (e9 == null ? void 0 : e9.getAttribute("disabled")) === "";
  return i16 && r7(t14) ? false : i16;
}
function r7(l19) {
  if (!l19) return false;
  let e9 = l19.previousElementSibling;
  for (; e9 !== null; ) {
    if (E4(e9)) return false;
    e9 = e9.previousElementSibling;
  }
  return true;
}

// node_modules/@headlessui/react/dist/components/description/description.js
var import_react44 = __toESM(require_react(), 1);

// node_modules/@headlessui/react/dist/hooks/use-sync-refs.js
var import_react43 = __toESM(require_react(), 1);
var u6 = /* @__PURE__ */ Symbol();
function T(t14, n17 = true) {
  return Object.assign(t14, { [u6]: n17 });
}
function y(...t14) {
  let n17 = (0, import_react43.useRef)(t14);
  (0, import_react43.useEffect)(() => {
    n17.current = t14;
  }, [t14]);
  let c21 = o4((e9) => {
    for (let o19 of n17.current) o19 != null && (typeof o19 == "function" ? o19(e9) : o19.current = e9);
  });
  return t14.every((e9) => e9 == null || (e9 == null ? void 0 : e9[u6])) ? void 0 : c21;
}

// node_modules/@headlessui/react/dist/components/description/description.js
var a7 = (0, import_react44.createContext)(null);
a7.displayName = "DescriptionContext";
function f7() {
  let r21 = (0, import_react44.useContext)(a7);
  if (r21 === null) {
    let e9 = new Error("You used a <Description /> component, but it is not inside a relevant parent.");
    throw Error.captureStackTrace && Error.captureStackTrace(e9, f7), e9;
  }
  return r21;
}
function w3() {
  var r21, e9;
  return (e9 = (r21 = (0, import_react44.useContext)(a7)) == null ? void 0 : r21.value) != null ? e9 : void 0;
}
function H3() {
  let [r21, e9] = (0, import_react44.useState)([]);
  return [r21.length > 0 ? r21.join(" ") : void 0, (0, import_react44.useMemo)(() => function(t14) {
    let i16 = o4((n17) => (e9((o19) => [...o19, n17]), () => e9((o19) => {
      let s21 = o19.slice(), p13 = s21.indexOf(n17);
      return p13 !== -1 && s21.splice(p13, 1), s21;
    }))), l19 = (0, import_react44.useMemo)(() => ({ register: i16, slot: t14.slot, name: t14.name, props: t14.props, value: t14.value }), [i16, t14.slot, t14.name, t14.props, t14.value]);
    return import_react44.default.createElement(a7.Provider, { value: l19 }, t14.children);
  }, [e9])];
}
var I2 = "p";
function C3(r21, e9) {
  let c21 = (0, import_react39.useId)(), t14 = a3(), { id: i16 = `headlessui-description-${c21}`, ...l19 } = r21, n17 = f7(), o19 = y(e9);
  n(() => n17.register(i16), [i16, n17.register]);
  let s21 = n2({ ...n17.slot, disabled: t14 || false }), p13 = { ref: o19, ...n17.props, id: i16 };
  return K()({ ourProps: p13, theirProps: l19, slot: s21, defaultTag: I2, name: n17.name || "Description" });
}
var _ = Y(C3);
var M2 = Object.assign(_, {});

// node_modules/@headlessui/react/dist/components/keyboard.js
var o8 = ((r21) => (r21.Space = " ", r21.Enter = "Enter", r21.Escape = "Escape", r21.Backspace = "Backspace", r21.Delete = "Delete", r21.ArrowLeft = "ArrowLeft", r21.ArrowUp = "ArrowUp", r21.ArrowRight = "ArrowRight", r21.ArrowDown = "ArrowDown", r21.Home = "Home", r21.End = "End", r21.PageUp = "PageUp", r21.PageDown = "PageDown", r21.Tab = "Tab", r21))(o8 || {});

// node_modules/@headlessui/react/dist/components/label/label.js
var import_react45 = __toESM(require_react(), 1);
var L4 = (0, import_react45.createContext)(null);
L4.displayName = "LabelContext";
function C4() {
  let n17 = (0, import_react45.useContext)(L4);
  if (n17 === null) {
    let l19 = new Error("You used a <Label /> component, but it is not inside a relevant parent.");
    throw Error.captureStackTrace && Error.captureStackTrace(l19, C4), l19;
  }
  return n17;
}
function N(n17) {
  var a28, e9, o19;
  let l19 = (e9 = (a28 = (0, import_react45.useContext)(L4)) == null ? void 0 : a28.value) != null ? e9 : void 0;
  return ((o19 = n17 == null ? void 0 : n17.length) != null ? o19 : 0) > 0 ? [l19, ...n17].filter(Boolean).join(" ") : l19;
}
function V2({ inherit: n17 = false } = {}) {
  let l19 = N(), [a28, e9] = (0, import_react45.useState)([]), o19 = n17 ? [l19, ...a28].filter(Boolean) : a28;
  return [o19.length > 0 ? o19.join(" ") : void 0, (0, import_react45.useMemo)(() => function(t14) {
    let p13 = o4((i16) => (e9((u25) => [...u25, i16]), () => e9((u25) => {
      let d14 = u25.slice(), f22 = d14.indexOf(i16);
      return f22 !== -1 && d14.splice(f22, 1), d14;
    }))), b14 = (0, import_react45.useMemo)(() => ({ register: p13, slot: t14.slot, name: t14.name, props: t14.props, value: t14.value }), [p13, t14.slot, t14.name, t14.props, t14.value]);
    return import_react45.default.createElement(L4.Provider, { value: b14 }, t14.children);
  }, [e9])];
}
var G = "label";
function U2(n17, l19) {
  var y10;
  let a28 = (0, import_react39.useId)(), e9 = C4(), o19 = u4(), T10 = a3(), { id: t14 = `headlessui-label-${a28}`, htmlFor: p13 = o19 != null ? o19 : (y10 = e9.props) == null ? void 0 : y10.htmlFor, passive: b14 = false, ...i16 } = n17, u25 = y(l19);
  n(() => e9.register(t14), [t14, e9.register]);
  let d14 = o4((s21) => {
    let g6 = s21.currentTarget;
    if (!(s21.target !== s21.currentTarget && L3(s21.target)) && (m4(g6) && s21.preventDefault(), e9.props && "onClick" in e9.props && typeof e9.props.onClick == "function" && e9.props.onClick(s21), m4(g6))) {
      let r21 = document.getElementById(g6.htmlFor);
      if (r21) {
        let E13 = r21.getAttribute("disabled");
        if (E13 === "true" || E13 === "") return;
        let x10 = r21.getAttribute("aria-disabled");
        if (x10 === "true" || x10 === "") return;
        (l5(r21) && (r21.type === "file" || r21.type === "radio" || r21.type === "checkbox") || r21.role === "radio" || r21.role === "checkbox" || r21.role === "switch") && r21.click(), r21.focus({ preventScroll: true });
      }
    }
  }), f22 = n2({ ...e9.slot, disabled: T10 || false }), c21 = { ref: u25, ...e9.props, id: t14, htmlFor: p13, onClick: d14 };
  return b14 && ("onClick" in c21 && (delete c21.htmlFor, delete c21.onClick), "onClick" in i16 && delete i16.onClick), K()({ ourProps: c21, theirProps: i16, slot: f22, defaultTag: p13 ? G : "div", name: e9.name || "Label" });
}
var j3 = Y(U2);
var Z = Object.assign(j3, {});

// node_modules/@headlessui/react/dist/components/checkbox/checkbox.js
var de = "span";
function pe(u25, b14) {
  let f22 = (0, import_react39.useId)(), y10 = u4(), T10 = a3(), { id: h15 = y10 || `headlessui-checkbox-${f22}`, disabled: o19 = T10 || false, autoFocus: i16 = false, checked: C11, defaultChecked: k14, onChange: x10, name: d14, value: g6, form: E13, indeterminate: l19 = false, tabIndex: v11 = 0, ...P7 } = u25, r21 = l3(k14), [a28, t14] = b2(C11, x10, r21 != null ? r21 : false), D12 = N(), R8 = w3(), A5 = p(), [F7, p13] = (0, import_react46.useState)(false), c21 = o4(() => {
    p13(true), t14 == null || t14(!a28), A5.nextFrame(() => {
      p13(false);
    });
  }), K4 = o4((e9) => {
    if (s6(e9.currentTarget)) return e9.preventDefault();
    e9.preventDefault(), c21();
  }), _9 = o4((e9) => {
    e9.key === o8.Space ? (e9.preventDefault(), c21()) : e9.key === o8.Enter && g(e9.currentTarget);
  }), H10 = o4((e9) => e9.preventDefault()), { isFocusVisible: B3, focusProps: I10 } = $0c4a58759813079a$export$4e328f61c538687f({ autoFocus: i16 }), { isHovered: L8, hoverProps: M11 } = $e969f22b6713ca4a$export$ae780daf29e6d456({ isDisabled: o19 }), { pressed: U3, pressProps: O6 } = w({ disabled: o19 }), S9 = V({ ref: b14, id: h15, role: "checkbox", "aria-checked": l19 ? "mixed" : a28 ? "true" : "false", "aria-labelledby": D12, "aria-describedby": R8, "aria-disabled": o19 ? true : void 0, indeterminate: l19 ? "true" : void 0, tabIndex: o19 ? void 0 : v11, onKeyUp: o19 ? void 0 : _9, onKeyPress: o19 ? void 0 : H10, onClick: o19 ? void 0 : K4 }, I10, M11, O6), X5 = n2({ checked: a28, disabled: o19, hover: L8, focus: B3, active: U3, indeterminate: l19, changing: F7, autofocus: i16 }), G6 = (0, import_react46.useCallback)(() => {
    if (r21 !== void 0) return t14 == null ? void 0 : t14(r21);
  }, [t14, r21]), W4 = K();
  return import_react46.default.createElement(import_react46.default.Fragment, null, d14 != null && import_react46.default.createElement(j2, { disabled: o19, data: { [d14]: g6 || "on" }, overrides: { type: "checkbox", checked: a28 }, form: E13, onReset: G6 }), W4({ ourProps: S9, theirProps: P7, slot: X5, defaultTag: de, name: "Checkbox" }));
}
var Ke = Y(pe);

// node_modules/@headlessui/react/dist/components/close-button/close-button.js
var import_react48 = __toESM(require_react(), 1);

// node_modules/@headlessui/react/dist/internal/close-provider.js
var import_react47 = __toESM(require_react(), 1);
var e4 = (0, import_react47.createContext)(() => {
});
function u8() {
  return (0, import_react47.useContext)(e4);
}
function C5({ value: t14, children: o19 }) {
  return import_react47.default.createElement(e4.Provider, { value: t14 }, o19);
}

// node_modules/@headlessui/react/dist/components/close-button/close-button.js
function l7(t14, e9) {
  let o19 = u8();
  return import_react48.default.createElement(L2, { ref: e9, ...V({ onClick: o19 }, t14) });
}
var y2 = Y(l7);

// node_modules/@tanstack/react-virtual/dist/esm/index.js
var React = __toESM(require_react());
var import_react_dom4 = __toESM(require_react_dom());

// node_modules/@tanstack/virtual-core/dist/esm/utils.js
function memo(getDeps, fn, opts) {
  let deps = opts.initialDeps ?? [];
  let result;
  let isInitial = true;
  function memoizedFunction() {
    var _a, _b, _c;
    let depTime;
    if (opts.key && ((_a = opts.debug) == null ? void 0 : _a.call(opts))) depTime = Date.now();
    const newDeps = getDeps();
    const depsChanged = newDeps.length !== deps.length || newDeps.some((dep, index2) => deps[index2] !== dep);
    if (!depsChanged) {
      return result;
    }
    deps = newDeps;
    let resultTime;
    if (opts.key && ((_b = opts.debug) == null ? void 0 : _b.call(opts))) resultTime = Date.now();
    result = fn(...newDeps);
    if (opts.key && ((_c = opts.debug) == null ? void 0 : _c.call(opts))) {
      const depEndTime = Math.round((Date.now() - depTime) * 100) / 100;
      const resultEndTime = Math.round((Date.now() - resultTime) * 100) / 100;
      const resultFpsPercentage = resultEndTime / 16;
      const pad = (str, num) => {
        str = String(str);
        while (str.length < num) {
          str = " " + str;
        }
        return str;
      };
      console.info(
        `%c⏱ ${pad(resultEndTime, 5)} /${pad(depEndTime, 5)} ms`,
        `
            font-size: .6rem;
            font-weight: bold;
            color: hsl(${Math.max(
          0,
          Math.min(120 - 120 * resultFpsPercentage, 120)
        )}deg 100% 31%);`,
        opts == null ? void 0 : opts.key
      );
    }
    if ((opts == null ? void 0 : opts.onChange) && !(isInitial && opts.skipInitialOnChange)) {
      opts.onChange(result);
    }
    isInitial = false;
    return result;
  }
  memoizedFunction.updateDeps = (newDeps) => {
    deps = newDeps;
  };
  return memoizedFunction;
}
function notUndefined(value, msg) {
  if (value === void 0) {
    throw new Error(`Unexpected undefined${msg ? `: ${msg}` : ""}`);
  } else {
    return value;
  }
}
var approxEqual = (a28, b14) => Math.abs(a28 - b14) < 1.01;
var debounce = (targetWindow, fn, ms) => {
  let timeoutId2;
  return function(...args) {
    targetWindow.clearTimeout(timeoutId2);
    timeoutId2 = targetWindow.setTimeout(() => fn.apply(this, args), ms);
  };
};

// node_modules/@tanstack/virtual-core/dist/esm/index.js
var getRect = (element) => {
  const { offsetWidth, offsetHeight } = element;
  return { width: offsetWidth, height: offsetHeight };
};
var defaultKeyExtractor = (index2) => index2;
var defaultRangeExtractor = (range) => {
  const start = Math.max(range.startIndex - range.overscan, 0);
  const end = Math.min(range.endIndex + range.overscan, range.count - 1);
  const arr = [];
  for (let i16 = start; i16 <= end; i16++) {
    arr.push(i16);
  }
  return arr;
};
var observeElementRect = (instance, cb) => {
  const element = instance.scrollElement;
  if (!element) {
    return;
  }
  const targetWindow = instance.targetWindow;
  if (!targetWindow) {
    return;
  }
  const handler = (rect) => {
    const { width, height } = rect;
    cb({ width: Math.round(width), height: Math.round(height) });
  };
  handler(getRect(element));
  if (!targetWindow.ResizeObserver) {
    return () => {
    };
  }
  const observer = new targetWindow.ResizeObserver((entries) => {
    const run = () => {
      const entry = entries[0];
      if (entry == null ? void 0 : entry.borderBoxSize) {
        const box = entry.borderBoxSize[0];
        if (box) {
          handler({ width: box.inlineSize, height: box.blockSize });
          return;
        }
      }
      handler(getRect(element));
    };
    instance.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(run) : run();
  });
  observer.observe(element, { box: "border-box" });
  return () => {
    observer.unobserve(element);
  };
};
var addEventListenerOptions = {
  passive: true
};
var supportsScrollend = typeof window == "undefined" ? true : "onscrollend" in window;
var observeElementOffset = (instance, cb) => {
  const element = instance.scrollElement;
  if (!element) {
    return;
  }
  const targetWindow = instance.targetWindow;
  if (!targetWindow) {
    return;
  }
  let offset2 = 0;
  const fallback = instance.options.useScrollendEvent && supportsScrollend ? () => void 0 : debounce(
    targetWindow,
    () => {
      cb(offset2, false);
    },
    instance.options.isScrollingResetDelay
  );
  const createHandler = (isScrolling) => () => {
    const { horizontal, isRtl } = instance.options;
    offset2 = horizontal ? element["scrollLeft"] * (isRtl && -1 || 1) : element["scrollTop"];
    fallback();
    cb(offset2, isScrolling);
  };
  const handler = createHandler(true);
  const endHandler = createHandler(false);
  element.addEventListener("scroll", handler, addEventListenerOptions);
  const registerScrollendEvent = instance.options.useScrollendEvent && supportsScrollend;
  if (registerScrollendEvent) {
    element.addEventListener("scrollend", endHandler, addEventListenerOptions);
  }
  return () => {
    element.removeEventListener("scroll", handler);
    if (registerScrollendEvent) {
      element.removeEventListener("scrollend", endHandler);
    }
  };
};
var measureElement = (element, entry, instance) => {
  if (entry == null ? void 0 : entry.borderBoxSize) {
    const box = entry.borderBoxSize[0];
    if (box) {
      const size2 = Math.round(
        box[instance.options.horizontal ? "inlineSize" : "blockSize"]
      );
      return size2;
    }
  }
  return element[instance.options.horizontal ? "offsetWidth" : "offsetHeight"];
};
var elementScroll = (offset2, {
  adjustments = 0,
  behavior
}, instance) => {
  var _a, _b;
  const toOffset = offset2 + adjustments;
  (_b = (_a = instance.scrollElement) == null ? void 0 : _a.scrollTo) == null ? void 0 : _b.call(_a, {
    [instance.options.horizontal ? "left" : "top"]: toOffset,
    behavior
  });
};
var Virtualizer = class {
  constructor(opts) {
    this.unsubs = [];
    this.scrollElement = null;
    this.targetWindow = null;
    this.isScrolling = false;
    this.scrollState = null;
    this.measurementsCache = [];
    this.itemSizeCache = /* @__PURE__ */ new Map();
    this.laneAssignments = /* @__PURE__ */ new Map();
    this.pendingMeasuredCacheIndexes = [];
    this.prevLanes = void 0;
    this.lanesChangedFlag = false;
    this.lanesSettling = false;
    this.scrollRect = null;
    this.scrollOffset = null;
    this.scrollDirection = null;
    this.scrollAdjustments = 0;
    this.elementsCache = /* @__PURE__ */ new Map();
    this.now = () => {
      var _a, _b, _c;
      return ((_c = (_b = (_a = this.targetWindow) == null ? void 0 : _a.performance) == null ? void 0 : _b.now) == null ? void 0 : _c.call(_b)) ?? Date.now();
    };
    this.observer = /* @__PURE__ */ (() => {
      let _ro = null;
      const get = () => {
        if (_ro) {
          return _ro;
        }
        if (!this.targetWindow || !this.targetWindow.ResizeObserver) {
          return null;
        }
        return _ro = new this.targetWindow.ResizeObserver((entries) => {
          entries.forEach((entry) => {
            const run = () => {
              const node = entry.target;
              const index2 = this.indexFromElement(node);
              if (!node.isConnected) {
                this.observer.unobserve(node);
                return;
              }
              if (this.shouldMeasureDuringScroll(index2)) {
                this.resizeItem(
                  index2,
                  this.options.measureElement(node, entry, this)
                );
              }
            };
            this.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(run) : run();
          });
        });
      };
      return {
        disconnect: () => {
          var _a;
          (_a = get()) == null ? void 0 : _a.disconnect();
          _ro = null;
        },
        observe: (target) => {
          var _a;
          return (_a = get()) == null ? void 0 : _a.observe(target, { box: "border-box" });
        },
        unobserve: (target) => {
          var _a;
          return (_a = get()) == null ? void 0 : _a.unobserve(target);
        }
      };
    })();
    this.range = null;
    this.setOptions = (opts2) => {
      Object.entries(opts2).forEach(([key, value]) => {
        if (typeof value === "undefined") delete opts2[key];
      });
      this.options = {
        debug: false,
        initialOffset: 0,
        overscan: 1,
        paddingStart: 0,
        paddingEnd: 0,
        scrollPaddingStart: 0,
        scrollPaddingEnd: 0,
        horizontal: false,
        getItemKey: defaultKeyExtractor,
        rangeExtractor: defaultRangeExtractor,
        onChange: () => {
        },
        measureElement,
        initialRect: { width: 0, height: 0 },
        scrollMargin: 0,
        gap: 0,
        indexAttribute: "data-index",
        initialMeasurementsCache: [],
        lanes: 1,
        isScrollingResetDelay: 150,
        enabled: true,
        isRtl: false,
        useScrollendEvent: false,
        useAnimationFrameWithResizeObserver: false,
        laneAssignmentMode: "estimate",
        ...opts2
      };
    };
    this.notify = (sync) => {
      var _a, _b;
      (_b = (_a = this.options).onChange) == null ? void 0 : _b.call(_a, this, sync);
    };
    this.maybeNotify = memo(
      () => {
        this.calculateRange();
        return [
          this.isScrolling,
          this.range ? this.range.startIndex : null,
          this.range ? this.range.endIndex : null
        ];
      },
      (isScrolling) => {
        this.notify(isScrolling);
      },
      {
        key: "maybeNotify",
        debug: () => this.options.debug,
        initialDeps: [
          this.isScrolling,
          this.range ? this.range.startIndex : null,
          this.range ? this.range.endIndex : null
        ]
      }
    );
    this.cleanup = () => {
      this.unsubs.filter(Boolean).forEach((d14) => d14());
      this.unsubs = [];
      this.observer.disconnect();
      if (this.rafId != null && this.targetWindow) {
        this.targetWindow.cancelAnimationFrame(this.rafId);
        this.rafId = null;
      }
      this.scrollState = null;
      this.scrollElement = null;
      this.targetWindow = null;
    };
    this._didMount = () => {
      return () => {
        this.cleanup();
      };
    };
    this._willUpdate = () => {
      var _a;
      const scrollElement = this.options.enabled ? this.options.getScrollElement() : null;
      if (this.scrollElement !== scrollElement) {
        this.cleanup();
        if (!scrollElement) {
          this.maybeNotify();
          return;
        }
        this.scrollElement = scrollElement;
        if (this.scrollElement && "ownerDocument" in this.scrollElement) {
          this.targetWindow = this.scrollElement.ownerDocument.defaultView;
        } else {
          this.targetWindow = ((_a = this.scrollElement) == null ? void 0 : _a.window) ?? null;
        }
        this.elementsCache.forEach((cached) => {
          this.observer.observe(cached);
        });
        this.unsubs.push(
          this.options.observeElementRect(this, (rect) => {
            this.scrollRect = rect;
            this.maybeNotify();
          })
        );
        this.unsubs.push(
          this.options.observeElementOffset(this, (offset2, isScrolling) => {
            this.scrollAdjustments = 0;
            this.scrollDirection = isScrolling ? this.getScrollOffset() < offset2 ? "forward" : "backward" : null;
            this.scrollOffset = offset2;
            this.isScrolling = isScrolling;
            if (this.scrollState) {
              this.scheduleScrollReconcile();
            }
            this.maybeNotify();
          })
        );
        this._scrollToOffset(this.getScrollOffset(), {
          adjustments: void 0,
          behavior: void 0
        });
      }
    };
    this.rafId = null;
    this.getSize = () => {
      if (!this.options.enabled) {
        this.scrollRect = null;
        return 0;
      }
      this.scrollRect = this.scrollRect ?? this.options.initialRect;
      return this.scrollRect[this.options.horizontal ? "width" : "height"];
    };
    this.getScrollOffset = () => {
      if (!this.options.enabled) {
        this.scrollOffset = null;
        return 0;
      }
      this.scrollOffset = this.scrollOffset ?? (typeof this.options.initialOffset === "function" ? this.options.initialOffset() : this.options.initialOffset);
      return this.scrollOffset;
    };
    this.getFurthestMeasurement = (measurements, index2) => {
      const furthestMeasurementsFound = /* @__PURE__ */ new Map();
      const furthestMeasurements = /* @__PURE__ */ new Map();
      for (let m10 = index2 - 1; m10 >= 0; m10--) {
        const measurement = measurements[m10];
        if (furthestMeasurementsFound.has(measurement.lane)) {
          continue;
        }
        const previousFurthestMeasurement = furthestMeasurements.get(
          measurement.lane
        );
        if (previousFurthestMeasurement == null || measurement.end > previousFurthestMeasurement.end) {
          furthestMeasurements.set(measurement.lane, measurement);
        } else if (measurement.end < previousFurthestMeasurement.end) {
          furthestMeasurementsFound.set(measurement.lane, true);
        }
        if (furthestMeasurementsFound.size === this.options.lanes) {
          break;
        }
      }
      return furthestMeasurements.size === this.options.lanes ? Array.from(furthestMeasurements.values()).sort((a28, b14) => {
        if (a28.end === b14.end) {
          return a28.index - b14.index;
        }
        return a28.end - b14.end;
      })[0] : void 0;
    };
    this.getMeasurementOptions = memo(
      () => [
        this.options.count,
        this.options.paddingStart,
        this.options.scrollMargin,
        this.options.getItemKey,
        this.options.enabled,
        this.options.lanes,
        this.options.laneAssignmentMode
      ],
      (count2, paddingStart, scrollMargin, getItemKey, enabled, lanes, laneAssignmentMode) => {
        const lanesChanged = this.prevLanes !== void 0 && this.prevLanes !== lanes;
        if (lanesChanged) {
          this.lanesChangedFlag = true;
        }
        this.prevLanes = lanes;
        this.pendingMeasuredCacheIndexes = [];
        return {
          count: count2,
          paddingStart,
          scrollMargin,
          getItemKey,
          enabled,
          lanes,
          laneAssignmentMode
        };
      },
      {
        key: false
      }
    );
    this.getMeasurements = memo(
      () => [this.getMeasurementOptions(), this.itemSizeCache],
      ({
        count: count2,
        paddingStart,
        scrollMargin,
        getItemKey,
        enabled,
        lanes,
        laneAssignmentMode
      }, itemSizeCache) => {
        if (!enabled) {
          this.measurementsCache = [];
          this.itemSizeCache.clear();
          this.laneAssignments.clear();
          return [];
        }
        if (this.laneAssignments.size > count2) {
          for (const index2 of this.laneAssignments.keys()) {
            if (index2 >= count2) {
              this.laneAssignments.delete(index2);
            }
          }
        }
        if (this.lanesChangedFlag) {
          this.lanesChangedFlag = false;
          this.lanesSettling = true;
          this.measurementsCache = [];
          this.itemSizeCache.clear();
          this.laneAssignments.clear();
          this.pendingMeasuredCacheIndexes = [];
        }
        if (this.measurementsCache.length === 0 && !this.lanesSettling) {
          this.measurementsCache = this.options.initialMeasurementsCache;
          this.measurementsCache.forEach((item) => {
            this.itemSizeCache.set(item.key, item.size);
          });
        }
        const min2 = this.lanesSettling ? 0 : this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
        this.pendingMeasuredCacheIndexes = [];
        if (this.lanesSettling && this.measurementsCache.length === count2) {
          this.lanesSettling = false;
        }
        const measurements = this.measurementsCache.slice(0, min2);
        const laneLastIndex = new Array(lanes).fill(
          void 0
        );
        for (let m10 = 0; m10 < min2; m10++) {
          const item = measurements[m10];
          if (item) {
            laneLastIndex[item.lane] = m10;
          }
        }
        for (let i16 = min2; i16 < count2; i16++) {
          const key = getItemKey(i16);
          const cachedLane = this.laneAssignments.get(i16);
          let lane;
          let start;
          const shouldCacheLane = laneAssignmentMode === "estimate" || itemSizeCache.has(key);
          if (cachedLane !== void 0 && this.options.lanes > 1) {
            lane = cachedLane;
            const prevIndex = laneLastIndex[lane];
            const prevInLane = prevIndex !== void 0 ? measurements[prevIndex] : void 0;
            start = prevInLane ? prevInLane.end + this.options.gap : paddingStart + scrollMargin;
          } else {
            const furthestMeasurement = this.options.lanes === 1 ? measurements[i16 - 1] : this.getFurthestMeasurement(measurements, i16);
            start = furthestMeasurement ? furthestMeasurement.end + this.options.gap : paddingStart + scrollMargin;
            lane = furthestMeasurement ? furthestMeasurement.lane : i16 % this.options.lanes;
            if (this.options.lanes > 1 && shouldCacheLane) {
              this.laneAssignments.set(i16, lane);
            }
          }
          const measuredSize = itemSizeCache.get(key);
          const size2 = typeof measuredSize === "number" ? measuredSize : this.options.estimateSize(i16);
          const end = start + size2;
          measurements[i16] = {
            index: i16,
            start,
            size: size2,
            end,
            key,
            lane
          };
          laneLastIndex[lane] = i16;
        }
        this.measurementsCache = measurements;
        return measurements;
      },
      {
        key: "getMeasurements",
        debug: () => this.options.debug
      }
    );
    this.calculateRange = memo(
      () => [
        this.getMeasurements(),
        this.getSize(),
        this.getScrollOffset(),
        this.options.lanes
      ],
      (measurements, outerSize, scrollOffset, lanes) => {
        return this.range = measurements.length > 0 && outerSize > 0 ? calculateRange({
          measurements,
          outerSize,
          scrollOffset,
          lanes
        }) : null;
      },
      {
        key: "calculateRange",
        debug: () => this.options.debug
      }
    );
    this.getVirtualIndexes = memo(
      () => {
        let startIndex = null;
        let endIndex = null;
        const range = this.calculateRange();
        if (range) {
          startIndex = range.startIndex;
          endIndex = range.endIndex;
        }
        this.maybeNotify.updateDeps([this.isScrolling, startIndex, endIndex]);
        return [
          this.options.rangeExtractor,
          this.options.overscan,
          this.options.count,
          startIndex,
          endIndex
        ];
      },
      (rangeExtractor, overscan, count2, startIndex, endIndex) => {
        return startIndex === null || endIndex === null ? [] : rangeExtractor({
          startIndex,
          endIndex,
          overscan,
          count: count2
        });
      },
      {
        key: "getVirtualIndexes",
        debug: () => this.options.debug
      }
    );
    this.indexFromElement = (node) => {
      const attributeName = this.options.indexAttribute;
      const indexStr = node.getAttribute(attributeName);
      if (!indexStr) {
        console.warn(
          `Missing attribute name '${attributeName}={index}' on measured element.`
        );
        return -1;
      }
      return parseInt(indexStr, 10);
    };
    this.shouldMeasureDuringScroll = (index2) => {
      var _a;
      if (!this.scrollState || this.scrollState.behavior !== "smooth") {
        return true;
      }
      const scrollIndex = this.scrollState.index ?? ((_a = this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)) == null ? void 0 : _a.index);
      if (scrollIndex !== void 0 && this.range) {
        const bufferSize = Math.max(
          this.options.overscan,
          Math.ceil((this.range.endIndex - this.range.startIndex) / 2)
        );
        const minIndex = Math.max(0, scrollIndex - bufferSize);
        const maxIndex = Math.min(
          this.options.count - 1,
          scrollIndex + bufferSize
        );
        return index2 >= minIndex && index2 <= maxIndex;
      }
      return true;
    };
    this.measureElement = (node) => {
      if (!node) {
        this.elementsCache.forEach((cached, key2) => {
          if (!cached.isConnected) {
            this.observer.unobserve(cached);
            this.elementsCache.delete(key2);
          }
        });
        return;
      }
      const index2 = this.indexFromElement(node);
      const key = this.options.getItemKey(index2);
      const prevNode = this.elementsCache.get(key);
      if (prevNode !== node) {
        if (prevNode) {
          this.observer.unobserve(prevNode);
        }
        this.observer.observe(node);
        this.elementsCache.set(key, node);
      }
      if ((!this.isScrolling || this.scrollState) && this.shouldMeasureDuringScroll(index2)) {
        this.resizeItem(index2, this.options.measureElement(node, void 0, this));
      }
    };
    this.resizeItem = (index2, size2) => {
      var _a;
      const item = this.measurementsCache[index2];
      if (!item) return;
      const itemSize = this.itemSizeCache.get(item.key) ?? item.size;
      const delta = size2 - itemSize;
      if (delta !== 0) {
        if (((_a = this.scrollState) == null ? void 0 : _a.behavior) !== "smooth" && (this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(item, delta, this) : item.start < this.getScrollOffset() + this.scrollAdjustments)) {
          if (this.options.debug) {
            console.info("correction", delta);
          }
          this._scrollToOffset(this.getScrollOffset(), {
            adjustments: this.scrollAdjustments += delta,
            behavior: void 0
          });
        }
        this.pendingMeasuredCacheIndexes.push(item.index);
        this.itemSizeCache = new Map(this.itemSizeCache.set(item.key, size2));
        this.notify(false);
      }
    };
    this.getVirtualItems = memo(
      () => [this.getVirtualIndexes(), this.getMeasurements()],
      (indexes, measurements) => {
        const virtualItems = [];
        for (let k14 = 0, len = indexes.length; k14 < len; k14++) {
          const i16 = indexes[k14];
          const measurement = measurements[i16];
          virtualItems.push(measurement);
        }
        return virtualItems;
      },
      {
        key: "getVirtualItems",
        debug: () => this.options.debug
      }
    );
    this.getVirtualItemForOffset = (offset2) => {
      const measurements = this.getMeasurements();
      if (measurements.length === 0) {
        return void 0;
      }
      return notUndefined(
        measurements[findNearestBinarySearch(
          0,
          measurements.length - 1,
          (index2) => notUndefined(measurements[index2]).start,
          offset2
        )]
      );
    };
    this.getMaxScrollOffset = () => {
      if (!this.scrollElement) return 0;
      if ("scrollHeight" in this.scrollElement) {
        return this.options.horizontal ? this.scrollElement.scrollWidth - this.scrollElement.clientWidth : this.scrollElement.scrollHeight - this.scrollElement.clientHeight;
      } else {
        const doc = this.scrollElement.document.documentElement;
        return this.options.horizontal ? doc.scrollWidth - this.scrollElement.innerWidth : doc.scrollHeight - this.scrollElement.innerHeight;
      }
    };
    this.getOffsetForAlignment = (toOffset, align, itemSize = 0) => {
      if (!this.scrollElement) return 0;
      const size2 = this.getSize();
      const scrollOffset = this.getScrollOffset();
      if (align === "auto") {
        align = toOffset >= scrollOffset + size2 ? "end" : "start";
      }
      if (align === "center") {
        toOffset += (itemSize - size2) / 2;
      } else if (align === "end") {
        toOffset -= size2;
      }
      const maxOffset = this.getMaxScrollOffset();
      return Math.max(Math.min(maxOffset, toOffset), 0);
    };
    this.getOffsetForIndex = (index2, align = "auto") => {
      index2 = Math.max(0, Math.min(index2, this.options.count - 1));
      const size2 = this.getSize();
      const scrollOffset = this.getScrollOffset();
      const item = this.measurementsCache[index2];
      if (!item) return;
      if (align === "auto") {
        if (item.end >= scrollOffset + size2 - this.options.scrollPaddingEnd) {
          align = "end";
        } else if (item.start <= scrollOffset + this.options.scrollPaddingStart) {
          align = "start";
        } else {
          return [scrollOffset, align];
        }
      }
      if (align === "end" && index2 === this.options.count - 1) {
        return [this.getMaxScrollOffset(), align];
      }
      const toOffset = align === "end" ? item.end + this.options.scrollPaddingEnd : item.start - this.options.scrollPaddingStart;
      return [
        this.getOffsetForAlignment(toOffset, align, item.size),
        align
      ];
    };
    this.scrollToOffset = (toOffset, { align = "start", behavior = "auto" } = {}) => {
      const offset2 = this.getOffsetForAlignment(toOffset, align);
      const now = this.now();
      this.scrollState = {
        index: null,
        align,
        behavior,
        startedAt: now,
        lastTargetOffset: offset2,
        stableFrames: 0
      };
      this._scrollToOffset(offset2, { adjustments: void 0, behavior });
      this.scheduleScrollReconcile();
    };
    this.scrollToIndex = (index2, {
      align: initialAlign = "auto",
      behavior = "auto"
    } = {}) => {
      index2 = Math.max(0, Math.min(index2, this.options.count - 1));
      const offsetInfo = this.getOffsetForIndex(index2, initialAlign);
      if (!offsetInfo) {
        return;
      }
      const [offset2, align] = offsetInfo;
      const now = this.now();
      this.scrollState = {
        index: index2,
        align,
        behavior,
        startedAt: now,
        lastTargetOffset: offset2,
        stableFrames: 0
      };
      this._scrollToOffset(offset2, { adjustments: void 0, behavior });
      this.scheduleScrollReconcile();
    };
    this.scrollBy = (delta, { behavior = "auto" } = {}) => {
      const offset2 = this.getScrollOffset() + delta;
      const now = this.now();
      this.scrollState = {
        index: null,
        align: "start",
        behavior,
        startedAt: now,
        lastTargetOffset: offset2,
        stableFrames: 0
      };
      this._scrollToOffset(offset2, { adjustments: void 0, behavior });
      this.scheduleScrollReconcile();
    };
    this.getTotalSize = () => {
      var _a;
      const measurements = this.getMeasurements();
      let end;
      if (measurements.length === 0) {
        end = this.options.paddingStart;
      } else if (this.options.lanes === 1) {
        end = ((_a = measurements[measurements.length - 1]) == null ? void 0 : _a.end) ?? 0;
      } else {
        const endByLane = Array(this.options.lanes).fill(null);
        let endIndex = measurements.length - 1;
        while (endIndex >= 0 && endByLane.some((val) => val === null)) {
          const item = measurements[endIndex];
          if (endByLane[item.lane] === null) {
            endByLane[item.lane] = item.end;
          }
          endIndex--;
        }
        end = Math.max(...endByLane.filter((val) => val !== null));
      }
      return Math.max(
        end - this.options.scrollMargin + this.options.paddingEnd,
        0
      );
    };
    this._scrollToOffset = (offset2, {
      adjustments,
      behavior
    }) => {
      this.options.scrollToFn(offset2, { behavior, adjustments }, this);
    };
    this.measure = () => {
      this.itemSizeCache = /* @__PURE__ */ new Map();
      this.laneAssignments = /* @__PURE__ */ new Map();
      this.notify(false);
    };
    this.setOptions(opts);
  }
  scheduleScrollReconcile() {
    if (!this.targetWindow) {
      this.scrollState = null;
      return;
    }
    if (this.rafId != null) return;
    this.rafId = this.targetWindow.requestAnimationFrame(() => {
      this.rafId = null;
      this.reconcileScroll();
    });
  }
  reconcileScroll() {
    if (!this.scrollState) return;
    const el = this.scrollElement;
    if (!el) return;
    const MAX_RECONCILE_MS = 5e3;
    if (this.now() - this.scrollState.startedAt > MAX_RECONCILE_MS) {
      this.scrollState = null;
      return;
    }
    const offsetInfo = this.scrollState.index != null ? this.getOffsetForIndex(this.scrollState.index, this.scrollState.align) : void 0;
    const targetOffset = offsetInfo ? offsetInfo[0] : this.scrollState.lastTargetOffset;
    const STABLE_FRAMES = 1;
    const targetChanged = targetOffset !== this.scrollState.lastTargetOffset;
    if (!targetChanged && approxEqual(targetOffset, this.getScrollOffset())) {
      this.scrollState.stableFrames++;
      if (this.scrollState.stableFrames >= STABLE_FRAMES) {
        this.scrollState = null;
        return;
      }
    } else {
      this.scrollState.stableFrames = 0;
      if (targetChanged) {
        this.scrollState.lastTargetOffset = targetOffset;
        this.scrollState.behavior = "auto";
        this._scrollToOffset(targetOffset, {
          adjustments: void 0,
          behavior: "auto"
        });
      }
    }
    this.scheduleScrollReconcile();
  }
};
var findNearestBinarySearch = (low, high, getCurrentValue, value) => {
  while (low <= high) {
    const middle = (low + high) / 2 | 0;
    const currentValue = getCurrentValue(middle);
    if (currentValue < value) {
      low = middle + 1;
    } else if (currentValue > value) {
      high = middle - 1;
    } else {
      return middle;
    }
  }
  if (low > 0) {
    return low - 1;
  } else {
    return 0;
  }
};
function calculateRange({
  measurements,
  outerSize,
  scrollOffset,
  lanes
}) {
  const lastIndex = measurements.length - 1;
  const getOffset = (index2) => measurements[index2].start;
  if (measurements.length <= lanes) {
    return {
      startIndex: 0,
      endIndex: lastIndex
    };
  }
  let startIndex = findNearestBinarySearch(
    0,
    lastIndex,
    getOffset,
    scrollOffset
  );
  let endIndex = startIndex;
  if (lanes === 1) {
    while (endIndex < lastIndex && measurements[endIndex].end < scrollOffset + outerSize) {
      endIndex++;
    }
  } else if (lanes > 1) {
    const endPerLane = Array(lanes).fill(0);
    while (endIndex < lastIndex && endPerLane.some((pos) => pos < scrollOffset + outerSize)) {
      const item = measurements[endIndex];
      endPerLane[item.lane] = item.end;
      endIndex++;
    }
    const startPerLane = Array(lanes).fill(scrollOffset + outerSize);
    while (startIndex >= 0 && startPerLane.some((pos) => pos >= scrollOffset)) {
      const item = measurements[startIndex];
      startPerLane[item.lane] = item.start;
      startIndex--;
    }
    startIndex = Math.max(0, startIndex - startIndex % lanes);
    endIndex = Math.min(lastIndex, endIndex + (lanes - 1 - endIndex % lanes));
  }
  return { startIndex, endIndex };
}

// node_modules/@tanstack/react-virtual/dist/esm/index.js
var useIsomorphicLayoutEffect = typeof document !== "undefined" ? React.useLayoutEffect : React.useEffect;
function useVirtualizerBase({
  useFlushSync = true,
  ...options
}) {
  const rerender = React.useReducer(() => ({}), {})[1];
  const resolvedOptions = {
    ...options,
    onChange: (instance2, sync) => {
      var _a;
      if (useFlushSync && sync) {
        (0, import_react_dom4.flushSync)(rerender);
      } else {
        rerender();
      }
      (_a = options.onChange) == null ? void 0 : _a.call(options, instance2, sync);
    }
  };
  const [instance] = React.useState(
    () => new Virtualizer(resolvedOptions)
  );
  instance.setOptions(resolvedOptions);
  useIsomorphicLayoutEffect(() => {
    return instance._didMount();
  }, []);
  useIsomorphicLayoutEffect(() => {
    return instance._willUpdate();
  });
  return instance;
}
function useVirtualizer(options) {
  return useVirtualizerBase({
    observeElementRect,
    observeElementOffset,
    scrollToFn: elementScroll,
    ...options
  });
}

// node_modules/@headlessui/react/dist/components/combobox/combobox.js
var import_react77 = __toESM(require_react(), 1);
var import_react_dom8 = __toESM(require_react_dom(), 1);

// node_modules/@headlessui/react/dist/hooks/use-by-comparator.js
var import_react49 = __toESM(require_react(), 1);
function l8(e9, r21) {
  return e9 !== null && r21 !== null && typeof e9 == "object" && typeof r21 == "object" && "id" in e9 && "id" in r21 ? e9.id === r21.id : e9 === r21;
}
function u9(e9 = l8) {
  return (0, import_react49.useCallback)((r21, t14) => {
    if (typeof e9 == "string") {
      let o19 = e9;
      return (r21 == null ? void 0 : r21[o19]) === (t14 == null ? void 0 : t14[o19]);
    }
    return e9(r21, t14);
  }, [e9]);
}

// node_modules/@headlessui/react/dist/hooks/use-element-size.js
var import_react50 = __toESM(require_react(), 1);
function h3(i16) {
  if (i16 === null) return { width: 0, height: 0 };
  let { width: t14, height: e9 } = i16.getBoundingClientRect();
  return { width: t14, height: e9 };
}
function w5(i16, t14, e9 = false) {
  let [r21, f22] = (0, import_react50.useState)(() => h3(t14));
  return n(() => {
    if (!t14 || !i16) return;
    let n17 = o2();
    return n17.requestAnimationFrame(function s21() {
      n17.requestAnimationFrame(s21), f22((u25) => {
        let o19 = h3(t14);
        return o19.width === u25.width && o19.height === u25.height ? u25 : o19;
      });
    }), () => {
      n17.dispose();
    };
  }, [t14, i16]), e9 ? { width: `${r21.width}px`, height: `${r21.height}px` } : r21;
}

// node_modules/@headlessui/react/dist/hooks/use-handle-toggle.js
var import_react51 = __toESM(require_react(), 1);

// node_modules/@headlessui/react/dist/components/mouse.js
var g3 = ((f22) => (f22[f22.Left = 0] = "Left", f22[f22.Right = 2] = "Right", f22))(g3 || {});

// node_modules/@headlessui/react/dist/hooks/use-handle-toggle.js
function s8(t14) {
  let r21 = (0, import_react51.useRef)(null), u25 = o4((e9) => {
    r21.current = e9.pointerType, !s6(e9.currentTarget) && e9.pointerType === "mouse" && e9.button === g3.Left && (e9.preventDefault(), t14(e9));
  }), i16 = o4((e9) => {
    r21.current !== "mouse" && (s6(e9.currentTarget) || t14(e9));
  });
  return { onPointerDown: u25, onClick: i16 };
}

// node_modules/@headlessui/react/dist/hooks/use-is-top-layer.js
var import_react52 = __toESM(require_react(), 1);

// node_modules/@headlessui/react/dist/utils/default-map.js
var a8 = class extends Map {
  constructor(t14) {
    super();
    this.factory = t14;
  }
  get(t14) {
    let e9 = super.get(t14);
    return e9 === void 0 && (e9 = this.factory(t14), this.set(t14, e9)), e9;
  }
};

// node_modules/@headlessui/react/dist/machine.js
var h4 = Object.defineProperty;
var v4 = (t14, e9, r21) => e9 in t14 ? h4(t14, e9, { enumerable: true, configurable: true, writable: true, value: r21 }) : t14[e9] = r21;
var S2 = (t14, e9, r21) => (v4(t14, typeof e9 != "symbol" ? e9 + "" : e9, r21), r21);
var b3 = (t14, e9, r21) => {
  if (!e9.has(t14)) throw TypeError("Cannot " + r21);
};
var i7 = (t14, e9, r21) => (b3(t14, e9, "read from private field"), r21 ? r21.call(t14) : e9.get(t14));
var c4 = (t14, e9, r21) => {
  if (e9.has(t14)) throw TypeError("Cannot add the same private member more than once");
  e9 instanceof WeakSet ? e9.add(t14) : e9.set(t14, r21);
};
var u10 = (t14, e9, r21, s21) => (b3(t14, e9, "write to private field"), s21 ? s21.call(t14, r21) : e9.set(t14, r21), r21);
var n9;
var a9;
var o9;
var T3 = class {
  constructor(e9) {
    c4(this, n9, {});
    c4(this, a9, new a8(() => /* @__PURE__ */ new Set()));
    c4(this, o9, /* @__PURE__ */ new Set());
    S2(this, "disposables", o2());
    u10(this, n9, e9), s.isServer && this.disposables.microTask(() => {
      this.dispose();
    });
  }
  dispose() {
    this.disposables.dispose();
  }
  get state() {
    return i7(this, n9);
  }
  subscribe(e9, r21) {
    if (s.isServer) return () => {
    };
    let s21 = { selector: e9, callback: r21, current: e9(i7(this, n9)) };
    return i7(this, o9).add(s21), this.disposables.add(() => {
      i7(this, o9).delete(s21);
    });
  }
  on(e9, r21) {
    return s.isServer ? () => {
    } : (i7(this, a9).get(e9).add(r21), this.disposables.add(() => {
      i7(this, a9).get(e9).delete(r21);
    }));
  }
  send(e9) {
    let r21 = this.reduce(i7(this, n9), e9);
    if (r21 !== i7(this, n9)) {
      u10(this, n9, r21);
      for (let s21 of i7(this, o9)) {
        let l19 = s21.selector(i7(this, n9));
        j4(s21.current, l19) || (s21.current = l19, s21.callback(l19));
      }
      for (let s21 of i7(this, a9).get(e9.type)) s21(i7(this, n9), e9);
    }
  }
};
n9 = /* @__PURE__ */ new WeakMap(), a9 = /* @__PURE__ */ new WeakMap(), o9 = /* @__PURE__ */ new WeakMap();
function j4(t14, e9) {
  return Object.is(t14, e9) ? true : typeof t14 != "object" || t14 === null || typeof e9 != "object" || e9 === null ? false : Array.isArray(t14) && Array.isArray(e9) ? t14.length !== e9.length ? false : f8(t14[Symbol.iterator](), e9[Symbol.iterator]()) : t14 instanceof Map && e9 instanceof Map || t14 instanceof Set && e9 instanceof Set ? t14.size !== e9.size ? false : f8(t14.entries(), e9.entries()) : p3(t14) && p3(e9) ? f8(Object.entries(t14)[Symbol.iterator](), Object.entries(e9)[Symbol.iterator]()) : false;
}
function f8(t14, e9) {
  do {
    let r21 = t14.next(), s21 = e9.next();
    if (r21.done && s21.done) return true;
    if (r21.done || s21.done || !Object.is(r21.value, s21.value)) return false;
  } while (true);
}
function p3(t14) {
  if (Object.prototype.toString.call(t14) !== "[object Object]") return false;
  let e9 = Object.getPrototypeOf(t14);
  return e9 === null || Object.getPrototypeOf(e9) === null;
}
function k3(t14) {
  let [e9, r21] = t14(), s21 = o2();
  return (...l19) => {
    e9(...l19), s21.dispose(), s21.microTask(r21);
  };
}

// node_modules/@headlessui/react/dist/machines/stack-machine.js
var a10 = Object.defineProperty;
var r9 = (e9, c21, t14) => c21 in e9 ? a10(e9, c21, { enumerable: true, configurable: true, writable: true, value: t14 }) : e9[c21] = t14;
var p4 = (e9, c21, t14) => (r9(e9, typeof c21 != "symbol" ? c21 + "" : c21, t14), t14);
var k4 = ((t14) => (t14[t14.Push = 0] = "Push", t14[t14.Pop = 1] = "Pop", t14))(k4 || {});
var y3 = { [0](e9, c21) {
  let t14 = c21.id, s21 = e9.stack, i16 = e9.stack.indexOf(t14);
  if (i16 !== -1) {
    let n17 = e9.stack.slice();
    return n17.splice(i16, 1), n17.push(t14), s21 = n17, { ...e9, stack: s21 };
  }
  return { ...e9, stack: [...e9.stack, t14] };
}, [1](e9, c21) {
  let t14 = c21.id, s21 = e9.stack.indexOf(t14);
  if (s21 === -1) return e9;
  let i16 = e9.stack.slice();
  return i16.splice(s21, 1), { ...e9, stack: i16 };
} };
var o10 = class _o2 extends T3 {
  constructor() {
    super(...arguments);
    p4(this, "actions", { push: (t14) => this.send({ type: 0, id: t14 }), pop: (t14) => this.send({ type: 1, id: t14 }) });
    p4(this, "selectors", { isTop: (t14, s21) => t14.stack[t14.stack.length - 1] === s21, inStack: (t14, s21) => t14.stack.includes(s21) });
  }
  static new() {
    return new _o2({ stack: [] });
  }
  reduce(t14, s21) {
    return u(s21.type, y3, t14, s21);
  }
};
var x2 = new a8(() => o10.new());

// node_modules/@headlessui/react/dist/react-glue.js
var import_with_selector = __toESM(require_with_selector(), 1);
function S3(e9, n17, r21 = j4) {
  return (0, import_with_selector.useSyncExternalStoreWithSelector)(o4((i16) => e9.subscribe(s9, i16)), o4(() => e9.state), o4(() => e9.state), o4(n17), r21);
}
function s9(e9) {
  return e9;
}

// node_modules/@headlessui/react/dist/hooks/use-is-top-layer.js
function I3(o19, s21) {
  let t14 = (0, import_react52.useId)(), r21 = x2.get(s21), [i16, c21] = S3(r21, (0, import_react52.useCallback)((e9) => [r21.selectors.isTop(e9, t14), r21.selectors.inStack(e9, t14)], [r21, t14]));
  return n(() => {
    if (o19) return r21.actions.push(t14), () => r21.actions.pop(t14);
  }, [r21, o19, t14]), o19 ? c21 ? i16 : true : false;
}

// node_modules/@headlessui/react/dist/hooks/use-inert-others.js
var f9 = /* @__PURE__ */ new Map();
var u12 = /* @__PURE__ */ new Map();
function h5(t14) {
  var e9;
  let r21 = (e9 = u12.get(t14)) != null ? e9 : 0;
  return u12.set(t14, r21 + 1), r21 !== 0 ? () => m6(t14) : (f9.set(t14, { "aria-hidden": t14.getAttribute("aria-hidden"), inert: t14.inert }), t14.setAttribute("aria-hidden", "true"), t14.inert = true, () => m6(t14));
}
function m6(t14) {
  var i16;
  let r21 = (i16 = u12.get(t14)) != null ? i16 : 1;
  if (r21 === 1 ? u12.delete(t14) : u12.set(t14, r21 - 1), r21 !== 1) return;
  let e9 = f9.get(t14);
  e9 && (e9["aria-hidden"] === null ? t14.removeAttribute("aria-hidden") : t14.setAttribute("aria-hidden", e9["aria-hidden"]), t14.inert = e9.inert, f9.delete(t14));
}
function y4(t14, { allowed: r21, disallowed: e9 } = {}) {
  let i16 = I3(t14, "inert-others");
  n(() => {
    var d14, c21;
    if (!i16) return;
    let a28 = o2();
    for (let n17 of (d14 = e9 == null ? void 0 : e9()) != null ? d14 : []) n17 && a28.add(h5(n17));
    let s21 = (c21 = r21 == null ? void 0 : r21()) != null ? c21 : [];
    for (let n17 of s21) {
      if (!n17) continue;
      let l19 = l(n17);
      if (!l19) continue;
      let o19 = n17.parentElement;
      for (; o19 && o19 !== l19.body; ) {
        for (let p13 of o19.children) s21.some((E13) => p13.contains(E13)) || a28.add(h5(p13));
        o19 = o19.parentElement;
      }
    }
    return a28.dispose;
  }, [i16, r21, e9]);
}

// node_modules/@headlessui/react/dist/hooks/use-on-disappear.js
var import_react53 = __toESM(require_react(), 1);
function p5(s21, n17, o19) {
  let i16 = s3((t14) => {
    let e9 = t14.getBoundingClientRect();
    e9.x === 0 && e9.y === 0 && e9.width === 0 && e9.height === 0 && o19();
  });
  (0, import_react53.useEffect)(() => {
    if (!s21) return;
    let t14 = n17 === null ? null : n5(n17) ? n17 : n17.current;
    if (!t14) return;
    let e9 = o2();
    if (typeof ResizeObserver != "undefined") {
      let r21 = new ResizeObserver(() => i16.current(t14));
      r21.observe(t14), e9.add(() => r21.disconnect());
    }
    if (typeof IntersectionObserver != "undefined") {
      let r21 = new IntersectionObserver(() => i16.current(t14));
      r21.observe(t14), e9.add(() => r21.disconnect());
    }
    return () => e9.dispose();
  }, [n17, i16, s21]);
}

// node_modules/@headlessui/react/dist/hooks/use-outside-click.js
var import_react56 = __toESM(require_react(), 1);

// node_modules/@headlessui/react/dist/utils/focus-management.js
var E5 = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "details>summary", "textarea:not([disabled])"].map((e9) => `${e9}:not([tabindex='-1'])`).join(",");
var S4 = ["[data-autofocus]"].map((e9) => `${e9}:not([tabindex='-1'])`).join(",");
var T4 = ((o19) => (o19[o19.First = 1] = "First", o19[o19.Previous = 2] = "Previous", o19[o19.Next = 4] = "Next", o19[o19.Last = 8] = "Last", o19[o19.WrapAround = 16] = "WrapAround", o19[o19.NoScroll = 32] = "NoScroll", o19[o19.AutoFocus = 64] = "AutoFocus", o19))(T4 || {});
var A2 = ((n17) => (n17[n17.Error = 0] = "Error", n17[n17.Overflow = 1] = "Overflow", n17[n17.Success = 2] = "Success", n17[n17.Underflow = 3] = "Underflow", n17))(A2 || {});
var O2 = ((t14) => (t14[t14.Previous = -1] = "Previous", t14[t14.Next = 1] = "Next", t14))(O2 || {});
function x3(e9 = document.body) {
  return e9 == null ? [] : Array.from(e9.querySelectorAll(E5)).sort((r21, t14) => Math.sign((r21.tabIndex || Number.MAX_SAFE_INTEGER) - (t14.tabIndex || Number.MAX_SAFE_INTEGER)));
}
function h6(e9 = document.body) {
  return e9 == null ? [] : Array.from(e9.querySelectorAll(S4)).sort((r21, t14) => Math.sign((r21.tabIndex || Number.MAX_SAFE_INTEGER) - (t14.tabIndex || Number.MAX_SAFE_INTEGER)));
}
var I4 = ((t14) => (t14[t14.Strict = 0] = "Strict", t14[t14.Loose = 1] = "Loose", t14))(I4 || {});
function H4(e9, r21 = 0) {
  var t14;
  return e9 === ((t14 = l(e9)) == null ? void 0 : t14.body) ? false : u(r21, { [0]() {
    return e9.matches(E5);
  }, [1]() {
    let l19 = e9;
    for (; l19 !== null; ) {
      if (l19.matches(E5)) return true;
      l19 = l19.parentElement;
    }
    return false;
  } });
}
function K2(e9) {
  o2().nextFrame(() => {
    let r21 = e(e9);
    r21 && i4(r21) && !H4(r21, 0) && w6(e9);
  });
}
var g4 = ((t14) => (t14[t14.Keyboard = 0] = "Keyboard", t14[t14.Mouse = 1] = "Mouse", t14))(g4 || {});
typeof window != "undefined" && typeof document != "undefined" && (document.addEventListener("keydown", (e9) => {
  e9.metaKey || e9.altKey || e9.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = "");
}, true), document.addEventListener("click", (e9) => {
  e9.detail === 1 ? delete document.documentElement.dataset.headlessuiFocusVisible : e9.detail === 0 && (document.documentElement.dataset.headlessuiFocusVisible = "");
}, true));
function w6(e9) {
  e9 == null || e9.focus({ preventScroll: true });
}
var _2 = ["textarea", "input"].join(",");
function P3(e9) {
  var r21, t14;
  return (t14 = (r21 = e9 == null ? void 0 : e9.matches) == null ? void 0 : r21.call(e9, _2)) != null ? t14 : false;
}
function G2(e9, r21 = (t14) => t14) {
  return e9.slice().sort((t14, l19) => {
    let n17 = r21(t14), a28 = r21(l19);
    if (n17 === null || a28 === null) return 0;
    let u25 = n17.compareDocumentPosition(a28);
    return u25 & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : u25 & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
  });
}
function R3(e9, r21, t14 = e9 === null ? document.body : r2(e9)) {
  return v5(x3(t14), r21, { relativeTo: e9 });
}
function v5(e9, r21, { sorted: t14 = true, relativeTo: l19 = null, skipElements: n17 = [] } = {}) {
  let a28 = Array.isArray(e9) ? e9.length > 0 ? r2(e9[0]) : document : r2(e9), u25 = Array.isArray(e9) ? t14 ? G2(e9) : e9 : r21 & 64 ? h6(e9) : x3(e9);
  n17.length > 0 && u25.length > 1 && (u25 = u25.filter((i16) => !n17.some((d14) => d14 != null && "current" in d14 ? (d14 == null ? void 0 : d14.current) === i16 : d14 === i16))), l19 = l19 != null ? l19 : a28 == null ? void 0 : a28.activeElement;
  let o19 = (() => {
    if (r21 & 5) return 1;
    if (r21 & 10) return -1;
    throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
  })(), M11 = (() => {
    if (r21 & 1) return 0;
    if (r21 & 2) return Math.max(0, u25.indexOf(l19)) - 1;
    if (r21 & 4) return Math.max(0, u25.indexOf(l19)) + 1;
    if (r21 & 8) return u25.length - 1;
    throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
  })(), N4 = r21 & 32 ? { preventScroll: true } : {}, m10 = 0, c21 = u25.length, s21;
  do {
    if (m10 >= c21 || m10 + c21 <= 0) return 0;
    let i16 = M11 + m10;
    if (r21 & 16) i16 = (i16 + c21) % c21;
    else {
      if (i16 < 0) return 3;
      if (i16 >= c21) return 1;
    }
    s21 = u25[i16], s21 == null || s21.focus(N4), m10 += o19;
  } while (s21 !== e(s21));
  return r21 & 6 && P3(s21) && s21.select(), 2;
}

// node_modules/@headlessui/react/dist/utils/platform.js
function t6() {
  return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
}
function i8() {
  return /Android/gi.test(window.navigator.userAgent);
}
function n11() {
  return t6() || i8();
}

// node_modules/@headlessui/react/dist/hooks/use-document-event.js
var import_react54 = __toESM(require_react(), 1);
function i9(t14, e9, o19, n17) {
  let u25 = s3(o19);
  (0, import_react54.useEffect)(() => {
    if (!t14) return;
    function r21(m10) {
      u25.current(m10);
    }
    return document.addEventListener(e9, r21, n17), () => document.removeEventListener(e9, r21, n17);
  }, [t14, e9, n17]);
}

// node_modules/@headlessui/react/dist/hooks/use-window-event.js
var import_react55 = __toESM(require_react(), 1);
function s10(t14, e9, o19, n17) {
  let i16 = s3(o19);
  (0, import_react55.useEffect)(() => {
    if (!t14) return;
    function r21(d14) {
      i16.current(d14);
    }
    return window.addEventListener(e9, r21, n17), () => window.removeEventListener(e9, r21, n17);
  }, [t14, e9, n17]);
}

// node_modules/@headlessui/react/dist/hooks/use-outside-click.js
var C6 = 30;
function k5(o19, f22, h15) {
  let m10 = s3(h15), s21 = (0, import_react56.useCallback)(function(e9, c21) {
    if (e9.defaultPrevented) return;
    let r21 = c21(e9);
    if (r21 === null || !r21.getRootNode().contains(r21) || !r21.isConnected) return;
    let M11 = (function u25(n17) {
      return typeof n17 == "function" ? u25(n17()) : Array.isArray(n17) || n17 instanceof Set ? n17 : [n17];
    })(f22);
    for (let u25 of M11) if (u25 !== null && (u25.contains(r21) || e9.composed && e9.composedPath().includes(u25))) return;
    return !H4(r21, I4.Loose) && r21.tabIndex !== -1 && e9.preventDefault(), m10.current(e9, r21);
  }, [m10, f22]), i16 = (0, import_react56.useRef)(null);
  i9(o19, "pointerdown", (t14) => {
    var e9, c21;
    n11() || (i16.current = ((c21 = (e9 = t14.composedPath) == null ? void 0 : e9.call(t14)) == null ? void 0 : c21[0]) || t14.target);
  }, true), i9(o19, "pointerup", (t14) => {
    if (n11() || !i16.current) return;
    let e9 = i16.current;
    return i16.current = null, s21(t14, () => e9);
  }, true);
  let l19 = (0, import_react56.useRef)({ x: 0, y: 0 });
  i9(o19, "touchstart", (t14) => {
    l19.current.x = t14.touches[0].clientX, l19.current.y = t14.touches[0].clientY;
  }, true), i9(o19, "touchend", (t14) => {
    let e9 = { x: t14.changedTouches[0].clientX, y: t14.changedTouches[0].clientY };
    if (!(Math.abs(e9.x - l19.current.x) >= C6 || Math.abs(e9.y - l19.current.y) >= C6)) return s21(t14, () => i4(t14.target) ? t14.target : null);
  }, true), s10(o19, "blur", (t14) => s21(t14, () => u5(window.document.activeElement) ? window.document.activeElement : null), true);
}

// node_modules/@headlessui/react/dist/hooks/use-owner.js
var import_react57 = __toESM(require_react(), 1);
function u13(...e9) {
  return (0, import_react57.useMemo)(() => l(...e9), [...e9]);
}
function c6(...e9) {
  return (0, import_react57.useMemo)(() => r2(...e9), [...e9]);
}

// node_modules/@headlessui/react/dist/hooks/use-quick-release.js
var import_react58 = __toESM(require_react(), 1);
var H5 = ((e9) => (e9[e9.Ignore = 0] = "Ignore", e9[e9.Select = 1] = "Select", e9[e9.Close = 2] = "Close", e9))(H5 || {});
var S5 = { Ignore: { kind: 0 }, Select: (r21) => ({ kind: 1, target: r21 }), Close: { kind: 2 } };
var M3 = 200;
var f10 = 5;
function L5(r21, { trigger: n17, action: T10, close: e9, select: p13 }) {
  let l19 = (0, import_react58.useRef)(null), i16 = (0, import_react58.useRef)(null), u25 = (0, import_react58.useRef)(null);
  i9(r21 && n17 !== null, "pointerdown", (t14) => {
    o7(t14 == null ? void 0 : t14.target) && n17 != null && n17.contains(t14.target) && (i16.current = t14.x, u25.current = t14.y, l19.current = t14.timeStamp);
  }), i9(r21 && n17 !== null, "pointerup", (t14) => {
    var s21, m10;
    let c21 = l19.current;
    if (c21 === null || (l19.current = null, !i4(t14.target)) || Math.abs(t14.x - ((s21 = i16.current) != null ? s21 : t14.x)) < f10 && Math.abs(t14.y - ((m10 = u25.current) != null ? m10 : t14.y)) < f10) return;
    let a28 = T10(t14);
    switch (a28.kind) {
      case 0:
        return;
      case 1: {
        t14.timeStamp - c21 > M3 && (p13(a28.target), e9());
        break;
      }
      case 2: {
        e9();
        break;
      }
    }
  }, { capture: true });
}

// node_modules/@headlessui/react/dist/hooks/use-refocusable-input.js
var import_react60 = __toESM(require_react(), 1);

// node_modules/@headlessui/react/dist/hooks/use-event-listener.js
var import_react59 = __toESM(require_react(), 1);
function E7(n17, e9, a28, t14) {
  let i16 = s3(a28);
  (0, import_react59.useEffect)(() => {
    n17 = n17 != null ? n17 : window;
    function r21(o19) {
      i16.current(o19);
    }
    return n17.addEventListener(e9, r21, t14), () => n17.removeEventListener(e9, r21, t14);
  }, [n17, e9, t14]);
}

// node_modules/@headlessui/react/dist/hooks/use-refocusable-input.js
function v6(e9) {
  let l19 = (0, import_react60.useRef)({ value: "", selectionStart: null, selectionEnd: null });
  return E7(e9, "blur", (n17) => {
    let t14 = n17.target;
    l5(t14) && (l19.current = { value: t14.value, selectionStart: t14.selectionStart, selectionEnd: t14.selectionEnd });
  }), o4(() => {
    if (!d2(e9) && l5(e9) && e9.isConnected) {
      if (e9.focus({ preventScroll: true }), e9.value !== l19.current.value) e9.setSelectionRange(e9.value.length, e9.value.length);
      else {
        let { selectionStart: n17, selectionEnd: t14 } = l19.current;
        n17 !== null && t14 !== null && e9.setSelectionRange(n17, t14);
      }
      l19.current = { value: "", selectionStart: null, selectionEnd: null };
    }
  });
}

// node_modules/@headlessui/react/dist/hooks/use-resolve-button-type.js
var import_react61 = __toESM(require_react(), 1);
function e5(t14, u25) {
  return (0, import_react61.useMemo)(() => {
    var n17;
    if (t14.type) return t14.type;
    let r21 = (n17 = t14.as) != null ? n17 : "button";
    if (typeof r21 == "string" && r21.toLowerCase() === "button" || (u25 == null ? void 0 : u25.tagName) === "BUTTON" && !u25.hasAttribute("type")) return "button";
  }, [t14.type, t14.as, u25]);
}

// node_modules/@headlessui/react/dist/hooks/use-store.js
var import_react62 = __toESM(require_react(), 1);
function o13(t14) {
  return (0, import_react62.useSyncExternalStore)(t14.subscribe, t14.getSnapshot, t14.getSnapshot);
}

// node_modules/@headlessui/react/dist/utils/store.js
function a14(o19, r21) {
  let t14 = o19(), n17 = /* @__PURE__ */ new Set();
  return { getSnapshot() {
    return t14;
  }, subscribe(e9) {
    return n17.add(e9), () => n17.delete(e9);
  }, dispatch(e9, ...s21) {
    let i16 = r21[e9].call(t14, ...s21);
    i16 && (t14 = i16, n17.forEach((c21) => c21()));
  } };
}

// node_modules/@headlessui/react/dist/hooks/document-overflow/adjust-scrollbar-padding.js
function d6() {
  let r21;
  return { before({ doc: e9 }) {
    var l19;
    let o19 = e9.documentElement, t14 = (l19 = e9.defaultView) != null ? l19 : window;
    r21 = Math.max(0, t14.innerWidth - o19.clientWidth);
  }, after({ doc: e9, d: o19 }) {
    let t14 = e9.documentElement, l19 = Math.max(0, t14.clientWidth - t14.offsetWidth), n17 = Math.max(0, r21 - l19);
    o19.style(t14, "paddingRight", `${n17}px`);
  } };
}

// node_modules/@headlessui/react/dist/hooks/document-overflow/handle-ios-locking.js
function w7() {
  return t6() ? { before({ doc: o19, d: r21, meta: m10 }) {
    function a28(s21) {
      for (let l19 of m10().containers) for (let c21 of l19()) if (c21.contains(s21)) return true;
      return false;
    }
    r21.microTask(() => {
      var c21;
      if (window.getComputedStyle(o19.documentElement).scrollBehavior !== "auto") {
        let t14 = o2();
        t14.style(o19.documentElement, "scrollBehavior", "auto"), r21.add(() => r21.microTask(() => t14.dispose()));
      }
      let s21 = (c21 = window.scrollY) != null ? c21 : window.pageYOffset, l19 = null;
      r21.addEventListener(o19, "click", (t14) => {
        if (i4(t14.target)) try {
          let e9 = t14.target.closest("a");
          if (!e9) return;
          let { hash: n17 } = new URL(e9.href), f22 = o19.querySelector(n17);
          i4(f22) && !a28(f22) && (l19 = f22);
        } catch {
        }
      }, true), r21.group((t14) => {
        r21.addEventListener(o19, "touchstart", (e9) => {
          if (t14.dispose(), i4(e9.target) && r6(e9.target)) if (a28(e9.target)) {
            let n17 = e9.target;
            for (; n17.parentElement && a28(n17.parentElement); ) n17 = n17.parentElement;
            t14.style(n17, "overscrollBehavior", "contain");
          } else t14.style(e9.target, "touchAction", "none");
        });
      }), r21.addEventListener(o19, "touchmove", (t14) => {
        if (i4(t14.target)) {
          if (l5(t14.target)) return;
          if (a28(t14.target)) {
            let e9 = t14.target;
            for (; e9.parentElement && e9.dataset.headlessuiPortal !== "" && !(e9.scrollHeight > e9.clientHeight || e9.scrollWidth > e9.clientWidth); ) e9 = e9.parentElement;
            e9.dataset.headlessuiPortal === "" && t14.preventDefault();
          } else t14.preventDefault();
        }
      }, { passive: false }), r21.add(() => {
        var e9;
        let t14 = (e9 = window.scrollY) != null ? e9 : window.pageYOffset;
        s21 !== t14 && window.scrollTo(0, s21), l19 && l19.isConnected && (l19.scrollIntoView({ block: "nearest" }), l19 = null);
      });
    });
  } } : {};
}

// node_modules/@headlessui/react/dist/hooks/document-overflow/prevent-scroll.js
function r10() {
  return { before({ doc: e9, d: o19 }) {
    o19.style(e9.documentElement, "overflow", "hidden");
  } };
}

// node_modules/@headlessui/react/dist/hooks/document-overflow/overflow-store.js
function r11(e9) {
  let o19 = {};
  for (let t14 of e9) Object.assign(o19, t14(o19));
  return o19;
}
var c7 = a14(() => /* @__PURE__ */ new Map(), { PUSH(e9, o19) {
  var n17;
  let t14 = (n17 = this.get(e9)) != null ? n17 : { doc: e9, count: 0, d: o2(), meta: /* @__PURE__ */ new Set(), computedMeta: {} };
  return t14.count++, t14.meta.add(o19), t14.computedMeta = r11(t14.meta), this.set(e9, t14), this;
}, POP(e9, o19) {
  let t14 = this.get(e9);
  return t14 && (t14.count--, t14.meta.delete(o19), t14.computedMeta = r11(t14.meta)), this;
}, SCROLL_PREVENT(e9) {
  let o19 = { doc: e9.doc, d: e9.d, meta() {
    return e9.computedMeta;
  } }, t14 = [w7(), d6(), r10()];
  t14.forEach(({ before: n17 }) => n17 == null ? void 0 : n17(o19)), t14.forEach(({ after: n17 }) => n17 == null ? void 0 : n17(o19));
}, SCROLL_ALLOW({ d: e9 }) {
  e9.dispose();
}, TEARDOWN({ doc: e9 }) {
  this.delete(e9);
} });
c7.subscribe(() => {
  let e9 = c7.getSnapshot(), o19 = /* @__PURE__ */ new Map();
  for (let [t14] of e9) o19.set(t14, t14.documentElement.style.overflow);
  for (let t14 of e9.values()) {
    let n17 = o19.get(t14.doc) === "hidden", a28 = t14.count !== 0;
    (a28 && !n17 || !a28 && n17) && c7.dispatch(t14.count > 0 ? "SCROLL_PREVENT" : "SCROLL_ALLOW", t14), t14.count === 0 && c7.dispatch("TEARDOWN", t14);
  }
});

// node_modules/@headlessui/react/dist/hooks/document-overflow/use-document-overflow.js
function a15(r21, e9, n17 = () => ({ containers: [] })) {
  let f22 = o13(c7), o19 = e9 ? f22.get(e9) : void 0, i16 = o19 ? o19.count > 0 : false;
  return n(() => {
    if (!(!e9 || !r21)) return c7.dispatch("PUSH", e9, n17), () => c7.dispatch("POP", e9, n17);
  }, [r21, e9]), i16;
}

// node_modules/@headlessui/react/dist/hooks/use-scroll-lock.js
function f11(e9, c21, n17 = () => [document.body]) {
  let r21 = I3(e9, "scroll-lock");
  a15(r21, c21, (t14) => {
    var o19;
    return { containers: [...(o19 = t14.containers) != null ? o19 : [], n17] };
  });
}

// node_modules/@headlessui/react/dist/hooks/use-tracked-pointer.js
var import_react63 = __toESM(require_react(), 1);
function t7(e9) {
  return [e9.screenX, e9.screenY];
}
function u15() {
  let e9 = (0, import_react63.useRef)([-1, -1]);
  return { wasMoved(r21) {
    let n17 = t7(r21);
    return e9.current[0] === n17[0] && e9.current[1] === n17[1] ? false : (e9.current = n17, true);
  }, update(r21) {
    e9.current = t7(r21);
  } };
}

// node_modules/@headlessui/react/dist/hooks/use-transition.js
var import_react65 = __toESM(require_react(), 1);

// node_modules/@headlessui/react/dist/hooks/use-flags.js
var import_react64 = __toESM(require_react(), 1);
function c8(u25 = 0) {
  let [r21, a28] = (0, import_react64.useState)(u25), g6 = (0, import_react64.useCallback)((e9) => a28(e9), []), s21 = (0, import_react64.useCallback)((e9) => a28((l19) => l19 | e9), []), m10 = (0, import_react64.useCallback)((e9) => (r21 & e9) === e9, [r21]), n17 = (0, import_react64.useCallback)((e9) => a28((l19) => l19 & ~e9), []), F7 = (0, import_react64.useCallback)((e9) => a28((l19) => l19 ^ e9), []);
  return { flags: r21, setFlag: g6, addFlag: s21, hasFlag: m10, removeFlag: n17, toggleFlag: F7 };
}

// node_modules/@headlessui/react/dist/hooks/use-transition.js
var T6;
var S6;
typeof process != "undefined" && typeof globalThis != "undefined" && typeof Element != "undefined" && ((T6 = process == null ? void 0 : process.env) == null ? void 0 : T6["NODE_ENV"]) === "test" && typeof ((S6 = Element == null ? void 0 : Element.prototype) == null ? void 0 : S6.getAnimations) == "undefined" && (Element.prototype.getAnimations = function() {
  return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.", "Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.", "", "Example usage:", "```js", "import { mockAnimationsApi } from 'jsdom-testing-mocks'", "mockAnimationsApi()", "```"].join(`
`)), [];
});
var A3 = ((i16) => (i16[i16.None = 0] = "None", i16[i16.Closed = 1] = "Closed", i16[i16.Enter = 2] = "Enter", i16[i16.Leave = 4] = "Leave", i16))(A3 || {});
function x4(e9) {
  let r21 = {};
  for (let t14 in e9) e9[t14] === true && (r21[`data-${t14}`] = "");
  return r21;
}
function N2(e9, r21, t14, n17) {
  let [i16, a28] = (0, import_react65.useState)(t14), { hasFlag: s21, addFlag: o19, removeFlag: l19 } = c8(e9 && i16 ? 3 : 0), u25 = (0, import_react65.useRef)(false), f22 = (0, import_react65.useRef)(false), E13 = p();
  return n(() => {
    var d14;
    if (e9) {
      if (t14 && a28(true), !r21) {
        t14 && o19(3);
        return;
      }
      return (d14 = n17 == null ? void 0 : n17.start) == null || d14.call(n17, t14), C7(r21, { inFlight: u25, prepare() {
        f22.current ? f22.current = false : f22.current = u25.current, u25.current = true, !f22.current && (t14 ? (o19(3), l19(4)) : (o19(4), l19(2)));
      }, run() {
        f22.current ? t14 ? (l19(3), o19(4)) : (l19(4), o19(3)) : t14 ? l19(1) : o19(1);
      }, done() {
        var p13;
        f22.current && D4(r21) || (u25.current = false, l19(7), t14 || a28(false), (p13 = n17 == null ? void 0 : n17.end) == null || p13.call(n17, t14));
      } });
    }
  }, [e9, t14, r21, E13]), e9 ? [i16, { closed: s21(1), enter: s21(2), leave: s21(4), transition: s21(2) || s21(4) }] : [t14, { closed: void 0, enter: void 0, leave: void 0, transition: void 0 }];
}
function C7(e9, { prepare: r21, run: t14, done: n17, inFlight: i16 }) {
  let a28 = o2();
  return j5(e9, { prepare: r21, inFlight: i16 }), a28.nextFrame(() => {
    t14(), a28.requestAnimationFrame(() => {
      a28.add(M4(e9, n17));
    });
  }), a28.dispose;
}
function M4(e9, r21) {
  var a28, s21;
  let t14 = o2();
  if (!e9) return t14.dispose;
  let n17 = false;
  t14.add(() => {
    n17 = true;
  });
  let i16 = (s21 = (a28 = e9.getAnimations) == null ? void 0 : a28.call(e9).filter((o19) => o19 instanceof CSSTransition)) != null ? s21 : [];
  return i16.length === 0 ? (r21(), t14.dispose) : (Promise.allSettled(i16.map((o19) => o19.finished)).then(() => {
    n17 || r21();
  }), t14.dispose);
}
function j5(e9, { inFlight: r21, prepare: t14 }) {
  if (r21 != null && r21.current) {
    t14();
    return;
  }
  let n17 = e9.style.transition;
  e9.style.transition = "none", t14(), e9.offsetHeight, e9.style.transition = n17;
}
function D4(e9) {
  var t14, n17;
  return ((n17 = (t14 = e9.getAnimations) == null ? void 0 : t14.call(e9)) != null ? n17 : []).some((i16) => i16 instanceof CSSTransition && i16.playState !== "finished");
}

// node_modules/@headlessui/react/dist/hooks/use-tree-walker.js
var import_react66 = __toESM(require_react(), 1);
function F2(c21, { container: e9, accept: t14, walk: r21 }) {
  let o19 = (0, import_react66.useRef)(t14), l19 = (0, import_react66.useRef)(r21);
  (0, import_react66.useEffect)(() => {
    o19.current = t14, l19.current = r21;
  }, [t14, r21]), n(() => {
    if (!e9 || !c21) return;
    let n17 = l(e9);
    if (!n17) return;
    let f22 = o19.current, p13 = l19.current, i16 = Object.assign((m10) => f22(m10), { acceptNode: f22 }), u25 = n17.createTreeWalker(e9, NodeFilter.SHOW_ELEMENT, i16, false);
    for (; u25.nextNode(); ) p13(u25.currentNode);
  }, [e9, c21, o19, l19]);
}

// node_modules/@headlessui/react/dist/hooks/use-watch.js
var import_react67 = __toESM(require_react(), 1);
function m7(u25, t14) {
  let e9 = (0, import_react67.useRef)([]), r21 = o4(u25);
  (0, import_react67.useEffect)(() => {
    let o19 = [...e9.current];
    for (let [a28, l19] of t14.entries()) if (e9.current[a28] !== l19) {
      let n17 = r21(t14, o19);
      return e9.current = t14, n17;
    }
  }, [r21, ...t14]);
}

// node_modules/@floating-ui/react/dist/floating-ui.react.mjs
var React2 = __toESM(require_react(), 1);
var import_react68 = __toESM(require_react(), 1);

// node_modules/@floating-ui/react/dist/floating-ui.react.utils.mjs
function getPlatform() {
  const uaData = navigator.userAgentData;
  if (uaData != null && uaData.platform) {
    return uaData.platform;
  }
  return navigator.platform;
}
function getUserAgent() {
  const uaData = navigator.userAgentData;
  if (uaData && Array.isArray(uaData.brands)) {
    return uaData.brands.map((_ref) => {
      let {
        brand,
        version
      } = _ref;
      return brand + "/" + version;
    }).join(" ");
  }
  return navigator.userAgent;
}
function isSafari() {
  return /apple/i.test(navigator.vendor);
}
function stopEvent(event) {
  event.preventDefault();
  event.stopPropagation();
}

// node_modules/tabbable/dist/index.esm.js
var candidateSelectors = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert] *)", "textarea:not([inert]):not([inert] *)", "a[href]:not([inert]):not([inert] *)", "button:not([inert]):not([inert] *)", "[tabindex]:not(slot):not([inert]):not([inert] *)", "audio[controls]:not([inert]):not([inert] *)", "video[controls]:not([inert]):not([inert] *)", '[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)', "details>summary:first-of-type:not([inert]):not([inert] *)", "details:not([inert]):not([inert] *)"];
var candidateSelector = candidateSelectors.join(",");
var NoElement = typeof Element === "undefined";
var matches = NoElement ? function() {
} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
var getRootNode = !NoElement && Element.prototype.getRootNode ? function(element) {
  var _element$getRootNode;
  return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);
} : function(element) {
  return element === null || element === void 0 ? void 0 : element.ownerDocument;
};
var focusableCandidateSelector = candidateSelectors.concat("iframe:not([inert]):not([inert] *)").join(",");

// node_modules/@floating-ui/react/dist/floating-ui.react.mjs
var ReactDOM = __toESM(require_react_dom(), 1);
function useMergeRefs(refs) {
  return React2.useMemo(() => {
    if (refs.every((ref) => ref == null)) {
      return null;
    }
    return (value) => {
      refs.forEach((ref) => {
        if (typeof ref === "function") {
          ref(value);
        } else if (ref != null) {
          ref.current = value;
        }
      });
    };
  }, refs);
}
var SafeReact = {
  ...React2
};
var useInsertionEffect = SafeReact.useInsertionEffect;
var useSafeInsertionEffect = useInsertionEffect || ((fn) => fn());
function useEffectEvent(callback) {
  const ref = React2.useRef(() => {
    if (true) {
      throw new Error("Cannot call an event handler while rendering.");
    }
  });
  useSafeInsertionEffect(() => {
    ref.current = callback;
  });
  return React2.useCallback(function() {
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    return ref.current == null ? void 0 : ref.current(...args);
  }, []);
}
var ARROW_UP = "ArrowUp";
var ARROW_DOWN = "ArrowDown";
var ARROW_LEFT = "ArrowLeft";
var ARROW_RIGHT = "ArrowRight";
function isDifferentRow(index2, cols, prevRow) {
  return Math.floor(index2 / cols) !== prevRow;
}
function isIndexOutOfBounds(listRef, index2) {
  return index2 < 0 || index2 >= listRef.current.length;
}
function getMinIndex(listRef, disabledIndices) {
  return findNonDisabledIndex(listRef, {
    disabledIndices
  });
}
function getMaxIndex(listRef, disabledIndices) {
  return findNonDisabledIndex(listRef, {
    decrement: true,
    startingIndex: listRef.current.length,
    disabledIndices
  });
}
function findNonDisabledIndex(listRef, _temp) {
  let {
    startingIndex = -1,
    decrement = false,
    disabledIndices,
    amount = 1
  } = _temp === void 0 ? {} : _temp;
  const list = listRef.current;
  let index2 = startingIndex;
  do {
    index2 += decrement ? -amount : amount;
  } while (index2 >= 0 && index2 <= list.length - 1 && isDisabled(list, index2, disabledIndices));
  return index2;
}
function getGridNavigatedIndex(elementsRef, _ref) {
  let {
    event,
    orientation,
    loop,
    rtl,
    cols,
    disabledIndices,
    minIndex,
    maxIndex,
    prevIndex,
    stopEvent: stop = false
  } = _ref;
  let nextIndex = prevIndex;
  if (event.key === ARROW_UP) {
    stop && stopEvent(event);
    if (prevIndex === -1) {
      nextIndex = maxIndex;
    } else {
      nextIndex = findNonDisabledIndex(elementsRef, {
        startingIndex: nextIndex,
        amount: cols,
        decrement: true,
        disabledIndices
      });
      if (loop && (prevIndex - cols < minIndex || nextIndex < 0)) {
        const col = prevIndex % cols;
        const maxCol = maxIndex % cols;
        const offset2 = maxIndex - (maxCol - col);
        if (maxCol === col) {
          nextIndex = maxIndex;
        } else {
          nextIndex = maxCol > col ? offset2 : offset2 - cols;
        }
      }
    }
    if (isIndexOutOfBounds(elementsRef, nextIndex)) {
      nextIndex = prevIndex;
    }
  }
  if (event.key === ARROW_DOWN) {
    stop && stopEvent(event);
    if (prevIndex === -1) {
      nextIndex = minIndex;
    } else {
      nextIndex = findNonDisabledIndex(elementsRef, {
        startingIndex: prevIndex,
        amount: cols,
        disabledIndices
      });
      if (loop && prevIndex + cols > maxIndex) {
        nextIndex = findNonDisabledIndex(elementsRef, {
          startingIndex: prevIndex % cols - cols,
          amount: cols,
          disabledIndices
        });
      }
    }
    if (isIndexOutOfBounds(elementsRef, nextIndex)) {
      nextIndex = prevIndex;
    }
  }
  if (orientation === "both") {
    const prevRow = floor(prevIndex / cols);
    if (event.key === (rtl ? ARROW_LEFT : ARROW_RIGHT)) {
      stop && stopEvent(event);
      if (prevIndex % cols !== cols - 1) {
        nextIndex = findNonDisabledIndex(elementsRef, {
          startingIndex: prevIndex,
          disabledIndices
        });
        if (loop && isDifferentRow(nextIndex, cols, prevRow)) {
          nextIndex = findNonDisabledIndex(elementsRef, {
            startingIndex: prevIndex - prevIndex % cols - 1,
            disabledIndices
          });
        }
      } else if (loop) {
        nextIndex = findNonDisabledIndex(elementsRef, {
          startingIndex: prevIndex - prevIndex % cols - 1,
          disabledIndices
        });
      }
      if (isDifferentRow(nextIndex, cols, prevRow)) {
        nextIndex = prevIndex;
      }
    }
    if (event.key === (rtl ? ARROW_RIGHT : ARROW_LEFT)) {
      stop && stopEvent(event);
      if (prevIndex % cols !== 0) {
        nextIndex = findNonDisabledIndex(elementsRef, {
          startingIndex: prevIndex,
          decrement: true,
          disabledIndices
        });
        if (loop && isDifferentRow(nextIndex, cols, prevRow)) {
          nextIndex = findNonDisabledIndex(elementsRef, {
            startingIndex: prevIndex + (cols - prevIndex % cols),
            decrement: true,
            disabledIndices
          });
        }
      } else if (loop) {
        nextIndex = findNonDisabledIndex(elementsRef, {
          startingIndex: prevIndex + (cols - prevIndex % cols),
          decrement: true,
          disabledIndices
        });
      }
      if (isDifferentRow(nextIndex, cols, prevRow)) {
        nextIndex = prevIndex;
      }
    }
    const lastRow = floor(maxIndex / cols) === prevRow;
    if (isIndexOutOfBounds(elementsRef, nextIndex)) {
      if (loop && lastRow) {
        nextIndex = event.key === (rtl ? ARROW_RIGHT : ARROW_LEFT) ? maxIndex : findNonDisabledIndex(elementsRef, {
          startingIndex: prevIndex - prevIndex % cols - 1,
          disabledIndices
        });
      } else {
        nextIndex = prevIndex;
      }
    }
  }
  return nextIndex;
}
function buildCellMap(sizes, cols, dense) {
  const cellMap = [];
  let startIndex = 0;
  sizes.forEach((_ref2, index2) => {
    let {
      width,
      height
    } = _ref2;
    if (width > cols) {
      if (true) {
        throw new Error("[Floating UI]: Invalid grid - item width at index " + index2 + " is greater than grid columns");
      }
    }
    let itemPlaced = false;
    if (dense) {
      startIndex = 0;
    }
    while (!itemPlaced) {
      const targetCells = [];
      for (let i16 = 0; i16 < width; i16++) {
        for (let j11 = 0; j11 < height; j11++) {
          targetCells.push(startIndex + i16 + j11 * cols);
        }
      }
      if (startIndex % cols + width <= cols && targetCells.every((cell) => cellMap[cell] == null)) {
        targetCells.forEach((cell) => {
          cellMap[cell] = index2;
        });
        itemPlaced = true;
      } else {
        startIndex++;
      }
    }
  });
  return [...cellMap];
}
function getCellIndexOfCorner(index2, sizes, cellMap, cols, corner) {
  if (index2 === -1) return -1;
  const firstCellIndex = cellMap.indexOf(index2);
  const sizeItem = sizes[index2];
  switch (corner) {
    case "tl":
      return firstCellIndex;
    case "tr":
      if (!sizeItem) {
        return firstCellIndex;
      }
      return firstCellIndex + sizeItem.width - 1;
    case "bl":
      if (!sizeItem) {
        return firstCellIndex;
      }
      return firstCellIndex + (sizeItem.height - 1) * cols;
    case "br":
      return cellMap.lastIndexOf(index2);
  }
}
function getCellIndices(indices, cellMap) {
  return cellMap.flatMap((index2, cellIndex) => indices.includes(index2) ? [cellIndex] : []);
}
function isDisabled(list, index2, disabledIndices) {
  if (disabledIndices) {
    return disabledIndices.includes(index2);
  }
  const element = list[index2];
  return element == null || element.hasAttribute("disabled") || element.getAttribute("aria-disabled") === "true";
}
var index = typeof document !== "undefined" ? import_react68.useLayoutEffect : import_react68.useEffect;
function sortByDocumentPosition(a28, b14) {
  const position = a28.compareDocumentPosition(b14);
  if (position & Node.DOCUMENT_POSITION_FOLLOWING || position & Node.DOCUMENT_POSITION_CONTAINED_BY) {
    return -1;
  }
  if (position & Node.DOCUMENT_POSITION_PRECEDING || position & Node.DOCUMENT_POSITION_CONTAINS) {
    return 1;
  }
  return 0;
}
function areMapsEqual(map1, map2) {
  if (map1.size !== map2.size) {
    return false;
  }
  for (const [key, value] of map1.entries()) {
    if (value !== map2.get(key)) {
      return false;
    }
  }
  return true;
}
var FloatingListContext = React2.createContext({
  register: () => {
  },
  unregister: () => {
  },
  map: /* @__PURE__ */ new Map(),
  elementsRef: {
    current: []
  }
});
function FloatingList(props) {
  const {
    children,
    elementsRef,
    labelsRef
  } = props;
  const [map, setMap] = React2.useState(() => /* @__PURE__ */ new Map());
  const register = React2.useCallback((node) => {
    setMap((prevMap) => new Map(prevMap).set(node, null));
  }, []);
  const unregister = React2.useCallback((node) => {
    setMap((prevMap) => {
      const map2 = new Map(prevMap);
      map2.delete(node);
      return map2;
    });
  }, []);
  index(() => {
    const newMap = new Map(map);
    const nodes = Array.from(newMap.keys()).sort(sortByDocumentPosition);
    nodes.forEach((node, index2) => {
      newMap.set(node, index2);
    });
    if (!areMapsEqual(map, newMap)) {
      setMap(newMap);
    }
  }, [map]);
  return React2.createElement(FloatingListContext.Provider, {
    value: React2.useMemo(() => ({
      register,
      unregister,
      map,
      elementsRef,
      labelsRef
    }), [register, unregister, map, elementsRef, labelsRef])
  }, children);
}
function useListItem(props) {
  if (props === void 0) {
    props = {};
  }
  const {
    label
  } = props;
  const {
    register,
    unregister,
    map,
    elementsRef,
    labelsRef
  } = React2.useContext(FloatingListContext);
  const [index$1, setIndex] = React2.useState(null);
  const componentRef = React2.useRef(null);
  const ref = React2.useCallback((node) => {
    componentRef.current = node;
    if (index$1 !== null) {
      elementsRef.current[index$1] = node;
      if (labelsRef) {
        var _node$textContent;
        const isLabelDefined = label !== void 0;
        labelsRef.current[index$1] = isLabelDefined ? label : (_node$textContent = node == null ? void 0 : node.textContent) != null ? _node$textContent : null;
      }
    }
  }, [index$1, elementsRef, labelsRef, label]);
  index(() => {
    const node = componentRef.current;
    if (node) {
      register(node);
      return () => {
        unregister(node);
      };
    }
  }, [register, unregister]);
  index(() => {
    const index2 = componentRef.current ? map.get(componentRef.current) : null;
    if (index2 != null) {
      setIndex(index2);
    }
  }, [map]);
  return React2.useMemo(() => ({
    ref,
    index: index$1 == null ? -1 : index$1
  }), [index$1, ref]);
}
function renderJsx(render, computedProps) {
  if (typeof render === "function") {
    return render(computedProps);
  }
  if (render) {
    return React2.cloneElement(render, computedProps);
  }
  return React2.createElement("div", computedProps);
}
var CompositeContext = React2.createContext({
  activeIndex: 0,
  onNavigate: () => {
  }
});
var horizontalKeys = [ARROW_LEFT, ARROW_RIGHT];
var verticalKeys = [ARROW_UP, ARROW_DOWN];
var allKeys = [...horizontalKeys, ...verticalKeys];
var Composite = React2.forwardRef(function Composite2(props, forwardedRef) {
  const {
    render,
    orientation = "both",
    loop = true,
    rtl = false,
    cols = 1,
    disabledIndices,
    activeIndex: externalActiveIndex,
    onNavigate: externalSetActiveIndex,
    itemSizes,
    dense = false,
    ...domProps
  } = props;
  const [internalActiveIndex, internalSetActiveIndex] = React2.useState(0);
  const activeIndex = externalActiveIndex != null ? externalActiveIndex : internalActiveIndex;
  const onNavigate = useEffectEvent(externalSetActiveIndex != null ? externalSetActiveIndex : internalSetActiveIndex);
  const elementsRef = React2.useRef([]);
  const renderElementProps = render && typeof render !== "function" ? render.props : {};
  const contextValue = React2.useMemo(() => ({
    activeIndex,
    onNavigate
  }), [activeIndex, onNavigate]);
  const isGrid = cols > 1;
  function handleKeyDown(event) {
    if (!allKeys.includes(event.key)) return;
    let nextIndex = activeIndex;
    const minIndex = getMinIndex(elementsRef, disabledIndices);
    const maxIndex = getMaxIndex(elementsRef, disabledIndices);
    const horizontalEndKey = rtl ? ARROW_LEFT : ARROW_RIGHT;
    const horizontalStartKey = rtl ? ARROW_RIGHT : ARROW_LEFT;
    if (isGrid) {
      const sizes = itemSizes || Array.from({
        length: elementsRef.current.length
      }, () => ({
        width: 1,
        height: 1
      }));
      const cellMap = buildCellMap(sizes, cols, dense);
      const minGridIndex = cellMap.findIndex((index2) => index2 != null && !isDisabled(elementsRef.current, index2, disabledIndices));
      const maxGridIndex = cellMap.reduce((foundIndex, index2, cellIndex) => index2 != null && !isDisabled(elementsRef.current, index2, disabledIndices) ? cellIndex : foundIndex, -1);
      const maybeNextIndex = cellMap[getGridNavigatedIndex({
        current: cellMap.map((itemIndex) => itemIndex ? elementsRef.current[itemIndex] : null)
      }, {
        event,
        orientation,
        loop,
        rtl,
        cols,
        // treat undefined (empty grid spaces) as disabled indices so we
        // don't end up in them
        disabledIndices: getCellIndices([...disabledIndices || elementsRef.current.map((_9, index2) => isDisabled(elementsRef.current, index2) ? index2 : void 0), void 0], cellMap),
        minIndex: minGridIndex,
        maxIndex: maxGridIndex,
        prevIndex: getCellIndexOfCorner(
          activeIndex > maxIndex ? minIndex : activeIndex,
          sizes,
          cellMap,
          cols,
          // use a corner matching the edge closest to the direction we're
          // moving in so we don't end up in the same item. Prefer
          // top/left over bottom/right.
          event.key === ARROW_DOWN ? "bl" : event.key === horizontalEndKey ? "tr" : "tl"
        )
      })];
      if (maybeNextIndex != null) {
        nextIndex = maybeNextIndex;
      }
    }
    const toEndKeys = {
      horizontal: [horizontalEndKey],
      vertical: [ARROW_DOWN],
      both: [horizontalEndKey, ARROW_DOWN]
    }[orientation];
    const toStartKeys = {
      horizontal: [horizontalStartKey],
      vertical: [ARROW_UP],
      both: [horizontalStartKey, ARROW_UP]
    }[orientation];
    const preventedKeys = isGrid ? allKeys : {
      horizontal: horizontalKeys,
      vertical: verticalKeys,
      both: allKeys
    }[orientation];
    if (nextIndex === activeIndex && [...toEndKeys, ...toStartKeys].includes(event.key)) {
      if (loop && nextIndex === maxIndex && toEndKeys.includes(event.key)) {
        nextIndex = minIndex;
      } else if (loop && nextIndex === minIndex && toStartKeys.includes(event.key)) {
        nextIndex = maxIndex;
      } else {
        nextIndex = findNonDisabledIndex(elementsRef, {
          startingIndex: nextIndex,
          decrement: toStartKeys.includes(event.key),
          disabledIndices
        });
      }
    }
    if (nextIndex !== activeIndex && !isIndexOutOfBounds(elementsRef, nextIndex)) {
      var _elementsRef$current$;
      event.stopPropagation();
      if (preventedKeys.includes(event.key)) {
        event.preventDefault();
      }
      onNavigate(nextIndex);
      (_elementsRef$current$ = elementsRef.current[nextIndex]) == null || _elementsRef$current$.focus();
    }
  }
  const computedProps = {
    ...domProps,
    ...renderElementProps,
    ref: forwardedRef,
    "aria-orientation": orientation === "both" ? void 0 : orientation,
    onKeyDown(e9) {
      domProps.onKeyDown == null || domProps.onKeyDown(e9);
      renderElementProps.onKeyDown == null || renderElementProps.onKeyDown(e9);
      handleKeyDown(e9);
    }
  };
  return React2.createElement(CompositeContext.Provider, {
    value: contextValue
  }, React2.createElement(FloatingList, {
    elementsRef
  }, renderJsx(render, computedProps)));
});
var CompositeItem = React2.forwardRef(function CompositeItem2(props, forwardedRef) {
  const {
    render,
    ...domProps
  } = props;
  const renderElementProps = render && typeof render !== "function" ? render.props : {};
  const {
    activeIndex,
    onNavigate
  } = React2.useContext(CompositeContext);
  const {
    ref,
    index: index2
  } = useListItem();
  const mergedRef = useMergeRefs([ref, forwardedRef, renderElementProps.ref]);
  const isActive = activeIndex === index2;
  const computedProps = {
    ...domProps,
    ...renderElementProps,
    ref: mergedRef,
    tabIndex: isActive ? 0 : -1,
    "data-active": isActive ? "" : void 0,
    onFocus(e9) {
      domProps.onFocus == null || domProps.onFocus(e9);
      renderElementProps.onFocus == null || renderElementProps.onFocus(e9);
      onNavigate(index2);
    }
  };
  return renderJsx(render, computedProps);
});
function _extends() {
  _extends = Object.assign ? Object.assign.bind() : function(target) {
    for (var i16 = 1; i16 < arguments.length; i16++) {
      var source = arguments[i16];
      for (var key in source) {
        if (Object.prototype.hasOwnProperty.call(source, key)) {
          target[key] = source[key];
        }
      }
    }
    return target;
  };
  return _extends.apply(this, arguments);
}
var serverHandoffComplete = false;
var count = 0;
var genId = () => (
  // Ensure the id is unique with multiple independent versions of Floating UI
  // on <React 18
  "floating-ui-" + Math.random().toString(36).slice(2, 6) + count++
);
function useFloatingId() {
  const [id, setId] = React2.useState(() => serverHandoffComplete ? genId() : void 0);
  index(() => {
    if (id == null) {
      setId(genId());
    }
  }, []);
  React2.useEffect(() => {
    serverHandoffComplete = true;
  }, []);
  return id;
}
var useReactId = SafeReact.useId;
var useId = useReactId || useFloatingId;
var devMessageSet;
if (true) {
  devMessageSet = /* @__PURE__ */ new Set();
}
function warn() {
  var _devMessageSet;
  for (var _len = arguments.length, messages = new Array(_len), _key = 0; _key < _len; _key++) {
    messages[_key] = arguments[_key];
  }
  const message = "Floating UI: " + messages.join(" ");
  if (!((_devMessageSet = devMessageSet) != null && _devMessageSet.has(message))) {
    var _devMessageSet2;
    (_devMessageSet2 = devMessageSet) == null || _devMessageSet2.add(message);
    console.warn(message);
  }
}
function error() {
  var _devMessageSet3;
  for (var _len2 = arguments.length, messages = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
    messages[_key2] = arguments[_key2];
  }
  const message = "Floating UI: " + messages.join(" ");
  if (!((_devMessageSet3 = devMessageSet) != null && _devMessageSet3.has(message))) {
    var _devMessageSet4;
    (_devMessageSet4 = devMessageSet) == null || _devMessageSet4.add(message);
    console.error(message);
  }
}
var FloatingArrow = React2.forwardRef(function FloatingArrow2(props, ref) {
  const {
    context: {
      placement,
      elements: {
        floating
      },
      middlewareData: {
        arrow: arrow2,
        shift: shift2
      }
    },
    width = 14,
    height = 7,
    tipRadius = 0,
    strokeWidth = 0,
    staticOffset,
    stroke,
    d: d14,
    style: {
      transform,
      ...restStyle
    } = {},
    ...rest
  } = props;
  if (true) {
    if (!ref) {
      warn("The `ref` prop is required for `FloatingArrow`.");
    }
  }
  const clipPathId = useId();
  const [isRTL, setIsRTL] = React2.useState(false);
  index(() => {
    if (!floating) return;
    const isRTL2 = getComputedStyle2(floating).direction === "rtl";
    if (isRTL2) {
      setIsRTL(true);
    }
  }, [floating]);
  if (!floating) {
    return null;
  }
  const [side, alignment] = placement.split("-");
  const isVerticalSide = side === "top" || side === "bottom";
  let computedStaticOffset = staticOffset;
  if (isVerticalSide && shift2 != null && shift2.x || !isVerticalSide && shift2 != null && shift2.y) {
    computedStaticOffset = null;
  }
  const computedStrokeWidth = strokeWidth * 2;
  const halfStrokeWidth = computedStrokeWidth / 2;
  const svgX = width / 2 * (tipRadius / -8 + 1);
  const svgY = height / 2 * tipRadius / 4;
  const isCustomShape = !!d14;
  const yOffsetProp = computedStaticOffset && alignment === "end" ? "bottom" : "top";
  let xOffsetProp = computedStaticOffset && alignment === "end" ? "right" : "left";
  if (computedStaticOffset && isRTL) {
    xOffsetProp = alignment === "end" ? "left" : "right";
  }
  const arrowX = (arrow2 == null ? void 0 : arrow2.x) != null ? computedStaticOffset || arrow2.x : "";
  const arrowY = (arrow2 == null ? void 0 : arrow2.y) != null ? computedStaticOffset || arrow2.y : "";
  const dValue = d14 || "M0,0" + (" H" + width) + (" L" + (width - svgX) + "," + (height - svgY)) + (" Q" + width / 2 + "," + height + " " + svgX + "," + (height - svgY)) + " Z";
  const rotation = {
    top: isCustomShape ? "rotate(180deg)" : "",
    left: isCustomShape ? "rotate(90deg)" : "rotate(-90deg)",
    bottom: isCustomShape ? "" : "rotate(180deg)",
    right: isCustomShape ? "rotate(-90deg)" : "rotate(90deg)"
  }[side];
  return React2.createElement("svg", _extends({}, rest, {
    "aria-hidden": true,
    ref,
    width: isCustomShape ? width : width + computedStrokeWidth,
    height: width,
    viewBox: "0 0 " + width + " " + (height > width ? height : width),
    style: {
      position: "absolute",
      pointerEvents: "none",
      [xOffsetProp]: arrowX,
      [yOffsetProp]: arrowY,
      [side]: isVerticalSide || isCustomShape ? "100%" : "calc(100% - " + computedStrokeWidth / 2 + "px)",
      transform: [rotation, transform].filter((t14) => !!t14).join(" "),
      ...restStyle
    }
  }), computedStrokeWidth > 0 && React2.createElement("path", {
    clipPath: "url(#" + clipPathId + ")",
    fill: "none",
    stroke,
    strokeWidth: computedStrokeWidth + (d14 ? 0 : 1),
    d: dValue
  }), React2.createElement("path", {
    stroke: computedStrokeWidth && !d14 ? rest.fill : "none",
    d: dValue
  }), React2.createElement("clipPath", {
    id: clipPathId
  }, React2.createElement("rect", {
    x: -halfStrokeWidth,
    y: halfStrokeWidth * (isCustomShape ? -1 : 1),
    width: width + computedStrokeWidth,
    height: width
  })));
});
function createPubSub() {
  const map = /* @__PURE__ */ new Map();
  return {
    emit(event, data) {
      var _map$get;
      (_map$get = map.get(event)) == null || _map$get.forEach((handler) => handler(data));
    },
    on(event, listener) {
      map.set(event, [...map.get(event) || [], listener]);
    },
    off(event, listener) {
      var _map$get2;
      map.set(event, ((_map$get2 = map.get(event)) == null ? void 0 : _map$get2.filter((l19) => l19 !== listener)) || []);
    }
  };
}
var FloatingNodeContext = React2.createContext(null);
var FloatingTreeContext = React2.createContext(null);
var useFloatingParentNodeId = () => {
  var _React$useContext;
  return ((_React$useContext = React2.useContext(FloatingNodeContext)) == null ? void 0 : _React$useContext.id) || null;
};
var useFloatingTree = () => React2.useContext(FloatingTreeContext);
function createAttribute(name) {
  return "data-floating-ui-" + name;
}
var safePolygonIdentifier = createAttribute("safe-polygon");
var NOOP = () => {
};
var FloatingDelayGroupContext = React2.createContext({
  delay: 0,
  initialDelay: 0,
  timeoutMs: 0,
  currentId: null,
  setCurrentId: NOOP,
  setState: NOOP,
  isInstantPhase: false
});
var HIDDEN_STYLES = {
  border: 0,
  clip: "rect(0 0 0 0)",
  height: "1px",
  margin: "-1px",
  overflow: "hidden",
  padding: 0,
  position: "fixed",
  whiteSpace: "nowrap",
  width: "1px",
  top: 0,
  left: 0
};
var timeoutId;
function setActiveElementOnTab(event) {
  if (event.key === "Tab") {
    event.target;
    clearTimeout(timeoutId);
  }
}
var FocusGuard = React2.forwardRef(function FocusGuard2(props, ref) {
  const [role, setRole] = React2.useState();
  index(() => {
    if (isSafari()) {
      setRole("button");
    }
    document.addEventListener("keydown", setActiveElementOnTab);
    return () => {
      document.removeEventListener("keydown", setActiveElementOnTab);
    };
  }, []);
  const restProps = {
    ref,
    tabIndex: 0,
    // Role is only for VoiceOver
    role,
    "aria-hidden": role ? void 0 : true,
    [createAttribute("focus-guard")]: "",
    style: HIDDEN_STYLES
  };
  return React2.createElement("span", _extends({}, props, restProps));
});
var PortalContext = React2.createContext(null);
var attr = createAttribute("portal");
var FOCUSABLE_ATTRIBUTE = "data-floating-ui-focusable";
var VisuallyHiddenDismiss = React2.forwardRef(function VisuallyHiddenDismiss2(props, ref) {
  return React2.createElement("button", _extends({}, props, {
    type: "button",
    ref,
    tabIndex: -1,
    style: HIDDEN_STYLES
  }));
});
var lockCount = 0;
function enableScrollLock() {
  const isIOS = /iP(hone|ad|od)|iOS/.test(getPlatform());
  const bodyStyle = document.body.style;
  const scrollbarX = Math.round(document.documentElement.getBoundingClientRect().left) + document.documentElement.scrollLeft;
  const paddingProp = scrollbarX ? "paddingLeft" : "paddingRight";
  const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;
  const scrollX = bodyStyle.left ? parseFloat(bodyStyle.left) : window.scrollX;
  const scrollY = bodyStyle.top ? parseFloat(bodyStyle.top) : window.scrollY;
  bodyStyle.overflow = "hidden";
  if (scrollbarWidth) {
    bodyStyle[paddingProp] = scrollbarWidth + "px";
  }
  if (isIOS) {
    var _window$visualViewpor, _window$visualViewpor2;
    const offsetLeft = ((_window$visualViewpor = window.visualViewport) == null ? void 0 : _window$visualViewpor.offsetLeft) || 0;
    const offsetTop = ((_window$visualViewpor2 = window.visualViewport) == null ? void 0 : _window$visualViewpor2.offsetTop) || 0;
    Object.assign(bodyStyle, {
      position: "fixed",
      top: -(scrollY - Math.floor(offsetTop)) + "px",
      left: -(scrollX - Math.floor(offsetLeft)) + "px",
      right: "0"
    });
  }
  return () => {
    Object.assign(bodyStyle, {
      overflow: "",
      [paddingProp]: ""
    });
    if (isIOS) {
      Object.assign(bodyStyle, {
        position: "",
        top: "",
        left: "",
        right: ""
      });
      window.scrollTo(scrollX, scrollY);
    }
  };
}
var cleanup = () => {
};
var FloatingOverlay = React2.forwardRef(function FloatingOverlay2(props, ref) {
  const {
    lockScroll = false,
    ...rest
  } = props;
  index(() => {
    if (!lockScroll) return;
    lockCount++;
    if (lockCount === 1) {
      cleanup = enableScrollLock();
    }
    return () => {
      lockCount--;
      if (lockCount === 0) {
        cleanup();
      }
    };
  }, [lockScroll]);
  return React2.createElement("div", _extends({
    ref
  }, rest, {
    style: {
      position: "fixed",
      overflow: "auto",
      top: 0,
      right: 0,
      bottom: 0,
      left: 0,
      ...rest.style
    }
  }));
});
function useFloatingRootContext(options) {
  const {
    open = false,
    onOpenChange: onOpenChangeProp,
    elements: elementsProp
  } = options;
  const floatingId = useId();
  const dataRef = React2.useRef({});
  const [events] = React2.useState(() => createPubSub());
  const nested = useFloatingParentNodeId() != null;
  if (true) {
    const optionDomReference = elementsProp.reference;
    if (optionDomReference && !isElement(optionDomReference)) {
      error("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
    }
  }
  const [positionReference, setPositionReference] = React2.useState(elementsProp.reference);
  const onOpenChange = useEffectEvent((open2, event, reason) => {
    dataRef.current.openEvent = open2 ? event : void 0;
    events.emit("openchange", {
      open: open2,
      event,
      reason,
      nested
    });
    onOpenChangeProp == null || onOpenChangeProp(open2, event, reason);
  });
  const refs = React2.useMemo(() => ({
    setPositionReference
  }), []);
  const elements = React2.useMemo(() => ({
    reference: positionReference || elementsProp.reference || null,
    floating: elementsProp.floating || null,
    domReference: elementsProp.reference
  }), [positionReference, elementsProp.reference, elementsProp.floating]);
  return React2.useMemo(() => ({
    dataRef,
    open,
    onOpenChange,
    elements,
    events,
    floatingId,
    refs
  }), [open, onOpenChange, elements, events, floatingId, refs]);
}
function useFloating2(options) {
  if (options === void 0) {
    options = {};
  }
  const {
    nodeId
  } = options;
  const internalRootContext = useFloatingRootContext({
    ...options,
    elements: {
      reference: null,
      floating: null,
      ...options.elements
    }
  });
  const rootContext = options.rootContext || internalRootContext;
  const computedElements = rootContext.elements;
  const [_domReference, setDomReference] = React2.useState(null);
  const [positionReference, _setPositionReference] = React2.useState(null);
  const optionDomReference = computedElements == null ? void 0 : computedElements.domReference;
  const domReference = optionDomReference || _domReference;
  const domReferenceRef = React2.useRef(null);
  const tree = useFloatingTree();
  index(() => {
    if (domReference) {
      domReferenceRef.current = domReference;
    }
  }, [domReference]);
  const position = useFloating({
    ...options,
    elements: {
      ...computedElements,
      ...positionReference && {
        reference: positionReference
      }
    }
  });
  const setPositionReference = React2.useCallback((node) => {
    const computedPositionReference = isElement(node) ? {
      getBoundingClientRect: () => node.getBoundingClientRect(),
      contextElement: node
    } : node;
    _setPositionReference(computedPositionReference);
    position.refs.setReference(computedPositionReference);
  }, [position.refs]);
  const setReference = React2.useCallback((node) => {
    if (isElement(node) || node === null) {
      domReferenceRef.current = node;
      setDomReference(node);
    }
    if (isElement(position.refs.reference.current) || position.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
    // `null` to support `positionReference` + an unstable `reference`
    // callback ref.
    node !== null && !isElement(node)) {
      position.refs.setReference(node);
    }
  }, [position.refs]);
  const refs = React2.useMemo(() => ({
    ...position.refs,
    setReference,
    setPositionReference,
    domReference: domReferenceRef
  }), [position.refs, setReference, setPositionReference]);
  const elements = React2.useMemo(() => ({
    ...position.elements,
    domReference
  }), [position.elements, domReference]);
  const context = React2.useMemo(() => ({
    ...position,
    ...rootContext,
    refs,
    elements,
    nodeId
  }), [position, refs, elements, nodeId, rootContext]);
  index(() => {
    rootContext.dataRef.current.floatingContext = context;
    const node = tree == null ? void 0 : tree.nodesRef.current.find((node2) => node2.id === nodeId);
    if (node) {
      node.context = context;
    }
  });
  return React2.useMemo(() => ({
    ...position,
    context,
    refs,
    elements
  }), [position, refs, elements, context]);
}
var ACTIVE_KEY = "active";
var SELECTED_KEY = "selected";
function mergeProps(userProps, propsList, elementKey) {
  const map = /* @__PURE__ */ new Map();
  const isItem = elementKey === "item";
  let domUserProps = userProps;
  if (isItem && userProps) {
    const {
      [ACTIVE_KEY]: _9,
      [SELECTED_KEY]: __,
      ...validProps
    } = userProps;
    domUserProps = validProps;
  }
  return {
    ...elementKey === "floating" && {
      tabIndex: -1,
      [FOCUSABLE_ATTRIBUTE]: ""
    },
    ...domUserProps,
    ...propsList.map((value) => {
      const propsOrGetProps = value ? value[elementKey] : null;
      if (typeof propsOrGetProps === "function") {
        return userProps ? propsOrGetProps(userProps) : null;
      }
      return propsOrGetProps;
    }).concat(userProps).reduce((acc, props) => {
      if (!props) {
        return acc;
      }
      Object.entries(props).forEach((_ref) => {
        let [key, value] = _ref;
        if (isItem && [ACTIVE_KEY, SELECTED_KEY].includes(key)) {
          return;
        }
        if (key.indexOf("on") === 0) {
          if (!map.has(key)) {
            map.set(key, []);
          }
          if (typeof value === "function") {
            var _map$get;
            (_map$get = map.get(key)) == null || _map$get.push(value);
            acc[key] = function() {
              var _map$get2;
              for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
                args[_key] = arguments[_key];
              }
              return (_map$get2 = map.get(key)) == null ? void 0 : _map$get2.map((fn) => fn(...args)).find((val) => val !== void 0);
            };
          }
        } else {
          acc[key] = value;
        }
      });
      return acc;
    }, {})
  };
}
function useInteractions(propsList) {
  if (propsList === void 0) {
    propsList = [];
  }
  const referenceDeps = propsList.map((key) => key == null ? void 0 : key.reference);
  const floatingDeps = propsList.map((key) => key == null ? void 0 : key.floating);
  const itemDeps = propsList.map((key) => key == null ? void 0 : key.item);
  const getReferenceProps = React2.useCallback(
    (userProps) => mergeProps(userProps, propsList, "reference"),
    // eslint-disable-next-line react-hooks/exhaustive-deps
    referenceDeps
  );
  const getFloatingProps = React2.useCallback(
    (userProps) => mergeProps(userProps, propsList, "floating"),
    // eslint-disable-next-line react-hooks/exhaustive-deps
    floatingDeps
  );
  const getItemProps = React2.useCallback(
    (userProps) => mergeProps(userProps, propsList, "item"),
    // eslint-disable-next-line react-hooks/exhaustive-deps
    itemDeps
  );
  return React2.useMemo(() => ({
    getReferenceProps,
    getFloatingProps,
    getItemProps
  }), [getReferenceProps, getFloatingProps, getItemProps]);
}
function getArgsWithCustomFloatingHeight(state, height) {
  return {
    ...state,
    rects: {
      ...state.rects,
      floating: {
        ...state.rects.floating,
        height
      }
    }
  };
}
var inner = (props) => ({
  name: "inner",
  options: props,
  async fn(state) {
    const {
      listRef,
      overflowRef,
      onFallbackChange,
      offset: innerOffset = 0,
      index: index2 = 0,
      minItemsVisible = 4,
      referenceOverflowThreshold = 0,
      scrollRef,
      ...detectOverflowOptions
    } = evaluate(props, state);
    const {
      rects,
      elements: {
        floating
      }
    } = state;
    const item = listRef.current[index2];
    const scrollEl = (scrollRef == null ? void 0 : scrollRef.current) || floating;
    const clientTop = floating.clientTop || scrollEl.clientTop;
    const floatingIsBordered = floating.clientTop !== 0;
    const scrollElIsBordered = scrollEl.clientTop !== 0;
    const floatingIsScrollEl = floating === scrollEl;
    if (true) {
      if (!state.placement.startsWith("bottom")) {
        warn('`placement` side must be "bottom" when using the `inner`', "middleware.");
      }
    }
    if (!item) {
      return {};
    }
    const nextArgs = {
      ...state,
      ...await offset(-item.offsetTop - floating.clientTop - rects.reference.height / 2 - item.offsetHeight / 2 - innerOffset).fn(state)
    };
    const overflow = await detectOverflow(getArgsWithCustomFloatingHeight(nextArgs, scrollEl.scrollHeight + clientTop + floating.clientTop), detectOverflowOptions);
    const refOverflow = await detectOverflow(nextArgs, {
      ...detectOverflowOptions,
      elementContext: "reference"
    });
    const diffY = max(0, overflow.top);
    const nextY = nextArgs.y + diffY;
    const isScrollable = scrollEl.scrollHeight > scrollEl.clientHeight;
    const rounder = isScrollable ? (v11) => v11 : round;
    const maxHeight = rounder(max(0, scrollEl.scrollHeight + (floatingIsBordered && floatingIsScrollEl || scrollElIsBordered ? clientTop * 2 : 0) - diffY - max(0, overflow.bottom)));
    scrollEl.style.maxHeight = maxHeight + "px";
    scrollEl.scrollTop = diffY;
    if (onFallbackChange) {
      const shouldFallback = scrollEl.offsetHeight < item.offsetHeight * min(minItemsVisible, listRef.current.length) - 1 || refOverflow.top >= -referenceOverflowThreshold || refOverflow.bottom >= -referenceOverflowThreshold;
      ReactDOM.flushSync(() => onFallbackChange(shouldFallback));
    }
    if (overflowRef) {
      overflowRef.current = await detectOverflow(getArgsWithCustomFloatingHeight({
        ...nextArgs,
        y: nextY
      }, scrollEl.offsetHeight + clientTop + floating.clientTop), detectOverflowOptions);
    }
    return {
      y: nextY
    };
  }
});
function useInnerOffset(context, props) {
  const {
    open,
    elements
  } = context;
  const {
    enabled = true,
    overflowRef,
    scrollRef,
    onChange: unstable_onChange
  } = props;
  const onChange = useEffectEvent(unstable_onChange);
  const controlledScrollingRef = React2.useRef(false);
  const prevScrollTopRef = React2.useRef(null);
  const initialOverflowRef = React2.useRef(null);
  React2.useEffect(() => {
    if (!enabled) return;
    function onWheel(e9) {
      if (e9.ctrlKey || !el || overflowRef.current == null) {
        return;
      }
      const dY = e9.deltaY;
      const isAtTop = overflowRef.current.top >= -0.5;
      const isAtBottom = overflowRef.current.bottom >= -0.5;
      const remainingScroll = el.scrollHeight - el.clientHeight;
      const sign = dY < 0 ? -1 : 1;
      const method = dY < 0 ? "max" : "min";
      if (el.scrollHeight <= el.clientHeight) {
        return;
      }
      if (!isAtTop && dY > 0 || !isAtBottom && dY < 0) {
        e9.preventDefault();
        ReactDOM.flushSync(() => {
          onChange((d14) => d14 + Math[method](dY, remainingScroll * sign));
        });
      } else if (/firefox/i.test(getUserAgent())) {
        el.scrollTop += dY;
      }
    }
    const el = (scrollRef == null ? void 0 : scrollRef.current) || elements.floating;
    if (open && el) {
      el.addEventListener("wheel", onWheel);
      requestAnimationFrame(() => {
        prevScrollTopRef.current = el.scrollTop;
        if (overflowRef.current != null) {
          initialOverflowRef.current = {
            ...overflowRef.current
          };
        }
      });
      return () => {
        prevScrollTopRef.current = null;
        initialOverflowRef.current = null;
        el.removeEventListener("wheel", onWheel);
      };
    }
  }, [enabled, open, elements.floating, overflowRef, scrollRef, onChange]);
  const floating = React2.useMemo(() => ({
    onKeyDown() {
      controlledScrollingRef.current = true;
    },
    onWheel() {
      controlledScrollingRef.current = false;
    },
    onPointerMove() {
      controlledScrollingRef.current = false;
    },
    onScroll() {
      const el = (scrollRef == null ? void 0 : scrollRef.current) || elements.floating;
      if (!overflowRef.current || !el || !controlledScrollingRef.current) {
        return;
      }
      if (prevScrollTopRef.current !== null) {
        const scrollDiff = el.scrollTop - prevScrollTopRef.current;
        if (overflowRef.current.bottom < -0.5 && scrollDiff < -1 || overflowRef.current.top < -0.5 && scrollDiff > 1) {
          ReactDOM.flushSync(() => onChange((d14) => d14 + scrollDiff));
        }
      }
      requestAnimationFrame(() => {
        prevScrollTopRef.current = el.scrollTop;
      });
    }
  }), [elements.floating, onChange, overflowRef, scrollRef]);
  return React2.useMemo(() => enabled ? {
    floating
  } : {}, [enabled, floating]);
}

// node_modules/@headlessui/react/dist/internal/floating.js
var j6 = __toESM(require_react(), 1);
var import_react70 = __toESM(require_react(), 1);
var y5 = (0, import_react70.createContext)({ styles: void 0, setReference: () => {
}, setFloating: () => {
}, getReferenceProps: () => ({}), getFloatingProps: () => ({}), slot: {} });
y5.displayName = "FloatingContext";
var $ = (0, import_react70.createContext)(null);
$.displayName = "PlacementContext";
function ye(e9) {
  return (0, import_react70.useMemo)(() => e9 ? typeof e9 == "string" ? { to: e9 } : e9 : null, [e9]);
}
function Fe() {
  return (0, import_react70.useContext)(y5).setReference;
}
function be() {
  return (0, import_react70.useContext)(y5).getReferenceProps;
}
function Te() {
  let { getFloatingProps: e9, slot: t14 } = (0, import_react70.useContext)(y5);
  return (0, import_react70.useCallback)((...n17) => Object.assign({}, e9(...n17), { "data-anchor": t14.anchor }), [e9, t14]);
}
function Re(e9 = null) {
  e9 === false && (e9 = null), typeof e9 == "string" && (e9 = { to: e9 });
  let t14 = (0, import_react70.useContext)($), n17 = (0, import_react70.useMemo)(() => e9, [JSON.stringify(e9, (l19, o19) => {
    var u25;
    return (u25 = o19 == null ? void 0 : o19.outerHTML) != null ? u25 : o19;
  })]);
  n(() => {
    t14 == null || t14(n17 != null ? n17 : null);
  }, [t14, n17]);
  let r21 = (0, import_react70.useContext)(y5);
  return (0, import_react70.useMemo)(() => [r21.setFloating, e9 ? r21.styles : {}], [r21.setFloating, e9, r21.styles]);
}
var D5 = 4;
function Ae({ children: e9, enabled: t14 = true }) {
  let [n17, r21] = (0, import_react70.useState)(null), [l19, o19] = (0, import_react70.useState)(0), u25 = (0, import_react70.useRef)(null), [f22, s21] = (0, import_react70.useState)(null);
  ce(f22);
  let i16 = t14 && n17 !== null && f22 !== null, { to: F7 = "bottom", gap: E13 = 0, offset: A5 = 0, padding: c21 = 0, inner: h15 } = ge(n17, f22), [a28, p13 = "center"] = F7.split(" ");
  n(() => {
    i16 && o19(0);
  }, [i16]);
  let { refs: b14, floatingStyles: S9, context: g6 } = useFloating2({ open: i16, placement: a28 === "selection" ? p13 === "center" ? "bottom" : `bottom-${p13}` : p13 === "center" ? `${a28}` : `${a28}-${p13}`, strategy: "absolute", transform: false, middleware: [offset({ mainAxis: a28 === "selection" ? 0 : E13, crossAxis: A5 }), shift({ padding: c21 }), a28 !== "selection" && flip({ padding: c21 }), a28 === "selection" && h15 ? inner({ ...h15, padding: c21, overflowRef: u25, offset: l19, minItemsVisible: D5, referenceOverflowThreshold: c21, onFallbackChange(P7) {
    var L8, N4;
    if (!P7) return;
    let d14 = g6.elements.floating;
    if (!d14) return;
    let M11 = parseFloat(getComputedStyle(d14).scrollPaddingBottom) || 0, I10 = Math.min(D5, d14.childElementCount), W4 = 0, B3 = 0;
    for (let m10 of (N4 = (L8 = g6.elements.floating) == null ? void 0 : L8.childNodes) != null ? N4 : []) if (n5(m10)) {
      let x10 = m10.offsetTop, k14 = x10 + m10.clientHeight + M11, H10 = d14.scrollTop, U3 = H10 + d14.clientHeight;
      if (x10 >= H10 && k14 <= U3) I10--;
      else {
        B3 = Math.max(0, Math.min(k14, U3) - Math.max(x10, H10)), W4 = m10.clientHeight;
        break;
      }
    }
    I10 >= 1 && o19((m10) => {
      let x10 = W4 * I10 - B3 + M11;
      return m10 >= x10 ? m10 : x10;
    });
  } }) : null, size({ padding: c21, apply({ availableWidth: P7, availableHeight: d14, elements: M11 }) {
    Object.assign(M11.floating.style, { overflow: "auto", maxWidth: `${P7}px`, maxHeight: `min(var(--anchor-max-height, 100vh), ${d14}px)` });
  } })].filter(Boolean), whileElementsMounted: autoUpdate }), [w12 = a28, V6 = p13] = g6.placement.split("-");
  a28 === "selection" && (w12 = "selection");
  let G6 = (0, import_react70.useMemo)(() => ({ anchor: [w12, V6].filter(Boolean).join(" ") }), [w12, V6]), K4 = useInnerOffset(g6, { overflowRef: u25, onChange: o19 }), { getReferenceProps: Q7, getFloatingProps: X5 } = useInteractions([K4]), Y4 = o4((P7) => {
    s21(P7), b14.setFloating(P7);
  });
  return j6.createElement($.Provider, { value: r21 }, j6.createElement(y5.Provider, { value: { setFloating: Y4, setReference: b14.setReference, styles: S9, getReferenceProps: Q7, getFloatingProps: X5, slot: G6 } }, e9));
}
function ce(e9) {
  n(() => {
    if (!e9) return;
    let t14 = new MutationObserver(() => {
      let n17 = window.getComputedStyle(e9).maxHeight, r21 = parseFloat(n17);
      if (isNaN(r21)) return;
      let l19 = parseInt(n17);
      isNaN(l19) || r21 !== l19 && (e9.style.maxHeight = `${Math.ceil(r21)}px`);
    });
    return t14.observe(e9, { attributes: true, attributeFilter: ["style"] }), () => {
      t14.disconnect();
    };
  }, [e9]);
}
function ge(e9, t14) {
  var o19, u25, f22;
  let n17 = O3((o19 = e9 == null ? void 0 : e9.gap) != null ? o19 : "var(--anchor-gap, 0)", t14), r21 = O3((u25 = e9 == null ? void 0 : e9.offset) != null ? u25 : "var(--anchor-offset, 0)", t14), l19 = O3((f22 = e9 == null ? void 0 : e9.padding) != null ? f22 : "var(--anchor-padding, 0)", t14);
  return { ...e9, gap: n17, offset: r21, padding: l19 };
}
function O3(e9, t14, n17 = void 0) {
  let r21 = p(), l19 = o4((s21, i16) => {
    if (s21 == null) return [n17, null];
    if (typeof s21 == "number") return [s21, null];
    if (typeof s21 == "string") {
      if (!i16) return [n17, null];
      let F7 = J2(s21, i16);
      return [F7, (E13) => {
        let A5 = q(s21);
        {
          let c21 = A5.map((h15) => window.getComputedStyle(i16).getPropertyValue(h15));
          r21.requestAnimationFrame(function h15() {
            r21.nextFrame(h15);
            let a28 = false;
            for (let [b14, S9] of A5.entries()) {
              let g6 = window.getComputedStyle(i16).getPropertyValue(S9);
              if (c21[b14] !== g6) {
                c21[b14] = g6, a28 = true;
                break;
              }
            }
            if (!a28) return;
            let p13 = J2(s21, i16);
            F7 !== p13 && (E13(p13), F7 = p13);
          });
        }
        return r21.dispose;
      }];
    }
    return [n17, null];
  }), o19 = (0, import_react70.useMemo)(() => l19(e9, t14)[0], [e9, t14]), [u25 = o19, f22] = (0, import_react70.useState)();
  return n(() => {
    let [s21, i16] = l19(e9, t14);
    if (f22(s21), !!i16) return i16(f22);
  }, [e9, t14]), u25;
}
function q(e9) {
  let t14 = /var\((.*)\)/.exec(e9);
  if (t14) {
    let n17 = t14[1].indexOf(",");
    if (n17 === -1) return [t14[1]];
    let r21 = t14[1].slice(0, n17).trim(), l19 = t14[1].slice(n17 + 1).trim();
    return l19 ? [r21, ...q(l19)] : [r21];
  }
  return [];
}
function J2(e9, t14) {
  let n17 = document.createElement("div");
  t14.appendChild(n17), n17.style.setProperty("margin-top", "0px", "important"), n17.style.setProperty("margin-top", e9, "important");
  let r21 = parseFloat(window.getComputedStyle(n17).marginTop) || 0;
  return t14.removeChild(n17), r21;
}

// node_modules/@headlessui/react/dist/internal/frozen.js
var import_react71 = __toESM(require_react(), 1);
function f13({ children: t14, freeze: e9 }, o19) {
  let n17 = u16(e9, t14);
  return (0, import_react71.isValidElement)(n17) ? (0, import_react71.cloneElement)(n17, { ref: o19 }) : import_react71.default.createElement(import_react71.default.Fragment, null, n17);
}
var s12 = import_react71.default.forwardRef(f13);
function u16(t14, e9) {
  let [o19, n17] = (0, import_react71.useState)(e9);
  return !t14 && o19 !== e9 && n17(e9), t14 ? o19 : e9;
}

// node_modules/@headlessui/react/dist/internal/open-closed.js
var import_react72 = __toESM(require_react(), 1);
var n12 = (0, import_react72.createContext)(null);
n12.displayName = "OpenClosedContext";
var i10 = ((e9) => (e9[e9.Open = 1] = "Open", e9[e9.Closed = 2] = "Closed", e9[e9.Closing = 4] = "Closing", e9[e9.Opening = 8] = "Opening", e9))(i10 || {});
function u17() {
  return (0, import_react72.useContext)(n12);
}
function c11({ value: o19, children: t14 }) {
  return import_react72.default.createElement(n12.Provider, { value: o19 }, t14);
}
function s13({ children: o19 }) {
  return import_react72.default.createElement(n12.Provider, { value: null }, o19);
}

// node_modules/@headlessui/react/dist/utils/document-ready.js
function t9(n17) {
  function e9() {
    document.readyState !== "loading" && (n17(), document.removeEventListener("DOMContentLoaded", e9));
  }
  typeof window != "undefined" && typeof document != "undefined" && (document.addEventListener("DOMContentLoaded", e9), e9());
}

// node_modules/@headlessui/react/dist/utils/active-element-history.js
var n13 = [];
t9(() => {
  function e9(t14) {
    if (!i4(t14.target) || t14.target === document.body || n13[0] === t14.target) return;
    let r21 = t14.target;
    r21 = r21.closest(E5), n13.unshift(r21 != null ? r21 : t14.target), n13 = n13.filter((o19) => o19 != null && o19.isConnected), n13.splice(10);
  }
  window.addEventListener("click", e9, { capture: true }), window.addEventListener("mousedown", e9, { capture: true }), window.addEventListener("focus", e9, { capture: true }), document.body.addEventListener("click", e9, { capture: true }), document.body.addEventListener("mousedown", e9, { capture: true }), document.body.addEventListener("focus", e9, { capture: true });
});

// node_modules/@headlessui/react/dist/utils/calculate-active-index.js
function u18(l19) {
  throw new Error("Unexpected object: " + l19);
}
var c12 = ((i16) => (i16[i16.First = 0] = "First", i16[i16.Previous = 1] = "Previous", i16[i16.Next = 2] = "Next", i16[i16.Last = 3] = "Last", i16[i16.Specific = 4] = "Specific", i16[i16.Nothing = 5] = "Nothing", i16))(c12 || {});
function f14(l19, n17) {
  let t14 = n17.resolveItems();
  if (t14.length <= 0) return null;
  let r21 = n17.resolveActiveIndex(), s21 = r21 != null ? r21 : -1;
  switch (l19.focus) {
    case 0: {
      for (let e9 = 0; e9 < t14.length; ++e9) if (!n17.resolveDisabled(t14[e9], e9, t14)) return e9;
      return r21;
    }
    case 1: {
      s21 === -1 && (s21 = t14.length);
      for (let e9 = s21 - 1; e9 >= 0; --e9) if (!n17.resolveDisabled(t14[e9], e9, t14)) return e9;
      return r21;
    }
    case 2: {
      for (let e9 = s21 + 1; e9 < t14.length; ++e9) if (!n17.resolveDisabled(t14[e9], e9, t14)) return e9;
      return r21;
    }
    case 3: {
      for (let e9 = t14.length - 1; e9 >= 0; --e9) if (!n17.resolveDisabled(t14[e9], e9, t14)) return e9;
      return r21;
    }
    case 4: {
      for (let e9 = 0; e9 < t14.length; ++e9) if (n17.resolveId(t14[e9], e9, t14) === l19.id) return e9;
      return r21;
    }
    case 5:
      return null;
    default:
      u18(l19);
  }
}

// node_modules/@headlessui/react/dist/components/portal/portal.js
var import_react75 = __toESM(require_react(), 1);
var import_react_dom7 = __toESM(require_react_dom(), 1);

// node_modules/@headlessui/react/dist/hooks/use-on-unmount.js
var import_react73 = __toESM(require_react(), 1);
function c13(t14) {
  let r21 = o4(t14), e9 = (0, import_react73.useRef)(false);
  (0, import_react73.useEffect)(() => (e9.current = false, () => {
    e9.current = true, t(() => {
      e9.current && r21();
    });
  }), [r21]);
}

// node_modules/@headlessui/react/dist/hooks/use-server-handoff-complete.js
var t10 = __toESM(require_react(), 1);
function s14() {
  let r21 = typeof document == "undefined";
  return "useSyncExternalStore" in t10 ? ((o19) => o19.useSyncExternalStore)(t10)(() => () => {
  }, () => false, () => !r21) : false;
}
function l14() {
  let r21 = s14(), [e9, n17] = t10.useState(s.isHandoffComplete);
  return e9 && s.isHandoffComplete === false && n17(false), t10.useEffect(() => {
    e9 !== true && n17(true);
  }, [e9]), t10.useEffect(() => s.handoff(), []), r21 ? false : e9;
}

// node_modules/@headlessui/react/dist/internal/portal-force-root.js
var import_react74 = __toESM(require_react(), 1);
var e7 = (0, import_react74.createContext)(false);
function a17() {
  return (0, import_react74.useContext)(e7);
}
function l15(o19) {
  return import_react74.default.createElement(e7.Provider, { value: o19.force }, o19.children);
}

// node_modules/@headlessui/react/dist/components/portal/portal.js
function j7(e9) {
  let o19 = a17(), l19 = (0, import_react75.useContext)(c15), [r21, p13] = (0, import_react75.useState)(() => {
    var s21;
    if (!o19 && l19 !== null) return (s21 = l19.current) != null ? s21 : null;
    if (s.isServer) return null;
    let t14 = e9 == null ? void 0 : e9.getElementById("headlessui-portal-root");
    if (t14) return t14;
    if (e9 === null) return null;
    let n17 = e9.createElement("div");
    return n17.setAttribute("id", "headlessui-portal-root"), e9.body.appendChild(n17);
  });
  return (0, import_react75.useEffect)(() => {
    r21 !== null && (e9 != null && e9.body.contains(r21) || e9 == null || e9.body.appendChild(r21));
  }, [r21, e9]), (0, import_react75.useEffect)(() => {
    o19 || l19 !== null && p13(l19.current);
  }, [l19, p13, o19]), r21;
}
var _4 = import_react75.Fragment;
var I5 = Y(function(o19, l19) {
  let { ownerDocument: r21 = null, ...p13 } = o19, t14 = (0, import_react75.useRef)(null), n17 = y(T((a28) => {
    t14.current = a28;
  }), l19), s21 = u13(t14.current), C11 = r21 != null ? r21 : s21, u25 = j7(C11), y10 = (0, import_react75.useContext)(m8), g6 = p(), v11 = l14(), M11 = K();
  return c13(() => {
    var a28;
    u25 && u25.childNodes.length <= 0 && ((a28 = u25.parentElement) == null || a28.removeChild(u25));
  }), !u25 || !v11 ? null : (0, import_react_dom7.createPortal)(import_react75.default.createElement("div", { "data-headlessui-portal": "", ref: (a28) => {
    g6.dispose(), y10 && a28 && g6.add(y10.register(a28));
  } }, M11({ ourProps: { ref: n17 }, theirProps: p13, slot: {}, defaultTag: _4, name: "Portal" })), u25);
});
function D6(e9, o19) {
  let l19 = y(o19), { enabled: r21 = true, ownerDocument: p13, ...t14 } = e9, n17 = K();
  return r21 ? import_react75.default.createElement(I5, { ...t14, ownerDocument: p13, ref: l19 }) : n17({ ourProps: { ref: l19 }, theirProps: t14, slot: {}, defaultTag: _4, name: "Portal" });
}
var J3 = import_react75.Fragment;
var c15 = (0, import_react75.createContext)(null);
function X(e9, o19) {
  let { target: l19, ...r21 } = e9, t14 = { ref: y(o19) }, n17 = K();
  return import_react75.default.createElement(c15.Provider, { value: l19 }, n17({ ourProps: t14, theirProps: r21, defaultTag: J3, name: "Popover.Group" }));
}
var m8 = (0, import_react75.createContext)(null);
function oe() {
  let e9 = (0, import_react75.useContext)(m8), o19 = (0, import_react75.useRef)([]), l19 = o4((t14) => (o19.current.push(t14), e9 && e9.register(t14), () => r21(t14))), r21 = o4((t14) => {
    let n17 = o19.current.indexOf(t14);
    n17 !== -1 && o19.current.splice(n17, 1), e9 && e9.unregister(t14);
  }), p13 = (0, import_react75.useMemo)(() => ({ register: l19, unregister: r21, portals: o19 }), [l19, r21, o19]);
  return [o19, (0, import_react75.useMemo)(() => function({ children: n17 }) {
    return import_react75.default.createElement(m8.Provider, { value: p13 }, n17);
  }, [p13])];
}
var k6 = Y(D6);
var B = Y(X);
var le = Object.assign(k6, { Group: B });

// node_modules/@headlessui/react/dist/utils/element-movement.js
var c16 = { Idle: { kind: "Idle" }, Tracked: (e9) => ({ kind: "Tracked", position: e9 }), Moved: { kind: "Moved" } };
function a18(e9) {
  let t14 = e9.getBoundingClientRect();
  return `${t14.x},${t14.y}`;
}
function p6(e9, t14, i16) {
  let n17 = o2();
  if (t14.kind === "Tracked") {
    let o19 = function() {
      d14 !== a18(e9) && (n17.dispose(), i16());
    };
    var f22 = o19;
    let { position: d14 } = t14, s21 = new ResizeObserver(o19);
    s21.observe(e9), n17.add(() => s21.disconnect()), n17.addEventListener(window, "scroll", o19, { passive: true }), n17.addEventListener(window, "resize", o19);
  }
  return () => n17.dispose();
}

// node_modules/@headlessui/react/dist/components/combobox/combobox-machine.js
var I6 = Object.defineProperty;
var h7 = (t14, i16, e9) => i16 in t14 ? I6(t14, i16, { enumerable: true, configurable: true, writable: true, value: e9 }) : t14[i16] = e9;
var f16 = (t14, i16, e9) => (h7(t14, typeof i16 != "symbol" ? i16 + "" : i16, e9), e9);
var P4 = ((e9) => (e9[e9.Open = 0] = "Open", e9[e9.Closed = 1] = "Closed", e9))(P4 || {});
var k7 = ((e9) => (e9[e9.Single = 0] = "Single", e9[e9.Multi = 1] = "Multi", e9))(k7 || {});
var _5 = ((n17) => (n17[n17.Pointer = 0] = "Pointer", n17[n17.Focus = 1] = "Focus", n17[n17.Other = 2] = "Other", n17))(_5 || {});
var D7 = ((l19) => (l19[l19.OpenCombobox = 0] = "OpenCombobox", l19[l19.CloseCombobox = 1] = "CloseCombobox", l19[l19.GoToOption = 2] = "GoToOption", l19[l19.SetTyping = 3] = "SetTyping", l19[l19.RegisterOption = 4] = "RegisterOption", l19[l19.UnregisterOption = 5] = "UnregisterOption", l19[l19.DefaultToFirstOption = 6] = "DefaultToFirstOption", l19[l19.SetActivationTrigger = 7] = "SetActivationTrigger", l19[l19.UpdateVirtualConfiguration = 8] = "UpdateVirtualConfiguration", l19[l19.SetInputElement = 9] = "SetInputElement", l19[l19.SetButtonElement = 10] = "SetButtonElement", l19[l19.SetOptionsElement = 11] = "SetOptionsElement", l19[l19.MarkInputAsMoved = 12] = "MarkInputAsMoved", l19))(D7 || {});
function v8(t14, i16 = (e9) => e9) {
  let e9 = t14.activeOptionIndex !== null ? t14.options[t14.activeOptionIndex] : null, n17 = i16(t14.options.slice()), o19 = n17.length > 0 && n17[0].dataRef.current.order !== null ? n17.sort((u25, a28) => u25.dataRef.current.order - a28.dataRef.current.order) : G2(n17, (u25) => u25.dataRef.current.domRef.current), r21 = e9 ? o19.indexOf(e9) : null;
  return r21 === -1 && (r21 = null), { options: o19, activeOptionIndex: r21 };
}
var j8 = { [1](t14) {
  var e9;
  if ((e9 = t14.dataRef.current) != null && e9.disabled || t14.comboboxState === 1) return t14;
  let i16 = t14.inputElement ? c16.Tracked(a18(t14.inputElement)) : t14.inputPositionState;
  return { ...t14, activeOptionIndex: null, comboboxState: 1, isTyping: false, activationTrigger: 2, inputPositionState: i16, __demoMode: false };
}, [0](t14) {
  var i16, e9;
  if ((i16 = t14.dataRef.current) != null && i16.disabled || t14.comboboxState === 0) return t14;
  if ((e9 = t14.dataRef.current) != null && e9.value) {
    let n17 = t14.dataRef.current.calculateIndex(t14.dataRef.current.value);
    if (n17 !== -1) return { ...t14, activeOptionIndex: n17, comboboxState: 0, __demoMode: false, inputPositionState: c16.Idle };
  }
  return { ...t14, comboboxState: 0, inputPositionState: c16.Idle, __demoMode: false };
}, [3](t14, i16) {
  return t14.isTyping === i16.isTyping ? t14 : { ...t14, isTyping: i16.isTyping };
}, [2](t14, i16) {
  var r21, u25, a28, s21;
  if ((r21 = t14.dataRef.current) != null && r21.disabled || t14.optionsElement && !((u25 = t14.dataRef.current) != null && u25.optionsPropsRef.current.static) && t14.comboboxState === 1) return t14;
  if (t14.virtual) {
    let { options: p13, disabled: c21 } = t14.virtual, m10 = i16.focus === c12.Specific ? i16.idx : f14(i16, { resolveItems: () => p13, resolveActiveIndex: () => {
      var l19, x10;
      return (x10 = (l19 = t14.activeOptionIndex) != null ? l19 : p13.findIndex((S9) => !c21(S9))) != null ? x10 : null;
    }, resolveDisabled: c21, resolveId() {
      throw new Error("Function not implemented.");
    } }), b14 = (a28 = i16.trigger) != null ? a28 : 2;
    return t14.activeOptionIndex === m10 && t14.activationTrigger === b14 ? t14 : { ...t14, activeOptionIndex: m10, activationTrigger: b14, isTyping: false, __demoMode: false };
  }
  let e9 = v8(t14);
  if (e9.activeOptionIndex === null) {
    let p13 = e9.options.findIndex((c21) => !c21.dataRef.current.disabled);
    p13 !== -1 && (e9.activeOptionIndex = p13);
  }
  let n17 = i16.focus === c12.Specific ? i16.idx : f14(i16, { resolveItems: () => e9.options, resolveActiveIndex: () => e9.activeOptionIndex, resolveId: (p13) => p13.id, resolveDisabled: (p13) => p13.dataRef.current.disabled }), o19 = (s21 = i16.trigger) != null ? s21 : 2;
  return t14.activeOptionIndex === n17 && t14.activationTrigger === o19 ? t14 : { ...t14, ...e9, isTyping: false, activeOptionIndex: n17, activationTrigger: o19, __demoMode: false };
}, [4]: (t14, i16) => {
  var r21, u25, a28, s21;
  if ((r21 = t14.dataRef.current) != null && r21.virtual) return { ...t14, options: [...t14.options, i16.payload] };
  let e9 = i16.payload, n17 = v8(t14, (p13) => (p13.push(e9), p13));
  t14.activeOptionIndex === null && (a28 = (u25 = t14.dataRef.current).isSelected) != null && a28.call(u25, i16.payload.dataRef.current.value) && (n17.activeOptionIndex = n17.options.indexOf(e9));
  let o19 = { ...t14, ...n17, activationTrigger: 2 };
  return (s21 = t14.dataRef.current) != null && s21.__demoMode && t14.dataRef.current.value === void 0 && (o19.activeOptionIndex = 0), o19;
}, [5]: (t14, i16) => {
  var n17;
  if ((n17 = t14.dataRef.current) != null && n17.virtual) return { ...t14, options: t14.options.filter((o19) => o19.id !== i16.id) };
  let e9 = v8(t14, (o19) => {
    let r21 = o19.findIndex((u25) => u25.id === i16.id);
    return r21 !== -1 && o19.splice(r21, 1), o19;
  });
  return { ...t14, ...e9, activationTrigger: 2 };
}, [6]: (t14, i16) => t14.defaultToFirstOption === i16.value ? t14 : { ...t14, defaultToFirstOption: i16.value }, [7]: (t14, i16) => t14.activationTrigger === i16.trigger ? t14 : { ...t14, activationTrigger: i16.trigger }, [8]: (t14, i16) => {
  var n17, o19;
  if (t14.virtual === null) return { ...t14, virtual: { options: i16.options, disabled: (n17 = i16.disabled) != null ? n17 : () => false } };
  if (t14.virtual.options === i16.options && t14.virtual.disabled === i16.disabled) return t14;
  let e9 = t14.activeOptionIndex;
  if (t14.activeOptionIndex !== null) {
    let r21 = i16.options.indexOf(t14.virtual.options[t14.activeOptionIndex]);
    r21 !== -1 ? e9 = r21 : e9 = null;
  }
  return { ...t14, activeOptionIndex: e9, virtual: { options: i16.options, disabled: (o19 = i16.disabled) != null ? o19 : () => false } };
}, [9]: (t14, i16) => t14.inputElement === i16.element ? t14 : { ...t14, inputElement: i16.element }, [10]: (t14, i16) => t14.buttonElement === i16.element ? t14 : { ...t14, buttonElement: i16.element }, [11]: (t14, i16) => t14.optionsElement === i16.element ? t14 : { ...t14, optionsElement: i16.element }, [12](t14) {
  return t14.inputPositionState.kind !== "Tracked" ? t14 : { ...t14, inputPositionState: c16.Moved };
} };
var y6 = class _y extends T3 {
  constructor(e9) {
    super(e9);
    f16(this, "actions", { onChange: (e10) => {
      let { onChange: n17, compare: o19, mode: r21, value: u25 } = this.state.dataRef.current;
      return u(r21, { [0]: () => n17 == null ? void 0 : n17(e10), [1]: () => {
        let a28 = u25.slice(), s21 = a28.findIndex((p13) => o19(p13, e10));
        return s21 === -1 ? a28.push(e10) : a28.splice(s21, 1), n17 == null ? void 0 : n17(a28);
      } });
    }, registerOption: (e10, n17) => (this.send({ type: 4, payload: { id: e10, dataRef: n17 } }), () => {
      this.state.activeOptionIndex === this.state.dataRef.current.calculateIndex(n17.current.value) && this.send({ type: 6, value: true }), this.send({ type: 5, id: e10 });
    }), goToOption: (e10, n17) => (this.send({ type: 6, value: false }), this.send({ type: 2, ...e10, trigger: n17 })), setIsTyping: (e10) => {
      this.send({ type: 3, isTyping: e10 });
    }, closeCombobox: () => {
      var e10, n17;
      this.send({ type: 1 }), this.send({ type: 6, value: false }), (n17 = (e10 = this.state.dataRef.current).onClose) == null || n17.call(e10);
    }, openCombobox: () => {
      this.send({ type: 0 }), this.send({ type: 6, value: true });
    }, setActivationTrigger: (e10) => {
      this.send({ type: 7, trigger: e10 });
    }, selectActiveOption: () => {
      let e10 = this.selectors.activeOptionIndex(this.state);
      if (e10 !== null) {
        if (this.actions.setIsTyping(false), this.state.virtual) this.actions.onChange(this.state.virtual.options[e10]);
        else {
          let { dataRef: n17 } = this.state.options[e10];
          this.actions.onChange(n17.current.value);
        }
        this.actions.goToOption({ focus: c12.Specific, idx: e10 });
      }
    }, setInputElement: (e10) => {
      this.send({ type: 9, element: e10 });
    }, setButtonElement: (e10) => {
      this.send({ type: 10, element: e10 });
    }, setOptionsElement: (e10) => {
      this.send({ type: 11, element: e10 });
    } });
    f16(this, "selectors", { activeDescendantId: (e10) => {
      var o19, r21;
      let n17 = this.selectors.activeOptionIndex(e10);
      if (n17 !== null) return e10.virtual ? (r21 = e10.options.find((u25) => !u25.dataRef.current.disabled && e10.dataRef.current.compare(u25.dataRef.current.value, e10.virtual.options[n17]))) == null ? void 0 : r21.id : (o19 = e10.options[n17]) == null ? void 0 : o19.id;
    }, activeOptionIndex: (e10) => {
      if (e10.defaultToFirstOption && e10.activeOptionIndex === null && (e10.virtual ? e10.virtual.options.length > 0 : e10.options.length > 0)) {
        if (e10.virtual) {
          let { options: o19, disabled: r21 } = e10.virtual, u25 = o19.findIndex((a28) => {
            var s21;
            return !((s21 = r21 == null ? void 0 : r21(a28)) != null && s21);
          });
          if (u25 !== -1) return u25;
        }
        let n17 = e10.options.findIndex((o19) => !o19.dataRef.current.disabled);
        if (n17 !== -1) return n17;
      }
      return e10.activeOptionIndex;
    }, activeOption: (e10) => {
      var o19, r21;
      let n17 = this.selectors.activeOptionIndex(e10);
      return n17 === null ? null : e10.virtual ? e10.virtual.options[n17 != null ? n17 : 0] : (r21 = (o19 = e10.options[n17]) == null ? void 0 : o19.dataRef.current.value) != null ? r21 : null;
    }, isActive: (e10, n17, o19) => {
      var u25;
      let r21 = this.selectors.activeOptionIndex(e10);
      return r21 === null ? false : e10.virtual ? r21 === e10.dataRef.current.calculateIndex(n17) : ((u25 = e10.options[r21]) == null ? void 0 : u25.id) === o19;
    }, shouldScrollIntoView: (e10, n17, o19) => !(e10.virtual || e10.__demoMode || e10.comboboxState !== 0 || e10.activationTrigger === 0 || !this.selectors.isActive(e10, n17, o19)), didInputMove(e10) {
      return e10.inputPositionState.kind === "Moved";
    } });
    {
      let n17 = this.state.id, o19 = x2.get(null);
      this.disposables.add(o19.on(k4.Push, (r21) => {
        !o19.selectors.isTop(r21, n17) && this.state.comboboxState === 0 && this.actions.closeCombobox();
      })), this.on(0, () => o19.actions.push(n17)), this.on(1, () => o19.actions.pop(n17));
    }
    this.disposables.group((n17) => {
      this.on(1, (o19) => {
        o19.inputElement && (n17.dispose(), n17.add(p6(o19.inputElement, o19.inputPositionState, () => {
          this.send({ type: 12 });
        })));
      });
    });
  }
  static new({ id: e9, virtual: n17 = null, __demoMode: o19 = false }) {
    var r21;
    return new _y({ id: e9, dataRef: { current: {} }, comboboxState: o19 ? 0 : 1, isTyping: false, options: [], virtual: n17 ? { options: n17.options, disabled: (r21 = n17.disabled) != null ? r21 : () => false } : null, activeOptionIndex: null, activationTrigger: 2, inputElement: null, buttonElement: null, optionsElement: null, __demoMode: o19, inputPositionState: c16.Idle });
  }
  reduce(e9, n17) {
    return u(n17.type, j8, e9, n17);
  }
};

// node_modules/@headlessui/react/dist/components/combobox/combobox-machine-glue.js
var import_react76 = __toESM(require_react(), 1);
var u20 = (0, import_react76.createContext)(null);
function p7(n17) {
  let o19 = (0, import_react76.useContext)(u20);
  if (o19 === null) {
    let e9 = new Error(`<${n17} /> is missing a parent <Combobox /> component.`);
    throw Error.captureStackTrace && Error.captureStackTrace(e9, b7), e9;
  }
  return o19;
}
function b7({ id: n17, virtual: o19 = null, __demoMode: e9 = false }) {
  let t14 = (0, import_react76.useMemo)(() => y6.new({ id: n17, virtual: o19, __demoMode: e9 }), []);
  return c13(() => t14.dispose()), t14;
}

// node_modules/@headlessui/react/dist/components/combobox/combobox.js
var de2 = (0, import_react77.createContext)(null);
de2.displayName = "ComboboxDataContext";
function te(T10) {
  let O6 = (0, import_react77.useContext)(de2);
  if (O6 === null) {
    let e9 = new Error(`<${T10} /> is missing a parent <Combobox /> component.`);
    throw Error.captureStackTrace && Error.captureStackTrace(e9, te), e9;
  }
  return O6;
}
var Le = (0, import_react77.createContext)(null);
function Eo(T10) {
  let O6 = p7("VirtualProvider"), e9 = te("VirtualProvider"), { options: o19 } = e9.virtual, E13 = S3(O6, (a28) => a28.optionsElement), [R8, y10] = (0, import_react77.useMemo)(() => {
    let a28 = E13;
    if (!a28) return [0, 0];
    let u25 = window.getComputedStyle(a28);
    return [parseFloat(u25.paddingBlockStart || u25.paddingTop), parseFloat(u25.paddingBlockEnd || u25.paddingBottom)];
  }, [E13]), b14 = useVirtualizer({ enabled: o19.length !== 0, scrollPaddingStart: R8, scrollPaddingEnd: y10, count: o19.length, estimateSize() {
    return 40;
  }, getScrollElement() {
    return O6.state.optionsElement;
  }, overscan: 12 }), [h15, p13] = (0, import_react77.useState)(0);
  n(() => {
    p13((a28) => a28 + 1);
  }, [o19]);
  let f22 = b14.getVirtualItems(), n17 = S3(O6, (a28) => a28.activationTrigger === _5.Pointer), m10 = S3(O6, O6.selectors.activeOptionIndex);
  return f22.length === 0 ? null : import_react77.default.createElement(Le.Provider, { value: b14 }, import_react77.default.createElement("div", { style: { position: "relative", width: "100%", height: `${b14.getTotalSize()}px` }, ref: (a28) => {
    a28 && (n17 || m10 !== null && o19.length > m10 && b14.scrollToIndex(m10));
  } }, f22.map((a28) => {
    var u25;
    return import_react77.default.createElement(import_react77.Fragment, { key: a28.key }, import_react77.default.cloneElement((u25 = T10.children) == null ? void 0 : u25.call(T10, { ...T10.slot, option: o19[a28.index] }), { key: `${h15}-${a28.key}`, "data-index": a28.index, "aria-setsize": o19.length, "aria-posinset": a28.index + 1, style: { position: "absolute", top: 0, left: 0, transform: `translateY(${a28.start}px)`, overflowAnchor: "none" } }));
  })));
}
var ho = import_react77.Fragment;
function Ao(T10, O6) {
  let e9 = (0, import_react39.useId)(), o19 = a3(), { value: E13, defaultValue: R8, onChange: y10, form: b14, name: h15, by: p13, invalid: f22 = false, disabled: n17 = o19 || false, onClose: m10, __demoMode: a28 = false, multiple: u25 = false, immediate: A5 = false, virtual: d14 = null, nullable: X5, ...G6 } = T10, C11 = l3(R8), [x10 = u25 ? [] : void 0, v11] = b2(E13, y10, C11), c21 = b7({ id: e9, virtual: d14, __demoMode: a28 }), z4 = (0, import_react77.useRef)({ static: false, hold: false }), D12 = u9(p13), K4 = o4((i16) => d14 ? p13 === null ? d14.options.indexOf(i16) : d14.options.findIndex((M11) => D12(M11, i16)) : c21.state.options.findIndex((M11) => D12(M11.dataRef.current.value, i16))), W4 = (0, import_react77.useCallback)((i16) => u(l19.mode, { [k7.Multi]: () => x10.some((M11) => D12(M11, i16)), [k7.Single]: () => D12(x10, i16) }), [x10]), S9 = S3(c21, (i16) => i16.virtual), j11 = o4(() => m10 == null ? void 0 : m10()), l19 = (0, import_react77.useMemo)(() => ({ __demoMode: a28, immediate: A5, optionsPropsRef: z4, value: x10, defaultValue: C11, disabled: n17, invalid: f22, mode: u25 ? k7.Multi : k7.Single, virtual: d14 ? S9 : null, onChange: v11, isSelected: W4, calculateIndex: K4, compare: D12, onClose: j11 }), [a28, A5, z4, x10, C11, n17, f22, u25, d14, S9, v11, W4, K4, D12, j11]);
  n(() => {
    var i16;
    d14 && c21.send({ type: D7.UpdateVirtualConfiguration, options: d14.options, disabled: (i16 = d14.disabled) != null ? i16 : null });
  }, [d14, d14 == null ? void 0 : d14.options, d14 == null ? void 0 : d14.disabled]), n(() => {
    c21.state.dataRef.current = l19;
  }, [l19]);
  let [k14, Y4, s21, U3] = S3(c21, (i16) => [i16.comboboxState, i16.buttonElement, i16.inputElement, i16.optionsElement]), $5 = x2.get(null), ne4 = S3($5, (0, import_react77.useCallback)((i16) => $5.selectors.isTop(i16, e9), [$5, e9]));
  k5(ne4, [Y4, s21, U3], () => c21.actions.closeCombobox());
  let be3 = S3(c21, c21.selectors.activeOptionIndex), ee6 = S3(c21, c21.selectors.activeOption), q5 = n2({ open: k14 === P4.Open, disabled: n17, invalid: f22, activeIndex: be3, activeOption: ee6, value: x10 }), [t14, V6] = V2(), P7 = O6 === null ? {} : { ref: O6 }, N4 = (0, import_react77.useCallback)(() => {
    if (C11 !== void 0) return v11 == null ? void 0 : v11(C11);
  }, [v11, C11]), g6 = K();
  return import_react77.default.createElement(V6, { value: t14, props: { htmlFor: s21 == null ? void 0 : s21.id }, slot: { open: k14 === P4.Open, disabled: n17 } }, import_react77.default.createElement(Ae, null, import_react77.default.createElement(de2.Provider, { value: l19 }, import_react77.default.createElement(u20.Provider, { value: c21 }, import_react77.default.createElement(c11, { value: u(k14, { [P4.Open]: i10.Open, [P4.Closed]: i10.Closed }) }, h15 != null && import_react77.default.createElement(j2, { disabled: n17, data: x10 != null ? { [h15]: x10 } : {}, form: b14, onReset: N4 }), g6({ ourProps: P7, theirProps: G6, slot: q5, defaultTag: ho, name: "Combobox" }))))));
}
var Io = "input";
function Ro(T10, O6) {
  var ee6, q5;
  let e9 = p7("Combobox.Input"), o19 = te("Combobox.Input"), E13 = (0, import_react39.useId)(), R8 = u4(), { id: y10 = R8 || `headlessui-combobox-input-${E13}`, onChange: b14, displayValue: h15, disabled: p13 = o19.disabled || false, autoFocus: f22 = false, type: n17 = "text", ...m10 } = T10, a28 = (0, import_react77.useRef)(null), u25 = y(a28, O6, Fe(), e9.actions.setInputElement), [A5, d14] = S3(e9, (t14) => [t14.comboboxState, t14.isTyping]), X5 = p(), G6 = o4(() => {
    e9.actions.onChange(null), e9.state.optionsElement && (e9.state.optionsElement.scrollTop = 0), e9.actions.goToOption({ focus: c12.Nothing });
  }), C11 = (0, import_react77.useMemo)(() => {
    var t14;
    return typeof h15 == "function" && o19.value !== void 0 ? (t14 = h15(o19.value)) != null ? t14 : "" : typeof o19.value == "string" ? o19.value : "";
  }, [o19.value, h15]);
  m7(([t14, V6], [P7, N4]) => {
    if (e9.state.isTyping) return;
    let g6 = a28.current;
    g6 && ((N4 === P4.Open && V6 === P4.Closed || t14 !== P7) && (g6.value = t14), requestAnimationFrame(() => {
      if (e9.state.isTyping || !g6 || d2(g6)) return;
      let { selectionStart: i16, selectionEnd: M11 } = g6;
      Math.abs((M11 != null ? M11 : 0) - (i16 != null ? i16 : 0)) === 0 && i16 === 0 && g6.setSelectionRange(g6.value.length, g6.value.length);
    }));
  }, [C11, A5, d14]), m7(([t14], [V6]) => {
    if (t14 === P4.Open && V6 === P4.Closed) {
      if (e9.state.isTyping) return;
      let P7 = a28.current;
      if (!P7) return;
      let N4 = P7.value, { selectionStart: g6, selectionEnd: i16, selectionDirection: M11 } = P7;
      P7.value = "", P7.value = N4, M11 !== null ? P7.setSelectionRange(g6, i16, M11) : P7.setSelectionRange(g6, i16);
    }
  }, [A5]);
  let x10 = (0, import_react77.useRef)(false), v11 = o4(() => {
    x10.current = true;
  }), c21 = o4(() => {
    X5.nextFrame(() => {
      x10.current = false;
    });
  }), z4 = o4((t14) => {
    switch (e9.actions.setIsTyping(true), t14.key) {
      case o8.Enter:
        if (e9.state.comboboxState !== P4.Open || x10.current) return;
        if (t14.preventDefault(), t14.stopPropagation(), e9.selectors.activeOptionIndex(e9.state) === null) {
          e9.actions.closeCombobox();
          return;
        }
        e9.actions.selectActiveOption(), o19.mode === k7.Single && e9.actions.closeCombobox();
        break;
      case o8.ArrowDown:
        return t14.preventDefault(), t14.stopPropagation(), u(e9.state.comboboxState, { [P4.Open]: () => e9.actions.goToOption({ focus: c12.Next }), [P4.Closed]: () => e9.actions.openCombobox() });
      case o8.ArrowUp:
        return t14.preventDefault(), t14.stopPropagation(), u(e9.state.comboboxState, { [P4.Open]: () => e9.actions.goToOption({ focus: c12.Previous }), [P4.Closed]: () => {
          (0, import_react_dom8.flushSync)(() => e9.actions.openCombobox()), o19.value || e9.actions.goToOption({ focus: c12.Last });
        } });
      case o8.Home:
        if (e9.state.comboboxState === P4.Closed || t14.shiftKey) break;
        return t14.preventDefault(), t14.stopPropagation(), e9.actions.goToOption({ focus: c12.First });
      case o8.PageUp:
        return t14.preventDefault(), t14.stopPropagation(), e9.actions.goToOption({ focus: c12.First });
      case o8.End:
        if (e9.state.comboboxState === P4.Closed || t14.shiftKey) break;
        return t14.preventDefault(), t14.stopPropagation(), e9.actions.goToOption({ focus: c12.Last });
      case o8.PageDown:
        return t14.preventDefault(), t14.stopPropagation(), e9.actions.goToOption({ focus: c12.Last });
      case o8.Escape:
        return e9.state.comboboxState !== P4.Open ? void 0 : (t14.preventDefault(), e9.state.optionsElement && !o19.optionsPropsRef.current.static && t14.stopPropagation(), o19.mode === k7.Single && o19.value === null && G6(), e9.actions.closeCombobox());
      case o8.Tab:
        if (e9.actions.setIsTyping(false), e9.state.comboboxState !== P4.Open) return;
        o19.mode === k7.Single && e9.state.activationTrigger !== _5.Focus && e9.actions.selectActiveOption(), e9.actions.closeCombobox();
        break;
    }
  }), D12 = o4((t14) => {
    b14 == null || b14(t14), o19.mode === k7.Single && t14.target.value === "" && G6(), e9.actions.openCombobox();
  }), K4 = o4((t14) => {
    var P7, N4, g6;
    let V6 = (P7 = t14.relatedTarget) != null ? P7 : n13.find((i16) => i16 !== t14.currentTarget);
    if (!((N4 = e9.state.optionsElement) != null && N4.contains(V6)) && !((g6 = e9.state.buttonElement) != null && g6.contains(V6)) && e9.state.comboboxState === P4.Open) return t14.preventDefault(), o19.mode === k7.Single && o19.value === null && G6(), e9.actions.closeCombobox();
  }), W4 = o4((t14) => {
    var P7, N4, g6;
    let V6 = (P7 = t14.relatedTarget) != null ? P7 : n13.find((i16) => i16 !== t14.currentTarget);
    (N4 = e9.state.buttonElement) != null && N4.contains(V6) || (g6 = e9.state.optionsElement) != null && g6.contains(V6) || o19.disabled || o19.immediate && e9.state.comboboxState !== P4.Open && X5.microTask(() => {
      (0, import_react_dom8.flushSync)(() => e9.actions.openCombobox()), e9.actions.setActivationTrigger(_5.Focus);
    });
  }), S9 = N(), j11 = w3(), { isFocused: l19, focusProps: k14 } = $0c4a58759813079a$export$4e328f61c538687f({ autoFocus: f22 }), { isHovered: Y4, hoverProps: s21 } = $e969f22b6713ca4a$export$ae780daf29e6d456({ isDisabled: p13 }), U3 = S3(e9, (t14) => t14.optionsElement), $5 = n2({ open: A5 === P4.Open, disabled: p13, invalid: o19.invalid, hover: Y4, focus: l19, autofocus: f22 }), ne4 = V({ ref: u25, id: y10, role: "combobox", type: n17, "aria-controls": U3 == null ? void 0 : U3.id, "aria-expanded": A5 === P4.Open, "aria-activedescendant": S3(e9, e9.selectors.activeDescendantId), "aria-labelledby": S9, "aria-describedby": j11, "aria-autocomplete": "list", defaultValue: (q5 = (ee6 = T10.defaultValue) != null ? ee6 : o19.defaultValue !== void 0 ? h15 == null ? void 0 : h15(o19.defaultValue) : null) != null ? q5 : o19.defaultValue, disabled: p13 || void 0, autoFocus: f22, onCompositionStart: v11, onCompositionEnd: c21, onKeyDown: z4, onChange: D12, onFocus: W4, onBlur: K4 }, k14, s21);
  return K()({ ourProps: ne4, theirProps: m10, slot: $5, defaultTag: Io, name: "Combobox.Input" });
}
var _o = "button";
function Fo(T10, O6) {
  let e9 = p7("Combobox.Button"), o19 = te("Combobox.Button"), [E13, R8] = (0, import_react77.useState)(null), y10 = y(O6, R8, e9.actions.setButtonElement), b14 = (0, import_react39.useId)(), { id: h15 = `headlessui-combobox-button-${b14}`, disabled: p13 = o19.disabled || false, autoFocus: f22 = false, ...n17 } = T10, [m10, a28, u25] = S3(e9, (l19) => [l19.comboboxState, l19.inputElement, l19.optionsElement]), A5 = v6(a28), d14 = m10 === P4.Open;
  L5(d14, { trigger: E13, action: (0, import_react77.useCallback)((l19) => {
    if (E13 != null && E13.contains(l19.target)) return S5.Ignore;
    if (a28 != null && a28.contains(l19.target)) return S5.Ignore;
    let k14 = l19.target.closest('[role="option"]:not([data-disabled])');
    return n5(k14) ? S5.Select(k14) : u25 != null && u25.contains(l19.target) ? S5.Ignore : S5.Close;
  }, [E13, a28, u25]), close: e9.actions.closeCombobox, select: e9.actions.selectActiveOption });
  let X5 = o4((l19) => {
    switch (l19.key) {
      case o8.Space:
      case o8.Enter:
        l19.preventDefault(), l19.stopPropagation(), e9.state.comboboxState === P4.Closed && (0, import_react_dom8.flushSync)(() => e9.actions.openCombobox()), A5();
        return;
      case o8.ArrowDown:
        l19.preventDefault(), l19.stopPropagation(), e9.state.comboboxState === P4.Closed && ((0, import_react_dom8.flushSync)(() => e9.actions.openCombobox()), e9.state.dataRef.current.value || e9.actions.goToOption({ focus: c12.First })), A5();
        return;
      case o8.ArrowUp:
        l19.preventDefault(), l19.stopPropagation(), e9.state.comboboxState === P4.Closed && ((0, import_react_dom8.flushSync)(() => e9.actions.openCombobox()), e9.state.dataRef.current.value || e9.actions.goToOption({ focus: c12.Last })), A5();
        return;
      case o8.Escape:
        if (e9.state.comboboxState !== P4.Open) return;
        l19.preventDefault(), e9.state.optionsElement && !o19.optionsPropsRef.current.static && l19.stopPropagation(), (0, import_react_dom8.flushSync)(() => e9.actions.closeCombobox()), A5();
        return;
      default:
        return;
    }
  }), G6 = s8(() => {
    e9.state.comboboxState === P4.Open ? e9.actions.closeCombobox() : e9.actions.openCombobox(), A5();
  }), C11 = N([h15]), { isFocusVisible: x10, focusProps: v11 } = $0c4a58759813079a$export$4e328f61c538687f({ autoFocus: f22 }), { isHovered: c21, hoverProps: z4 } = $e969f22b6713ca4a$export$ae780daf29e6d456({ isDisabled: p13 }), { pressed: D12, pressProps: K4 } = w({ disabled: p13 }), W4 = n2({ open: m10 === P4.Open, active: D12 || m10 === P4.Open, disabled: p13, invalid: o19.invalid, value: o19.value, hover: c21, focus: x10 }), S9 = V({ ref: y10, id: h15, type: e5(T10, E13), tabIndex: -1, "aria-haspopup": "listbox", "aria-controls": u25 == null ? void 0 : u25.id, "aria-expanded": m10 === P4.Open, "aria-labelledby": C11, disabled: p13 || void 0, autoFocus: f22, onKeyDown: X5 }, G6, v11, z4, K4);
  return K()({ ourProps: S9, theirProps: n17, slot: W4, defaultTag: _o, name: "Combobox.Button" });
}
var Do = "div";
var So = A.RenderStrategy | A.Static;
function Mo(T10, O6) {
  var M11, Ce5, ve3;
  let e9 = (0, import_react39.useId)(), { id: o19 = `headlessui-combobox-options-${e9}`, hold: E13 = false, anchor: R8, portal: y10 = false, modal: b14 = true, transition: h15 = false, ...p13 } = T10, f22 = p7("Combobox.Options"), n17 = te("Combobox.Options"), m10 = ye(R8);
  m10 && (y10 = true);
  let [a28, u25] = Re(m10), [A5, d14] = (0, import_react77.useState)(null), X5 = Te(), G6 = y(O6, m10 ? a28 : null, f22.actions.setOptionsElement, d14), [C11, x10, v11, c21, z4] = S3(f22, (_9) => [_9.comboboxState, _9.inputElement, _9.buttonElement, _9.optionsElement, _9.activationTrigger]), D12 = u13(x10 || v11), K4 = u13(c21), W4 = u17(), [S9, j11] = N2(h15, A5, W4 !== null ? (W4 & i10.Open) === i10.Open : C11 === P4.Open);
  p5(S9, x10, f22.actions.closeCombobox);
  let l19 = n17.__demoMode ? false : b14 && C11 === P4.Open;
  f11(l19, K4);
  let k14 = n17.__demoMode ? false : b14 && C11 === P4.Open;
  y4(k14, { allowed: (0, import_react77.useCallback)(() => [x10, v11, c21], [x10, v11, c21]) });
  let s21 = S3(f22, f22.selectors.didInputMove) ? false : S9;
  n(() => {
    var _9;
    n17.optionsPropsRef.current.static = (_9 = T10.static) != null ? _9 : false;
  }, [n17.optionsPropsRef, T10.static]), n(() => {
    n17.optionsPropsRef.current.hold = E13;
  }, [n17.optionsPropsRef, E13]), F2(C11 === P4.Open, { container: c21, accept(_9) {
    return _9.getAttribute("role") === "option" ? NodeFilter.FILTER_REJECT : _9.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
  }, walk(_9) {
    _9.setAttribute("role", "none");
  } });
  let U3 = N([v11 == null ? void 0 : v11.id]), $5 = n2({ open: C11 === P4.Open, option: void 0 }), ne4 = o4(() => {
    f22.actions.setActivationTrigger(_5.Pointer);
  }), be3 = o4((_9) => {
    _9.preventDefault(), f22.actions.setActivationTrigger(_5.Pointer);
  }), ee6 = V(m10 ? X5() : {}, { "aria-labelledby": U3, role: "listbox", "aria-multiselectable": n17.mode === k7.Multi ? true : void 0, id: o19, ref: G6, style: { ...p13.style, ...u25, "--input-width": w5(S9, x10, true).width, "--button-width": w5(S9, v11, true).width }, onWheel: z4 === _5.Pointer ? void 0 : ne4, onMouseDown: be3, ...x4(j11) }), q5 = S9 && C11 === P4.Closed && !T10.static, t14 = u16(q5, (M11 = n17.virtual) == null ? void 0 : M11.options), V6 = u16(q5, n17.value), P7 = (0, import_react77.useCallback)((_9) => n17.compare(V6, _9), [n17.compare, V6]), N4 = (0, import_react77.useMemo)(() => {
    if (!n17.virtual) return n17;
    if (t14 === void 0) throw new Error("Missing `options` in virtual mode");
    return t14 !== n17.virtual.options ? { ...n17, virtual: { ...n17.virtual, options: t14 } } : n17;
  }, [n17, t14, (Ce5 = n17.virtual) == null ? void 0 : Ce5.options]);
  n17.virtual && Object.assign(p13, { children: import_react77.default.createElement(de2.Provider, { value: N4 }, import_react77.default.createElement(Eo, { slot: $5 }, p13.children)) });
  let g6 = K(), i16 = (0, import_react77.useMemo)(() => n17.mode === k7.Multi ? n17 : { ...n17, isSelected: P7 }, [n17, P7]);
  return import_react77.default.createElement(le, { enabled: y10 ? T10.static || S9 : false, ownerDocument: D12 }, import_react77.default.createElement(de2.Provider, { value: i16 }, g6({ ourProps: ee6, theirProps: { ...p13, children: import_react77.default.createElement(s12, { freeze: q5 }, typeof p13.children == "function" ? (ve3 = p13.children) == null ? void 0 : ve3.call(p13, $5) : p13.children) }, slot: $5, defaultTag: Do, features: So, visible: s21, name: "Combobox.Options" })));
}
var Lo = "div";
function Vo(T10, O6) {
  var l19, k14, Y4;
  let e9 = te("Combobox.Option"), o19 = p7("Combobox.Option"), E13 = (0, import_react39.useId)(), { id: R8 = `headlessui-combobox-option-${E13}`, value: y10, disabled: b14 = (Y4 = (k14 = (l19 = e9.virtual) == null ? void 0 : l19.disabled) == null ? void 0 : k14.call(l19, y10)) != null ? Y4 : false, order: h15 = null, ...p13 } = T10, [f22] = S3(o19, (s21) => [s21.inputElement]), n17 = v6(f22), m10 = S3(o19, (0, import_react77.useCallback)((s21) => o19.selectors.isActive(s21, y10, R8), [y10, R8])), a28 = e9.isSelected(y10), u25 = (0, import_react77.useRef)(null), A5 = s3({ disabled: b14, value: y10, domRef: u25, order: h15 }), d14 = (0, import_react77.useContext)(Le), X5 = y(O6, u25, d14 ? d14.measureElement : null), G6 = o4(() => {
    o19.actions.setIsTyping(false), o19.actions.onChange(y10);
  });
  n(() => o19.actions.registerOption(R8, A5), [A5, R8]);
  let C11 = S3(o19, (0, import_react77.useCallback)((s21) => o19.selectors.shouldScrollIntoView(s21, y10, R8), [y10, R8]));
  n(() => {
    if (C11) return o2().requestAnimationFrame(() => {
      var s21, U3;
      (U3 = (s21 = u25.current) == null ? void 0 : s21.scrollIntoView) == null || U3.call(s21, { block: "nearest" });
    });
  }, [C11, u25]);
  let x10 = o4((s21) => {
    s21.preventDefault(), s21.button === g3.Left && (b14 || (G6(), n11() || requestAnimationFrame(() => n17()), e9.mode === k7.Single && o19.actions.closeCombobox()));
  }), v11 = o4(() => {
    if (b14) return o19.actions.goToOption({ focus: c12.Nothing });
    let s21 = e9.calculateIndex(y10);
    o19.actions.goToOption({ focus: c12.Specific, idx: s21 });
  }), c21 = u15(), z4 = o4((s21) => c21.update(s21)), D12 = o4((s21) => {
    if (!c21.wasMoved(s21) || b14 || m10 && o19.state.activationTrigger === _5.Pointer) return;
    let U3 = e9.calculateIndex(y10);
    o19.actions.goToOption({ focus: c12.Specific, idx: U3 }, _5.Pointer);
  }), K4 = o4((s21) => {
    c21.wasMoved(s21) && (b14 || m10 && (e9.optionsPropsRef.current.hold || o19.state.activationTrigger === _5.Pointer && o19.actions.goToOption({ focus: c12.Nothing })));
  }), W4 = n2({ active: m10, focus: m10, selected: a28, disabled: b14 }), S9 = { id: R8, ref: X5, role: "option", tabIndex: b14 === true ? void 0 : -1, "aria-disabled": b14 === true ? true : void 0, "aria-selected": a28, disabled: void 0, onMouseDown: x10, onFocus: v11, onPointerEnter: z4, onMouseEnter: z4, onPointerMove: D12, onMouseMove: D12, onPointerLeave: K4, onMouseLeave: K4 };
  return K()({ ourProps: S9, theirProps: p13, slot: W4, defaultTag: Lo, name: "Combobox.Option" });
}
var wo = Y(Ao);
var Bo = Y(Fo);
var ko = Y(Ro);
var No = Z;
var Uo = Y(Mo);
var Ho = Y(Vo);
var Ht = Object.assign(wo, { Input: ko, Button: Bo, Label: No, Options: Uo, Option: Ho });

// node_modules/@headlessui/react/dist/components/data-interactive/data-interactive.js
var import_react78 = __toESM(require_react(), 1);
var E10 = import_react78.Fragment;
function d8(t14, r21) {
  let { ...a28 } = t14, e9 = false, { isFocusVisible: o19, focusProps: n17 } = $0c4a58759813079a$export$4e328f61c538687f(), { isHovered: p13, hoverProps: s21 } = $e969f22b6713ca4a$export$ae780daf29e6d456({ isDisabled: e9 }), { pressed: i16, pressProps: T10 } = w({ disabled: e9 }), l19 = V({ ref: r21 }, n17, s21, T10), m10 = n2({ hover: p13, focus: o19, active: i16 });
  return K()({ ourProps: l19, theirProps: a28, slot: m10, defaultTag: E10, name: "DataInteractive" });
}
var b8 = Y(d8);

// node_modules/@headlessui/react/dist/components/dialog/dialog.js
var import_react85 = __toESM(require_react(), 1);

// node_modules/@headlessui/react/dist/hooks/use-escape.js
function a20(o19, r21 = typeof document != "undefined" ? document.defaultView : null, t14) {
  let n17 = I3(o19, "escape");
  E7(r21, "keydown", (e9) => {
    n17 && (e9.defaultPrevented || e9.key === o8.Escape && t14(e9));
  });
}

// node_modules/@headlessui/react/dist/hooks/use-is-touch-device.js
var import_react79 = __toESM(require_react(), 1);
function f17() {
  var t14;
  let [e9] = (0, import_react79.useState)(() => typeof window != "undefined" && typeof window.matchMedia == "function" ? window.matchMedia("(pointer: coarse)") : null), [o19, c21] = (0, import_react79.useState)((t14 = e9 == null ? void 0 : e9.matches) != null ? t14 : false);
  return n(() => {
    if (!e9) return;
    function n17(r21) {
      c21(r21.matches);
    }
    return e9.addEventListener("change", n17), () => e9.removeEventListener("change", n17);
  }, [e9]), o19;
}

// node_modules/@headlessui/react/dist/hooks/use-root-containers.js
var import_react80 = __toESM(require_react(), 1);
function S7({ defaultContainers: l19 = [], portals: n17, mainTreeNode: o19 } = {}) {
  let c21 = o4(() => {
    var r21, u25;
    let i16 = l(o19), t14 = [];
    for (let e9 of l19) e9 !== null && (t5(e9) ? t14.push(e9) : "current" in e9 && t5(e9.current) && t14.push(e9.current));
    if (n17 != null && n17.current) for (let e9 of n17.current) t14.push(e9);
    for (let e9 of (r21 = i16 == null ? void 0 : i16.querySelectorAll("html > *, body > *")) != null ? r21 : []) e9 !== document.body && e9 !== document.head && t5(e9) && e9.id !== "headlessui-portal-root" && (o19 && (e9.contains(o19) || e9.contains((u25 = o19 == null ? void 0 : o19.getRootNode()) == null ? void 0 : u25.host)) || t14.some((E13) => e9.contains(E13)) || t14.push(e9));
    return t14;
  });
  return { resolveContainers: c21, contains: o4((i16) => c21().some((t14) => t14.contains(i16))) };
}
var d9 = (0, import_react80.createContext)(null);
function j9({ children: l19, node: n17 }) {
  let [o19, c21] = (0, import_react80.useState)(null), i16 = x6(n17 != null ? n17 : o19);
  return import_react80.default.createElement(d9.Provider, { value: i16 }, l19, i16 === null && import_react80.default.createElement(f4, { features: s5.Hidden, ref: (t14) => {
    var r21, u25;
    if (t14) {
      for (let e9 of (u25 = (r21 = l(t14)) == null ? void 0 : r21.querySelectorAll("html > *, body > *")) != null ? u25 : []) if (e9 !== document.body && e9 !== document.head && t5(e9) && e9 != null && e9.contains(t14)) {
        c21(e9);
        break;
      }
    }
  } }));
}
function x6(l19 = null) {
  var n17;
  return (n17 = (0, import_react80.useContext)(d9)) != null ? n17 : l19;
}

// node_modules/@headlessui/react/dist/components/focus-trap/focus-trap.js
var import_react83 = __toESM(require_react(), 1);

// node_modules/@headlessui/react/dist/hooks/use-is-mounted.js
var import_react81 = __toESM(require_react(), 1);
function f18() {
  let e9 = (0, import_react81.useRef)(false);
  return n(() => (e9.current = true, () => {
    e9.current = false;
  }), []), e9;
}

// node_modules/@headlessui/react/dist/hooks/use-tab-direction.js
var import_react82 = __toESM(require_react(), 1);
var a21 = ((r21) => (r21[r21.Forwards = 0] = "Forwards", r21[r21.Backwards = 1] = "Backwards", r21))(a21 || {});
function u21() {
  let e9 = (0, import_react82.useRef)(0);
  return s10(true, "keydown", (r21) => {
    r21.key === "Tab" && (e9.current = r21.shiftKey ? 1 : 0);
  }, true), e9;
}

// node_modules/@headlessui/react/dist/components/focus-trap/focus-trap.js
function x7(o19) {
  if (!o19) return /* @__PURE__ */ new Set();
  if (typeof o19 == "function") return new Set(o19());
  let t14 = /* @__PURE__ */ new Set();
  for (let e9 of o19.current) t5(e9.current) && t14.add(e9.current);
  return t14;
}
var $2 = "div";
var G4 = ((n17) => (n17[n17.None = 0] = "None", n17[n17.InitialFocus = 1] = "InitialFocus", n17[n17.TabLock = 2] = "TabLock", n17[n17.FocusLock = 4] = "FocusLock", n17[n17.RestoreFocus = 8] = "RestoreFocus", n17[n17.AutoFocus = 16] = "AutoFocus", n17))(G4 || {});
function w8(o19, t14) {
  let e9 = (0, import_react83.useRef)(null), r21 = y(e9, t14), { initialFocus: u25, initialFocusFallback: a28, containers: n17, features: s21 = 15, ...f22 } = o19;
  l14() || (s21 = 0);
  let l19 = u13(e9.current);
  re(s21, { ownerDocument: l19 });
  let T10 = ne(s21, { ownerDocument: l19, container: e9, initialFocus: u25, initialFocusFallback: a28 });
  oe3(s21, { ownerDocument: l19, container: e9, containers: n17, previousActiveElement: T10 });
  let g6 = u21(), A5 = o4((c21) => {
    if (!n5(e9.current)) return;
    let E13 = e9.current;
    ((V6) => V6())(() => {
      u(g6.current, { [a21.Forwards]: () => {
        v5(E13, T4.First, { skipElements: [c21.relatedTarget, a28] });
      }, [a21.Backwards]: () => {
        v5(E13, T4.Last, { skipElements: [c21.relatedTarget, a28] });
      } });
    });
  }), v11 = I3(!!(s21 & 2), "focus-trap#tab-lock"), N4 = p(), b14 = (0, import_react83.useRef)(false), k14 = { ref: r21, onKeyDown(c21) {
    c21.key == "Tab" && (b14.current = true, N4.requestAnimationFrame(() => {
      b14.current = false;
    }));
  }, onBlur(c21) {
    if (!(s21 & 4)) return;
    let E13 = x7(n17);
    n5(e9.current) && E13.add(e9.current);
    let L8 = c21.relatedTarget;
    i4(L8) && L8.dataset.headlessuiFocusGuard !== "true" && (I7(E13, L8) || (b14.current ? v5(e9.current, u(g6.current, { [a21.Forwards]: () => T4.Next, [a21.Backwards]: () => T4.Previous }) | T4.WrapAround, { relativeTo: c21.target }) : i4(c21.target) && w6(c21.target)));
  } }, B3 = K();
  return import_react83.default.createElement(import_react83.default.Fragment, null, v11 && import_react83.default.createElement(f4, { as: "button", type: "button", "data-headlessui-focus-guard": true, onFocus: A5, features: s5.Focusable }), B3({ ourProps: k14, theirProps: f22, defaultTag: $2, name: "FocusTrap" }), v11 && import_react83.default.createElement(f4, { as: "button", type: "button", "data-headlessui-focus-guard": true, onFocus: A5, features: s5.Focusable }));
}
var ee = Y(w8);
var ge2 = Object.assign(ee, { features: G4 });
function te2(o19 = true) {
  let t14 = (0, import_react83.useRef)(n13.slice());
  return m7(([e9], [r21]) => {
    r21 === true && e9 === false && t(() => {
      t14.current.splice(0);
    }), r21 === false && e9 === true && (t14.current = n13.slice());
  }, [o19, n13, t14]), o4(() => {
    var e9;
    return (e9 = t14.current.find((r21) => r21 != null && r21.isConnected)) != null ? e9 : null;
  });
}
function re(o19, { ownerDocument: t14 }) {
  let e9 = !!(o19 & 8), r21 = te2(e9);
  m7(() => {
    e9 || d2(t14 == null ? void 0 : t14.body) && w6(r21());
  }, [e9]), c13(() => {
    e9 && w6(r21());
  });
}
function ne(o19, { ownerDocument: t14, container: e9, initialFocus: r21, initialFocusFallback: u25 }) {
  let a28 = (0, import_react83.useRef)(null), n17 = I3(!!(o19 & 1), "focus-trap#initial-focus"), s21 = f18();
  return m7(() => {
    if (o19 === 0) return;
    if (!n17) {
      u25 != null && u25.current && w6(u25.current);
      return;
    }
    let f22 = e9.current;
    f22 && t(() => {
      if (!s21.current) return;
      let l19 = t14 == null ? void 0 : t14.activeElement;
      if (r21 != null && r21.current) {
        if ((r21 == null ? void 0 : r21.current) === l19) {
          a28.current = l19;
          return;
        }
      } else if (f22.contains(l19)) {
        a28.current = l19;
        return;
      }
      if (r21 != null && r21.current) w6(r21.current);
      else {
        if (o19 & 16) {
          if (v5(f22, T4.First | T4.AutoFocus) !== A2.Error) return;
        } else if (v5(f22, T4.First) !== A2.Error) return;
        if (u25 != null && u25.current && (w6(u25.current), (t14 == null ? void 0 : t14.activeElement) === u25.current)) return;
        console.warn("There are no focusable elements inside the <FocusTrap />");
      }
      a28.current = t14 == null ? void 0 : t14.activeElement;
    });
  }, [u25, n17, o19]), a28;
}
function oe3(o19, { ownerDocument: t14, container: e9, containers: r21, previousActiveElement: u25 }) {
  let a28 = f18(), n17 = !!(o19 & 4);
  E7(t14 == null ? void 0 : t14.defaultView, "focus", (s21) => {
    if (!n17 || !a28.current) return;
    let f22 = x7(r21);
    n5(e9.current) && f22.add(e9.current);
    let l19 = u25.current;
    if (!l19) return;
    let T10 = s21.target;
    n5(T10) ? I7(f22, T10) ? (u25.current = T10, w6(T10)) : (s21.preventDefault(), s21.stopPropagation(), w6(l19)) : w6(u25.current);
  }, true);
}
function I7(o19, t14) {
  for (let e9 of o19) if (e9.contains(t14)) return true;
  return false;
}

// node_modules/@headlessui/react/dist/components/transition/transition.js
var import_react84 = __toESM(require_react(), 1);
function ue2(e9) {
  var t14;
  return !!(e9.enter || e9.enterFrom || e9.enterTo || e9.leave || e9.leaveFrom || e9.leaveTo) || !b((t14 = e9.as) != null ? t14 : de3) || import_react84.default.Children.count(e9.children) === 1;
}
var V3 = (0, import_react84.createContext)(null);
V3.displayName = "TransitionContext";
var De = ((n17) => (n17.Visible = "visible", n17.Hidden = "hidden", n17))(De || {});
function He() {
  let e9 = (0, import_react84.useContext)(V3);
  if (e9 === null) throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");
  return e9;
}
function Ae3() {
  let e9 = (0, import_react84.useContext)(w9);
  if (e9 === null) throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");
  return e9;
}
var w9 = (0, import_react84.createContext)(null);
w9.displayName = "NestingContext";
function M6(e9) {
  return "children" in e9 ? M6(e9.children) : e9.current.filter(({ el: t14 }) => t14.current !== null).filter(({ state: t14 }) => t14 === "visible").length > 0;
}
function Te2(e9, t14) {
  let n17 = s3(e9), l19 = (0, import_react84.useRef)([]), S9 = f18(), R8 = p(), d14 = o4((o19, i16 = C.Hidden) => {
    let a28 = l19.current.findIndex(({ el: s21 }) => s21 === o19);
    a28 !== -1 && (u(i16, { [C.Unmount]() {
      l19.current.splice(a28, 1);
    }, [C.Hidden]() {
      l19.current[a28].state = "hidden";
    } }), R8.microTask(() => {
      var s21;
      !M6(l19) && S9.current && ((s21 = n17.current) == null || s21.call(n17));
    }));
  }), y10 = o4((o19) => {
    let i16 = l19.current.find(({ el: a28 }) => a28 === o19);
    return i16 ? i16.state !== "visible" && (i16.state = "visible") : l19.current.push({ el: o19, state: "visible" }), () => d14(o19, C.Unmount);
  }), C11 = (0, import_react84.useRef)([]), p13 = (0, import_react84.useRef)(Promise.resolve()), h15 = (0, import_react84.useRef)({ enter: [], leave: [] }), g6 = o4((o19, i16, a28) => {
    C11.current.splice(0), t14 && (t14.chains.current[i16] = t14.chains.current[i16].filter(([s21]) => s21 !== o19)), t14 == null || t14.chains.current[i16].push([o19, new Promise((s21) => {
      C11.current.push(s21);
    })]), t14 == null || t14.chains.current[i16].push([o19, new Promise((s21) => {
      Promise.all(h15.current[i16].map(([r21, f22]) => f22)).then(() => s21());
    })]), i16 === "enter" ? p13.current = p13.current.then(() => t14 == null ? void 0 : t14.wait.current).then(() => a28(i16)) : a28(i16);
  }), v11 = o4((o19, i16, a28) => {
    Promise.all(h15.current[i16].splice(0).map(([s21, r21]) => r21)).then(() => {
      var s21;
      (s21 = C11.current.shift()) == null || s21();
    }).then(() => a28(i16));
  });
  return (0, import_react84.useMemo)(() => ({ children: l19, register: y10, unregister: d14, onStart: g6, onStop: v11, wait: p13, chains: h15 }), [y10, d14, l19, g6, v11, h15, p13]);
}
var de3 = import_react84.Fragment;
var fe = A.RenderStrategy;
function Fe2(e9, t14) {
  var ee6, te5;
  let { transition: n17 = true, beforeEnter: l19, afterEnter: S9, beforeLeave: R8, afterLeave: d14, enter: y10, enterFrom: C11, enterTo: p13, entered: h15, leave: g6, leaveFrom: v11, leaveTo: o19, ...i16 } = e9, [a28, s21] = (0, import_react84.useState)(null), r21 = (0, import_react84.useRef)(null), f22 = ue2(e9), U3 = y(...f22 ? [r21, t14, s21] : t14 === null ? [] : [t14]), H10 = (ee6 = i16.unmount) == null || ee6 ? C.Unmount : C.Hidden, { show: u25, appear: z4, initial: K4 } = He(), [m10, j11] = (0, import_react84.useState)(u25 ? "visible" : "hidden"), Q7 = Ae3(), { register: A5, unregister: F7 } = Q7;
  n(() => A5(r21), [A5, r21]), n(() => {
    if (H10 === C.Hidden && r21.current) {
      if (u25 && m10 !== "visible") {
        j11("visible");
        return;
      }
      return u(m10, { ["hidden"]: () => F7(r21), ["visible"]: () => A5(r21) });
    }
  }, [m10, r21, A5, F7, u25, H10]);
  let G6 = l14();
  n(() => {
    if (f22 && G6 && m10 === "visible" && r21.current === null) throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
  }, [r21, m10, G6, f22]);
  let ce3 = K4 && !z4, Y4 = z4 && u25 && K4, B3 = (0, import_react84.useRef)(false), I10 = Te2(() => {
    B3.current || (j11("hidden"), F7(r21));
  }, Q7), Z4 = o4((W4) => {
    B3.current = true;
    let L8 = W4 ? "enter" : "leave";
    I10.onStart(r21, L8, (_9) => {
      _9 === "enter" ? l19 == null || l19() : _9 === "leave" && (R8 == null || R8());
    });
  }), $5 = o4((W4) => {
    let L8 = W4 ? "enter" : "leave";
    B3.current = false, I10.onStop(r21, L8, (_9) => {
      _9 === "enter" ? S9 == null || S9() : _9 === "leave" && (d14 == null || d14());
    }), L8 === "leave" && !M6(I10) && (j11("hidden"), F7(r21));
  });
  (0, import_react84.useEffect)(() => {
    f22 && n17 || (Z4(u25), $5(u25));
  }, [u25, f22, n17]);
  let pe4 = /* @__PURE__ */ (() => !(!n17 || !f22 || !G6 || ce3))(), [, T10] = N2(pe4, a28, u25, { start: Z4, end: $5 }), Ce5 = m2({ ref: U3, className: ((te5 = t4(i16.className, Y4 && y10, Y4 && C11, T10.enter && y10, T10.enter && T10.closed && C11, T10.enter && !T10.closed && p13, T10.leave && g6, T10.leave && !T10.closed && v11, T10.leave && T10.closed && o19, !T10.transition && u25 && h15)) == null ? void 0 : te5.trim()) || void 0, ...x4(T10) }), N4 = 0;
  m10 === "visible" && (N4 |= i10.Open), m10 === "hidden" && (N4 |= i10.Closed), u25 && m10 === "hidden" && (N4 |= i10.Opening), !u25 && m10 === "visible" && (N4 |= i10.Closing);
  let he3 = K();
  return import_react84.default.createElement(w9.Provider, { value: I10 }, import_react84.default.createElement(c11, { value: N4 }, he3({ ourProps: Ce5, theirProps: i16, defaultTag: de3, features: fe, visible: m10 === "visible", name: "Transition.Child" })));
}
function Ie(e9, t14) {
  let { show: n17, appear: l19 = false, unmount: S9 = true, ...R8 } = e9, d14 = (0, import_react84.useRef)(null), y10 = ue2(e9), C11 = y(...y10 ? [d14, t14] : t14 === null ? [] : [t14]);
  l14();
  let p13 = u17();
  if (n17 === void 0 && p13 !== null && (n17 = (p13 & i10.Open) === i10.Open), n17 === void 0) throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");
  let [h15, g6] = (0, import_react84.useState)(n17 ? "visible" : "hidden"), v11 = Te2(() => {
    n17 || g6("hidden");
  }), [o19, i16] = (0, import_react84.useState)(true), a28 = (0, import_react84.useRef)([n17]);
  n(() => {
    o19 !== false && a28.current[a28.current.length - 1] !== n17 && (a28.current.push(n17), i16(false));
  }, [a28, n17]);
  let s21 = (0, import_react84.useMemo)(() => ({ show: n17, appear: l19, initial: o19 }), [n17, l19, o19]);
  n(() => {
    n17 ? g6("visible") : !M6(v11) && d14.current !== null && g6("hidden");
  }, [n17, v11]);
  let r21 = { unmount: S9 }, f22 = o4(() => {
    var u25;
    o19 && i16(false), (u25 = e9.beforeEnter) == null || u25.call(e9);
  }), U3 = o4(() => {
    var u25;
    o19 && i16(false), (u25 = e9.beforeLeave) == null || u25.call(e9);
  }), H10 = K();
  return import_react84.default.createElement(w9.Provider, { value: v11 }, import_react84.default.createElement(V3.Provider, { value: s21 }, H10({ ourProps: { ...r21, as: import_react84.Fragment, children: import_react84.default.createElement(me2, { ref: C11, ...r21, ...R8, beforeEnter: f22, beforeLeave: U3 }) }, theirProps: {}, defaultTag: import_react84.Fragment, features: fe, visible: h15 === "visible", name: "Transition" })));
}
function Le2(e9, t14) {
  let n17 = (0, import_react84.useContext)(V3) !== null, l19 = u17() !== null;
  return import_react84.default.createElement(import_react84.default.Fragment, null, !n17 && l19 ? import_react84.default.createElement(X2, { ref: t14, ...e9 }) : import_react84.default.createElement(me2, { ref: t14, ...e9 }));
}
var X2 = Y(Ie);
var me2 = Y(Fe2);
var Oe = Y(Le2);
var Ke2 = Object.assign(X2, { Child: Oe, Root: X2 });

// node_modules/@headlessui/react/dist/components/dialog/dialog.js
var we = ((o19) => (o19[o19.Open = 0] = "Open", o19[o19.Closed = 1] = "Closed", o19))(we || {});
var Be = ((t14) => (t14[t14.SetTitleId = 0] = "SetTitleId", t14))(Be || {});
var Ue = { [0](e9, t14) {
  return e9.titleId === t14.id ? e9 : { ...e9, titleId: t14.id };
} };
var w10 = (0, import_react85.createContext)(null);
w10.displayName = "DialogContext";
function O5(e9) {
  let t14 = (0, import_react85.useContext)(w10);
  if (t14 === null) {
    let o19 = new Error(`<${e9} /> is missing a parent <Dialog /> component.`);
    throw Error.captureStackTrace && Error.captureStackTrace(o19, O5), o19;
  }
  return t14;
}
function He2(e9, t14) {
  return u(t14.type, Ue, e9, t14);
}
var z = Y(function(t14, o19) {
  let a28 = (0, import_react39.useId)(), { id: n17 = `headlessui-dialog-${a28}`, open: i16, onClose: p13, initialFocus: d14, role: s21 = "dialog", autoFocus: f22 = true, __demoMode: u25 = false, unmount: y10 = false, ...S9 } = t14, R8 = (0, import_react85.useRef)(false);
  s21 = (function() {
    return s21 === "dialog" || s21 === "alertdialog" ? s21 : (R8.current || (R8.current = true, console.warn(`Invalid role [${s21}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)), "dialog");
  })();
  let g6 = u17();
  i16 === void 0 && g6 !== null && (i16 = (g6 & i10.Open) === i10.Open);
  let T10 = (0, import_react85.useRef)(null), I10 = y(T10, o19), F7 = u13(T10.current), c21 = i16 ? 0 : 1, [b14, Q7] = (0, import_react85.useReducer)(He2, { titleId: null, descriptionId: null, panelRef: (0, import_react85.createRef)() }), m10 = o4(() => p13(false)), B3 = o4((r21) => Q7({ type: 0, id: r21 })), D12 = l14() ? c21 === 0 : false, [Z4, ee6] = oe(), te5 = { get current() {
    var r21;
    return (r21 = b14.panelRef.current) != null ? r21 : T10.current;
  } }, v11 = x6(), { resolveContainers: M11 } = S7({ mainTreeNode: v11, portals: Z4, defaultContainers: [te5] }), U3 = g6 !== null ? (g6 & i10.Closing) === i10.Closing : false;
  y4(u25 || U3 ? false : D12, { allowed: o4(() => {
    var r21, W4;
    return [(W4 = (r21 = T10.current) == null ? void 0 : r21.closest("[data-headlessui-portal]")) != null ? W4 : null];
  }), disallowed: o4(() => {
    var r21;
    return [(r21 = v11 == null ? void 0 : v11.closest("body > *:not(#headlessui-portal-root)")) != null ? r21 : null];
  }) });
  let P7 = x2.get(null);
  n(() => {
    if (D12) return P7.actions.push(n17), () => P7.actions.pop(n17);
  }, [P7, n17, D12]);
  let H10 = S3(P7, (0, import_react85.useCallback)((r21) => P7.selectors.isTop(r21, n17), [P7, n17]));
  k5(H10, M11, (r21) => {
    r21.preventDefault(), m10();
  }), a20(H10, F7 == null ? void 0 : F7.defaultView, (r21) => {
    r21.preventDefault(), r21.stopPropagation(), document.activeElement && "blur" in document.activeElement && typeof document.activeElement.blur == "function" && document.activeElement.blur(), m10();
  }), f11(u25 || U3 ? false : D12, F7, M11), p5(D12, T10, m10);
  let [oe7, ne4] = H3(), re4 = (0, import_react85.useMemo)(() => [{ dialogState: c21, close: m10, setTitleId: B3, unmount: y10 }, b14], [c21, m10, B3, y10, b14]), N4 = n2({ open: c21 === 0 }), le2 = { ref: I10, id: n17, role: s21, tabIndex: -1, "aria-modal": u25 ? void 0 : c21 === 0 ? true : void 0, "aria-labelledby": b14.titleId, "aria-describedby": oe7, unmount: y10 }, ae5 = !f17(), E13 = G4.None;
  D12 && !u25 && (E13 |= G4.RestoreFocus, E13 |= G4.TabLock, f22 && (E13 |= G4.AutoFocus), ae5 && (E13 |= G4.InitialFocus));
  let ie4 = K();
  return import_react85.default.createElement(s13, null, import_react85.default.createElement(l15, { force: true }, import_react85.default.createElement(le, null, import_react85.default.createElement(w10.Provider, { value: re4 }, import_react85.default.createElement(B, { target: T10 }, import_react85.default.createElement(l15, { force: false }, import_react85.default.createElement(ne4, { slot: N4 }, import_react85.default.createElement(ee6, null, import_react85.default.createElement(ge2, { initialFocus: d14, initialFocusFallback: T10, containers: M11, features: E13 }, import_react85.default.createElement(C5, { value: m10 }, ie4({ ourProps: le2, theirProps: S9, slot: N4, defaultTag: Ne, features: We, visible: c21 === 0, name: "Dialog" })))))))))));
});
var Ne = "div";
var We = A.RenderStrategy | A.Static;
function $e(e9, t14) {
  let { transition: o19 = false, open: a28, ...n17 } = e9, i16 = u17(), p13 = e9.hasOwnProperty("open") || i16 !== null, d14 = e9.hasOwnProperty("onClose");
  if (!p13 && !d14) throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");
  if (!p13) throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");
  if (!d14) throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");
  if (!i16 && typeof e9.open != "boolean") throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e9.open}`);
  if (typeof e9.onClose != "function") throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e9.onClose}`);
  return (a28 !== void 0 || o19) && !n17.static ? import_react85.default.createElement(j9, null, import_react85.default.createElement(Ke2, { show: a28, transition: o19, unmount: n17.unmount }, import_react85.default.createElement(z, { ref: t14, ...n17 }))) : import_react85.default.createElement(j9, null, import_react85.default.createElement(z, { ref: t14, open: a28, ...n17 }));
}
var je = "div";
function Ye(e9, t14) {
  let o19 = (0, import_react39.useId)(), { id: a28 = `headlessui-dialog-panel-${o19}`, transition: n17 = false, ...i16 } = e9, [{ dialogState: p13, unmount: d14 }, s21] = O5("Dialog.Panel"), f22 = y(t14, s21.panelRef), u25 = n2({ open: p13 === 0 }), y10 = o4((I10) => {
    I10.stopPropagation();
  }), S9 = { ref: f22, id: a28, onClick: y10 }, R8 = n17 ? Oe : import_react85.Fragment, g6 = n17 ? { unmount: d14 } : {}, T10 = K();
  return import_react85.default.createElement(R8, { ...g6 }, T10({ ourProps: S9, theirProps: i16, slot: u25, defaultTag: je, name: "Dialog.Panel" }));
}
var Je = "div";
function Ke3(e9, t14) {
  let { transition: o19 = false, ...a28 } = e9, [{ dialogState: n17, unmount: i16 }] = O5("Dialog.Backdrop"), p13 = n2({ open: n17 === 0 }), d14 = { ref: t14, "aria-hidden": true }, s21 = o19 ? Oe : import_react85.Fragment, f22 = o19 ? { unmount: i16 } : {}, u25 = K();
  return import_react85.default.createElement(s21, { ...f22 }, u25({ ourProps: d14, theirProps: a28, slot: p13, defaultTag: Je, name: "Dialog.Backdrop" }));
}
var Xe = "h2";
function Ve(e9, t14) {
  let o19 = (0, import_react39.useId)(), { id: a28 = `headlessui-dialog-title-${o19}`, ...n17 } = e9, [{ dialogState: i16, setTitleId: p13 }] = O5("Dialog.Title"), d14 = y(t14);
  (0, import_react85.useEffect)(() => (p13(a28), () => p13(null)), [a28, p13]);
  let s21 = n2({ open: i16 === 0 }), f22 = { ref: d14, id: a28 };
  return K()({ ourProps: f22, theirProps: n17, slot: s21, defaultTag: Xe, name: "Dialog.Title" });
}
var qe = Y($e);
var ze = Y(Ye);
var Lt = Y(Ke3);
var Qe = Y(Ve);
var xt = M2;
var ht = Object.assign(qe, { Panel: ze, Title: Qe, Description: M2 });

// node_modules/@headlessui/react/dist/components/disclosure/disclosure.js
var import_react87 = __toESM(require_react(), 1);

// node_modules/@headlessui/react/dist/utils/start-transition.js
var import_react86 = __toESM(require_react(), 1);
var t12;
var a22 = (t12 = import_react86.default.startTransition) != null ? t12 : function(i16) {
  i16();
};

// node_modules/@headlessui/react/dist/components/disclosure/disclosure.js
var me3 = ((l19) => (l19[l19.Open = 0] = "Open", l19[l19.Closed = 1] = "Closed", l19))(me3 || {});
var fe3 = ((n17) => (n17[n17.ToggleDisclosure = 0] = "ToggleDisclosure", n17[n17.CloseDisclosure = 1] = "CloseDisclosure", n17[n17.SetButtonId = 2] = "SetButtonId", n17[n17.SetPanelId = 3] = "SetPanelId", n17[n17.SetButtonElement = 4] = "SetButtonElement", n17[n17.SetPanelElement = 5] = "SetPanelElement", n17))(fe3 || {});
var De2 = { [0]: (e9) => ({ ...e9, disclosureState: u(e9.disclosureState, { [0]: 1, [1]: 0 }) }), [1]: (e9) => e9.disclosureState === 1 ? e9 : { ...e9, disclosureState: 1 }, [2](e9, t14) {
  return e9.buttonId === t14.buttonId ? e9 : { ...e9, buttonId: t14.buttonId };
}, [3](e9, t14) {
  return e9.panelId === t14.panelId ? e9 : { ...e9, panelId: t14.panelId };
}, [4](e9, t14) {
  return e9.buttonElement === t14.element ? e9 : { ...e9, buttonElement: t14.element };
}, [5](e9, t14) {
  return e9.panelElement === t14.element ? e9 : { ...e9, panelElement: t14.element };
} };
var _6 = (0, import_react87.createContext)(null);
_6.displayName = "DisclosureContext";
function M7(e9) {
  let t14 = (0, import_react87.useContext)(_6);
  if (t14 === null) {
    let l19 = new Error(`<${e9} /> is missing a parent <Disclosure /> component.`);
    throw Error.captureStackTrace && Error.captureStackTrace(l19, M7), l19;
  }
  return t14;
}
var F4 = (0, import_react87.createContext)(null);
F4.displayName = "DisclosureAPIContext";
function V4(e9) {
  let t14 = (0, import_react87.useContext)(F4);
  if (t14 === null) {
    let l19 = new Error(`<${e9} /> is missing a parent <Disclosure /> component.`);
    throw Error.captureStackTrace && Error.captureStackTrace(l19, V4), l19;
  }
  return t14;
}
var H7 = (0, import_react87.createContext)(null);
H7.displayName = "DisclosurePanelContext";
function ye2() {
  return (0, import_react87.useContext)(H7);
}
function Pe(e9, t14) {
  return u(t14.type, De2, e9, t14);
}
var Ee2 = import_react87.Fragment;
function Se(e9, t14) {
  let { defaultOpen: l19 = false, ...p13 } = e9, a28 = (0, import_react87.useRef)(null), c21 = y(t14, T((u25) => {
    a28.current = u25;
  }, e9.as === void 0 || b(e9.as))), n17 = (0, import_react87.useReducer)(Pe, { disclosureState: l19 ? 0 : 1, buttonElement: null, panelElement: null, buttonId: null, panelId: null }), [{ disclosureState: o19, buttonId: r21 }, f22] = n17, s21 = o4((u25) => {
    f22({ type: 1 });
    let m10 = l(a28.current);
    if (!m10 || !r21) return;
    let d14 = (() => u25 ? i4(u25) ? u25 : "current" in u25 && i4(u25.current) ? u25.current : m10.getElementById(r21) : m10.getElementById(r21))();
    d14 == null || d14.focus();
  }), E13 = (0, import_react87.useMemo)(() => ({ close: s21 }), [s21]), T10 = n2({ open: o19 === 0, close: s21 }), D12 = { ref: c21 }, S9 = K();
  return import_react87.default.createElement(_6.Provider, { value: n17 }, import_react87.default.createElement(F4.Provider, { value: E13 }, import_react87.default.createElement(C5, { value: s21 }, import_react87.default.createElement(c11, { value: u(o19, { [0]: i10.Open, [1]: i10.Closed }) }, S9({ ourProps: D12, theirProps: p13, slot: T10, defaultTag: Ee2, name: "Disclosure" })))));
}
var ge5 = "button";
function Ae4(e9, t14) {
  let l19 = (0, import_react39.useId)(), { id: p13 = `headlessui-disclosure-button-${l19}`, disabled: a28 = false, autoFocus: c21 = false, ...n17 } = e9, [o19, r21] = M7("Disclosure.Button"), f22 = ye2(), s21 = f22 === null ? false : f22 === o19.panelId, E13 = (0, import_react87.useRef)(null), T10 = y(E13, t14, o4((i16) => {
    if (!s21) return r21({ type: 4, element: i16 });
  }));
  (0, import_react87.useEffect)(() => {
    if (!s21) return r21({ type: 2, buttonId: p13 }), () => {
      r21({ type: 2, buttonId: null });
    };
  }, [p13, r21, s21]);
  let D12 = o4((i16) => {
    var g6;
    if (s21) {
      if (o19.disclosureState === 1) return;
      switch (i16.key) {
        case o8.Space:
        case o8.Enter:
          i16.preventDefault(), i16.stopPropagation(), r21({ type: 0 }), (g6 = o19.buttonElement) == null || g6.focus();
          break;
      }
    } else switch (i16.key) {
      case o8.Space:
      case o8.Enter:
        i16.preventDefault(), i16.stopPropagation(), r21({ type: 0 });
        break;
    }
  }), S9 = o4((i16) => {
    switch (i16.key) {
      case o8.Space:
        i16.preventDefault();
        break;
    }
  }), u25 = o4((i16) => {
    var g6;
    s6(i16.currentTarget) || a28 || (s21 ? (r21({ type: 0 }), (g6 = o19.buttonElement) == null || g6.focus()) : r21({ type: 0 }));
  }), { isFocusVisible: m10, focusProps: d14 } = $0c4a58759813079a$export$4e328f61c538687f({ autoFocus: c21 }), { isHovered: C11, hoverProps: h15 } = $e969f22b6713ca4a$export$ae780daf29e6d456({ isDisabled: a28 }), { pressed: $5, pressProps: U3 } = w({ disabled: a28 }), J4 = n2({ open: o19.disclosureState === 0, hover: C11, active: $5, disabled: a28, focus: m10, autofocus: c21 }), G6 = e5(e9, o19.buttonElement), X5 = s21 ? V({ ref: T10, type: G6, disabled: a28 || void 0, autoFocus: c21, onKeyDown: D12, onClick: u25 }, d14, h15, U3) : V({ ref: T10, id: p13, type: G6, "aria-expanded": o19.disclosureState === 0, "aria-controls": o19.panelElement ? o19.panelId : void 0, disabled: a28 || void 0, autoFocus: c21, onKeyDown: D12, onKeyUp: S9, onClick: u25 }, d14, h15, U3);
  return K()({ ourProps: X5, theirProps: n17, slot: J4, defaultTag: ge5, name: "Disclosure.Button" });
}
var be2 = "div";
var Ce = A.RenderStrategy | A.Static;
function Re2(e9, t14) {
  let l19 = (0, import_react39.useId)(), { id: p13 = `headlessui-disclosure-panel-${l19}`, transition: a28 = false, ...c21 } = e9, [n17, o19] = M7("Disclosure.Panel"), { close: r21 } = V4("Disclosure.Panel"), [f22, s21] = (0, import_react87.useState)(null), E13 = y(t14, o4((C11) => {
    a22(() => o19({ type: 5, element: C11 }));
  }), s21);
  (0, import_react87.useEffect)(() => (o19({ type: 3, panelId: p13 }), () => {
    o19({ type: 3, panelId: null });
  }), [p13, o19]);
  let T10 = u17(), [D12, S9] = N2(a28, f22, T10 !== null ? (T10 & i10.Open) === i10.Open : n17.disclosureState === 0), u25 = n2({ open: n17.disclosureState === 0, close: r21 }), m10 = { ref: E13, id: p13, ...x4(S9) }, d14 = K();
  return import_react87.default.createElement(s13, null, import_react87.default.createElement(H7.Provider, { value: n17.panelId }, d14({ ourProps: m10, theirProps: c21, slot: u25, defaultTag: be2, features: Ce, visible: D12, name: "Disclosure.Panel" })));
}
var Ie2 = Y(Se);
var xe2 = Y(Ae4);
var Le3 = Y(Re2);
var Xe2 = Object.assign(Ie2, { Button: xe2, Panel: Le3 });

// node_modules/@headlessui/react/dist/components/field/field.js
var import_react88 = __toESM(require_react(), 1);
var _7 = "div";
function c18(d14, l19) {
  let t14 = `headlessui-control-${(0, import_react39.useId)()}`, [p13, n17] = V2(), [s21, a28] = H3(), m10 = a3(), { disabled: r21 = m10 || false, ...o19 } = d14, i16 = n2({ disabled: r21 }), f22 = { ref: l19, disabled: r21 || void 0, "aria-disabled": r21 || void 0 }, F7 = K();
  return import_react88.default.createElement(l2, { value: r21 }, import_react88.default.createElement(n17, { value: p13 }, import_react88.default.createElement(a28, { value: s21 }, import_react88.default.createElement(f6, { id: t14 }, F7({ ourProps: f22, theirProps: { ...o19, children: import_react88.default.createElement(W, null, typeof o19.children == "function" ? o19.children(i16) : o19.children) }, slot: i16, defaultTag: _7, name: "Field" })))));
}
var W2 = Y(c18);

// node_modules/@headlessui/react/dist/components/fieldset/fieldset.js
var import_react90 = __toESM(require_react(), 1);

// node_modules/@headlessui/react/dist/hooks/use-resolved-tag.js
var import_react89 = __toESM(require_react(), 1);
function d10(t14) {
  let e9 = typeof t14 == "string" ? t14 : void 0, [s21, o19] = (0, import_react89.useState)(e9);
  return [e9 != null ? e9 : s21, (0, import_react89.useCallback)((n17) => {
    e9 || n5(n17) && o19(n17.tagName.toLowerCase());
  }, [e9])];
}

// node_modules/@headlessui/react/dist/components/fieldset/fieldset.js
var d11 = "fieldset";
function R7(t14, i16) {
  var o19;
  let a28 = a3(), { disabled: e9 = a28 || false, ...p13 } = t14, [n17, T10] = d10((o19 = t14.as) != null ? o19 : d11), l19 = y(i16, T10), [r21, f22] = V2(), m10 = n2({ disabled: e9 }), y10 = n17 === "fieldset" ? { ref: l19, "aria-labelledby": r21, disabled: e9 || void 0 } : { ref: l19, role: "group", "aria-labelledby": r21, "aria-disabled": e9 || void 0 }, F7 = K();
  return import_react90.default.createElement(l2, { value: e9 }, import_react90.default.createElement(f22, null, F7({ ourProps: y10, theirProps: p13, slot: m10, defaultTag: d11, name: "Fieldset" })));
}
var I9 = Y(R7);

// node_modules/@headlessui/react/dist/components/input/input.js
var x8 = "input";
function h9(r21, p13) {
  let n17 = (0, import_react39.useId)(), s21 = u4(), a28 = a3(), { id: l19 = s21 || `headlessui-input-${n17}`, disabled: e9 = a28 || false, autoFocus: o19 = false, invalid: t14 = false, ...i16 } = r21, d14 = N(), u25 = w3(), { isFocused: f22, focusProps: m10 } = $0c4a58759813079a$export$4e328f61c538687f({ autoFocus: o19 }), { isHovered: T10, hoverProps: b14 } = $e969f22b6713ca4a$export$ae780daf29e6d456({ isDisabled: e9 }), y10 = V({ ref: p13, id: l19, "aria-labelledby": d14, "aria-describedby": u25, "aria-invalid": t14 ? "true" : void 0, disabled: e9 || void 0, autoFocus: o19 }, m10, b14), I10 = n2({ disabled: e9, invalid: t14, hover: T10, focus: f22, autofocus: o19 });
  return K()({ ourProps: y10, theirProps: i16, slot: I10, defaultTag: x8, name: "Input" });
}
var X3 = Y(h9);

// node_modules/@headlessui/react/dist/components/legend/legend.js
var import_react91 = __toESM(require_react(), 1);
function o16(t14, n17) {
  return import_react91.default.createElement(Z, { as: "div", ref: n17, ...t14 });
}
var d12 = Y(o16);

// node_modules/@headlessui/react/dist/components/listbox/listbox.js
var import_react94 = __toESM(require_react(), 1);
var import_react_dom9 = __toESM(require_react_dom(), 1);

// node_modules/@headlessui/react/dist/hooks/use-text-value.js
var import_react92 = __toESM(require_react(), 1);

// node_modules/@headlessui/react/dist/utils/get-text-value.js
var a24 = /([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;
function o17(e9) {
  var l19, n17;
  let i16 = (l19 = e9.innerText) != null ? l19 : "", t14 = e9.cloneNode(true);
  if (!n5(t14)) return i16;
  let u25 = false;
  for (let f22 of t14.querySelectorAll('[hidden],[aria-hidden],[role="img"]')) f22.remove(), u25 = true;
  let r21 = u25 ? (n17 = t14.innerText) != null ? n17 : "" : i16;
  return a24.test(r21) && (r21 = r21.replace(a24, "")), r21;
}
function F5(e9) {
  let i16 = e9.getAttribute("aria-label");
  if (typeof i16 == "string") return i16.trim();
  let t14 = e9.getAttribute("aria-labelledby");
  if (t14) {
    let u25 = t14.split(" ").map((r21) => {
      let l19 = document.getElementById(r21);
      if (l19) {
        let n17 = l19.getAttribute("aria-label");
        return typeof n17 == "string" ? n17.trim() : o17(l19).trim();
      }
      return null;
    }).filter(Boolean);
    if (u25.length > 0) return u25.join(", ");
  }
  return o17(e9).trim();
}

// node_modules/@headlessui/react/dist/hooks/use-text-value.js
function s17(c21) {
  let t14 = (0, import_react92.useRef)(""), r21 = (0, import_react92.useRef)("");
  return o4(() => {
    let e9 = c21.current;
    if (!e9) return "";
    let u25 = e9.innerText;
    if (t14.current === u25) return r21.current;
    let n17 = F5(e9).trim().toLowerCase();
    return t14.current = u25, r21.current = n17, n17;
  });
}

// node_modules/@headlessui/react/dist/components/listbox/listbox-machine.js
var T9 = Object.defineProperty;
var y8 = (e9, o19, t14) => o19 in e9 ? T9(e9, o19, { enumerable: true, configurable: true, writable: true, value: t14 }) : e9[o19] = t14;
var b11 = (e9, o19, t14) => (y8(e9, typeof o19 != "symbol" ? o19 + "" : o19, t14), t14);
var F6 = ((t14) => (t14[t14.Open = 0] = "Open", t14[t14.Closed = 1] = "Closed", t14))(F6 || {});
var P5 = ((t14) => (t14[t14.Single = 0] = "Single", t14[t14.Multi = 1] = "Multi", t14))(P5 || {});
var C8 = ((t14) => (t14[t14.Pointer = 0] = "Pointer", t14[t14.Other = 1] = "Other", t14))(C8 || {});
var k10 = ((r21) => (r21[r21.OpenListbox = 0] = "OpenListbox", r21[r21.CloseListbox = 1] = "CloseListbox", r21[r21.GoToOption = 2] = "GoToOption", r21[r21.Search = 3] = "Search", r21[r21.ClearSearch = 4] = "ClearSearch", r21[r21.SelectOption = 5] = "SelectOption", r21[r21.RegisterOptions = 6] = "RegisterOptions", r21[r21.UnregisterOptions = 7] = "UnregisterOptions", r21[r21.SetButtonElement = 8] = "SetButtonElement", r21[r21.SetOptionsElement = 9] = "SetOptionsElement", r21[r21.SortOptions = 10] = "SortOptions", r21[r21.MarkButtonAsMoved = 11] = "MarkButtonAsMoved", r21))(k10 || {});
function g5(e9, o19 = (t14) => t14) {
  let t14 = e9.activeOptionIndex !== null ? e9.options[e9.activeOptionIndex] : null, n17 = G2(o19(e9.options.slice()), (s21) => s21.dataRef.current.domRef.current), i16 = t14 ? n17.indexOf(t14) : null;
  return i16 === -1 && (i16 = null), { options: n17, activeOptionIndex: i16 };
}
var D9 = { [1](e9) {
  if (e9.dataRef.current.disabled || e9.listboxState === 1) return e9;
  let o19 = e9.buttonElement ? c16.Tracked(a18(e9.buttonElement)) : e9.buttonPositionState;
  return { ...e9, activeOptionIndex: null, pendingFocus: { focus: c12.Nothing }, listboxState: 1, __demoMode: false, buttonPositionState: o19 };
}, [0](e9, o19) {
  if (e9.dataRef.current.disabled || e9.listboxState === 0) return e9;
  let t14 = e9.activeOptionIndex, { isSelected: n17 } = e9.dataRef.current, i16 = e9.options.findIndex((s21) => n17(s21.dataRef.current.value));
  return i16 !== -1 && (t14 = i16), { ...e9, frozenValue: false, pendingFocus: o19.focus, listboxState: 0, activeOptionIndex: t14, __demoMode: false, buttonPositionState: c16.Idle };
}, [2](e9, o19) {
  var s21, l19, c21, p13, f22;
  if (e9.dataRef.current.disabled || e9.listboxState === 1) return e9;
  let t14 = { ...e9, searchQuery: "", activationTrigger: (s21 = o19.trigger) != null ? s21 : 1, __demoMode: false };
  if (o19.focus === c12.Nothing) return { ...t14, activeOptionIndex: null };
  if (o19.focus === c12.Specific) return { ...t14, activeOptionIndex: e9.options.findIndex((d14) => d14.id === o19.id) };
  if (o19.focus === c12.Previous) {
    let d14 = e9.activeOptionIndex;
    if (d14 !== null) {
      let O6 = e9.options[d14].dataRef.current.domRef, r21 = f14(o19, { resolveItems: () => e9.options, resolveActiveIndex: () => e9.activeOptionIndex, resolveId: (u25) => u25.id, resolveDisabled: (u25) => u25.dataRef.current.disabled });
      if (r21 !== null) {
        let u25 = e9.options[r21].dataRef.current.domRef;
        if (((l19 = O6.current) == null ? void 0 : l19.previousElementSibling) === u25.current || ((c21 = u25.current) == null ? void 0 : c21.previousElementSibling) === null) return { ...t14, activeOptionIndex: r21 };
      }
    }
  } else if (o19.focus === c12.Next) {
    let d14 = e9.activeOptionIndex;
    if (d14 !== null) {
      let O6 = e9.options[d14].dataRef.current.domRef, r21 = f14(o19, { resolveItems: () => e9.options, resolveActiveIndex: () => e9.activeOptionIndex, resolveId: (u25) => u25.id, resolveDisabled: (u25) => u25.dataRef.current.disabled });
      if (r21 !== null) {
        let u25 = e9.options[r21].dataRef.current.domRef;
        if (((p13 = O6.current) == null ? void 0 : p13.nextElementSibling) === u25.current || ((f22 = u25.current) == null ? void 0 : f22.nextElementSibling) === null) return { ...t14, activeOptionIndex: r21 };
      }
    }
  }
  let n17 = g5(e9), i16 = f14(o19, { resolveItems: () => n17.options, resolveActiveIndex: () => n17.activeOptionIndex, resolveId: (d14) => d14.id, resolveDisabled: (d14) => d14.dataRef.current.disabled });
  return { ...t14, ...n17, activeOptionIndex: i16 };
}, [3]: (e9, o19) => {
  if (e9.dataRef.current.disabled || e9.listboxState === 1) return e9;
  let n17 = e9.searchQuery !== "" ? 0 : 1, i16 = e9.searchQuery + o19.value.toLowerCase(), l19 = (e9.activeOptionIndex !== null ? e9.options.slice(e9.activeOptionIndex + n17).concat(e9.options.slice(0, e9.activeOptionIndex + n17)) : e9.options).find((p13) => {
    var f22;
    return !p13.dataRef.current.disabled && ((f22 = p13.dataRef.current.textValue) == null ? void 0 : f22.startsWith(i16));
  }), c21 = l19 ? e9.options.indexOf(l19) : -1;
  return c21 === -1 || c21 === e9.activeOptionIndex ? { ...e9, searchQuery: i16 } : { ...e9, searchQuery: i16, activeOptionIndex: c21, activationTrigger: 1 };
}, [4](e9) {
  return e9.dataRef.current.disabled || e9.listboxState === 1 || e9.searchQuery === "" ? e9 : { ...e9, searchQuery: "" };
}, [5](e9) {
  return e9.dataRef.current.mode === 0 ? { ...e9, frozenValue: true } : { ...e9 };
}, [6]: (e9, o19) => {
  let t14 = e9.options.concat(o19.options), n17 = e9.activeOptionIndex;
  if (e9.pendingFocus.focus !== c12.Nothing && (n17 = f14(e9.pendingFocus, { resolveItems: () => t14, resolveActiveIndex: () => e9.activeOptionIndex, resolveId: (i16) => i16.id, resolveDisabled: (i16) => i16.dataRef.current.disabled })), e9.activeOptionIndex === null) {
    let { isSelected: i16 } = e9.dataRef.current;
    if (i16) {
      let s21 = t14.findIndex((l19) => i16 == null ? void 0 : i16(l19.dataRef.current.value));
      s21 !== -1 && (n17 = s21);
    }
  }
  return { ...e9, options: t14, activeOptionIndex: n17, pendingFocus: { focus: c12.Nothing }, pendingShouldSort: true };
}, [7]: (e9, o19) => {
  let t14 = e9.options, n17 = [], i16 = new Set(o19.options);
  for (let [s21, l19] of t14.entries()) if (i16.has(l19.id) && (n17.push(s21), i16.delete(l19.id), i16.size === 0)) break;
  if (n17.length > 0) {
    t14 = t14.slice();
    for (let s21 of n17.reverse()) t14.splice(s21, 1);
  }
  return { ...e9, options: t14, activationTrigger: 1 };
}, [8]: (e9, o19) => e9.buttonElement === o19.element ? e9 : { ...e9, buttonElement: o19.element }, [9]: (e9, o19) => e9.optionsElement === o19.element ? e9 : { ...e9, optionsElement: o19.element }, [10]: (e9) => e9.pendingShouldSort ? { ...e9, ...g5(e9), pendingShouldSort: false } : e9, [11](e9) {
  return e9.buttonPositionState.kind !== "Tracked" ? e9 : { ...e9, buttonPositionState: c16.Moved };
} };
var h10 = class _h extends T3 {
  constructor(t14) {
    super(t14);
    b11(this, "actions", { onChange: (t15) => {
      let { onChange: n17, compare: i16, mode: s21, value: l19 } = this.state.dataRef.current;
      return u(s21, { [0]: () => n17 == null ? void 0 : n17(t15), [1]: () => {
        let c21 = l19.slice(), p13 = c21.findIndex((f22) => i16(f22, t15));
        return p13 === -1 ? c21.push(t15) : c21.splice(p13, 1), n17 == null ? void 0 : n17(c21);
      } });
    }, registerOption: k3(() => {
      let t15 = [], n17 = /* @__PURE__ */ new Set();
      return [(i16, s21) => {
        n17.has(s21) || (n17.add(s21), t15.push({ id: i16, dataRef: s21 }));
      }, () => (n17.clear(), this.send({ type: 6, options: t15.splice(0) }))];
    }), unregisterOption: k3(() => {
      let t15 = [];
      return [(n17) => t15.push(n17), () => {
        this.send({ type: 7, options: t15.splice(0) });
      }];
    }), goToOption: k3(() => {
      let t15 = null;
      return [(n17, i16) => {
        t15 = { type: 2, ...n17, trigger: i16 };
      }, () => t15 && this.send(t15)];
    }), closeListbox: () => {
      this.send({ type: 1 });
    }, openListbox: (t15) => {
      this.send({ type: 0, focus: t15 });
    }, selectActiveOption: () => {
      var t15;
      if (this.state.activeOptionIndex !== null) {
        let { dataRef: n17 } = this.state.options[this.state.activeOptionIndex];
        this.actions.selectOption(n17.current.value);
      } else this.state.dataRef.current.mode === 0 && (this.actions.closeListbox(), (t15 = this.state.buttonElement) == null || t15.focus({ preventScroll: true }));
    }, selectOption: (t15) => {
      this.send({ type: 5, value: t15 });
    }, search: (t15) => {
      this.send({ type: 3, value: t15 });
    }, clearSearch: () => {
      this.send({ type: 4 });
    }, setButtonElement: (t15) => {
      this.send({ type: 8, element: t15 });
    }, setOptionsElement: (t15) => {
      this.send({ type: 9, element: t15 });
    } });
    b11(this, "selectors", { activeDescendantId(t15) {
      var s21;
      let n17 = t15.activeOptionIndex, i16 = t15.options;
      return n17 === null || (s21 = i16[n17]) == null ? void 0 : s21.id;
    }, isActive(t15, n17) {
      var l19;
      let i16 = t15.activeOptionIndex, s21 = t15.options;
      return i16 !== null ? ((l19 = s21[i16]) == null ? void 0 : l19.id) === n17 : false;
    }, hasFrozenValue(t15) {
      return t15.frozenValue;
    }, shouldScrollIntoView(t15, n17) {
      return t15.__demoMode || t15.listboxState !== 0 || t15.activationTrigger === 0 ? false : this.isActive(t15, n17);
    }, didButtonMove(t15) {
      return t15.buttonPositionState.kind === "Moved";
    } });
    this.on(6, () => {
      requestAnimationFrame(() => {
        this.send({ type: 10 });
      });
    });
    {
      let n17 = this.state.id, i16 = x2.get(null);
      this.disposables.add(i16.on(k4.Push, (s21) => {
        !i16.selectors.isTop(s21, n17) && this.state.listboxState === 0 && this.actions.closeListbox();
      })), this.on(0, () => i16.actions.push(n17)), this.on(1, () => i16.actions.pop(n17));
    }
    this.disposables.group((n17) => {
      this.on(1, (i16) => {
        i16.buttonElement && (n17.dispose(), n17.add(p6(i16.buttonElement, i16.buttonPositionState, () => {
          this.send({ type: 11 });
        })));
      });
    }), this.on(5, (n17, i16) => {
      var s21;
      this.actions.onChange(i16.value), this.state.dataRef.current.mode === 0 && (this.actions.closeListbox(), (s21 = this.state.buttonElement) == null || s21.focus({ preventScroll: true }));
    });
  }
  static new({ id: t14, __demoMode: n17 = false }) {
    return new _h({ id: t14, dataRef: { current: {} }, listboxState: n17 ? 0 : 1, options: [], searchQuery: "", activeOptionIndex: null, activationTrigger: 1, buttonElement: null, optionsElement: null, pendingShouldSort: false, pendingFocus: { focus: c12.Nothing }, frozenValue: false, __demoMode: n17, buttonPositionState: c16.Idle });
  }
  reduce(t14, n17) {
    return u(n17.type, D9, t14, n17);
  }
};

// node_modules/@headlessui/react/dist/components/listbox/listbox-machine-glue.js
var import_react93 = __toESM(require_react(), 1);
var c19 = (0, import_react93.createContext)(null);
function p10(o19) {
  let e9 = (0, import_react93.useContext)(c19);
  if (e9 === null) {
    let t14 = new Error(`<${o19} /> is missing a parent <Listbox /> component.`);
    throw Error.captureStackTrace && Error.captureStackTrace(t14, u22), t14;
  }
  return e9;
}
function u22({ id: o19, __demoMode: e9 = false }) {
  let t14 = (0, import_react93.useMemo)(() => h10.new({ id: o19, __demoMode: e9 }), []);
  return c13(() => t14.dispose()), t14;
}

// node_modules/@headlessui/react/dist/components/listbox/listbox.js
var oe4 = (0, import_react94.createContext)(null);
oe4.displayName = "ListboxDataContext";
function Q3(b14) {
  let E13 = (0, import_react94.useContext)(oe4);
  if (E13 === null) {
    let m10 = new Error(`<${b14} /> is missing a parent <Listbox /> component.`);
    throw Error.captureStackTrace && Error.captureStackTrace(m10, Q3), m10;
  }
  return E13;
}
var Pt = import_react94.Fragment;
function gt(b14, E13) {
  let m10 = (0, import_react39.useId)(), u25 = a3(), { value: s21, defaultValue: a28, form: _9, name: i16, onChange: y10, by: o19, invalid: x10 = false, disabled: O6 = u25 || false, horizontal: l19 = false, multiple: t14 = false, __demoMode: p13 = false, ...S9 } = b14;
  const h15 = l19 ? "horizontal" : "vertical";
  let I10 = y(E13), R8 = l3(a28), [c21 = t14 ? [] : void 0, L8] = b2(s21, y10, R8), f22 = u22({ id: m10, __demoMode: p13 }), k14 = (0, import_react94.useRef)({ static: false, hold: false }), N4 = (0, import_react94.useRef)(/* @__PURE__ */ new Map()), C11 = u9(o19), V6 = (0, import_react94.useCallback)((P7) => u(n17.mode, { [P5.Multi]: () => c21.some((W4) => C11(W4, P7)), [P5.Single]: () => C11(c21, P7) }), [c21]), n17 = n2({ value: c21, disabled: O6, invalid: x10, mode: t14 ? P5.Multi : P5.Single, orientation: h15, onChange: L8, compare: C11, isSelected: V6, optionsPropsRef: k14, listRef: N4 });
  n(() => {
    f22.state.dataRef.current = n17;
  }, [n17]);
  let F7 = S3(f22, (P7) => P7.listboxState), U3 = x2.get(null), H10 = S3(U3, (0, import_react94.useCallback)((P7) => U3.selectors.isTop(P7, m10), [U3, m10])), [A5, $5] = S3(f22, (P7) => [P7.buttonElement, P7.optionsElement]);
  k5(H10, [A5, $5], (P7, W4) => {
    f22.send({ type: k10.CloseListbox }), H4(W4, I4.Loose) || (P7.preventDefault(), A5 == null || A5.focus());
  });
  let r21 = n2({ open: F7 === F6.Open, disabled: O6, invalid: x10, value: c21 }), [M11, ne4] = V2({ inherit: true }), re4 = { ref: I10 }, q5 = (0, import_react94.useCallback)(() => {
    if (R8 !== void 0) return L8 == null ? void 0 : L8(R8);
  }, [L8, R8]), le2 = K();
  return import_react94.default.createElement(ne4, { value: M11, props: { htmlFor: A5 == null ? void 0 : A5.id }, slot: { open: F7 === F6.Open, disabled: O6 } }, import_react94.default.createElement(Ae, null, import_react94.default.createElement(c19.Provider, { value: f22 }, import_react94.default.createElement(oe4.Provider, { value: n17 }, import_react94.default.createElement(c11, { value: u(F7, { [F6.Open]: i10.Open, [F6.Closed]: i10.Closed }) }, i16 != null && c21 != null && import_react94.default.createElement(j2, { disabled: O6, data: { [i16]: c21 }, form: _9, onReset: q5 }), le2({ ourProps: re4, theirProps: S9, slot: r21, defaultTag: Pt, name: "Listbox" }))))));
}
var vt = "button";
function Et(b14, E13) {
  let m10 = (0, import_react39.useId)(), u25 = u4(), s21 = Q3("Listbox.Button"), a28 = p10("Listbox.Button"), { id: _9 = u25 || `headlessui-listbox-button-${m10}`, disabled: i16 = s21.disabled || false, autoFocus: y10 = false, ...o19 } = b14, x10 = y(E13, Fe(), a28.actions.setButtonElement), O6 = be(), [l19, t14, p13] = S3(a28, (r21) => [r21.listboxState, r21.buttonElement, r21.optionsElement]), S9 = l19 === F6.Open;
  L5(S9, { trigger: t14, action: (0, import_react94.useCallback)((r21) => {
    if (t14 != null && t14.contains(r21.target)) return S5.Ignore;
    let M11 = r21.target.closest('[role="option"]:not([data-disabled])');
    return n5(M11) ? S5.Select(M11) : p13 != null && p13.contains(r21.target) ? S5.Ignore : S5.Close;
  }, [t14, p13]), close: a28.actions.closeListbox, select: a28.actions.selectActiveOption });
  let h15 = o4((r21) => {
    switch (r21.key) {
      case o8.Enter:
        g(r21.currentTarget);
        break;
      case o8.Space:
      case o8.ArrowDown:
        r21.preventDefault(), a28.actions.openListbox({ focus: s21.value ? c12.Nothing : c12.First });
        break;
      case o8.ArrowUp:
        r21.preventDefault(), a28.actions.openListbox({ focus: s21.value ? c12.Nothing : c12.Last });
        break;
    }
  }), I10 = o4((r21) => {
    switch (r21.key) {
      case o8.Space:
        r21.preventDefault();
        break;
    }
  }), R8 = s8((r21) => {
    var M11;
    a28.state.listboxState === F6.Open ? ((0, import_react_dom9.flushSync)(() => a28.actions.closeListbox()), (M11 = a28.state.buttonElement) == null || M11.focus({ preventScroll: true })) : (r21.preventDefault(), a28.actions.openListbox({ focus: c12.Nothing }));
  }), c21 = o4((r21) => r21.preventDefault()), L8 = N([_9]), f22 = w3(), { isFocusVisible: k14, focusProps: N4 } = $0c4a58759813079a$export$4e328f61c538687f({ autoFocus: y10 }), { isHovered: C11, hoverProps: V6 } = $e969f22b6713ca4a$export$ae780daf29e6d456({ isDisabled: i16 }), { pressed: n17, pressProps: F7 } = w({ disabled: i16 }), U3 = n2({ open: l19 === F6.Open, active: n17 || l19 === F6.Open, disabled: i16, invalid: s21.invalid, value: s21.value, hover: C11, focus: k14, autofocus: y10 }), H10 = S3(a28, (r21) => r21.listboxState === F6.Open), A5 = V(O6(), { ref: x10, id: _9, type: e5(b14, t14), "aria-haspopup": "listbox", "aria-controls": p13 == null ? void 0 : p13.id, "aria-expanded": H10, "aria-labelledby": L8, "aria-describedby": f22, disabled: i16 || void 0, autoFocus: y10, onKeyDown: h15, onKeyUp: I10, onKeyPress: c21 }, R8, N4, V6, F7);
  return K()({ ourProps: A5, theirProps: o19, slot: U3, defaultTag: vt, name: "Listbox.Button" });
}
var Oe2 = (0, import_react94.createContext)(false);
var ht2 = "div";
var At = A.RenderStrategy | A.Static;
function _t(b14, E13) {
  let m10 = (0, import_react39.useId)(), { id: u25 = `headlessui-listbox-options-${m10}`, anchor: s21, portal: a28 = false, modal: _9 = true, transition: i16 = false, ...y10 } = b14, o19 = ye(s21), [x10, O6] = (0, import_react94.useState)(null);
  o19 && (a28 = true);
  let l19 = Q3("Listbox.Options"), t14 = p10("Listbox.Options"), [p13, S9, h15, I10] = S3(t14, (e9) => [e9.listboxState, e9.buttonElement, e9.optionsElement, e9.__demoMode]), R8 = u13(S9), c21 = u13(h15), L8 = u17(), [f22, k14] = N2(i16, x10, L8 !== null ? (L8 & i10.Open) === i10.Open : p13 === F6.Open);
  p5(f22, S9, t14.actions.closeListbox);
  let N4 = I10 ? false : _9 && p13 === F6.Open;
  f11(N4, c21);
  let C11 = I10 ? false : _9 && p13 === F6.Open;
  y4(C11, { allowed: (0, import_react94.useCallback)(() => [S9, h15], [S9, h15]) });
  let n17 = S3(t14, t14.selectors.didButtonMove) ? false : f22, F7 = S3(t14, t14.selectors.hasFrozenValue) && !b14.static, U3 = u16(F7, l19.value), H10 = (0, import_react94.useCallback)((e9) => l19.compare(U3, e9), [l19.compare, U3]), A5 = S3(t14, (e9) => {
    var de6;
    if (o19 == null || !((de6 = o19 == null ? void 0 : o19.to) != null && de6.includes("selection"))) return null;
    let w12 = e9.options.findIndex((ve3) => H10(ve3.dataRef.current.value));
    return w12 === -1 && (w12 = 0), w12;
  }), $5 = (() => {
    if (o19 == null) return;
    if (A5 === null) return { ...o19, inner: void 0 };
    let e9 = Array.from(l19.listRef.current.values());
    return { ...o19, inner: { listRef: { current: e9 }, index: A5 } };
  })(), [r21, M11] = Re($5), ne4 = Te(), re4 = y(E13, o19 ? r21 : null, t14.actions.setOptionsElement, O6), q5 = p();
  (0, import_react94.useEffect)(() => {
    let e9 = h15;
    e9 && p13 === F6.Open && (d2(e9) || e9 == null || e9.focus({ preventScroll: true }));
  }, [p13, h15]);
  let le2 = o4((e9) => {
    var w12;
    switch (q5.dispose(), e9.key) {
      case o8.Space:
        if (t14.state.searchQuery !== "") return e9.preventDefault(), e9.stopPropagation(), t14.actions.search(e9.key);
      case o8.Enter:
        e9.preventDefault(), e9.stopPropagation(), t14.actions.selectActiveOption();
        break;
      case u(l19.orientation, { vertical: o8.ArrowDown, horizontal: o8.ArrowRight }):
        return e9.preventDefault(), e9.stopPropagation(), t14.actions.goToOption({ focus: c12.Next });
      case u(l19.orientation, { vertical: o8.ArrowUp, horizontal: o8.ArrowLeft }):
        return e9.preventDefault(), e9.stopPropagation(), t14.actions.goToOption({ focus: c12.Previous });
      case o8.Home:
      case o8.PageUp:
        return e9.preventDefault(), e9.stopPropagation(), t14.actions.goToOption({ focus: c12.First });
      case o8.End:
      case o8.PageDown:
        return e9.preventDefault(), e9.stopPropagation(), t14.actions.goToOption({ focus: c12.Last });
      case o8.Escape:
        e9.preventDefault(), e9.stopPropagation(), (0, import_react_dom9.flushSync)(() => t14.actions.closeListbox()), (w12 = t14.state.buttonElement) == null || w12.focus({ preventScroll: true });
        return;
      case o8.Tab:
        e9.preventDefault(), e9.stopPropagation(), (0, import_react_dom9.flushSync)(() => t14.actions.closeListbox()), R3(t14.state.buttonElement, e9.shiftKey ? T4.Previous : T4.Next);
        break;
      default:
        e9.key.length === 1 && (t14.actions.search(e9.key), q5.setTimeout(() => t14.actions.clearSearch(), 350));
        break;
    }
  }), P7 = S3(t14, (e9) => {
    var w12;
    return (w12 = e9.buttonElement) == null ? void 0 : w12.id;
  }), W4 = n2({ open: p13 === F6.Open }), Le6 = V(o19 ? ne4() : {}, { id: u25, ref: re4, "aria-activedescendant": S3(t14, t14.selectors.activeDescendantId), "aria-multiselectable": l19.mode === P5.Multi ? true : void 0, "aria-labelledby": P7, "aria-orientation": l19.orientation, onKeyDown: le2, role: "listbox", tabIndex: p13 === F6.Open ? 0 : void 0, style: { ...y10.style, ...M11, "--button-width": w5(f22, S9, true).width }, ...x4(k14) }), Pe2 = K(), ge7 = (0, import_react94.useMemo)(() => l19.mode === P5.Multi ? l19 : { ...l19, isSelected: H10 }, [l19, H10]);
  return import_react94.default.createElement(le, { enabled: a28 ? b14.static || f22 : false, ownerDocument: R8 }, import_react94.default.createElement(oe4.Provider, { value: ge7 }, Pe2({ ourProps: Le6, theirProps: y10, slot: W4, defaultTag: ht2, features: At, visible: n17, name: "Listbox.Options" })));
}
var St = "div";
function Dt(b14, E13) {
  let m10 = (0, import_react39.useId)(), { id: u25 = `headlessui-listbox-option-${m10}`, disabled: s21 = false, value: a28, ..._9 } = b14, i16 = (0, import_react94.useContext)(Oe2) === true, y10 = Q3("Listbox.Option"), o19 = p10("Listbox.Option"), x10 = S3(o19, (n17) => o19.selectors.isActive(n17, u25)), O6 = y10.isSelected(a28), l19 = (0, import_react94.useRef)(null), t14 = s17(l19), p13 = s3({ disabled: s21, value: a28, domRef: l19, get textValue() {
    return t14();
  } }), S9 = y(E13, l19, (n17) => {
    n17 ? y10.listRef.current.set(u25, n17) : y10.listRef.current.delete(u25);
  }), h15 = S3(o19, (n17) => o19.selectors.shouldScrollIntoView(n17, u25));
  n(() => {
    if (h15) return o2().requestAnimationFrame(() => {
      var n17, F7;
      (F7 = (n17 = l19.current) == null ? void 0 : n17.scrollIntoView) == null || F7.call(n17, { block: "nearest" });
    });
  }, [h15, l19]), n(() => {
    if (!i16) return o19.actions.registerOption(u25, p13), () => o19.actions.unregisterOption(u25);
  }, [p13, u25, i16]);
  let I10 = o4((n17) => {
    if (s21) return n17.preventDefault();
    o19.actions.selectOption(a28);
  }), R8 = o4(() => {
    if (s21) return o19.actions.goToOption({ focus: c12.Nothing });
    o19.actions.goToOption({ focus: c12.Specific, id: u25 });
  }), c21 = u15(), L8 = o4((n17) => c21.update(n17)), f22 = o4((n17) => {
    c21.wasMoved(n17) && (s21 || x10 && o19.state.activationTrigger === C8.Pointer || o19.actions.goToOption({ focus: c12.Specific, id: u25 }, C8.Pointer));
  }), k14 = o4((n17) => {
    c21.wasMoved(n17) && (s21 || x10 && o19.state.activationTrigger === C8.Pointer && o19.actions.goToOption({ focus: c12.Nothing }));
  }), N4 = n2({ active: x10, focus: x10, selected: O6, disabled: s21, selectedOption: O6 && i16 }), C11 = i16 ? {} : { id: u25, ref: S9, role: "option", tabIndex: s21 === true ? void 0 : -1, "aria-disabled": s21 === true ? true : void 0, "aria-selected": O6, disabled: void 0, onClick: I10, onFocus: R8, onPointerEnter: L8, onMouseEnter: L8, onPointerMove: f22, onMouseMove: f22, onPointerLeave: k14, onMouseLeave: k14 }, V6 = K();
  return !O6 && i16 ? null : V6({ ourProps: C11, theirProps: _9, slot: N4, defaultTag: St, name: "Listbox.Option" });
}
var Rt = import_react94.Fragment;
function Ft(b14, E13) {
  let { options: m10, placeholder: u25, ...s21 } = b14, _9 = { ref: y(E13) }, i16 = Q3("ListboxSelectedOption"), y10 = n2({}), o19 = i16.value === void 0 || i16.value === null || i16.mode === P5.Multi && Array.isArray(i16.value) && i16.value.length === 0, x10 = K();
  return import_react94.default.createElement(Oe2.Provider, { value: true }, x10({ ourProps: _9, theirProps: { ...s21, children: import_react94.default.createElement(import_react94.default.Fragment, null, u25 && o19 ? u25 : m10) }, slot: y10, defaultTag: Rt, name: "ListboxSelectedOption" }));
}
var Ct = Y(gt);
var Mt = Y(Et);
var wt = Z;
var Bt = Y(_t);
var It = Y(Dt);
var kt = Y(Ft);
var Mo2 = Object.assign(Ct, { Button: Mt, Label: wt, Options: Bt, Option: It, SelectedOption: kt });

// node_modules/@headlessui/react/dist/components/menu/menu.js
var import_react96 = __toESM(require_react(), 1);
var import_react_dom10 = __toESM(require_react_dom(), 1);

// node_modules/@headlessui/react/dist/components/menu/menu-machine.js
var y9 = Object.defineProperty;
var M8 = (e9, i16, t14) => i16 in e9 ? y9(e9, i16, { enumerable: true, configurable: true, writable: true, value: t14 }) : e9[i16] = t14;
var S8 = (e9, i16, t14) => (M8(e9, typeof i16 != "symbol" ? i16 + "" : i16, t14), t14);
var P6 = ((t14) => (t14[t14.Open = 0] = "Open", t14[t14.Closed = 1] = "Closed", t14))(P6 || {});
var D11 = ((t14) => (t14[t14.Pointer = 0] = "Pointer", t14[t14.Other = 1] = "Other", t14))(D11 || {});
var C9 = ((o19) => (o19[o19.OpenMenu = 0] = "OpenMenu", o19[o19.CloseMenu = 1] = "CloseMenu", o19[o19.GoToItem = 2] = "GoToItem", o19[o19.Search = 3] = "Search", o19[o19.ClearSearch = 4] = "ClearSearch", o19[o19.RegisterItems = 5] = "RegisterItems", o19[o19.UnregisterItems = 6] = "UnregisterItems", o19[o19.SetButtonElement = 7] = "SetButtonElement", o19[o19.SetItemsElement = 8] = "SetItemsElement", o19[o19.SortItems = 9] = "SortItems", o19[o19.MarkButtonAsMoved = 10] = "MarkButtonAsMoved", o19))(C9 || {});
function x9(e9, i16 = (t14) => t14) {
  let t14 = e9.activeItemIndex !== null ? e9.items[e9.activeItemIndex] : null, n17 = G2(i16(e9.items.slice()), (s21) => s21.dataRef.current.domRef.current), r21 = t14 ? n17.indexOf(t14) : null;
  return r21 === -1 && (r21 = null), { items: n17, activeItemIndex: r21 };
}
var k11 = { [1](e9) {
  if (e9.menuState === 1) return e9;
  let i16 = e9.buttonElement ? c16.Tracked(a18(e9.buttonElement)) : e9.buttonPositionState;
  return { ...e9, activeItemIndex: null, pendingFocus: { focus: c12.Nothing }, menuState: 1, buttonPositionState: i16 };
}, [0](e9, i16) {
  return e9.menuState === 0 ? e9 : { ...e9, __demoMode: false, pendingFocus: i16.focus, menuState: 0, buttonPositionState: c16.Idle };
}, [2]: (e9, i16) => {
  var s21, l19, a28, I10, f22;
  if (e9.menuState === 1) return e9;
  let t14 = { ...e9, searchQuery: "", activationTrigger: (s21 = i16.trigger) != null ? s21 : 1, __demoMode: false };
  if (i16.focus === c12.Nothing) return { ...t14, activeItemIndex: null };
  if (i16.focus === c12.Specific) return { ...t14, activeItemIndex: e9.items.findIndex((d14) => d14.id === i16.id) };
  if (i16.focus === c12.Previous) {
    let d14 = e9.activeItemIndex;
    if (d14 !== null) {
      let o19 = e9.items[d14].dataRef.current.domRef, c21 = f14(i16, { resolveItems: () => e9.items, resolveActiveIndex: () => e9.activeItemIndex, resolveId: (u25) => u25.id, resolveDisabled: (u25) => u25.dataRef.current.disabled });
      if (c21 !== null) {
        let u25 = e9.items[c21].dataRef.current.domRef;
        if (((l19 = o19.current) == null ? void 0 : l19.previousElementSibling) === u25.current || ((a28 = u25.current) == null ? void 0 : a28.previousElementSibling) === null) return { ...t14, activeItemIndex: c21 };
      }
    }
  } else if (i16.focus === c12.Next) {
    let d14 = e9.activeItemIndex;
    if (d14 !== null) {
      let o19 = e9.items[d14].dataRef.current.domRef, c21 = f14(i16, { resolveItems: () => e9.items, resolveActiveIndex: () => e9.activeItemIndex, resolveId: (u25) => u25.id, resolveDisabled: (u25) => u25.dataRef.current.disabled });
      if (c21 !== null) {
        let u25 = e9.items[c21].dataRef.current.domRef;
        if (((I10 = o19.current) == null ? void 0 : I10.nextElementSibling) === u25.current || ((f22 = u25.current) == null ? void 0 : f22.nextElementSibling) === null) return { ...t14, activeItemIndex: c21 };
      }
    }
  }
  let n17 = x9(e9), r21 = f14(i16, { resolveItems: () => n17.items, resolveActiveIndex: () => n17.activeItemIndex, resolveId: (d14) => d14.id, resolveDisabled: (d14) => d14.dataRef.current.disabled });
  return { ...t14, ...n17, activeItemIndex: r21 };
}, [3]: (e9, i16) => {
  let n17 = e9.searchQuery !== "" ? 0 : 1, r21 = e9.searchQuery + i16.value.toLowerCase(), l19 = (e9.activeItemIndex !== null ? e9.items.slice(e9.activeItemIndex + n17).concat(e9.items.slice(0, e9.activeItemIndex + n17)) : e9.items).find((I10) => {
    var f22;
    return ((f22 = I10.dataRef.current.textValue) == null ? void 0 : f22.startsWith(r21)) && !I10.dataRef.current.disabled;
  }), a28 = l19 ? e9.items.indexOf(l19) : -1;
  return a28 === -1 || a28 === e9.activeItemIndex ? { ...e9, searchQuery: r21 } : { ...e9, searchQuery: r21, activeItemIndex: a28, activationTrigger: 1 };
}, [4](e9) {
  return e9.searchQuery === "" ? e9 : { ...e9, searchQuery: "", searchActiveItemIndex: null };
}, [5]: (e9, i16) => {
  let t14 = e9.items.concat(i16.items.map((r21) => r21)), n17 = e9.activeItemIndex;
  return e9.pendingFocus.focus !== c12.Nothing && (n17 = f14(e9.pendingFocus, { resolveItems: () => t14, resolveActiveIndex: () => e9.activeItemIndex, resolveId: (r21) => r21.id, resolveDisabled: (r21) => r21.dataRef.current.disabled })), { ...e9, items: t14, activeItemIndex: n17, pendingFocus: { focus: c12.Nothing }, pendingShouldSort: true };
}, [6]: (e9, i16) => {
  let t14 = e9.items, n17 = [], r21 = new Set(i16.items);
  for (let [s21, l19] of t14.entries()) if (r21.has(l19.id) && (n17.push(s21), r21.delete(l19.id), r21.size === 0)) break;
  if (n17.length > 0) {
    t14 = t14.slice();
    for (let s21 of n17.reverse()) t14.splice(s21, 1);
  }
  return { ...e9, items: t14, activationTrigger: 1 };
}, [7]: (e9, i16) => e9.buttonElement === i16.element ? e9 : { ...e9, buttonElement: i16.element }, [8]: (e9, i16) => e9.itemsElement === i16.element ? e9 : { ...e9, itemsElement: i16.element }, [9]: (e9) => e9.pendingShouldSort ? { ...e9, ...x9(e9), pendingShouldSort: false } : e9, [10](e9) {
  return e9.buttonPositionState.kind !== "Tracked" ? e9 : { ...e9, buttonPositionState: c16.Moved };
} };
var h11 = class _h extends T3 {
  constructor(t14) {
    super(t14);
    S8(this, "actions", { registerItem: k3(() => {
      let t15 = [], n17 = /* @__PURE__ */ new Set();
      return [(r21, s21) => {
        n17.has(s21) || (n17.add(s21), t15.push({ id: r21, dataRef: s21 }));
      }, () => (n17.clear(), this.send({ type: 5, items: t15.splice(0) }))];
    }), unregisterItem: k3(() => {
      let t15 = [];
      return [(n17) => t15.push(n17), () => this.send({ type: 6, items: t15.splice(0) })];
    }) });
    S8(this, "selectors", { activeDescendantId(t15) {
      var s21;
      let n17 = t15.activeItemIndex, r21 = t15.items;
      return n17 === null || (s21 = r21[n17]) == null ? void 0 : s21.id;
    }, isActive(t15, n17) {
      var l19;
      let r21 = t15.activeItemIndex, s21 = t15.items;
      return r21 !== null ? ((l19 = s21[r21]) == null ? void 0 : l19.id) === n17 : false;
    }, shouldScrollIntoView(t15, n17) {
      return t15.__demoMode || t15.menuState !== 0 || t15.activationTrigger === 0 ? false : this.isActive(t15, n17);
    }, didButtonMove(t15) {
      return t15.buttonPositionState.kind === "Moved";
    } });
    this.on(5, () => {
      this.disposables.requestAnimationFrame(() => {
        this.send({ type: 9 });
      });
    });
    {
      let n17 = this.state.id, r21 = x2.get(null);
      this.disposables.add(r21.on(k4.Push, (s21) => {
        !r21.selectors.isTop(s21, n17) && this.state.menuState === 0 && this.send({ type: 1 });
      })), this.on(0, () => r21.actions.push(n17)), this.on(1, () => r21.actions.pop(n17));
    }
    this.disposables.group((n17) => {
      this.on(1, (r21) => {
        r21.buttonElement && (n17.dispose(), n17.add(p6(r21.buttonElement, r21.buttonPositionState, () => {
          this.send({ type: 10 });
        })));
      });
    });
  }
  static new({ id: t14, __demoMode: n17 = false }) {
    return new _h({ id: t14, __demoMode: n17, menuState: n17 ? 0 : 1, buttonElement: null, itemsElement: null, items: [], searchQuery: "", activeItemIndex: null, activationTrigger: 1, pendingShouldSort: false, pendingFocus: { focus: c12.Nothing }, buttonPositionState: c16.Idle });
  }
  reduce(t14, n17) {
    return u(n17.type, k11, t14, n17);
  }
};

// node_modules/@headlessui/react/dist/components/menu/menu-machine-glue.js
var import_react95 = __toESM(require_react(), 1);
var a25 = (0, import_react95.createContext)(null);
function p11(t14) {
  let n17 = (0, import_react95.useContext)(a25);
  if (n17 === null) {
    let e9 = new Error(`<${t14} /> is missing a parent <Menu /> component.`);
    throw Error.captureStackTrace && Error.captureStackTrace(e9, s18), e9;
  }
  return n17;
}
function s18({ id: t14, __demoMode: n17 = false }) {
  let e9 = (0, import_react95.useMemo)(() => h11.new({ id: t14, __demoMode: n17 }), []);
  return c13(() => e9.dispose()), e9;
}

// node_modules/@headlessui/react/dist/components/menu/menu.js
var Ze = import_react96.Fragment;
function et(m10, y10) {
  let l19 = (0, import_react39.useId)(), { __demoMode: a28 = false, ...p13 } = m10, s21 = s18({ id: l19, __demoMode: a28 }), [n17, M11, f22] = S3(s21, (d14) => [d14.menuState, d14.itemsElement, d14.buttonElement]), _9 = y(y10), o19 = x2.get(null), F7 = S3(o19, (0, import_react96.useCallback)((d14) => o19.selectors.isTop(d14, l19), [o19, l19]));
  k5(F7, [f22, M11], (d14, T10) => {
    var P7;
    s21.send({ type: C9.CloseMenu }), H4(T10, I4.Loose) || (d14.preventDefault(), (P7 = s21.state.buttonElement) == null || P7.focus());
  });
  let I10 = o4(() => {
    s21.send({ type: C9.CloseMenu });
  }), b14 = n2({ open: n17 === P6.Open, close: I10 }), i16 = { ref: _9 }, g6 = K();
  return import_react96.default.createElement(Ae, null, import_react96.default.createElement(a25.Provider, { value: s21 }, import_react96.default.createElement(c11, { value: u(n17, { [P6.Open]: i10.Open, [P6.Closed]: i10.Closed }) }, g6({ ourProps: i16, theirProps: p13, slot: b14, defaultTag: Ze, name: "Menu" }))));
}
var tt = "button";
function ot(m10, y10) {
  let l19 = p11("Menu.Button"), a28 = (0, import_react39.useId)(), { id: p13 = `headlessui-menu-button-${a28}`, disabled: s21 = false, autoFocus: n17 = false, ...M11 } = m10, f22 = (0, import_react96.useRef)(null), _9 = be(), o19 = y(y10, f22, Fe(), o4((t14) => l19.send({ type: C9.SetButtonElement, element: t14 }))), F7 = o4((t14) => {
    switch (t14.key) {
      case o8.Space:
      case o8.Enter:
      case o8.ArrowDown:
        t14.preventDefault(), t14.stopPropagation(), l19.send({ type: C9.OpenMenu, focus: { focus: c12.First } });
        break;
      case o8.ArrowUp:
        t14.preventDefault(), t14.stopPropagation(), l19.send({ type: C9.OpenMenu, focus: { focus: c12.Last } });
        break;
    }
  }), I10 = o4((t14) => {
    switch (t14.key) {
      case o8.Space:
        t14.preventDefault();
        break;
    }
  }), [b14, i16, g6] = S3(l19, (t14) => [t14.menuState, t14.buttonElement, t14.itemsElement]), d14 = b14 === P6.Open;
  L5(d14, { trigger: i16, action: (0, import_react96.useCallback)((t14) => {
    if (i16 != null && i16.contains(t14.target)) return S5.Ignore;
    let S9 = t14.target.closest('[role="menuitem"]:not([data-disabled])');
    return n5(S9) ? S5.Select(S9) : g6 != null && g6.contains(t14.target) ? S5.Ignore : S5.Close;
  }, [i16, g6]), close: (0, import_react96.useCallback)(() => l19.send({ type: C9.CloseMenu }), []), select: (0, import_react96.useCallback)((t14) => t14.click(), []) });
  let T10 = s8((t14) => {
    var S9;
    s21 || (b14 === P6.Open ? ((0, import_react_dom10.flushSync)(() => l19.send({ type: C9.CloseMenu })), (S9 = f22.current) == null || S9.focus({ preventScroll: true })) : (t14.preventDefault(), l19.send({ type: C9.OpenMenu, focus: { focus: c12.Nothing }, trigger: D11.Pointer })));
  }), { isFocusVisible: P7, focusProps: L8 } = $0c4a58759813079a$export$4e328f61c538687f({ autoFocus: n17 }), { isHovered: O6, hoverProps: v11 } = $e969f22b6713ca4a$export$ae780daf29e6d456({ isDisabled: s21 }), { pressed: D12, pressProps: U3 } = w({ disabled: s21 }), H10 = n2({ open: b14 === P6.Open, active: D12 || b14 === P6.Open, disabled: s21, hover: O6, focus: P7, autofocus: n17 }), G6 = V(_9(), { ref: o19, id: p13, type: e5(m10, f22.current), "aria-haspopup": "menu", "aria-controls": g6 == null ? void 0 : g6.id, "aria-expanded": b14 === P6.Open, disabled: s21 || void 0, autoFocus: n17, onKeyDown: F7, onKeyUp: I10 }, T10, L8, v11, U3);
  return K()({ ourProps: G6, theirProps: M11, slot: H10, defaultTag: tt, name: "Menu.Button" });
}
var nt = "div";
var rt = A.RenderStrategy | A.Static;
function at(m10, y10) {
  let l19 = (0, import_react39.useId)(), { id: a28 = `headlessui-menu-items-${l19}`, anchor: p13, portal: s21 = false, modal: n17 = true, transition: M11 = false, ...f22 } = m10, _9 = ye(p13), o19 = p11("Menu.Items"), [F7, I10] = Re(_9), b14 = Te(), [i16, g6] = (0, import_react96.useState)(null), d14 = y(y10, _9 ? F7 : null, o4((e9) => o19.send({ type: C9.SetItemsElement, element: e9 })), g6), [T10, P7] = S3(o19, (e9) => [e9.menuState, e9.buttonElement]), L8 = u13(P7), O6 = u13(i16);
  _9 && (s21 = true);
  let v11 = u17(), [D12, U3] = N2(M11, i16, v11 !== null ? (v11 & i10.Open) === i10.Open : T10 === P6.Open);
  p5(D12, P7, () => {
    o19.send({ type: C9.CloseMenu });
  });
  let H10 = S3(o19, (e9) => e9.__demoMode), G6 = H10 ? false : n17 && T10 === P6.Open;
  f11(G6, O6);
  let w12 = H10 ? false : n17 && T10 === P6.Open;
  y4(w12, { allowed: (0, import_react96.useCallback)(() => [P7, i16], [P7, i16]) });
  let S9 = S3(o19, o19.selectors.didButtonMove) ? false : D12;
  (0, import_react96.useEffect)(() => {
    let e9 = i16;
    e9 && T10 === P6.Open && (d2(e9) || e9.focus({ preventScroll: true }));
  }, [T10, i16]), F2(T10 === P6.Open, { container: i16, accept(e9) {
    return e9.getAttribute("role") === "menuitem" ? NodeFilter.FILTER_REJECT : e9.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
  }, walk(e9) {
    e9.setAttribute("role", "none");
  } });
  let z4 = p(), le2 = o4((e9) => {
    var N4, Y4, Z4;
    switch (z4.dispose(), e9.key) {
      case o8.Space:
        if (o19.state.searchQuery !== "") return e9.preventDefault(), e9.stopPropagation(), o19.send({ type: C9.Search, value: e9.key });
      case o8.Enter:
        if (e9.preventDefault(), e9.stopPropagation(), o19.state.activeItemIndex !== null) {
          let { dataRef: de6 } = o19.state.items[o19.state.activeItemIndex];
          (Y4 = (N4 = de6.current) == null ? void 0 : N4.domRef.current) == null || Y4.click();
        }
        o19.send({ type: C9.CloseMenu }), K2(o19.state.buttonElement);
        break;
      case o8.ArrowDown:
        return e9.preventDefault(), e9.stopPropagation(), o19.send({ type: C9.GoToItem, focus: c12.Next });
      case o8.ArrowUp:
        return e9.preventDefault(), e9.stopPropagation(), o19.send({ type: C9.GoToItem, focus: c12.Previous });
      case o8.Home:
      case o8.PageUp:
        return e9.preventDefault(), e9.stopPropagation(), o19.send({ type: C9.GoToItem, focus: c12.First });
      case o8.End:
      case o8.PageDown:
        return e9.preventDefault(), e9.stopPropagation(), o19.send({ type: C9.GoToItem, focus: c12.Last });
      case o8.Escape:
        e9.preventDefault(), e9.stopPropagation(), (0, import_react_dom10.flushSync)(() => o19.send({ type: C9.CloseMenu })), (Z4 = o19.state.buttonElement) == null || Z4.focus({ preventScroll: true });
        break;
      case o8.Tab:
        e9.preventDefault(), e9.stopPropagation(), (0, import_react_dom10.flushSync)(() => o19.send({ type: C9.CloseMenu })), R3(o19.state.buttonElement, e9.shiftKey ? T4.Previous : T4.Next);
        break;
      default:
        e9.key.length === 1 && (o19.send({ type: C9.Search, value: e9.key }), z4.setTimeout(() => o19.send({ type: C9.ClearSearch }), 350));
        break;
    }
  }), pe4 = o4((e9) => {
    switch (e9.key) {
      case o8.Space:
        e9.preventDefault();
        break;
    }
  }), ie4 = n2({ open: T10 === P6.Open }), ue5 = V(_9 ? b14() : {}, { "aria-activedescendant": S3(o19, o19.selectors.activeDescendantId), "aria-labelledby": S3(o19, (e9) => {
    var N4;
    return (N4 = e9.buttonElement) == null ? void 0 : N4.id;
  }), id: a28, onKeyDown: le2, onKeyUp: pe4, role: "menu", tabIndex: T10 === P6.Open ? 0 : void 0, ref: d14, style: { ...f22.style, ...I10, "--button-width": w5(D12, P7, true).width }, ...x4(U3) }), me5 = K();
  return import_react96.default.createElement(le, { enabled: s21 ? m10.static || D12 : false, ownerDocument: L8 }, me5({ ourProps: ue5, theirProps: f22, slot: ie4, defaultTag: nt, features: rt, visible: S9, name: "Menu.Items" }));
}
var st = import_react96.Fragment;
function lt(m10, y10) {
  let l19 = (0, import_react39.useId)(), { id: a28 = `headlessui-menu-item-${l19}`, disabled: p13 = false, ...s21 } = m10, n17 = p11("Menu.Item"), M11 = S3(n17, (t14) => n17.selectors.isActive(t14, a28)), f22 = (0, import_react96.useRef)(null), _9 = y(y10, f22), o19 = S3(n17, (t14) => n17.selectors.shouldScrollIntoView(t14, a28));
  n(() => {
    if (o19) return o2().requestAnimationFrame(() => {
      var t14, S9;
      (S9 = (t14 = f22.current) == null ? void 0 : t14.scrollIntoView) == null || S9.call(t14, { block: "nearest" });
    });
  }, [o19, f22]);
  let F7 = s17(f22), I10 = (0, import_react96.useRef)({ disabled: p13, domRef: f22, get textValue() {
    return F7();
  } });
  n(() => {
    I10.current.disabled = p13;
  }, [I10, p13]), n(() => (n17.actions.registerItem(a28, I10), () => n17.actions.unregisterItem(a28)), [I10, a28]);
  let b14 = o4(() => {
    n17.send({ type: C9.CloseMenu });
  }), i16 = o4((t14) => {
    if (p13) return t14.preventDefault();
    n17.send({ type: C9.CloseMenu }), K2(n17.state.buttonElement);
  }), g6 = o4(() => {
    if (p13) return n17.send({ type: C9.GoToItem, focus: c12.Nothing });
    n17.send({ type: C9.GoToItem, focus: c12.Specific, id: a28 });
  }), d14 = u15(), T10 = o4((t14) => d14.update(t14)), P7 = o4((t14) => {
    d14.wasMoved(t14) && (p13 || M11 || n17.send({ type: C9.GoToItem, focus: c12.Specific, id: a28, trigger: D11.Pointer }));
  }), L8 = o4((t14) => {
    d14.wasMoved(t14) && (p13 || M11 && n17.state.activationTrigger === D11.Pointer && n17.send({ type: C9.GoToItem, focus: c12.Nothing }));
  }), [O6, v11] = V2(), [D12, U3] = H3(), H10 = n2({ active: M11, focus: M11, disabled: p13, close: b14 }), G6 = { id: a28, ref: _9, role: "menuitem", tabIndex: p13 === true ? void 0 : -1, "aria-disabled": p13 === true ? true : void 0, "aria-labelledby": O6, "aria-describedby": D12, disabled: void 0, onClick: i16, onFocus: g6, onPointerEnter: T10, onMouseEnter: T10, onPointerMove: P7, onMouseMove: P7, onPointerLeave: L8, onMouseLeave: L8 }, w12 = K();
  return import_react96.default.createElement(v11, null, import_react96.default.createElement(U3, null, w12({ ourProps: G6, theirProps: s21, slot: H10, defaultTag: st, name: "Menu.Item" })));
}
var pt = "div";
function it(m10, y10) {
  let [l19, a28] = V2(), p13 = m10, s21 = { ref: y10, "aria-labelledby": l19, role: "group" }, n17 = K();
  return import_react96.default.createElement(a28, null, n17({ ourProps: s21, theirProps: p13, slot: {}, defaultTag: pt, name: "Menu.Section" }));
}
var ut = "header";
function mt(m10, y10) {
  let l19 = (0, import_react39.useId)(), { id: a28 = `headlessui-menu-heading-${l19}`, ...p13 } = m10, s21 = C4();
  n(() => s21.register(a28), [a28, s21.register]);
  let n17 = { id: a28, ref: y10, role: "presentation", ...s21.props };
  return K()({ ourProps: n17, theirProps: p13, slot: {}, defaultTag: ut, name: "Menu.Heading" });
}
var dt = "div";
function Tt(m10, y10) {
  let l19 = m10, a28 = { ref: y10, role: "separator" };
  return K()({ ourProps: a28, theirProps: l19, slot: {}, defaultTag: dt, name: "Menu.Separator" });
}
var ct = Y(et);
var ft = Y(ot);
var yt = Y(at);
var gt2 = Y(lt);
var Pt2 = Y(it);
var Et2 = Y(mt);
var Mt2 = Y(Tt);
var lo = Object.assign(ct, { Button: ft, Items: yt, Item: gt2, Section: Pt2, Heading: Et2, Separator: Mt2 });

// node_modules/@headlessui/react/dist/components/popover/popover.js
var import_react98 = __toESM(require_react(), 1);

// node_modules/@headlessui/react/dist/components/popover/popover-machine.js
var f19 = Object.defineProperty;
var b12 = (t14, n17, e9) => n17 in t14 ? f19(t14, n17, { enumerable: true, configurable: true, writable: true, value: e9 }) : t14[n17] = e9;
var p12 = (t14, n17, e9) => (b12(t14, typeof n17 != "symbol" ? n17 + "" : n17, e9), e9);
var v9 = ((e9) => (e9[e9.Open = 0] = "Open", e9[e9.Closed = 1] = "Closed", e9))(v9 || {});
var h13 = ((r21) => (r21[r21.OpenPopover = 0] = "OpenPopover", r21[r21.ClosePopover = 1] = "ClosePopover", r21[r21.SetButton = 2] = "SetButton", r21[r21.SetButtonId = 3] = "SetButtonId", r21[r21.SetPanel = 4] = "SetPanel", r21[r21.SetPanelId = 5] = "SetPanelId", r21))(h13 || {});
var E11 = { [0]: (t14) => t14.popoverState === 0 ? t14 : { ...t14, popoverState: 0, __demoMode: false }, [1](t14) {
  return t14.popoverState === 1 ? t14 : { ...t14, popoverState: 1, __demoMode: false };
}, [2](t14, n17) {
  return t14.button === n17.button ? t14 : { ...t14, button: n17.button };
}, [3](t14, n17) {
  return t14.buttonId === n17.buttonId ? t14 : { ...t14, buttonId: n17.buttonId };
}, [4](t14, n17) {
  return t14.panel === n17.panel ? t14 : { ...t14, panel: n17.panel };
}, [5](t14, n17) {
  return t14.panelId === n17.panelId ? t14 : { ...t14, panelId: n17.panelId };
} };
var d13 = class _d extends T3 {
  constructor(e9) {
    super(e9);
    p12(this, "actions", { close: () => this.send({ type: 1 }), refocusableClose: (e10) => {
      this.actions.close();
      let o19 = (() => e10 ? n5(e10) ? e10 : "current" in e10 && n5(e10.current) ? e10.current : this.state.button : this.state.button)();
      o19 == null || o19.focus();
    }, open: () => this.send({ type: 0 }), setButtonId: (e10) => this.send({ type: 3, buttonId: e10 }), setButton: (e10) => this.send({ type: 2, button: e10 }), setPanelId: (e10) => this.send({ type: 5, panelId: e10 }), setPanel: (e10) => this.send({ type: 4, panel: e10 }) });
    p12(this, "selectors", { isPortalled: (e10) => {
      var i16;
      if (!e10.button || !e10.panel) return false;
      let o19 = (i16 = l(e10.button)) != null ? i16 : document;
      for (let u25 of o19.querySelectorAll("body > *")) if (Number(u25 == null ? void 0 : u25.contains(e10.button)) ^ Number(u25 == null ? void 0 : u25.contains(e10.panel))) return true;
      let l19 = x3(o19), s21 = l19.indexOf(e10.button), r21 = (s21 + l19.length - 1) % l19.length, c21 = (s21 + 1) % l19.length, S9 = l19[r21], m10 = l19[c21];
      return !e10.panel.contains(S9) && !e10.panel.contains(m10);
    } });
    {
      let o19 = this.state.id, l19 = x2.get(null);
      this.on(0, () => l19.actions.push(o19)), this.on(1, () => l19.actions.pop(o19));
    }
  }
  static new({ id: e9, __demoMode: o19 = false }) {
    return new _d({ id: e9, __demoMode: o19, popoverState: o19 ? 0 : 1, buttons: { current: [] }, button: null, buttonId: null, panel: null, panelId: null, beforePanelSentinel: { current: null }, afterPanelSentinel: { current: null }, afterButtonSentinel: { current: null } });
  }
  reduce(e9, o19) {
    return u(o19.type, E11, e9, o19);
  }
};

// node_modules/@headlessui/react/dist/components/popover/popover-machine-glue.js
var import_react97 = __toESM(require_react(), 1);
var a26 = (0, import_react97.createContext)(null);
function u24(r21) {
  let o19 = (0, import_react97.useContext)(a26);
  if (o19 === null) {
    let e9 = new Error(`<${r21} /> is missing a parent <Popover /> component.`);
    throw Error.captureStackTrace && Error.captureStackTrace(e9, u24), e9;
  }
  return o19;
}
function f20({ id: r21, __demoMode: o19 = false }) {
  let e9 = (0, import_react97.useMemo)(() => d13.new({ id: r21, __demoMode: o19 }), []);
  return c13(() => e9.dispose()), e9;
}

// node_modules/@headlessui/react/dist/components/popover/popover.js
var Fe3 = (0, import_react98.createContext)(null);
Fe3.displayName = "PopoverGroupContext";
function we2() {
  return (0, import_react98.useContext)(Fe3);
}
var de5 = (0, import_react98.createContext)(null);
de5.displayName = "PopoverPanelContext";
function mt2() {
  return (0, import_react98.useContext)(de5);
}
var vt2 = "div";
function Tt2(E13, O6) {
  var M11;
  let R8 = (0, import_react39.useId)(), { __demoMode: B3 = false, ...T10 } = E13, n17 = f20({ id: R8, __demoMode: B3 }), b14 = (0, import_react98.useRef)(null), t14 = y(O6, T((r21) => {
    b14.current = r21;
  })), [A5, d14, o19, C11, y10] = S3(n17, (0, import_react98.useCallback)((r21) => [r21.popoverState, r21.button, r21.panel, r21.buttonId, r21.panelId], [])), D12 = c6((M11 = b14.current) != null ? M11 : d14), _9 = s3(C11), a28 = s3(y10), u25 = (0, import_react98.useMemo)(() => ({ buttonId: _9, panelId: a28, close: n17.actions.close }), [_9, a28, n17]), f22 = we2(), l19 = f22 == null ? void 0 : f22.registerPopover, c21 = o4(() => {
    var F7, G6;
    let r21 = e((F7 = b14.current) != null ? F7 : d14);
    return (G6 = f22 == null ? void 0 : f22.isFocusWithinPopoverGroup()) != null ? G6 : r21 && ((d14 == null ? void 0 : d14.contains(r21)) || (o19 == null ? void 0 : o19.contains(r21)));
  });
  (0, import_react98.useEffect)(() => l19 == null ? void 0 : l19(u25), [l19, u25]);
  let [m10, W4] = oe(), V6 = x6(d14), j11 = S7({ mainTreeNode: V6, portals: m10, defaultContainers: [{ get current() {
    return n17.state.button;
  } }, { get current() {
    return n17.state.panel;
  } }] });
  E7(D12, "focus", (r21) => {
    var F7, G6, h15, k14, I10, H10;
    r21.target !== window && i4(r21.target) && n17.state.popoverState === v9.Open && (c21() || n17.state.button && n17.state.panel && (j11.contains(r21.target) || (G6 = (F7 = n17.state.beforePanelSentinel.current) == null ? void 0 : F7.contains) != null && G6.call(F7, r21.target) || (k14 = (h15 = n17.state.afterPanelSentinel.current) == null ? void 0 : h15.contains) != null && k14.call(h15, r21.target) || (H10 = (I10 = n17.state.afterButtonSentinel.current) == null ? void 0 : I10.contains) != null && H10.call(I10, r21.target) || n17.actions.close()));
  }, true);
  let L8 = A5 === v9.Open;
  k5(L8, j11.resolveContainers, (r21, F7) => {
    n17.actions.close(), H4(F7, I4.Loose) || (r21.preventDefault(), d14 == null || d14.focus());
  });
  let Y4 = n2({ open: A5 === v9.Open, close: n17.actions.refocusableClose }), $5 = S3(n17, (0, import_react98.useCallback)((r21) => u(r21.popoverState, { [v9.Open]: i10.Open, [v9.Closed]: i10.Closed }), [])), Q7 = { ref: t14 }, Z4 = K();
  return import_react98.default.createElement(j9, { node: V6 }, import_react98.default.createElement(Ae, null, import_react98.default.createElement(de5.Provider, { value: null }, import_react98.default.createElement(a26.Provider, { value: n17 }, import_react98.default.createElement(C5, { value: n17.actions.refocusableClose }, import_react98.default.createElement(c11, { value: $5 }, import_react98.default.createElement(W4, null, Z4({ ourProps: Q7, theirProps: T10, slot: Y4, defaultTag: vt2, name: "Popover" }))))))));
}
var Et3 = "button";
function bt(E13, O6) {
  let R8 = (0, import_react39.useId)(), { id: B3 = `headlessui-popover-button-${R8}`, disabled: T10 = false, autoFocus: n17 = false, ...b14 } = E13, t14 = u24("Popover.Button"), [A5, d14, o19, C11, y10, D12, _9] = S3(t14, (0, import_react98.useCallback)((e9) => [e9.popoverState, t14.selectors.isPortalled(e9), e9.button, e9.buttonId, e9.panel, e9.panelId, e9.afterButtonSentinel], [])), a28 = (0, import_react98.useRef)(null), u25 = `headlessui-focus-sentinel-${(0, import_react39.useId)()}`, f22 = we2(), l19 = f22 == null ? void 0 : f22.closeOthers, m10 = mt2() !== null;
  (0, import_react98.useEffect)(() => {
    if (!m10) return t14.actions.setButtonId(B3), () => t14.actions.setButtonId(null);
  }, [m10, B3, t14]);
  let [W4] = (0, import_react98.useState)(() => /* @__PURE__ */ Symbol()), V6 = y(a28, O6, Fe(), o4((e9) => {
    if (!m10) {
      if (e9) t14.state.buttons.current.push(W4);
      else {
        let p13 = t14.state.buttons.current.indexOf(W4);
        p13 !== -1 && t14.state.buttons.current.splice(p13, 1);
      }
      t14.state.buttons.current.length > 1 && console.warn("You are already using a <Popover.Button /> but only 1 <Popover.Button /> is supported."), e9 && t14.actions.setButton(e9);
    }
  })), j11 = y(a28, O6), L8 = o4((e9) => {
    var p13, i16, x10;
    if (m10) {
      if (t14.state.popoverState === v9.Closed) return;
      switch (e9.key) {
        case o8.Space:
        case o8.Enter:
          e9.preventDefault(), (i16 = (p13 = e9.target).click) == null || i16.call(p13), t14.actions.close(), (x10 = t14.state.button) == null || x10.focus();
          break;
      }
    } else switch (e9.key) {
      case o8.Space:
      case o8.Enter:
        e9.preventDefault(), e9.stopPropagation(), t14.state.popoverState === v9.Closed ? (l19 == null || l19(t14.state.buttonId), t14.actions.open()) : t14.actions.close();
        break;
      case o8.Escape:
        if (t14.state.popoverState !== v9.Open) return l19 == null ? void 0 : l19(t14.state.buttonId);
        if (!a28.current) return;
        let S9 = e(a28.current);
        if (S9 && !a28.current.contains(S9)) return;
        e9.preventDefault(), e9.stopPropagation(), t14.actions.close();
        break;
    }
  }), Y4 = o4((e9) => {
    m10 || e9.key === o8.Space && e9.preventDefault();
  }), $5 = o4((e9) => {
    var p13, i16;
    s6(e9.currentTarget) || T10 || (m10 ? (t14.actions.close(), (p13 = t14.state.button) == null || p13.focus()) : (e9.preventDefault(), e9.stopPropagation(), t14.state.popoverState === v9.Closed ? (l19 == null || l19(t14.state.buttonId), t14.actions.open()) : t14.actions.close(), (i16 = t14.state.button) == null || i16.focus()));
  }), Q7 = o4((e9) => {
    e9.preventDefault(), e9.stopPropagation();
  }), { isFocusVisible: Z4, focusProps: M11 } = $0c4a58759813079a$export$4e328f61c538687f({ autoFocus: n17 }), { isHovered: r21, hoverProps: F7 } = $e969f22b6713ca4a$export$ae780daf29e6d456({ isDisabled: T10 }), { pressed: G6, pressProps: h15 } = w({ disabled: T10 }), k14 = A5 === v9.Open, I10 = n2({ open: k14, active: G6 || k14, disabled: T10, hover: r21, focus: Z4, autofocus: n17 }), H10 = e5(E13, o19), fe7 = m10 ? V({ ref: j11, type: H10, onKeyDown: L8, onClick: $5, disabled: T10 || void 0, autoFocus: n17 }, M11, F7, h15) : V({ ref: V6, id: C11, type: H10, "aria-expanded": A5 === v9.Open, "aria-controls": y10 ? D12 : void 0, disabled: T10 || void 0, autoFocus: n17, onKeyDown: L8, onKeyUp: Y4, onClick: $5, onMouseDown: Q7 }, M11, F7, h15), ae5 = u21(), Pe2 = o4(() => {
    if (!n5(t14.state.panel)) return;
    let e9 = t14.state.panel;
    function p13() {
      u(ae5.current, { [a21.Forwards]: () => v5(e9, T4.First), [a21.Backwards]: () => v5(e9, T4.Last) }) === A2.Error && v5(x3(r2(t14.state.button)).filter((x10) => x10.dataset.headlessuiFocusGuard !== "true"), u(ae5.current, { [a21.Forwards]: T4.Next, [a21.Backwards]: T4.Previous }), { relativeTo: t14.state.button });
    }
    p13();
  }), s21 = K();
  return import_react98.default.createElement(import_react98.default.Fragment, null, s21({ ourProps: fe7, theirProps: b14, slot: I10, defaultTag: Et3, name: "Popover.Button" }), k14 && !m10 && d14 && import_react98.default.createElement(f4, { id: u25, ref: _9, features: s5.Focusable, "data-headlessui-focus-guard": true, as: "button", type: "button", onFocus: Pe2 }));
}
var yt2 = "div";
var gt3 = A.RenderStrategy | A.Static;
function Ne2(E13, O6) {
  let R8 = (0, import_react39.useId)(), { id: B3 = `headlessui-popover-backdrop-${R8}`, transition: T10 = false, ...n17 } = E13, b14 = u24("Popover.Backdrop"), t14 = S3(b14, (0, import_react98.useCallback)((l19) => l19.popoverState, [])), [A5, d14] = (0, import_react98.useState)(null), o19 = y(O6, d14), C11 = u17(), [y10, D12] = N2(T10, A5, C11 !== null ? (C11 & i10.Open) === i10.Open : t14 === v9.Open), _9 = o4((l19) => {
    if (s6(l19.currentTarget)) return l19.preventDefault();
    b14.actions.close();
  }), a28 = n2({ open: t14 === v9.Open }), u25 = { ref: o19, id: B3, "aria-hidden": true, onClick: _9, ...x4(D12) };
  return K()({ ourProps: u25, theirProps: n17, slot: a28, defaultTag: yt2, features: gt3, visible: y10, name: "Popover.Backdrop" });
}
var Rt2 = "div";
var Ft2 = A.RenderStrategy | A.Static;
function Bt2(E13, O6) {
  let R8 = (0, import_react39.useId)(), { id: B3 = `headlessui-popover-panel-${R8}`, focus: T10 = false, anchor: n17, portal: b14 = false, modal: t14 = false, transition: A5 = false, ...d14 } = E13, o19 = u24("Popover.Panel"), C11 = S3(o19, o19.selectors.isPortalled), [y10, D12, _9, a28, u25] = S3(o19, (0, import_react98.useCallback)((s21) => [s21.popoverState, s21.button, s21.__demoMode, s21.beforePanelSentinel, s21.afterPanelSentinel], [])), f22 = `headlessui-focus-sentinel-before-${R8}`, l19 = `headlessui-focus-sentinel-after-${R8}`, c21 = (0, import_react98.useRef)(null), m10 = ye(n17), [W4, V6] = Re(m10), j11 = Te();
  m10 && (b14 = true);
  let [L8, Y4] = (0, import_react98.useState)(null), $5 = y(c21, O6, m10 ? W4 : null, o19.actions.setPanel, Y4), Q7 = u13(D12), Z4 = u13(c21.current);
  n(() => (o19.actions.setPanelId(B3), () => o19.actions.setPanelId(null)), [B3, o19]);
  let M11 = u17(), [r21, F7] = N2(A5, L8, M11 !== null ? (M11 & i10.Open) === i10.Open : y10 === v9.Open);
  p5(r21, D12, o19.actions.close), f11(_9 ? false : t14 && r21, Z4);
  let h15 = o4((s21) => {
    var e9;
    switch (s21.key) {
      case o8.Escape:
        if (o19.state.popoverState !== v9.Open || !c21.current) return;
        let p13 = e(c21.current);
        if (p13 && !c21.current.contains(p13)) return;
        s21.preventDefault(), s21.stopPropagation(), o19.actions.close(), (e9 = o19.state.button) == null || e9.focus();
        break;
    }
  });
  (0, import_react98.useEffect)(() => {
    var s21;
    E13.static || y10 === v9.Closed && ((s21 = E13.unmount) == null || s21) && o19.actions.setPanel(null);
  }, [y10, E13.unmount, E13.static, o19]), (0, import_react98.useEffect)(() => {
    if (_9 || !T10 || y10 !== v9.Open || !c21.current) return;
    let s21 = e(c21.current);
    c21.current.contains(s21) || v5(c21.current, T4.First);
  }, [_9, T10, c21.current, y10]);
  let k14 = n2({ open: y10 === v9.Open, close: o19.actions.refocusableClose }), I10 = V(m10 ? j11() : {}, { ref: $5, id: B3, onKeyDown: h15, onBlur: T10 && y10 === v9.Open ? (s21) => {
    var p13, i16, x10, S9, me5;
    let e9 = s21.relatedTarget;
    e9 && c21.current && ((p13 = c21.current) != null && p13.contains(e9) || (o19.actions.close(), ((x10 = (i16 = a28.current) == null ? void 0 : i16.contains) != null && x10.call(i16, e9) || (me5 = (S9 = u25.current) == null ? void 0 : S9.contains) != null && me5.call(S9, e9)) && e9.focus({ preventScroll: true })));
  } : void 0, tabIndex: -1, style: { ...d14.style, ...V6, "--button-width": w5(r21, D12, true).width }, ...x4(F7) }), H10 = u21(), fe7 = o4(() => {
    let s21 = c21.current;
    if (!s21) return;
    function e9() {
      u(H10.current, { [a21.Forwards]: () => {
        var i16;
        v5(s21, T4.First) === A2.Error && ((i16 = o19.state.afterPanelSentinel.current) == null || i16.focus());
      }, [a21.Backwards]: () => {
        var p13;
        (p13 = o19.state.button) == null || p13.focus({ preventScroll: true });
      } });
    }
    e9();
  }), ae5 = o4(() => {
    let s21 = c21.current;
    if (!s21) return;
    function e9() {
      u(H10.current, { [a21.Forwards]: () => {
        var Be4;
        if (!o19.state.button) return;
        let p13 = (Be4 = r2(o19.state.button)) != null ? Be4 : document.body, i16 = x3(p13), x10 = i16.indexOf(o19.state.button), S9 = i16.slice(0, x10 + 1), se2 = [...i16.slice(x10 + 1), ...S9];
        for (let ve3 of se2.slice()) if (ve3.dataset.headlessuiFocusGuard === "true" || L8 != null && L8.contains(ve3)) {
          let Ae7 = se2.indexOf(ve3);
          Ae7 !== -1 && se2.splice(Ae7, 1);
        }
        v5(se2, T4.First, { sorted: false });
      }, [a21.Backwards]: () => {
        var i16;
        v5(s21, T4.Previous) === A2.Error && ((i16 = o19.state.button) == null || i16.focus());
      } });
    }
    e9();
  }), Pe2 = K();
  return import_react98.default.createElement(s13, null, import_react98.default.createElement(de5.Provider, { value: B3 }, import_react98.default.createElement(C5, { value: o19.actions.refocusableClose }, import_react98.default.createElement(le, { enabled: b14 ? E13.static || r21 : false, ownerDocument: Q7 }, r21 && C11 && import_react98.default.createElement(f4, { id: f22, ref: a28, features: s5.Focusable, "data-headlessui-focus-guard": true, as: "button", type: "button", onFocus: fe7 }), Pe2({ ourProps: I10, theirProps: d14, slot: k14, defaultTag: Rt2, features: Ft2, visible: r21, name: "Popover.Panel" }), r21 && C11 && import_react98.default.createElement(f4, { id: l19, ref: u25, features: s5.Focusable, "data-headlessui-focus-guard": true, as: "button", type: "button", onFocus: ae5 })))));
}
var At2 = "div";
function _t2(E13, O6) {
  let R8 = (0, import_react98.useRef)(null), B3 = y(R8, O6), [T10, n17] = (0, import_react98.useState)([]), b14 = o4((a28) => {
    n17((u25) => {
      let f22 = u25.indexOf(a28);
      if (f22 !== -1) {
        let l19 = u25.slice();
        return l19.splice(f22, 1), l19;
      }
      return u25;
    });
  }), t14 = o4((a28) => (n17((u25) => [...u25, a28]), () => b14(a28))), A5 = o4(() => {
    var f22;
    let a28 = r2(R8.current);
    if (!a28) return false;
    let u25 = e(R8.current);
    return (f22 = R8.current) != null && f22.contains(u25) ? true : T10.some((l19) => {
      var c21, m10;
      return ((c21 = a28.getElementById(l19.buttonId.current)) == null ? void 0 : c21.contains(u25)) || ((m10 = a28.getElementById(l19.panelId.current)) == null ? void 0 : m10.contains(u25));
    });
  }), d14 = o4((a28) => {
    for (let u25 of T10) u25.buttonId.current !== a28 && u25.close();
  }), o19 = (0, import_react98.useMemo)(() => ({ registerPopover: t14, unregisterPopover: b14, isFocusWithinPopoverGroup: A5, closeOthers: d14 }), [t14, b14, A5, d14]), C11 = n2({}), y10 = E13, D12 = { ref: B3 }, _9 = K();
  return import_react98.default.createElement(j9, null, import_react98.default.createElement(Fe3.Provider, { value: o19 }, _9({ ourProps: D12, theirProps: y10, slot: C11, defaultTag: At2, name: "Popover.Group" })));
}
var Ct2 = Y(Tt2);
var Dt2 = Y(bt);
var Ot = Y(Ne2);
var xt2 = Y(Ne2);
var Lt2 = Y(Bt2);
var ht3 = Y(_t2);
var vo = Object.assign(Ct2, { Button: Dt2, Backdrop: xt2, Overlay: Ot, Panel: Lt2, Group: ht3 });

// node_modules/@headlessui/react/dist/components/radio-group/radio-group.js
var import_react99 = __toESM(require_react(), 1);
var Ie3 = ((e9) => (e9[e9.RegisterOption = 0] = "RegisterOption", e9[e9.UnregisterOption = 1] = "UnregisterOption", e9))(Ie3 || {});
var Fe4 = { [0](o19, t14) {
  let e9 = [...o19.options, { id: t14.id, element: t14.element, propsRef: t14.propsRef }];
  return { ...o19, options: G2(e9, (n17) => n17.element.current) };
}, [1](o19, t14) {
  let e9 = o19.options.slice(), n17 = o19.options.findIndex((P7) => P7.id === t14.id);
  return n17 === -1 ? o19 : (e9.splice(n17, 1), { ...o19, options: e9 });
} };
var X4 = (0, import_react99.createContext)(null);
X4.displayName = "RadioGroupDataContext";
function z2(o19) {
  let t14 = (0, import_react99.useContext)(X4);
  if (t14 === null) {
    let e9 = new Error(`<${o19} /> is missing a parent <RadioGroup /> component.`);
    throw Error.captureStackTrace && Error.captureStackTrace(e9, z2), e9;
  }
  return t14;
}
var q3 = (0, import_react99.createContext)(null);
q3.displayName = "RadioGroupActionsContext";
function Q5(o19) {
  let t14 = (0, import_react99.useContext)(q3);
  if (t14 === null) {
    let e9 = new Error(`<${o19} /> is missing a parent <RadioGroup /> component.`);
    throw Error.captureStackTrace && Error.captureStackTrace(e9, Q5), e9;
  }
  return t14;
}
function Ue2(o19, t14) {
  return u(t14.type, Fe4, o19, t14);
}
var we3 = "div";
function Se3(o19, t14) {
  let e9 = (0, import_react39.useId)(), n17 = a3(), { id: P7 = `headlessui-radiogroup-${e9}`, value: R8, form: D12, name: i16, onChange: c21, by: d14, disabled: a28 = n17 || false, defaultValue: h15, tabIndex: f22 = 0, ...L8 } = o19, T10 = u9(d14), [v11, y10] = (0, import_react99.useReducer)(Ue2, { options: [] }), p13 = v11.options, [k14, G6] = V2(), [I10, F7] = H3(), E13 = (0, import_react99.useRef)(null), m10 = y(E13, t14), b14 = l3(h15), [s21, x10] = b2(R8, c21, b14), g6 = (0, import_react99.useMemo)(() => p13.find((r21) => !r21.propsRef.current.disabled), [p13]), O6 = (0, import_react99.useMemo)(() => p13.some((r21) => T10(r21.propsRef.current.value, s21)), [p13, s21]), l19 = o4((r21) => {
    var U3;
    if (a28 || T10(r21, s21)) return false;
    let S9 = (U3 = p13.find((u25) => T10(u25.propsRef.current.value, r21))) == null ? void 0 : U3.propsRef.current;
    return S9 != null && S9.disabled ? false : (x10 == null || x10(r21), true);
  }), ce3 = o4((r21) => {
    if (!E13.current) return;
    let U3 = p13.filter((u25) => u25.propsRef.current.disabled === false).map((u25) => u25.element.current);
    switch (r21.key) {
      case o8.Enter:
        g(r21.currentTarget);
        break;
      case o8.ArrowLeft:
      case o8.ArrowUp:
        if (r21.preventDefault(), r21.stopPropagation(), v5(U3, T4.Previous | T4.WrapAround) === A2.Success) {
          let A5 = p13.find((N4) => d2(N4.element.current));
          A5 && l19(A5.propsRef.current.value);
        }
        break;
      case o8.ArrowRight:
      case o8.ArrowDown:
        if (r21.preventDefault(), r21.stopPropagation(), v5(U3, T4.Next | T4.WrapAround) === A2.Success) {
          let A5 = p13.find((N4) => d2(N4.element.current));
          A5 && l19(A5.propsRef.current.value);
        }
        break;
      case o8.Space:
        {
          r21.preventDefault(), r21.stopPropagation();
          let u25 = p13.find((A5) => d2(A5.element.current));
          u25 && l19(u25.propsRef.current.value);
        }
        break;
    }
  }), Y4 = o4((r21) => (y10({ type: 0, ...r21 }), () => y10({ type: 1, id: r21.id }))), fe7 = (0, import_react99.useMemo)(() => ({ value: s21, firstOption: g6, containsCheckedOption: O6, disabled: a28, compare: T10, tabIndex: f22, ...v11 }), [s21, g6, O6, a28, T10, f22, v11]), Te5 = (0, import_react99.useMemo)(() => ({ registerOption: Y4, change: l19 }), [Y4, l19]), me5 = { ref: m10, id: P7, role: "radiogroup", "aria-labelledby": k14, "aria-describedby": I10, onKeyDown: ce3 }, Re4 = n2({ value: s21 }), ye4 = (0, import_react99.useCallback)(() => {
    if (b14 !== void 0) return l19(b14);
  }, [l19, b14]), be3 = K();
  return import_react99.default.createElement(F7, { name: "RadioGroup.Description" }, import_react99.default.createElement(G6, { name: "RadioGroup.Label" }, import_react99.default.createElement(q3.Provider, { value: Te5 }, import_react99.default.createElement(X4.Provider, { value: fe7 }, i16 != null && import_react99.default.createElement(j2, { disabled: a28, data: { [i16]: s21 || "on" }, overrides: { type: "radio", checked: s21 != null }, form: D12, onReset: ye4 }), be3({ ourProps: me5, theirProps: L8, slot: Re4, defaultTag: we3, name: "RadioGroup" })))));
}
var Me = "div";
function He3(o19, t14) {
  var g6;
  let e9 = z2("RadioGroup.Option"), n17 = Q5("RadioGroup.Option"), P7 = (0, import_react39.useId)(), { id: R8 = `headlessui-radiogroup-option-${P7}`, value: D12, disabled: i16 = e9.disabled || false, autoFocus: c21 = false, ...d14 } = o19, a28 = (0, import_react99.useRef)(null), h15 = y(a28, t14), [f22, L8] = V2(), [T10, v11] = H3(), y10 = s3({ value: D12, disabled: i16 });
  n(() => n17.registerOption({ id: R8, element: a28, propsRef: y10 }), [R8, n17, a28, y10]);
  let p13 = o4((O6) => {
    var l19;
    if (s6(O6.currentTarget)) return O6.preventDefault();
    n17.change(D12) && ((l19 = a28.current) == null || l19.focus());
  }), k14 = ((g6 = e9.firstOption) == null ? void 0 : g6.id) === R8, { isFocusVisible: G6, focusProps: I10 } = $0c4a58759813079a$export$4e328f61c538687f({ autoFocus: c21 }), { isHovered: F7, hoverProps: E13 } = $e969f22b6713ca4a$export$ae780daf29e6d456({ isDisabled: i16 }), m10 = e9.compare(e9.value, D12), b14 = V({ ref: h15, id: R8, role: "radio", "aria-checked": m10 ? "true" : "false", "aria-labelledby": f22, "aria-describedby": T10, "aria-disabled": i16 ? true : void 0, tabIndex: (() => i16 ? -1 : m10 || !e9.containsCheckedOption && k14 ? e9.tabIndex : -1)(), onClick: i16 ? void 0 : p13, autoFocus: c21 }, I10, E13), s21 = n2({ checked: m10, disabled: i16, active: G6, hover: F7, focus: G6, autofocus: c21 }), x10 = K();
  return import_react99.default.createElement(v11, { name: "RadioGroup.Description" }, import_react99.default.createElement(L8, { name: "RadioGroup.Label" }, x10({ ourProps: b14, theirProps: d14, slot: s21, defaultTag: Me, name: "RadioGroup.Option" })));
}
var Ne3 = "span";
function We2(o19, t14) {
  var g6;
  let e9 = z2("Radio"), n17 = Q5("Radio"), P7 = (0, import_react39.useId)(), R8 = u4(), D12 = a3(), { id: i16 = R8 || `headlessui-radio-${P7}`, value: c21, disabled: d14 = e9.disabled || D12 || false, autoFocus: a28 = false, ...h15 } = o19, f22 = (0, import_react99.useRef)(null), L8 = y(f22, t14), T10 = N(), v11 = w3(), y10 = s3({ value: c21, disabled: d14 });
  n(() => n17.registerOption({ id: i16, element: f22, propsRef: y10 }), [i16, n17, f22, y10]);
  let p13 = o4((O6) => {
    var l19;
    if (s6(O6.currentTarget)) return O6.preventDefault();
    n17.change(c21) && ((l19 = f22.current) == null || l19.focus());
  }), { isFocusVisible: k14, focusProps: G6 } = $0c4a58759813079a$export$4e328f61c538687f({ autoFocus: a28 }), { isHovered: I10, hoverProps: F7 } = $e969f22b6713ca4a$export$ae780daf29e6d456({ isDisabled: d14 }), E13 = ((g6 = e9.firstOption) == null ? void 0 : g6.id) === i16, m10 = e9.compare(e9.value, c21), b14 = V({ ref: L8, id: i16, role: "radio", "aria-checked": m10 ? "true" : "false", "aria-labelledby": T10, "aria-describedby": v11, "aria-disabled": d14 ? true : void 0, tabIndex: (() => d14 ? -1 : m10 || !e9.containsCheckedOption && E13 ? e9.tabIndex : -1)(), autoFocus: a28, onClick: d14 ? void 0 : p13 }, G6, F7), s21 = n2({ checked: m10, disabled: d14, hover: I10, focus: k14, autofocus: a28 });
  return K()({ ourProps: b14, theirProps: h15, slot: s21, defaultTag: Ne3, name: "Radio" });
}
var Be2 = Y(Se3);
var Ve2 = Y(He3);
var Ke4 = Y(We2);
var $e2 = Z;
var je2 = M2;
var yt3 = Object.assign(Be2, { Option: Ve2, Radio: Ke4, Label: $e2, Description: je2 });

// node_modules/@headlessui/react/dist/components/select/select.js
var H8 = "select";
function B2(r21, l19) {
  let s21 = (0, import_react39.useId)(), a28 = u4(), i16 = a3(), { id: p13 = a28 || `headlessui-select-${s21}`, disabled: e9 = i16 || false, invalid: t14 = false, autoFocus: o19 = false, ...d14 } = r21, n17 = N(), c21 = w3(), { isFocusVisible: m10, focusProps: f22 } = $0c4a58759813079a$export$4e328f61c538687f({ autoFocus: o19 }), { isHovered: u25, hoverProps: T10 } = $e969f22b6713ca4a$export$ae780daf29e6d456({ isDisabled: e9 }), { pressed: b14, pressProps: y10 } = w({ disabled: e9 }), P7 = V({ ref: l19, id: p13, "aria-labelledby": n17, "aria-describedby": c21, "aria-invalid": t14 ? "true" : void 0, disabled: e9 || void 0, autoFocus: o19 }, f22, T10, y10), S9 = n2({ disabled: e9, invalid: t14, hover: u25, focus: m10, active: b14, autofocus: o19 });
  return K()({ ourProps: P7, theirProps: d14, slot: S9, defaultTag: H8, name: "Select" });
}
var k13 = Y(B2);

// node_modules/@headlessui/react/dist/components/switch/switch.js
var import_react100 = __toESM(require_react(), 1);
var E12 = (0, import_react100.createContext)(null);
E12.displayName = "GroupContext";
var ve = import_react100.Fragment;
function xe3(n17) {
  var c21;
  let [t14, a28] = (0, import_react100.useState)(null), [f22, h15] = V2(), [b14, o19] = H3(), s21 = (0, import_react100.useMemo)(() => ({ switch: t14, setSwitch: a28 }), [t14, a28]), T10 = {}, y10 = n17, p13 = K();
  return import_react100.default.createElement(o19, { name: "Switch.Description", value: b14 }, import_react100.default.createElement(h15, { name: "Switch.Label", value: f22, props: { htmlFor: (c21 = s21.switch) == null ? void 0 : c21.id, onClick(u25) {
    t14 && (m4(u25.currentTarget) && u25.preventDefault(), t14.click(), t14.focus({ preventScroll: true }));
  } } }, import_react100.default.createElement(E12.Provider, { value: s21 }, p13({ ourProps: T10, theirProps: y10, slot: {}, defaultTag: ve, name: "Switch.Group" }))));
}
var Ce3 = "button";
function Le4(n17, t14) {
  var g6;
  let a28 = (0, import_react39.useId)(), f22 = u4(), h15 = a3(), { id: b14 = f22 || `headlessui-switch-${a28}`, disabled: o19 = h15 || false, checked: s21, defaultChecked: T10, onChange: y10, name: p13, value: c21, form: u25, autoFocus: S9 = false, ...C11 } = n17, _9 = (0, import_react100.useContext)(E12), [L8, R8] = (0, import_react100.useState)(null), G6 = (0, import_react100.useRef)(null), A5 = y(G6, t14, _9 === null ? null : _9.setSwitch, R8), l19 = l3(T10), [d14, r21] = b2(s21, y10, l19 != null ? l19 : false), F7 = p(), [H10, P7] = (0, import_react100.useState)(false), D12 = o4(() => {
    P7(true), r21 == null || r21(!d14), F7.nextFrame(() => {
      P7(false);
    });
  }), k14 = o4((e9) => {
    if (s6(e9.currentTarget)) return e9.preventDefault();
    e9.preventDefault(), D12();
  }), M11 = o4((e9) => {
    e9.key === o8.Space ? (e9.preventDefault(), D12()) : e9.key === o8.Enter && g(e9.currentTarget);
  }), U3 = o4((e9) => e9.preventDefault()), I10 = N(), B3 = w3(), { isFocusVisible: K4, focusProps: O6 } = $0c4a58759813079a$export$4e328f61c538687f({ autoFocus: S9 }), { isHovered: W4, hoverProps: N4 } = $e969f22b6713ca4a$export$ae780daf29e6d456({ isDisabled: o19 }), { pressed: J4, pressProps: V6 } = w({ disabled: o19 }), X5 = n2({ checked: d14, disabled: o19, hover: W4, focus: K4, active: J4, autofocus: S9, changing: H10 }), j11 = V({ id: b14, ref: A5, role: "switch", type: e5(n17, L8), tabIndex: n17.tabIndex === -1 ? 0 : (g6 = n17.tabIndex) != null ? g6 : 0, "aria-checked": d14, "aria-labelledby": I10, "aria-describedby": B3, disabled: o19 || void 0, autoFocus: S9, onClick: k14, onKeyUp: M11, onKeyPress: U3 }, O6, N4, V6), $5 = (0, import_react100.useCallback)(() => {
    if (l19 !== void 0) return r21 == null ? void 0 : r21(l19);
  }, [r21, l19]), q5 = K();
  return import_react100.default.createElement(import_react100.default.Fragment, null, p13 != null && import_react100.default.createElement(j2, { disabled: o19, data: { [p13]: c21 || "on" }, overrides: { type: "checkbox", checked: d14 }, form: u25, onReset: $5 }), q5({ ourProps: j11, theirProps: C11, slot: X5, defaultTag: Ce3, name: "Switch" }));
}
var Re3 = Y(Le4);
var Ge = xe3;
var Ae6 = Z;
var Fe5 = M2;
var tt2 = Object.assign(Re3, { Group: Ge, Label: Ae6, Description: Fe5 });

// node_modules/@headlessui/react/dist/components/tabs/tabs.js
var import_react102 = __toESM(require_react(), 1);

// node_modules/@headlessui/react/dist/internal/focus-sentinel.js
var import_react101 = __toESM(require_react(), 1);
function b13({ onFocus: n17 }) {
  let [r21, o19] = (0, import_react101.useState)(true), u25 = f18();
  return r21 ? import_react101.default.createElement(f4, { as: "button", type: "button", features: s5.Focusable, onFocus: (a28) => {
    a28.preventDefault();
    let e9, i16 = 50;
    function t14() {
      if (i16-- <= 0) {
        e9 && cancelAnimationFrame(e9);
        return;
      }
      if (n17()) {
        if (cancelAnimationFrame(e9), !u25.current) return;
        o19(false);
        return;
      }
      e9 = requestAnimationFrame(t14);
    }
    e9 = requestAnimationFrame(t14);
  } }) : null;
}

// node_modules/@headlessui/react/dist/utils/stable-collection.js
var l18 = __toESM(require_react(), 1);
var s20 = l18.createContext(null);
function a27() {
  return { groups: /* @__PURE__ */ new Map(), get(o19, e9) {
    var i16;
    let t14 = this.groups.get(o19);
    t14 || (t14 = /* @__PURE__ */ new Map(), this.groups.set(o19, t14));
    let n17 = (i16 = t14.get(e9)) != null ? i16 : 0;
    t14.set(e9, n17 + 1);
    let r21 = Array.from(t14.keys()).indexOf(e9);
    function u25() {
      let c21 = t14.get(e9);
      c21 > 1 ? t14.set(e9, c21 - 1) : t14.delete(e9);
    }
    return [r21, u25];
  } };
}
function f21({ children: o19 }) {
  let e9 = l18.useRef(a27());
  return l18.createElement(s20.Provider, { value: e9 }, o19);
}
function C10(o19) {
  let e9 = l18.useContext(s20);
  if (!e9) throw new Error("You must wrap your component in a <StableCollection>");
  let t14 = l18.useId(), [n17, r21] = e9.current.get(o19, t14);
  return l18.useEffect(() => r21, []), n17;
}

// node_modules/@headlessui/react/dist/components/tabs/tabs.js
var Le5 = ((t14) => (t14[t14.Forwards = 0] = "Forwards", t14[t14.Backwards = 1] = "Backwards", t14))(Le5 || {});
var _e3 = ((l19) => (l19[l19.Less = -1] = "Less", l19[l19.Equal = 0] = "Equal", l19[l19.Greater = 1] = "Greater", l19))(_e3 || {});
var Se4 = ((n17) => (n17[n17.SetSelectedIndex = 0] = "SetSelectedIndex", n17[n17.RegisterTab = 1] = "RegisterTab", n17[n17.UnregisterTab = 2] = "UnregisterTab", n17[n17.RegisterPanel = 3] = "RegisterPanel", n17[n17.UnregisterPanel = 4] = "UnregisterPanel", n17))(Se4 || {});
var De4 = { [0](e9, r21) {
  var d14;
  let t14 = G2(e9.tabs, (u25) => u25.current), l19 = G2(e9.panels, (u25) => u25.current), a28 = t14.filter((u25) => {
    var T10;
    return !((T10 = u25.current) != null && T10.hasAttribute("disabled"));
  }), n17 = { ...e9, tabs: t14, panels: l19 };
  if (r21.index < 0 || r21.index > t14.length - 1) {
    let u25 = u(Math.sign(r21.index - e9.selectedIndex), { [-1]: () => 1, [0]: () => u(Math.sign(r21.index), { [-1]: () => 0, [0]: () => 0, [1]: () => 1 }), [1]: () => 0 });
    if (a28.length === 0) return n17;
    let T10 = u(u25, { [0]: () => t14.indexOf(a28[0]), [1]: () => t14.indexOf(a28[a28.length - 1]) });
    return { ...n17, selectedIndex: T10 === -1 ? e9.selectedIndex : T10 };
  }
  let s21 = t14.slice(0, r21.index), f22 = [...t14.slice(r21.index), ...s21].find((u25) => a28.includes(u25));
  if (!f22) return n17;
  let b14 = (d14 = t14.indexOf(f22)) != null ? d14 : e9.selectedIndex;
  return b14 === -1 && (b14 = e9.selectedIndex), { ...n17, selectedIndex: b14 };
}, [1](e9, r21) {
  if (e9.tabs.includes(r21.tab)) return e9;
  let t14 = e9.tabs[e9.selectedIndex], l19 = G2([...e9.tabs, r21.tab], (n17) => n17.current), a28 = e9.selectedIndex;
  return e9.info.current.isControlled || (a28 = l19.indexOf(t14), a28 === -1 && (a28 = e9.selectedIndex)), { ...e9, tabs: l19, selectedIndex: a28 };
}, [2](e9, r21) {
  return { ...e9, tabs: e9.tabs.filter((t14) => t14 !== r21.tab) };
}, [3](e9, r21) {
  return e9.panels.includes(r21.panel) ? e9 : { ...e9, panels: G2([...e9.panels, r21.panel], (t14) => t14.current) };
}, [4](e9, r21) {
  return { ...e9, panels: e9.panels.filter((t14) => t14 !== r21.panel) };
} };
var z3 = (0, import_react102.createContext)(null);
z3.displayName = "TabsDataContext";
function h14(e9) {
  let r21 = (0, import_react102.useContext)(z3);
  if (r21 === null) {
    let t14 = new Error(`<${e9} /> is missing a parent <Tab.Group /> component.`);
    throw Error.captureStackTrace && Error.captureStackTrace(t14, h14), t14;
  }
  return r21;
}
var V5 = (0, import_react102.createContext)(null);
V5.displayName = "TabsActionsContext";
function Q6(e9) {
  let r21 = (0, import_react102.useContext)(V5);
  if (r21 === null) {
    let t14 = new Error(`<${e9} /> is missing a parent <Tab.Group /> component.`);
    throw Error.captureStackTrace && Error.captureStackTrace(t14, Q6), t14;
  }
  return r21;
}
function Fe6(e9, r21) {
  return u(r21.type, De4, e9, r21);
}
var Ie4 = "div";
function he2(e9, r21) {
  let { defaultIndex: t14 = 0, vertical: l19 = false, manual: a28 = false, onChange: n17, selectedIndex: s21 = null, ...g6 } = e9;
  const f22 = l19 ? "vertical" : "horizontal", b14 = a28 ? "manual" : "auto";
  let d14 = s21 !== null, u25 = s3({ isControlled: d14 }), T10 = y(r21), [p13, c21] = (0, import_react102.useReducer)(Fe6, { info: u25, selectedIndex: s21 != null ? s21 : t14, tabs: [], panels: [] }), v11 = n2({ selectedIndex: p13.selectedIndex }), m10 = s3(n17 || (() => {
  })), C11 = s3(p13.tabs), D12 = (0, import_react102.useMemo)(() => ({ orientation: f22, activation: b14, ...p13 }), [f22, b14, p13]), P7 = o4((i16) => (c21({ type: 1, tab: i16 }), () => c21({ type: 2, tab: i16 }))), R8 = o4((i16) => (c21({ type: 3, panel: i16 }), () => c21({ type: 4, panel: i16 }))), A5 = o4((i16) => {
    L8.current !== i16 && m10.current(i16), d14 || c21({ type: 0, index: i16 });
  }), L8 = s3(d14 ? e9.selectedIndex : p13.selectedIndex), _9 = (0, import_react102.useMemo)(() => ({ registerTab: P7, registerPanel: R8, change: A5 }), []);
  n(() => {
    c21({ type: 0, index: s21 != null ? s21 : t14 });
  }, [s21]), n(() => {
    if (L8.current === void 0 || p13.tabs.length <= 0) return;
    let i16 = G2(p13.tabs, (S9) => S9.current);
    i16.some((S9, $5) => p13.tabs[$5] !== S9) && A5(i16.indexOf(p13.tabs[L8.current]));
  });
  let J4 = { ref: T10 }, X5 = K();
  return import_react102.default.createElement(f21, null, import_react102.default.createElement(V5.Provider, { value: _9 }, import_react102.default.createElement(z3.Provider, { value: D12 }, D12.tabs.length <= 0 && import_react102.default.createElement(b13, { onFocus: () => {
    var i16, M11;
    for (let S9 of C11.current) if (((i16 = S9.current) == null ? void 0 : i16.tabIndex) === 0) return (M11 = S9.current) == null || M11.focus(), true;
    return false;
  } }), X5({ ourProps: J4, theirProps: g6, slot: v11, defaultTag: Ie4, name: "Tabs" }))));
}
var ve2 = "div";
function Ce4(e9, r21) {
  let { orientation: t14, selectedIndex: l19 } = h14("Tab.List"), a28 = y(r21), n17 = n2({ selectedIndex: l19 }), s21 = e9, g6 = { ref: a28, role: "tablist", "aria-orientation": t14 };
  return K()({ ourProps: g6, theirProps: s21, slot: n17, defaultTag: ve2, name: "Tabs.List" });
}
var Me2 = "button";
function Ge2(e9, r21) {
  var Y4, Z4;
  let t14 = (0, import_react39.useId)(), { id: l19 = `headlessui-tabs-tab-${t14}`, disabled: a28 = false, autoFocus: n17 = false, ...s21 } = e9, { orientation: g6, activation: f22, selectedIndex: b14, tabs: d14, panels: u25 } = h14("Tab"), T10 = Q6("Tab"), p13 = h14("Tab"), [c21, v11] = (0, import_react102.useState)(null), m10 = (0, import_react102.useRef)(null), C11 = y(m10, r21, v11);
  n(() => T10.registerTab(m10), [T10, m10]);
  let D12 = C10("tabs"), P7 = d14.indexOf(m10);
  P7 === -1 && (P7 = D12);
  let R8 = P7 === b14, A5 = o4((o19) => {
    let E13 = o19();
    if (E13 === A2.Success && f22 === "auto") {
      let ee6 = e(m10.current), B3 = p13.tabs.findIndex((ce3) => ce3.current === ee6);
      B3 !== -1 && T10.change(B3);
    }
    return E13;
  }), L8 = o4((o19) => {
    let E13 = d14.map((B3) => B3.current).filter(Boolean);
    if (o19.key === o8.Space || o19.key === o8.Enter) {
      o19.preventDefault(), o19.stopPropagation(), T10.change(P7);
      return;
    }
    switch (o19.key) {
      case o8.Home:
      case o8.PageUp:
        return o19.preventDefault(), o19.stopPropagation(), A5(() => v5(E13, T4.First));
      case o8.End:
      case o8.PageDown:
        return o19.preventDefault(), o19.stopPropagation(), A5(() => v5(E13, T4.Last));
    }
    if (A5(() => u(g6, { vertical() {
      return o19.key === o8.ArrowUp ? v5(E13, T4.Previous | T4.WrapAround) : o19.key === o8.ArrowDown ? v5(E13, T4.Next | T4.WrapAround) : A2.Error;
    }, horizontal() {
      return o19.key === o8.ArrowLeft ? v5(E13, T4.Previous | T4.WrapAround) : o19.key === o8.ArrowRight ? v5(E13, T4.Next | T4.WrapAround) : A2.Error;
    } })) === A2.Success) return o19.preventDefault();
  }), _9 = (0, import_react102.useRef)(false), J4 = o4(() => {
    var o19;
    _9.current || (_9.current = true, (o19 = m10.current) == null || o19.focus({ preventScroll: true }), T10.change(P7), t(() => {
      _9.current = false;
    }));
  }), X5 = o4((o19) => {
    o19.preventDefault();
  }), { isFocusVisible: i16, focusProps: M11 } = $0c4a58759813079a$export$4e328f61c538687f({ autoFocus: n17 }), { isHovered: S9, hoverProps: $5 } = $e969f22b6713ca4a$export$ae780daf29e6d456({ isDisabled: a28 }), { pressed: pe4, pressProps: ue5 } = w({ disabled: a28 }), Te5 = n2({ selected: R8, hover: S9, active: pe4, focus: i16, autofocus: n17, disabled: a28 }), de6 = V({ ref: C11, onKeyDown: L8, onMouseDown: X5, onClick: J4, id: l19, role: "tab", type: e5(e9, c21), "aria-controls": (Z4 = (Y4 = u25[P7]) == null ? void 0 : Y4.current) == null ? void 0 : Z4.id, "aria-selected": R8, tabIndex: R8 ? 0 : -1, disabled: a28 || void 0, autoFocus: n17 }, M11, $5, ue5);
  return K()({ ourProps: de6, theirProps: s21, slot: Te5, defaultTag: Me2, name: "Tabs.Tab" });
}
var Ue3 = "div";
function He4(e9, r21) {
  let { selectedIndex: t14 } = h14("Tab.Panels"), l19 = y(r21), a28 = n2({ selectedIndex: t14 }), n17 = e9, s21 = { ref: l19 };
  return K()({ ourProps: s21, theirProps: n17, slot: a28, defaultTag: Ue3, name: "Tabs.Panels" });
}
var we4 = "div";
var Oe4 = A.RenderStrategy | A.Static;
function Ne4(e9, r21) {
  var R8, A5, L8, _9;
  let t14 = (0, import_react39.useId)(), { id: l19 = `headlessui-tabs-panel-${t14}`, tabIndex: a28 = 0, ...n17 } = e9, { selectedIndex: s21, tabs: g6, panels: f22 } = h14("Tab.Panel"), b14 = Q6("Tab.Panel"), d14 = (0, import_react102.useRef)(null), u25 = y(d14, r21);
  n(() => b14.registerPanel(d14), [b14, d14]);
  let T10 = C10("panels"), p13 = f22.indexOf(d14);
  p13 === -1 && (p13 = T10);
  let c21 = p13 === s21, { isFocusVisible: v11, focusProps: m10 } = $0c4a58759813079a$export$4e328f61c538687f(), C11 = n2({ selected: c21, focus: v11 }), D12 = V({ ref: u25, id: l19, role: "tabpanel", "aria-labelledby": (A5 = (R8 = g6[p13]) == null ? void 0 : R8.current) == null ? void 0 : A5.id, tabIndex: c21 ? a28 : -1 }, m10), P7 = K();
  return !c21 && ((L8 = n17.unmount) == null || L8) && !((_9 = n17.static) != null && _9) ? import_react102.default.createElement(f4, { "aria-hidden": "true", ...D12 }) : P7({ ourProps: D12, theirProps: n17, slot: C11, defaultTag: we4, features: Oe4, visible: c21, name: "Tabs.Panel" });
}
var ke = Y(Ge2);
var Be3 = Y(he2);
var We3 = Y(Ce4);
var je3 = Y(He4);
var Ke5 = Y(Ne4);
var dt2 = Object.assign(ke, { Group: Be3, List: We3, Panels: je3, Panel: Ke5 });

// node_modules/@headlessui/react/dist/components/textarea/textarea.js
var L7 = "textarea";
function H9(a28, t14) {
  let s21 = (0, import_react39.useId)(), l19 = u4(), d14 = a3(), { id: i16 = l19 || `headlessui-textarea-${s21}`, disabled: e9 = d14 || false, autoFocus: r21 = false, invalid: o19 = false, ...p13 } = a28, n17 = N(), T10 = w3(), { isFocused: f22, focusProps: m10 } = $0c4a58759813079a$export$4e328f61c538687f({ autoFocus: r21 }), { isHovered: u25, hoverProps: b14 } = $e969f22b6713ca4a$export$ae780daf29e6d456({ isDisabled: e9 }), y10 = V({ ref: t14, id: i16, "aria-labelledby": n17, "aria-describedby": T10, "aria-invalid": o19 ? "true" : void 0, disabled: e9 || void 0, autoFocus: r21 }, m10, b14), x10 = n2({ disabled: e9, invalid: o19, hover: u25, focus: f22, autofocus: r21 });
  return K()({ ourProps: y10, theirProps: p13, slot: x10, defaultTag: L7, name: "Textarea" });
}
var M10 = Y(H9);
export {
  L2 as Button,
  Ke as Checkbox,
  y2 as CloseButton,
  Ht as Combobox,
  Bo as ComboboxButton,
  ko as ComboboxInput,
  No as ComboboxLabel,
  Ho as ComboboxOption,
  Uo as ComboboxOptions,
  b8 as DataInteractive,
  M2 as Description,
  ht as Dialog,
  Lt as DialogBackdrop,
  xt as DialogDescription,
  ze as DialogPanel,
  Qe as DialogTitle,
  Xe2 as Disclosure,
  xe2 as DisclosureButton,
  Le3 as DisclosurePanel,
  W2 as Field,
  I9 as Fieldset,
  ge2 as FocusTrap,
  G4 as FocusTrapFeatures,
  X3 as Input,
  Z as Label,
  d12 as Legend,
  Mo2 as Listbox,
  Mt as ListboxButton,
  wt as ListboxLabel,
  It as ListboxOption,
  Bt as ListboxOptions,
  kt as ListboxSelectedOption,
  lo as Menu,
  ft as MenuButton,
  Et2 as MenuHeading,
  gt2 as MenuItem,
  yt as MenuItems,
  Pt2 as MenuSection,
  Mt2 as MenuSeparator,
  vo as Popover,
  xt2 as PopoverBackdrop,
  Dt2 as PopoverButton,
  ht3 as PopoverGroup,
  Ot as PopoverOverlay,
  Lt2 as PopoverPanel,
  le as Portal,
  Ke4 as Radio,
  yt3 as RadioGroup,
  je2 as RadioGroupDescription,
  $e2 as RadioGroupLabel,
  Ve2 as RadioGroupOption,
  k13 as Select,
  tt2 as Switch,
  Fe5 as SwitchDescription,
  Ge as SwitchGroup,
  Ae6 as SwitchLabel,
  dt2 as Tab,
  Be3 as TabGroup,
  We3 as TabList,
  Ke5 as TabPanel,
  je3 as TabPanels,
  M10 as Textarea,
  Ke2 as Transition,
  Oe as TransitionChild,
  u8 as useClose
};
//# sourceMappingURL=@headlessui_react.js.map
