import { isJsonEqual as i, deepClone as r } from "@milaboratories/helpers";
import { ref as c, watch as p, computed as l } from "vue";
function v(o) {
  let u, f;
  typeof o == "function" ? u = o : (u = o.get, f = o.set);
  const e = c(u());
  return p(
    u,
    (t) => {
      i(t, e.value) || (e.value = r(t));
    },
    { deep: !0 }
  ), f ? l({
    get: () => e.value,
    set: (t) => {
      i(t, e.value) || (e.value = t, f(t));
    }
  }) : l(() => e.value);
}
export {
  v as computedCached
};
//# sourceMappingURL=computedCached.js.map
