import { D as _root_default, S as isObject_default } from "./_baseFor-BGiY-cm1.js";
import { t as isSymbol_default } from "./isSymbol-BvIfMnn6.js";
var reWhitespace = /\s/;
function trimmedEndIndex(e) {
  for (var m = e.length; m-- && reWhitespace.test(e.charAt(m)); ) ;
  return m;
}
var _trimmedEndIndex_default = trimmedEndIndex, reTrimStart = /^\s+/;
function baseTrim(e) {
  return e && e.slice(0, _trimmedEndIndex_default(e) + 1).replace(reTrimStart, "");
}
var _baseTrim_default = baseTrim, NAN = NaN, reIsBadHex = /^[-+]0x[0-9a-f]+$/i, reIsBinary = /^0b[01]+$/i, reIsOctal = /^0o[0-7]+$/i, freeParseInt = parseInt;
function toNumber(e) {
  if (typeof e == "number") return e;
  if (isSymbol_default(e)) return NAN;
  if (isObject_default(e)) {
    var h = typeof e.valueOf == "function" ? e.valueOf() : e;
    e = isObject_default(h) ? h + "" : h;
  }
  if (typeof e != "string") return e === 0 ? e : +e;
  e = _baseTrim_default(e);
  var g = reIsBinary.test(e);
  return g || reIsOctal.test(e) ? freeParseInt(e.slice(2), g ? 2 : 8) : reIsBadHex.test(e) ? NAN : +e;
}
var toNumber_default = toNumber, now_default = function() {
  return _root_default.Date.now();
};
export {
  toNumber_default as n,
  now_default as t
};
