import { o as arrayShallowEquals } from "./arrays-CldYf7p7.js";
function once(e) {
  let t, n = false;
  return function(...r) {
    return n || (n = true, t = e.apply(this, r)), t;
  };
}
function memoizeLastValue(t) {
  let n, r, i, a = false;
  return function(...o) {
    if (r === void 0 || !arrayShallowEquals(o, r)) {
      try {
        n = t.apply(this, o), a = false, i = void 0;
      } catch (e) {
        a = true, i = e;
      }
      r = o;
    }
    if (a) throw i;
    return n;
  };
}
export {
  once as n,
  memoizeLastValue as t
};
