@teselagen/sequence-utils 0.1.12 → 0.1.14
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/addGapsToSeqReads.test.d.ts +1 -0
- package/adjustBpsToReplaceOrInsert.test.d.ts +1 -0
- package/aminoAcidToDnaRna.test.d.ts +1 -0
- package/annotateSingleSeq.test.d.ts +1 -0
- package/autoAnnotate.test.d.ts +1 -0
- package/bioData.d.ts +192 -192
- package/calculateNebTa.test.d.ts +1 -0
- package/calculateNebTm.test.d.ts +1 -0
- package/calculatePercentGC.test.d.ts +1 -0
- package/calculateTm.test.d.ts +1 -0
- package/computeDigestFragments.test.d.ts +1 -0
- package/condensePairwiseAlignmentDifferences.test.d.ts +1 -0
- package/convertAACaretPositionOrRangeToDna.test.d.ts +1 -0
- package/convertDnaCaretPositionOrRangeToAA.test.d.ts +1 -0
- package/cutSequenceByRestrictionEnzyme.test.d.ts +1 -0
- package/deleteSequenceDataAtRange.test.d.ts +1 -0
- package/diffUtils.test.d.ts +1 -0
- package/doesEnzymeChopOutsideOfRecognitionSite.test.d.ts +1 -0
- package/featureTypesAndColors.test.d.ts +1 -0
- package/filterAminoAcidSequenceString.test.d.ts +1 -0
- package/filterSequenceString.test.d.ts +1 -0
- package/findNearestRangeOfSequenceOverlapToPosition.test.d.ts +1 -0
- package/findSequenceMatches.test.d.ts +1 -0
- package/generateSequenceData.test.d.ts +1 -0
- package/getAllInsertionsInSeqReads.test.d.ts +1 -0
- package/getAminoAcidDataForEachBaseOfDna.test.d.ts +1 -0
- package/getAminoAcidStringFromSequenceString.test.d.ts +1 -0
- package/getDigestFragmentsForRestrictionEnzymes.test.d.ts +1 -0
- package/getInsertBetweenVals.test.d.ts +1 -0
- package/getLeftAndRightOfSequenceInRangeGivenPosition.test.d.ts +1 -0
- package/getMassofAaString.test.d.ts +1 -0
- package/getOrfsFromSequence.test.d.ts +1 -0
- package/getOverlapBetweenTwoSequences.d.ts +1 -1
- package/getOverlapBetweenTwoSequences.test.d.ts +1 -0
- package/getPossiblePartsFromSequenceAndEnzymes.test.d.ts +1 -0
- package/getReverseAminoAcidStringFromSequenceString.test.d.ts +1 -0
- package/getReverseComplementAnnotation.test.d.ts +1 -0
- package/getReverseComplementSequenceAndAnnotations.test.d.ts +1 -0
- package/getReverseComplementSequenceString.test.d.ts +1 -0
- package/getReverseSequenceString.test.d.ts +1 -0
- package/getSequenceDataBetweenRange.test.d.ts +1 -0
- package/getVirtualDigest.test.d.ts +1 -0
- package/guessIfSequenceIsDnaAndNotProtein.test.d.ts +1 -0
- package/index.d.ts +7 -7
- package/index.js +774 -696
- package/index.mjs +774 -696
- package/index.test.d.ts +1 -0
- package/index.umd.js +775 -697
- package/insertGapsIntoRefSeq.test.d.ts +1 -0
- package/insertSequenceDataAtPosition.test.d.ts +1 -0
- package/insertSequenceDataAtPositionOrRange.test.d.ts +1 -0
- package/mapAnnotationsToRows.test.d.ts +1 -0
- package/package.json +3 -3
- package/prepareCircularViewData.test.d.ts +1 -0
- package/prepareRowData.test.d.ts +1 -0
- package/rotateBpsToPosition.test.d.ts +1 -0
- package/rotateSequenceDataToPosition.test.d.ts +1 -0
- package/tidyUpSequenceData.test.d.ts +1 -0
package/index.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(global2, factory) {
|
|
2
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2
|
|
2
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.sequenceUtils = {}));
|
|
3
3
|
})(this, function(exports2) {
|
|
4
4
|
"use strict";var __defProp = Object.defineProperty;
|
|
5
5
|
var __defProps = Object.defineProperties;
|
|
@@ -396,18 +396,18 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
396
396
|
}
|
|
397
397
|
__name(apply, "apply");
|
|
398
398
|
function arrayAggregator(array, setter, iteratee, accumulator) {
|
|
399
|
-
var
|
|
400
|
-
while (++
|
|
401
|
-
var value = array[
|
|
399
|
+
var index = -1, length = array == null ? 0 : array.length;
|
|
400
|
+
while (++index < length) {
|
|
401
|
+
var value = array[index];
|
|
402
402
|
setter(accumulator, value, iteratee(value), array);
|
|
403
403
|
}
|
|
404
404
|
return accumulator;
|
|
405
405
|
}
|
|
406
406
|
__name(arrayAggregator, "arrayAggregator");
|
|
407
407
|
function arrayEach(array, iteratee) {
|
|
408
|
-
var
|
|
409
|
-
while (++
|
|
410
|
-
if (iteratee(array[
|
|
408
|
+
var index = -1, length = array == null ? 0 : array.length;
|
|
409
|
+
while (++index < length) {
|
|
410
|
+
if (iteratee(array[index], index, array) === false) {
|
|
411
411
|
break;
|
|
412
412
|
}
|
|
413
413
|
}
|
|
@@ -425,9 +425,9 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
425
425
|
}
|
|
426
426
|
__name(arrayEachRight, "arrayEachRight");
|
|
427
427
|
function arrayEvery(array, predicate) {
|
|
428
|
-
var
|
|
429
|
-
while (++
|
|
430
|
-
if (!predicate(array[
|
|
428
|
+
var index = -1, length = array == null ? 0 : array.length;
|
|
429
|
+
while (++index < length) {
|
|
430
|
+
if (!predicate(array[index], index, array)) {
|
|
431
431
|
return false;
|
|
432
432
|
}
|
|
433
433
|
}
|
|
@@ -435,10 +435,10 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
435
435
|
}
|
|
436
436
|
__name(arrayEvery, "arrayEvery");
|
|
437
437
|
function arrayFilter(array, predicate) {
|
|
438
|
-
var
|
|
439
|
-
while (++
|
|
440
|
-
var value = array[
|
|
441
|
-
if (predicate(value,
|
|
438
|
+
var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
|
|
439
|
+
while (++index < length) {
|
|
440
|
+
var value = array[index];
|
|
441
|
+
if (predicate(value, index, array)) {
|
|
442
442
|
result[resIndex++] = value;
|
|
443
443
|
}
|
|
444
444
|
}
|
|
@@ -451,9 +451,9 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
451
451
|
}
|
|
452
452
|
__name(arrayIncludes, "arrayIncludes");
|
|
453
453
|
function arrayIncludesWith(array, value, comparator) {
|
|
454
|
-
var
|
|
455
|
-
while (++
|
|
456
|
-
if (comparator(value, array[
|
|
454
|
+
var index = -1, length = array == null ? 0 : array.length;
|
|
455
|
+
while (++index < length) {
|
|
456
|
+
if (comparator(value, array[index])) {
|
|
457
457
|
return true;
|
|
458
458
|
}
|
|
459
459
|
}
|
|
@@ -461,28 +461,28 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
461
461
|
}
|
|
462
462
|
__name(arrayIncludesWith, "arrayIncludesWith");
|
|
463
463
|
function arrayMap(array, iteratee) {
|
|
464
|
-
var
|
|
465
|
-
while (++
|
|
466
|
-
result[
|
|
464
|
+
var index = -1, length = array == null ? 0 : array.length, result = Array(length);
|
|
465
|
+
while (++index < length) {
|
|
466
|
+
result[index] = iteratee(array[index], index, array);
|
|
467
467
|
}
|
|
468
468
|
return result;
|
|
469
469
|
}
|
|
470
470
|
__name(arrayMap, "arrayMap");
|
|
471
471
|
function arrayPush(array, values) {
|
|
472
|
-
var
|
|
473
|
-
while (++
|
|
474
|
-
array[offset +
|
|
472
|
+
var index = -1, length = values.length, offset = array.length;
|
|
473
|
+
while (++index < length) {
|
|
474
|
+
array[offset + index] = values[index];
|
|
475
475
|
}
|
|
476
476
|
return array;
|
|
477
477
|
}
|
|
478
478
|
__name(arrayPush, "arrayPush");
|
|
479
479
|
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
|
480
|
-
var
|
|
480
|
+
var index = -1, length = array == null ? 0 : array.length;
|
|
481
481
|
if (initAccum && length) {
|
|
482
|
-
accumulator = array[++
|
|
482
|
+
accumulator = array[++index];
|
|
483
483
|
}
|
|
484
|
-
while (++
|
|
485
|
-
accumulator = iteratee(accumulator, array[
|
|
484
|
+
while (++index < length) {
|
|
485
|
+
accumulator = iteratee(accumulator, array[index], index, array);
|
|
486
486
|
}
|
|
487
487
|
return accumulator;
|
|
488
488
|
}
|
|
@@ -499,9 +499,9 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
499
499
|
}
|
|
500
500
|
__name(arrayReduceRight, "arrayReduceRight");
|
|
501
501
|
function arraySome(array, predicate) {
|
|
502
|
-
var
|
|
503
|
-
while (++
|
|
504
|
-
if (predicate(array[
|
|
502
|
+
var index = -1, length = array == null ? 0 : array.length;
|
|
503
|
+
while (++index < length) {
|
|
504
|
+
if (predicate(array[index], index, array)) {
|
|
505
505
|
return true;
|
|
506
506
|
}
|
|
507
507
|
}
|
|
@@ -529,10 +529,10 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
529
529
|
}
|
|
530
530
|
__name(baseFindKey, "baseFindKey");
|
|
531
531
|
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
|
532
|
-
var length = array.length,
|
|
533
|
-
while (fromRight ?
|
|
534
|
-
if (predicate(array[
|
|
535
|
-
return
|
|
532
|
+
var length = array.length, index = fromIndex + (fromRight ? 1 : -1);
|
|
533
|
+
while (fromRight ? index-- : ++index < length) {
|
|
534
|
+
if (predicate(array[index], index, array)) {
|
|
535
|
+
return index;
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
538
|
return -1;
|
|
@@ -543,10 +543,10 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
543
543
|
}
|
|
544
544
|
__name(baseIndexOf, "baseIndexOf");
|
|
545
545
|
function baseIndexOfWith(array, value, fromIndex, comparator) {
|
|
546
|
-
var
|
|
547
|
-
while (++
|
|
548
|
-
if (comparator(array[
|
|
549
|
-
return
|
|
546
|
+
var index = fromIndex - 1, length = array.length;
|
|
547
|
+
while (++index < length) {
|
|
548
|
+
if (comparator(array[index], value)) {
|
|
549
|
+
return index;
|
|
550
550
|
}
|
|
551
551
|
}
|
|
552
552
|
return -1;
|
|
@@ -574,8 +574,8 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
574
574
|
}
|
|
575
575
|
__name(basePropertyOf, "basePropertyOf");
|
|
576
576
|
function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
|
|
577
|
-
eachFunc(collection, function(value,
|
|
578
|
-
accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value,
|
|
577
|
+
eachFunc(collection, function(value, index, collection2) {
|
|
578
|
+
accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index, collection2);
|
|
579
579
|
});
|
|
580
580
|
return accumulator;
|
|
581
581
|
}
|
|
@@ -590,9 +590,9 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
590
590
|
}
|
|
591
591
|
__name(baseSortBy, "baseSortBy");
|
|
592
592
|
function baseSum(array, iteratee) {
|
|
593
|
-
var result,
|
|
594
|
-
while (++
|
|
595
|
-
var current = iteratee(array[
|
|
593
|
+
var result, index = -1, length = array.length;
|
|
594
|
+
while (++index < length) {
|
|
595
|
+
var current = iteratee(array[index]);
|
|
596
596
|
if (current !== undefined$1) {
|
|
597
597
|
result = result === undefined$1 ? current : result + current;
|
|
598
598
|
}
|
|
@@ -601,9 +601,9 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
601
601
|
}
|
|
602
602
|
__name(baseSum, "baseSum");
|
|
603
603
|
function baseTimes(n, iteratee) {
|
|
604
|
-
var
|
|
605
|
-
while (++
|
|
606
|
-
result[
|
|
604
|
+
var index = -1, result = Array(n);
|
|
605
|
+
while (++index < n) {
|
|
606
|
+
result[index] = iteratee(index);
|
|
607
607
|
}
|
|
608
608
|
return result;
|
|
609
609
|
}
|
|
@@ -635,17 +635,17 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
635
635
|
}
|
|
636
636
|
__name(cacheHas, "cacheHas");
|
|
637
637
|
function charsStartIndex(strSymbols, chrSymbols) {
|
|
638
|
-
var
|
|
639
|
-
while (++
|
|
638
|
+
var index = -1, length = strSymbols.length;
|
|
639
|
+
while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {
|
|
640
640
|
}
|
|
641
|
-
return
|
|
641
|
+
return index;
|
|
642
642
|
}
|
|
643
643
|
__name(charsStartIndex, "charsStartIndex");
|
|
644
644
|
function charsEndIndex(strSymbols, chrSymbols) {
|
|
645
|
-
var
|
|
646
|
-
while (
|
|
645
|
+
var index = strSymbols.length;
|
|
646
|
+
while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {
|
|
647
647
|
}
|
|
648
|
-
return
|
|
648
|
+
return index;
|
|
649
649
|
}
|
|
650
650
|
__name(charsEndIndex, "charsEndIndex");
|
|
651
651
|
function countHolders(array, placeholder) {
|
|
@@ -685,9 +685,9 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
685
685
|
}
|
|
686
686
|
__name(iteratorToArray, "iteratorToArray");
|
|
687
687
|
function mapToArray(map) {
|
|
688
|
-
var
|
|
688
|
+
var index = -1, result = Array(map.size);
|
|
689
689
|
map.forEach(function(value, key) {
|
|
690
|
-
result[++
|
|
690
|
+
result[++index] = [key, value];
|
|
691
691
|
});
|
|
692
692
|
return result;
|
|
693
693
|
}
|
|
@@ -699,51 +699,51 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
699
699
|
}
|
|
700
700
|
__name(overArg, "overArg");
|
|
701
701
|
function replaceHolders(array, placeholder) {
|
|
702
|
-
var
|
|
703
|
-
while (++
|
|
704
|
-
var value = array[
|
|
702
|
+
var index = -1, length = array.length, resIndex = 0, result = [];
|
|
703
|
+
while (++index < length) {
|
|
704
|
+
var value = array[index];
|
|
705
705
|
if (value === placeholder || value === PLACEHOLDER) {
|
|
706
|
-
array[
|
|
707
|
-
result[resIndex++] =
|
|
706
|
+
array[index] = PLACEHOLDER;
|
|
707
|
+
result[resIndex++] = index;
|
|
708
708
|
}
|
|
709
709
|
}
|
|
710
710
|
return result;
|
|
711
711
|
}
|
|
712
712
|
__name(replaceHolders, "replaceHolders");
|
|
713
713
|
function setToArray(set) {
|
|
714
|
-
var
|
|
714
|
+
var index = -1, result = Array(set.size);
|
|
715
715
|
set.forEach(function(value) {
|
|
716
|
-
result[++
|
|
716
|
+
result[++index] = value;
|
|
717
717
|
});
|
|
718
718
|
return result;
|
|
719
719
|
}
|
|
720
720
|
__name(setToArray, "setToArray");
|
|
721
721
|
function setToPairs(set) {
|
|
722
|
-
var
|
|
722
|
+
var index = -1, result = Array(set.size);
|
|
723
723
|
set.forEach(function(value) {
|
|
724
|
-
result[++
|
|
724
|
+
result[++index] = [value, value];
|
|
725
725
|
});
|
|
726
726
|
return result;
|
|
727
727
|
}
|
|
728
728
|
__name(setToPairs, "setToPairs");
|
|
729
729
|
function strictIndexOf(array, value, fromIndex) {
|
|
730
|
-
var
|
|
731
|
-
while (++
|
|
732
|
-
if (array[
|
|
733
|
-
return
|
|
730
|
+
var index = fromIndex - 1, length = array.length;
|
|
731
|
+
while (++index < length) {
|
|
732
|
+
if (array[index] === value) {
|
|
733
|
+
return index;
|
|
734
734
|
}
|
|
735
735
|
}
|
|
736
736
|
return -1;
|
|
737
737
|
}
|
|
738
738
|
__name(strictIndexOf, "strictIndexOf");
|
|
739
739
|
function strictLastIndexOf(array, value, fromIndex) {
|
|
740
|
-
var
|
|
741
|
-
while (
|
|
742
|
-
if (array[
|
|
743
|
-
return
|
|
740
|
+
var index = fromIndex + 1;
|
|
741
|
+
while (index--) {
|
|
742
|
+
if (array[index] === value) {
|
|
743
|
+
return index;
|
|
744
744
|
}
|
|
745
745
|
}
|
|
746
|
-
return
|
|
746
|
+
return index;
|
|
747
747
|
}
|
|
748
748
|
__name(strictLastIndexOf, "strictLastIndexOf");
|
|
749
749
|
function stringSize(string) {
|
|
@@ -755,10 +755,10 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
755
755
|
}
|
|
756
756
|
__name(stringToArray, "stringToArray");
|
|
757
757
|
function trimmedEndIndex(string) {
|
|
758
|
-
var
|
|
759
|
-
while (
|
|
758
|
+
var index = string.length;
|
|
759
|
+
while (index-- && reWhitespace.test(string.charAt(index))) {
|
|
760
760
|
}
|
|
761
|
-
return
|
|
761
|
+
return index;
|
|
762
762
|
}
|
|
763
763
|
__name(trimmedEndIndex, "trimmedEndIndex");
|
|
764
764
|
var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
|
|
@@ -935,15 +935,15 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
935
935
|
}
|
|
936
936
|
__name(lazyReverse, "lazyReverse");
|
|
937
937
|
function lazyValue() {
|
|
938
|
-
var array = this.__wrapped__.value(), dir = this.__dir__, isArr = isArray2(array), isRight = dir < 0, arrLength = isArr ? array.length : 0, view = getView(0, arrLength, this.__views__), start = view.start, end = view.end, length = end - start,
|
|
938
|
+
var array = this.__wrapped__.value(), dir = this.__dir__, isArr = isArray2(array), isRight = dir < 0, arrLength = isArr ? array.length : 0, view = getView(0, arrLength, this.__views__), start = view.start, end = view.end, length = end - start, index = isRight ? end : start - 1, iteratees = this.__iteratees__, iterLength = iteratees.length, resIndex = 0, takeCount = nativeMin(length, this.__takeCount__);
|
|
939
939
|
if (!isArr || !isRight && arrLength == length && takeCount == length) {
|
|
940
940
|
return baseWrapperValue(array, this.__actions__);
|
|
941
941
|
}
|
|
942
942
|
var result2 = [];
|
|
943
943
|
outer:
|
|
944
944
|
while (length-- && resIndex < takeCount) {
|
|
945
|
-
|
|
946
|
-
var iterIndex = -1, value = array[
|
|
945
|
+
index += dir;
|
|
946
|
+
var iterIndex = -1, value = array[index];
|
|
947
947
|
while (++iterIndex < iterLength) {
|
|
948
948
|
var data = iteratees[iterIndex], iteratee2 = data.iteratee, type = data.type, computed = iteratee2(value);
|
|
949
949
|
if (type == LAZY_MAP_FLAG) {
|
|
@@ -964,10 +964,10 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
964
964
|
LazyWrapper.prototype = baseCreate(baseLodash.prototype);
|
|
965
965
|
LazyWrapper.prototype.constructor = LazyWrapper;
|
|
966
966
|
function Hash(entries) {
|
|
967
|
-
var
|
|
967
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
968
968
|
this.clear();
|
|
969
|
-
while (++
|
|
970
|
-
var entry = entries[
|
|
969
|
+
while (++index < length) {
|
|
970
|
+
var entry = entries[index];
|
|
971
971
|
this.set(entry[0], entry[1]);
|
|
972
972
|
}
|
|
973
973
|
}
|
|
@@ -1010,10 +1010,10 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
1010
1010
|
Hash.prototype.has = hashHas;
|
|
1011
1011
|
Hash.prototype.set = hashSet;
|
|
1012
1012
|
function ListCache(entries) {
|
|
1013
|
-
var
|
|
1013
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
1014
1014
|
this.clear();
|
|
1015
|
-
while (++
|
|
1016
|
-
var entry = entries[
|
|
1015
|
+
while (++index < length) {
|
|
1016
|
+
var entry = entries[index];
|
|
1017
1017
|
this.set(entry[0], entry[1]);
|
|
1018
1018
|
}
|
|
1019
1019
|
}
|
|
@@ -1024,23 +1024,23 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
1024
1024
|
}
|
|
1025
1025
|
__name(listCacheClear, "listCacheClear");
|
|
1026
1026
|
function listCacheDelete(key) {
|
|
1027
|
-
var data = this.__data__,
|
|
1028
|
-
if (
|
|
1027
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
1028
|
+
if (index < 0) {
|
|
1029
1029
|
return false;
|
|
1030
1030
|
}
|
|
1031
1031
|
var lastIndex = data.length - 1;
|
|
1032
|
-
if (
|
|
1032
|
+
if (index == lastIndex) {
|
|
1033
1033
|
data.pop();
|
|
1034
1034
|
} else {
|
|
1035
|
-
splice.call(data,
|
|
1035
|
+
splice.call(data, index, 1);
|
|
1036
1036
|
}
|
|
1037
1037
|
--this.size;
|
|
1038
1038
|
return true;
|
|
1039
1039
|
}
|
|
1040
1040
|
__name(listCacheDelete, "listCacheDelete");
|
|
1041
1041
|
function listCacheGet(key) {
|
|
1042
|
-
var data = this.__data__,
|
|
1043
|
-
return
|
|
1042
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
1043
|
+
return index < 0 ? undefined$1 : data[index][1];
|
|
1044
1044
|
}
|
|
1045
1045
|
__name(listCacheGet, "listCacheGet");
|
|
1046
1046
|
function listCacheHas(key) {
|
|
@@ -1048,12 +1048,12 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
1048
1048
|
}
|
|
1049
1049
|
__name(listCacheHas, "listCacheHas");
|
|
1050
1050
|
function listCacheSet(key, value) {
|
|
1051
|
-
var data = this.__data__,
|
|
1052
|
-
if (
|
|
1051
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
1052
|
+
if (index < 0) {
|
|
1053
1053
|
++this.size;
|
|
1054
1054
|
data.push([key, value]);
|
|
1055
1055
|
} else {
|
|
1056
|
-
data[
|
|
1056
|
+
data[index][1] = value;
|
|
1057
1057
|
}
|
|
1058
1058
|
return this;
|
|
1059
1059
|
}
|
|
@@ -1064,10 +1064,10 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
1064
1064
|
ListCache.prototype.has = listCacheHas;
|
|
1065
1065
|
ListCache.prototype.set = listCacheSet;
|
|
1066
1066
|
function MapCache(entries) {
|
|
1067
|
-
var
|
|
1067
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
1068
1068
|
this.clear();
|
|
1069
|
-
while (++
|
|
1070
|
-
var entry = entries[
|
|
1069
|
+
while (++index < length) {
|
|
1070
|
+
var entry = entries[index];
|
|
1071
1071
|
this.set(entry[0], entry[1]);
|
|
1072
1072
|
}
|
|
1073
1073
|
}
|
|
@@ -1108,10 +1108,10 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
1108
1108
|
MapCache.prototype.has = mapCacheHas;
|
|
1109
1109
|
MapCache.prototype.set = mapCacheSet;
|
|
1110
1110
|
function SetCache(values2) {
|
|
1111
|
-
var
|
|
1111
|
+
var index = -1, length = values2 == null ? 0 : values2.length;
|
|
1112
1112
|
this.__data__ = new MapCache();
|
|
1113
|
-
while (++
|
|
1114
|
-
this.add(values2[
|
|
1113
|
+
while (++index < length) {
|
|
1114
|
+
this.add(values2[index]);
|
|
1115
1115
|
}
|
|
1116
1116
|
}
|
|
1117
1117
|
__name(SetCache, "SetCache");
|
|
@@ -1172,7 +1172,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
1172
1172
|
Stack.prototype.has = stackHas;
|
|
1173
1173
|
Stack.prototype.set = stackSet;
|
|
1174
1174
|
function arrayLikeKeys(value, inherited) {
|
|
1175
|
-
var isArr = isArray2(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg &&
|
|
1175
|
+
var isArr = isArray2(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result2 = skipIndexes ? baseTimes(value.length, String2) : [], length = result2.length;
|
|
1176
1176
|
for (var key in value) {
|
|
1177
1177
|
if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
1178
1178
|
(key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
@@ -1250,9 +1250,9 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
1250
1250
|
}
|
|
1251
1251
|
__name(baseAssignValue, "baseAssignValue");
|
|
1252
1252
|
function baseAt(object, paths) {
|
|
1253
|
-
var
|
|
1254
|
-
while (++
|
|
1255
|
-
result2[
|
|
1253
|
+
var index = -1, length = paths.length, result2 = Array2(length), skip = object == null;
|
|
1254
|
+
while (++index < length) {
|
|
1255
|
+
result2[index] = skip ? undefined$1 : get2(object, paths[index]);
|
|
1256
1256
|
}
|
|
1257
1257
|
return result2;
|
|
1258
1258
|
}
|
|
@@ -1288,7 +1288,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
1288
1288
|
}
|
|
1289
1289
|
} else {
|
|
1290
1290
|
var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
|
|
1291
|
-
if (
|
|
1291
|
+
if (isBuffer(value)) {
|
|
1292
1292
|
return cloneBuffer(value, isDeep);
|
|
1293
1293
|
}
|
|
1294
1294
|
if (tag == objectTag || tag == argsTag || isFunc && !object) {
|
|
@@ -1362,7 +1362,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
1362
1362
|
}
|
|
1363
1363
|
__name(baseDelay, "baseDelay");
|
|
1364
1364
|
function baseDifference(array, values2, iteratee2, comparator) {
|
|
1365
|
-
var
|
|
1365
|
+
var index = -1, includes2 = arrayIncludes, isCommon = true, length = array.length, result2 = [], valuesLength = values2.length;
|
|
1366
1366
|
if (!length) {
|
|
1367
1367
|
return result2;
|
|
1368
1368
|
}
|
|
@@ -1378,8 +1378,8 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
1378
1378
|
values2 = new SetCache(values2);
|
|
1379
1379
|
}
|
|
1380
1380
|
outer:
|
|
1381
|
-
while (++
|
|
1382
|
-
var value = array[
|
|
1381
|
+
while (++index < length) {
|
|
1382
|
+
var value = array[index], computed = iteratee2 == null ? value : iteratee2(value);
|
|
1383
1383
|
value = comparator || value !== 0 ? value : 0;
|
|
1384
1384
|
if (isCommon && computed === computed) {
|
|
1385
1385
|
var valuesIndex = valuesLength;
|
|
@@ -1400,17 +1400,17 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
1400
1400
|
var baseEachRight = createBaseEach(baseForOwnRight, true);
|
|
1401
1401
|
function baseEvery(collection, predicate) {
|
|
1402
1402
|
var result2 = true;
|
|
1403
|
-
baseEach(collection, function(value,
|
|
1404
|
-
result2 = !!predicate(value,
|
|
1403
|
+
baseEach(collection, function(value, index, collection2) {
|
|
1404
|
+
result2 = !!predicate(value, index, collection2);
|
|
1405
1405
|
return result2;
|
|
1406
1406
|
});
|
|
1407
1407
|
return result2;
|
|
1408
1408
|
}
|
|
1409
1409
|
__name(baseEvery, "baseEvery");
|
|
1410
1410
|
function baseExtremum(array, iteratee2, comparator) {
|
|
1411
|
-
var
|
|
1412
|
-
while (++
|
|
1413
|
-
var value = array[
|
|
1411
|
+
var index = -1, length = array.length;
|
|
1412
|
+
while (++index < length) {
|
|
1413
|
+
var value = array[index], current = iteratee2(value);
|
|
1414
1414
|
if (current != null && (computed === undefined$1 ? current === current && !isSymbol(current) : comparator(current, computed))) {
|
|
1415
1415
|
var computed = current, result2 = value;
|
|
1416
1416
|
}
|
|
@@ -1437,8 +1437,8 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
1437
1437
|
__name(baseFill, "baseFill");
|
|
1438
1438
|
function baseFilter(collection, predicate) {
|
|
1439
1439
|
var result2 = [];
|
|
1440
|
-
baseEach(collection, function(value,
|
|
1441
|
-
if (predicate(value,
|
|
1440
|
+
baseEach(collection, function(value, index, collection2) {
|
|
1441
|
+
if (predicate(value, index, collection2)) {
|
|
1442
1442
|
result2.push(value);
|
|
1443
1443
|
}
|
|
1444
1444
|
});
|
|
@@ -1446,11 +1446,11 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
1446
1446
|
}
|
|
1447
1447
|
__name(baseFilter, "baseFilter");
|
|
1448
1448
|
function baseFlatten(array, depth, predicate, isStrict, result2) {
|
|
1449
|
-
var
|
|
1449
|
+
var index = -1, length = array.length;
|
|
1450
1450
|
predicate || (predicate = isFlattenable);
|
|
1451
1451
|
result2 || (result2 = []);
|
|
1452
|
-
while (++
|
|
1453
|
-
var value = array[
|
|
1452
|
+
while (++index < length) {
|
|
1453
|
+
var value = array[index];
|
|
1454
1454
|
if (depth > 0 && predicate(value)) {
|
|
1455
1455
|
if (depth > 1) {
|
|
1456
1456
|
baseFlatten(value, depth - 1, predicate, isStrict, result2);
|
|
@@ -1482,11 +1482,11 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
1482
1482
|
__name(baseFunctions, "baseFunctions");
|
|
1483
1483
|
function baseGet(object, path) {
|
|
1484
1484
|
path = castPath(path, object);
|
|
1485
|
-
var
|
|
1486
|
-
while (object != null &&
|
|
1487
|
-
object = object[toKey(path[
|
|
1485
|
+
var index = 0, length = path.length;
|
|
1486
|
+
while (object != null && index < length) {
|
|
1487
|
+
object = object[toKey(path[index++])];
|
|
1488
1488
|
}
|
|
1489
|
-
return
|
|
1489
|
+
return index && index == length ? object : undefined$1;
|
|
1490
1490
|
}
|
|
1491
1491
|
__name(baseGet, "baseGet");
|
|
1492
1492
|
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
@@ -1528,10 +1528,10 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
1528
1528
|
caches[othIndex] = !comparator && (iteratee2 || length >= 120 && array.length >= 120) ? new SetCache(othIndex && array) : undefined$1;
|
|
1529
1529
|
}
|
|
1530
1530
|
array = arrays[0];
|
|
1531
|
-
var
|
|
1531
|
+
var index = -1, seen = caches[0];
|
|
1532
1532
|
outer:
|
|
1533
|
-
while (++
|
|
1534
|
-
var value = array[
|
|
1533
|
+
while (++index < length && result2.length < maxLength) {
|
|
1534
|
+
var value = array[index], computed = iteratee2 ? iteratee2(value) : value;
|
|
1535
1535
|
value = comparator || value !== 0 ? value : 0;
|
|
1536
1536
|
if (!(seen ? cacheHas(seen, computed) : includes2(result2, computed, comparator))) {
|
|
1537
1537
|
othIndex = othLength;
|
|
@@ -1591,8 +1591,8 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
1591
1591
|
objTag = objTag == argsTag ? objectTag : objTag;
|
|
1592
1592
|
othTag = othTag == argsTag ? objectTag : othTag;
|
|
1593
1593
|
var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
|
|
1594
|
-
if (isSameTag &&
|
|
1595
|
-
if (!
|
|
1594
|
+
if (isSameTag && isBuffer(object)) {
|
|
1595
|
+
if (!isBuffer(other)) {
|
|
1596
1596
|
return false;
|
|
1597
1597
|
}
|
|
1598
1598
|
objIsArr = true;
|
|
@@ -1622,19 +1622,19 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
1622
1622
|
}
|
|
1623
1623
|
__name(baseIsMap, "baseIsMap");
|
|
1624
1624
|
function baseIsMatch(object, source2, matchData, customizer) {
|
|
1625
|
-
var
|
|
1625
|
+
var index = matchData.length, length = index, noCustomizer = !customizer;
|
|
1626
1626
|
if (object == null) {
|
|
1627
1627
|
return !length;
|
|
1628
1628
|
}
|
|
1629
1629
|
object = Object2(object);
|
|
1630
|
-
while (
|
|
1631
|
-
var data = matchData[
|
|
1630
|
+
while (index--) {
|
|
1631
|
+
var data = matchData[index];
|
|
1632
1632
|
if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
|
|
1633
1633
|
return false;
|
|
1634
1634
|
}
|
|
1635
1635
|
}
|
|
1636
|
-
while (++
|
|
1637
|
-
data = matchData[
|
|
1636
|
+
while (++index < length) {
|
|
1637
|
+
data = matchData[index];
|
|
1638
1638
|
var key = data[0], objValue = object[key], srcValue = data[1];
|
|
1639
1639
|
if (noCustomizer && data[2]) {
|
|
1640
1640
|
if (objValue === undefined$1 && !(key in object)) {
|
|
@@ -1717,9 +1717,9 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
1717
1717
|
}
|
|
1718
1718
|
__name(baseLt, "baseLt");
|
|
1719
1719
|
function baseMap(collection, iteratee2) {
|
|
1720
|
-
var
|
|
1720
|
+
var index = -1, result2 = isArrayLike(collection) ? Array2(collection.length) : [];
|
|
1721
1721
|
baseEach(collection, function(value, key, collection2) {
|
|
1722
|
-
result2[++
|
|
1722
|
+
result2[++index] = iteratee2(value, key, collection2);
|
|
1723
1723
|
});
|
|
1724
1724
|
return result2;
|
|
1725
1725
|
}
|
|
@@ -1771,7 +1771,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
1771
1771
|
var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source2, stack) : undefined$1;
|
|
1772
1772
|
var isCommon = newValue === undefined$1;
|
|
1773
1773
|
if (isCommon) {
|
|
1774
|
-
var isArr = isArray2(srcValue), isBuff = !isArr &&
|
|
1774
|
+
var isArr = isArray2(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue);
|
|
1775
1775
|
newValue = srcValue;
|
|
1776
1776
|
if (isArr || isBuff || isTyped) {
|
|
1777
1777
|
if (isArray2(objValue)) {
|
|
@@ -1828,13 +1828,13 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
1828
1828
|
} else {
|
|
1829
1829
|
iteratees = [identity];
|
|
1830
1830
|
}
|
|
1831
|
-
var
|
|
1831
|
+
var index = -1;
|
|
1832
1832
|
iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
|
|
1833
1833
|
var result2 = baseMap(collection, function(value, key, collection2) {
|
|
1834
1834
|
var criteria = arrayMap(iteratees, function(iteratee2) {
|
|
1835
1835
|
return iteratee2(value);
|
|
1836
1836
|
});
|
|
1837
|
-
return { "criteria": criteria, "index": ++
|
|
1837
|
+
return { "criteria": criteria, "index": ++index, "value": value };
|
|
1838
1838
|
});
|
|
1839
1839
|
return baseSortBy(result2, function(object, other) {
|
|
1840
1840
|
return compareMultiple(object, other, orders);
|
|
@@ -1848,9 +1848,9 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
1848
1848
|
}
|
|
1849
1849
|
__name(basePick, "basePick");
|
|
1850
1850
|
function basePickBy(object, paths, predicate) {
|
|
1851
|
-
var
|
|
1852
|
-
while (++
|
|
1853
|
-
var path = paths[
|
|
1851
|
+
var index = -1, length = paths.length, result2 = {};
|
|
1852
|
+
while (++index < length) {
|
|
1853
|
+
var path = paths[index], value = baseGet(object, path);
|
|
1854
1854
|
if (predicate(value, path)) {
|
|
1855
1855
|
baseSet(result2, castPath(path, object), value);
|
|
1856
1856
|
}
|
|
@@ -1865,15 +1865,15 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
1865
1865
|
}
|
|
1866
1866
|
__name(basePropertyDeep, "basePropertyDeep");
|
|
1867
1867
|
function basePullAll(array, values2, iteratee2, comparator) {
|
|
1868
|
-
var indexOf2 = comparator ? baseIndexOfWith : baseIndexOf,
|
|
1868
|
+
var indexOf2 = comparator ? baseIndexOfWith : baseIndexOf, index = -1, length = values2.length, seen = array;
|
|
1869
1869
|
if (array === values2) {
|
|
1870
1870
|
values2 = copyArray(values2);
|
|
1871
1871
|
}
|
|
1872
1872
|
if (iteratee2) {
|
|
1873
1873
|
seen = arrayMap(array, baseUnary(iteratee2));
|
|
1874
1874
|
}
|
|
1875
|
-
while (++
|
|
1876
|
-
var fromIndex = 0, value = values2[
|
|
1875
|
+
while (++index < length) {
|
|
1876
|
+
var fromIndex = 0, value = values2[index], computed = iteratee2 ? iteratee2(value) : value;
|
|
1877
1877
|
while ((fromIndex = indexOf2(seen, computed, fromIndex, comparator)) > -1) {
|
|
1878
1878
|
if (seen !== array) {
|
|
1879
1879
|
splice.call(seen, fromIndex, 1);
|
|
@@ -1887,13 +1887,13 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
1887
1887
|
function basePullAt(array, indexes) {
|
|
1888
1888
|
var length = array ? indexes.length : 0, lastIndex = length - 1;
|
|
1889
1889
|
while (length--) {
|
|
1890
|
-
var
|
|
1891
|
-
if (length == lastIndex ||
|
|
1892
|
-
var previous =
|
|
1893
|
-
if (isIndex(
|
|
1894
|
-
splice.call(array,
|
|
1890
|
+
var index = indexes[length];
|
|
1891
|
+
if (length == lastIndex || index !== previous) {
|
|
1892
|
+
var previous = index;
|
|
1893
|
+
if (isIndex(index)) {
|
|
1894
|
+
splice.call(array, index, 1);
|
|
1895
1895
|
} else {
|
|
1896
|
-
baseUnset(array,
|
|
1896
|
+
baseUnset(array, index);
|
|
1897
1897
|
}
|
|
1898
1898
|
}
|
|
1899
1899
|
}
|
|
@@ -1905,9 +1905,9 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
1905
1905
|
}
|
|
1906
1906
|
__name(baseRandom, "baseRandom");
|
|
1907
1907
|
function baseRange(start, end, step, fromRight) {
|
|
1908
|
-
var
|
|
1908
|
+
var index = -1, length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), result2 = Array2(length);
|
|
1909
1909
|
while (length--) {
|
|
1910
|
-
result2[fromRight ? length : ++
|
|
1910
|
+
result2[fromRight ? length : ++index] = start;
|
|
1911
1911
|
start += step;
|
|
1912
1912
|
}
|
|
1913
1913
|
return result2;
|
|
@@ -1948,17 +1948,17 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
1948
1948
|
return object;
|
|
1949
1949
|
}
|
|
1950
1950
|
path = castPath(path, object);
|
|
1951
|
-
var
|
|
1952
|
-
while (nested != null && ++
|
|
1953
|
-
var key = toKey(path[
|
|
1951
|
+
var index = -1, length = path.length, lastIndex = length - 1, nested = object;
|
|
1952
|
+
while (nested != null && ++index < length) {
|
|
1953
|
+
var key = toKey(path[index]), newValue = value;
|
|
1954
1954
|
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
1955
1955
|
return object;
|
|
1956
1956
|
}
|
|
1957
|
-
if (
|
|
1957
|
+
if (index != lastIndex) {
|
|
1958
1958
|
var objValue = nested[key];
|
|
1959
1959
|
newValue = customizer ? customizer(objValue, key, nested) : undefined$1;
|
|
1960
1960
|
if (newValue === undefined$1) {
|
|
1961
|
-
newValue = isObject(objValue) ? objValue : isIndex(path[
|
|
1961
|
+
newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
|
|
1962
1962
|
}
|
|
1963
1963
|
}
|
|
1964
1964
|
assignValue(nested, key, newValue);
|
|
@@ -1984,7 +1984,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
1984
1984
|
}
|
|
1985
1985
|
__name(baseShuffle, "baseShuffle");
|
|
1986
1986
|
function baseSlice(array, start, end) {
|
|
1987
|
-
var
|
|
1987
|
+
var index = -1, length = array.length;
|
|
1988
1988
|
if (start < 0) {
|
|
1989
1989
|
start = -start > length ? 0 : length + start;
|
|
1990
1990
|
}
|
|
@@ -1995,16 +1995,16 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
1995
1995
|
length = start > end ? 0 : end - start >>> 0;
|
|
1996
1996
|
start >>>= 0;
|
|
1997
1997
|
var result2 = Array2(length);
|
|
1998
|
-
while (++
|
|
1999
|
-
result2[
|
|
1998
|
+
while (++index < length) {
|
|
1999
|
+
result2[index] = array[index + start];
|
|
2000
2000
|
}
|
|
2001
2001
|
return result2;
|
|
2002
2002
|
}
|
|
2003
2003
|
__name(baseSlice, "baseSlice");
|
|
2004
2004
|
function baseSome(collection, predicate) {
|
|
2005
2005
|
var result2;
|
|
2006
|
-
baseEach(collection, function(value,
|
|
2007
|
-
result2 = predicate(value,
|
|
2006
|
+
baseEach(collection, function(value, index, collection2) {
|
|
2007
|
+
result2 = predicate(value, index, collection2);
|
|
2008
2008
|
return !result2;
|
|
2009
2009
|
});
|
|
2010
2010
|
return !!result2;
|
|
@@ -2058,10 +2058,10 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
2058
2058
|
}
|
|
2059
2059
|
__name(baseSortedIndexBy, "baseSortedIndexBy");
|
|
2060
2060
|
function baseSortedUniq(array, iteratee2) {
|
|
2061
|
-
var
|
|
2062
|
-
while (++
|
|
2063
|
-
var value = array[
|
|
2064
|
-
if (!
|
|
2061
|
+
var index = -1, length = array.length, resIndex = 0, result2 = [];
|
|
2062
|
+
while (++index < length) {
|
|
2063
|
+
var value = array[index], computed = iteratee2 ? iteratee2(value) : value;
|
|
2064
|
+
if (!index || !eq(computed, seen)) {
|
|
2065
2065
|
var seen = computed;
|
|
2066
2066
|
result2[resIndex++] = value === 0 ? 0 : value;
|
|
2067
2067
|
}
|
|
@@ -2094,7 +2094,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
2094
2094
|
}
|
|
2095
2095
|
__name(baseToString, "baseToString");
|
|
2096
2096
|
function baseUniq(array, iteratee2, comparator) {
|
|
2097
|
-
var
|
|
2097
|
+
var index = -1, includes2 = arrayIncludes, length = array.length, isCommon = true, result2 = [], seen = result2;
|
|
2098
2098
|
if (comparator) {
|
|
2099
2099
|
isCommon = false;
|
|
2100
2100
|
includes2 = arrayIncludesWith;
|
|
@@ -2110,8 +2110,8 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
2110
2110
|
seen = iteratee2 ? [] : result2;
|
|
2111
2111
|
}
|
|
2112
2112
|
outer:
|
|
2113
|
-
while (++
|
|
2114
|
-
var value = array[
|
|
2113
|
+
while (++index < length) {
|
|
2114
|
+
var value = array[index], computed = iteratee2 ? iteratee2(value) : value;
|
|
2115
2115
|
value = comparator || value !== 0 ? value : 0;
|
|
2116
2116
|
if (isCommon && computed === computed) {
|
|
2117
2117
|
var seenIndex = seen.length;
|
|
@@ -2145,10 +2145,10 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
2145
2145
|
}
|
|
2146
2146
|
__name(baseUpdate, "baseUpdate");
|
|
2147
2147
|
function baseWhile(array, predicate, isDrop, fromRight) {
|
|
2148
|
-
var length = array.length,
|
|
2149
|
-
while ((fromRight ?
|
|
2148
|
+
var length = array.length, index = fromRight ? length : -1;
|
|
2149
|
+
while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array)) {
|
|
2150
2150
|
}
|
|
2151
|
-
return isDrop ? baseSlice(array, fromRight ? 0 :
|
|
2151
|
+
return isDrop ? baseSlice(array, fromRight ? 0 : index, fromRight ? index + 1 : length) : baseSlice(array, fromRight ? index + 1 : 0, fromRight ? length : index);
|
|
2152
2152
|
}
|
|
2153
2153
|
__name(baseWhile, "baseWhile");
|
|
2154
2154
|
function baseWrapperValue(value, actions) {
|
|
@@ -2166,12 +2166,12 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
2166
2166
|
if (length < 2) {
|
|
2167
2167
|
return length ? baseUniq(arrays[0]) : [];
|
|
2168
2168
|
}
|
|
2169
|
-
var
|
|
2170
|
-
while (++
|
|
2171
|
-
var array = arrays[
|
|
2169
|
+
var index = -1, result2 = Array2(length);
|
|
2170
|
+
while (++index < length) {
|
|
2171
|
+
var array = arrays[index], othIndex = -1;
|
|
2172
2172
|
while (++othIndex < length) {
|
|
2173
|
-
if (othIndex !=
|
|
2174
|
-
result2[
|
|
2173
|
+
if (othIndex != index) {
|
|
2174
|
+
result2[index] = baseDifference(result2[index] || array, arrays[othIndex], iteratee2, comparator);
|
|
2175
2175
|
}
|
|
2176
2176
|
}
|
|
2177
2177
|
}
|
|
@@ -2179,10 +2179,10 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
2179
2179
|
}
|
|
2180
2180
|
__name(baseXor, "baseXor");
|
|
2181
2181
|
function baseZipObject(props, values2, assignFunc) {
|
|
2182
|
-
var
|
|
2183
|
-
while (++
|
|
2184
|
-
var value =
|
|
2185
|
-
assignFunc(result2, props[
|
|
2182
|
+
var index = -1, length = props.length, valsLength = values2.length, result2 = {};
|
|
2183
|
+
while (++index < length) {
|
|
2184
|
+
var value = index < valsLength ? values2[index] : undefined$1;
|
|
2185
|
+
assignFunc(result2, props[index], value);
|
|
2186
2186
|
}
|
|
2187
2187
|
return result2;
|
|
2188
2188
|
}
|
|
@@ -2212,12 +2212,12 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
2212
2212
|
var clearTimeout = ctxClearTimeout || function(id) {
|
|
2213
2213
|
return root.clearTimeout(id);
|
|
2214
2214
|
};
|
|
2215
|
-
function cloneBuffer(
|
|
2215
|
+
function cloneBuffer(buffer, isDeep) {
|
|
2216
2216
|
if (isDeep) {
|
|
2217
|
-
return
|
|
2217
|
+
return buffer.slice();
|
|
2218
2218
|
}
|
|
2219
|
-
var length =
|
|
2220
|
-
|
|
2219
|
+
var length = buffer.length, result2 = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
|
2220
|
+
buffer.copy(result2);
|
|
2221
2221
|
return result2;
|
|
2222
2222
|
}
|
|
2223
2223
|
__name(cloneBuffer, "cloneBuffer");
|
|
@@ -2228,8 +2228,8 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
2228
2228
|
}
|
|
2229
2229
|
__name(cloneArrayBuffer, "cloneArrayBuffer");
|
|
2230
2230
|
function cloneDataView(dataView, isDeep) {
|
|
2231
|
-
var
|
|
2232
|
-
return new dataView.constructor(
|
|
2231
|
+
var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
|
|
2232
|
+
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
|
2233
2233
|
}
|
|
2234
2234
|
__name(cloneDataView, "cloneDataView");
|
|
2235
2235
|
function cloneRegExp2(regexp) {
|
|
@@ -2243,8 +2243,8 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
2243
2243
|
}
|
|
2244
2244
|
__name(cloneSymbol, "cloneSymbol");
|
|
2245
2245
|
function cloneTypedArray(typedArray, isDeep) {
|
|
2246
|
-
var
|
|
2247
|
-
return new typedArray.constructor(
|
|
2246
|
+
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
|
|
2247
|
+
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
|
2248
2248
|
}
|
|
2249
2249
|
__name(cloneTypedArray, "cloneTypedArray");
|
|
2250
2250
|
function compareAscending(value, other) {
|
|
@@ -2262,14 +2262,14 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
2262
2262
|
}
|
|
2263
2263
|
__name(compareAscending, "compareAscending");
|
|
2264
2264
|
function compareMultiple(object, other, orders) {
|
|
2265
|
-
var
|
|
2266
|
-
while (++
|
|
2267
|
-
var result2 = compareAscending(objCriteria[
|
|
2265
|
+
var index = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length;
|
|
2266
|
+
while (++index < length) {
|
|
2267
|
+
var result2 = compareAscending(objCriteria[index], othCriteria[index]);
|
|
2268
2268
|
if (result2) {
|
|
2269
|
-
if (
|
|
2269
|
+
if (index >= ordersLength) {
|
|
2270
2270
|
return result2;
|
|
2271
2271
|
}
|
|
2272
|
-
var order = orders[
|
|
2272
|
+
var order = orders[index];
|
|
2273
2273
|
return result2 * (order == "desc" ? -1 : 1);
|
|
2274
2274
|
}
|
|
2275
2275
|
}
|
|
@@ -2310,10 +2310,10 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
2310
2310
|
}
|
|
2311
2311
|
__name(composeArgsRight, "composeArgsRight");
|
|
2312
2312
|
function copyArray(source2, array) {
|
|
2313
|
-
var
|
|
2313
|
+
var index = -1, length = source2.length;
|
|
2314
2314
|
array || (array = Array2(length));
|
|
2315
|
-
while (++
|
|
2316
|
-
array[
|
|
2315
|
+
while (++index < length) {
|
|
2316
|
+
array[index] = source2[index];
|
|
2317
2317
|
}
|
|
2318
2318
|
return array;
|
|
2319
2319
|
}
|
|
@@ -2321,9 +2321,9 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
2321
2321
|
function copyObject(source2, props, object, customizer) {
|
|
2322
2322
|
var isNew = !object;
|
|
2323
2323
|
object || (object = {});
|
|
2324
|
-
var
|
|
2325
|
-
while (++
|
|
2326
|
-
var key = props[
|
|
2324
|
+
var index = -1, length = props.length;
|
|
2325
|
+
while (++index < length) {
|
|
2326
|
+
var key = props[index];
|
|
2327
2327
|
var newValue = customizer ? customizer(object[key], source2[key], key, object, source2) : undefined$1;
|
|
2328
2328
|
if (newValue === undefined$1) {
|
|
2329
2329
|
newValue = source2[key];
|
|
@@ -2354,17 +2354,17 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
2354
2354
|
__name(createAggregator, "createAggregator");
|
|
2355
2355
|
function createAssigner(assigner) {
|
|
2356
2356
|
return baseRest(function(object, sources) {
|
|
2357
|
-
var
|
|
2357
|
+
var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined$1, guard = length > 2 ? sources[2] : undefined$1;
|
|
2358
2358
|
customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : undefined$1;
|
|
2359
2359
|
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
|
2360
2360
|
customizer = length < 3 ? undefined$1 : customizer;
|
|
2361
2361
|
length = 1;
|
|
2362
2362
|
}
|
|
2363
2363
|
object = Object2(object);
|
|
2364
|
-
while (++
|
|
2365
|
-
var source2 = sources[
|
|
2364
|
+
while (++index < length) {
|
|
2365
|
+
var source2 = sources[index];
|
|
2366
2366
|
if (source2) {
|
|
2367
|
-
assigner(object, source2,
|
|
2367
|
+
assigner(object, source2, index, customizer);
|
|
2368
2368
|
}
|
|
2369
2369
|
}
|
|
2370
2370
|
return object;
|
|
@@ -2379,9 +2379,9 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
2379
2379
|
if (!isArrayLike(collection)) {
|
|
2380
2380
|
return eachFunc(collection, iteratee2);
|
|
2381
2381
|
}
|
|
2382
|
-
var length = collection.length,
|
|
2383
|
-
while (fromRight ?
|
|
2384
|
-
if (iteratee2(iterable[
|
|
2382
|
+
var length = collection.length, index = fromRight ? length : -1, iterable = Object2(collection);
|
|
2383
|
+
while (fromRight ? index-- : ++index < length) {
|
|
2384
|
+
if (iteratee2(iterable[index], index, iterable) === false) {
|
|
2385
2385
|
break;
|
|
2386
2386
|
}
|
|
2387
2387
|
}
|
|
@@ -2391,9 +2391,9 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
2391
2391
|
__name(createBaseEach, "createBaseEach");
|
|
2392
2392
|
function createBaseFor(fromRight) {
|
|
2393
2393
|
return function(object, iteratee2, keysFunc) {
|
|
2394
|
-
var
|
|
2394
|
+
var index = -1, iterable = Object2(object), props = keysFunc(object), length = props.length;
|
|
2395
2395
|
while (length--) {
|
|
2396
|
-
var key = props[fromRight ? length : ++
|
|
2396
|
+
var key = props[fromRight ? length : ++index];
|
|
2397
2397
|
if (iteratee2(iterable[key], key, iterable) === false) {
|
|
2398
2398
|
break;
|
|
2399
2399
|
}
|
|
@@ -2457,9 +2457,9 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
2457
2457
|
function createCurry(func, bitmask, arity) {
|
|
2458
2458
|
var Ctor = createCtor(func);
|
|
2459
2459
|
function wrapper() {
|
|
2460
|
-
var length = arguments.length, args = Array2(length),
|
|
2461
|
-
while (
|
|
2462
|
-
args[
|
|
2460
|
+
var length = arguments.length, args = Array2(length), index = length, placeholder = getHolder(wrapper);
|
|
2461
|
+
while (index--) {
|
|
2462
|
+
args[index] = arguments[index];
|
|
2463
2463
|
}
|
|
2464
2464
|
var holders = length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder ? [] : replaceHolders(args, placeholder);
|
|
2465
2465
|
length -= holders.length;
|
|
@@ -2494,19 +2494,19 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
2494
2494
|
return iteratee2(iterable[key], key, iterable);
|
|
2495
2495
|
}, "predicate");
|
|
2496
2496
|
}
|
|
2497
|
-
var
|
|
2498
|
-
return
|
|
2497
|
+
var index = findIndexFunc(collection, predicate, fromIndex);
|
|
2498
|
+
return index > -1 ? iterable[iteratee2 ? collection[index] : index] : undefined$1;
|
|
2499
2499
|
};
|
|
2500
2500
|
}
|
|
2501
2501
|
__name(createFind, "createFind");
|
|
2502
2502
|
function createFlow(fromRight) {
|
|
2503
2503
|
return flatRest(function(funcs) {
|
|
2504
|
-
var length = funcs.length,
|
|
2504
|
+
var length = funcs.length, index = length, prereq = LodashWrapper.prototype.thru;
|
|
2505
2505
|
if (fromRight) {
|
|
2506
2506
|
funcs.reverse();
|
|
2507
2507
|
}
|
|
2508
|
-
while (
|
|
2509
|
-
var func = funcs[
|
|
2508
|
+
while (index--) {
|
|
2509
|
+
var func = funcs[index];
|
|
2510
2510
|
if (typeof func != "function") {
|
|
2511
2511
|
throw new TypeError2(FUNC_ERROR_TEXT);
|
|
2512
2512
|
}
|
|
@@ -2514,9 +2514,9 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
2514
2514
|
var wrapper = new LodashWrapper([], true);
|
|
2515
2515
|
}
|
|
2516
2516
|
}
|
|
2517
|
-
|
|
2518
|
-
while (++
|
|
2519
|
-
func = funcs[
|
|
2517
|
+
index = wrapper ? index : length;
|
|
2518
|
+
while (++index < length) {
|
|
2519
|
+
func = funcs[index];
|
|
2520
2520
|
var funcName = getFuncName(func), data = funcName == "wrapper" ? getData(func) : undefined$1;
|
|
2521
2521
|
if (data && isLaziable(data[0]) && data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && !data[4].length && data[9] == 1) {
|
|
2522
2522
|
wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
|
|
@@ -2529,9 +2529,9 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
2529
2529
|
if (wrapper && args.length == 1 && isArray2(value)) {
|
|
2530
2530
|
return wrapper.plant(value).value();
|
|
2531
2531
|
}
|
|
2532
|
-
var
|
|
2533
|
-
while (++
|
|
2534
|
-
result2 = funcs[
|
|
2532
|
+
var index2 = 0, result2 = length ? funcs[index2].apply(this, args) : value;
|
|
2533
|
+
while (++index2 < length) {
|
|
2534
|
+
result2 = funcs[index2].call(this, result2);
|
|
2535
2535
|
}
|
|
2536
2536
|
return result2;
|
|
2537
2537
|
};
|
|
@@ -2541,9 +2541,9 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
2541
2541
|
function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary2, arity) {
|
|
2542
2542
|
var isAry = bitmask & WRAP_ARY_FLAG, isBind = bitmask & WRAP_BIND_FLAG, isBindKey = bitmask & WRAP_BIND_KEY_FLAG, isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), isFlip = bitmask & WRAP_FLIP_FLAG, Ctor = isBindKey ? undefined$1 : createCtor(func);
|
|
2543
2543
|
function wrapper() {
|
|
2544
|
-
var length = arguments.length, args = Array2(length),
|
|
2545
|
-
while (
|
|
2546
|
-
args[
|
|
2544
|
+
var length = arguments.length, args = Array2(length), index = length;
|
|
2545
|
+
while (index--) {
|
|
2546
|
+
args[index] = arguments[index];
|
|
2547
2547
|
}
|
|
2548
2548
|
if (isCurried) {
|
|
2549
2549
|
var placeholder = getHolder(wrapper), holdersCount = countHolders(args, placeholder);
|
|
@@ -2828,13 +2828,13 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
2828
2828
|
if (arrStacked && othStacked) {
|
|
2829
2829
|
return arrStacked == other && othStacked == array;
|
|
2830
2830
|
}
|
|
2831
|
-
var
|
|
2831
|
+
var index = -1, result2 = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined$1;
|
|
2832
2832
|
stack.set(array, other);
|
|
2833
2833
|
stack.set(other, array);
|
|
2834
|
-
while (++
|
|
2835
|
-
var arrValue = array[
|
|
2834
|
+
while (++index < arrLength) {
|
|
2835
|
+
var arrValue = array[index], othValue = other[index];
|
|
2836
2836
|
if (customizer) {
|
|
2837
|
-
var compared = isPartial ? customizer(othValue, arrValue,
|
|
2837
|
+
var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
|
|
2838
2838
|
}
|
|
2839
2839
|
if (compared !== undefined$1) {
|
|
2840
2840
|
if (compared) {
|
|
@@ -2914,9 +2914,9 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
2914
2914
|
if (objLength != othLength && !isPartial) {
|
|
2915
2915
|
return false;
|
|
2916
2916
|
}
|
|
2917
|
-
var
|
|
2918
|
-
while (
|
|
2919
|
-
var key = objProps[
|
|
2917
|
+
var index = objLength;
|
|
2918
|
+
while (index--) {
|
|
2919
|
+
var key = objProps[index];
|
|
2920
2920
|
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
|
|
2921
2921
|
return false;
|
|
2922
2922
|
}
|
|
@@ -2930,8 +2930,8 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
2930
2930
|
stack.set(object, other);
|
|
2931
2931
|
stack.set(other, object);
|
|
2932
2932
|
var skipCtor = isPartial;
|
|
2933
|
-
while (++
|
|
2934
|
-
key = objProps[
|
|
2933
|
+
while (++index < objLength) {
|
|
2934
|
+
key = objProps[index];
|
|
2935
2935
|
var objValue = object[key], othValue = other[key];
|
|
2936
2936
|
if (customizer) {
|
|
2937
2937
|
var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
|
|
@@ -3066,9 +3066,9 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
3066
3066
|
}, "getTag");
|
|
3067
3067
|
}
|
|
3068
3068
|
function getView(start, end, transforms) {
|
|
3069
|
-
var
|
|
3070
|
-
while (++
|
|
3071
|
-
var data = transforms[
|
|
3069
|
+
var index = -1, length = transforms.length;
|
|
3070
|
+
while (++index < length) {
|
|
3071
|
+
var data = transforms[index], size2 = data.size;
|
|
3072
3072
|
switch (data.type) {
|
|
3073
3073
|
case "drop":
|
|
3074
3074
|
start += size2;
|
|
@@ -3094,15 +3094,15 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
3094
3094
|
__name(getWrapDetails, "getWrapDetails");
|
|
3095
3095
|
function hasPath(object, path, hasFunc) {
|
|
3096
3096
|
path = castPath(path, object);
|
|
3097
|
-
var
|
|
3098
|
-
while (++
|
|
3099
|
-
var key = toKey(path[
|
|
3097
|
+
var index = -1, length = path.length, result2 = false;
|
|
3098
|
+
while (++index < length) {
|
|
3099
|
+
var key = toKey(path[index]);
|
|
3100
3100
|
if (!(result2 = object != null && hasFunc(object, key))) {
|
|
3101
3101
|
break;
|
|
3102
3102
|
}
|
|
3103
3103
|
object = object[key];
|
|
3104
3104
|
}
|
|
3105
|
-
if (result2 || ++
|
|
3105
|
+
if (result2 || ++index != length) {
|
|
3106
3106
|
return result2;
|
|
3107
3107
|
}
|
|
3108
3108
|
length = object == null ? 0 : object.length;
|
|
@@ -3177,13 +3177,13 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
3177
3177
|
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
3178
3178
|
}
|
|
3179
3179
|
__name(isIndex, "isIndex");
|
|
3180
|
-
function isIterateeCall(value,
|
|
3180
|
+
function isIterateeCall(value, index, object) {
|
|
3181
3181
|
if (!isObject(object)) {
|
|
3182
3182
|
return false;
|
|
3183
3183
|
}
|
|
3184
|
-
var type = typeof
|
|
3185
|
-
if (type == "number" ? isArrayLike(object) && isIndex(
|
|
3186
|
-
return eq(object[
|
|
3184
|
+
var type = typeof index;
|
|
3185
|
+
if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) {
|
|
3186
|
+
return eq(object[index], value);
|
|
3187
3187
|
}
|
|
3188
3188
|
return false;
|
|
3189
3189
|
}
|
|
@@ -3304,14 +3304,14 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
3304
3304
|
function overRest(func, start, transform2) {
|
|
3305
3305
|
start = nativeMax(start === undefined$1 ? func.length - 1 : start, 0);
|
|
3306
3306
|
return function() {
|
|
3307
|
-
var args = arguments,
|
|
3308
|
-
while (++
|
|
3309
|
-
array[
|
|
3307
|
+
var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array2(length);
|
|
3308
|
+
while (++index < length) {
|
|
3309
|
+
array[index] = args[start + index];
|
|
3310
3310
|
}
|
|
3311
|
-
|
|
3311
|
+
index = -1;
|
|
3312
3312
|
var otherArgs = Array2(start + 1);
|
|
3313
|
-
while (++
|
|
3314
|
-
otherArgs[
|
|
3313
|
+
while (++index < start) {
|
|
3314
|
+
otherArgs[index] = args[index];
|
|
3315
3315
|
}
|
|
3316
3316
|
otherArgs[start] = transform2(array);
|
|
3317
3317
|
return apply(func, this, otherArgs);
|
|
@@ -3325,8 +3325,8 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
3325
3325
|
function reorder(array, indexes) {
|
|
3326
3326
|
var arrLength = array.length, length = nativeMin(indexes.length, arrLength), oldArray = copyArray(array);
|
|
3327
3327
|
while (length--) {
|
|
3328
|
-
var
|
|
3329
|
-
array[length] = isIndex(
|
|
3328
|
+
var index = indexes[length];
|
|
3329
|
+
array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined$1;
|
|
3330
3330
|
}
|
|
3331
3331
|
return array;
|
|
3332
3332
|
}
|
|
@@ -3368,12 +3368,12 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
3368
3368
|
}
|
|
3369
3369
|
__name(shortOut, "shortOut");
|
|
3370
3370
|
function shuffleSelf(array, size2) {
|
|
3371
|
-
var
|
|
3371
|
+
var index = -1, length = array.length, lastIndex = length - 1;
|
|
3372
3372
|
size2 = size2 === undefined$1 ? length : size2;
|
|
3373
|
-
while (++
|
|
3374
|
-
var rand = baseRandom(
|
|
3375
|
-
array[rand] = array[
|
|
3376
|
-
array[
|
|
3373
|
+
while (++index < size2) {
|
|
3374
|
+
var rand = baseRandom(index, lastIndex), value = array[rand];
|
|
3375
|
+
array[rand] = array[index];
|
|
3376
|
+
array[index] = value;
|
|
3377
3377
|
}
|
|
3378
3378
|
array.length = size2;
|
|
3379
3379
|
return array;
|
|
@@ -3442,17 +3442,17 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
3442
3442
|
if (!length || size2 < 1) {
|
|
3443
3443
|
return [];
|
|
3444
3444
|
}
|
|
3445
|
-
var
|
|
3446
|
-
while (
|
|
3447
|
-
result2[resIndex++] = baseSlice(array,
|
|
3445
|
+
var index = 0, resIndex = 0, result2 = Array2(nativeCeil(length / size2));
|
|
3446
|
+
while (index < length) {
|
|
3447
|
+
result2[resIndex++] = baseSlice(array, index, index += size2);
|
|
3448
3448
|
}
|
|
3449
3449
|
return result2;
|
|
3450
3450
|
}
|
|
3451
3451
|
__name(chunk, "chunk");
|
|
3452
3452
|
function compact(array) {
|
|
3453
|
-
var
|
|
3454
|
-
while (++
|
|
3455
|
-
var value = array[
|
|
3453
|
+
var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result2 = [];
|
|
3454
|
+
while (++index < length) {
|
|
3455
|
+
var value = array[index];
|
|
3456
3456
|
if (value) {
|
|
3457
3457
|
result2[resIndex++] = value;
|
|
3458
3458
|
}
|
|
@@ -3465,9 +3465,9 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
3465
3465
|
if (!length) {
|
|
3466
3466
|
return [];
|
|
3467
3467
|
}
|
|
3468
|
-
var args = Array2(length - 1), array = arguments[0],
|
|
3469
|
-
while (
|
|
3470
|
-
args[
|
|
3468
|
+
var args = Array2(length - 1), array = arguments[0], index = length;
|
|
3469
|
+
while (index--) {
|
|
3470
|
+
args[index - 1] = arguments[index];
|
|
3471
3471
|
}
|
|
3472
3472
|
return arrayPush(isArray2(array) ? copyArray(array) : [array], baseFlatten(args, 1));
|
|
3473
3473
|
}
|
|
@@ -3533,11 +3533,11 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
3533
3533
|
if (!length) {
|
|
3534
3534
|
return -1;
|
|
3535
3535
|
}
|
|
3536
|
-
var
|
|
3537
|
-
if (
|
|
3538
|
-
|
|
3536
|
+
var index = fromIndex == null ? 0 : toInteger(fromIndex);
|
|
3537
|
+
if (index < 0) {
|
|
3538
|
+
index = nativeMax(length + index, 0);
|
|
3539
3539
|
}
|
|
3540
|
-
return baseFindIndex(array, getIteratee(predicate, 3),
|
|
3540
|
+
return baseFindIndex(array, getIteratee(predicate, 3), index);
|
|
3541
3541
|
}
|
|
3542
3542
|
__name(findIndex, "findIndex");
|
|
3543
3543
|
function findLastIndex(array, predicate, fromIndex) {
|
|
@@ -3545,12 +3545,12 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
3545
3545
|
if (!length) {
|
|
3546
3546
|
return -1;
|
|
3547
3547
|
}
|
|
3548
|
-
var
|
|
3548
|
+
var index = length - 1;
|
|
3549
3549
|
if (fromIndex !== undefined$1) {
|
|
3550
|
-
|
|
3551
|
-
|
|
3550
|
+
index = toInteger(fromIndex);
|
|
3551
|
+
index = fromIndex < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
|
|
3552
3552
|
}
|
|
3553
|
-
return baseFindIndex(array, getIteratee(predicate, 3),
|
|
3553
|
+
return baseFindIndex(array, getIteratee(predicate, 3), index, true);
|
|
3554
3554
|
}
|
|
3555
3555
|
__name(findLastIndex, "findLastIndex");
|
|
3556
3556
|
function flatten(array) {
|
|
@@ -3573,9 +3573,9 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
3573
3573
|
}
|
|
3574
3574
|
__name(flattenDepth, "flattenDepth");
|
|
3575
3575
|
function fromPairs(pairs) {
|
|
3576
|
-
var
|
|
3577
|
-
while (++
|
|
3578
|
-
var pair = pairs[
|
|
3576
|
+
var index = -1, length = pairs == null ? 0 : pairs.length, result2 = {};
|
|
3577
|
+
while (++index < length) {
|
|
3578
|
+
var pair = pairs[index];
|
|
3579
3579
|
result2[pair[0]] = pair[1];
|
|
3580
3580
|
}
|
|
3581
3581
|
return result2;
|
|
@@ -3590,11 +3590,11 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
3590
3590
|
if (!length) {
|
|
3591
3591
|
return -1;
|
|
3592
3592
|
}
|
|
3593
|
-
var
|
|
3594
|
-
if (
|
|
3595
|
-
|
|
3593
|
+
var index = fromIndex == null ? 0 : toInteger(fromIndex);
|
|
3594
|
+
if (index < 0) {
|
|
3595
|
+
index = nativeMax(length + index, 0);
|
|
3596
3596
|
}
|
|
3597
|
-
return baseIndexOf(array, value,
|
|
3597
|
+
return baseIndexOf(array, value, index);
|
|
3598
3598
|
}
|
|
3599
3599
|
__name(indexOf, "indexOf");
|
|
3600
3600
|
function initial(array) {
|
|
@@ -3637,12 +3637,12 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
3637
3637
|
if (!length) {
|
|
3638
3638
|
return -1;
|
|
3639
3639
|
}
|
|
3640
|
-
var
|
|
3640
|
+
var index = length;
|
|
3641
3641
|
if (fromIndex !== undefined$1) {
|
|
3642
|
-
|
|
3643
|
-
|
|
3642
|
+
index = toInteger(fromIndex);
|
|
3643
|
+
index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
|
|
3644
3644
|
}
|
|
3645
|
-
return value === value ? strictLastIndexOf(array, value,
|
|
3645
|
+
return value === value ? strictLastIndexOf(array, value, index) : baseFindIndex(array, baseIsNaN, index, true);
|
|
3646
3646
|
}
|
|
3647
3647
|
__name(lastIndexOf, "lastIndexOf");
|
|
3648
3648
|
function nth(array, n) {
|
|
@@ -3664,8 +3664,8 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
3664
3664
|
__name(pullAllWith, "pullAllWith");
|
|
3665
3665
|
var pullAt = flatRest(function(array, indexes) {
|
|
3666
3666
|
var length = array == null ? 0 : array.length, result2 = baseAt(array, indexes);
|
|
3667
|
-
basePullAt(array, arrayMap(indexes, function(
|
|
3668
|
-
return isIndex(
|
|
3667
|
+
basePullAt(array, arrayMap(indexes, function(index) {
|
|
3668
|
+
return isIndex(index, length) ? +index : index;
|
|
3669
3669
|
}).sort(compareAscending));
|
|
3670
3670
|
return result2;
|
|
3671
3671
|
});
|
|
@@ -3674,13 +3674,13 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
3674
3674
|
if (!(array && array.length)) {
|
|
3675
3675
|
return result2;
|
|
3676
3676
|
}
|
|
3677
|
-
var
|
|
3677
|
+
var index = -1, indexes = [], length = array.length;
|
|
3678
3678
|
predicate = getIteratee(predicate, 3);
|
|
3679
|
-
while (++
|
|
3680
|
-
var value = array[
|
|
3681
|
-
if (predicate(value,
|
|
3679
|
+
while (++index < length) {
|
|
3680
|
+
var value = array[index];
|
|
3681
|
+
if (predicate(value, index, array)) {
|
|
3682
3682
|
result2.push(value);
|
|
3683
|
-
indexes.push(
|
|
3683
|
+
indexes.push(index);
|
|
3684
3684
|
}
|
|
3685
3685
|
}
|
|
3686
3686
|
basePullAt(array, indexes);
|
|
@@ -3717,9 +3717,9 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
3717
3717
|
function sortedIndexOf(array, value) {
|
|
3718
3718
|
var length = array == null ? 0 : array.length;
|
|
3719
3719
|
if (length) {
|
|
3720
|
-
var
|
|
3721
|
-
if (
|
|
3722
|
-
return
|
|
3720
|
+
var index = baseSortedIndex(array, value);
|
|
3721
|
+
if (index < length && eq(array[index], value)) {
|
|
3722
|
+
return index;
|
|
3723
3723
|
}
|
|
3724
3724
|
}
|
|
3725
3725
|
return -1;
|
|
@@ -3736,9 +3736,9 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
3736
3736
|
function sortedLastIndexOf(array, value) {
|
|
3737
3737
|
var length = array == null ? 0 : array.length;
|
|
3738
3738
|
if (length) {
|
|
3739
|
-
var
|
|
3740
|
-
if (eq(array[
|
|
3741
|
-
return
|
|
3739
|
+
var index = baseSortedIndex(array, value, true) - 1;
|
|
3740
|
+
if (eq(array[index], value)) {
|
|
3741
|
+
return index;
|
|
3742
3742
|
}
|
|
3743
3743
|
}
|
|
3744
3744
|
return -1;
|
|
@@ -3822,8 +3822,8 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
3822
3822
|
return true;
|
|
3823
3823
|
}
|
|
3824
3824
|
});
|
|
3825
|
-
return baseTimes(length, function(
|
|
3826
|
-
return arrayMap(array, baseProperty(
|
|
3825
|
+
return baseTimes(length, function(index) {
|
|
3826
|
+
return arrayMap(array, baseProperty(index));
|
|
3827
3827
|
});
|
|
3828
3828
|
}
|
|
3829
3829
|
__name(unzip, "unzip");
|
|
@@ -4030,9 +4030,9 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
4030
4030
|
}
|
|
4031
4031
|
__name(includes, "includes");
|
|
4032
4032
|
var invokeMap = baseRest(function(collection, path, args) {
|
|
4033
|
-
var
|
|
4033
|
+
var index = -1, isFunc = typeof path == "function", result2 = isArrayLike(collection) ? Array2(collection.length) : [];
|
|
4034
4034
|
baseEach(collection, function(value) {
|
|
4035
|
-
result2[++
|
|
4035
|
+
result2[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
|
|
4036
4036
|
});
|
|
4037
4037
|
return result2;
|
|
4038
4038
|
});
|
|
@@ -4093,11 +4093,11 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
4093
4093
|
return func(collection, n);
|
|
4094
4094
|
}
|
|
4095
4095
|
__name(sampleSize, "sampleSize");
|
|
4096
|
-
function
|
|
4096
|
+
function shuffle2(collection) {
|
|
4097
4097
|
var func = isArray2(collection) ? arrayShuffle : baseShuffle;
|
|
4098
4098
|
return func(collection);
|
|
4099
4099
|
}
|
|
4100
|
-
__name(
|
|
4100
|
+
__name(shuffle2, "shuffle");
|
|
4101
4101
|
function size(collection) {
|
|
4102
4102
|
if (collection == null) {
|
|
4103
4103
|
return 0;
|
|
@@ -4347,9 +4347,9 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
4347
4347
|
transforms = transforms.length == 1 && isArray2(transforms[0]) ? arrayMap(transforms[0], baseUnary(getIteratee())) : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
|
|
4348
4348
|
var funcsLength = transforms.length;
|
|
4349
4349
|
return baseRest(function(args) {
|
|
4350
|
-
var
|
|
4351
|
-
while (++
|
|
4352
|
-
args[
|
|
4350
|
+
var index = -1, length = nativeMin(args.length, funcsLength);
|
|
4351
|
+
while (++index < length) {
|
|
4352
|
+
args[index] = transforms[index].call(this, args[index]);
|
|
4353
4353
|
}
|
|
4354
4354
|
return apply(func, this, args);
|
|
4355
4355
|
});
|
|
@@ -4468,7 +4468,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
4468
4468
|
return value === true || value === false || isObjectLike(value) && baseGetTag(value) == boolTag;
|
|
4469
4469
|
}
|
|
4470
4470
|
__name(isBoolean, "isBoolean");
|
|
4471
|
-
var
|
|
4471
|
+
var isBuffer = nativeIsBuffer || stubFalse;
|
|
4472
4472
|
var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
|
|
4473
4473
|
function isElement(value) {
|
|
4474
4474
|
return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
|
|
@@ -4478,7 +4478,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
4478
4478
|
if (value == null) {
|
|
4479
4479
|
return true;
|
|
4480
4480
|
}
|
|
4481
|
-
if (isArrayLike(value) && (isArray2(value) || typeof value == "string" || typeof value.splice == "function" ||
|
|
4481
|
+
if (isArrayLike(value) && (isArray2(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isTypedArray(value) || isArguments(value))) {
|
|
4482
4482
|
return !value.length;
|
|
4483
4483
|
}
|
|
4484
4484
|
var tag = getTag(value);
|
|
@@ -4713,14 +4713,14 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
4713
4713
|
__name(create, "create");
|
|
4714
4714
|
var defaults = baseRest(function(object, sources) {
|
|
4715
4715
|
object = Object2(object);
|
|
4716
|
-
var
|
|
4716
|
+
var index = -1;
|
|
4717
4717
|
var length = sources.length;
|
|
4718
4718
|
var guard = length > 2 ? sources[2] : undefined$1;
|
|
4719
4719
|
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
|
4720
4720
|
length = 1;
|
|
4721
4721
|
}
|
|
4722
|
-
while (++
|
|
4723
|
-
var source2 = sources[
|
|
4722
|
+
while (++index < length) {
|
|
4723
|
+
var source2 = sources[index];
|
|
4724
4724
|
var props = keysIn(source2);
|
|
4725
4725
|
var propsIndex = -1;
|
|
4726
4726
|
var propsLength = props.length;
|
|
@@ -4875,15 +4875,15 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
4875
4875
|
__name(pickBy, "pickBy");
|
|
4876
4876
|
function result(object, path, defaultValue) {
|
|
4877
4877
|
path = castPath(path, object);
|
|
4878
|
-
var
|
|
4878
|
+
var index = -1, length = path.length;
|
|
4879
4879
|
if (!length) {
|
|
4880
4880
|
length = 1;
|
|
4881
4881
|
object = undefined$1;
|
|
4882
4882
|
}
|
|
4883
|
-
while (++
|
|
4884
|
-
var value = object == null ? undefined$1 : object[toKey(path[
|
|
4883
|
+
while (++index < length) {
|
|
4884
|
+
var value = object == null ? undefined$1 : object[toKey(path[index])];
|
|
4885
4885
|
if (value === undefined$1) {
|
|
4886
|
-
|
|
4886
|
+
index = length;
|
|
4887
4887
|
value = defaultValue;
|
|
4888
4888
|
}
|
|
4889
4889
|
object = isFunction(value) ? value.call(object) : value;
|
|
@@ -4903,7 +4903,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
4903
4903
|
var toPairs = createToPairs(keys);
|
|
4904
4904
|
var toPairsIn = createToPairs(keysIn);
|
|
4905
4905
|
function transform(object, iteratee2, accumulator) {
|
|
4906
|
-
var isArr = isArray2(object), isArrLike = isArr ||
|
|
4906
|
+
var isArr = isArray2(object), isArrLike = isArr || isBuffer(object) || isTypedArray(object);
|
|
4907
4907
|
iteratee2 = getIteratee(iteratee2, 4);
|
|
4908
4908
|
if (accumulator == null) {
|
|
4909
4909
|
var Ctor = object && object.constructor;
|
|
@@ -4915,8 +4915,8 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
4915
4915
|
accumulator = {};
|
|
4916
4916
|
}
|
|
4917
4917
|
}
|
|
4918
|
-
(isArrLike ? arrayEach : baseForOwn)(object, function(value,
|
|
4919
|
-
return iteratee2(accumulator, value,
|
|
4918
|
+
(isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object2) {
|
|
4919
|
+
return iteratee2(accumulator, value, index, object2);
|
|
4920
4920
|
});
|
|
4921
4921
|
return accumulator;
|
|
4922
4922
|
}
|
|
@@ -4970,7 +4970,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
4970
4970
|
return baseInRange(number, start, end);
|
|
4971
4971
|
}
|
|
4972
4972
|
__name(inRange, "inRange");
|
|
4973
|
-
function
|
|
4973
|
+
function random2(lower, upper, floating) {
|
|
4974
4974
|
if (floating && typeof floating != "boolean" && isIterateeCall(lower, upper, floating)) {
|
|
4975
4975
|
upper = floating = undefined$1;
|
|
4976
4976
|
}
|
|
@@ -5006,10 +5006,10 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
5006
5006
|
}
|
|
5007
5007
|
return baseRandom(lower, upper);
|
|
5008
5008
|
}
|
|
5009
|
-
__name(
|
|
5010
|
-
var camelCase = createCompounder(function(result2, word,
|
|
5009
|
+
__name(random2, "random");
|
|
5010
|
+
var camelCase = createCompounder(function(result2, word, index) {
|
|
5011
5011
|
word = word.toLowerCase();
|
|
5012
|
-
return result2 + (
|
|
5012
|
+
return result2 + (index ? capitalize(word) : word);
|
|
5013
5013
|
});
|
|
5014
5014
|
function capitalize(string) {
|
|
5015
5015
|
return upperFirst(toString(string).toLowerCase());
|
|
@@ -5040,11 +5040,11 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
5040
5040
|
return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, "\\$&") : string;
|
|
5041
5041
|
}
|
|
5042
5042
|
__name(escapeRegExp, "escapeRegExp");
|
|
5043
|
-
var kebabCase = createCompounder(function(result2, word,
|
|
5044
|
-
return result2 + (
|
|
5043
|
+
var kebabCase = createCompounder(function(result2, word, index) {
|
|
5044
|
+
return result2 + (index ? "-" : "") + word.toLowerCase();
|
|
5045
5045
|
});
|
|
5046
|
-
var lowerCase = createCompounder(function(result2, word,
|
|
5047
|
-
return result2 + (
|
|
5046
|
+
var lowerCase = createCompounder(function(result2, word, index) {
|
|
5047
|
+
return result2 + (index ? " " : "") + word.toLowerCase();
|
|
5048
5048
|
});
|
|
5049
5049
|
var lowerFirst = createCaseFirst("toLowerCase");
|
|
5050
5050
|
function pad(string, length, chars) {
|
|
@@ -5095,8 +5095,8 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
5095
5095
|
return args.length < 3 ? string : string.replace(args[1], args[2]);
|
|
5096
5096
|
}
|
|
5097
5097
|
__name(replace, "replace");
|
|
5098
|
-
var snakeCase = createCompounder(function(result2, word,
|
|
5099
|
-
return result2 + (
|
|
5098
|
+
var snakeCase = createCompounder(function(result2, word, index) {
|
|
5099
|
+
return result2 + (index ? "_" : "") + word.toLowerCase();
|
|
5100
5100
|
});
|
|
5101
5101
|
function split(string, separator, limit) {
|
|
5102
5102
|
if (limit && typeof limit != "number" && isIterateeCall(string, separator, limit)) {
|
|
@@ -5116,8 +5116,8 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
5116
5116
|
return string.split(separator, limit);
|
|
5117
5117
|
}
|
|
5118
5118
|
__name(split, "split");
|
|
5119
|
-
var startCase = createCompounder(function(result2, word,
|
|
5120
|
-
return result2 + (
|
|
5119
|
+
var startCase = createCompounder(function(result2, word, index) {
|
|
5120
|
+
return result2 + (index ? " " : "") + upperFirst(word);
|
|
5121
5121
|
});
|
|
5122
5122
|
function startsWith(string, target, position) {
|
|
5123
5123
|
string = toString(string);
|
|
@@ -5134,7 +5134,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
5134
5134
|
string = toString(string);
|
|
5135
5135
|
options = assignInWith({}, options, settings, customDefaultsAssignIn);
|
|
5136
5136
|
var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn), importsKeys = keys(imports), importsValues = baseValues(imports, importsKeys);
|
|
5137
|
-
var isEscaping, isEvaluating,
|
|
5137
|
+
var isEscaping, isEvaluating, index = 0, interpolate = options.interpolate || reNoMatch, source2 = "__p += '";
|
|
5138
5138
|
var reDelimiters = RegExp2(
|
|
5139
5139
|
(options.escape || reNoMatch).source + "|" + interpolate.source + "|" + (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + "|" + (options.evaluate || reNoMatch).source + "|$",
|
|
5140
5140
|
"g"
|
|
@@ -5142,7 +5142,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
5142
5142
|
var sourceURL = "//# sourceURL=" + (hasOwnProperty.call(options, "sourceURL") ? (options.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++templateCounter + "]") + "\n";
|
|
5143
5143
|
string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
|
|
5144
5144
|
interpolateValue || (interpolateValue = esTemplateValue);
|
|
5145
|
-
source2 += string.slice(
|
|
5145
|
+
source2 += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
|
|
5146
5146
|
if (escapeValue) {
|
|
5147
5147
|
isEscaping = true;
|
|
5148
5148
|
source2 += "' +\n__e(" + escapeValue + ") +\n'";
|
|
@@ -5154,7 +5154,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
5154
5154
|
if (interpolateValue) {
|
|
5155
5155
|
source2 += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
|
|
5156
5156
|
}
|
|
5157
|
-
|
|
5157
|
+
index = offset + match.length;
|
|
5158
5158
|
return match;
|
|
5159
5159
|
});
|
|
5160
5160
|
source2 += "';\n";
|
|
@@ -5260,9 +5260,9 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
5260
5260
|
result2 = result2.slice(0, newEnd === undefined$1 ? end : newEnd);
|
|
5261
5261
|
}
|
|
5262
5262
|
} else if (string.indexOf(baseToString(separator), end) != end) {
|
|
5263
|
-
var
|
|
5264
|
-
if (
|
|
5265
|
-
result2 = result2.slice(0,
|
|
5263
|
+
var index = result2.lastIndexOf(separator);
|
|
5264
|
+
if (index > -1) {
|
|
5265
|
+
result2 = result2.slice(0, index);
|
|
5266
5266
|
}
|
|
5267
5267
|
}
|
|
5268
5268
|
return result2 + omission;
|
|
@@ -5273,8 +5273,8 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
5273
5273
|
return string && reHasEscapedHtml.test(string) ? string.replace(reEscapedHtml, unescapeHtmlChar) : string;
|
|
5274
5274
|
}
|
|
5275
5275
|
__name(unescape, "unescape");
|
|
5276
|
-
var upperCase = createCompounder(function(result2, word,
|
|
5277
|
-
return result2 + (
|
|
5276
|
+
var upperCase = createCompounder(function(result2, word, index) {
|
|
5277
|
+
return result2 + (index ? " " : "") + word.toUpperCase();
|
|
5278
5278
|
});
|
|
5279
5279
|
var upperFirst = createCaseFirst("toUpperCase");
|
|
5280
5280
|
function words(string, pattern, guard) {
|
|
@@ -5309,9 +5309,9 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
5309
5309
|
return [toIteratee(pair[0]), pair[1]];
|
|
5310
5310
|
});
|
|
5311
5311
|
return baseRest(function(args) {
|
|
5312
|
-
var
|
|
5313
|
-
while (++
|
|
5314
|
-
var pair = pairs[
|
|
5312
|
+
var index = -1;
|
|
5313
|
+
while (++index < length) {
|
|
5314
|
+
var pair = pairs[index];
|
|
5315
5315
|
if (apply(pair[0], this, args)) {
|
|
5316
5316
|
return apply(pair[1], this, args);
|
|
5317
5317
|
}
|
|
@@ -5446,12 +5446,12 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
5446
5446
|
if (n < 1 || n > MAX_SAFE_INTEGER) {
|
|
5447
5447
|
return [];
|
|
5448
5448
|
}
|
|
5449
|
-
var
|
|
5449
|
+
var index = MAX_ARRAY_LENGTH, length = nativeMin(n, MAX_ARRAY_LENGTH);
|
|
5450
5450
|
iteratee2 = getIteratee(iteratee2);
|
|
5451
5451
|
n -= MAX_ARRAY_LENGTH;
|
|
5452
5452
|
var result2 = baseTimes(length, iteratee2);
|
|
5453
|
-
while (++
|
|
5454
|
-
iteratee2(
|
|
5453
|
+
while (++index < n) {
|
|
5454
|
+
iteratee2(index);
|
|
5455
5455
|
}
|
|
5456
5456
|
return result2;
|
|
5457
5457
|
}
|
|
@@ -5619,7 +5619,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
5619
5619
|
lodash2.sampleSize = sampleSize;
|
|
5620
5620
|
lodash2.set = set;
|
|
5621
5621
|
lodash2.setWith = setWith;
|
|
5622
|
-
lodash2.shuffle =
|
|
5622
|
+
lodash2.shuffle = shuffle2;
|
|
5623
5623
|
lodash2.slice = slice;
|
|
5624
5624
|
lodash2.sortBy = sortBy;
|
|
5625
5625
|
lodash2.sortedUniq = sortedUniq;
|
|
@@ -5718,7 +5718,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
5718
5718
|
lodash2.isArrayLike = isArrayLike;
|
|
5719
5719
|
lodash2.isArrayLikeObject = isArrayLikeObject;
|
|
5720
5720
|
lodash2.isBoolean = isBoolean;
|
|
5721
|
-
lodash2.isBuffer =
|
|
5721
|
+
lodash2.isBuffer = isBuffer;
|
|
5722
5722
|
lodash2.isDate = isDate;
|
|
5723
5723
|
lodash2.isElement = isElement;
|
|
5724
5724
|
lodash2.isEmpty = isEmpty;
|
|
@@ -5777,7 +5777,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
5777
5777
|
lodash2.padEnd = padEnd;
|
|
5778
5778
|
lodash2.padStart = padStart;
|
|
5779
5779
|
lodash2.parseInt = parseInt2;
|
|
5780
|
-
lodash2.random =
|
|
5780
|
+
lodash2.random = random2;
|
|
5781
5781
|
lodash2.reduce = reduce;
|
|
5782
5782
|
lodash2.reduceRight = reduceRight;
|
|
5783
5783
|
lodash2.repeat = repeat;
|
|
@@ -5834,10 +5834,10 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
5834
5834
|
arrayEach(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(methodName) {
|
|
5835
5835
|
lodash2[methodName].placeholder = lodash2;
|
|
5836
5836
|
});
|
|
5837
|
-
arrayEach(["drop", "take"], function(methodName,
|
|
5837
|
+
arrayEach(["drop", "take"], function(methodName, index) {
|
|
5838
5838
|
LazyWrapper.prototype[methodName] = function(n) {
|
|
5839
5839
|
n = n === undefined$1 ? 1 : nativeMax(toInteger(n), 0);
|
|
5840
|
-
var result2 = this.__filtered__ && !
|
|
5840
|
+
var result2 = this.__filtered__ && !index ? new LazyWrapper(this) : this.clone();
|
|
5841
5841
|
if (result2.__filtered__) {
|
|
5842
5842
|
result2.__takeCount__ = nativeMin(n, result2.__takeCount__);
|
|
5843
5843
|
} else {
|
|
@@ -5852,8 +5852,8 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
5852
5852
|
return this.reverse()[methodName](n).reverse();
|
|
5853
5853
|
};
|
|
5854
5854
|
});
|
|
5855
|
-
arrayEach(["filter", "map", "takeWhile"], function(methodName,
|
|
5856
|
-
var type =
|
|
5855
|
+
arrayEach(["filter", "map", "takeWhile"], function(methodName, index) {
|
|
5856
|
+
var type = index + 1, isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
|
|
5857
5857
|
LazyWrapper.prototype[methodName] = function(iteratee2) {
|
|
5858
5858
|
var result2 = this.clone();
|
|
5859
5859
|
result2.__iteratees__.push({
|
|
@@ -5864,14 +5864,14 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
5864
5864
|
return result2;
|
|
5865
5865
|
};
|
|
5866
5866
|
});
|
|
5867
|
-
arrayEach(["head", "last"], function(methodName,
|
|
5868
|
-
var takeName = "take" + (
|
|
5867
|
+
arrayEach(["head", "last"], function(methodName, index) {
|
|
5868
|
+
var takeName = "take" + (index ? "Right" : "");
|
|
5869
5869
|
LazyWrapper.prototype[methodName] = function() {
|
|
5870
5870
|
return this[takeName](1).value()[0];
|
|
5871
5871
|
};
|
|
5872
5872
|
});
|
|
5873
|
-
arrayEach(["initial", "tail"], function(methodName,
|
|
5874
|
-
var dropName = "drop" + (
|
|
5873
|
+
arrayEach(["initial", "tail"], function(methodName, index) {
|
|
5874
|
+
var dropName = "drop" + (index ? "" : "Right");
|
|
5875
5875
|
LazyWrapper.prototype[methodName] = function() {
|
|
5876
5876
|
return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
|
|
5877
5877
|
};
|
|
@@ -6560,7 +6560,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
6560
6560
|
rangeToBeTrimmed,
|
|
6561
6561
|
sequenceLength
|
|
6562
6562
|
);
|
|
6563
|
-
splitRangesToBeTrimmed.forEach(function(nonCircularRangeToBeTrimmed,
|
|
6563
|
+
splitRangesToBeTrimmed.forEach(function(nonCircularRangeToBeTrimmed, index) {
|
|
6564
6564
|
overlaps.forEach(function(overlap) {
|
|
6565
6565
|
if (nonCircularRangeToBeTrimmed) {
|
|
6566
6566
|
nonCircularRangeToBeTrimmed = trimNonCicularRangeByAnotherNonCircularRange(
|
|
@@ -6569,7 +6569,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
6569
6569
|
);
|
|
6570
6570
|
}
|
|
6571
6571
|
});
|
|
6572
|
-
splitRangesToBeTrimmed[
|
|
6572
|
+
splitRangesToBeTrimmed[index] = nonCircularRangeToBeTrimmed;
|
|
6573
6573
|
});
|
|
6574
6574
|
const outputSplitRanges = splitRangesToBeTrimmed.filter(function(trimmedRange) {
|
|
6575
6575
|
if (trimmedRange) {
|
|
@@ -6724,12 +6724,12 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
6724
6724
|
const args = Array.prototype.slice.call(arguments);
|
|
6725
6725
|
const options = args[args.length - 1];
|
|
6726
6726
|
if (options && (options.inclusive1BasedEnd || options.inclusive1BasedStart)) {
|
|
6727
|
-
args.forEach(function(arg,
|
|
6727
|
+
args.forEach(function(arg, index) {
|
|
6728
6728
|
if (arg && arg.start > -1 && options.inclusive1BasedStart) {
|
|
6729
|
-
args[
|
|
6729
|
+
args[index] = lodashExports.assign(arg, { start: arg.start - 1 });
|
|
6730
6730
|
}
|
|
6731
6731
|
if (arg && arg.end > -1 && options.inclusive1BasedEnd) {
|
|
6732
|
-
args[
|
|
6732
|
+
args[index] = lodashExports.assign(arg, { end: arg.end - 1 });
|
|
6733
6733
|
}
|
|
6734
6734
|
});
|
|
6735
6735
|
}
|
|
@@ -6759,7 +6759,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
6759
6759
|
}
|
|
6760
6760
|
__name(getRangeLength$1, "getRangeLength$1");
|
|
6761
6761
|
function isRangeWithinRange(rangeToCheck, containingRange, maxLength) {
|
|
6762
|
-
|
|
6762
|
+
const ranges = trimRangeByAnotherRange(
|
|
6763
6763
|
rangeToCheck,
|
|
6764
6764
|
containingRange,
|
|
6765
6765
|
maxLength
|
|
@@ -6924,14 +6924,14 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
6924
6924
|
__name(getShortestDistanceBetweenTwoPositions, "getShortestDistanceBetweenTwoPositions");
|
|
6925
6925
|
function getYOffsetForPotentiallyCircularRange(range, YOffsetLevelsWithRanges, assignYOffsetToRange) {
|
|
6926
6926
|
let yOffset = [];
|
|
6927
|
-
const openYOffsetFound = YOffsetLevelsWithRanges.some(function(rangesAlreadyAddedToYOffset,
|
|
6927
|
+
const openYOffsetFound = YOffsetLevelsWithRanges.some(function(rangesAlreadyAddedToYOffset, index) {
|
|
6928
6928
|
const rangeBlocked = rangesAlreadyAddedToYOffset.some(function(comparisonRange) {
|
|
6929
6929
|
return checkIfPotentiallyCircularRangesOverlap(range, comparisonRange);
|
|
6930
6930
|
});
|
|
6931
6931
|
if (!rangeBlocked) {
|
|
6932
|
-
yOffset =
|
|
6932
|
+
yOffset = index;
|
|
6933
6933
|
if (assignYOffsetToRange)
|
|
6934
|
-
range.yOffset =
|
|
6934
|
+
range.yOffset = index;
|
|
6935
6935
|
rangesAlreadyAddedToYOffset.push(range);
|
|
6936
6936
|
return true;
|
|
6937
6937
|
}
|
|
@@ -7243,9 +7243,9 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
7243
7243
|
let isGroupClosed = true;
|
|
7244
7244
|
let closingBraceHit;
|
|
7245
7245
|
const groups = [];
|
|
7246
|
-
for (let
|
|
7247
|
-
const char = newstr[
|
|
7248
|
-
const nextChar = newstr[
|
|
7246
|
+
for (let index = 0; index < newstr.length; index++) {
|
|
7247
|
+
const char = newstr[index];
|
|
7248
|
+
const nextChar = newstr[index + 1];
|
|
7249
7249
|
if (char === "[") {
|
|
7250
7250
|
isGroupClosed = false;
|
|
7251
7251
|
} else if (char === "]" || closingBraceHit) {
|
|
@@ -7423,151 +7423,232 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
7423
7423
|
const getFeatureTypes = /* @__PURE__ */ __name(({ includeHidden } = {}) => lodashExports.filter(getMergedFeatureMap(), (f) => includeHidden ? true : !f.isHidden).map(
|
|
7424
7424
|
(f) => f.name
|
|
7425
7425
|
), "getFeatureTypes");
|
|
7426
|
-
var
|
|
7427
|
-
var
|
|
7428
|
-
|
|
7429
|
-
|
|
7430
|
-
return
|
|
7431
|
-
}, "isBuffer");
|
|
7432
|
-
function ObjectID(arg) {
|
|
7433
|
-
if (!(this instanceof ObjectID))
|
|
7434
|
-
return new ObjectID(arg);
|
|
7435
|
-
if (arg && (arg instanceof ObjectID || arg._bsontype === "ObjectID"))
|
|
7436
|
-
return arg;
|
|
7437
|
-
var buf;
|
|
7438
|
-
if (isBuffer(arg) || Array.isArray(arg) && arg.length === 12) {
|
|
7439
|
-
buf = Array.prototype.slice.call(arg);
|
|
7440
|
-
} else if (typeof arg === "string") {
|
|
7441
|
-
if (arg.length !== 12 && !ObjectID.isValid(arg))
|
|
7442
|
-
throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");
|
|
7443
|
-
buf = buffer(arg);
|
|
7444
|
-
} else if (/number|undefined/.test(typeof arg)) {
|
|
7445
|
-
buf = buffer(generate(arg));
|
|
7446
|
-
}
|
|
7447
|
-
Object.defineProperty(this, "id", {
|
|
7448
|
-
enumerable: true,
|
|
7449
|
-
get: function() {
|
|
7450
|
-
return String.fromCharCode.apply(this, buf);
|
|
7451
|
-
}
|
|
7452
|
-
});
|
|
7453
|
-
Object.defineProperty(this, "str", {
|
|
7454
|
-
get: function() {
|
|
7455
|
-
return buf.map(hex.bind(this, 2)).join("");
|
|
7456
|
-
}
|
|
7457
|
-
});
|
|
7426
|
+
var lib = { exports: {} };
|
|
7427
|
+
var seed = 1;
|
|
7428
|
+
function getNextValue() {
|
|
7429
|
+
seed = (seed * 9301 + 49297) % 233280;
|
|
7430
|
+
return seed / 233280;
|
|
7458
7431
|
}
|
|
7459
|
-
__name(
|
|
7460
|
-
|
|
7461
|
-
|
|
7462
|
-
|
|
7463
|
-
|
|
7464
|
-
|
|
7465
|
-
|
|
7466
|
-
|
|
7467
|
-
ObjectID.createFromHexString = function(hexString) {
|
|
7468
|
-
if (!ObjectID.isValid(hexString))
|
|
7469
|
-
throw new Error("Invalid ObjectID hex string");
|
|
7470
|
-
return new ObjectID(hexString);
|
|
7471
|
-
};
|
|
7472
|
-
ObjectID.isValid = function(objectid2) {
|
|
7473
|
-
if (!objectid2 || typeof objectid2 !== "string" && (typeof objectid2 !== "object" || Array.isArray(objectid2) || typeof objectid2.toString !== "function"))
|
|
7474
|
-
return false;
|
|
7475
|
-
return /^[0-9A-F]{24}$/i.test(objectid2.toString());
|
|
7432
|
+
__name(getNextValue, "getNextValue");
|
|
7433
|
+
function setSeed$1(_seed_) {
|
|
7434
|
+
seed = _seed_;
|
|
7435
|
+
}
|
|
7436
|
+
__name(setSeed$1, "setSeed$1");
|
|
7437
|
+
var randomFromSeed$1 = {
|
|
7438
|
+
nextValue: getNextValue,
|
|
7439
|
+
seed: setSeed$1
|
|
7476
7440
|
};
|
|
7477
|
-
|
|
7478
|
-
|
|
7479
|
-
|
|
7480
|
-
|
|
7481
|
-
|
|
7482
|
-
|
|
7483
|
-
|
|
7484
|
-
|
|
7485
|
-
|
|
7486
|
-
|
|
7441
|
+
var randomFromSeed = randomFromSeed$1;
|
|
7442
|
+
var ORIGINAL = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";
|
|
7443
|
+
var alphabet$2;
|
|
7444
|
+
var previousSeed;
|
|
7445
|
+
var shuffled;
|
|
7446
|
+
function reset() {
|
|
7447
|
+
shuffled = false;
|
|
7448
|
+
}
|
|
7449
|
+
__name(reset, "reset");
|
|
7450
|
+
function setCharacters(_alphabet_) {
|
|
7451
|
+
if (!_alphabet_) {
|
|
7452
|
+
if (alphabet$2 !== ORIGINAL) {
|
|
7453
|
+
alphabet$2 = ORIGINAL;
|
|
7454
|
+
reset();
|
|
7487
7455
|
}
|
|
7488
|
-
|
|
7489
|
-
machineID = arg | 0;
|
|
7456
|
+
return;
|
|
7490
7457
|
}
|
|
7491
|
-
|
|
7492
|
-
|
|
7493
|
-
ObjectID.getMachineID = function() {
|
|
7494
|
-
return MACHINE_ID;
|
|
7495
|
-
};
|
|
7496
|
-
ObjectID.prototype = {
|
|
7497
|
-
_bsontype: "ObjectID",
|
|
7498
|
-
constructor: ObjectID,
|
|
7499
|
-
/**
|
|
7500
|
-
* Return the ObjectID id as a 24 byte hex string representation
|
|
7501
|
-
*
|
|
7502
|
-
* @return {String} return the 24 byte hex string representation.
|
|
7503
|
-
* @api public
|
|
7504
|
-
*/
|
|
7505
|
-
toHexString: function() {
|
|
7506
|
-
return this.str;
|
|
7507
|
-
},
|
|
7508
|
-
/**
|
|
7509
|
-
* Compares the equality of this ObjectID with `otherID`.
|
|
7510
|
-
*
|
|
7511
|
-
* @param {Object} other ObjectID instance to compare against.
|
|
7512
|
-
* @return {Boolean} the result of comparing two ObjectID's
|
|
7513
|
-
* @api public
|
|
7514
|
-
*/
|
|
7515
|
-
equals: function(other) {
|
|
7516
|
-
return !!other && this.str === other.toString();
|
|
7517
|
-
},
|
|
7518
|
-
/**
|
|
7519
|
-
* Returns the generation date (accurate up to the second) that this ID was generated.
|
|
7520
|
-
*
|
|
7521
|
-
* @return {Date} the generation date
|
|
7522
|
-
* @api public
|
|
7523
|
-
*/
|
|
7524
|
-
getTimestamp: function() {
|
|
7525
|
-
return new Date(parseInt(this.str.substr(0, 8), 16) * 1e3);
|
|
7458
|
+
if (_alphabet_ === alphabet$2) {
|
|
7459
|
+
return;
|
|
7526
7460
|
}
|
|
7527
|
-
|
|
7528
|
-
|
|
7529
|
-
|
|
7461
|
+
if (_alphabet_.length !== ORIGINAL.length) {
|
|
7462
|
+
throw new Error("Custom alphabet for shortid must be " + ORIGINAL.length + " unique characters. You submitted " + _alphabet_.length + " characters: " + _alphabet_);
|
|
7463
|
+
}
|
|
7464
|
+
var unique = _alphabet_.split("").filter(function(item, ind, arr) {
|
|
7465
|
+
return ind !== arr.lastIndexOf(item);
|
|
7466
|
+
});
|
|
7467
|
+
if (unique.length) {
|
|
7468
|
+
throw new Error("Custom alphabet for shortid must be " + ORIGINAL.length + " unique characters. These characters were not unique: " + unique.join(", "));
|
|
7469
|
+
}
|
|
7470
|
+
alphabet$2 = _alphabet_;
|
|
7471
|
+
reset();
|
|
7530
7472
|
}
|
|
7531
|
-
__name(
|
|
7532
|
-
function
|
|
7533
|
-
|
|
7534
|
-
|
|
7535
|
-
time = parseInt(time, 10) % 4294967295;
|
|
7536
|
-
return hex(8, time) + hex(6, MACHINE_ID) + hex(4, pid) + hex(6, next());
|
|
7473
|
+
__name(setCharacters, "setCharacters");
|
|
7474
|
+
function characters(_alphabet_) {
|
|
7475
|
+
setCharacters(_alphabet_);
|
|
7476
|
+
return alphabet$2;
|
|
7537
7477
|
}
|
|
7538
|
-
__name(
|
|
7539
|
-
function
|
|
7540
|
-
|
|
7541
|
-
|
|
7478
|
+
__name(characters, "characters");
|
|
7479
|
+
function setSeed(seed2) {
|
|
7480
|
+
randomFromSeed.seed(seed2);
|
|
7481
|
+
if (previousSeed !== seed2) {
|
|
7482
|
+
reset();
|
|
7483
|
+
previousSeed = seed2;
|
|
7484
|
+
}
|
|
7542
7485
|
}
|
|
7543
|
-
__name(
|
|
7544
|
-
function
|
|
7545
|
-
|
|
7546
|
-
|
|
7547
|
-
|
|
7548
|
-
|
|
7549
|
-
|
|
7550
|
-
|
|
7551
|
-
|
|
7552
|
-
|
|
7486
|
+
__name(setSeed, "setSeed");
|
|
7487
|
+
function shuffle() {
|
|
7488
|
+
if (!alphabet$2) {
|
|
7489
|
+
setCharacters(ORIGINAL);
|
|
7490
|
+
}
|
|
7491
|
+
var sourceArray = alphabet$2.split("");
|
|
7492
|
+
var targetArray = [];
|
|
7493
|
+
var r = randomFromSeed.nextValue();
|
|
7494
|
+
var characterIndex;
|
|
7495
|
+
while (sourceArray.length > 0) {
|
|
7496
|
+
r = randomFromSeed.nextValue();
|
|
7497
|
+
characterIndex = Math.floor(r * sourceArray.length);
|
|
7498
|
+
targetArray.push(sourceArray.splice(characterIndex, 1)[0]);
|
|
7499
|
+
}
|
|
7500
|
+
return targetArray.join("");
|
|
7501
|
+
}
|
|
7502
|
+
__name(shuffle, "shuffle");
|
|
7503
|
+
function getShuffled() {
|
|
7504
|
+
if (shuffled) {
|
|
7505
|
+
return shuffled;
|
|
7506
|
+
}
|
|
7507
|
+
shuffled = shuffle();
|
|
7508
|
+
return shuffled;
|
|
7553
7509
|
}
|
|
7554
|
-
__name(
|
|
7555
|
-
|
|
7556
|
-
|
|
7557
|
-
return
|
|
7510
|
+
__name(getShuffled, "getShuffled");
|
|
7511
|
+
function lookup(index) {
|
|
7512
|
+
var alphabetShuffled = getShuffled();
|
|
7513
|
+
return alphabetShuffled[index];
|
|
7514
|
+
}
|
|
7515
|
+
__name(lookup, "lookup");
|
|
7516
|
+
function get$2() {
|
|
7517
|
+
return alphabet$2 || ORIGINAL;
|
|
7518
|
+
}
|
|
7519
|
+
__name(get$2, "get$2");
|
|
7520
|
+
var alphabet_1 = {
|
|
7521
|
+
get: get$2,
|
|
7522
|
+
characters,
|
|
7523
|
+
seed: setSeed,
|
|
7524
|
+
lookup,
|
|
7525
|
+
shuffled: getShuffled
|
|
7558
7526
|
};
|
|
7559
|
-
|
|
7560
|
-
|
|
7561
|
-
|
|
7527
|
+
var crypto = typeof window === "object" && (window.crypto || window.msCrypto);
|
|
7528
|
+
var randomByte;
|
|
7529
|
+
if (!crypto || !crypto.getRandomValues) {
|
|
7530
|
+
randomByte = /* @__PURE__ */ __name(function(size) {
|
|
7531
|
+
var bytes = [];
|
|
7532
|
+
for (var i = 0; i < size; i++) {
|
|
7533
|
+
bytes.push(Math.floor(Math.random() * 256));
|
|
7534
|
+
}
|
|
7535
|
+
return bytes;
|
|
7536
|
+
}, "randomByte");
|
|
7537
|
+
} else {
|
|
7538
|
+
randomByte = /* @__PURE__ */ __name(function(size) {
|
|
7539
|
+
return crypto.getRandomValues(new Uint8Array(size));
|
|
7540
|
+
}, "randomByte");
|
|
7541
|
+
}
|
|
7542
|
+
var randomByteBrowser = randomByte;
|
|
7543
|
+
var format_browser = /* @__PURE__ */ __name(function(random2, alphabet2, size) {
|
|
7544
|
+
var mask = (2 << Math.log(alphabet2.length - 1) / Math.LN2) - 1;
|
|
7545
|
+
var step = -~(1.6 * mask * size / alphabet2.length);
|
|
7546
|
+
var id = "";
|
|
7547
|
+
while (true) {
|
|
7548
|
+
var bytes = random2(step);
|
|
7549
|
+
var i = step;
|
|
7550
|
+
while (i--) {
|
|
7551
|
+
id += alphabet2[bytes[i] & mask] || "";
|
|
7552
|
+
if (id.length === +size)
|
|
7553
|
+
return id;
|
|
7554
|
+
}
|
|
7555
|
+
}
|
|
7556
|
+
}, "format_browser");
|
|
7557
|
+
var alphabet$1 = alphabet_1;
|
|
7558
|
+
var random = randomByteBrowser;
|
|
7559
|
+
var format = format_browser;
|
|
7560
|
+
function generate$1(number) {
|
|
7561
|
+
var loopCounter = 0;
|
|
7562
|
+
var done;
|
|
7563
|
+
var str = "";
|
|
7564
|
+
while (!done) {
|
|
7565
|
+
str = str + format(random, alphabet$1.get(), 1);
|
|
7566
|
+
done = number < Math.pow(16, loopCounter + 1);
|
|
7567
|
+
loopCounter++;
|
|
7568
|
+
}
|
|
7569
|
+
return str;
|
|
7570
|
+
}
|
|
7571
|
+
__name(generate$1, "generate$1");
|
|
7572
|
+
var generate_1 = generate$1;
|
|
7573
|
+
var generate = generate_1;
|
|
7574
|
+
var REDUCE_TIME = 1567752802062;
|
|
7575
|
+
var version = 7;
|
|
7576
|
+
var counter;
|
|
7577
|
+
var previousSeconds;
|
|
7578
|
+
function build(clusterWorkerId) {
|
|
7579
|
+
var str = "";
|
|
7580
|
+
var seconds = Math.floor((Date.now() - REDUCE_TIME) * 1e-3);
|
|
7581
|
+
if (seconds === previousSeconds) {
|
|
7582
|
+
counter++;
|
|
7583
|
+
} else {
|
|
7584
|
+
counter = 0;
|
|
7585
|
+
previousSeconds = seconds;
|
|
7586
|
+
}
|
|
7587
|
+
str = str + generate(version);
|
|
7588
|
+
str = str + generate(clusterWorkerId);
|
|
7589
|
+
if (counter > 0) {
|
|
7590
|
+
str = str + generate(counter);
|
|
7591
|
+
}
|
|
7592
|
+
str = str + generate(seconds);
|
|
7593
|
+
return str;
|
|
7594
|
+
}
|
|
7595
|
+
__name(build, "build");
|
|
7596
|
+
var build_1 = build;
|
|
7597
|
+
var alphabet = alphabet_1;
|
|
7598
|
+
function isShortId(id) {
|
|
7599
|
+
if (!id || typeof id !== "string" || id.length < 6) {
|
|
7600
|
+
return false;
|
|
7601
|
+
}
|
|
7602
|
+
var nonAlphabetic = new RegExp("[^" + alphabet.get().replace(/[|\\{}()[\]^$+*?.-]/g, "\\$&") + "]");
|
|
7603
|
+
return !nonAlphabetic.test(id);
|
|
7604
|
+
}
|
|
7605
|
+
__name(isShortId, "isShortId");
|
|
7606
|
+
var isValid = isShortId;
|
|
7607
|
+
(function(module2) {
|
|
7608
|
+
var alphabet2 = alphabet_1;
|
|
7609
|
+
var build2 = build_1;
|
|
7610
|
+
var isValid$1 = isValid;
|
|
7611
|
+
var clusterWorkerId = 0;
|
|
7612
|
+
function seed2(seedValue) {
|
|
7613
|
+
alphabet2.seed(seedValue);
|
|
7614
|
+
return module2.exports;
|
|
7615
|
+
}
|
|
7616
|
+
__name(seed2, "seed");
|
|
7617
|
+
function worker(workerId) {
|
|
7618
|
+
clusterWorkerId = workerId;
|
|
7619
|
+
return module2.exports;
|
|
7620
|
+
}
|
|
7621
|
+
__name(worker, "worker");
|
|
7622
|
+
function characters2(newCharacters) {
|
|
7623
|
+
if (newCharacters !== void 0) {
|
|
7624
|
+
alphabet2.characters(newCharacters);
|
|
7625
|
+
}
|
|
7626
|
+
return alphabet2.shuffled();
|
|
7627
|
+
}
|
|
7628
|
+
__name(characters2, "characters");
|
|
7629
|
+
function generate2() {
|
|
7630
|
+
return build2(clusterWorkerId);
|
|
7631
|
+
}
|
|
7632
|
+
__name(generate2, "generate");
|
|
7633
|
+
module2.exports = generate2;
|
|
7634
|
+
module2.exports.generate = generate2;
|
|
7635
|
+
module2.exports.seed = seed2;
|
|
7636
|
+
module2.exports.worker = worker;
|
|
7637
|
+
module2.exports.characters = characters2;
|
|
7638
|
+
module2.exports.isValid = isValid$1;
|
|
7639
|
+
})(lib);
|
|
7640
|
+
var libExports = lib.exports;
|
|
7641
|
+
var shortid = libExports;
|
|
7642
|
+
const shortid$1 = /* @__PURE__ */ getDefaultExportFromCjs(shortid);
|
|
7562
7643
|
function cutSequenceByRestrictionEnzyme(pSequence, circular, restrictionEnzyme) {
|
|
7563
7644
|
if (restrictionEnzyme.forwardRegex.length === 0 || restrictionEnzyme.reverseRegex.length === 0) {
|
|
7564
|
-
|
|
7645
|
+
const returnArray = [];
|
|
7565
7646
|
returnArray.error = "Cannot cut sequence. Enzyme restriction site must be at least 1 bp long.";
|
|
7566
7647
|
return returnArray;
|
|
7567
7648
|
}
|
|
7568
|
-
|
|
7569
|
-
|
|
7570
|
-
|
|
7649
|
+
const forwardRegExpPattern = new RegExp(restrictionEnzyme.forwardRegex, "ig");
|
|
7650
|
+
const sequence = pSequence;
|
|
7651
|
+
const cutsitesForward = cutSequence(
|
|
7571
7652
|
forwardRegExpPattern,
|
|
7572
7653
|
restrictionEnzyme,
|
|
7573
7654
|
sequence,
|
|
@@ -7575,7 +7656,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
7575
7656
|
);
|
|
7576
7657
|
let cutsitesReverse = [];
|
|
7577
7658
|
if (restrictionEnzyme.forwardRegex !== restrictionEnzyme.reverseRegex) {
|
|
7578
|
-
|
|
7659
|
+
const revSequence = getReverseComplementSequenceString(sequence);
|
|
7579
7660
|
cutsitesReverse = cutSequence(
|
|
7580
7661
|
forwardRegExpPattern,
|
|
7581
7662
|
restrictionEnzyme,
|
|
@@ -7643,20 +7724,20 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
7643
7724
|
}
|
|
7644
7725
|
__name(cutSequenceByRestrictionEnzyme, "cutSequenceByRestrictionEnzyme");
|
|
7645
7726
|
function cutSequence(forwardRegExpPattern, restrictionEnzyme, sequence, circular) {
|
|
7646
|
-
|
|
7727
|
+
const restrictionCutSites = [];
|
|
7647
7728
|
let restrictionCutSite;
|
|
7648
|
-
|
|
7649
|
-
|
|
7650
|
-
|
|
7729
|
+
const recognitionSiteLength = restrictionEnzyme.site.length;
|
|
7730
|
+
const originalSequence = sequence;
|
|
7731
|
+
const originalSequenceLength = sequence.length;
|
|
7651
7732
|
if (circular) {
|
|
7652
7733
|
sequence += sequence;
|
|
7653
7734
|
}
|
|
7654
|
-
|
|
7735
|
+
const currentSequenceLength = sequence.length;
|
|
7655
7736
|
let matchIndex = sequence.search(forwardRegExpPattern);
|
|
7656
7737
|
let startIndex = 0;
|
|
7657
7738
|
let subSequence = sequence;
|
|
7658
7739
|
while (matchIndex !== -1) {
|
|
7659
|
-
|
|
7740
|
+
const recognitionSiteRange = {};
|
|
7660
7741
|
let start;
|
|
7661
7742
|
let end;
|
|
7662
7743
|
let upstreamTopSnip = null;
|
|
@@ -7764,9 +7845,9 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
7764
7845
|
)
|
|
7765
7846
|
};
|
|
7766
7847
|
}
|
|
7767
|
-
|
|
7848
|
+
const overhangBps = getSequenceWithinRange(cutRange, originalSequence);
|
|
7768
7849
|
restrictionCutSite = {
|
|
7769
|
-
id:
|
|
7850
|
+
id: shortid$1(),
|
|
7770
7851
|
start,
|
|
7771
7852
|
end,
|
|
7772
7853
|
topSnipPosition,
|
|
@@ -7824,7 +7905,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
7824
7905
|
});
|
|
7825
7906
|
if (!circular && cutsites.length) {
|
|
7826
7907
|
sortedCutsites.push({
|
|
7827
|
-
id: "seqTerm_" +
|
|
7908
|
+
id: "seqTerm_" + shortid$1(),
|
|
7828
7909
|
start: 0,
|
|
7829
7910
|
end: 0,
|
|
7830
7911
|
overhangBps: "",
|
|
@@ -7845,19 +7926,19 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
7845
7926
|
}
|
|
7846
7927
|
});
|
|
7847
7928
|
}
|
|
7848
|
-
sortedCutsites.forEach((cutsite1,
|
|
7929
|
+
sortedCutsites.forEach((cutsite1, index) => {
|
|
7849
7930
|
if (computePartialDigest && !computePartialDigestDisabled) {
|
|
7850
|
-
sortedCutsites.forEach((cs,
|
|
7851
|
-
if (
|
|
7931
|
+
sortedCutsites.forEach((cs, index2) => {
|
|
7932
|
+
if (index2 === index + 1 || index2 === 0) {
|
|
7852
7933
|
return;
|
|
7853
7934
|
}
|
|
7854
|
-
pairs.push([cutsite1, sortedCutsites[
|
|
7935
|
+
pairs.push([cutsite1, sortedCutsites[index2]]);
|
|
7855
7936
|
});
|
|
7856
7937
|
}
|
|
7857
7938
|
if (!computeDigestDisabled) {
|
|
7858
7939
|
pairs.push([
|
|
7859
7940
|
cutsite1,
|
|
7860
|
-
sortedCutsites[
|
|
7941
|
+
sortedCutsites[index + 1] ? sortedCutsites[index + 1] : sortedCutsites[0]
|
|
7861
7942
|
]);
|
|
7862
7943
|
}
|
|
7863
7944
|
});
|
|
@@ -8336,11 +8417,11 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
8336
8417
|
}
|
|
8337
8418
|
var dmp2 = this;
|
|
8338
8419
|
function diff_halfMatchI_(longtext2, shorttext2, i) {
|
|
8339
|
-
var
|
|
8420
|
+
var seed2 = longtext2.substring(i, i + Math.floor(longtext2.length / 4));
|
|
8340
8421
|
var j = -1;
|
|
8341
8422
|
var best_common = "";
|
|
8342
8423
|
var best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b;
|
|
8343
|
-
while ((j = shorttext2.indexOf(
|
|
8424
|
+
while ((j = shorttext2.indexOf(seed2, j + 1)) != -1) {
|
|
8344
8425
|
var prefixLength = dmp2.diff_commonPrefix(
|
|
8345
8426
|
longtext2.substring(i),
|
|
8346
8427
|
shorttext2.substring(j)
|
|
@@ -10544,30 +10625,30 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
10544
10625
|
stderr: false
|
|
10545
10626
|
};
|
|
10546
10627
|
const stringReplaceAll$1 = /* @__PURE__ */ __name((string, substring, replacer) => {
|
|
10547
|
-
let
|
|
10548
|
-
if (
|
|
10628
|
+
let index = string.indexOf(substring);
|
|
10629
|
+
if (index === -1) {
|
|
10549
10630
|
return string;
|
|
10550
10631
|
}
|
|
10551
10632
|
const substringLength = substring.length;
|
|
10552
10633
|
let endIndex = 0;
|
|
10553
10634
|
let returnValue = "";
|
|
10554
10635
|
do {
|
|
10555
|
-
returnValue += string.substr(endIndex,
|
|
10556
|
-
endIndex =
|
|
10557
|
-
|
|
10558
|
-
} while (
|
|
10636
|
+
returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
|
|
10637
|
+
endIndex = index + substringLength;
|
|
10638
|
+
index = string.indexOf(substring, endIndex);
|
|
10639
|
+
} while (index !== -1);
|
|
10559
10640
|
returnValue += string.substr(endIndex);
|
|
10560
10641
|
return returnValue;
|
|
10561
10642
|
}, "stringReplaceAll$1");
|
|
10562
|
-
const stringEncaseCRLFWithFirstIndex$1 = /* @__PURE__ */ __name((string, prefix, postfix,
|
|
10643
|
+
const stringEncaseCRLFWithFirstIndex$1 = /* @__PURE__ */ __name((string, prefix, postfix, index) => {
|
|
10563
10644
|
let endIndex = 0;
|
|
10564
10645
|
let returnValue = "";
|
|
10565
10646
|
do {
|
|
10566
|
-
const gotCR = string[
|
|
10567
|
-
returnValue += string.substr(endIndex, (gotCR ?
|
|
10568
|
-
endIndex =
|
|
10569
|
-
|
|
10570
|
-
} while (
|
|
10647
|
+
const gotCR = string[index - 1] === "\r";
|
|
10648
|
+
returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
|
|
10649
|
+
endIndex = index + 1;
|
|
10650
|
+
index = string.indexOf("\n", endIndex);
|
|
10651
|
+
} while (index !== -1);
|
|
10571
10652
|
returnValue += string.substr(endIndex);
|
|
10572
10653
|
return returnValue;
|
|
10573
10654
|
}, "stringEncaseCRLFWithFirstIndex$1");
|
|
@@ -10978,7 +11059,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
10978
11059
|
}, "pipe")
|
|
10979
11060
|
}, {
|
|
10980
11061
|
key: "process",
|
|
10981
|
-
value: /* @__PURE__ */ __name(function
|
|
11062
|
+
value: /* @__PURE__ */ __name(function process(input, pipe) {
|
|
10982
11063
|
var context = input;
|
|
10983
11064
|
context.options = this.options();
|
|
10984
11065
|
var nextPipe = pipe || input.pipe || "default";
|
|
@@ -11017,15 +11098,15 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
11017
11098
|
__name(Pipe2, "Pipe");
|
|
11018
11099
|
createClass(Pipe2, [{
|
|
11019
11100
|
key: "process",
|
|
11020
|
-
value: /* @__PURE__ */ __name(function
|
|
11101
|
+
value: /* @__PURE__ */ __name(function process(input) {
|
|
11021
11102
|
if (!this.processor) {
|
|
11022
11103
|
throw new Error("add this pipe to a processor before using it");
|
|
11023
11104
|
}
|
|
11024
11105
|
var debug = this.debug;
|
|
11025
11106
|
var length = this.filters.length;
|
|
11026
11107
|
var context = input;
|
|
11027
|
-
for (var
|
|
11028
|
-
var filter = this.filters[
|
|
11108
|
+
for (var index = 0; index < length; index++) {
|
|
11109
|
+
var filter = this.filters[index];
|
|
11029
11110
|
if (debug) {
|
|
11030
11111
|
this.log("filter: " + filter.filterName);
|
|
11031
11112
|
}
|
|
@@ -11064,10 +11145,10 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
11064
11145
|
if (!filterName) {
|
|
11065
11146
|
throw new Error("a filter name is required");
|
|
11066
11147
|
}
|
|
11067
|
-
for (var
|
|
11068
|
-
var filter = this.filters[
|
|
11148
|
+
for (var index = 0; index < this.filters.length; index++) {
|
|
11149
|
+
var filter = this.filters[index];
|
|
11069
11150
|
if (filter.filterName === filterName) {
|
|
11070
|
-
return
|
|
11151
|
+
return index;
|
|
11071
11152
|
}
|
|
11072
11153
|
}
|
|
11073
11154
|
throw new Error("filter not found: " + filterName);
|
|
@@ -11082,44 +11163,44 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
11082
11163
|
}, {
|
|
11083
11164
|
key: "after",
|
|
11084
11165
|
value: /* @__PURE__ */ __name(function after(filterName) {
|
|
11085
|
-
var
|
|
11166
|
+
var index = this.indexOf(filterName);
|
|
11086
11167
|
var params = Array.prototype.slice.call(arguments, 1);
|
|
11087
11168
|
if (!params.length) {
|
|
11088
11169
|
throw new Error("a filter is required");
|
|
11089
11170
|
}
|
|
11090
|
-
params.unshift(
|
|
11171
|
+
params.unshift(index + 1, 0);
|
|
11091
11172
|
Array.prototype.splice.apply(this.filters, params);
|
|
11092
11173
|
return this;
|
|
11093
11174
|
}, "after")
|
|
11094
11175
|
}, {
|
|
11095
11176
|
key: "before",
|
|
11096
11177
|
value: /* @__PURE__ */ __name(function before(filterName) {
|
|
11097
|
-
var
|
|
11178
|
+
var index = this.indexOf(filterName);
|
|
11098
11179
|
var params = Array.prototype.slice.call(arguments, 1);
|
|
11099
11180
|
if (!params.length) {
|
|
11100
11181
|
throw new Error("a filter is required");
|
|
11101
11182
|
}
|
|
11102
|
-
params.unshift(
|
|
11183
|
+
params.unshift(index, 0);
|
|
11103
11184
|
Array.prototype.splice.apply(this.filters, params);
|
|
11104
11185
|
return this;
|
|
11105
11186
|
}, "before")
|
|
11106
11187
|
}, {
|
|
11107
11188
|
key: "replace",
|
|
11108
11189
|
value: /* @__PURE__ */ __name(function replace(filterName) {
|
|
11109
|
-
var
|
|
11190
|
+
var index = this.indexOf(filterName);
|
|
11110
11191
|
var params = Array.prototype.slice.call(arguments, 1);
|
|
11111
11192
|
if (!params.length) {
|
|
11112
11193
|
throw new Error("a filter is required");
|
|
11113
11194
|
}
|
|
11114
|
-
params.unshift(
|
|
11195
|
+
params.unshift(index, 1);
|
|
11115
11196
|
Array.prototype.splice.apply(this.filters, params);
|
|
11116
11197
|
return this;
|
|
11117
11198
|
}, "replace")
|
|
11118
11199
|
}, {
|
|
11119
11200
|
key: "remove",
|
|
11120
11201
|
value: /* @__PURE__ */ __name(function remove(filterName) {
|
|
11121
|
-
var
|
|
11122
|
-
this.filters.splice(
|
|
11202
|
+
var index = this.indexOf(filterName);
|
|
11203
|
+
this.filters.splice(index, 1);
|
|
11123
11204
|
return this;
|
|
11124
11205
|
}, "remove")
|
|
11125
11206
|
}, {
|
|
@@ -11172,11 +11253,11 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
11172
11253
|
}, "exit")
|
|
11173
11254
|
}, {
|
|
11174
11255
|
key: "switchTo",
|
|
11175
|
-
value: /* @__PURE__ */ __name(function switchTo(
|
|
11176
|
-
if (typeof
|
|
11177
|
-
this.nextPipe =
|
|
11256
|
+
value: /* @__PURE__ */ __name(function switchTo(next, pipe) {
|
|
11257
|
+
if (typeof next === "string" || next instanceof Pipe) {
|
|
11258
|
+
this.nextPipe = next;
|
|
11178
11259
|
} else {
|
|
11179
|
-
this.next =
|
|
11260
|
+
this.next = next;
|
|
11180
11261
|
if (pipe) {
|
|
11181
11262
|
this.nextPipe = pipe;
|
|
11182
11263
|
}
|
|
@@ -11401,8 +11482,8 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
11401
11482
|
var length = context.children.length;
|
|
11402
11483
|
var child = void 0;
|
|
11403
11484
|
var result = context.result;
|
|
11404
|
-
for (var
|
|
11405
|
-
child = context.children[
|
|
11485
|
+
for (var index = 0; index < length; index++) {
|
|
11486
|
+
child = context.children[index];
|
|
11406
11487
|
if (typeof child.result === "undefined") {
|
|
11407
11488
|
continue;
|
|
11408
11489
|
}
|
|
@@ -11478,8 +11559,8 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
11478
11559
|
}
|
|
11479
11560
|
var length = context.children.length;
|
|
11480
11561
|
var child = void 0;
|
|
11481
|
-
for (var
|
|
11482
|
-
child = context.children[
|
|
11562
|
+
for (var index = 0; index < length; index++) {
|
|
11563
|
+
child = context.children[index];
|
|
11483
11564
|
if (Object.prototype.hasOwnProperty.call(context.left, child.childName) && child.result === void 0) {
|
|
11484
11565
|
delete context.left[child.childName];
|
|
11485
11566
|
} else if (context.left[child.childName] !== child.result) {
|
|
@@ -11515,8 +11596,8 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
11515
11596
|
var length = context.children.length;
|
|
11516
11597
|
var child = void 0;
|
|
11517
11598
|
var delta = {};
|
|
11518
|
-
for (var
|
|
11519
|
-
child = context.children[
|
|
11599
|
+
for (var index = 0; index < length; index++) {
|
|
11600
|
+
child = context.children[index];
|
|
11520
11601
|
if (delta[child.childName] !== child.result) {
|
|
11521
11602
|
delta[child.childName] = child.result;
|
|
11522
11603
|
}
|
|
@@ -11670,9 +11751,9 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
11670
11751
|
};
|
|
11671
11752
|
var commonHead = 0;
|
|
11672
11753
|
var commonTail = 0;
|
|
11673
|
-
var
|
|
11754
|
+
var index = void 0;
|
|
11674
11755
|
var index1 = void 0;
|
|
11675
|
-
var
|
|
11756
|
+
var index2 = void 0;
|
|
11676
11757
|
var array1 = context.left;
|
|
11677
11758
|
var array2 = context.right;
|
|
11678
11759
|
var len1 = array1.length;
|
|
@@ -11682,16 +11763,16 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
11682
11763
|
matchContext.matchByPosition = !arraysHaveMatchByRef(array1, array2, len1, len2);
|
|
11683
11764
|
}
|
|
11684
11765
|
while (commonHead < len1 && commonHead < len2 && matchItems(array1, array2, commonHead, commonHead, matchContext)) {
|
|
11685
|
-
|
|
11686
|
-
child = new DiffContext(context.left[
|
|
11687
|
-
context.push(child,
|
|
11766
|
+
index = commonHead;
|
|
11767
|
+
child = new DiffContext(context.left[index], context.right[index]);
|
|
11768
|
+
context.push(child, index);
|
|
11688
11769
|
commonHead++;
|
|
11689
11770
|
}
|
|
11690
11771
|
while (commonTail + commonHead < len1 && commonTail + commonHead < len2 && matchItems(array1, array2, len1 - 1 - commonTail, len2 - 1 - commonTail, matchContext)) {
|
|
11691
11772
|
index1 = len1 - 1 - commonTail;
|
|
11692
|
-
|
|
11693
|
-
child = new DiffContext(context.left[index1], context.right[
|
|
11694
|
-
context.push(child,
|
|
11773
|
+
index2 = len2 - 1 - commonTail;
|
|
11774
|
+
child = new DiffContext(context.left[index1], context.right[index2]);
|
|
11775
|
+
context.push(child, index2);
|
|
11695
11776
|
commonTail++;
|
|
11696
11777
|
}
|
|
11697
11778
|
var result = void 0;
|
|
@@ -11703,8 +11784,8 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
11703
11784
|
result = result || {
|
|
11704
11785
|
_t: "a"
|
|
11705
11786
|
};
|
|
11706
|
-
for (
|
|
11707
|
-
result[
|
|
11787
|
+
for (index = commonHead; index < len2 - commonTail; index++) {
|
|
11788
|
+
result[index] = [array2[index]];
|
|
11708
11789
|
}
|
|
11709
11790
|
context.setResult(result).exit();
|
|
11710
11791
|
return;
|
|
@@ -11713,8 +11794,8 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
11713
11794
|
result = result || {
|
|
11714
11795
|
_t: "a"
|
|
11715
11796
|
};
|
|
11716
|
-
for (
|
|
11717
|
-
result["_" +
|
|
11797
|
+
for (index = commonHead; index < len1 - commonTail; index++) {
|
|
11798
|
+
result["_" + index] = [array1[index], 0, 0];
|
|
11718
11799
|
}
|
|
11719
11800
|
context.setResult(result).exit();
|
|
11720
11801
|
return;
|
|
@@ -11728,10 +11809,10 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
11728
11809
|
result = result || {
|
|
11729
11810
|
_t: "a"
|
|
11730
11811
|
};
|
|
11731
|
-
for (
|
|
11732
|
-
if (arrayIndexOf(seq.indices1,
|
|
11733
|
-
result["_" +
|
|
11734
|
-
removedItems.push(
|
|
11812
|
+
for (index = commonHead; index < len1 - commonTail; index++) {
|
|
11813
|
+
if (arrayIndexOf(seq.indices1, index - commonHead) < 0) {
|
|
11814
|
+
result["_" + index] = [array1[index], 0, 0];
|
|
11815
|
+
removedItems.push(index);
|
|
11735
11816
|
}
|
|
11736
11817
|
}
|
|
11737
11818
|
var detectMove = true;
|
|
@@ -11743,21 +11824,21 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
11743
11824
|
includeValueOnMove = true;
|
|
11744
11825
|
}
|
|
11745
11826
|
var removedItemsLength = removedItems.length;
|
|
11746
|
-
for (
|
|
11747
|
-
var indexOnArray2 = arrayIndexOf(seq.indices2,
|
|
11827
|
+
for (index = commonHead; index < len2 - commonTail; index++) {
|
|
11828
|
+
var indexOnArray2 = arrayIndexOf(seq.indices2, index - commonHead);
|
|
11748
11829
|
if (indexOnArray2 < 0) {
|
|
11749
11830
|
var isMove = false;
|
|
11750
11831
|
if (detectMove && removedItemsLength > 0) {
|
|
11751
11832
|
for (var removeItemIndex1 = 0; removeItemIndex1 < removedItemsLength; removeItemIndex1++) {
|
|
11752
11833
|
index1 = removedItems[removeItemIndex1];
|
|
11753
|
-
if (matchItems(trimmed1, trimmed2, index1 - commonHead,
|
|
11754
|
-
result["_" + index1].splice(1, 2,
|
|
11834
|
+
if (matchItems(trimmed1, trimmed2, index1 - commonHead, index - commonHead, matchContext)) {
|
|
11835
|
+
result["_" + index1].splice(1, 2, index, ARRAY_MOVE);
|
|
11755
11836
|
if (!includeValueOnMove) {
|
|
11756
11837
|
result["_" + index1][0] = "";
|
|
11757
11838
|
}
|
|
11758
|
-
|
|
11759
|
-
child = new DiffContext(context.left[index1], context.right[
|
|
11760
|
-
context.push(child,
|
|
11839
|
+
index2 = index;
|
|
11840
|
+
child = new DiffContext(context.left[index1], context.right[index2]);
|
|
11841
|
+
context.push(child, index2);
|
|
11761
11842
|
removedItems.splice(removeItemIndex1, 1);
|
|
11762
11843
|
isMove = true;
|
|
11763
11844
|
break;
|
|
@@ -11765,13 +11846,13 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
11765
11846
|
}
|
|
11766
11847
|
}
|
|
11767
11848
|
if (!isMove) {
|
|
11768
|
-
result[
|
|
11849
|
+
result[index] = [array2[index]];
|
|
11769
11850
|
}
|
|
11770
11851
|
} else {
|
|
11771
11852
|
index1 = seq.indices1[indexOnArray2] + commonHead;
|
|
11772
|
-
|
|
11773
|
-
child = new DiffContext(context.left[index1], context.right[
|
|
11774
|
-
context.push(child,
|
|
11853
|
+
index2 = seq.indices2[indexOnArray2] + commonHead;
|
|
11854
|
+
child = new DiffContext(context.left[index1], context.right[index2]);
|
|
11855
|
+
context.push(child, index2);
|
|
11775
11856
|
}
|
|
11776
11857
|
}
|
|
11777
11858
|
context.setResult(result).exit();
|
|
@@ -11794,39 +11875,39 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
11794
11875
|
if (context.delta._t !== "a") {
|
|
11795
11876
|
return;
|
|
11796
11877
|
}
|
|
11797
|
-
var
|
|
11878
|
+
var index = void 0;
|
|
11798
11879
|
var index1 = void 0;
|
|
11799
11880
|
var delta = context.delta;
|
|
11800
11881
|
var array = context.left;
|
|
11801
11882
|
var toRemove = [];
|
|
11802
11883
|
var toInsert = [];
|
|
11803
11884
|
var toModify = [];
|
|
11804
|
-
for (
|
|
11805
|
-
if (
|
|
11806
|
-
if (
|
|
11807
|
-
if (delta[
|
|
11808
|
-
toRemove.push(parseInt(
|
|
11885
|
+
for (index in delta) {
|
|
11886
|
+
if (index !== "_t") {
|
|
11887
|
+
if (index[0] === "_") {
|
|
11888
|
+
if (delta[index][2] === 0 || delta[index][2] === ARRAY_MOVE) {
|
|
11889
|
+
toRemove.push(parseInt(index.slice(1), 10));
|
|
11809
11890
|
} else {
|
|
11810
|
-
throw new Error("only removal or move can be applied at original array indices," + (" invalid diff type: " + delta[
|
|
11891
|
+
throw new Error("only removal or move can be applied at original array indices," + (" invalid diff type: " + delta[index][2]));
|
|
11811
11892
|
}
|
|
11812
11893
|
} else {
|
|
11813
|
-
if (delta[
|
|
11894
|
+
if (delta[index].length === 1) {
|
|
11814
11895
|
toInsert.push({
|
|
11815
|
-
index: parseInt(
|
|
11816
|
-
value: delta[
|
|
11896
|
+
index: parseInt(index, 10),
|
|
11897
|
+
value: delta[index][0]
|
|
11817
11898
|
});
|
|
11818
11899
|
} else {
|
|
11819
11900
|
toModify.push({
|
|
11820
|
-
index: parseInt(
|
|
11821
|
-
delta: delta[
|
|
11901
|
+
index: parseInt(index, 10),
|
|
11902
|
+
delta: delta[index]
|
|
11822
11903
|
});
|
|
11823
11904
|
}
|
|
11824
11905
|
}
|
|
11825
11906
|
}
|
|
11826
11907
|
}
|
|
11827
11908
|
toRemove = toRemove.sort(compare.numerically);
|
|
11828
|
-
for (
|
|
11829
|
-
index1 = toRemove[
|
|
11909
|
+
for (index = toRemove.length - 1; index >= 0; index--) {
|
|
11910
|
+
index1 = toRemove[index];
|
|
11830
11911
|
var indexDiff = delta["_" + index1];
|
|
11831
11912
|
var removedValue = array.splice(index1, 1)[0];
|
|
11832
11913
|
if (indexDiff[2] === ARRAY_MOVE) {
|
|
@@ -11838,15 +11919,15 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
11838
11919
|
}
|
|
11839
11920
|
toInsert = toInsert.sort(compare.numericallyBy("index"));
|
|
11840
11921
|
var toInsertLength = toInsert.length;
|
|
11841
|
-
for (
|
|
11842
|
-
var insertion = toInsert[
|
|
11922
|
+
for (index = 0; index < toInsertLength; index++) {
|
|
11923
|
+
var insertion = toInsert[index];
|
|
11843
11924
|
array.splice(insertion.index, 0, insertion.value);
|
|
11844
11925
|
}
|
|
11845
11926
|
var toModifyLength = toModify.length;
|
|
11846
11927
|
var child = void 0;
|
|
11847
11928
|
if (toModifyLength > 0) {
|
|
11848
|
-
for (
|
|
11849
|
-
var modification = toModify[
|
|
11929
|
+
for (index = 0; index < toModifyLength; index++) {
|
|
11930
|
+
var modification = toModify[index];
|
|
11850
11931
|
child = new PatchContext(context.left[modification.index], modification.delta);
|
|
11851
11932
|
context.push(child, modification.index);
|
|
11852
11933
|
}
|
|
@@ -11867,8 +11948,8 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
11867
11948
|
}
|
|
11868
11949
|
var length = context.children.length;
|
|
11869
11950
|
var child = void 0;
|
|
11870
|
-
for (var
|
|
11871
|
-
child = context.children[
|
|
11951
|
+
for (var index = 0; index < length; index++) {
|
|
11952
|
+
child = context.children[index];
|
|
11872
11953
|
context.left[child.childName] = child.result;
|
|
11873
11954
|
}
|
|
11874
11955
|
context.setResult(context.left).exit();
|
|
@@ -11897,20 +11978,20 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
11897
11978
|
context.exit();
|
|
11898
11979
|
}, "arraysReverseFilter");
|
|
11899
11980
|
reverseFilter$2.filterName = "arrays";
|
|
11900
|
-
var reverseArrayDeltaIndex = /* @__PURE__ */ __name(function reverseArrayDeltaIndex2(delta,
|
|
11901
|
-
if (typeof
|
|
11902
|
-
return parseInt(
|
|
11981
|
+
var reverseArrayDeltaIndex = /* @__PURE__ */ __name(function reverseArrayDeltaIndex2(delta, index, itemDelta) {
|
|
11982
|
+
if (typeof index === "string" && index[0] === "_") {
|
|
11983
|
+
return parseInt(index.substr(1), 10);
|
|
11903
11984
|
} else if (isArray$2(itemDelta) && itemDelta[2] === 0) {
|
|
11904
|
-
return "_" +
|
|
11985
|
+
return "_" + index;
|
|
11905
11986
|
}
|
|
11906
|
-
var reverseIndex = +
|
|
11987
|
+
var reverseIndex = +index;
|
|
11907
11988
|
for (var deltaIndex in delta) {
|
|
11908
11989
|
var deltaItem = delta[deltaIndex];
|
|
11909
11990
|
if (isArray$2(deltaItem)) {
|
|
11910
11991
|
if (deltaItem[2] === ARRAY_MOVE) {
|
|
11911
11992
|
var moveFromIndex = parseInt(deltaIndex.substr(1), 10);
|
|
11912
11993
|
var moveToIndex = deltaItem[1];
|
|
11913
|
-
if (moveToIndex === +
|
|
11994
|
+
if (moveToIndex === +index) {
|
|
11914
11995
|
return moveFromIndex;
|
|
11915
11996
|
}
|
|
11916
11997
|
if (moveFromIndex <= reverseIndex && moveToIndex > reverseIndex) {
|
|
@@ -11942,8 +12023,8 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
11942
12023
|
var delta = {
|
|
11943
12024
|
_t: "a"
|
|
11944
12025
|
};
|
|
11945
|
-
for (var
|
|
11946
|
-
child = context.children[
|
|
12026
|
+
for (var index = 0; index < length; index++) {
|
|
12027
|
+
child = context.children[index];
|
|
11947
12028
|
var name = child.newName;
|
|
11948
12029
|
if (typeof name === "undefined") {
|
|
11949
12030
|
name = reverseArrayDeltaIndex(context.delta, child.childName, child.result);
|
|
@@ -12167,7 +12248,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
12167
12248
|
__name(BaseFormatter2, "BaseFormatter");
|
|
12168
12249
|
createClass(BaseFormatter2, [{
|
|
12169
12250
|
key: "format",
|
|
12170
|
-
value: /* @__PURE__ */ __name(function
|
|
12251
|
+
value: /* @__PURE__ */ __name(function format2(delta, left) {
|
|
12171
12252
|
var context = {};
|
|
12172
12253
|
this.prepareContext(context);
|
|
12173
12254
|
this.recurse(context, delta, left);
|
|
@@ -12195,9 +12276,9 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
12195
12276
|
}, {
|
|
12196
12277
|
key: "finalize",
|
|
12197
12278
|
value: /* @__PURE__ */ __name(function finalize(_ref) {
|
|
12198
|
-
var
|
|
12199
|
-
if (isArray$3(
|
|
12200
|
-
return
|
|
12279
|
+
var buffer = _ref.buffer;
|
|
12280
|
+
if (isArray$3(buffer)) {
|
|
12281
|
+
return buffer.join("");
|
|
12201
12282
|
}
|
|
12202
12283
|
}, "finalize")
|
|
12203
12284
|
}, {
|
|
@@ -12276,13 +12357,13 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
12276
12357
|
} else {
|
|
12277
12358
|
keys.sort();
|
|
12278
12359
|
}
|
|
12279
|
-
for (var
|
|
12280
|
-
var key = keys[
|
|
12360
|
+
for (var index = 0, length = keys.length; index < length; index++) {
|
|
12361
|
+
var key = keys[index];
|
|
12281
12362
|
if (arrayKeys && key === "_t") {
|
|
12282
12363
|
continue;
|
|
12283
12364
|
}
|
|
12284
12365
|
var leftKey = arrayKeys ? typeof key === "number" ? key : parseInt(trimUnderscore(key), 10) : key;
|
|
12285
|
-
var isLast =
|
|
12366
|
+
var isLast = index === length - 1;
|
|
12286
12367
|
fn(key, leftKey, moveDestinations[leftKey], isLast);
|
|
12287
12368
|
}
|
|
12288
12369
|
}, "forEachDeltaKey")
|
|
@@ -12824,7 +12905,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
12824
12905
|
}, "format_textdiff")
|
|
12825
12906
|
}, {
|
|
12826
12907
|
key: "format",
|
|
12827
|
-
value: /* @__PURE__ */ __name(function
|
|
12908
|
+
value: /* @__PURE__ */ __name(function format2(delta, left) {
|
|
12828
12909
|
var context = {};
|
|
12829
12910
|
this.prepareContext(context);
|
|
12830
12911
|
this.recurse(context, delta, left);
|
|
@@ -13411,7 +13492,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
13411
13492
|
if (sequenceString.length !== 3) {
|
|
13412
13493
|
throw new Error("must pass a string of length 3");
|
|
13413
13494
|
}
|
|
13414
|
-
|
|
13495
|
+
const aa = threeLetterSequenceStringToAminoAcidMap[sequenceString];
|
|
13415
13496
|
if (aa) {
|
|
13416
13497
|
return aa;
|
|
13417
13498
|
}
|
|
@@ -13423,7 +13504,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
13423
13504
|
}
|
|
13424
13505
|
__name(getAminoAcidFromSequenceTriplet, "getAminoAcidFromSequenceTriplet");
|
|
13425
13506
|
function getAminoAcidDataForEachBaseOfDna(originalSequenceString, forward, optionalSubrangeRange, isProteinSequence) {
|
|
13426
|
-
|
|
13507
|
+
const originalSequenceStringLength = isProteinSequence ? originalSequenceString.length * 3 : originalSequenceString.length;
|
|
13427
13508
|
let sequenceString = originalSequenceString;
|
|
13428
13509
|
let startOffset = 0;
|
|
13429
13510
|
if (optionalSubrangeRange) {
|
|
@@ -13433,8 +13514,8 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
13433
13514
|
);
|
|
13434
13515
|
startOffset = optionalSubrangeRange.start;
|
|
13435
13516
|
}
|
|
13436
|
-
|
|
13437
|
-
|
|
13517
|
+
const sequenceStringLength = isProteinSequence ? sequenceString.length * 3 : sequenceString.length;
|
|
13518
|
+
const aminoAcidDataForEachBaseOfDNA = [];
|
|
13438
13519
|
let codonRange;
|
|
13439
13520
|
let revCompGapLength = 0;
|
|
13440
13521
|
let aminoAcidIndex = 0;
|
|
@@ -13464,12 +13545,12 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
13464
13545
|
aminoAcidIndex--;
|
|
13465
13546
|
}
|
|
13466
13547
|
}
|
|
13467
|
-
for (let
|
|
13548
|
+
for (let index = 2 + revCompGapLength; index < sequenceStringLength; index += 3) {
|
|
13468
13549
|
let aminoAcid;
|
|
13469
13550
|
if (isProteinSequence) {
|
|
13470
|
-
aminoAcid = proteinAlphabet[sequenceString[(
|
|
13551
|
+
aminoAcid = proteinAlphabet[sequenceString[(index - 2) / 3].toUpperCase()];
|
|
13471
13552
|
} else {
|
|
13472
|
-
let triplet = sequenceString.slice(
|
|
13553
|
+
let triplet = sequenceString.slice(index - 2, index + 1);
|
|
13473
13554
|
if (!forward) {
|
|
13474
13555
|
triplet = getReverseComplementSequenceString(triplet);
|
|
13475
13556
|
}
|
|
@@ -13477,8 +13558,8 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
13477
13558
|
}
|
|
13478
13559
|
codonRange = translateRange(
|
|
13479
13560
|
{
|
|
13480
|
-
start:
|
|
13481
|
-
end:
|
|
13561
|
+
start: index - 2,
|
|
13562
|
+
end: index
|
|
13482
13563
|
},
|
|
13483
13564
|
startOffset,
|
|
13484
13565
|
originalSequenceStringLength
|
|
@@ -13516,7 +13597,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
13516
13597
|
aminoAcidIndex--;
|
|
13517
13598
|
}
|
|
13518
13599
|
}
|
|
13519
|
-
|
|
13600
|
+
const lengthOfEndBpsNotCoveredByAminoAcids = sequenceStringLength - aminoAcidDataForEachBaseOfDNA.length;
|
|
13520
13601
|
codonRange = translateRange(
|
|
13521
13602
|
{
|
|
13522
13603
|
start: sequenceStringLength - lengthOfEndBpsNotCoveredByAminoAcids,
|
|
@@ -13606,10 +13687,10 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
13606
13687
|
annotation.name = "Untitled annotation";
|
|
13607
13688
|
}
|
|
13608
13689
|
if (provideNewIdsForAnnotations) {
|
|
13609
|
-
annotation.id =
|
|
13690
|
+
annotation.id = shortid$1();
|
|
13610
13691
|
}
|
|
13611
13692
|
if (!annotation.id && annotation.id !== 0 && !doNotProvideIdsForAnnotations) {
|
|
13612
|
-
annotation.id =
|
|
13693
|
+
annotation.id = shortid$1();
|
|
13613
13694
|
messages.push(
|
|
13614
13695
|
"Unable to detect valid ID for annotation, setting ID to " + annotation.id
|
|
13615
13696
|
);
|
|
@@ -13838,7 +13919,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
13838
13919
|
if (item.id || item.id === 0) {
|
|
13839
13920
|
itemId = item.id;
|
|
13840
13921
|
} else {
|
|
13841
|
-
itemId =
|
|
13922
|
+
itemId = shortid$1();
|
|
13842
13923
|
if (!doNotProvideIdsForAnnotations) {
|
|
13843
13924
|
item.id = itemId;
|
|
13844
13925
|
}
|
|
@@ -13901,7 +13982,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
13901
13982
|
return reverse(diff2);
|
|
13902
13983
|
}, "reverseSeqDiff");
|
|
13903
13984
|
function getAllInsertionsInSeqReads(seqReads) {
|
|
13904
|
-
|
|
13985
|
+
const allInsertionsInSeqReads = [];
|
|
13905
13986
|
seqReads.forEach((seqRead) => {
|
|
13906
13987
|
const splitSeqRead = seqRead.cigar.match(/([0-9]*[MDI])/g);
|
|
13907
13988
|
for (let componentI = 0; componentI < splitSeqRead.length; componentI++) {
|
|
@@ -13918,7 +13999,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
13918
13999
|
bpPosOfInsertion += previousComponentNumber;
|
|
13919
14000
|
}
|
|
13920
14001
|
}
|
|
13921
|
-
|
|
14002
|
+
const insertionInfo = {
|
|
13922
14003
|
// keeping bpPos 1-based
|
|
13923
14004
|
bpPos: bpPosOfInsertion,
|
|
13924
14005
|
number: numberOfInsertions
|
|
@@ -13927,7 +14008,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
13927
14008
|
}
|
|
13928
14009
|
}
|
|
13929
14010
|
});
|
|
13930
|
-
|
|
14011
|
+
const sortedInsertions = allInsertionsInSeqReads.sort((a, b) => {
|
|
13931
14012
|
return a.bpPos - b.bpPos;
|
|
13932
14013
|
});
|
|
13933
14014
|
for (let i = 0; i < sortedInsertions.length - 1; i++) {
|
|
@@ -14021,16 +14102,16 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
14021
14102
|
const sortedCutsites = cutsites.sort((a, b) => {
|
|
14022
14103
|
return a.topSnipPosition - b.topSnipPosition;
|
|
14023
14104
|
});
|
|
14024
|
-
sortedCutsites.forEach((cutsite1,
|
|
14105
|
+
sortedCutsites.forEach((cutsite1, index) => {
|
|
14025
14106
|
if (computePartialDigest && !computePartialDigestDisabled) {
|
|
14026
|
-
sortedCutsites.forEach((cs,
|
|
14027
|
-
pairs.push([cutsite1, sortedCutsites[
|
|
14107
|
+
sortedCutsites.forEach((cs, index2) => {
|
|
14108
|
+
pairs.push([cutsite1, sortedCutsites[index2]]);
|
|
14028
14109
|
});
|
|
14029
14110
|
}
|
|
14030
14111
|
if (!computeDigestDisabled) {
|
|
14031
14112
|
pairs.push([
|
|
14032
14113
|
cutsite1,
|
|
14033
|
-
sortedCutsites[
|
|
14114
|
+
sortedCutsites[index + 1] ? sortedCutsites[index + 1] : sortedCutsites[0]
|
|
14034
14115
|
]);
|
|
14035
14116
|
}
|
|
14036
14117
|
});
|
|
@@ -14119,7 +14200,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
14119
14200
|
}
|
|
14120
14201
|
__name(isEnzymeType2S, "isEnzymeType2S");
|
|
14121
14202
|
function insertGapsIntoRefSeq(refSeq, seqReads) {
|
|
14122
|
-
|
|
14203
|
+
const refSeqWithGaps = refSeq.split("");
|
|
14123
14204
|
const allInsertionsInSeqReads = getAllInsertionsInSeqReads(seqReads);
|
|
14124
14205
|
for (let i = 0; i < allInsertionsInSeqReads.length; i++) {
|
|
14125
14206
|
const bpPosOfInsertion = allInsertionsInSeqReads[i].bpPos;
|
|
@@ -14136,8 +14217,8 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
14136
14217
|
return refSeqWithGaps.join("");
|
|
14137
14218
|
}
|
|
14138
14219
|
__name(insertGapsIntoRefSeq, "insertGapsIntoRefSeq");
|
|
14139
|
-
var spliceString = /* @__PURE__ */ __name(function spliceSlice(str,
|
|
14140
|
-
return str.slice(0,
|
|
14220
|
+
var spliceString = /* @__PURE__ */ __name(function spliceSlice(str, index, count, add) {
|
|
14221
|
+
return str.slice(0, index) + (add || "") + str.slice(index + count);
|
|
14141
14222
|
}, "spliceSlice");
|
|
14142
14223
|
const spliceString$1 = /* @__PURE__ */ getDefaultExportFromCjs(spliceString);
|
|
14143
14224
|
function adjustBpsToReplaceOrInsert(bpString, insertString = "", caretPositionOrRange) {
|
|
@@ -14150,7 +14231,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
14150
14231
|
invertRange(caretPositionOrRange, bpString.length)
|
|
14151
14232
|
);
|
|
14152
14233
|
stringToReturn = "";
|
|
14153
|
-
ranges.forEach((range,
|
|
14234
|
+
ranges.forEach((range, index) => {
|
|
14154
14235
|
stringToReturn += getSequenceWithinRange(range, bpString);
|
|
14155
14236
|
if (ranges.length === 1) {
|
|
14156
14237
|
if (isPositionWithinRange(0, range, bpString.length, true, true)) {
|
|
@@ -14159,7 +14240,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
14159
14240
|
stringToReturn = insertString + stringToReturn;
|
|
14160
14241
|
}
|
|
14161
14242
|
} else {
|
|
14162
|
-
if (
|
|
14243
|
+
if (index === 0)
|
|
14163
14244
|
stringToReturn += insertString;
|
|
14164
14245
|
}
|
|
14165
14246
|
});
|
|
@@ -14508,7 +14589,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
14508
14589
|
_sequenceDataToInsert,
|
|
14509
14590
|
options
|
|
14510
14591
|
);
|
|
14511
|
-
|
|
14592
|
+
const newSequenceData = lodashExports.cloneDeep(existingSequenceData);
|
|
14512
14593
|
const insertLength = sequenceDataToInsert.proteinSequence ? sequenceDataToInsert.proteinSequence.length * 3 : sequenceDataToInsert.sequence.length;
|
|
14513
14594
|
let caretPosition = caretPositionOrRange;
|
|
14514
14595
|
const isInsertSameLengthAsSelection = sequenceDataToInsert.sequence.length === getRangeLength(caretPositionOrRange, existingSequenceData.sequence.length);
|
|
@@ -14650,9 +14731,9 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
14650
14731
|
if (justBaseCalls) {
|
|
14651
14732
|
return chromatogramData;
|
|
14652
14733
|
}
|
|
14653
|
-
|
|
14654
|
-
|
|
14655
|
-
for (let
|
|
14734
|
+
const baseTracesToInsert = [];
|
|
14735
|
+
const qualNumsToInsert = [];
|
|
14736
|
+
for (let index = 0; index < seqToInsert.length; index++) {
|
|
14656
14737
|
qualNumsToInsert.push(0);
|
|
14657
14738
|
const toPush = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
|
14658
14739
|
baseTracesToInsert.push({
|
|
@@ -22330,7 +22411,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
22330
22411
|
return __spreadProps(__spreadValues({}, range), {
|
|
22331
22412
|
name: getRandomInt(0, 1e5).toString(),
|
|
22332
22413
|
type: "misc_feature",
|
|
22333
|
-
id:
|
|
22414
|
+
id: shortid$1(),
|
|
22334
22415
|
forward: Math.random() > 0.5,
|
|
22335
22416
|
notes: {}
|
|
22336
22417
|
});
|
|
@@ -22396,7 +22477,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
22396
22477
|
}
|
|
22397
22478
|
const regex = new RegExp(overlapSequence, "ig");
|
|
22398
22479
|
let result;
|
|
22399
|
-
let
|
|
22480
|
+
let index;
|
|
22400
22481
|
let distance = Infinity;
|
|
22401
22482
|
while (result = regex.exec(sequenceToSearch + (isLinear ? "" : sequenceToSearch))) {
|
|
22402
22483
|
if (result.index > sequenceToSearch.length)
|
|
@@ -22406,13 +22487,13 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
22406
22487
|
if (newDistance > distance) {
|
|
22407
22488
|
break;
|
|
22408
22489
|
}
|
|
22409
|
-
|
|
22490
|
+
index = result.index;
|
|
22410
22491
|
distance = newDistance;
|
|
22411
22492
|
}
|
|
22412
22493
|
return normalizeRange(
|
|
22413
22494
|
{
|
|
22414
|
-
start:
|
|
22415
|
-
end:
|
|
22495
|
+
start: index,
|
|
22496
|
+
end: index + overlapSequence.length - 1
|
|
22416
22497
|
},
|
|
22417
22498
|
sequenceToSearch.length
|
|
22418
22499
|
);
|
|
@@ -22455,13 +22536,13 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
22455
22536
|
forward,
|
|
22456
22537
|
annotationTypePlural: "orfs",
|
|
22457
22538
|
isOrf: true,
|
|
22458
|
-
id:
|
|
22539
|
+
id: shortid$1()
|
|
22459
22540
|
});
|
|
22460
22541
|
}
|
|
22461
22542
|
}
|
|
22462
22543
|
}
|
|
22463
22544
|
const orfEnds = {};
|
|
22464
|
-
orfRanges.forEach((orf,
|
|
22545
|
+
orfRanges.forEach((orf, index) => {
|
|
22465
22546
|
const indexOfAlreadyExistingOrf = orfEnds[orf.end];
|
|
22466
22547
|
if (typeof indexOfAlreadyExistingOrf !== "undefined") {
|
|
22467
22548
|
let internalOrf = orf;
|
|
@@ -22469,7 +22550,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
22469
22550
|
if (containingOrf.length < internalOrf.length) {
|
|
22470
22551
|
internalOrf = orfRanges[indexOfAlreadyExistingOrf];
|
|
22471
22552
|
containingOrf = orf;
|
|
22472
|
-
orfEnds[orf.end] =
|
|
22553
|
+
orfEnds[orf.end] = index;
|
|
22473
22554
|
}
|
|
22474
22555
|
const internalStartCodonIndex = forward ? internalOrf.start : originalSequenceLength - internalOrf.start - 1;
|
|
22475
22556
|
containingOrf.internalStartCodonIndices = [
|
|
@@ -22479,7 +22560,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
22479
22560
|
];
|
|
22480
22561
|
internalOrf.remove = true;
|
|
22481
22562
|
} else {
|
|
22482
|
-
orfEnds[orf.end] =
|
|
22563
|
+
orfEnds[orf.end] = index;
|
|
22483
22564
|
if (!forward) {
|
|
22484
22565
|
const endHolder = orf.end;
|
|
22485
22566
|
orf.end = originalSequenceLength - orf.start - 1;
|
|
@@ -22514,14 +22595,13 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
22514
22595
|
return forwardOrfs.concat(reverseOrfs);
|
|
22515
22596
|
}
|
|
22516
22597
|
__name(findOrfsInPlasmid, "findOrfsInPlasmid");
|
|
22517
|
-
|
|
22518
|
-
|
|
22519
|
-
if (typeof str !== "string") {
|
|
22598
|
+
function escapeStringRegexp(string) {
|
|
22599
|
+
if (typeof string !== "string") {
|
|
22520
22600
|
throw new TypeError("Expected a string");
|
|
22521
22601
|
}
|
|
22522
|
-
return
|
|
22523
|
-
}
|
|
22524
|
-
|
|
22602
|
+
return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
|
22603
|
+
}
|
|
22604
|
+
__name(escapeStringRegexp, "escapeStringRegexp");
|
|
22525
22605
|
function getAminoAcidStringFromSequenceString(sequenceString) {
|
|
22526
22606
|
const aminoAcidsPerBase = getAminoAcidDataForEachBaseOfDna(
|
|
22527
22607
|
sequenceString,
|
|
@@ -22544,8 +22624,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
22544
22624
|
const { searchReverseStrand } = options;
|
|
22545
22625
|
if (searchReverseStrand) {
|
|
22546
22626
|
const sequenceLength = sequence.length;
|
|
22547
|
-
|
|
22548
|
-
reverseSeq = getReverseComplementSequenceString(sequence);
|
|
22627
|
+
const reverseSeq = getReverseComplementSequenceString(sequence);
|
|
22549
22628
|
const reverseMatches = findSequenceMatchesTopStrand(
|
|
22550
22629
|
reverseSeq,
|
|
22551
22630
|
searchString,
|
|
@@ -22572,7 +22651,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
22572
22651
|
isProteinSequence,
|
|
22573
22652
|
isProteinSearch
|
|
22574
22653
|
} = options;
|
|
22575
|
-
let searchStringToUse = escapeStringRegexp
|
|
22654
|
+
let searchStringToUse = escapeStringRegexp(searchString);
|
|
22576
22655
|
if (isAmbiguous) {
|
|
22577
22656
|
if (isProteinSearch || isProteinSequence) {
|
|
22578
22657
|
searchStringToUse = convertAmbiguousStringToRegex(
|
|
@@ -22610,7 +22689,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
22610
22689
|
}
|
|
22611
22690
|
];
|
|
22612
22691
|
}
|
|
22613
|
-
|
|
22692
|
+
const ranges = [];
|
|
22614
22693
|
sequencesToCheck.forEach(({ seqToCheck, offset }) => {
|
|
22615
22694
|
const reg = new RegExp(searchStringToUse, "ig");
|
|
22616
22695
|
let match;
|
|
@@ -22855,7 +22934,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
22855
22934
|
}
|
|
22856
22935
|
__name(getInsertBetweenVals, "getInsertBetweenVals");
|
|
22857
22936
|
function getLeftAndRightOfSequenceInRangeGivenPosition(range, position, sequence) {
|
|
22858
|
-
|
|
22937
|
+
const result = {
|
|
22859
22938
|
leftHandSide: "",
|
|
22860
22939
|
rightHandSide: ""
|
|
22861
22940
|
};
|
|
@@ -22881,15 +22960,15 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
22881
22960
|
return result;
|
|
22882
22961
|
}
|
|
22883
22962
|
__name(getLeftAndRightOfSequenceInRangeGivenPosition, "getLeftAndRightOfSequenceInRangeGivenPosition");
|
|
22884
|
-
function getOverlapBetweenTwoSequences(sequenceToFind, sequenceToSearchIn
|
|
22963
|
+
function getOverlapBetweenTwoSequences(sequenceToFind, sequenceToSearchIn) {
|
|
22885
22964
|
sequenceToSearchIn = sequenceToSearchIn.toLowerCase();
|
|
22886
22965
|
sequenceToFind = sequenceToFind.toLowerCase();
|
|
22887
22966
|
const lengthenedSeqToSearch = sequenceToSearchIn + sequenceToSearchIn;
|
|
22888
|
-
const
|
|
22889
|
-
if (
|
|
22967
|
+
const index = lengthenedSeqToSearch.indexOf(sequenceToFind);
|
|
22968
|
+
if (index > -1) {
|
|
22890
22969
|
return {
|
|
22891
|
-
start:
|
|
22892
|
-
end: modulatePositionByRange(
|
|
22970
|
+
start: index,
|
|
22971
|
+
end: modulatePositionByRange(index + sequenceToFind.length - 1, {
|
|
22893
22972
|
start: 0,
|
|
22894
22973
|
end: sequenceToSearchIn.length - 1
|
|
22895
22974
|
})
|
|
@@ -22901,15 +22980,15 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
22901
22980
|
__name(getOverlapBetweenTwoSequences, "getOverlapBetweenTwoSequences");
|
|
22902
22981
|
function getPossiblePartsFromSequenceAndEnzyme(seqData, restrictionEnzymes) {
|
|
22903
22982
|
restrictionEnzymes = restrictionEnzymes.length ? restrictionEnzymes : [restrictionEnzymes];
|
|
22904
|
-
|
|
22905
|
-
|
|
22906
|
-
|
|
22983
|
+
const bps = seqData.sequence;
|
|
22984
|
+
const seqLen = bps.length;
|
|
22985
|
+
const circular = seqData.circular;
|
|
22907
22986
|
let cutsites = [];
|
|
22908
22987
|
restrictionEnzymes.forEach((enzyme) => {
|
|
22909
|
-
|
|
22988
|
+
const newCutsites = cutSequenceByRestrictionEnzyme(bps, circular, enzyme);
|
|
22910
22989
|
cutsites = cutsites.concat(newCutsites);
|
|
22911
22990
|
});
|
|
22912
|
-
|
|
22991
|
+
const parts = [];
|
|
22913
22992
|
if (cutsites.length < 1) {
|
|
22914
22993
|
return parts;
|
|
22915
22994
|
} else if (cutsites.length === 1) {
|
|
@@ -22922,16 +23001,16 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
22922
23001
|
);
|
|
22923
23002
|
return parts;
|
|
22924
23003
|
} else {
|
|
22925
|
-
|
|
23004
|
+
const pairs = pairwise(cutsites);
|
|
22926
23005
|
pairs.forEach((pair) => {
|
|
22927
|
-
|
|
22928
|
-
|
|
22929
|
-
|
|
23006
|
+
const cut1 = pair[0];
|
|
23007
|
+
const cut2 = pair[1];
|
|
23008
|
+
const part1 = getPartBetweenEnzymesWithInclusiveOverhangs(
|
|
22930
23009
|
cut1,
|
|
22931
23010
|
cut2,
|
|
22932
23011
|
seqLen
|
|
22933
23012
|
);
|
|
22934
|
-
|
|
23013
|
+
const part2 = getPartBetweenEnzymesWithInclusiveOverhangs(
|
|
22935
23014
|
cut2,
|
|
22936
23015
|
cut1,
|
|
22937
23016
|
seqLen
|
|
@@ -22948,10 +23027,10 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
22948
23027
|
}
|
|
22949
23028
|
__name(getPossiblePartsFromSequenceAndEnzyme, "getPossiblePartsFromSequenceAndEnzyme");
|
|
22950
23029
|
function getPartBetweenEnzymesWithInclusiveOverhangs(cut1, cut2, seqLen) {
|
|
22951
|
-
|
|
22952
|
-
|
|
22953
|
-
|
|
22954
|
-
|
|
23030
|
+
const firstCutOffset = getEnzymeRelativeOffset(cut1.restrictionEnzyme);
|
|
23031
|
+
const secondCutOffset = getEnzymeRelativeOffset(cut2.restrictionEnzyme);
|
|
23032
|
+
const start = cut1.topSnipBeforeBottom ? cut1.topSnipPosition : cut1.bottomSnipPosition;
|
|
23033
|
+
const end = normalizePositionByRangeLength(
|
|
22955
23034
|
(cut2.topSnipBeforeBottom ? cut2.bottomSnipPosition : cut2.topSnipPosition) - 1,
|
|
22956
23035
|
seqLen
|
|
22957
23036
|
);
|
|
@@ -22983,7 +23062,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
22983
23062
|
if (list.length < 2) {
|
|
22984
23063
|
return [];
|
|
22985
23064
|
}
|
|
22986
|
-
|
|
23065
|
+
const first = list[0], rest = list.slice(1), pairs = rest.map((x) => {
|
|
22987
23066
|
return [first, x];
|
|
22988
23067
|
});
|
|
22989
23068
|
return pairs.concat(pairwise(rest));
|
|
@@ -23067,8 +23146,8 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
23067
23146
|
let count = 0;
|
|
23068
23147
|
if (!seq || !seq.length)
|
|
23069
23148
|
return true;
|
|
23070
|
-
for (let
|
|
23071
|
-
const letter = seq[
|
|
23149
|
+
for (let index = 0; index < seq.length; index++) {
|
|
23150
|
+
const letter = seq[index];
|
|
23072
23151
|
if (dnaLetterMap[letter.toUpperCase()]) {
|
|
23073
23152
|
count = count + 1;
|
|
23074
23153
|
}
|
|
@@ -23139,7 +23218,6 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
23139
23218
|
}
|
|
23140
23219
|
__name(mapAnnotationsToRows, "mapAnnotationsToRows");
|
|
23141
23220
|
function mapAnnotationToRows({
|
|
23142
|
-
wrappedAnnotations,
|
|
23143
23221
|
annotation,
|
|
23144
23222
|
sequenceLength,
|
|
23145
23223
|
bpsPerRow,
|
|
@@ -23153,7 +23231,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
23153
23231
|
location || annotation,
|
|
23154
23232
|
sequenceLength
|
|
23155
23233
|
);
|
|
23156
|
-
ranges.forEach((range,
|
|
23234
|
+
ranges.forEach((range, index) => {
|
|
23157
23235
|
const startingRow = Math.floor(range.start / bpsPerRow);
|
|
23158
23236
|
const endingRow = Math.floor(range.end / bpsPerRow);
|
|
23159
23237
|
for (let rowNumber = startingRow; rowNumber <= endingRow; rowNumber++) {
|
|
@@ -23183,7 +23261,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
23183
23261
|
}
|
|
23184
23262
|
});
|
|
23185
23263
|
} else {
|
|
23186
|
-
if (
|
|
23264
|
+
if (index > 0 && //second half of an annotation range
|
|
23187
23265
|
annotationsForRow.length && //there are already annotations within the row
|
|
23188
23266
|
annotationsForRow[annotationsForRow.length - 1].annotation === annotation) {
|
|
23189
23267
|
yOffset = annotationsForRow[annotationsForRow.length - 1].yOffset;
|
|
@@ -23259,7 +23337,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
23259
23337
|
}
|
|
23260
23338
|
__name(prepareRowData, "prepareRowData");
|
|
23261
23339
|
function condensePairwiseAlignmentDifferences(referenceSeq, alignedSeq) {
|
|
23262
|
-
|
|
23340
|
+
const overviewMinimapTrack = [];
|
|
23263
23341
|
const referenceSeqSplit = referenceSeq.toLowerCase().split("");
|
|
23264
23342
|
const alignedSeqSplit = alignedSeq.toLowerCase().split("");
|
|
23265
23343
|
const seqLength = alignedSeq.length;
|
|
@@ -23439,7 +23517,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
23439
23517
|
return a.bpPos - b.bpPos;
|
|
23440
23518
|
});
|
|
23441
23519
|
otherInsertions = otherInsertions.filter(
|
|
23442
|
-
(object,
|
|
23520
|
+
(object, index) => index === otherInsertions.findIndex(
|
|
23443
23521
|
(obj) => JSON.stringify(obj) === JSON.stringify(object)
|
|
23444
23522
|
)
|
|
23445
23523
|
);
|
|
@@ -23758,21 +23836,21 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
23758
23836
|
}
|
|
23759
23837
|
];
|
|
23760
23838
|
}
|
|
23761
|
-
sortedCutsites.forEach((cutsite1,
|
|
23762
|
-
if (!circular && !sortedCutsites[
|
|
23839
|
+
sortedCutsites.forEach((cutsite1, index) => {
|
|
23840
|
+
if (!circular && !sortedCutsites[index + 1]) {
|
|
23763
23841
|
return;
|
|
23764
23842
|
}
|
|
23765
23843
|
if (opts.computePartialDigests) {
|
|
23766
|
-
sortedCutsites.forEach((cs,
|
|
23767
|
-
if (
|
|
23844
|
+
sortedCutsites.forEach((cs, index2) => {
|
|
23845
|
+
if (index2 === index + 1 || index2 === 0) {
|
|
23768
23846
|
return;
|
|
23769
23847
|
}
|
|
23770
|
-
pairs.push([cutsite1, sortedCutsites[
|
|
23848
|
+
pairs.push([cutsite1, sortedCutsites[index2]]);
|
|
23771
23849
|
});
|
|
23772
23850
|
}
|
|
23773
23851
|
pairs.push([
|
|
23774
23852
|
cutsite1,
|
|
23775
|
-
sortedCutsites[
|
|
23853
|
+
sortedCutsites[index + 1] ? sortedCutsites[index + 1] : sortedCutsites[0]
|
|
23776
23854
|
]);
|
|
23777
23855
|
});
|
|
23778
23856
|
pairs.forEach(([cut1, cut2]) => {
|