@teamix/pro 1.5.11-beta.1 → 1.5.11-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/pro.css +1 -1
  2. package/dist/pro.js +416 -62
  3. package/dist/pro.min.css +1 -1
  4. package/dist/pro.min.js +1 -1
  5. package/es/actions/index.d.ts +2 -2
  6. package/es/actions/index.js +1 -1
  7. package/es/index.d.ts +1 -1
  8. package/es/index.js +1 -1
  9. package/es/page-header/index.d.ts +2 -2
  10. package/es/page-header/index.js +1 -1
  11. package/es/sidebar/index.d.ts +2 -2
  12. package/es/sidebar/index.js +1 -1
  13. package/es/sidebar/utils/index.d.ts +2 -2
  14. package/es/skeleton/index.d.ts +2 -3
  15. package/es/skeleton/index.js +1 -2
  16. package/es/table/components/ToolBar/RefreshIcon.js +162 -24
  17. package/es/table/components/ToolBar/index.scss +17 -0
  18. package/es/table/index.d.ts +2 -3
  19. package/es/table/index.js +45 -17
  20. package/es/table/typing.d.ts +15 -1
  21. package/es/table/utils/cloneDeep.d.ts +28 -0
  22. package/es/table/utils/cloneDeep.js +1578 -0
  23. package/es/timeline/ProTimeLineItem/index.js +1 -1
  24. package/lib/actions/index.d.ts +2 -2
  25. package/lib/actions/index.js +1 -1
  26. package/lib/index.d.ts +1 -1
  27. package/lib/index.js +1 -1
  28. package/lib/page-header/index.d.ts +2 -2
  29. package/lib/page-header/index.js +1 -1
  30. package/lib/sidebar/index.d.ts +2 -2
  31. package/lib/sidebar/index.js +1 -1
  32. package/lib/sidebar/utils/index.d.ts +2 -2
  33. package/lib/skeleton/index.d.ts +2 -3
  34. package/lib/skeleton/index.js +1 -3
  35. package/lib/table/components/ToolBar/RefreshIcon.js +164 -27
  36. package/lib/table/components/ToolBar/index.scss +17 -0
  37. package/lib/table/index.d.ts +2 -3
  38. package/lib/table/index.js +45 -17
  39. package/lib/table/typing.d.ts +15 -1
  40. package/lib/table/utils/cloneDeep.d.ts +28 -0
  41. package/lib/table/utils/cloneDeep.js +1585 -0
  42. package/lib/timeline/ProTimeLineItem/index.js +1 -1
  43. package/package.json +1 -1
@@ -0,0 +1,1585 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
8
+ // @ts-nocheck
9
+ /**
10
+ * lodash (Custom Build) <https://lodash.com/>
11
+ * Build: `lodash modularize exports="npm" -o ./`
12
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
13
+ * Released under MIT license <https://lodash.com/license>
14
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
15
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
16
+ */
17
+ /** Used as the size to enable large array optimizations. */
18
+ var LARGE_ARRAY_SIZE = 200;
19
+ /** Used to stand-in for `undefined` hash values. */
20
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
21
+ /** Used as references for various `Number` constants. */
22
+ var MAX_SAFE_INTEGER = 9007199254740991;
23
+ /** `Object#toString` result references. */
24
+ var argsTag = '[object Arguments]',
25
+ arrayTag = '[object Array]',
26
+ boolTag = '[object Boolean]',
27
+ dateTag = '[object Date]',
28
+ errorTag = '[object Error]',
29
+ funcTag = '[object Function]',
30
+ genTag = '[object GeneratorFunction]',
31
+ mapTag = '[object Map]',
32
+ numberTag = '[object Number]',
33
+ objectTag = '[object Object]',
34
+ promiseTag = '[object Promise]',
35
+ regexpTag = '[object RegExp]',
36
+ setTag = '[object Set]',
37
+ stringTag = '[object String]',
38
+ symbolTag = '[object Symbol]',
39
+ weakMapTag = '[object WeakMap]';
40
+ var arrayBufferTag = '[object ArrayBuffer]',
41
+ dataViewTag = '[object DataView]',
42
+ float32Tag = '[object Float32Array]',
43
+ float64Tag = '[object Float64Array]',
44
+ int8Tag = '[object Int8Array]',
45
+ int16Tag = '[object Int16Array]',
46
+ int32Tag = '[object Int32Array]',
47
+ uint8Tag = '[object Uint8Array]',
48
+ uint8ClampedTag = '[object Uint8ClampedArray]',
49
+ uint16Tag = '[object Uint16Array]',
50
+ uint32Tag = '[object Uint32Array]';
51
+ /**
52
+ * Used to match `RegExp`
53
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
54
+ */
55
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
56
+ /** Used to match `RegExp` flags from their coerced string values. */
57
+ var reFlags = /\w*$/;
58
+ /** Used to detect host constructors (Safari). */
59
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
60
+ /** Used to detect unsigned integer values. */
61
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
62
+ /** Used to identify `toStringTag` values supported by `_.clone`. */
63
+ var cloneableTags = {};
64
+ cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
65
+ cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
66
+ /** Detect free variable `global` from Node.js. */
67
+ var freeGlobal = (typeof global === "undefined" ? "undefined" : _typeof(global)) == 'object' && global && global.Object === Object && global;
68
+ /** Detect free variable `self`. */
69
+ var freeSelf = (typeof self === "undefined" ? "undefined" : _typeof(self)) == 'object' && self && self.Object === Object && self;
70
+ /** Used as a reference to the global object. */
71
+ var root = freeGlobal || freeSelf || Function('return this')();
72
+ /** Detect free variable `exports`. */
73
+ var freeExports = (typeof exports === "undefined" ? "undefined" : _typeof(exports)) == 'object' && exports && !exports.nodeType && exports;
74
+ /** Detect free variable `module`. */
75
+ var freeModule = freeExports && (typeof module === "undefined" ? "undefined" : _typeof(module)) == 'object' && module && !module.nodeType && module;
76
+ /** Detect the popular CommonJS extension `module.exports`. */
77
+ var moduleExports = freeModule && freeModule.exports === freeExports;
78
+ /**
79
+ * Adds the key-value `pair` to `map`.
80
+ *
81
+ * @private
82
+ * @param {Object} map The map to modify.
83
+ * @param {Array} pair The key-value pair to add.
84
+ * @returns {Object} Returns `map`.
85
+ */
86
+ function addMapEntry(map, pair) {
87
+ // Don't return `map.set` because it's not chainable in IE 11.
88
+ map.set(pair[0], pair[1]);
89
+ return map;
90
+ }
91
+ /**
92
+ * Adds `value` to `set`.
93
+ *
94
+ * @private
95
+ * @param {Object} set The set to modify.
96
+ * @param {*} value The value to add.
97
+ * @returns {Object} Returns `set`.
98
+ */
99
+ function addSetEntry(set, value) {
100
+ // Don't return `set.add` because it's not chainable in IE 11.
101
+ set.add(value);
102
+ return set;
103
+ }
104
+ /**
105
+ * A specialized version of `_.forEach` for arrays without support for
106
+ * iteratee shorthands.
107
+ *
108
+ * @private
109
+ * @param {Array} [array] The array to iterate over.
110
+ * @param {Function} iteratee The function invoked per iteration.
111
+ * @returns {Array} Returns `array`.
112
+ */
113
+ function arrayEach(array, iteratee) {
114
+ var index = -1,
115
+ length = array ? array.length : 0;
116
+ while (++index < length) {
117
+ if (iteratee(array[index], index, array) === false) {
118
+ break;
119
+ }
120
+ }
121
+ return array;
122
+ }
123
+ /**
124
+ * Appends the elements of `values` to `array`.
125
+ *
126
+ * @private
127
+ * @param {Array} array The array to modify.
128
+ * @param {Array} values The values to append.
129
+ * @returns {Array} Returns `array`.
130
+ */
131
+ function arrayPush(array, values) {
132
+ var index = -1,
133
+ length = values.length,
134
+ offset = array.length;
135
+ while (++index < length) {
136
+ array[offset + index] = values[index];
137
+ }
138
+ return array;
139
+ }
140
+ /**
141
+ * A specialized version of `_.reduce` for arrays without support for
142
+ * iteratee shorthands.
143
+ *
144
+ * @private
145
+ * @param {Array} [array] The array to iterate over.
146
+ * @param {Function} iteratee The function invoked per iteration.
147
+ * @param {*} [accumulator] The initial value.
148
+ * @param {boolean} [initAccum] Specify using the first element of `array` as
149
+ * the initial value.
150
+ * @returns {*} Returns the accumulated value.
151
+ */
152
+ function arrayReduce(array, iteratee, accumulator, initAccum) {
153
+ var index = -1,
154
+ length = array ? array.length : 0;
155
+ if (initAccum && length) {
156
+ accumulator = array[++index];
157
+ }
158
+ while (++index < length) {
159
+ accumulator = iteratee(accumulator, array[index], index, array);
160
+ }
161
+ return accumulator;
162
+ }
163
+ /**
164
+ * The base implementation of `_.times` without support for iteratee shorthands
165
+ * or max array length checks.
166
+ *
167
+ * @private
168
+ * @param {number} n The number of times to invoke `iteratee`.
169
+ * @param {Function} iteratee The function invoked per iteration.
170
+ * @returns {Array} Returns the array of results.
171
+ */
172
+ function baseTimes(n, iteratee) {
173
+ var index = -1,
174
+ result = Array(n);
175
+ while (++index < n) {
176
+ result[index] = iteratee(index);
177
+ }
178
+ return result;
179
+ }
180
+ /**
181
+ * Gets the value at `key` of `object`.
182
+ *
183
+ * @private
184
+ * @param {Object} [object] The object to query.
185
+ * @param {string} key The key of the property to get.
186
+ * @returns {*} Returns the property value.
187
+ */
188
+ function getValue(object, key) {
189
+ return object == null ? undefined : object[key];
190
+ }
191
+ /**
192
+ * Checks if `value` is a host object in IE < 9.
193
+ *
194
+ * @private
195
+ * @param {*} value The value to check.
196
+ * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
197
+ */
198
+ function isHostObject(value) {
199
+ // Many host objects are `Object` objects that can coerce to strings
200
+ // despite having improperly defined `toString` methods.
201
+ var result = false;
202
+ if (value != null && typeof value.toString != 'function') {
203
+ try {
204
+ result = !!(value + '');
205
+ } catch (e) {}
206
+ }
207
+ return result;
208
+ }
209
+ /**
210
+ * Converts `map` to its key-value pairs.
211
+ *
212
+ * @private
213
+ * @param {Object} map The map to convert.
214
+ * @returns {Array} Returns the key-value pairs.
215
+ */
216
+ function mapToArray(map) {
217
+ var index = -1,
218
+ result = Array(map.size);
219
+ map.forEach(function (value, key) {
220
+ result[++index] = [key, value];
221
+ });
222
+ return result;
223
+ }
224
+ /**
225
+ * Creates a unary function that invokes `func` with its argument transformed.
226
+ *
227
+ * @private
228
+ * @param {Function} func The function to wrap.
229
+ * @param {Function} transform The argument transform.
230
+ * @returns {Function} Returns the new function.
231
+ */
232
+ function overArg(func, transform) {
233
+ return function (arg) {
234
+ return func(transform(arg));
235
+ };
236
+ }
237
+ /**
238
+ * Converts `set` to an array of its values.
239
+ *
240
+ * @private
241
+ * @param {Object} set The set to convert.
242
+ * @returns {Array} Returns the values.
243
+ */
244
+ function setToArray(set) {
245
+ var index = -1,
246
+ result = Array(set.size);
247
+ set.forEach(function (value) {
248
+ result[++index] = value;
249
+ });
250
+ return result;
251
+ }
252
+ /** Used for built-in method references. */
253
+ var arrayProto = Array.prototype,
254
+ funcProto = Function.prototype,
255
+ objectProto = Object.prototype;
256
+ /** Used to detect overreaching core-js shims. */
257
+ var coreJsData = root['__core-js_shared__'];
258
+ /** Used to detect methods masquerading as native. */
259
+ var maskSrcKey = function () {
260
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
261
+ return uid ? 'Symbol(src)_1.' + uid : '';
262
+ }();
263
+ /** Used to resolve the decompiled source of functions. */
264
+ var funcToString = funcProto.toString;
265
+ /** Used to check objects for own properties. */
266
+ var hasOwnProperty = objectProto.hasOwnProperty;
267
+ /**
268
+ * Used to resolve the
269
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
270
+ * of values.
271
+ */
272
+ var objectToString = objectProto.toString;
273
+ /** Used to detect if a method is native. */
274
+ var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
275
+ /** Built-in value references. */
276
+ var Buffer = moduleExports ? root.Buffer : undefined,
277
+ _Symbol = root.Symbol,
278
+ Uint8Array = root.Uint8Array,
279
+ getPrototype = overArg(Object.getPrototypeOf, Object),
280
+ objectCreate = Object.create,
281
+ propertyIsEnumerable = objectProto.propertyIsEnumerable,
282
+ splice = arrayProto.splice;
283
+ /* Built-in method references for those with the same name as other `lodash` methods. */
284
+ var nativeGetSymbols = Object.getOwnPropertySymbols,
285
+ nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
286
+ nativeKeys = overArg(Object.keys, Object);
287
+ /* Built-in method references that are verified to be native. */
288
+ var DataView = getNative(root, 'DataView'),
289
+ Map = getNative(root, 'Map'),
290
+ Promise = getNative(root, 'Promise'),
291
+ Set = getNative(root, 'Set'),
292
+ WeakMap = getNative(root, 'WeakMap'),
293
+ nativeCreate = getNative(Object, 'create');
294
+ /** Used to detect maps, sets, and weakmaps. */
295
+ var dataViewCtorString = toSource(DataView),
296
+ mapCtorString = toSource(Map),
297
+ promiseCtorString = toSource(Promise),
298
+ setCtorString = toSource(Set),
299
+ weakMapCtorString = toSource(WeakMap);
300
+ /** Used to convert symbols to primitives and strings. */
301
+ var symbolProto = _Symbol ? _Symbol.prototype : undefined,
302
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
303
+ /**
304
+ * Creates a hash object.
305
+ *
306
+ * @private
307
+ * @constructor
308
+ * @param {Array} [entries] The key-value pairs to cache.
309
+ */
310
+ function Hash(entries) {
311
+ var index = -1,
312
+ length = entries ? entries.length : 0;
313
+ this.clear();
314
+ while (++index < length) {
315
+ var entry = entries[index];
316
+ this.set(entry[0], entry[1]);
317
+ }
318
+ }
319
+ /**
320
+ * Removes all key-value entries from the hash.
321
+ *
322
+ * @private
323
+ * @name clear
324
+ * @memberOf Hash
325
+ */
326
+ function hashClear() {
327
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
328
+ }
329
+ /**
330
+ * Removes `key` and its value from the hash.
331
+ *
332
+ * @private
333
+ * @name delete
334
+ * @memberOf Hash
335
+ * @param {Object} hash The hash to modify.
336
+ * @param {string} key The key of the value to remove.
337
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
338
+ */
339
+ function hashDelete(key) {
340
+ return this.has(key) && delete this.__data__[key];
341
+ }
342
+ /**
343
+ * Gets the hash value for `key`.
344
+ *
345
+ * @private
346
+ * @name get
347
+ * @memberOf Hash
348
+ * @param {string} key The key of the value to get.
349
+ * @returns {*} Returns the entry value.
350
+ */
351
+ function hashGet(key) {
352
+ var data = this.__data__;
353
+ if (nativeCreate) {
354
+ var result = data[key];
355
+ return result === HASH_UNDEFINED ? undefined : result;
356
+ }
357
+ return hasOwnProperty.call(data, key) ? data[key] : undefined;
358
+ }
359
+ /**
360
+ * Checks if a hash value for `key` exists.
361
+ *
362
+ * @private
363
+ * @name has
364
+ * @memberOf Hash
365
+ * @param {string} key The key of the entry to check.
366
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
367
+ */
368
+ function hashHas(key) {
369
+ var data = this.__data__;
370
+ return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
371
+ }
372
+ /**
373
+ * Sets the hash `key` to `value`.
374
+ *
375
+ * @private
376
+ * @name set
377
+ * @memberOf Hash
378
+ * @param {string} key The key of the value to set.
379
+ * @param {*} value The value to set.
380
+ * @returns {Object} Returns the hash instance.
381
+ */
382
+ function hashSet(key, value) {
383
+ var data = this.__data__;
384
+ data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value;
385
+ return this;
386
+ }
387
+ // Add methods to `Hash`.
388
+ Hash.prototype.clear = hashClear;
389
+ Hash.prototype['delete'] = hashDelete;
390
+ Hash.prototype.get = hashGet;
391
+ Hash.prototype.has = hashHas;
392
+ Hash.prototype.set = hashSet;
393
+ /**
394
+ * Creates an list cache object.
395
+ *
396
+ * @private
397
+ * @constructor
398
+ * @param {Array} [entries] The key-value pairs to cache.
399
+ */
400
+ function ListCache(entries) {
401
+ var index = -1,
402
+ length = entries ? entries.length : 0;
403
+ this.clear();
404
+ while (++index < length) {
405
+ var entry = entries[index];
406
+ this.set(entry[0], entry[1]);
407
+ }
408
+ }
409
+ /**
410
+ * Removes all key-value entries from the list cache.
411
+ *
412
+ * @private
413
+ * @name clear
414
+ * @memberOf ListCache
415
+ */
416
+ function listCacheClear() {
417
+ this.__data__ = [];
418
+ }
419
+ /**
420
+ * Removes `key` and its value from the list cache.
421
+ *
422
+ * @private
423
+ * @name delete
424
+ * @memberOf ListCache
425
+ * @param {string} key The key of the value to remove.
426
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
427
+ */
428
+ function listCacheDelete(key) {
429
+ var data = this.__data__,
430
+ index = assocIndexOf(data, key);
431
+ if (index < 0) {
432
+ return false;
433
+ }
434
+ var lastIndex = data.length - 1;
435
+ if (index == lastIndex) {
436
+ data.pop();
437
+ } else {
438
+ splice.call(data, index, 1);
439
+ }
440
+ return true;
441
+ }
442
+ /**
443
+ * Gets the list cache value for `key`.
444
+ *
445
+ * @private
446
+ * @name get
447
+ * @memberOf ListCache
448
+ * @param {string} key The key of the value to get.
449
+ * @returns {*} Returns the entry value.
450
+ */
451
+ function listCacheGet(key) {
452
+ var data = this.__data__,
453
+ index = assocIndexOf(data, key);
454
+ return index < 0 ? undefined : data[index][1];
455
+ }
456
+ /**
457
+ * Checks if a list cache value for `key` exists.
458
+ *
459
+ * @private
460
+ * @name has
461
+ * @memberOf ListCache
462
+ * @param {string} key The key of the entry to check.
463
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
464
+ */
465
+ function listCacheHas(key) {
466
+ return assocIndexOf(this.__data__, key) > -1;
467
+ }
468
+ /**
469
+ * Sets the list cache `key` to `value`.
470
+ *
471
+ * @private
472
+ * @name set
473
+ * @memberOf ListCache
474
+ * @param {string} key The key of the value to set.
475
+ * @param {*} value The value to set.
476
+ * @returns {Object} Returns the list cache instance.
477
+ */
478
+ function listCacheSet(key, value) {
479
+ var data = this.__data__,
480
+ index = assocIndexOf(data, key);
481
+ if (index < 0) {
482
+ data.push([key, value]);
483
+ } else {
484
+ data[index][1] = value;
485
+ }
486
+ return this;
487
+ }
488
+ // Add methods to `ListCache`.
489
+ ListCache.prototype.clear = listCacheClear;
490
+ ListCache.prototype['delete'] = listCacheDelete;
491
+ ListCache.prototype.get = listCacheGet;
492
+ ListCache.prototype.has = listCacheHas;
493
+ ListCache.prototype.set = listCacheSet;
494
+ /**
495
+ * Creates a map cache object to store key-value pairs.
496
+ *
497
+ * @private
498
+ * @constructor
499
+ * @param {Array} [entries] The key-value pairs to cache.
500
+ */
501
+ function MapCache(entries) {
502
+ var index = -1,
503
+ length = entries ? entries.length : 0;
504
+ this.clear();
505
+ while (++index < length) {
506
+ var entry = entries[index];
507
+ this.set(entry[0], entry[1]);
508
+ }
509
+ }
510
+ /**
511
+ * Removes all key-value entries from the map.
512
+ *
513
+ * @private
514
+ * @name clear
515
+ * @memberOf MapCache
516
+ */
517
+ function mapCacheClear() {
518
+ this.__data__ = {
519
+ hash: new Hash(),
520
+ map: new (Map || ListCache)(),
521
+ string: new Hash()
522
+ };
523
+ }
524
+ /**
525
+ * Removes `key` and its value from the map.
526
+ *
527
+ * @private
528
+ * @name delete
529
+ * @memberOf MapCache
530
+ * @param {string} key The key of the value to remove.
531
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
532
+ */
533
+ function mapCacheDelete(key) {
534
+ return getMapData(this, key)['delete'](key);
535
+ }
536
+ /**
537
+ * Gets the map value for `key`.
538
+ *
539
+ * @private
540
+ * @name get
541
+ * @memberOf MapCache
542
+ * @param {string} key The key of the value to get.
543
+ * @returns {*} Returns the entry value.
544
+ */
545
+ function mapCacheGet(key) {
546
+ return getMapData(this, key).get(key);
547
+ }
548
+ /**
549
+ * Checks if a map value for `key` exists.
550
+ *
551
+ * @private
552
+ * @name has
553
+ * @memberOf MapCache
554
+ * @param {string} key The key of the entry to check.
555
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
556
+ */
557
+ function mapCacheHas(key) {
558
+ return getMapData(this, key).has(key);
559
+ }
560
+ /**
561
+ * Sets the map `key` to `value`.
562
+ *
563
+ * @private
564
+ * @name set
565
+ * @memberOf MapCache
566
+ * @param {string} key The key of the value to set.
567
+ * @param {*} value The value to set.
568
+ * @returns {Object} Returns the map cache instance.
569
+ */
570
+ function mapCacheSet(key, value) {
571
+ getMapData(this, key).set(key, value);
572
+ return this;
573
+ }
574
+ // Add methods to `MapCache`.
575
+ MapCache.prototype.clear = mapCacheClear;
576
+ MapCache.prototype['delete'] = mapCacheDelete;
577
+ MapCache.prototype.get = mapCacheGet;
578
+ MapCache.prototype.has = mapCacheHas;
579
+ MapCache.prototype.set = mapCacheSet;
580
+ /**
581
+ * Creates a stack cache object to store key-value pairs.
582
+ *
583
+ * @private
584
+ * @constructor
585
+ * @param {Array} [entries] The key-value pairs to cache.
586
+ */
587
+ function Stack(entries) {
588
+ this.__data__ = new ListCache(entries);
589
+ }
590
+ /**
591
+ * Removes all key-value entries from the stack.
592
+ *
593
+ * @private
594
+ * @name clear
595
+ * @memberOf Stack
596
+ */
597
+ function stackClear() {
598
+ this.__data__ = new ListCache();
599
+ }
600
+ /**
601
+ * Removes `key` and its value from the stack.
602
+ *
603
+ * @private
604
+ * @name delete
605
+ * @memberOf Stack
606
+ * @param {string} key The key of the value to remove.
607
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
608
+ */
609
+ function stackDelete(key) {
610
+ return this.__data__['delete'](key);
611
+ }
612
+ /**
613
+ * Gets the stack value for `key`.
614
+ *
615
+ * @private
616
+ * @name get
617
+ * @memberOf Stack
618
+ * @param {string} key The key of the value to get.
619
+ * @returns {*} Returns the entry value.
620
+ */
621
+ function stackGet(key) {
622
+ return this.__data__.get(key);
623
+ }
624
+ /**
625
+ * Checks if a stack value for `key` exists.
626
+ *
627
+ * @private
628
+ * @name has
629
+ * @memberOf Stack
630
+ * @param {string} key The key of the entry to check.
631
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
632
+ */
633
+ function stackHas(key) {
634
+ return this.__data__.has(key);
635
+ }
636
+ /**
637
+ * Sets the stack `key` to `value`.
638
+ *
639
+ * @private
640
+ * @name set
641
+ * @memberOf Stack
642
+ * @param {string} key The key of the value to set.
643
+ * @param {*} value The value to set.
644
+ * @returns {Object} Returns the stack cache instance.
645
+ */
646
+ function stackSet(key, value) {
647
+ var cache = this.__data__;
648
+ if (cache instanceof ListCache) {
649
+ var pairs = cache.__data__;
650
+ if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) {
651
+ pairs.push([key, value]);
652
+ return this;
653
+ }
654
+ cache = this.__data__ = new MapCache(pairs);
655
+ }
656
+ cache.set(key, value);
657
+ return this;
658
+ }
659
+ // Add methods to `Stack`.
660
+ Stack.prototype.clear = stackClear;
661
+ Stack.prototype['delete'] = stackDelete;
662
+ Stack.prototype.get = stackGet;
663
+ Stack.prototype.has = stackHas;
664
+ Stack.prototype.set = stackSet;
665
+ /**
666
+ * Creates an array of the enumerable property names of the array-like `value`.
667
+ *
668
+ * @private
669
+ * @param {*} value The value to query.
670
+ * @param {boolean} inherited Specify returning inherited property names.
671
+ * @returns {Array} Returns the array of property names.
672
+ */
673
+ function arrayLikeKeys(value, inherited) {
674
+ // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
675
+ // Safari 9 makes `arguments.length` enumerable in strict mode.
676
+ var result = isArray(value) || isArguments(value) ? baseTimes(value.length, String) : [];
677
+ var length = result.length,
678
+ skipIndexes = !!length;
679
+ for (var key in value) {
680
+ if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
681
+ result.push(key);
682
+ }
683
+ }
684
+ return result;
685
+ }
686
+ /**
687
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
688
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
689
+ * for equality comparisons.
690
+ *
691
+ * @private
692
+ * @param {Object} object The object to modify.
693
+ * @param {string} key The key of the property to assign.
694
+ * @param {*} value The value to assign.
695
+ */
696
+ function assignValue(object, key, value) {
697
+ var objValue = object[key];
698
+ if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === undefined && !(key in object)) {
699
+ object[key] = value;
700
+ }
701
+ }
702
+ /**
703
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
704
+ *
705
+ * @private
706
+ * @param {Array} array The array to inspect.
707
+ * @param {*} key The key to search for.
708
+ * @returns {number} Returns the index of the matched value, else `-1`.
709
+ */
710
+ function assocIndexOf(array, key) {
711
+ var length = array.length;
712
+ while (length--) {
713
+ if (eq(array[length][0], key)) {
714
+ return length;
715
+ }
716
+ }
717
+ return -1;
718
+ }
719
+ /**
720
+ * The base implementation of `_.assign` without support for multiple sources
721
+ * or `customizer` functions.
722
+ *
723
+ * @private
724
+ * @param {Object} object The destination object.
725
+ * @param {Object} source The source object.
726
+ * @returns {Object} Returns `object`.
727
+ */
728
+ function baseAssign(object, source) {
729
+ return object && copyObject(source, keys(source), object);
730
+ }
731
+ /**
732
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
733
+ * traversed objects.
734
+ *
735
+ * @private
736
+ * @param {*} value The value to clone.
737
+ * @param {boolean} [isDeep] Specify a deep clone.
738
+ * @param {boolean} [isFull] Specify a clone including symbols.
739
+ * @param {Function} [customizer] The function to customize cloning.
740
+ * @param {string} [key] The key of `value`.
741
+ * @param {Object} [object] The parent object of `value`.
742
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
743
+ * @returns {*} Returns the cloned value.
744
+ */
745
+ function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
746
+ var result;
747
+ if (customizer) {
748
+ result = object ? customizer(value, key, object, stack) : customizer(value);
749
+ }
750
+ if (result !== undefined) {
751
+ return result;
752
+ }
753
+ if (!isObject(value)) {
754
+ return value;
755
+ }
756
+ var isArr = isArray(value);
757
+ if (isArr) {
758
+ result = initCloneArray(value);
759
+ if (!isDeep) {
760
+ return copyArray(value, result);
761
+ }
762
+ } else {
763
+ var tag = getTag(value),
764
+ isFunc = tag == funcTag || tag == genTag;
765
+ if (isBuffer(value)) {
766
+ return cloneBuffer(value, isDeep);
767
+ }
768
+ if (tag == objectTag || tag == argsTag || isFunc && !object) {
769
+ if (isHostObject(value)) {
770
+ return object ? value : {};
771
+ }
772
+ result = initCloneObject(isFunc ? {} : value);
773
+ if (!isDeep) {
774
+ return copySymbols(value, baseAssign(result, value));
775
+ }
776
+ } else {
777
+ if (!cloneableTags[tag]) {
778
+ return object ? value : {};
779
+ }
780
+ result = initCloneByTag(value, tag, baseClone, isDeep);
781
+ }
782
+ }
783
+ // Check for circular references and return its corresponding clone.
784
+ stack || (stack = new Stack());
785
+ var stacked = stack.get(value);
786
+ if (stacked) {
787
+ return stacked;
788
+ }
789
+ stack.set(value, result);
790
+ if (!isArr) {
791
+ var props = isFull ? getAllKeys(value) : keys(value);
792
+ }
793
+ arrayEach(props || value, function (subValue, key) {
794
+ if (props) {
795
+ key = subValue;
796
+ subValue = value[key];
797
+ }
798
+ // Recursively populate clone (susceptible to call stack limits).
799
+ assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));
800
+ });
801
+ return result;
802
+ }
803
+ /**
804
+ * The base implementation of `_.create` without support for assigning
805
+ * properties to the created object.
806
+ *
807
+ * @private
808
+ * @param {Object} prototype The object to inherit from.
809
+ * @returns {Object} Returns the new object.
810
+ */
811
+ function baseCreate(proto) {
812
+ return isObject(proto) ? objectCreate(proto) : {};
813
+ }
814
+ /**
815
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
816
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
817
+ * symbols of `object`.
818
+ *
819
+ * @private
820
+ * @param {Object} object The object to query.
821
+ * @param {Function} keysFunc The function to get the keys of `object`.
822
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
823
+ * @returns {Array} Returns the array of property names and symbols.
824
+ */
825
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
826
+ var result = keysFunc(object);
827
+ return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
828
+ }
829
+ /**
830
+ * The base implementation of `getTag`.
831
+ *
832
+ * @private
833
+ * @param {*} value The value to query.
834
+ * @returns {string} Returns the `toStringTag`.
835
+ */
836
+ function baseGetTag(value) {
837
+ return objectToString.call(value);
838
+ }
839
+ /**
840
+ * The base implementation of `_.isNative` without bad shim checks.
841
+ *
842
+ * @private
843
+ * @param {*} value The value to check.
844
+ * @returns {boolean} Returns `true` if `value` is a native function,
845
+ * else `false`.
846
+ */
847
+ function baseIsNative(value) {
848
+ if (!isObject(value) || isMasked(value)) {
849
+ return false;
850
+ }
851
+ var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
852
+ return pattern.test(toSource(value));
853
+ }
854
+ /**
855
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
856
+ *
857
+ * @private
858
+ * @param {Object} object The object to query.
859
+ * @returns {Array} Returns the array of property names.
860
+ */
861
+ function baseKeys(object) {
862
+ if (!isPrototype(object)) {
863
+ return nativeKeys(object);
864
+ }
865
+ var result = [];
866
+ for (var key in Object(object)) {
867
+ if (hasOwnProperty.call(object, key) && key != 'constructor') {
868
+ result.push(key);
869
+ }
870
+ }
871
+ return result;
872
+ }
873
+ /**
874
+ * Creates a clone of `buffer`.
875
+ *
876
+ * @private
877
+ * @param {Buffer} buffer The buffer to clone.
878
+ * @param {boolean} [isDeep] Specify a deep clone.
879
+ * @returns {Buffer} Returns the cloned buffer.
880
+ */
881
+ function cloneBuffer(buffer, isDeep) {
882
+ if (isDeep) {
883
+ return buffer.slice();
884
+ }
885
+ var result = new buffer.constructor(buffer.length);
886
+ buffer.copy(result);
887
+ return result;
888
+ }
889
+ /**
890
+ * Creates a clone of `arrayBuffer`.
891
+ *
892
+ * @private
893
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
894
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
895
+ */
896
+ function cloneArrayBuffer(arrayBuffer) {
897
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
898
+ new Uint8Array(result).set(new Uint8Array(arrayBuffer));
899
+ return result;
900
+ }
901
+ /**
902
+ * Creates a clone of `dataView`.
903
+ *
904
+ * @private
905
+ * @param {Object} dataView The data view to clone.
906
+ * @param {boolean} [isDeep] Specify a deep clone.
907
+ * @returns {Object} Returns the cloned data view.
908
+ */
909
+ function cloneDataView(dataView, isDeep) {
910
+ var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
911
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
912
+ }
913
+ /**
914
+ * Creates a clone of `map`.
915
+ *
916
+ * @private
917
+ * @param {Object} map The map to clone.
918
+ * @param {Function} cloneFunc The function to clone values.
919
+ * @param {boolean} [isDeep] Specify a deep clone.
920
+ * @returns {Object} Returns the cloned map.
921
+ */
922
+ function cloneMap(map, isDeep, cloneFunc) {
923
+ var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);
924
+ return arrayReduce(array, addMapEntry, new map.constructor());
925
+ }
926
+ /**
927
+ * Creates a clone of `regexp`.
928
+ *
929
+ * @private
930
+ * @param {Object} regexp The regexp to clone.
931
+ * @returns {Object} Returns the cloned regexp.
932
+ */
933
+ function cloneRegExp(regexp) {
934
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
935
+ result.lastIndex = regexp.lastIndex;
936
+ return result;
937
+ }
938
+ /**
939
+ * Creates a clone of `set`.
940
+ *
941
+ * @private
942
+ * @param {Object} set The set to clone.
943
+ * @param {Function} cloneFunc The function to clone values.
944
+ * @param {boolean} [isDeep] Specify a deep clone.
945
+ * @returns {Object} Returns the cloned set.
946
+ */
947
+ function cloneSet(set, isDeep, cloneFunc) {
948
+ var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);
949
+ return arrayReduce(array, addSetEntry, new set.constructor());
950
+ }
951
+ /**
952
+ * Creates a clone of the `symbol` object.
953
+ *
954
+ * @private
955
+ * @param {Object} symbol The symbol object to clone.
956
+ * @returns {Object} Returns the cloned symbol object.
957
+ */
958
+ function cloneSymbol(symbol) {
959
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
960
+ }
961
+ /**
962
+ * Creates a clone of `typedArray`.
963
+ *
964
+ * @private
965
+ * @param {Object} typedArray The typed array to clone.
966
+ * @param {boolean} [isDeep] Specify a deep clone.
967
+ * @returns {Object} Returns the cloned typed array.
968
+ */
969
+ function cloneTypedArray(typedArray, isDeep) {
970
+ var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
971
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
972
+ }
973
+ /**
974
+ * Copies the values of `source` to `array`.
975
+ *
976
+ * @private
977
+ * @param {Array} source The array to copy values from.
978
+ * @param {Array} [array=[]] The array to copy values to.
979
+ * @returns {Array} Returns `array`.
980
+ */
981
+ function copyArray(source, array) {
982
+ var index = -1,
983
+ length = source.length;
984
+ array || (array = Array(length));
985
+ while (++index < length) {
986
+ array[index] = source[index];
987
+ }
988
+ return array;
989
+ }
990
+ /**
991
+ * Copies properties of `source` to `object`.
992
+ *
993
+ * @private
994
+ * @param {Object} source The object to copy properties from.
995
+ * @param {Array} props The property identifiers to copy.
996
+ * @param {Object} [object={}] The object to copy properties to.
997
+ * @param {Function} [customizer] The function to customize copied values.
998
+ * @returns {Object} Returns `object`.
999
+ */
1000
+ function copyObject(source, props, object, customizer) {
1001
+ object || (object = {});
1002
+ var index = -1,
1003
+ length = props.length;
1004
+ while (++index < length) {
1005
+ var key = props[index];
1006
+ var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined;
1007
+ assignValue(object, key, newValue === undefined ? source[key] : newValue);
1008
+ }
1009
+ return object;
1010
+ }
1011
+ /**
1012
+ * Copies own symbol properties of `source` to `object`.
1013
+ *
1014
+ * @private
1015
+ * @param {Object} source The object to copy symbols from.
1016
+ * @param {Object} [object={}] The object to copy symbols to.
1017
+ * @returns {Object} Returns `object`.
1018
+ */
1019
+ function copySymbols(source, object) {
1020
+ return copyObject(source, getSymbols(source), object);
1021
+ }
1022
+ /**
1023
+ * Creates an array of own enumerable property names and symbols of `object`.
1024
+ *
1025
+ * @private
1026
+ * @param {Object} object The object to query.
1027
+ * @returns {Array} Returns the array of property names and symbols.
1028
+ */
1029
+ function getAllKeys(object) {
1030
+ return baseGetAllKeys(object, keys, getSymbols);
1031
+ }
1032
+ /**
1033
+ * Gets the data for `map`.
1034
+ *
1035
+ * @private
1036
+ * @param {Object} map The map to query.
1037
+ * @param {string} key The reference key.
1038
+ * @returns {*} Returns the map data.
1039
+ */
1040
+ function getMapData(map, key) {
1041
+ var data = map.__data__;
1042
+ return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map;
1043
+ }
1044
+ /**
1045
+ * Gets the native function at `key` of `object`.
1046
+ *
1047
+ * @private
1048
+ * @param {Object} object The object to query.
1049
+ * @param {string} key The key of the method to get.
1050
+ * @returns {*} Returns the function if it's native, else `undefined`.
1051
+ */
1052
+ function getNative(object, key) {
1053
+ var value = getValue(object, key);
1054
+ return baseIsNative(value) ? value : undefined;
1055
+ }
1056
+ /**
1057
+ * Creates an array of the own enumerable symbol properties of `object`.
1058
+ *
1059
+ * @private
1060
+ * @param {Object} object The object to query.
1061
+ * @returns {Array} Returns the array of symbols.
1062
+ */
1063
+ var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
1064
+ /**
1065
+ * Gets the `toStringTag` of `value`.
1066
+ *
1067
+ * @private
1068
+ * @param {*} value The value to query.
1069
+ * @returns {string} Returns the `toStringTag`.
1070
+ */
1071
+ var getTag = baseGetTag;
1072
+ // Fallback for data views, maps, sets, and weak maps in IE 11,
1073
+ // for data views in Edge < 14, and promises in Node.js.
1074
+ if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
1075
+ getTag = function getTag(value) {
1076
+ var result = objectToString.call(value),
1077
+ Ctor = result == objectTag ? value.constructor : undefined,
1078
+ ctorString = Ctor ? toSource(Ctor) : undefined;
1079
+ if (ctorString) {
1080
+ switch (ctorString) {
1081
+ case dataViewCtorString:
1082
+ return dataViewTag;
1083
+ case mapCtorString:
1084
+ return mapTag;
1085
+ case promiseCtorString:
1086
+ return promiseTag;
1087
+ case setCtorString:
1088
+ return setTag;
1089
+ case weakMapCtorString:
1090
+ return weakMapTag;
1091
+ }
1092
+ }
1093
+ return result;
1094
+ };
1095
+ }
1096
+ /**
1097
+ * Initializes an array clone.
1098
+ *
1099
+ * @private
1100
+ * @param {Array} array The array to clone.
1101
+ * @returns {Array} Returns the initialized clone.
1102
+ */
1103
+ function initCloneArray(array) {
1104
+ var length = array.length,
1105
+ result = array.constructor(length);
1106
+ // Add properties assigned by `RegExp#exec`.
1107
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
1108
+ result.index = array.index;
1109
+ result.input = array.input;
1110
+ }
1111
+ return result;
1112
+ }
1113
+ /**
1114
+ * Initializes an object clone.
1115
+ *
1116
+ * @private
1117
+ * @param {Object} object The object to clone.
1118
+ * @returns {Object} Returns the initialized clone.
1119
+ */
1120
+ function initCloneObject(object) {
1121
+ return typeof object.constructor == 'function' && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
1122
+ }
1123
+ /**
1124
+ * Initializes an object clone based on its `toStringTag`.
1125
+ *
1126
+ * **Note:** This function only supports cloning values with tags of
1127
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
1128
+ *
1129
+ * @private
1130
+ * @param {Object} object The object to clone.
1131
+ * @param {string} tag The `toStringTag` of the object to clone.
1132
+ * @param {Function} cloneFunc The function to clone values.
1133
+ * @param {boolean} [isDeep] Specify a deep clone.
1134
+ * @returns {Object} Returns the initialized clone.
1135
+ */
1136
+ function initCloneByTag(object, tag, cloneFunc, isDeep) {
1137
+ var Ctor = object.constructor;
1138
+ switch (tag) {
1139
+ case arrayBufferTag:
1140
+ return cloneArrayBuffer(object);
1141
+ case boolTag:
1142
+ case dateTag:
1143
+ return new Ctor(+object);
1144
+ case dataViewTag:
1145
+ return cloneDataView(object, isDeep);
1146
+ case float32Tag:
1147
+ case float64Tag:
1148
+ case int8Tag:
1149
+ case int16Tag:
1150
+ case int32Tag:
1151
+ case uint8Tag:
1152
+ case uint8ClampedTag:
1153
+ case uint16Tag:
1154
+ case uint32Tag:
1155
+ return cloneTypedArray(object, isDeep);
1156
+ case mapTag:
1157
+ return cloneMap(object, isDeep, cloneFunc);
1158
+ case numberTag:
1159
+ case stringTag:
1160
+ return new Ctor(object);
1161
+ case regexpTag:
1162
+ return cloneRegExp(object);
1163
+ case setTag:
1164
+ return cloneSet(object, isDeep, cloneFunc);
1165
+ case symbolTag:
1166
+ return cloneSymbol(object);
1167
+ }
1168
+ }
1169
+ /**
1170
+ * Checks if `value` is a valid array-like index.
1171
+ *
1172
+ * @private
1173
+ * @param {*} value The value to check.
1174
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
1175
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
1176
+ */
1177
+ function isIndex(value, length) {
1178
+ length = length == null ? MAX_SAFE_INTEGER : length;
1179
+ return !!length && (typeof value == 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
1180
+ }
1181
+ /**
1182
+ * Checks if `value` is suitable for use as unique object key.
1183
+ *
1184
+ * @private
1185
+ * @param {*} value The value to check.
1186
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
1187
+ */
1188
+ function isKeyable(value) {
1189
+ var type = _typeof(value);
1190
+ return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null;
1191
+ }
1192
+ /**
1193
+ * Checks if `func` has its source masked.
1194
+ *
1195
+ * @private
1196
+ * @param {Function} func The function to check.
1197
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
1198
+ */
1199
+ function isMasked(func) {
1200
+ return !!maskSrcKey && maskSrcKey in func;
1201
+ }
1202
+ /**
1203
+ * Checks if `value` is likely a prototype object.
1204
+ *
1205
+ * @private
1206
+ * @param {*} value The value to check.
1207
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
1208
+ */
1209
+ function isPrototype(value) {
1210
+ var Ctor = value && value.constructor,
1211
+ proto = typeof Ctor == 'function' && Ctor.prototype || objectProto;
1212
+ return value === proto;
1213
+ }
1214
+ /**
1215
+ * Converts `func` to its source code.
1216
+ *
1217
+ * @private
1218
+ * @param {Function} func The function to process.
1219
+ * @returns {string} Returns the source code.
1220
+ */
1221
+ function toSource(func) {
1222
+ if (func != null) {
1223
+ try {
1224
+ return funcToString.call(func);
1225
+ } catch (e) {}
1226
+ try {
1227
+ return func + '';
1228
+ } catch (e) {}
1229
+ }
1230
+ return '';
1231
+ }
1232
+ /**
1233
+ * This method is like `_.clone` except that it recursively clones `value`.
1234
+ *
1235
+ * @static
1236
+ * @memberOf _
1237
+ * @since 1.0.0
1238
+ * @category Lang
1239
+ * @param {*} value The value to recursively clone.
1240
+ * @returns {*} Returns the deep cloned value.
1241
+ * @see _.clone
1242
+ * @example
1243
+ *
1244
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
1245
+ *
1246
+ * var deep = _.cloneDeep(objects);
1247
+ * console.log(deep[0] === objects[0]);
1248
+ * // => false
1249
+ */
1250
+ function cloneDeep(value) {
1251
+ return baseClone(value, true, true);
1252
+ }
1253
+ /**
1254
+ * Performs a
1255
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
1256
+ * comparison between two values to determine if they are equivalent.
1257
+ *
1258
+ * @static
1259
+ * @memberOf _
1260
+ * @since 4.0.0
1261
+ * @category Lang
1262
+ * @param {*} value The value to compare.
1263
+ * @param {*} other The other value to compare.
1264
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
1265
+ * @example
1266
+ *
1267
+ * var object = { 'a': 1 };
1268
+ * var other = { 'a': 1 };
1269
+ *
1270
+ * _.eq(object, object);
1271
+ * // => true
1272
+ *
1273
+ * _.eq(object, other);
1274
+ * // => false
1275
+ *
1276
+ * _.eq('a', 'a');
1277
+ * // => true
1278
+ *
1279
+ * _.eq('a', Object('a'));
1280
+ * // => false
1281
+ *
1282
+ * _.eq(NaN, NaN);
1283
+ * // => true
1284
+ */
1285
+ function eq(value, other) {
1286
+ return value === other || value !== value && other !== other;
1287
+ }
1288
+ /**
1289
+ * Checks if `value` is likely an `arguments` object.
1290
+ *
1291
+ * @static
1292
+ * @memberOf _
1293
+ * @since 0.1.0
1294
+ * @category Lang
1295
+ * @param {*} value The value to check.
1296
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
1297
+ * else `false`.
1298
+ * @example
1299
+ *
1300
+ * _.isArguments(function() { return arguments; }());
1301
+ * // => true
1302
+ *
1303
+ * _.isArguments([1, 2, 3]);
1304
+ * // => false
1305
+ */
1306
+ function isArguments(value) {
1307
+ // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
1308
+ return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
1309
+ }
1310
+ /**
1311
+ * Checks if `value` is classified as an `Array` object.
1312
+ *
1313
+ * @static
1314
+ * @memberOf _
1315
+ * @since 0.1.0
1316
+ * @category Lang
1317
+ * @param {*} value The value to check.
1318
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
1319
+ * @example
1320
+ *
1321
+ * _.isArray([1, 2, 3]);
1322
+ * // => true
1323
+ *
1324
+ * _.isArray(document.body.children);
1325
+ * // => false
1326
+ *
1327
+ * _.isArray('abc');
1328
+ * // => false
1329
+ *
1330
+ * _.isArray(_.noop);
1331
+ * // => false
1332
+ */
1333
+ var isArray = Array.isArray;
1334
+ /**
1335
+ * Checks if `value` is array-like. A value is considered array-like if it's
1336
+ * not a function and has a `value.length` that's an integer greater than or
1337
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
1338
+ *
1339
+ * @static
1340
+ * @memberOf _
1341
+ * @since 4.0.0
1342
+ * @category Lang
1343
+ * @param {*} value The value to check.
1344
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
1345
+ * @example
1346
+ *
1347
+ * _.isArrayLike([1, 2, 3]);
1348
+ * // => true
1349
+ *
1350
+ * _.isArrayLike(document.body.children);
1351
+ * // => true
1352
+ *
1353
+ * _.isArrayLike('abc');
1354
+ * // => true
1355
+ *
1356
+ * _.isArrayLike(_.noop);
1357
+ * // => false
1358
+ */
1359
+ function isArrayLike(value) {
1360
+ return value != null && isLength(value.length) && !isFunction(value);
1361
+ }
1362
+ /**
1363
+ * This method is like `_.isArrayLike` except that it also checks if `value`
1364
+ * is an object.
1365
+ *
1366
+ * @static
1367
+ * @memberOf _
1368
+ * @since 4.0.0
1369
+ * @category Lang
1370
+ * @param {*} value The value to check.
1371
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
1372
+ * else `false`.
1373
+ * @example
1374
+ *
1375
+ * _.isArrayLikeObject([1, 2, 3]);
1376
+ * // => true
1377
+ *
1378
+ * _.isArrayLikeObject(document.body.children);
1379
+ * // => true
1380
+ *
1381
+ * _.isArrayLikeObject('abc');
1382
+ * // => false
1383
+ *
1384
+ * _.isArrayLikeObject(_.noop);
1385
+ * // => false
1386
+ */
1387
+ function isArrayLikeObject(value) {
1388
+ return isObjectLike(value) && isArrayLike(value);
1389
+ }
1390
+ /**
1391
+ * Checks if `value` is a buffer.
1392
+ *
1393
+ * @static
1394
+ * @memberOf _
1395
+ * @since 4.3.0
1396
+ * @category Lang
1397
+ * @param {*} value The value to check.
1398
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
1399
+ * @example
1400
+ *
1401
+ * _.isBuffer(new Buffer(2));
1402
+ * // => true
1403
+ *
1404
+ * _.isBuffer(new Uint8Array(2));
1405
+ * // => false
1406
+ */
1407
+ var isBuffer = nativeIsBuffer || stubFalse;
1408
+ /**
1409
+ * Checks if `value` is classified as a `Function` object.
1410
+ *
1411
+ * @static
1412
+ * @memberOf _
1413
+ * @since 0.1.0
1414
+ * @category Lang
1415
+ * @param {*} value The value to check.
1416
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
1417
+ * @example
1418
+ *
1419
+ * _.isFunction(_);
1420
+ * // => true
1421
+ *
1422
+ * _.isFunction(/abc/);
1423
+ * // => false
1424
+ */
1425
+ function isFunction(value) {
1426
+ // The use of `Object#toString` avoids issues with the `typeof` operator
1427
+ // in Safari 8-9 which returns 'object' for typed array and other constructors.
1428
+ var tag = isObject(value) ? objectToString.call(value) : '';
1429
+ return tag == funcTag || tag == genTag;
1430
+ }
1431
+ /**
1432
+ * Checks if `value` is a valid array-like length.
1433
+ *
1434
+ * **Note:** This method is loosely based on
1435
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
1436
+ *
1437
+ * @static
1438
+ * @memberOf _
1439
+ * @since 4.0.0
1440
+ * @category Lang
1441
+ * @param {*} value The value to check.
1442
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
1443
+ * @example
1444
+ *
1445
+ * _.isLength(3);
1446
+ * // => true
1447
+ *
1448
+ * _.isLength(Number.MIN_VALUE);
1449
+ * // => false
1450
+ *
1451
+ * _.isLength(Infinity);
1452
+ * // => false
1453
+ *
1454
+ * _.isLength('3');
1455
+ * // => false
1456
+ */
1457
+ function isLength(value) {
1458
+ return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
1459
+ }
1460
+ /**
1461
+ * Checks if `value` is the
1462
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
1463
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
1464
+ *
1465
+ * @static
1466
+ * @memberOf _
1467
+ * @since 0.1.0
1468
+ * @category Lang
1469
+ * @param {*} value The value to check.
1470
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
1471
+ * @example
1472
+ *
1473
+ * _.isObject({});
1474
+ * // => true
1475
+ *
1476
+ * _.isObject([1, 2, 3]);
1477
+ * // => true
1478
+ *
1479
+ * _.isObject(_.noop);
1480
+ * // => true
1481
+ *
1482
+ * _.isObject(null);
1483
+ * // => false
1484
+ */
1485
+ function isObject(value) {
1486
+ var type = _typeof(value);
1487
+ return !!value && (type == 'object' || type == 'function');
1488
+ }
1489
+ /**
1490
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
1491
+ * and has a `typeof` result of "object".
1492
+ *
1493
+ * @static
1494
+ * @memberOf _
1495
+ * @since 4.0.0
1496
+ * @category Lang
1497
+ * @param {*} value The value to check.
1498
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
1499
+ * @example
1500
+ *
1501
+ * _.isObjectLike({});
1502
+ * // => true
1503
+ *
1504
+ * _.isObjectLike([1, 2, 3]);
1505
+ * // => true
1506
+ *
1507
+ * _.isObjectLike(_.noop);
1508
+ * // => false
1509
+ *
1510
+ * _.isObjectLike(null);
1511
+ * // => false
1512
+ */
1513
+ function isObjectLike(value) {
1514
+ return !!value && _typeof(value) == 'object';
1515
+ }
1516
+ /**
1517
+ * Creates an array of the own enumerable property names of `object`.
1518
+ *
1519
+ * **Note:** Non-object values are coerced to objects. See the
1520
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
1521
+ * for more details.
1522
+ *
1523
+ * @static
1524
+ * @since 0.1.0
1525
+ * @memberOf _
1526
+ * @category Object
1527
+ * @param {Object} object The object to query.
1528
+ * @returns {Array} Returns the array of property names.
1529
+ * @example
1530
+ *
1531
+ * function Foo() {
1532
+ * this.a = 1;
1533
+ * this.b = 2;
1534
+ * }
1535
+ *
1536
+ * Foo.prototype.c = 3;
1537
+ *
1538
+ * _.keys(new Foo);
1539
+ * // => ['a', 'b'] (iteration order is not guaranteed)
1540
+ *
1541
+ * _.keys('hi');
1542
+ * // => ['0', '1']
1543
+ */
1544
+ function keys(object) {
1545
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
1546
+ }
1547
+ /**
1548
+ * This method returns a new empty array.
1549
+ *
1550
+ * @static
1551
+ * @memberOf _
1552
+ * @since 4.13.0
1553
+ * @category Util
1554
+ * @returns {Array} Returns the new empty array.
1555
+ * @example
1556
+ *
1557
+ * var arrays = _.times(2, _.stubArray);
1558
+ *
1559
+ * console.log(arrays);
1560
+ * // => [[], []]
1561
+ *
1562
+ * console.log(arrays[0] === arrays[1]);
1563
+ * // => false
1564
+ */
1565
+ function stubArray() {
1566
+ return [];
1567
+ }
1568
+ /**
1569
+ * This method returns `false`.
1570
+ *
1571
+ * @static
1572
+ * @memberOf _
1573
+ * @since 4.13.0
1574
+ * @category Util
1575
+ * @returns {boolean} Returns `false`.
1576
+ * @example
1577
+ *
1578
+ * _.times(2, _.stubFalse);
1579
+ * // => [false, false]
1580
+ */
1581
+ function stubFalse() {
1582
+ return false;
1583
+ }
1584
+ var _default = cloneDeep;
1585
+ exports.default = _default;