"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const s = Object.prototype.toString, g = Object.prototype.hasOwnProperty;
function d(n) {
  return n === void 0;
}
function w(n) {
  return n !== void 0;
}
function O(n) {
  return n == null;
}
function p(n) {
  return s.call(n) === "[object Array]";
}
function E(n) {
  return s.call(n) === "[object Object]";
}
function P(n) {
  return s.call(n) === "[object Number]";
}
function F(n) {
  const t = s.call(n);
  return t === "[object Function]" || t === "[object AsyncFunction]" || t === "[object GeneratorFunction]" || t === "[object AsyncGeneratorFunction]" || t === "[object Proxy]";
}
function S(n) {
  return s.call(n) === "[object String]";
}
function N(n, t) {
  return g.call(n, t);
}
function _(n, t) {
  const e = h(t);
  let u;
  return o(n, function(r, i) {
    if (e(r, i))
      return u = r, false;
  }), u;
}
function K(n, t) {
  const e = h(t);
  let u = p(n) ? -1 : void 0;
  return o(n, function(r, i) {
    if (e(r, i))
      return u = i, false;
  }), u;
}
function v(n, t) {
  const e = h(t);
  let u = [];
  return o(n, function(r, i) {
    e(r, i) && u.push(r);
  }), u;
}
function o(n, t) {
  let e, u;
  if (d(n))
    return;
  const r = p(n) ? D : A;
  for (let i in n)
    if (N(n, i) && (e = n[i], u = t(e, r(i)), u === false))
      return e;
}
function x(n, t, e) {
  return o(n, function(u, r) {
    e = t(e, u, r);
  }), e;
}
function T(n, t) {
  return !!x(n, function(e, u, r) {
    return e && t(u, r);
  }, true);
}
function G(n, t) {
  return !!_(n, t);
}
function H(n, t) {
  let e = [];
  return o(n, function(u, r) {
    e.push(t(u, r));
  }), e;
}
function I(n) {
  return function(t) {
    return T(n, function(e, u) {
      return t[u] === e;
    });
  };
}
function h(n) {
  return F(n) ? n : (t) => t === n;
}
function A(n) {
  return n;
}
function D(n) {
  return Number(n);
}
function M(n, t) {
  let e, u, r, i;
  function c(l) {
    let y = Date.now(), j = l ? 0 : i + t - y;
    if (j > 0)
      return f(j);
    n.apply(r, u), a();
  }
  function f(l) {
    e = setTimeout(c, l);
  }
  function a() {
    e && clearTimeout(e), e = i = u = r = void 0;
  }
  function m() {
    e && c(true), a();
  }
  function b(...l) {
    i = Date.now(), u = l, r = this, e || f(t);
  }
  return b.flush = m, b.cancel = a, b;
}
function U(n, t) {
  return n.bind(t);
}
function q(n, ...t) {
  return Object.assign(n, ...t);
}
function z(n, t, e) {
  let u = n;
  return o(t, function(r, i) {
    if (typeof r != "number" && typeof r != "string")
      throw new Error("illegal key type: " + typeof r + ". Key should be of type number or string.");
    if (r === "constructor")
      throw new Error("illegal key: constructor");
    if (r === "__proto__")
      throw new Error("illegal key: __proto__");
    let c = t[i + 1], f = u[r];
    w(c) && O(f) && (f = u[r] = isNaN(+c) ? {} : []), d(c) ? d(e) ? delete u[r] : u[r] = e : u = f;
  }), n;
}
function B(n, t) {
  let e = {}, u = Object(n);
  return o(t, function(r) {
    r in u && (e[r] = n[r]);
  }), e;
}
function C(n, t) {
  let e = {}, u = Object(n);
  return o(u, function(r, i) {
    t.indexOf(i) === -1 && (e[i] = r);
  }), e;
}
exports.assign = q;
exports.bind = U;
exports.debounce = M;
exports.every = T;
exports.filter = v;
exports.find = _;
exports.findIndex = K;
exports.forEach = o;
exports.has = N;
exports.isArray = p;
exports.isDefined = w;
exports.isFunction = F;
exports.isNil = O;
exports.isNumber = P;
exports.isObject = E;
exports.isString = S;
exports.isUndefined = d;
exports.map = H;
exports.matchPattern = I;
exports.omit = C;
exports.pick = B;
exports.reduce = x;
exports.set = z;
exports.some = G;
