"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.debounce = void 0;
const debounce = function (func) {
  let delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 60;
  let timeoutId;
  return function () {
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    const context = this;
    clearTimeout(timeoutId);
    timeoutId = setTimeout(() => {
      func.apply(context, args);
    }, delay);
  };
};
exports.debounce = debounce;
//# sourceMappingURL=debounce.js.map