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