webgal-parser 4.6.1 → 4.6.2
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/build/cjs/index.cjs +16 -1250
- package/build/es/index.js +16 -1250
- package/build/umd/index.global.js +16 -1250
- package/package.json +3 -13
- package/src/sceneParser.ts +16 -2
- package/src/scriptParser/scriptParser.ts +1 -1
|
@@ -452,7 +452,7 @@ var webgalParser = (function (exports) {
|
|
|
452
452
|
const commentSplit = sentenceRaw.split(/(?<!\\);/);
|
|
453
453
|
let newSentenceRaw = commentSplit[0];
|
|
454
454
|
newSentenceRaw = newSentenceRaw.replaceAll('\\;', ';');
|
|
455
|
-
const sentenceComment = commentSplit
|
|
455
|
+
const sentenceComment = commentSplit.slice(1).join(';');
|
|
456
456
|
if (newSentenceRaw.trim() === '') {
|
|
457
457
|
// 注释提前返回
|
|
458
458
|
return {
|
|
@@ -517,1254 +517,6 @@ var webgalParser = (function (exports) {
|
|
|
517
517
|
};
|
|
518
518
|
};
|
|
519
519
|
|
|
520
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
521
|
-
|
|
522
|
-
/** Detect free variable `global` from Node.js. */
|
|
523
|
-
|
|
524
|
-
var freeGlobal$1 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
525
|
-
|
|
526
|
-
var _freeGlobal = freeGlobal$1;
|
|
527
|
-
|
|
528
|
-
var freeGlobal = _freeGlobal;
|
|
529
|
-
|
|
530
|
-
/** Detect free variable `self`. */
|
|
531
|
-
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
532
|
-
|
|
533
|
-
/** Used as a reference to the global object. */
|
|
534
|
-
var root$4 = freeGlobal || freeSelf || Function('return this')();
|
|
535
|
-
|
|
536
|
-
var _root = root$4;
|
|
537
|
-
|
|
538
|
-
var root$3 = _root;
|
|
539
|
-
|
|
540
|
-
/** Built-in value references. */
|
|
541
|
-
var Symbol$2 = root$3.Symbol;
|
|
542
|
-
|
|
543
|
-
var _Symbol = Symbol$2;
|
|
544
|
-
|
|
545
|
-
var Symbol$1 = _Symbol;
|
|
546
|
-
|
|
547
|
-
/** Used for built-in method references. */
|
|
548
|
-
var objectProto$4 = Object.prototype;
|
|
549
|
-
|
|
550
|
-
/** Used to check objects for own properties. */
|
|
551
|
-
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
552
|
-
|
|
553
|
-
/**
|
|
554
|
-
* Used to resolve the
|
|
555
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
556
|
-
* of values.
|
|
557
|
-
*/
|
|
558
|
-
var nativeObjectToString$1 = objectProto$4.toString;
|
|
559
|
-
|
|
560
|
-
/** Built-in value references. */
|
|
561
|
-
var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined;
|
|
562
|
-
|
|
563
|
-
/**
|
|
564
|
-
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
565
|
-
*
|
|
566
|
-
* @private
|
|
567
|
-
* @param {*} value The value to query.
|
|
568
|
-
* @returns {string} Returns the raw `toStringTag`.
|
|
569
|
-
*/
|
|
570
|
-
function getRawTag$1(value) {
|
|
571
|
-
var isOwn = hasOwnProperty$3.call(value, symToStringTag$1),
|
|
572
|
-
tag = value[symToStringTag$1];
|
|
573
|
-
|
|
574
|
-
try {
|
|
575
|
-
value[symToStringTag$1] = undefined;
|
|
576
|
-
var unmasked = true;
|
|
577
|
-
} catch (e) {}
|
|
578
|
-
|
|
579
|
-
var result = nativeObjectToString$1.call(value);
|
|
580
|
-
if (unmasked) {
|
|
581
|
-
if (isOwn) {
|
|
582
|
-
value[symToStringTag$1] = tag;
|
|
583
|
-
} else {
|
|
584
|
-
delete value[symToStringTag$1];
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
return result;
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
var _getRawTag = getRawTag$1;
|
|
591
|
-
|
|
592
|
-
/** Used for built-in method references. */
|
|
593
|
-
|
|
594
|
-
var objectProto$3 = Object.prototype;
|
|
595
|
-
|
|
596
|
-
/**
|
|
597
|
-
* Used to resolve the
|
|
598
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
599
|
-
* of values.
|
|
600
|
-
*/
|
|
601
|
-
var nativeObjectToString = objectProto$3.toString;
|
|
602
|
-
|
|
603
|
-
/**
|
|
604
|
-
* Converts `value` to a string using `Object.prototype.toString`.
|
|
605
|
-
*
|
|
606
|
-
* @private
|
|
607
|
-
* @param {*} value The value to convert.
|
|
608
|
-
* @returns {string} Returns the converted string.
|
|
609
|
-
*/
|
|
610
|
-
function objectToString$1(value) {
|
|
611
|
-
return nativeObjectToString.call(value);
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
var _objectToString = objectToString$1;
|
|
615
|
-
|
|
616
|
-
var Symbol = _Symbol,
|
|
617
|
-
getRawTag = _getRawTag,
|
|
618
|
-
objectToString = _objectToString;
|
|
619
|
-
|
|
620
|
-
/** `Object#toString` result references. */
|
|
621
|
-
var nullTag = '[object Null]',
|
|
622
|
-
undefinedTag = '[object Undefined]';
|
|
623
|
-
|
|
624
|
-
/** Built-in value references. */
|
|
625
|
-
var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
|
|
626
|
-
|
|
627
|
-
/**
|
|
628
|
-
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
629
|
-
*
|
|
630
|
-
* @private
|
|
631
|
-
* @param {*} value The value to query.
|
|
632
|
-
* @returns {string} Returns the `toStringTag`.
|
|
633
|
-
*/
|
|
634
|
-
function baseGetTag$1(value) {
|
|
635
|
-
if (value == null) {
|
|
636
|
-
return value === undefined ? undefinedTag : nullTag;
|
|
637
|
-
}
|
|
638
|
-
return (symToStringTag && symToStringTag in Object(value))
|
|
639
|
-
? getRawTag(value)
|
|
640
|
-
: objectToString(value);
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
var _baseGetTag = baseGetTag$1;
|
|
644
|
-
|
|
645
|
-
/**
|
|
646
|
-
* Checks if `value` is the
|
|
647
|
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
648
|
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
649
|
-
*
|
|
650
|
-
* @static
|
|
651
|
-
* @memberOf _
|
|
652
|
-
* @since 0.1.0
|
|
653
|
-
* @category Lang
|
|
654
|
-
* @param {*} value The value to check.
|
|
655
|
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
656
|
-
* @example
|
|
657
|
-
*
|
|
658
|
-
* _.isObject({});
|
|
659
|
-
* // => true
|
|
660
|
-
*
|
|
661
|
-
* _.isObject([1, 2, 3]);
|
|
662
|
-
* // => true
|
|
663
|
-
*
|
|
664
|
-
* _.isObject(_.noop);
|
|
665
|
-
* // => true
|
|
666
|
-
*
|
|
667
|
-
* _.isObject(null);
|
|
668
|
-
* // => false
|
|
669
|
-
*/
|
|
670
|
-
|
|
671
|
-
function isObject$2(value) {
|
|
672
|
-
var type = typeof value;
|
|
673
|
-
return value != null && (type == 'object' || type == 'function');
|
|
674
|
-
}
|
|
675
|
-
|
|
676
|
-
var isObject_1 = isObject$2;
|
|
677
|
-
|
|
678
|
-
var baseGetTag = _baseGetTag,
|
|
679
|
-
isObject$1 = isObject_1;
|
|
680
|
-
|
|
681
|
-
/** `Object#toString` result references. */
|
|
682
|
-
var asyncTag = '[object AsyncFunction]',
|
|
683
|
-
funcTag = '[object Function]',
|
|
684
|
-
genTag = '[object GeneratorFunction]',
|
|
685
|
-
proxyTag = '[object Proxy]';
|
|
686
|
-
|
|
687
|
-
/**
|
|
688
|
-
* Checks if `value` is classified as a `Function` object.
|
|
689
|
-
*
|
|
690
|
-
* @static
|
|
691
|
-
* @memberOf _
|
|
692
|
-
* @since 0.1.0
|
|
693
|
-
* @category Lang
|
|
694
|
-
* @param {*} value The value to check.
|
|
695
|
-
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
696
|
-
* @example
|
|
697
|
-
*
|
|
698
|
-
* _.isFunction(_);
|
|
699
|
-
* // => true
|
|
700
|
-
*
|
|
701
|
-
* _.isFunction(/abc/);
|
|
702
|
-
* // => false
|
|
703
|
-
*/
|
|
704
|
-
function isFunction$1(value) {
|
|
705
|
-
if (!isObject$1(value)) {
|
|
706
|
-
return false;
|
|
707
|
-
}
|
|
708
|
-
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
709
|
-
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
710
|
-
var tag = baseGetTag(value);
|
|
711
|
-
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
var isFunction_1 = isFunction$1;
|
|
715
|
-
|
|
716
|
-
var root$2 = _root;
|
|
717
|
-
|
|
718
|
-
/** Used to detect overreaching core-js shims. */
|
|
719
|
-
var coreJsData$1 = root$2['__core-js_shared__'];
|
|
720
|
-
|
|
721
|
-
var _coreJsData = coreJsData$1;
|
|
722
|
-
|
|
723
|
-
var coreJsData = _coreJsData;
|
|
724
|
-
|
|
725
|
-
/** Used to detect methods masquerading as native. */
|
|
726
|
-
var maskSrcKey = (function() {
|
|
727
|
-
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
|
|
728
|
-
return uid ? ('Symbol(src)_1.' + uid) : '';
|
|
729
|
-
}());
|
|
730
|
-
|
|
731
|
-
/**
|
|
732
|
-
* Checks if `func` has its source masked.
|
|
733
|
-
*
|
|
734
|
-
* @private
|
|
735
|
-
* @param {Function} func The function to check.
|
|
736
|
-
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
737
|
-
*/
|
|
738
|
-
function isMasked$1(func) {
|
|
739
|
-
return !!maskSrcKey && (maskSrcKey in func);
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
var _isMasked = isMasked$1;
|
|
743
|
-
|
|
744
|
-
/** Used for built-in method references. */
|
|
745
|
-
|
|
746
|
-
var funcProto$1 = Function.prototype;
|
|
747
|
-
|
|
748
|
-
/** Used to resolve the decompiled source of functions. */
|
|
749
|
-
var funcToString$1 = funcProto$1.toString;
|
|
750
|
-
|
|
751
|
-
/**
|
|
752
|
-
* Converts `func` to its source code.
|
|
753
|
-
*
|
|
754
|
-
* @private
|
|
755
|
-
* @param {Function} func The function to convert.
|
|
756
|
-
* @returns {string} Returns the source code.
|
|
757
|
-
*/
|
|
758
|
-
function toSource$1(func) {
|
|
759
|
-
if (func != null) {
|
|
760
|
-
try {
|
|
761
|
-
return funcToString$1.call(func);
|
|
762
|
-
} catch (e) {}
|
|
763
|
-
try {
|
|
764
|
-
return (func + '');
|
|
765
|
-
} catch (e) {}
|
|
766
|
-
}
|
|
767
|
-
return '';
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
var _toSource = toSource$1;
|
|
771
|
-
|
|
772
|
-
var isFunction = isFunction_1,
|
|
773
|
-
isMasked = _isMasked,
|
|
774
|
-
isObject = isObject_1,
|
|
775
|
-
toSource = _toSource;
|
|
776
|
-
|
|
777
|
-
/**
|
|
778
|
-
* Used to match `RegExp`
|
|
779
|
-
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
780
|
-
*/
|
|
781
|
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
782
|
-
|
|
783
|
-
/** Used to detect host constructors (Safari). */
|
|
784
|
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
785
|
-
|
|
786
|
-
/** Used for built-in method references. */
|
|
787
|
-
var funcProto = Function.prototype,
|
|
788
|
-
objectProto$2 = Object.prototype;
|
|
789
|
-
|
|
790
|
-
/** Used to resolve the decompiled source of functions. */
|
|
791
|
-
var funcToString = funcProto.toString;
|
|
792
|
-
|
|
793
|
-
/** Used to check objects for own properties. */
|
|
794
|
-
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
795
|
-
|
|
796
|
-
/** Used to detect if a method is native. */
|
|
797
|
-
var reIsNative = RegExp('^' +
|
|
798
|
-
funcToString.call(hasOwnProperty$2).replace(reRegExpChar, '\\$&')
|
|
799
|
-
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
800
|
-
);
|
|
801
|
-
|
|
802
|
-
/**
|
|
803
|
-
* The base implementation of `_.isNative` without bad shim checks.
|
|
804
|
-
*
|
|
805
|
-
* @private
|
|
806
|
-
* @param {*} value The value to check.
|
|
807
|
-
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
808
|
-
* else `false`.
|
|
809
|
-
*/
|
|
810
|
-
function baseIsNative$1(value) {
|
|
811
|
-
if (!isObject(value) || isMasked(value)) {
|
|
812
|
-
return false;
|
|
813
|
-
}
|
|
814
|
-
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
|
815
|
-
return pattern.test(toSource(value));
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
var _baseIsNative = baseIsNative$1;
|
|
819
|
-
|
|
820
|
-
/**
|
|
821
|
-
* Gets the value at `key` of `object`.
|
|
822
|
-
*
|
|
823
|
-
* @private
|
|
824
|
-
* @param {Object} [object] The object to query.
|
|
825
|
-
* @param {string} key The key of the property to get.
|
|
826
|
-
* @returns {*} Returns the property value.
|
|
827
|
-
*/
|
|
828
|
-
|
|
829
|
-
function getValue$1(object, key) {
|
|
830
|
-
return object == null ? undefined : object[key];
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
var _getValue = getValue$1;
|
|
834
|
-
|
|
835
|
-
var baseIsNative = _baseIsNative,
|
|
836
|
-
getValue = _getValue;
|
|
837
|
-
|
|
838
|
-
/**
|
|
839
|
-
* Gets the native function at `key` of `object`.
|
|
840
|
-
*
|
|
841
|
-
* @private
|
|
842
|
-
* @param {Object} object The object to query.
|
|
843
|
-
* @param {string} key The key of the method to get.
|
|
844
|
-
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
845
|
-
*/
|
|
846
|
-
function getNative$3(object, key) {
|
|
847
|
-
var value = getValue(object, key);
|
|
848
|
-
return baseIsNative(value) ? value : undefined;
|
|
849
|
-
}
|
|
850
|
-
|
|
851
|
-
var _getNative = getNative$3;
|
|
852
|
-
|
|
853
|
-
var getNative$2 = _getNative;
|
|
854
|
-
|
|
855
|
-
/* Built-in method references that are verified to be native. */
|
|
856
|
-
var nativeCreate$4 = getNative$2(Object, 'create');
|
|
857
|
-
|
|
858
|
-
var _nativeCreate = nativeCreate$4;
|
|
859
|
-
|
|
860
|
-
var nativeCreate$3 = _nativeCreate;
|
|
861
|
-
|
|
862
|
-
/**
|
|
863
|
-
* Removes all key-value entries from the hash.
|
|
864
|
-
*
|
|
865
|
-
* @private
|
|
866
|
-
* @name clear
|
|
867
|
-
* @memberOf Hash
|
|
868
|
-
*/
|
|
869
|
-
function hashClear$1() {
|
|
870
|
-
this.__data__ = nativeCreate$3 ? nativeCreate$3(null) : {};
|
|
871
|
-
this.size = 0;
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
var _hashClear = hashClear$1;
|
|
875
|
-
|
|
876
|
-
/**
|
|
877
|
-
* Removes `key` and its value from the hash.
|
|
878
|
-
*
|
|
879
|
-
* @private
|
|
880
|
-
* @name delete
|
|
881
|
-
* @memberOf Hash
|
|
882
|
-
* @param {Object} hash The hash to modify.
|
|
883
|
-
* @param {string} key The key of the value to remove.
|
|
884
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
885
|
-
*/
|
|
886
|
-
|
|
887
|
-
function hashDelete$1(key) {
|
|
888
|
-
var result = this.has(key) && delete this.__data__[key];
|
|
889
|
-
this.size -= result ? 1 : 0;
|
|
890
|
-
return result;
|
|
891
|
-
}
|
|
892
|
-
|
|
893
|
-
var _hashDelete = hashDelete$1;
|
|
894
|
-
|
|
895
|
-
var nativeCreate$2 = _nativeCreate;
|
|
896
|
-
|
|
897
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
898
|
-
var HASH_UNDEFINED$2 = '__lodash_hash_undefined__';
|
|
899
|
-
|
|
900
|
-
/** Used for built-in method references. */
|
|
901
|
-
var objectProto$1 = Object.prototype;
|
|
902
|
-
|
|
903
|
-
/** Used to check objects for own properties. */
|
|
904
|
-
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
905
|
-
|
|
906
|
-
/**
|
|
907
|
-
* Gets the hash value for `key`.
|
|
908
|
-
*
|
|
909
|
-
* @private
|
|
910
|
-
* @name get
|
|
911
|
-
* @memberOf Hash
|
|
912
|
-
* @param {string} key The key of the value to get.
|
|
913
|
-
* @returns {*} Returns the entry value.
|
|
914
|
-
*/
|
|
915
|
-
function hashGet$1(key) {
|
|
916
|
-
var data = this.__data__;
|
|
917
|
-
if (nativeCreate$2) {
|
|
918
|
-
var result = data[key];
|
|
919
|
-
return result === HASH_UNDEFINED$2 ? undefined : result;
|
|
920
|
-
}
|
|
921
|
-
return hasOwnProperty$1.call(data, key) ? data[key] : undefined;
|
|
922
|
-
}
|
|
923
|
-
|
|
924
|
-
var _hashGet = hashGet$1;
|
|
925
|
-
|
|
926
|
-
var nativeCreate$1 = _nativeCreate;
|
|
927
|
-
|
|
928
|
-
/** Used for built-in method references. */
|
|
929
|
-
var objectProto = Object.prototype;
|
|
930
|
-
|
|
931
|
-
/** Used to check objects for own properties. */
|
|
932
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
933
|
-
|
|
934
|
-
/**
|
|
935
|
-
* Checks if a hash value for `key` exists.
|
|
936
|
-
*
|
|
937
|
-
* @private
|
|
938
|
-
* @name has
|
|
939
|
-
* @memberOf Hash
|
|
940
|
-
* @param {string} key The key of the entry to check.
|
|
941
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
942
|
-
*/
|
|
943
|
-
function hashHas$1(key) {
|
|
944
|
-
var data = this.__data__;
|
|
945
|
-
return nativeCreate$1 ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
|
|
946
|
-
}
|
|
947
|
-
|
|
948
|
-
var _hashHas = hashHas$1;
|
|
949
|
-
|
|
950
|
-
var nativeCreate = _nativeCreate;
|
|
951
|
-
|
|
952
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
953
|
-
var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
|
|
954
|
-
|
|
955
|
-
/**
|
|
956
|
-
* Sets the hash `key` to `value`.
|
|
957
|
-
*
|
|
958
|
-
* @private
|
|
959
|
-
* @name set
|
|
960
|
-
* @memberOf Hash
|
|
961
|
-
* @param {string} key The key of the value to set.
|
|
962
|
-
* @param {*} value The value to set.
|
|
963
|
-
* @returns {Object} Returns the hash instance.
|
|
964
|
-
*/
|
|
965
|
-
function hashSet$1(key, value) {
|
|
966
|
-
var data = this.__data__;
|
|
967
|
-
this.size += this.has(key) ? 0 : 1;
|
|
968
|
-
data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED$1 : value;
|
|
969
|
-
return this;
|
|
970
|
-
}
|
|
971
|
-
|
|
972
|
-
var _hashSet = hashSet$1;
|
|
973
|
-
|
|
974
|
-
var hashClear = _hashClear,
|
|
975
|
-
hashDelete = _hashDelete,
|
|
976
|
-
hashGet = _hashGet,
|
|
977
|
-
hashHas = _hashHas,
|
|
978
|
-
hashSet = _hashSet;
|
|
979
|
-
|
|
980
|
-
/**
|
|
981
|
-
* Creates a hash object.
|
|
982
|
-
*
|
|
983
|
-
* @private
|
|
984
|
-
* @constructor
|
|
985
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
986
|
-
*/
|
|
987
|
-
function Hash$1(entries) {
|
|
988
|
-
var index = -1,
|
|
989
|
-
length = entries == null ? 0 : entries.length;
|
|
990
|
-
|
|
991
|
-
this.clear();
|
|
992
|
-
while (++index < length) {
|
|
993
|
-
var entry = entries[index];
|
|
994
|
-
this.set(entry[0], entry[1]);
|
|
995
|
-
}
|
|
996
|
-
}
|
|
997
|
-
|
|
998
|
-
// Add methods to `Hash`.
|
|
999
|
-
Hash$1.prototype.clear = hashClear;
|
|
1000
|
-
Hash$1.prototype['delete'] = hashDelete;
|
|
1001
|
-
Hash$1.prototype.get = hashGet;
|
|
1002
|
-
Hash$1.prototype.has = hashHas;
|
|
1003
|
-
Hash$1.prototype.set = hashSet;
|
|
1004
|
-
|
|
1005
|
-
var _Hash = Hash$1;
|
|
1006
|
-
|
|
1007
|
-
/**
|
|
1008
|
-
* Removes all key-value entries from the list cache.
|
|
1009
|
-
*
|
|
1010
|
-
* @private
|
|
1011
|
-
* @name clear
|
|
1012
|
-
* @memberOf ListCache
|
|
1013
|
-
*/
|
|
1014
|
-
|
|
1015
|
-
function listCacheClear$1() {
|
|
1016
|
-
this.__data__ = [];
|
|
1017
|
-
this.size = 0;
|
|
1018
|
-
}
|
|
1019
|
-
|
|
1020
|
-
var _listCacheClear = listCacheClear$1;
|
|
1021
|
-
|
|
1022
|
-
/**
|
|
1023
|
-
* Performs a
|
|
1024
|
-
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
1025
|
-
* comparison between two values to determine if they are equivalent.
|
|
1026
|
-
*
|
|
1027
|
-
* @static
|
|
1028
|
-
* @memberOf _
|
|
1029
|
-
* @since 4.0.0
|
|
1030
|
-
* @category Lang
|
|
1031
|
-
* @param {*} value The value to compare.
|
|
1032
|
-
* @param {*} other The other value to compare.
|
|
1033
|
-
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
1034
|
-
* @example
|
|
1035
|
-
*
|
|
1036
|
-
* var object = { 'a': 1 };
|
|
1037
|
-
* var other = { 'a': 1 };
|
|
1038
|
-
*
|
|
1039
|
-
* _.eq(object, object);
|
|
1040
|
-
* // => true
|
|
1041
|
-
*
|
|
1042
|
-
* _.eq(object, other);
|
|
1043
|
-
* // => false
|
|
1044
|
-
*
|
|
1045
|
-
* _.eq('a', 'a');
|
|
1046
|
-
* // => true
|
|
1047
|
-
*
|
|
1048
|
-
* _.eq('a', Object('a'));
|
|
1049
|
-
* // => false
|
|
1050
|
-
*
|
|
1051
|
-
* _.eq(NaN, NaN);
|
|
1052
|
-
* // => true
|
|
1053
|
-
*/
|
|
1054
|
-
|
|
1055
|
-
function eq$1(value, other) {
|
|
1056
|
-
return value === other || (value !== value && other !== other);
|
|
1057
|
-
}
|
|
1058
|
-
|
|
1059
|
-
var eq_1 = eq$1;
|
|
1060
|
-
|
|
1061
|
-
var eq = eq_1;
|
|
1062
|
-
|
|
1063
|
-
/**
|
|
1064
|
-
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
1065
|
-
*
|
|
1066
|
-
* @private
|
|
1067
|
-
* @param {Array} array The array to inspect.
|
|
1068
|
-
* @param {*} key The key to search for.
|
|
1069
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
1070
|
-
*/
|
|
1071
|
-
function assocIndexOf$4(array, key) {
|
|
1072
|
-
var length = array.length;
|
|
1073
|
-
while (length--) {
|
|
1074
|
-
if (eq(array[length][0], key)) {
|
|
1075
|
-
return length;
|
|
1076
|
-
}
|
|
1077
|
-
}
|
|
1078
|
-
return -1;
|
|
1079
|
-
}
|
|
1080
|
-
|
|
1081
|
-
var _assocIndexOf = assocIndexOf$4;
|
|
1082
|
-
|
|
1083
|
-
var assocIndexOf$3 = _assocIndexOf;
|
|
1084
|
-
|
|
1085
|
-
/** Used for built-in method references. */
|
|
1086
|
-
var arrayProto = Array.prototype;
|
|
1087
|
-
|
|
1088
|
-
/** Built-in value references. */
|
|
1089
|
-
var splice = arrayProto.splice;
|
|
1090
|
-
|
|
1091
|
-
/**
|
|
1092
|
-
* Removes `key` and its value from the list cache.
|
|
1093
|
-
*
|
|
1094
|
-
* @private
|
|
1095
|
-
* @name delete
|
|
1096
|
-
* @memberOf ListCache
|
|
1097
|
-
* @param {string} key The key of the value to remove.
|
|
1098
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1099
|
-
*/
|
|
1100
|
-
function listCacheDelete$1(key) {
|
|
1101
|
-
var data = this.__data__,
|
|
1102
|
-
index = assocIndexOf$3(data, key);
|
|
1103
|
-
|
|
1104
|
-
if (index < 0) {
|
|
1105
|
-
return false;
|
|
1106
|
-
}
|
|
1107
|
-
var lastIndex = data.length - 1;
|
|
1108
|
-
if (index == lastIndex) {
|
|
1109
|
-
data.pop();
|
|
1110
|
-
} else {
|
|
1111
|
-
splice.call(data, index, 1);
|
|
1112
|
-
}
|
|
1113
|
-
--this.size;
|
|
1114
|
-
return true;
|
|
1115
|
-
}
|
|
1116
|
-
|
|
1117
|
-
var _listCacheDelete = listCacheDelete$1;
|
|
1118
|
-
|
|
1119
|
-
var assocIndexOf$2 = _assocIndexOf;
|
|
1120
|
-
|
|
1121
|
-
/**
|
|
1122
|
-
* Gets the list cache value for `key`.
|
|
1123
|
-
*
|
|
1124
|
-
* @private
|
|
1125
|
-
* @name get
|
|
1126
|
-
* @memberOf ListCache
|
|
1127
|
-
* @param {string} key The key of the value to get.
|
|
1128
|
-
* @returns {*} Returns the entry value.
|
|
1129
|
-
*/
|
|
1130
|
-
function listCacheGet$1(key) {
|
|
1131
|
-
var data = this.__data__,
|
|
1132
|
-
index = assocIndexOf$2(data, key);
|
|
1133
|
-
|
|
1134
|
-
return index < 0 ? undefined : data[index][1];
|
|
1135
|
-
}
|
|
1136
|
-
|
|
1137
|
-
var _listCacheGet = listCacheGet$1;
|
|
1138
|
-
|
|
1139
|
-
var assocIndexOf$1 = _assocIndexOf;
|
|
1140
|
-
|
|
1141
|
-
/**
|
|
1142
|
-
* Checks if a list cache value for `key` exists.
|
|
1143
|
-
*
|
|
1144
|
-
* @private
|
|
1145
|
-
* @name has
|
|
1146
|
-
* @memberOf ListCache
|
|
1147
|
-
* @param {string} key The key of the entry to check.
|
|
1148
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1149
|
-
*/
|
|
1150
|
-
function listCacheHas$1(key) {
|
|
1151
|
-
return assocIndexOf$1(this.__data__, key) > -1;
|
|
1152
|
-
}
|
|
1153
|
-
|
|
1154
|
-
var _listCacheHas = listCacheHas$1;
|
|
1155
|
-
|
|
1156
|
-
var assocIndexOf = _assocIndexOf;
|
|
1157
|
-
|
|
1158
|
-
/**
|
|
1159
|
-
* Sets the list cache `key` to `value`.
|
|
1160
|
-
*
|
|
1161
|
-
* @private
|
|
1162
|
-
* @name set
|
|
1163
|
-
* @memberOf ListCache
|
|
1164
|
-
* @param {string} key The key of the value to set.
|
|
1165
|
-
* @param {*} value The value to set.
|
|
1166
|
-
* @returns {Object} Returns the list cache instance.
|
|
1167
|
-
*/
|
|
1168
|
-
function listCacheSet$1(key, value) {
|
|
1169
|
-
var data = this.__data__,
|
|
1170
|
-
index = assocIndexOf(data, key);
|
|
1171
|
-
|
|
1172
|
-
if (index < 0) {
|
|
1173
|
-
++this.size;
|
|
1174
|
-
data.push([key, value]);
|
|
1175
|
-
} else {
|
|
1176
|
-
data[index][1] = value;
|
|
1177
|
-
}
|
|
1178
|
-
return this;
|
|
1179
|
-
}
|
|
1180
|
-
|
|
1181
|
-
var _listCacheSet = listCacheSet$1;
|
|
1182
|
-
|
|
1183
|
-
var listCacheClear = _listCacheClear,
|
|
1184
|
-
listCacheDelete = _listCacheDelete,
|
|
1185
|
-
listCacheGet = _listCacheGet,
|
|
1186
|
-
listCacheHas = _listCacheHas,
|
|
1187
|
-
listCacheSet = _listCacheSet;
|
|
1188
|
-
|
|
1189
|
-
/**
|
|
1190
|
-
* Creates an list cache object.
|
|
1191
|
-
*
|
|
1192
|
-
* @private
|
|
1193
|
-
* @constructor
|
|
1194
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
1195
|
-
*/
|
|
1196
|
-
function ListCache$1(entries) {
|
|
1197
|
-
var index = -1,
|
|
1198
|
-
length = entries == null ? 0 : entries.length;
|
|
1199
|
-
|
|
1200
|
-
this.clear();
|
|
1201
|
-
while (++index < length) {
|
|
1202
|
-
var entry = entries[index];
|
|
1203
|
-
this.set(entry[0], entry[1]);
|
|
1204
|
-
}
|
|
1205
|
-
}
|
|
1206
|
-
|
|
1207
|
-
// Add methods to `ListCache`.
|
|
1208
|
-
ListCache$1.prototype.clear = listCacheClear;
|
|
1209
|
-
ListCache$1.prototype['delete'] = listCacheDelete;
|
|
1210
|
-
ListCache$1.prototype.get = listCacheGet;
|
|
1211
|
-
ListCache$1.prototype.has = listCacheHas;
|
|
1212
|
-
ListCache$1.prototype.set = listCacheSet;
|
|
1213
|
-
|
|
1214
|
-
var _ListCache = ListCache$1;
|
|
1215
|
-
|
|
1216
|
-
var getNative$1 = _getNative,
|
|
1217
|
-
root$1 = _root;
|
|
1218
|
-
|
|
1219
|
-
/* Built-in method references that are verified to be native. */
|
|
1220
|
-
var Map$2 = getNative$1(root$1, 'Map');
|
|
1221
|
-
|
|
1222
|
-
var _Map = Map$2;
|
|
1223
|
-
|
|
1224
|
-
var Hash = _Hash,
|
|
1225
|
-
ListCache = _ListCache,
|
|
1226
|
-
Map$1 = _Map;
|
|
1227
|
-
|
|
1228
|
-
/**
|
|
1229
|
-
* Removes all key-value entries from the map.
|
|
1230
|
-
*
|
|
1231
|
-
* @private
|
|
1232
|
-
* @name clear
|
|
1233
|
-
* @memberOf MapCache
|
|
1234
|
-
*/
|
|
1235
|
-
function mapCacheClear$1() {
|
|
1236
|
-
this.size = 0;
|
|
1237
|
-
this.__data__ = {
|
|
1238
|
-
'hash': new Hash,
|
|
1239
|
-
'map': new (Map$1 || ListCache),
|
|
1240
|
-
'string': new Hash
|
|
1241
|
-
};
|
|
1242
|
-
}
|
|
1243
|
-
|
|
1244
|
-
var _mapCacheClear = mapCacheClear$1;
|
|
1245
|
-
|
|
1246
|
-
/**
|
|
1247
|
-
* Checks if `value` is suitable for use as unique object key.
|
|
1248
|
-
*
|
|
1249
|
-
* @private
|
|
1250
|
-
* @param {*} value The value to check.
|
|
1251
|
-
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|
1252
|
-
*/
|
|
1253
|
-
|
|
1254
|
-
function isKeyable$1(value) {
|
|
1255
|
-
var type = typeof value;
|
|
1256
|
-
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
|
1257
|
-
? (value !== '__proto__')
|
|
1258
|
-
: (value === null);
|
|
1259
|
-
}
|
|
1260
|
-
|
|
1261
|
-
var _isKeyable = isKeyable$1;
|
|
1262
|
-
|
|
1263
|
-
var isKeyable = _isKeyable;
|
|
1264
|
-
|
|
1265
|
-
/**
|
|
1266
|
-
* Gets the data for `map`.
|
|
1267
|
-
*
|
|
1268
|
-
* @private
|
|
1269
|
-
* @param {Object} map The map to query.
|
|
1270
|
-
* @param {string} key The reference key.
|
|
1271
|
-
* @returns {*} Returns the map data.
|
|
1272
|
-
*/
|
|
1273
|
-
function getMapData$4(map, key) {
|
|
1274
|
-
var data = map.__data__;
|
|
1275
|
-
return isKeyable(key)
|
|
1276
|
-
? data[typeof key == 'string' ? 'string' : 'hash']
|
|
1277
|
-
: data.map;
|
|
1278
|
-
}
|
|
1279
|
-
|
|
1280
|
-
var _getMapData = getMapData$4;
|
|
1281
|
-
|
|
1282
|
-
var getMapData$3 = _getMapData;
|
|
1283
|
-
|
|
1284
|
-
/**
|
|
1285
|
-
* Removes `key` and its value from the map.
|
|
1286
|
-
*
|
|
1287
|
-
* @private
|
|
1288
|
-
* @name delete
|
|
1289
|
-
* @memberOf MapCache
|
|
1290
|
-
* @param {string} key The key of the value to remove.
|
|
1291
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1292
|
-
*/
|
|
1293
|
-
function mapCacheDelete$1(key) {
|
|
1294
|
-
var result = getMapData$3(this, key)['delete'](key);
|
|
1295
|
-
this.size -= result ? 1 : 0;
|
|
1296
|
-
return result;
|
|
1297
|
-
}
|
|
1298
|
-
|
|
1299
|
-
var _mapCacheDelete = mapCacheDelete$1;
|
|
1300
|
-
|
|
1301
|
-
var getMapData$2 = _getMapData;
|
|
1302
|
-
|
|
1303
|
-
/**
|
|
1304
|
-
* Gets the map value for `key`.
|
|
1305
|
-
*
|
|
1306
|
-
* @private
|
|
1307
|
-
* @name get
|
|
1308
|
-
* @memberOf MapCache
|
|
1309
|
-
* @param {string} key The key of the value to get.
|
|
1310
|
-
* @returns {*} Returns the entry value.
|
|
1311
|
-
*/
|
|
1312
|
-
function mapCacheGet$1(key) {
|
|
1313
|
-
return getMapData$2(this, key).get(key);
|
|
1314
|
-
}
|
|
1315
|
-
|
|
1316
|
-
var _mapCacheGet = mapCacheGet$1;
|
|
1317
|
-
|
|
1318
|
-
var getMapData$1 = _getMapData;
|
|
1319
|
-
|
|
1320
|
-
/**
|
|
1321
|
-
* Checks if a map value for `key` exists.
|
|
1322
|
-
*
|
|
1323
|
-
* @private
|
|
1324
|
-
* @name has
|
|
1325
|
-
* @memberOf MapCache
|
|
1326
|
-
* @param {string} key The key of the entry to check.
|
|
1327
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1328
|
-
*/
|
|
1329
|
-
function mapCacheHas$1(key) {
|
|
1330
|
-
return getMapData$1(this, key).has(key);
|
|
1331
|
-
}
|
|
1332
|
-
|
|
1333
|
-
var _mapCacheHas = mapCacheHas$1;
|
|
1334
|
-
|
|
1335
|
-
var getMapData = _getMapData;
|
|
1336
|
-
|
|
1337
|
-
/**
|
|
1338
|
-
* Sets the map `key` to `value`.
|
|
1339
|
-
*
|
|
1340
|
-
* @private
|
|
1341
|
-
* @name set
|
|
1342
|
-
* @memberOf MapCache
|
|
1343
|
-
* @param {string} key The key of the value to set.
|
|
1344
|
-
* @param {*} value The value to set.
|
|
1345
|
-
* @returns {Object} Returns the map cache instance.
|
|
1346
|
-
*/
|
|
1347
|
-
function mapCacheSet$1(key, value) {
|
|
1348
|
-
var data = getMapData(this, key),
|
|
1349
|
-
size = data.size;
|
|
1350
|
-
|
|
1351
|
-
data.set(key, value);
|
|
1352
|
-
this.size += data.size == size ? 0 : 1;
|
|
1353
|
-
return this;
|
|
1354
|
-
}
|
|
1355
|
-
|
|
1356
|
-
var _mapCacheSet = mapCacheSet$1;
|
|
1357
|
-
|
|
1358
|
-
var mapCacheClear = _mapCacheClear,
|
|
1359
|
-
mapCacheDelete = _mapCacheDelete,
|
|
1360
|
-
mapCacheGet = _mapCacheGet,
|
|
1361
|
-
mapCacheHas = _mapCacheHas,
|
|
1362
|
-
mapCacheSet = _mapCacheSet;
|
|
1363
|
-
|
|
1364
|
-
/**
|
|
1365
|
-
* Creates a map cache object to store key-value pairs.
|
|
1366
|
-
*
|
|
1367
|
-
* @private
|
|
1368
|
-
* @constructor
|
|
1369
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
1370
|
-
*/
|
|
1371
|
-
function MapCache$1(entries) {
|
|
1372
|
-
var index = -1,
|
|
1373
|
-
length = entries == null ? 0 : entries.length;
|
|
1374
|
-
|
|
1375
|
-
this.clear();
|
|
1376
|
-
while (++index < length) {
|
|
1377
|
-
var entry = entries[index];
|
|
1378
|
-
this.set(entry[0], entry[1]);
|
|
1379
|
-
}
|
|
1380
|
-
}
|
|
1381
|
-
|
|
1382
|
-
// Add methods to `MapCache`.
|
|
1383
|
-
MapCache$1.prototype.clear = mapCacheClear;
|
|
1384
|
-
MapCache$1.prototype['delete'] = mapCacheDelete;
|
|
1385
|
-
MapCache$1.prototype.get = mapCacheGet;
|
|
1386
|
-
MapCache$1.prototype.has = mapCacheHas;
|
|
1387
|
-
MapCache$1.prototype.set = mapCacheSet;
|
|
1388
|
-
|
|
1389
|
-
var _MapCache = MapCache$1;
|
|
1390
|
-
|
|
1391
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
1392
|
-
|
|
1393
|
-
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
1394
|
-
|
|
1395
|
-
/**
|
|
1396
|
-
* Adds `value` to the array cache.
|
|
1397
|
-
*
|
|
1398
|
-
* @private
|
|
1399
|
-
* @name add
|
|
1400
|
-
* @memberOf SetCache
|
|
1401
|
-
* @alias push
|
|
1402
|
-
* @param {*} value The value to cache.
|
|
1403
|
-
* @returns {Object} Returns the cache instance.
|
|
1404
|
-
*/
|
|
1405
|
-
function setCacheAdd$1(value) {
|
|
1406
|
-
this.__data__.set(value, HASH_UNDEFINED);
|
|
1407
|
-
return this;
|
|
1408
|
-
}
|
|
1409
|
-
|
|
1410
|
-
var _setCacheAdd = setCacheAdd$1;
|
|
1411
|
-
|
|
1412
|
-
/**
|
|
1413
|
-
* Checks if `value` is in the array cache.
|
|
1414
|
-
*
|
|
1415
|
-
* @private
|
|
1416
|
-
* @name has
|
|
1417
|
-
* @memberOf SetCache
|
|
1418
|
-
* @param {*} value The value to search for.
|
|
1419
|
-
* @returns {number} Returns `true` if `value` is found, else `false`.
|
|
1420
|
-
*/
|
|
1421
|
-
|
|
1422
|
-
function setCacheHas$1(value) {
|
|
1423
|
-
return this.__data__.has(value);
|
|
1424
|
-
}
|
|
1425
|
-
|
|
1426
|
-
var _setCacheHas = setCacheHas$1;
|
|
1427
|
-
|
|
1428
|
-
var MapCache = _MapCache,
|
|
1429
|
-
setCacheAdd = _setCacheAdd,
|
|
1430
|
-
setCacheHas = _setCacheHas;
|
|
1431
|
-
|
|
1432
|
-
/**
|
|
1433
|
-
*
|
|
1434
|
-
* Creates an array cache object to store unique values.
|
|
1435
|
-
*
|
|
1436
|
-
* @private
|
|
1437
|
-
* @constructor
|
|
1438
|
-
* @param {Array} [values] The values to cache.
|
|
1439
|
-
*/
|
|
1440
|
-
function SetCache$1(values) {
|
|
1441
|
-
var index = -1,
|
|
1442
|
-
length = values == null ? 0 : values.length;
|
|
1443
|
-
|
|
1444
|
-
this.__data__ = new MapCache;
|
|
1445
|
-
while (++index < length) {
|
|
1446
|
-
this.add(values[index]);
|
|
1447
|
-
}
|
|
1448
|
-
}
|
|
1449
|
-
|
|
1450
|
-
// Add methods to `SetCache`.
|
|
1451
|
-
SetCache$1.prototype.add = SetCache$1.prototype.push = setCacheAdd;
|
|
1452
|
-
SetCache$1.prototype.has = setCacheHas;
|
|
1453
|
-
|
|
1454
|
-
var _SetCache = SetCache$1;
|
|
1455
|
-
|
|
1456
|
-
/**
|
|
1457
|
-
* The base implementation of `_.findIndex` and `_.findLastIndex` without
|
|
1458
|
-
* support for iteratee shorthands.
|
|
1459
|
-
*
|
|
1460
|
-
* @private
|
|
1461
|
-
* @param {Array} array The array to inspect.
|
|
1462
|
-
* @param {Function} predicate The function invoked per iteration.
|
|
1463
|
-
* @param {number} fromIndex The index to search from.
|
|
1464
|
-
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
1465
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
1466
|
-
*/
|
|
1467
|
-
|
|
1468
|
-
function baseFindIndex$1(array, predicate, fromIndex, fromRight) {
|
|
1469
|
-
var length = array.length,
|
|
1470
|
-
index = fromIndex + (fromRight ? 1 : -1);
|
|
1471
|
-
|
|
1472
|
-
while ((fromRight ? index-- : ++index < length)) {
|
|
1473
|
-
if (predicate(array[index], index, array)) {
|
|
1474
|
-
return index;
|
|
1475
|
-
}
|
|
1476
|
-
}
|
|
1477
|
-
return -1;
|
|
1478
|
-
}
|
|
1479
|
-
|
|
1480
|
-
var _baseFindIndex = baseFindIndex$1;
|
|
1481
|
-
|
|
1482
|
-
/**
|
|
1483
|
-
* The base implementation of `_.isNaN` without support for number objects.
|
|
1484
|
-
*
|
|
1485
|
-
* @private
|
|
1486
|
-
* @param {*} value The value to check.
|
|
1487
|
-
* @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
|
|
1488
|
-
*/
|
|
1489
|
-
|
|
1490
|
-
function baseIsNaN$1(value) {
|
|
1491
|
-
return value !== value;
|
|
1492
|
-
}
|
|
1493
|
-
|
|
1494
|
-
var _baseIsNaN = baseIsNaN$1;
|
|
1495
|
-
|
|
1496
|
-
/**
|
|
1497
|
-
* A specialized version of `_.indexOf` which performs strict equality
|
|
1498
|
-
* comparisons of values, i.e. `===`.
|
|
1499
|
-
*
|
|
1500
|
-
* @private
|
|
1501
|
-
* @param {Array} array The array to inspect.
|
|
1502
|
-
* @param {*} value The value to search for.
|
|
1503
|
-
* @param {number} fromIndex The index to search from.
|
|
1504
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
1505
|
-
*/
|
|
1506
|
-
|
|
1507
|
-
function strictIndexOf$1(array, value, fromIndex) {
|
|
1508
|
-
var index = fromIndex - 1,
|
|
1509
|
-
length = array.length;
|
|
1510
|
-
|
|
1511
|
-
while (++index < length) {
|
|
1512
|
-
if (array[index] === value) {
|
|
1513
|
-
return index;
|
|
1514
|
-
}
|
|
1515
|
-
}
|
|
1516
|
-
return -1;
|
|
1517
|
-
}
|
|
1518
|
-
|
|
1519
|
-
var _strictIndexOf = strictIndexOf$1;
|
|
1520
|
-
|
|
1521
|
-
var baseFindIndex = _baseFindIndex,
|
|
1522
|
-
baseIsNaN = _baseIsNaN,
|
|
1523
|
-
strictIndexOf = _strictIndexOf;
|
|
1524
|
-
|
|
1525
|
-
/**
|
|
1526
|
-
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
|
|
1527
|
-
*
|
|
1528
|
-
* @private
|
|
1529
|
-
* @param {Array} array The array to inspect.
|
|
1530
|
-
* @param {*} value The value to search for.
|
|
1531
|
-
* @param {number} fromIndex The index to search from.
|
|
1532
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
1533
|
-
*/
|
|
1534
|
-
function baseIndexOf$1(array, value, fromIndex) {
|
|
1535
|
-
return value === value
|
|
1536
|
-
? strictIndexOf(array, value, fromIndex)
|
|
1537
|
-
: baseFindIndex(array, baseIsNaN, fromIndex);
|
|
1538
|
-
}
|
|
1539
|
-
|
|
1540
|
-
var _baseIndexOf = baseIndexOf$1;
|
|
1541
|
-
|
|
1542
|
-
var baseIndexOf = _baseIndexOf;
|
|
1543
|
-
|
|
1544
|
-
/**
|
|
1545
|
-
* A specialized version of `_.includes` for arrays without support for
|
|
1546
|
-
* specifying an index to search from.
|
|
1547
|
-
*
|
|
1548
|
-
* @private
|
|
1549
|
-
* @param {Array} [array] The array to inspect.
|
|
1550
|
-
* @param {*} target The value to search for.
|
|
1551
|
-
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
|
1552
|
-
*/
|
|
1553
|
-
function arrayIncludes$1(array, value) {
|
|
1554
|
-
var length = array == null ? 0 : array.length;
|
|
1555
|
-
return !!length && baseIndexOf(array, value, 0) > -1;
|
|
1556
|
-
}
|
|
1557
|
-
|
|
1558
|
-
var _arrayIncludes = arrayIncludes$1;
|
|
1559
|
-
|
|
1560
|
-
/**
|
|
1561
|
-
* This function is like `arrayIncludes` except that it accepts a comparator.
|
|
1562
|
-
*
|
|
1563
|
-
* @private
|
|
1564
|
-
* @param {Array} [array] The array to inspect.
|
|
1565
|
-
* @param {*} target The value to search for.
|
|
1566
|
-
* @param {Function} comparator The comparator invoked per element.
|
|
1567
|
-
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
|
1568
|
-
*/
|
|
1569
|
-
|
|
1570
|
-
function arrayIncludesWith$1(array, value, comparator) {
|
|
1571
|
-
var index = -1,
|
|
1572
|
-
length = array == null ? 0 : array.length;
|
|
1573
|
-
|
|
1574
|
-
while (++index < length) {
|
|
1575
|
-
if (comparator(value, array[index])) {
|
|
1576
|
-
return true;
|
|
1577
|
-
}
|
|
1578
|
-
}
|
|
1579
|
-
return false;
|
|
1580
|
-
}
|
|
1581
|
-
|
|
1582
|
-
var _arrayIncludesWith = arrayIncludesWith$1;
|
|
1583
|
-
|
|
1584
|
-
/**
|
|
1585
|
-
* Checks if a `cache` value for `key` exists.
|
|
1586
|
-
*
|
|
1587
|
-
* @private
|
|
1588
|
-
* @param {Object} cache The cache to query.
|
|
1589
|
-
* @param {string} key The key of the entry to check.
|
|
1590
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1591
|
-
*/
|
|
1592
|
-
|
|
1593
|
-
function cacheHas$1(cache, key) {
|
|
1594
|
-
return cache.has(key);
|
|
1595
|
-
}
|
|
1596
|
-
|
|
1597
|
-
var _cacheHas = cacheHas$1;
|
|
1598
|
-
|
|
1599
|
-
var getNative = _getNative,
|
|
1600
|
-
root = _root;
|
|
1601
|
-
|
|
1602
|
-
/* Built-in method references that are verified to be native. */
|
|
1603
|
-
var Set$1 = getNative(root, 'Set');
|
|
1604
|
-
|
|
1605
|
-
var _Set = Set$1;
|
|
1606
|
-
|
|
1607
|
-
/**
|
|
1608
|
-
* This method returns `undefined`.
|
|
1609
|
-
*
|
|
1610
|
-
* @static
|
|
1611
|
-
* @memberOf _
|
|
1612
|
-
* @since 2.3.0
|
|
1613
|
-
* @category Util
|
|
1614
|
-
* @example
|
|
1615
|
-
*
|
|
1616
|
-
* _.times(2, _.noop);
|
|
1617
|
-
* // => [undefined, undefined]
|
|
1618
|
-
*/
|
|
1619
|
-
|
|
1620
|
-
function noop$1() {
|
|
1621
|
-
// No operation performed.
|
|
1622
|
-
}
|
|
1623
|
-
|
|
1624
|
-
var noop_1 = noop$1;
|
|
1625
|
-
|
|
1626
|
-
/**
|
|
1627
|
-
* Converts `set` to an array of its values.
|
|
1628
|
-
*
|
|
1629
|
-
* @private
|
|
1630
|
-
* @param {Object} set The set to convert.
|
|
1631
|
-
* @returns {Array} Returns the values.
|
|
1632
|
-
*/
|
|
1633
|
-
|
|
1634
|
-
function setToArray$2(set) {
|
|
1635
|
-
var index = -1,
|
|
1636
|
-
result = Array(set.size);
|
|
1637
|
-
|
|
1638
|
-
set.forEach(function(value) {
|
|
1639
|
-
result[++index] = value;
|
|
1640
|
-
});
|
|
1641
|
-
return result;
|
|
1642
|
-
}
|
|
1643
|
-
|
|
1644
|
-
var _setToArray = setToArray$2;
|
|
1645
|
-
|
|
1646
|
-
var Set = _Set,
|
|
1647
|
-
noop = noop_1,
|
|
1648
|
-
setToArray$1 = _setToArray;
|
|
1649
|
-
|
|
1650
|
-
/** Used as references for various `Number` constants. */
|
|
1651
|
-
var INFINITY = 1 / 0;
|
|
1652
|
-
|
|
1653
|
-
/**
|
|
1654
|
-
* Creates a set object of `values`.
|
|
1655
|
-
*
|
|
1656
|
-
* @private
|
|
1657
|
-
* @param {Array} values The values to add to the set.
|
|
1658
|
-
* @returns {Object} Returns the new set.
|
|
1659
|
-
*/
|
|
1660
|
-
var createSet$1 = !(Set && (1 / setToArray$1(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
|
|
1661
|
-
return new Set(values);
|
|
1662
|
-
};
|
|
1663
|
-
|
|
1664
|
-
var _createSet = createSet$1;
|
|
1665
|
-
|
|
1666
|
-
var SetCache = _SetCache,
|
|
1667
|
-
arrayIncludes = _arrayIncludes,
|
|
1668
|
-
arrayIncludesWith = _arrayIncludesWith,
|
|
1669
|
-
cacheHas = _cacheHas,
|
|
1670
|
-
createSet = _createSet,
|
|
1671
|
-
setToArray = _setToArray;
|
|
1672
|
-
|
|
1673
|
-
/** Used as the size to enable large array optimizations. */
|
|
1674
|
-
var LARGE_ARRAY_SIZE = 200;
|
|
1675
|
-
|
|
1676
|
-
/**
|
|
1677
|
-
* The base implementation of `_.uniqBy` without support for iteratee shorthands.
|
|
1678
|
-
*
|
|
1679
|
-
* @private
|
|
1680
|
-
* @param {Array} array The array to inspect.
|
|
1681
|
-
* @param {Function} [iteratee] The iteratee invoked per element.
|
|
1682
|
-
* @param {Function} [comparator] The comparator invoked per element.
|
|
1683
|
-
* @returns {Array} Returns the new duplicate free array.
|
|
1684
|
-
*/
|
|
1685
|
-
function baseUniq$1(array, iteratee, comparator) {
|
|
1686
|
-
var index = -1,
|
|
1687
|
-
includes = arrayIncludes,
|
|
1688
|
-
length = array.length,
|
|
1689
|
-
isCommon = true,
|
|
1690
|
-
result = [],
|
|
1691
|
-
seen = result;
|
|
1692
|
-
|
|
1693
|
-
if (comparator) {
|
|
1694
|
-
isCommon = false;
|
|
1695
|
-
includes = arrayIncludesWith;
|
|
1696
|
-
}
|
|
1697
|
-
else if (length >= LARGE_ARRAY_SIZE) {
|
|
1698
|
-
var set = iteratee ? null : createSet(array);
|
|
1699
|
-
if (set) {
|
|
1700
|
-
return setToArray(set);
|
|
1701
|
-
}
|
|
1702
|
-
isCommon = false;
|
|
1703
|
-
includes = cacheHas;
|
|
1704
|
-
seen = new SetCache;
|
|
1705
|
-
}
|
|
1706
|
-
else {
|
|
1707
|
-
seen = iteratee ? [] : result;
|
|
1708
|
-
}
|
|
1709
|
-
outer:
|
|
1710
|
-
while (++index < length) {
|
|
1711
|
-
var value = array[index],
|
|
1712
|
-
computed = iteratee ? iteratee(value) : value;
|
|
1713
|
-
|
|
1714
|
-
value = (comparator || value !== 0) ? value : 0;
|
|
1715
|
-
if (isCommon && computed === computed) {
|
|
1716
|
-
var seenIndex = seen.length;
|
|
1717
|
-
while (seenIndex--) {
|
|
1718
|
-
if (seen[seenIndex] === computed) {
|
|
1719
|
-
continue outer;
|
|
1720
|
-
}
|
|
1721
|
-
}
|
|
1722
|
-
if (iteratee) {
|
|
1723
|
-
seen.push(computed);
|
|
1724
|
-
}
|
|
1725
|
-
result.push(value);
|
|
1726
|
-
}
|
|
1727
|
-
else if (!includes(seen, computed, comparator)) {
|
|
1728
|
-
if (seen !== result) {
|
|
1729
|
-
seen.push(computed);
|
|
1730
|
-
}
|
|
1731
|
-
result.push(value);
|
|
1732
|
-
}
|
|
1733
|
-
}
|
|
1734
|
-
return result;
|
|
1735
|
-
}
|
|
1736
|
-
|
|
1737
|
-
var _baseUniq = baseUniq$1;
|
|
1738
|
-
|
|
1739
|
-
var baseUniq = _baseUniq;
|
|
1740
|
-
|
|
1741
|
-
/**
|
|
1742
|
-
* This method is like `_.uniq` except that it accepts `comparator` which
|
|
1743
|
-
* is invoked to compare elements of `array`. The order of result values is
|
|
1744
|
-
* determined by the order they occur in the array.The comparator is invoked
|
|
1745
|
-
* with two arguments: (arrVal, othVal).
|
|
1746
|
-
*
|
|
1747
|
-
* @static
|
|
1748
|
-
* @memberOf _
|
|
1749
|
-
* @since 4.0.0
|
|
1750
|
-
* @category Array
|
|
1751
|
-
* @param {Array} array The array to inspect.
|
|
1752
|
-
* @param {Function} [comparator] The comparator invoked per element.
|
|
1753
|
-
* @returns {Array} Returns the new duplicate free array.
|
|
1754
|
-
* @example
|
|
1755
|
-
*
|
|
1756
|
-
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
|
|
1757
|
-
*
|
|
1758
|
-
* _.uniqWith(objects, _.isEqual);
|
|
1759
|
-
* // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
|
|
1760
|
-
*/
|
|
1761
|
-
function uniqWith(array, comparator) {
|
|
1762
|
-
comparator = typeof comparator == 'function' ? comparator : undefined;
|
|
1763
|
-
return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
|
|
1764
|
-
}
|
|
1765
|
-
|
|
1766
|
-
var uniqWith_1 = uniqWith;
|
|
1767
|
-
|
|
1768
520
|
/**
|
|
1769
521
|
* 场景解析器
|
|
1770
522
|
* @param rawScene 原始场景
|
|
@@ -1792,7 +544,7 @@ var webgalParser = (function (exports) {
|
|
|
1792
544
|
return returnSentence;
|
|
1793
545
|
});
|
|
1794
546
|
// 开始资源的预加载
|
|
1795
|
-
assetsList =
|
|
547
|
+
assetsList = deduplicateAssets(assetsList);
|
|
1796
548
|
assetsPrefetcher(assetsList);
|
|
1797
549
|
return {
|
|
1798
550
|
sceneName: sceneName,
|
|
@@ -1801,6 +553,20 @@ var webgalParser = (function (exports) {
|
|
|
1801
553
|
assetsList: assetsList,
|
|
1802
554
|
subSceneList: subSceneList, // 子场景列表
|
|
1803
555
|
};
|
|
556
|
+
};
|
|
557
|
+
const deduplicateAssets = (assetsList) => {
|
|
558
|
+
const seenAssets = new Set();
|
|
559
|
+
return assetsList.filter((asset) => {
|
|
560
|
+
if (!asset || typeof asset.url !== 'string' || asset.url === '') {
|
|
561
|
+
return false;
|
|
562
|
+
}
|
|
563
|
+
const assetKey = `${asset.type}:${asset.url}`;
|
|
564
|
+
if (seenAssets.has(assetKey)) {
|
|
565
|
+
return false;
|
|
566
|
+
}
|
|
567
|
+
seenAssets.add(assetKey);
|
|
568
|
+
return true;
|
|
569
|
+
});
|
|
1804
570
|
};
|
|
1805
571
|
|
|
1806
572
|
function scss2cssinjsParser(scssString) {
|