15 var VERSION =
'4.17.4';
18 var LARGE_ARRAY_SIZE = 200;
21 var CORE_ERROR_TEXT =
'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
22 FUNC_ERROR_TEXT =
'Expected a function';
25 var HASH_UNDEFINED =
'__lodash_hash_undefined__';
28 var MAX_MEMOIZE_SIZE = 500;
31 var PLACEHOLDER =
'__lodash_placeholder__';
34 var CLONE_DEEP_FLAG = 1,
36 CLONE_SYMBOLS_FLAG = 4;
39 var COMPARE_PARTIAL_FLAG = 1,
40 COMPARE_UNORDERED_FLAG = 2;
43 var WRAP_BIND_FLAG = 1,
44 WRAP_BIND_KEY_FLAG = 2,
45 WRAP_CURRY_BOUND_FLAG = 4,
47 WRAP_CURRY_RIGHT_FLAG = 16,
48 WRAP_PARTIAL_FLAG = 32,
49 WRAP_PARTIAL_RIGHT_FLAG = 64,
51 WRAP_REARG_FLAG = 256,
55 var DEFAULT_TRUNC_LENGTH = 30,
56 DEFAULT_TRUNC_OMISSION =
'...';
63 var LAZY_FILTER_FLAG = 1,
69 MAX_SAFE_INTEGER = 9007199254740991,
70 MAX_INTEGER = 1.7976931348623157e+308,
74 var MAX_ARRAY_LENGTH = 4294967295,
75 MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
76 HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
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]
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]';
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]';
128 var reEmptyStringLeading = /\b__p \+=
'';/g,
129 reEmptyStringMiddle = /\b(__p \+=)
'' \+/g,
130 reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n
'';/g;
133 var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
134 reUnescapedHtml = /[&<>
"']/g,
135 reHasEscapedHtml = RegExp(reEscapedHtml.source),
136 reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
139 var reEscape = /<%-([\s\S]+?)%>/g,
140 reEvaluate = /<%([\s\S]+?)%>/g,
141 reInterpolate = /<%=([\s\S]+?)%>/g;
144 var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
145 reIsPlainProp = /^\w*$/,
146 reLeadingDot = /^\./,
147 rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
153 var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
154 reHasRegExpChar = RegExp(reRegExpChar.source);
157 var reTrim = /^\s+|\s+$/g,
158 reTrimStart = /^\s+/,
162 var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
163 reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
164 reSplitDetails = /,? & /;
167 var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
170 var reEscapeChar = /\\(\\)?/g;
176 var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
179 var reFlags = /\w*$/;
182 var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
185 var reIsBinary = /^0b[01]+$/i;
188 var reIsHostCtor = /^\[
object .+?Constructor\]$/;
191 var reIsOctal = /^0o[0-7]+$/i;
194 var reIsUint = /^(?:0|[1-9]\d*)$/;
197 var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
200 var reNoMatch = /($^)/;
203 var reUnescapedString = /[
'\n\r\u2028\u2029\\]/g;
206 var rsAstralRange = '\\ud800-\\udfff
',
207 rsComboMarksRange = '\\u0300-\\u036f
',
208 reComboHalfMarksRange = '\\ufe20-\\ufe2f
',
209 rsComboSymbolsRange = '\\u20d0-\\u20ff
',
210 rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
211 rsDingbatRange = '\\u2700-\\u27bf
',
212 rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff
',
213 rsMathOpRange = '\\xac\\xb1\\xd7\\xf7
',
214 rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf
',
215 rsPunctuationRange = '\\u2000-\\u206f
',
216 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
',
217 rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde
',
218 rsVarRange = '\\ufe0e\\ufe0f
',
219 rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
222 var rsApos = "['\u2019]
",
223 rsAstral = '[' + rsAstralRange + ']',
224 rsBreak = '[' + rsBreakRange + ']',
225 rsCombo = '[' + rsComboRange + ']',
227 rsDingbat = '[' + rsDingbatRange + ']',
228 rsLower = '[' + rsLowerRange + ']',
229 rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
230 rsFitz = '\\ud83c[\\udffb-\\udfff]',
231 rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
232 rsNonAstral = '[^' + rsAstralRange + ']',
233 rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
234 rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
235 rsUpper = '[' + rsUpperRange + ']',
239 var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
240 rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
241 rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
242 rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
243 reOptMod = rsModifier + '?',
244 rsOptVar = '[' + rsVarRange + ']?',
245 rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
246 rsOrdLower = '\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)',
247 rsOrdUpper = '\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)',
248 rsSeq = rsOptVar + reOptMod + rsOptJoin,
249 rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
250 rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
253 var reApos = RegExp(rsApos, 'g');
259 var reComboMark = RegExp(rsCombo, 'g');
262 var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
265 var reUnicodeWord = RegExp([
266 rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
267 rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
268 rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
269 rsUpper + '+' + rsOptContrUpper,
277 var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
280 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 ]/;
284 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
285 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
286 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
287 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
288 '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
292 var templateCounter = -1;
295 var typedArrayTags = {};
296 typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
297 typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
298 typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
299 typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
300 typedArrayTags[uint32Tag] = true;
301 typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
302 typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
303 typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
304 typedArrayTags[errorTag] = typedArrayTags[funcTag] =
305 typedArrayTags[mapTag] = typedArrayTags[numberTag] =
306 typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
307 typedArrayTags[setTag] = typedArrayTags[stringTag] =
308 typedArrayTags[weakMapTag] = false;
311 var cloneableTags = {};
312 cloneableTags[argsTag] = cloneableTags[arrayTag] =
313 cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
314 cloneableTags[boolTag] = cloneableTags[dateTag] =
315 cloneableTags[float32Tag] = cloneableTags[float64Tag] =
316 cloneableTags[int8Tag] = cloneableTags[int16Tag] =
317 cloneableTags[int32Tag] = cloneableTags[mapTag] =
318 cloneableTags[numberTag] = cloneableTags[objectTag] =
319 cloneableTags[regexpTag] = cloneableTags[setTag] =
320 cloneableTags[stringTag] = cloneableTags[symbolTag] =
321 cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
322 cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
323 cloneableTags[errorTag] = cloneableTags[funcTag] =
324 cloneableTags[weakMapTag] = false;
327 var deburredLetters = {
328 // Latin-1 Supplement block.
329 '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
330 '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
331 '\xc7': 'C', '\xe7': 'c',
332 '\xd0': 'D', '\xf0': 'd',
333 '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
334 '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
335 '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
336 '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
337 '\xd1': 'N', '\xf1': 'n',
338 '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
339 '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
340 '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
341 '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
342 '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
343 '\xc6': 'Ae', '\xe6': 'ae',
344 '\xde': 'Th', '\xfe': 'th',
346 // Latin Extended-A block.
347 '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
348 '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
349 '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
350 '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
351 '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
352 '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
353 '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
354 '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
355 '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
356 '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
357 '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
358 '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
359 '\u0134': 'J', '\u0135': 'j',
360 '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
361 '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
362 '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
363 '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
364 '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
365 '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
366 '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
367 '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
368 '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
369 '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
370 '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
371 '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
372 '\u0163': 't', '\u0165': 't', '\u0167': 't',
373 '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
374 '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
375 '\u0174': 'W', '\u0175': 'w',
376 '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
377 '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
378 '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
379 '\u0132': 'IJ', '\u0133': 'ij',
380 '\u0152': 'Oe', '\u0153': 'oe',
381 '\u0149': "'n", '\u017f
': 's
'
394 var htmlUnescapes = {
403 var stringEscapes = {
413 var freeParseFloat = parseFloat,
414 freeParseInt = parseInt;
417 var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
420 var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
423 var root = freeGlobal || freeSelf || Function('return this')();
426 var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
429 var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
432 var moduleExports = freeModule && freeModule.exports === freeExports;
435 var freeProcess = moduleExports && freeGlobal.process;
438 var nodeUtil = (function() {
440 return freeProcess && freeProcess.binding && freeProcess.binding('util
');
444 /* Node.js helper references. */
445 var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
446 nodeIsDate = nodeUtil && nodeUtil.isDate,
447 nodeIsMap = nodeUtil && nodeUtil.isMap,
448 nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
449 nodeIsSet = nodeUtil && nodeUtil.isSet,
450 nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
452 /*--------------------------------------------------------------------------*/
462 function addMapEntry(map, pair) {
463 // Don't
return `map.set` because it
's not chainable in IE 11.
464 map.set(pair[0], pair[1]);
476 function addSetEntry(set, value) {
477 // Don't
return `set.add` because it
's not chainable in IE 11.
492 function apply(func, thisArg, args) {
493 switch (args.length) {
494 case 0: return func.call(thisArg);
495 case 1: return func.call(thisArg, args[0]);
496 case 2: return func.call(thisArg, args[0], args[1]);
497 case 3: return func.call(thisArg, args[0], args[1], args[2]);
499 return func.apply(thisArg, args);
512 function arrayAggregator(array, setter, iteratee, accumulator) {
514 length = array == null ? 0 : array.length;
516 while (++index < length) {
517 var value = array[index];
518 setter(accumulator, value, iteratee(value), array);
532 function arrayEach(array, iteratee) {
534 length = array == null ? 0 : array.length;
536 while (++index < length) {
537 if (iteratee(array[index], index, array) === false) {
553 function arrayEachRight(array, iteratee) {
554 var length = array == null ? 0 : array.length;
557 if (iteratee(array[length], length, array) === false) {
574 function arrayEvery(array, predicate) {
576 length = array == null ? 0 : array.length;
578 while (++index < length) {
579 if (!predicate(array[index], index, array)) {
595 function arrayFilter(array, predicate) {
597 length = array == null ? 0 : array.length,
601 while (++index < length) {
602 var value = array[index];
603 if (predicate(value, index, array)) {
604 result[resIndex++] = value;
619 function arrayIncludes(array, value) {
620 var length = array == null ? 0 : array.length;
621 return !!length && baseIndexOf(array, value, 0) > -1;
633 function arrayIncludesWith(array, value, comparator) {
635 length = array == null ? 0 : array.length;
637 while (++index < length) {
638 if (comparator(value, array[index])) {
654 function arrayMap(array, iteratee) {
656 length = array == null ? 0 : array.length,
657 result = Array(length);
659 while (++index < length) {
660 result[index] = iteratee(array[index], index, array);
673 function arrayPush(array, values) {
675 length = values.length,
676 offset = array.length;
678 while (++index < length) {
679 array[offset + index] = values[index];
696 function arrayReduce(array, iteratee, accumulator, initAccum) {
698 length = array == null ? 0 : array.length;
700 if (initAccum && length) {
701 accumulator = array[++index];
703 while (++index < length) {
704 accumulator = iteratee(accumulator, array[index], index, array);
721 function arrayReduceRight(array, iteratee, accumulator, initAccum) {
722 var length = array == null ? 0 : array.length;
723 if (initAccum && length) {
724 accumulator = array[--length];
727 accumulator = iteratee(accumulator, array[length], length, array);
742 function arraySome(array, predicate) {
744 length = array == null ? 0 : array.length;
746 while (++index < length) {
747 if (predicate(array[index], index, array)) {
761 var asciiSize = baseProperty('length
');
770 function asciiToArray(string) {
771 return string.split('');
781 function asciiWords(string) {
782 return string.match(reAsciiWord) || [];
796 function baseFindKey(collection, predicate, eachFunc) {
798 eachFunc(collection, function(value, key, collection) {
799 if (predicate(value, key, collection)) {
818 function baseFindIndex(array, predicate, fromIndex, fromRight) {
819 var length = array.length,
820 index = fromIndex + (fromRight ? 1 : -1);
822 while ((fromRight ? index-- : ++index < length)) {
823 if (predicate(array[index], index, array)) {
839 function baseIndexOf(array, value, fromIndex) {
840 return value === value
841 ? strictIndexOf(array, value, fromIndex)
842 : baseFindIndex(array, baseIsNaN, fromIndex);
855 function baseIndexOfWith(array, value, fromIndex, comparator) {
856 var index = fromIndex - 1,
857 length = array.length;
859 while (++index < length) {
860 if (comparator(array[index], value)) {
874 function baseIsNaN(value) {
875 return value !== value;
887 function baseMean(array, iteratee) {
888 var length = array == null ? 0 : array.length;
889 return length ? (baseSum(array, iteratee) / length) : NAN;
899 function baseProperty(key) {
900 return function(object) {
901 return object == null ? undefined : object[key];
912 function basePropertyOf(object) {
913 return function(key) {
914 return object == null ? undefined : object[key];
931 function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
932 eachFunc(collection, function(value, index, collection) {
933 accumulator = initAccum
934 ? (initAccum = false, value)
935 : iteratee(accumulator, value, index, collection);
950 function baseSortBy(array, comparer) {
951 var length = array.length;
953 array.sort(comparer);
955 array[length] = array[length].value;
969 function baseSum(array, iteratee) {
972 length = array.length;
974 while (++index < length) {
975 var current = iteratee(array[index]);
976 if (current !== undefined) {
977 result = result === undefined ? current : (result + current);
992 function baseTimes(n, iteratee) {
996 while (++index < n) {
997 result[index] = iteratee(index);
1011 function baseToPairs(object, props) {
1012 return arrayMap(props, function(key) {
1013 return [key, object[key]];
1024 function baseUnary(func) {
1025 return function(value) {
1040 function baseValues(object, props) {
1041 return arrayMap(props, function(key) {
1054 function cacheHas(cache, key) {
1055 return cache.has(key);
1067 function charsStartIndex(strSymbols, chrSymbols) {
1069 length = strSymbols.length;
1071 while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
1084 function charsEndIndex(strSymbols, chrSymbols) {
1085 var index = strSymbols.length;
1087 while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
1099 function countHolders(array, placeholder) {
1100 var length = array.length,
1104 if (array[length] === placeholder) {
1119 var deburrLetter = basePropertyOf(deburredLetters);
1128 var escapeHtmlChar = basePropertyOf(htmlEscapes);
1137 function escapeStringChar(chr) {
1138 return '\\
' + stringEscapes[chr];
1149 function getValue(object, key) {
1150 return object == null ? undefined : object[key];
1160 function hasUnicode(string) {
1161 return reHasUnicode.test(string);
1171 function hasUnicodeWord(string) {
1172 return reHasUnicodeWord.test(string);
1182 function iteratorToArray(iterator) {
1186 while (!(data = iterator.next()).done) {
1187 result.push(data.value);
1199 function mapToArray(map) {
1201 result = Array(map.size);
1203 map.forEach(function(value, key) {
1204 result[++index] = [key, value];
1217 function overArg(func, transform) {
1218 return function(arg) {
1219 return func(transform(arg));
1232 function replaceHolders(array, placeholder) {
1234 length = array.length,
1238 while (++index < length) {
1239 var value = array[index];
1240 if (value === placeholder || value === PLACEHOLDER) {
1241 array[index] = PLACEHOLDER;
1242 result[resIndex++] = index;
1255 function setToArray(set) {
1257 result = Array(set.size);
1259 set.forEach(function(value) {
1260 result[++index] = value;
1272 function setToPairs(set) {
1274 result = Array(set.size);
1276 set.forEach(function(value) {
1277 result[++index] = [value, value];
1292 function strictIndexOf(array, value, fromIndex) {
1293 var index = fromIndex - 1,
1294 length = array.length;
1296 while (++index < length) {
1297 if (array[index] === value) {
1314 function strictLastIndexOf(array, value, fromIndex) {
1315 var index = fromIndex + 1;
1317 if (array[index] === value) {
1331 function stringSize(string) {
1332 return hasUnicode(string)
1333 ? unicodeSize(string)
1334 : asciiSize(string);
1344 function stringToArray(string) {
1345 return hasUnicode(string)
1346 ? unicodeToArray(string)
1347 : asciiToArray(string);
1357 var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
1366 function unicodeSize(string) {
1367 var result = reUnicode.lastIndex = 0;
1368 while (reUnicode.test(string)) {
1381 function unicodeToArray(string) {
1382 return string.match(reUnicode) || [];
1392 function unicodeWords(string) {
1393 return string.match(reUnicodeWord) || [];
1396 /*--------------------------------------------------------------------------*/
1427 var runInContext = (function runInContext(context) {
1428 context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
1431 var Array = context.Array,
1432 Date = context.Date,
1433 Error = context.Error,
1434 Function = context.Function,
1435 Math = context.Math,
1436 Object = context.Object,
1437 RegExp = context.RegExp,
1438 String = context.String,
1439 TypeError = context.TypeError;
1442 var arrayProto = Array.prototype,
1443 funcProto = Function.prototype,
1444 objectProto = Object.prototype;
1447 var coreJsData = context['__core-js_shared__
'];
1450 var funcToString = funcProto.toString;
1453 var hasOwnProperty = objectProto.hasOwnProperty;
1459 var maskSrcKey = (function() {
1460 var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
1461 return uid ? ('Symbol(src)_1.' + uid) : '';
1469 var nativeObjectToString = objectProto.toString;
1472 var objectCtorString = funcToString.call(Object);
1475 var oldDash = root._;
1478 var reIsNative = RegExp('^' +
1479 funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
1480 .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
1484 var Buffer = moduleExports ? context.Buffer : undefined,
1485 Symbol = context.Symbol,
1486 Uint8Array = context.Uint8Array,
1487 allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
1488 getPrototype = overArg(Object.getPrototypeOf, Object),
1489 objectCreate = Object.create,
1490 propertyIsEnumerable = objectProto.propertyIsEnumerable,
1491 splice = arrayProto.splice,
1492 spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
1493 symIterator = Symbol ? Symbol.iterator : undefined,
1494 symToStringTag = Symbol ? Symbol.toStringTag : undefined;
1496 var defineProperty = (function() {
1498 var func = getNative(Object,
'defineProperty');
1505 var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
1506 ctxNow = Date && Date.now !== root.Date.now && Date.now,
1507 ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
1510 var nativeCeil = Math.ceil,
1511 nativeFloor = Math.floor,
1512 nativeGetSymbols = Object.getOwnPropertySymbols,
1513 nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
1514 nativeIsFinite = context.isFinite,
1515 nativeJoin = arrayProto.join,
1516 nativeKeys = overArg(Object.keys, Object),
1517 nativeMax = Math.max,
1518 nativeMin = Math.min,
1519 nativeNow = Date.now,
1520 nativeParseInt = context.parseInt,
1521 nativeRandom = Math.random,
1522 nativeReverse = arrayProto.reverse;
1525 var DataView = getNative(context,
'DataView'),
1526 Map = getNative(context,
'Map'),
1527 Promise = getNative(context,
'Promise'),
1528 Set = getNative(context,
'Set'),
1529 WeakMap = getNative(context,
'WeakMap'),
1530 nativeCreate = getNative(Object,
'create');
1533 var metaMap = WeakMap &&
new WeakMap;
1539 var dataViewCtorString = toSource(DataView),
1540 mapCtorString = toSource(Map),
1541 promiseCtorString = toSource(Promise),
1542 setCtorString = toSource(Set),
1543 weakMapCtorString = toSource(WeakMap);
1546 var symbolProto = Symbol ? Symbol.prototype : undefined,
1547 symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
1548 symbolToString = symbolProto ? symbolProto.toString : undefined;
1669 function lodash(value) {
1670 if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
1671 if (value instanceof LodashWrapper) {
1674 if (hasOwnProperty.call(value,
'__wrapped__')) {
1675 return wrapperClone(value);
1678 return new LodashWrapper(value);
1689 var baseCreate = (
function() {
1690 function object() {}
1691 return function(proto) {
1692 if (!isObject(proto)) {
1696 return objectCreate(proto);
1698 object.prototype = proto;
1699 var result =
new object;
1700 object.prototype = undefined;
1710 function baseLodash() {
1721 function LodashWrapper(value, chainAll) {
1722 this.__wrapped__ = value;
1723 this.__actions__ = [];
1724 this.__chain__ = !!chainAll;
1726 this.__values__ = undefined;
1738 lodash.templateSettings = {
1754 'evaluate': reEvaluate,
1762 'interpolate': reInterpolate,
1791 lodash.prototype = baseLodash.prototype;
1792 lodash.prototype.constructor = lodash;
1794 LodashWrapper.prototype = baseCreate(baseLodash.prototype);
1795 LodashWrapper.prototype.constructor = LodashWrapper;
1806 function LazyWrapper(value) {
1807 this.__wrapped__ = value;
1808 this.__actions__ = [];
1810 this.__filtered__ =
false;
1811 this.__iteratees__ = [];
1812 this.__takeCount__ = MAX_ARRAY_LENGTH;
1813 this.__views__ = [];
1824 function lazyClone() {
1825 var result =
new LazyWrapper(this.__wrapped__);
1826 result.__actions__ = copyArray(this.__actions__);
1827 result.__dir__ = this.__dir__;
1828 result.__filtered__ = this.__filtered__;
1829 result.__iteratees__ = copyArray(this.__iteratees__);
1830 result.__takeCount__ = this.__takeCount__;
1831 result.__views__ = copyArray(this.__views__);
1843 function lazyReverse() {
1844 if (this.__filtered__) {
1845 var result =
new LazyWrapper(
this);
1846 result.__dir__ = -1;
1847 result.__filtered__ =
true;
1849 result = this.clone();
1850 result.__dir__ *= -1;
1863 function lazyValue() {
1864 var array = this.__wrapped__.value(),
1866 isArr = isArray(array),
1868 arrLength = isArr ? array.length : 0,
1869 view = getView(0, arrLength, this.__views__),
1872 length = end - start,
1873 index = isRight ? end : (start - 1),
1874 iteratees = this.__iteratees__,
1875 iterLength = iteratees.length,
1877 takeCount = nativeMin(length, this.__takeCount__);
1879 if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
1880 return baseWrapperValue(array, this.__actions__);
1885 while (length-- && resIndex < takeCount) {
1889 value = array[index];
1891 while (++iterIndex < iterLength) {
1892 var data = iteratees[iterIndex],
1893 iteratee = data.iteratee,
1895 computed = iteratee(value);
1897 if (type == LAZY_MAP_FLAG) {
1899 }
else if (!computed) {
1900 if (type == LAZY_FILTER_FLAG) {
1907 result[resIndex++] = value;
1913 LazyWrapper.prototype = baseCreate(baseLodash.prototype);
1914 LazyWrapper.prototype.constructor = LazyWrapper;
1925 function Hash(entries) {
1927 length = entries == null ? 0 : entries.length;
1930 while (++index < length) {
1931 var entry = entries[index];
1932 this.set(entry[0], entry[1]);
1943 function hashClear() {
1944 this.__data__ = nativeCreate ? nativeCreate(null) : {};
1958 function hashDelete(key) {
1959 var result = this.has(key) &&
delete this.__data__[key];
1960 this.size -= result ? 1 : 0;
1973 function hashGet(key) {
1974 var data = this.__data__;
1976 var result = data[key];
1977 return result === HASH_UNDEFINED ? undefined : result;
1979 return hasOwnProperty.call(data, key) ? data[key] : undefined;
1991 function hashHas(key) {
1992 var data = this.__data__;
1993 return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
2006 function hashSet(key, value) {
2007 var data = this.__data__;
2008 this.size += this.has(key) ? 0 : 1;
2009 data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
2014 Hash.prototype.clear = hashClear;
2015 Hash.prototype[
'delete'] = hashDelete;
2016 Hash.prototype.get = hashGet;
2017 Hash.prototype.has = hashHas;
2018 Hash.prototype.set = hashSet;
2029 function ListCache(entries) {
2031 length = entries == null ? 0 : entries.length;
2034 while (++index < length) {
2035 var entry = entries[index];
2036 this.set(entry[0], entry[1]);
2047 function listCacheClear() {
2061 function listCacheDelete(key) {
2062 var data = this.__data__,
2063 index = assocIndexOf(data, key);
2068 var lastIndex = data.length - 1;
2069 if (index == lastIndex) {
2072 splice.call(data, index, 1);
2087 function listCacheGet(key) {
2088 var data = this.__data__,
2089 index = assocIndexOf(data, key);
2091 return index < 0 ? undefined : data[index][1];
2103 function listCacheHas(key) {
2104 return assocIndexOf(this.__data__, key) > -1;
2117 function listCacheSet(key, value) {
2118 var data = this.__data__,
2119 index = assocIndexOf(data, key);
2123 data.push([key, value]);
2125 data[index][1] = value;
2131 ListCache.prototype.clear = listCacheClear;
2132 ListCache.prototype[
'delete'] = listCacheDelete;
2133 ListCache.prototype.get = listCacheGet;
2134 ListCache.prototype.has = listCacheHas;
2135 ListCache.prototype.set = listCacheSet;
2146 function MapCache(entries) {
2148 length = entries == null ? 0 : entries.length;
2151 while (++index < length) {
2152 var entry = entries[index];
2153 this.set(entry[0], entry[1]);
2164 function mapCacheClear() {
2168 'map':
new (Map || ListCache),
2182 function mapCacheDelete(key) {
2183 var result = getMapData(
this, key)[
'delete'](key);
2184 this.size -= result ? 1 : 0;
2197 function mapCacheGet(key) {
2198 return getMapData(
this, key).get(key);
2210 function mapCacheHas(key) {
2211 return getMapData(
this, key).has(key);
2224 function mapCacheSet(key, value) {
2225 var data = getMapData(
this, key),
2228 data.set(key, value);
2229 this.size += data.size == size ? 0 : 1;
2234 MapCache.prototype.clear = mapCacheClear;
2235 MapCache.prototype[
'delete'] = mapCacheDelete;
2236 MapCache.prototype.get = mapCacheGet;
2237 MapCache.prototype.has = mapCacheHas;
2238 MapCache.prototype.set = mapCacheSet;
2250 function SetCache(values) {
2252 length = values == null ? 0 : values.length;
2254 this.__data__ =
new MapCache;
2255 while (++index < length) {
2256 this.add(values[index]);
2270 function setCacheAdd(value) {
2271 this.__data__.set(value, HASH_UNDEFINED);
2284 function setCacheHas(value) {
2285 return this.__data__.has(value);
2289 SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
2290 SetCache.prototype.has = setCacheHas;
2301 function Stack(entries) {
2302 var data = this.__data__ =
new ListCache(entries);
2303 this.size = data.size;
2313 function stackClear() {
2314 this.__data__ =
new ListCache;
2327 function stackDelete(key) {
2328 var data = this.__data__,
2329 result = data[
'delete'](key);
2331 this.size = data.size;
2344 function stackGet(key) {
2345 return this.__data__.get(key);
2357 function stackHas(key) {
2358 return this.__data__.has(key);
2371 function stackSet(key, value) {
2372 var data = this.__data__;
2373 if (data instanceof ListCache) {
2374 var pairs = data.__data__;
2375 if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
2376 pairs.push([key, value]);
2377 this.size = ++data.size;
2380 data = this.__data__ =
new MapCache(pairs);
2382 data.set(key, value);
2383 this.size = data.size;
2388 Stack.prototype.clear = stackClear;
2389 Stack.prototype[
'delete'] = stackDelete;
2390 Stack.prototype.get = stackGet;
2391 Stack.prototype.has = stackHas;
2392 Stack.prototype.set = stackSet;
2404 function arrayLikeKeys(value, inherited) {
2405 var isArr = isArray(value),
2406 isArg = !isArr && isArguments(value),
2407 isBuff = !isArr && !isArg && isBuffer(value),
2408 isType = !isArr && !isArg && !isBuff && isTypedArray(value),
2409 skipIndexes = isArr || isArg || isBuff || isType,
2410 result = skipIndexes ? baseTimes(value.length, String) : [],
2411 length = result.length;
2413 for (var key in value) {
2414 if ((inherited || hasOwnProperty.call(value, key)) &&
2419 (isBuff && (key ==
'offset' || key ==
'parent')) ||
2421 (isType && (key ==
'buffer' || key ==
'byteLength' || key ==
'byteOffset')) ||
2423 isIndex(key, length)
2438 function arraySample(array) {
2439 var length = array.length;
2440 return length ? array[baseRandom(0, length - 1)] : undefined;
2451 function arraySampleSize(array, n) {
2452 return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
2462 function arrayShuffle(array) {
2463 return shuffleSelf(copyArray(array));
2475 function assignMergeValue(
object, key, value) {
2476 if ((value !== undefined && !eq(
object[key], value)) ||
2477 (value === undefined && !(key in
object))) {
2478 baseAssignValue(
object, key, value);
2492 function assignValue(
object, key, value) {
2493 var objValue =
object[key];
2494 if (!(hasOwnProperty.call(
object, key) && eq(objValue, value)) ||
2495 (value === undefined && !(key in
object))) {
2496 baseAssignValue(
object, key, value);
2508 function assocIndexOf(array, key) {
2509 var length = array.length;
2511 if (eq(array[length][0], key)) {
2529 function baseAggregator(collection, setter, iteratee, accumulator) {
2530 baseEach(collection,
function(value, key, collection) {
2531 setter(accumulator, value, iteratee(value), collection);
2545 function baseAssign(
object, source) {
2546 return object && copyObject(source, keys(source),
object);
2558 function baseAssignIn(
object, source) {
2559 return object && copyObject(source, keysIn(source),
object);
2571 function baseAssignValue(
object, key, value) {
2572 if (key ==
'__proto__' && defineProperty) {
2573 defineProperty(
object, key, {
2574 'configurable':
true,
2580 object[key] = value;
2592 function baseAt(
object, paths) {
2594 length = paths.length,
2595 result = Array(length),
2596 skip =
object == null;
2598 while (++index < length) {
2599 result[index] = skip ? undefined :
get(object, paths[index]);
2613 function baseClamp(number, lower, upper) {
2614 if (number === number) {
2615 if (upper !== undefined) {
2616 number = number <= upper ? number : upper;
2618 if (lower !== undefined) {
2619 number = number >= lower ? number : lower;
2641 function baseClone(value, bitmask, customizer, key,
object, stack) {
2643 isDeep = bitmask & CLONE_DEEP_FLAG,
2644 isFlat = bitmask & CLONE_FLAT_FLAG,
2645 isFull = bitmask & CLONE_SYMBOLS_FLAG;
2648 result =
object ? customizer(value, key,
object, stack) : customizer(value);
2650 if (result !== undefined) {
2653 if (!isObject(value)) {
2656 var isArr = isArray(value);
2658 result = initCloneArray(value);
2660 return copyArray(value, result);
2663 var tag = getTag(value),
2664 isFunc = tag == funcTag || tag == genTag;
2666 if (isBuffer(value)) {
2667 return cloneBuffer(value, isDeep);
2669 if (tag == objectTag || tag == argsTag || (isFunc && !
object)) {
2670 result = (isFlat || isFunc) ? {} : initCloneObject(value);
2673 ? copySymbolsIn(value, baseAssignIn(result, value))
2674 : copySymbols(value, baseAssign(result, value));
2677 if (!cloneableTags[tag]) {
2678 return object ? value : {};
2680 result = initCloneByTag(value, tag, baseClone, isDeep);
2684 stack || (stack =
new Stack);
2685 var stacked = stack.get(value);
2689 stack.set(value, result);
2691 var keysFunc = isFull
2692 ? (isFlat ? getAllKeysIn : getAllKeys)
2693 : (isFlat ? keysIn : keys);
2695 var props = isArr ? undefined : keysFunc(value);
2696 arrayEach(props || value,
function(subValue, key) {
2699 subValue = value[key];
2702 assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
2714 function baseConforms(source) {
2715 var props = keys(source);
2716 return function(object) {
2717 return baseConformsTo(
object, source, props);
2729 function baseConformsTo(
object, source, props) {
2730 var length = props.length;
2731 if (
object == null) {
2734 object = Object(
object);
2736 var key = props[length],
2737 predicate = source[key],
2738 value =
object[key];
2740 if ((value === undefined && !(key in
object)) || !predicate(value)) {
2757 function baseDelay(func, wait, args) {
2758 if (typeof func !=
'function') {
2759 throw new TypeError(FUNC_ERROR_TEXT);
2761 return setTimeout(
function() { func.apply(undefined, args); }, wait);
2775 function baseDifference(array, values, iteratee, comparator) {
2777 includes = arrayIncludes,
2779 length = array.length,
2781 valuesLength = values.length;
2787 values = arrayMap(values, baseUnary(iteratee));
2790 includes = arrayIncludesWith;
2793 else if (values.length >= LARGE_ARRAY_SIZE) {
2794 includes = cacheHas;
2796 values =
new SetCache(values);
2799 while (++index < length) {
2800 var value = array[index],
2801 computed = iteratee == null ? value : iteratee(value);
2803 value = (comparator || value !== 0) ? value : 0;
2804 if (isCommon && computed === computed) {
2805 var valuesIndex = valuesLength;
2806 while (valuesIndex--) {
2807 if (values[valuesIndex] === computed) {
2813 else if (!includes(values, computed, comparator)) {
2828 var baseEach = createBaseEach(baseForOwn);
2838 var baseEachRight = createBaseEach(baseForOwnRight,
true);
2849 function baseEvery(collection, predicate) {
2851 baseEach(collection,
function(value, index, collection) {
2852 result = !!predicate(value, index, collection);
2868 function baseExtremum(array, iteratee, comparator) {
2870 length = array.length;
2872 while (++index < length) {
2873 var value = array[index],
2874 current = iteratee(value);
2876 if (current != null && (computed === undefined
2877 ? (current === current && !isSymbol(current))
2878 : comparator(current, computed)
2880 var computed = current,
2897 function baseFill(array, value, start, end) {
2898 var length = array.length;
2900 start = toInteger(start);
2902 start = -start > length ? 0 : (length + start);
2904 end = (end === undefined || end > length) ? length : toInteger(end);
2908 end = start > end ? 0 : toLength(end);
2909 while (start < end) {
2910 array[start++] = value;
2923 function baseFilter(collection, predicate) {
2925 baseEach(collection,
function(value, index, collection) {
2926 if (predicate(value, index, collection)) {
2944 function baseFlatten(array, depth, predicate, isStrict, result) {
2946 length = array.length;
2948 predicate || (predicate = isFlattenable);
2949 result || (result = []);
2951 while (++index < length) {
2952 var value = array[index];
2953 if (depth > 0 && predicate(value)) {
2956 baseFlatten(value, depth - 1, predicate, isStrict, result);
2958 arrayPush(result, value);
2960 }
else if (!isStrict) {
2961 result[result.length] = value;
2978 var baseFor = createBaseFor();
2990 var baseForRight = createBaseFor(
true);
3000 function baseForOwn(
object, iteratee) {
3001 return object && baseFor(
object, iteratee, keys);
3012 function baseForOwnRight(
object, iteratee) {
3013 return object && baseForRight(
object, iteratee, keys);
3025 function baseFunctions(
object, props) {
3026 return arrayFilter(props,
function(key) {
3027 return isFunction(
object[key]);
3039 function baseGet(
object, path) {
3040 path = castPath(path,
object);
3043 length = path.length;
3045 while (
object != null && index < length) {
3046 object =
object[toKey(path[index++])];
3048 return (index && index == length) ?
object : undefined;
3062 function baseGetAllKeys(
object, keysFunc, symbolsFunc) {
3063 var result = keysFunc(
object);
3064 return isArray(
object) ? result : arrayPush(result, symbolsFunc(
object));
3074 function baseGetTag(value) {
3075 if (value == null) {
3076 return value === undefined ? undefinedTag : nullTag;
3078 return (symToStringTag && symToStringTag in Object(value))
3080 : objectToString(value);
3092 function baseGt(value, other) {
3093 return value > other;
3104 function baseHas(
object, key) {
3105 return object != null && hasOwnProperty.call(
object, key);
3116 function baseHasIn(
object, key) {
3117 return object != null && key in Object(
object);
3129 function baseInRange(number, start, end) {
3130 return number >= nativeMin(start, end) && number < nativeMax(start, end);
3143 function baseIntersection(arrays, iteratee, comparator) {
3144 var includes = comparator ? arrayIncludesWith : arrayIncludes,
3145 length = arrays[0].length,
3146 othLength = arrays.length,
3147 othIndex = othLength,
3148 caches = Array(othLength),
3149 maxLength = Infinity,
3152 while (othIndex--) {
3153 var array = arrays[othIndex];
3154 if (othIndex && iteratee) {
3155 array = arrayMap(array, baseUnary(iteratee));
3157 maxLength = nativeMin(array.length, maxLength);
3158 caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
3159 ?
new SetCache(othIndex && array)
3168 while (++index < length && result.length < maxLength) {
3169 var value = array[index],
3170 computed = iteratee ? iteratee(value) : value;
3172 value = (comparator || value !== 0) ? value : 0;
3174 ? cacheHas(seen, computed)
3175 : includes(result, computed, comparator)
3177 othIndex = othLength;
3178 while (--othIndex) {
3179 var cache = caches[othIndex];
3181 ? cacheHas(cache, computed)
3182 : includes(arrays[othIndex], computed, comparator))
3188 seen.push(computed);
3207 function baseInverter(
object, setter, iteratee, accumulator) {
3208 baseForOwn(
object,
function(value, key,
object) {
3209 setter(accumulator, iteratee(value), key,
object);
3224 function baseInvoke(
object, path, args) {
3225 path = castPath(path,
object);
3226 object = parent(
object, path);
3227 var func =
object == null ?
object :
object[toKey(last(path))];
3228 return func == null ? undefined : apply(func,
object, args);
3238 function baseIsArguments(value) {
3239 return isObjectLike(value) && baseGetTag(value) == argsTag;
3249 function baseIsArrayBuffer(value) {
3250 return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
3260 function baseIsDate(value) {
3261 return isObjectLike(value) && baseGetTag(value) == dateTag;
3278 function baseIsEqual(value, other, bitmask, customizer, stack) {
3279 if (value === other) {
3282 if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
3283 return value !== value && other !== other;
3285 return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
3302 function baseIsEqualDeep(
object, other, bitmask, customizer, equalFunc, stack) {
3303 var objIsArr = isArray(
object),
3304 othIsArr = isArray(other),
3305 objTag = objIsArr ? arrayTag : getTag(
object),
3306 othTag = othIsArr ? arrayTag : getTag(other);
3308 objTag = objTag == argsTag ? objectTag : objTag;
3309 othTag = othTag == argsTag ? objectTag : othTag;
3311 var objIsObj = objTag == objectTag,
3312 othIsObj = othTag == objectTag,
3313 isSameTag = objTag == othTag;
3315 if (isSameTag && isBuffer(
object)) {
3316 if (!isBuffer(other)) {
3322 if (isSameTag && !objIsObj) {
3323 stack || (stack =
new Stack);
3324 return (objIsArr || isTypedArray(
object))
3325 ? equalArrays(
object, other, bitmask, customizer, equalFunc, stack)
3326 : equalByTag(
object, other, objTag, bitmask, customizer, equalFunc, stack);
3328 if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
3329 var objIsWrapped = objIsObj && hasOwnProperty.call(
object,
'__wrapped__'),
3330 othIsWrapped = othIsObj && hasOwnProperty.call(other,
'__wrapped__');
3332 if (objIsWrapped || othIsWrapped) {
3333 var objUnwrapped = objIsWrapped ?
object.value() : object,
3334 othUnwrapped = othIsWrapped ? other.value() : other;
3336 stack || (stack =
new Stack);
3337 return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
3343 stack || (stack =
new Stack);
3344 return equalObjects(
object, other, bitmask, customizer, equalFunc, stack);
3354 function baseIsMap(value) {
3355 return isObjectLike(value) && getTag(value) == mapTag;
3368 function baseIsMatch(
object, source, matchData, customizer) {
3369 var index = matchData.length,
3371 noCustomizer = !customizer;
3373 if (
object == null) {
3376 object = Object(
object);
3378 var data = matchData[index];
3379 if ((noCustomizer && data[2])
3380 ? data[1] !==
object[data[0]]
3381 : !(data[0] in
object)
3386 while (++index < length) {
3387 data = matchData[index];
3389 objValue =
object[key],
3392 if (noCustomizer && data[2]) {
3393 if (objValue === undefined && !(key in
object)) {
3397 var stack =
new Stack;
3399 var result = customizer(objValue, srcValue, key,
object, source, stack);
3401 if (!(result === undefined
3402 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
3420 function baseIsNative(value) {
3421 if (!isObject(value) || isMasked(value)) {
3424 var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
3425 return pattern.test(toSource(value));
3435 function baseIsRegExp(value) {
3436 return isObjectLike(value) && baseGetTag(value) == regexpTag;
3446 function baseIsSet(value) {
3447 return isObjectLike(value) && getTag(value) == setTag;
3457 function baseIsTypedArray(value) {
3458 return isObjectLike(value) &&
3459 isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
3469 function baseIteratee(value) {
3472 if (typeof value ==
'function') {
3475 if (value == null) {
3478 if (typeof value ==
'object') {
3479 return isArray(value)
3480 ? baseMatchesProperty(value[0], value[1])
3481 : baseMatches(value);
3483 return property(value);
3493 function baseKeys(
object) {
3494 if (!isPrototype(
object)) {
3495 return nativeKeys(
object);
3498 for (var key in Object(
object)) {
3499 if (hasOwnProperty.call(
object, key) && key !=
'constructor') {
3513 function baseKeysIn(
object) {
3514 if (!isObject(
object)) {
3515 return nativeKeysIn(
object);
3517 var isProto = isPrototype(
object),
3520 for (var key in
object) {
3521 if (!(key ==
'constructor' && (isProto || !hasOwnProperty.call(
object, key)))) {
3537 function baseLt(value, other) {
3538 return value < other;
3549 function baseMap(collection, iteratee) {
3551 result = isArrayLike(collection) ? Array(collection.length) : [];
3553 baseEach(collection,
function(value, key, collection) {
3554 result[++index] = iteratee(value, key, collection);
3566 function baseMatches(source) {
3567 var matchData = getMatchData(source);
3568 if (matchData.length == 1 && matchData[0][2]) {
3569 return matchesStrictComparable(matchData[0][0], matchData[0][1]);
3571 return function(object) {
3572 return object === source || baseIsMatch(
object, source, matchData);
3584 function baseMatchesProperty(path, srcValue) {
3585 if (isKey(path) && isStrictComparable(srcValue)) {
3586 return matchesStrictComparable(toKey(path), srcValue);
3588 return function(object) {
3589 var objValue =
get(object, path);
3590 return (objValue === undefined && objValue === srcValue)
3591 ? hasIn(
object, path)
3592 : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
3607 function baseMerge(
object, source, srcIndex, customizer, stack) {
3608 if (
object === source) {
3611 baseFor(source,
function(srcValue, key) {
3612 if (isObject(srcValue)) {
3613 stack || (stack =
new Stack);
3614 baseMergeDeep(
object, source, key, srcIndex, baseMerge, customizer, stack);
3617 var newValue = customizer
3618 ? customizer(
object[key], srcValue, (key +
''),
object, source, stack)
3621 if (newValue === undefined) {
3622 newValue = srcValue;
3624 assignMergeValue(
object, key, newValue);
3644 function baseMergeDeep(
object, source, key, srcIndex, mergeFunc, customizer, stack) {
3645 var objValue =
object[key],
3646 srcValue = source[key],
3647 stacked = stack.get(srcValue);
3650 assignMergeValue(
object, key, stacked);
3653 var newValue = customizer
3654 ? customizer(objValue, srcValue, (key +
''),
object, source, stack)
3657 var isCommon = newValue === undefined;
3660 var isArr = isArray(srcValue),
3661 isBuff = !isArr && isBuffer(srcValue),
3662 isTyped = !isArr && !isBuff && isTypedArray(srcValue);
3664 newValue = srcValue;
3665 if (isArr || isBuff || isTyped) {
3666 if (isArray(objValue)) {
3667 newValue = objValue;
3669 else if (isArrayLikeObject(objValue)) {
3670 newValue = copyArray(objValue);
3674 newValue = cloneBuffer(srcValue,
true);
3678 newValue = cloneTypedArray(srcValue,
true);
3684 else if (isPlainObject(srcValue) || isArguments(srcValue)) {
3685 newValue = objValue;
3686 if (isArguments(objValue)) {
3687 newValue = toPlainObject(objValue);
3689 else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
3690 newValue = initCloneObject(srcValue);
3699 stack.set(srcValue, newValue);
3700 mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
3701 stack[
'delete'](srcValue);
3703 assignMergeValue(
object, key, newValue);
3714 function baseNth(array, n) {
3715 var length = array.length;
3719 n += n < 0 ? length : 0;
3720 return isIndex(n, length) ? array[n] : undefined;
3732 function baseOrderBy(collection, iteratees, orders) {
3734 iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee()));
3736 var result = baseMap(collection,
function(value, key, collection) {
3737 var criteria = arrayMap(iteratees,
function(iteratee) {
3738 return iteratee(value);
3740 return {
'criteria': criteria,
'index': ++index,
'value': value };
3743 return baseSortBy(result,
function(
object, other) {
3744 return compareMultiple(
object, other, orders);
3757 function basePick(
object, paths) {
3758 return basePickBy(
object, paths,
function(value, path) {
3759 return hasIn(
object, path);
3772 function basePickBy(
object, paths, predicate) {
3774 length = paths.length,
3777 while (++index < length) {
3778 var path = paths[index],
3779 value = baseGet(
object, path);
3781 if (predicate(value, path)) {
3782 baseSet(result, castPath(path,
object), value);
3795 function basePropertyDeep(path) {
3796 return function(object) {
3797 return baseGet(
object, path);
3812 function basePullAll(array, values, iteratee, comparator) {
3813 var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
3815 length = values.length,
3818 if (array === values) {
3819 values = copyArray(values);
3822 seen = arrayMap(array, baseUnary(iteratee));
3824 while (++index < length) {
3826 value = values[index],
3827 computed = iteratee ? iteratee(value) : value;
3829 while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
3830 if (seen !== array) {
3831 splice.call(seen, fromIndex, 1);
3833 splice.call(array, fromIndex, 1);
3848 function basePullAt(array, indexes) {
3849 var length = array ? indexes.length : 0,
3850 lastIndex = length - 1;
3853 var index = indexes[length];
3854 if (length == lastIndex || index !== previous) {
3855 var previous = index;
3856 if (isIndex(index)) {
3857 splice.call(array, index, 1);
3859 baseUnset(array, index);
3875 function baseRandom(lower, upper) {
3876 return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
3890 function baseRange(start, end, step, fromRight) {
3892 length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
3893 result = Array(length);
3896 result[fromRight ? length : ++index] = start;
3910 function baseRepeat(
string, n) {
3912 if (!
string || n < 1 || n > MAX_SAFE_INTEGER) {
3921 n = nativeFloor(n / 2);
3938 function baseRest(func, start) {
3939 return setToString(overRest(func, start, identity), func +
'');
3949 function baseSample(collection) {
3950 return arraySample(values(collection));
3961 function baseSampleSize(collection, n) {
3962 var array = values(collection);
3963 return shuffleSelf(array, baseClamp(n, 0, array.length));
3976 function baseSet(
object, path, value, customizer) {
3977 if (!isObject(
object)) {
3980 path = castPath(path,
object);
3983 length = path.length,
3984 lastIndex = length - 1,
3987 while (nested != null && ++index < length) {
3988 var key = toKey(path[index]),
3991 if (index != lastIndex) {
3992 var objValue = nested[key];
3993 newValue = customizer ? customizer(objValue, key, nested) : undefined;
3994 if (newValue === undefined) {
3995 newValue = isObject(objValue)
3997 : (isIndex(path[index + 1]) ? [] : {});
4000 assignValue(nested, key, newValue);
4001 nested = nested[key];
4014 var baseSetData = !metaMap ? identity :
function(func, data) {
4015 metaMap.set(func, data);
4027 var baseSetToString = !defineProperty ? identity :
function(func, string) {
4028 return defineProperty(func,
'toString', {
4029 'configurable':
true,
4030 'enumerable':
false,
4031 'value': constant(
string),
4043 function baseShuffle(collection) {
4044 return shuffleSelf(values(collection));
4056 function baseSlice(array, start, end) {
4058 length = array.length;
4061 start = -start > length ? 0 : (length + start);
4063 end = end > length ? length : end;
4067 length = start > end ? 0 : ((end - start) >>> 0);
4070 var result = Array(length);
4071 while (++index < length) {
4072 result[index] = array[index + start];
4086 function baseSome(collection, predicate) {
4089 baseEach(collection,
function(value, index, collection) {
4090 result = predicate(value, index, collection);
4108 function baseSortedIndex(array, value, retHighest) {
4110 high = array == null ? low : array.length;
4112 if (typeof value ==
'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
4113 while (low < high) {
4114 var mid = (low + high) >>> 1,
4115 computed = array[mid];
4117 if (computed !== null && !isSymbol(computed) &&
4118 (retHighest ? (computed <= value) : (computed < value))) {
4126 return baseSortedIndexBy(array, value, identity, retHighest);
4142 function baseSortedIndexBy(array, value, iteratee, retHighest) {
4143 value = iteratee(value);
4146 high = array == null ? 0 : array.length,
4147 valIsNaN = value !== value,
4148 valIsNull = value === null,
4149 valIsSymbol = isSymbol(value),
4150 valIsUndefined = value === undefined;
4152 while (low < high) {
4153 var mid = nativeFloor((low + high) / 2),
4154 computed = iteratee(array[mid]),
4155 othIsDefined = computed !== undefined,
4156 othIsNull = computed === null,
4157 othIsReflexive = computed === computed,
4158 othIsSymbol = isSymbol(computed);
4161 var setLow = retHighest || othIsReflexive;
4162 }
else if (valIsUndefined) {
4163 setLow = othIsReflexive && (retHighest || othIsDefined);
4164 }
else if (valIsNull) {
4165 setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
4166 }
else if (valIsSymbol) {
4167 setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
4168 }
else if (othIsNull || othIsSymbol) {
4171 setLow = retHighest ? (computed <= value) : (computed < value);
4179 return nativeMin(high, MAX_ARRAY_INDEX);
4191 function baseSortedUniq(array, iteratee) {
4193 length = array.length,
4197 while (++index < length) {
4198 var value = array[index],
4199 computed = iteratee ? iteratee(value) : value;
4201 if (!index || !eq(computed, seen)) {
4202 var seen = computed;
4203 result[resIndex++] = value === 0 ? 0 : value;
4217 function baseToNumber(value) {
4218 if (typeof value ==
'number') {
4221 if (isSymbol(value)) {
4235 function baseToString(value) {
4237 if (typeof value ==
'string') {
4240 if (isArray(value)) {
4242 return arrayMap(value, baseToString) +
'';
4244 if (isSymbol(value)) {
4245 return symbolToString ? symbolToString.call(value) :
'';
4247 var result = (value +
'');
4248 return (result ==
'0' && (1 / value) == -INFINITY) ?
'-0' : result;
4260 function baseUniq(array, iteratee, comparator) {
4262 includes = arrayIncludes,
4263 length = array.length,
4270 includes = arrayIncludesWith;
4272 else if (length >= LARGE_ARRAY_SIZE) {
4273 var set = iteratee ? null : createSet(array);
4275 return setToArray(set);
4278 includes = cacheHas;
4279 seen =
new SetCache;
4282 seen = iteratee ? [] : result;
4285 while (++index < length) {
4286 var value = array[index],
4287 computed = iteratee ? iteratee(value) : value;
4289 value = (comparator || value !== 0) ? value : 0;
4290 if (isCommon && computed === computed) {
4291 var seenIndex = seen.length;
4292 while (seenIndex--) {
4293 if (seen[seenIndex] === computed) {
4298 seen.push(computed);
4302 else if (!includes(seen, computed, comparator)) {
4303 if (seen !== result) {
4304 seen.push(computed);
4320 function baseUnset(
object, path) {
4321 path = castPath(path,
object);
4322 object = parent(
object, path);
4323 return object == null ||
delete object[toKey(last(path))];
4336 function baseUpdate(
object, path, updater, customizer) {
4337 return baseSet(
object, path, updater(baseGet(
object, path)), customizer);
4351 function baseWhile(array, predicate, isDrop, fromRight) {
4352 var length = array.length,
4353 index = fromRight ? length : -1;
4355 while ((fromRight ? index-- : ++index < length) &&
4356 predicate(array[index], index, array)) {}
4359 ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
4360 : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
4373 function baseWrapperValue(value, actions) {
4375 if (result instanceof LazyWrapper) {
4376 result = result.value();
4378 return arrayReduce(actions,
function(result, action) {
4379 return action.func.apply(action.thisArg, arrayPush([result], action.args));
4393 function baseXor(arrays, iteratee, comparator) {
4394 var length = arrays.length;
4396 return length ? baseUniq(arrays[0]) : [];
4399 result = Array(length);
4401 while (++index < length) {
4402 var array = arrays[index],
4405 while (++othIndex < length) {
4406 if (othIndex != index) {
4407 result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
4411 return baseUniq(baseFlatten(result, 1), iteratee, comparator);
4423 function baseZipObject(props, values, assignFunc) {
4425 length = props.length,
4426 valsLength = values.length,
4429 while (++index < length) {
4430 var value = index < valsLength ? values[index] : undefined;
4431 assignFunc(result, props[index], value);
4443 function castArrayLikeObject(value) {
4444 return isArrayLikeObject(value) ? value : [];
4454 function castFunction(value) {
4455 return typeof value ==
'function' ? value : identity;
4466 function castPath(value,
object) {
4467 if (isArray(value)) {
4470 return isKey(value,
object) ? [value] : stringToPath(toString(value));
4482 var castRest = baseRest;
4493 function castSlice(array, start, end) {
4494 var length = array.length;
4495 end = end === undefined ? length : end;
4496 return (!start && end >= length) ? array : baseSlice(array, start, end);
4505 var clearTimeout = ctxClearTimeout ||
function(id) {
4506 return root.clearTimeout(
id);
4517 function cloneBuffer(buffer, isDeep) {
4519 return buffer.slice();
4521 var length = buffer.length,
4522 result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
4524 buffer.copy(result);
4535 function cloneArrayBuffer(arrayBuffer) {
4536 var result =
new arrayBuffer.constructor(arrayBuffer.byteLength);
4537 new Uint8Array(result).set(
new Uint8Array(arrayBuffer));
4549 function cloneDataView(dataView, isDeep) {
4550 var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
4551 return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
4563 function cloneMap(map, isDeep, cloneFunc) {
4564 var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map);
4565 return arrayReduce(array, addMapEntry,
new map.constructor);
4575 function cloneRegExp(regexp) {
4576 var result =
new regexp.constructor(regexp.source, reFlags.exec(regexp));
4577 result.lastIndex = regexp.lastIndex;
4590 function cloneSet(set, isDeep, cloneFunc) {
4591 var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set);
4592 return arrayReduce(array, addSetEntry,
new set.constructor);
4602 function cloneSymbol(symbol) {
4603 return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
4614 function cloneTypedArray(typedArray, isDeep) {
4615 var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
4616 return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
4627 function compareAscending(value, other) {
4628 if (value !== other) {
4629 var valIsDefined = value !== undefined,
4630 valIsNull = value === null,
4631 valIsReflexive = value === value,
4632 valIsSymbol = isSymbol(value);
4634 var othIsDefined = other !== undefined,
4635 othIsNull = other === null,
4636 othIsReflexive = other === other,
4637 othIsSymbol = isSymbol(other);
4639 if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
4640 (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
4641 (valIsNull && othIsDefined && othIsReflexive) ||
4642 (!valIsDefined && othIsReflexive) ||
4646 if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
4647 (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
4648 (othIsNull && valIsDefined && valIsReflexive) ||
4649 (!othIsDefined && valIsReflexive) ||
4671 function compareMultiple(
object, other, orders) {
4673 objCriteria =
object.criteria,
4674 othCriteria = other.criteria,
4675 length = objCriteria.length,
4676 ordersLength = orders.length;
4678 while (++index < length) {
4679 var result = compareAscending(objCriteria[index], othCriteria[index]);
4681 if (index >= ordersLength) {
4684 var order = orders[index];
4685 return result * (order ==
'desc' ? -1 : 1);
4695 return object.index - other.index;
4709 function composeArgs(args, partials, holders, isCurried) {
4711 argsLength = args.length,
4712 holdersLength = holders.length,
4714 leftLength = partials.length,
4715 rangeLength = nativeMax(argsLength - holdersLength, 0),
4716 result = Array(leftLength + rangeLength),
4717 isUncurried = !isCurried;
4719 while (++leftIndex < leftLength) {
4720 result[leftIndex] = partials[leftIndex];
4722 while (++argsIndex < holdersLength) {
4723 if (isUncurried || argsIndex < argsLength) {
4724 result[holders[argsIndex]] = args[argsIndex];
4727 while (rangeLength--) {
4728 result[leftIndex++] = args[argsIndex++];
4744 function composeArgsRight(args, partials, holders, isCurried) {
4746 argsLength = args.length,
4748 holdersLength = holders.length,
4750 rightLength = partials.length,
4751 rangeLength = nativeMax(argsLength - holdersLength, 0),
4752 result = Array(rangeLength + rightLength),
4753 isUncurried = !isCurried;
4755 while (++argsIndex < rangeLength) {
4756 result[argsIndex] = args[argsIndex];
4758 var offset = argsIndex;
4759 while (++rightIndex < rightLength) {
4760 result[offset + rightIndex] = partials[rightIndex];
4762 while (++holdersIndex < holdersLength) {
4763 if (isUncurried || argsIndex < argsLength) {
4764 result[offset + holders[holdersIndex]] = args[argsIndex++];
4778 function copyArray(source, array) {
4780 length = source.length;
4782 array || (array = Array(length));
4783 while (++index < length) {
4784 array[index] = source[index];
4799 function copyObject(source, props,
object, customizer) {
4800 var isNew = !object;
4801 object || (
object = {});
4804 length = props.length;
4806 while (++index < length) {
4807 var key = props[index];
4809 var newValue = customizer
4810 ? customizer(
object[key], source[key], key,
object, source)
4813 if (newValue === undefined) {
4814 newValue = source[key];
4817 baseAssignValue(
object, key, newValue);
4819 assignValue(
object, key, newValue);
4833 function copySymbols(source,
object) {
4834 return copyObject(source, getSymbols(source),
object);
4845 function copySymbolsIn(source,
object) {
4846 return copyObject(source, getSymbolsIn(source),
object);
4857 function createAggregator(setter, initializer) {
4858 return function(collection, iteratee) {
4859 var func = isArray(collection) ? arrayAggregator : baseAggregator,
4860 accumulator = initializer ? initializer() : {};
4862 return func(collection, setter, getIteratee(iteratee, 2), accumulator);
4873 function createAssigner(assigner) {
4874 return baseRest(
function(
object, sources) {
4876 length = sources.length,
4877 customizer = length > 1 ? sources[length - 1] : undefined,
4878 guard = length > 2 ? sources[2] : undefined;
4880 customizer = (assigner.length > 3 && typeof customizer ==
'function')
4881 ? (length--, customizer)
4884 if (guard && isIterateeCall(sources[0], sources[1], guard)) {
4885 customizer = length < 3 ? undefined : customizer;
4888 object = Object(
object);
4889 while (++index < length) {
4890 var source = sources[index];
4892 assigner(
object, source, index, customizer);
4907 function createBaseEach(eachFunc, fromRight) {
4908 return function(collection, iteratee) {
4909 if (collection == null) {
4912 if (!isArrayLike(collection)) {
4913 return eachFunc(collection, iteratee);
4915 var length = collection.length,
4916 index = fromRight ? length : -1,
4917 iterable = Object(collection);
4919 while ((fromRight ? index-- : ++index < length)) {
4920 if (iteratee(iterable[index], index, iterable) ===
false) {
4935 function createBaseFor(fromRight) {
4936 return function(object, iteratee, keysFunc) {
4938 iterable = Object(
object),
4939 props = keysFunc(
object),
4940 length = props.length;
4943 var key = props[fromRight ? length : ++index];
4944 if (iteratee(iterable[key], key, iterable) ===
false) {
4962 function createBind(func, bitmask, thisArg) {
4963 var isBind = bitmask & WRAP_BIND_FLAG,
4964 Ctor = createCtor(func);
4966 function wrapper() {
4967 var fn = (
this &&
this !== root &&
this instanceof wrapper) ? Ctor : func;
4968 return fn.apply(isBind ? thisArg :
this, arguments);
4980 function createCaseFirst(methodName) {
4981 return function(string) {
4982 string = toString(
string);
4984 var strSymbols = hasUnicode(
string)
4985 ? stringToArray(
string)
4988 var chr = strSymbols
4992 var trailing = strSymbols
4993 ? castSlice(strSymbols, 1).join(
'')
4996 return chr[methodName]() + trailing;
5007 function createCompounder(callback) {
5008 return function(string) {
5009 return arrayReduce(words(deburr(
string).replace(reApos,
'')), callback,
'');
5021 function createCtor(Ctor) {
5026 var args = arguments;
5027 switch (args.length) {
5028 case 0:
return new Ctor;
5029 case 1:
return new Ctor(args[0]);
5030 case 2:
return new Ctor(args[0], args[1]);
5031 case 3:
return new Ctor(args[0], args[1], args[2]);
5032 case 4:
return new Ctor(args[0], args[1], args[2], args[3]);
5033 case 5:
return new Ctor(args[0], args[1], args[2], args[3], args[4]);
5034 case 6:
return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
5035 case 7:
return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
5037 var thisBinding = baseCreate(Ctor.prototype),
5038 result = Ctor.apply(thisBinding, args);
5042 return isObject(result) ? result : thisBinding;
5055 function createCurry(func, bitmask, arity) {
5056 var Ctor = createCtor(func);
5058 function wrapper() {
5059 var length = arguments.length,
5060 args = Array(length),
5062 placeholder = getHolder(wrapper);
5065 args[index] = arguments[index];
5067 var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
5069 : replaceHolders(args, placeholder);
5071 length -= holders.length;
5072 if (length < arity) {
5073 return createRecurry(
5074 func, bitmask, createHybrid, wrapper.placeholder, undefined,
5075 args, holders, undefined, undefined, arity - length);
5077 var fn = (
this &&
this !== root &&
this instanceof wrapper) ? Ctor : func;
5078 return apply(fn,
this, args);
5090 function createFind(findIndexFunc) {
5091 return function(collection, predicate, fromIndex) {
5092 var iterable = Object(collection);
5093 if (!isArrayLike(collection)) {
5094 var iteratee = getIteratee(predicate, 3);
5095 collection = keys(collection);
5096 predicate =
function(key) {
return iteratee(iterable[key], key, iterable); };
5098 var index = findIndexFunc(collection, predicate, fromIndex);
5099 return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
5110 function createFlow(fromRight) {
5111 return flatRest(
function(funcs) {
5112 var length = funcs.length,
5114 prereq = LodashWrapper.prototype.thru;
5120 var func = funcs[index];
5121 if (typeof func !=
'function') {
5122 throw new TypeError(FUNC_ERROR_TEXT);
5124 if (prereq && !wrapper && getFuncName(func) ==
'wrapper') {
5125 var wrapper =
new LodashWrapper([],
true);
5128 index = wrapper ? index : length;
5129 while (++index < length) {
5130 func = funcs[index];
5132 var funcName = getFuncName(func),
5133 data = funcName ==
'wrapper' ? getData(func) : undefined;
5135 if (data && isLaziable(data[0]) &&
5136 data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
5137 !data[4].length && data[9] == 1
5139 wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
5141 wrapper = (func.length == 1 && isLaziable(func))
5142 ? wrapper[funcName]()
5143 : wrapper.thru(func);
5147 var args = arguments,
5150 if (wrapper && args.length == 1 && isArray(value)) {
5151 return wrapper.plant(value).value();
5154 result = length ? funcs[index].apply(
this, args) : value;
5156 while (++index < length) {
5157 result = funcs[index].call(
this, result);
5183 function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
5184 var isAry = bitmask & WRAP_ARY_FLAG,
5185 isBind = bitmask & WRAP_BIND_FLAG,
5186 isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
5187 isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
5188 isFlip = bitmask & WRAP_FLIP_FLAG,
5189 Ctor = isBindKey ? undefined : createCtor(func);
5191 function wrapper() {
5192 var length = arguments.length,
5193 args = Array(length),
5197 args[index] = arguments[index];
5200 var placeholder = getHolder(wrapper),
5201 holdersCount = countHolders(args, placeholder);
5204 args = composeArgs(args, partials, holders, isCurried);
5206 if (partialsRight) {
5207 args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
5209 length -= holdersCount;
5210 if (isCurried && length < arity) {
5211 var newHolders = replaceHolders(args, placeholder);
5212 return createRecurry(
5213 func, bitmask, createHybrid, wrapper.placeholder, thisArg,
5214 args, newHolders, argPos, ary, arity - length
5217 var thisBinding = isBind ? thisArg :
this,
5218 fn = isBindKey ? thisBinding[func] : func;
5220 length = args.length;
5222 args = reorder(args, argPos);
5223 }
else if (isFlip && length > 1) {
5226 if (isAry && ary < length) {
5229 if (
this &&
this !== root &&
this instanceof wrapper) {
5230 fn = Ctor || createCtor(fn);
5232 return fn.apply(thisBinding, args);
5245 function createInverter(setter, toIteratee) {
5246 return function(object, iteratee) {
5247 return baseInverter(
object, setter, toIteratee(iteratee), {});
5259 function createMathOperation(
operator, defaultValue) {
5260 return function(value, other) {
5262 if (value === undefined && other === undefined) {
5263 return defaultValue;
5265 if (value !== undefined) {
5268 if (other !== undefined) {
5269 if (result === undefined) {
5272 if (typeof value ==
'string' || typeof other ==
'string') {
5273 value = baseToString(value);
5274 other = baseToString(other);
5276 value = baseToNumber(value);
5277 other = baseToNumber(other);
5279 result = operator(value, other);
5292 function createOver(arrayFunc) {
5293 return flatRest(
function(iteratees) {
5294 iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
5295 return baseRest(
function(args) {
5297 return arrayFunc(iteratees,
function(iteratee) {
5298 return apply(iteratee, thisArg, args);
5313 function createPadding(length, chars) {
5314 chars = chars === undefined ?
' ' : baseToString(chars);
5316 var charsLength = chars.length;
5317 if (charsLength < 2) {
5318 return charsLength ? baseRepeat(chars, length) : chars;
5320 var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
5321 return hasUnicode(chars)
5322 ? castSlice(stringToArray(result), 0, length).join(
'')
5323 : result.slice(0, length);
5338 function createPartial(func, bitmask, thisArg, partials) {
5339 var isBind = bitmask & WRAP_BIND_FLAG,
5340 Ctor = createCtor(func);
5342 function wrapper() {
5344 argsLength = arguments.length,
5346 leftLength = partials.length,
5347 args = Array(leftLength + argsLength),
5348 fn = (
this &&
this !== root &&
this instanceof wrapper) ? Ctor : func;
5350 while (++leftIndex < leftLength) {
5351 args[leftIndex] = partials[leftIndex];
5353 while (argsLength--) {
5354 args[leftIndex++] = arguments[++argsIndex];
5356 return apply(fn, isBind ? thisArg :
this, args);
5368 function createRange(fromRight) {
5369 return function(start, end, step) {
5370 if (step && typeof step !=
'number' && isIterateeCall(start, end, step)) {
5371 end = step = undefined;
5374 start = toFinite(start);
5375 if (end === undefined) {
5379 end = toFinite(end);
5381 step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
5382 return baseRange(start, end, step, fromRight);
5393 function createRelationalOperation(
operator) {
5394 return function(value, other) {
5395 if (!(typeof value ==
'string' && typeof other ==
'string')) {
5396 value = toNumber(value);
5397 other = toNumber(other);
5399 return operator(value, other);
5420 function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
5421 var isCurry = bitmask & WRAP_CURRY_FLAG,
5422 newHolders = isCurry ? holders : undefined,
5423 newHoldersRight = isCurry ? undefined : holders,
5424 newPartials = isCurry ? partials : undefined,
5425 newPartialsRight = isCurry ? undefined : partials;
5427 bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
5428 bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
5430 if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
5431 bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
5434 func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
5435 newHoldersRight, argPos, ary, arity
5438 var result = wrapFunc.apply(undefined, newData);
5439 if (isLaziable(func)) {
5440 setData(result, newData);
5442 result.placeholder = placeholder;
5443 return setWrapToString(result, func, bitmask);
5453 function createRound(methodName) {
5454 var func = Math[methodName];
5455 return function(number, precision) {
5456 number = toNumber(number);
5457 precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
5461 var pair = (toString(number) +
'e').split(
'e'),
5462 value = func(pair[0] +
'e' + (+pair[1] + precision));
5464 pair = (toString(value) +
'e').split(
'e');
5465 return +(pair[0] +
'e' + (+pair[1] - precision));
5467 return func(number);
5478 var createSet = !(Set && (1 / setToArray(
new Set([,-0]))[1]) == INFINITY) ? noop :
function(values) {
5479 return new Set(values);
5489 function createToPairs(keysFunc) {
5490 return function(object) {
5491 var tag = getTag(
object);
5492 if (tag == mapTag) {
5493 return mapToArray(
object);
5495 if (tag == setTag) {
5496 return setToPairs(
object);
5498 return baseToPairs(
object, keysFunc(
object));
5527 function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
5528 var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
5529 if (!isBindKey && typeof func !=
'function') {
5530 throw new TypeError(FUNC_ERROR_TEXT);
5532 var length = partials ? partials.length : 0;
5534 bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
5535 partials = holders = undefined;
5537 ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
5538 arity = arity === undefined ? arity : toInteger(arity);
5539 length -= holders ? holders.length : 0;
5541 if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
5542 var partialsRight = partials,
5543 holdersRight = holders;
5545 partials = holders = undefined;
5547 var data = isBindKey ? undefined : getData(func);
5550 func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
5555 mergeData(newData, data);
5558 bitmask = newData[1];
5559 thisArg = newData[2];
5560 partials = newData[3];
5561 holders = newData[4];
5562 arity = newData[9] = newData[9] === undefined
5563 ? (isBindKey ? 0 : func.length)
5564 : nativeMax(newData[9] - length, 0);
5566 if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
5567 bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
5569 if (!bitmask || bitmask == WRAP_BIND_FLAG) {
5570 var result = createBind(func, bitmask, thisArg);
5571 }
else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
5572 result = createCurry(func, bitmask, arity);
5573 }
else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
5574 result = createPartial(func, bitmask, thisArg, partials);
5576 result = createHybrid.apply(undefined, newData);
5578 var setter = data ? baseSetData : setData;
5579 return setWrapToString(setter(result, newData), func, bitmask);
5594 function customDefaultsAssignIn(objValue, srcValue, key,
object) {
5595 if (objValue === undefined ||
5596 (eq(objValue, objectProto[key]) && !hasOwnProperty.call(
object, key))) {
5616 function customDefaultsMerge(objValue, srcValue, key,
object, source, stack) {
5617 if (isObject(objValue) && isObject(srcValue)) {
5619 stack.set(srcValue, objValue);
5620 baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
5621 stack[
'delete'](srcValue);
5635 function customOmitClone(value) {
5636 return isPlainObject(value) ? undefined : value;
5652 function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
5653 var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
5654 arrLength = array.length,
5655 othLength = other.length;
5657 if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
5661 var stacked = stack.get(array);
5662 if (stacked && stack.get(other)) {
5663 return stacked == other;
5667 seen = (bitmask & COMPARE_UNORDERED_FLAG) ?
new SetCache : undefined;
5669 stack.set(array, other);
5670 stack.set(other, array);
5673 while (++index < arrLength) {
5674 var arrValue = array[index],
5675 othValue = other[index];
5678 var compared = isPartial
5679 ? customizer(othValue, arrValue, index, other, array, stack)
5680 : customizer(arrValue, othValue, index, array, other, stack);
5682 if (compared !== undefined) {
5691 if (!arraySome(other,
function(othValue, othIndex) {
5692 if (!cacheHas(seen, othIndex) &&
5693 (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
5694 return seen.push(othIndex);
5701 arrValue === othValue ||
5702 equalFunc(arrValue, othValue, bitmask, customizer, stack)
5708 stack[
'delete'](array);
5709 stack[
'delete'](other);
5730 function equalByTag(
object, other, tag, bitmask, customizer, equalFunc, stack) {
5733 if ((
object.byteLength != other.byteLength) ||
5734 (
object.byteOffset != other.byteOffset)) {
5737 object =
object.buffer;
5738 other = other.buffer;
5740 case arrayBufferTag:
5741 if ((
object.byteLength != other.byteLength) ||
5742 !equalFunc(
new Uint8Array(
object),
new Uint8Array(other))) {
5752 return eq(+
object, +other);
5755 return object.name == other.name &&
object.message == other.message;
5762 return object == (other +
'');
5765 var convert = mapToArray;
5768 var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
5769 convert || (convert = setToArray);
5771 if (
object.size != other.size && !isPartial) {
5775 var stacked = stack.get(
object);
5777 return stacked == other;
5779 bitmask |= COMPARE_UNORDERED_FLAG;
5782 stack.set(
object, other);
5783 var result = equalArrays(convert(
object), convert(other), bitmask, customizer, equalFunc, stack);
5784 stack[
'delete'](object);
5788 if (symbolValueOf) {
5789 return symbolValueOf.call(
object) == symbolValueOf.call(other);
5808 function equalObjects(
object, other, bitmask, customizer, equalFunc, stack) {
5809 var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
5810 objProps = getAllKeys(
object),
5811 objLength = objProps.length,
5812 othProps = getAllKeys(other),
5813 othLength = othProps.length;
5815 if (objLength != othLength && !isPartial) {
5818 var index = objLength;
5820 var key = objProps[index];
5821 if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
5826 var stacked = stack.get(
object);
5827 if (stacked && stack.get(other)) {
5828 return stacked == other;
5831 stack.set(
object, other);
5832 stack.set(other,
object);
5834 var skipCtor = isPartial;
5835 while (++index < objLength) {
5836 key = objProps[index];
5837 var objValue =
object[key],
5838 othValue = other[key];
5841 var compared = isPartial
5842 ? customizer(othValue, objValue, key, other,
object, stack)
5843 : customizer(objValue, othValue, key, object, other, stack);
5846 if (!(compared === undefined
5847 ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
5853 skipCtor || (skipCtor = key ==
'constructor');
5855 if (result && !skipCtor) {
5856 var objCtor =
object.constructor,
5857 othCtor = other.constructor;
5860 if (objCtor != othCtor &&
5861 (
'constructor' in
object &&
'constructor' in other) &&
5862 !(typeof objCtor ==
'function' && objCtor instanceof objCtor &&
5863 typeof othCtor ==
'function' && othCtor instanceof othCtor)) {
5867 stack[
'delete'](object);
5868 stack[
'delete'](other);
5879 function flatRest(func) {
5880 return setToString(overRest(func, undefined, flatten), func +
'');
5890 function getAllKeys(
object) {
5891 return baseGetAllKeys(
object, keys, getSymbols);
5902 function getAllKeysIn(
object) {
5903 return baseGetAllKeys(
object, keysIn, getSymbolsIn);
5913 var getData = !metaMap ? noop :
function(func) {
5914 return metaMap.get(func);
5924 function getFuncName(func) {
5925 var result = (func.name +
''),
5926 array = realNames[result],
5927 length = hasOwnProperty.call(realNames, result) ? array.length : 0;
5930 var data = array[length],
5931 otherFunc = data.func;
5932 if (otherFunc == null || otherFunc == func) {
5946 function getHolder(func) {
5947 var
object = hasOwnProperty.call(lodash,
'placeholder') ? lodash : func;
5948 return object.placeholder;
5962 function getIteratee() {
5963 var result = lodash.iteratee || iteratee;
5964 result = result === iteratee ? baseIteratee : result;
5965 return arguments.length ? result(arguments[0], arguments[1]) : result;
5976 function getMapData(map, key) {
5977 var data = map.__data__;
5978 return isKeyable(key)
5979 ? data[typeof key ==
'string' ?
'string' :
'hash']
5990 function getMatchData(
object) {
5991 var result = keys(
object),
5992 length = result.length;
5995 var key = result[length],
5996 value =
object[key];
5998 result[length] = [key, value, isStrictComparable(value)];
6011 function getNative(
object, key) {
6012 var value = getValue(
object, key);
6013 return baseIsNative(value) ? value : undefined;
6023 function getRawTag(value) {
6024 var isOwn = hasOwnProperty.call(value, symToStringTag),
6025 tag = value[symToStringTag];
6028 value[symToStringTag] = undefined;
6029 var unmasked =
true;
6032 var result = nativeObjectToString.call(value);
6035 value[symToStringTag] = tag;
6037 delete value[symToStringTag];
6050 var getSymbols = !nativeGetSymbols ? stubArray :
function(object) {
6051 if (
object == null) {
6054 object = Object(
object);
6055 return arrayFilter(nativeGetSymbols(
object),
function(symbol) {
6056 return propertyIsEnumerable.call(
object, symbol);
6067 var getSymbolsIn = !nativeGetSymbols ? stubArray :
function(object) {
6070 arrayPush(result, getSymbols(
object));
6071 object = getPrototype(
object);
6083 var getTag = baseGetTag;
6086 if ((DataView && getTag(
new DataView(
new ArrayBuffer(1))) != dataViewTag) ||
6087 (Map && getTag(
new Map) != mapTag) ||
6088 (Promise && getTag(Promise.resolve()) != promiseTag) ||
6089 (Set && getTag(
new Set) != setTag) ||
6090 (WeakMap && getTag(
new WeakMap) != weakMapTag)) {
6091 getTag =
function(value) {
6092 var result = baseGetTag(value),
6093 Ctor = result == objectTag ? value.constructor : undefined,
6094 ctorString = Ctor ? toSource(Ctor) :
'';
6097 switch (ctorString) {
6098 case dataViewCtorString:
return dataViewTag;
6099 case mapCtorString:
return mapTag;
6100 case promiseCtorString:
return promiseTag;
6101 case setCtorString:
return setTag;
6102 case weakMapCtorString:
return weakMapTag;
6119 function getView(start, end, transforms) {
6121 length = transforms.length;
6123 while (++index < length) {
6124 var data = transforms[index],
6127 switch (data.type) {
6128 case 'drop': start += size;
break;
6129 case 'dropRight': end -= size;
break;
6130 case 'take': end = nativeMin(end, start + size);
break;
6131 case 'takeRight': start = nativeMax(start, end - size);
break;
6134 return {
'start': start,
'end': end };
6144 function getWrapDetails(source) {
6145 var match = source.match(reWrapDetails);
6146 return match ? match[1].split(reSplitDetails) : [];
6158 function hasPath(
object, path, hasFunc) {
6159 path = castPath(path,
object);
6162 length = path.length,
6165 while (++index < length) {
6166 var key = toKey(path[index]);
6167 if (!(result =
object != null && hasFunc(
object, key))) {
6170 object =
object[key];
6172 if (result || ++index != length) {
6175 length =
object == null ? 0 :
object.length;
6176 return !!length && isLength(length) && isIndex(key, length) &&
6177 (isArray(
object) || isArguments(
object));
6187 function initCloneArray(array) {
6188 var length = array.length,
6189 result = array.constructor(length);
6192 if (length && typeof array[0] ==
'string' && hasOwnProperty.call(array,
'index')) {
6193 result.index = array.index;
6194 result.input = array.input;
6206 function initCloneObject(
object) {
6207 return (typeof
object.constructor ==
'function' && !isPrototype(
object))
6208 ? baseCreate(getPrototype(
object))
6225 function initCloneByTag(
object, tag, cloneFunc, isDeep) {
6226 var Ctor =
object.constructor;
6228 case arrayBufferTag:
6229 return cloneArrayBuffer(
object);
6233 return new Ctor(+
object);
6236 return cloneDataView(
object, isDeep);
6238 case float32Tag:
case float64Tag:
6239 case int8Tag:
case int16Tag:
case int32Tag:
6240 case uint8Tag:
case uint8ClampedTag:
case uint16Tag:
case uint32Tag:
6241 return cloneTypedArray(
object, isDeep);
6244 return cloneMap(
object, isDeep, cloneFunc);
6248 return new Ctor(
object);
6251 return cloneRegExp(
object);
6254 return cloneSet(
object, isDeep, cloneFunc);
6257 return cloneSymbol(
object);
6269 function insertWrapDetails(source, details) {
6270 var length = details.length;
6274 var lastIndex = length - 1;
6275 details[lastIndex] = (length > 1 ?
'& ' :
'') + details[lastIndex];
6276 details = details.join(length > 2 ?
', ' :
' ');
6277 return source.replace(reWrapComment,
'{\n/* [wrapped with ' + details +
'] */\n');
6287 function isFlattenable(value) {
6288 return isArray(value) || isArguments(value) ||
6289 !!(spreadableSymbol && value && value[spreadableSymbol]);
6300 function isIndex(value, length) {
6301 length = length == null ? MAX_SAFE_INTEGER : length;
6303 (typeof value ==
'number' || reIsUint.test(value)) &&
6304 (value > -1 && value % 1 == 0 && value < length);
6317 function isIterateeCall(value, index,
object) {
6318 if (!isObject(
object)) {
6321 var type = typeof index;
6322 if (type ==
'number'
6323 ? (isArrayLike(
object) && isIndex(index,
object.length))
6324 : (type ==
'string' && index in
object)
6326 return eq(
object[index], value);
6339 function isKey(value,
object) {
6340 if (isArray(value)) {
6343 var type = typeof value;
6344 if (type ==
'number' || type ==
'symbol' || type ==
'boolean' ||
6345 value == null || isSymbol(value)) {
6348 return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
6349 (
object != null && value in Object(
object));
6359 function isKeyable(value) {
6360 var type = typeof value;
6361 return (type ==
'string' || type ==
'number' || type ==
'symbol' || type ==
'boolean')
6362 ? (value !==
'__proto__')
6374 function isLaziable(func) {
6375 var funcName = getFuncName(func),
6376 other = lodash[funcName];
6378 if (typeof other !=
'function' || !(funcName in LazyWrapper.prototype)) {
6381 if (func === other) {
6384 var data = getData(other);
6385 return !!data && func === data[0];
6395 function isMasked(func) {
6396 return !!maskSrcKey && (maskSrcKey in func);
6406 var isMaskable = coreJsData ? isFunction : stubFalse;
6415 function isPrototype(value) {
6416 var Ctor = value && value.constructor,
6417 proto = (typeof Ctor ==
'function' && Ctor.prototype) || objectProto;
6419 return value === proto;
6430 function isStrictComparable(value) {
6431 return value === value && !isObject(value);
6443 function matchesStrictComparable(key, srcValue) {
6444 return function(object) {
6445 if (
object == null) {
6448 return object[key] === srcValue &&
6449 (srcValue !== undefined || (key in Object(
object)));
6461 function memoizeCapped(func) {
6462 var result = memoize(func,
function(key) {
6463 if (cache.size === MAX_MEMOIZE_SIZE) {
6469 var cache = result.cache;
6489 function mergeData(data, source) {
6490 var bitmask = data[1],
6491 srcBitmask = source[1],
6492 newBitmask = bitmask | srcBitmask,
6493 isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
6496 ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
6497 ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
6498 ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
6501 if (!(isCommon || isCombo)) {
6505 if (srcBitmask & WRAP_BIND_FLAG) {
6506 data[2] = source[2];
6508 newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
6511 var value = source[3];
6513 var partials = data[3];
6514 data[3] = partials ? composeArgs(partials, value, source[4]) : value;
6515 data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
6521 data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
6522 data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
6530 if (srcBitmask & WRAP_ARY_FLAG) {
6531 data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
6534 if (data[9] == null) {
6535 data[9] = source[9];
6538 data[0] = source[0];
6539 data[1] = newBitmask;
6553 function nativeKeysIn(
object) {
6555 if (
object != null) {
6556 for (var key in Object(
object)) {
6570 function objectToString(value) {
6571 return nativeObjectToString.call(value);
6583 function overRest(func, start, transform) {
6584 start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
6586 var args = arguments,
6588 length = nativeMax(args.length - start, 0),
6589 array = Array(length);
6591 while (++index < length) {
6592 array[index] = args[start + index];
6595 var otherArgs = Array(start + 1);
6596 while (++index < start) {
6597 otherArgs[index] = args[index];
6599 otherArgs[start] = transform(array);
6600 return apply(func,
this, otherArgs);
6612 function parent(
object, path) {
6613 return path.length < 2 ?
object : baseGet(
object, baseSlice(path, 0, -1));
6626 function reorder(array, indexes) {
6627 var arrLength = array.length,
6628 length = nativeMin(indexes.length, arrLength),
6629 oldArray = copyArray(array);
6632 var index = indexes[length];
6633 array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
6652 var setData = shortOut(baseSetData);
6662 var setTimeout = ctxSetTimeout ||
function(func, wait) {
6663 return root.setTimeout(func, wait);
6674 var setToString = shortOut(baseSetToString);
6686 function setWrapToString(wrapper, reference, bitmask) {
6687 var source = (reference +
'');
6688 return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
6700 function shortOut(func) {
6705 var stamp = nativeNow(),
6706 remaining = HOT_SPAN - (stamp - lastCalled);
6709 if (remaining > 0) {
6710 if (++count >= HOT_COUNT) {
6711 return arguments[0];
6716 return func.apply(undefined, arguments);
6728 function shuffleSelf(array, size) {
6730 length = array.length,
6731 lastIndex = length - 1;
6733 size = size === undefined ? length : size;
6734 while (++index < size) {
6735 var rand = baseRandom(index, lastIndex),
6736 value = array[rand];
6738 array[rand] = array[index];
6739 array[index] = value;
6741 array.length = size;
6752 var stringToPath = memoizeCapped(
function(
string) {
6754 if (reLeadingDot.test(
string)) {
6757 string.replace(rePropName,
function(match, number, quote,
string) {
6758 result.push(quote ?
string.replace(reEscapeChar,
'$1') : (number || match));
6770 function toKey(value) {
6771 if (typeof value ==
'string' || isSymbol(value)) {
6774 var result = (value +
'');
6775 return (result ==
'0' && (1 / value) == -INFINITY) ?
'-0' : result;
6785 function toSource(func) {
6788 return funcToString.call(func);
6805 function updateWrapDetails(details, bitmask) {
6806 arrayEach(wrapFlags,
function(pair) {
6807 var value =
'_.' + pair[0];
6808 if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
6809 details.push(value);
6812 return details.sort();
6822 function wrapperClone(wrapper) {
6823 if (wrapper instanceof LazyWrapper) {
6824 return wrapper.clone();
6826 var result =
new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
6827 result.__actions__ = copyArray(wrapper.__actions__);
6828 result.__index__ = wrapper.__index__;
6829 result.__values__ = wrapper.__values__;
6856 function chunk(array, size, guard) {
6857 if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
6860 size = nativeMax(toInteger(size), 0);
6862 var length = array == null ? 0 : array.length;
6863 if (!length || size < 1) {
6868 result = Array(nativeCeil(length / size));
6870 while (index < length) {
6871 result[resIndex++] = baseSlice(array, index, (index += size));
6891 function compact(array) {
6893 length = array == null ? 0 : array.length,
6897 while (++index < length) {
6898 var value = array[index];
6900 result[resIndex++] = value;
6929 var length = arguments.length;
6933 var args = Array(length - 1),
6934 array = arguments[0],
6938 args[index - 1] = arguments[index];
6940 return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
6964 var difference = baseRest(
function(array, values) {
6965 return isArrayLikeObject(array)
6966 ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject,
true))
6996 var differenceBy = baseRest(
function(array, values) {
6997 var iteratee = last(values);
6998 if (isArrayLikeObject(iteratee)) {
6999 iteratee = undefined;
7001 return isArrayLikeObject(array)
7002 ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject,
true), getIteratee(iteratee, 2))
7029 var differenceWith = baseRest(
function(array, values) {
7030 var comparator = last(values);
7031 if (isArrayLikeObject(comparator)) {
7032 comparator = undefined;
7034 return isArrayLikeObject(array)
7035 ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject,
true), undefined, comparator)
7064 function drop(array, n, guard) {
7065 var length = array == null ? 0 : array.length;
7069 n = (guard || n === undefined) ? 1 : toInteger(n);
7070 return baseSlice(array, n < 0 ? 0 : n, length);
7098 function dropRight(array, n, guard) {
7099 var length = array == null ? 0 : array.length;
7103 n = (guard || n === undefined) ? 1 : toInteger(n);
7105 return baseSlice(array, 0, n < 0 ? 0 : n);
7143 function dropRightWhile(array, predicate) {
7144 return (array && array.length)
7145 ? baseWhile(array, getIteratee(predicate, 3),
true,
true)
7184 function dropWhile(array, predicate) {
7185 return (array && array.length)
7186 ? baseWhile(array, getIteratee(predicate, 3),
true)
7219 function fill(array, value, start, end) {
7220 var length = array == null ? 0 : array.length;
7224 if (start && typeof start !=
'number' && isIterateeCall(array, value, start)) {
7228 return baseFill(array, value, start, end);
7266 function findIndex(array, predicate, fromIndex) {
7267 var length = array == null ? 0 : array.length;
7271 var index = fromIndex == null ? 0 : toInteger(fromIndex);
7273 index = nativeMax(length + index, 0);
7275 return baseFindIndex(array, getIteratee(predicate, 3), index);
7313 function findLastIndex(array, predicate, fromIndex) {
7314 var length = array == null ? 0 : array.length;
7318 var index = length - 1;
7319 if (fromIndex !== undefined) {
7320 index = toInteger(fromIndex);
7321 index = fromIndex < 0
7322 ? nativeMax(length + index, 0)
7323 : nativeMin(index, length - 1);
7325 return baseFindIndex(array, getIteratee(predicate, 3), index,
true);
7342 function flatten(array) {
7343 var length = array == null ? 0 : array.length;
7344 return length ? baseFlatten(array, 1) : [];
7361 function flattenDeep(array) {
7362 var length = array == null ? 0 : array.length;
7363 return length ? baseFlatten(array, INFINITY) : [];
7386 function flattenDepth(array, depth) {
7387 var length = array == null ? 0 : array.length;
7391 depth = depth === undefined ? 1 : toInteger(depth);
7392 return baseFlatten(array, depth);
7410 function fromPairs(pairs) {
7412 length = pairs == null ? 0 : pairs.length,
7415 while (++index < length) {
7416 var pair = pairs[index];
7417 result[pair[0]] = pair[1];
7440 function head(array) {
7441 return (array && array.length) ? array[0] : undefined;
7467 function indexOf(array, value, fromIndex) {
7468 var length = array == null ? 0 : array.length;
7472 var index = fromIndex == null ? 0 : toInteger(fromIndex);
7474 index = nativeMax(length + index, 0);
7476 return baseIndexOf(array, value, index);
7493 function initial(array) {
7494 var length = array == null ? 0 : array.length;
7495 return length ? baseSlice(array, 0, -1) : [];
7515 var intersection = baseRest(
function(arrays) {
7516 var mapped = arrayMap(arrays, castArrayLikeObject);
7517 return (mapped.length && mapped[0] === arrays[0])
7518 ? baseIntersection(mapped)
7545 var intersectionBy = baseRest(
function(arrays) {
7546 var iteratee = last(arrays),
7547 mapped = arrayMap(arrays, castArrayLikeObject);
7549 if (iteratee === last(mapped)) {
7550 iteratee = undefined;
7554 return (mapped.length && mapped[0] === arrays[0])
7555 ? baseIntersection(mapped, getIteratee(iteratee, 2))
7580 var intersectionWith = baseRest(
function(arrays) {
7581 var comparator = last(arrays),
7582 mapped = arrayMap(arrays, castArrayLikeObject);
7584 comparator = typeof comparator ==
'function' ? comparator : undefined;
7588 return (mapped.length && mapped[0] === arrays[0])
7589 ? baseIntersection(mapped, undefined, comparator)
7608 function join(array, separator) {
7609 return array == null ?
'' : nativeJoin.call(array, separator);
7626 function last(array) {
7627 var length = array == null ? 0 : array.length;
7628 return length ? array[length - 1] : undefined;
7652 function lastIndexOf(array, value, fromIndex) {
7653 var length = array == null ? 0 : array.length;
7658 if (fromIndex !== undefined) {
7659 index = toInteger(fromIndex);
7660 index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
7662 return value === value
7663 ? strictLastIndexOf(array, value, index)
7664 : baseFindIndex(array, baseIsNaN, index, true);
7688 function nth(array, n) {
7689 return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
7715 var pull = baseRest(pullAll);
7737 function pullAll(array, values) {
7738 return (array && array.length && values && values.length)
7739 ? basePullAll(array, values)
7766 function pullAllBy(array, values, iteratee) {
7767 return (array && array.length && values && values.length)
7768 ? basePullAll(array, values, getIteratee(iteratee, 2))
7795 function pullAllWith(array, values, comparator) {
7796 return (array && array.length && values && values.length)
7797 ? basePullAll(array, values, undefined, comparator)
7825 var pullAt = flatRest(
function(array, indexes) {
7826 var length = array == null ? 0 : array.length,
7827 result = baseAt(array, indexes);
7829 basePullAt(array, arrayMap(indexes,
function(index) {
7830 return isIndex(index, length) ? +index : index;
7831 }).sort(compareAscending));
7864 function remove(array, predicate) {
7866 if (!(array && array.length)) {
7871 length = array.length;
7873 predicate = getIteratee(predicate, 3);
7874 while (++index < length) {
7875 var value = array[index];
7876 if (predicate(value, index, array)) {
7878 indexes.push(index);
7881 basePullAt(array, indexes);
7908 function reverse(array) {
7909 return array == null ? array : nativeReverse.call(array);
7928 function slice(array, start, end) {
7929 var length = array == null ? 0 : array.length;
7933 if (end && typeof end !=
'number' && isIterateeCall(array, start, end)) {
7938 start = start == null ? 0 : toInteger(start);
7939 end = end === undefined ? length : toInteger(end);
7941 return baseSlice(array, start, end);
7961 function sortedIndex(array, value) {
7962 return baseSortedIndex(array, value);
7990 function sortedIndexBy(array, value, iteratee) {
7991 return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
8010 function sortedIndexOf(array, value) {
8011 var length = array == null ? 0 : array.length;
8013 var index = baseSortedIndex(array, value);
8014 if (index < length && eq(array[index], value)) {
8039 function sortedLastIndex(array, value) {
8040 return baseSortedIndex(array, value,
true);
8068 function sortedLastIndexBy(array, value, iteratee) {
8069 return baseSortedIndexBy(array, value, getIteratee(iteratee, 2),
true);
8088 function sortedLastIndexOf(array, value) {
8089 var length = array == null ? 0 : array.length;
8091 var index = baseSortedIndex(array, value,
true) - 1;
8092 if (eq(array[index], value)) {
8114 function sortedUniq(array) {
8115 return (array && array.length)
8116 ? baseSortedUniq(array)
8136 function sortedUniqBy(array, iteratee) {
8137 return (array && array.length)
8138 ? baseSortedUniq(array, getIteratee(iteratee, 2))
8156 function tail(array) {
8157 var length = array == null ? 0 : array.length;
8158 return length ? baseSlice(array, 1, length) : [];
8186 function take(array, n, guard) {
8187 if (!(array && array.length)) {
8190 n = (guard || n === undefined) ? 1 : toInteger(n);
8191 return baseSlice(array, 0, n < 0 ? 0 : n);
8219 function takeRight(array, n, guard) {
8220 var length = array == null ? 0 : array.length;
8224 n = (guard || n === undefined) ? 1 : toInteger(n);
8226 return baseSlice(array, n < 0 ? 0 : n, length);
8264 function takeRightWhile(array, predicate) {
8265 return (array && array.length)
8266 ? baseWhile(array, getIteratee(predicate, 3),
false,
true)
8305 function takeWhile(array, predicate) {
8306 return (array && array.length)
8307 ? baseWhile(array, getIteratee(predicate, 3))
8327 var
union = baseRest(function(arrays) {
8328 return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject,
true));
8354 var unionBy = baseRest(
function(arrays) {
8355 var iteratee = last(arrays);
8356 if (isArrayLikeObject(iteratee)) {
8357 iteratee = undefined;
8359 return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject,
true), getIteratee(iteratee, 2));
8383 var unionWith = baseRest(
function(arrays) {
8384 var comparator = last(arrays);
8385 comparator = typeof comparator ==
'function' ? comparator : undefined;
8386 return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject,
true), undefined, comparator);
8407 function uniq(array) {
8408 return (array && array.length) ? baseUniq(array) : [];
8434 function uniqBy(array, iteratee) {
8435 return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
8458 function uniqWith(array, comparator) {
8459 comparator = typeof comparator ==
'function' ? comparator : undefined;
8460 return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
8482 function unzip(array) {
8483 if (!(array && array.length)) {
8487 array = arrayFilter(array,
function(group) {
8488 if (isArrayLikeObject(group)) {
8489 length = nativeMax(group.length, length);
8493 return baseTimes(length,
function(index) {
8494 return arrayMap(array, baseProperty(index));
8519 function unzipWith(array, iteratee) {
8520 if (!(array && array.length)) {
8523 var result = unzip(array);
8524 if (iteratee == null) {
8527 return arrayMap(result,
function(group) {
8528 return apply(iteratee, undefined, group);
8552 var without = baseRest(
function(array, values) {
8553 return isArrayLikeObject(array)
8554 ? baseDifference(array, values)
8576 var xor = baseRest(
function(arrays) {
8577 return baseXor(arrayFilter(arrays, isArrayLikeObject));
8603 var xorBy = baseRest(
function(arrays) {
8604 var iteratee = last(arrays);
8605 if (isArrayLikeObject(iteratee)) {
8606 iteratee = undefined;
8608 return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
8632 var xorWith = baseRest(
function(arrays) {
8633 var comparator = last(arrays);
8634 comparator = typeof comparator ==
'function' ? comparator : undefined;
8635 return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
8654 var zip = baseRest(unzip);
8672 function zipObject(props, values) {
8673 return baseZipObject(props || [], values || [], assignValue);
8691 function zipObjectDeep(props, values) {
8692 return baseZipObject(props || [], values || [], baseSet);
8715 var zipWith = baseRest(
function(arrays) {
8716 var length = arrays.length,
8717 iteratee = length > 1 ? arrays[length - 1] : undefined;
8719 iteratee = typeof iteratee ==
'function' ? (arrays.pop(), iteratee) : undefined;
8720 return unzipWith(arrays, iteratee);
8754 function chain(value) {
8755 var result = lodash(value);
8756 result.__chain__ =
true;
8783 function tap(value, interceptor) {
8811 function thru(value, interceptor) {
8812 return interceptor(value);
8831 var wrapperAt = flatRest(
function(paths) {
8832 var length = paths.length,
8833 start = length ? paths[0] : 0,
8834 value = this.__wrapped__,
8835 interceptor =
function(object) {
return baseAt(
object, paths); };
8837 if (length > 1 || this.__actions__.length ||
8838 !(value instanceof LazyWrapper) || !isIndex(start)) {
8839 return this.thru(interceptor);
8841 value = value.slice(start, +start + (length ? 1 : 0));
8842 value.__actions__.push({
8844 'args': [interceptor],
8845 'thisArg': undefined
8847 return new LodashWrapper(value, this.__chain__).thru(
function(array) {
8848 if (length && !array.length) {
8849 array.push(undefined);
8882 function wrapperChain() {
8912 function wrapperCommit() {
8913 return new LodashWrapper(this.value(), this.__chain__);
8938 function wrapperNext() {
8939 if (this.__values__ === undefined) {
8940 this.__values__ = toArray(this.value());
8942 var done = this.__index__ >= this.__values__.length,
8943 value = done ? undefined : this.__values__[this.__index__++];
8945 return {
'done': done,
'value': value };
8966 function wrapperToIterator() {
8994 function wrapperPlant(value) {
8998 while (parent instanceof baseLodash) {
8999 var clone = wrapperClone(parent);
9000 clone.__index__ = 0;
9001 clone.__values__ = undefined;
9003 previous.__wrapped__ = clone;
9007 var previous = clone;
9008 parent = parent.__wrapped__;
9010 previous.__wrapped__ = value;
9034 function wrapperReverse() {
9035 var value = this.__wrapped__;
9036 if (value instanceof LazyWrapper) {
9037 var wrapped = value;
9038 if (this.__actions__.length) {
9039 wrapped =
new LazyWrapper(
this);
9041 wrapped = wrapped.reverse();
9042 wrapped.__actions__.push({
9045 'thisArg': undefined
9047 return new LodashWrapper(wrapped, this.__chain__);
9049 return this.thru(reverse);
9066 function wrapperValue() {
9067 return baseWrapperValue(this.__wrapped__, this.__actions__);
9094 var countBy = createAggregator(
function(result, value, key) {
9095 if (hasOwnProperty.call(result, key)) {
9098 baseAssignValue(result, key, 1);
9143 function every(collection, predicate, guard) {
9144 var func = isArray(collection) ? arrayEvery : baseEvery;
9145 if (guard && isIterateeCall(collection, predicate, guard)) {
9146 predicate = undefined;
9148 return func(collection, getIteratee(predicate, 3));
9188 function filter(collection, predicate) {
9189 var func = isArray(collection) ? arrayFilter : baseFilter;
9190 return func(collection, getIteratee(predicate, 3));
9229 var find = createFind(findIndex);
9250 var findLast = createFind(findLastIndex);
9273 function flatMap(collection, iteratee) {
9274 return baseFlatten(map(collection, iteratee), 1);
9297 function flatMapDeep(collection, iteratee) {
9298 return baseFlatten(map(collection, iteratee), INFINITY);
9322 function flatMapDepth(collection, iteratee, depth) {
9323 depth = depth === undefined ? 1 : toInteger(depth);
9324 return baseFlatten(map(collection, iteratee), depth);
9357 function forEach(collection, iteratee) {
9358 var func = isArray(collection) ? arrayEach : baseEach;
9359 return func(collection, getIteratee(iteratee, 3));
9382 function forEachRight(collection, iteratee) {
9383 var func = isArray(collection) ? arrayEachRight : baseEachRight;
9384 return func(collection, getIteratee(iteratee, 3));
9410 var groupBy = createAggregator(
function(result, value, key) {
9411 if (hasOwnProperty.call(result, key)) {
9412 result[key].push(value);
9414 baseAssignValue(result, key, [value]);
9448 function includes(collection, value, fromIndex, guard) {
9449 collection = isArrayLike(collection) ? collection : values(collection);
9450 fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
9452 var length = collection.length;
9453 if (fromIndex < 0) {
9454 fromIndex = nativeMax(length + fromIndex, 0);
9456 return isString(collection)
9457 ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
9458 : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
9484 var invokeMap = baseRest(
function(collection, path, args) {
9486 isFunc = typeof path ==
'function',
9487 result = isArrayLike(collection) ? Array(collection.length) : [];
9489 baseEach(collection,
function(value) {
9490 result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
9523 var keyBy = createAggregator(
function(result, value, key) {
9524 baseAssignValue(result, key, value);
9569 function map(collection, iteratee) {
9570 var func = isArray(collection) ? arrayMap : baseMap;
9571 return func(collection, getIteratee(iteratee, 3));
9603 function orderBy(collection, iteratees, orders, guard) {
9604 if (collection == null) {
9607 if (!isArray(iteratees)) {
9608 iteratees = iteratees == null ? [] : [iteratees];
9610 orders = guard ? undefined : orders;
9611 if (!isArray(orders)) {
9612 orders = orders == null ? [] : [orders];
9614 return baseOrderBy(collection, iteratees, orders);
9653 var partition = createAggregator(
function(result, value, key) {
9654 result[key ? 0 : 1].push(value);
9655 },
function() {
return [[], []]; });
9694 function reduce(collection, iteratee, accumulator) {
9695 var func = isArray(collection) ? arrayReduce : baseReduce,
9696 initAccum = arguments.length < 3;
9698 return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
9723 function reduceRight(collection, iteratee, accumulator) {
9724 var func = isArray(collection) ? arrayReduceRight : baseReduce,
9725 initAccum = arguments.length < 3;
9727 return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
9764 function reject(collection, predicate) {
9765 var func = isArray(collection) ? arrayFilter : baseFilter;
9766 return func(collection, negate(getIteratee(predicate, 3)));
9783 function sample(collection) {
9784 var func = isArray(collection) ? arraySample : baseSample;
9785 return func(collection);
9808 function sampleSize(collection, n, guard) {
9809 if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
9814 var func = isArray(collection) ? arraySampleSize : baseSampleSize;
9815 return func(collection, n);
9833 function shuffle(collection) {
9834 var func = isArray(collection) ? arrayShuffle : baseShuffle;
9835 return func(collection);
9859 function size(collection) {
9860 if (collection == null) {
9863 if (isArrayLike(collection)) {
9864 return isString(collection) ? stringSize(collection) : collection.length;
9866 var tag = getTag(collection);
9867 if (tag == mapTag || tag == setTag) {
9868 return collection.size;
9870 return baseKeys(collection).length;
9909 function some(collection, predicate, guard) {
9910 var func = isArray(collection) ? arraySome : baseSome;
9911 if (guard && isIterateeCall(collection, predicate, guard)) {
9912 predicate = undefined;
9914 return func(collection, getIteratee(predicate, 3));
9946 var sortBy = baseRest(
function(collection, iteratees) {
9947 if (collection == null) {
9950 var length = iteratees.length;
9951 if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
9953 }
else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
9954 iteratees = [iteratees[0]];
9956 return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
9977 var now = ctxNow ||
function() {
9978 return root.Date.now();
10007 function after(n, func) {
10008 if (typeof func !=
'function') {
10009 throw new TypeError(FUNC_ERROR_TEXT);
10012 return function() {
10014 return func.apply(
this, arguments);
10036 function ary(func, n, guard) {
10037 n = guard ? undefined : n;
10038 n = (func && n == null) ? func.length : n;
10039 return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
10059 function before(n, func) {
10061 if (typeof func !=
'function') {
10062 throw new TypeError(FUNC_ERROR_TEXT);
10065 return function() {
10067 result = func.apply(
this, arguments);
10111 var bind = baseRest(
function(func, thisArg, partials) {
10112 var bitmask = WRAP_BIND_FLAG;
10113 if (partials.length) {
10114 var holders = replaceHolders(partials, getHolder(bind));
10115 bitmask |= WRAP_PARTIAL_FLAG;
10117 return createWrap(func, bitmask, thisArg, partials, holders);
10165 var bindKey = baseRest(
function(
object, key, partials) {
10166 var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
10167 if (partials.length) {
10168 var holders = replaceHolders(partials, getHolder(bindKey));
10169 bitmask |= WRAP_PARTIAL_FLAG;
10171 return createWrap(key, bitmask,
object, partials, holders);
10215 function curry(func, arity, guard) {
10216 arity = guard ? undefined : arity;
10217 var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
10218 result.placeholder = curry.placeholder;
10260 function curryRight(func, arity, guard) {
10261 arity = guard ? undefined : arity;
10262 var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
10263 result.placeholder = curryRight.placeholder;
10321 function debounce(func, wait, options) {
10328 lastInvokeTime = 0,
10333 if (typeof func !=
'function') {
10334 throw new TypeError(FUNC_ERROR_TEXT);
10336 wait = toNumber(wait) || 0;
10337 if (isObject(options)) {
10338 leading = !!options.leading;
10339 maxing =
'maxWait' in options;
10340 maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
10341 trailing =
'trailing' in options ? !!options.trailing : trailing;
10344 function invokeFunc(time) {
10345 var args = lastArgs,
10346 thisArg = lastThis;
10348 lastArgs = lastThis = undefined;
10349 lastInvokeTime = time;
10350 result = func.apply(thisArg, args);
10354 function leadingEdge(time) {
10356 lastInvokeTime = time;
10358 timerId = setTimeout(timerExpired, wait);
10360 return leading ? invokeFunc(time) : result;
10363 function remainingWait(time) {
10364 var timeSinceLastCall = time - lastCallTime,
10365 timeSinceLastInvoke = time - lastInvokeTime,
10366 result = wait - timeSinceLastCall;
10368 return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
10371 function shouldInvoke(time) {
10372 var timeSinceLastCall = time - lastCallTime,
10373 timeSinceLastInvoke = time - lastInvokeTime;
10378 return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
10379 (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
10382 function timerExpired() {
10384 if (shouldInvoke(time)) {
10385 return trailingEdge(time);
10388 timerId = setTimeout(timerExpired, remainingWait(time));
10391 function trailingEdge(time) {
10392 timerId = undefined;
10396 if (trailing && lastArgs) {
10397 return invokeFunc(time);
10399 lastArgs = lastThis = undefined;
10403 function cancel() {
10404 if (timerId !== undefined) {
10405 clearTimeout(timerId);
10407 lastInvokeTime = 0;
10408 lastArgs = lastCallTime = lastThis = timerId = undefined;
10412 return timerId === undefined ? result : trailingEdge(now());
10415 function debounced() {
10417 isInvoking = shouldInvoke(time);
10419 lastArgs = arguments;
10421 lastCallTime = time;
10424 if (timerId === undefined) {
10425 return leadingEdge(lastCallTime);
10429 timerId = setTimeout(timerExpired, wait);
10430 return invokeFunc(lastCallTime);
10433 if (timerId === undefined) {
10434 timerId = setTimeout(timerExpired, wait);
10438 debounced.cancel = cancel;
10439 debounced.flush = flush;
10461 var defer = baseRest(
function(func, args) {
10462 return baseDelay(func, 1, args);
10484 var delay = baseRest(
function(func, wait, args) {
10485 return baseDelay(func, toNumber(wait) || 0, args);
10506 function flip(func) {
10507 return createWrap(func, WRAP_FLIP_FLAG);
10554 function memoize(func, resolver) {
10555 if (typeof func !=
'function' || (resolver != null && typeof resolver !=
'function')) {
10556 throw new TypeError(FUNC_ERROR_TEXT);
10558 var memoized =
function() {
10559 var args = arguments,
10560 key = resolver ? resolver.apply(
this, args) : args[0],
10561 cache = memoized.cache;
10563 if (cache.has(key)) {
10564 return cache.get(key);
10566 var result = func.apply(
this, args);
10567 memoized.cache = cache.set(key, result) || cache;
10570 memoized.cache =
new (memoize.Cache || MapCache);
10575 memoize.Cache = MapCache;
10597 function negate(predicate) {
10598 if (typeof predicate !=
'function') {
10599 throw new TypeError(FUNC_ERROR_TEXT);
10601 return function() {
10602 var args = arguments;
10603 switch (args.length) {
10604 case 0:
return !predicate.call(
this);
10605 case 1:
return !predicate.call(
this, args[0]);
10606 case 2:
return !predicate.call(
this, args[0], args[1]);
10607 case 3:
return !predicate.call(
this, args[0], args[1], args[2]);
10609 return !predicate.apply(
this, args);
10631 function once(func) {
10632 return before(2, func);
10666 var overArgs = castRest(
function(func, transforms) {
10667 transforms = (transforms.length == 1 && isArray(transforms[0]))
10668 ? arrayMap(transforms[0], baseUnary(getIteratee()))
10669 : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
10671 var funcsLength = transforms.length;
10672 return baseRest(
function(args) {
10674 length = nativeMin(args.length, funcsLength);
10676 while (++index < length) {
10677 args[index] = transforms[index].call(
this, args[index]);
10679 return apply(func,
this, args);
10716 var partial = baseRest(
function(func, partials) {
10717 var holders = replaceHolders(partials, getHolder(partial));
10718 return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
10753 var partialRight = baseRest(
function(func, partials) {
10754 var holders = replaceHolders(partials, getHolder(partialRight));
10755 return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
10780 var rearg = flatRest(
function(func, indexes) {
10781 return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
10809 function rest(func, start) {
10810 if (typeof func !=
'function') {
10811 throw new TypeError(FUNC_ERROR_TEXT);
10813 start = start === undefined ? start : toInteger(start);
10814 return baseRest(func, start);
10851 function spread(func, start) {
10852 if (typeof func !=
'function') {
10853 throw new TypeError(FUNC_ERROR_TEXT);
10855 start = start == null ? 0 : nativeMax(toInteger(start), 0);
10856 return baseRest(
function(args) {
10857 var array = args[start],
10858 otherArgs = castSlice(args, 0, start);
10861 arrayPush(otherArgs, array);
10863 return apply(func,
this, otherArgs);
10911 function throttle(func, wait, options) {
10912 var leading =
true,
10915 if (typeof func !=
'function') {
10916 throw new TypeError(FUNC_ERROR_TEXT);
10918 if (isObject(options)) {
10919 leading =
'leading' in options ? !!options.leading : leading;
10920 trailing =
'trailing' in options ? !!options.trailing : trailing;
10922 return debounce(func, wait, {
10923 'leading': leading,
10925 'trailing': trailing
10944 function unary(func) {
10945 return ary(func, 1);
10970 function wrap(value, wrapper) {
10971 return partial(castFunction(wrapper), value);
11009 function castArray() {
11010 if (!arguments.length) {
11013 var value = arguments[0];
11014 return isArray(value) ? value : [value];
11043 function clone(value) {
11044 return baseClone(value, CLONE_SYMBOLS_FLAG);
11078 function cloneWith(value, customizer) {
11079 customizer = typeof customizer ==
'function' ? customizer : undefined;
11080 return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
11101 function cloneDeep(value) {
11102 return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
11133 function cloneDeepWith(value, customizer) {
11134 customizer = typeof customizer ==
'function' ? customizer : undefined;
11135 return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
11162 function conformsTo(
object, source) {
11163 return source == null || baseConformsTo(
object, source, keys(source));
11198 function eq(value, other) {
11199 return value === other || (value !== value && other !== other);
11225 var gt = createRelationalOperation(baseGt);
11250 var gte = createRelationalOperation(
function(value, other) {
11251 return value >= other;
11272 var isArguments = baseIsArguments(
function() {
return arguments; }()) ? baseIsArguments :
function(value) {
11273 return isObjectLike(value) && hasOwnProperty.call(value,
'callee') &&
11274 !propertyIsEnumerable.call(value,
'callee');
11300 var isArray = Array.isArray;
11319 var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
11346 function isArrayLike(value) {
11347 return value != null && isLength(value.length) && !isFunction(value);
11375 function isArrayLikeObject(value) {
11376 return isObjectLike(value) && isArrayLike(value);
11396 function isBoolean(value) {
11397 return value ===
true || value ===
false ||
11398 (isObjectLike(value) && baseGetTag(value) == boolTag);
11418 var isBuffer = nativeIsBuffer || stubFalse;
11437 var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
11456 function isElement(value) {
11457 return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
11493 function isEmpty(value) {
11494 if (value == null) {
11497 if (isArrayLike(value) &&
11498 (isArray(value) || typeof value ==
'string' || typeof value.splice ==
'function' ||
11499 isBuffer(value) || isTypedArray(value) || isArguments(value))) {
11500 return !value.length;
11502 var tag = getTag(value);
11503 if (tag == mapTag || tag == setTag) {
11504 return !value.size;
11506 if (isPrototype(value)) {
11507 return !baseKeys(value).length;
11509 for (var key in value) {
11510 if (hasOwnProperty.call(value, key)) {
11545 function isEqual(value, other) {
11546 return baseIsEqual(value, other);
11581 function isEqualWith(value, other, customizer) {
11582 customizer = typeof customizer ==
'function' ? customizer : undefined;
11583 var result = customizer ? customizer(value, other) : undefined;
11584 return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
11605 function isError(value) {
11606 if (!isObjectLike(value)) {
11609 var tag = baseGetTag(value);
11610 return tag == errorTag || tag == domExcTag ||
11611 (typeof value.message ==
'string' && typeof value.name ==
'string' && !isPlainObject(value));
11640 function isFinite(value) {
11641 return typeof value ==
'number' && nativeIsFinite(value);
11661 function isFunction(value) {
11662 if (!isObject(value)) {
11667 var tag = baseGetTag(value);
11668 return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
11697 function isInteger(value) {
11698 return typeof value ==
'number' && value == toInteger(value);
11727 function isLength(value) {
11728 return typeof value ==
'number' &&
11729 value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
11757 function isObject(value) {
11758 var type = typeof value;
11759 return value != null && (type ==
'object' || type ==
'function');
11786 function isObjectLike(value) {
11787 return value != null && typeof value ==
'object';
11807 var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
11837 function isMatch(
object, source) {
11838 return object === source || baseIsMatch(
object, source, getMatchData(source));
11873 function isMatchWith(
object, source, customizer) {
11874 customizer = typeof customizer ==
'function' ? customizer : undefined;
11875 return baseIsMatch(
object, source, getMatchData(source), customizer);
11906 function isNaN(value) {
11910 return isNumber(value) && value != +value;
11939 function isNative(value) {
11940 if (isMaskable(value)) {
11941 throw new Error(CORE_ERROR_TEXT);
11943 return baseIsNative(value);
11963 function isNull(value) {
11964 return value === null;
11987 function isNil(value) {
11988 return value == null;
12017 function isNumber(value) {
12018 return typeof value ==
'number' ||
12019 (isObjectLike(value) && baseGetTag(value) == numberTag);
12050 function isPlainObject(value) {
12051 if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
12054 var proto = getPrototype(value);
12055 if (proto === null) {
12058 var Ctor = hasOwnProperty.call(proto,
'constructor') && proto.constructor;
12059 return typeof Ctor ==
'function' && Ctor instanceof Ctor &&
12060 funcToString.call(Ctor) == objectCtorString;
12080 var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
12109 function isSafeInteger(value) {
12110 return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
12130 var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
12149 function isString(value) {
12150 return typeof value ==
'string' ||
12151 (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
12171 function isSymbol(value) {
12172 return typeof value ==
'symbol' ||
12173 (isObjectLike(value) && baseGetTag(value) == symbolTag);
12193 var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
12212 function isUndefined(value) {
12213 return value === undefined;
12233 function isWeakMap(value) {
12234 return isObjectLike(value) && getTag(value) == weakMapTag;
12254 function isWeakSet(value) {
12255 return isObjectLike(value) && baseGetTag(value) == weakSetTag;
12281 var lt = createRelationalOperation(baseLt);
12306 var lte = createRelationalOperation(
function(value, other) {
12307 return value <= other;
12333 function toArray(value) {
12337 if (isArrayLike(value)) {
12338 return isString(value) ? stringToArray(value) : copyArray(value);
12340 if (symIterator && value[symIterator]) {
12341 return iteratorToArray(value[symIterator]());
12343 var tag = getTag(value),
12344 func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
12346 return func(value);
12372 function toFinite(value) {
12374 return value === 0 ? value : 0;
12376 value = toNumber(value);
12377 if (value === INFINITY || value === -INFINITY) {
12378 var sign = (value < 0 ? -1 : 1);
12379 return sign * MAX_INTEGER;
12381 return value === value ? value : 0;
12410 function toInteger(value) {
12411 var result = toFinite(value),
12412 remainder = result % 1;
12414 return result === result ? (remainder ? result - remainder : result) : 0;
12444 function toLength(value) {
12445 return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
12471 function toNumber(value) {
12472 if (typeof value ==
'number') {
12475 if (isSymbol(value)) {
12478 if (isObject(value)) {
12479 var other = typeof value.valueOf ==
'function' ? value.valueOf() : value;
12480 value = isObject(other) ? (other +
'') : other;
12482 if (typeof value !=
'string') {
12483 return value === 0 ? value : +value;
12485 value = value.replace(reTrim,
'');
12486 var isBinary = reIsBinary.test(value);
12487 return (isBinary || reIsOctal.test(value))
12488 ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
12489 : (reIsBadHex.test(value) ? NAN : +value);
12516 function toPlainObject(value) {
12517 return copyObject(value, keysIn(value));
12544 function toSafeInteger(value) {
12546 ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
12547 : (value === 0 ? value : 0);
12571 function toString(value) {
12572 return value == null ?
'' : baseToString(value);
12609 var assign = createAssigner(
function(
object, source) {
12610 if (isPrototype(source) || isArrayLike(source)) {
12611 copyObject(source, keys(source),
object);
12614 for (var key in source) {
12615 if (hasOwnProperty.call(source, key)) {
12616 assignValue(
object, key, source[key]);
12652 var assignIn = createAssigner(
function(
object, source) {
12653 copyObject(source, keysIn(source),
object);
12685 var assignInWith = createAssigner(
function(
object, source, srcIndex, customizer) {
12686 copyObject(source, keysIn(source),
object, customizer);
12717 var assignWith = createAssigner(
function(
object, source, srcIndex, customizer) {
12718 copyObject(source, keys(source),
object, customizer);
12738 var at = flatRest(baseAt);
12774 function create(prototype, properties) {
12775 var result = baseCreate(prototype);
12776 return properties == null ? result : baseAssign(result, properties);
12800 var defaults = baseRest(
function(args) {
12801 args.push(undefined, customDefaultsAssignIn);
12802 return apply(assignInWith, undefined, args);
12824 var defaultsDeep = baseRest(
function(args) {
12825 args.push(undefined, customDefaultsMerge);
12826 return apply(mergeWith, undefined, args);
12864 function findKey(
object, predicate) {
12865 return baseFindKey(
object, getIteratee(predicate, 3), baseForOwn);
12903 function findLastKey(
object, predicate) {
12904 return baseFindKey(
object, getIteratee(predicate, 3), baseForOwnRight);
12935 function forIn(
object, iteratee) {
12936 return object == null
12938 : baseFor(
object, getIteratee(iteratee, 3), keysIn);
12967 function forInRight(
object, iteratee) {
12968 return object == null
12970 : baseForRight(
object, getIteratee(iteratee, 3), keysIn);
13001 function forOwn(
object, iteratee) {
13002 return object && baseForOwn(
object, getIteratee(iteratee, 3));
13031 function forOwnRight(
object, iteratee) {
13032 return object && baseForOwnRight(
object, getIteratee(iteratee, 3));
13058 function functions(
object) {
13059 return object == null ? [] : baseFunctions(
object, keys(
object));
13085 function functionsIn(
object) {
13086 return object == null ? [] : baseFunctions(
object, keysIn(
object));
13114 function get(object, path, defaultValue) {
13115 var result =
object == null ? undefined : baseGet(
object, path);
13116 return result === undefined ? defaultValue : result;
13146 function has(
object, path) {
13147 return object != null && hasPath(
object, path, baseHas);
13176 function hasIn(
object, path) {
13177 return object != null && hasPath(
object, path, baseHasIn);
13198 var invert = createInverter(
function(result, value, key) {
13199 result[value] = key;
13200 }, constant(identity));
13228 var invertBy = createInverter(
function(result, value, key) {
13229 if (hasOwnProperty.call(result, value)) {
13230 result[value].push(key);
13232 result[value] = [key];
13254 var invoke = baseRest(baseInvoke);
13284 function keys(
object) {
13285 return isArrayLike(
object) ? arrayLikeKeys(
object) : baseKeys(object);
13311 function keysIn(
object) {
13312 return isArrayLike(
object) ? arrayLikeKeys(
object,
true) : baseKeysIn(object);
13336 function mapKeys(
object, iteratee) {
13338 iteratee = getIteratee(iteratee, 3);
13340 baseForOwn(
object,
function(value, key,
object) {
13341 baseAssignValue(result, iteratee(value, key,
object), value);
13374 function mapValues(
object, iteratee) {
13376 iteratee = getIteratee(iteratee, 3);
13378 baseForOwn(
object,
function(value, key,
object) {
13379 baseAssignValue(result, key, iteratee(value, key,
object));
13415 var merge = createAssigner(
function(
object, source, srcIndex) {
13416 baseMerge(
object, source, srcIndex);
13450 var mergeWith = createAssigner(
function(
object, source, srcIndex, customizer) {
13451 baseMerge(
object, source, srcIndex, customizer);
13474 var omit = flatRest(
function(
object, paths) {
13476 if (
object == null) {
13479 var isDeep =
false;
13480 paths = arrayMap(paths,
function(path) {
13481 path = castPath(path,
object);
13482 isDeep || (isDeep = path.length > 1);
13485 copyObject(
object, getAllKeysIn(
object), result);
13487 result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
13489 var length = paths.length;
13491 baseUnset(result, paths[length]);
13516 function omitBy(
object, predicate) {
13517 return pickBy(
object, negate(getIteratee(predicate)));
13537 var pick = flatRest(
function(
object, paths) {
13538 return object == null ? {} : basePick(
object, paths);
13559 function pickBy(
object, predicate) {
13560 if (
object == null) {
13563 var props = arrayMap(getAllKeysIn(
object),
function(prop) {
13566 predicate = getIteratee(predicate);
13567 return basePickBy(
object, props,
function(value, path) {
13568 return predicate(value, path[0]);
13601 function result(
object, path, defaultValue) {
13602 path = castPath(path,
object);
13605 length = path.length;
13610 object = undefined;
13612 while (++index < length) {
13613 var value =
object == null ? undefined :
object[toKey(path[index])];
13614 if (value === undefined) {
13616 value = defaultValue;
13618 object = isFunction(value) ? value.call(
object) : value;
13651 function set(
object, path, value) {
13652 return object == null ?
object : baseSet(
object, path, value);
13679 function setWith(
object, path, value, customizer) {
13680 customizer = typeof customizer ==
'function' ? customizer : undefined;
13681 return object == null ?
object : baseSet(
object, path, value, customizer);
13708 var toPairs = createToPairs(keys);
13734 var toPairsIn = createToPairs(keysIn);
13766 function transform(
object, iteratee, accumulator) {
13767 var isArr = isArray(
object),
13768 isArrLike = isArr || isBuffer(
object) || isTypedArray(
object);
13770 iteratee = getIteratee(iteratee, 4);
13771 if (accumulator == null) {
13772 var Ctor =
object &&
object.constructor;
13774 accumulator = isArr ?
new Ctor : [];
13776 else if (isObject(
object)) {
13777 accumulator = isFunction(Ctor) ? baseCreate(getPrototype(
object)) : {};
13783 (isArrLike ? arrayEach : baseForOwn)(
object,
function(value, index,
object) {
13784 return iteratee(accumulator, value, index,
object);
13786 return accumulator;
13816 function unset(
object, path) {
13817 return object == null ?
true : baseUnset(
object, path);
13847 function update(
object, path, updater) {
13848 return object == null ?
object : baseUpdate(
object, path, castFunction(updater));
13875 function updateWith(
object, path, updater, customizer) {
13876 customizer = typeof customizer ==
'function' ? customizer : undefined;
13877 return object == null ?
object : baseUpdate(
object, path, castFunction(updater), customizer);
13906 function values(
object) {
13907 return object == null ? [] : baseValues(
object, keys(
object));
13934 function valuesIn(
object) {
13935 return object == null ? [] : baseValues(
object, keysIn(
object));
13959 function clamp(number, lower, upper) {
13960 if (upper === undefined) {
13964 if (upper !== undefined) {
13965 upper = toNumber(upper);
13966 upper = upper === upper ? upper : 0;
13968 if (lower !== undefined) {
13969 lower = toNumber(lower);
13970 lower = lower === lower ? lower : 0;
13972 return baseClamp(toNumber(number), lower, upper);
14013 function inRange(number, start, end) {
14014 start = toFinite(start);
14015 if (end === undefined) {
14019 end = toFinite(end);
14021 number = toNumber(number);
14022 return baseInRange(number, start, end);
14056 function random(lower, upper, floating) {
14057 if (floating && typeof floating !=
'boolean' && isIterateeCall(lower, upper, floating)) {
14058 upper = floating = undefined;
14060 if (floating === undefined) {
14061 if (typeof upper ==
'boolean') {
14065 else if (typeof lower ==
'boolean') {
14070 if (lower === undefined && upper === undefined) {
14075 lower = toFinite(lower);
14076 if (upper === undefined) {
14080 upper = toFinite(upper);
14083 if (lower > upper) {
14088 if (floating || lower % 1 || upper % 1) {
14089 var rand = nativeRandom();
14090 return nativeMin(lower + (rand * (upper - lower + freeParseFloat(
'1e-' + ((rand +
'').length - 1)))), upper);
14092 return baseRandom(lower, upper);
14117 var camelCase = createCompounder(
function(result, word, index) {
14118 word = word.toLowerCase();
14119 return result + (index ? capitalize(word) : word);
14137 function capitalize(
string) {
14138 return upperFirst(toString(
string).toLowerCase());
14159 function deburr(
string) {
14160 string = toString(
string);
14161 return string &&
string.replace(reLatin, deburrLetter).replace(reComboMark,
'');
14187 function endsWith(
string, target, position) {
14188 string = toString(
string);
14189 target = baseToString(target);
14191 var length =
string.length;
14192 position = position === undefined
14194 : baseClamp(toInteger(position), 0, length);
14196 var end = position;
14197 position -= target.length;
14198 return position >= 0 &&
string.slice(position, end) == target;
14229 function escape(
string) {
14230 string = toString(
string);
14231 return (
string && reHasUnescapedHtml.test(
string))
14232 ?
string.replace(reUnescapedHtml, escapeHtmlChar)
14251 function escapeRegExp(
string) {
14252 string = toString(
string);
14253 return (
string && reHasRegExpChar.test(
string))
14254 ?
string.replace(reRegExpChar,
'\\$&')
14279 var kebabCase = createCompounder(
function(result, word, index) {
14280 return result + (index ?
'-' :
'') + word.toLowerCase();
14303 var lowerCase = createCompounder(
function(result, word, index) {
14304 return result + (index ?
' ' :
'') + word.toLowerCase();
14324 var lowerFirst = createCaseFirst(
'toLowerCase');
14349 function pad(
string, length, chars) {
14350 string = toString(
string);
14351 length = toInteger(length);
14353 var strLength = length ? stringSize(
string) : 0;
14354 if (!length || strLength >= length) {
14357 var mid = (length - strLength) / 2;
14359 createPadding(nativeFloor(mid), chars) +
14361 createPadding(nativeCeil(mid), chars)
14388 function padEnd(
string, length, chars) {
14389 string = toString(
string);
14390 length = toInteger(length);
14392 var strLength = length ? stringSize(
string) : 0;
14393 return (length && strLength < length)
14394 ? (
string + createPadding(length - strLength, chars))
14421 function padStart(
string, length, chars) {
14422 string = toString(
string);
14423 length = toInteger(length);
14425 var strLength = length ? stringSize(
string) : 0;
14426 return (length && strLength < length)
14427 ? (createPadding(length - strLength, chars) + string)
14455 function parseInt(
string, radix, guard) {
14456 if (guard || radix == null) {
14458 }
else if (radix) {
14461 return nativeParseInt(toString(
string).replace(reTrimStart,
''), radix || 0);
14486 function repeat(
string, n, guard) {
14487 if ((guard ? isIterateeCall(
string, n, guard) : n === undefined)) {
14492 return baseRepeat(toString(
string), n);
14514 function replace() {
14515 var args = arguments,
14516 string = toString(args[0]);
14518 return args.length < 3 ?
string :
string.replace(args[1], args[2]);
14542 var snakeCase = createCompounder(
function(result, word, index) {
14543 return result + (index ?
'_' :
'') + word.toLowerCase();
14565 function split(
string, separator, limit) {
14566 if (limit && typeof limit !=
'number' && isIterateeCall(
string, separator, limit)) {
14567 separator = limit = undefined;
14569 limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
14573 string = toString(
string);
14575 typeof separator ==
'string' ||
14576 (separator != null && !isRegExp(separator))
14578 separator = baseToString(separator);
14579 if (!separator && hasUnicode(
string)) {
14580 return castSlice(stringToArray(
string), 0, limit);
14583 return string.split(separator, limit);
14607 var startCase = createCompounder(
function(result, word, index) {
14608 return result + (index ?
' ' :
'') + upperFirst(word);
14634 function startsWith(
string, target, position) {
14635 string = toString(
string);
14636 position = position == null
14638 : baseClamp(toInteger(position), 0,
string.length);
14640 target = baseToString(target);
14641 return string.slice(position, position + target.length) == target;
14748 function template(string, options, guard) {
14752 var settings = lodash.templateSettings;
14754 if (guard && isIterateeCall(
string, options, guard)) {
14755 options = undefined;
14757 string = toString(
string);
14758 options = assignInWith({}, options, settings, customDefaultsAssignIn);
14760 var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
14761 importsKeys = keys(imports),
14762 importsValues = baseValues(imports, importsKeys);
14767 interpolate = options.interpolate || reNoMatch,
14768 source =
"__p += '";
14771 var reDelimiters = RegExp(
14772 (options.escape || reNoMatch).source +
'|' +
14773 interpolate.source +
'|' +
14774 (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source +
'|' +
14775 (options.evaluate || reNoMatch).source +
'|$'
14779 var sourceURL =
'//# sourceURL=' +
14780 (
'sourceURL' in options
14781 ? options.sourceURL
14782 : (
'lodash.templateSources[' + (++templateCounter) +
']')
14785 string.replace(reDelimiters,
function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
14786 interpolateValue || (interpolateValue = esTemplateValue);
14789 source +=
string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
14794 source +=
"' +\n__e(" + escapeValue +
") +\n'";
14796 if (evaluateValue) {
14797 isEvaluating =
true;
14798 source +=
"';\n" + evaluateValue +
";\n__p += '";
14800 if (interpolateValue) {
14801 source +=
"' +\n((__t = (" + interpolateValue +
")) == null ? '' : __t) +\n'";
14803 index = offset + match.length;
14814 var variable = options.variable;
14816 source =
'with (obj) {\n' + source +
'\n}\n';
14819 source = (isEvaluating ? source.replace(reEmptyStringLeading,
'') : source)
14820 .replace(reEmptyStringMiddle,
'$1')
14821 .replace(reEmptyStringTrailing,
'$1;');
14824 source =
'function(' + (variable ||
'obj') +
') {\n' +
14827 :
'obj || (obj = {});\n'
14829 "var __t, __p = ''" +
14831 ?
', __e = _.escape'
14835 ?
', __j = Array.prototype.join;\n' +
14836 "function print() { __p += __j.call(arguments, '') }\n"
14842 var result = attempt(
function() {
14843 return Function(importsKeys, sourceURL +
'return ' + source)
14844 .apply(undefined, importsValues);
14849 result.source = source;
14850 if (isError(result)) {
14877 function toLower(value) {
14878 return toString(value).toLowerCase();
14902 function toUpper(value) {
14903 return toString(value).toUpperCase();
14928 function trim(
string, chars, guard) {
14929 string = toString(
string);
14930 if (
string && (guard || chars === undefined)) {
14931 return string.replace(reTrim,
'');
14933 if (!
string || !(chars = baseToString(chars))) {
14936 var strSymbols = stringToArray(
string),
14937 chrSymbols = stringToArray(chars),
14938 start = charsStartIndex(strSymbols, chrSymbols),
14939 end = charsEndIndex(strSymbols, chrSymbols) + 1;
14941 return castSlice(strSymbols, start, end).join(
'');
14963 function trimEnd(
string, chars, guard) {
14964 string = toString(
string);
14965 if (
string && (guard || chars === undefined)) {
14966 return string.replace(reTrimEnd,
'');
14968 if (!
string || !(chars = baseToString(chars))) {
14971 var strSymbols = stringToArray(
string),
14972 end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
14974 return castSlice(strSymbols, 0, end).join(
'');
14996 function trimStart(
string, chars, guard) {
14997 string = toString(
string);
14998 if (
string && (guard || chars === undefined)) {
14999 return string.replace(reTrimStart,
'');
15001 if (!
string || !(chars = baseToString(chars))) {
15004 var strSymbols = stringToArray(
string),
15005 start = charsStartIndex(strSymbols, stringToArray(chars));
15007 return castSlice(strSymbols, start).join(
'');
15047 function truncate(
string, options) {
15048 var length = DEFAULT_TRUNC_LENGTH,
15049 omission = DEFAULT_TRUNC_OMISSION;
15051 if (isObject(options)) {
15052 var separator =
'separator' in options ? options.separator : separator;
15053 length =
'length' in options ? toInteger(options.length) : length;
15054 omission =
'omission' in options ? baseToString(options.omission) : omission;
15056 string = toString(
string);
15058 var strLength =
string.length;
15059 if (hasUnicode(
string)) {
15060 var strSymbols = stringToArray(
string);
15061 strLength = strSymbols.length;
15063 if (length >= strLength) {
15066 var end = length - stringSize(omission);
15070 var result = strSymbols
15071 ? castSlice(strSymbols, 0, end).join(
'')
15072 :
string.slice(0, end);
15074 if (separator === undefined) {
15075 return result + omission;
15078 end += (result.length - end);
15080 if (isRegExp(separator)) {
15081 if (
string.slice(end).search(separator)) {
15083 substring = result;
15085 if (!separator.global) {
15086 separator = RegExp(separator.source, toString(reFlags.exec(separator)) +
'g');
15088 separator.lastIndex = 0;
15089 while ((match = separator.exec(substring))) {
15090 var newEnd = match.index;
15092 result = result.slice(0, newEnd === undefined ? end : newEnd);
15094 }
else if (
string.indexOf(baseToString(separator), end) != end) {
15095 var index = result.lastIndexOf(separator);
15097 result = result.slice(0, index);
15100 return result + omission;
15122 function unescape(
string) {
15123 string = toString(
string);
15124 return (
string && reHasEscapedHtml.test(
string))
15125 ?
string.replace(reEscapedHtml, unescapeHtmlChar)
15149 var upperCase = createCompounder(
function(result, word, index) {
15150 return result + (index ?
' ' :
'') + word.toUpperCase();
15170 var upperFirst = createCaseFirst(
'toUpperCase');
15191 function words(
string, pattern, guard) {
15192 string = toString(
string);
15193 pattern = guard ? undefined : pattern;
15195 if (pattern === undefined) {
15196 return hasUnicodeWord(
string) ? unicodeWords(
string) : asciiWords(string);
15198 return string.match(pattern) || [];
15225 var attempt = baseRest(
function(func, args) {
15227 return apply(func, undefined, args);
15229 return isError(e) ? e :
new Error(e);
15259 var bindAll = flatRest(
function(
object, methodNames) {
15260 arrayEach(methodNames,
function(key) {
15262 baseAssignValue(
object, key, bind(
object[key],
object));
15296 function cond(pairs) {
15297 var length = pairs == null ? 0 : pairs.length,
15298 toIteratee = getIteratee();
15300 pairs = !length ? [] : arrayMap(pairs,
function(pair) {
15301 if (typeof pair[1] !=
'function') {
15302 throw new TypeError(FUNC_ERROR_TEXT);
15304 return [toIteratee(pair[0]), pair[1]];
15307 return baseRest(
function(args) {
15309 while (++index < length) {
15310 var pair = pairs[index];
15311 if (apply(pair[0],
this, args)) {
15312 return apply(pair[1],
this, args);
15342 function conforms(source) {
15343 return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
15365 function constant(value) {
15366 return function() {
15391 function defaultTo(value, defaultValue) {
15392 return (value == null || value !== value) ? defaultValue : value;
15417 var flow = createFlow();
15440 var flowRight = createFlow(
true);
15458 function identity(value) {
15504 function iteratee(func) {
15505 return baseIteratee(typeof func ==
'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
15536 function matches(source) {
15537 return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
15566 function matchesProperty(path, srcValue) {
15567 return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
15594 var method = baseRest(
function(path, args) {
15595 return function(object) {
15596 return baseInvoke(
object, path, args);
15623 var methodOf = baseRest(
function(
object, args) {
15624 return function(path) {
15625 return baseInvoke(
object, path, args);
15665 function mixin(
object, source, options) {
15666 var props = keys(source),
15667 methodNames = baseFunctions(source, props);
15669 if (options == null &&
15670 !(isObject(source) && (methodNames.length || !props.length))) {
15674 methodNames = baseFunctions(source, keys(source));
15676 var chain = !(isObject(options) &&
'chain' in options) || !!options.chain,
15677 isFunc = isFunction(
object);
15679 arrayEach(methodNames,
function(methodName) {
15680 var func = source[methodName];
15681 object[methodName] = func;
15683 object.prototype[methodName] =
function() {
15684 var chainAll = this.__chain__;
15685 if (chain || chainAll) {
15686 var result = object(this.__wrapped__),
15687 actions = result.__actions__ = copyArray(this.__actions__);
15689 actions.push({
'func': func,
'args': arguments,
'thisArg':
object });
15690 result.__chain__ = chainAll;
15693 return func.apply(
object, arrayPush([this.value()], arguments));
15714 function noConflict() {
15715 if (root._ ===
this) {
15757 function nthArg(n) {
15759 return baseRest(
function(args) {
15760 return baseNth(args, n);
15782 var over = createOver(arrayMap);
15808 var overEvery = createOver(arrayEvery);
15834 var overSome = createOver(arraySome);
15858 function property(path) {
15859 return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
15883 function propertyOf(
object) {
15884 return function(path) {
15885 return object == null ? undefined : baseGet(
object, path);
15930 var range = createRange();
15968 var rangeRight = createRange(
true);
15988 function stubArray() {
16005 function stubFalse() {
16027 function stubObject() {
16044 function stubString() {
16061 function stubTrue() {
16084 function times(n, iteratee) {
16086 if (n < 1 || n > MAX_SAFE_INTEGER) {
16089 var index = MAX_ARRAY_LENGTH,
16090 length = nativeMin(n, MAX_ARRAY_LENGTH);
16092 iteratee = getIteratee(iteratee);
16093 n -= MAX_ARRAY_LENGTH;
16095 var result = baseTimes(length, iteratee);
16096 while (++index < n) {
16119 function toPath(value) {
16120 if (isArray(value)) {
16121 return arrayMap(value, toKey);
16123 return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
16143 function uniqueId(prefix) {
16144 var
id = ++idCounter;
16145 return toString(prefix) + id;
16165 var add = createMathOperation(
function(augend, addend) {
16166 return augend + addend;
16190 var ceil = createRound(
'ceil');
16207 var divide = createMathOperation(
function(dividend, divisor) {
16208 return dividend / divisor;
16232 var floor = createRound(
'floor');
16252 function max(array) {
16253 return (array && array.length)
16254 ? baseExtremum(array, identity, baseGt)
16281 function maxBy(array, iteratee) {
16282 return (array && array.length)
16283 ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
16301 function mean(array) {
16302 return baseMean(array, identity);
16328 function meanBy(array, iteratee) {
16329 return baseMean(array, getIteratee(iteratee, 2));
16350 function min(array) {
16351 return (array && array.length)
16352 ? baseExtremum(array, identity, baseLt)
16379 function minBy(array, iteratee) {
16380 return (array && array.length)
16381 ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
16400 var multiply = createMathOperation(
function(multiplier, multiplicand) {
16401 return multiplier * multiplicand;
16425 var round = createRound(
'round');
16442 var subtract = createMathOperation(
function(minuend, subtrahend) {
16443 return minuend - subtrahend;
16460 function sum(array) {
16461 return (array && array.length)
16462 ? baseSum(array, identity)
16489 function sumBy(array, iteratee) {
16490 return (array && array.length)
16491 ? baseSum(array, getIteratee(iteratee, 2))
16498 lodash.after = after;
16500 lodash.assign = assign;
16501 lodash.assignIn = assignIn;
16502 lodash.assignInWith = assignInWith;
16503 lodash.assignWith = assignWith;
16505 lodash.before = before;
16506 lodash.bind = bind;
16507 lodash.bindAll = bindAll;
16508 lodash.bindKey = bindKey;
16509 lodash.castArray = castArray;
16510 lodash.chain = chain;
16511 lodash.chunk = chunk;
16512 lodash.compact = compact;
16513 lodash.concat = concat;
16514 lodash.cond = cond;
16515 lodash.conforms = conforms;
16516 lodash.constant = constant;
16517 lodash.countBy = countBy;
16518 lodash.create = create;
16519 lodash.curry = curry;
16520 lodash.curryRight = curryRight;
16521 lodash.debounce = debounce;
16522 lodash.defaults = defaults;
16523 lodash.defaultsDeep = defaultsDeep;
16524 lodash.defer = defer;
16525 lodash.delay = delay;
16526 lodash.difference = difference;
16527 lodash.differenceBy = differenceBy;
16528 lodash.differenceWith = differenceWith;
16529 lodash.drop = drop;
16530 lodash.dropRight = dropRight;
16531 lodash.dropRightWhile = dropRightWhile;
16532 lodash.dropWhile = dropWhile;
16533 lodash.fill = fill;
16534 lodash.filter = filter;
16535 lodash.flatMap = flatMap;
16536 lodash.flatMapDeep = flatMapDeep;
16537 lodash.flatMapDepth = flatMapDepth;
16538 lodash.flatten = flatten;
16539 lodash.flattenDeep = flattenDeep;
16540 lodash.flattenDepth = flattenDepth;
16541 lodash.flip = flip;
16542 lodash.flow = flow;
16543 lodash.flowRight = flowRight;
16544 lodash.fromPairs = fromPairs;
16545 lodash.functions = functions;
16546 lodash.functionsIn = functionsIn;
16547 lodash.groupBy = groupBy;
16548 lodash.initial = initial;
16549 lodash.intersection = intersection;
16550 lodash.intersectionBy = intersectionBy;
16551 lodash.intersectionWith = intersectionWith;
16552 lodash.invert = invert;
16553 lodash.invertBy = invertBy;
16554 lodash.invokeMap = invokeMap;
16555 lodash.iteratee = iteratee;
16556 lodash.keyBy = keyBy;
16557 lodash.keys = keys;
16558 lodash.keysIn = keysIn;
16560 lodash.mapKeys = mapKeys;
16561 lodash.mapValues = mapValues;
16562 lodash.matches = matches;
16563 lodash.matchesProperty = matchesProperty;
16564 lodash.memoize = memoize;
16565 lodash.merge = merge;
16566 lodash.mergeWith = mergeWith;
16567 lodash.method = method;
16568 lodash.methodOf = methodOf;
16569 lodash.mixin = mixin;
16570 lodash.negate = negate;
16571 lodash.nthArg = nthArg;
16572 lodash.omit = omit;
16573 lodash.omitBy = omitBy;
16574 lodash.once = once;
16575 lodash.orderBy = orderBy;
16576 lodash.over = over;
16577 lodash.overArgs = overArgs;
16578 lodash.overEvery = overEvery;
16579 lodash.overSome = overSome;
16580 lodash.partial = partial;
16581 lodash.partialRight = partialRight;
16582 lodash.partition = partition;
16583 lodash.pick = pick;
16584 lodash.pickBy = pickBy;
16585 lodash.property = property;
16586 lodash.propertyOf = propertyOf;
16587 lodash.pull = pull;
16588 lodash.pullAll = pullAll;
16589 lodash.pullAllBy = pullAllBy;
16590 lodash.pullAllWith = pullAllWith;
16591 lodash.pullAt = pullAt;
16592 lodash.range = range;
16593 lodash.rangeRight = rangeRight;
16594 lodash.rearg = rearg;
16595 lodash.reject = reject;
16596 lodash.remove =
remove;
16597 lodash.rest = rest;
16598 lodash.reverse = reverse;
16599 lodash.sampleSize = sampleSize;
16601 lodash.setWith = setWith;
16602 lodash.shuffle = shuffle;
16603 lodash.slice = slice;
16604 lodash.sortBy = sortBy;
16605 lodash.sortedUniq = sortedUniq;
16606 lodash.sortedUniqBy = sortedUniqBy;
16607 lodash.split = split;
16608 lodash.spread = spread;
16609 lodash.tail = tail;
16610 lodash.take = take;
16611 lodash.takeRight = takeRight;
16612 lodash.takeRightWhile = takeRightWhile;
16613 lodash.takeWhile = takeWhile;
16615 lodash.throttle = throttle;
16616 lodash.thru = thru;
16617 lodash.toArray = toArray;
16618 lodash.toPairs = toPairs;
16619 lodash.toPairsIn = toPairsIn;
16620 lodash.toPath = toPath;
16621 lodash.toPlainObject = toPlainObject;
16622 lodash.transform = transform;
16623 lodash.unary = unary;
16624 lodash.union =
union;
16625 lodash.unionBy = unionBy;
16626 lodash.unionWith = unionWith;
16627 lodash.uniq = uniq;
16628 lodash.uniqBy = uniqBy;
16629 lodash.uniqWith = uniqWith;
16630 lodash.unset = unset;
16631 lodash.unzip = unzip;
16632 lodash.unzipWith = unzipWith;
16633 lodash.update = update;
16634 lodash.updateWith = updateWith;
16635 lodash.values = values;
16636 lodash.valuesIn = valuesIn;
16637 lodash.without = without;
16638 lodash.words = words;
16639 lodash.wrap = wrap;
16641 lodash.xorBy = xorBy;
16642 lodash.xorWith = xorWith;
16644 lodash.zipObject = zipObject;
16645 lodash.zipObjectDeep = zipObjectDeep;
16646 lodash.zipWith = zipWith;
16649 lodash.entries = toPairs;
16650 lodash.entriesIn = toPairsIn;
16651 lodash.extend = assignIn;
16652 lodash.extendWith = assignInWith;
16655 mixin(lodash, lodash);
16661 lodash.attempt = attempt;
16662 lodash.camelCase = camelCase;
16663 lodash.capitalize = capitalize;
16664 lodash.ceil = ceil;
16665 lodash.clamp = clamp;
16666 lodash.clone = clone;
16667 lodash.cloneDeep = cloneDeep;
16668 lodash.cloneDeepWith = cloneDeepWith;
16669 lodash.cloneWith = cloneWith;
16670 lodash.conformsTo = conformsTo;
16671 lodash.deburr = deburr;
16672 lodash.defaultTo = defaultTo;
16673 lodash.divide = divide;
16674 lodash.endsWith = endsWith;
16676 lodash.escape = escape;
16677 lodash.escapeRegExp = escapeRegExp;
16678 lodash.every = every;
16679 lodash.find = find;
16680 lodash.findIndex = findIndex;
16681 lodash.findKey = findKey;
16682 lodash.findLast = findLast;
16683 lodash.findLastIndex = findLastIndex;
16684 lodash.findLastKey = findLastKey;
16685 lodash.floor = floor;
16686 lodash.forEach = forEach;
16687 lodash.forEachRight = forEachRight;
16688 lodash.forIn = forIn;
16689 lodash.forInRight = forInRight;
16690 lodash.forOwn = forOwn;
16691 lodash.forOwnRight = forOwnRight;
16696 lodash.hasIn = hasIn;
16697 lodash.head = head;
16698 lodash.identity = identity;
16699 lodash.includes = includes;
16700 lodash.indexOf = indexOf;
16701 lodash.inRange = inRange;
16702 lodash.invoke = invoke;
16703 lodash.isArguments = isArguments;
16704 lodash.isArray = isArray;
16705 lodash.isArrayBuffer = isArrayBuffer;
16706 lodash.isArrayLike = isArrayLike;
16707 lodash.isArrayLikeObject = isArrayLikeObject;
16708 lodash.isBoolean = isBoolean;
16709 lodash.isBuffer = isBuffer;
16710 lodash.isDate = isDate;
16711 lodash.isElement = isElement;
16712 lodash.isEmpty = isEmpty;
16713 lodash.isEqual = isEqual;
16714 lodash.isEqualWith = isEqualWith;
16715 lodash.isError = isError;
16716 lodash.isFinite = isFinite;
16717 lodash.isFunction = isFunction;
16718 lodash.isInteger = isInteger;
16719 lodash.isLength = isLength;
16720 lodash.isMap = isMap;
16721 lodash.isMatch = isMatch;
16722 lodash.isMatchWith = isMatchWith;
16723 lodash.isNaN = isNaN;
16724 lodash.isNative = isNative;
16725 lodash.isNil = isNil;
16726 lodash.isNull = isNull;
16727 lodash.isNumber = isNumber;
16728 lodash.isObject = isObject;
16729 lodash.isObjectLike = isObjectLike;
16730 lodash.isPlainObject = isPlainObject;
16731 lodash.isRegExp = isRegExp;
16732 lodash.isSafeInteger = isSafeInteger;
16733 lodash.isSet = isSet;
16734 lodash.isString = isString;
16735 lodash.isSymbol = isSymbol;
16736 lodash.isTypedArray = isTypedArray;
16737 lodash.isUndefined = isUndefined;
16738 lodash.isWeakMap = isWeakMap;
16739 lodash.isWeakSet = isWeakSet;
16740 lodash.join = join;
16741 lodash.kebabCase = kebabCase;
16742 lodash.last = last;
16743 lodash.lastIndexOf = lastIndexOf;
16744 lodash.lowerCase = lowerCase;
16745 lodash.lowerFirst = lowerFirst;
16749 lodash.maxBy = maxBy;
16750 lodash.mean = mean;
16751 lodash.meanBy = meanBy;
16753 lodash.minBy = minBy;
16754 lodash.stubArray = stubArray;
16755 lodash.stubFalse = stubFalse;
16756 lodash.stubObject = stubObject;
16757 lodash.stubString = stubString;
16758 lodash.stubTrue = stubTrue;
16759 lodash.multiply = multiply;
16761 lodash.noConflict = noConflict;
16762 lodash.noop = noop;
16765 lodash.padEnd = padEnd;
16766 lodash.padStart = padStart;
16767 lodash.parseInt = parseInt;
16768 lodash.random = random;
16769 lodash.reduce = reduce;
16770 lodash.reduceRight = reduceRight;
16771 lodash.repeat = repeat;
16772 lodash.replace = replace;
16773 lodash.result = result;
16774 lodash.round = round;
16775 lodash.runInContext = runInContext;
16776 lodash.sample = sample;
16777 lodash.size = size;
16778 lodash.snakeCase = snakeCase;
16779 lodash.some = some;
16780 lodash.sortedIndex = sortedIndex;
16781 lodash.sortedIndexBy = sortedIndexBy;
16782 lodash.sortedIndexOf = sortedIndexOf;
16783 lodash.sortedLastIndex = sortedLastIndex;
16784 lodash.sortedLastIndexBy = sortedLastIndexBy;
16785 lodash.sortedLastIndexOf = sortedLastIndexOf;
16786 lodash.startCase = startCase;
16787 lodash.startsWith = startsWith;
16788 lodash.subtract = subtract;
16790 lodash.sumBy = sumBy;
16791 lodash.template =
template;
16792 lodash.times = times;
16793 lodash.toFinite = toFinite;
16794 lodash.toInteger = toInteger;
16795 lodash.toLength = toLength;
16796 lodash.toLower = toLower;
16797 lodash.toNumber = toNumber;
16798 lodash.toSafeInteger = toSafeInteger;
16799 lodash.toString = toString;
16800 lodash.toUpper = toUpper;
16801 lodash.trim = trim;
16802 lodash.trimEnd = trimEnd;
16803 lodash.trimStart = trimStart;
16804 lodash.truncate = truncate;
16805 lodash.unescape = unescape;
16806 lodash.uniqueId = uniqueId;
16807 lodash.upperCase = upperCase;
16808 lodash.upperFirst = upperFirst;
16811 lodash.each = forEach;
16812 lodash.eachRight = forEachRight;
16813 lodash.first = head;
16815 mixin(lodash, (
function() {
16817 baseForOwn(lodash,
function(func, methodName) {
16818 if (!hasOwnProperty.call(lodash.prototype, methodName)) {
16819 source[methodName] = func;
16823 }()), {
'chain':
false });
16834 lodash.VERSION = VERSION;
16837 arrayEach([
'bind',
'bindKey',
'curry',
'curryRight',
'partial',
'partialRight'],
function(methodName) {
16838 lodash[methodName].placeholder = lodash;
16842 arrayEach([
'drop',
'take'],
function(methodName, index) {
16843 LazyWrapper.prototype[methodName] =
function(n) {
16844 n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
16846 var result = (this.__filtered__ && !index)
16847 ?
new LazyWrapper(
this)
16850 if (result.__filtered__) {
16851 result.__takeCount__ = nativeMin(n, result.__takeCount__);
16853 result.__views__.push({
16854 'size': nativeMin(n, MAX_ARRAY_LENGTH),
16855 'type': methodName + (result.__dir__ < 0 ?
'Right' :
'')
16861 LazyWrapper.prototype[methodName +
'Right'] =
function(n) {
16862 return this.reverse()[methodName](n).reverse();
16867 arrayEach([
'filter',
'map',
'takeWhile'],
function(methodName, index) {
16868 var type = index + 1,
16869 isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
16871 LazyWrapper.prototype[methodName] =
function(iteratee) {
16872 var result = this.clone();
16873 result.__iteratees__.push({
16874 'iteratee': getIteratee(iteratee, 3),
16877 result.__filtered__ = result.__filtered__ || isFilter;
16883 arrayEach([
'head',
'last'],
function(methodName, index) {
16884 var takeName =
'take' + (index ?
'Right' :
'');
16886 LazyWrapper.prototype[methodName] =
function() {
16887 return this[takeName](1).value()[0];
16892 arrayEach([
'initial',
'tail'],
function(methodName, index) {
16893 var dropName =
'drop' + (index ?
'' :
'Right');
16895 LazyWrapper.prototype[methodName] =
function() {
16896 return this.__filtered__ ?
new LazyWrapper(
this) : this[dropName](1);
16900 LazyWrapper.prototype.compact =
function() {
16901 return this.filter(identity);
16904 LazyWrapper.prototype.find =
function(predicate) {
16905 return this.filter(predicate).head();
16908 LazyWrapper.prototype.findLast =
function(predicate) {
16909 return this.reverse().find(predicate);
16912 LazyWrapper.prototype.invokeMap = baseRest(
function(path, args) {
16913 if (typeof path ==
'function') {
16914 return new LazyWrapper(
this);
16916 return this.map(
function(value) {
16917 return baseInvoke(value, path, args);
16921 LazyWrapper.prototype.reject =
function(predicate) {
16922 return this.filter(negate(getIteratee(predicate)));
16925 LazyWrapper.prototype.slice =
function(start, end) {
16926 start = toInteger(start);
16929 if (result.__filtered__ && (start > 0 || end < 0)) {
16930 return new LazyWrapper(result);
16933 result = result.takeRight(-start);
16934 }
else if (start) {
16935 result = result.drop(start);
16937 if (end !== undefined) {
16938 end = toInteger(end);
16939 result = end < 0 ? result.dropRight(-end) : result.take(end - start);
16944 LazyWrapper.prototype.takeRightWhile =
function(predicate) {
16945 return this.reverse().takeWhile(predicate).reverse();
16948 LazyWrapper.prototype.toArray =
function() {
16949 return this.take(MAX_ARRAY_LENGTH);
16953 baseForOwn(LazyWrapper.prototype,
function(func, methodName) {
16954 var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
16955 isTaker = /^(?:head|last)$/.test(methodName),
16956 lodashFunc = lodash[isTaker ? (
'take' + (methodName ==
'last' ?
'Right' :
'')) : methodName],
16957 retUnwrapped = isTaker || /^find/.test(methodName);
16962 lodash.prototype[methodName] =
function() {
16963 var value = this.__wrapped__,
16964 args = isTaker ? [1] : arguments,
16965 isLazy = value instanceof LazyWrapper,
16966 iteratee = args[0],
16967 useLazy = isLazy || isArray(value);
16969 var interceptor =
function(value) {
16970 var result = lodashFunc.apply(lodash, arrayPush([value], args));
16971 return (isTaker && chainAll) ? result[0] : result;
16974 if (useLazy && checkIteratee && typeof iteratee ==
'function' && iteratee.length != 1) {
16976 isLazy = useLazy =
false;
16978 var chainAll = this.__chain__,
16979 isHybrid = !!this.__actions__.length,
16980 isUnwrapped = retUnwrapped && !chainAll,
16981 onlyLazy = isLazy && !isHybrid;
16983 if (!retUnwrapped && useLazy) {
16984 value = onlyLazy ? value :
new LazyWrapper(
this);
16985 var result = func.apply(value, args);
16986 result.__actions__.push({
'func': thru,
'args': [interceptor],
'thisArg': undefined });
16987 return new LodashWrapper(result, chainAll);
16989 if (isUnwrapped && onlyLazy) {
16990 return func.apply(
this, args);
16992 result = this.thru(interceptor);
16993 return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
16998 arrayEach([
'pop',
'push',
'shift',
'sort',
'splice',
'unshift'],
function(methodName) {
16999 var func = arrayProto[methodName],
17000 chainName = /^(?:push|sort|unshift)$/.test(methodName) ?
'tap' :
'thru',
17001 retUnwrapped = /^(?:pop|shift)$/.test(methodName);
17003 lodash.prototype[methodName] =
function() {
17004 var args = arguments;
17005 if (retUnwrapped && !this.__chain__) {
17006 var value = this.value();
17007 return func.apply(isArray(value) ? value : [], args);
17009 return this[chainName](
function(value) {
17010 return func.apply(isArray(value) ? value : [], args);
17016 baseForOwn(LazyWrapper.prototype,
function(func, methodName) {
17017 var lodashFunc = lodash[methodName];
17019 var key = (lodashFunc.name +
''),
17020 names = realNames[key] || (realNames[key] = []);
17022 names.push({
'name': methodName,
'func': lodashFunc });
17026 realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
17032 LazyWrapper.prototype.clone = lazyClone;
17033 LazyWrapper.prototype.reverse = lazyReverse;
17034 LazyWrapper.prototype.value = lazyValue;
17037 lodash.prototype.at = wrapperAt;
17038 lodash.prototype.chain = wrapperChain;
17039 lodash.prototype.commit = wrapperCommit;
17040 lodash.prototype.next = wrapperNext;
17041 lodash.prototype.plant = wrapperPlant;
17042 lodash.prototype.reverse = wrapperReverse;
17043 lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
17046 lodash.prototype.first = lodash.prototype.head;
17049 lodash.prototype[symIterator] = wrapperToIterator;
17057 var _ = runInContext();
17060 if (typeof define ==
'function' && typeof define.amd ==
'object' && define.amd) {
17069 define(
function() {
17074 else if (freeModule) {
17076 (freeModule.exports = _)._ = _;