"use strict";
const _Stack = require("./_Stack.js");
const _assignMergeValue = require("./_assignMergeValue.js");
const _baseFor = require("./_baseFor.js");
const _baseMergeDeep = require("./_baseMergeDeep.js");
const isObject$1 = require("./isObject.js");
const keysIn$1 = require("./keysIn.js");
const _safeGet = require("./_safeGet.js");
var Stack = _Stack, assignMergeValue = _assignMergeValue, baseFor = _baseFor, baseMergeDeep = _baseMergeDeep, isObject = isObject$1, keysIn = keysIn$1, safeGet = _safeGet;
function baseMerge(object, source, srcIndex, customizer, stack) {
  if (object === source) {
    return;
  }
  baseFor(source, function(srcValue, key) {
    stack || (stack = new Stack());
    if (isObject(srcValue)) {
      baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
    } else {
      var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : void 0;
      if (newValue === void 0) {
        newValue = srcValue;
      }
      assignMergeValue(object, key, newValue);
    }
  }, keysIn);
}
var _baseMerge = baseMerge;
module.exports = _baseMerge;
//# sourceMappingURL=_baseMerge.js.map
