var L = Object.defineProperty, W = Object.defineProperties;
var B = Object.getOwnPropertyDescriptors;
var D = Object.getOwnPropertySymbols;
var R = Object.prototype.hasOwnProperty, I = Object.prototype.propertyIsEnumerable;
var x = (e, o, r) => o in e ? L(e, o, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[o] = r, d = (e, o) => {
  for (var r in o || (o = {}))
    R.call(o, r) && x(e, r, o[r]);
  if (D)
    for (var r of D(o))
      I.call(o, r) && x(e, r, o[r]);
  return e;
}, p = (e, o) => W(e, B(o));
var u = (e, o) => {
  var r = {};
  for (var a in e)
    R.call(e, a) && o.indexOf(a) < 0 && (r[a] = e[a]);
  if (e != null && D)
    for (var a of D(e))
      o.indexOf(a) < 0 && I.call(e, a) && (r[a] = e[a]);
  return r;
};
import * as i from "react";
import { useState as K, useEffect as U } from "react";
import { ar as j, dW as b, as as $, au as _, fd as z, aw as F } from "./main-CxoAwMiG.js";
import { j as H, k as q, P as X, m as J, o as Q, l as N, w as V, G as Y, q as Z, r as ee, s as oe, t as re, v as ne, S as ae, x as te, y as de } from "./TalkLoading-CJtNYhDp.js";
import { jsx as s } from "react/jsx-runtime";
var h = "DropdownMenu", [pe] = F(
  h,
  [N]
), c = N(), [se, E] = pe(h), A = (e) => {
  const {
    __scopeDropdownMenu: o,
    children: r,
    dir: a,
    open: t,
    defaultOpen: n,
    onOpenChange: f,
    modal: w = !0
  } = e, l = c(o), m = i.useRef(null), [v, g] = j({
    prop: t,
    defaultProp: n != null ? n : !1,
    onChange: f,
    caller: h
  });
  return /* @__PURE__ */ s(
    se,
    {
      scope: o,
      triggerId: b(),
      triggerRef: m,
      contentId: b(),
      open: v,
      onOpenChange: g,
      onOpenToggle: i.useCallback(() => g((k) => !k), [g]),
      modal: w,
      children: /* @__PURE__ */ s(H, p(d({}, l), { open: v, onOpenChange: g, dir: a, modal: w, children: r }))
    }
  );
};
A.displayName = h;
var S = "DropdownMenuTrigger", C = i.forwardRef(
  (e, o) => {
    const w = e, { __scopeDropdownMenu: r, disabled: a = !1 } = w, t = u(w, ["__scopeDropdownMenu", "disabled"]), n = E(S, r), f = c(r);
    return /* @__PURE__ */ s(q, p(d({ asChild: !0 }, f), { children: /* @__PURE__ */ s(
      $.button,
      p(d({
        type: "button",
        id: n.triggerId,
        "aria-haspopup": "menu",
        "aria-expanded": n.open,
        "aria-controls": n.open ? n.contentId : void 0,
        "data-state": n.open ? "open" : "closed",
        "data-disabled": a ? "" : void 0,
        disabled: a
      }, t), {
        ref: z(o, n.triggerRef),
        onPointerDown: _(e.onPointerDown, (l) => {
          !a && l.button === 0 && l.ctrlKey === !1 && (n.onOpenToggle(), n.open || l.preventDefault());
        }),
        onKeyDown: _(e.onKeyDown, (l) => {
          a || (["Enter", " "].includes(l.key) && n.onOpenToggle(), l.key === "ArrowDown" && n.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(l.key) && l.preventDefault());
        })
      })
    ) }));
  }
);
C.displayName = S;
var ie = "DropdownMenuPortal", P = (e) => {
  const t = e, { __scopeDropdownMenu: o } = t, r = u(t, ["__scopeDropdownMenu"]), a = c(o);
  return /* @__PURE__ */ s(X, d(d({}, a), r));
};
P.displayName = ie;
var y = "DropdownMenuContent", O = i.forwardRef(
  (e, o) => {
    const w = e, { __scopeDropdownMenu: r } = w, a = u(w, ["__scopeDropdownMenu"]), t = E(y, r), n = c(r), f = i.useRef(!1);
    return /* @__PURE__ */ s(
      J,
      p(d(d({
        id: t.contentId,
        "aria-labelledby": t.triggerId
      }, n), a), {
        ref: o,
        onCloseAutoFocus: _(e.onCloseAutoFocus, (l) => {
          var m;
          f.current || (m = t.triggerRef.current) == null || m.focus(), f.current = !1, l.preventDefault();
        }),
        onInteractOutside: _(e.onInteractOutside, (l) => {
          const m = l.detail.originalEvent, v = m.button === 0 && m.ctrlKey === !0, g = m.button === 2 || v;
          (!t.modal || g) && (f.current = !0);
        }),
        style: p(d({}, e.style), {
          "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
          "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
          "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
          "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
          "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
        })
      })
    );
  }
);
O.displayName = y;
var ue = "DropdownMenuGroup", ce = i.forwardRef(
  (e, o) => {
    const n = e, { __scopeDropdownMenu: r } = n, a = u(n, ["__scopeDropdownMenu"]), t = c(r);
    return /* @__PURE__ */ s(Y, p(d(d({}, t), a), { ref: o }));
  }
);
ce.displayName = ue;
var le = "DropdownMenuLabel", we = i.forwardRef(
  (e, o) => {
    const n = e, { __scopeDropdownMenu: r } = n, a = u(n, ["__scopeDropdownMenu"]), t = c(r);
    return /* @__PURE__ */ s(Z, p(d(d({}, t), a), { ref: o }));
  }
);
we.displayName = le;
var me = "DropdownMenuItem", T = i.forwardRef(
  (e, o) => {
    const n = e, { __scopeDropdownMenu: r } = n, a = u(n, ["__scopeDropdownMenu"]), t = c(r);
    return /* @__PURE__ */ s(Q, p(d(d({}, t), a), { ref: o }));
  }
);
T.displayName = me;
var fe = "DropdownMenuCheckboxItem", Me = i.forwardRef((e, o) => {
  const n = e, { __scopeDropdownMenu: r } = n, a = u(n, ["__scopeDropdownMenu"]), t = c(r);
  return /* @__PURE__ */ s(ee, p(d(d({}, t), a), { ref: o }));
});
Me.displayName = fe;
var ge = "DropdownMenuRadioGroup", ve = i.forwardRef((e, o) => {
  const n = e, { __scopeDropdownMenu: r } = n, a = u(n, ["__scopeDropdownMenu"]), t = c(r);
  return /* @__PURE__ */ s(oe, p(d(d({}, t), a), { ref: o }));
});
ve.displayName = ge;
var De = "DropdownMenuRadioItem", _e = i.forwardRef((e, o) => {
  const n = e, { __scopeDropdownMenu: r } = n, a = u(n, ["__scopeDropdownMenu"]), t = c(r);
  return /* @__PURE__ */ s(re, p(d(d({}, t), a), { ref: o }));
});
_e.displayName = De;
var he = "DropdownMenuItemIndicator", xe = i.forwardRef((e, o) => {
  const n = e, { __scopeDropdownMenu: r } = n, a = u(n, ["__scopeDropdownMenu"]), t = c(r);
  return /* @__PURE__ */ s(ne, p(d(d({}, t), a), { ref: o }));
});
xe.displayName = he;
var Re = "DropdownMenuSeparator", Ie = i.forwardRef((e, o) => {
  const n = e, { __scopeDropdownMenu: r } = n, a = u(n, ["__scopeDropdownMenu"]), t = c(r);
  return /* @__PURE__ */ s(ae, p(d(d({}, t), a), { ref: o }));
});
Ie.displayName = Re;
var be = "DropdownMenuArrow", G = i.forwardRef(
  (e, o) => {
    const n = e, { __scopeDropdownMenu: r } = n, a = u(n, ["__scopeDropdownMenu"]), t = c(r);
    return /* @__PURE__ */ s(V, p(d(d({}, t), a), { ref: o }));
  }
);
G.displayName = be;
var Ne = "DropdownMenuSubTrigger", Ee = i.forwardRef((e, o) => {
  const n = e, { __scopeDropdownMenu: r } = n, a = u(n, ["__scopeDropdownMenu"]), t = c(r);
  return /* @__PURE__ */ s(te, p(d(d({}, t), a), { ref: o }));
});
Ee.displayName = Ne;
var Ae = "DropdownMenuSubContent", Se = i.forwardRef((e, o) => {
  const n = e, { __scopeDropdownMenu: r } = n, a = u(n, ["__scopeDropdownMenu"]), t = c(r);
  return /* @__PURE__ */ s(
    de,
    p(d(d({}, t), a), {
      ref: o,
      style: p(d({}, e.style), {
        "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
        "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
        "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
        "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
        "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
      })
    })
  );
});
Se.displayName = Ae;
var Ge = A, ke = C, Le = P, We = O, Be = T, Ke = G;
const M = {
  xs: 480,
  sm: 640,
  md: 768,
  lg: 1024,
  xl: 1280,
  xl2: 1441,
  xxl: 1536,
  "2xl": 1536
};
Object.fromEntries(
  Object.entries(M).map(([e, o]) => [e, `${o}px`])
);
const Ue = () => {
  const [e, o] = K(
    typeof window != "undefined" ? window.innerWidth : 0
  );
  return U(() => {
    const r = () => o(window.innerWidth);
    return window.addEventListener("resize", r), () => window.removeEventListener("resize", r);
  }, []), {
    width: e,
    sm: e >= M.sm,
    md: e >= M.md,
    lg: e >= M.lg,
    xl: e >= M.xl,
    xxl: e >= M.xxl,
    "2xl": e >= M["2xl"]
  };
};
export {
  Ke as A,
  We as C,
  Be as I,
  Le as P,
  Ge as R,
  ke as T,
  Ue as u
};
