@vunk/form 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/components/card-input-collection/index.cjs +256 -0
  2. package/components/card-input-collection/index.css +21 -0
  3. package/components/card-input-collection/index.d.ts +4 -0
  4. package/components/card-input-collection/index.mjs +250 -0
  5. package/components/card-input-collection/src/ctx.d.ts +82 -0
  6. package/components/card-input-collection/src/index.vue.d.ts +542 -0
  7. package/components/card-input-collection/src/types.d.ts +1 -0
  8. package/components/cascader/src/ctx.d.ts +1 -1
  9. package/components/cascader/src/index.vue.d.ts +1 -1
  10. package/components/checkbox/src/ctx.d.ts +1 -1
  11. package/components/checkbox/src/index.vue.d.ts +2 -2
  12. package/components/cloneDeep.cjs +2029 -0
  13. package/components/cloneDeep.mjs +2027 -0
  14. package/components/date-picker/src/ctx.d.ts +1 -1
  15. package/components/date-picker/src/index.vue.d.ts +2 -2
  16. package/components/esri-input-geojson/src/ctx.d.ts +1 -1
  17. package/components/esri-input-geojson/src/index.vue.d.ts +1 -1
  18. package/components/form/src/ctx.d.ts +1 -1
  19. package/components/form/src/index.vue.d.ts +1 -1
  20. package/components/input/src/ctx.d.ts +1 -1
  21. package/components/input/src/index.vue.d.ts +2 -2
  22. package/components/input-collection/index.cjs +4 -2029
  23. package/components/input-collection/index.mjs +3 -2028
  24. package/components/input-collection/src/index.vue.d.ts +1 -1
  25. package/components/input-link/src/index.vue.d.ts +1 -1
  26. package/components/input-number/src/ctx.d.ts +1 -1
  27. package/components/input-number/src/index.vue.d.ts +1 -1
  28. package/components/radio/src/index.vue.d.ts +1 -1
  29. package/components/select/src/ctx.d.ts +1 -1
  30. package/components/select/src/index.vue.d.ts +1 -1
  31. package/components/slider/src/index.vue.d.ts +1 -1
  32. package/components/switch/src/index.vue.d.ts +1 -1
  33. package/components/tables-select/src/index.vue.d.ts +1 -1
  34. package/components/vditor/src/index.vue.d.ts +1 -1
  35. package/index.css +22 -0
  36. package/package.json +9 -1
@@ -0,0 +1,2029 @@
1
+ 'use strict';
2
+
3
+ /** Detect free variable `global` from Node.js. */
4
+ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
5
+
6
+ /** Detect free variable `self`. */
7
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
8
+
9
+ /** Used as a reference to the global object. */
10
+ var root = freeGlobal || freeSelf || Function('return this')();
11
+
12
+ /** Built-in value references. */
13
+ var Symbol = root.Symbol;
14
+
15
+ /** Used for built-in method references. */
16
+ var objectProto$b = Object.prototype;
17
+
18
+ /** Used to check objects for own properties. */
19
+ var hasOwnProperty$8 = objectProto$b.hasOwnProperty;
20
+
21
+ /**
22
+ * Used to resolve the
23
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
24
+ * of values.
25
+ */
26
+ var nativeObjectToString$1 = objectProto$b.toString;
27
+
28
+ /** Built-in value references. */
29
+ var symToStringTag$1 = Symbol ? Symbol.toStringTag : undefined;
30
+
31
+ /**
32
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
33
+ *
34
+ * @private
35
+ * @param {*} value The value to query.
36
+ * @returns {string} Returns the raw `toStringTag`.
37
+ */
38
+ function getRawTag(value) {
39
+ var isOwn = hasOwnProperty$8.call(value, symToStringTag$1),
40
+ tag = value[symToStringTag$1];
41
+
42
+ try {
43
+ value[symToStringTag$1] = undefined;
44
+ var unmasked = true;
45
+ } catch (e) {}
46
+
47
+ var result = nativeObjectToString$1.call(value);
48
+ if (unmasked) {
49
+ if (isOwn) {
50
+ value[symToStringTag$1] = tag;
51
+ } else {
52
+ delete value[symToStringTag$1];
53
+ }
54
+ }
55
+ return result;
56
+ }
57
+
58
+ /** Used for built-in method references. */
59
+ var objectProto$a = Object.prototype;
60
+
61
+ /**
62
+ * Used to resolve the
63
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
64
+ * of values.
65
+ */
66
+ var nativeObjectToString = objectProto$a.toString;
67
+
68
+ /**
69
+ * Converts `value` to a string using `Object.prototype.toString`.
70
+ *
71
+ * @private
72
+ * @param {*} value The value to convert.
73
+ * @returns {string} Returns the converted string.
74
+ */
75
+ function objectToString(value) {
76
+ return nativeObjectToString.call(value);
77
+ }
78
+
79
+ /** `Object#toString` result references. */
80
+ var nullTag = '[object Null]',
81
+ undefinedTag = '[object Undefined]';
82
+
83
+ /** Built-in value references. */
84
+ var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
85
+
86
+ /**
87
+ * The base implementation of `getTag` without fallbacks for buggy environments.
88
+ *
89
+ * @private
90
+ * @param {*} value The value to query.
91
+ * @returns {string} Returns the `toStringTag`.
92
+ */
93
+ function baseGetTag(value) {
94
+ if (value == null) {
95
+ return value === undefined ? undefinedTag : nullTag;
96
+ }
97
+ return (symToStringTag && symToStringTag in Object(value))
98
+ ? getRawTag(value)
99
+ : objectToString(value);
100
+ }
101
+
102
+ /**
103
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
104
+ * and has a `typeof` result of "object".
105
+ *
106
+ * @static
107
+ * @memberOf _
108
+ * @since 4.0.0
109
+ * @category Lang
110
+ * @param {*} value The value to check.
111
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
112
+ * @example
113
+ *
114
+ * _.isObjectLike({});
115
+ * // => true
116
+ *
117
+ * _.isObjectLike([1, 2, 3]);
118
+ * // => true
119
+ *
120
+ * _.isObjectLike(_.noop);
121
+ * // => false
122
+ *
123
+ * _.isObjectLike(null);
124
+ * // => false
125
+ */
126
+ function isObjectLike(value) {
127
+ return value != null && typeof value == 'object';
128
+ }
129
+
130
+ /**
131
+ * Checks if `value` is classified as an `Array` object.
132
+ *
133
+ * @static
134
+ * @memberOf _
135
+ * @since 0.1.0
136
+ * @category Lang
137
+ * @param {*} value The value to check.
138
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
139
+ * @example
140
+ *
141
+ * _.isArray([1, 2, 3]);
142
+ * // => true
143
+ *
144
+ * _.isArray(document.body.children);
145
+ * // => false
146
+ *
147
+ * _.isArray('abc');
148
+ * // => false
149
+ *
150
+ * _.isArray(_.noop);
151
+ * // => false
152
+ */
153
+ var isArray = Array.isArray;
154
+
155
+ /**
156
+ * Checks if `value` is the
157
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
158
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
159
+ *
160
+ * @static
161
+ * @memberOf _
162
+ * @since 0.1.0
163
+ * @category Lang
164
+ * @param {*} value The value to check.
165
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
166
+ * @example
167
+ *
168
+ * _.isObject({});
169
+ * // => true
170
+ *
171
+ * _.isObject([1, 2, 3]);
172
+ * // => true
173
+ *
174
+ * _.isObject(_.noop);
175
+ * // => true
176
+ *
177
+ * _.isObject(null);
178
+ * // => false
179
+ */
180
+ function isObject(value) {
181
+ var type = typeof value;
182
+ return value != null && (type == 'object' || type == 'function');
183
+ }
184
+
185
+ /** `Object#toString` result references. */
186
+ var asyncTag = '[object AsyncFunction]',
187
+ funcTag$2 = '[object Function]',
188
+ genTag$1 = '[object GeneratorFunction]',
189
+ proxyTag = '[object Proxy]';
190
+
191
+ /**
192
+ * Checks if `value` is classified as a `Function` object.
193
+ *
194
+ * @static
195
+ * @memberOf _
196
+ * @since 0.1.0
197
+ * @category Lang
198
+ * @param {*} value The value to check.
199
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
200
+ * @example
201
+ *
202
+ * _.isFunction(_);
203
+ * // => true
204
+ *
205
+ * _.isFunction(/abc/);
206
+ * // => false
207
+ */
208
+ function isFunction(value) {
209
+ if (!isObject(value)) {
210
+ return false;
211
+ }
212
+ // The use of `Object#toString` avoids issues with the `typeof` operator
213
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
214
+ var tag = baseGetTag(value);
215
+ return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
216
+ }
217
+
218
+ /** Used to detect overreaching core-js shims. */
219
+ var coreJsData = root['__core-js_shared__'];
220
+
221
+ /** Used to detect methods masquerading as native. */
222
+ var maskSrcKey = (function() {
223
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
224
+ return uid ? ('Symbol(src)_1.' + uid) : '';
225
+ }());
226
+
227
+ /**
228
+ * Checks if `func` has its source masked.
229
+ *
230
+ * @private
231
+ * @param {Function} func The function to check.
232
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
233
+ */
234
+ function isMasked(func) {
235
+ return !!maskSrcKey && (maskSrcKey in func);
236
+ }
237
+
238
+ /** Used for built-in method references. */
239
+ var funcProto$1 = Function.prototype;
240
+
241
+ /** Used to resolve the decompiled source of functions. */
242
+ var funcToString$1 = funcProto$1.toString;
243
+
244
+ /**
245
+ * Converts `func` to its source code.
246
+ *
247
+ * @private
248
+ * @param {Function} func The function to convert.
249
+ * @returns {string} Returns the source code.
250
+ */
251
+ function toSource(func) {
252
+ if (func != null) {
253
+ try {
254
+ return funcToString$1.call(func);
255
+ } catch (e) {}
256
+ try {
257
+ return (func + '');
258
+ } catch (e) {}
259
+ }
260
+ return '';
261
+ }
262
+
263
+ /**
264
+ * Used to match `RegExp`
265
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
266
+ */
267
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
268
+
269
+ /** Used to detect host constructors (Safari). */
270
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
271
+
272
+ /** Used for built-in method references. */
273
+ var funcProto = Function.prototype,
274
+ objectProto$9 = Object.prototype;
275
+
276
+ /** Used to resolve the decompiled source of functions. */
277
+ var funcToString = funcProto.toString;
278
+
279
+ /** Used to check objects for own properties. */
280
+ var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
281
+
282
+ /** Used to detect if a method is native. */
283
+ var reIsNative = RegExp('^' +
284
+ funcToString.call(hasOwnProperty$7).replace(reRegExpChar, '\\$&')
285
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
286
+ );
287
+
288
+ /**
289
+ * The base implementation of `_.isNative` without bad shim checks.
290
+ *
291
+ * @private
292
+ * @param {*} value The value to check.
293
+ * @returns {boolean} Returns `true` if `value` is a native function,
294
+ * else `false`.
295
+ */
296
+ function baseIsNative(value) {
297
+ if (!isObject(value) || isMasked(value)) {
298
+ return false;
299
+ }
300
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
301
+ return pattern.test(toSource(value));
302
+ }
303
+
304
+ /**
305
+ * Gets the value at `key` of `object`.
306
+ *
307
+ * @private
308
+ * @param {Object} [object] The object to query.
309
+ * @param {string} key The key of the property to get.
310
+ * @returns {*} Returns the property value.
311
+ */
312
+ function getValue(object, key) {
313
+ return object == null ? undefined : object[key];
314
+ }
315
+
316
+ /**
317
+ * Gets the native function at `key` of `object`.
318
+ *
319
+ * @private
320
+ * @param {Object} object The object to query.
321
+ * @param {string} key The key of the method to get.
322
+ * @returns {*} Returns the function if it's native, else `undefined`.
323
+ */
324
+ function getNative(object, key) {
325
+ var value = getValue(object, key);
326
+ return baseIsNative(value) ? value : undefined;
327
+ }
328
+
329
+ /* Built-in method references that are verified to be native. */
330
+ var WeakMap = getNative(root, 'WeakMap');
331
+
332
+ /** Built-in value references. */
333
+ var objectCreate = Object.create;
334
+
335
+ /**
336
+ * The base implementation of `_.create` without support for assigning
337
+ * properties to the created object.
338
+ *
339
+ * @private
340
+ * @param {Object} proto The object to inherit from.
341
+ * @returns {Object} Returns the new object.
342
+ */
343
+ var baseCreate = (function() {
344
+ function object() {}
345
+ return function(proto) {
346
+ if (!isObject(proto)) {
347
+ return {};
348
+ }
349
+ if (objectCreate) {
350
+ return objectCreate(proto);
351
+ }
352
+ object.prototype = proto;
353
+ var result = new object;
354
+ object.prototype = undefined;
355
+ return result;
356
+ };
357
+ }());
358
+
359
+ var defineProperty = (function() {
360
+ try {
361
+ var func = getNative(Object, 'defineProperty');
362
+ func({}, '', {});
363
+ return func;
364
+ } catch (e) {}
365
+ }());
366
+
367
+ /**
368
+ * A specialized version of `_.forEach` for arrays without support for
369
+ * iteratee shorthands.
370
+ *
371
+ * @private
372
+ * @param {Array} [array] The array to iterate over.
373
+ * @param {Function} iteratee The function invoked per iteration.
374
+ * @returns {Array} Returns `array`.
375
+ */
376
+ function arrayEach(array, iteratee) {
377
+ var index = -1,
378
+ length = array == null ? 0 : array.length;
379
+
380
+ while (++index < length) {
381
+ if (iteratee(array[index], index, array) === false) {
382
+ break;
383
+ }
384
+ }
385
+ return array;
386
+ }
387
+
388
+ /** Used as references for various `Number` constants. */
389
+ var MAX_SAFE_INTEGER$1 = 9007199254740991;
390
+
391
+ /** Used to detect unsigned integer values. */
392
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
393
+
394
+ /**
395
+ * Checks if `value` is a valid array-like index.
396
+ *
397
+ * @private
398
+ * @param {*} value The value to check.
399
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
400
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
401
+ */
402
+ function isIndex(value, length) {
403
+ var type = typeof value;
404
+ length = length == null ? MAX_SAFE_INTEGER$1 : length;
405
+
406
+ return !!length &&
407
+ (type == 'number' ||
408
+ (type != 'symbol' && reIsUint.test(value))) &&
409
+ (value > -1 && value % 1 == 0 && value < length);
410
+ }
411
+
412
+ /**
413
+ * The base implementation of `assignValue` and `assignMergeValue` without
414
+ * value checks.
415
+ *
416
+ * @private
417
+ * @param {Object} object The object to modify.
418
+ * @param {string} key The key of the property to assign.
419
+ * @param {*} value The value to assign.
420
+ */
421
+ function baseAssignValue(object, key, value) {
422
+ if (key == '__proto__' && defineProperty) {
423
+ defineProperty(object, key, {
424
+ 'configurable': true,
425
+ 'enumerable': true,
426
+ 'value': value,
427
+ 'writable': true
428
+ });
429
+ } else {
430
+ object[key] = value;
431
+ }
432
+ }
433
+
434
+ /**
435
+ * Performs a
436
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
437
+ * comparison between two values to determine if they are equivalent.
438
+ *
439
+ * @static
440
+ * @memberOf _
441
+ * @since 4.0.0
442
+ * @category Lang
443
+ * @param {*} value The value to compare.
444
+ * @param {*} other The other value to compare.
445
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
446
+ * @example
447
+ *
448
+ * var object = { 'a': 1 };
449
+ * var other = { 'a': 1 };
450
+ *
451
+ * _.eq(object, object);
452
+ * // => true
453
+ *
454
+ * _.eq(object, other);
455
+ * // => false
456
+ *
457
+ * _.eq('a', 'a');
458
+ * // => true
459
+ *
460
+ * _.eq('a', Object('a'));
461
+ * // => false
462
+ *
463
+ * _.eq(NaN, NaN);
464
+ * // => true
465
+ */
466
+ function eq(value, other) {
467
+ return value === other || (value !== value && other !== other);
468
+ }
469
+
470
+ /** Used for built-in method references. */
471
+ var objectProto$8 = Object.prototype;
472
+
473
+ /** Used to check objects for own properties. */
474
+ var hasOwnProperty$6 = objectProto$8.hasOwnProperty;
475
+
476
+ /**
477
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
478
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
479
+ * for equality comparisons.
480
+ *
481
+ * @private
482
+ * @param {Object} object The object to modify.
483
+ * @param {string} key The key of the property to assign.
484
+ * @param {*} value The value to assign.
485
+ */
486
+ function assignValue(object, key, value) {
487
+ var objValue = object[key];
488
+ if (!(hasOwnProperty$6.call(object, key) && eq(objValue, value)) ||
489
+ (value === undefined && !(key in object))) {
490
+ baseAssignValue(object, key, value);
491
+ }
492
+ }
493
+
494
+ /** Used as references for various `Number` constants. */
495
+ var MAX_SAFE_INTEGER = 9007199254740991;
496
+
497
+ /**
498
+ * Checks if `value` is a valid array-like length.
499
+ *
500
+ * **Note:** This method is loosely based on
501
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
502
+ *
503
+ * @static
504
+ * @memberOf _
505
+ * @since 4.0.0
506
+ * @category Lang
507
+ * @param {*} value The value to check.
508
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
509
+ * @example
510
+ *
511
+ * _.isLength(3);
512
+ * // => true
513
+ *
514
+ * _.isLength(Number.MIN_VALUE);
515
+ * // => false
516
+ *
517
+ * _.isLength(Infinity);
518
+ * // => false
519
+ *
520
+ * _.isLength('3');
521
+ * // => false
522
+ */
523
+ function isLength(value) {
524
+ return typeof value == 'number' &&
525
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
526
+ }
527
+
528
+ /**
529
+ * Checks if `value` is array-like. A value is considered array-like if it's
530
+ * not a function and has a `value.length` that's an integer greater than or
531
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
532
+ *
533
+ * @static
534
+ * @memberOf _
535
+ * @since 4.0.0
536
+ * @category Lang
537
+ * @param {*} value The value to check.
538
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
539
+ * @example
540
+ *
541
+ * _.isArrayLike([1, 2, 3]);
542
+ * // => true
543
+ *
544
+ * _.isArrayLike(document.body.children);
545
+ * // => true
546
+ *
547
+ * _.isArrayLike('abc');
548
+ * // => true
549
+ *
550
+ * _.isArrayLike(_.noop);
551
+ * // => false
552
+ */
553
+ function isArrayLike(value) {
554
+ return value != null && isLength(value.length) && !isFunction(value);
555
+ }
556
+
557
+ /** Used for built-in method references. */
558
+ var objectProto$7 = Object.prototype;
559
+
560
+ /**
561
+ * Checks if `value` is likely a prototype object.
562
+ *
563
+ * @private
564
+ * @param {*} value The value to check.
565
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
566
+ */
567
+ function isPrototype(value) {
568
+ var Ctor = value && value.constructor,
569
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$7;
570
+
571
+ return value === proto;
572
+ }
573
+
574
+ /**
575
+ * The base implementation of `_.times` without support for iteratee shorthands
576
+ * or max array length checks.
577
+ *
578
+ * @private
579
+ * @param {number} n The number of times to invoke `iteratee`.
580
+ * @param {Function} iteratee The function invoked per iteration.
581
+ * @returns {Array} Returns the array of results.
582
+ */
583
+ function baseTimes(n, iteratee) {
584
+ var index = -1,
585
+ result = Array(n);
586
+
587
+ while (++index < n) {
588
+ result[index] = iteratee(index);
589
+ }
590
+ return result;
591
+ }
592
+
593
+ /** `Object#toString` result references. */
594
+ var argsTag$2 = '[object Arguments]';
595
+
596
+ /**
597
+ * The base implementation of `_.isArguments`.
598
+ *
599
+ * @private
600
+ * @param {*} value The value to check.
601
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
602
+ */
603
+ function baseIsArguments(value) {
604
+ return isObjectLike(value) && baseGetTag(value) == argsTag$2;
605
+ }
606
+
607
+ /** Used for built-in method references. */
608
+ var objectProto$6 = Object.prototype;
609
+
610
+ /** Used to check objects for own properties. */
611
+ var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
612
+
613
+ /** Built-in value references. */
614
+ var propertyIsEnumerable$1 = objectProto$6.propertyIsEnumerable;
615
+
616
+ /**
617
+ * Checks if `value` is likely an `arguments` object.
618
+ *
619
+ * @static
620
+ * @memberOf _
621
+ * @since 0.1.0
622
+ * @category Lang
623
+ * @param {*} value The value to check.
624
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
625
+ * else `false`.
626
+ * @example
627
+ *
628
+ * _.isArguments(function() { return arguments; }());
629
+ * // => true
630
+ *
631
+ * _.isArguments([1, 2, 3]);
632
+ * // => false
633
+ */
634
+ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
635
+ return isObjectLike(value) && hasOwnProperty$5.call(value, 'callee') &&
636
+ !propertyIsEnumerable$1.call(value, 'callee');
637
+ };
638
+
639
+ /**
640
+ * This method returns `false`.
641
+ *
642
+ * @static
643
+ * @memberOf _
644
+ * @since 4.13.0
645
+ * @category Util
646
+ * @returns {boolean} Returns `false`.
647
+ * @example
648
+ *
649
+ * _.times(2, _.stubFalse);
650
+ * // => [false, false]
651
+ */
652
+ function stubFalse() {
653
+ return false;
654
+ }
655
+
656
+ /** Detect free variable `exports`. */
657
+ var freeExports$2 = typeof exports == 'object' && exports && !exports.nodeType && exports;
658
+
659
+ /** Detect free variable `module`. */
660
+ var freeModule$2 = freeExports$2 && typeof module == 'object' && module && !module.nodeType && module;
661
+
662
+ /** Detect the popular CommonJS extension `module.exports`. */
663
+ var moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2;
664
+
665
+ /** Built-in value references. */
666
+ var Buffer$1 = moduleExports$2 ? root.Buffer : undefined;
667
+
668
+ /* Built-in method references for those with the same name as other `lodash` methods. */
669
+ var nativeIsBuffer = Buffer$1 ? Buffer$1.isBuffer : undefined;
670
+
671
+ /**
672
+ * Checks if `value` is a buffer.
673
+ *
674
+ * @static
675
+ * @memberOf _
676
+ * @since 4.3.0
677
+ * @category Lang
678
+ * @param {*} value The value to check.
679
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
680
+ * @example
681
+ *
682
+ * _.isBuffer(new Buffer(2));
683
+ * // => true
684
+ *
685
+ * _.isBuffer(new Uint8Array(2));
686
+ * // => false
687
+ */
688
+ var isBuffer = nativeIsBuffer || stubFalse;
689
+
690
+ /** `Object#toString` result references. */
691
+ var argsTag$1 = '[object Arguments]',
692
+ arrayTag$1 = '[object Array]',
693
+ boolTag$2 = '[object Boolean]',
694
+ dateTag$2 = '[object Date]',
695
+ errorTag$1 = '[object Error]',
696
+ funcTag$1 = '[object Function]',
697
+ mapTag$4 = '[object Map]',
698
+ numberTag$2 = '[object Number]',
699
+ objectTag$2 = '[object Object]',
700
+ regexpTag$2 = '[object RegExp]',
701
+ setTag$4 = '[object Set]',
702
+ stringTag$2 = '[object String]',
703
+ weakMapTag$2 = '[object WeakMap]';
704
+
705
+ var arrayBufferTag$2 = '[object ArrayBuffer]',
706
+ dataViewTag$3 = '[object DataView]',
707
+ float32Tag$2 = '[object Float32Array]',
708
+ float64Tag$2 = '[object Float64Array]',
709
+ int8Tag$2 = '[object Int8Array]',
710
+ int16Tag$2 = '[object Int16Array]',
711
+ int32Tag$2 = '[object Int32Array]',
712
+ uint8Tag$2 = '[object Uint8Array]',
713
+ uint8ClampedTag$2 = '[object Uint8ClampedArray]',
714
+ uint16Tag$2 = '[object Uint16Array]',
715
+ uint32Tag$2 = '[object Uint32Array]';
716
+
717
+ /** Used to identify `toStringTag` values of typed arrays. */
718
+ var typedArrayTags = {};
719
+ typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] =
720
+ typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] =
721
+ typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] =
722
+ typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] =
723
+ typedArrayTags[uint32Tag$2] = true;
724
+ typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] =
725
+ typedArrayTags[arrayBufferTag$2] = typedArrayTags[boolTag$2] =
726
+ typedArrayTags[dataViewTag$3] = typedArrayTags[dateTag$2] =
727
+ typedArrayTags[errorTag$1] = typedArrayTags[funcTag$1] =
728
+ typedArrayTags[mapTag$4] = typedArrayTags[numberTag$2] =
729
+ typedArrayTags[objectTag$2] = typedArrayTags[regexpTag$2] =
730
+ typedArrayTags[setTag$4] = typedArrayTags[stringTag$2] =
731
+ typedArrayTags[weakMapTag$2] = false;
732
+
733
+ /**
734
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
735
+ *
736
+ * @private
737
+ * @param {*} value The value to check.
738
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
739
+ */
740
+ function baseIsTypedArray(value) {
741
+ return isObjectLike(value) &&
742
+ isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
743
+ }
744
+
745
+ /**
746
+ * The base implementation of `_.unary` without support for storing metadata.
747
+ *
748
+ * @private
749
+ * @param {Function} func The function to cap arguments for.
750
+ * @returns {Function} Returns the new capped function.
751
+ */
752
+ function baseUnary(func) {
753
+ return function(value) {
754
+ return func(value);
755
+ };
756
+ }
757
+
758
+ /** Detect free variable `exports`. */
759
+ var freeExports$1 = typeof exports == 'object' && exports && !exports.nodeType && exports;
760
+
761
+ /** Detect free variable `module`. */
762
+ var freeModule$1 = freeExports$1 && typeof module == 'object' && module && !module.nodeType && module;
763
+
764
+ /** Detect the popular CommonJS extension `module.exports`. */
765
+ var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
766
+
767
+ /** Detect free variable `process` from Node.js. */
768
+ var freeProcess = moduleExports$1 && freeGlobal.process;
769
+
770
+ /** Used to access faster Node.js helpers. */
771
+ var nodeUtil = (function() {
772
+ try {
773
+ // Use `util.types` for Node.js 10+.
774
+ var types = freeModule$1 && freeModule$1.require && freeModule$1.require('util').types;
775
+
776
+ if (types) {
777
+ return types;
778
+ }
779
+
780
+ // Legacy `process.binding('util')` for Node.js < 10.
781
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
782
+ } catch (e) {}
783
+ }());
784
+
785
+ /* Node.js helper references. */
786
+ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
787
+
788
+ /**
789
+ * Checks if `value` is classified as a typed array.
790
+ *
791
+ * @static
792
+ * @memberOf _
793
+ * @since 3.0.0
794
+ * @category Lang
795
+ * @param {*} value The value to check.
796
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
797
+ * @example
798
+ *
799
+ * _.isTypedArray(new Uint8Array);
800
+ * // => true
801
+ *
802
+ * _.isTypedArray([]);
803
+ * // => false
804
+ */
805
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
806
+
807
+ /** Used for built-in method references. */
808
+ var objectProto$5 = Object.prototype;
809
+
810
+ /** Used to check objects for own properties. */
811
+ var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
812
+
813
+ /**
814
+ * Creates an array of the enumerable property names of the array-like `value`.
815
+ *
816
+ * @private
817
+ * @param {*} value The value to query.
818
+ * @param {boolean} inherited Specify returning inherited property names.
819
+ * @returns {Array} Returns the array of property names.
820
+ */
821
+ function arrayLikeKeys(value, inherited) {
822
+ var isArr = isArray(value),
823
+ isArg = !isArr && isArguments(value),
824
+ isBuff = !isArr && !isArg && isBuffer(value),
825
+ isType = !isArr && !isArg && !isBuff && isTypedArray(value),
826
+ skipIndexes = isArr || isArg || isBuff || isType,
827
+ result = skipIndexes ? baseTimes(value.length, String) : [],
828
+ length = result.length;
829
+
830
+ for (var key in value) {
831
+ if ((hasOwnProperty$4.call(value, key)) &&
832
+ !(skipIndexes && (
833
+ // Safari 9 has enumerable `arguments.length` in strict mode.
834
+ key == 'length' ||
835
+ // Node.js 0.10 has enumerable non-index properties on buffers.
836
+ (isBuff && (key == 'offset' || key == 'parent')) ||
837
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
838
+ (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
839
+ // Skip index properties.
840
+ isIndex(key, length)
841
+ ))) {
842
+ result.push(key);
843
+ }
844
+ }
845
+ return result;
846
+ }
847
+
848
+ /**
849
+ * Creates a unary function that invokes `func` with its argument transformed.
850
+ *
851
+ * @private
852
+ * @param {Function} func The function to wrap.
853
+ * @param {Function} transform The argument transform.
854
+ * @returns {Function} Returns the new function.
855
+ */
856
+ function overArg(func, transform) {
857
+ return function(arg) {
858
+ return func(transform(arg));
859
+ };
860
+ }
861
+
862
+ /* Built-in method references for those with the same name as other `lodash` methods. */
863
+ var nativeKeys = overArg(Object.keys, Object);
864
+
865
+ /** Used for built-in method references. */
866
+ var objectProto$4 = Object.prototype;
867
+
868
+ /** Used to check objects for own properties. */
869
+ var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
870
+
871
+ /**
872
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
873
+ *
874
+ * @private
875
+ * @param {Object} object The object to query.
876
+ * @returns {Array} Returns the array of property names.
877
+ */
878
+ function baseKeys(object) {
879
+ if (!isPrototype(object)) {
880
+ return nativeKeys(object);
881
+ }
882
+ var result = [];
883
+ for (var key in Object(object)) {
884
+ if (hasOwnProperty$3.call(object, key) && key != 'constructor') {
885
+ result.push(key);
886
+ }
887
+ }
888
+ return result;
889
+ }
890
+
891
+ /**
892
+ * Creates an array of the own enumerable property names of `object`.
893
+ *
894
+ * **Note:** Non-object values are coerced to objects. See the
895
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
896
+ * for more details.
897
+ *
898
+ * @static
899
+ * @since 0.1.0
900
+ * @memberOf _
901
+ * @category Object
902
+ * @param {Object} object The object to query.
903
+ * @returns {Array} Returns the array of property names.
904
+ * @example
905
+ *
906
+ * function Foo() {
907
+ * this.a = 1;
908
+ * this.b = 2;
909
+ * }
910
+ *
911
+ * Foo.prototype.c = 3;
912
+ *
913
+ * _.keys(new Foo);
914
+ * // => ['a', 'b'] (iteration order is not guaranteed)
915
+ *
916
+ * _.keys('hi');
917
+ * // => ['0', '1']
918
+ */
919
+ function keys(object) {
920
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
921
+ }
922
+
923
+ /* Built-in method references that are verified to be native. */
924
+ var nativeCreate = getNative(Object, 'create');
925
+
926
+ /**
927
+ * Removes all key-value entries from the hash.
928
+ *
929
+ * @private
930
+ * @name clear
931
+ * @memberOf Hash
932
+ */
933
+ function hashClear() {
934
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
935
+ this.size = 0;
936
+ }
937
+
938
+ /**
939
+ * Removes `key` and its value from the hash.
940
+ *
941
+ * @private
942
+ * @name delete
943
+ * @memberOf Hash
944
+ * @param {Object} hash The hash to modify.
945
+ * @param {string} key The key of the value to remove.
946
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
947
+ */
948
+ function hashDelete(key) {
949
+ var result = this.has(key) && delete this.__data__[key];
950
+ this.size -= result ? 1 : 0;
951
+ return result;
952
+ }
953
+
954
+ /** Used to stand-in for `undefined` hash values. */
955
+ var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
956
+
957
+ /** Used for built-in method references. */
958
+ var objectProto$3 = Object.prototype;
959
+
960
+ /** Used to check objects for own properties. */
961
+ var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
962
+
963
+ /**
964
+ * Gets the hash value for `key`.
965
+ *
966
+ * @private
967
+ * @name get
968
+ * @memberOf Hash
969
+ * @param {string} key The key of the value to get.
970
+ * @returns {*} Returns the entry value.
971
+ */
972
+ function hashGet(key) {
973
+ var data = this.__data__;
974
+ if (nativeCreate) {
975
+ var result = data[key];
976
+ return result === HASH_UNDEFINED$1 ? undefined : result;
977
+ }
978
+ return hasOwnProperty$2.call(data, key) ? data[key] : undefined;
979
+ }
980
+
981
+ /** Used for built-in method references. */
982
+ var objectProto$2 = Object.prototype;
983
+
984
+ /** Used to check objects for own properties. */
985
+ var hasOwnProperty$1 = objectProto$2.hasOwnProperty;
986
+
987
+ /**
988
+ * Checks if a hash value for `key` exists.
989
+ *
990
+ * @private
991
+ * @name has
992
+ * @memberOf Hash
993
+ * @param {string} key The key of the entry to check.
994
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
995
+ */
996
+ function hashHas(key) {
997
+ var data = this.__data__;
998
+ return nativeCreate ? (data[key] !== undefined) : hasOwnProperty$1.call(data, key);
999
+ }
1000
+
1001
+ /** Used to stand-in for `undefined` hash values. */
1002
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
1003
+
1004
+ /**
1005
+ * Sets the hash `key` to `value`.
1006
+ *
1007
+ * @private
1008
+ * @name set
1009
+ * @memberOf Hash
1010
+ * @param {string} key The key of the value to set.
1011
+ * @param {*} value The value to set.
1012
+ * @returns {Object} Returns the hash instance.
1013
+ */
1014
+ function hashSet(key, value) {
1015
+ var data = this.__data__;
1016
+ this.size += this.has(key) ? 0 : 1;
1017
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
1018
+ return this;
1019
+ }
1020
+
1021
+ /**
1022
+ * Creates a hash object.
1023
+ *
1024
+ * @private
1025
+ * @constructor
1026
+ * @param {Array} [entries] The key-value pairs to cache.
1027
+ */
1028
+ function Hash(entries) {
1029
+ var index = -1,
1030
+ length = entries == null ? 0 : entries.length;
1031
+
1032
+ this.clear();
1033
+ while (++index < length) {
1034
+ var entry = entries[index];
1035
+ this.set(entry[0], entry[1]);
1036
+ }
1037
+ }
1038
+
1039
+ // Add methods to `Hash`.
1040
+ Hash.prototype.clear = hashClear;
1041
+ Hash.prototype['delete'] = hashDelete;
1042
+ Hash.prototype.get = hashGet;
1043
+ Hash.prototype.has = hashHas;
1044
+ Hash.prototype.set = hashSet;
1045
+
1046
+ /**
1047
+ * Removes all key-value entries from the list cache.
1048
+ *
1049
+ * @private
1050
+ * @name clear
1051
+ * @memberOf ListCache
1052
+ */
1053
+ function listCacheClear() {
1054
+ this.__data__ = [];
1055
+ this.size = 0;
1056
+ }
1057
+
1058
+ /**
1059
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
1060
+ *
1061
+ * @private
1062
+ * @param {Array} array The array to inspect.
1063
+ * @param {*} key The key to search for.
1064
+ * @returns {number} Returns the index of the matched value, else `-1`.
1065
+ */
1066
+ function assocIndexOf(array, key) {
1067
+ var length = array.length;
1068
+ while (length--) {
1069
+ if (eq(array[length][0], key)) {
1070
+ return length;
1071
+ }
1072
+ }
1073
+ return -1;
1074
+ }
1075
+
1076
+ /** Used for built-in method references. */
1077
+ var arrayProto = Array.prototype;
1078
+
1079
+ /** Built-in value references. */
1080
+ var splice = arrayProto.splice;
1081
+
1082
+ /**
1083
+ * Removes `key` and its value from the list cache.
1084
+ *
1085
+ * @private
1086
+ * @name delete
1087
+ * @memberOf ListCache
1088
+ * @param {string} key The key of the value to remove.
1089
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1090
+ */
1091
+ function listCacheDelete(key) {
1092
+ var data = this.__data__,
1093
+ index = assocIndexOf(data, key);
1094
+
1095
+ if (index < 0) {
1096
+ return false;
1097
+ }
1098
+ var lastIndex = data.length - 1;
1099
+ if (index == lastIndex) {
1100
+ data.pop();
1101
+ } else {
1102
+ splice.call(data, index, 1);
1103
+ }
1104
+ --this.size;
1105
+ return true;
1106
+ }
1107
+
1108
+ /**
1109
+ * Gets the list cache value for `key`.
1110
+ *
1111
+ * @private
1112
+ * @name get
1113
+ * @memberOf ListCache
1114
+ * @param {string} key The key of the value to get.
1115
+ * @returns {*} Returns the entry value.
1116
+ */
1117
+ function listCacheGet(key) {
1118
+ var data = this.__data__,
1119
+ index = assocIndexOf(data, key);
1120
+
1121
+ return index < 0 ? undefined : data[index][1];
1122
+ }
1123
+
1124
+ /**
1125
+ * Checks if a list cache value for `key` exists.
1126
+ *
1127
+ * @private
1128
+ * @name has
1129
+ * @memberOf ListCache
1130
+ * @param {string} key The key of the entry to check.
1131
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1132
+ */
1133
+ function listCacheHas(key) {
1134
+ return assocIndexOf(this.__data__, key) > -1;
1135
+ }
1136
+
1137
+ /**
1138
+ * Sets the list cache `key` to `value`.
1139
+ *
1140
+ * @private
1141
+ * @name set
1142
+ * @memberOf ListCache
1143
+ * @param {string} key The key of the value to set.
1144
+ * @param {*} value The value to set.
1145
+ * @returns {Object} Returns the list cache instance.
1146
+ */
1147
+ function listCacheSet(key, value) {
1148
+ var data = this.__data__,
1149
+ index = assocIndexOf(data, key);
1150
+
1151
+ if (index < 0) {
1152
+ ++this.size;
1153
+ data.push([key, value]);
1154
+ } else {
1155
+ data[index][1] = value;
1156
+ }
1157
+ return this;
1158
+ }
1159
+
1160
+ /**
1161
+ * Creates an list cache object.
1162
+ *
1163
+ * @private
1164
+ * @constructor
1165
+ * @param {Array} [entries] The key-value pairs to cache.
1166
+ */
1167
+ function ListCache(entries) {
1168
+ var index = -1,
1169
+ length = entries == null ? 0 : entries.length;
1170
+
1171
+ this.clear();
1172
+ while (++index < length) {
1173
+ var entry = entries[index];
1174
+ this.set(entry[0], entry[1]);
1175
+ }
1176
+ }
1177
+
1178
+ // Add methods to `ListCache`.
1179
+ ListCache.prototype.clear = listCacheClear;
1180
+ ListCache.prototype['delete'] = listCacheDelete;
1181
+ ListCache.prototype.get = listCacheGet;
1182
+ ListCache.prototype.has = listCacheHas;
1183
+ ListCache.prototype.set = listCacheSet;
1184
+
1185
+ /* Built-in method references that are verified to be native. */
1186
+ var Map = getNative(root, 'Map');
1187
+
1188
+ /**
1189
+ * Removes all key-value entries from the map.
1190
+ *
1191
+ * @private
1192
+ * @name clear
1193
+ * @memberOf MapCache
1194
+ */
1195
+ function mapCacheClear() {
1196
+ this.size = 0;
1197
+ this.__data__ = {
1198
+ 'hash': new Hash,
1199
+ 'map': new (Map || ListCache),
1200
+ 'string': new Hash
1201
+ };
1202
+ }
1203
+
1204
+ /**
1205
+ * Checks if `value` is suitable for use as unique object key.
1206
+ *
1207
+ * @private
1208
+ * @param {*} value The value to check.
1209
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
1210
+ */
1211
+ function isKeyable(value) {
1212
+ var type = typeof value;
1213
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
1214
+ ? (value !== '__proto__')
1215
+ : (value === null);
1216
+ }
1217
+
1218
+ /**
1219
+ * Gets the data for `map`.
1220
+ *
1221
+ * @private
1222
+ * @param {Object} map The map to query.
1223
+ * @param {string} key The reference key.
1224
+ * @returns {*} Returns the map data.
1225
+ */
1226
+ function getMapData(map, key) {
1227
+ var data = map.__data__;
1228
+ return isKeyable(key)
1229
+ ? data[typeof key == 'string' ? 'string' : 'hash']
1230
+ : data.map;
1231
+ }
1232
+
1233
+ /**
1234
+ * Removes `key` and its value from the map.
1235
+ *
1236
+ * @private
1237
+ * @name delete
1238
+ * @memberOf MapCache
1239
+ * @param {string} key The key of the value to remove.
1240
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1241
+ */
1242
+ function mapCacheDelete(key) {
1243
+ var result = getMapData(this, key)['delete'](key);
1244
+ this.size -= result ? 1 : 0;
1245
+ return result;
1246
+ }
1247
+
1248
+ /**
1249
+ * Gets the map value for `key`.
1250
+ *
1251
+ * @private
1252
+ * @name get
1253
+ * @memberOf MapCache
1254
+ * @param {string} key The key of the value to get.
1255
+ * @returns {*} Returns the entry value.
1256
+ */
1257
+ function mapCacheGet(key) {
1258
+ return getMapData(this, key).get(key);
1259
+ }
1260
+
1261
+ /**
1262
+ * Checks if a map value for `key` exists.
1263
+ *
1264
+ * @private
1265
+ * @name has
1266
+ * @memberOf MapCache
1267
+ * @param {string} key The key of the entry to check.
1268
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1269
+ */
1270
+ function mapCacheHas(key) {
1271
+ return getMapData(this, key).has(key);
1272
+ }
1273
+
1274
+ /**
1275
+ * Sets the map `key` to `value`.
1276
+ *
1277
+ * @private
1278
+ * @name set
1279
+ * @memberOf MapCache
1280
+ * @param {string} key The key of the value to set.
1281
+ * @param {*} value The value to set.
1282
+ * @returns {Object} Returns the map cache instance.
1283
+ */
1284
+ function mapCacheSet(key, value) {
1285
+ var data = getMapData(this, key),
1286
+ size = data.size;
1287
+
1288
+ data.set(key, value);
1289
+ this.size += data.size == size ? 0 : 1;
1290
+ return this;
1291
+ }
1292
+
1293
+ /**
1294
+ * Creates a map cache object to store key-value pairs.
1295
+ *
1296
+ * @private
1297
+ * @constructor
1298
+ * @param {Array} [entries] The key-value pairs to cache.
1299
+ */
1300
+ function MapCache(entries) {
1301
+ var index = -1,
1302
+ length = entries == null ? 0 : entries.length;
1303
+
1304
+ this.clear();
1305
+ while (++index < length) {
1306
+ var entry = entries[index];
1307
+ this.set(entry[0], entry[1]);
1308
+ }
1309
+ }
1310
+
1311
+ // Add methods to `MapCache`.
1312
+ MapCache.prototype.clear = mapCacheClear;
1313
+ MapCache.prototype['delete'] = mapCacheDelete;
1314
+ MapCache.prototype.get = mapCacheGet;
1315
+ MapCache.prototype.has = mapCacheHas;
1316
+ MapCache.prototype.set = mapCacheSet;
1317
+
1318
+ /**
1319
+ * Appends the elements of `values` to `array`.
1320
+ *
1321
+ * @private
1322
+ * @param {Array} array The array to modify.
1323
+ * @param {Array} values The values to append.
1324
+ * @returns {Array} Returns `array`.
1325
+ */
1326
+ function arrayPush(array, values) {
1327
+ var index = -1,
1328
+ length = values.length,
1329
+ offset = array.length;
1330
+
1331
+ while (++index < length) {
1332
+ array[offset + index] = values[index];
1333
+ }
1334
+ return array;
1335
+ }
1336
+
1337
+ /** Built-in value references. */
1338
+ var getPrototype = overArg(Object.getPrototypeOf, Object);
1339
+
1340
+ /**
1341
+ * Removes all key-value entries from the stack.
1342
+ *
1343
+ * @private
1344
+ * @name clear
1345
+ * @memberOf Stack
1346
+ */
1347
+ function stackClear() {
1348
+ this.__data__ = new ListCache;
1349
+ this.size = 0;
1350
+ }
1351
+
1352
+ /**
1353
+ * Removes `key` and its value from the stack.
1354
+ *
1355
+ * @private
1356
+ * @name delete
1357
+ * @memberOf Stack
1358
+ * @param {string} key The key of the value to remove.
1359
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1360
+ */
1361
+ function stackDelete(key) {
1362
+ var data = this.__data__,
1363
+ result = data['delete'](key);
1364
+
1365
+ this.size = data.size;
1366
+ return result;
1367
+ }
1368
+
1369
+ /**
1370
+ * Gets the stack value for `key`.
1371
+ *
1372
+ * @private
1373
+ * @name get
1374
+ * @memberOf Stack
1375
+ * @param {string} key The key of the value to get.
1376
+ * @returns {*} Returns the entry value.
1377
+ */
1378
+ function stackGet(key) {
1379
+ return this.__data__.get(key);
1380
+ }
1381
+
1382
+ /**
1383
+ * Checks if a stack value for `key` exists.
1384
+ *
1385
+ * @private
1386
+ * @name has
1387
+ * @memberOf Stack
1388
+ * @param {string} key The key of the entry to check.
1389
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1390
+ */
1391
+ function stackHas(key) {
1392
+ return this.__data__.has(key);
1393
+ }
1394
+
1395
+ /** Used as the size to enable large array optimizations. */
1396
+ var LARGE_ARRAY_SIZE = 200;
1397
+
1398
+ /**
1399
+ * Sets the stack `key` to `value`.
1400
+ *
1401
+ * @private
1402
+ * @name set
1403
+ * @memberOf Stack
1404
+ * @param {string} key The key of the value to set.
1405
+ * @param {*} value The value to set.
1406
+ * @returns {Object} Returns the stack cache instance.
1407
+ */
1408
+ function stackSet(key, value) {
1409
+ var data = this.__data__;
1410
+ if (data instanceof ListCache) {
1411
+ var pairs = data.__data__;
1412
+ if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
1413
+ pairs.push([key, value]);
1414
+ this.size = ++data.size;
1415
+ return this;
1416
+ }
1417
+ data = this.__data__ = new MapCache(pairs);
1418
+ }
1419
+ data.set(key, value);
1420
+ this.size = data.size;
1421
+ return this;
1422
+ }
1423
+
1424
+ /**
1425
+ * Creates a stack cache object to store key-value pairs.
1426
+ *
1427
+ * @private
1428
+ * @constructor
1429
+ * @param {Array} [entries] The key-value pairs to cache.
1430
+ */
1431
+ function Stack(entries) {
1432
+ var data = this.__data__ = new ListCache(entries);
1433
+ this.size = data.size;
1434
+ }
1435
+
1436
+ // Add methods to `Stack`.
1437
+ Stack.prototype.clear = stackClear;
1438
+ Stack.prototype['delete'] = stackDelete;
1439
+ Stack.prototype.get = stackGet;
1440
+ Stack.prototype.has = stackHas;
1441
+ Stack.prototype.set = stackSet;
1442
+
1443
+ /** Detect free variable `exports`. */
1444
+ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
1445
+
1446
+ /** Detect free variable `module`. */
1447
+ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
1448
+
1449
+ /** Detect the popular CommonJS extension `module.exports`. */
1450
+ var moduleExports = freeModule && freeModule.exports === freeExports;
1451
+
1452
+ /** Built-in value references. */
1453
+ var Buffer = moduleExports ? root.Buffer : undefined;
1454
+ Buffer ? Buffer.allocUnsafe : undefined;
1455
+
1456
+ /**
1457
+ * Creates a clone of `buffer`.
1458
+ *
1459
+ * @private
1460
+ * @param {Buffer} buffer The buffer to clone.
1461
+ * @param {boolean} [isDeep] Specify a deep clone.
1462
+ * @returns {Buffer} Returns the cloned buffer.
1463
+ */
1464
+ function cloneBuffer(buffer, isDeep) {
1465
+ {
1466
+ return buffer.slice();
1467
+ }
1468
+ }
1469
+
1470
+ /**
1471
+ * A specialized version of `_.filter` for arrays without support for
1472
+ * iteratee shorthands.
1473
+ *
1474
+ * @private
1475
+ * @param {Array} [array] The array to iterate over.
1476
+ * @param {Function} predicate The function invoked per iteration.
1477
+ * @returns {Array} Returns the new filtered array.
1478
+ */
1479
+ function arrayFilter(array, predicate) {
1480
+ var index = -1,
1481
+ length = array == null ? 0 : array.length,
1482
+ resIndex = 0,
1483
+ result = [];
1484
+
1485
+ while (++index < length) {
1486
+ var value = array[index];
1487
+ if (predicate(value, index, array)) {
1488
+ result[resIndex++] = value;
1489
+ }
1490
+ }
1491
+ return result;
1492
+ }
1493
+
1494
+ /**
1495
+ * This method returns a new empty array.
1496
+ *
1497
+ * @static
1498
+ * @memberOf _
1499
+ * @since 4.13.0
1500
+ * @category Util
1501
+ * @returns {Array} Returns the new empty array.
1502
+ * @example
1503
+ *
1504
+ * var arrays = _.times(2, _.stubArray);
1505
+ *
1506
+ * console.log(arrays);
1507
+ * // => [[], []]
1508
+ *
1509
+ * console.log(arrays[0] === arrays[1]);
1510
+ * // => false
1511
+ */
1512
+ function stubArray() {
1513
+ return [];
1514
+ }
1515
+
1516
+ /** Used for built-in method references. */
1517
+ var objectProto$1 = Object.prototype;
1518
+
1519
+ /** Built-in value references. */
1520
+ var propertyIsEnumerable = objectProto$1.propertyIsEnumerable;
1521
+
1522
+ /* Built-in method references for those with the same name as other `lodash` methods. */
1523
+ var nativeGetSymbols = Object.getOwnPropertySymbols;
1524
+
1525
+ /**
1526
+ * Creates an array of the own enumerable symbols of `object`.
1527
+ *
1528
+ * @private
1529
+ * @param {Object} object The object to query.
1530
+ * @returns {Array} Returns the array of symbols.
1531
+ */
1532
+ var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
1533
+ if (object == null) {
1534
+ return [];
1535
+ }
1536
+ object = Object(object);
1537
+ return arrayFilter(nativeGetSymbols(object), function(symbol) {
1538
+ return propertyIsEnumerable.call(object, symbol);
1539
+ });
1540
+ };
1541
+
1542
+ /**
1543
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
1544
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
1545
+ * symbols of `object`.
1546
+ *
1547
+ * @private
1548
+ * @param {Object} object The object to query.
1549
+ * @param {Function} keysFunc The function to get the keys of `object`.
1550
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
1551
+ * @returns {Array} Returns the array of property names and symbols.
1552
+ */
1553
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
1554
+ var result = keysFunc(object);
1555
+ return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
1556
+ }
1557
+
1558
+ /**
1559
+ * Creates an array of own enumerable property names and symbols of `object`.
1560
+ *
1561
+ * @private
1562
+ * @param {Object} object The object to query.
1563
+ * @returns {Array} Returns the array of property names and symbols.
1564
+ */
1565
+ function getAllKeys(object) {
1566
+ return baseGetAllKeys(object, keys, getSymbols);
1567
+ }
1568
+
1569
+ /* Built-in method references that are verified to be native. */
1570
+ var DataView = getNative(root, 'DataView');
1571
+
1572
+ /* Built-in method references that are verified to be native. */
1573
+ var Promise$1 = getNative(root, 'Promise');
1574
+
1575
+ /* Built-in method references that are verified to be native. */
1576
+ var Set = getNative(root, 'Set');
1577
+
1578
+ /** `Object#toString` result references. */
1579
+ var mapTag$3 = '[object Map]',
1580
+ objectTag$1 = '[object Object]',
1581
+ promiseTag = '[object Promise]',
1582
+ setTag$3 = '[object Set]',
1583
+ weakMapTag$1 = '[object WeakMap]';
1584
+
1585
+ var dataViewTag$2 = '[object DataView]';
1586
+
1587
+ /** Used to detect maps, sets, and weakmaps. */
1588
+ var dataViewCtorString = toSource(DataView),
1589
+ mapCtorString = toSource(Map),
1590
+ promiseCtorString = toSource(Promise$1),
1591
+ setCtorString = toSource(Set),
1592
+ weakMapCtorString = toSource(WeakMap);
1593
+
1594
+ /**
1595
+ * Gets the `toStringTag` of `value`.
1596
+ *
1597
+ * @private
1598
+ * @param {*} value The value to query.
1599
+ * @returns {string} Returns the `toStringTag`.
1600
+ */
1601
+ var getTag = baseGetTag;
1602
+
1603
+ // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
1604
+ if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag$2) ||
1605
+ (Map && getTag(new Map) != mapTag$3) ||
1606
+ (Promise$1 && getTag(Promise$1.resolve()) != promiseTag) ||
1607
+ (Set && getTag(new Set) != setTag$3) ||
1608
+ (WeakMap && getTag(new WeakMap) != weakMapTag$1)) {
1609
+ getTag = function(value) {
1610
+ var result = baseGetTag(value),
1611
+ Ctor = result == objectTag$1 ? value.constructor : undefined,
1612
+ ctorString = Ctor ? toSource(Ctor) : '';
1613
+
1614
+ if (ctorString) {
1615
+ switch (ctorString) {
1616
+ case dataViewCtorString: return dataViewTag$2;
1617
+ case mapCtorString: return mapTag$3;
1618
+ case promiseCtorString: return promiseTag;
1619
+ case setCtorString: return setTag$3;
1620
+ case weakMapCtorString: return weakMapTag$1;
1621
+ }
1622
+ }
1623
+ return result;
1624
+ };
1625
+ }
1626
+
1627
+ var getTag$1 = getTag;
1628
+
1629
+ /** Used for built-in method references. */
1630
+ var objectProto = Object.prototype;
1631
+
1632
+ /** Used to check objects for own properties. */
1633
+ var hasOwnProperty = objectProto.hasOwnProperty;
1634
+
1635
+ /**
1636
+ * Initializes an array clone.
1637
+ *
1638
+ * @private
1639
+ * @param {Array} array The array to clone.
1640
+ * @returns {Array} Returns the initialized clone.
1641
+ */
1642
+ function initCloneArray(array) {
1643
+ var length = array.length,
1644
+ result = new array.constructor(length);
1645
+
1646
+ // Add properties assigned by `RegExp#exec`.
1647
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
1648
+ result.index = array.index;
1649
+ result.input = array.input;
1650
+ }
1651
+ return result;
1652
+ }
1653
+
1654
+ /** Built-in value references. */
1655
+ var Uint8Array = root.Uint8Array;
1656
+
1657
+ /**
1658
+ * Creates a clone of `arrayBuffer`.
1659
+ *
1660
+ * @private
1661
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
1662
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
1663
+ */
1664
+ function cloneArrayBuffer(arrayBuffer) {
1665
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
1666
+ new Uint8Array(result).set(new Uint8Array(arrayBuffer));
1667
+ return result;
1668
+ }
1669
+
1670
+ /**
1671
+ * Creates a clone of `dataView`.
1672
+ *
1673
+ * @private
1674
+ * @param {Object} dataView The data view to clone.
1675
+ * @param {boolean} [isDeep] Specify a deep clone.
1676
+ * @returns {Object} Returns the cloned data view.
1677
+ */
1678
+ function cloneDataView(dataView, isDeep) {
1679
+ var buffer = cloneArrayBuffer(dataView.buffer) ;
1680
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
1681
+ }
1682
+
1683
+ /** Used to match `RegExp` flags from their coerced string values. */
1684
+ var reFlags = /\w*$/;
1685
+
1686
+ /**
1687
+ * Creates a clone of `regexp`.
1688
+ *
1689
+ * @private
1690
+ * @param {Object} regexp The regexp to clone.
1691
+ * @returns {Object} Returns the cloned regexp.
1692
+ */
1693
+ function cloneRegExp(regexp) {
1694
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
1695
+ result.lastIndex = regexp.lastIndex;
1696
+ return result;
1697
+ }
1698
+
1699
+ /** Used to convert symbols to primitives and strings. */
1700
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
1701
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
1702
+
1703
+ /**
1704
+ * Creates a clone of the `symbol` object.
1705
+ *
1706
+ * @private
1707
+ * @param {Object} symbol The symbol object to clone.
1708
+ * @returns {Object} Returns the cloned symbol object.
1709
+ */
1710
+ function cloneSymbol(symbol) {
1711
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
1712
+ }
1713
+
1714
+ /**
1715
+ * Creates a clone of `typedArray`.
1716
+ *
1717
+ * @private
1718
+ * @param {Object} typedArray The typed array to clone.
1719
+ * @param {boolean} [isDeep] Specify a deep clone.
1720
+ * @returns {Object} Returns the cloned typed array.
1721
+ */
1722
+ function cloneTypedArray(typedArray, isDeep) {
1723
+ var buffer = cloneArrayBuffer(typedArray.buffer) ;
1724
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
1725
+ }
1726
+
1727
+ /** `Object#toString` result references. */
1728
+ var boolTag$1 = '[object Boolean]',
1729
+ dateTag$1 = '[object Date]',
1730
+ mapTag$2 = '[object Map]',
1731
+ numberTag$1 = '[object Number]',
1732
+ regexpTag$1 = '[object RegExp]',
1733
+ setTag$2 = '[object Set]',
1734
+ stringTag$1 = '[object String]',
1735
+ symbolTag$1 = '[object Symbol]';
1736
+
1737
+ var arrayBufferTag$1 = '[object ArrayBuffer]',
1738
+ dataViewTag$1 = '[object DataView]',
1739
+ float32Tag$1 = '[object Float32Array]',
1740
+ float64Tag$1 = '[object Float64Array]',
1741
+ int8Tag$1 = '[object Int8Array]',
1742
+ int16Tag$1 = '[object Int16Array]',
1743
+ int32Tag$1 = '[object Int32Array]',
1744
+ uint8Tag$1 = '[object Uint8Array]',
1745
+ uint8ClampedTag$1 = '[object Uint8ClampedArray]',
1746
+ uint16Tag$1 = '[object Uint16Array]',
1747
+ uint32Tag$1 = '[object Uint32Array]';
1748
+
1749
+ /**
1750
+ * Initializes an object clone based on its `toStringTag`.
1751
+ *
1752
+ * **Note:** This function only supports cloning values with tags of
1753
+ * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
1754
+ *
1755
+ * @private
1756
+ * @param {Object} object The object to clone.
1757
+ * @param {string} tag The `toStringTag` of the object to clone.
1758
+ * @param {boolean} [isDeep] Specify a deep clone.
1759
+ * @returns {Object} Returns the initialized clone.
1760
+ */
1761
+ function initCloneByTag(object, tag, isDeep) {
1762
+ var Ctor = object.constructor;
1763
+ switch (tag) {
1764
+ case arrayBufferTag$1:
1765
+ return cloneArrayBuffer(object);
1766
+
1767
+ case boolTag$1:
1768
+ case dateTag$1:
1769
+ return new Ctor(+object);
1770
+
1771
+ case dataViewTag$1:
1772
+ return cloneDataView(object);
1773
+
1774
+ case float32Tag$1: case float64Tag$1:
1775
+ case int8Tag$1: case int16Tag$1: case int32Tag$1:
1776
+ case uint8Tag$1: case uint8ClampedTag$1: case uint16Tag$1: case uint32Tag$1:
1777
+ return cloneTypedArray(object);
1778
+
1779
+ case mapTag$2:
1780
+ return new Ctor;
1781
+
1782
+ case numberTag$1:
1783
+ case stringTag$1:
1784
+ return new Ctor(object);
1785
+
1786
+ case regexpTag$1:
1787
+ return cloneRegExp(object);
1788
+
1789
+ case setTag$2:
1790
+ return new Ctor;
1791
+
1792
+ case symbolTag$1:
1793
+ return cloneSymbol(object);
1794
+ }
1795
+ }
1796
+
1797
+ /**
1798
+ * Initializes an object clone.
1799
+ *
1800
+ * @private
1801
+ * @param {Object} object The object to clone.
1802
+ * @returns {Object} Returns the initialized clone.
1803
+ */
1804
+ function initCloneObject(object) {
1805
+ return (typeof object.constructor == 'function' && !isPrototype(object))
1806
+ ? baseCreate(getPrototype(object))
1807
+ : {};
1808
+ }
1809
+
1810
+ /** `Object#toString` result references. */
1811
+ var mapTag$1 = '[object Map]';
1812
+
1813
+ /**
1814
+ * The base implementation of `_.isMap` without Node.js optimizations.
1815
+ *
1816
+ * @private
1817
+ * @param {*} value The value to check.
1818
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
1819
+ */
1820
+ function baseIsMap(value) {
1821
+ return isObjectLike(value) && getTag$1(value) == mapTag$1;
1822
+ }
1823
+
1824
+ /* Node.js helper references. */
1825
+ var nodeIsMap = nodeUtil && nodeUtil.isMap;
1826
+
1827
+ /**
1828
+ * Checks if `value` is classified as a `Map` object.
1829
+ *
1830
+ * @static
1831
+ * @memberOf _
1832
+ * @since 4.3.0
1833
+ * @category Lang
1834
+ * @param {*} value The value to check.
1835
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
1836
+ * @example
1837
+ *
1838
+ * _.isMap(new Map);
1839
+ * // => true
1840
+ *
1841
+ * _.isMap(new WeakMap);
1842
+ * // => false
1843
+ */
1844
+ var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
1845
+
1846
+ /** `Object#toString` result references. */
1847
+ var setTag$1 = '[object Set]';
1848
+
1849
+ /**
1850
+ * The base implementation of `_.isSet` without Node.js optimizations.
1851
+ *
1852
+ * @private
1853
+ * @param {*} value The value to check.
1854
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
1855
+ */
1856
+ function baseIsSet(value) {
1857
+ return isObjectLike(value) && getTag$1(value) == setTag$1;
1858
+ }
1859
+
1860
+ /* Node.js helper references. */
1861
+ var nodeIsSet = nodeUtil && nodeUtil.isSet;
1862
+
1863
+ /**
1864
+ * Checks if `value` is classified as a `Set` object.
1865
+ *
1866
+ * @static
1867
+ * @memberOf _
1868
+ * @since 4.3.0
1869
+ * @category Lang
1870
+ * @param {*} value The value to check.
1871
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
1872
+ * @example
1873
+ *
1874
+ * _.isSet(new Set);
1875
+ * // => true
1876
+ *
1877
+ * _.isSet(new WeakSet);
1878
+ * // => false
1879
+ */
1880
+ var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
1881
+
1882
+ /** `Object#toString` result references. */
1883
+ var argsTag = '[object Arguments]',
1884
+ arrayTag = '[object Array]',
1885
+ boolTag = '[object Boolean]',
1886
+ dateTag = '[object Date]',
1887
+ errorTag = '[object Error]',
1888
+ funcTag = '[object Function]',
1889
+ genTag = '[object GeneratorFunction]',
1890
+ mapTag = '[object Map]',
1891
+ numberTag = '[object Number]',
1892
+ objectTag = '[object Object]',
1893
+ regexpTag = '[object RegExp]',
1894
+ setTag = '[object Set]',
1895
+ stringTag = '[object String]',
1896
+ symbolTag = '[object Symbol]',
1897
+ weakMapTag = '[object WeakMap]';
1898
+
1899
+ var arrayBufferTag = '[object ArrayBuffer]',
1900
+ dataViewTag = '[object DataView]',
1901
+ float32Tag = '[object Float32Array]',
1902
+ float64Tag = '[object Float64Array]',
1903
+ int8Tag = '[object Int8Array]',
1904
+ int16Tag = '[object Int16Array]',
1905
+ int32Tag = '[object Int32Array]',
1906
+ uint8Tag = '[object Uint8Array]',
1907
+ uint8ClampedTag = '[object Uint8ClampedArray]',
1908
+ uint16Tag = '[object Uint16Array]',
1909
+ uint32Tag = '[object Uint32Array]';
1910
+
1911
+ /** Used to identify `toStringTag` values supported by `_.clone`. */
1912
+ var cloneableTags = {};
1913
+ cloneableTags[argsTag] = cloneableTags[arrayTag] =
1914
+ cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
1915
+ cloneableTags[boolTag] = cloneableTags[dateTag] =
1916
+ cloneableTags[float32Tag] = cloneableTags[float64Tag] =
1917
+ cloneableTags[int8Tag] = cloneableTags[int16Tag] =
1918
+ cloneableTags[int32Tag] = cloneableTags[mapTag] =
1919
+ cloneableTags[numberTag] = cloneableTags[objectTag] =
1920
+ cloneableTags[regexpTag] = cloneableTags[setTag] =
1921
+ cloneableTags[stringTag] = cloneableTags[symbolTag] =
1922
+ cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
1923
+ cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
1924
+ cloneableTags[errorTag] = cloneableTags[funcTag] =
1925
+ cloneableTags[weakMapTag] = false;
1926
+
1927
+ /**
1928
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
1929
+ * traversed objects.
1930
+ *
1931
+ * @private
1932
+ * @param {*} value The value to clone.
1933
+ * @param {boolean} bitmask The bitmask flags.
1934
+ * 1 - Deep clone
1935
+ * 2 - Flatten inherited properties
1936
+ * 4 - Clone symbols
1937
+ * @param {Function} [customizer] The function to customize cloning.
1938
+ * @param {string} [key] The key of `value`.
1939
+ * @param {Object} [object] The parent object of `value`.
1940
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
1941
+ * @returns {*} Returns the cloned value.
1942
+ */
1943
+ function baseClone(value, bitmask, customizer, key, object, stack) {
1944
+ var result;
1945
+ if (result !== undefined) {
1946
+ return result;
1947
+ }
1948
+ if (!isObject(value)) {
1949
+ return value;
1950
+ }
1951
+ var isArr = isArray(value);
1952
+ if (isArr) {
1953
+ result = initCloneArray(value);
1954
+ } else {
1955
+ var tag = getTag$1(value),
1956
+ isFunc = tag == funcTag || tag == genTag;
1957
+
1958
+ if (isBuffer(value)) {
1959
+ return cloneBuffer(value);
1960
+ }
1961
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
1962
+ result = (isFunc) ? {} : initCloneObject(value);
1963
+ } else {
1964
+ if (!cloneableTags[tag]) {
1965
+ return object ? value : {};
1966
+ }
1967
+ result = initCloneByTag(value, tag);
1968
+ }
1969
+ }
1970
+ // Check for circular references and return its corresponding clone.
1971
+ stack || (stack = new Stack);
1972
+ var stacked = stack.get(value);
1973
+ if (stacked) {
1974
+ return stacked;
1975
+ }
1976
+ stack.set(value, result);
1977
+
1978
+ if (isSet(value)) {
1979
+ value.forEach(function(subValue) {
1980
+ result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
1981
+ });
1982
+ } else if (isMap(value)) {
1983
+ value.forEach(function(subValue, key) {
1984
+ result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
1985
+ });
1986
+ }
1987
+
1988
+ var keysFunc = (getAllKeys)
1989
+ ;
1990
+
1991
+ var props = isArr ? undefined : keysFunc(value);
1992
+ arrayEach(props || value, function(subValue, key) {
1993
+ if (props) {
1994
+ key = subValue;
1995
+ subValue = value[key];
1996
+ }
1997
+ // Recursively populate clone (susceptible to call stack limits).
1998
+ assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
1999
+ });
2000
+ return result;
2001
+ }
2002
+
2003
+ /** Used to compose bitmasks for cloning. */
2004
+ var CLONE_DEEP_FLAG = 1,
2005
+ CLONE_SYMBOLS_FLAG = 4;
2006
+
2007
+ /**
2008
+ * This method is like `_.clone` except that it recursively clones `value`.
2009
+ *
2010
+ * @static
2011
+ * @memberOf _
2012
+ * @since 1.0.0
2013
+ * @category Lang
2014
+ * @param {*} value The value to recursively clone.
2015
+ * @returns {*} Returns the deep cloned value.
2016
+ * @see _.clone
2017
+ * @example
2018
+ *
2019
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
2020
+ *
2021
+ * var deep = _.cloneDeep(objects);
2022
+ * console.log(deep[0] === objects[0]);
2023
+ * // => false
2024
+ */
2025
+ function cloneDeep(value) {
2026
+ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
2027
+ }
2028
+
2029
+ exports.cloneDeep = cloneDeep;