"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const _commonjsHelpers = require("../../../../../_virtual/_commonjsHelpers.js");
const debounce$1 = require("./debounce.js");
const isObject$1 = require("./isObject.js");
var debounce = debounce$1.debounce_1, isObject = isObject$1.isObject_1;
var FUNC_ERROR_TEXT = "Expected a function";
function throttle(func, wait, options) {
  var leading = true, trailing = true;
  if (typeof func != "function") {
    throw new TypeError(FUNC_ERROR_TEXT);
  }
  if (isObject(options)) {
    leading = "leading" in options ? !!options.leading : leading;
    trailing = "trailing" in options ? !!options.trailing : trailing;
  }
  return debounce(func, wait, {
    "leading": leading,
    "maxWait": wait,
    "trailing": trailing
  });
}
var throttle_1 = throttle;
const throttle$1 = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(throttle_1);
exports.default = throttle$1;
