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