functioni(e, a) {
let l = !1, n, t;
returnfunction(...o) {
l ? (clearTimeout(n), n = setTimeout(() => {
Date.now() - t >= a && (e.apply(this, o), t = Date.now());
}, Math.max(a - (Date.now() - t), 0))) : (e.apply(this, o), t = Date.now(), l = !0);
};
}
export {
i as throttle
};