import _Stack_default from "./_Stack.js";
import _baseIsEqual_default from "./_baseIsEqual.js";
var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
function baseIsMatch(i, a, o, s) {
	var c = o.length, l = c, u = !s;
	if (i == null) return !l;
	for (i = Object(i); c--;) {
		var d = o[c];
		if (u && d[2] ? d[1] !== i[d[0]] : !(d[0] in i)) return !1;
	}
	for (; ++c < l;) {
		d = o[c];
		var f = d[0], p = i[f], m = d[1];
		if (u && d[2]) {
			if (p === void 0 && !(f in i)) return !1;
		} else {
			var h = new _Stack_default();
			if (s) var g = s(p, m, f, i, a, h);
			if (!(g === void 0 ? _baseIsEqual_default(m, p, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, s, h) : g)) return !1;
		}
	}
	return !0;
}
var _baseIsMatch_default = baseIsMatch;
export { _baseIsMatch_default as default };
