PageRenderTime 121ms CodeModel.GetById 24ms app.highlight 66ms RepoModel.GetById 1ms app.codeStats 3ms

/node_modules/lodash/lodash.js

https://bitbucket.org/coleman333/smartsite
JavaScript | 15698 lines | 14574 code | 93 blank | 1031 comment | 91 complexity | a08a27a72d5c5e36583e6aef1e72642b MD5 | raw file

Large files files are truncated, but you can click here to view the full file

   1/**
   2 * @license
   3 * Lodash <https://lodash.com/>
   4 * Copyright JS Foundation and other contributors <https://js.foundation/>
   5 * Released under MIT license <https://lodash.com/license>
   6 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
   7 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
   8 */
   9;(function() {
  10
  11  /** Used as a safe reference for `undefined` in pre-ES5 environments. */
  12  var undefined;
  13
  14  /** Used as the semantic version number. */
  15  var VERSION = '4.17.5';
  16
  17  /** Used as the size to enable large array optimizations. */
  18  var LARGE_ARRAY_SIZE = 200;
  19
  20  /** Error message constants. */
  21  var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
  22      FUNC_ERROR_TEXT = 'Expected a function';
  23
  24  /** Used to stand-in for `undefined` hash values. */
  25  var HASH_UNDEFINED = '__lodash_hash_undefined__';
  26
  27  /** Used as the maximum memoize cache size. */
  28  var MAX_MEMOIZE_SIZE = 500;
  29
  30  /** Used as the internal argument placeholder. */
  31  var PLACEHOLDER = '__lodash_placeholder__';
  32
  33  /** Used to compose bitmasks for cloning. */
  34  var CLONE_DEEP_FLAG = 1,
  35      CLONE_FLAT_FLAG = 2,
  36      CLONE_SYMBOLS_FLAG = 4;
  37
  38  /** Used to compose bitmasks for value comparisons. */
  39  var COMPARE_PARTIAL_FLAG = 1,
  40      COMPARE_UNORDERED_FLAG = 2;
  41
  42  /** Used to compose bitmasks for function metadata. */
  43  var WRAP_BIND_FLAG = 1,
  44      WRAP_BIND_KEY_FLAG = 2,
  45      WRAP_CURRY_BOUND_FLAG = 4,
  46      WRAP_CURRY_FLAG = 8,
  47      WRAP_CURRY_RIGHT_FLAG = 16,
  48      WRAP_PARTIAL_FLAG = 32,
  49      WRAP_PARTIAL_RIGHT_FLAG = 64,
  50      WRAP_ARY_FLAG = 128,
  51      WRAP_REARG_FLAG = 256,
  52      WRAP_FLIP_FLAG = 512;
  53
  54  /** Used as default options for `_.truncate`. */
  55  var DEFAULT_TRUNC_LENGTH = 30,
  56      DEFAULT_TRUNC_OMISSION = '...';
  57
  58  /** Used to detect hot functions by number of calls within a span of milliseconds. */
  59  var HOT_COUNT = 800,
  60      HOT_SPAN = 16;
  61
  62  /** Used to indicate the type of lazy iteratees. */
  63  var LAZY_FILTER_FLAG = 1,
  64      LAZY_MAP_FLAG = 2,
  65      LAZY_WHILE_FLAG = 3;
  66
  67  /** Used as references for various `Number` constants. */
  68  var INFINITY = 1 / 0,
  69      MAX_SAFE_INTEGER = 9007199254740991,
  70      MAX_INTEGER = 1.7976931348623157e+308,
  71      NAN = 0 / 0;
  72
  73  /** Used as references for the maximum length and index of an array. */
  74  var MAX_ARRAY_LENGTH = 4294967295,
  75      MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
  76      HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
  77
  78  /** Used to associate wrap methods with their bit flags. */
  79  var wrapFlags = [
  80    ['ary', WRAP_ARY_FLAG],
  81    ['bind', WRAP_BIND_FLAG],
  82    ['bindKey', WRAP_BIND_KEY_FLAG],
  83    ['curry', WRAP_CURRY_FLAG],
  84    ['curryRight', WRAP_CURRY_RIGHT_FLAG],
  85    ['flip', WRAP_FLIP_FLAG],
  86    ['partial', WRAP_PARTIAL_FLAG],
  87    ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
  88    ['rearg', WRAP_REARG_FLAG]
  89  ];
  90
  91  /** `Object#toString` result references. */
  92  var argsTag = '[object Arguments]',
  93      arrayTag = '[object Array]',
  94      asyncTag = '[object AsyncFunction]',
  95      boolTag = '[object Boolean]',
  96      dateTag = '[object Date]',
  97      domExcTag = '[object DOMException]',
  98      errorTag = '[object Error]',
  99      funcTag = '[object Function]',
 100      genTag = '[object GeneratorFunction]',
 101      mapTag = '[object Map]',
 102      numberTag = '[object Number]',
 103      nullTag = '[object Null]',
 104      objectTag = '[object Object]',
 105      promiseTag = '[object Promise]',
 106      proxyTag = '[object Proxy]',
 107      regexpTag = '[object RegExp]',
 108      setTag = '[object Set]',
 109      stringTag = '[object String]',
 110      symbolTag = '[object Symbol]',
 111      undefinedTag = '[object Undefined]',
 112      weakMapTag = '[object WeakMap]',
 113      weakSetTag = '[object WeakSet]';
 114
 115  var arrayBufferTag = '[object ArrayBuffer]',
 116      dataViewTag = '[object DataView]',
 117      float32Tag = '[object Float32Array]',
 118      float64Tag = '[object Float64Array]',
 119      int8Tag = '[object Int8Array]',
 120      int16Tag = '[object Int16Array]',
 121      int32Tag = '[object Int32Array]',
 122      uint8Tag = '[object Uint8Array]',
 123      uint8ClampedTag = '[object Uint8ClampedArray]',
 124      uint16Tag = '[object Uint16Array]',
 125      uint32Tag = '[object Uint32Array]';
 126
 127  /** Used to match empty string literals in compiled template source. */
 128  var reEmptyStringLeading = /\b__p \+= '';/g,
 129      reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
 130      reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
 131
 132  /** Used to match HTML entities and HTML characters. */
 133  var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
 134      reUnescapedHtml = /[&<>"']/g,
 135      reHasEscapedHtml = RegExp(reEscapedHtml.source),
 136      reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
 137
 138  /** Used to match template delimiters. */
 139  var reEscape = /<%-([\s\S]+?)%>/g,
 140      reEvaluate = /<%([\s\S]+?)%>/g,
 141      reInterpolate = /<%=([\s\S]+?)%>/g;
 142
 143  /** Used to match property names within property paths. */
 144  var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
 145      reIsPlainProp = /^\w*$/,
 146      rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
 147
 148  /**
 149   * Used to match `RegExp`
 150   * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
 151   */
 152  var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
 153      reHasRegExpChar = RegExp(reRegExpChar.source);
 154
 155  /** Used to match leading and trailing whitespace. */
 156  var reTrim = /^\s+|\s+$/g,
 157      reTrimStart = /^\s+/,
 158      reTrimEnd = /\s+$/;
 159
 160  /** Used to match wrap detail comments. */
 161  var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
 162      reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
 163      reSplitDetails = /,? & /;
 164
 165  /** Used to match words composed of alphanumeric characters. */
 166  var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
 167
 168  /** Used to match backslashes in property paths. */
 169  var reEscapeChar = /\\(\\)?/g;
 170
 171  /**
 172   * Used to match
 173   * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
 174   */
 175  var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
 176
 177  /** Used to match `RegExp` flags from their coerced string values. */
 178  var reFlags = /\w*$/;
 179
 180  /** Used to detect bad signed hexadecimal string values. */
 181  var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
 182
 183  /** Used to detect binary string values. */
 184  var reIsBinary = /^0b[01]+$/i;
 185
 186  /** Used to detect host constructors (Safari). */
 187  var reIsHostCtor = /^\[object .+?Constructor\]$/;
 188
 189  /** Used to detect octal string values. */
 190  var reIsOctal = /^0o[0-7]+$/i;
 191
 192  /** Used to detect unsigned integer values. */
 193  var reIsUint = /^(?:0|[1-9]\d*)$/;
 194
 195  /** Used to match Latin Unicode letters (excluding mathematical operators). */
 196  var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
 197
 198  /** Used to ensure capturing order of template delimiters. */
 199  var reNoMatch = /($^)/;
 200
 201  /** Used to match unescaped characters in compiled string literals. */
 202  var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
 203
 204  /** Used to compose unicode character classes. */
 205  var rsAstralRange = '\\ud800-\\udfff',
 206      rsComboMarksRange = '\\u0300-\\u036f',
 207      reComboHalfMarksRange = '\\ufe20-\\ufe2f',
 208      rsComboSymbolsRange = '\\u20d0-\\u20ff',
 209      rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
 210      rsDingbatRange = '\\u2700-\\u27bf',
 211      rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
 212      rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
 213      rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
 214      rsPunctuationRange = '\\u2000-\\u206f',
 215      rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
 216      rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
 217      rsVarRange = '\\ufe0e\\ufe0f',
 218      rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
 219
 220  /** Used to compose unicode capture groups. */
 221  var rsApos = "['\u2019]",
 222      rsAstral = '[' + rsAstralRange + ']',
 223      rsBreak = '[' + rsBreakRange + ']',
 224      rsCombo = '[' + rsComboRange + ']',
 225      rsDigits = '\\d+',
 226      rsDingbat = '[' + rsDingbatRange + ']',
 227      rsLower = '[' + rsLowerRange + ']',
 228      rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
 229      rsFitz = '\\ud83c[\\udffb-\\udfff]',
 230      rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
 231      rsNonAstral = '[^' + rsAstralRange + ']',
 232      rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
 233      rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
 234      rsUpper = '[' + rsUpperRange + ']',
 235      rsZWJ = '\\u200d';
 236
 237  /** Used to compose unicode regexes. */
 238  var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
 239      rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
 240      rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
 241      rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
 242      reOptMod = rsModifier + '?',
 243      rsOptVar = '[' + rsVarRange + ']?',
 244      rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
 245      rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
 246      rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
 247      rsSeq = rsOptVar + reOptMod + rsOptJoin,
 248      rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
 249      rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
 250
 251  /** Used to match apostrophes. */
 252  var reApos = RegExp(rsApos, 'g');
 253
 254  /**
 255   * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
 256   * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
 257   */
 258  var reComboMark = RegExp(rsCombo, 'g');
 259
 260  /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
 261  var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
 262
 263  /** Used to match complex or compound words. */
 264  var reUnicodeWord = RegExp([
 265    rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
 266    rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
 267    rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
 268    rsUpper + '+' + rsOptContrUpper,
 269    rsOrdUpper,
 270    rsOrdLower,
 271    rsDigits,
 272    rsEmoji
 273  ].join('|'), 'g');
 274
 275  /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
 276  var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange  + rsComboRange + rsVarRange + ']');
 277
 278  /** Used to detect strings that need a more robust regexp to match words. */
 279  var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
 280
 281  /** Used to assign default `context` object properties. */
 282  var contextProps = [
 283    'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
 284    'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
 285    'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
 286    'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
 287    '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
 288  ];
 289
 290  /** Used to make template sourceURLs easier to identify. */
 291  var templateCounter = -1;
 292
 293  /** Used to identify `toStringTag` values of typed arrays. */
 294  var typedArrayTags = {};
 295  typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
 296  typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
 297  typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
 298  typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
 299  typedArrayTags[uint32Tag] = true;
 300  typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
 301  typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
 302  typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
 303  typedArrayTags[errorTag] = typedArrayTags[funcTag] =
 304  typedArrayTags[mapTag] = typedArrayTags[numberTag] =
 305  typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
 306  typedArrayTags[setTag] = typedArrayTags[stringTag] =
 307  typedArrayTags[weakMapTag] = false;
 308
 309  /** Used to identify `toStringTag` values supported by `_.clone`. */
 310  var cloneableTags = {};
 311  cloneableTags[argsTag] = cloneableTags[arrayTag] =
 312  cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
 313  cloneableTags[boolTag] = cloneableTags[dateTag] =
 314  cloneableTags[float32Tag] = cloneableTags[float64Tag] =
 315  cloneableTags[int8Tag] = cloneableTags[int16Tag] =
 316  cloneableTags[int32Tag] = cloneableTags[mapTag] =
 317  cloneableTags[numberTag] = cloneableTags[objectTag] =
 318  cloneableTags[regexpTag] = cloneableTags[setTag] =
 319  cloneableTags[stringTag] = cloneableTags[symbolTag] =
 320  cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
 321  cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
 322  cloneableTags[errorTag] = cloneableTags[funcTag] =
 323  cloneableTags[weakMapTag] = false;
 324
 325  /** Used to map Latin Unicode letters to basic Latin letters. */
 326  var deburredLetters = {
 327    // Latin-1 Supplement block.
 328    '\xc0': 'A',  '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
 329    '\xe0': 'a',  '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
 330    '\xc7': 'C',  '\xe7': 'c',
 331    '\xd0': 'D',  '\xf0': 'd',
 332    '\xc8': 'E',  '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
 333    '\xe8': 'e',  '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
 334    '\xcc': 'I',  '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
 335    '\xec': 'i',  '\xed': 'i', '\xee': 'i', '\xef': 'i',
 336    '\xd1': 'N',  '\xf1': 'n',
 337    '\xd2': 'O',  '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
 338    '\xf2': 'o',  '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
 339    '\xd9': 'U',  '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
 340    '\xf9': 'u',  '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
 341    '\xdd': 'Y',  '\xfd': 'y', '\xff': 'y',
 342    '\xc6': 'Ae', '\xe6': 'ae',
 343    '\xde': 'Th', '\xfe': 'th',
 344    '\xdf': 'ss',
 345    // Latin Extended-A block.
 346    '\u0100': 'A',  '\u0102': 'A', '\u0104': 'A',
 347    '\u0101': 'a',  '\u0103': 'a', '\u0105': 'a',
 348    '\u0106': 'C',  '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
 349    '\u0107': 'c',  '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
 350    '\u010e': 'D',  '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
 351    '\u0112': 'E',  '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
 352    '\u0113': 'e',  '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
 353    '\u011c': 'G',  '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
 354    '\u011d': 'g',  '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
 355    '\u0124': 'H',  '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
 356    '\u0128': 'I',  '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
 357    '\u0129': 'i',  '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
 358    '\u0134': 'J',  '\u0135': 'j',
 359    '\u0136': 'K',  '\u0137': 'k', '\u0138': 'k',
 360    '\u0139': 'L',  '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
 361    '\u013a': 'l',  '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
 362    '\u0143': 'N',  '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
 363    '\u0144': 'n',  '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
 364    '\u014c': 'O',  '\u014e': 'O', '\u0150': 'O',
 365    '\u014d': 'o',  '\u014f': 'o', '\u0151': 'o',
 366    '\u0154': 'R',  '\u0156': 'R', '\u0158': 'R',
 367    '\u0155': 'r',  '\u0157': 'r', '\u0159': 'r',
 368    '\u015a': 'S',  '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
 369    '\u015b': 's',  '\u015d': 's', '\u015f': 's', '\u0161': 's',
 370    '\u0162': 'T',  '\u0164': 'T', '\u0166': 'T',
 371    '\u0163': 't',  '\u0165': 't', '\u0167': 't',
 372    '\u0168': 'U',  '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
 373    '\u0169': 'u',  '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
 374    '\u0174': 'W',  '\u0175': 'w',
 375    '\u0176': 'Y',  '\u0177': 'y', '\u0178': 'Y',
 376    '\u0179': 'Z',  '\u017b': 'Z', '\u017d': 'Z',
 377    '\u017a': 'z',  '\u017c': 'z', '\u017e': 'z',
 378    '\u0132': 'IJ', '\u0133': 'ij',
 379    '\u0152': 'Oe', '\u0153': 'oe',
 380    '\u0149': "'n", '\u017f': 's'
 381  };
 382
 383  /** Used to map characters to HTML entities. */
 384  var htmlEscapes = {
 385    '&': '&amp;',
 386    '<': '&lt;',
 387    '>': '&gt;',
 388    '"': '&quot;',
 389    "'": '&#39;'
 390  };
 391
 392  /** Used to map HTML entities to characters. */
 393  var htmlUnescapes = {
 394    '&amp;': '&',
 395    '&lt;': '<',
 396    '&gt;': '>',
 397    '&quot;': '"',
 398    '&#39;': "'"
 399  };
 400
 401  /** Used to escape characters for inclusion in compiled string literals. */
 402  var stringEscapes = {
 403    '\\': '\\',
 404    "'": "'",
 405    '\n': 'n',
 406    '\r': 'r',
 407    '\u2028': 'u2028',
 408    '\u2029': 'u2029'
 409  };
 410
 411  /** Built-in method references without a dependency on `root`. */
 412  var freeParseFloat = parseFloat,
 413      freeParseInt = parseInt;
 414
 415  /** Detect free variable `global` from Node.js. */
 416  var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
 417
 418  /** Detect free variable `self`. */
 419  var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
 420
 421  /** Used as a reference to the global object. */
 422  var root = freeGlobal || freeSelf || Function('return this')();
 423
 424  /** Detect free variable `exports`. */
 425  var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
 426
 427  /** Detect free variable `module`. */
 428  var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
 429
 430  /** Detect the popular CommonJS extension `module.exports`. */
 431  var moduleExports = freeModule && freeModule.exports === freeExports;
 432
 433  /** Detect free variable `process` from Node.js. */
 434  var freeProcess = moduleExports && freeGlobal.process;
 435
 436  /** Used to access faster Node.js helpers. */
 437  var nodeUtil = (function() {
 438    try {
 439      return freeProcess && freeProcess.binding && freeProcess.binding('util');
 440    } catch (e) {}
 441  }());
 442
 443  /* Node.js helper references. */
 444  var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
 445      nodeIsDate = nodeUtil && nodeUtil.isDate,
 446      nodeIsMap = nodeUtil && nodeUtil.isMap,
 447      nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
 448      nodeIsSet = nodeUtil && nodeUtil.isSet,
 449      nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
 450
 451  /*--------------------------------------------------------------------------*/
 452
 453  /**
 454   * A faster alternative to `Function#apply`, this function invokes `func`
 455   * with the `this` binding of `thisArg` and the arguments of `args`.
 456   *
 457   * @private
 458   * @param {Function} func The function to invoke.
 459   * @param {*} thisArg The `this` binding of `func`.
 460   * @param {Array} args The arguments to invoke `func` with.
 461   * @returns {*} Returns the result of `func`.
 462   */
 463  function apply(func, thisArg, args) {
 464    switch (args.length) {
 465      case 0: return func.call(thisArg);
 466      case 1: return func.call(thisArg, args[0]);
 467      case 2: return func.call(thisArg, args[0], args[1]);
 468      case 3: return func.call(thisArg, args[0], args[1], args[2]);
 469    }
 470    return func.apply(thisArg, args);
 471  }
 472
 473  /**
 474   * A specialized version of `baseAggregator` for arrays.
 475   *
 476   * @private
 477   * @param {Array} [array] The array to iterate over.
 478   * @param {Function} setter The function to set `accumulator` values.
 479   * @param {Function} iteratee The iteratee to transform keys.
 480   * @param {Object} accumulator The initial aggregated object.
 481   * @returns {Function} Returns `accumulator`.
 482   */
 483  function arrayAggregator(array, setter, iteratee, accumulator) {
 484    var index = -1,
 485        length = array == null ? 0 : array.length;
 486
 487    while (++index < length) {
 488      var value = array[index];
 489      setter(accumulator, value, iteratee(value), array);
 490    }
 491    return accumulator;
 492  }
 493
 494  /**
 495   * A specialized version of `_.forEach` for arrays without support for
 496   * iteratee shorthands.
 497   *
 498   * @private
 499   * @param {Array} [array] The array to iterate over.
 500   * @param {Function} iteratee The function invoked per iteration.
 501   * @returns {Array} Returns `array`.
 502   */
 503  function arrayEach(array, iteratee) {
 504    var index = -1,
 505        length = array == null ? 0 : array.length;
 506
 507    while (++index < length) {
 508      if (iteratee(array[index], index, array) === false) {
 509        break;
 510      }
 511    }
 512    return array;
 513  }
 514
 515  /**
 516   * A specialized version of `_.forEachRight` for arrays without support for
 517   * iteratee shorthands.
 518   *
 519   * @private
 520   * @param {Array} [array] The array to iterate over.
 521   * @param {Function} iteratee The function invoked per iteration.
 522   * @returns {Array} Returns `array`.
 523   */
 524  function arrayEachRight(array, iteratee) {
 525    var length = array == null ? 0 : array.length;
 526
 527    while (length--) {
 528      if (iteratee(array[length], length, array) === false) {
 529        break;
 530      }
 531    }
 532    return array;
 533  }
 534
 535  /**
 536   * A specialized version of `_.every` for arrays without support for
 537   * iteratee shorthands.
 538   *
 539   * @private
 540   * @param {Array} [array] The array to iterate over.
 541   * @param {Function} predicate The function invoked per iteration.
 542   * @returns {boolean} Returns `true` if all elements pass the predicate check,
 543   *  else `false`.
 544   */
 545  function arrayEvery(array, predicate) {
 546    var index = -1,
 547        length = array == null ? 0 : array.length;
 548
 549    while (++index < length) {
 550      if (!predicate(array[index], index, array)) {
 551        return false;
 552      }
 553    }
 554    return true;
 555  }
 556
 557  /**
 558   * A specialized version of `_.filter` for arrays without support for
 559   * iteratee shorthands.
 560   *
 561   * @private
 562   * @param {Array} [array] The array to iterate over.
 563   * @param {Function} predicate The function invoked per iteration.
 564   * @returns {Array} Returns the new filtered array.
 565   */
 566  function arrayFilter(array, predicate) {
 567    var index = -1,
 568        length = array == null ? 0 : array.length,
 569        resIndex = 0,
 570        result = [];
 571
 572    while (++index < length) {
 573      var value = array[index];
 574      if (predicate(value, index, array)) {
 575        result[resIndex++] = value;
 576      }
 577    }
 578    return result;
 579  }
 580
 581  /**
 582   * A specialized version of `_.includes` for arrays without support for
 583   * specifying an index to search from.
 584   *
 585   * @private
 586   * @param {Array} [array] The array to inspect.
 587   * @param {*} target The value to search for.
 588   * @returns {boolean} Returns `true` if `target` is found, else `false`.
 589   */
 590  function arrayIncludes(array, value) {
 591    var length = array == null ? 0 : array.length;
 592    return !!length && baseIndexOf(array, value, 0) > -1;
 593  }
 594
 595  /**
 596   * This function is like `arrayIncludes` except that it accepts a comparator.
 597   *
 598   * @private
 599   * @param {Array} [array] The array to inspect.
 600   * @param {*} target The value to search for.
 601   * @param {Function} comparator The comparator invoked per element.
 602   * @returns {boolean} Returns `true` if `target` is found, else `false`.
 603   */
 604  function arrayIncludesWith(array, value, comparator) {
 605    var index = -1,
 606        length = array == null ? 0 : array.length;
 607
 608    while (++index < length) {
 609      if (comparator(value, array[index])) {
 610        return true;
 611      }
 612    }
 613    return false;
 614  }
 615
 616  /**
 617   * A specialized version of `_.map` for arrays without support for iteratee
 618   * shorthands.
 619   *
 620   * @private
 621   * @param {Array} [array] The array to iterate over.
 622   * @param {Function} iteratee The function invoked per iteration.
 623   * @returns {Array} Returns the new mapped array.
 624   */
 625  function arrayMap(array, iteratee) {
 626    var index = -1,
 627        length = array == null ? 0 : array.length,
 628        result = Array(length);
 629
 630    while (++index < length) {
 631      result[index] = iteratee(array[index], index, array);
 632    }
 633    return result;
 634  }
 635
 636  /**
 637   * Appends the elements of `values` to `array`.
 638   *
 639   * @private
 640   * @param {Array} array The array to modify.
 641   * @param {Array} values The values to append.
 642   * @returns {Array} Returns `array`.
 643   */
 644  function arrayPush(array, values) {
 645    var index = -1,
 646        length = values.length,
 647        offset = array.length;
 648
 649    while (++index < length) {
 650      array[offset + index] = values[index];
 651    }
 652    return array;
 653  }
 654
 655  /**
 656   * A specialized version of `_.reduce` for arrays without support for
 657   * iteratee shorthands.
 658   *
 659   * @private
 660   * @param {Array} [array] The array to iterate over.
 661   * @param {Function} iteratee The function invoked per iteration.
 662   * @param {*} [accumulator] The initial value.
 663   * @param {boolean} [initAccum] Specify using the first element of `array` as
 664   *  the initial value.
 665   * @returns {*} Returns the accumulated value.
 666   */
 667  function arrayReduce(array, iteratee, accumulator, initAccum) {
 668    var index = -1,
 669        length = array == null ? 0 : array.length;
 670
 671    if (initAccum && length) {
 672      accumulator = array[++index];
 673    }
 674    while (++index < length) {
 675      accumulator = iteratee(accumulator, array[index], index, array);
 676    }
 677    return accumulator;
 678  }
 679
 680  /**
 681   * A specialized version of `_.reduceRight` for arrays without support for
 682   * iteratee shorthands.
 683   *
 684   * @private
 685   * @param {Array} [array] The array to iterate over.
 686   * @param {Function} iteratee The function invoked per iteration.
 687   * @param {*} [accumulator] The initial value.
 688   * @param {boolean} [initAccum] Specify using the last element of `array` as
 689   *  the initial value.
 690   * @returns {*} Returns the accumulated value.
 691   */
 692  function arrayReduceRight(array, iteratee, accumulator, initAccum) {
 693    var length = array == null ? 0 : array.length;
 694    if (initAccum && length) {
 695      accumulator = array[--length];
 696    }
 697    while (length--) {
 698      accumulator = iteratee(accumulator, array[length], length, array);
 699    }
 700    return accumulator;
 701  }
 702
 703  /**
 704   * A specialized version of `_.some` for arrays without support for iteratee
 705   * shorthands.
 706   *
 707   * @private
 708   * @param {Array} [array] The array to iterate over.
 709   * @param {Function} predicate The function invoked per iteration.
 710   * @returns {boolean} Returns `true` if any element passes the predicate check,
 711   *  else `false`.
 712   */
 713  function arraySome(array, predicate) {
 714    var index = -1,
 715        length = array == null ? 0 : array.length;
 716
 717    while (++index < length) {
 718      if (predicate(array[index], index, array)) {
 719        return true;
 720      }
 721    }
 722    return false;
 723  }
 724
 725  /**
 726   * Gets the size of an ASCII `string`.
 727   *
 728   * @private
 729   * @param {string} string The string inspect.
 730   * @returns {number} Returns the string size.
 731   */
 732  var asciiSize = baseProperty('length');
 733
 734  /**
 735   * Converts an ASCII `string` to an array.
 736   *
 737   * @private
 738   * @param {string} string The string to convert.
 739   * @returns {Array} Returns the converted array.
 740   */
 741  function asciiToArray(string) {
 742    return string.split('');
 743  }
 744
 745  /**
 746   * Splits an ASCII `string` into an array of its words.
 747   *
 748   * @private
 749   * @param {string} The string to inspect.
 750   * @returns {Array} Returns the words of `string`.
 751   */
 752  function asciiWords(string) {
 753    return string.match(reAsciiWord) || [];
 754  }
 755
 756  /**
 757   * The base implementation of methods like `_.findKey` and `_.findLastKey`,
 758   * without support for iteratee shorthands, which iterates over `collection`
 759   * using `eachFunc`.
 760   *
 761   * @private
 762   * @param {Array|Object} collection The collection to inspect.
 763   * @param {Function} predicate The function invoked per iteration.
 764   * @param {Function} eachFunc The function to iterate over `collection`.
 765   * @returns {*} Returns the found element or its key, else `undefined`.
 766   */
 767  function baseFindKey(collection, predicate, eachFunc) {
 768    var result;
 769    eachFunc(collection, function(value, key, collection) {
 770      if (predicate(value, key, collection)) {
 771        result = key;
 772        return false;
 773      }
 774    });
 775    return result;
 776  }
 777
 778  /**
 779   * The base implementation of `_.findIndex` and `_.findLastIndex` without
 780   * support for iteratee shorthands.
 781   *
 782   * @private
 783   * @param {Array} array The array to inspect.
 784   * @param {Function} predicate The function invoked per iteration.
 785   * @param {number} fromIndex The index to search from.
 786   * @param {boolean} [fromRight] Specify iterating from right to left.
 787   * @returns {number} Returns the index of the matched value, else `-1`.
 788   */
 789  function baseFindIndex(array, predicate, fromIndex, fromRight) {
 790    var length = array.length,
 791        index = fromIndex + (fromRight ? 1 : -1);
 792
 793    while ((fromRight ? index-- : ++index < length)) {
 794      if (predicate(array[index], index, array)) {
 795        return index;
 796      }
 797    }
 798    return -1;
 799  }
 800
 801  /**
 802   * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
 803   *
 804   * @private
 805   * @param {Array} array The array to inspect.
 806   * @param {*} value The value to search for.
 807   * @param {number} fromIndex The index to search from.
 808   * @returns {number} Returns the index of the matched value, else `-1`.
 809   */
 810  function baseIndexOf(array, value, fromIndex) {
 811    return value === value
 812      ? strictIndexOf(array, value, fromIndex)
 813      : baseFindIndex(array, baseIsNaN, fromIndex);
 814  }
 815
 816  /**
 817   * This function is like `baseIndexOf` except that it accepts a comparator.
 818   *
 819   * @private
 820   * @param {Array} array The array to inspect.
 821   * @param {*} value The value to search for.
 822   * @param {number} fromIndex The index to search from.
 823   * @param {Function} comparator The comparator invoked per element.
 824   * @returns {number} Returns the index of the matched value, else `-1`.
 825   */
 826  function baseIndexOfWith(array, value, fromIndex, comparator) {
 827    var index = fromIndex - 1,
 828        length = array.length;
 829
 830    while (++index < length) {
 831      if (comparator(array[index], value)) {
 832        return index;
 833      }
 834    }
 835    return -1;
 836  }
 837
 838  /**
 839   * The base implementation of `_.isNaN` without support for number objects.
 840   *
 841   * @private
 842   * @param {*} value The value to check.
 843   * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
 844   */
 845  function baseIsNaN(value) {
 846    return value !== value;
 847  }
 848
 849  /**
 850   * The base implementation of `_.mean` and `_.meanBy` without support for
 851   * iteratee shorthands.
 852   *
 853   * @private
 854   * @param {Array} array The array to iterate over.
 855   * @param {Function} iteratee The function invoked per iteration.
 856   * @returns {number} Returns the mean.
 857   */
 858  function baseMean(array, iteratee) {
 859    var length = array == null ? 0 : array.length;
 860    return length ? (baseSum(array, iteratee) / length) : NAN;
 861  }
 862
 863  /**
 864   * The base implementation of `_.property` without support for deep paths.
 865   *
 866   * @private
 867   * @param {string} key The key of the property to get.
 868   * @returns {Function} Returns the new accessor function.
 869   */
 870  function baseProperty(key) {
 871    return function(object) {
 872      return object == null ? undefined : object[key];
 873    };
 874  }
 875
 876  /**
 877   * The base implementation of `_.propertyOf` without support for deep paths.
 878   *
 879   * @private
 880   * @param {Object} object The object to query.
 881   * @returns {Function} Returns the new accessor function.
 882   */
 883  function basePropertyOf(object) {
 884    return function(key) {
 885      return object == null ? undefined : object[key];
 886    };
 887  }
 888
 889  /**
 890   * The base implementation of `_.reduce` and `_.reduceRight`, without support
 891   * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
 892   *
 893   * @private
 894   * @param {Array|Object} collection The collection to iterate over.
 895   * @param {Function} iteratee The function invoked per iteration.
 896   * @param {*} accumulator The initial value.
 897   * @param {boolean} initAccum Specify using the first or last element of
 898   *  `collection` as the initial value.
 899   * @param {Function} eachFunc The function to iterate over `collection`.
 900   * @returns {*} Returns the accumulated value.
 901   */
 902  function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
 903    eachFunc(collection, function(value, index, collection) {
 904      accumulator = initAccum
 905        ? (initAccum = false, value)
 906        : iteratee(accumulator, value, index, collection);
 907    });
 908    return accumulator;
 909  }
 910
 911  /**
 912   * The base implementation of `_.sortBy` which uses `comparer` to define the
 913   * sort order of `array` and replaces criteria objects with their corresponding
 914   * values.
 915   *
 916   * @private
 917   * @param {Array} array The array to sort.
 918   * @param {Function} comparer The function to define sort order.
 919   * @returns {Array} Returns `array`.
 920   */
 921  function baseSortBy(array, comparer) {
 922    var length = array.length;
 923
 924    array.sort(comparer);
 925    while (length--) {
 926      array[length] = array[length].value;
 927    }
 928    return array;
 929  }
 930
 931  /**
 932   * The base implementation of `_.sum` and `_.sumBy` without support for
 933   * iteratee shorthands.
 934   *
 935   * @private
 936   * @param {Array} array The array to iterate over.
 937   * @param {Function} iteratee The function invoked per iteration.
 938   * @returns {number} Returns the sum.
 939   */
 940  function baseSum(array, iteratee) {
 941    var result,
 942        index = -1,
 943        length = array.length;
 944
 945    while (++index < length) {
 946      var current = iteratee(array[index]);
 947      if (current !== undefined) {
 948        result = result === undefined ? current : (result + current);
 949      }
 950    }
 951    return result;
 952  }
 953
 954  /**
 955   * The base implementation of `_.times` without support for iteratee shorthands
 956   * or max array length checks.
 957   *
 958   * @private
 959   * @param {number} n The number of times to invoke `iteratee`.
 960   * @param {Function} iteratee The function invoked per iteration.
 961   * @returns {Array} Returns the array of results.
 962   */
 963  function baseTimes(n, iteratee) {
 964    var index = -1,
 965        result = Array(n);
 966
 967    while (++index < n) {
 968      result[index] = iteratee(index);
 969    }
 970    return result;
 971  }
 972
 973  /**
 974   * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
 975   * of key-value pairs for `object` corresponding to the property names of `props`.
 976   *
 977   * @private
 978   * @param {Object} object The object to query.
 979   * @param {Array} props The property names to get values for.
 980   * @returns {Object} Returns the key-value pairs.
 981   */
 982  function baseToPairs(object, props) {
 983    return arrayMap(props, function(key) {
 984      return [key, object[key]];
 985    });
 986  }
 987
 988  /**
 989   * The base implementation of `_.unary` without support for storing metadata.
 990   *
 991   * @private
 992   * @param {Function} func The function to cap arguments for.
 993   * @returns {Function} Returns the new capped function.
 994   */
 995  function baseUnary(func) {
 996    return function(value) {
 997      return func(value);
 998    };
 999  }
1000
1001  /**
1002   * The base implementation of `_.values` and `_.valuesIn` which creates an
1003   * array of `object` property values corresponding to the property names
1004   * of `props`.
1005   *
1006   * @private
1007   * @param {Object} object The object to query.
1008   * @param {Array} props The property names to get values for.
1009   * @returns {Object} Returns the array of property values.
1010   */
1011  function baseValues(object, props) {
1012    return arrayMap(props, function(key) {
1013      return object[key];
1014    });
1015  }
1016
1017  /**
1018   * Checks if a `cache` value for `key` exists.
1019   *
1020   * @private
1021   * @param {Object} cache The cache to query.
1022   * @param {string} key The key of the entry to check.
1023   * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1024   */
1025  function cacheHas(cache, key) {
1026    return cache.has(key);
1027  }
1028
1029  /**
1030   * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
1031   * that is not found in the character symbols.
1032   *
1033   * @private
1034   * @param {Array} strSymbols The string symbols to inspect.
1035   * @param {Array} chrSymbols The character symbols to find.
1036   * @returns {number} Returns the index of the first unmatched string symbol.
1037   */
1038  function charsStartIndex(strSymbols, chrSymbols) {
1039    var index = -1,
1040        length = strSymbols.length;
1041
1042    while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
1043    return index;
1044  }
1045
1046  /**
1047   * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
1048   * that is not found in the character symbols.
1049   *
1050   * @private
1051   * @param {Array} strSymbols The string symbols to inspect.
1052   * @param {Array} chrSymbols The character symbols to find.
1053   * @returns {number} Returns the index of the last unmatched string symbol.
1054   */
1055  function charsEndIndex(strSymbols, chrSymbols) {
1056    var index = strSymbols.length;
1057
1058    while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
1059    return index;
1060  }
1061
1062  /**
1063   * Gets the number of `placeholder` occurrences in `array`.
1064   *
1065   * @private
1066   * @param {Array} array The array to inspect.
1067   * @param {*} placeholder The placeholder to search for.
1068   * @returns {number} Returns the placeholder count.
1069   */
1070  function countHolders(array, placeholder) {
1071    var length = array.length,
1072        result = 0;
1073
1074    while (length--) {
1075      if (array[length] === placeholder) {
1076        ++result;
1077      }
1078    }
1079    return result;
1080  }
1081
1082  /**
1083   * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
1084   * letters to basic Latin letters.
1085   *
1086   * @private
1087   * @param {string} letter The matched letter to deburr.
1088   * @returns {string} Returns the deburred letter.
1089   */
1090  var deburrLetter = basePropertyOf(deburredLetters);
1091
1092  /**
1093   * Used by `_.escape` to convert characters to HTML entities.
1094   *
1095   * @private
1096   * @param {string} chr The matched character to escape.
1097   * @returns {string} Returns the escaped character.
1098   */
1099  var escapeHtmlChar = basePropertyOf(htmlEscapes);
1100
1101  /**
1102   * Used by `_.template` to escape characters for inclusion in compiled string literals.
1103   *
1104   * @private
1105   * @param {string} chr The matched character to escape.
1106   * @returns {string} Returns the escaped character.
1107   */
1108  function escapeStringChar(chr) {
1109    return '\\' + stringEscapes[chr];
1110  }
1111
1112  /**
1113   * Gets the value at `key` of `object`.
1114   *
1115   * @private
1116   * @param {Object} [object] The object to query.
1117   * @param {string} key The key of the property to get.
1118   * @returns {*} Returns the property value.
1119   */
1120  function getValue(object, key) {
1121    return object == null ? undefined : object[key];
1122  }
1123
1124  /**
1125   * Checks if `string` contains Unicode symbols.
1126   *
1127   * @private
1128   * @param {string} string The string to inspect.
1129   * @returns {boolean} Returns `true` if a symbol is found, else `false`.
1130   */
1131  function hasUnicode(string) {
1132    return reHasUnicode.test(string);
1133  }
1134
1135  /**
1136   * Checks if `string` contains a word composed of Unicode symbols.
1137   *
1138   * @private
1139   * @param {string} string The string to inspect.
1140   * @returns {boolean} Returns `true` if a word is found, else `false`.
1141   */
1142  function hasUnicodeWord(string) {
1143    return reHasUnicodeWord.test(string);
1144  }
1145
1146  /**
1147   * Converts `iterator` to an array.
1148   *
1149   * @private
1150   * @param {Object} iterator The iterator to convert.
1151   * @returns {Array} Returns the converted array.
1152   */
1153  function iteratorToArray(iterator) {
1154    var data,
1155        result = [];
1156
1157    while (!(data = iterator.next()).done) {
1158      result.push(data.value);
1159    }
1160    return result;
1161  }
1162
1163  /**
1164   * Converts `map` to its key-value pairs.
1165   *
1166   * @private
1167   * @param {Object} map The map to convert.
1168   * @returns {Array} Returns the key-value pairs.
1169   */
1170  function mapToArray(map) {
1171    var index = -1,
1172        result = Array(map.size);
1173
1174    map.forEach(function(value, key) {
1175      result[++index] = [key, value];
1176    });
1177    return result;
1178  }
1179
1180  /**
1181   * Creates a unary function that invokes `func` with its argument transformed.
1182   *
1183   * @private
1184   * @param {Function} func The function to wrap.
1185   * @param {Function} transform The argument transform.
1186   * @returns {Function} Returns the new function.
1187   */
1188  function overArg(func, transform) {
1189    return function(arg) {
1190      return func(transform(arg));
1191    };
1192  }
1193
1194  /**
1195   * Replaces all `placeholder` elements in `array` with an internal placeholder
1196   * and returns an array of their indexes.
1197   *
1198   * @private
1199   * @param {Array} array The array to modify.
1200   * @param {*} placeholder The placeholder to replace.
1201   * @returns {Array} Returns the new array of placeholder indexes.
1202   */
1203  function replaceHolders(array, placeholder) {
1204    var index = -1,
1205        length = array.length,
1206        resIndex = 0,
1207        result = [];
1208
1209    while (++index < length) {
1210      var value = array[index];
1211      if (value === placeholder || value === PLACEHOLDER) {
1212        array[index] = PLACEHOLDER;
1213        result[resIndex++] = index;
1214      }
1215    }
1216    return result;
1217  }
1218
1219  /**
1220   * Gets the value at `key`, unless `key` is "__proto__".
1221   *
1222   * @private
1223   * @param {Object} object The object to query.
1224   * @param {string} key The key of the property to get.
1225   * @returns {*} Returns the property value.
1226   */
1227  function safeGet(object, key) {
1228    return key == '__proto__'
1229      ? undefined
1230      : object[key];
1231  }
1232
1233  /**
1234   * Converts `set` to an array of its values.
1235   *
1236   * @private
1237   * @param {Object} set The set to convert.
1238   * @returns {Array} Returns the values.
1239   */
1240  function setToArray(set) {
1241    var index = -1,
1242        result = Array(set.size);
1243
1244    set.forEach(function(value) {
1245      result[++index] = value;
1246    });
1247    return result;
1248  }
1249
1250  /**
1251   * Converts `set` to its value-value pairs.
1252   *
1253   * @private
1254   * @param {Object} set The set to convert.
1255   * @returns {Array} Returns the value-value pairs.
1256   */
1257  function setToPairs(set) {
1258    var index = -1,
1259        result = Array(set.size);
1260
1261    set.forEach(function(value) {
1262      result[++index] = [value, value];
1263    });
1264    return result;
1265  }
1266
1267  /**
1268   * A specialized version of `_.indexOf` which performs strict equality
1269   * comparisons of values, i.e. `===`.
1270   *
1271   * @private
1272   * @param {Array} array The array to inspect.
1273   * @param {*} value The value to search for.
1274   * @param {number} fromIndex The index to search from.
1275   * @returns {number} Returns the index of the matched value, else `-1`.
1276   */
1277  function strictIndexOf(array, value, fromIndex) {
1278    var index = fromIndex - 1,
1279        length = array.length;
1280
1281    while (++index < length) {
1282      if (array[index] === value) {
1283        return index;
1284      }
1285    }
1286    return -1;
1287  }
1288
1289  /**
1290   * A specialized version of `_.lastIndexOf` which performs strict equality
1291   * comparisons of values, i.e. `===`.
1292   *
1293   * @private
1294   * @param {Array} array The array to inspect.
1295   * @param {*} value The value to search for.
1296   * @param {number} fromIndex The index to search from.
1297   * @returns {number} Returns the index of the matched value, else `-1`.
1298   */
1299  function strictLastIndexOf(array, value, fromIndex) {
1300    var index = fromIndex + 1;
1301    while (index--) {
1302      if (array[index] === value) {
1303        return index;
1304      }
1305    }
1306    return index;
1307  }
1308
1309  /**
1310   * Gets the number of symbols in `string`.
1311   *
1312   * @private
1313   * @param {string} string The string to inspect.
1314   * @returns {number} Returns the string size.
1315   */
1316  function stringSize(string) {
1317    return hasUnicode(string)
1318      ? unicodeSize(string)
1319      : asciiSize(string);
1320  }
1321
1322  /**
1323   * Converts `string` to an array.
1324   *
1325   * @private
1326   * @param {string} string The string to convert.
1327   * @returns {Array} Returns the converted array.
1328   */
1329  function stringToArray(string) {
1330    return hasUnicode(string)
1331      ? unicodeToArray(string)
1332      : asciiToArray(string);
1333  }
1334
1335  /**
1336   * Used by `_.unescape` to convert HTML entities to characters.
1337   *
1338   * @private
1339   * @param {string} chr The matched character to unescape.
1340   * @returns {string} Returns the unescaped character.
1341   */
1342  var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
1343
1344  /**
1345   * Gets the size of a Unicode `string`.
1346   *
1347   * @private
1348   * @param {string} string The string inspect.
1349   * @returns {number} Returns the string size.
1350   */
1351  function unicodeSize(string) {
1352    var result = reUnicode.lastIndex = 0;
1353    while (reUnicode.test(string)) {
1354      ++result;
1355    }
1356    return result;
1357  }
1358
1359  /**
1360   * Converts a Unicode `string` to an array.
1361   *
1362   * @private
1363   * @param {string} string The string to convert.
1364   * @returns {Array} Returns the converted array.
1365   */
1366  function unicodeToArray(string) {
1367    return string.match(reUnicode) || [];
1368  }
1369
1370  /**
1371   * Splits a Unicode `string` into an array of its words.
1372   *
1373   * @private
1374   * @param {string} The string to inspect.
1375   * @returns {Array} Returns the words of `string`.
1376   */
1377  function unicodeWords(string) {
1378    return string.match(reUnicodeWord) || [];
1379  }
1380
1381  /*--------------------------------------------------------------------------*/
1382
1383  /**
1384   * Create a new pristine `lodash` function using the `context` object.
1385   *
1386   * @static
1387   * @memberOf _
1388   * @since 1.1.0
1389   * @category Util
1390   * @param {Object} [context=root] The context object.
1391   * @returns {Function} Returns a new `lodash` function.
1392   * @example
1393   *
1394   * _.mixin({ 'foo': _.constant('foo') });
1395   *
1396   * var lodash = _.runInContext();
1397   * lodash.mixin({ 'bar': lodash.constant('bar') });
1398   *
1399   * _.isFunction(_.foo);
1400   * // => true
1401   * _.isFunction(_.bar);
1402   * // => false
1403   *
1404   * lodash.isFunction(lodash.foo);
1405   * // => false
1406   * lodash.isFunction(lodash.bar);
1407   * // => true
1408   *
1409   * // Create a suped-up `defer` in Node.js.
1410   * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
1411   */
1412  var runInContext = (function runInContext(context) {
1413    context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
1414
1415    /** Built-in constructor references. */
1416    var Array = context.Array,
1417        Date = context.Date,
1418        Error = context.Error,
1419        Function = context.Function,
1420        Math = context.Math,
1421        Object = context.Object,
1422        RegExp = context.RegExp,
1423        String = context.String,
1424        TypeError = context.TypeError;
1425
1426    /** Used for built-in method references. */
1427    var arrayProto = Array.prototype,
1428        funcProto = Function.prototype,
1429        objectProto = Object.prototype;
1430
1431    /** Used to detect overreaching core-js shims. */
1432    var coreJsData = context['__core-js_shared__'];
1433
1434    /** Used to resolve the decompiled source of functions. */
1435    var funcToString = funcProto.toString;
1436
1437    /** Used to check objects for own properties. */
1438    var hasOwnProperty = objectProto.hasOwnProperty;
1439
1440    /** Used to generate unique IDs. */
1441    var idCounter = 0;
1442
1443    /** Used to detect methods masquerading as native. */
1444    var maskSrcKey = (function() {
1445      var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
1446      return uid ? ('Symbol(src)_1.' + uid) : '';
1447    }());
1448
1449    /**
1450     * Used to resolve the
1451     * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
1452     * of values.
1453     */
1454    var nativeObjectToString = objectProto.toString;
1455
1456    /** Used to infer the `Object` constructor. */
1457    var objectCtorString = funcToString.call(Object);
1458
1459    /** Used to restore the original `_` reference in `_.noConflict`. */
1460    var oldDash = root._;
1461
1462    /** Used to detect if a method is native. */
1463    var reIsNative = RegExp('^' +
1464      funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
1465      .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
1466    );
1467
1468    /** Built-in value references. */
1469    var Buffer = moduleExports ? context.Buffer : undefined,
1470        Symbol = context.Symbol,
1471        Uint8Array = context.Uint8Array,
1472        allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
1473        getPrototype = overArg(Object.getPrototypeOf, Object),
1474        objectCreate = Object.create,
1475        propertyIsEnumerable = objectProto.propertyIsEnumerable,
1476        splice = arrayProto.splice,
1477        spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
1478        symIterator = Symbol ? Symbol.iterator : undefined,
1479        symToStringTag = Symbol ? Symbol.toStringTag : undefined;
1480
1481    var defineProperty = (function() {
1482      try {
1483        var func = getNative(Object, 'defineProperty');
1484        func({}, '', {});
1485        return func;
1486      } catch (e) {}
1487    }());
1488
1489    /** Mocked built-ins. */
1490    var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
1491        ctxNow = Date && Date.now !== root.Date.now && Date.now,
1492        ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
1493
1494    /* Built-in method references for those with the same name as other `lodash` methods. */
1495    var nativeCeil = Math.ceil,
1496        nativeFloor = Math.floor,
1497        nativeGetSymbols = Object.getOwnPropertySymbols,
1498        nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
1499        nativeIsFinite = context.isFinite,
1500        nativeJoin = arrayProto.join,
1501        nativeKeys = overArg(Object.keys, Object),
1502        nativeMax = Math.max,
1503        nativeMin = Math.min,
1504        nativeNow = Date.now,
1505        nativeParseInt = context.parseInt,
1506        nativeRandom = Math.random,
1507        nativeReverse = arrayProto.reverse;
1508
1509    /* Built-in method references that are verified to be native. */
1510    var DataView = getNative(context, 'DataView'),
1511        Map = getNative(context, 'Map'),
1512        Promise = getNative(context, 'Promise'),
1513        Set = getNative(context, 'Set'),
1514        WeakMap = getNative(context, 'WeakMap'),
1515        nativeCreate = getNative(Object, 'create');
1516
1517    /** Used to store function metadata. */
1518    var metaMap = WeakMap && new WeakMap;
1519
1520    /** Used to lookup unminified function names. */
1521    var realNames = {};

Large files files are truncated, but you can click here to view the full file