import { O as _assignValue_default, j as _isIndex_default, z as isObject_default } from "./isArrayLikeObject-LXbTYiBa.js";
import { c as _castPath_default, o as _baseGet_default, r as _baseFlatten_default, s as _toKey_default } from "./hasIn-DnfJcYpY.js";
import { t as toNumber_default } from "./toNumber-55tjPCWr.js";
var INFINITY = Infinity, MAX_INTEGER = 17976931348623157e292;
function toFinite(e) {
  return e ? (e = toNumber_default(e), e === INFINITY || e === -INFINITY ? (e < 0 ? -1 : 1) * MAX_INTEGER : e === e ? e : 0) : e === 0 ? e : 0;
}
var toFinite_default = toFinite;
function flatten(e) {
  return e != null && e.length ? _baseFlatten_default(e, 1) : [];
}
var flatten_default = flatten;
function baseSet(o, s, l, u) {
  if (!isObject_default(o)) return o;
  s = _castPath_default(s, o);
  for (var d = -1, f = s.length, p = f - 1, m = o; m != null && ++d < f; ) {
    var h = _toKey_default(s[d]), g = l;
    if (h === "__proto__" || h === "constructor" || h === "prototype") return o;
    if (d != p) {
      var _ = m[h];
      g = u ? u(_, h, m) : void 0, g === void 0 && (g = isObject_default(_) ? _ : _isIndex_default(s[d + 1]) ? [] : {});
    }
    _assignValue_default(m, h, g), m = m[h];
  }
  return o;
}
var _baseSet_default = baseSet;
function basePickBy(e, i, a) {
  for (var s = -1, c = i.length, l = {}; ++s < c; ) {
    var u = i[s], d = _baseGet_default(e, u);
    a(d, u) && _baseSet_default(l, _castPath_default(u, e), d);
  }
  return l;
}
var _basePickBy_default = basePickBy;
export {
  toFinite_default as i,
  _baseSet_default as n,
  flatten_default as r,
  _basePickBy_default as t
};
