import { commonjsGlobal as g } from "../../../../../_virtual/_commonjsHelpers.js";
var h, L;
function Y() {
  if (L) return h;
  L = 1;
  var _ = "Expected a function", x = NaN, C = "[object Symbol]", M = /^\s+|\s+$/g, N = /^[-+]0x[0-9a-f]+$/i, R = /^0b[01]+$/i, W = /^0o[0-7]+$/i, $ = parseInt, q = typeof g == "object" && g && g.Object === Object && g, A = typeof self == "object" && self && self.Object === Object && self, B = q || A || Function("return this")(), F = Object.prototype, G = F.toString, P = Math.max, D = Math.min, y = function() {
    return B.Date.now();
  };
  function H(e, r, i) {
    var a, u, b, c, t, f, s = 0, O = !1, d = !1, j = !0;
    if (typeof e != "function")
      throw new TypeError(_);
    r = I(r) || 0, p(i) && (O = !!i.leading, d = "maxWait" in i, b = d ? P(I(i.maxWait) || 0, r) : b, j = "trailing" in i ? !!i.trailing : j);
    function v(n) {
      var o = a, m = u;
      return a = u = void 0, s = n, c = e.apply(m, o), c;
    }
    function z(n) {
      return s = n, t = setTimeout(l, r), O ? v(n) : c;
    }
    function J(n) {
      var o = n - f, m = n - s, E = r - o;
      return d ? D(E, b - m) : E;
    }
    function S(n) {
      var o = n - f, m = n - s;
      return f === void 0 || o >= r || o < 0 || d && m >= b;
    }
    function l() {
      var n = y();
      if (S(n))
        return k(n);
      t = setTimeout(l, J(n));
    }
    function k(n) {
      return t = void 0, j && a ? v(n) : (a = u = void 0, c);
    }
    function K() {
      t !== void 0 && clearTimeout(t), s = 0, a = f = u = t = void 0;
    }
    function Q() {
      return t === void 0 ? c : k(y());
    }
    function T() {
      var n = y(), o = S(n);
      if (a = arguments, u = this, f = n, o) {
        if (t === void 0)
          return z(f);
        if (d)
          return t = setTimeout(l, r), v(f);
      }
      return t === void 0 && (t = setTimeout(l, r)), c;
    }
    return T.cancel = K, T.flush = Q, T;
  }
  function p(e) {
    var r = typeof e;
    return !!e && (r == "object" || r == "function");
  }
  function U(e) {
    return !!e && typeof e == "object";
  }
  function X(e) {
    return typeof e == "symbol" || U(e) && G.call(e) == C;
  }
  function I(e) {
    if (typeof e == "number")
      return e;
    if (X(e))
      return x;
    if (p(e)) {
      var r = typeof e.valueOf == "function" ? e.valueOf() : e;
      e = p(r) ? r + "" : r;
    }
    if (typeof e != "string")
      return e === 0 ? e : +e;
    e = e.replace(M, "");
    var i = R.test(e);
    return i || W.test(e) ? $(e.slice(2), i ? 2 : 8) : N.test(e) ? x : +e;
  }
  return h = H, h;
}
export {
  Y as __require
};
//# sourceMappingURL=index.js.map
