"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const _Stack = require("./_Stack.js");
const _assignMergeValue = require("./_assignMergeValue.js");
const _baseFor = require("./_baseFor.js");
const _baseMergeDeep = require("./_baseMergeDeep.js");
const isObject = require("./isObject.js");
const keysIn = require("./keysIn.js");
const _safeGet = require("./_safeGet.js");
function baseMerge(object, source, srcIndex, customizer, stack) {
  if (object === source) {
    return;
  }
  _baseFor.default(source, function(srcValue, key) {
    stack || (stack = new _Stack.default());
    if (isObject.default(srcValue)) {
      _baseMergeDeep.default(object, source, key, srcIndex, baseMerge, customizer, stack);
    } else {
      var newValue = customizer ? customizer(_safeGet.default(object, key), srcValue, key + "", object, source, stack) : void 0;
      if (newValue === void 0) {
        newValue = srcValue;
      }
      _assignMergeValue.default(object, key, newValue);
    }
  }, keysIn.default);
}
exports.default = baseMerge;
