@ninetailed/experience.js-gatsby 7.5.2 → 7.5.3-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.
package/gatsby-node.js CHANGED
@@ -3,11 +3,12 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var require$$0 = require('path');
6
- var _commonjsHelpers = require('./_commonjsHelpers.js');
6
+ var omit = require('lodash/omit');
7
7
 
8
8
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
9
9
 
10
10
  var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0);
11
+ var omit__default = /*#__PURE__*/_interopDefaultLegacy(omit);
11
12
 
12
13
  /******************************************************************************
13
14
  Copyright (c) Microsoft Corporation.
@@ -46,3625 +47,6 @@ function __awaiter(thisArg, _arguments, P, generator) {
46
47
  });
47
48
  }
48
49
 
49
- /**
50
- * A specialized version of `_.map` for arrays without support for iteratee
51
- * shorthands.
52
- *
53
- * @private
54
- * @param {Array} [array] The array to iterate over.
55
- * @param {Function} iteratee The function invoked per iteration.
56
- * @returns {Array} Returns the new mapped array.
57
- */
58
-
59
- function arrayMap$2(array, iteratee) {
60
- var index = -1,
61
- length = array == null ? 0 : array.length,
62
- result = Array(length);
63
-
64
- while (++index < length) {
65
- result[index] = iteratee(array[index], index, array);
66
- }
67
- return result;
68
- }
69
-
70
- var _arrayMap = arrayMap$2;
71
-
72
- /**
73
- * Removes all key-value entries from the list cache.
74
- *
75
- * @private
76
- * @name clear
77
- * @memberOf ListCache
78
- */
79
-
80
- function listCacheClear$1() {
81
- this.__data__ = [];
82
- this.size = 0;
83
- }
84
-
85
- var _listCacheClear = listCacheClear$1;
86
-
87
- /**
88
- * Performs a
89
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
90
- * comparison between two values to determine if they are equivalent.
91
- *
92
- * @static
93
- * @memberOf _
94
- * @since 4.0.0
95
- * @category Lang
96
- * @param {*} value The value to compare.
97
- * @param {*} other The other value to compare.
98
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
99
- * @example
100
- *
101
- * var object = { 'a': 1 };
102
- * var other = { 'a': 1 };
103
- *
104
- * _.eq(object, object);
105
- * // => true
106
- *
107
- * _.eq(object, other);
108
- * // => false
109
- *
110
- * _.eq('a', 'a');
111
- * // => true
112
- *
113
- * _.eq('a', Object('a'));
114
- * // => false
115
- *
116
- * _.eq(NaN, NaN);
117
- * // => true
118
- */
119
-
120
- function eq$2(value, other) {
121
- return value === other || (value !== value && other !== other);
122
- }
123
-
124
- var eq_1 = eq$2;
125
-
126
- var eq$1 = eq_1;
127
-
128
- /**
129
- * Gets the index at which the `key` is found in `array` of key-value pairs.
130
- *
131
- * @private
132
- * @param {Array} array The array to inspect.
133
- * @param {*} key The key to search for.
134
- * @returns {number} Returns the index of the matched value, else `-1`.
135
- */
136
- function assocIndexOf$4(array, key) {
137
- var length = array.length;
138
- while (length--) {
139
- if (eq$1(array[length][0], key)) {
140
- return length;
141
- }
142
- }
143
- return -1;
144
- }
145
-
146
- var _assocIndexOf = assocIndexOf$4;
147
-
148
- var assocIndexOf$3 = _assocIndexOf;
149
-
150
- /** Used for built-in method references. */
151
- var arrayProto = Array.prototype;
152
-
153
- /** Built-in value references. */
154
- var splice = arrayProto.splice;
155
-
156
- /**
157
- * Removes `key` and its value from the list cache.
158
- *
159
- * @private
160
- * @name delete
161
- * @memberOf ListCache
162
- * @param {string} key The key of the value to remove.
163
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
164
- */
165
- function listCacheDelete$1(key) {
166
- var data = this.__data__,
167
- index = assocIndexOf$3(data, key);
168
-
169
- if (index < 0) {
170
- return false;
171
- }
172
- var lastIndex = data.length - 1;
173
- if (index == lastIndex) {
174
- data.pop();
175
- } else {
176
- splice.call(data, index, 1);
177
- }
178
- --this.size;
179
- return true;
180
- }
181
-
182
- var _listCacheDelete = listCacheDelete$1;
183
-
184
- var assocIndexOf$2 = _assocIndexOf;
185
-
186
- /**
187
- * Gets the list cache value for `key`.
188
- *
189
- * @private
190
- * @name get
191
- * @memberOf ListCache
192
- * @param {string} key The key of the value to get.
193
- * @returns {*} Returns the entry value.
194
- */
195
- function listCacheGet$1(key) {
196
- var data = this.__data__,
197
- index = assocIndexOf$2(data, key);
198
-
199
- return index < 0 ? undefined : data[index][1];
200
- }
201
-
202
- var _listCacheGet = listCacheGet$1;
203
-
204
- var assocIndexOf$1 = _assocIndexOf;
205
-
206
- /**
207
- * Checks if a list cache value for `key` exists.
208
- *
209
- * @private
210
- * @name has
211
- * @memberOf ListCache
212
- * @param {string} key The key of the entry to check.
213
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
214
- */
215
- function listCacheHas$1(key) {
216
- return assocIndexOf$1(this.__data__, key) > -1;
217
- }
218
-
219
- var _listCacheHas = listCacheHas$1;
220
-
221
- var assocIndexOf = _assocIndexOf;
222
-
223
- /**
224
- * Sets the list cache `key` to `value`.
225
- *
226
- * @private
227
- * @name set
228
- * @memberOf ListCache
229
- * @param {string} key The key of the value to set.
230
- * @param {*} value The value to set.
231
- * @returns {Object} Returns the list cache instance.
232
- */
233
- function listCacheSet$1(key, value) {
234
- var data = this.__data__,
235
- index = assocIndexOf(data, key);
236
-
237
- if (index < 0) {
238
- ++this.size;
239
- data.push([key, value]);
240
- } else {
241
- data[index][1] = value;
242
- }
243
- return this;
244
- }
245
-
246
- var _listCacheSet = listCacheSet$1;
247
-
248
- var listCacheClear = _listCacheClear,
249
- listCacheDelete = _listCacheDelete,
250
- listCacheGet = _listCacheGet,
251
- listCacheHas = _listCacheHas,
252
- listCacheSet = _listCacheSet;
253
-
254
- /**
255
- * Creates an list cache object.
256
- *
257
- * @private
258
- * @constructor
259
- * @param {Array} [entries] The key-value pairs to cache.
260
- */
261
- function ListCache$4(entries) {
262
- var index = -1,
263
- length = entries == null ? 0 : entries.length;
264
-
265
- this.clear();
266
- while (++index < length) {
267
- var entry = entries[index];
268
- this.set(entry[0], entry[1]);
269
- }
270
- }
271
-
272
- // Add methods to `ListCache`.
273
- ListCache$4.prototype.clear = listCacheClear;
274
- ListCache$4.prototype['delete'] = listCacheDelete;
275
- ListCache$4.prototype.get = listCacheGet;
276
- ListCache$4.prototype.has = listCacheHas;
277
- ListCache$4.prototype.set = listCacheSet;
278
-
279
- var _ListCache = ListCache$4;
280
-
281
- var ListCache$3 = _ListCache;
282
-
283
- /**
284
- * Removes all key-value entries from the stack.
285
- *
286
- * @private
287
- * @name clear
288
- * @memberOf Stack
289
- */
290
- function stackClear$1() {
291
- this.__data__ = new ListCache$3;
292
- this.size = 0;
293
- }
294
-
295
- var _stackClear = stackClear$1;
296
-
297
- /**
298
- * Removes `key` and its value from the stack.
299
- *
300
- * @private
301
- * @name delete
302
- * @memberOf Stack
303
- * @param {string} key The key of the value to remove.
304
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
305
- */
306
-
307
- function stackDelete$1(key) {
308
- var data = this.__data__,
309
- result = data['delete'](key);
310
-
311
- this.size = data.size;
312
- return result;
313
- }
314
-
315
- var _stackDelete = stackDelete$1;
316
-
317
- /**
318
- * Gets the stack value for `key`.
319
- *
320
- * @private
321
- * @name get
322
- * @memberOf Stack
323
- * @param {string} key The key of the value to get.
324
- * @returns {*} Returns the entry value.
325
- */
326
-
327
- function stackGet$1(key) {
328
- return this.__data__.get(key);
329
- }
330
-
331
- var _stackGet = stackGet$1;
332
-
333
- /**
334
- * Checks if a stack value for `key` exists.
335
- *
336
- * @private
337
- * @name has
338
- * @memberOf Stack
339
- * @param {string} key The key of the entry to check.
340
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
341
- */
342
-
343
- function stackHas$1(key) {
344
- return this.__data__.has(key);
345
- }
346
-
347
- var _stackHas = stackHas$1;
348
-
349
- /** Detect free variable `global` from Node.js. */
350
-
351
- var freeGlobal$1 = typeof _commonjsHelpers.commonjsGlobal == 'object' && _commonjsHelpers.commonjsGlobal && _commonjsHelpers.commonjsGlobal.Object === Object && _commonjsHelpers.commonjsGlobal;
352
-
353
- var _freeGlobal = freeGlobal$1;
354
-
355
- var freeGlobal = _freeGlobal;
356
-
357
- /** Detect free variable `self`. */
358
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
359
-
360
- /** Used as a reference to the global object. */
361
- var root$8 = freeGlobal || freeSelf || Function('return this')();
362
-
363
- var _root = root$8;
364
-
365
- var root$7 = _root;
366
-
367
- /** Built-in value references. */
368
- var Symbol$5 = root$7.Symbol;
369
-
370
- var _Symbol = Symbol$5;
371
-
372
- var Symbol$4 = _Symbol;
373
-
374
- /** Used for built-in method references. */
375
- var objectProto$d = Object.prototype;
376
-
377
- /** Used to check objects for own properties. */
378
- var hasOwnProperty$a = objectProto$d.hasOwnProperty;
379
-
380
- /**
381
- * Used to resolve the
382
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
383
- * of values.
384
- */
385
- var nativeObjectToString$1 = objectProto$d.toString;
386
-
387
- /** Built-in value references. */
388
- var symToStringTag$1 = Symbol$4 ? Symbol$4.toStringTag : undefined;
389
-
390
- /**
391
- * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
392
- *
393
- * @private
394
- * @param {*} value The value to query.
395
- * @returns {string} Returns the raw `toStringTag`.
396
- */
397
- function getRawTag$1(value) {
398
- var isOwn = hasOwnProperty$a.call(value, symToStringTag$1),
399
- tag = value[symToStringTag$1];
400
-
401
- try {
402
- value[symToStringTag$1] = undefined;
403
- var unmasked = true;
404
- } catch (e) {}
405
-
406
- var result = nativeObjectToString$1.call(value);
407
- if (unmasked) {
408
- if (isOwn) {
409
- value[symToStringTag$1] = tag;
410
- } else {
411
- delete value[symToStringTag$1];
412
- }
413
- }
414
- return result;
415
- }
416
-
417
- var _getRawTag = getRawTag$1;
418
-
419
- /** Used for built-in method references. */
420
-
421
- var objectProto$c = Object.prototype;
422
-
423
- /**
424
- * Used to resolve the
425
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
426
- * of values.
427
- */
428
- var nativeObjectToString = objectProto$c.toString;
429
-
430
- /**
431
- * Converts `value` to a string using `Object.prototype.toString`.
432
- *
433
- * @private
434
- * @param {*} value The value to convert.
435
- * @returns {string} Returns the converted string.
436
- */
437
- function objectToString$1(value) {
438
- return nativeObjectToString.call(value);
439
- }
440
-
441
- var _objectToString = objectToString$1;
442
-
443
- var Symbol$3 = _Symbol,
444
- getRawTag = _getRawTag,
445
- objectToString = _objectToString;
446
-
447
- /** `Object#toString` result references. */
448
- var nullTag = '[object Null]',
449
- undefinedTag = '[object Undefined]';
450
-
451
- /** Built-in value references. */
452
- var symToStringTag = Symbol$3 ? Symbol$3.toStringTag : undefined;
453
-
454
- /**
455
- * The base implementation of `getTag` without fallbacks for buggy environments.
456
- *
457
- * @private
458
- * @param {*} value The value to query.
459
- * @returns {string} Returns the `toStringTag`.
460
- */
461
- function baseGetTag$6(value) {
462
- if (value == null) {
463
- return value === undefined ? undefinedTag : nullTag;
464
- }
465
- return (symToStringTag && symToStringTag in Object(value))
466
- ? getRawTag(value)
467
- : objectToString(value);
468
- }
469
-
470
- var _baseGetTag = baseGetTag$6;
471
-
472
- /**
473
- * Checks if `value` is the
474
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
475
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
476
- *
477
- * @static
478
- * @memberOf _
479
- * @since 0.1.0
480
- * @category Lang
481
- * @param {*} value The value to check.
482
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
483
- * @example
484
- *
485
- * _.isObject({});
486
- * // => true
487
- *
488
- * _.isObject([1, 2, 3]);
489
- * // => true
490
- *
491
- * _.isObject(_.noop);
492
- * // => true
493
- *
494
- * _.isObject(null);
495
- * // => false
496
- */
497
-
498
- function isObject$5(value) {
499
- var type = typeof value;
500
- return value != null && (type == 'object' || type == 'function');
501
- }
502
-
503
- var isObject_1 = isObject$5;
504
-
505
- var baseGetTag$5 = _baseGetTag,
506
- isObject$4 = isObject_1;
507
-
508
- /** `Object#toString` result references. */
509
- var asyncTag = '[object AsyncFunction]',
510
- funcTag$2 = '[object Function]',
511
- genTag$1 = '[object GeneratorFunction]',
512
- proxyTag = '[object Proxy]';
513
-
514
- /**
515
- * Checks if `value` is classified as a `Function` object.
516
- *
517
- * @static
518
- * @memberOf _
519
- * @since 0.1.0
520
- * @category Lang
521
- * @param {*} value The value to check.
522
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
523
- * @example
524
- *
525
- * _.isFunction(_);
526
- * // => true
527
- *
528
- * _.isFunction(/abc/);
529
- * // => false
530
- */
531
- function isFunction$2(value) {
532
- if (!isObject$4(value)) {
533
- return false;
534
- }
535
- // The use of `Object#toString` avoids issues with the `typeof` operator
536
- // in Safari 9 which returns 'object' for typed arrays and other constructors.
537
- var tag = baseGetTag$5(value);
538
- return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
539
- }
540
-
541
- var isFunction_1 = isFunction$2;
542
-
543
- var root$6 = _root;
544
-
545
- /** Used to detect overreaching core-js shims. */
546
- var coreJsData$1 = root$6['__core-js_shared__'];
547
-
548
- var _coreJsData = coreJsData$1;
549
-
550
- var coreJsData = _coreJsData;
551
-
552
- /** Used to detect methods masquerading as native. */
553
- var maskSrcKey = (function() {
554
- var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
555
- return uid ? ('Symbol(src)_1.' + uid) : '';
556
- }());
557
-
558
- /**
559
- * Checks if `func` has its source masked.
560
- *
561
- * @private
562
- * @param {Function} func The function to check.
563
- * @returns {boolean} Returns `true` if `func` is masked, else `false`.
564
- */
565
- function isMasked$1(func) {
566
- return !!maskSrcKey && (maskSrcKey in func);
567
- }
568
-
569
- var _isMasked = isMasked$1;
570
-
571
- /** Used for built-in method references. */
572
-
573
- var funcProto$2 = Function.prototype;
574
-
575
- /** Used to resolve the decompiled source of functions. */
576
- var funcToString$2 = funcProto$2.toString;
577
-
578
- /**
579
- * Converts `func` to its source code.
580
- *
581
- * @private
582
- * @param {Function} func The function to convert.
583
- * @returns {string} Returns the source code.
584
- */
585
- function toSource$2(func) {
586
- if (func != null) {
587
- try {
588
- return funcToString$2.call(func);
589
- } catch (e) {}
590
- try {
591
- return (func + '');
592
- } catch (e) {}
593
- }
594
- return '';
595
- }
596
-
597
- var _toSource = toSource$2;
598
-
599
- var isFunction$1 = isFunction_1,
600
- isMasked = _isMasked,
601
- isObject$3 = isObject_1,
602
- toSource$1 = _toSource;
603
-
604
- /**
605
- * Used to match `RegExp`
606
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
607
- */
608
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
609
-
610
- /** Used to detect host constructors (Safari). */
611
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
612
-
613
- /** Used for built-in method references. */
614
- var funcProto$1 = Function.prototype,
615
- objectProto$b = Object.prototype;
616
-
617
- /** Used to resolve the decompiled source of functions. */
618
- var funcToString$1 = funcProto$1.toString;
619
-
620
- /** Used to check objects for own properties. */
621
- var hasOwnProperty$9 = objectProto$b.hasOwnProperty;
622
-
623
- /** Used to detect if a method is native. */
624
- var reIsNative = RegExp('^' +
625
- funcToString$1.call(hasOwnProperty$9).replace(reRegExpChar, '\\$&')
626
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
627
- );
628
-
629
- /**
630
- * The base implementation of `_.isNative` without bad shim checks.
631
- *
632
- * @private
633
- * @param {*} value The value to check.
634
- * @returns {boolean} Returns `true` if `value` is a native function,
635
- * else `false`.
636
- */
637
- function baseIsNative$1(value) {
638
- if (!isObject$3(value) || isMasked(value)) {
639
- return false;
640
- }
641
- var pattern = isFunction$1(value) ? reIsNative : reIsHostCtor;
642
- return pattern.test(toSource$1(value));
643
- }
644
-
645
- var _baseIsNative = baseIsNative$1;
646
-
647
- /**
648
- * Gets the value at `key` of `object`.
649
- *
650
- * @private
651
- * @param {Object} [object] The object to query.
652
- * @param {string} key The key of the property to get.
653
- * @returns {*} Returns the property value.
654
- */
655
-
656
- function getValue$1(object, key) {
657
- return object == null ? undefined : object[key];
658
- }
659
-
660
- var _getValue = getValue$1;
661
-
662
- var baseIsNative = _baseIsNative,
663
- getValue = _getValue;
664
-
665
- /**
666
- * Gets the native function at `key` of `object`.
667
- *
668
- * @private
669
- * @param {Object} object The object to query.
670
- * @param {string} key The key of the method to get.
671
- * @returns {*} Returns the function if it's native, else `undefined`.
672
- */
673
- function getNative$7(object, key) {
674
- var value = getValue(object, key);
675
- return baseIsNative(value) ? value : undefined;
676
- }
677
-
678
- var _getNative = getNative$7;
679
-
680
- var getNative$6 = _getNative,
681
- root$5 = _root;
682
-
683
- /* Built-in method references that are verified to be native. */
684
- var Map$3 = getNative$6(root$5, 'Map');
685
-
686
- var _Map = Map$3;
687
-
688
- var getNative$5 = _getNative;
689
-
690
- /* Built-in method references that are verified to be native. */
691
- var nativeCreate$4 = getNative$5(Object, 'create');
692
-
693
- var _nativeCreate = nativeCreate$4;
694
-
695
- var nativeCreate$3 = _nativeCreate;
696
-
697
- /**
698
- * Removes all key-value entries from the hash.
699
- *
700
- * @private
701
- * @name clear
702
- * @memberOf Hash
703
- */
704
- function hashClear$1() {
705
- this.__data__ = nativeCreate$3 ? nativeCreate$3(null) : {};
706
- this.size = 0;
707
- }
708
-
709
- var _hashClear = hashClear$1;
710
-
711
- /**
712
- * Removes `key` and its value from the hash.
713
- *
714
- * @private
715
- * @name delete
716
- * @memberOf Hash
717
- * @param {Object} hash The hash to modify.
718
- * @param {string} key The key of the value to remove.
719
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
720
- */
721
-
722
- function hashDelete$1(key) {
723
- var result = this.has(key) && delete this.__data__[key];
724
- this.size -= result ? 1 : 0;
725
- return result;
726
- }
727
-
728
- var _hashDelete = hashDelete$1;
729
-
730
- var nativeCreate$2 = _nativeCreate;
731
-
732
- /** Used to stand-in for `undefined` hash values. */
733
- var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
734
-
735
- /** Used for built-in method references. */
736
- var objectProto$a = Object.prototype;
737
-
738
- /** Used to check objects for own properties. */
739
- var hasOwnProperty$8 = objectProto$a.hasOwnProperty;
740
-
741
- /**
742
- * Gets the hash value for `key`.
743
- *
744
- * @private
745
- * @name get
746
- * @memberOf Hash
747
- * @param {string} key The key of the value to get.
748
- * @returns {*} Returns the entry value.
749
- */
750
- function hashGet$1(key) {
751
- var data = this.__data__;
752
- if (nativeCreate$2) {
753
- var result = data[key];
754
- return result === HASH_UNDEFINED$1 ? undefined : result;
755
- }
756
- return hasOwnProperty$8.call(data, key) ? data[key] : undefined;
757
- }
758
-
759
- var _hashGet = hashGet$1;
760
-
761
- var nativeCreate$1 = _nativeCreate;
762
-
763
- /** Used for built-in method references. */
764
- var objectProto$9 = Object.prototype;
765
-
766
- /** Used to check objects for own properties. */
767
- var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
768
-
769
- /**
770
- * Checks if a hash value for `key` exists.
771
- *
772
- * @private
773
- * @name has
774
- * @memberOf Hash
775
- * @param {string} key The key of the entry to check.
776
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
777
- */
778
- function hashHas$1(key) {
779
- var data = this.__data__;
780
- return nativeCreate$1 ? (data[key] !== undefined) : hasOwnProperty$7.call(data, key);
781
- }
782
-
783
- var _hashHas = hashHas$1;
784
-
785
- var nativeCreate = _nativeCreate;
786
-
787
- /** Used to stand-in for `undefined` hash values. */
788
- var HASH_UNDEFINED = '__lodash_hash_undefined__';
789
-
790
- /**
791
- * Sets the hash `key` to `value`.
792
- *
793
- * @private
794
- * @name set
795
- * @memberOf Hash
796
- * @param {string} key The key of the value to set.
797
- * @param {*} value The value to set.
798
- * @returns {Object} Returns the hash instance.
799
- */
800
- function hashSet$1(key, value) {
801
- var data = this.__data__;
802
- this.size += this.has(key) ? 0 : 1;
803
- data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
804
- return this;
805
- }
806
-
807
- var _hashSet = hashSet$1;
808
-
809
- var hashClear = _hashClear,
810
- hashDelete = _hashDelete,
811
- hashGet = _hashGet,
812
- hashHas = _hashHas,
813
- hashSet = _hashSet;
814
-
815
- /**
816
- * Creates a hash object.
817
- *
818
- * @private
819
- * @constructor
820
- * @param {Array} [entries] The key-value pairs to cache.
821
- */
822
- function Hash$1(entries) {
823
- var index = -1,
824
- length = entries == null ? 0 : entries.length;
825
-
826
- this.clear();
827
- while (++index < length) {
828
- var entry = entries[index];
829
- this.set(entry[0], entry[1]);
830
- }
831
- }
832
-
833
- // Add methods to `Hash`.
834
- Hash$1.prototype.clear = hashClear;
835
- Hash$1.prototype['delete'] = hashDelete;
836
- Hash$1.prototype.get = hashGet;
837
- Hash$1.prototype.has = hashHas;
838
- Hash$1.prototype.set = hashSet;
839
-
840
- var _Hash = Hash$1;
841
-
842
- var Hash = _Hash,
843
- ListCache$2 = _ListCache,
844
- Map$2 = _Map;
845
-
846
- /**
847
- * Removes all key-value entries from the map.
848
- *
849
- * @private
850
- * @name clear
851
- * @memberOf MapCache
852
- */
853
- function mapCacheClear$1() {
854
- this.size = 0;
855
- this.__data__ = {
856
- 'hash': new Hash,
857
- 'map': new (Map$2 || ListCache$2),
858
- 'string': new Hash
859
- };
860
- }
861
-
862
- var _mapCacheClear = mapCacheClear$1;
863
-
864
- /**
865
- * Checks if `value` is suitable for use as unique object key.
866
- *
867
- * @private
868
- * @param {*} value The value to check.
869
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
870
- */
871
-
872
- function isKeyable$1(value) {
873
- var type = typeof value;
874
- return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
875
- ? (value !== '__proto__')
876
- : (value === null);
877
- }
878
-
879
- var _isKeyable = isKeyable$1;
880
-
881
- var isKeyable = _isKeyable;
882
-
883
- /**
884
- * Gets the data for `map`.
885
- *
886
- * @private
887
- * @param {Object} map The map to query.
888
- * @param {string} key The reference key.
889
- * @returns {*} Returns the map data.
890
- */
891
- function getMapData$4(map, key) {
892
- var data = map.__data__;
893
- return isKeyable(key)
894
- ? data[typeof key == 'string' ? 'string' : 'hash']
895
- : data.map;
896
- }
897
-
898
- var _getMapData = getMapData$4;
899
-
900
- var getMapData$3 = _getMapData;
901
-
902
- /**
903
- * Removes `key` and its value from the map.
904
- *
905
- * @private
906
- * @name delete
907
- * @memberOf MapCache
908
- * @param {string} key The key of the value to remove.
909
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
910
- */
911
- function mapCacheDelete$1(key) {
912
- var result = getMapData$3(this, key)['delete'](key);
913
- this.size -= result ? 1 : 0;
914
- return result;
915
- }
916
-
917
- var _mapCacheDelete = mapCacheDelete$1;
918
-
919
- var getMapData$2 = _getMapData;
920
-
921
- /**
922
- * Gets the map value for `key`.
923
- *
924
- * @private
925
- * @name get
926
- * @memberOf MapCache
927
- * @param {string} key The key of the value to get.
928
- * @returns {*} Returns the entry value.
929
- */
930
- function mapCacheGet$1(key) {
931
- return getMapData$2(this, key).get(key);
932
- }
933
-
934
- var _mapCacheGet = mapCacheGet$1;
935
-
936
- var getMapData$1 = _getMapData;
937
-
938
- /**
939
- * Checks if a map value for `key` exists.
940
- *
941
- * @private
942
- * @name has
943
- * @memberOf MapCache
944
- * @param {string} key The key of the entry to check.
945
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
946
- */
947
- function mapCacheHas$1(key) {
948
- return getMapData$1(this, key).has(key);
949
- }
950
-
951
- var _mapCacheHas = mapCacheHas$1;
952
-
953
- var getMapData = _getMapData;
954
-
955
- /**
956
- * Sets the map `key` to `value`.
957
- *
958
- * @private
959
- * @name set
960
- * @memberOf MapCache
961
- * @param {string} key The key of the value to set.
962
- * @param {*} value The value to set.
963
- * @returns {Object} Returns the map cache instance.
964
- */
965
- function mapCacheSet$1(key, value) {
966
- var data = getMapData(this, key),
967
- size = data.size;
968
-
969
- data.set(key, value);
970
- this.size += data.size == size ? 0 : 1;
971
- return this;
972
- }
973
-
974
- var _mapCacheSet = mapCacheSet$1;
975
-
976
- var mapCacheClear = _mapCacheClear,
977
- mapCacheDelete = _mapCacheDelete,
978
- mapCacheGet = _mapCacheGet,
979
- mapCacheHas = _mapCacheHas,
980
- mapCacheSet = _mapCacheSet;
981
-
982
- /**
983
- * Creates a map cache object to store key-value pairs.
984
- *
985
- * @private
986
- * @constructor
987
- * @param {Array} [entries] The key-value pairs to cache.
988
- */
989
- function MapCache$2(entries) {
990
- var index = -1,
991
- length = entries == null ? 0 : entries.length;
992
-
993
- this.clear();
994
- while (++index < length) {
995
- var entry = entries[index];
996
- this.set(entry[0], entry[1]);
997
- }
998
- }
999
-
1000
- // Add methods to `MapCache`.
1001
- MapCache$2.prototype.clear = mapCacheClear;
1002
- MapCache$2.prototype['delete'] = mapCacheDelete;
1003
- MapCache$2.prototype.get = mapCacheGet;
1004
- MapCache$2.prototype.has = mapCacheHas;
1005
- MapCache$2.prototype.set = mapCacheSet;
1006
-
1007
- var _MapCache = MapCache$2;
1008
-
1009
- var ListCache$1 = _ListCache,
1010
- Map$1 = _Map,
1011
- MapCache$1 = _MapCache;
1012
-
1013
- /** Used as the size to enable large array optimizations. */
1014
- var LARGE_ARRAY_SIZE = 200;
1015
-
1016
- /**
1017
- * Sets the stack `key` to `value`.
1018
- *
1019
- * @private
1020
- * @name set
1021
- * @memberOf Stack
1022
- * @param {string} key The key of the value to set.
1023
- * @param {*} value The value to set.
1024
- * @returns {Object} Returns the stack cache instance.
1025
- */
1026
- function stackSet$1(key, value) {
1027
- var data = this.__data__;
1028
- if (data instanceof ListCache$1) {
1029
- var pairs = data.__data__;
1030
- if (!Map$1 || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
1031
- pairs.push([key, value]);
1032
- this.size = ++data.size;
1033
- return this;
1034
- }
1035
- data = this.__data__ = new MapCache$1(pairs);
1036
- }
1037
- data.set(key, value);
1038
- this.size = data.size;
1039
- return this;
1040
- }
1041
-
1042
- var _stackSet = stackSet$1;
1043
-
1044
- var ListCache = _ListCache,
1045
- stackClear = _stackClear,
1046
- stackDelete = _stackDelete,
1047
- stackGet = _stackGet,
1048
- stackHas = _stackHas,
1049
- stackSet = _stackSet;
1050
-
1051
- /**
1052
- * Creates a stack cache object to store key-value pairs.
1053
- *
1054
- * @private
1055
- * @constructor
1056
- * @param {Array} [entries] The key-value pairs to cache.
1057
- */
1058
- function Stack$1(entries) {
1059
- var data = this.__data__ = new ListCache(entries);
1060
- this.size = data.size;
1061
- }
1062
-
1063
- // Add methods to `Stack`.
1064
- Stack$1.prototype.clear = stackClear;
1065
- Stack$1.prototype['delete'] = stackDelete;
1066
- Stack$1.prototype.get = stackGet;
1067
- Stack$1.prototype.has = stackHas;
1068
- Stack$1.prototype.set = stackSet;
1069
-
1070
- var _Stack = Stack$1;
1071
-
1072
- /**
1073
- * A specialized version of `_.forEach` for arrays without support for
1074
- * iteratee shorthands.
1075
- *
1076
- * @private
1077
- * @param {Array} [array] The array to iterate over.
1078
- * @param {Function} iteratee The function invoked per iteration.
1079
- * @returns {Array} Returns `array`.
1080
- */
1081
-
1082
- function arrayEach$1(array, iteratee) {
1083
- var index = -1,
1084
- length = array == null ? 0 : array.length;
1085
-
1086
- while (++index < length) {
1087
- if (iteratee(array[index], index, array) === false) {
1088
- break;
1089
- }
1090
- }
1091
- return array;
1092
- }
1093
-
1094
- var _arrayEach = arrayEach$1;
1095
-
1096
- var getNative$4 = _getNative;
1097
-
1098
- var defineProperty$2 = (function() {
1099
- try {
1100
- var func = getNative$4(Object, 'defineProperty');
1101
- func({}, '', {});
1102
- return func;
1103
- } catch (e) {}
1104
- }());
1105
-
1106
- var _defineProperty = defineProperty$2;
1107
-
1108
- var defineProperty$1 = _defineProperty;
1109
-
1110
- /**
1111
- * The base implementation of `assignValue` and `assignMergeValue` without
1112
- * value checks.
1113
- *
1114
- * @private
1115
- * @param {Object} object The object to modify.
1116
- * @param {string} key The key of the property to assign.
1117
- * @param {*} value The value to assign.
1118
- */
1119
- function baseAssignValue$2(object, key, value) {
1120
- if (key == '__proto__' && defineProperty$1) {
1121
- defineProperty$1(object, key, {
1122
- 'configurable': true,
1123
- 'enumerable': true,
1124
- 'value': value,
1125
- 'writable': true
1126
- });
1127
- } else {
1128
- object[key] = value;
1129
- }
1130
- }
1131
-
1132
- var _baseAssignValue = baseAssignValue$2;
1133
-
1134
- var baseAssignValue$1 = _baseAssignValue,
1135
- eq = eq_1;
1136
-
1137
- /** Used for built-in method references. */
1138
- var objectProto$8 = Object.prototype;
1139
-
1140
- /** Used to check objects for own properties. */
1141
- var hasOwnProperty$6 = objectProto$8.hasOwnProperty;
1142
-
1143
- /**
1144
- * Assigns `value` to `key` of `object` if the existing value is not equivalent
1145
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
1146
- * for equality comparisons.
1147
- *
1148
- * @private
1149
- * @param {Object} object The object to modify.
1150
- * @param {string} key The key of the property to assign.
1151
- * @param {*} value The value to assign.
1152
- */
1153
- function assignValue$2(object, key, value) {
1154
- var objValue = object[key];
1155
- if (!(hasOwnProperty$6.call(object, key) && eq(objValue, value)) ||
1156
- (value === undefined && !(key in object))) {
1157
- baseAssignValue$1(object, key, value);
1158
- }
1159
- }
1160
-
1161
- var _assignValue = assignValue$2;
1162
-
1163
- var assignValue$1 = _assignValue,
1164
- baseAssignValue = _baseAssignValue;
1165
-
1166
- /**
1167
- * Copies properties of `source` to `object`.
1168
- *
1169
- * @private
1170
- * @param {Object} source The object to copy properties from.
1171
- * @param {Array} props The property identifiers to copy.
1172
- * @param {Object} [object={}] The object to copy properties to.
1173
- * @param {Function} [customizer] The function to customize copied values.
1174
- * @returns {Object} Returns `object`.
1175
- */
1176
- function copyObject$5(source, props, object, customizer) {
1177
- var isNew = !object;
1178
- object || (object = {});
1179
-
1180
- var index = -1,
1181
- length = props.length;
1182
-
1183
- while (++index < length) {
1184
- var key = props[index];
1185
-
1186
- var newValue = customizer
1187
- ? customizer(object[key], source[key], key, object, source)
1188
- : undefined;
1189
-
1190
- if (newValue === undefined) {
1191
- newValue = source[key];
1192
- }
1193
- if (isNew) {
1194
- baseAssignValue(object, key, newValue);
1195
- } else {
1196
- assignValue$1(object, key, newValue);
1197
- }
1198
- }
1199
- return object;
1200
- }
1201
-
1202
- var _copyObject = copyObject$5;
1203
-
1204
- /**
1205
- * The base implementation of `_.times` without support for iteratee shorthands
1206
- * or max array length checks.
1207
- *
1208
- * @private
1209
- * @param {number} n The number of times to invoke `iteratee`.
1210
- * @param {Function} iteratee The function invoked per iteration.
1211
- * @returns {Array} Returns the array of results.
1212
- */
1213
-
1214
- function baseTimes$1(n, iteratee) {
1215
- var index = -1,
1216
- result = Array(n);
1217
-
1218
- while (++index < n) {
1219
- result[index] = iteratee(index);
1220
- }
1221
- return result;
1222
- }
1223
-
1224
- var _baseTimes = baseTimes$1;
1225
-
1226
- /**
1227
- * Checks if `value` is object-like. A value is object-like if it's not `null`
1228
- * and has a `typeof` result of "object".
1229
- *
1230
- * @static
1231
- * @memberOf _
1232
- * @since 4.0.0
1233
- * @category Lang
1234
- * @param {*} value The value to check.
1235
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
1236
- * @example
1237
- *
1238
- * _.isObjectLike({});
1239
- * // => true
1240
- *
1241
- * _.isObjectLike([1, 2, 3]);
1242
- * // => true
1243
- *
1244
- * _.isObjectLike(_.noop);
1245
- * // => false
1246
- *
1247
- * _.isObjectLike(null);
1248
- * // => false
1249
- */
1250
-
1251
- function isObjectLike$7(value) {
1252
- return value != null && typeof value == 'object';
1253
- }
1254
-
1255
- var isObjectLike_1 = isObjectLike$7;
1256
-
1257
- var baseGetTag$4 = _baseGetTag,
1258
- isObjectLike$6 = isObjectLike_1;
1259
-
1260
- /** `Object#toString` result references. */
1261
- var argsTag$2 = '[object Arguments]';
1262
-
1263
- /**
1264
- * The base implementation of `_.isArguments`.
1265
- *
1266
- * @private
1267
- * @param {*} value The value to check.
1268
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
1269
- */
1270
- function baseIsArguments$1(value) {
1271
- return isObjectLike$6(value) && baseGetTag$4(value) == argsTag$2;
1272
- }
1273
-
1274
- var _baseIsArguments = baseIsArguments$1;
1275
-
1276
- var baseIsArguments = _baseIsArguments,
1277
- isObjectLike$5 = isObjectLike_1;
1278
-
1279
- /** Used for built-in method references. */
1280
- var objectProto$7 = Object.prototype;
1281
-
1282
- /** Used to check objects for own properties. */
1283
- var hasOwnProperty$5 = objectProto$7.hasOwnProperty;
1284
-
1285
- /** Built-in value references. */
1286
- var propertyIsEnumerable$1 = objectProto$7.propertyIsEnumerable;
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
- var isArguments$2 = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
1307
- return isObjectLike$5(value) && hasOwnProperty$5.call(value, 'callee') &&
1308
- !propertyIsEnumerable$1.call(value, 'callee');
1309
- };
1310
-
1311
- var isArguments_1 = isArguments$2;
1312
-
1313
- /**
1314
- * Checks if `value` is classified as an `Array` object.
1315
- *
1316
- * @static
1317
- * @memberOf _
1318
- * @since 0.1.0
1319
- * @category Lang
1320
- * @param {*} value The value to check.
1321
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
1322
- * @example
1323
- *
1324
- * _.isArray([1, 2, 3]);
1325
- * // => true
1326
- *
1327
- * _.isArray(document.body.children);
1328
- * // => false
1329
- *
1330
- * _.isArray('abc');
1331
- * // => false
1332
- *
1333
- * _.isArray(_.noop);
1334
- * // => false
1335
- */
1336
-
1337
- var isArray$7 = Array.isArray;
1338
-
1339
- var isArray_1 = isArray$7;
1340
-
1341
- var isBuffer$2 = {exports: {}};
1342
-
1343
- /**
1344
- * This method returns `false`.
1345
- *
1346
- * @static
1347
- * @memberOf _
1348
- * @since 4.13.0
1349
- * @category Util
1350
- * @returns {boolean} Returns `false`.
1351
- * @example
1352
- *
1353
- * _.times(2, _.stubFalse);
1354
- * // => [false, false]
1355
- */
1356
-
1357
- function stubFalse() {
1358
- return false;
1359
- }
1360
-
1361
- var stubFalse_1 = stubFalse;
1362
-
1363
- (function (module, exports) {
1364
- var root = _root,
1365
- stubFalse = stubFalse_1;
1366
-
1367
- /** Detect free variable `exports`. */
1368
- var freeExports = exports && !exports.nodeType && exports;
1369
-
1370
- /** Detect free variable `module`. */
1371
- var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
1372
-
1373
- /** Detect the popular CommonJS extension `module.exports`. */
1374
- var moduleExports = freeModule && freeModule.exports === freeExports;
1375
-
1376
- /** Built-in value references. */
1377
- var Buffer = moduleExports ? root.Buffer : undefined;
1378
-
1379
- /* Built-in method references for those with the same name as other `lodash` methods. */
1380
- var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
1381
-
1382
- /**
1383
- * Checks if `value` is a buffer.
1384
- *
1385
- * @static
1386
- * @memberOf _
1387
- * @since 4.3.0
1388
- * @category Lang
1389
- * @param {*} value The value to check.
1390
- * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
1391
- * @example
1392
- *
1393
- * _.isBuffer(new Buffer(2));
1394
- * // => true
1395
- *
1396
- * _.isBuffer(new Uint8Array(2));
1397
- * // => false
1398
- */
1399
- var isBuffer = nativeIsBuffer || stubFalse;
1400
-
1401
- module.exports = isBuffer;
1402
- }(isBuffer$2, isBuffer$2.exports));
1403
-
1404
- /** Used as references for various `Number` constants. */
1405
-
1406
- var MAX_SAFE_INTEGER$1 = 9007199254740991;
1407
-
1408
- /** Used to detect unsigned integer values. */
1409
- var reIsUint = /^(?:0|[1-9]\d*)$/;
1410
-
1411
- /**
1412
- * Checks if `value` is a valid array-like index.
1413
- *
1414
- * @private
1415
- * @param {*} value The value to check.
1416
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
1417
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
1418
- */
1419
- function isIndex$1(value, length) {
1420
- var type = typeof value;
1421
- length = length == null ? MAX_SAFE_INTEGER$1 : length;
1422
-
1423
- return !!length &&
1424
- (type == 'number' ||
1425
- (type != 'symbol' && reIsUint.test(value))) &&
1426
- (value > -1 && value % 1 == 0 && value < length);
1427
- }
1428
-
1429
- var _isIndex = isIndex$1;
1430
-
1431
- /** Used as references for various `Number` constants. */
1432
-
1433
- var MAX_SAFE_INTEGER = 9007199254740991;
1434
-
1435
- /**
1436
- * Checks if `value` is a valid array-like length.
1437
- *
1438
- * **Note:** This method is loosely based on
1439
- * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
1440
- *
1441
- * @static
1442
- * @memberOf _
1443
- * @since 4.0.0
1444
- * @category Lang
1445
- * @param {*} value The value to check.
1446
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
1447
- * @example
1448
- *
1449
- * _.isLength(3);
1450
- * // => true
1451
- *
1452
- * _.isLength(Number.MIN_VALUE);
1453
- * // => false
1454
- *
1455
- * _.isLength(Infinity);
1456
- * // => false
1457
- *
1458
- * _.isLength('3');
1459
- * // => false
1460
- */
1461
- function isLength$2(value) {
1462
- return typeof value == 'number' &&
1463
- value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
1464
- }
1465
-
1466
- var isLength_1 = isLength$2;
1467
-
1468
- var baseGetTag$3 = _baseGetTag,
1469
- isLength$1 = isLength_1,
1470
- isObjectLike$4 = isObjectLike_1;
1471
-
1472
- /** `Object#toString` result references. */
1473
- var argsTag$1 = '[object Arguments]',
1474
- arrayTag$1 = '[object Array]',
1475
- boolTag$2 = '[object Boolean]',
1476
- dateTag$2 = '[object Date]',
1477
- errorTag$1 = '[object Error]',
1478
- funcTag$1 = '[object Function]',
1479
- mapTag$4 = '[object Map]',
1480
- numberTag$2 = '[object Number]',
1481
- objectTag$3 = '[object Object]',
1482
- regexpTag$2 = '[object RegExp]',
1483
- setTag$4 = '[object Set]',
1484
- stringTag$2 = '[object String]',
1485
- weakMapTag$2 = '[object WeakMap]';
1486
-
1487
- var arrayBufferTag$2 = '[object ArrayBuffer]',
1488
- dataViewTag$3 = '[object DataView]',
1489
- float32Tag$2 = '[object Float32Array]',
1490
- float64Tag$2 = '[object Float64Array]',
1491
- int8Tag$2 = '[object Int8Array]',
1492
- int16Tag$2 = '[object Int16Array]',
1493
- int32Tag$2 = '[object Int32Array]',
1494
- uint8Tag$2 = '[object Uint8Array]',
1495
- uint8ClampedTag$2 = '[object Uint8ClampedArray]',
1496
- uint16Tag$2 = '[object Uint16Array]',
1497
- uint32Tag$2 = '[object Uint32Array]';
1498
-
1499
- /** Used to identify `toStringTag` values of typed arrays. */
1500
- var typedArrayTags = {};
1501
- typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] =
1502
- typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] =
1503
- typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] =
1504
- typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] =
1505
- typedArrayTags[uint32Tag$2] = true;
1506
- typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] =
1507
- typedArrayTags[arrayBufferTag$2] = typedArrayTags[boolTag$2] =
1508
- typedArrayTags[dataViewTag$3] = typedArrayTags[dateTag$2] =
1509
- typedArrayTags[errorTag$1] = typedArrayTags[funcTag$1] =
1510
- typedArrayTags[mapTag$4] = typedArrayTags[numberTag$2] =
1511
- typedArrayTags[objectTag$3] = typedArrayTags[regexpTag$2] =
1512
- typedArrayTags[setTag$4] = typedArrayTags[stringTag$2] =
1513
- typedArrayTags[weakMapTag$2] = false;
1514
-
1515
- /**
1516
- * The base implementation of `_.isTypedArray` without Node.js optimizations.
1517
- *
1518
- * @private
1519
- * @param {*} value The value to check.
1520
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
1521
- */
1522
- function baseIsTypedArray$1(value) {
1523
- return isObjectLike$4(value) &&
1524
- isLength$1(value.length) && !!typedArrayTags[baseGetTag$3(value)];
1525
- }
1526
-
1527
- var _baseIsTypedArray = baseIsTypedArray$1;
1528
-
1529
- /**
1530
- * The base implementation of `_.unary` without support for storing metadata.
1531
- *
1532
- * @private
1533
- * @param {Function} func The function to cap arguments for.
1534
- * @returns {Function} Returns the new capped function.
1535
- */
1536
-
1537
- function baseUnary$3(func) {
1538
- return function(value) {
1539
- return func(value);
1540
- };
1541
- }
1542
-
1543
- var _baseUnary = baseUnary$3;
1544
-
1545
- var _nodeUtil = {exports: {}};
1546
-
1547
- (function (module, exports) {
1548
- var freeGlobal = _freeGlobal;
1549
-
1550
- /** Detect free variable `exports`. */
1551
- var freeExports = exports && !exports.nodeType && exports;
1552
-
1553
- /** Detect free variable `module`. */
1554
- var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
1555
-
1556
- /** Detect the popular CommonJS extension `module.exports`. */
1557
- var moduleExports = freeModule && freeModule.exports === freeExports;
1558
-
1559
- /** Detect free variable `process` from Node.js. */
1560
- var freeProcess = moduleExports && freeGlobal.process;
1561
-
1562
- /** Used to access faster Node.js helpers. */
1563
- var nodeUtil = (function() {
1564
- try {
1565
- // Use `util.types` for Node.js 10+.
1566
- var types = freeModule && freeModule.require && freeModule.require('util').types;
1567
-
1568
- if (types) {
1569
- return types;
1570
- }
1571
-
1572
- // Legacy `process.binding('util')` for Node.js < 10.
1573
- return freeProcess && freeProcess.binding && freeProcess.binding('util');
1574
- } catch (e) {}
1575
- }());
1576
-
1577
- module.exports = nodeUtil;
1578
- }(_nodeUtil, _nodeUtil.exports));
1579
-
1580
- var baseIsTypedArray = _baseIsTypedArray,
1581
- baseUnary$2 = _baseUnary,
1582
- nodeUtil$2 = _nodeUtil.exports;
1583
-
1584
- /* Node.js helper references. */
1585
- var nodeIsTypedArray = nodeUtil$2 && nodeUtil$2.isTypedArray;
1586
-
1587
- /**
1588
- * Checks if `value` is classified as a typed array.
1589
- *
1590
- * @static
1591
- * @memberOf _
1592
- * @since 3.0.0
1593
- * @category Lang
1594
- * @param {*} value The value to check.
1595
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
1596
- * @example
1597
- *
1598
- * _.isTypedArray(new Uint8Array);
1599
- * // => true
1600
- *
1601
- * _.isTypedArray([]);
1602
- * // => false
1603
- */
1604
- var isTypedArray$1 = nodeIsTypedArray ? baseUnary$2(nodeIsTypedArray) : baseIsTypedArray;
1605
-
1606
- var isTypedArray_1 = isTypedArray$1;
1607
-
1608
- var baseTimes = _baseTimes,
1609
- isArguments$1 = isArguments_1,
1610
- isArray$6 = isArray_1,
1611
- isBuffer$1 = isBuffer$2.exports,
1612
- isIndex = _isIndex,
1613
- isTypedArray = isTypedArray_1;
1614
-
1615
- /** Used for built-in method references. */
1616
- var objectProto$6 = Object.prototype;
1617
-
1618
- /** Used to check objects for own properties. */
1619
- var hasOwnProperty$4 = objectProto$6.hasOwnProperty;
1620
-
1621
- /**
1622
- * Creates an array of the enumerable property names of the array-like `value`.
1623
- *
1624
- * @private
1625
- * @param {*} value The value to query.
1626
- * @param {boolean} inherited Specify returning inherited property names.
1627
- * @returns {Array} Returns the array of property names.
1628
- */
1629
- function arrayLikeKeys$2(value, inherited) {
1630
- var isArr = isArray$6(value),
1631
- isArg = !isArr && isArguments$1(value),
1632
- isBuff = !isArr && !isArg && isBuffer$1(value),
1633
- isType = !isArr && !isArg && !isBuff && isTypedArray(value),
1634
- skipIndexes = isArr || isArg || isBuff || isType,
1635
- result = skipIndexes ? baseTimes(value.length, String) : [],
1636
- length = result.length;
1637
-
1638
- for (var key in value) {
1639
- if ((inherited || hasOwnProperty$4.call(value, key)) &&
1640
- !(skipIndexes && (
1641
- // Safari 9 has enumerable `arguments.length` in strict mode.
1642
- key == 'length' ||
1643
- // Node.js 0.10 has enumerable non-index properties on buffers.
1644
- (isBuff && (key == 'offset' || key == 'parent')) ||
1645
- // PhantomJS 2 has enumerable non-index properties on typed arrays.
1646
- (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
1647
- // Skip index properties.
1648
- isIndex(key, length)
1649
- ))) {
1650
- result.push(key);
1651
- }
1652
- }
1653
- return result;
1654
- }
1655
-
1656
- var _arrayLikeKeys = arrayLikeKeys$2;
1657
-
1658
- /** Used for built-in method references. */
1659
-
1660
- var objectProto$5 = Object.prototype;
1661
-
1662
- /**
1663
- * Checks if `value` is likely a prototype object.
1664
- *
1665
- * @private
1666
- * @param {*} value The value to check.
1667
- * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
1668
- */
1669
- function isPrototype$3(value) {
1670
- var Ctor = value && value.constructor,
1671
- proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$5;
1672
-
1673
- return value === proto;
1674
- }
1675
-
1676
- var _isPrototype = isPrototype$3;
1677
-
1678
- /**
1679
- * Creates a unary function that invokes `func` with its argument transformed.
1680
- *
1681
- * @private
1682
- * @param {Function} func The function to wrap.
1683
- * @param {Function} transform The argument transform.
1684
- * @returns {Function} Returns the new function.
1685
- */
1686
-
1687
- function overArg$2(func, transform) {
1688
- return function(arg) {
1689
- return func(transform(arg));
1690
- };
1691
- }
1692
-
1693
- var _overArg = overArg$2;
1694
-
1695
- var overArg$1 = _overArg;
1696
-
1697
- /* Built-in method references for those with the same name as other `lodash` methods. */
1698
- var nativeKeys$1 = overArg$1(Object.keys, Object);
1699
-
1700
- var _nativeKeys = nativeKeys$1;
1701
-
1702
- var isPrototype$2 = _isPrototype,
1703
- nativeKeys = _nativeKeys;
1704
-
1705
- /** Used for built-in method references. */
1706
- var objectProto$4 = Object.prototype;
1707
-
1708
- /** Used to check objects for own properties. */
1709
- var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
1710
-
1711
- /**
1712
- * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
1713
- *
1714
- * @private
1715
- * @param {Object} object The object to query.
1716
- * @returns {Array} Returns the array of property names.
1717
- */
1718
- function baseKeys$1(object) {
1719
- if (!isPrototype$2(object)) {
1720
- return nativeKeys(object);
1721
- }
1722
- var result = [];
1723
- for (var key in Object(object)) {
1724
- if (hasOwnProperty$3.call(object, key) && key != 'constructor') {
1725
- result.push(key);
1726
- }
1727
- }
1728
- return result;
1729
- }
1730
-
1731
- var _baseKeys = baseKeys$1;
1732
-
1733
- var isFunction = isFunction_1,
1734
- isLength = isLength_1;
1735
-
1736
- /**
1737
- * Checks if `value` is array-like. A value is considered array-like if it's
1738
- * not a function and has a `value.length` that's an integer greater than or
1739
- * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
1740
- *
1741
- * @static
1742
- * @memberOf _
1743
- * @since 4.0.0
1744
- * @category Lang
1745
- * @param {*} value The value to check.
1746
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
1747
- * @example
1748
- *
1749
- * _.isArrayLike([1, 2, 3]);
1750
- * // => true
1751
- *
1752
- * _.isArrayLike(document.body.children);
1753
- * // => true
1754
- *
1755
- * _.isArrayLike('abc');
1756
- * // => true
1757
- *
1758
- * _.isArrayLike(_.noop);
1759
- * // => false
1760
- */
1761
- function isArrayLike$2(value) {
1762
- return value != null && isLength(value.length) && !isFunction(value);
1763
- }
1764
-
1765
- var isArrayLike_1 = isArrayLike$2;
1766
-
1767
- var arrayLikeKeys$1 = _arrayLikeKeys,
1768
- baseKeys = _baseKeys,
1769
- isArrayLike$1 = isArrayLike_1;
1770
-
1771
- /**
1772
- * Creates an array of the own enumerable property names of `object`.
1773
- *
1774
- * **Note:** Non-object values are coerced to objects. See the
1775
- * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
1776
- * for more details.
1777
- *
1778
- * @static
1779
- * @since 0.1.0
1780
- * @memberOf _
1781
- * @category Object
1782
- * @param {Object} object The object to query.
1783
- * @returns {Array} Returns the array of property names.
1784
- * @example
1785
- *
1786
- * function Foo() {
1787
- * this.a = 1;
1788
- * this.b = 2;
1789
- * }
1790
- *
1791
- * Foo.prototype.c = 3;
1792
- *
1793
- * _.keys(new Foo);
1794
- * // => ['a', 'b'] (iteration order is not guaranteed)
1795
- *
1796
- * _.keys('hi');
1797
- * // => ['0', '1']
1798
- */
1799
- function keys$3(object) {
1800
- return isArrayLike$1(object) ? arrayLikeKeys$1(object) : baseKeys(object);
1801
- }
1802
-
1803
- var keys_1 = keys$3;
1804
-
1805
- var copyObject$4 = _copyObject,
1806
- keys$2 = keys_1;
1807
-
1808
- /**
1809
- * The base implementation of `_.assign` without support for multiple sources
1810
- * or `customizer` functions.
1811
- *
1812
- * @private
1813
- * @param {Object} object The destination object.
1814
- * @param {Object} source The source object.
1815
- * @returns {Object} Returns `object`.
1816
- */
1817
- function baseAssign$1(object, source) {
1818
- return object && copyObject$4(source, keys$2(source), object);
1819
- }
1820
-
1821
- var _baseAssign = baseAssign$1;
1822
-
1823
- /**
1824
- * This function is like
1825
- * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
1826
- * except that it includes inherited enumerable properties.
1827
- *
1828
- * @private
1829
- * @param {Object} object The object to query.
1830
- * @returns {Array} Returns the array of property names.
1831
- */
1832
-
1833
- function nativeKeysIn$1(object) {
1834
- var result = [];
1835
- if (object != null) {
1836
- for (var key in Object(object)) {
1837
- result.push(key);
1838
- }
1839
- }
1840
- return result;
1841
- }
1842
-
1843
- var _nativeKeysIn = nativeKeysIn$1;
1844
-
1845
- var isObject$2 = isObject_1,
1846
- isPrototype$1 = _isPrototype,
1847
- nativeKeysIn = _nativeKeysIn;
1848
-
1849
- /** Used for built-in method references. */
1850
- var objectProto$3 = Object.prototype;
1851
-
1852
- /** Used to check objects for own properties. */
1853
- var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
1854
-
1855
- /**
1856
- * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
1857
- *
1858
- * @private
1859
- * @param {Object} object The object to query.
1860
- * @returns {Array} Returns the array of property names.
1861
- */
1862
- function baseKeysIn$1(object) {
1863
- if (!isObject$2(object)) {
1864
- return nativeKeysIn(object);
1865
- }
1866
- var isProto = isPrototype$1(object),
1867
- result = [];
1868
-
1869
- for (var key in object) {
1870
- if (!(key == 'constructor' && (isProto || !hasOwnProperty$2.call(object, key)))) {
1871
- result.push(key);
1872
- }
1873
- }
1874
- return result;
1875
- }
1876
-
1877
- var _baseKeysIn = baseKeysIn$1;
1878
-
1879
- var arrayLikeKeys = _arrayLikeKeys,
1880
- baseKeysIn = _baseKeysIn,
1881
- isArrayLike = isArrayLike_1;
1882
-
1883
- /**
1884
- * Creates an array of the own and inherited enumerable property names of `object`.
1885
- *
1886
- * **Note:** Non-object values are coerced to objects.
1887
- *
1888
- * @static
1889
- * @memberOf _
1890
- * @since 3.0.0
1891
- * @category Object
1892
- * @param {Object} object The object to query.
1893
- * @returns {Array} Returns the array of property names.
1894
- * @example
1895
- *
1896
- * function Foo() {
1897
- * this.a = 1;
1898
- * this.b = 2;
1899
- * }
1900
- *
1901
- * Foo.prototype.c = 3;
1902
- *
1903
- * _.keysIn(new Foo);
1904
- * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
1905
- */
1906
- function keysIn$3(object) {
1907
- return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
1908
- }
1909
-
1910
- var keysIn_1 = keysIn$3;
1911
-
1912
- var copyObject$3 = _copyObject,
1913
- keysIn$2 = keysIn_1;
1914
-
1915
- /**
1916
- * The base implementation of `_.assignIn` without support for multiple sources
1917
- * or `customizer` functions.
1918
- *
1919
- * @private
1920
- * @param {Object} object The destination object.
1921
- * @param {Object} source The source object.
1922
- * @returns {Object} Returns `object`.
1923
- */
1924
- function baseAssignIn$1(object, source) {
1925
- return object && copyObject$3(source, keysIn$2(source), object);
1926
- }
1927
-
1928
- var _baseAssignIn = baseAssignIn$1;
1929
-
1930
- var _cloneBuffer = {exports: {}};
1931
-
1932
- (function (module, exports) {
1933
- var root = _root;
1934
-
1935
- /** Detect free variable `exports`. */
1936
- var freeExports = exports && !exports.nodeType && exports;
1937
-
1938
- /** Detect free variable `module`. */
1939
- var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
1940
-
1941
- /** Detect the popular CommonJS extension `module.exports`. */
1942
- var moduleExports = freeModule && freeModule.exports === freeExports;
1943
-
1944
- /** Built-in value references. */
1945
- var Buffer = moduleExports ? root.Buffer : undefined,
1946
- allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
1947
-
1948
- /**
1949
- * Creates a clone of `buffer`.
1950
- *
1951
- * @private
1952
- * @param {Buffer} buffer The buffer to clone.
1953
- * @param {boolean} [isDeep] Specify a deep clone.
1954
- * @returns {Buffer} Returns the cloned buffer.
1955
- */
1956
- function cloneBuffer(buffer, isDeep) {
1957
- if (isDeep) {
1958
- return buffer.slice();
1959
- }
1960
- var length = buffer.length,
1961
- result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
1962
-
1963
- buffer.copy(result);
1964
- return result;
1965
- }
1966
-
1967
- module.exports = cloneBuffer;
1968
- }(_cloneBuffer, _cloneBuffer.exports));
1969
-
1970
- /**
1971
- * Copies the values of `source` to `array`.
1972
- *
1973
- * @private
1974
- * @param {Array} source The array to copy values from.
1975
- * @param {Array} [array=[]] The array to copy values to.
1976
- * @returns {Array} Returns `array`.
1977
- */
1978
-
1979
- function copyArray$1(source, array) {
1980
- var index = -1,
1981
- length = source.length;
1982
-
1983
- array || (array = Array(length));
1984
- while (++index < length) {
1985
- array[index] = source[index];
1986
- }
1987
- return array;
1988
- }
1989
-
1990
- var _copyArray = copyArray$1;
1991
-
1992
- /**
1993
- * A specialized version of `_.filter` for arrays without support for
1994
- * iteratee shorthands.
1995
- *
1996
- * @private
1997
- * @param {Array} [array] The array to iterate over.
1998
- * @param {Function} predicate The function invoked per iteration.
1999
- * @returns {Array} Returns the new filtered array.
2000
- */
2001
-
2002
- function arrayFilter$1(array, predicate) {
2003
- var index = -1,
2004
- length = array == null ? 0 : array.length,
2005
- resIndex = 0,
2006
- result = [];
2007
-
2008
- while (++index < length) {
2009
- var value = array[index];
2010
- if (predicate(value, index, array)) {
2011
- result[resIndex++] = value;
2012
- }
2013
- }
2014
- return result;
2015
- }
2016
-
2017
- var _arrayFilter = arrayFilter$1;
2018
-
2019
- /**
2020
- * This method returns a new empty array.
2021
- *
2022
- * @static
2023
- * @memberOf _
2024
- * @since 4.13.0
2025
- * @category Util
2026
- * @returns {Array} Returns the new empty array.
2027
- * @example
2028
- *
2029
- * var arrays = _.times(2, _.stubArray);
2030
- *
2031
- * console.log(arrays);
2032
- * // => [[], []]
2033
- *
2034
- * console.log(arrays[0] === arrays[1]);
2035
- * // => false
2036
- */
2037
-
2038
- function stubArray$2() {
2039
- return [];
2040
- }
2041
-
2042
- var stubArray_1 = stubArray$2;
2043
-
2044
- var arrayFilter = _arrayFilter,
2045
- stubArray$1 = stubArray_1;
2046
-
2047
- /** Used for built-in method references. */
2048
- var objectProto$2 = Object.prototype;
2049
-
2050
- /** Built-in value references. */
2051
- var propertyIsEnumerable = objectProto$2.propertyIsEnumerable;
2052
-
2053
- /* Built-in method references for those with the same name as other `lodash` methods. */
2054
- var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
2055
-
2056
- /**
2057
- * Creates an array of the own enumerable symbols of `object`.
2058
- *
2059
- * @private
2060
- * @param {Object} object The object to query.
2061
- * @returns {Array} Returns the array of symbols.
2062
- */
2063
- var getSymbols$3 = !nativeGetSymbols$1 ? stubArray$1 : function(object) {
2064
- if (object == null) {
2065
- return [];
2066
- }
2067
- object = Object(object);
2068
- return arrayFilter(nativeGetSymbols$1(object), function(symbol) {
2069
- return propertyIsEnumerable.call(object, symbol);
2070
- });
2071
- };
2072
-
2073
- var _getSymbols = getSymbols$3;
2074
-
2075
- var copyObject$2 = _copyObject,
2076
- getSymbols$2 = _getSymbols;
2077
-
2078
- /**
2079
- * Copies own symbols of `source` to `object`.
2080
- *
2081
- * @private
2082
- * @param {Object} source The object to copy symbols from.
2083
- * @param {Object} [object={}] The object to copy symbols to.
2084
- * @returns {Object} Returns `object`.
2085
- */
2086
- function copySymbols$1(source, object) {
2087
- return copyObject$2(source, getSymbols$2(source), object);
2088
- }
2089
-
2090
- var _copySymbols = copySymbols$1;
2091
-
2092
- /**
2093
- * Appends the elements of `values` to `array`.
2094
- *
2095
- * @private
2096
- * @param {Array} array The array to modify.
2097
- * @param {Array} values The values to append.
2098
- * @returns {Array} Returns `array`.
2099
- */
2100
-
2101
- function arrayPush$3(array, values) {
2102
- var index = -1,
2103
- length = values.length,
2104
- offset = array.length;
2105
-
2106
- while (++index < length) {
2107
- array[offset + index] = values[index];
2108
- }
2109
- return array;
2110
- }
2111
-
2112
- var _arrayPush = arrayPush$3;
2113
-
2114
- var overArg = _overArg;
2115
-
2116
- /** Built-in value references. */
2117
- var getPrototype$3 = overArg(Object.getPrototypeOf, Object);
2118
-
2119
- var _getPrototype = getPrototype$3;
2120
-
2121
- var arrayPush$2 = _arrayPush,
2122
- getPrototype$2 = _getPrototype,
2123
- getSymbols$1 = _getSymbols,
2124
- stubArray = stubArray_1;
2125
-
2126
- /* Built-in method references for those with the same name as other `lodash` methods. */
2127
- var nativeGetSymbols = Object.getOwnPropertySymbols;
2128
-
2129
- /**
2130
- * Creates an array of the own and inherited enumerable symbols of `object`.
2131
- *
2132
- * @private
2133
- * @param {Object} object The object to query.
2134
- * @returns {Array} Returns the array of symbols.
2135
- */
2136
- var getSymbolsIn$2 = !nativeGetSymbols ? stubArray : function(object) {
2137
- var result = [];
2138
- while (object) {
2139
- arrayPush$2(result, getSymbols$1(object));
2140
- object = getPrototype$2(object);
2141
- }
2142
- return result;
2143
- };
2144
-
2145
- var _getSymbolsIn = getSymbolsIn$2;
2146
-
2147
- var copyObject$1 = _copyObject,
2148
- getSymbolsIn$1 = _getSymbolsIn;
2149
-
2150
- /**
2151
- * Copies own and inherited symbols of `source` to `object`.
2152
- *
2153
- * @private
2154
- * @param {Object} source The object to copy symbols from.
2155
- * @param {Object} [object={}] The object to copy symbols to.
2156
- * @returns {Object} Returns `object`.
2157
- */
2158
- function copySymbolsIn$1(source, object) {
2159
- return copyObject$1(source, getSymbolsIn$1(source), object);
2160
- }
2161
-
2162
- var _copySymbolsIn = copySymbolsIn$1;
2163
-
2164
- var arrayPush$1 = _arrayPush,
2165
- isArray$5 = isArray_1;
2166
-
2167
- /**
2168
- * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
2169
- * `keysFunc` and `symbolsFunc` to get the enumerable property names and
2170
- * symbols of `object`.
2171
- *
2172
- * @private
2173
- * @param {Object} object The object to query.
2174
- * @param {Function} keysFunc The function to get the keys of `object`.
2175
- * @param {Function} symbolsFunc The function to get the symbols of `object`.
2176
- * @returns {Array} Returns the array of property names and symbols.
2177
- */
2178
- function baseGetAllKeys$2(object, keysFunc, symbolsFunc) {
2179
- var result = keysFunc(object);
2180
- return isArray$5(object) ? result : arrayPush$1(result, symbolsFunc(object));
2181
- }
2182
-
2183
- var _baseGetAllKeys = baseGetAllKeys$2;
2184
-
2185
- var baseGetAllKeys$1 = _baseGetAllKeys,
2186
- getSymbols = _getSymbols,
2187
- keys$1 = keys_1;
2188
-
2189
- /**
2190
- * Creates an array of own enumerable property names and symbols of `object`.
2191
- *
2192
- * @private
2193
- * @param {Object} object The object to query.
2194
- * @returns {Array} Returns the array of property names and symbols.
2195
- */
2196
- function getAllKeys$1(object) {
2197
- return baseGetAllKeys$1(object, keys$1, getSymbols);
2198
- }
2199
-
2200
- var _getAllKeys = getAllKeys$1;
2201
-
2202
- var baseGetAllKeys = _baseGetAllKeys,
2203
- getSymbolsIn = _getSymbolsIn,
2204
- keysIn$1 = keysIn_1;
2205
-
2206
- /**
2207
- * Creates an array of own and inherited enumerable property names and
2208
- * symbols of `object`.
2209
- *
2210
- * @private
2211
- * @param {Object} object The object to query.
2212
- * @returns {Array} Returns the array of property names and symbols.
2213
- */
2214
- function getAllKeysIn$2(object) {
2215
- return baseGetAllKeys(object, keysIn$1, getSymbolsIn);
2216
- }
2217
-
2218
- var _getAllKeysIn = getAllKeysIn$2;
2219
-
2220
- var getNative$3 = _getNative,
2221
- root$4 = _root;
2222
-
2223
- /* Built-in method references that are verified to be native. */
2224
- var DataView$1 = getNative$3(root$4, 'DataView');
2225
-
2226
- var _DataView = DataView$1;
2227
-
2228
- var getNative$2 = _getNative,
2229
- root$3 = _root;
2230
-
2231
- /* Built-in method references that are verified to be native. */
2232
- var Promise$2 = getNative$2(root$3, 'Promise');
2233
-
2234
- var _Promise = Promise$2;
2235
-
2236
- var getNative$1 = _getNative,
2237
- root$2 = _root;
2238
-
2239
- /* Built-in method references that are verified to be native. */
2240
- var Set$1 = getNative$1(root$2, 'Set');
2241
-
2242
- var _Set = Set$1;
2243
-
2244
- var getNative = _getNative,
2245
- root$1 = _root;
2246
-
2247
- /* Built-in method references that are verified to be native. */
2248
- var WeakMap$1 = getNative(root$1, 'WeakMap');
2249
-
2250
- var _WeakMap = WeakMap$1;
2251
-
2252
- var DataView = _DataView,
2253
- Map = _Map,
2254
- Promise$1 = _Promise,
2255
- Set = _Set,
2256
- WeakMap = _WeakMap,
2257
- baseGetTag$2 = _baseGetTag,
2258
- toSource = _toSource;
2259
-
2260
- /** `Object#toString` result references. */
2261
- var mapTag$3 = '[object Map]',
2262
- objectTag$2 = '[object Object]',
2263
- promiseTag = '[object Promise]',
2264
- setTag$3 = '[object Set]',
2265
- weakMapTag$1 = '[object WeakMap]';
2266
-
2267
- var dataViewTag$2 = '[object DataView]';
2268
-
2269
- /** Used to detect maps, sets, and weakmaps. */
2270
- var dataViewCtorString = toSource(DataView),
2271
- mapCtorString = toSource(Map),
2272
- promiseCtorString = toSource(Promise$1),
2273
- setCtorString = toSource(Set),
2274
- weakMapCtorString = toSource(WeakMap);
2275
-
2276
- /**
2277
- * Gets the `toStringTag` of `value`.
2278
- *
2279
- * @private
2280
- * @param {*} value The value to query.
2281
- * @returns {string} Returns the `toStringTag`.
2282
- */
2283
- var getTag$3 = baseGetTag$2;
2284
-
2285
- // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
2286
- if ((DataView && getTag$3(new DataView(new ArrayBuffer(1))) != dataViewTag$2) ||
2287
- (Map && getTag$3(new Map) != mapTag$3) ||
2288
- (Promise$1 && getTag$3(Promise$1.resolve()) != promiseTag) ||
2289
- (Set && getTag$3(new Set) != setTag$3) ||
2290
- (WeakMap && getTag$3(new WeakMap) != weakMapTag$1)) {
2291
- getTag$3 = function(value) {
2292
- var result = baseGetTag$2(value),
2293
- Ctor = result == objectTag$2 ? value.constructor : undefined,
2294
- ctorString = Ctor ? toSource(Ctor) : '';
2295
-
2296
- if (ctorString) {
2297
- switch (ctorString) {
2298
- case dataViewCtorString: return dataViewTag$2;
2299
- case mapCtorString: return mapTag$3;
2300
- case promiseCtorString: return promiseTag;
2301
- case setCtorString: return setTag$3;
2302
- case weakMapCtorString: return weakMapTag$1;
2303
- }
2304
- }
2305
- return result;
2306
- };
2307
- }
2308
-
2309
- var _getTag = getTag$3;
2310
-
2311
- /** Used for built-in method references. */
2312
-
2313
- var objectProto$1 = Object.prototype;
2314
-
2315
- /** Used to check objects for own properties. */
2316
- var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
2317
-
2318
- /**
2319
- * Initializes an array clone.
2320
- *
2321
- * @private
2322
- * @param {Array} array The array to clone.
2323
- * @returns {Array} Returns the initialized clone.
2324
- */
2325
- function initCloneArray$1(array) {
2326
- var length = array.length,
2327
- result = new array.constructor(length);
2328
-
2329
- // Add properties assigned by `RegExp#exec`.
2330
- if (length && typeof array[0] == 'string' && hasOwnProperty$1.call(array, 'index')) {
2331
- result.index = array.index;
2332
- result.input = array.input;
2333
- }
2334
- return result;
2335
- }
2336
-
2337
- var _initCloneArray = initCloneArray$1;
2338
-
2339
- var root = _root;
2340
-
2341
- /** Built-in value references. */
2342
- var Uint8Array$1 = root.Uint8Array;
2343
-
2344
- var _Uint8Array = Uint8Array$1;
2345
-
2346
- var Uint8Array = _Uint8Array;
2347
-
2348
- /**
2349
- * Creates a clone of `arrayBuffer`.
2350
- *
2351
- * @private
2352
- * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
2353
- * @returns {ArrayBuffer} Returns the cloned array buffer.
2354
- */
2355
- function cloneArrayBuffer$3(arrayBuffer) {
2356
- var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
2357
- new Uint8Array(result).set(new Uint8Array(arrayBuffer));
2358
- return result;
2359
- }
2360
-
2361
- var _cloneArrayBuffer = cloneArrayBuffer$3;
2362
-
2363
- var cloneArrayBuffer$2 = _cloneArrayBuffer;
2364
-
2365
- /**
2366
- * Creates a clone of `dataView`.
2367
- *
2368
- * @private
2369
- * @param {Object} dataView The data view to clone.
2370
- * @param {boolean} [isDeep] Specify a deep clone.
2371
- * @returns {Object} Returns the cloned data view.
2372
- */
2373
- function cloneDataView$1(dataView, isDeep) {
2374
- var buffer = isDeep ? cloneArrayBuffer$2(dataView.buffer) : dataView.buffer;
2375
- return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
2376
- }
2377
-
2378
- var _cloneDataView = cloneDataView$1;
2379
-
2380
- /** Used to match `RegExp` flags from their coerced string values. */
2381
-
2382
- var reFlags = /\w*$/;
2383
-
2384
- /**
2385
- * Creates a clone of `regexp`.
2386
- *
2387
- * @private
2388
- * @param {Object} regexp The regexp to clone.
2389
- * @returns {Object} Returns the cloned regexp.
2390
- */
2391
- function cloneRegExp$1(regexp) {
2392
- var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
2393
- result.lastIndex = regexp.lastIndex;
2394
- return result;
2395
- }
2396
-
2397
- var _cloneRegExp = cloneRegExp$1;
2398
-
2399
- var Symbol$2 = _Symbol;
2400
-
2401
- /** Used to convert symbols to primitives and strings. */
2402
- var symbolProto$1 = Symbol$2 ? Symbol$2.prototype : undefined,
2403
- symbolValueOf = symbolProto$1 ? symbolProto$1.valueOf : undefined;
2404
-
2405
- /**
2406
- * Creates a clone of the `symbol` object.
2407
- *
2408
- * @private
2409
- * @param {Object} symbol The symbol object to clone.
2410
- * @returns {Object} Returns the cloned symbol object.
2411
- */
2412
- function cloneSymbol$1(symbol) {
2413
- return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
2414
- }
2415
-
2416
- var _cloneSymbol = cloneSymbol$1;
2417
-
2418
- var cloneArrayBuffer$1 = _cloneArrayBuffer;
2419
-
2420
- /**
2421
- * Creates a clone of `typedArray`.
2422
- *
2423
- * @private
2424
- * @param {Object} typedArray The typed array to clone.
2425
- * @param {boolean} [isDeep] Specify a deep clone.
2426
- * @returns {Object} Returns the cloned typed array.
2427
- */
2428
- function cloneTypedArray$1(typedArray, isDeep) {
2429
- var buffer = isDeep ? cloneArrayBuffer$1(typedArray.buffer) : typedArray.buffer;
2430
- return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
2431
- }
2432
-
2433
- var _cloneTypedArray = cloneTypedArray$1;
2434
-
2435
- var cloneArrayBuffer = _cloneArrayBuffer,
2436
- cloneDataView = _cloneDataView,
2437
- cloneRegExp = _cloneRegExp,
2438
- cloneSymbol = _cloneSymbol,
2439
- cloneTypedArray = _cloneTypedArray;
2440
-
2441
- /** `Object#toString` result references. */
2442
- var boolTag$1 = '[object Boolean]',
2443
- dateTag$1 = '[object Date]',
2444
- mapTag$2 = '[object Map]',
2445
- numberTag$1 = '[object Number]',
2446
- regexpTag$1 = '[object RegExp]',
2447
- setTag$2 = '[object Set]',
2448
- stringTag$1 = '[object String]',
2449
- symbolTag$2 = '[object Symbol]';
2450
-
2451
- var arrayBufferTag$1 = '[object ArrayBuffer]',
2452
- dataViewTag$1 = '[object DataView]',
2453
- float32Tag$1 = '[object Float32Array]',
2454
- float64Tag$1 = '[object Float64Array]',
2455
- int8Tag$1 = '[object Int8Array]',
2456
- int16Tag$1 = '[object Int16Array]',
2457
- int32Tag$1 = '[object Int32Array]',
2458
- uint8Tag$1 = '[object Uint8Array]',
2459
- uint8ClampedTag$1 = '[object Uint8ClampedArray]',
2460
- uint16Tag$1 = '[object Uint16Array]',
2461
- uint32Tag$1 = '[object Uint32Array]';
2462
-
2463
- /**
2464
- * Initializes an object clone based on its `toStringTag`.
2465
- *
2466
- * **Note:** This function only supports cloning values with tags of
2467
- * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
2468
- *
2469
- * @private
2470
- * @param {Object} object The object to clone.
2471
- * @param {string} tag The `toStringTag` of the object to clone.
2472
- * @param {boolean} [isDeep] Specify a deep clone.
2473
- * @returns {Object} Returns the initialized clone.
2474
- */
2475
- function initCloneByTag$1(object, tag, isDeep) {
2476
- var Ctor = object.constructor;
2477
- switch (tag) {
2478
- case arrayBufferTag$1:
2479
- return cloneArrayBuffer(object);
2480
-
2481
- case boolTag$1:
2482
- case dateTag$1:
2483
- return new Ctor(+object);
2484
-
2485
- case dataViewTag$1:
2486
- return cloneDataView(object, isDeep);
2487
-
2488
- case float32Tag$1: case float64Tag$1:
2489
- case int8Tag$1: case int16Tag$1: case int32Tag$1:
2490
- case uint8Tag$1: case uint8ClampedTag$1: case uint16Tag$1: case uint32Tag$1:
2491
- return cloneTypedArray(object, isDeep);
2492
-
2493
- case mapTag$2:
2494
- return new Ctor;
2495
-
2496
- case numberTag$1:
2497
- case stringTag$1:
2498
- return new Ctor(object);
2499
-
2500
- case regexpTag$1:
2501
- return cloneRegExp(object);
2502
-
2503
- case setTag$2:
2504
- return new Ctor;
2505
-
2506
- case symbolTag$2:
2507
- return cloneSymbol(object);
2508
- }
2509
- }
2510
-
2511
- var _initCloneByTag = initCloneByTag$1;
2512
-
2513
- var isObject$1 = isObject_1;
2514
-
2515
- /** Built-in value references. */
2516
- var objectCreate = Object.create;
2517
-
2518
- /**
2519
- * The base implementation of `_.create` without support for assigning
2520
- * properties to the created object.
2521
- *
2522
- * @private
2523
- * @param {Object} proto The object to inherit from.
2524
- * @returns {Object} Returns the new object.
2525
- */
2526
- var baseCreate$1 = (function() {
2527
- function object() {}
2528
- return function(proto) {
2529
- if (!isObject$1(proto)) {
2530
- return {};
2531
- }
2532
- if (objectCreate) {
2533
- return objectCreate(proto);
2534
- }
2535
- object.prototype = proto;
2536
- var result = new object;
2537
- object.prototype = undefined;
2538
- return result;
2539
- };
2540
- }());
2541
-
2542
- var _baseCreate = baseCreate$1;
2543
-
2544
- var baseCreate = _baseCreate,
2545
- getPrototype$1 = _getPrototype,
2546
- isPrototype = _isPrototype;
2547
-
2548
- /**
2549
- * Initializes an object clone.
2550
- *
2551
- * @private
2552
- * @param {Object} object The object to clone.
2553
- * @returns {Object} Returns the initialized clone.
2554
- */
2555
- function initCloneObject$1(object) {
2556
- return (typeof object.constructor == 'function' && !isPrototype(object))
2557
- ? baseCreate(getPrototype$1(object))
2558
- : {};
2559
- }
2560
-
2561
- var _initCloneObject = initCloneObject$1;
2562
-
2563
- var getTag$2 = _getTag,
2564
- isObjectLike$3 = isObjectLike_1;
2565
-
2566
- /** `Object#toString` result references. */
2567
- var mapTag$1 = '[object Map]';
2568
-
2569
- /**
2570
- * The base implementation of `_.isMap` without Node.js optimizations.
2571
- *
2572
- * @private
2573
- * @param {*} value The value to check.
2574
- * @returns {boolean} Returns `true` if `value` is a map, else `false`.
2575
- */
2576
- function baseIsMap$1(value) {
2577
- return isObjectLike$3(value) && getTag$2(value) == mapTag$1;
2578
- }
2579
-
2580
- var _baseIsMap = baseIsMap$1;
2581
-
2582
- var baseIsMap = _baseIsMap,
2583
- baseUnary$1 = _baseUnary,
2584
- nodeUtil$1 = _nodeUtil.exports;
2585
-
2586
- /* Node.js helper references. */
2587
- var nodeIsMap = nodeUtil$1 && nodeUtil$1.isMap;
2588
-
2589
- /**
2590
- * Checks if `value` is classified as a `Map` object.
2591
- *
2592
- * @static
2593
- * @memberOf _
2594
- * @since 4.3.0
2595
- * @category Lang
2596
- * @param {*} value The value to check.
2597
- * @returns {boolean} Returns `true` if `value` is a map, else `false`.
2598
- * @example
2599
- *
2600
- * _.isMap(new Map);
2601
- * // => true
2602
- *
2603
- * _.isMap(new WeakMap);
2604
- * // => false
2605
- */
2606
- var isMap$1 = nodeIsMap ? baseUnary$1(nodeIsMap) : baseIsMap;
2607
-
2608
- var isMap_1 = isMap$1;
2609
-
2610
- var getTag$1 = _getTag,
2611
- isObjectLike$2 = isObjectLike_1;
2612
-
2613
- /** `Object#toString` result references. */
2614
- var setTag$1 = '[object Set]';
2615
-
2616
- /**
2617
- * The base implementation of `_.isSet` without Node.js optimizations.
2618
- *
2619
- * @private
2620
- * @param {*} value The value to check.
2621
- * @returns {boolean} Returns `true` if `value` is a set, else `false`.
2622
- */
2623
- function baseIsSet$1(value) {
2624
- return isObjectLike$2(value) && getTag$1(value) == setTag$1;
2625
- }
2626
-
2627
- var _baseIsSet = baseIsSet$1;
2628
-
2629
- var baseIsSet = _baseIsSet,
2630
- baseUnary = _baseUnary,
2631
- nodeUtil = _nodeUtil.exports;
2632
-
2633
- /* Node.js helper references. */
2634
- var nodeIsSet = nodeUtil && nodeUtil.isSet;
2635
-
2636
- /**
2637
- * Checks if `value` is classified as a `Set` object.
2638
- *
2639
- * @static
2640
- * @memberOf _
2641
- * @since 4.3.0
2642
- * @category Lang
2643
- * @param {*} value The value to check.
2644
- * @returns {boolean} Returns `true` if `value` is a set, else `false`.
2645
- * @example
2646
- *
2647
- * _.isSet(new Set);
2648
- * // => true
2649
- *
2650
- * _.isSet(new WeakSet);
2651
- * // => false
2652
- */
2653
- var isSet$1 = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
2654
-
2655
- var isSet_1 = isSet$1;
2656
-
2657
- var Stack = _Stack,
2658
- arrayEach = _arrayEach,
2659
- assignValue = _assignValue,
2660
- baseAssign = _baseAssign,
2661
- baseAssignIn = _baseAssignIn,
2662
- cloneBuffer = _cloneBuffer.exports,
2663
- copyArray = _copyArray,
2664
- copySymbols = _copySymbols,
2665
- copySymbolsIn = _copySymbolsIn,
2666
- getAllKeys = _getAllKeys,
2667
- getAllKeysIn$1 = _getAllKeysIn,
2668
- getTag = _getTag,
2669
- initCloneArray = _initCloneArray,
2670
- initCloneByTag = _initCloneByTag,
2671
- initCloneObject = _initCloneObject,
2672
- isArray$4 = isArray_1,
2673
- isBuffer = isBuffer$2.exports,
2674
- isMap = isMap_1,
2675
- isObject = isObject_1,
2676
- isSet = isSet_1,
2677
- keys = keys_1,
2678
- keysIn = keysIn_1;
2679
-
2680
- /** Used to compose bitmasks for cloning. */
2681
- var CLONE_DEEP_FLAG$1 = 1,
2682
- CLONE_FLAT_FLAG$1 = 2,
2683
- CLONE_SYMBOLS_FLAG$1 = 4;
2684
-
2685
- /** `Object#toString` result references. */
2686
- var argsTag = '[object Arguments]',
2687
- arrayTag = '[object Array]',
2688
- boolTag = '[object Boolean]',
2689
- dateTag = '[object Date]',
2690
- errorTag = '[object Error]',
2691
- funcTag = '[object Function]',
2692
- genTag = '[object GeneratorFunction]',
2693
- mapTag = '[object Map]',
2694
- numberTag = '[object Number]',
2695
- objectTag$1 = '[object Object]',
2696
- regexpTag = '[object RegExp]',
2697
- setTag = '[object Set]',
2698
- stringTag = '[object String]',
2699
- symbolTag$1 = '[object Symbol]',
2700
- weakMapTag = '[object WeakMap]';
2701
-
2702
- var arrayBufferTag = '[object ArrayBuffer]',
2703
- dataViewTag = '[object DataView]',
2704
- float32Tag = '[object Float32Array]',
2705
- float64Tag = '[object Float64Array]',
2706
- int8Tag = '[object Int8Array]',
2707
- int16Tag = '[object Int16Array]',
2708
- int32Tag = '[object Int32Array]',
2709
- uint8Tag = '[object Uint8Array]',
2710
- uint8ClampedTag = '[object Uint8ClampedArray]',
2711
- uint16Tag = '[object Uint16Array]',
2712
- uint32Tag = '[object Uint32Array]';
2713
-
2714
- /** Used to identify `toStringTag` values supported by `_.clone`. */
2715
- var cloneableTags = {};
2716
- cloneableTags[argsTag] = cloneableTags[arrayTag] =
2717
- cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
2718
- cloneableTags[boolTag] = cloneableTags[dateTag] =
2719
- cloneableTags[float32Tag] = cloneableTags[float64Tag] =
2720
- cloneableTags[int8Tag] = cloneableTags[int16Tag] =
2721
- cloneableTags[int32Tag] = cloneableTags[mapTag] =
2722
- cloneableTags[numberTag] = cloneableTags[objectTag$1] =
2723
- cloneableTags[regexpTag] = cloneableTags[setTag] =
2724
- cloneableTags[stringTag] = cloneableTags[symbolTag$1] =
2725
- cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
2726
- cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
2727
- cloneableTags[errorTag] = cloneableTags[funcTag] =
2728
- cloneableTags[weakMapTag] = false;
2729
-
2730
- /**
2731
- * The base implementation of `_.clone` and `_.cloneDeep` which tracks
2732
- * traversed objects.
2733
- *
2734
- * @private
2735
- * @param {*} value The value to clone.
2736
- * @param {boolean} bitmask The bitmask flags.
2737
- * 1 - Deep clone
2738
- * 2 - Flatten inherited properties
2739
- * 4 - Clone symbols
2740
- * @param {Function} [customizer] The function to customize cloning.
2741
- * @param {string} [key] The key of `value`.
2742
- * @param {Object} [object] The parent object of `value`.
2743
- * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
2744
- * @returns {*} Returns the cloned value.
2745
- */
2746
- function baseClone$1(value, bitmask, customizer, key, object, stack) {
2747
- var result,
2748
- isDeep = bitmask & CLONE_DEEP_FLAG$1,
2749
- isFlat = bitmask & CLONE_FLAT_FLAG$1,
2750
- isFull = bitmask & CLONE_SYMBOLS_FLAG$1;
2751
-
2752
- if (customizer) {
2753
- result = object ? customizer(value, key, object, stack) : customizer(value);
2754
- }
2755
- if (result !== undefined) {
2756
- return result;
2757
- }
2758
- if (!isObject(value)) {
2759
- return value;
2760
- }
2761
- var isArr = isArray$4(value);
2762
- if (isArr) {
2763
- result = initCloneArray(value);
2764
- if (!isDeep) {
2765
- return copyArray(value, result);
2766
- }
2767
- } else {
2768
- var tag = getTag(value),
2769
- isFunc = tag == funcTag || tag == genTag;
2770
-
2771
- if (isBuffer(value)) {
2772
- return cloneBuffer(value, isDeep);
2773
- }
2774
- if (tag == objectTag$1 || tag == argsTag || (isFunc && !object)) {
2775
- result = (isFlat || isFunc) ? {} : initCloneObject(value);
2776
- if (!isDeep) {
2777
- return isFlat
2778
- ? copySymbolsIn(value, baseAssignIn(result, value))
2779
- : copySymbols(value, baseAssign(result, value));
2780
- }
2781
- } else {
2782
- if (!cloneableTags[tag]) {
2783
- return object ? value : {};
2784
- }
2785
- result = initCloneByTag(value, tag, isDeep);
2786
- }
2787
- }
2788
- // Check for circular references and return its corresponding clone.
2789
- stack || (stack = new Stack);
2790
- var stacked = stack.get(value);
2791
- if (stacked) {
2792
- return stacked;
2793
- }
2794
- stack.set(value, result);
2795
-
2796
- if (isSet(value)) {
2797
- value.forEach(function(subValue) {
2798
- result.add(baseClone$1(subValue, bitmask, customizer, subValue, value, stack));
2799
- });
2800
- } else if (isMap(value)) {
2801
- value.forEach(function(subValue, key) {
2802
- result.set(key, baseClone$1(subValue, bitmask, customizer, key, value, stack));
2803
- });
2804
- }
2805
-
2806
- var keysFunc = isFull
2807
- ? (isFlat ? getAllKeysIn$1 : getAllKeys)
2808
- : (isFlat ? keysIn : keys);
2809
-
2810
- var props = isArr ? undefined : keysFunc(value);
2811
- arrayEach(props || value, function(subValue, key) {
2812
- if (props) {
2813
- key = subValue;
2814
- subValue = value[key];
2815
- }
2816
- // Recursively populate clone (susceptible to call stack limits).
2817
- assignValue(result, key, baseClone$1(subValue, bitmask, customizer, key, value, stack));
2818
- });
2819
- return result;
2820
- }
2821
-
2822
- var _baseClone = baseClone$1;
2823
-
2824
- var baseGetTag$1 = _baseGetTag,
2825
- isObjectLike$1 = isObjectLike_1;
2826
-
2827
- /** `Object#toString` result references. */
2828
- var symbolTag = '[object Symbol]';
2829
-
2830
- /**
2831
- * Checks if `value` is classified as a `Symbol` primitive or object.
2832
- *
2833
- * @static
2834
- * @memberOf _
2835
- * @since 4.0.0
2836
- * @category Lang
2837
- * @param {*} value The value to check.
2838
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
2839
- * @example
2840
- *
2841
- * _.isSymbol(Symbol.iterator);
2842
- * // => true
2843
- *
2844
- * _.isSymbol('abc');
2845
- * // => false
2846
- */
2847
- function isSymbol$3(value) {
2848
- return typeof value == 'symbol' ||
2849
- (isObjectLike$1(value) && baseGetTag$1(value) == symbolTag);
2850
- }
2851
-
2852
- var isSymbol_1 = isSymbol$3;
2853
-
2854
- var isArray$3 = isArray_1,
2855
- isSymbol$2 = isSymbol_1;
2856
-
2857
- /** Used to match property names within property paths. */
2858
- var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
2859
- reIsPlainProp = /^\w*$/;
2860
-
2861
- /**
2862
- * Checks if `value` is a property name and not a property path.
2863
- *
2864
- * @private
2865
- * @param {*} value The value to check.
2866
- * @param {Object} [object] The object to query keys on.
2867
- * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
2868
- */
2869
- function isKey$1(value, object) {
2870
- if (isArray$3(value)) {
2871
- return false;
2872
- }
2873
- var type = typeof value;
2874
- if (type == 'number' || type == 'symbol' || type == 'boolean' ||
2875
- value == null || isSymbol$2(value)) {
2876
- return true;
2877
- }
2878
- return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
2879
- (object != null && value in Object(object));
2880
- }
2881
-
2882
- var _isKey = isKey$1;
2883
-
2884
- var MapCache = _MapCache;
2885
-
2886
- /** Error message constants. */
2887
- var FUNC_ERROR_TEXT = 'Expected a function';
2888
-
2889
- /**
2890
- * Creates a function that memoizes the result of `func`. If `resolver` is
2891
- * provided, it determines the cache key for storing the result based on the
2892
- * arguments provided to the memoized function. By default, the first argument
2893
- * provided to the memoized function is used as the map cache key. The `func`
2894
- * is invoked with the `this` binding of the memoized function.
2895
- *
2896
- * **Note:** The cache is exposed as the `cache` property on the memoized
2897
- * function. Its creation may be customized by replacing the `_.memoize.Cache`
2898
- * constructor with one whose instances implement the
2899
- * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
2900
- * method interface of `clear`, `delete`, `get`, `has`, and `set`.
2901
- *
2902
- * @static
2903
- * @memberOf _
2904
- * @since 0.1.0
2905
- * @category Function
2906
- * @param {Function} func The function to have its output memoized.
2907
- * @param {Function} [resolver] The function to resolve the cache key.
2908
- * @returns {Function} Returns the new memoized function.
2909
- * @example
2910
- *
2911
- * var object = { 'a': 1, 'b': 2 };
2912
- * var other = { 'c': 3, 'd': 4 };
2913
- *
2914
- * var values = _.memoize(_.values);
2915
- * values(object);
2916
- * // => [1, 2]
2917
- *
2918
- * values(other);
2919
- * // => [3, 4]
2920
- *
2921
- * object.a = 2;
2922
- * values(object);
2923
- * // => [1, 2]
2924
- *
2925
- * // Modify the result cache.
2926
- * values.cache.set(object, ['a', 'b']);
2927
- * values(object);
2928
- * // => ['a', 'b']
2929
- *
2930
- * // Replace `_.memoize.Cache`.
2931
- * _.memoize.Cache = WeakMap;
2932
- */
2933
- function memoize$1(func, resolver) {
2934
- if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
2935
- throw new TypeError(FUNC_ERROR_TEXT);
2936
- }
2937
- var memoized = function() {
2938
- var args = arguments,
2939
- key = resolver ? resolver.apply(this, args) : args[0],
2940
- cache = memoized.cache;
2941
-
2942
- if (cache.has(key)) {
2943
- return cache.get(key);
2944
- }
2945
- var result = func.apply(this, args);
2946
- memoized.cache = cache.set(key, result) || cache;
2947
- return result;
2948
- };
2949
- memoized.cache = new (memoize$1.Cache || MapCache);
2950
- return memoized;
2951
- }
2952
-
2953
- // Expose `MapCache`.
2954
- memoize$1.Cache = MapCache;
2955
-
2956
- var memoize_1 = memoize$1;
2957
-
2958
- var memoize = memoize_1;
2959
-
2960
- /** Used as the maximum memoize cache size. */
2961
- var MAX_MEMOIZE_SIZE = 500;
2962
-
2963
- /**
2964
- * A specialized version of `_.memoize` which clears the memoized function's
2965
- * cache when it exceeds `MAX_MEMOIZE_SIZE`.
2966
- *
2967
- * @private
2968
- * @param {Function} func The function to have its output memoized.
2969
- * @returns {Function} Returns the new memoized function.
2970
- */
2971
- function memoizeCapped$1(func) {
2972
- var result = memoize(func, function(key) {
2973
- if (cache.size === MAX_MEMOIZE_SIZE) {
2974
- cache.clear();
2975
- }
2976
- return key;
2977
- });
2978
-
2979
- var cache = result.cache;
2980
- return result;
2981
- }
2982
-
2983
- var _memoizeCapped = memoizeCapped$1;
2984
-
2985
- var memoizeCapped = _memoizeCapped;
2986
-
2987
- /** Used to match property names within property paths. */
2988
- var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
2989
-
2990
- /** Used to match backslashes in property paths. */
2991
- var reEscapeChar = /\\(\\)?/g;
2992
-
2993
- /**
2994
- * Converts `string` to a property path array.
2995
- *
2996
- * @private
2997
- * @param {string} string The string to convert.
2998
- * @returns {Array} Returns the property path array.
2999
- */
3000
- var stringToPath$1 = memoizeCapped(function(string) {
3001
- var result = [];
3002
- if (string.charCodeAt(0) === 46 /* . */) {
3003
- result.push('');
3004
- }
3005
- string.replace(rePropName, function(match, number, quote, subString) {
3006
- result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
3007
- });
3008
- return result;
3009
- });
3010
-
3011
- var _stringToPath = stringToPath$1;
3012
-
3013
- var Symbol$1 = _Symbol,
3014
- arrayMap$1 = _arrayMap,
3015
- isArray$2 = isArray_1,
3016
- isSymbol$1 = isSymbol_1;
3017
-
3018
- /** Used as references for various `Number` constants. */
3019
- var INFINITY$1 = 1 / 0;
3020
-
3021
- /** Used to convert symbols to primitives and strings. */
3022
- var symbolProto = Symbol$1 ? Symbol$1.prototype : undefined,
3023
- symbolToString = symbolProto ? symbolProto.toString : undefined;
3024
-
3025
- /**
3026
- * The base implementation of `_.toString` which doesn't convert nullish
3027
- * values to empty strings.
3028
- *
3029
- * @private
3030
- * @param {*} value The value to process.
3031
- * @returns {string} Returns the string.
3032
- */
3033
- function baseToString$1(value) {
3034
- // Exit early for strings to avoid a performance hit in some environments.
3035
- if (typeof value == 'string') {
3036
- return value;
3037
- }
3038
- if (isArray$2(value)) {
3039
- // Recursively convert values (susceptible to call stack limits).
3040
- return arrayMap$1(value, baseToString$1) + '';
3041
- }
3042
- if (isSymbol$1(value)) {
3043
- return symbolToString ? symbolToString.call(value) : '';
3044
- }
3045
- var result = (value + '');
3046
- return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
3047
- }
3048
-
3049
- var _baseToString = baseToString$1;
3050
-
3051
- var baseToString = _baseToString;
3052
-
3053
- /**
3054
- * Converts `value` to a string. An empty string is returned for `null`
3055
- * and `undefined` values. The sign of `-0` is preserved.
3056
- *
3057
- * @static
3058
- * @memberOf _
3059
- * @since 4.0.0
3060
- * @category Lang
3061
- * @param {*} value The value to convert.
3062
- * @returns {string} Returns the converted string.
3063
- * @example
3064
- *
3065
- * _.toString(null);
3066
- * // => ''
3067
- *
3068
- * _.toString(-0);
3069
- * // => '-0'
3070
- *
3071
- * _.toString([1, 2, 3]);
3072
- * // => '1,2,3'
3073
- */
3074
- function toString$1(value) {
3075
- return value == null ? '' : baseToString(value);
3076
- }
3077
-
3078
- var toString_1 = toString$1;
3079
-
3080
- var isArray$1 = isArray_1,
3081
- isKey = _isKey,
3082
- stringToPath = _stringToPath,
3083
- toString = toString_1;
3084
-
3085
- /**
3086
- * Casts `value` to a path array if it's not one.
3087
- *
3088
- * @private
3089
- * @param {*} value The value to inspect.
3090
- * @param {Object} [object] The object to query keys on.
3091
- * @returns {Array} Returns the cast property path array.
3092
- */
3093
- function castPath$3(value, object) {
3094
- if (isArray$1(value)) {
3095
- return value;
3096
- }
3097
- return isKey(value, object) ? [value] : stringToPath(toString(value));
3098
- }
3099
-
3100
- var _castPath = castPath$3;
3101
-
3102
- /**
3103
- * Gets the last element of `array`.
3104
- *
3105
- * @static
3106
- * @memberOf _
3107
- * @since 0.1.0
3108
- * @category Array
3109
- * @param {Array} array The array to query.
3110
- * @returns {*} Returns the last element of `array`.
3111
- * @example
3112
- *
3113
- * _.last([1, 2, 3]);
3114
- * // => 3
3115
- */
3116
-
3117
- function last$1(array) {
3118
- var length = array == null ? 0 : array.length;
3119
- return length ? array[length - 1] : undefined;
3120
- }
3121
-
3122
- var last_1 = last$1;
3123
-
3124
- var isSymbol = isSymbol_1;
3125
-
3126
- /** Used as references for various `Number` constants. */
3127
- var INFINITY = 1 / 0;
3128
-
3129
- /**
3130
- * Converts `value` to a string key if it's not a string or symbol.
3131
- *
3132
- * @private
3133
- * @param {*} value The value to inspect.
3134
- * @returns {string|symbol} Returns the key.
3135
- */
3136
- function toKey$2(value) {
3137
- if (typeof value == 'string' || isSymbol(value)) {
3138
- return value;
3139
- }
3140
- var result = (value + '');
3141
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
3142
- }
3143
-
3144
- var _toKey = toKey$2;
3145
-
3146
- var castPath$2 = _castPath,
3147
- toKey$1 = _toKey;
3148
-
3149
- /**
3150
- * The base implementation of `_.get` without support for default values.
3151
- *
3152
- * @private
3153
- * @param {Object} object The object to query.
3154
- * @param {Array|string} path The path of the property to get.
3155
- * @returns {*} Returns the resolved value.
3156
- */
3157
- function baseGet$1(object, path) {
3158
- path = castPath$2(path, object);
3159
-
3160
- var index = 0,
3161
- length = path.length;
3162
-
3163
- while (object != null && index < length) {
3164
- object = object[toKey$1(path[index++])];
3165
- }
3166
- return (index && index == length) ? object : undefined;
3167
- }
3168
-
3169
- var _baseGet = baseGet$1;
3170
-
3171
- /**
3172
- * The base implementation of `_.slice` without an iteratee call guard.
3173
- *
3174
- * @private
3175
- * @param {Array} array The array to slice.
3176
- * @param {number} [start=0] The start position.
3177
- * @param {number} [end=array.length] The end position.
3178
- * @returns {Array} Returns the slice of `array`.
3179
- */
3180
-
3181
- function baseSlice$1(array, start, end) {
3182
- var index = -1,
3183
- length = array.length;
3184
-
3185
- if (start < 0) {
3186
- start = -start > length ? 0 : (length + start);
3187
- }
3188
- end = end > length ? length : end;
3189
- if (end < 0) {
3190
- end += length;
3191
- }
3192
- length = start > end ? 0 : ((end - start) >>> 0);
3193
- start >>>= 0;
3194
-
3195
- var result = Array(length);
3196
- while (++index < length) {
3197
- result[index] = array[index + start];
3198
- }
3199
- return result;
3200
- }
3201
-
3202
- var _baseSlice = baseSlice$1;
3203
-
3204
- var baseGet = _baseGet,
3205
- baseSlice = _baseSlice;
3206
-
3207
- /**
3208
- * Gets the parent value at `path` of `object`.
3209
- *
3210
- * @private
3211
- * @param {Object} object The object to query.
3212
- * @param {Array} path The path to get the parent value of.
3213
- * @returns {*} Returns the parent value.
3214
- */
3215
- function parent$1(object, path) {
3216
- return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
3217
- }
3218
-
3219
- var _parent = parent$1;
3220
-
3221
- var castPath$1 = _castPath,
3222
- last = last_1,
3223
- parent = _parent,
3224
- toKey = _toKey;
3225
-
3226
- /**
3227
- * The base implementation of `_.unset`.
3228
- *
3229
- * @private
3230
- * @param {Object} object The object to modify.
3231
- * @param {Array|string} path The property path to unset.
3232
- * @returns {boolean} Returns `true` if the property is deleted, else `false`.
3233
- */
3234
- function baseUnset$1(object, path) {
3235
- path = castPath$1(path, object);
3236
- object = parent(object, path);
3237
- return object == null || delete object[toKey(last(path))];
3238
- }
3239
-
3240
- var _baseUnset = baseUnset$1;
3241
-
3242
- var baseGetTag = _baseGetTag,
3243
- getPrototype = _getPrototype,
3244
- isObjectLike = isObjectLike_1;
3245
-
3246
- /** `Object#toString` result references. */
3247
- var objectTag = '[object Object]';
3248
-
3249
- /** Used for built-in method references. */
3250
- var funcProto = Function.prototype,
3251
- objectProto = Object.prototype;
3252
-
3253
- /** Used to resolve the decompiled source of functions. */
3254
- var funcToString = funcProto.toString;
3255
-
3256
- /** Used to check objects for own properties. */
3257
- var hasOwnProperty = objectProto.hasOwnProperty;
3258
-
3259
- /** Used to infer the `Object` constructor. */
3260
- var objectCtorString = funcToString.call(Object);
3261
-
3262
- /**
3263
- * Checks if `value` is a plain object, that is, an object created by the
3264
- * `Object` constructor or one with a `[[Prototype]]` of `null`.
3265
- *
3266
- * @static
3267
- * @memberOf _
3268
- * @since 0.8.0
3269
- * @category Lang
3270
- * @param {*} value The value to check.
3271
- * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
3272
- * @example
3273
- *
3274
- * function Foo() {
3275
- * this.a = 1;
3276
- * }
3277
- *
3278
- * _.isPlainObject(new Foo);
3279
- * // => false
3280
- *
3281
- * _.isPlainObject([1, 2, 3]);
3282
- * // => false
3283
- *
3284
- * _.isPlainObject({ 'x': 0, 'y': 0 });
3285
- * // => true
3286
- *
3287
- * _.isPlainObject(Object.create(null));
3288
- * // => true
3289
- */
3290
- function isPlainObject$1(value) {
3291
- if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
3292
- return false;
3293
- }
3294
- var proto = getPrototype(value);
3295
- if (proto === null) {
3296
- return true;
3297
- }
3298
- var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
3299
- return typeof Ctor == 'function' && Ctor instanceof Ctor &&
3300
- funcToString.call(Ctor) == objectCtorString;
3301
- }
3302
-
3303
- var isPlainObject_1 = isPlainObject$1;
3304
-
3305
- var isPlainObject = isPlainObject_1;
3306
-
3307
- /**
3308
- * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
3309
- * objects.
3310
- *
3311
- * @private
3312
- * @param {*} value The value to inspect.
3313
- * @param {string} key The key of the property to inspect.
3314
- * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
3315
- */
3316
- function customOmitClone$1(value) {
3317
- return isPlainObject(value) ? undefined : value;
3318
- }
3319
-
3320
- var _customOmitClone = customOmitClone$1;
3321
-
3322
- var Symbol = _Symbol,
3323
- isArguments = isArguments_1,
3324
- isArray = isArray_1;
3325
-
3326
- /** Built-in value references. */
3327
- var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;
3328
-
3329
- /**
3330
- * Checks if `value` is a flattenable `arguments` object or array.
3331
- *
3332
- * @private
3333
- * @param {*} value The value to check.
3334
- * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
3335
- */
3336
- function isFlattenable$1(value) {
3337
- return isArray(value) || isArguments(value) ||
3338
- !!(spreadableSymbol && value && value[spreadableSymbol]);
3339
- }
3340
-
3341
- var _isFlattenable = isFlattenable$1;
3342
-
3343
- var arrayPush = _arrayPush,
3344
- isFlattenable = _isFlattenable;
3345
-
3346
- /**
3347
- * The base implementation of `_.flatten` with support for restricting flattening.
3348
- *
3349
- * @private
3350
- * @param {Array} array The array to flatten.
3351
- * @param {number} depth The maximum recursion depth.
3352
- * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
3353
- * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
3354
- * @param {Array} [result=[]] The initial result value.
3355
- * @returns {Array} Returns the new flattened array.
3356
- */
3357
- function baseFlatten$1(array, depth, predicate, isStrict, result) {
3358
- var index = -1,
3359
- length = array.length;
3360
-
3361
- predicate || (predicate = isFlattenable);
3362
- result || (result = []);
3363
-
3364
- while (++index < length) {
3365
- var value = array[index];
3366
- if (depth > 0 && predicate(value)) {
3367
- if (depth > 1) {
3368
- // Recursively flatten arrays (susceptible to call stack limits).
3369
- baseFlatten$1(value, depth - 1, predicate, isStrict, result);
3370
- } else {
3371
- arrayPush(result, value);
3372
- }
3373
- } else if (!isStrict) {
3374
- result[result.length] = value;
3375
- }
3376
- }
3377
- return result;
3378
- }
3379
-
3380
- var _baseFlatten = baseFlatten$1;
3381
-
3382
- var baseFlatten = _baseFlatten;
3383
-
3384
- /**
3385
- * Flattens `array` a single level deep.
3386
- *
3387
- * @static
3388
- * @memberOf _
3389
- * @since 0.1.0
3390
- * @category Array
3391
- * @param {Array} array The array to flatten.
3392
- * @returns {Array} Returns the new flattened array.
3393
- * @example
3394
- *
3395
- * _.flatten([1, [2, [3, [4]], 5]]);
3396
- * // => [1, 2, [3, [4]], 5]
3397
- */
3398
- function flatten$1(array) {
3399
- var length = array == null ? 0 : array.length;
3400
- return length ? baseFlatten(array, 1) : [];
3401
- }
3402
-
3403
- var flatten_1 = flatten$1;
3404
-
3405
- /**
3406
- * A faster alternative to `Function#apply`, this function invokes `func`
3407
- * with the `this` binding of `thisArg` and the arguments of `args`.
3408
- *
3409
- * @private
3410
- * @param {Function} func The function to invoke.
3411
- * @param {*} thisArg The `this` binding of `func`.
3412
- * @param {Array} args The arguments to invoke `func` with.
3413
- * @returns {*} Returns the result of `func`.
3414
- */
3415
-
3416
- function apply$1(func, thisArg, args) {
3417
- switch (args.length) {
3418
- case 0: return func.call(thisArg);
3419
- case 1: return func.call(thisArg, args[0]);
3420
- case 2: return func.call(thisArg, args[0], args[1]);
3421
- case 3: return func.call(thisArg, args[0], args[1], args[2]);
3422
- }
3423
- return func.apply(thisArg, args);
3424
- }
3425
-
3426
- var _apply = apply$1;
3427
-
3428
- var apply = _apply;
3429
-
3430
- /* Built-in method references for those with the same name as other `lodash` methods. */
3431
- var nativeMax = Math.max;
3432
-
3433
- /**
3434
- * A specialized version of `baseRest` which transforms the rest array.
3435
- *
3436
- * @private
3437
- * @param {Function} func The function to apply a rest parameter to.
3438
- * @param {number} [start=func.length-1] The start position of the rest parameter.
3439
- * @param {Function} transform The rest array transform.
3440
- * @returns {Function} Returns the new function.
3441
- */
3442
- function overRest$1(func, start, transform) {
3443
- start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
3444
- return function() {
3445
- var args = arguments,
3446
- index = -1,
3447
- length = nativeMax(args.length - start, 0),
3448
- array = Array(length);
3449
-
3450
- while (++index < length) {
3451
- array[index] = args[start + index];
3452
- }
3453
- index = -1;
3454
- var otherArgs = Array(start + 1);
3455
- while (++index < start) {
3456
- otherArgs[index] = args[index];
3457
- }
3458
- otherArgs[start] = transform(array);
3459
- return apply(func, this, otherArgs);
3460
- };
3461
- }
3462
-
3463
- var _overRest = overRest$1;
3464
-
3465
- /**
3466
- * Creates a function that returns `value`.
3467
- *
3468
- * @static
3469
- * @memberOf _
3470
- * @since 2.4.0
3471
- * @category Util
3472
- * @param {*} value The value to return from the new function.
3473
- * @returns {Function} Returns the new constant function.
3474
- * @example
3475
- *
3476
- * var objects = _.times(2, _.constant({ 'a': 1 }));
3477
- *
3478
- * console.log(objects);
3479
- * // => [{ 'a': 1 }, { 'a': 1 }]
3480
- *
3481
- * console.log(objects[0] === objects[1]);
3482
- * // => true
3483
- */
3484
-
3485
- function constant$1(value) {
3486
- return function() {
3487
- return value;
3488
- };
3489
- }
3490
-
3491
- var constant_1 = constant$1;
3492
-
3493
- /**
3494
- * This method returns the first argument it receives.
3495
- *
3496
- * @static
3497
- * @since 0.1.0
3498
- * @memberOf _
3499
- * @category Util
3500
- * @param {*} value Any value.
3501
- * @returns {*} Returns `value`.
3502
- * @example
3503
- *
3504
- * var object = { 'a': 1 };
3505
- *
3506
- * console.log(_.identity(object) === object);
3507
- * // => true
3508
- */
3509
-
3510
- function identity$1(value) {
3511
- return value;
3512
- }
3513
-
3514
- var identity_1 = identity$1;
3515
-
3516
- var constant = constant_1,
3517
- defineProperty = _defineProperty,
3518
- identity = identity_1;
3519
-
3520
- /**
3521
- * The base implementation of `setToString` without support for hot loop shorting.
3522
- *
3523
- * @private
3524
- * @param {Function} func The function to modify.
3525
- * @param {Function} string The `toString` result.
3526
- * @returns {Function} Returns `func`.
3527
- */
3528
- var baseSetToString$1 = !defineProperty ? identity : function(func, string) {
3529
- return defineProperty(func, 'toString', {
3530
- 'configurable': true,
3531
- 'enumerable': false,
3532
- 'value': constant(string),
3533
- 'writable': true
3534
- });
3535
- };
3536
-
3537
- var _baseSetToString = baseSetToString$1;
3538
-
3539
- /** Used to detect hot functions by number of calls within a span of milliseconds. */
3540
-
3541
- var HOT_COUNT = 800,
3542
- HOT_SPAN = 16;
3543
-
3544
- /* Built-in method references for those with the same name as other `lodash` methods. */
3545
- var nativeNow = Date.now;
3546
-
3547
- /**
3548
- * Creates a function that'll short out and invoke `identity` instead
3549
- * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
3550
- * milliseconds.
3551
- *
3552
- * @private
3553
- * @param {Function} func The function to restrict.
3554
- * @returns {Function} Returns the new shortable function.
3555
- */
3556
- function shortOut$1(func) {
3557
- var count = 0,
3558
- lastCalled = 0;
3559
-
3560
- return function() {
3561
- var stamp = nativeNow(),
3562
- remaining = HOT_SPAN - (stamp - lastCalled);
3563
-
3564
- lastCalled = stamp;
3565
- if (remaining > 0) {
3566
- if (++count >= HOT_COUNT) {
3567
- return arguments[0];
3568
- }
3569
- } else {
3570
- count = 0;
3571
- }
3572
- return func.apply(undefined, arguments);
3573
- };
3574
- }
3575
-
3576
- var _shortOut = shortOut$1;
3577
-
3578
- var baseSetToString = _baseSetToString,
3579
- shortOut = _shortOut;
3580
-
3581
- /**
3582
- * Sets the `toString` method of `func` to return `string`.
3583
- *
3584
- * @private
3585
- * @param {Function} func The function to modify.
3586
- * @param {Function} string The `toString` result.
3587
- * @returns {Function} Returns `func`.
3588
- */
3589
- var setToString$1 = shortOut(baseSetToString);
3590
-
3591
- var _setToString = setToString$1;
3592
-
3593
- var flatten = flatten_1,
3594
- overRest = _overRest,
3595
- setToString = _setToString;
3596
-
3597
- /**
3598
- * A specialized version of `baseRest` which flattens the rest array.
3599
- *
3600
- * @private
3601
- * @param {Function} func The function to apply a rest parameter to.
3602
- * @returns {Function} Returns the new function.
3603
- */
3604
- function flatRest$1(func) {
3605
- return setToString(overRest(func, undefined, flatten), func + '');
3606
- }
3607
-
3608
- var _flatRest = flatRest$1;
3609
-
3610
- var arrayMap = _arrayMap,
3611
- baseClone = _baseClone,
3612
- baseUnset = _baseUnset,
3613
- castPath = _castPath,
3614
- copyObject = _copyObject,
3615
- customOmitClone = _customOmitClone,
3616
- flatRest = _flatRest,
3617
- getAllKeysIn = _getAllKeysIn;
3618
-
3619
- /** Used to compose bitmasks for cloning. */
3620
- var CLONE_DEEP_FLAG = 1,
3621
- CLONE_FLAT_FLAG = 2,
3622
- CLONE_SYMBOLS_FLAG = 4;
3623
-
3624
- /**
3625
- * The opposite of `_.pick`; this method creates an object composed of the
3626
- * own and inherited enumerable property paths of `object` that are not omitted.
3627
- *
3628
- * **Note:** This method is considerably slower than `_.pick`.
3629
- *
3630
- * @static
3631
- * @since 0.1.0
3632
- * @memberOf _
3633
- * @category Object
3634
- * @param {Object} object The source object.
3635
- * @param {...(string|string[])} [paths] The property paths to omit.
3636
- * @returns {Object} Returns the new object.
3637
- * @example
3638
- *
3639
- * var object = { 'a': 1, 'b': '2', 'c': 3 };
3640
- *
3641
- * _.omit(object, ['a', 'c']);
3642
- * // => { 'b': '2' }
3643
- */
3644
- var omit = flatRest(function(object, paths) {
3645
- var result = {};
3646
- if (object == null) {
3647
- return result;
3648
- }
3649
- var isDeep = false;
3650
- paths = arrayMap(paths, function(path) {
3651
- path = castPath(path, object);
3652
- isDeep || (isDeep = path.length > 1);
3653
- return path;
3654
- });
3655
- copyObject(object, getAllKeysIn(object), result);
3656
- if (isDeep) {
3657
- result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
3658
- }
3659
- var length = paths.length;
3660
- while (length--) {
3661
- baseUnset(result, paths[length]);
3662
- }
3663
- return result;
3664
- });
3665
-
3666
- var omit_1 = omit;
3667
-
3668
50
  /**
3669
51
  * Constructs an object/context holding serialized functions along with an array of their names
3670
52
  * @param objectToSerialize - The object to serialize
@@ -3743,7 +125,7 @@ const onCreateWebpackConfig = ({
3743
125
  include: __dirname,
3744
126
  use: [loaders.js(), {
3745
127
  loader: require$$0__default["default"].join(__dirname, `loaders`, `ninetailed-plugins`),
3746
- options: Object.assign(Object.assign({}, omit_1(pluginOptions, ['ninetailedPlugins'])), {
128
+ options: Object.assign(Object.assign({}, omit__default["default"](pluginOptions, ['ninetailedPlugins'])), {
3747
129
  plugins: pluginOptions.ninetailedPlugins
3748
130
  })
3749
131
  }]