import e from "./isObject.js";
import t from "./_Stack.js";
import n from "./_cloneBuffer.js";
import r from "./_copyArray.js";
import i from "./_initCloneObject.js";
import a from "./isArray.js";
import o from "./isBuffer.js";
import s from "./_assignValue.js";
import c from "./keysIn.js";
import l from "./_getTag.js";
import u from "./keys.js";
import d from "./_getAllKeys.js";
import f from "./_arrayEach.js";
import p from "./_baseAssign.js";
import m from "./_baseAssignIn.js";
import h from "./_copySymbols.js";
import g from "./_copySymbolsIn.js";
import _ from "./_getAllKeysIn.js";
import v from "./_initCloneArray.js";
import y from "./_initCloneByTag.js";
import b from "./isMap.js";
import x from "./isSet.js";
//#region ../../node_modules/lodash-es/_baseClone.js
var S = 1, C = 2, w = 4, T = "[object Arguments]", E = "[object Array]", D = "[object Boolean]", O = "[object Date]", k = "[object Error]", A = "[object Function]", j = "[object GeneratorFunction]", M = "[object Map]", N = "[object Number]", P = "[object Object]", F = "[object RegExp]", I = "[object Set]", L = "[object String]", R = "[object Symbol]", z = "[object WeakMap]", B = "[object ArrayBuffer]", V = "[object DataView]", H = "[object Float32Array]", U = "[object Float64Array]", W = "[object Int8Array]", G = "[object Int16Array]", K = "[object Int32Array]", q = "[object Uint8Array]", J = "[object Uint8ClampedArray]", Y = "[object Uint16Array]", X = "[object Uint32Array]", Z = {};
Z[T] = Z[E] = Z[B] = Z[V] = Z[D] = Z[O] = Z[H] = Z[U] = Z[W] = Z[G] = Z[K] = Z[M] = Z[N] = Z[P] = Z[F] = Z[I] = Z[L] = Z[R] = Z[q] = Z[J] = Z[Y] = Z[X] = !0, Z[k] = Z[A] = Z[z] = !1;
function Q(E, D, O, k, M, N) {
	var F, I = D & S, L = D & C, R = D & w;
	if (O && (F = M ? O(E, k, M, N) : O(E)), F !== void 0) return F;
	if (!e(E)) return E;
	var z = a(E);
	if (z) {
		if (F = v(E), !I) return r(E, F);
	} else {
		var B = l(E), V = B == A || B == j;
		if (o(E)) return n(E, I);
		if (B == P || B == T || V && !M) {
			if (F = L || V ? {} : i(E), !I) return L ? g(E, m(F, E)) : h(E, p(F, E));
		} else {
			if (!Z[B]) return M ? E : {};
			F = y(E, B, I);
		}
	}
	N ||= new t();
	var H = N.get(E);
	if (H) return H;
	N.set(E, F), x(E) ? E.forEach(function(e) {
		F.add(Q(e, D, O, e, E, N));
	}) : b(E) && E.forEach(function(e, t) {
		F.set(t, Q(e, D, O, t, E, N));
	});
	var U = z ? void 0 : (R ? L ? _ : d : L ? c : u)(E);
	return f(U || E, function(e, t) {
		U && (t = e, e = E[t]), s(F, t, Q(e, D, O, t, E, N));
	}), F;
}
//#endregion
export { Q as default };
