@kne/react-pdf-sign 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/index.js +175 -1809
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +174 -1809
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -301,260 +301,6 @@ const LocationLayer = withLocale(p => {
|
|
|
301
301
|
});
|
|
302
302
|
});
|
|
303
303
|
|
|
304
|
-
/**
|
|
305
|
-
* Removes all key-value entries from the list cache.
|
|
306
|
-
*
|
|
307
|
-
* @private
|
|
308
|
-
* @name clear
|
|
309
|
-
* @memberOf ListCache
|
|
310
|
-
*/
|
|
311
|
-
function listCacheClear() {
|
|
312
|
-
this.__data__ = [];
|
|
313
|
-
this.size = 0;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
var _listCacheClear = listCacheClear;
|
|
317
|
-
|
|
318
|
-
/**
|
|
319
|
-
* Performs a
|
|
320
|
-
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
321
|
-
* comparison between two values to determine if they are equivalent.
|
|
322
|
-
*
|
|
323
|
-
* @static
|
|
324
|
-
* @memberOf _
|
|
325
|
-
* @since 4.0.0
|
|
326
|
-
* @category Lang
|
|
327
|
-
* @param {*} value The value to compare.
|
|
328
|
-
* @param {*} other The other value to compare.
|
|
329
|
-
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
330
|
-
* @example
|
|
331
|
-
*
|
|
332
|
-
* var object = { 'a': 1 };
|
|
333
|
-
* var other = { 'a': 1 };
|
|
334
|
-
*
|
|
335
|
-
* _.eq(object, object);
|
|
336
|
-
* // => true
|
|
337
|
-
*
|
|
338
|
-
* _.eq(object, other);
|
|
339
|
-
* // => false
|
|
340
|
-
*
|
|
341
|
-
* _.eq('a', 'a');
|
|
342
|
-
* // => true
|
|
343
|
-
*
|
|
344
|
-
* _.eq('a', Object('a'));
|
|
345
|
-
* // => false
|
|
346
|
-
*
|
|
347
|
-
* _.eq(NaN, NaN);
|
|
348
|
-
* // => true
|
|
349
|
-
*/
|
|
350
|
-
function eq(value, other) {
|
|
351
|
-
return value === other || (value !== value && other !== other);
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
var eq_1 = eq;
|
|
355
|
-
|
|
356
|
-
/**
|
|
357
|
-
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
358
|
-
*
|
|
359
|
-
* @private
|
|
360
|
-
* @param {Array} array The array to inspect.
|
|
361
|
-
* @param {*} key The key to search for.
|
|
362
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
363
|
-
*/
|
|
364
|
-
function assocIndexOf(array, key) {
|
|
365
|
-
var length = array.length;
|
|
366
|
-
while (length--) {
|
|
367
|
-
if (eq_1(array[length][0], key)) {
|
|
368
|
-
return length;
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
return -1;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
var _assocIndexOf = assocIndexOf;
|
|
375
|
-
|
|
376
|
-
/** Used for built-in method references. */
|
|
377
|
-
var arrayProto = Array.prototype;
|
|
378
|
-
|
|
379
|
-
/** Built-in value references. */
|
|
380
|
-
var splice = arrayProto.splice;
|
|
381
|
-
|
|
382
|
-
/**
|
|
383
|
-
* Removes `key` and its value from the list cache.
|
|
384
|
-
*
|
|
385
|
-
* @private
|
|
386
|
-
* @name delete
|
|
387
|
-
* @memberOf ListCache
|
|
388
|
-
* @param {string} key The key of the value to remove.
|
|
389
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
390
|
-
*/
|
|
391
|
-
function listCacheDelete(key) {
|
|
392
|
-
var data = this.__data__,
|
|
393
|
-
index = _assocIndexOf(data, key);
|
|
394
|
-
|
|
395
|
-
if (index < 0) {
|
|
396
|
-
return false;
|
|
397
|
-
}
|
|
398
|
-
var lastIndex = data.length - 1;
|
|
399
|
-
if (index == lastIndex) {
|
|
400
|
-
data.pop();
|
|
401
|
-
} else {
|
|
402
|
-
splice.call(data, index, 1);
|
|
403
|
-
}
|
|
404
|
-
--this.size;
|
|
405
|
-
return true;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
var _listCacheDelete = listCacheDelete;
|
|
409
|
-
|
|
410
|
-
/**
|
|
411
|
-
* Gets the list cache value for `key`.
|
|
412
|
-
*
|
|
413
|
-
* @private
|
|
414
|
-
* @name get
|
|
415
|
-
* @memberOf ListCache
|
|
416
|
-
* @param {string} key The key of the value to get.
|
|
417
|
-
* @returns {*} Returns the entry value.
|
|
418
|
-
*/
|
|
419
|
-
function listCacheGet(key) {
|
|
420
|
-
var data = this.__data__,
|
|
421
|
-
index = _assocIndexOf(data, key);
|
|
422
|
-
|
|
423
|
-
return index < 0 ? undefined : data[index][1];
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
var _listCacheGet = listCacheGet;
|
|
427
|
-
|
|
428
|
-
/**
|
|
429
|
-
* Checks if a list cache value for `key` exists.
|
|
430
|
-
*
|
|
431
|
-
* @private
|
|
432
|
-
* @name has
|
|
433
|
-
* @memberOf ListCache
|
|
434
|
-
* @param {string} key The key of the entry to check.
|
|
435
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
436
|
-
*/
|
|
437
|
-
function listCacheHas(key) {
|
|
438
|
-
return _assocIndexOf(this.__data__, key) > -1;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
var _listCacheHas = listCacheHas;
|
|
442
|
-
|
|
443
|
-
/**
|
|
444
|
-
* Sets the list cache `key` to `value`.
|
|
445
|
-
*
|
|
446
|
-
* @private
|
|
447
|
-
* @name set
|
|
448
|
-
* @memberOf ListCache
|
|
449
|
-
* @param {string} key The key of the value to set.
|
|
450
|
-
* @param {*} value The value to set.
|
|
451
|
-
* @returns {Object} Returns the list cache instance.
|
|
452
|
-
*/
|
|
453
|
-
function listCacheSet(key, value) {
|
|
454
|
-
var data = this.__data__,
|
|
455
|
-
index = _assocIndexOf(data, key);
|
|
456
|
-
|
|
457
|
-
if (index < 0) {
|
|
458
|
-
++this.size;
|
|
459
|
-
data.push([key, value]);
|
|
460
|
-
} else {
|
|
461
|
-
data[index][1] = value;
|
|
462
|
-
}
|
|
463
|
-
return this;
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
var _listCacheSet = listCacheSet;
|
|
467
|
-
|
|
468
|
-
/**
|
|
469
|
-
* Creates an list cache object.
|
|
470
|
-
*
|
|
471
|
-
* @private
|
|
472
|
-
* @constructor
|
|
473
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
474
|
-
*/
|
|
475
|
-
function ListCache(entries) {
|
|
476
|
-
var index = -1,
|
|
477
|
-
length = entries == null ? 0 : entries.length;
|
|
478
|
-
|
|
479
|
-
this.clear();
|
|
480
|
-
while (++index < length) {
|
|
481
|
-
var entry = entries[index];
|
|
482
|
-
this.set(entry[0], entry[1]);
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
// Add methods to `ListCache`.
|
|
487
|
-
ListCache.prototype.clear = _listCacheClear;
|
|
488
|
-
ListCache.prototype['delete'] = _listCacheDelete;
|
|
489
|
-
ListCache.prototype.get = _listCacheGet;
|
|
490
|
-
ListCache.prototype.has = _listCacheHas;
|
|
491
|
-
ListCache.prototype.set = _listCacheSet;
|
|
492
|
-
|
|
493
|
-
var _ListCache = ListCache;
|
|
494
|
-
|
|
495
|
-
/**
|
|
496
|
-
* Removes all key-value entries from the stack.
|
|
497
|
-
*
|
|
498
|
-
* @private
|
|
499
|
-
* @name clear
|
|
500
|
-
* @memberOf Stack
|
|
501
|
-
*/
|
|
502
|
-
function stackClear() {
|
|
503
|
-
this.__data__ = new _ListCache;
|
|
504
|
-
this.size = 0;
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
var _stackClear = stackClear;
|
|
508
|
-
|
|
509
|
-
/**
|
|
510
|
-
* Removes `key` and its value from the stack.
|
|
511
|
-
*
|
|
512
|
-
* @private
|
|
513
|
-
* @name delete
|
|
514
|
-
* @memberOf Stack
|
|
515
|
-
* @param {string} key The key of the value to remove.
|
|
516
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
517
|
-
*/
|
|
518
|
-
function stackDelete(key) {
|
|
519
|
-
var data = this.__data__,
|
|
520
|
-
result = data['delete'](key);
|
|
521
|
-
|
|
522
|
-
this.size = data.size;
|
|
523
|
-
return result;
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
var _stackDelete = stackDelete;
|
|
527
|
-
|
|
528
|
-
/**
|
|
529
|
-
* Gets the stack value for `key`.
|
|
530
|
-
*
|
|
531
|
-
* @private
|
|
532
|
-
* @name get
|
|
533
|
-
* @memberOf Stack
|
|
534
|
-
* @param {string} key The key of the value to get.
|
|
535
|
-
* @returns {*} Returns the entry value.
|
|
536
|
-
*/
|
|
537
|
-
function stackGet(key) {
|
|
538
|
-
return this.__data__.get(key);
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
var _stackGet = stackGet;
|
|
542
|
-
|
|
543
|
-
/**
|
|
544
|
-
* Checks if a stack value for `key` exists.
|
|
545
|
-
*
|
|
546
|
-
* @private
|
|
547
|
-
* @name has
|
|
548
|
-
* @memberOf Stack
|
|
549
|
-
* @param {string} key The key of the entry to check.
|
|
550
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
551
|
-
*/
|
|
552
|
-
function stackHas(key) {
|
|
553
|
-
return this.__data__.has(key);
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
var _stackHas = stackHas;
|
|
557
|
-
|
|
558
304
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
559
305
|
|
|
560
306
|
function createCommonjsModule(fn) {
|
|
@@ -582,17 +328,17 @@ var Symbol = _root.Symbol;
|
|
|
582
328
|
var _Symbol = Symbol;
|
|
583
329
|
|
|
584
330
|
/** Used for built-in method references. */
|
|
585
|
-
var objectProto$
|
|
331
|
+
var objectProto$3 = Object.prototype;
|
|
586
332
|
|
|
587
333
|
/** Used to check objects for own properties. */
|
|
588
|
-
var hasOwnProperty$
|
|
334
|
+
var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
|
|
589
335
|
|
|
590
336
|
/**
|
|
591
337
|
* Used to resolve the
|
|
592
338
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
593
339
|
* of values.
|
|
594
340
|
*/
|
|
595
|
-
var nativeObjectToString$1 = objectProto$
|
|
341
|
+
var nativeObjectToString$1 = objectProto$3.toString;
|
|
596
342
|
|
|
597
343
|
/** Built-in value references. */
|
|
598
344
|
var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
|
|
@@ -605,7 +351,7 @@ var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
|
|
|
605
351
|
* @returns {string} Returns the raw `toStringTag`.
|
|
606
352
|
*/
|
|
607
353
|
function getRawTag(value) {
|
|
608
|
-
var isOwn = hasOwnProperty$
|
|
354
|
+
var isOwn = hasOwnProperty$2.call(value, symToStringTag$1),
|
|
609
355
|
tag = value[symToStringTag$1];
|
|
610
356
|
|
|
611
357
|
try {
|
|
@@ -627,14 +373,14 @@ function getRawTag(value) {
|
|
|
627
373
|
var _getRawTag = getRawTag;
|
|
628
374
|
|
|
629
375
|
/** Used for built-in method references. */
|
|
630
|
-
var objectProto$
|
|
376
|
+
var objectProto$2 = Object.prototype;
|
|
631
377
|
|
|
632
378
|
/**
|
|
633
379
|
* Used to resolve the
|
|
634
380
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
635
381
|
* of values.
|
|
636
382
|
*/
|
|
637
|
-
var nativeObjectToString = objectProto$
|
|
383
|
+
var nativeObjectToString = objectProto$2.toString;
|
|
638
384
|
|
|
639
385
|
/**
|
|
640
386
|
* Converts `value` to a string using `Object.prototype.toString`.
|
|
@@ -708,7 +454,7 @@ var isObject_1 = isObject;
|
|
|
708
454
|
|
|
709
455
|
/** `Object#toString` result references. */
|
|
710
456
|
var asyncTag = '[object AsyncFunction]',
|
|
711
|
-
funcTag
|
|
457
|
+
funcTag = '[object Function]',
|
|
712
458
|
genTag = '[object GeneratorFunction]',
|
|
713
459
|
proxyTag = '[object Proxy]';
|
|
714
460
|
|
|
@@ -736,7 +482,7 @@ function isFunction(value) {
|
|
|
736
482
|
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
737
483
|
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
738
484
|
var tag = _baseGetTag(value);
|
|
739
|
-
return tag == funcTag
|
|
485
|
+
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
740
486
|
}
|
|
741
487
|
|
|
742
488
|
var isFunction_1 = isFunction;
|
|
@@ -803,17 +549,17 @@ var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
|
803
549
|
|
|
804
550
|
/** Used for built-in method references. */
|
|
805
551
|
var funcProto = Function.prototype,
|
|
806
|
-
objectProto$
|
|
552
|
+
objectProto$1 = Object.prototype;
|
|
807
553
|
|
|
808
554
|
/** Used to resolve the decompiled source of functions. */
|
|
809
555
|
var funcToString = funcProto.toString;
|
|
810
556
|
|
|
811
557
|
/** Used to check objects for own properties. */
|
|
812
|
-
var hasOwnProperty$
|
|
558
|
+
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
813
559
|
|
|
814
560
|
/** Used to detect if a method is native. */
|
|
815
561
|
var reIsNative = RegExp('^' +
|
|
816
|
-
funcToString.call(hasOwnProperty$
|
|
562
|
+
funcToString.call(hasOwnProperty$1).replace(reRegExpChar, '\\$&')
|
|
817
563
|
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
818
564
|
);
|
|
819
565
|
|
|
@@ -870,1104 +616,144 @@ var Map = _getNative(_root, 'Map');
|
|
|
870
616
|
var _Map = Map;
|
|
871
617
|
|
|
872
618
|
/* Built-in method references that are verified to be native. */
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
var _nativeCreate = nativeCreate;
|
|
619
|
+
_getNative(Object, 'create');
|
|
876
620
|
|
|
877
621
|
/**
|
|
878
|
-
*
|
|
622
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
623
|
+
* and has a `typeof` result of "object".
|
|
879
624
|
*
|
|
880
|
-
* @
|
|
881
|
-
* @
|
|
882
|
-
* @
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
}
|
|
888
|
-
|
|
889
|
-
var _hashClear = hashClear;
|
|
890
|
-
|
|
891
|
-
/**
|
|
892
|
-
* Removes `key` and its value from the hash.
|
|
625
|
+
* @static
|
|
626
|
+
* @memberOf _
|
|
627
|
+
* @since 4.0.0
|
|
628
|
+
* @category Lang
|
|
629
|
+
* @param {*} value The value to check.
|
|
630
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
631
|
+
* @example
|
|
893
632
|
*
|
|
894
|
-
*
|
|
895
|
-
*
|
|
896
|
-
*
|
|
897
|
-
*
|
|
898
|
-
*
|
|
899
|
-
*
|
|
633
|
+
* _.isObjectLike({});
|
|
634
|
+
* // => true
|
|
635
|
+
*
|
|
636
|
+
* _.isObjectLike([1, 2, 3]);
|
|
637
|
+
* // => true
|
|
638
|
+
*
|
|
639
|
+
* _.isObjectLike(_.noop);
|
|
640
|
+
* // => false
|
|
641
|
+
*
|
|
642
|
+
* _.isObjectLike(null);
|
|
643
|
+
* // => false
|
|
900
644
|
*/
|
|
901
|
-
function
|
|
902
|
-
|
|
903
|
-
this.size -= result ? 1 : 0;
|
|
904
|
-
return result;
|
|
645
|
+
function isObjectLike(value) {
|
|
646
|
+
return value != null && typeof value == 'object';
|
|
905
647
|
}
|
|
906
648
|
|
|
907
|
-
var
|
|
908
|
-
|
|
909
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
910
|
-
var HASH_UNDEFINED$2 = '__lodash_hash_undefined__';
|
|
911
|
-
|
|
912
|
-
/** Used for built-in method references. */
|
|
913
|
-
var objectProto$8 = Object.prototype;
|
|
649
|
+
var isObjectLike_1 = isObjectLike;
|
|
914
650
|
|
|
915
|
-
/**
|
|
916
|
-
var
|
|
651
|
+
/** `Object#toString` result references. */
|
|
652
|
+
var argsTag = '[object Arguments]';
|
|
917
653
|
|
|
918
654
|
/**
|
|
919
|
-
*
|
|
655
|
+
* The base implementation of `_.isArguments`.
|
|
920
656
|
*
|
|
921
657
|
* @private
|
|
922
|
-
* @
|
|
923
|
-
* @
|
|
924
|
-
* @param {string} key The key of the value to get.
|
|
925
|
-
* @returns {*} Returns the entry value.
|
|
658
|
+
* @param {*} value The value to check.
|
|
659
|
+
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
926
660
|
*/
|
|
927
|
-
function
|
|
928
|
-
|
|
929
|
-
if (_nativeCreate) {
|
|
930
|
-
var result = data[key];
|
|
931
|
-
return result === HASH_UNDEFINED$2 ? undefined : result;
|
|
932
|
-
}
|
|
933
|
-
return hasOwnProperty$6.call(data, key) ? data[key] : undefined;
|
|
661
|
+
function baseIsArguments(value) {
|
|
662
|
+
return isObjectLike_1(value) && _baseGetTag(value) == argsTag;
|
|
934
663
|
}
|
|
935
664
|
|
|
936
|
-
var
|
|
665
|
+
var _baseIsArguments = baseIsArguments;
|
|
937
666
|
|
|
938
667
|
/** Used for built-in method references. */
|
|
939
|
-
var objectProto
|
|
668
|
+
var objectProto = Object.prototype;
|
|
940
669
|
|
|
941
670
|
/** Used to check objects for own properties. */
|
|
942
|
-
var hasOwnProperty
|
|
671
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
672
|
+
|
|
673
|
+
/** Built-in value references. */
|
|
674
|
+
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
943
675
|
|
|
944
676
|
/**
|
|
945
|
-
* Checks if
|
|
677
|
+
* Checks if `value` is likely an `arguments` object.
|
|
946
678
|
*
|
|
947
|
-
* @
|
|
948
|
-
* @
|
|
949
|
-
* @
|
|
950
|
-
* @
|
|
951
|
-
* @
|
|
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 an `arguments` object,
|
|
685
|
+
* else `false`.
|
|
686
|
+
* @example
|
|
687
|
+
*
|
|
688
|
+
* _.isArguments(function() { return arguments; }());
|
|
689
|
+
* // => true
|
|
690
|
+
*
|
|
691
|
+
* _.isArguments([1, 2, 3]);
|
|
692
|
+
* // => false
|
|
952
693
|
*/
|
|
953
|
-
function
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
}
|
|
957
|
-
|
|
958
|
-
var _hashHas = hashHas;
|
|
959
|
-
|
|
960
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
961
|
-
var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
|
|
694
|
+
_baseIsArguments(function() { return arguments; }()) ? _baseIsArguments : function(value) {
|
|
695
|
+
return isObjectLike_1(value) && hasOwnProperty.call(value, 'callee') &&
|
|
696
|
+
!propertyIsEnumerable.call(value, 'callee');
|
|
697
|
+
};
|
|
962
698
|
|
|
963
699
|
/**
|
|
964
|
-
*
|
|
700
|
+
* This method returns `false`.
|
|
965
701
|
*
|
|
966
|
-
* @
|
|
967
|
-
* @
|
|
968
|
-
* @
|
|
969
|
-
* @
|
|
970
|
-
* @
|
|
971
|
-
* @
|
|
702
|
+
* @static
|
|
703
|
+
* @memberOf _
|
|
704
|
+
* @since 4.13.0
|
|
705
|
+
* @category Util
|
|
706
|
+
* @returns {boolean} Returns `false`.
|
|
707
|
+
* @example
|
|
708
|
+
*
|
|
709
|
+
* _.times(2, _.stubFalse);
|
|
710
|
+
* // => [false, false]
|
|
972
711
|
*/
|
|
973
|
-
function
|
|
974
|
-
|
|
975
|
-
this.size += this.has(key) ? 0 : 1;
|
|
976
|
-
data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED$1 : value;
|
|
977
|
-
return this;
|
|
712
|
+
function stubFalse() {
|
|
713
|
+
return false;
|
|
978
714
|
}
|
|
979
715
|
|
|
980
|
-
var
|
|
716
|
+
var stubFalse_1 = stubFalse;
|
|
981
717
|
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
* @private
|
|
986
|
-
* @constructor
|
|
987
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
988
|
-
*/
|
|
989
|
-
function Hash(entries) {
|
|
990
|
-
var index = -1,
|
|
991
|
-
length = entries == null ? 0 : entries.length;
|
|
992
|
-
|
|
993
|
-
this.clear();
|
|
994
|
-
while (++index < length) {
|
|
995
|
-
var entry = entries[index];
|
|
996
|
-
this.set(entry[0], entry[1]);
|
|
997
|
-
}
|
|
998
|
-
}
|
|
718
|
+
createCommonjsModule(function (module, exports) {
|
|
719
|
+
/** Detect free variable `exports`. */
|
|
720
|
+
var freeExports = exports && !exports.nodeType && exports;
|
|
999
721
|
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
Hash.prototype['delete'] = _hashDelete;
|
|
1003
|
-
Hash.prototype.get = _hashGet;
|
|
1004
|
-
Hash.prototype.has = _hashHas;
|
|
1005
|
-
Hash.prototype.set = _hashSet;
|
|
722
|
+
/** Detect free variable `module`. */
|
|
723
|
+
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
1006
724
|
|
|
1007
|
-
|
|
725
|
+
/** Detect the popular CommonJS extension `module.exports`. */
|
|
726
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
1008
727
|
|
|
1009
|
-
/**
|
|
1010
|
-
|
|
1011
|
-
*
|
|
1012
|
-
* @private
|
|
1013
|
-
* @name clear
|
|
1014
|
-
* @memberOf MapCache
|
|
1015
|
-
*/
|
|
1016
|
-
function mapCacheClear() {
|
|
1017
|
-
this.size = 0;
|
|
1018
|
-
this.__data__ = {
|
|
1019
|
-
'hash': new _Hash,
|
|
1020
|
-
'map': new (_Map || _ListCache),
|
|
1021
|
-
'string': new _Hash
|
|
1022
|
-
};
|
|
1023
|
-
}
|
|
728
|
+
/** Built-in value references. */
|
|
729
|
+
var Buffer = moduleExports ? _root.Buffer : undefined;
|
|
1024
730
|
|
|
1025
|
-
|
|
731
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
732
|
+
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
|
|
1026
733
|
|
|
1027
734
|
/**
|
|
1028
|
-
* Checks if `value` is
|
|
735
|
+
* Checks if `value` is a buffer.
|
|
1029
736
|
*
|
|
1030
|
-
* @
|
|
737
|
+
* @static
|
|
738
|
+
* @memberOf _
|
|
739
|
+
* @since 4.3.0
|
|
740
|
+
* @category Lang
|
|
1031
741
|
* @param {*} value The value to check.
|
|
1032
|
-
* @returns {boolean} Returns `true` if `value` is
|
|
1033
|
-
|
|
1034
|
-
function isKeyable(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;
|
|
1042
|
-
|
|
1043
|
-
/**
|
|
1044
|
-
* Gets the data for `map`.
|
|
742
|
+
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
|
|
743
|
+
* @example
|
|
1045
744
|
*
|
|
1046
|
-
*
|
|
1047
|
-
*
|
|
1048
|
-
* @param {string} key The reference key.
|
|
1049
|
-
* @returns {*} Returns the map data.
|
|
1050
|
-
*/
|
|
1051
|
-
function getMapData(map, key) {
|
|
1052
|
-
var data = map.__data__;
|
|
1053
|
-
return _isKeyable(key)
|
|
1054
|
-
? data[typeof key == 'string' ? 'string' : 'hash']
|
|
1055
|
-
: data.map;
|
|
1056
|
-
}
|
|
1057
|
-
|
|
1058
|
-
var _getMapData = getMapData;
|
|
1059
|
-
|
|
1060
|
-
/**
|
|
1061
|
-
* Removes `key` and its value from the map.
|
|
745
|
+
* _.isBuffer(new Buffer(2));
|
|
746
|
+
* // => true
|
|
1062
747
|
*
|
|
1063
|
-
*
|
|
1064
|
-
*
|
|
1065
|
-
* @memberOf MapCache
|
|
1066
|
-
* @param {string} key The key of the value to remove.
|
|
1067
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
748
|
+
* _.isBuffer(new Uint8Array(2));
|
|
749
|
+
* // => false
|
|
1068
750
|
*/
|
|
1069
|
-
|
|
1070
|
-
var result = _getMapData(this, key)['delete'](key);
|
|
1071
|
-
this.size -= result ? 1 : 0;
|
|
1072
|
-
return result;
|
|
1073
|
-
}
|
|
751
|
+
var isBuffer = nativeIsBuffer || stubFalse_1;
|
|
1074
752
|
|
|
1075
|
-
|
|
753
|
+
module.exports = isBuffer;
|
|
754
|
+
});
|
|
1076
755
|
|
|
1077
|
-
|
|
1078
|
-
* Gets the map value for `key`.
|
|
1079
|
-
*
|
|
1080
|
-
* @private
|
|
1081
|
-
* @name get
|
|
1082
|
-
* @memberOf MapCache
|
|
1083
|
-
* @param {string} key The key of the value to get.
|
|
1084
|
-
* @returns {*} Returns the entry value.
|
|
1085
|
-
*/
|
|
1086
|
-
function mapCacheGet(key) {
|
|
1087
|
-
return _getMapData(this, key).get(key);
|
|
1088
|
-
}
|
|
1089
|
-
|
|
1090
|
-
var _mapCacheGet = mapCacheGet;
|
|
1091
|
-
|
|
1092
|
-
/**
|
|
1093
|
-
* Checks if a map value for `key` exists.
|
|
1094
|
-
*
|
|
1095
|
-
* @private
|
|
1096
|
-
* @name has
|
|
1097
|
-
* @memberOf MapCache
|
|
1098
|
-
* @param {string} key The key of the entry to check.
|
|
1099
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1100
|
-
*/
|
|
1101
|
-
function mapCacheHas(key) {
|
|
1102
|
-
return _getMapData(this, key).has(key);
|
|
1103
|
-
}
|
|
1104
|
-
|
|
1105
|
-
var _mapCacheHas = mapCacheHas;
|
|
1106
|
-
|
|
1107
|
-
/**
|
|
1108
|
-
* Sets the map `key` to `value`.
|
|
1109
|
-
*
|
|
1110
|
-
* @private
|
|
1111
|
-
* @name set
|
|
1112
|
-
* @memberOf MapCache
|
|
1113
|
-
* @param {string} key The key of the value to set.
|
|
1114
|
-
* @param {*} value The value to set.
|
|
1115
|
-
* @returns {Object} Returns the map cache instance.
|
|
1116
|
-
*/
|
|
1117
|
-
function mapCacheSet(key, value) {
|
|
1118
|
-
var data = _getMapData(this, key),
|
|
1119
|
-
size = data.size;
|
|
1120
|
-
|
|
1121
|
-
data.set(key, value);
|
|
1122
|
-
this.size += data.size == size ? 0 : 1;
|
|
1123
|
-
return this;
|
|
1124
|
-
}
|
|
1125
|
-
|
|
1126
|
-
var _mapCacheSet = mapCacheSet;
|
|
1127
|
-
|
|
1128
|
-
/**
|
|
1129
|
-
* Creates a map cache object to store key-value pairs.
|
|
1130
|
-
*
|
|
1131
|
-
* @private
|
|
1132
|
-
* @constructor
|
|
1133
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
1134
|
-
*/
|
|
1135
|
-
function MapCache(entries) {
|
|
1136
|
-
var index = -1,
|
|
1137
|
-
length = entries == null ? 0 : entries.length;
|
|
1138
|
-
|
|
1139
|
-
this.clear();
|
|
1140
|
-
while (++index < length) {
|
|
1141
|
-
var entry = entries[index];
|
|
1142
|
-
this.set(entry[0], entry[1]);
|
|
1143
|
-
}
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
|
-
// Add methods to `MapCache`.
|
|
1147
|
-
MapCache.prototype.clear = _mapCacheClear;
|
|
1148
|
-
MapCache.prototype['delete'] = _mapCacheDelete;
|
|
1149
|
-
MapCache.prototype.get = _mapCacheGet;
|
|
1150
|
-
MapCache.prototype.has = _mapCacheHas;
|
|
1151
|
-
MapCache.prototype.set = _mapCacheSet;
|
|
1152
|
-
|
|
1153
|
-
var _MapCache = MapCache;
|
|
1154
|
-
|
|
1155
|
-
/** Used as the size to enable large array optimizations. */
|
|
1156
|
-
var LARGE_ARRAY_SIZE = 200;
|
|
1157
|
-
|
|
1158
|
-
/**
|
|
1159
|
-
* Sets the stack `key` to `value`.
|
|
1160
|
-
*
|
|
1161
|
-
* @private
|
|
1162
|
-
* @name set
|
|
1163
|
-
* @memberOf Stack
|
|
1164
|
-
* @param {string} key The key of the value to set.
|
|
1165
|
-
* @param {*} value The value to set.
|
|
1166
|
-
* @returns {Object} Returns the stack cache instance.
|
|
1167
|
-
*/
|
|
1168
|
-
function stackSet(key, value) {
|
|
1169
|
-
var data = this.__data__;
|
|
1170
|
-
if (data instanceof _ListCache) {
|
|
1171
|
-
var pairs = data.__data__;
|
|
1172
|
-
if (!_Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
|
|
1173
|
-
pairs.push([key, value]);
|
|
1174
|
-
this.size = ++data.size;
|
|
1175
|
-
return this;
|
|
1176
|
-
}
|
|
1177
|
-
data = this.__data__ = new _MapCache(pairs);
|
|
1178
|
-
}
|
|
1179
|
-
data.set(key, value);
|
|
1180
|
-
this.size = data.size;
|
|
1181
|
-
return this;
|
|
1182
|
-
}
|
|
1183
|
-
|
|
1184
|
-
var _stackSet = stackSet;
|
|
1185
|
-
|
|
1186
|
-
/**
|
|
1187
|
-
* Creates a stack cache object to store key-value pairs.
|
|
1188
|
-
*
|
|
1189
|
-
* @private
|
|
1190
|
-
* @constructor
|
|
1191
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
1192
|
-
*/
|
|
1193
|
-
function Stack(entries) {
|
|
1194
|
-
var data = this.__data__ = new _ListCache(entries);
|
|
1195
|
-
this.size = data.size;
|
|
1196
|
-
}
|
|
1197
|
-
|
|
1198
|
-
// Add methods to `Stack`.
|
|
1199
|
-
Stack.prototype.clear = _stackClear;
|
|
1200
|
-
Stack.prototype['delete'] = _stackDelete;
|
|
1201
|
-
Stack.prototype.get = _stackGet;
|
|
1202
|
-
Stack.prototype.has = _stackHas;
|
|
1203
|
-
Stack.prototype.set = _stackSet;
|
|
1204
|
-
|
|
1205
|
-
var _Stack = Stack;
|
|
1206
|
-
|
|
1207
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
1208
|
-
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
1209
|
-
|
|
1210
|
-
/**
|
|
1211
|
-
* Adds `value` to the array cache.
|
|
1212
|
-
*
|
|
1213
|
-
* @private
|
|
1214
|
-
* @name add
|
|
1215
|
-
* @memberOf SetCache
|
|
1216
|
-
* @alias push
|
|
1217
|
-
* @param {*} value The value to cache.
|
|
1218
|
-
* @returns {Object} Returns the cache instance.
|
|
1219
|
-
*/
|
|
1220
|
-
function setCacheAdd(value) {
|
|
1221
|
-
this.__data__.set(value, HASH_UNDEFINED);
|
|
1222
|
-
return this;
|
|
1223
|
-
}
|
|
1224
|
-
|
|
1225
|
-
var _setCacheAdd = setCacheAdd;
|
|
1226
|
-
|
|
1227
|
-
/**
|
|
1228
|
-
* Checks if `value` is in the array cache.
|
|
1229
|
-
*
|
|
1230
|
-
* @private
|
|
1231
|
-
* @name has
|
|
1232
|
-
* @memberOf SetCache
|
|
1233
|
-
* @param {*} value The value to search for.
|
|
1234
|
-
* @returns {number} Returns `true` if `value` is found, else `false`.
|
|
1235
|
-
*/
|
|
1236
|
-
function setCacheHas(value) {
|
|
1237
|
-
return this.__data__.has(value);
|
|
1238
|
-
}
|
|
1239
|
-
|
|
1240
|
-
var _setCacheHas = setCacheHas;
|
|
1241
|
-
|
|
1242
|
-
/**
|
|
1243
|
-
*
|
|
1244
|
-
* Creates an array cache object to store unique values.
|
|
1245
|
-
*
|
|
1246
|
-
* @private
|
|
1247
|
-
* @constructor
|
|
1248
|
-
* @param {Array} [values] The values to cache.
|
|
1249
|
-
*/
|
|
1250
|
-
function SetCache(values) {
|
|
1251
|
-
var index = -1,
|
|
1252
|
-
length = values == null ? 0 : values.length;
|
|
1253
|
-
|
|
1254
|
-
this.__data__ = new _MapCache;
|
|
1255
|
-
while (++index < length) {
|
|
1256
|
-
this.add(values[index]);
|
|
1257
|
-
}
|
|
1258
|
-
}
|
|
1259
|
-
|
|
1260
|
-
// Add methods to `SetCache`.
|
|
1261
|
-
SetCache.prototype.add = SetCache.prototype.push = _setCacheAdd;
|
|
1262
|
-
SetCache.prototype.has = _setCacheHas;
|
|
1263
|
-
|
|
1264
|
-
var _SetCache = SetCache;
|
|
1265
|
-
|
|
1266
|
-
/**
|
|
1267
|
-
* A specialized version of `_.some` for arrays without support for iteratee
|
|
1268
|
-
* shorthands.
|
|
1269
|
-
*
|
|
1270
|
-
* @private
|
|
1271
|
-
* @param {Array} [array] The array to iterate over.
|
|
1272
|
-
* @param {Function} predicate The function invoked per iteration.
|
|
1273
|
-
* @returns {boolean} Returns `true` if any element passes the predicate check,
|
|
1274
|
-
* else `false`.
|
|
1275
|
-
*/
|
|
1276
|
-
function arraySome(array, predicate) {
|
|
1277
|
-
var index = -1,
|
|
1278
|
-
length = array == null ? 0 : array.length;
|
|
1279
|
-
|
|
1280
|
-
while (++index < length) {
|
|
1281
|
-
if (predicate(array[index], index, array)) {
|
|
1282
|
-
return true;
|
|
1283
|
-
}
|
|
1284
|
-
}
|
|
1285
|
-
return false;
|
|
1286
|
-
}
|
|
1287
|
-
|
|
1288
|
-
var _arraySome = arraySome;
|
|
1289
|
-
|
|
1290
|
-
/**
|
|
1291
|
-
* Checks if a `cache` value for `key` exists.
|
|
1292
|
-
*
|
|
1293
|
-
* @private
|
|
1294
|
-
* @param {Object} cache The cache to query.
|
|
1295
|
-
* @param {string} key The key of the entry to check.
|
|
1296
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1297
|
-
*/
|
|
1298
|
-
function cacheHas(cache, key) {
|
|
1299
|
-
return cache.has(key);
|
|
1300
|
-
}
|
|
1301
|
-
|
|
1302
|
-
var _cacheHas = cacheHas;
|
|
1303
|
-
|
|
1304
|
-
/** Used to compose bitmasks for value comparisons. */
|
|
1305
|
-
var COMPARE_PARTIAL_FLAG$3 = 1,
|
|
1306
|
-
COMPARE_UNORDERED_FLAG$1 = 2;
|
|
1307
|
-
|
|
1308
|
-
/**
|
|
1309
|
-
* A specialized version of `baseIsEqualDeep` for arrays with support for
|
|
1310
|
-
* partial deep comparisons.
|
|
1311
|
-
*
|
|
1312
|
-
* @private
|
|
1313
|
-
* @param {Array} array The array to compare.
|
|
1314
|
-
* @param {Array} other The other array to compare.
|
|
1315
|
-
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
|
1316
|
-
* @param {Function} customizer The function to customize comparisons.
|
|
1317
|
-
* @param {Function} equalFunc The function to determine equivalents of values.
|
|
1318
|
-
* @param {Object} stack Tracks traversed `array` and `other` objects.
|
|
1319
|
-
* @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
|
|
1320
|
-
*/
|
|
1321
|
-
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
|
|
1322
|
-
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3,
|
|
1323
|
-
arrLength = array.length,
|
|
1324
|
-
othLength = other.length;
|
|
1325
|
-
|
|
1326
|
-
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
|
1327
|
-
return false;
|
|
1328
|
-
}
|
|
1329
|
-
// Check that cyclic values are equal.
|
|
1330
|
-
var arrStacked = stack.get(array);
|
|
1331
|
-
var othStacked = stack.get(other);
|
|
1332
|
-
if (arrStacked && othStacked) {
|
|
1333
|
-
return arrStacked == other && othStacked == array;
|
|
1334
|
-
}
|
|
1335
|
-
var index = -1,
|
|
1336
|
-
result = true,
|
|
1337
|
-
seen = (bitmask & COMPARE_UNORDERED_FLAG$1) ? new _SetCache : undefined;
|
|
1338
|
-
|
|
1339
|
-
stack.set(array, other);
|
|
1340
|
-
stack.set(other, array);
|
|
1341
|
-
|
|
1342
|
-
// Ignore non-index properties.
|
|
1343
|
-
while (++index < arrLength) {
|
|
1344
|
-
var arrValue = array[index],
|
|
1345
|
-
othValue = other[index];
|
|
1346
|
-
|
|
1347
|
-
if (customizer) {
|
|
1348
|
-
var compared = isPartial
|
|
1349
|
-
? customizer(othValue, arrValue, index, other, array, stack)
|
|
1350
|
-
: customizer(arrValue, othValue, index, array, other, stack);
|
|
1351
|
-
}
|
|
1352
|
-
if (compared !== undefined) {
|
|
1353
|
-
if (compared) {
|
|
1354
|
-
continue;
|
|
1355
|
-
}
|
|
1356
|
-
result = false;
|
|
1357
|
-
break;
|
|
1358
|
-
}
|
|
1359
|
-
// Recursively compare arrays (susceptible to call stack limits).
|
|
1360
|
-
if (seen) {
|
|
1361
|
-
if (!_arraySome(other, function(othValue, othIndex) {
|
|
1362
|
-
if (!_cacheHas(seen, othIndex) &&
|
|
1363
|
-
(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
|
|
1364
|
-
return seen.push(othIndex);
|
|
1365
|
-
}
|
|
1366
|
-
})) {
|
|
1367
|
-
result = false;
|
|
1368
|
-
break;
|
|
1369
|
-
}
|
|
1370
|
-
} else if (!(
|
|
1371
|
-
arrValue === othValue ||
|
|
1372
|
-
equalFunc(arrValue, othValue, bitmask, customizer, stack)
|
|
1373
|
-
)) {
|
|
1374
|
-
result = false;
|
|
1375
|
-
break;
|
|
1376
|
-
}
|
|
1377
|
-
}
|
|
1378
|
-
stack['delete'](array);
|
|
1379
|
-
stack['delete'](other);
|
|
1380
|
-
return result;
|
|
1381
|
-
}
|
|
1382
|
-
|
|
1383
|
-
var _equalArrays = equalArrays;
|
|
1384
|
-
|
|
1385
|
-
/** Built-in value references. */
|
|
1386
|
-
var Uint8Array$1 = _root.Uint8Array;
|
|
1387
|
-
|
|
1388
|
-
var _Uint8Array = Uint8Array$1;
|
|
1389
|
-
|
|
1390
|
-
/**
|
|
1391
|
-
* Converts `map` to its key-value pairs.
|
|
1392
|
-
*
|
|
1393
|
-
* @private
|
|
1394
|
-
* @param {Object} map The map to convert.
|
|
1395
|
-
* @returns {Array} Returns the key-value pairs.
|
|
1396
|
-
*/
|
|
1397
|
-
function mapToArray(map) {
|
|
1398
|
-
var index = -1,
|
|
1399
|
-
result = Array(map.size);
|
|
1400
|
-
|
|
1401
|
-
map.forEach(function(value, key) {
|
|
1402
|
-
result[++index] = [key, value];
|
|
1403
|
-
});
|
|
1404
|
-
return result;
|
|
1405
|
-
}
|
|
1406
|
-
|
|
1407
|
-
var _mapToArray = mapToArray;
|
|
1408
|
-
|
|
1409
|
-
/**
|
|
1410
|
-
* Converts `set` to an array of its values.
|
|
1411
|
-
*
|
|
1412
|
-
* @private
|
|
1413
|
-
* @param {Object} set The set to convert.
|
|
1414
|
-
* @returns {Array} Returns the values.
|
|
1415
|
-
*/
|
|
1416
|
-
function setToArray(set) {
|
|
1417
|
-
var index = -1,
|
|
1418
|
-
result = Array(set.size);
|
|
1419
|
-
|
|
1420
|
-
set.forEach(function(value) {
|
|
1421
|
-
result[++index] = value;
|
|
1422
|
-
});
|
|
1423
|
-
return result;
|
|
1424
|
-
}
|
|
1425
|
-
|
|
1426
|
-
var _setToArray = setToArray;
|
|
1427
|
-
|
|
1428
|
-
/** Used to compose bitmasks for value comparisons. */
|
|
1429
|
-
var COMPARE_PARTIAL_FLAG$2 = 1,
|
|
1430
|
-
COMPARE_UNORDERED_FLAG = 2;
|
|
1431
|
-
|
|
1432
|
-
/** `Object#toString` result references. */
|
|
1433
|
-
var boolTag$1 = '[object Boolean]',
|
|
1434
|
-
dateTag$1 = '[object Date]',
|
|
1435
|
-
errorTag$1 = '[object Error]',
|
|
1436
|
-
mapTag$2 = '[object Map]',
|
|
1437
|
-
numberTag$1 = '[object Number]',
|
|
1438
|
-
regexpTag$1 = '[object RegExp]',
|
|
1439
|
-
setTag$2 = '[object Set]',
|
|
1440
|
-
stringTag$1 = '[object String]',
|
|
1441
|
-
symbolTag = '[object Symbol]';
|
|
1442
|
-
|
|
1443
|
-
var arrayBufferTag$1 = '[object ArrayBuffer]',
|
|
1444
|
-
dataViewTag$2 = '[object DataView]';
|
|
1445
|
-
|
|
1446
|
-
/** Used to convert symbols to primitives and strings. */
|
|
1447
|
-
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
|
|
1448
|
-
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
|
|
1449
|
-
|
|
1450
|
-
/**
|
|
1451
|
-
* A specialized version of `baseIsEqualDeep` for comparing objects of
|
|
1452
|
-
* the same `toStringTag`.
|
|
1453
|
-
*
|
|
1454
|
-
* **Note:** This function only supports comparing values with tags of
|
|
1455
|
-
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
|
|
1456
|
-
*
|
|
1457
|
-
* @private
|
|
1458
|
-
* @param {Object} object The object to compare.
|
|
1459
|
-
* @param {Object} other The other object to compare.
|
|
1460
|
-
* @param {string} tag The `toStringTag` of the objects to compare.
|
|
1461
|
-
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
|
1462
|
-
* @param {Function} customizer The function to customize comparisons.
|
|
1463
|
-
* @param {Function} equalFunc The function to determine equivalents of values.
|
|
1464
|
-
* @param {Object} stack Tracks traversed `object` and `other` objects.
|
|
1465
|
-
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
|
1466
|
-
*/
|
|
1467
|
-
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
|
1468
|
-
switch (tag) {
|
|
1469
|
-
case dataViewTag$2:
|
|
1470
|
-
if ((object.byteLength != other.byteLength) ||
|
|
1471
|
-
(object.byteOffset != other.byteOffset)) {
|
|
1472
|
-
return false;
|
|
1473
|
-
}
|
|
1474
|
-
object = object.buffer;
|
|
1475
|
-
other = other.buffer;
|
|
1476
|
-
|
|
1477
|
-
case arrayBufferTag$1:
|
|
1478
|
-
if ((object.byteLength != other.byteLength) ||
|
|
1479
|
-
!equalFunc(new _Uint8Array(object), new _Uint8Array(other))) {
|
|
1480
|
-
return false;
|
|
1481
|
-
}
|
|
1482
|
-
return true;
|
|
1483
|
-
|
|
1484
|
-
case boolTag$1:
|
|
1485
|
-
case dateTag$1:
|
|
1486
|
-
case numberTag$1:
|
|
1487
|
-
// Coerce booleans to `1` or `0` and dates to milliseconds.
|
|
1488
|
-
// Invalid dates are coerced to `NaN`.
|
|
1489
|
-
return eq_1(+object, +other);
|
|
1490
|
-
|
|
1491
|
-
case errorTag$1:
|
|
1492
|
-
return object.name == other.name && object.message == other.message;
|
|
1493
|
-
|
|
1494
|
-
case regexpTag$1:
|
|
1495
|
-
case stringTag$1:
|
|
1496
|
-
// Coerce regexes to strings and treat strings, primitives and objects,
|
|
1497
|
-
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
|
|
1498
|
-
// for more details.
|
|
1499
|
-
return object == (other + '');
|
|
1500
|
-
|
|
1501
|
-
case mapTag$2:
|
|
1502
|
-
var convert = _mapToArray;
|
|
1503
|
-
|
|
1504
|
-
case setTag$2:
|
|
1505
|
-
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2;
|
|
1506
|
-
convert || (convert = _setToArray);
|
|
1507
|
-
|
|
1508
|
-
if (object.size != other.size && !isPartial) {
|
|
1509
|
-
return false;
|
|
1510
|
-
}
|
|
1511
|
-
// Assume cyclic values are equal.
|
|
1512
|
-
var stacked = stack.get(object);
|
|
1513
|
-
if (stacked) {
|
|
1514
|
-
return stacked == other;
|
|
1515
|
-
}
|
|
1516
|
-
bitmask |= COMPARE_UNORDERED_FLAG;
|
|
1517
|
-
|
|
1518
|
-
// Recursively compare objects (susceptible to call stack limits).
|
|
1519
|
-
stack.set(object, other);
|
|
1520
|
-
var result = _equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
|
|
1521
|
-
stack['delete'](object);
|
|
1522
|
-
return result;
|
|
1523
|
-
|
|
1524
|
-
case symbolTag:
|
|
1525
|
-
if (symbolValueOf) {
|
|
1526
|
-
return symbolValueOf.call(object) == symbolValueOf.call(other);
|
|
1527
|
-
}
|
|
1528
|
-
}
|
|
1529
|
-
return false;
|
|
1530
|
-
}
|
|
1531
|
-
|
|
1532
|
-
var _equalByTag = equalByTag;
|
|
1533
|
-
|
|
1534
|
-
/**
|
|
1535
|
-
* Appends the elements of `values` to `array`.
|
|
1536
|
-
*
|
|
1537
|
-
* @private
|
|
1538
|
-
* @param {Array} array The array to modify.
|
|
1539
|
-
* @param {Array} values The values to append.
|
|
1540
|
-
* @returns {Array} Returns `array`.
|
|
1541
|
-
*/
|
|
1542
|
-
function arrayPush(array, values) {
|
|
1543
|
-
var index = -1,
|
|
1544
|
-
length = values.length,
|
|
1545
|
-
offset = array.length;
|
|
1546
|
-
|
|
1547
|
-
while (++index < length) {
|
|
1548
|
-
array[offset + index] = values[index];
|
|
1549
|
-
}
|
|
1550
|
-
return array;
|
|
1551
|
-
}
|
|
1552
|
-
|
|
1553
|
-
var _arrayPush = arrayPush;
|
|
1554
|
-
|
|
1555
|
-
/**
|
|
1556
|
-
* Checks if `value` is classified as an `Array` object.
|
|
1557
|
-
*
|
|
1558
|
-
* @static
|
|
1559
|
-
* @memberOf _
|
|
1560
|
-
* @since 0.1.0
|
|
1561
|
-
* @category Lang
|
|
1562
|
-
* @param {*} value The value to check.
|
|
1563
|
-
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
1564
|
-
* @example
|
|
1565
|
-
*
|
|
1566
|
-
* _.isArray([1, 2, 3]);
|
|
1567
|
-
* // => true
|
|
1568
|
-
*
|
|
1569
|
-
* _.isArray(document.body.children);
|
|
1570
|
-
* // => false
|
|
1571
|
-
*
|
|
1572
|
-
* _.isArray('abc');
|
|
1573
|
-
* // => false
|
|
1574
|
-
*
|
|
1575
|
-
* _.isArray(_.noop);
|
|
1576
|
-
* // => false
|
|
1577
|
-
*/
|
|
1578
|
-
var isArray = Array.isArray;
|
|
1579
|
-
|
|
1580
|
-
var isArray_1 = isArray;
|
|
1581
|
-
|
|
1582
|
-
/**
|
|
1583
|
-
* The base implementation of `getAllKeys` and `getAllKeysIn` which uses
|
|
1584
|
-
* `keysFunc` and `symbolsFunc` to get the enumerable property names and
|
|
1585
|
-
* symbols of `object`.
|
|
1586
|
-
*
|
|
1587
|
-
* @private
|
|
1588
|
-
* @param {Object} object The object to query.
|
|
1589
|
-
* @param {Function} keysFunc The function to get the keys of `object`.
|
|
1590
|
-
* @param {Function} symbolsFunc The function to get the symbols of `object`.
|
|
1591
|
-
* @returns {Array} Returns the array of property names and symbols.
|
|
1592
|
-
*/
|
|
1593
|
-
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
1594
|
-
var result = keysFunc(object);
|
|
1595
|
-
return isArray_1(object) ? result : _arrayPush(result, symbolsFunc(object));
|
|
1596
|
-
}
|
|
1597
|
-
|
|
1598
|
-
var _baseGetAllKeys = baseGetAllKeys;
|
|
1599
|
-
|
|
1600
|
-
/**
|
|
1601
|
-
* A specialized version of `_.filter` for arrays without support for
|
|
1602
|
-
* iteratee shorthands.
|
|
1603
|
-
*
|
|
1604
|
-
* @private
|
|
1605
|
-
* @param {Array} [array] The array to iterate over.
|
|
1606
|
-
* @param {Function} predicate The function invoked per iteration.
|
|
1607
|
-
* @returns {Array} Returns the new filtered array.
|
|
1608
|
-
*/
|
|
1609
|
-
function arrayFilter(array, predicate) {
|
|
1610
|
-
var index = -1,
|
|
1611
|
-
length = array == null ? 0 : array.length,
|
|
1612
|
-
resIndex = 0,
|
|
1613
|
-
result = [];
|
|
1614
|
-
|
|
1615
|
-
while (++index < length) {
|
|
1616
|
-
var value = array[index];
|
|
1617
|
-
if (predicate(value, index, array)) {
|
|
1618
|
-
result[resIndex++] = value;
|
|
1619
|
-
}
|
|
1620
|
-
}
|
|
1621
|
-
return result;
|
|
1622
|
-
}
|
|
1623
|
-
|
|
1624
|
-
var _arrayFilter = arrayFilter;
|
|
1625
|
-
|
|
1626
|
-
/**
|
|
1627
|
-
* This method returns a new empty array.
|
|
1628
|
-
*
|
|
1629
|
-
* @static
|
|
1630
|
-
* @memberOf _
|
|
1631
|
-
* @since 4.13.0
|
|
1632
|
-
* @category Util
|
|
1633
|
-
* @returns {Array} Returns the new empty array.
|
|
1634
|
-
* @example
|
|
1635
|
-
*
|
|
1636
|
-
* var arrays = _.times(2, _.stubArray);
|
|
1637
|
-
*
|
|
1638
|
-
* console.log(arrays);
|
|
1639
|
-
* // => [[], []]
|
|
1640
|
-
*
|
|
1641
|
-
* console.log(arrays[0] === arrays[1]);
|
|
1642
|
-
* // => false
|
|
1643
|
-
*/
|
|
1644
|
-
function stubArray() {
|
|
1645
|
-
return [];
|
|
1646
|
-
}
|
|
1647
|
-
|
|
1648
|
-
var stubArray_1 = stubArray;
|
|
1649
|
-
|
|
1650
|
-
/** Used for built-in method references. */
|
|
1651
|
-
var objectProto$6 = Object.prototype;
|
|
1652
|
-
|
|
1653
|
-
/** Built-in value references. */
|
|
1654
|
-
var propertyIsEnumerable$1 = objectProto$6.propertyIsEnumerable;
|
|
1655
|
-
|
|
1656
|
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
1657
|
-
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
1658
|
-
|
|
1659
|
-
/**
|
|
1660
|
-
* Creates an array of the own enumerable symbols of `object`.
|
|
1661
|
-
*
|
|
1662
|
-
* @private
|
|
1663
|
-
* @param {Object} object The object to query.
|
|
1664
|
-
* @returns {Array} Returns the array of symbols.
|
|
1665
|
-
*/
|
|
1666
|
-
var getSymbols = !nativeGetSymbols ? stubArray_1 : function(object) {
|
|
1667
|
-
if (object == null) {
|
|
1668
|
-
return [];
|
|
1669
|
-
}
|
|
1670
|
-
object = Object(object);
|
|
1671
|
-
return _arrayFilter(nativeGetSymbols(object), function(symbol) {
|
|
1672
|
-
return propertyIsEnumerable$1.call(object, symbol);
|
|
1673
|
-
});
|
|
1674
|
-
};
|
|
1675
|
-
|
|
1676
|
-
var _getSymbols = getSymbols;
|
|
1677
|
-
|
|
1678
|
-
/**
|
|
1679
|
-
* The base implementation of `_.times` without support for iteratee shorthands
|
|
1680
|
-
* or max array length checks.
|
|
1681
|
-
*
|
|
1682
|
-
* @private
|
|
1683
|
-
* @param {number} n The number of times to invoke `iteratee`.
|
|
1684
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
1685
|
-
* @returns {Array} Returns the array of results.
|
|
1686
|
-
*/
|
|
1687
|
-
function baseTimes(n, iteratee) {
|
|
1688
|
-
var index = -1,
|
|
1689
|
-
result = Array(n);
|
|
1690
|
-
|
|
1691
|
-
while (++index < n) {
|
|
1692
|
-
result[index] = iteratee(index);
|
|
1693
|
-
}
|
|
1694
|
-
return result;
|
|
1695
|
-
}
|
|
1696
|
-
|
|
1697
|
-
var _baseTimes = baseTimes;
|
|
1698
|
-
|
|
1699
|
-
/**
|
|
1700
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
1701
|
-
* and has a `typeof` result of "object".
|
|
1702
|
-
*
|
|
1703
|
-
* @static
|
|
1704
|
-
* @memberOf _
|
|
1705
|
-
* @since 4.0.0
|
|
1706
|
-
* @category Lang
|
|
1707
|
-
* @param {*} value The value to check.
|
|
1708
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
1709
|
-
* @example
|
|
1710
|
-
*
|
|
1711
|
-
* _.isObjectLike({});
|
|
1712
|
-
* // => true
|
|
1713
|
-
*
|
|
1714
|
-
* _.isObjectLike([1, 2, 3]);
|
|
1715
|
-
* // => true
|
|
1716
|
-
*
|
|
1717
|
-
* _.isObjectLike(_.noop);
|
|
1718
|
-
* // => false
|
|
1719
|
-
*
|
|
1720
|
-
* _.isObjectLike(null);
|
|
1721
|
-
* // => false
|
|
1722
|
-
*/
|
|
1723
|
-
function isObjectLike(value) {
|
|
1724
|
-
return value != null && typeof value == 'object';
|
|
1725
|
-
}
|
|
1726
|
-
|
|
1727
|
-
var isObjectLike_1 = isObjectLike;
|
|
1728
|
-
|
|
1729
|
-
/** `Object#toString` result references. */
|
|
1730
|
-
var argsTag$2 = '[object Arguments]';
|
|
1731
|
-
|
|
1732
|
-
/**
|
|
1733
|
-
* The base implementation of `_.isArguments`.
|
|
1734
|
-
*
|
|
1735
|
-
* @private
|
|
1736
|
-
* @param {*} value The value to check.
|
|
1737
|
-
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
1738
|
-
*/
|
|
1739
|
-
function baseIsArguments(value) {
|
|
1740
|
-
return isObjectLike_1(value) && _baseGetTag(value) == argsTag$2;
|
|
1741
|
-
}
|
|
1742
|
-
|
|
1743
|
-
var _baseIsArguments = baseIsArguments;
|
|
1744
|
-
|
|
1745
|
-
/** Used for built-in method references. */
|
|
1746
|
-
var objectProto$5 = Object.prototype;
|
|
1747
|
-
|
|
1748
|
-
/** Used to check objects for own properties. */
|
|
1749
|
-
var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
|
|
1750
|
-
|
|
1751
|
-
/** Built-in value references. */
|
|
1752
|
-
var propertyIsEnumerable = objectProto$5.propertyIsEnumerable;
|
|
1753
|
-
|
|
1754
|
-
/**
|
|
1755
|
-
* Checks if `value` is likely an `arguments` object.
|
|
1756
|
-
*
|
|
1757
|
-
* @static
|
|
1758
|
-
* @memberOf _
|
|
1759
|
-
* @since 0.1.0
|
|
1760
|
-
* @category Lang
|
|
1761
|
-
* @param {*} value The value to check.
|
|
1762
|
-
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
1763
|
-
* else `false`.
|
|
1764
|
-
* @example
|
|
1765
|
-
*
|
|
1766
|
-
* _.isArguments(function() { return arguments; }());
|
|
1767
|
-
* // => true
|
|
1768
|
-
*
|
|
1769
|
-
* _.isArguments([1, 2, 3]);
|
|
1770
|
-
* // => false
|
|
1771
|
-
*/
|
|
1772
|
-
var isArguments = _baseIsArguments(function() { return arguments; }()) ? _baseIsArguments : function(value) {
|
|
1773
|
-
return isObjectLike_1(value) && hasOwnProperty$4.call(value, 'callee') &&
|
|
1774
|
-
!propertyIsEnumerable.call(value, 'callee');
|
|
1775
|
-
};
|
|
1776
|
-
|
|
1777
|
-
var isArguments_1 = isArguments;
|
|
1778
|
-
|
|
1779
|
-
/**
|
|
1780
|
-
* This method returns `false`.
|
|
1781
|
-
*
|
|
1782
|
-
* @static
|
|
1783
|
-
* @memberOf _
|
|
1784
|
-
* @since 4.13.0
|
|
1785
|
-
* @category Util
|
|
1786
|
-
* @returns {boolean} Returns `false`.
|
|
1787
|
-
* @example
|
|
1788
|
-
*
|
|
1789
|
-
* _.times(2, _.stubFalse);
|
|
1790
|
-
* // => [false, false]
|
|
1791
|
-
*/
|
|
1792
|
-
function stubFalse() {
|
|
1793
|
-
return false;
|
|
1794
|
-
}
|
|
1795
|
-
|
|
1796
|
-
var stubFalse_1 = stubFalse;
|
|
1797
|
-
|
|
1798
|
-
var isBuffer_1 = createCommonjsModule(function (module, exports) {
|
|
1799
|
-
/** Detect free variable `exports`. */
|
|
1800
|
-
var freeExports = exports && !exports.nodeType && exports;
|
|
1801
|
-
|
|
1802
|
-
/** Detect free variable `module`. */
|
|
1803
|
-
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
1804
|
-
|
|
1805
|
-
/** Detect the popular CommonJS extension `module.exports`. */
|
|
1806
|
-
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
1807
|
-
|
|
1808
|
-
/** Built-in value references. */
|
|
1809
|
-
var Buffer = moduleExports ? _root.Buffer : undefined;
|
|
1810
|
-
|
|
1811
|
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
1812
|
-
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
|
|
1813
|
-
|
|
1814
|
-
/**
|
|
1815
|
-
* Checks if `value` is a buffer.
|
|
1816
|
-
*
|
|
1817
|
-
* @static
|
|
1818
|
-
* @memberOf _
|
|
1819
|
-
* @since 4.3.0
|
|
1820
|
-
* @category Lang
|
|
1821
|
-
* @param {*} value The value to check.
|
|
1822
|
-
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
|
|
1823
|
-
* @example
|
|
1824
|
-
*
|
|
1825
|
-
* _.isBuffer(new Buffer(2));
|
|
1826
|
-
* // => true
|
|
1827
|
-
*
|
|
1828
|
-
* _.isBuffer(new Uint8Array(2));
|
|
1829
|
-
* // => false
|
|
1830
|
-
*/
|
|
1831
|
-
var isBuffer = nativeIsBuffer || stubFalse_1;
|
|
1832
|
-
|
|
1833
|
-
module.exports = isBuffer;
|
|
1834
|
-
});
|
|
1835
|
-
|
|
1836
|
-
/** Used as references for various `Number` constants. */
|
|
1837
|
-
var MAX_SAFE_INTEGER$1 = 9007199254740991;
|
|
1838
|
-
|
|
1839
|
-
/** Used to detect unsigned integer values. */
|
|
1840
|
-
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
1841
|
-
|
|
1842
|
-
/**
|
|
1843
|
-
* Checks if `value` is a valid array-like index.
|
|
1844
|
-
*
|
|
1845
|
-
* @private
|
|
1846
|
-
* @param {*} value The value to check.
|
|
1847
|
-
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
1848
|
-
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
1849
|
-
*/
|
|
1850
|
-
function isIndex(value, length) {
|
|
1851
|
-
var type = typeof value;
|
|
1852
|
-
length = length == null ? MAX_SAFE_INTEGER$1 : length;
|
|
1853
|
-
|
|
1854
|
-
return !!length &&
|
|
1855
|
-
(type == 'number' ||
|
|
1856
|
-
(type != 'symbol' && reIsUint.test(value))) &&
|
|
1857
|
-
(value > -1 && value % 1 == 0 && value < length);
|
|
1858
|
-
}
|
|
1859
|
-
|
|
1860
|
-
var _isIndex = isIndex;
|
|
1861
|
-
|
|
1862
|
-
/** Used as references for various `Number` constants. */
|
|
1863
|
-
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
1864
|
-
|
|
1865
|
-
/**
|
|
1866
|
-
* Checks if `value` is a valid array-like length.
|
|
1867
|
-
*
|
|
1868
|
-
* **Note:** This method is loosely based on
|
|
1869
|
-
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
|
1870
|
-
*
|
|
1871
|
-
* @static
|
|
1872
|
-
* @memberOf _
|
|
1873
|
-
* @since 4.0.0
|
|
1874
|
-
* @category Lang
|
|
1875
|
-
* @param {*} value The value to check.
|
|
1876
|
-
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
|
1877
|
-
* @example
|
|
1878
|
-
*
|
|
1879
|
-
* _.isLength(3);
|
|
1880
|
-
* // => true
|
|
1881
|
-
*
|
|
1882
|
-
* _.isLength(Number.MIN_VALUE);
|
|
1883
|
-
* // => false
|
|
1884
|
-
*
|
|
1885
|
-
* _.isLength(Infinity);
|
|
1886
|
-
* // => false
|
|
1887
|
-
*
|
|
1888
|
-
* _.isLength('3');
|
|
1889
|
-
* // => false
|
|
1890
|
-
*/
|
|
1891
|
-
function isLength(value) {
|
|
1892
|
-
return typeof value == 'number' &&
|
|
1893
|
-
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
1894
|
-
}
|
|
1895
|
-
|
|
1896
|
-
var isLength_1 = isLength;
|
|
1897
|
-
|
|
1898
|
-
/** `Object#toString` result references. */
|
|
1899
|
-
var argsTag$1 = '[object Arguments]',
|
|
1900
|
-
arrayTag$1 = '[object Array]',
|
|
1901
|
-
boolTag = '[object Boolean]',
|
|
1902
|
-
dateTag = '[object Date]',
|
|
1903
|
-
errorTag = '[object Error]',
|
|
1904
|
-
funcTag = '[object Function]',
|
|
1905
|
-
mapTag$1 = '[object Map]',
|
|
1906
|
-
numberTag = '[object Number]',
|
|
1907
|
-
objectTag$2 = '[object Object]',
|
|
1908
|
-
regexpTag = '[object RegExp]',
|
|
1909
|
-
setTag$1 = '[object Set]',
|
|
1910
|
-
stringTag = '[object String]',
|
|
1911
|
-
weakMapTag$1 = '[object WeakMap]';
|
|
1912
|
-
|
|
1913
|
-
var arrayBufferTag = '[object ArrayBuffer]',
|
|
1914
|
-
dataViewTag$1 = '[object DataView]',
|
|
1915
|
-
float32Tag = '[object Float32Array]',
|
|
1916
|
-
float64Tag = '[object Float64Array]',
|
|
1917
|
-
int8Tag = '[object Int8Array]',
|
|
1918
|
-
int16Tag = '[object Int16Array]',
|
|
1919
|
-
int32Tag = '[object Int32Array]',
|
|
1920
|
-
uint8Tag = '[object Uint8Array]',
|
|
1921
|
-
uint8ClampedTag = '[object Uint8ClampedArray]',
|
|
1922
|
-
uint16Tag = '[object Uint16Array]',
|
|
1923
|
-
uint32Tag = '[object Uint32Array]';
|
|
1924
|
-
|
|
1925
|
-
/** Used to identify `toStringTag` values of typed arrays. */
|
|
1926
|
-
var typedArrayTags = {};
|
|
1927
|
-
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
|
|
1928
|
-
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
|
|
1929
|
-
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
|
|
1930
|
-
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
|
|
1931
|
-
typedArrayTags[uint32Tag] = true;
|
|
1932
|
-
typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] =
|
|
1933
|
-
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
|
|
1934
|
-
typedArrayTags[dataViewTag$1] = typedArrayTags[dateTag] =
|
|
1935
|
-
typedArrayTags[errorTag] = typedArrayTags[funcTag] =
|
|
1936
|
-
typedArrayTags[mapTag$1] = typedArrayTags[numberTag] =
|
|
1937
|
-
typedArrayTags[objectTag$2] = typedArrayTags[regexpTag] =
|
|
1938
|
-
typedArrayTags[setTag$1] = typedArrayTags[stringTag] =
|
|
1939
|
-
typedArrayTags[weakMapTag$1] = false;
|
|
1940
|
-
|
|
1941
|
-
/**
|
|
1942
|
-
* The base implementation of `_.isTypedArray` without Node.js optimizations.
|
|
1943
|
-
*
|
|
1944
|
-
* @private
|
|
1945
|
-
* @param {*} value The value to check.
|
|
1946
|
-
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
1947
|
-
*/
|
|
1948
|
-
function baseIsTypedArray(value) {
|
|
1949
|
-
return isObjectLike_1(value) &&
|
|
1950
|
-
isLength_1(value.length) && !!typedArrayTags[_baseGetTag(value)];
|
|
1951
|
-
}
|
|
1952
|
-
|
|
1953
|
-
var _baseIsTypedArray = baseIsTypedArray;
|
|
1954
|
-
|
|
1955
|
-
/**
|
|
1956
|
-
* The base implementation of `_.unary` without support for storing metadata.
|
|
1957
|
-
*
|
|
1958
|
-
* @private
|
|
1959
|
-
* @param {Function} func The function to cap arguments for.
|
|
1960
|
-
* @returns {Function} Returns the new capped function.
|
|
1961
|
-
*/
|
|
1962
|
-
function baseUnary(func) {
|
|
1963
|
-
return function(value) {
|
|
1964
|
-
return func(value);
|
|
1965
|
-
};
|
|
1966
|
-
}
|
|
1967
|
-
|
|
1968
|
-
var _baseUnary = baseUnary;
|
|
1969
|
-
|
|
1970
|
-
var _nodeUtil = createCommonjsModule(function (module, exports) {
|
|
756
|
+
createCommonjsModule(function (module, exports) {
|
|
1971
757
|
/** Detect free variable `exports`. */
|
|
1972
758
|
var freeExports = exports && !exports.nodeType && exports;
|
|
1973
759
|
|
|
@@ -1998,308 +784,6 @@ var nodeUtil = (function() {
|
|
|
1998
784
|
module.exports = nodeUtil;
|
|
1999
785
|
});
|
|
2000
786
|
|
|
2001
|
-
/* Node.js helper references. */
|
|
2002
|
-
var nodeIsTypedArray = _nodeUtil && _nodeUtil.isTypedArray;
|
|
2003
|
-
|
|
2004
|
-
/**
|
|
2005
|
-
* Checks if `value` is classified as a typed array.
|
|
2006
|
-
*
|
|
2007
|
-
* @static
|
|
2008
|
-
* @memberOf _
|
|
2009
|
-
* @since 3.0.0
|
|
2010
|
-
* @category Lang
|
|
2011
|
-
* @param {*} value The value to check.
|
|
2012
|
-
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
2013
|
-
* @example
|
|
2014
|
-
*
|
|
2015
|
-
* _.isTypedArray(new Uint8Array);
|
|
2016
|
-
* // => true
|
|
2017
|
-
*
|
|
2018
|
-
* _.isTypedArray([]);
|
|
2019
|
-
* // => false
|
|
2020
|
-
*/
|
|
2021
|
-
var isTypedArray = nodeIsTypedArray ? _baseUnary(nodeIsTypedArray) : _baseIsTypedArray;
|
|
2022
|
-
|
|
2023
|
-
var isTypedArray_1 = isTypedArray;
|
|
2024
|
-
|
|
2025
|
-
/** Used for built-in method references. */
|
|
2026
|
-
var objectProto$4 = Object.prototype;
|
|
2027
|
-
|
|
2028
|
-
/** Used to check objects for own properties. */
|
|
2029
|
-
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
2030
|
-
|
|
2031
|
-
/**
|
|
2032
|
-
* Creates an array of the enumerable property names of the array-like `value`.
|
|
2033
|
-
*
|
|
2034
|
-
* @private
|
|
2035
|
-
* @param {*} value The value to query.
|
|
2036
|
-
* @param {boolean} inherited Specify returning inherited property names.
|
|
2037
|
-
* @returns {Array} Returns the array of property names.
|
|
2038
|
-
*/
|
|
2039
|
-
function arrayLikeKeys(value, inherited) {
|
|
2040
|
-
var isArr = isArray_1(value),
|
|
2041
|
-
isArg = !isArr && isArguments_1(value),
|
|
2042
|
-
isBuff = !isArr && !isArg && isBuffer_1(value),
|
|
2043
|
-
isType = !isArr && !isArg && !isBuff && isTypedArray_1(value),
|
|
2044
|
-
skipIndexes = isArr || isArg || isBuff || isType,
|
|
2045
|
-
result = skipIndexes ? _baseTimes(value.length, String) : [],
|
|
2046
|
-
length = result.length;
|
|
2047
|
-
|
|
2048
|
-
for (var key in value) {
|
|
2049
|
-
if ((inherited || hasOwnProperty$3.call(value, key)) &&
|
|
2050
|
-
!(skipIndexes && (
|
|
2051
|
-
// Safari 9 has enumerable `arguments.length` in strict mode.
|
|
2052
|
-
key == 'length' ||
|
|
2053
|
-
// Node.js 0.10 has enumerable non-index properties on buffers.
|
|
2054
|
-
(isBuff && (key == 'offset' || key == 'parent')) ||
|
|
2055
|
-
// PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
2056
|
-
(isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
|
|
2057
|
-
// Skip index properties.
|
|
2058
|
-
_isIndex(key, length)
|
|
2059
|
-
))) {
|
|
2060
|
-
result.push(key);
|
|
2061
|
-
}
|
|
2062
|
-
}
|
|
2063
|
-
return result;
|
|
2064
|
-
}
|
|
2065
|
-
|
|
2066
|
-
var _arrayLikeKeys = arrayLikeKeys;
|
|
2067
|
-
|
|
2068
|
-
/** Used for built-in method references. */
|
|
2069
|
-
var objectProto$3 = Object.prototype;
|
|
2070
|
-
|
|
2071
|
-
/**
|
|
2072
|
-
* Checks if `value` is likely a prototype object.
|
|
2073
|
-
*
|
|
2074
|
-
* @private
|
|
2075
|
-
* @param {*} value The value to check.
|
|
2076
|
-
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
|
2077
|
-
*/
|
|
2078
|
-
function isPrototype(value) {
|
|
2079
|
-
var Ctor = value && value.constructor,
|
|
2080
|
-
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$3;
|
|
2081
|
-
|
|
2082
|
-
return value === proto;
|
|
2083
|
-
}
|
|
2084
|
-
|
|
2085
|
-
var _isPrototype = isPrototype;
|
|
2086
|
-
|
|
2087
|
-
/**
|
|
2088
|
-
* Creates a unary function that invokes `func` with its argument transformed.
|
|
2089
|
-
*
|
|
2090
|
-
* @private
|
|
2091
|
-
* @param {Function} func The function to wrap.
|
|
2092
|
-
* @param {Function} transform The argument transform.
|
|
2093
|
-
* @returns {Function} Returns the new function.
|
|
2094
|
-
*/
|
|
2095
|
-
function overArg(func, transform) {
|
|
2096
|
-
return function(arg) {
|
|
2097
|
-
return func(transform(arg));
|
|
2098
|
-
};
|
|
2099
|
-
}
|
|
2100
|
-
|
|
2101
|
-
var _overArg = overArg;
|
|
2102
|
-
|
|
2103
|
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
2104
|
-
var nativeKeys = _overArg(Object.keys, Object);
|
|
2105
|
-
|
|
2106
|
-
var _nativeKeys = nativeKeys;
|
|
2107
|
-
|
|
2108
|
-
/** Used for built-in method references. */
|
|
2109
|
-
var objectProto$2 = Object.prototype;
|
|
2110
|
-
|
|
2111
|
-
/** Used to check objects for own properties. */
|
|
2112
|
-
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
2113
|
-
|
|
2114
|
-
/**
|
|
2115
|
-
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
|
2116
|
-
*
|
|
2117
|
-
* @private
|
|
2118
|
-
* @param {Object} object The object to query.
|
|
2119
|
-
* @returns {Array} Returns the array of property names.
|
|
2120
|
-
*/
|
|
2121
|
-
function baseKeys(object) {
|
|
2122
|
-
if (!_isPrototype(object)) {
|
|
2123
|
-
return _nativeKeys(object);
|
|
2124
|
-
}
|
|
2125
|
-
var result = [];
|
|
2126
|
-
for (var key in Object(object)) {
|
|
2127
|
-
if (hasOwnProperty$2.call(object, key) && key != 'constructor') {
|
|
2128
|
-
result.push(key);
|
|
2129
|
-
}
|
|
2130
|
-
}
|
|
2131
|
-
return result;
|
|
2132
|
-
}
|
|
2133
|
-
|
|
2134
|
-
var _baseKeys = baseKeys;
|
|
2135
|
-
|
|
2136
|
-
/**
|
|
2137
|
-
* Checks if `value` is array-like. A value is considered array-like if it's
|
|
2138
|
-
* not a function and has a `value.length` that's an integer greater than or
|
|
2139
|
-
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
|
|
2140
|
-
*
|
|
2141
|
-
* @static
|
|
2142
|
-
* @memberOf _
|
|
2143
|
-
* @since 4.0.0
|
|
2144
|
-
* @category Lang
|
|
2145
|
-
* @param {*} value The value to check.
|
|
2146
|
-
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
|
2147
|
-
* @example
|
|
2148
|
-
*
|
|
2149
|
-
* _.isArrayLike([1, 2, 3]);
|
|
2150
|
-
* // => true
|
|
2151
|
-
*
|
|
2152
|
-
* _.isArrayLike(document.body.children);
|
|
2153
|
-
* // => true
|
|
2154
|
-
*
|
|
2155
|
-
* _.isArrayLike('abc');
|
|
2156
|
-
* // => true
|
|
2157
|
-
*
|
|
2158
|
-
* _.isArrayLike(_.noop);
|
|
2159
|
-
* // => false
|
|
2160
|
-
*/
|
|
2161
|
-
function isArrayLike(value) {
|
|
2162
|
-
return value != null && isLength_1(value.length) && !isFunction_1(value);
|
|
2163
|
-
}
|
|
2164
|
-
|
|
2165
|
-
var isArrayLike_1 = isArrayLike;
|
|
2166
|
-
|
|
2167
|
-
/**
|
|
2168
|
-
* Creates an array of the own enumerable property names of `object`.
|
|
2169
|
-
*
|
|
2170
|
-
* **Note:** Non-object values are coerced to objects. See the
|
|
2171
|
-
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
|
2172
|
-
* for more details.
|
|
2173
|
-
*
|
|
2174
|
-
* @static
|
|
2175
|
-
* @since 0.1.0
|
|
2176
|
-
* @memberOf _
|
|
2177
|
-
* @category Object
|
|
2178
|
-
* @param {Object} object The object to query.
|
|
2179
|
-
* @returns {Array} Returns the array of property names.
|
|
2180
|
-
* @example
|
|
2181
|
-
*
|
|
2182
|
-
* function Foo() {
|
|
2183
|
-
* this.a = 1;
|
|
2184
|
-
* this.b = 2;
|
|
2185
|
-
* }
|
|
2186
|
-
*
|
|
2187
|
-
* Foo.prototype.c = 3;
|
|
2188
|
-
*
|
|
2189
|
-
* _.keys(new Foo);
|
|
2190
|
-
* // => ['a', 'b'] (iteration order is not guaranteed)
|
|
2191
|
-
*
|
|
2192
|
-
* _.keys('hi');
|
|
2193
|
-
* // => ['0', '1']
|
|
2194
|
-
*/
|
|
2195
|
-
function keys(object) {
|
|
2196
|
-
return isArrayLike_1(object) ? _arrayLikeKeys(object) : _baseKeys(object);
|
|
2197
|
-
}
|
|
2198
|
-
|
|
2199
|
-
var keys_1 = keys;
|
|
2200
|
-
|
|
2201
|
-
/**
|
|
2202
|
-
* Creates an array of own enumerable property names and symbols of `object`.
|
|
2203
|
-
*
|
|
2204
|
-
* @private
|
|
2205
|
-
* @param {Object} object The object to query.
|
|
2206
|
-
* @returns {Array} Returns the array of property names and symbols.
|
|
2207
|
-
*/
|
|
2208
|
-
function getAllKeys(object) {
|
|
2209
|
-
return _baseGetAllKeys(object, keys_1, _getSymbols);
|
|
2210
|
-
}
|
|
2211
|
-
|
|
2212
|
-
var _getAllKeys = getAllKeys;
|
|
2213
|
-
|
|
2214
|
-
/** Used to compose bitmasks for value comparisons. */
|
|
2215
|
-
var COMPARE_PARTIAL_FLAG$1 = 1;
|
|
2216
|
-
|
|
2217
|
-
/** Used for built-in method references. */
|
|
2218
|
-
var objectProto$1 = Object.prototype;
|
|
2219
|
-
|
|
2220
|
-
/** Used to check objects for own properties. */
|
|
2221
|
-
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
2222
|
-
|
|
2223
|
-
/**
|
|
2224
|
-
* A specialized version of `baseIsEqualDeep` for objects with support for
|
|
2225
|
-
* partial deep comparisons.
|
|
2226
|
-
*
|
|
2227
|
-
* @private
|
|
2228
|
-
* @param {Object} object The object to compare.
|
|
2229
|
-
* @param {Object} other The other object to compare.
|
|
2230
|
-
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
|
2231
|
-
* @param {Function} customizer The function to customize comparisons.
|
|
2232
|
-
* @param {Function} equalFunc The function to determine equivalents of values.
|
|
2233
|
-
* @param {Object} stack Tracks traversed `object` and `other` objects.
|
|
2234
|
-
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
|
2235
|
-
*/
|
|
2236
|
-
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
|
|
2237
|
-
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1,
|
|
2238
|
-
objProps = _getAllKeys(object),
|
|
2239
|
-
objLength = objProps.length,
|
|
2240
|
-
othProps = _getAllKeys(other),
|
|
2241
|
-
othLength = othProps.length;
|
|
2242
|
-
|
|
2243
|
-
if (objLength != othLength && !isPartial) {
|
|
2244
|
-
return false;
|
|
2245
|
-
}
|
|
2246
|
-
var index = objLength;
|
|
2247
|
-
while (index--) {
|
|
2248
|
-
var key = objProps[index];
|
|
2249
|
-
if (!(isPartial ? key in other : hasOwnProperty$1.call(other, key))) {
|
|
2250
|
-
return false;
|
|
2251
|
-
}
|
|
2252
|
-
}
|
|
2253
|
-
// Check that cyclic values are equal.
|
|
2254
|
-
var objStacked = stack.get(object);
|
|
2255
|
-
var othStacked = stack.get(other);
|
|
2256
|
-
if (objStacked && othStacked) {
|
|
2257
|
-
return objStacked == other && othStacked == object;
|
|
2258
|
-
}
|
|
2259
|
-
var result = true;
|
|
2260
|
-
stack.set(object, other);
|
|
2261
|
-
stack.set(other, object);
|
|
2262
|
-
|
|
2263
|
-
var skipCtor = isPartial;
|
|
2264
|
-
while (++index < objLength) {
|
|
2265
|
-
key = objProps[index];
|
|
2266
|
-
var objValue = object[key],
|
|
2267
|
-
othValue = other[key];
|
|
2268
|
-
|
|
2269
|
-
if (customizer) {
|
|
2270
|
-
var compared = isPartial
|
|
2271
|
-
? customizer(othValue, objValue, key, other, object, stack)
|
|
2272
|
-
: customizer(objValue, othValue, key, object, other, stack);
|
|
2273
|
-
}
|
|
2274
|
-
// Recursively compare objects (susceptible to call stack limits).
|
|
2275
|
-
if (!(compared === undefined
|
|
2276
|
-
? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
|
|
2277
|
-
: compared
|
|
2278
|
-
)) {
|
|
2279
|
-
result = false;
|
|
2280
|
-
break;
|
|
2281
|
-
}
|
|
2282
|
-
skipCtor || (skipCtor = key == 'constructor');
|
|
2283
|
-
}
|
|
2284
|
-
if (result && !skipCtor) {
|
|
2285
|
-
var objCtor = object.constructor,
|
|
2286
|
-
othCtor = other.constructor;
|
|
2287
|
-
|
|
2288
|
-
// Non `Object` object instances with different constructors are not equal.
|
|
2289
|
-
if (objCtor != othCtor &&
|
|
2290
|
-
('constructor' in object && 'constructor' in other) &&
|
|
2291
|
-
!(typeof objCtor == 'function' && objCtor instanceof objCtor &&
|
|
2292
|
-
typeof othCtor == 'function' && othCtor instanceof othCtor)) {
|
|
2293
|
-
result = false;
|
|
2294
|
-
}
|
|
2295
|
-
}
|
|
2296
|
-
stack['delete'](object);
|
|
2297
|
-
stack['delete'](other);
|
|
2298
|
-
return result;
|
|
2299
|
-
}
|
|
2300
|
-
|
|
2301
|
-
var _equalObjects = equalObjects;
|
|
2302
|
-
|
|
2303
787
|
/* Built-in method references that are verified to be native. */
|
|
2304
788
|
var DataView = _getNative(_root, 'DataView');
|
|
2305
789
|
|
|
@@ -2322,7 +806,7 @@ var _WeakMap = WeakMap;
|
|
|
2322
806
|
|
|
2323
807
|
/** `Object#toString` result references. */
|
|
2324
808
|
var mapTag = '[object Map]',
|
|
2325
|
-
objectTag
|
|
809
|
+
objectTag = '[object Object]',
|
|
2326
810
|
promiseTag = '[object Promise]',
|
|
2327
811
|
setTag = '[object Set]',
|
|
2328
812
|
weakMapTag = '[object WeakMap]';
|
|
@@ -2353,7 +837,7 @@ if ((_DataView && getTag(new _DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
|
|
2353
837
|
(_WeakMap && getTag(new _WeakMap) != weakMapTag)) {
|
|
2354
838
|
getTag = function(value) {
|
|
2355
839
|
var result = _baseGetTag(value),
|
|
2356
|
-
Ctor = result == objectTag
|
|
840
|
+
Ctor = result == objectTag ? value.constructor : undefined,
|
|
2357
841
|
ctorString = Ctor ? _toSource(Ctor) : '';
|
|
2358
842
|
|
|
2359
843
|
if (ctorString) {
|
|
@@ -2369,143 +853,6 @@ if ((_DataView && getTag(new _DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
|
|
2369
853
|
};
|
|
2370
854
|
}
|
|
2371
855
|
|
|
2372
|
-
var _getTag = getTag;
|
|
2373
|
-
|
|
2374
|
-
/** Used to compose bitmasks for value comparisons. */
|
|
2375
|
-
var COMPARE_PARTIAL_FLAG = 1;
|
|
2376
|
-
|
|
2377
|
-
/** `Object#toString` result references. */
|
|
2378
|
-
var argsTag = '[object Arguments]',
|
|
2379
|
-
arrayTag = '[object Array]',
|
|
2380
|
-
objectTag = '[object Object]';
|
|
2381
|
-
|
|
2382
|
-
/** Used for built-in method references. */
|
|
2383
|
-
var objectProto = Object.prototype;
|
|
2384
|
-
|
|
2385
|
-
/** Used to check objects for own properties. */
|
|
2386
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
2387
|
-
|
|
2388
|
-
/**
|
|
2389
|
-
* A specialized version of `baseIsEqual` for arrays and objects which performs
|
|
2390
|
-
* deep comparisons and tracks traversed objects enabling objects with circular
|
|
2391
|
-
* references to be compared.
|
|
2392
|
-
*
|
|
2393
|
-
* @private
|
|
2394
|
-
* @param {Object} object The object to compare.
|
|
2395
|
-
* @param {Object} other The other object to compare.
|
|
2396
|
-
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
|
2397
|
-
* @param {Function} customizer The function to customize comparisons.
|
|
2398
|
-
* @param {Function} equalFunc The function to determine equivalents of values.
|
|
2399
|
-
* @param {Object} [stack] Tracks traversed `object` and `other` objects.
|
|
2400
|
-
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
|
2401
|
-
*/
|
|
2402
|
-
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
|
2403
|
-
var objIsArr = isArray_1(object),
|
|
2404
|
-
othIsArr = isArray_1(other),
|
|
2405
|
-
objTag = objIsArr ? arrayTag : _getTag(object),
|
|
2406
|
-
othTag = othIsArr ? arrayTag : _getTag(other);
|
|
2407
|
-
|
|
2408
|
-
objTag = objTag == argsTag ? objectTag : objTag;
|
|
2409
|
-
othTag = othTag == argsTag ? objectTag : othTag;
|
|
2410
|
-
|
|
2411
|
-
var objIsObj = objTag == objectTag,
|
|
2412
|
-
othIsObj = othTag == objectTag,
|
|
2413
|
-
isSameTag = objTag == othTag;
|
|
2414
|
-
|
|
2415
|
-
if (isSameTag && isBuffer_1(object)) {
|
|
2416
|
-
if (!isBuffer_1(other)) {
|
|
2417
|
-
return false;
|
|
2418
|
-
}
|
|
2419
|
-
objIsArr = true;
|
|
2420
|
-
objIsObj = false;
|
|
2421
|
-
}
|
|
2422
|
-
if (isSameTag && !objIsObj) {
|
|
2423
|
-
stack || (stack = new _Stack);
|
|
2424
|
-
return (objIsArr || isTypedArray_1(object))
|
|
2425
|
-
? _equalArrays(object, other, bitmask, customizer, equalFunc, stack)
|
|
2426
|
-
: _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
|
2427
|
-
}
|
|
2428
|
-
if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
|
|
2429
|
-
var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
|
|
2430
|
-
othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
|
|
2431
|
-
|
|
2432
|
-
if (objIsWrapped || othIsWrapped) {
|
|
2433
|
-
var objUnwrapped = objIsWrapped ? object.value() : object,
|
|
2434
|
-
othUnwrapped = othIsWrapped ? other.value() : other;
|
|
2435
|
-
|
|
2436
|
-
stack || (stack = new _Stack);
|
|
2437
|
-
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
|
|
2438
|
-
}
|
|
2439
|
-
}
|
|
2440
|
-
if (!isSameTag) {
|
|
2441
|
-
return false;
|
|
2442
|
-
}
|
|
2443
|
-
stack || (stack = new _Stack);
|
|
2444
|
-
return _equalObjects(object, other, bitmask, customizer, equalFunc, stack);
|
|
2445
|
-
}
|
|
2446
|
-
|
|
2447
|
-
var _baseIsEqualDeep = baseIsEqualDeep;
|
|
2448
|
-
|
|
2449
|
-
/**
|
|
2450
|
-
* The base implementation of `_.isEqual` which supports partial comparisons
|
|
2451
|
-
* and tracks traversed objects.
|
|
2452
|
-
*
|
|
2453
|
-
* @private
|
|
2454
|
-
* @param {*} value The value to compare.
|
|
2455
|
-
* @param {*} other The other value to compare.
|
|
2456
|
-
* @param {boolean} bitmask The bitmask flags.
|
|
2457
|
-
* 1 - Unordered comparison
|
|
2458
|
-
* 2 - Partial comparison
|
|
2459
|
-
* @param {Function} [customizer] The function to customize comparisons.
|
|
2460
|
-
* @param {Object} [stack] Tracks traversed `value` and `other` objects.
|
|
2461
|
-
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
2462
|
-
*/
|
|
2463
|
-
function baseIsEqual(value, other, bitmask, customizer, stack) {
|
|
2464
|
-
if (value === other) {
|
|
2465
|
-
return true;
|
|
2466
|
-
}
|
|
2467
|
-
if (value == null || other == null || (!isObjectLike_1(value) && !isObjectLike_1(other))) {
|
|
2468
|
-
return value !== value && other !== other;
|
|
2469
|
-
}
|
|
2470
|
-
return _baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
|
|
2471
|
-
}
|
|
2472
|
-
|
|
2473
|
-
var _baseIsEqual = baseIsEqual;
|
|
2474
|
-
|
|
2475
|
-
/**
|
|
2476
|
-
* Performs a deep comparison between two values to determine if they are
|
|
2477
|
-
* equivalent.
|
|
2478
|
-
*
|
|
2479
|
-
* **Note:** This method supports comparing arrays, array buffers, booleans,
|
|
2480
|
-
* date objects, error objects, maps, numbers, `Object` objects, regexes,
|
|
2481
|
-
* sets, strings, symbols, and typed arrays. `Object` objects are compared
|
|
2482
|
-
* by their own, not inherited, enumerable properties. Functions and DOM
|
|
2483
|
-
* nodes are compared by strict equality, i.e. `===`.
|
|
2484
|
-
*
|
|
2485
|
-
* @static
|
|
2486
|
-
* @memberOf _
|
|
2487
|
-
* @since 0.1.0
|
|
2488
|
-
* @category Lang
|
|
2489
|
-
* @param {*} value The value to compare.
|
|
2490
|
-
* @param {*} other The other value to compare.
|
|
2491
|
-
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
2492
|
-
* @example
|
|
2493
|
-
*
|
|
2494
|
-
* var object = { 'a': 1 };
|
|
2495
|
-
* var other = { 'a': 1 };
|
|
2496
|
-
*
|
|
2497
|
-
* _.isEqual(object, other);
|
|
2498
|
-
* // => true
|
|
2499
|
-
*
|
|
2500
|
-
* object === other;
|
|
2501
|
-
* // => false
|
|
2502
|
-
*/
|
|
2503
|
-
function isEqual(value, other) {
|
|
2504
|
-
return _baseIsEqual(value, other);
|
|
2505
|
-
}
|
|
2506
|
-
|
|
2507
|
-
var isEqual_1 = isEqual;
|
|
2508
|
-
|
|
2509
856
|
const signPdfFile = function (pdfSignature) {
|
|
2510
857
|
try {
|
|
2511
858
|
const {
|
|
@@ -2546,32 +893,39 @@ const signPdfFile = function (pdfSignature) {
|
|
|
2546
893
|
};
|
|
2547
894
|
|
|
2548
895
|
const _excluded$1 = ["placeholder", "signature", "url", "width", "height", "padding", "filename", "defaultLocation", "onChange"];
|
|
2549
|
-
const
|
|
896
|
+
const PDFSignInner = /*#__PURE__*/react.forwardRef((_ref, ref) => {
|
|
2550
897
|
let {
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
const
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
898
|
+
size,
|
|
899
|
+
currentPage,
|
|
900
|
+
placeholder,
|
|
901
|
+
signature,
|
|
902
|
+
url,
|
|
903
|
+
width = 200,
|
|
904
|
+
height = 80,
|
|
905
|
+
padding,
|
|
906
|
+
filename = 'signed-document.pdf',
|
|
907
|
+
defaultLocation,
|
|
908
|
+
onChange
|
|
909
|
+
} = _ref;
|
|
910
|
+
const initLocation = react.useMemo(() => {
|
|
911
|
+
return {
|
|
912
|
+
scaleX: 1,
|
|
913
|
+
scaleY: 1,
|
|
914
|
+
x: Math.round((size.width - width) / 2),
|
|
915
|
+
y: Math.round((size.height - height) / 2),
|
|
916
|
+
size: {
|
|
917
|
+
width,
|
|
918
|
+
height,
|
|
919
|
+
x: Math.round((size.width - width) / 2),
|
|
920
|
+
y: Math.round((size.height - height) / 2)
|
|
921
|
+
}
|
|
922
|
+
};
|
|
923
|
+
}, [size, width, height]);
|
|
924
|
+
const [location, setLocationOrigin] = react.useState(Object.assign({}, initLocation, defaultLocation));
|
|
925
|
+
const setLocation = useRefCallback__default["default"](value => {
|
|
926
|
+
setLocationOrigin(Object.assign({}, initLocation, value));
|
|
927
|
+
});
|
|
2567
928
|
const pdfSignature = react.useMemo(() => {
|
|
2568
|
-
if (!pdfProps) {
|
|
2569
|
-
return null;
|
|
2570
|
-
}
|
|
2571
|
-
const {
|
|
2572
|
-
size,
|
|
2573
|
-
currentPage
|
|
2574
|
-
} = pdfProps;
|
|
2575
929
|
const scaleX = size.width / size.originalWidth;
|
|
2576
930
|
const scaleY = size.height / size.originalHeight;
|
|
2577
931
|
const pdfX = Math.round(location.size.x / scaleX);
|
|
@@ -2590,14 +944,9 @@ const PDFSign = withLocale(/*#__PURE__*/react.forwardRef((_ref, ref) => {
|
|
|
2590
944
|
url,
|
|
2591
945
|
filename
|
|
2592
946
|
};
|
|
2593
|
-
}, [
|
|
947
|
+
}, [location, signature, url, filename, size, currentPage]);
|
|
2594
948
|
const signPdf = react.useCallback(function () {
|
|
2595
949
|
try {
|
|
2596
|
-
if (!pdfProps) {
|
|
2597
|
-
throw new Error(formatMessage({
|
|
2598
|
-
id: 'loadingError'
|
|
2599
|
-
}));
|
|
2600
|
-
}
|
|
2601
950
|
return Promise.resolve(signPdfFile(pdfSignature));
|
|
2602
951
|
} catch (e) {
|
|
2603
952
|
return Promise.reject(e);
|
|
@@ -2616,34 +965,51 @@ const PDFSign = withLocale(/*#__PURE__*/react.forwardRef((_ref, ref) => {
|
|
|
2616
965
|
location
|
|
2617
966
|
});
|
|
2618
967
|
}, [pdfSignature, location, handlerChange]);
|
|
968
|
+
return /*#__PURE__*/jsxRuntime.jsx(LocationLayer, {
|
|
969
|
+
stageWidth: size.width,
|
|
970
|
+
stageHeight: size.height,
|
|
971
|
+
width: width,
|
|
972
|
+
height: height,
|
|
973
|
+
padding: padding,
|
|
974
|
+
placeholder: placeholder,
|
|
975
|
+
signature: signature,
|
|
976
|
+
value: location,
|
|
977
|
+
onChange: setLocation
|
|
978
|
+
});
|
|
979
|
+
});
|
|
980
|
+
const PDFSign = withLocale(/*#__PURE__*/react.forwardRef((_ref2, ref) => {
|
|
981
|
+
let {
|
|
982
|
+
placeholder,
|
|
983
|
+
signature,
|
|
984
|
+
url,
|
|
985
|
+
width,
|
|
986
|
+
height,
|
|
987
|
+
padding,
|
|
988
|
+
filename = 'signed-document.pdf',
|
|
989
|
+
defaultLocation,
|
|
990
|
+
onChange
|
|
991
|
+
} = _ref2,
|
|
992
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded$1);
|
|
2619
993
|
return /*#__PURE__*/jsxRuntime.jsx(PDFViewer, _extends({}, props, {
|
|
2620
994
|
url: url,
|
|
2621
|
-
children:
|
|
995
|
+
children: _ref3 => {
|
|
2622
996
|
let {
|
|
2623
997
|
size,
|
|
2624
998
|
currentPage
|
|
2625
|
-
} =
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
currentPage
|
|
2634
|
-
});
|
|
2635
|
-
}
|
|
2636
|
-
}, 0);
|
|
2637
|
-
return /*#__PURE__*/jsxRuntime.jsx(LocationLayer, {
|
|
2638
|
-
stageWidth: size.width,
|
|
2639
|
-
stageHeight: size.height,
|
|
999
|
+
} = _ref3;
|
|
1000
|
+
return /*#__PURE__*/jsxRuntime.jsx(PDFSignInner, {
|
|
1001
|
+
ref: ref,
|
|
1002
|
+
size: size,
|
|
1003
|
+
currentPage: currentPage,
|
|
1004
|
+
url: url,
|
|
1005
|
+
filename: filename,
|
|
1006
|
+
defaultLocation: defaultLocation,
|
|
2640
1007
|
width: width,
|
|
2641
1008
|
height: height,
|
|
2642
1009
|
padding: padding,
|
|
2643
1010
|
placeholder: placeholder,
|
|
2644
1011
|
signature: signature,
|
|
2645
|
-
|
|
2646
|
-
onChange: setLocation
|
|
1012
|
+
onChange: onChange
|
|
2647
1013
|
});
|
|
2648
1014
|
}
|
|
2649
1015
|
}));
|