import d from "./_assignMergeValue.mjs";
import V from "./_cloneBuffer.mjs";
import j from "./_cloneTypedArray.mjs";
import y from "./_copyArray.mjs";
import c from "./_initCloneObject.mjs";
import g from "./isArguments.mjs";
import O from "./isArray.mjs";
import C from "./isArrayLikeObject.mjs";
import M from "./isBuffer.mjs";
import P from "./isFunction.mjs";
import w from "./isObject.mjs";
import x from "./isPlainObject.mjs";
import D from "./isTypedArray.mjs";
import b from "./_safeGet.mjs";
import F from "./toPlainObject.mjs";
function U(t, p, o, v, A, l, f) {
  var i = b(t, o), e = b(p, o), s = f.get(e);
  if (s) {
    d(t, o, s);
    return;
  }
  var r = l ? l(i, e, o + "", t, p, f) : void 0, m = r === void 0;
  if (m) {
    var a = O(e), n = !a && M(e), u = !a && !n && D(e);
    r = e, a || n || u ? O(i) ? r = i : C(i) ? r = y(i) : n ? (m = !1, r = V(e, !0)) : u ? (m = !1, r = j(e, !0)) : r = [] : x(e) || g(e) ? (r = i, g(i) ? r = F(i) : (!w(i) || P(i)) && (r = c(e))) : m = !1;
  }
  m && (f.set(e, r), A(r, e, v, l, f), f.delete(e)), d(t, o, r);
}
export {
  U as default
};
