import { _ as _baseIsEqual } from './_baseIsEqual.js';
import { g as get_1 } from './get.js';
import { h as hasIn_1 } from './hasIn.js';
import { _ as _isKey } from './_isKey.js';
import { _ as _isStrictComparable } from './_isStrictComparable.js';
import { _ as _matchesStrictComparable } from './_matchesStrictComparable.js';
import { _ as _toKey } from './_toKey.js';

var baseIsEqual = _baseIsEqual,
    get = get_1,
    hasIn = hasIn_1,
    isKey = _isKey,
    isStrictComparable = _isStrictComparable,
    matchesStrictComparable = _matchesStrictComparable,
    toKey = _toKey;

/** Used to compose bitmasks for value comparisons. */
var COMPARE_PARTIAL_FLAG = 1,
    COMPARE_UNORDERED_FLAG = 2;

/**
 * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
 *
 * @private
 * @param {string} path The path of the property to get.
 * @param {*} srcValue The value to match.
 * @returns {Function} Returns the new spec function.
 */
function baseMatchesProperty(path, srcValue) {
  if (isKey(path) && isStrictComparable(srcValue)) {
    return matchesStrictComparable(toKey(path), srcValue);
  }
  return function(object) {
    var objValue = get(object, path);
    return (objValue === undefined && objValue === srcValue)
      ? hasIn(object, path)
      : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
  };
}

var _baseMatchesProperty = baseMatchesProperty;

export { _baseMatchesProperty as _ };
//# sourceMappingURL=_baseMatchesProperty.js.map
