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