@forbespro/lead-agent
Version:
Lead Chat Agent React Component
19 lines (18 loc) • 512 B
JavaScript
import { getDefaultExportFromCjs as s } from "./index31.js";
function p(t, i) {
if (typeof t != "function")
throw new TypeError(`Expected the first argument to be a \`function\`, got \`${typeof t}\`.`);
let o, e = 0;
return function(...l) {
clearTimeout(o);
const r = Date.now(), n = r - e, a = i - n;
a <= 0 ? (e = r, t.apply(this, l)) : o = setTimeout(() => {
e = Date.now(), t.apply(this, l);
}, a);
};
}
var c = p;
const m = /* @__PURE__ */ s(c);
export {
m as default
};