"use client";
import { jsx as b, jsxs as le, Fragment as Ze } from "react/jsx-runtime";
import * as a from "react";
import { useState as Zt } from "react";
import * as Qt from "react-dom";
import Jt from "react-dom";
import { SearchIcon as en } from "lucide-react";
import { Dialog as tn, DialogHeader as nn, DialogTitle as rn, DialogDescription as on, DialogContent as an } from "./dialog.js";
import { cn as B } from "../../../lib/utils.js";
var Qe = 1, cn = 0.9, ln = 0.8, un = 0.17, Ne = 0.1, Oe = 0.999, sn = 0.9999, dn = 0.99, fn = /[\\\/_+.#"@\[\(\{&]/, vn = /[\\\/_+.#"@\[\(\{&]/g, mn = /[\s-]/, mt = /[\s-]/g;
function We(e, t, n, r, o, i, l) {
  if (i === t.length) return o === e.length ? Qe : dn;
  var c = `${o},${i}`;
  if (l[c] !== void 0) return l[c];
  for (var d = r.charAt(i), u = n.indexOf(d, o), f = 0, v, p, h, D; u >= 0; ) v = We(e, t, n, r, u + 1, i + 1, l), v > f && (u === o ? v *= Qe : fn.test(e.charAt(u - 1)) ? (v *= ln, h = e.slice(o, u - 1).match(vn), h && o > 0 && (v *= Math.pow(Oe, h.length))) : mn.test(e.charAt(u - 1)) ? (v *= cn, D = e.slice(o, u - 1).match(mt), D && o > 0 && (v *= Math.pow(Oe, D.length))) : (v *= un, o > 0 && (v *= Math.pow(Oe, u - o))), e.charAt(u) !== t.charAt(i) && (v *= sn)), (v < Ne && n.charAt(u - 1) === r.charAt(i + 1) || r.charAt(i + 1) === r.charAt(i) && n.charAt(u - 1) !== r.charAt(i)) && (p = We(e, t, n, r, u + 1, i + 2, l), p * Ne > v && (v = p * Ne)), v > f && (f = v), u = n.indexOf(d, u + 1);
  return l[c] = f, f;
}
function Je(e) {
  return e.toLowerCase().replace(mt, " ");
}
function pn(e, t, n) {
  return e = n && n.length > 0 ? `${e + " " + n.join(" ")}` : e, We(e, t, Je(e), Je(t), 0, 0, {});
}
function K(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
  return function(o) {
    if (e?.(o), n === !1 || !o.defaultPrevented)
      return t?.(o);
  };
}
function et(e, t) {
  if (typeof e == "function")
    return e(t);
  e != null && (e.current = t);
}
function H(...e) {
  return (t) => {
    let n = !1;
    const r = e.map((o) => {
      const i = et(o, t);
      return !n && typeof i == "function" && (n = !0), i;
    });
    if (n)
      return () => {
        for (let o = 0; o < r.length; o++) {
          const i = r[o];
          typeof i == "function" ? i() : et(e[o], null);
        }
      };
  };
}
function q(...e) {
  return a.useCallback(H(...e), e);
}
function hn(e, t) {
  const n = a.createContext(t), r = (i) => {
    const { children: l, ...c } = i, d = a.useMemo(() => c, Object.values(c));
    return /* @__PURE__ */ b(n.Provider, { value: d, children: l });
  };
  r.displayName = e + "Provider";
  function o(i) {
    const l = a.useContext(n);
    if (l) return l;
    if (t !== void 0) return t;
    throw new Error(`\`${i}\` must be used within \`${e}\``);
  }
  return [r, o];
}
function gn(e, t = []) {
  let n = [];
  function r(i, l) {
    const c = a.createContext(l), d = n.length;
    n = [...n, l];
    const u = (v) => {
      const { scope: p, children: h, ...D } = v, m = p?.[e]?.[d] || c, y = a.useMemo(() => D, Object.values(D));
      return /* @__PURE__ */ b(m.Provider, { value: y, children: h });
    };
    u.displayName = i + "Provider";
    function f(v, p) {
      const h = p?.[e]?.[d] || c, D = a.useContext(h);
      if (D) return D;
      if (l !== void 0) return l;
      throw new Error(`\`${v}\` must be used within \`${i}\``);
    }
    return [u, f];
  }
  const o = () => {
    const i = n.map((l) => a.createContext(l));
    return function(c) {
      const d = c?.[e] || i;
      return a.useMemo(
        () => ({ [`__scope${e}`]: { ...c, [e]: d } }),
        [c, d]
      );
    };
  };
  return o.scopeName = e, [r, yn(o, ...t)];
}
function yn(...e) {
  const t = e[0];
  if (e.length === 1) return t;
  const n = () => {
    const r = e.map((o) => ({
      useScope: o(),
      scopeName: o.scopeName
    }));
    return function(i) {
      const l = r.reduce((c, { useScope: d, scopeName: u }) => {
        const v = d(i)[`__scope${u}`];
        return { ...c, ...v };
      }, {});
      return a.useMemo(() => ({ [`__scope${t.scopeName}`]: l }), [l]);
    };
  };
  return n.scopeName = t.scopeName, n;
}
var ue = globalThis?.document ? a.useLayoutEffect : () => {
}, bn = a[" useId ".trim().toString()] || (() => {
}), En = 0;
function $(e) {
  const [t, n] = a.useState(bn());
  return ue(() => {
    n((r) => r ?? String(En++));
  }, [e]), t ? `radix-${t}` : "";
}
var Cn = a[" useInsertionEffect ".trim().toString()] || ue;
function wn({
  prop: e,
  defaultProp: t,
  onChange: n = () => {
  },
  caller: r
}) {
  const [o, i, l] = Sn({
    defaultProp: t,
    onChange: n
  }), c = e !== void 0, d = c ? e : o;
  {
    const f = a.useRef(e !== void 0);
    a.useEffect(() => {
      const v = f.current;
      v !== c && console.warn(
        `${r} is changing from ${v ? "controlled" : "uncontrolled"} to ${c ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
      ), f.current = c;
    }, [c, r]);
  }
  const u = a.useCallback(
    (f) => {
      if (c) {
        const v = Rn(f) ? f(e) : f;
        v !== e && l.current?.(v);
      } else
        i(f);
    },
    [c, e, i, l]
  );
  return [d, u];
}
function Sn({
  defaultProp: e,
  onChange: t
}) {
  const [n, r] = a.useState(e), o = a.useRef(n), i = a.useRef(t);
  return Cn(() => {
    i.current = t;
  }, [t]), a.useEffect(() => {
    o.current !== n && (i.current?.(n), o.current = n);
  }, [n, o]), [n, r, i];
}
function Rn(e) {
  return typeof e == "function";
}
// @__NO_SIDE_EFFECTS__
function pt(e) {
  const t = /* @__PURE__ */ Dn(e), n = a.forwardRef((r, o) => {
    const { children: i, ...l } = r, c = a.Children.toArray(i), d = c.find(Pn);
    if (d) {
      const u = d.props.children, f = c.map((v) => v === d ? a.Children.count(u) > 1 ? a.Children.only(null) : a.isValidElement(u) ? u.props.children : null : v);
      return /* @__PURE__ */ b(t, { ...l, ref: o, children: a.isValidElement(u) ? a.cloneElement(u, void 0, f) : null });
    }
    return /* @__PURE__ */ b(t, { ...l, ref: o, children: i });
  });
  return n.displayName = `${e}.Slot`, n;
}
// @__NO_SIDE_EFFECTS__
function Dn(e) {
  const t = a.forwardRef((n, r) => {
    const { children: o, ...i } = n;
    if (a.isValidElement(o)) {
      const l = On(o), c = Nn(i, o.props);
      return o.type !== a.Fragment && (c.ref = r ? H(r, l) : l), a.cloneElement(o, c);
    }
    return a.Children.count(o) > 1 ? a.Children.only(null) : null;
  });
  return t.displayName = `${e}.SlotClone`, t;
}
var xn = /* @__PURE__ */ Symbol("radix.slottable");
function Pn(e) {
  return a.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === xn;
}
function Nn(e, t) {
  const n = { ...t };
  for (const r in t) {
    const o = e[r], i = t[r];
    /^on[A-Z]/.test(r) ? o && i ? n[r] = (...c) => {
      const d = i(...c);
      return o(...c), d;
    } : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...i } : r === "className" && (n[r] = [o, i].filter(Boolean).join(" "));
  }
  return { ...e, ...n };
}
function On(e) {
  let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
  return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
}
var An = [
  "a",
  "button",
  "div",
  "form",
  "h2",
  "h3",
  "img",
  "input",
  "label",
  "li",
  "nav",
  "ol",
  "p",
  "select",
  "span",
  "svg",
  "ul"
], U = An.reduce((e, t) => {
  const n = /* @__PURE__ */ pt(`Primitive.${t}`), r = a.forwardRef((o, i) => {
    const { asChild: l, ...c } = o, d = l ? n : t;
    return typeof window < "u" && (window[/* @__PURE__ */ Symbol.for("radix-ui")] = !0), /* @__PURE__ */ b(d, { ...c, ref: i });
  });
  return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
}, {});
function In(e, t) {
  e && Qt.flushSync(() => e.dispatchEvent(t));
}
function se(e) {
  const t = a.useRef(e);
  return a.useEffect(() => {
    t.current = e;
  }), a.useMemo(() => (...n) => t.current?.(...n), []);
}
function kn(e, t = globalThis?.document) {
  const n = se(e);
  a.useEffect(() => {
    const r = (o) => {
      o.key === "Escape" && n(o);
    };
    return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
  }, [n, t]);
}
var Tn = "DismissableLayer", $e = "dismissableLayer.update", Mn = "dismissableLayer.pointerDownOutside", _n = "dismissableLayer.focusOutside", tt, ht = a.createContext({
  layers: /* @__PURE__ */ new Set(),
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
  branches: /* @__PURE__ */ new Set()
}), gt = a.forwardRef(
  (e, t) => {
    const {
      disableOutsidePointerEvents: n = !1,
      onEscapeKeyDown: r,
      onPointerDownOutside: o,
      onFocusOutside: i,
      onInteractOutside: l,
      onDismiss: c,
      ...d
    } = e, u = a.useContext(ht), [f, v] = a.useState(null), p = f?.ownerDocument ?? globalThis?.document, [, h] = a.useState({}), D = q(t, (E) => v(E)), m = Array.from(u.layers), [y] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), w = m.indexOf(y), x = f ? m.indexOf(f) : -1, A = u.layersWithOutsidePointerEventsDisabled.size > 0, P = x >= w, N = Wn((E) => {
      const M = E.target, F = [...u.branches].some((W) => W.contains(M));
      !P || F || (o?.(E), l?.(E), E.defaultPrevented || c?.());
    }, p), S = $n((E) => {
      const M = E.target;
      [...u.branches].some((W) => W.contains(M)) || (i?.(E), l?.(E), E.defaultPrevented || c?.());
    }, p);
    return kn((E) => {
      x === u.layers.size - 1 && (r?.(E), !E.defaultPrevented && c && (E.preventDefault(), c()));
    }, p), a.useEffect(() => {
      if (f)
        return n && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (tt = p.body.style.pointerEvents, p.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(f)), u.layers.add(f), nt(), () => {
          n && u.layersWithOutsidePointerEventsDisabled.size === 1 && (p.body.style.pointerEvents = tt);
        };
    }, [f, p, n, u]), a.useEffect(() => () => {
      f && (u.layers.delete(f), u.layersWithOutsidePointerEventsDisabled.delete(f), nt());
    }, [f, u]), a.useEffect(() => {
      const E = () => h({});
      return document.addEventListener($e, E), () => document.removeEventListener($e, E);
    }, []), /* @__PURE__ */ b(
      U.div,
      {
        ...d,
        ref: D,
        style: {
          pointerEvents: A ? P ? "auto" : "none" : void 0,
          ...e.style
        },
        onFocusCapture: K(e.onFocusCapture, S.onFocusCapture),
        onBlurCapture: K(e.onBlurCapture, S.onBlurCapture),
        onPointerDownCapture: K(
          e.onPointerDownCapture,
          N.onPointerDownCapture
        )
      }
    );
  }
);
gt.displayName = Tn;
var Ln = "DismissableLayerBranch", Fn = a.forwardRef((e, t) => {
  const n = a.useContext(ht), r = a.useRef(null), o = q(t, r);
  return a.useEffect(() => {
    const i = r.current;
    if (i)
      return n.branches.add(i), () => {
        n.branches.delete(i);
      };
  }, [n.branches]), /* @__PURE__ */ b(U.div, { ...e, ref: o });
});
Fn.displayName = Ln;
function Wn(e, t = globalThis?.document) {
  const n = se(e), r = a.useRef(!1), o = a.useRef(() => {
  });
  return a.useEffect(() => {
    const i = (c) => {
      if (c.target && !r.current) {
        let d = function() {
          yt(
            Mn,
            n,
            u,
            { discrete: !0 }
          );
        };
        const u = { originalEvent: c };
        c.pointerType === "touch" ? (t.removeEventListener("click", o.current), o.current = d, t.addEventListener("click", o.current, { once: !0 })) : d();
      } else
        t.removeEventListener("click", o.current);
      r.current = !1;
    }, l = window.setTimeout(() => {
      t.addEventListener("pointerdown", i);
    }, 0);
    return () => {
      window.clearTimeout(l), t.removeEventListener("pointerdown", i), t.removeEventListener("click", o.current);
    };
  }, [t, n]), {
    // ensures we check React component tree (not just DOM tree)
    onPointerDownCapture: () => r.current = !0
  };
}
function $n(e, t = globalThis?.document) {
  const n = se(e), r = a.useRef(!1);
  return a.useEffect(() => {
    const o = (i) => {
      i.target && !r.current && yt(_n, n, { originalEvent: i }, {
        discrete: !1
      });
    };
    return t.addEventListener("focusin", o), () => t.removeEventListener("focusin", o);
  }, [t, n]), {
    onFocusCapture: () => r.current = !0,
    onBlurCapture: () => r.current = !1
  };
}
function nt() {
  const e = new CustomEvent($e);
  document.dispatchEvent(e);
}
function yt(e, t, n, { discrete: r }) {
  const o = n.originalEvent.target, i = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
  t && o.addEventListener(e, t, { once: !0 }), r ? In(o, i) : o.dispatchEvent(i);
}
var Ae = "focusScope.autoFocusOnMount", Ie = "focusScope.autoFocusOnUnmount", rt = { bubbles: !1, cancelable: !0 }, Bn = "FocusScope", bt = a.forwardRef((e, t) => {
  const {
    loop: n = !1,
    trapped: r = !1,
    onMountAutoFocus: o,
    onUnmountAutoFocus: i,
    ...l
  } = e, [c, d] = a.useState(null), u = se(o), f = se(i), v = a.useRef(null), p = q(t, (m) => d(m)), h = a.useRef({
    paused: !1,
    pause() {
      this.paused = !0;
    },
    resume() {
      this.paused = !1;
    }
  }).current;
  a.useEffect(() => {
    if (r) {
      let m = function(A) {
        if (h.paused || !c) return;
        const P = A.target;
        c.contains(P) ? v.current = P : j(v.current, { select: !0 });
      }, y = function(A) {
        if (h.paused || !c) return;
        const P = A.relatedTarget;
        P !== null && (c.contains(P) || j(v.current, { select: !0 }));
      }, w = function(A) {
        if (document.activeElement === document.body)
          for (const N of A)
            N.removedNodes.length > 0 && j(c);
      };
      document.addEventListener("focusin", m), document.addEventListener("focusout", y);
      const x = new MutationObserver(w);
      return c && x.observe(c, { childList: !0, subtree: !0 }), () => {
        document.removeEventListener("focusin", m), document.removeEventListener("focusout", y), x.disconnect();
      };
    }
  }, [r, c, h.paused]), a.useEffect(() => {
    if (c) {
      at.add(h);
      const m = document.activeElement;
      if (!c.contains(m)) {
        const w = new CustomEvent(Ae, rt);
        c.addEventListener(Ae, u), c.dispatchEvent(w), w.defaultPrevented || (Un(zn(Et(c)), { select: !0 }), document.activeElement === m && j(c));
      }
      return () => {
        c.removeEventListener(Ae, u), setTimeout(() => {
          const w = new CustomEvent(Ie, rt);
          c.addEventListener(Ie, f), c.dispatchEvent(w), w.defaultPrevented || j(m ?? document.body, { select: !0 }), c.removeEventListener(Ie, f), at.remove(h);
        }, 0);
      };
    }
  }, [c, u, f, h]);
  const D = a.useCallback(
    (m) => {
      if (!n && !r || h.paused) return;
      const y = m.key === "Tab" && !m.altKey && !m.ctrlKey && !m.metaKey, w = document.activeElement;
      if (y && w) {
        const x = m.currentTarget, [A, P] = Vn(x);
        A && P ? !m.shiftKey && w === P ? (m.preventDefault(), n && j(A, { select: !0 })) : m.shiftKey && w === A && (m.preventDefault(), n && j(P, { select: !0 })) : w === x && m.preventDefault();
      }
    },
    [n, r, h.paused]
  );
  return /* @__PURE__ */ b(U.div, { tabIndex: -1, ...l, ref: p, onKeyDown: D });
});
bt.displayName = Bn;
function Un(e, { select: t = !1 } = {}) {
  const n = document.activeElement;
  for (const r of e)
    if (j(r, { select: t }), document.activeElement !== n) return;
}
function Vn(e) {
  const t = Et(e), n = ot(t, e), r = ot(t.reverse(), e);
  return [n, r];
}
function Et(e) {
  const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
    acceptNode: (r) => {
      const o = r.tagName === "INPUT" && r.type === "hidden";
      return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
    }
  });
  for (; n.nextNode(); ) t.push(n.currentNode);
  return t;
}
function ot(e, t) {
  for (const n of e)
    if (!jn(n, { upTo: t })) return n;
}
function jn(e, { upTo: t }) {
  if (getComputedStyle(e).visibility === "hidden") return !0;
  for (; e; ) {
    if (t !== void 0 && e === t) return !1;
    if (getComputedStyle(e).display === "none") return !0;
    e = e.parentElement;
  }
  return !1;
}
function Kn(e) {
  return e instanceof HTMLInputElement && "select" in e;
}
function j(e, { select: t = !1 } = {}) {
  if (e && e.focus) {
    const n = document.activeElement;
    e.focus({ preventScroll: !0 }), e !== n && Kn(e) && t && e.select();
  }
}
var at = Hn();
function Hn() {
  let e = [];
  return {
    add(t) {
      const n = e[0];
      t !== n && n?.pause(), e = it(e, t), e.unshift(t);
    },
    remove(t) {
      e = it(e, t), e[0]?.resume();
    }
  };
}
function it(e, t) {
  const n = [...e], r = n.indexOf(t);
  return r !== -1 && n.splice(r, 1), n;
}
function zn(e) {
  return e.filter((t) => t.tagName !== "A");
}
var Gn = "Portal", Ct = a.forwardRef((e, t) => {
  const { container: n, ...r } = e, [o, i] = a.useState(!1);
  ue(() => i(!0), []);
  const l = n || o && globalThis?.document?.body;
  return l ? Jt.createPortal(/* @__PURE__ */ b(U.div, { ...r, ref: t }), l) : null;
});
Ct.displayName = Gn;
function Yn(e, t) {
  return a.useReducer((n, r) => t[n][r] ?? n, e);
}
var we = (e) => {
  const { present: t, children: n } = e, r = Xn(t), o = typeof n == "function" ? n({ present: r.isPresent }) : a.Children.only(n), i = q(r.ref, qn(o));
  return typeof n == "function" || r.isPresent ? a.cloneElement(o, { ref: i }) : null;
};
we.displayName = "Presence";
function Xn(e) {
  const [t, n] = a.useState(), r = a.useRef(null), o = a.useRef(e), i = a.useRef("none"), l = e ? "mounted" : "unmounted", [c, d] = Yn(l, {
    mounted: {
      UNMOUNT: "unmounted",
      ANIMATION_OUT: "unmountSuspended"
    },
    unmountSuspended: {
      MOUNT: "mounted",
      ANIMATION_END: "unmounted"
    },
    unmounted: {
      MOUNT: "mounted"
    }
  });
  return a.useEffect(() => {
    const u = ve(r.current);
    i.current = c === "mounted" ? u : "none";
  }, [c]), ue(() => {
    const u = r.current, f = o.current;
    if (f !== e) {
      const p = i.current, h = ve(u);
      e ? d("MOUNT") : h === "none" || u?.display === "none" ? d("UNMOUNT") : d(f && p !== h ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
    }
  }, [e, d]), ue(() => {
    if (t) {
      let u;
      const f = t.ownerDocument.defaultView ?? window, v = (h) => {
        const m = ve(r.current).includes(CSS.escape(h.animationName));
        if (h.target === t && m && (d("ANIMATION_END"), !o.current)) {
          const y = t.style.animationFillMode;
          t.style.animationFillMode = "forwards", u = f.setTimeout(() => {
            t.style.animationFillMode === "forwards" && (t.style.animationFillMode = y);
          });
        }
      }, p = (h) => {
        h.target === t && (i.current = ve(r.current));
      };
      return t.addEventListener("animationstart", p), t.addEventListener("animationcancel", v), t.addEventListener("animationend", v), () => {
        f.clearTimeout(u), t.removeEventListener("animationstart", p), t.removeEventListener("animationcancel", v), t.removeEventListener("animationend", v);
      };
    } else
      d("ANIMATION_END");
  }, [t, d]), {
    isPresent: ["mounted", "unmountSuspended"].includes(c),
    ref: a.useCallback((u) => {
      r.current = u ? getComputedStyle(u) : null, n(u);
    }, [])
  };
}
function ve(e) {
  return e?.animationName || "none";
}
function qn(e) {
  let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
  return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
}
var ke = 0;
function Zn() {
  a.useEffect(() => {
    const e = document.querySelectorAll("[data-radix-focus-guard]");
    return document.body.insertAdjacentElement("afterbegin", e[0] ?? ct()), document.body.insertAdjacentElement("beforeend", e[1] ?? ct()), ke++, () => {
      ke === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), ke--;
    };
  }, []);
}
function ct() {
  const e = document.createElement("span");
  return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
}
var L = function() {
  return L = Object.assign || function(t) {
    for (var n, r = 1, o = arguments.length; r < o; r++) {
      n = arguments[r];
      for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
    }
    return t;
  }, L.apply(this, arguments);
};
function wt(e, t) {
  var n = {};
  for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var o = 0, r = Object.getOwnPropertySymbols(e); o < r.length; o++)
      t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
  return n;
}
function Qn(e, t, n) {
  if (n || arguments.length === 2) for (var r = 0, o = t.length, i; r < o; r++)
    (i || !(r in t)) && (i || (i = Array.prototype.slice.call(t, 0, r)), i[r] = t[r]);
  return e.concat(i || Array.prototype.slice.call(t));
}
var ye = "right-scroll-bar-position", be = "width-before-scroll-bar", Jn = "with-scroll-bars-hidden", er = "--removed-body-scroll-bar-size";
function Te(e, t) {
  return typeof e == "function" ? e(t) : e && (e.current = t), e;
}
function tr(e, t) {
  var n = Zt(function() {
    return {
      // value
      value: e,
      // last callback
      callback: t,
      // "memoized" public interface
      facade: {
        get current() {
          return n.value;
        },
        set current(r) {
          var o = n.value;
          o !== r && (n.value = r, n.callback(r, o));
        }
      }
    };
  })[0];
  return n.callback = t, n.facade;
}
var nr = typeof window < "u" ? a.useLayoutEffect : a.useEffect, lt = /* @__PURE__ */ new WeakMap();
function rr(e, t) {
  var n = tr(null, function(r) {
    return e.forEach(function(o) {
      return Te(o, r);
    });
  });
  return nr(function() {
    var r = lt.get(n);
    if (r) {
      var o = new Set(r), i = new Set(e), l = n.current;
      o.forEach(function(c) {
        i.has(c) || Te(c, null);
      }), i.forEach(function(c) {
        o.has(c) || Te(c, l);
      });
    }
    lt.set(n, e);
  }, [e]), n;
}
function or(e) {
  return e;
}
function ar(e, t) {
  t === void 0 && (t = or);
  var n = [], r = !1, o = {
    read: function() {
      if (r)
        throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
      return n.length ? n[n.length - 1] : e;
    },
    useMedium: function(i) {
      var l = t(i, r);
      return n.push(l), function() {
        n = n.filter(function(c) {
          return c !== l;
        });
      };
    },
    assignSyncMedium: function(i) {
      for (r = !0; n.length; ) {
        var l = n;
        n = [], l.forEach(i);
      }
      n = {
        push: function(c) {
          return i(c);
        },
        filter: function() {
          return n;
        }
      };
    },
    assignMedium: function(i) {
      r = !0;
      var l = [];
      if (n.length) {
        var c = n;
        n = [], c.forEach(i), l = n;
      }
      var d = function() {
        var f = l;
        l = [], f.forEach(i);
      }, u = function() {
        return Promise.resolve().then(d);
      };
      u(), n = {
        push: function(f) {
          l.push(f), u();
        },
        filter: function(f) {
          return l = l.filter(f), n;
        }
      };
    }
  };
  return o;
}
function ir(e) {
  e === void 0 && (e = {});
  var t = ar(null);
  return t.options = L({ async: !0, ssr: !1 }, e), t;
}
var St = function(e) {
  var t = e.sideCar, n = wt(e, ["sideCar"]);
  if (!t)
    throw new Error("Sidecar: please provide `sideCar` property to import the right car");
  var r = t.read();
  if (!r)
    throw new Error("Sidecar medium not found");
  return a.createElement(r, L({}, n));
};
St.isSideCarExport = !0;
function cr(e, t) {
  return e.useMedium(t), St;
}
var Rt = ir(), Me = function() {
}, Se = a.forwardRef(function(e, t) {
  var n = a.useRef(null), r = a.useState({
    onScrollCapture: Me,
    onWheelCapture: Me,
    onTouchMoveCapture: Me
  }), o = r[0], i = r[1], l = e.forwardProps, c = e.children, d = e.className, u = e.removeScrollBar, f = e.enabled, v = e.shards, p = e.sideCar, h = e.noRelative, D = e.noIsolation, m = e.inert, y = e.allowPinchZoom, w = e.as, x = w === void 0 ? "div" : w, A = e.gapMode, P = wt(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), N = p, S = rr([n, t]), E = L(L({}, P), o);
  return a.createElement(
    a.Fragment,
    null,
    f && a.createElement(N, { sideCar: Rt, removeScrollBar: u, shards: v, noRelative: h, noIsolation: D, inert: m, setCallbacks: i, allowPinchZoom: !!y, lockRef: n, gapMode: A }),
    l ? a.cloneElement(a.Children.only(c), L(L({}, E), { ref: S })) : a.createElement(x, L({}, E, { className: d, ref: S }), c)
  );
});
Se.defaultProps = {
  enabled: !0,
  removeScrollBar: !0,
  inert: !1
};
Se.classNames = {
  fullWidth: be,
  zeroRight: ye
};
var lr = function() {
  if (typeof __webpack_nonce__ < "u")
    return __webpack_nonce__;
};
function ur() {
  if (!document)
    return null;
  var e = document.createElement("style");
  e.type = "text/css";
  var t = lr();
  return t && e.setAttribute("nonce", t), e;
}
function sr(e, t) {
  e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
}
function dr(e) {
  var t = document.head || document.getElementsByTagName("head")[0];
  t.appendChild(e);
}
var fr = function() {
  var e = 0, t = null;
  return {
    add: function(n) {
      e == 0 && (t = ur()) && (sr(t, n), dr(t)), e++;
    },
    remove: function() {
      e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
    }
  };
}, vr = function() {
  var e = fr();
  return function(t, n) {
    a.useEffect(function() {
      return e.add(t), function() {
        e.remove();
      };
    }, [t && n]);
  };
}, Dt = function() {
  var e = vr(), t = function(n) {
    var r = n.styles, o = n.dynamic;
    return e(r, o), null;
  };
  return t;
}, mr = {
  left: 0,
  top: 0,
  right: 0,
  gap: 0
}, _e = function(e) {
  return parseInt(e || "", 10) || 0;
}, pr = function(e) {
  var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
  return [_e(n), _e(r), _e(o)];
}, hr = function(e) {
  if (e === void 0 && (e = "margin"), typeof window > "u")
    return mr;
  var t = pr(e), n = document.documentElement.clientWidth, r = window.innerWidth;
  return {
    left: t[0],
    top: t[1],
    right: t[2],
    gap: Math.max(0, r - n + t[2] - t[0])
  };
}, gr = Dt(), ae = "data-scroll-locked", yr = function(e, t, n, r) {
  var o = e.left, i = e.top, l = e.right, c = e.gap;
  return n === void 0 && (n = "margin"), `
  .`.concat(Jn, ` {
   overflow: hidden `).concat(r, `;
   padding-right: `).concat(c, "px ").concat(r, `;
  }
  body[`).concat(ae, `] {
    overflow: hidden `).concat(r, `;
    overscroll-behavior: contain;
    `).concat([
    t && "position: relative ".concat(r, ";"),
    n === "margin" && `
    padding-left: `.concat(o, `px;
    padding-top: `).concat(i, `px;
    padding-right: `).concat(l, `px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(c, "px ").concat(r, `;
    `),
    n === "padding" && "padding-right: ".concat(c, "px ").concat(r, ";")
  ].filter(Boolean).join(""), `
  }
  
  .`).concat(ye, ` {
    right: `).concat(c, "px ").concat(r, `;
  }
  
  .`).concat(be, ` {
    margin-right: `).concat(c, "px ").concat(r, `;
  }
  
  .`).concat(ye, " .").concat(ye, ` {
    right: 0 `).concat(r, `;
  }
  
  .`).concat(be, " .").concat(be, ` {
    margin-right: 0 `).concat(r, `;
  }
  
  body[`).concat(ae, `] {
    `).concat(er, ": ").concat(c, `px;
  }
`);
}, ut = function() {
  var e = parseInt(document.body.getAttribute(ae) || "0", 10);
  return isFinite(e) ? e : 0;
}, br = function() {
  a.useEffect(function() {
    return document.body.setAttribute(ae, (ut() + 1).toString()), function() {
      var e = ut() - 1;
      e <= 0 ? document.body.removeAttribute(ae) : document.body.setAttribute(ae, e.toString());
    };
  }, []);
}, Er = function(e) {
  var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
  br();
  var i = a.useMemo(function() {
    return hr(o);
  }, [o]);
  return a.createElement(gr, { styles: yr(i, !t, o, n ? "" : "!important") });
}, Be = !1;
if (typeof window < "u")
  try {
    var me = Object.defineProperty({}, "passive", {
      get: function() {
        return Be = !0, !0;
      }
    });
    window.addEventListener("test", me, me), window.removeEventListener("test", me, me);
  } catch {
    Be = !1;
  }
var ee = Be ? { passive: !1 } : !1, Cr = function(e) {
  return e.tagName === "TEXTAREA";
}, xt = function(e, t) {
  if (!(e instanceof Element))
    return !1;
  var n = window.getComputedStyle(e);
  return (
    // not-not-scrollable
    n[t] !== "hidden" && // contains scroll inside self
    !(n.overflowY === n.overflowX && !Cr(e) && n[t] === "visible")
  );
}, wr = function(e) {
  return xt(e, "overflowY");
}, Sr = function(e) {
  return xt(e, "overflowX");
}, st = function(e, t) {
  var n = t.ownerDocument, r = t;
  do {
    typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
    var o = Pt(e, r);
    if (o) {
      var i = Nt(e, r), l = i[1], c = i[2];
      if (l > c)
        return !0;
    }
    r = r.parentNode;
  } while (r && r !== n.body);
  return !1;
}, Rr = function(e) {
  var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
  return [
    t,
    n,
    r
  ];
}, Dr = function(e) {
  var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
  return [
    t,
    n,
    r
  ];
}, Pt = function(e, t) {
  return e === "v" ? wr(t) : Sr(t);
}, Nt = function(e, t) {
  return e === "v" ? Rr(t) : Dr(t);
}, xr = function(e, t) {
  return e === "h" && t === "rtl" ? -1 : 1;
}, Pr = function(e, t, n, r, o) {
  var i = xr(e, window.getComputedStyle(t).direction), l = i * r, c = n.target, d = t.contains(c), u = !1, f = l > 0, v = 0, p = 0;
  do {
    if (!c)
      break;
    var h = Nt(e, c), D = h[0], m = h[1], y = h[2], w = m - y - i * D;
    (D || w) && Pt(e, c) && (v += w, p += D);
    var x = c.parentNode;
    c = x && x.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? x.host : x;
  } while (
    // portaled content
    !d && c !== document.body || // self content
    d && (t.contains(c) || t === c)
  );
  return (f && Math.abs(v) < 1 || !f && Math.abs(p) < 1) && (u = !0), u;
}, pe = function(e) {
  return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
}, dt = function(e) {
  return [e.deltaX, e.deltaY];
}, ft = function(e) {
  return e && "current" in e ? e.current : e;
}, Nr = function(e, t) {
  return e[0] === t[0] && e[1] === t[1];
}, Or = function(e) {
  return `
  .block-interactivity-`.concat(e, ` {pointer-events: none;}
  .allow-interactivity-`).concat(e, ` {pointer-events: all;}
`);
}, Ar = 0, te = [];
function Ir(e) {
  var t = a.useRef([]), n = a.useRef([0, 0]), r = a.useRef(), o = a.useState(Ar++)[0], i = a.useState(Dt)[0], l = a.useRef(e);
  a.useEffect(function() {
    l.current = e;
  }, [e]), a.useEffect(function() {
    if (e.inert) {
      document.body.classList.add("block-interactivity-".concat(o));
      var m = Qn([e.lockRef.current], (e.shards || []).map(ft), !0).filter(Boolean);
      return m.forEach(function(y) {
        return y.classList.add("allow-interactivity-".concat(o));
      }), function() {
        document.body.classList.remove("block-interactivity-".concat(o)), m.forEach(function(y) {
          return y.classList.remove("allow-interactivity-".concat(o));
        });
      };
    }
  }, [e.inert, e.lockRef.current, e.shards]);
  var c = a.useCallback(function(m, y) {
    if ("touches" in m && m.touches.length === 2 || m.type === "wheel" && m.ctrlKey)
      return !l.current.allowPinchZoom;
    var w = pe(m), x = n.current, A = "deltaX" in m ? m.deltaX : x[0] - w[0], P = "deltaY" in m ? m.deltaY : x[1] - w[1], N, S = m.target, E = Math.abs(A) > Math.abs(P) ? "h" : "v";
    if ("touches" in m && E === "h" && S.type === "range")
      return !1;
    var M = window.getSelection(), F = M && M.anchorNode, W = F ? F === S || F.contains(S) : !1;
    if (W)
      return !1;
    var V = st(E, S);
    if (!V)
      return !0;
    if (V ? N = E : (N = E === "v" ? "h" : "v", V = st(E, S)), !V)
      return !1;
    if (!r.current && "changedTouches" in m && (A || P) && (r.current = N), !N)
      return !0;
    var Q = r.current || N;
    return Pr(Q, y, m, Q === "h" ? A : P);
  }, []), d = a.useCallback(function(m) {
    var y = m;
    if (!(!te.length || te[te.length - 1] !== i)) {
      var w = "deltaY" in y ? dt(y) : pe(y), x = t.current.filter(function(N) {
        return N.name === y.type && (N.target === y.target || y.target === N.shadowParent) && Nr(N.delta, w);
      })[0];
      if (x && x.should) {
        y.cancelable && y.preventDefault();
        return;
      }
      if (!x) {
        var A = (l.current.shards || []).map(ft).filter(Boolean).filter(function(N) {
          return N.contains(y.target);
        }), P = A.length > 0 ? c(y, A[0]) : !l.current.noIsolation;
        P && y.cancelable && y.preventDefault();
      }
    }
  }, []), u = a.useCallback(function(m, y, w, x) {
    var A = { name: m, delta: y, target: w, should: x, shadowParent: kr(w) };
    t.current.push(A), setTimeout(function() {
      t.current = t.current.filter(function(P) {
        return P !== A;
      });
    }, 1);
  }, []), f = a.useCallback(function(m) {
    n.current = pe(m), r.current = void 0;
  }, []), v = a.useCallback(function(m) {
    u(m.type, dt(m), m.target, c(m, e.lockRef.current));
  }, []), p = a.useCallback(function(m) {
    u(m.type, pe(m), m.target, c(m, e.lockRef.current));
  }, []);
  a.useEffect(function() {
    return te.push(i), e.setCallbacks({
      onScrollCapture: v,
      onWheelCapture: v,
      onTouchMoveCapture: p
    }), document.addEventListener("wheel", d, ee), document.addEventListener("touchmove", d, ee), document.addEventListener("touchstart", f, ee), function() {
      te = te.filter(function(m) {
        return m !== i;
      }), document.removeEventListener("wheel", d, ee), document.removeEventListener("touchmove", d, ee), document.removeEventListener("touchstart", f, ee);
    };
  }, []);
  var h = e.removeScrollBar, D = e.inert;
  return a.createElement(
    a.Fragment,
    null,
    D ? a.createElement(i, { styles: Or(o) }) : null,
    h ? a.createElement(Er, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
  );
}
function kr(e) {
  for (var t = null; e !== null; )
    e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
  return t;
}
const Tr = cr(Rt, Ir);
var Ot = a.forwardRef(function(e, t) {
  return a.createElement(Se, L({}, e, { ref: t, sideCar: Tr }));
});
Ot.classNames = Se.classNames;
var Mr = function(e) {
  if (typeof document > "u")
    return null;
  var t = Array.isArray(e) ? e[0] : e;
  return t.ownerDocument.body;
}, ne = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakMap(), ge = {}, Le = 0, At = function(e) {
  return e && (e.host || At(e.parentNode));
}, _r = function(e, t) {
  return t.map(function(n) {
    if (e.contains(n))
      return n;
    var r = At(n);
    return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
  }).filter(function(n) {
    return !!n;
  });
}, Lr = function(e, t, n, r) {
  var o = _r(t, Array.isArray(e) ? e : [e]);
  ge[n] || (ge[n] = /* @__PURE__ */ new WeakMap());
  var i = ge[n], l = [], c = /* @__PURE__ */ new Set(), d = new Set(o), u = function(v) {
    !v || c.has(v) || (c.add(v), u(v.parentNode));
  };
  o.forEach(u);
  var f = function(v) {
    !v || d.has(v) || Array.prototype.forEach.call(v.children, function(p) {
      if (c.has(p))
        f(p);
      else
        try {
          var h = p.getAttribute(r), D = h !== null && h !== "false", m = (ne.get(p) || 0) + 1, y = (i.get(p) || 0) + 1;
          ne.set(p, m), i.set(p, y), l.push(p), m === 1 && D && he.set(p, !0), y === 1 && p.setAttribute(n, "true"), D || p.setAttribute(r, "true");
        } catch (w) {
          console.error("aria-hidden: cannot operate on ", p, w);
        }
    });
  };
  return f(t), c.clear(), Le++, function() {
    l.forEach(function(v) {
      var p = ne.get(v) - 1, h = i.get(v) - 1;
      ne.set(v, p), i.set(v, h), p || (he.has(v) || v.removeAttribute(r), he.delete(v)), h || v.removeAttribute(n);
    }), Le--, Le || (ne = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakMap(), ge = {});
  };
}, Fr = function(e, t, n) {
  n === void 0 && (n = "data-aria-hidden");
  var r = Array.from(Array.isArray(e) ? e : [e]), o = Mr(e);
  return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), Lr(r, o, n, "aria-hidden")) : function() {
    return null;
  };
}, Re = "Dialog", [It] = gn(Re), [Wr, _] = It(Re), kt = (e) => {
  const {
    __scopeDialog: t,
    children: n,
    open: r,
    defaultOpen: o,
    onOpenChange: i,
    modal: l = !0
  } = e, c = a.useRef(null), d = a.useRef(null), [u, f] = wn({
    prop: r,
    defaultProp: o ?? !1,
    onChange: i,
    caller: Re
  });
  return /* @__PURE__ */ b(
    Wr,
    {
      scope: t,
      triggerRef: c,
      contentRef: d,
      contentId: $(),
      titleId: $(),
      descriptionId: $(),
      open: u,
      onOpenChange: f,
      onOpenToggle: a.useCallback(() => f((v) => !v), [f]),
      modal: l,
      children: n
    }
  );
};
kt.displayName = Re;
var Tt = "DialogTrigger", $r = a.forwardRef(
  (e, t) => {
    const { __scopeDialog: n, ...r } = e, o = _(Tt, n), i = q(t, o.triggerRef);
    return /* @__PURE__ */ b(
      U.button,
      {
        type: "button",
        "aria-haspopup": "dialog",
        "aria-expanded": o.open,
        "aria-controls": o.contentId,
        "data-state": Ke(o.open),
        ...r,
        ref: i,
        onClick: K(e.onClick, o.onOpenToggle)
      }
    );
  }
);
$r.displayName = Tt;
var Ve = "DialogPortal", [Br, Mt] = It(Ve, {
  forceMount: void 0
}), _t = (e) => {
  const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, i = _(Ve, t);
  return /* @__PURE__ */ b(Br, { scope: t, forceMount: n, children: a.Children.map(r, (l) => /* @__PURE__ */ b(we, { present: n || i.open, children: /* @__PURE__ */ b(Ct, { asChild: !0, container: o, children: l }) })) });
};
_t.displayName = Ve;
var Ee = "DialogOverlay", Lt = a.forwardRef(
  (e, t) => {
    const n = Mt(Ee, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, i = _(Ee, e.__scopeDialog);
    return i.modal ? /* @__PURE__ */ b(we, { present: r || i.open, children: /* @__PURE__ */ b(Vr, { ...o, ref: t }) }) : null;
  }
);
Lt.displayName = Ee;
var Ur = /* @__PURE__ */ pt("DialogOverlay.RemoveScroll"), Vr = a.forwardRef(
  (e, t) => {
    const { __scopeDialog: n, ...r } = e, o = _(Ee, n);
    return (
      // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
      // ie. when `Overlay` and `Content` are siblings
      /* @__PURE__ */ b(Ot, { as: Ur, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ b(
        U.div,
        {
          "data-state": Ke(o.open),
          ...r,
          ref: t,
          style: { pointerEvents: "auto", ...r.style }
        }
      ) })
    );
  }
), Y = "DialogContent", Ft = a.forwardRef(
  (e, t) => {
    const n = Mt(Y, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, i = _(Y, e.__scopeDialog);
    return /* @__PURE__ */ b(we, { present: r || i.open, children: i.modal ? /* @__PURE__ */ b(jr, { ...o, ref: t }) : /* @__PURE__ */ b(Kr, { ...o, ref: t }) });
  }
);
Ft.displayName = Y;
var jr = a.forwardRef(
  (e, t) => {
    const n = _(Y, e.__scopeDialog), r = a.useRef(null), o = q(t, n.contentRef, r);
    return a.useEffect(() => {
      const i = r.current;
      if (i) return Fr(i);
    }, []), /* @__PURE__ */ b(
      Wt,
      {
        ...e,
        ref: o,
        trapFocus: n.open,
        disableOutsidePointerEvents: !0,
        onCloseAutoFocus: K(e.onCloseAutoFocus, (i) => {
          i.preventDefault(), n.triggerRef.current?.focus();
        }),
        onPointerDownOutside: K(e.onPointerDownOutside, (i) => {
          const l = i.detail.originalEvent, c = l.button === 0 && l.ctrlKey === !0;
          (l.button === 2 || c) && i.preventDefault();
        }),
        onFocusOutside: K(
          e.onFocusOutside,
          (i) => i.preventDefault()
        )
      }
    );
  }
), Kr = a.forwardRef(
  (e, t) => {
    const n = _(Y, e.__scopeDialog), r = a.useRef(!1), o = a.useRef(!1);
    return /* @__PURE__ */ b(
      Wt,
      {
        ...e,
        ref: t,
        trapFocus: !1,
        disableOutsidePointerEvents: !1,
        onCloseAutoFocus: (i) => {
          e.onCloseAutoFocus?.(i), i.defaultPrevented || (r.current || n.triggerRef.current?.focus(), i.preventDefault()), r.current = !1, o.current = !1;
        },
        onInteractOutside: (i) => {
          e.onInteractOutside?.(i), i.defaultPrevented || (r.current = !0, i.detail.originalEvent.type === "pointerdown" && (o.current = !0));
          const l = i.target;
          n.triggerRef.current?.contains(l) && i.preventDefault(), i.detail.originalEvent.type === "focusin" && o.current && i.preventDefault();
        }
      }
    );
  }
), Wt = a.forwardRef(
  (e, t) => {
    const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: i, ...l } = e, c = _(Y, n), d = a.useRef(null), u = q(t, d);
    return Zn(), /* @__PURE__ */ le(Ze, { children: [
      /* @__PURE__ */ b(
        bt,
        {
          asChild: !0,
          loop: !0,
          trapped: r,
          onMountAutoFocus: o,
          onUnmountAutoFocus: i,
          children: /* @__PURE__ */ b(
            gt,
            {
              role: "dialog",
              id: c.contentId,
              "aria-describedby": c.descriptionId,
              "aria-labelledby": c.titleId,
              "data-state": Ke(c.open),
              ...l,
              ref: u,
              onDismiss: () => c.onOpenChange(!1)
            }
          )
        }
      ),
      /* @__PURE__ */ le(Ze, { children: [
        /* @__PURE__ */ b(Yr, { titleId: c.titleId }),
        /* @__PURE__ */ b(qr, { contentRef: d, descriptionId: c.descriptionId })
      ] })
    ] });
  }
), je = "DialogTitle", Hr = a.forwardRef(
  (e, t) => {
    const { __scopeDialog: n, ...r } = e, o = _(je, n);
    return /* @__PURE__ */ b(U.h2, { id: o.titleId, ...r, ref: t });
  }
);
Hr.displayName = je;
var $t = "DialogDescription", zr = a.forwardRef(
  (e, t) => {
    const { __scopeDialog: n, ...r } = e, o = _($t, n);
    return /* @__PURE__ */ b(U.p, { id: o.descriptionId, ...r, ref: t });
  }
);
zr.displayName = $t;
var Bt = "DialogClose", Gr = a.forwardRef(
  (e, t) => {
    const { __scopeDialog: n, ...r } = e, o = _(Bt, n);
    return /* @__PURE__ */ b(
      U.button,
      {
        type: "button",
        ...r,
        ref: t,
        onClick: K(e.onClick, () => o.onOpenChange(!1))
      }
    );
  }
);
Gr.displayName = Bt;
function Ke(e) {
  return e ? "open" : "closed";
}
var Ut = "DialogTitleWarning", [To, Vt] = hn(Ut, {
  contentName: Y,
  titleName: je,
  docsSlug: "dialog"
}), Yr = ({ titleId: e }) => {
  const t = Vt(Ut), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.

If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.

For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
  return a.useEffect(() => {
    e && (document.getElementById(e) || console.error(n));
  }, [n, e]), null;
}, Xr = "DialogDescriptionWarning", qr = ({ contentRef: e, descriptionId: t }) => {
  const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Vt(Xr).contentName}}.`;
  return a.useEffect(() => {
    const o = e.current?.getAttribute("aria-describedby");
    t && o && (document.getElementById(t) || console.warn(r));
  }, [r, e, t]), null;
}, Zr = kt, Qr = _t, Jr = Lt, eo = Ft, to = /* @__PURE__ */ Symbol.for("react.lazy"), Ce = a[" use ".trim().toString()];
function no(e) {
  return typeof e == "object" && e !== null && "then" in e;
}
function jt(e) {
  return e != null && typeof e == "object" && "$$typeof" in e && e.$$typeof === to && "_payload" in e && no(e._payload);
}
// @__NO_SIDE_EFFECTS__
function ro(e) {
  const t = /* @__PURE__ */ oo(e), n = a.forwardRef((r, o) => {
    let { children: i, ...l } = r;
    jt(i) && typeof Ce == "function" && (i = Ce(i._payload));
    const c = a.Children.toArray(i), d = c.find(io);
    if (d) {
      const u = d.props.children, f = c.map((v) => v === d ? a.Children.count(u) > 1 ? a.Children.only(null) : a.isValidElement(u) ? u.props.children : null : v);
      return /* @__PURE__ */ b(t, { ...l, ref: o, children: a.isValidElement(u) ? a.cloneElement(u, void 0, f) : null });
    }
    return /* @__PURE__ */ b(t, { ...l, ref: o, children: i });
  });
  return n.displayName = `${e}.Slot`, n;
}
// @__NO_SIDE_EFFECTS__
function oo(e) {
  const t = a.forwardRef((n, r) => {
    let { children: o, ...i } = n;
    if (jt(o) && typeof Ce == "function" && (o = Ce(o._payload)), a.isValidElement(o)) {
      const l = lo(o), c = co(i, o.props);
      return o.type !== a.Fragment && (c.ref = r ? H(r, l) : l), a.cloneElement(o, c);
    }
    return a.Children.count(o) > 1 ? a.Children.only(null) : null;
  });
  return t.displayName = `${e}.SlotClone`, t;
}
var ao = /* @__PURE__ */ Symbol("radix.slottable");
function io(e) {
  return a.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === ao;
}
function co(e, t) {
  const n = { ...t };
  for (const r in t) {
    const o = e[r], i = t[r];
    /^on[A-Z]/.test(r) ? o && i ? n[r] = (...c) => {
      const d = i(...c);
      return o(...c), d;
    } : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...i } : r === "className" && (n[r] = [o, i].filter(Boolean).join(" "));
  }
  return { ...e, ...n };
}
function lo(e) {
  let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
  return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
}
var uo = [
  "a",
  "button",
  "div",
  "form",
  "h2",
  "h3",
  "img",
  "input",
  "label",
  "li",
  "nav",
  "ol",
  "p",
  "select",
  "span",
  "svg",
  "ul"
], G = uo.reduce((e, t) => {
  const n = /* @__PURE__ */ ro(`Primitive.${t}`), r = a.forwardRef((o, i) => {
    const { asChild: l, ...c } = o, d = l ? n : t;
    return typeof window < "u" && (window[/* @__PURE__ */ Symbol.for("radix-ui")] = !0), /* @__PURE__ */ b(d, { ...c, ref: i });
  });
  return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
}, {}), ce = '[cmdk-group=""]', Fe = '[cmdk-group-items=""]', so = '[cmdk-group-heading=""]', Kt = '[cmdk-item=""]', vt = `${Kt}:not([aria-disabled="true"])`, Ue = "cmdk-item-select", re = "data-value", fo = (e, t, n) => pn(e, t, n), Ht = a.createContext(void 0), de = () => a.useContext(Ht), zt = a.createContext(void 0), He = () => a.useContext(zt), Gt = a.createContext(void 0), Yt = a.forwardRef((e, t) => {
  let n = oe(() => {
    var s, C;
    return { search: "", value: (C = (s = e.value) != null ? s : e.defaultValue) != null ? C : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
  }), r = oe(() => /* @__PURE__ */ new Set()), o = oe(() => /* @__PURE__ */ new Map()), i = oe(() => /* @__PURE__ */ new Map()), l = oe(() => /* @__PURE__ */ new Set()), c = Xt(e), { label: d, children: u, value: f, onValueChange: v, filter: p, shouldFilter: h, loop: D, disablePointerSelection: m = !1, vimBindings: y = !0, ...w } = e, x = $(), A = $(), P = $(), N = a.useRef(null), S = So();
  X(() => {
    if (f !== void 0) {
      let s = f.trim();
      n.current.value = s, E.emit();
    }
  }, [f]), X(() => {
    S(6, ze);
  }, []);
  let E = a.useMemo(() => ({ subscribe: (s) => (l.current.add(s), () => l.current.delete(s)), snapshot: () => n.current, setState: (s, C, R) => {
    var g, O, I, T;
    if (!Object.is(n.current[s], C)) {
      if (n.current[s] = C, s === "search") Q(), W(), S(1, V);
      else if (s === "value") {
        if (document.activeElement.hasAttribute("cmdk-input") || document.activeElement.hasAttribute("cmdk-root")) {
          let k = document.getElementById(P);
          k ? k.focus() : (g = document.getElementById(x)) == null || g.focus();
        }
        if (S(7, () => {
          var k;
          n.current.selectedItemId = (k = J()) == null ? void 0 : k.id, E.emit();
        }), R || S(5, ze), ((O = c.current) == null ? void 0 : O.value) !== void 0) {
          let k = C ?? "";
          (T = (I = c.current).onValueChange) == null || T.call(I, k);
          return;
        }
      }
      E.emit();
    }
  }, emit: () => {
    l.current.forEach((s) => s());
  } }), []), M = a.useMemo(() => ({ value: (s, C, R) => {
    var g;
    C !== ((g = i.current.get(s)) == null ? void 0 : g.value) && (i.current.set(s, { value: C, keywords: R }), n.current.filtered.items.set(s, F(C, R)), S(2, () => {
      W(), E.emit();
    }));
  }, item: (s, C) => (r.current.add(s), C && (o.current.has(C) ? o.current.get(C).add(s) : o.current.set(C, /* @__PURE__ */ new Set([s]))), S(3, () => {
    Q(), W(), n.current.value || V(), E.emit();
  }), () => {
    i.current.delete(s), r.current.delete(s), n.current.filtered.items.delete(s);
    let R = J();
    S(4, () => {
      Q(), R?.getAttribute("id") === s && V(), E.emit();
    });
  }), group: (s) => (o.current.has(s) || o.current.set(s, /* @__PURE__ */ new Set()), () => {
    i.current.delete(s), o.current.delete(s);
  }), filter: () => c.current.shouldFilter, label: d || e["aria-label"], getDisablePointerSelection: () => c.current.disablePointerSelection, listId: x, inputId: P, labelId: A, listInnerRef: N }), []);
  function F(s, C) {
    var R, g;
    let O = (g = (R = c.current) == null ? void 0 : R.filter) != null ? g : fo;
    return s ? O(s, n.current.search, C) : 0;
  }
  function W() {
    if (!n.current.search || c.current.shouldFilter === !1) return;
    let s = n.current.filtered.items, C = [];
    n.current.filtered.groups.forEach((g) => {
      let O = o.current.get(g), I = 0;
      O.forEach((T) => {
        let k = s.get(T);
        I = Math.max(k, I);
      }), C.push([g, I]);
    });
    let R = N.current;
    ie().sort((g, O) => {
      var I, T;
      let k = g.getAttribute("id"), fe = O.getAttribute("id");
      return ((I = s.get(fe)) != null ? I : 0) - ((T = s.get(k)) != null ? T : 0);
    }).forEach((g) => {
      let O = g.closest(Fe);
      O ? O.appendChild(g.parentElement === O ? g : g.closest(`${Fe} > *`)) : R.appendChild(g.parentElement === R ? g : g.closest(`${Fe} > *`));
    }), C.sort((g, O) => O[1] - g[1]).forEach((g) => {
      var O;
      let I = (O = N.current) == null ? void 0 : O.querySelector(`${ce}[${re}="${encodeURIComponent(g[0])}"]`);
      I?.parentElement.appendChild(I);
    });
  }
  function V() {
    let s = ie().find((R) => R.getAttribute("aria-disabled") !== "true"), C = s?.getAttribute(re);
    E.setState("value", C || void 0);
  }
  function Q() {
    var s, C, R, g;
    if (!n.current.search || c.current.shouldFilter === !1) {
      n.current.filtered.count = r.current.size;
      return;
    }
    n.current.filtered.groups = /* @__PURE__ */ new Set();
    let O = 0;
    for (let I of r.current) {
      let T = (C = (s = i.current.get(I)) == null ? void 0 : s.value) != null ? C : "", k = (g = (R = i.current.get(I)) == null ? void 0 : R.keywords) != null ? g : [], fe = F(T, k);
      n.current.filtered.items.set(I, fe), fe > 0 && O++;
    }
    for (let [I, T] of o.current) for (let k of T) if (n.current.filtered.items.get(k) > 0) {
      n.current.filtered.groups.add(I);
      break;
    }
    n.current.filtered.count = O;
  }
  function ze() {
    var s, C, R;
    let g = J();
    g && (((s = g.parentElement) == null ? void 0 : s.firstChild) === g && ((R = (C = g.closest(ce)) == null ? void 0 : C.querySelector(so)) == null || R.scrollIntoView({ block: "nearest" })), g.scrollIntoView({ block: "nearest" }));
  }
  function J() {
    var s;
    return (s = N.current) == null ? void 0 : s.querySelector(`${Kt}[aria-selected="true"]`);
  }
  function ie() {
    var s;
    return Array.from(((s = N.current) == null ? void 0 : s.querySelectorAll(vt)) || []);
  }
  function xe(s) {
    let C = ie()[s];
    C && E.setState("value", C.getAttribute(re));
  }
  function Pe(s) {
    var C;
    let R = J(), g = ie(), O = g.findIndex((T) => T === R), I = g[O + s];
    (C = c.current) != null && C.loop && (I = O + s < 0 ? g[g.length - 1] : O + s === g.length ? g[0] : g[O + s]), I && E.setState("value", I.getAttribute(re));
  }
  function Ge(s) {
    let C = J(), R = C?.closest(ce), g;
    for (; R && !g; ) R = s > 0 ? Co(R, ce) : wo(R, ce), g = R?.querySelector(vt);
    g ? E.setState("value", g.getAttribute(re)) : Pe(s);
  }
  let Ye = () => xe(ie().length - 1), Xe = (s) => {
    s.preventDefault(), s.metaKey ? Ye() : s.altKey ? Ge(1) : Pe(1);
  }, qe = (s) => {
    s.preventDefault(), s.metaKey ? xe(0) : s.altKey ? Ge(-1) : Pe(-1);
  };
  return a.createElement(G.div, { ref: t, tabIndex: -1, ...w, "cmdk-root": "", onKeyDown: (s) => {
    var C;
    (C = w.onKeyDown) == null || C.call(w, s);
    let R = s.nativeEvent.isComposing || s.keyCode === 229;
    if (!(s.defaultPrevented || R)) switch (s.key) {
      case "n":
      case "j": {
        y && s.ctrlKey && Xe(s);
        break;
      }
      case "ArrowDown": {
        Xe(s);
        break;
      }
      case "p":
      case "k": {
        y && s.ctrlKey && qe(s);
        break;
      }
      case "ArrowUp": {
        qe(s);
        break;
      }
      case "Home": {
        s.preventDefault(), xe(0);
        break;
      }
      case "End": {
        s.preventDefault(), Ye();
        break;
      }
      case "Enter": {
        s.preventDefault();
        let g = J();
        if (g) {
          let O = new Event(Ue);
          g.dispatchEvent(O);
        }
      }
    }
  } }, a.createElement("label", { "cmdk-label": "", htmlFor: M.inputId, id: M.labelId, style: Do }, d), De(e, (s) => a.createElement(zt.Provider, { value: E }, a.createElement(Ht.Provider, { value: M }, s))));
}), vo = a.forwardRef((e, t) => {
  var n, r;
  let o = $(), i = a.useRef(null), l = a.useContext(Gt), c = de(), d = Xt(e), u = (r = (n = d.current) == null ? void 0 : n.forceMount) != null ? r : l?.forceMount;
  X(() => {
    if (!u) return c.item(o, l?.id);
  }, [u]);
  let f = qt(o, i, [e.value, e.children, i], e.keywords), v = He(), p = z((S) => S.value && S.value === f.current), h = z((S) => u || c.filter() === !1 ? !0 : S.search ? S.filtered.items.get(o) > 0 : !0);
  a.useEffect(() => {
    let S = i.current;
    if (!(!S || e.disabled)) return S.addEventListener(Ue, D), () => S.removeEventListener(Ue, D);
  }, [h, e.onSelect, e.disabled]);
  function D() {
    var S, E;
    m(), (E = (S = d.current).onSelect) == null || E.call(S, f.current);
  }
  function m() {
    v.setState("value", f.current, !0);
  }
  if (!h) return null;
  let { disabled: y, value: w, onSelect: x, forceMount: A, keywords: P, ...N } = e;
  return a.createElement(G.div, { ref: H(i, t), ...N, id: o, "cmdk-item": "", role: "option", "aria-disabled": !!y, "aria-selected": !!p, "data-disabled": !!y, "data-selected": !!p, onPointerMove: y || c.getDisablePointerSelection() ? void 0 : m, onClick: y ? void 0 : D }, e.children);
}), mo = a.forwardRef((e, t) => {
  let { heading: n, children: r, forceMount: o, ...i } = e, l = $(), c = a.useRef(null), d = a.useRef(null), u = $(), f = de(), v = z((h) => o || f.filter() === !1 ? !0 : h.search ? h.filtered.groups.has(l) : !0);
  X(() => f.group(l), []), qt(l, c, [e.value, e.heading, d]);
  let p = a.useMemo(() => ({ id: l, forceMount: o }), [o]);
  return a.createElement(G.div, { ref: H(c, t), ...i, "cmdk-group": "", role: "presentation", hidden: v ? void 0 : !0 }, n && a.createElement("div", { ref: d, "cmdk-group-heading": "", "aria-hidden": !0, id: u }, n), De(e, (h) => a.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? u : void 0 }, a.createElement(Gt.Provider, { value: p }, h))));
}), po = a.forwardRef((e, t) => {
  let { alwaysRender: n, ...r } = e, o = a.useRef(null), i = z((l) => !l.search);
  return !n && !i ? null : a.createElement(G.div, { ref: H(o, t), ...r, "cmdk-separator": "", role: "separator" });
}), ho = a.forwardRef((e, t) => {
  let { onValueChange: n, ...r } = e, o = e.value != null, i = He(), l = z((u) => u.search), c = z((u) => u.selectedItemId), d = de();
  return a.useEffect(() => {
    e.value != null && i.setState("search", e.value);
  }, [e.value]), a.createElement(G.input, { ref: t, ...r, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: !1, "aria-autocomplete": "list", role: "combobox", "aria-expanded": !0, "aria-controls": d.listId, "aria-labelledby": d.labelId, "aria-activedescendant": c, id: d.inputId, type: "text", value: o ? e.value : l, onChange: (u) => {
    o || i.setState("search", u.target.value), n?.(u.target.value);
  } });
}), go = a.forwardRef((e, t) => {
  let { children: n, label: r = "Suggestions", ...o } = e, i = a.useRef(null), l = a.useRef(null), c = z((u) => u.selectedItemId), d = de();
  return a.useEffect(() => {
    if (l.current && i.current) {
      let u = l.current, f = i.current, v, p = new ResizeObserver(() => {
        v = requestAnimationFrame(() => {
          let h = u.offsetHeight;
          f.style.setProperty("--cmdk-list-height", h.toFixed(1) + "px");
        });
      });
      return p.observe(u), () => {
        cancelAnimationFrame(v), p.unobserve(u);
      };
    }
  }, []), a.createElement(G.div, { ref: H(i, t), ...o, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": c, "aria-label": r, id: d.listId }, De(e, (u) => a.createElement("div", { ref: H(l, d.listInnerRef), "cmdk-list-sizer": "" }, u)));
}), yo = a.forwardRef((e, t) => {
  let { open: n, onOpenChange: r, overlayClassName: o, contentClassName: i, container: l, ...c } = e;
  return a.createElement(Zr, { open: n, onOpenChange: r }, a.createElement(Qr, { container: l }, a.createElement(Jr, { "cmdk-overlay": "", className: o }), a.createElement(eo, { "aria-label": e.label, "cmdk-dialog": "", className: i }, a.createElement(Yt, { ref: t, ...c }))));
}), bo = a.forwardRef((e, t) => z((n) => n.filtered.count === 0) ? a.createElement(G.div, { ref: t, ...e, "cmdk-empty": "", role: "presentation" }) : null), Eo = a.forwardRef((e, t) => {
  let { progress: n, children: r, label: o = "Loading...", ...i } = e;
  return a.createElement(G.div, { ref: t, ...i, "cmdk-loading": "", role: "progressbar", "aria-valuenow": n, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": o }, De(e, (l) => a.createElement("div", { "aria-hidden": !0 }, l)));
}), Z = Object.assign(Yt, { List: go, Item: vo, Input: ho, Group: mo, Separator: po, Dialog: yo, Empty: bo, Loading: Eo });
function Co(e, t) {
  let n = e.nextElementSibling;
  for (; n; ) {
    if (n.matches(t)) return n;
    n = n.nextElementSibling;
  }
}
function wo(e, t) {
  let n = e.previousElementSibling;
  for (; n; ) {
    if (n.matches(t)) return n;
    n = n.previousElementSibling;
  }
}
function Xt(e) {
  let t = a.useRef(e);
  return X(() => {
    t.current = e;
  }), t;
}
var X = typeof window > "u" ? a.useEffect : a.useLayoutEffect;
function oe(e) {
  let t = a.useRef();
  return t.current === void 0 && (t.current = e()), t;
}
function z(e) {
  let t = He(), n = () => e(t.snapshot());
  return a.useSyncExternalStore(t.subscribe, n, n);
}
function qt(e, t, n, r = []) {
  let o = a.useRef(), i = de();
  return X(() => {
    var l;
    let c = (() => {
      var u;
      for (let f of n) {
        if (typeof f == "string") return f.trim();
        if (typeof f == "object" && "current" in f) return f.current ? (u = f.current.textContent) == null ? void 0 : u.trim() : o.current;
      }
    })(), d = r.map((u) => u.trim());
    i.value(e, c, d), (l = t.current) == null || l.setAttribute(re, c), o.current = c;
  }), o;
}
var So = () => {
  let [e, t] = a.useState(), n = oe(() => /* @__PURE__ */ new Map());
  return X(() => {
    n.current.forEach((r) => r()), n.current = /* @__PURE__ */ new Map();
  }, [e]), (r, o) => {
    n.current.set(r, o), t({});
  };
};
function Ro(e) {
  let t = e.type;
  return typeof t == "function" ? t(e.props) : "render" in t ? t.render(e.props) : e;
}
function De({ asChild: e, children: t }, n) {
  return e && a.isValidElement(t) ? a.cloneElement(Ro(t), { ref: t.ref }, n(t.props.children)) : n(t);
}
var Do = { position: "absolute", width: "1px", height: "1px", padding: "0", margin: "-1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" };
function xo({
  className: e,
  ...t
}) {
  return /* @__PURE__ */ b(
    Z,
    {
      className: B(
        "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
        e
      ),
      "data-slot": "command",
      ...t
    }
  );
}
function Mo({
  title: e = "Command Palette",
  description: t = "Search for a command to run...",
  children: n,
  className: r,
  showCloseButton: o = !0,
  ...i
}) {
  return /* @__PURE__ */ le(tn, { ...i, children: [
    /* @__PURE__ */ le(nn, { className: "sr-only", children: [
      /* @__PURE__ */ b(rn, { children: e }),
      /* @__PURE__ */ b(on, { children: t })
    ] }),
    /* @__PURE__ */ b(
      an,
      {
        className: B("overflow-hidden p-0", r),
        showCloseButton: o,
        children: /* @__PURE__ */ b(xo, { className: "**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: n })
      }
    )
  ] });
}
function _o({
  className: e,
  ...t
}) {
  return /* @__PURE__ */ le(
    "div",
    {
      className: "flex h-9 items-center gap-2 border-b px-3",
      "data-slot": "command-input-wrapper",
      children: [
        /* @__PURE__ */ b(en, { className: "size-4 shrink-0 opacity-50" }),
        /* @__PURE__ */ b(
          Z.Input,
          {
            className: B(
              "flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
              e
            ),
            "data-slot": "command-input",
            ...t
          }
        )
      ]
    }
  );
}
function Lo({
  className: e,
  ...t
}) {
  return /* @__PURE__ */ b(
    Z.List,
    {
      className: B(
        "max-h-[300px] scroll-py-1 overflow-y-auto overflow-x-hidden",
        e
      ),
      "data-slot": "command-list",
      ...t
    }
  );
}
function Fo({
  className: e,
  ...t
}) {
  return /* @__PURE__ */ b(
    Z.Empty,
    {
      className: B("py-6 text-center text-sm", e),
      "data-slot": "command-empty",
      ...t
    }
  );
}
function Wo({
  className: e,
  ...t
}) {
  return /* @__PURE__ */ b(
    Z.Group,
    {
      className: B(
        "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:text-xs",
        e
      ),
      "data-slot": "command-group",
      ...t
    }
  );
}
function $o({
  className: e,
  ...t
}) {
  return /* @__PURE__ */ b(
    Z.Separator,
    {
      className: B("-mx-1 h-px bg-border", e),
      "data-slot": "command-separator",
      ...t
    }
  );
}
function Bo({
  className: e,
  ...t
}) {
  return /* @__PURE__ */ b(
    Z.Item,
    {
      className: B(
        "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0",
        e
      ),
      "data-slot": "command-item",
      ...t
    }
  );
}
function Uo({
  className: e,
  ...t
}) {
  return /* @__PURE__ */ b(
    "span",
    {
      className: B(
        "ml-auto text-muted-foreground text-xs tracking-widest",
        e
      ),
      "data-slot": "command-shortcut",
      ...t
    }
  );
}
export {
  xo as Command,
  Mo as CommandDialog,
  Fo as CommandEmpty,
  Wo as CommandGroup,
  _o as CommandInput,
  Bo as CommandItem,
  Lo as CommandList,
  $o as CommandSeparator,
  Uo as CommandShortcut
};
