@zengenti/contensis-react-base 3.0.0-beta.45 → 3.0.0-beta.48

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.
@@ -15,9 +15,11 @@ import serialize from 'serialize-javascript';
15
15
  import minifyCssString from 'minify-css-string';
16
16
  import mapJson from 'jsonpath-mapper';
17
17
  import { ChunkExtractor, ChunkExtractorManager } from '@loadable/server';
18
+ import { identity, noop } from 'lodash';
19
+ import { buildCleaner } from 'lodash-clean';
18
20
  import { c as createStore, s as setVersionStatus, a as setVersion } from './version-b2ca1dab.js';
19
- import { h as history, d as deliveryApi, p as pickProject, r as rootSaga } from './App-7b3aee16.js';
20
- export { A as ReactApp } from './App-7b3aee16.js';
21
+ import { h as history, d as deliveryApi, p as pickProject, r as rootSaga } from './App-13385879.js';
22
+ export { A as ReactApp } from './App-13385879.js';
21
23
  import { s as setCurrentProject } from './actions-5437f43d.js';
22
24
  import { s as selectSurrogateKeys, a as selectRouteEntry, b as selectCurrentProject, g as getImmutableOrJS } from './selectors-65f0f31c.js';
23
25
  import '@redux-saga/core/effects';
@@ -38,7 +40,7 @@ import 'await-to-js';
38
40
  import 'js-cookie';
39
41
  import 'react-hot-loader';
40
42
  import 'query-string';
41
- import './RouteLoader-d4b4d320.js';
43
+ import './RouteLoader-ab729275.js';
42
44
  import 'reselect';
43
45
 
44
46
  const servers$1 = SERVERS;
@@ -58,6 +60,7 @@ const DisplayStartupConfiguration = config => {
58
60
  console.log();
59
61
  console.log('Reverse proxy paths: ', JSON.stringify(config.reverseProxyPaths, null, 2));
60
62
  console.log();
63
+ if (config.staticFolderPath) console.log(`Serving static assets from: "/dist/${config.staticFolderPath}/"`);
61
64
  /* eslint-enable no-console */
62
65
  };
63
66
 
@@ -118,6 +121,7 @@ const replaceStaticPath = (str, staticFolderPath = 'static') => str.replace(/sta
118
121
  const bundleManipulationMiddleware = ({
119
122
  appRootPath,
120
123
  maxage,
124
+ staticFolderPath,
121
125
  staticRoutePath
122
126
  }) => (req, res, next) => {
123
127
  const filename = path.basename(req.path);
@@ -125,7 +129,7 @@ const bundleManipulationMiddleware = ({
125
129
  const legacyBundle = filename.endsWith('.js');
126
130
 
127
131
  if ((legacyBundle || modernBundle) && filename.startsWith('runtime.')) {
128
- const jsRuntimeLocation = path.resolve(appRootPath, `dist/static/${modernBundle ? 'modern/js' : 'legacy/js'}/${filename}`);
132
+ const jsRuntimeLocation = path.resolve(appRootPath, `dist/${staticFolderPath}/${modernBundle ? 'modern/js' : 'legacy/js'}/${filename}`);
129
133
 
130
134
  try {
131
135
  const jsRuntimeBundle = fs.readFileSync(jsRuntimeLocation, 'utf8');
@@ -155,13 +159,22 @@ const resolveStartupMiddleware = ({
155
159
  maxage,
156
160
  staticFolderPath,
157
161
  startupScriptFilename
158
- }) => (req, res, next) => {
162
+ }) => async (req, res, next) => {
159
163
  if (startupScriptFilename !== 'startup.js' && req.path === `/${startupScriptFilename}`) {
160
- const startupFilePath = `dist/${staticFolderPath}/startup.js`;
161
- const startupFileLocation = path.resolve(appRootPath, startupFilePath);
162
- if (maxage) res.set('Cache-Control', `public, max-age=${maxage}`);
164
+ let startupFileLocation = '';
163
165
 
164
166
  try {
167
+ const startupFilePaths = [`dist/static/startup.js`, `dist/${staticFolderPath}/startup.js`];
168
+ let startupFilePath = '';
169
+ startupFilePaths.forEach(async testPath => {
170
+ try {
171
+ fs.accessSync(testPath);
172
+ startupFilePath = testPath;
173
+ } catch (ex) {// Do nothing
174
+ }
175
+ });
176
+ startupFileLocation = path.resolve(appRootPath, startupFilePath);
177
+ if (maxage) res.set('Cache-Control', `public, max-age=${maxage}`);
165
178
  res.sendFile(startupFileLocation);
166
179
  } catch (sendFileError) {
167
180
  // eslint-disable-next-line no-console
@@ -187,6 +200,7 @@ const staticAssets = (app, {
187
200
  // these maxage values are different in config but the same in runtime,
188
201
  // this one is the true value in seconds
189
202
  maxage: CacheDuration.static,
203
+ staticFolderPath,
190
204
  staticRoutePath
191
205
  }), resolveStartupMiddleware({
192
206
  appRootPath,
@@ -201,6 +215,2790 @@ const staticAssets = (app, {
201
215
  }));
202
216
  };
203
217
 
218
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
219
+
220
+ /**
221
+ * Removes all key-value entries from the list cache.
222
+ *
223
+ * @private
224
+ * @name clear
225
+ * @memberOf ListCache
226
+ */
227
+
228
+ function listCacheClear$1() {
229
+ this.__data__ = [];
230
+ this.size = 0;
231
+ }
232
+
233
+ var _listCacheClear = listCacheClear$1;
234
+
235
+ /**
236
+ * Performs a
237
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
238
+ * comparison between two values to determine if they are equivalent.
239
+ *
240
+ * @static
241
+ * @memberOf _
242
+ * @since 4.0.0
243
+ * @category Lang
244
+ * @param {*} value The value to compare.
245
+ * @param {*} other The other value to compare.
246
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
247
+ * @example
248
+ *
249
+ * var object = { 'a': 1 };
250
+ * var other = { 'a': 1 };
251
+ *
252
+ * _.eq(object, object);
253
+ * // => true
254
+ *
255
+ * _.eq(object, other);
256
+ * // => false
257
+ *
258
+ * _.eq('a', 'a');
259
+ * // => true
260
+ *
261
+ * _.eq('a', Object('a'));
262
+ * // => false
263
+ *
264
+ * _.eq(NaN, NaN);
265
+ * // => true
266
+ */
267
+
268
+ function eq$2(value, other) {
269
+ return value === other || (value !== value && other !== other);
270
+ }
271
+
272
+ var eq_1 = eq$2;
273
+
274
+ var eq$1 = eq_1;
275
+
276
+ /**
277
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
278
+ *
279
+ * @private
280
+ * @param {Array} array The array to inspect.
281
+ * @param {*} key The key to search for.
282
+ * @returns {number} Returns the index of the matched value, else `-1`.
283
+ */
284
+ function assocIndexOf$4(array, key) {
285
+ var length = array.length;
286
+ while (length--) {
287
+ if (eq$1(array[length][0], key)) {
288
+ return length;
289
+ }
290
+ }
291
+ return -1;
292
+ }
293
+
294
+ var _assocIndexOf = assocIndexOf$4;
295
+
296
+ var assocIndexOf$3 = _assocIndexOf;
297
+
298
+ /** Used for built-in method references. */
299
+ var arrayProto = Array.prototype;
300
+
301
+ /** Built-in value references. */
302
+ var splice = arrayProto.splice;
303
+
304
+ /**
305
+ * Removes `key` and its value from the list cache.
306
+ *
307
+ * @private
308
+ * @name delete
309
+ * @memberOf ListCache
310
+ * @param {string} key The key of the value to remove.
311
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
312
+ */
313
+ function listCacheDelete$1(key) {
314
+ var data = this.__data__,
315
+ index = assocIndexOf$3(data, key);
316
+
317
+ if (index < 0) {
318
+ return false;
319
+ }
320
+ var lastIndex = data.length - 1;
321
+ if (index == lastIndex) {
322
+ data.pop();
323
+ } else {
324
+ splice.call(data, index, 1);
325
+ }
326
+ --this.size;
327
+ return true;
328
+ }
329
+
330
+ var _listCacheDelete = listCacheDelete$1;
331
+
332
+ var assocIndexOf$2 = _assocIndexOf;
333
+
334
+ /**
335
+ * Gets the list cache value for `key`.
336
+ *
337
+ * @private
338
+ * @name get
339
+ * @memberOf ListCache
340
+ * @param {string} key The key of the value to get.
341
+ * @returns {*} Returns the entry value.
342
+ */
343
+ function listCacheGet$1(key) {
344
+ var data = this.__data__,
345
+ index = assocIndexOf$2(data, key);
346
+
347
+ return index < 0 ? undefined : data[index][1];
348
+ }
349
+
350
+ var _listCacheGet = listCacheGet$1;
351
+
352
+ var assocIndexOf$1 = _assocIndexOf;
353
+
354
+ /**
355
+ * Checks if a list cache value for `key` exists.
356
+ *
357
+ * @private
358
+ * @name has
359
+ * @memberOf ListCache
360
+ * @param {string} key The key of the entry to check.
361
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
362
+ */
363
+ function listCacheHas$1(key) {
364
+ return assocIndexOf$1(this.__data__, key) > -1;
365
+ }
366
+
367
+ var _listCacheHas = listCacheHas$1;
368
+
369
+ var assocIndexOf = _assocIndexOf;
370
+
371
+ /**
372
+ * Sets the list cache `key` to `value`.
373
+ *
374
+ * @private
375
+ * @name set
376
+ * @memberOf ListCache
377
+ * @param {string} key The key of the value to set.
378
+ * @param {*} value The value to set.
379
+ * @returns {Object} Returns the list cache instance.
380
+ */
381
+ function listCacheSet$1(key, value) {
382
+ var data = this.__data__,
383
+ index = assocIndexOf(data, key);
384
+
385
+ if (index < 0) {
386
+ ++this.size;
387
+ data.push([key, value]);
388
+ } else {
389
+ data[index][1] = value;
390
+ }
391
+ return this;
392
+ }
393
+
394
+ var _listCacheSet = listCacheSet$1;
395
+
396
+ var listCacheClear = _listCacheClear,
397
+ listCacheDelete = _listCacheDelete,
398
+ listCacheGet = _listCacheGet,
399
+ listCacheHas = _listCacheHas,
400
+ listCacheSet = _listCacheSet;
401
+
402
+ /**
403
+ * Creates an list cache object.
404
+ *
405
+ * @private
406
+ * @constructor
407
+ * @param {Array} [entries] The key-value pairs to cache.
408
+ */
409
+ function ListCache$4(entries) {
410
+ var index = -1,
411
+ length = entries == null ? 0 : entries.length;
412
+
413
+ this.clear();
414
+ while (++index < length) {
415
+ var entry = entries[index];
416
+ this.set(entry[0], entry[1]);
417
+ }
418
+ }
419
+
420
+ // Add methods to `ListCache`.
421
+ ListCache$4.prototype.clear = listCacheClear;
422
+ ListCache$4.prototype['delete'] = listCacheDelete;
423
+ ListCache$4.prototype.get = listCacheGet;
424
+ ListCache$4.prototype.has = listCacheHas;
425
+ ListCache$4.prototype.set = listCacheSet;
426
+
427
+ var _ListCache = ListCache$4;
428
+
429
+ var ListCache$3 = _ListCache;
430
+
431
+ /**
432
+ * Removes all key-value entries from the stack.
433
+ *
434
+ * @private
435
+ * @name clear
436
+ * @memberOf Stack
437
+ */
438
+ function stackClear$1() {
439
+ this.__data__ = new ListCache$3;
440
+ this.size = 0;
441
+ }
442
+
443
+ var _stackClear = stackClear$1;
444
+
445
+ /**
446
+ * Removes `key` and its value from the stack.
447
+ *
448
+ * @private
449
+ * @name delete
450
+ * @memberOf Stack
451
+ * @param {string} key The key of the value to remove.
452
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
453
+ */
454
+
455
+ function stackDelete$1(key) {
456
+ var data = this.__data__,
457
+ result = data['delete'](key);
458
+
459
+ this.size = data.size;
460
+ return result;
461
+ }
462
+
463
+ var _stackDelete = stackDelete$1;
464
+
465
+ /**
466
+ * Gets the stack value for `key`.
467
+ *
468
+ * @private
469
+ * @name get
470
+ * @memberOf Stack
471
+ * @param {string} key The key of the value to get.
472
+ * @returns {*} Returns the entry value.
473
+ */
474
+
475
+ function stackGet$1(key) {
476
+ return this.__data__.get(key);
477
+ }
478
+
479
+ var _stackGet = stackGet$1;
480
+
481
+ /**
482
+ * Checks if a stack value for `key` exists.
483
+ *
484
+ * @private
485
+ * @name has
486
+ * @memberOf Stack
487
+ * @param {string} key The key of the entry to check.
488
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
489
+ */
490
+
491
+ function stackHas$1(key) {
492
+ return this.__data__.has(key);
493
+ }
494
+
495
+ var _stackHas = stackHas$1;
496
+
497
+ /** Detect free variable `global` from Node.js. */
498
+
499
+ var freeGlobal$1 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
500
+
501
+ var _freeGlobal = freeGlobal$1;
502
+
503
+ var freeGlobal = _freeGlobal;
504
+
505
+ /** Detect free variable `self`. */
506
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
507
+
508
+ /** Used as a reference to the global object. */
509
+ var root$8 = freeGlobal || freeSelf || Function('return this')();
510
+
511
+ var _root = root$8;
512
+
513
+ var root$7 = _root;
514
+
515
+ /** Built-in value references. */
516
+ var Symbol$3 = root$7.Symbol;
517
+
518
+ var _Symbol = Symbol$3;
519
+
520
+ var Symbol$2 = _Symbol;
521
+
522
+ /** Used for built-in method references. */
523
+ var objectProto$c = Object.prototype;
524
+
525
+ /** Used to check objects for own properties. */
526
+ var hasOwnProperty$9 = objectProto$c.hasOwnProperty;
527
+
528
+ /**
529
+ * Used to resolve the
530
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
531
+ * of values.
532
+ */
533
+ var nativeObjectToString$1 = objectProto$c.toString;
534
+
535
+ /** Built-in value references. */
536
+ var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : undefined;
537
+
538
+ /**
539
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
540
+ *
541
+ * @private
542
+ * @param {*} value The value to query.
543
+ * @returns {string} Returns the raw `toStringTag`.
544
+ */
545
+ function getRawTag$1(value) {
546
+ var isOwn = hasOwnProperty$9.call(value, symToStringTag$1),
547
+ tag = value[symToStringTag$1];
548
+
549
+ try {
550
+ value[symToStringTag$1] = undefined;
551
+ var unmasked = true;
552
+ } catch (e) {}
553
+
554
+ var result = nativeObjectToString$1.call(value);
555
+ if (unmasked) {
556
+ if (isOwn) {
557
+ value[symToStringTag$1] = tag;
558
+ } else {
559
+ delete value[symToStringTag$1];
560
+ }
561
+ }
562
+ return result;
563
+ }
564
+
565
+ var _getRawTag = getRawTag$1;
566
+
567
+ /** Used for built-in method references. */
568
+
569
+ var objectProto$b = Object.prototype;
570
+
571
+ /**
572
+ * Used to resolve the
573
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
574
+ * of values.
575
+ */
576
+ var nativeObjectToString = objectProto$b.toString;
577
+
578
+ /**
579
+ * Converts `value` to a string using `Object.prototype.toString`.
580
+ *
581
+ * @private
582
+ * @param {*} value The value to convert.
583
+ * @returns {string} Returns the converted string.
584
+ */
585
+ function objectToString$1(value) {
586
+ return nativeObjectToString.call(value);
587
+ }
588
+
589
+ var _objectToString = objectToString$1;
590
+
591
+ var Symbol$1 = _Symbol,
592
+ getRawTag = _getRawTag,
593
+ objectToString = _objectToString;
594
+
595
+ /** `Object#toString` result references. */
596
+ var nullTag = '[object Null]',
597
+ undefinedTag = '[object Undefined]';
598
+
599
+ /** Built-in value references. */
600
+ var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;
601
+
602
+ /**
603
+ * The base implementation of `getTag` without fallbacks for buggy environments.
604
+ *
605
+ * @private
606
+ * @param {*} value The value to query.
607
+ * @returns {string} Returns the `toStringTag`.
608
+ */
609
+ function baseGetTag$4(value) {
610
+ if (value == null) {
611
+ return value === undefined ? undefinedTag : nullTag;
612
+ }
613
+ return (symToStringTag && symToStringTag in Object(value))
614
+ ? getRawTag(value)
615
+ : objectToString(value);
616
+ }
617
+
618
+ var _baseGetTag = baseGetTag$4;
619
+
620
+ /**
621
+ * Checks if `value` is the
622
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
623
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
624
+ *
625
+ * @static
626
+ * @memberOf _
627
+ * @since 0.1.0
628
+ * @category Lang
629
+ * @param {*} value The value to check.
630
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
631
+ * @example
632
+ *
633
+ * _.isObject({});
634
+ * // => true
635
+ *
636
+ * _.isObject([1, 2, 3]);
637
+ * // => true
638
+ *
639
+ * _.isObject(_.noop);
640
+ * // => true
641
+ *
642
+ * _.isObject(null);
643
+ * // => false
644
+ */
645
+
646
+ function isObject$5(value) {
647
+ var type = typeof value;
648
+ return value != null && (type == 'object' || type == 'function');
649
+ }
650
+
651
+ var isObject_1 = isObject$5;
652
+
653
+ var baseGetTag$3 = _baseGetTag,
654
+ isObject$4 = isObject_1;
655
+
656
+ /** `Object#toString` result references. */
657
+ var asyncTag = '[object AsyncFunction]',
658
+ funcTag$2 = '[object Function]',
659
+ genTag$1 = '[object GeneratorFunction]',
660
+ proxyTag = '[object Proxy]';
661
+
662
+ /**
663
+ * Checks if `value` is classified as a `Function` object.
664
+ *
665
+ * @static
666
+ * @memberOf _
667
+ * @since 0.1.0
668
+ * @category Lang
669
+ * @param {*} value The value to check.
670
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
671
+ * @example
672
+ *
673
+ * _.isFunction(_);
674
+ * // => true
675
+ *
676
+ * _.isFunction(/abc/);
677
+ * // => false
678
+ */
679
+ function isFunction$2(value) {
680
+ if (!isObject$4(value)) {
681
+ return false;
682
+ }
683
+ // The use of `Object#toString` avoids issues with the `typeof` operator
684
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
685
+ var tag = baseGetTag$3(value);
686
+ return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
687
+ }
688
+
689
+ var isFunction_1 = isFunction$2;
690
+
691
+ var root$6 = _root;
692
+
693
+ /** Used to detect overreaching core-js shims. */
694
+ var coreJsData$1 = root$6['__core-js_shared__'];
695
+
696
+ var _coreJsData = coreJsData$1;
697
+
698
+ var coreJsData = _coreJsData;
699
+
700
+ /** Used to detect methods masquerading as native. */
701
+ var maskSrcKey = (function() {
702
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
703
+ return uid ? ('Symbol(src)_1.' + uid) : '';
704
+ }());
705
+
706
+ /**
707
+ * Checks if `func` has its source masked.
708
+ *
709
+ * @private
710
+ * @param {Function} func The function to check.
711
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
712
+ */
713
+ function isMasked$1(func) {
714
+ return !!maskSrcKey && (maskSrcKey in func);
715
+ }
716
+
717
+ var _isMasked = isMasked$1;
718
+
719
+ /** Used for built-in method references. */
720
+
721
+ var funcProto$1 = Function.prototype;
722
+
723
+ /** Used to resolve the decompiled source of functions. */
724
+ var funcToString$1 = funcProto$1.toString;
725
+
726
+ /**
727
+ * Converts `func` to its source code.
728
+ *
729
+ * @private
730
+ * @param {Function} func The function to convert.
731
+ * @returns {string} Returns the source code.
732
+ */
733
+ function toSource$2(func) {
734
+ if (func != null) {
735
+ try {
736
+ return funcToString$1.call(func);
737
+ } catch (e) {}
738
+ try {
739
+ return (func + '');
740
+ } catch (e) {}
741
+ }
742
+ return '';
743
+ }
744
+
745
+ var _toSource = toSource$2;
746
+
747
+ var isFunction$1 = isFunction_1,
748
+ isMasked = _isMasked,
749
+ isObject$3 = isObject_1,
750
+ toSource$1 = _toSource;
751
+
752
+ /**
753
+ * Used to match `RegExp`
754
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
755
+ */
756
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
757
+
758
+ /** Used to detect host constructors (Safari). */
759
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
760
+
761
+ /** Used for built-in method references. */
762
+ var funcProto = Function.prototype,
763
+ objectProto$a = Object.prototype;
764
+
765
+ /** Used to resolve the decompiled source of functions. */
766
+ var funcToString = funcProto.toString;
767
+
768
+ /** Used to check objects for own properties. */
769
+ var hasOwnProperty$8 = objectProto$a.hasOwnProperty;
770
+
771
+ /** Used to detect if a method is native. */
772
+ var reIsNative = RegExp('^' +
773
+ funcToString.call(hasOwnProperty$8).replace(reRegExpChar, '\\$&')
774
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
775
+ );
776
+
777
+ /**
778
+ * The base implementation of `_.isNative` without bad shim checks.
779
+ *
780
+ * @private
781
+ * @param {*} value The value to check.
782
+ * @returns {boolean} Returns `true` if `value` is a native function,
783
+ * else `false`.
784
+ */
785
+ function baseIsNative$1(value) {
786
+ if (!isObject$3(value) || isMasked(value)) {
787
+ return false;
788
+ }
789
+ var pattern = isFunction$1(value) ? reIsNative : reIsHostCtor;
790
+ return pattern.test(toSource$1(value));
791
+ }
792
+
793
+ var _baseIsNative = baseIsNative$1;
794
+
795
+ /**
796
+ * Gets the value at `key` of `object`.
797
+ *
798
+ * @private
799
+ * @param {Object} [object] The object to query.
800
+ * @param {string} key The key of the property to get.
801
+ * @returns {*} Returns the property value.
802
+ */
803
+
804
+ function getValue$1(object, key) {
805
+ return object == null ? undefined : object[key];
806
+ }
807
+
808
+ var _getValue = getValue$1;
809
+
810
+ var baseIsNative = _baseIsNative,
811
+ getValue = _getValue;
812
+
813
+ /**
814
+ * Gets the native function at `key` of `object`.
815
+ *
816
+ * @private
817
+ * @param {Object} object The object to query.
818
+ * @param {string} key The key of the method to get.
819
+ * @returns {*} Returns the function if it's native, else `undefined`.
820
+ */
821
+ function getNative$7(object, key) {
822
+ var value = getValue(object, key);
823
+ return baseIsNative(value) ? value : undefined;
824
+ }
825
+
826
+ var _getNative = getNative$7;
827
+
828
+ var getNative$6 = _getNative,
829
+ root$5 = _root;
830
+
831
+ /* Built-in method references that are verified to be native. */
832
+ var Map$3 = getNative$6(root$5, 'Map');
833
+
834
+ var _Map = Map$3;
835
+
836
+ var getNative$5 = _getNative;
837
+
838
+ /* Built-in method references that are verified to be native. */
839
+ var nativeCreate$4 = getNative$5(Object, 'create');
840
+
841
+ var _nativeCreate = nativeCreate$4;
842
+
843
+ var nativeCreate$3 = _nativeCreate;
844
+
845
+ /**
846
+ * Removes all key-value entries from the hash.
847
+ *
848
+ * @private
849
+ * @name clear
850
+ * @memberOf Hash
851
+ */
852
+ function hashClear$1() {
853
+ this.__data__ = nativeCreate$3 ? nativeCreate$3(null) : {};
854
+ this.size = 0;
855
+ }
856
+
857
+ var _hashClear = hashClear$1;
858
+
859
+ /**
860
+ * Removes `key` and its value from the hash.
861
+ *
862
+ * @private
863
+ * @name delete
864
+ * @memberOf Hash
865
+ * @param {Object} hash The hash to modify.
866
+ * @param {string} key The key of the value to remove.
867
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
868
+ */
869
+
870
+ function hashDelete$1(key) {
871
+ var result = this.has(key) && delete this.__data__[key];
872
+ this.size -= result ? 1 : 0;
873
+ return result;
874
+ }
875
+
876
+ var _hashDelete = hashDelete$1;
877
+
878
+ var nativeCreate$2 = _nativeCreate;
879
+
880
+ /** Used to stand-in for `undefined` hash values. */
881
+ var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
882
+
883
+ /** Used for built-in method references. */
884
+ var objectProto$9 = Object.prototype;
885
+
886
+ /** Used to check objects for own properties. */
887
+ var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
888
+
889
+ /**
890
+ * Gets the hash value for `key`.
891
+ *
892
+ * @private
893
+ * @name get
894
+ * @memberOf Hash
895
+ * @param {string} key The key of the value to get.
896
+ * @returns {*} Returns the entry value.
897
+ */
898
+ function hashGet$1(key) {
899
+ var data = this.__data__;
900
+ if (nativeCreate$2) {
901
+ var result = data[key];
902
+ return result === HASH_UNDEFINED$1 ? undefined : result;
903
+ }
904
+ return hasOwnProperty$7.call(data, key) ? data[key] : undefined;
905
+ }
906
+
907
+ var _hashGet = hashGet$1;
908
+
909
+ var nativeCreate$1 = _nativeCreate;
910
+
911
+ /** Used for built-in method references. */
912
+ var objectProto$8 = Object.prototype;
913
+
914
+ /** Used to check objects for own properties. */
915
+ var hasOwnProperty$6 = objectProto$8.hasOwnProperty;
916
+
917
+ /**
918
+ * Checks if a hash value for `key` exists.
919
+ *
920
+ * @private
921
+ * @name has
922
+ * @memberOf Hash
923
+ * @param {string} key The key of the entry to check.
924
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
925
+ */
926
+ function hashHas$1(key) {
927
+ var data = this.__data__;
928
+ return nativeCreate$1 ? (data[key] !== undefined) : hasOwnProperty$6.call(data, key);
929
+ }
930
+
931
+ var _hashHas = hashHas$1;
932
+
933
+ var nativeCreate = _nativeCreate;
934
+
935
+ /** Used to stand-in for `undefined` hash values. */
936
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
937
+
938
+ /**
939
+ * Sets the hash `key` to `value`.
940
+ *
941
+ * @private
942
+ * @name set
943
+ * @memberOf Hash
944
+ * @param {string} key The key of the value to set.
945
+ * @param {*} value The value to set.
946
+ * @returns {Object} Returns the hash instance.
947
+ */
948
+ function hashSet$1(key, value) {
949
+ var data = this.__data__;
950
+ this.size += this.has(key) ? 0 : 1;
951
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
952
+ return this;
953
+ }
954
+
955
+ var _hashSet = hashSet$1;
956
+
957
+ var hashClear = _hashClear,
958
+ hashDelete = _hashDelete,
959
+ hashGet = _hashGet,
960
+ hashHas = _hashHas,
961
+ hashSet = _hashSet;
962
+
963
+ /**
964
+ * Creates a hash object.
965
+ *
966
+ * @private
967
+ * @constructor
968
+ * @param {Array} [entries] The key-value pairs to cache.
969
+ */
970
+ function Hash$1(entries) {
971
+ var index = -1,
972
+ length = entries == null ? 0 : entries.length;
973
+
974
+ this.clear();
975
+ while (++index < length) {
976
+ var entry = entries[index];
977
+ this.set(entry[0], entry[1]);
978
+ }
979
+ }
980
+
981
+ // Add methods to `Hash`.
982
+ Hash$1.prototype.clear = hashClear;
983
+ Hash$1.prototype['delete'] = hashDelete;
984
+ Hash$1.prototype.get = hashGet;
985
+ Hash$1.prototype.has = hashHas;
986
+ Hash$1.prototype.set = hashSet;
987
+
988
+ var _Hash = Hash$1;
989
+
990
+ var Hash = _Hash,
991
+ ListCache$2 = _ListCache,
992
+ Map$2 = _Map;
993
+
994
+ /**
995
+ * Removes all key-value entries from the map.
996
+ *
997
+ * @private
998
+ * @name clear
999
+ * @memberOf MapCache
1000
+ */
1001
+ function mapCacheClear$1() {
1002
+ this.size = 0;
1003
+ this.__data__ = {
1004
+ 'hash': new Hash,
1005
+ 'map': new (Map$2 || ListCache$2),
1006
+ 'string': new Hash
1007
+ };
1008
+ }
1009
+
1010
+ var _mapCacheClear = mapCacheClear$1;
1011
+
1012
+ /**
1013
+ * Checks if `value` is suitable for use as unique object key.
1014
+ *
1015
+ * @private
1016
+ * @param {*} value The value to check.
1017
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
1018
+ */
1019
+
1020
+ function isKeyable$1(value) {
1021
+ var type = typeof value;
1022
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
1023
+ ? (value !== '__proto__')
1024
+ : (value === null);
1025
+ }
1026
+
1027
+ var _isKeyable = isKeyable$1;
1028
+
1029
+ var isKeyable = _isKeyable;
1030
+
1031
+ /**
1032
+ * Gets the data for `map`.
1033
+ *
1034
+ * @private
1035
+ * @param {Object} map The map to query.
1036
+ * @param {string} key The reference key.
1037
+ * @returns {*} Returns the map data.
1038
+ */
1039
+ function getMapData$4(map, key) {
1040
+ var data = map.__data__;
1041
+ return isKeyable(key)
1042
+ ? data[typeof key == 'string' ? 'string' : 'hash']
1043
+ : data.map;
1044
+ }
1045
+
1046
+ var _getMapData = getMapData$4;
1047
+
1048
+ var getMapData$3 = _getMapData;
1049
+
1050
+ /**
1051
+ * Removes `key` and its value from the map.
1052
+ *
1053
+ * @private
1054
+ * @name delete
1055
+ * @memberOf MapCache
1056
+ * @param {string} key The key of the value to remove.
1057
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1058
+ */
1059
+ function mapCacheDelete$1(key) {
1060
+ var result = getMapData$3(this, key)['delete'](key);
1061
+ this.size -= result ? 1 : 0;
1062
+ return result;
1063
+ }
1064
+
1065
+ var _mapCacheDelete = mapCacheDelete$1;
1066
+
1067
+ var getMapData$2 = _getMapData;
1068
+
1069
+ /**
1070
+ * Gets the map value for `key`.
1071
+ *
1072
+ * @private
1073
+ * @name get
1074
+ * @memberOf MapCache
1075
+ * @param {string} key The key of the value to get.
1076
+ * @returns {*} Returns the entry value.
1077
+ */
1078
+ function mapCacheGet$1(key) {
1079
+ return getMapData$2(this, key).get(key);
1080
+ }
1081
+
1082
+ var _mapCacheGet = mapCacheGet$1;
1083
+
1084
+ var getMapData$1 = _getMapData;
1085
+
1086
+ /**
1087
+ * Checks if a map value for `key` exists.
1088
+ *
1089
+ * @private
1090
+ * @name has
1091
+ * @memberOf MapCache
1092
+ * @param {string} key The key of the entry to check.
1093
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1094
+ */
1095
+ function mapCacheHas$1(key) {
1096
+ return getMapData$1(this, key).has(key);
1097
+ }
1098
+
1099
+ var _mapCacheHas = mapCacheHas$1;
1100
+
1101
+ var getMapData = _getMapData;
1102
+
1103
+ /**
1104
+ * Sets the map `key` to `value`.
1105
+ *
1106
+ * @private
1107
+ * @name set
1108
+ * @memberOf MapCache
1109
+ * @param {string} key The key of the value to set.
1110
+ * @param {*} value The value to set.
1111
+ * @returns {Object} Returns the map cache instance.
1112
+ */
1113
+ function mapCacheSet$1(key, value) {
1114
+ var data = getMapData(this, key),
1115
+ size = data.size;
1116
+
1117
+ data.set(key, value);
1118
+ this.size += data.size == size ? 0 : 1;
1119
+ return this;
1120
+ }
1121
+
1122
+ var _mapCacheSet = mapCacheSet$1;
1123
+
1124
+ var mapCacheClear = _mapCacheClear,
1125
+ mapCacheDelete = _mapCacheDelete,
1126
+ mapCacheGet = _mapCacheGet,
1127
+ mapCacheHas = _mapCacheHas,
1128
+ mapCacheSet = _mapCacheSet;
1129
+
1130
+ /**
1131
+ * Creates a map cache object to store key-value pairs.
1132
+ *
1133
+ * @private
1134
+ * @constructor
1135
+ * @param {Array} [entries] The key-value pairs to cache.
1136
+ */
1137
+ function MapCache$1(entries) {
1138
+ var index = -1,
1139
+ length = entries == null ? 0 : entries.length;
1140
+
1141
+ this.clear();
1142
+ while (++index < length) {
1143
+ var entry = entries[index];
1144
+ this.set(entry[0], entry[1]);
1145
+ }
1146
+ }
1147
+
1148
+ // Add methods to `MapCache`.
1149
+ MapCache$1.prototype.clear = mapCacheClear;
1150
+ MapCache$1.prototype['delete'] = mapCacheDelete;
1151
+ MapCache$1.prototype.get = mapCacheGet;
1152
+ MapCache$1.prototype.has = mapCacheHas;
1153
+ MapCache$1.prototype.set = mapCacheSet;
1154
+
1155
+ var _MapCache = MapCache$1;
1156
+
1157
+ var ListCache$1 = _ListCache,
1158
+ Map$1 = _Map,
1159
+ MapCache = _MapCache;
1160
+
1161
+ /** Used as the size to enable large array optimizations. */
1162
+ var LARGE_ARRAY_SIZE = 200;
1163
+
1164
+ /**
1165
+ * Sets the stack `key` to `value`.
1166
+ *
1167
+ * @private
1168
+ * @name set
1169
+ * @memberOf Stack
1170
+ * @param {string} key The key of the value to set.
1171
+ * @param {*} value The value to set.
1172
+ * @returns {Object} Returns the stack cache instance.
1173
+ */
1174
+ function stackSet$1(key, value) {
1175
+ var data = this.__data__;
1176
+ if (data instanceof ListCache$1) {
1177
+ var pairs = data.__data__;
1178
+ if (!Map$1 || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
1179
+ pairs.push([key, value]);
1180
+ this.size = ++data.size;
1181
+ return this;
1182
+ }
1183
+ data = this.__data__ = new MapCache(pairs);
1184
+ }
1185
+ data.set(key, value);
1186
+ this.size = data.size;
1187
+ return this;
1188
+ }
1189
+
1190
+ var _stackSet = stackSet$1;
1191
+
1192
+ var ListCache = _ListCache,
1193
+ stackClear = _stackClear,
1194
+ stackDelete = _stackDelete,
1195
+ stackGet = _stackGet,
1196
+ stackHas = _stackHas,
1197
+ stackSet = _stackSet;
1198
+
1199
+ /**
1200
+ * Creates a stack cache object to store key-value pairs.
1201
+ *
1202
+ * @private
1203
+ * @constructor
1204
+ * @param {Array} [entries] The key-value pairs to cache.
1205
+ */
1206
+ function Stack$1(entries) {
1207
+ var data = this.__data__ = new ListCache(entries);
1208
+ this.size = data.size;
1209
+ }
1210
+
1211
+ // Add methods to `Stack`.
1212
+ Stack$1.prototype.clear = stackClear;
1213
+ Stack$1.prototype['delete'] = stackDelete;
1214
+ Stack$1.prototype.get = stackGet;
1215
+ Stack$1.prototype.has = stackHas;
1216
+ Stack$1.prototype.set = stackSet;
1217
+
1218
+ var _Stack = Stack$1;
1219
+
1220
+ /**
1221
+ * A specialized version of `_.forEach` for arrays without support for
1222
+ * iteratee shorthands.
1223
+ *
1224
+ * @private
1225
+ * @param {Array} [array] The array to iterate over.
1226
+ * @param {Function} iteratee The function invoked per iteration.
1227
+ * @returns {Array} Returns `array`.
1228
+ */
1229
+
1230
+ function arrayEach$1(array, iteratee) {
1231
+ var index = -1,
1232
+ length = array == null ? 0 : array.length;
1233
+
1234
+ while (++index < length) {
1235
+ if (iteratee(array[index], index, array) === false) {
1236
+ break;
1237
+ }
1238
+ }
1239
+ return array;
1240
+ }
1241
+
1242
+ var _arrayEach = arrayEach$1;
1243
+
1244
+ var getNative$4 = _getNative;
1245
+
1246
+ var defineProperty$1 = (function() {
1247
+ try {
1248
+ var func = getNative$4(Object, 'defineProperty');
1249
+ func({}, '', {});
1250
+ return func;
1251
+ } catch (e) {}
1252
+ }());
1253
+
1254
+ var _defineProperty = defineProperty$1;
1255
+
1256
+ var defineProperty = _defineProperty;
1257
+
1258
+ /**
1259
+ * The base implementation of `assignValue` and `assignMergeValue` without
1260
+ * value checks.
1261
+ *
1262
+ * @private
1263
+ * @param {Object} object The object to modify.
1264
+ * @param {string} key The key of the property to assign.
1265
+ * @param {*} value The value to assign.
1266
+ */
1267
+ function baseAssignValue$2(object, key, value) {
1268
+ if (key == '__proto__' && defineProperty) {
1269
+ defineProperty(object, key, {
1270
+ 'configurable': true,
1271
+ 'enumerable': true,
1272
+ 'value': value,
1273
+ 'writable': true
1274
+ });
1275
+ } else {
1276
+ object[key] = value;
1277
+ }
1278
+ }
1279
+
1280
+ var _baseAssignValue = baseAssignValue$2;
1281
+
1282
+ var baseAssignValue$1 = _baseAssignValue,
1283
+ eq = eq_1;
1284
+
1285
+ /** Used for built-in method references. */
1286
+ var objectProto$7 = Object.prototype;
1287
+
1288
+ /** Used to check objects for own properties. */
1289
+ var hasOwnProperty$5 = objectProto$7.hasOwnProperty;
1290
+
1291
+ /**
1292
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
1293
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
1294
+ * for equality comparisons.
1295
+ *
1296
+ * @private
1297
+ * @param {Object} object The object to modify.
1298
+ * @param {string} key The key of the property to assign.
1299
+ * @param {*} value The value to assign.
1300
+ */
1301
+ function assignValue$2(object, key, value) {
1302
+ var objValue = object[key];
1303
+ if (!(hasOwnProperty$5.call(object, key) && eq(objValue, value)) ||
1304
+ (value === undefined && !(key in object))) {
1305
+ baseAssignValue$1(object, key, value);
1306
+ }
1307
+ }
1308
+
1309
+ var _assignValue = assignValue$2;
1310
+
1311
+ var assignValue$1 = _assignValue,
1312
+ baseAssignValue = _baseAssignValue;
1313
+
1314
+ /**
1315
+ * Copies properties of `source` to `object`.
1316
+ *
1317
+ * @private
1318
+ * @param {Object} source The object to copy properties from.
1319
+ * @param {Array} props The property identifiers to copy.
1320
+ * @param {Object} [object={}] The object to copy properties to.
1321
+ * @param {Function} [customizer] The function to customize copied values.
1322
+ * @returns {Object} Returns `object`.
1323
+ */
1324
+ function copyObject$4(source, props, object, customizer) {
1325
+ var isNew = !object;
1326
+ object || (object = {});
1327
+
1328
+ var index = -1,
1329
+ length = props.length;
1330
+
1331
+ while (++index < length) {
1332
+ var key = props[index];
1333
+
1334
+ var newValue = customizer
1335
+ ? customizer(object[key], source[key], key, object, source)
1336
+ : undefined;
1337
+
1338
+ if (newValue === undefined) {
1339
+ newValue = source[key];
1340
+ }
1341
+ if (isNew) {
1342
+ baseAssignValue(object, key, newValue);
1343
+ } else {
1344
+ assignValue$1(object, key, newValue);
1345
+ }
1346
+ }
1347
+ return object;
1348
+ }
1349
+
1350
+ var _copyObject = copyObject$4;
1351
+
1352
+ /**
1353
+ * The base implementation of `_.times` without support for iteratee shorthands
1354
+ * or max array length checks.
1355
+ *
1356
+ * @private
1357
+ * @param {number} n The number of times to invoke `iteratee`.
1358
+ * @param {Function} iteratee The function invoked per iteration.
1359
+ * @returns {Array} Returns the array of results.
1360
+ */
1361
+
1362
+ function baseTimes$1(n, iteratee) {
1363
+ var index = -1,
1364
+ result = Array(n);
1365
+
1366
+ while (++index < n) {
1367
+ result[index] = iteratee(index);
1368
+ }
1369
+ return result;
1370
+ }
1371
+
1372
+ var _baseTimes = baseTimes$1;
1373
+
1374
+ /**
1375
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
1376
+ * and has a `typeof` result of "object".
1377
+ *
1378
+ * @static
1379
+ * @memberOf _
1380
+ * @since 4.0.0
1381
+ * @category Lang
1382
+ * @param {*} value The value to check.
1383
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
1384
+ * @example
1385
+ *
1386
+ * _.isObjectLike({});
1387
+ * // => true
1388
+ *
1389
+ * _.isObjectLike([1, 2, 3]);
1390
+ * // => true
1391
+ *
1392
+ * _.isObjectLike(_.noop);
1393
+ * // => false
1394
+ *
1395
+ * _.isObjectLike(null);
1396
+ * // => false
1397
+ */
1398
+
1399
+ function isObjectLike$5(value) {
1400
+ return value != null && typeof value == 'object';
1401
+ }
1402
+
1403
+ var isObjectLike_1 = isObjectLike$5;
1404
+
1405
+ var baseGetTag$2 = _baseGetTag,
1406
+ isObjectLike$4 = isObjectLike_1;
1407
+
1408
+ /** `Object#toString` result references. */
1409
+ var argsTag$2 = '[object Arguments]';
1410
+
1411
+ /**
1412
+ * The base implementation of `_.isArguments`.
1413
+ *
1414
+ * @private
1415
+ * @param {*} value The value to check.
1416
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
1417
+ */
1418
+ function baseIsArguments$1(value) {
1419
+ return isObjectLike$4(value) && baseGetTag$2(value) == argsTag$2;
1420
+ }
1421
+
1422
+ var _baseIsArguments = baseIsArguments$1;
1423
+
1424
+ var baseIsArguments = _baseIsArguments,
1425
+ isObjectLike$3 = isObjectLike_1;
1426
+
1427
+ /** Used for built-in method references. */
1428
+ var objectProto$6 = Object.prototype;
1429
+
1430
+ /** Used to check objects for own properties. */
1431
+ var hasOwnProperty$4 = objectProto$6.hasOwnProperty;
1432
+
1433
+ /** Built-in value references. */
1434
+ var propertyIsEnumerable$1 = objectProto$6.propertyIsEnumerable;
1435
+
1436
+ /**
1437
+ * Checks if `value` is likely an `arguments` object.
1438
+ *
1439
+ * @static
1440
+ * @memberOf _
1441
+ * @since 0.1.0
1442
+ * @category Lang
1443
+ * @param {*} value The value to check.
1444
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
1445
+ * else `false`.
1446
+ * @example
1447
+ *
1448
+ * _.isArguments(function() { return arguments; }());
1449
+ * // => true
1450
+ *
1451
+ * _.isArguments([1, 2, 3]);
1452
+ * // => false
1453
+ */
1454
+ var isArguments$1 = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
1455
+ return isObjectLike$3(value) && hasOwnProperty$4.call(value, 'callee') &&
1456
+ !propertyIsEnumerable$1.call(value, 'callee');
1457
+ };
1458
+
1459
+ var isArguments_1 = isArguments$1;
1460
+
1461
+ /**
1462
+ * Checks if `value` is classified as an `Array` object.
1463
+ *
1464
+ * @static
1465
+ * @memberOf _
1466
+ * @since 0.1.0
1467
+ * @category Lang
1468
+ * @param {*} value The value to check.
1469
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
1470
+ * @example
1471
+ *
1472
+ * _.isArray([1, 2, 3]);
1473
+ * // => true
1474
+ *
1475
+ * _.isArray(document.body.children);
1476
+ * // => false
1477
+ *
1478
+ * _.isArray('abc');
1479
+ * // => false
1480
+ *
1481
+ * _.isArray(_.noop);
1482
+ * // => false
1483
+ */
1484
+
1485
+ var isArray$3 = Array.isArray;
1486
+
1487
+ var isArray_1 = isArray$3;
1488
+
1489
+ var isBuffer$2 = {exports: {}};
1490
+
1491
+ /**
1492
+ * This method returns `false`.
1493
+ *
1494
+ * @static
1495
+ * @memberOf _
1496
+ * @since 4.13.0
1497
+ * @category Util
1498
+ * @returns {boolean} Returns `false`.
1499
+ * @example
1500
+ *
1501
+ * _.times(2, _.stubFalse);
1502
+ * // => [false, false]
1503
+ */
1504
+
1505
+ function stubFalse() {
1506
+ return false;
1507
+ }
1508
+
1509
+ var stubFalse_1 = stubFalse;
1510
+
1511
+ (function (module, exports) {
1512
+ var root = _root,
1513
+ stubFalse = stubFalse_1;
1514
+
1515
+ /** Detect free variable `exports`. */
1516
+ var freeExports = exports && !exports.nodeType && exports;
1517
+
1518
+ /** Detect free variable `module`. */
1519
+ var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
1520
+
1521
+ /** Detect the popular CommonJS extension `module.exports`. */
1522
+ var moduleExports = freeModule && freeModule.exports === freeExports;
1523
+
1524
+ /** Built-in value references. */
1525
+ var Buffer = moduleExports ? root.Buffer : undefined;
1526
+
1527
+ /* Built-in method references for those with the same name as other `lodash` methods. */
1528
+ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
1529
+
1530
+ /**
1531
+ * Checks if `value` is a buffer.
1532
+ *
1533
+ * @static
1534
+ * @memberOf _
1535
+ * @since 4.3.0
1536
+ * @category Lang
1537
+ * @param {*} value The value to check.
1538
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
1539
+ * @example
1540
+ *
1541
+ * _.isBuffer(new Buffer(2));
1542
+ * // => true
1543
+ *
1544
+ * _.isBuffer(new Uint8Array(2));
1545
+ * // => false
1546
+ */
1547
+ var isBuffer = nativeIsBuffer || stubFalse;
1548
+
1549
+ module.exports = isBuffer;
1550
+ }(isBuffer$2, isBuffer$2.exports));
1551
+
1552
+ /** Used as references for various `Number` constants. */
1553
+
1554
+ var MAX_SAFE_INTEGER$1 = 9007199254740991;
1555
+
1556
+ /** Used to detect unsigned integer values. */
1557
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
1558
+
1559
+ /**
1560
+ * Checks if `value` is a valid array-like index.
1561
+ *
1562
+ * @private
1563
+ * @param {*} value The value to check.
1564
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
1565
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
1566
+ */
1567
+ function isIndex$1(value, length) {
1568
+ var type = typeof value;
1569
+ length = length == null ? MAX_SAFE_INTEGER$1 : length;
1570
+
1571
+ return !!length &&
1572
+ (type == 'number' ||
1573
+ (type != 'symbol' && reIsUint.test(value))) &&
1574
+ (value > -1 && value % 1 == 0 && value < length);
1575
+ }
1576
+
1577
+ var _isIndex = isIndex$1;
1578
+
1579
+ /** Used as references for various `Number` constants. */
1580
+
1581
+ var MAX_SAFE_INTEGER = 9007199254740991;
1582
+
1583
+ /**
1584
+ * Checks if `value` is a valid array-like length.
1585
+ *
1586
+ * **Note:** This method is loosely based on
1587
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
1588
+ *
1589
+ * @static
1590
+ * @memberOf _
1591
+ * @since 4.0.0
1592
+ * @category Lang
1593
+ * @param {*} value The value to check.
1594
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
1595
+ * @example
1596
+ *
1597
+ * _.isLength(3);
1598
+ * // => true
1599
+ *
1600
+ * _.isLength(Number.MIN_VALUE);
1601
+ * // => false
1602
+ *
1603
+ * _.isLength(Infinity);
1604
+ * // => false
1605
+ *
1606
+ * _.isLength('3');
1607
+ * // => false
1608
+ */
1609
+ function isLength$2(value) {
1610
+ return typeof value == 'number' &&
1611
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
1612
+ }
1613
+
1614
+ var isLength_1 = isLength$2;
1615
+
1616
+ var baseGetTag$1 = _baseGetTag,
1617
+ isLength$1 = isLength_1,
1618
+ isObjectLike$2 = isObjectLike_1;
1619
+
1620
+ /** `Object#toString` result references. */
1621
+ var argsTag$1 = '[object Arguments]',
1622
+ arrayTag$1 = '[object Array]',
1623
+ boolTag$2 = '[object Boolean]',
1624
+ dateTag$2 = '[object Date]',
1625
+ errorTag$1 = '[object Error]',
1626
+ funcTag$1 = '[object Function]',
1627
+ mapTag$4 = '[object Map]',
1628
+ numberTag$2 = '[object Number]',
1629
+ objectTag$2 = '[object Object]',
1630
+ regexpTag$2 = '[object RegExp]',
1631
+ setTag$4 = '[object Set]',
1632
+ stringTag$2 = '[object String]',
1633
+ weakMapTag$2 = '[object WeakMap]';
1634
+
1635
+ var arrayBufferTag$2 = '[object ArrayBuffer]',
1636
+ dataViewTag$3 = '[object DataView]',
1637
+ float32Tag$2 = '[object Float32Array]',
1638
+ float64Tag$2 = '[object Float64Array]',
1639
+ int8Tag$2 = '[object Int8Array]',
1640
+ int16Tag$2 = '[object Int16Array]',
1641
+ int32Tag$2 = '[object Int32Array]',
1642
+ uint8Tag$2 = '[object Uint8Array]',
1643
+ uint8ClampedTag$2 = '[object Uint8ClampedArray]',
1644
+ uint16Tag$2 = '[object Uint16Array]',
1645
+ uint32Tag$2 = '[object Uint32Array]';
1646
+
1647
+ /** Used to identify `toStringTag` values of typed arrays. */
1648
+ var typedArrayTags = {};
1649
+ typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] =
1650
+ typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] =
1651
+ typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] =
1652
+ typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] =
1653
+ typedArrayTags[uint32Tag$2] = true;
1654
+ typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] =
1655
+ typedArrayTags[arrayBufferTag$2] = typedArrayTags[boolTag$2] =
1656
+ typedArrayTags[dataViewTag$3] = typedArrayTags[dateTag$2] =
1657
+ typedArrayTags[errorTag$1] = typedArrayTags[funcTag$1] =
1658
+ typedArrayTags[mapTag$4] = typedArrayTags[numberTag$2] =
1659
+ typedArrayTags[objectTag$2] = typedArrayTags[regexpTag$2] =
1660
+ typedArrayTags[setTag$4] = typedArrayTags[stringTag$2] =
1661
+ typedArrayTags[weakMapTag$2] = false;
1662
+
1663
+ /**
1664
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
1665
+ *
1666
+ * @private
1667
+ * @param {*} value The value to check.
1668
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
1669
+ */
1670
+ function baseIsTypedArray$1(value) {
1671
+ return isObjectLike$2(value) &&
1672
+ isLength$1(value.length) && !!typedArrayTags[baseGetTag$1(value)];
1673
+ }
1674
+
1675
+ var _baseIsTypedArray = baseIsTypedArray$1;
1676
+
1677
+ /**
1678
+ * The base implementation of `_.unary` without support for storing metadata.
1679
+ *
1680
+ * @private
1681
+ * @param {Function} func The function to cap arguments for.
1682
+ * @returns {Function} Returns the new capped function.
1683
+ */
1684
+
1685
+ function baseUnary$3(func) {
1686
+ return function(value) {
1687
+ return func(value);
1688
+ };
1689
+ }
1690
+
1691
+ var _baseUnary = baseUnary$3;
1692
+
1693
+ var _nodeUtil = {exports: {}};
1694
+
1695
+ (function (module, exports) {
1696
+ var freeGlobal = _freeGlobal;
1697
+
1698
+ /** Detect free variable `exports`. */
1699
+ var freeExports = exports && !exports.nodeType && exports;
1700
+
1701
+ /** Detect free variable `module`. */
1702
+ var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
1703
+
1704
+ /** Detect the popular CommonJS extension `module.exports`. */
1705
+ var moduleExports = freeModule && freeModule.exports === freeExports;
1706
+
1707
+ /** Detect free variable `process` from Node.js. */
1708
+ var freeProcess = moduleExports && freeGlobal.process;
1709
+
1710
+ /** Used to access faster Node.js helpers. */
1711
+ var nodeUtil = (function() {
1712
+ try {
1713
+ // Use `util.types` for Node.js 10+.
1714
+ var types = freeModule && freeModule.require && freeModule.require('util').types;
1715
+
1716
+ if (types) {
1717
+ return types;
1718
+ }
1719
+
1720
+ // Legacy `process.binding('util')` for Node.js < 10.
1721
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
1722
+ } catch (e) {}
1723
+ }());
1724
+
1725
+ module.exports = nodeUtil;
1726
+ }(_nodeUtil, _nodeUtil.exports));
1727
+
1728
+ var baseIsTypedArray = _baseIsTypedArray,
1729
+ baseUnary$2 = _baseUnary,
1730
+ nodeUtil$2 = _nodeUtil.exports;
1731
+
1732
+ /* Node.js helper references. */
1733
+ var nodeIsTypedArray = nodeUtil$2 && nodeUtil$2.isTypedArray;
1734
+
1735
+ /**
1736
+ * Checks if `value` is classified as a typed array.
1737
+ *
1738
+ * @static
1739
+ * @memberOf _
1740
+ * @since 3.0.0
1741
+ * @category Lang
1742
+ * @param {*} value The value to check.
1743
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
1744
+ * @example
1745
+ *
1746
+ * _.isTypedArray(new Uint8Array);
1747
+ * // => true
1748
+ *
1749
+ * _.isTypedArray([]);
1750
+ * // => false
1751
+ */
1752
+ var isTypedArray$1 = nodeIsTypedArray ? baseUnary$2(nodeIsTypedArray) : baseIsTypedArray;
1753
+
1754
+ var isTypedArray_1 = isTypedArray$1;
1755
+
1756
+ var baseTimes = _baseTimes,
1757
+ isArguments = isArguments_1,
1758
+ isArray$2 = isArray_1,
1759
+ isBuffer$1 = isBuffer$2.exports,
1760
+ isIndex = _isIndex,
1761
+ isTypedArray = isTypedArray_1;
1762
+
1763
+ /** Used for built-in method references. */
1764
+ var objectProto$5 = Object.prototype;
1765
+
1766
+ /** Used to check objects for own properties. */
1767
+ var hasOwnProperty$3 = objectProto$5.hasOwnProperty;
1768
+
1769
+ /**
1770
+ * Creates an array of the enumerable property names of the array-like `value`.
1771
+ *
1772
+ * @private
1773
+ * @param {*} value The value to query.
1774
+ * @param {boolean} inherited Specify returning inherited property names.
1775
+ * @returns {Array} Returns the array of property names.
1776
+ */
1777
+ function arrayLikeKeys$2(value, inherited) {
1778
+ var isArr = isArray$2(value),
1779
+ isArg = !isArr && isArguments(value),
1780
+ isBuff = !isArr && !isArg && isBuffer$1(value),
1781
+ isType = !isArr && !isArg && !isBuff && isTypedArray(value),
1782
+ skipIndexes = isArr || isArg || isBuff || isType,
1783
+ result = skipIndexes ? baseTimes(value.length, String) : [],
1784
+ length = result.length;
1785
+
1786
+ for (var key in value) {
1787
+ if ((inherited || hasOwnProperty$3.call(value, key)) &&
1788
+ !(skipIndexes && (
1789
+ // Safari 9 has enumerable `arguments.length` in strict mode.
1790
+ key == 'length' ||
1791
+ // Node.js 0.10 has enumerable non-index properties on buffers.
1792
+ (isBuff && (key == 'offset' || key == 'parent')) ||
1793
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
1794
+ (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
1795
+ // Skip index properties.
1796
+ isIndex(key, length)
1797
+ ))) {
1798
+ result.push(key);
1799
+ }
1800
+ }
1801
+ return result;
1802
+ }
1803
+
1804
+ var _arrayLikeKeys = arrayLikeKeys$2;
1805
+
1806
+ /** Used for built-in method references. */
1807
+
1808
+ var objectProto$4 = Object.prototype;
1809
+
1810
+ /**
1811
+ * Checks if `value` is likely a prototype object.
1812
+ *
1813
+ * @private
1814
+ * @param {*} value The value to check.
1815
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
1816
+ */
1817
+ function isPrototype$3(value) {
1818
+ var Ctor = value && value.constructor,
1819
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$4;
1820
+
1821
+ return value === proto;
1822
+ }
1823
+
1824
+ var _isPrototype = isPrototype$3;
1825
+
1826
+ /**
1827
+ * Creates a unary function that invokes `func` with its argument transformed.
1828
+ *
1829
+ * @private
1830
+ * @param {Function} func The function to wrap.
1831
+ * @param {Function} transform The argument transform.
1832
+ * @returns {Function} Returns the new function.
1833
+ */
1834
+
1835
+ function overArg$2(func, transform) {
1836
+ return function(arg) {
1837
+ return func(transform(arg));
1838
+ };
1839
+ }
1840
+
1841
+ var _overArg = overArg$2;
1842
+
1843
+ var overArg$1 = _overArg;
1844
+
1845
+ /* Built-in method references for those with the same name as other `lodash` methods. */
1846
+ var nativeKeys$1 = overArg$1(Object.keys, Object);
1847
+
1848
+ var _nativeKeys = nativeKeys$1;
1849
+
1850
+ var isPrototype$2 = _isPrototype,
1851
+ nativeKeys = _nativeKeys;
1852
+
1853
+ /** Used for built-in method references. */
1854
+ var objectProto$3 = Object.prototype;
1855
+
1856
+ /** Used to check objects for own properties. */
1857
+ var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
1858
+
1859
+ /**
1860
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
1861
+ *
1862
+ * @private
1863
+ * @param {Object} object The object to query.
1864
+ * @returns {Array} Returns the array of property names.
1865
+ */
1866
+ function baseKeys$1(object) {
1867
+ if (!isPrototype$2(object)) {
1868
+ return nativeKeys(object);
1869
+ }
1870
+ var result = [];
1871
+ for (var key in Object(object)) {
1872
+ if (hasOwnProperty$2.call(object, key) && key != 'constructor') {
1873
+ result.push(key);
1874
+ }
1875
+ }
1876
+ return result;
1877
+ }
1878
+
1879
+ var _baseKeys = baseKeys$1;
1880
+
1881
+ var isFunction = isFunction_1,
1882
+ isLength = isLength_1;
1883
+
1884
+ /**
1885
+ * Checks if `value` is array-like. A value is considered array-like if it's
1886
+ * not a function and has a `value.length` that's an integer greater than or
1887
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
1888
+ *
1889
+ * @static
1890
+ * @memberOf _
1891
+ * @since 4.0.0
1892
+ * @category Lang
1893
+ * @param {*} value The value to check.
1894
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
1895
+ * @example
1896
+ *
1897
+ * _.isArrayLike([1, 2, 3]);
1898
+ * // => true
1899
+ *
1900
+ * _.isArrayLike(document.body.children);
1901
+ * // => true
1902
+ *
1903
+ * _.isArrayLike('abc');
1904
+ * // => true
1905
+ *
1906
+ * _.isArrayLike(_.noop);
1907
+ * // => false
1908
+ */
1909
+ function isArrayLike$2(value) {
1910
+ return value != null && isLength(value.length) && !isFunction(value);
1911
+ }
1912
+
1913
+ var isArrayLike_1 = isArrayLike$2;
1914
+
1915
+ var arrayLikeKeys$1 = _arrayLikeKeys,
1916
+ baseKeys = _baseKeys,
1917
+ isArrayLike$1 = isArrayLike_1;
1918
+
1919
+ /**
1920
+ * Creates an array of the own enumerable property names of `object`.
1921
+ *
1922
+ * **Note:** Non-object values are coerced to objects. See the
1923
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
1924
+ * for more details.
1925
+ *
1926
+ * @static
1927
+ * @since 0.1.0
1928
+ * @memberOf _
1929
+ * @category Object
1930
+ * @param {Object} object The object to query.
1931
+ * @returns {Array} Returns the array of property names.
1932
+ * @example
1933
+ *
1934
+ * function Foo() {
1935
+ * this.a = 1;
1936
+ * this.b = 2;
1937
+ * }
1938
+ *
1939
+ * Foo.prototype.c = 3;
1940
+ *
1941
+ * _.keys(new Foo);
1942
+ * // => ['a', 'b'] (iteration order is not guaranteed)
1943
+ *
1944
+ * _.keys('hi');
1945
+ * // => ['0', '1']
1946
+ */
1947
+ function keys$3(object) {
1948
+ return isArrayLike$1(object) ? arrayLikeKeys$1(object) : baseKeys(object);
1949
+ }
1950
+
1951
+ var keys_1 = keys$3;
1952
+
1953
+ var copyObject$3 = _copyObject,
1954
+ keys$2 = keys_1;
1955
+
1956
+ /**
1957
+ * The base implementation of `_.assign` without support for multiple sources
1958
+ * or `customizer` functions.
1959
+ *
1960
+ * @private
1961
+ * @param {Object} object The destination object.
1962
+ * @param {Object} source The source object.
1963
+ * @returns {Object} Returns `object`.
1964
+ */
1965
+ function baseAssign$1(object, source) {
1966
+ return object && copyObject$3(source, keys$2(source), object);
1967
+ }
1968
+
1969
+ var _baseAssign = baseAssign$1;
1970
+
1971
+ /**
1972
+ * This function is like
1973
+ * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
1974
+ * except that it includes inherited enumerable properties.
1975
+ *
1976
+ * @private
1977
+ * @param {Object} object The object to query.
1978
+ * @returns {Array} Returns the array of property names.
1979
+ */
1980
+
1981
+ function nativeKeysIn$1(object) {
1982
+ var result = [];
1983
+ if (object != null) {
1984
+ for (var key in Object(object)) {
1985
+ result.push(key);
1986
+ }
1987
+ }
1988
+ return result;
1989
+ }
1990
+
1991
+ var _nativeKeysIn = nativeKeysIn$1;
1992
+
1993
+ var isObject$2 = isObject_1,
1994
+ isPrototype$1 = _isPrototype,
1995
+ nativeKeysIn = _nativeKeysIn;
1996
+
1997
+ /** Used for built-in method references. */
1998
+ var objectProto$2 = Object.prototype;
1999
+
2000
+ /** Used to check objects for own properties. */
2001
+ var hasOwnProperty$1 = objectProto$2.hasOwnProperty;
2002
+
2003
+ /**
2004
+ * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
2005
+ *
2006
+ * @private
2007
+ * @param {Object} object The object to query.
2008
+ * @returns {Array} Returns the array of property names.
2009
+ */
2010
+ function baseKeysIn$1(object) {
2011
+ if (!isObject$2(object)) {
2012
+ return nativeKeysIn(object);
2013
+ }
2014
+ var isProto = isPrototype$1(object),
2015
+ result = [];
2016
+
2017
+ for (var key in object) {
2018
+ if (!(key == 'constructor' && (isProto || !hasOwnProperty$1.call(object, key)))) {
2019
+ result.push(key);
2020
+ }
2021
+ }
2022
+ return result;
2023
+ }
2024
+
2025
+ var _baseKeysIn = baseKeysIn$1;
2026
+
2027
+ var arrayLikeKeys = _arrayLikeKeys,
2028
+ baseKeysIn = _baseKeysIn,
2029
+ isArrayLike = isArrayLike_1;
2030
+
2031
+ /**
2032
+ * Creates an array of the own and inherited enumerable property names of `object`.
2033
+ *
2034
+ * **Note:** Non-object values are coerced to objects.
2035
+ *
2036
+ * @static
2037
+ * @memberOf _
2038
+ * @since 3.0.0
2039
+ * @category Object
2040
+ * @param {Object} object The object to query.
2041
+ * @returns {Array} Returns the array of property names.
2042
+ * @example
2043
+ *
2044
+ * function Foo() {
2045
+ * this.a = 1;
2046
+ * this.b = 2;
2047
+ * }
2048
+ *
2049
+ * Foo.prototype.c = 3;
2050
+ *
2051
+ * _.keysIn(new Foo);
2052
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
2053
+ */
2054
+ function keysIn$3(object) {
2055
+ return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
2056
+ }
2057
+
2058
+ var keysIn_1 = keysIn$3;
2059
+
2060
+ var copyObject$2 = _copyObject,
2061
+ keysIn$2 = keysIn_1;
2062
+
2063
+ /**
2064
+ * The base implementation of `_.assignIn` without support for multiple sources
2065
+ * or `customizer` functions.
2066
+ *
2067
+ * @private
2068
+ * @param {Object} object The destination object.
2069
+ * @param {Object} source The source object.
2070
+ * @returns {Object} Returns `object`.
2071
+ */
2072
+ function baseAssignIn$1(object, source) {
2073
+ return object && copyObject$2(source, keysIn$2(source), object);
2074
+ }
2075
+
2076
+ var _baseAssignIn = baseAssignIn$1;
2077
+
2078
+ var _cloneBuffer = {exports: {}};
2079
+
2080
+ (function (module, exports) {
2081
+ var root = _root;
2082
+
2083
+ /** Detect free variable `exports`. */
2084
+ var freeExports = exports && !exports.nodeType && exports;
2085
+
2086
+ /** Detect free variable `module`. */
2087
+ var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
2088
+
2089
+ /** Detect the popular CommonJS extension `module.exports`. */
2090
+ var moduleExports = freeModule && freeModule.exports === freeExports;
2091
+
2092
+ /** Built-in value references. */
2093
+ var Buffer = moduleExports ? root.Buffer : undefined,
2094
+ allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
2095
+
2096
+ /**
2097
+ * Creates a clone of `buffer`.
2098
+ *
2099
+ * @private
2100
+ * @param {Buffer} buffer The buffer to clone.
2101
+ * @param {boolean} [isDeep] Specify a deep clone.
2102
+ * @returns {Buffer} Returns the cloned buffer.
2103
+ */
2104
+ function cloneBuffer(buffer, isDeep) {
2105
+ if (isDeep) {
2106
+ return buffer.slice();
2107
+ }
2108
+ var length = buffer.length,
2109
+ result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
2110
+
2111
+ buffer.copy(result);
2112
+ return result;
2113
+ }
2114
+
2115
+ module.exports = cloneBuffer;
2116
+ }(_cloneBuffer, _cloneBuffer.exports));
2117
+
2118
+ /**
2119
+ * Copies the values of `source` to `array`.
2120
+ *
2121
+ * @private
2122
+ * @param {Array} source The array to copy values from.
2123
+ * @param {Array} [array=[]] The array to copy values to.
2124
+ * @returns {Array} Returns `array`.
2125
+ */
2126
+
2127
+ function copyArray$1(source, array) {
2128
+ var index = -1,
2129
+ length = source.length;
2130
+
2131
+ array || (array = Array(length));
2132
+ while (++index < length) {
2133
+ array[index] = source[index];
2134
+ }
2135
+ return array;
2136
+ }
2137
+
2138
+ var _copyArray = copyArray$1;
2139
+
2140
+ /**
2141
+ * A specialized version of `_.filter` for arrays without support for
2142
+ * iteratee shorthands.
2143
+ *
2144
+ * @private
2145
+ * @param {Array} [array] The array to iterate over.
2146
+ * @param {Function} predicate The function invoked per iteration.
2147
+ * @returns {Array} Returns the new filtered array.
2148
+ */
2149
+
2150
+ function arrayFilter$1(array, predicate) {
2151
+ var index = -1,
2152
+ length = array == null ? 0 : array.length,
2153
+ resIndex = 0,
2154
+ result = [];
2155
+
2156
+ while (++index < length) {
2157
+ var value = array[index];
2158
+ if (predicate(value, index, array)) {
2159
+ result[resIndex++] = value;
2160
+ }
2161
+ }
2162
+ return result;
2163
+ }
2164
+
2165
+ var _arrayFilter = arrayFilter$1;
2166
+
2167
+ /**
2168
+ * This method returns a new empty array.
2169
+ *
2170
+ * @static
2171
+ * @memberOf _
2172
+ * @since 4.13.0
2173
+ * @category Util
2174
+ * @returns {Array} Returns the new empty array.
2175
+ * @example
2176
+ *
2177
+ * var arrays = _.times(2, _.stubArray);
2178
+ *
2179
+ * console.log(arrays);
2180
+ * // => [[], []]
2181
+ *
2182
+ * console.log(arrays[0] === arrays[1]);
2183
+ * // => false
2184
+ */
2185
+
2186
+ function stubArray$2() {
2187
+ return [];
2188
+ }
2189
+
2190
+ var stubArray_1 = stubArray$2;
2191
+
2192
+ var arrayFilter = _arrayFilter,
2193
+ stubArray$1 = stubArray_1;
2194
+
2195
+ /** Used for built-in method references. */
2196
+ var objectProto$1 = Object.prototype;
2197
+
2198
+ /** Built-in value references. */
2199
+ var propertyIsEnumerable = objectProto$1.propertyIsEnumerable;
2200
+
2201
+ /* Built-in method references for those with the same name as other `lodash` methods. */
2202
+ var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
2203
+
2204
+ /**
2205
+ * Creates an array of the own enumerable symbols of `object`.
2206
+ *
2207
+ * @private
2208
+ * @param {Object} object The object to query.
2209
+ * @returns {Array} Returns the array of symbols.
2210
+ */
2211
+ var getSymbols$3 = !nativeGetSymbols$1 ? stubArray$1 : function(object) {
2212
+ if (object == null) {
2213
+ return [];
2214
+ }
2215
+ object = Object(object);
2216
+ return arrayFilter(nativeGetSymbols$1(object), function(symbol) {
2217
+ return propertyIsEnumerable.call(object, symbol);
2218
+ });
2219
+ };
2220
+
2221
+ var _getSymbols = getSymbols$3;
2222
+
2223
+ var copyObject$1 = _copyObject,
2224
+ getSymbols$2 = _getSymbols;
2225
+
2226
+ /**
2227
+ * Copies own symbols of `source` to `object`.
2228
+ *
2229
+ * @private
2230
+ * @param {Object} source The object to copy symbols from.
2231
+ * @param {Object} [object={}] The object to copy symbols to.
2232
+ * @returns {Object} Returns `object`.
2233
+ */
2234
+ function copySymbols$1(source, object) {
2235
+ return copyObject$1(source, getSymbols$2(source), object);
2236
+ }
2237
+
2238
+ var _copySymbols = copySymbols$1;
2239
+
2240
+ /**
2241
+ * Appends the elements of `values` to `array`.
2242
+ *
2243
+ * @private
2244
+ * @param {Array} array The array to modify.
2245
+ * @param {Array} values The values to append.
2246
+ * @returns {Array} Returns `array`.
2247
+ */
2248
+
2249
+ function arrayPush$2(array, values) {
2250
+ var index = -1,
2251
+ length = values.length,
2252
+ offset = array.length;
2253
+
2254
+ while (++index < length) {
2255
+ array[offset + index] = values[index];
2256
+ }
2257
+ return array;
2258
+ }
2259
+
2260
+ var _arrayPush = arrayPush$2;
2261
+
2262
+ var overArg = _overArg;
2263
+
2264
+ /** Built-in value references. */
2265
+ var getPrototype$2 = overArg(Object.getPrototypeOf, Object);
2266
+
2267
+ var _getPrototype = getPrototype$2;
2268
+
2269
+ var arrayPush$1 = _arrayPush,
2270
+ getPrototype$1 = _getPrototype,
2271
+ getSymbols$1 = _getSymbols,
2272
+ stubArray = stubArray_1;
2273
+
2274
+ /* Built-in method references for those with the same name as other `lodash` methods. */
2275
+ var nativeGetSymbols = Object.getOwnPropertySymbols;
2276
+
2277
+ /**
2278
+ * Creates an array of the own and inherited enumerable symbols of `object`.
2279
+ *
2280
+ * @private
2281
+ * @param {Object} object The object to query.
2282
+ * @returns {Array} Returns the array of symbols.
2283
+ */
2284
+ var getSymbolsIn$2 = !nativeGetSymbols ? stubArray : function(object) {
2285
+ var result = [];
2286
+ while (object) {
2287
+ arrayPush$1(result, getSymbols$1(object));
2288
+ object = getPrototype$1(object);
2289
+ }
2290
+ return result;
2291
+ };
2292
+
2293
+ var _getSymbolsIn = getSymbolsIn$2;
2294
+
2295
+ var copyObject = _copyObject,
2296
+ getSymbolsIn$1 = _getSymbolsIn;
2297
+
2298
+ /**
2299
+ * Copies own and inherited symbols of `source` to `object`.
2300
+ *
2301
+ * @private
2302
+ * @param {Object} source The object to copy symbols from.
2303
+ * @param {Object} [object={}] The object to copy symbols to.
2304
+ * @returns {Object} Returns `object`.
2305
+ */
2306
+ function copySymbolsIn$1(source, object) {
2307
+ return copyObject(source, getSymbolsIn$1(source), object);
2308
+ }
2309
+
2310
+ var _copySymbolsIn = copySymbolsIn$1;
2311
+
2312
+ var arrayPush = _arrayPush,
2313
+ isArray$1 = isArray_1;
2314
+
2315
+ /**
2316
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
2317
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
2318
+ * symbols of `object`.
2319
+ *
2320
+ * @private
2321
+ * @param {Object} object The object to query.
2322
+ * @param {Function} keysFunc The function to get the keys of `object`.
2323
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
2324
+ * @returns {Array} Returns the array of property names and symbols.
2325
+ */
2326
+ function baseGetAllKeys$2(object, keysFunc, symbolsFunc) {
2327
+ var result = keysFunc(object);
2328
+ return isArray$1(object) ? result : arrayPush(result, symbolsFunc(object));
2329
+ }
2330
+
2331
+ var _baseGetAllKeys = baseGetAllKeys$2;
2332
+
2333
+ var baseGetAllKeys$1 = _baseGetAllKeys,
2334
+ getSymbols = _getSymbols,
2335
+ keys$1 = keys_1;
2336
+
2337
+ /**
2338
+ * Creates an array of own enumerable property names and symbols of `object`.
2339
+ *
2340
+ * @private
2341
+ * @param {Object} object The object to query.
2342
+ * @returns {Array} Returns the array of property names and symbols.
2343
+ */
2344
+ function getAllKeys$1(object) {
2345
+ return baseGetAllKeys$1(object, keys$1, getSymbols);
2346
+ }
2347
+
2348
+ var _getAllKeys = getAllKeys$1;
2349
+
2350
+ var baseGetAllKeys = _baseGetAllKeys,
2351
+ getSymbolsIn = _getSymbolsIn,
2352
+ keysIn$1 = keysIn_1;
2353
+
2354
+ /**
2355
+ * Creates an array of own and inherited enumerable property names and
2356
+ * symbols of `object`.
2357
+ *
2358
+ * @private
2359
+ * @param {Object} object The object to query.
2360
+ * @returns {Array} Returns the array of property names and symbols.
2361
+ */
2362
+ function getAllKeysIn$1(object) {
2363
+ return baseGetAllKeys(object, keysIn$1, getSymbolsIn);
2364
+ }
2365
+
2366
+ var _getAllKeysIn = getAllKeysIn$1;
2367
+
2368
+ var getNative$3 = _getNative,
2369
+ root$4 = _root;
2370
+
2371
+ /* Built-in method references that are verified to be native. */
2372
+ var DataView$1 = getNative$3(root$4, 'DataView');
2373
+
2374
+ var _DataView = DataView$1;
2375
+
2376
+ var getNative$2 = _getNative,
2377
+ root$3 = _root;
2378
+
2379
+ /* Built-in method references that are verified to be native. */
2380
+ var Promise$2 = getNative$2(root$3, 'Promise');
2381
+
2382
+ var _Promise = Promise$2;
2383
+
2384
+ var getNative$1 = _getNative,
2385
+ root$2 = _root;
2386
+
2387
+ /* Built-in method references that are verified to be native. */
2388
+ var Set$1 = getNative$1(root$2, 'Set');
2389
+
2390
+ var _Set = Set$1;
2391
+
2392
+ var getNative = _getNative,
2393
+ root$1 = _root;
2394
+
2395
+ /* Built-in method references that are verified to be native. */
2396
+ var WeakMap$1 = getNative(root$1, 'WeakMap');
2397
+
2398
+ var _WeakMap = WeakMap$1;
2399
+
2400
+ var DataView = _DataView,
2401
+ Map = _Map,
2402
+ Promise$1 = _Promise,
2403
+ Set = _Set,
2404
+ WeakMap = _WeakMap,
2405
+ baseGetTag = _baseGetTag,
2406
+ toSource = _toSource;
2407
+
2408
+ /** `Object#toString` result references. */
2409
+ var mapTag$3 = '[object Map]',
2410
+ objectTag$1 = '[object Object]',
2411
+ promiseTag = '[object Promise]',
2412
+ setTag$3 = '[object Set]',
2413
+ weakMapTag$1 = '[object WeakMap]';
2414
+
2415
+ var dataViewTag$2 = '[object DataView]';
2416
+
2417
+ /** Used to detect maps, sets, and weakmaps. */
2418
+ var dataViewCtorString = toSource(DataView),
2419
+ mapCtorString = toSource(Map),
2420
+ promiseCtorString = toSource(Promise$1),
2421
+ setCtorString = toSource(Set),
2422
+ weakMapCtorString = toSource(WeakMap);
2423
+
2424
+ /**
2425
+ * Gets the `toStringTag` of `value`.
2426
+ *
2427
+ * @private
2428
+ * @param {*} value The value to query.
2429
+ * @returns {string} Returns the `toStringTag`.
2430
+ */
2431
+ var getTag$3 = baseGetTag;
2432
+
2433
+ // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
2434
+ if ((DataView && getTag$3(new DataView(new ArrayBuffer(1))) != dataViewTag$2) ||
2435
+ (Map && getTag$3(new Map) != mapTag$3) ||
2436
+ (Promise$1 && getTag$3(Promise$1.resolve()) != promiseTag) ||
2437
+ (Set && getTag$3(new Set) != setTag$3) ||
2438
+ (WeakMap && getTag$3(new WeakMap) != weakMapTag$1)) {
2439
+ getTag$3 = function(value) {
2440
+ var result = baseGetTag(value),
2441
+ Ctor = result == objectTag$1 ? value.constructor : undefined,
2442
+ ctorString = Ctor ? toSource(Ctor) : '';
2443
+
2444
+ if (ctorString) {
2445
+ switch (ctorString) {
2446
+ case dataViewCtorString: return dataViewTag$2;
2447
+ case mapCtorString: return mapTag$3;
2448
+ case promiseCtorString: return promiseTag;
2449
+ case setCtorString: return setTag$3;
2450
+ case weakMapCtorString: return weakMapTag$1;
2451
+ }
2452
+ }
2453
+ return result;
2454
+ };
2455
+ }
2456
+
2457
+ var _getTag = getTag$3;
2458
+
2459
+ /** Used for built-in method references. */
2460
+
2461
+ var objectProto = Object.prototype;
2462
+
2463
+ /** Used to check objects for own properties. */
2464
+ var hasOwnProperty = objectProto.hasOwnProperty;
2465
+
2466
+ /**
2467
+ * Initializes an array clone.
2468
+ *
2469
+ * @private
2470
+ * @param {Array} array The array to clone.
2471
+ * @returns {Array} Returns the initialized clone.
2472
+ */
2473
+ function initCloneArray$1(array) {
2474
+ var length = array.length,
2475
+ result = new array.constructor(length);
2476
+
2477
+ // Add properties assigned by `RegExp#exec`.
2478
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
2479
+ result.index = array.index;
2480
+ result.input = array.input;
2481
+ }
2482
+ return result;
2483
+ }
2484
+
2485
+ var _initCloneArray = initCloneArray$1;
2486
+
2487
+ var root = _root;
2488
+
2489
+ /** Built-in value references. */
2490
+ var Uint8Array$1 = root.Uint8Array;
2491
+
2492
+ var _Uint8Array = Uint8Array$1;
2493
+
2494
+ var Uint8Array = _Uint8Array;
2495
+
2496
+ /**
2497
+ * Creates a clone of `arrayBuffer`.
2498
+ *
2499
+ * @private
2500
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
2501
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
2502
+ */
2503
+ function cloneArrayBuffer$3(arrayBuffer) {
2504
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
2505
+ new Uint8Array(result).set(new Uint8Array(arrayBuffer));
2506
+ return result;
2507
+ }
2508
+
2509
+ var _cloneArrayBuffer = cloneArrayBuffer$3;
2510
+
2511
+ var cloneArrayBuffer$2 = _cloneArrayBuffer;
2512
+
2513
+ /**
2514
+ * Creates a clone of `dataView`.
2515
+ *
2516
+ * @private
2517
+ * @param {Object} dataView The data view to clone.
2518
+ * @param {boolean} [isDeep] Specify a deep clone.
2519
+ * @returns {Object} Returns the cloned data view.
2520
+ */
2521
+ function cloneDataView$1(dataView, isDeep) {
2522
+ var buffer = isDeep ? cloneArrayBuffer$2(dataView.buffer) : dataView.buffer;
2523
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
2524
+ }
2525
+
2526
+ var _cloneDataView = cloneDataView$1;
2527
+
2528
+ /** Used to match `RegExp` flags from their coerced string values. */
2529
+
2530
+ var reFlags = /\w*$/;
2531
+
2532
+ /**
2533
+ * Creates a clone of `regexp`.
2534
+ *
2535
+ * @private
2536
+ * @param {Object} regexp The regexp to clone.
2537
+ * @returns {Object} Returns the cloned regexp.
2538
+ */
2539
+ function cloneRegExp$1(regexp) {
2540
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
2541
+ result.lastIndex = regexp.lastIndex;
2542
+ return result;
2543
+ }
2544
+
2545
+ var _cloneRegExp = cloneRegExp$1;
2546
+
2547
+ var Symbol = _Symbol;
2548
+
2549
+ /** Used to convert symbols to primitives and strings. */
2550
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
2551
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
2552
+
2553
+ /**
2554
+ * Creates a clone of the `symbol` object.
2555
+ *
2556
+ * @private
2557
+ * @param {Object} symbol The symbol object to clone.
2558
+ * @returns {Object} Returns the cloned symbol object.
2559
+ */
2560
+ function cloneSymbol$1(symbol) {
2561
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
2562
+ }
2563
+
2564
+ var _cloneSymbol = cloneSymbol$1;
2565
+
2566
+ var cloneArrayBuffer$1 = _cloneArrayBuffer;
2567
+
2568
+ /**
2569
+ * Creates a clone of `typedArray`.
2570
+ *
2571
+ * @private
2572
+ * @param {Object} typedArray The typed array to clone.
2573
+ * @param {boolean} [isDeep] Specify a deep clone.
2574
+ * @returns {Object} Returns the cloned typed array.
2575
+ */
2576
+ function cloneTypedArray$1(typedArray, isDeep) {
2577
+ var buffer = isDeep ? cloneArrayBuffer$1(typedArray.buffer) : typedArray.buffer;
2578
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
2579
+ }
2580
+
2581
+ var _cloneTypedArray = cloneTypedArray$1;
2582
+
2583
+ var cloneArrayBuffer = _cloneArrayBuffer,
2584
+ cloneDataView = _cloneDataView,
2585
+ cloneRegExp = _cloneRegExp,
2586
+ cloneSymbol = _cloneSymbol,
2587
+ cloneTypedArray = _cloneTypedArray;
2588
+
2589
+ /** `Object#toString` result references. */
2590
+ var boolTag$1 = '[object Boolean]',
2591
+ dateTag$1 = '[object Date]',
2592
+ mapTag$2 = '[object Map]',
2593
+ numberTag$1 = '[object Number]',
2594
+ regexpTag$1 = '[object RegExp]',
2595
+ setTag$2 = '[object Set]',
2596
+ stringTag$1 = '[object String]',
2597
+ symbolTag$1 = '[object Symbol]';
2598
+
2599
+ var arrayBufferTag$1 = '[object ArrayBuffer]',
2600
+ dataViewTag$1 = '[object DataView]',
2601
+ float32Tag$1 = '[object Float32Array]',
2602
+ float64Tag$1 = '[object Float64Array]',
2603
+ int8Tag$1 = '[object Int8Array]',
2604
+ int16Tag$1 = '[object Int16Array]',
2605
+ int32Tag$1 = '[object Int32Array]',
2606
+ uint8Tag$1 = '[object Uint8Array]',
2607
+ uint8ClampedTag$1 = '[object Uint8ClampedArray]',
2608
+ uint16Tag$1 = '[object Uint16Array]',
2609
+ uint32Tag$1 = '[object Uint32Array]';
2610
+
2611
+ /**
2612
+ * Initializes an object clone based on its `toStringTag`.
2613
+ *
2614
+ * **Note:** This function only supports cloning values with tags of
2615
+ * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
2616
+ *
2617
+ * @private
2618
+ * @param {Object} object The object to clone.
2619
+ * @param {string} tag The `toStringTag` of the object to clone.
2620
+ * @param {boolean} [isDeep] Specify a deep clone.
2621
+ * @returns {Object} Returns the initialized clone.
2622
+ */
2623
+ function initCloneByTag$1(object, tag, isDeep) {
2624
+ var Ctor = object.constructor;
2625
+ switch (tag) {
2626
+ case arrayBufferTag$1:
2627
+ return cloneArrayBuffer(object);
2628
+
2629
+ case boolTag$1:
2630
+ case dateTag$1:
2631
+ return new Ctor(+object);
2632
+
2633
+ case dataViewTag$1:
2634
+ return cloneDataView(object, isDeep);
2635
+
2636
+ case float32Tag$1: case float64Tag$1:
2637
+ case int8Tag$1: case int16Tag$1: case int32Tag$1:
2638
+ case uint8Tag$1: case uint8ClampedTag$1: case uint16Tag$1: case uint32Tag$1:
2639
+ return cloneTypedArray(object, isDeep);
2640
+
2641
+ case mapTag$2:
2642
+ return new Ctor;
2643
+
2644
+ case numberTag$1:
2645
+ case stringTag$1:
2646
+ return new Ctor(object);
2647
+
2648
+ case regexpTag$1:
2649
+ return cloneRegExp(object);
2650
+
2651
+ case setTag$2:
2652
+ return new Ctor;
2653
+
2654
+ case symbolTag$1:
2655
+ return cloneSymbol(object);
2656
+ }
2657
+ }
2658
+
2659
+ var _initCloneByTag = initCloneByTag$1;
2660
+
2661
+ var isObject$1 = isObject_1;
2662
+
2663
+ /** Built-in value references. */
2664
+ var objectCreate = Object.create;
2665
+
2666
+ /**
2667
+ * The base implementation of `_.create` without support for assigning
2668
+ * properties to the created object.
2669
+ *
2670
+ * @private
2671
+ * @param {Object} proto The object to inherit from.
2672
+ * @returns {Object} Returns the new object.
2673
+ */
2674
+ var baseCreate$1 = (function() {
2675
+ function object() {}
2676
+ return function(proto) {
2677
+ if (!isObject$1(proto)) {
2678
+ return {};
2679
+ }
2680
+ if (objectCreate) {
2681
+ return objectCreate(proto);
2682
+ }
2683
+ object.prototype = proto;
2684
+ var result = new object;
2685
+ object.prototype = undefined;
2686
+ return result;
2687
+ };
2688
+ }());
2689
+
2690
+ var _baseCreate = baseCreate$1;
2691
+
2692
+ var baseCreate = _baseCreate,
2693
+ getPrototype = _getPrototype,
2694
+ isPrototype = _isPrototype;
2695
+
2696
+ /**
2697
+ * Initializes an object clone.
2698
+ *
2699
+ * @private
2700
+ * @param {Object} object The object to clone.
2701
+ * @returns {Object} Returns the initialized clone.
2702
+ */
2703
+ function initCloneObject$1(object) {
2704
+ return (typeof object.constructor == 'function' && !isPrototype(object))
2705
+ ? baseCreate(getPrototype(object))
2706
+ : {};
2707
+ }
2708
+
2709
+ var _initCloneObject = initCloneObject$1;
2710
+
2711
+ var getTag$2 = _getTag,
2712
+ isObjectLike$1 = isObjectLike_1;
2713
+
2714
+ /** `Object#toString` result references. */
2715
+ var mapTag$1 = '[object Map]';
2716
+
2717
+ /**
2718
+ * The base implementation of `_.isMap` without Node.js optimizations.
2719
+ *
2720
+ * @private
2721
+ * @param {*} value The value to check.
2722
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
2723
+ */
2724
+ function baseIsMap$1(value) {
2725
+ return isObjectLike$1(value) && getTag$2(value) == mapTag$1;
2726
+ }
2727
+
2728
+ var _baseIsMap = baseIsMap$1;
2729
+
2730
+ var baseIsMap = _baseIsMap,
2731
+ baseUnary$1 = _baseUnary,
2732
+ nodeUtil$1 = _nodeUtil.exports;
2733
+
2734
+ /* Node.js helper references. */
2735
+ var nodeIsMap = nodeUtil$1 && nodeUtil$1.isMap;
2736
+
2737
+ /**
2738
+ * Checks if `value` is classified as a `Map` object.
2739
+ *
2740
+ * @static
2741
+ * @memberOf _
2742
+ * @since 4.3.0
2743
+ * @category Lang
2744
+ * @param {*} value The value to check.
2745
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
2746
+ * @example
2747
+ *
2748
+ * _.isMap(new Map);
2749
+ * // => true
2750
+ *
2751
+ * _.isMap(new WeakMap);
2752
+ * // => false
2753
+ */
2754
+ var isMap$1 = nodeIsMap ? baseUnary$1(nodeIsMap) : baseIsMap;
2755
+
2756
+ var isMap_1 = isMap$1;
2757
+
2758
+ var getTag$1 = _getTag,
2759
+ isObjectLike = isObjectLike_1;
2760
+
2761
+ /** `Object#toString` result references. */
2762
+ var setTag$1 = '[object Set]';
2763
+
2764
+ /**
2765
+ * The base implementation of `_.isSet` without Node.js optimizations.
2766
+ *
2767
+ * @private
2768
+ * @param {*} value The value to check.
2769
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
2770
+ */
2771
+ function baseIsSet$1(value) {
2772
+ return isObjectLike(value) && getTag$1(value) == setTag$1;
2773
+ }
2774
+
2775
+ var _baseIsSet = baseIsSet$1;
2776
+
2777
+ var baseIsSet = _baseIsSet,
2778
+ baseUnary = _baseUnary,
2779
+ nodeUtil = _nodeUtil.exports;
2780
+
2781
+ /* Node.js helper references. */
2782
+ var nodeIsSet = nodeUtil && nodeUtil.isSet;
2783
+
2784
+ /**
2785
+ * Checks if `value` is classified as a `Set` object.
2786
+ *
2787
+ * @static
2788
+ * @memberOf _
2789
+ * @since 4.3.0
2790
+ * @category Lang
2791
+ * @param {*} value The value to check.
2792
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
2793
+ * @example
2794
+ *
2795
+ * _.isSet(new Set);
2796
+ * // => true
2797
+ *
2798
+ * _.isSet(new WeakSet);
2799
+ * // => false
2800
+ */
2801
+ var isSet$1 = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
2802
+
2803
+ var isSet_1 = isSet$1;
2804
+
2805
+ var Stack = _Stack,
2806
+ arrayEach = _arrayEach,
2807
+ assignValue = _assignValue,
2808
+ baseAssign = _baseAssign,
2809
+ baseAssignIn = _baseAssignIn,
2810
+ cloneBuffer = _cloneBuffer.exports,
2811
+ copyArray = _copyArray,
2812
+ copySymbols = _copySymbols,
2813
+ copySymbolsIn = _copySymbolsIn,
2814
+ getAllKeys = _getAllKeys,
2815
+ getAllKeysIn = _getAllKeysIn,
2816
+ getTag = _getTag,
2817
+ initCloneArray = _initCloneArray,
2818
+ initCloneByTag = _initCloneByTag,
2819
+ initCloneObject = _initCloneObject,
2820
+ isArray = isArray_1,
2821
+ isBuffer = isBuffer$2.exports,
2822
+ isMap = isMap_1,
2823
+ isObject = isObject_1,
2824
+ isSet = isSet_1,
2825
+ keys = keys_1,
2826
+ keysIn = keysIn_1;
2827
+
2828
+ /** Used to compose bitmasks for cloning. */
2829
+ var CLONE_DEEP_FLAG$1 = 1,
2830
+ CLONE_FLAT_FLAG = 2,
2831
+ CLONE_SYMBOLS_FLAG$1 = 4;
2832
+
2833
+ /** `Object#toString` result references. */
2834
+ var argsTag = '[object Arguments]',
2835
+ arrayTag = '[object Array]',
2836
+ boolTag = '[object Boolean]',
2837
+ dateTag = '[object Date]',
2838
+ errorTag = '[object Error]',
2839
+ funcTag = '[object Function]',
2840
+ genTag = '[object GeneratorFunction]',
2841
+ mapTag = '[object Map]',
2842
+ numberTag = '[object Number]',
2843
+ objectTag = '[object Object]',
2844
+ regexpTag = '[object RegExp]',
2845
+ setTag = '[object Set]',
2846
+ stringTag = '[object String]',
2847
+ symbolTag = '[object Symbol]',
2848
+ weakMapTag = '[object WeakMap]';
2849
+
2850
+ var arrayBufferTag = '[object ArrayBuffer]',
2851
+ dataViewTag = '[object DataView]',
2852
+ float32Tag = '[object Float32Array]',
2853
+ float64Tag = '[object Float64Array]',
2854
+ int8Tag = '[object Int8Array]',
2855
+ int16Tag = '[object Int16Array]',
2856
+ int32Tag = '[object Int32Array]',
2857
+ uint8Tag = '[object Uint8Array]',
2858
+ uint8ClampedTag = '[object Uint8ClampedArray]',
2859
+ uint16Tag = '[object Uint16Array]',
2860
+ uint32Tag = '[object Uint32Array]';
2861
+
2862
+ /** Used to identify `toStringTag` values supported by `_.clone`. */
2863
+ var cloneableTags = {};
2864
+ cloneableTags[argsTag] = cloneableTags[arrayTag] =
2865
+ cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
2866
+ cloneableTags[boolTag] = cloneableTags[dateTag] =
2867
+ cloneableTags[float32Tag] = cloneableTags[float64Tag] =
2868
+ cloneableTags[int8Tag] = cloneableTags[int16Tag] =
2869
+ cloneableTags[int32Tag] = cloneableTags[mapTag] =
2870
+ cloneableTags[numberTag] = cloneableTags[objectTag] =
2871
+ cloneableTags[regexpTag] = cloneableTags[setTag] =
2872
+ cloneableTags[stringTag] = cloneableTags[symbolTag] =
2873
+ cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
2874
+ cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
2875
+ cloneableTags[errorTag] = cloneableTags[funcTag] =
2876
+ cloneableTags[weakMapTag] = false;
2877
+
2878
+ /**
2879
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
2880
+ * traversed objects.
2881
+ *
2882
+ * @private
2883
+ * @param {*} value The value to clone.
2884
+ * @param {boolean} bitmask The bitmask flags.
2885
+ * 1 - Deep clone
2886
+ * 2 - Flatten inherited properties
2887
+ * 4 - Clone symbols
2888
+ * @param {Function} [customizer] The function to customize cloning.
2889
+ * @param {string} [key] The key of `value`.
2890
+ * @param {Object} [object] The parent object of `value`.
2891
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
2892
+ * @returns {*} Returns the cloned value.
2893
+ */
2894
+ function baseClone$1(value, bitmask, customizer, key, object, stack) {
2895
+ var result,
2896
+ isDeep = bitmask & CLONE_DEEP_FLAG$1,
2897
+ isFlat = bitmask & CLONE_FLAT_FLAG,
2898
+ isFull = bitmask & CLONE_SYMBOLS_FLAG$1;
2899
+
2900
+ if (customizer) {
2901
+ result = object ? customizer(value, key, object, stack) : customizer(value);
2902
+ }
2903
+ if (result !== undefined) {
2904
+ return result;
2905
+ }
2906
+ if (!isObject(value)) {
2907
+ return value;
2908
+ }
2909
+ var isArr = isArray(value);
2910
+ if (isArr) {
2911
+ result = initCloneArray(value);
2912
+ if (!isDeep) {
2913
+ return copyArray(value, result);
2914
+ }
2915
+ } else {
2916
+ var tag = getTag(value),
2917
+ isFunc = tag == funcTag || tag == genTag;
2918
+
2919
+ if (isBuffer(value)) {
2920
+ return cloneBuffer(value, isDeep);
2921
+ }
2922
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
2923
+ result = (isFlat || isFunc) ? {} : initCloneObject(value);
2924
+ if (!isDeep) {
2925
+ return isFlat
2926
+ ? copySymbolsIn(value, baseAssignIn(result, value))
2927
+ : copySymbols(value, baseAssign(result, value));
2928
+ }
2929
+ } else {
2930
+ if (!cloneableTags[tag]) {
2931
+ return object ? value : {};
2932
+ }
2933
+ result = initCloneByTag(value, tag, isDeep);
2934
+ }
2935
+ }
2936
+ // Check for circular references and return its corresponding clone.
2937
+ stack || (stack = new Stack);
2938
+ var stacked = stack.get(value);
2939
+ if (stacked) {
2940
+ return stacked;
2941
+ }
2942
+ stack.set(value, result);
2943
+
2944
+ if (isSet(value)) {
2945
+ value.forEach(function(subValue) {
2946
+ result.add(baseClone$1(subValue, bitmask, customizer, subValue, value, stack));
2947
+ });
2948
+ } else if (isMap(value)) {
2949
+ value.forEach(function(subValue, key) {
2950
+ result.set(key, baseClone$1(subValue, bitmask, customizer, key, value, stack));
2951
+ });
2952
+ }
2953
+
2954
+ var keysFunc = isFull
2955
+ ? (isFlat ? getAllKeysIn : getAllKeys)
2956
+ : (isFlat ? keysIn : keys);
2957
+
2958
+ var props = isArr ? undefined : keysFunc(value);
2959
+ arrayEach(props || value, function(subValue, key) {
2960
+ if (props) {
2961
+ key = subValue;
2962
+ subValue = value[key];
2963
+ }
2964
+ // Recursively populate clone (susceptible to call stack limits).
2965
+ assignValue(result, key, baseClone$1(subValue, bitmask, customizer, key, value, stack));
2966
+ });
2967
+ return result;
2968
+ }
2969
+
2970
+ var _baseClone = baseClone$1;
2971
+
2972
+ var baseClone = _baseClone;
2973
+
2974
+ /** Used to compose bitmasks for cloning. */
2975
+ var CLONE_DEEP_FLAG = 1,
2976
+ CLONE_SYMBOLS_FLAG = 4;
2977
+
2978
+ /**
2979
+ * This method is like `_.clone` except that it recursively clones `value`.
2980
+ *
2981
+ * @static
2982
+ * @memberOf _
2983
+ * @since 1.0.0
2984
+ * @category Lang
2985
+ * @param {*} value The value to recursively clone.
2986
+ * @returns {*} Returns the deep cloned value.
2987
+ * @see _.clone
2988
+ * @example
2989
+ *
2990
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
2991
+ *
2992
+ * var deep = _.cloneDeep(objects);
2993
+ * console.log(deep[0] === objects[0]);
2994
+ * // => false
2995
+ */
2996
+ function cloneDeep(value) {
2997
+ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
2998
+ }
2999
+
3000
+ var cloneDeep_1 = cloneDeep;
3001
+
204
3002
  var stringifyAttributes = ((attributes = {}) => Object.entries(attributes).map(([key, value], idx) => `${idx !== 0 ? ' ' : ''}${key}${value ? `="${value}"` : ''}`).join(' '));
205
3003
 
206
3004
  /* eslint-disable no-console */
@@ -459,7 +3257,16 @@ const webApp = (app, ReactApp, config) => {
459
3257
  // code-split bundles for any page components as well as core app bundles
460
3258
 
461
3259
  const bundleTags = getBundleTags(loadableExtractor, scripts, staticRoutePath);
462
- let serialisedReduxData = serialize(reduxState);
3260
+ let serialisedReduxData = serialize(buildCleaner({
3261
+ isArray: identity,
3262
+ isBoolean: identity,
3263
+ isDate: identity,
3264
+ isFunction: noop,
3265
+ isNull: identity,
3266
+ isPlainObject: identity,
3267
+ isString: identity,
3268
+ isUndefined: noop
3269
+ })(cloneDeep_1(reduxState)));
463
3270
 
464
3271
  if (context.statusCode !== 404) {
465
3272
  // For a request that returns a redux state object as a response