"use client";
import { __exports as c } from "../../../../../_virtual/debounce.js";
import { __require as _ } from "../../function/debounce.js";
var d;
function q() {
  return d ? c : (d = 1, (function(l) {
    Object.defineProperty(l, Symbol.toStringTag, { value: "Module" });
    const s = /* @__PURE__ */ _();
    function b(a, p = 0, r = {}) {
      typeof r != "object" && (r = {});
      const { leading: h = !1, trailing: g = !0, maxWait: f } = r, i = Array(2);
      h && (i[0] = "leading"), g && (i[1] = "trailing");
      let e, n = null;
      const t = s.debounce(function(...u) {
        e = a.apply(this, u), n = null;
      }, p, { edges: i }), o = function(...u) {
        return f != null && (n === null && (n = Date.now()), Date.now() - n >= f) ? (e = a.apply(this, u), n = Date.now(), t.cancel(), t.schedule(), e) : (t.apply(this, u), e);
      }, y = () => (t.flush(), e);
      return o.cancel = t.cancel, o.flush = y, o;
    }
    l.debounce = b;
  })(c), c);
}
export {
  q as __require
};
