igv 2.13.1 → 2.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -10
- package/dist/igv.esm.js +498 -496
- package/dist/igv.esm.min.js +8 -8
- package/dist/igv.esm.min.js.map +1 -1
- package/dist/igv.js +1767 -1774
- package/dist/igv.min.js +9 -9
- package/dist/igv.min.js.map +1 -1
- package/package.json +1 -1
package/dist/igv.js
CHANGED
|
@@ -18184,11 +18184,14 @@
|
|
|
18184
18184
|
trackView,
|
|
18185
18185
|
label: "Unset track color"
|
|
18186
18186
|
}));
|
|
18187
|
-
|
|
18188
|
-
|
|
18189
|
-
|
|
18190
|
-
|
|
18191
|
-
|
|
18187
|
+
|
|
18188
|
+
if (trackView.track.config.type === 'wig' || trackView.track.config.type === 'annotation') {
|
|
18189
|
+
menuItems.push(colorPickerMenuItem({
|
|
18190
|
+
trackView,
|
|
18191
|
+
label: "Set alt color",
|
|
18192
|
+
option: "altColor"
|
|
18193
|
+
}));
|
|
18194
|
+
}
|
|
18192
18195
|
}
|
|
18193
18196
|
|
|
18194
18197
|
if (trackView.track.menuItemList) {
|
|
@@ -18448,6 +18451,446 @@
|
|
|
18448
18451
|
return txt;
|
|
18449
18452
|
}
|
|
18450
18453
|
|
|
18454
|
+
/*
|
|
18455
|
+
* The MIT License (MIT)
|
|
18456
|
+
*
|
|
18457
|
+
* Copyright (c) 2016-2017 The Regents of the University of California
|
|
18458
|
+
* Author: Jim Robinson
|
|
18459
|
+
*
|
|
18460
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
18461
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
18462
|
+
* in the Software without restriction, including without limitation the rights
|
|
18463
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
18464
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
18465
|
+
* furnished to do so, subject to the following conditions:
|
|
18466
|
+
*
|
|
18467
|
+
* The above copyright notice and this permission notice shall be included in
|
|
18468
|
+
* all copies or substantial portions of the Software.
|
|
18469
|
+
*
|
|
18470
|
+
*
|
|
18471
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18472
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18473
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18474
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18475
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18476
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
18477
|
+
* THE SOFTWARE.
|
|
18478
|
+
*/
|
|
18479
|
+
|
|
18480
|
+
class DataRangeDialog {
|
|
18481
|
+
constructor(browser, $parent, alert) {
|
|
18482
|
+
this.browser = browser; // dialog container
|
|
18483
|
+
|
|
18484
|
+
this.$container = $$1("<div>", {
|
|
18485
|
+
class: 'igv-generic-dialog-container'
|
|
18486
|
+
});
|
|
18487
|
+
$parent.append(this.$container);
|
|
18488
|
+
this.$container.offset({
|
|
18489
|
+
left: 0,
|
|
18490
|
+
top: 0
|
|
18491
|
+
}); // dialog header
|
|
18492
|
+
|
|
18493
|
+
const $header = $$1("<div>", {
|
|
18494
|
+
class: 'igv-generic-dialog-header'
|
|
18495
|
+
});
|
|
18496
|
+
this.$container.append($header);
|
|
18497
|
+
attachDialogCloseHandlerWithParent$1($header[0], () => {
|
|
18498
|
+
this.$minimum_input.val(undefined);
|
|
18499
|
+
this.$maximum_input.val(undefined);
|
|
18500
|
+
this.$container.offset({
|
|
18501
|
+
left: 0,
|
|
18502
|
+
top: 0
|
|
18503
|
+
});
|
|
18504
|
+
this.$container.hide();
|
|
18505
|
+
}); // minimun
|
|
18506
|
+
|
|
18507
|
+
this.$minimum = $$1("<div>", {
|
|
18508
|
+
class: 'igv-generic-dialog-label-input'
|
|
18509
|
+
});
|
|
18510
|
+
this.$container.append(this.$minimum);
|
|
18511
|
+
const $mindiv = $$1('<div>');
|
|
18512
|
+
$mindiv.text('Minimum');
|
|
18513
|
+
this.$minimum.append($mindiv);
|
|
18514
|
+
this.$minimum_input = $$1("<input>");
|
|
18515
|
+
this.$minimum.append(this.$minimum_input); // maximum
|
|
18516
|
+
|
|
18517
|
+
this.$maximum = $$1("<div>", {
|
|
18518
|
+
class: 'igv-generic-dialog-label-input'
|
|
18519
|
+
});
|
|
18520
|
+
this.$container.append(this.$maximum);
|
|
18521
|
+
const $maxdiv = $$1('<div>');
|
|
18522
|
+
$maxdiv.text('Maximum');
|
|
18523
|
+
this.$maximum.append($maxdiv);
|
|
18524
|
+
this.$maximum_input = $$1("<input>");
|
|
18525
|
+
this.$maximum.append(this.$maximum_input); // ok | cancel
|
|
18526
|
+
|
|
18527
|
+
const $buttons = $$1("<div>", {
|
|
18528
|
+
class: 'igv-generic-dialog-ok-cancel'
|
|
18529
|
+
});
|
|
18530
|
+
this.$container.append($buttons); // ok
|
|
18531
|
+
|
|
18532
|
+
this.$ok = $$1("<div>");
|
|
18533
|
+
$buttons.append(this.$ok);
|
|
18534
|
+
this.$ok.text('OK'); // cancel
|
|
18535
|
+
|
|
18536
|
+
this.$cancel = $$1("<div>");
|
|
18537
|
+
$buttons.append(this.$cancel);
|
|
18538
|
+
this.$cancel.text('Cancel');
|
|
18539
|
+
this.$cancel.on('click', () => {
|
|
18540
|
+
this.$minimum_input.val(undefined);
|
|
18541
|
+
this.$maximum_input.val(undefined);
|
|
18542
|
+
this.$container.offset({
|
|
18543
|
+
left: 0,
|
|
18544
|
+
top: 0
|
|
18545
|
+
});
|
|
18546
|
+
this.$container.hide();
|
|
18547
|
+
}); //this.$container.draggable({ handle:$header.get(0) });
|
|
18548
|
+
|
|
18549
|
+
makeDraggable$1(this.$container.get(0), $header.get(0));
|
|
18550
|
+
this.$container.hide();
|
|
18551
|
+
}
|
|
18552
|
+
|
|
18553
|
+
configure(trackView) {
|
|
18554
|
+
const dataRange = trackView.dataRange();
|
|
18555
|
+
let min;
|
|
18556
|
+
let max;
|
|
18557
|
+
|
|
18558
|
+
if (dataRange) {
|
|
18559
|
+
min = dataRange.min;
|
|
18560
|
+
max = dataRange.max;
|
|
18561
|
+
} else {
|
|
18562
|
+
min = 0;
|
|
18563
|
+
max = 100;
|
|
18564
|
+
}
|
|
18565
|
+
|
|
18566
|
+
this.$minimum_input.val(min);
|
|
18567
|
+
this.$maximum_input.val(max);
|
|
18568
|
+
this.$minimum_input.unbind();
|
|
18569
|
+
this.$minimum_input.on('keyup', e => {
|
|
18570
|
+
if (13 === e.keyCode) {
|
|
18571
|
+
this.processResults(trackView);
|
|
18572
|
+
}
|
|
18573
|
+
});
|
|
18574
|
+
this.$maximum_input.unbind();
|
|
18575
|
+
this.$maximum_input.on('keyup', e => {
|
|
18576
|
+
if (13 === e.keyCode) {
|
|
18577
|
+
this.processResults(trackView);
|
|
18578
|
+
}
|
|
18579
|
+
});
|
|
18580
|
+
this.$ok.unbind();
|
|
18581
|
+
this.$ok.on('click', e => {
|
|
18582
|
+
this.processResults(trackView);
|
|
18583
|
+
});
|
|
18584
|
+
}
|
|
18585
|
+
|
|
18586
|
+
processResults(trackView) {
|
|
18587
|
+
const min = Number(this.$minimum_input.val());
|
|
18588
|
+
const max = Number(this.$maximum_input.val());
|
|
18589
|
+
|
|
18590
|
+
if (isNaN(min) || isNaN(max)) {
|
|
18591
|
+
this.browser.alert.present(new Error('Must input numeric values'), undefined);
|
|
18592
|
+
} else {
|
|
18593
|
+
trackView.setDataRange(min, max);
|
|
18594
|
+
}
|
|
18595
|
+
|
|
18596
|
+
this.$minimum_input.val(undefined);
|
|
18597
|
+
this.$maximum_input.val(undefined);
|
|
18598
|
+
this.$container.offset({
|
|
18599
|
+
left: 0,
|
|
18600
|
+
top: 0
|
|
18601
|
+
});
|
|
18602
|
+
this.$container.hide();
|
|
18603
|
+
}
|
|
18604
|
+
|
|
18605
|
+
present($parent) {
|
|
18606
|
+
const offset_top = $parent.offset().top;
|
|
18607
|
+
const scroll_top = $$1('body').scrollTop();
|
|
18608
|
+
this.$container.offset({
|
|
18609
|
+
left: $parent.width() - this.$container.width(),
|
|
18610
|
+
top: offset_top + scroll_top
|
|
18611
|
+
});
|
|
18612
|
+
this.$container.show();
|
|
18613
|
+
}
|
|
18614
|
+
|
|
18615
|
+
}
|
|
18616
|
+
|
|
18617
|
+
/*
|
|
18618
|
+
* The MIT License (MIT)
|
|
18619
|
+
*
|
|
18620
|
+
* Copyright (c) 2014 Broad Institute
|
|
18621
|
+
*
|
|
18622
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
18623
|
+
* of ctx software and associated documentation files (the "Software"), to deal
|
|
18624
|
+
* in the Software without restriction, including without limitation the rights
|
|
18625
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
18626
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
18627
|
+
* furnished to do so, subject to the following conditions:
|
|
18628
|
+
*
|
|
18629
|
+
* The above copyright notice and ctx permission notice shall be included in
|
|
18630
|
+
* all copies or substantial portions of the Software.
|
|
18631
|
+
*
|
|
18632
|
+
*
|
|
18633
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18634
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18635
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18636
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18637
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18638
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
18639
|
+
* THE SOFTWARE.
|
|
18640
|
+
*/
|
|
18641
|
+
|
|
18642
|
+
const IGVGraphics = {
|
|
18643
|
+
configureHighDPICanvas: function (ctx, w, h) {
|
|
18644
|
+
const scaleFactor = window.devicePixelRatio; // const scaleFactor = 1
|
|
18645
|
+
|
|
18646
|
+
ctx.canvas.style.width = `${w}px`;
|
|
18647
|
+
ctx.canvas.width = Math.floor(scaleFactor * w);
|
|
18648
|
+
ctx.canvas.style.height = `${h}px`;
|
|
18649
|
+
ctx.canvas.height = Math.floor(scaleFactor * h);
|
|
18650
|
+
ctx.scale(scaleFactor, scaleFactor);
|
|
18651
|
+
},
|
|
18652
|
+
setProperties: function (ctx, properties) {
|
|
18653
|
+
for (var key in properties) {
|
|
18654
|
+
if (properties.hasOwnProperty(key)) {
|
|
18655
|
+
var value = properties[key];
|
|
18656
|
+
ctx[key] = value;
|
|
18657
|
+
}
|
|
18658
|
+
}
|
|
18659
|
+
},
|
|
18660
|
+
strokeLine: function (ctx, x1, y1, x2, y2, properties) {
|
|
18661
|
+
x1 = Math.floor(x1) + 0.5;
|
|
18662
|
+
y1 = Math.floor(y1) + 0.5;
|
|
18663
|
+
x2 = Math.floor(x2) + 0.5;
|
|
18664
|
+
y2 = Math.floor(y2) + 0.5;
|
|
18665
|
+
|
|
18666
|
+
if (properties) {
|
|
18667
|
+
ctx.save();
|
|
18668
|
+
IGVGraphics.setProperties(ctx, properties);
|
|
18669
|
+
}
|
|
18670
|
+
|
|
18671
|
+
ctx.beginPath();
|
|
18672
|
+
ctx.moveTo(x1, y1);
|
|
18673
|
+
ctx.lineTo(x2, y2);
|
|
18674
|
+
ctx.stroke();
|
|
18675
|
+
if (properties) ctx.restore();
|
|
18676
|
+
},
|
|
18677
|
+
fillRect: function (ctx, x, y, w, h, properties) {
|
|
18678
|
+
x = Math.round(x);
|
|
18679
|
+
y = Math.round(y);
|
|
18680
|
+
|
|
18681
|
+
if (properties) {
|
|
18682
|
+
ctx.save();
|
|
18683
|
+
IGVGraphics.setProperties(ctx, properties);
|
|
18684
|
+
}
|
|
18685
|
+
|
|
18686
|
+
ctx.fillRect(x, y, w, h);
|
|
18687
|
+
if (properties) ctx.restore();
|
|
18688
|
+
},
|
|
18689
|
+
fillPolygon: function (ctx, x, y, properties) {
|
|
18690
|
+
if (properties) {
|
|
18691
|
+
ctx.save();
|
|
18692
|
+
IGVGraphics.setProperties(ctx, properties);
|
|
18693
|
+
}
|
|
18694
|
+
|
|
18695
|
+
doPath(ctx, x, y);
|
|
18696
|
+
ctx.fill();
|
|
18697
|
+
if (properties) ctx.restore();
|
|
18698
|
+
},
|
|
18699
|
+
strokePolygon: function (ctx, x, y, properties) {
|
|
18700
|
+
if (properties) {
|
|
18701
|
+
ctx.save();
|
|
18702
|
+
IGVGraphics.setProperties(ctx, properties);
|
|
18703
|
+
}
|
|
18704
|
+
|
|
18705
|
+
doPath(ctx, x, y);
|
|
18706
|
+
ctx.stroke();
|
|
18707
|
+
if (properties) ctx.restore();
|
|
18708
|
+
},
|
|
18709
|
+
fillText: function (ctx, text, x, y, properties, transforms) {
|
|
18710
|
+
if (properties || transforms) {
|
|
18711
|
+
ctx.save();
|
|
18712
|
+
}
|
|
18713
|
+
|
|
18714
|
+
if (properties) {
|
|
18715
|
+
IGVGraphics.setProperties(ctx, properties);
|
|
18716
|
+
}
|
|
18717
|
+
|
|
18718
|
+
if (transforms) {
|
|
18719
|
+
// Slow path with context saving and extra translate
|
|
18720
|
+
ctx.translate(x, y);
|
|
18721
|
+
|
|
18722
|
+
for (var transform in transforms) {
|
|
18723
|
+
var value = transforms[transform]; // TODO: Add error checking for robustness
|
|
18724
|
+
|
|
18725
|
+
if (transform === 'translate') {
|
|
18726
|
+
ctx.translate(value['x'], value['y']);
|
|
18727
|
+
}
|
|
18728
|
+
|
|
18729
|
+
if (transform === 'rotate') {
|
|
18730
|
+
ctx.rotate(value['angle'] * Math.PI / 180);
|
|
18731
|
+
}
|
|
18732
|
+
}
|
|
18733
|
+
|
|
18734
|
+
ctx.fillText(text, 0, 0);
|
|
18735
|
+
} else {
|
|
18736
|
+
ctx.fillText(text, x, y);
|
|
18737
|
+
}
|
|
18738
|
+
|
|
18739
|
+
if (properties || transforms) ctx.restore();
|
|
18740
|
+
},
|
|
18741
|
+
strokeText: function (ctx, text, x, y, properties, transforms) {
|
|
18742
|
+
if (properties || transforms) {
|
|
18743
|
+
ctx.save();
|
|
18744
|
+
}
|
|
18745
|
+
|
|
18746
|
+
if (properties) {
|
|
18747
|
+
IGVGraphics.setProperties(ctx, properties);
|
|
18748
|
+
}
|
|
18749
|
+
|
|
18750
|
+
if (transforms) {
|
|
18751
|
+
ctx.translate(x, y);
|
|
18752
|
+
|
|
18753
|
+
for (var transform in transforms) {
|
|
18754
|
+
var value = transforms[transform]; // TODO: Add error checking for robustness
|
|
18755
|
+
|
|
18756
|
+
if (transform === 'translate') {
|
|
18757
|
+
ctx.translate(value['x'], value['y']);
|
|
18758
|
+
}
|
|
18759
|
+
|
|
18760
|
+
if (transform === 'rotate') {
|
|
18761
|
+
ctx.rotate(value['angle'] * Math.PI / 180);
|
|
18762
|
+
}
|
|
18763
|
+
}
|
|
18764
|
+
|
|
18765
|
+
ctx.strokeText(text, 0, 0);
|
|
18766
|
+
} else {
|
|
18767
|
+
ctx.strokeText(text, x, y);
|
|
18768
|
+
}
|
|
18769
|
+
|
|
18770
|
+
if (properties || transforms) ctx.restore();
|
|
18771
|
+
},
|
|
18772
|
+
strokeCircle: function (ctx, x, y, radius, properties) {
|
|
18773
|
+
if (properties) {
|
|
18774
|
+
ctx.save();
|
|
18775
|
+
IGVGraphics.setProperties(ctx, properties);
|
|
18776
|
+
}
|
|
18777
|
+
|
|
18778
|
+
ctx.beginPath();
|
|
18779
|
+
ctx.arc(x, y, radius, 0, 2 * Math.PI);
|
|
18780
|
+
ctx.stroke();
|
|
18781
|
+
if (properties) ctx.restore();
|
|
18782
|
+
},
|
|
18783
|
+
fillCircle: function (ctx, x, y, radius, properties) {
|
|
18784
|
+
if (properties) {
|
|
18785
|
+
ctx.save();
|
|
18786
|
+
IGVGraphics.setProperties(ctx, properties);
|
|
18787
|
+
}
|
|
18788
|
+
|
|
18789
|
+
ctx.beginPath();
|
|
18790
|
+
ctx.arc(x, y, radius, 0, 2 * Math.PI);
|
|
18791
|
+
ctx.fill();
|
|
18792
|
+
if (properties) ctx.restore();
|
|
18793
|
+
},
|
|
18794
|
+
drawArrowhead: function (ctx, x, y, size, lineWidth) {
|
|
18795
|
+
ctx.save();
|
|
18796
|
+
|
|
18797
|
+
if (!size) {
|
|
18798
|
+
size = 5;
|
|
18799
|
+
}
|
|
18800
|
+
|
|
18801
|
+
if (lineWidth) {
|
|
18802
|
+
ctx.lineWidth = lineWidth;
|
|
18803
|
+
}
|
|
18804
|
+
|
|
18805
|
+
ctx.beginPath();
|
|
18806
|
+
ctx.moveTo(x, y - size / 2);
|
|
18807
|
+
ctx.lineTo(x, y + size / 2);
|
|
18808
|
+
ctx.lineTo(x + size, y);
|
|
18809
|
+
ctx.lineTo(x, y - size / 2);
|
|
18810
|
+
ctx.closePath();
|
|
18811
|
+
ctx.fill();
|
|
18812
|
+
ctx.restore();
|
|
18813
|
+
},
|
|
18814
|
+
dashedLine: function (ctx, x1, y1, x2, y2, dashLen) {
|
|
18815
|
+
let properties = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : {};
|
|
18816
|
+
if (dashLen === undefined) dashLen = 2;
|
|
18817
|
+
ctx.setLineDash([dashLen, dashLen]);
|
|
18818
|
+
IGVGraphics.strokeLine(ctx, x1, y1, x2, y2, properties);
|
|
18819
|
+
ctx.setLineDash([]);
|
|
18820
|
+
},
|
|
18821
|
+
roundRect: function (ctx, x, y, width, height, radius, fill, stroke) {
|
|
18822
|
+
if (typeof stroke == "undefined") {
|
|
18823
|
+
stroke = true;
|
|
18824
|
+
}
|
|
18825
|
+
|
|
18826
|
+
if (typeof radius === "undefined") {
|
|
18827
|
+
radius = 5;
|
|
18828
|
+
}
|
|
18829
|
+
|
|
18830
|
+
ctx.beginPath();
|
|
18831
|
+
ctx.moveTo(x + radius, y);
|
|
18832
|
+
ctx.lineTo(x + width - radius, y);
|
|
18833
|
+
ctx.quadraticCurveTo(x + width, y, x + width, y + radius);
|
|
18834
|
+
ctx.lineTo(x + width, y + height - radius);
|
|
18835
|
+
ctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height);
|
|
18836
|
+
ctx.lineTo(x + radius, y + height);
|
|
18837
|
+
ctx.quadraticCurveTo(x, y + height, x, y + height - radius);
|
|
18838
|
+
ctx.lineTo(x, y + radius);
|
|
18839
|
+
ctx.quadraticCurveTo(x, y, x + radius, y);
|
|
18840
|
+
ctx.closePath();
|
|
18841
|
+
|
|
18842
|
+
if (stroke) {
|
|
18843
|
+
ctx.stroke();
|
|
18844
|
+
}
|
|
18845
|
+
|
|
18846
|
+
if (fill) {
|
|
18847
|
+
ctx.fill();
|
|
18848
|
+
}
|
|
18849
|
+
},
|
|
18850
|
+
polygon: function (ctx, x, y, fill, stroke) {
|
|
18851
|
+
if (typeof stroke == "undefined") {
|
|
18852
|
+
stroke = true;
|
|
18853
|
+
}
|
|
18854
|
+
|
|
18855
|
+
ctx.beginPath();
|
|
18856
|
+
var len = x.length;
|
|
18857
|
+
ctx.moveTo(x[0], y[0]);
|
|
18858
|
+
|
|
18859
|
+
for (var i = 1; i < len; i++) {
|
|
18860
|
+
ctx.lineTo(x[i], y[i]); // this.moveTo(x[i], y[i]);
|
|
18861
|
+
}
|
|
18862
|
+
|
|
18863
|
+
ctx.closePath();
|
|
18864
|
+
|
|
18865
|
+
if (stroke) {
|
|
18866
|
+
ctx.stroke();
|
|
18867
|
+
}
|
|
18868
|
+
|
|
18869
|
+
if (fill) {
|
|
18870
|
+
ctx.fill();
|
|
18871
|
+
}
|
|
18872
|
+
}
|
|
18873
|
+
};
|
|
18874
|
+
|
|
18875
|
+
function doPath(ctx, x, y) {
|
|
18876
|
+
var i,
|
|
18877
|
+
len = x.length;
|
|
18878
|
+
|
|
18879
|
+
for (i = 0; i < len; i++) {
|
|
18880
|
+
x[i] = Math.round(x[i]);
|
|
18881
|
+
y[i] = Math.round(y[i]);
|
|
18882
|
+
}
|
|
18883
|
+
|
|
18884
|
+
ctx.beginPath();
|
|
18885
|
+
ctx.moveTo(x[0], y[0]);
|
|
18886
|
+
|
|
18887
|
+
for (i = 1; i < len; i++) {
|
|
18888
|
+
ctx.lineTo(x[i], y[i]);
|
|
18889
|
+
}
|
|
18890
|
+
|
|
18891
|
+
ctx.closePath();
|
|
18892
|
+
}
|
|
18893
|
+
|
|
18451
18894
|
function div(options) {
|
|
18452
18895
|
return create("div", options);
|
|
18453
18896
|
}
|
|
@@ -18810,22 +19253,6 @@
|
|
|
18810
19253
|
|
|
18811
19254
|
}
|
|
18812
19255
|
|
|
18813
|
-
let alertDialog;
|
|
18814
|
-
const Alert = {
|
|
18815
|
-
init(root, config = {}) {
|
|
18816
|
-
alertDialog = new AlertDialog(root, config);
|
|
18817
|
-
},
|
|
18818
|
-
|
|
18819
|
-
presentAlert(alert, callback) {
|
|
18820
|
-
if (!alertDialog) {
|
|
18821
|
-
this.init(document.body);
|
|
18822
|
-
}
|
|
18823
|
-
|
|
18824
|
-
alertDialog.present(alert, callback);
|
|
18825
|
-
}
|
|
18826
|
-
|
|
18827
|
-
};
|
|
18828
|
-
|
|
18829
19256
|
class InputDialog {
|
|
18830
19257
|
constructor(parent) {
|
|
18831
19258
|
this.parent = parent; // dialog container
|
|
@@ -20191,11 +20618,58 @@
|
|
|
20191
20618
|
}
|
|
20192
20619
|
}
|
|
20193
20620
|
|
|
20621
|
+
class Alert {
|
|
20622
|
+
constructor(parent) {
|
|
20623
|
+
this.dialog = new AlertDialog(parent);
|
|
20624
|
+
}
|
|
20625
|
+
|
|
20626
|
+
present(alert, callback) {
|
|
20627
|
+
this.dialog.present(alert, callback);
|
|
20628
|
+
}
|
|
20629
|
+
|
|
20630
|
+
}
|
|
20631
|
+
|
|
20632
|
+
const FileFormats = {
|
|
20633
|
+
gwascatalog: {
|
|
20634
|
+
fields: ['bin', 'chr', 'start', 'end', 'name', 'pubMedID', 'author', 'pubDate', 'journal', 'title', 'trait', 'initSample', 'replSample', 'region', 'genes', 'riskAllele', 'riskAlFreq', 'pValue', 'pValueDesc', 'orOrBeta', 'ci95', 'platform', 'cnv']
|
|
20635
|
+
},
|
|
20636
|
+
wgrna: {
|
|
20637
|
+
fields: ['bin', 'chr', 'start', 'end', 'name', 'score', 'strand', 'thickStart', 'thickEnd', 'type']
|
|
20638
|
+
},
|
|
20639
|
+
cpgislandext: {
|
|
20640
|
+
fields: ['bin', 'chr', 'start', 'end', 'name', 'length', 'cpgNum', 'gcNum', 'perCpg', 'perGc', 'obsExp']
|
|
20641
|
+
},
|
|
20642
|
+
clinVarMain: {
|
|
20643
|
+
fields: ['chr1', 'start', 'end', 'name', 'score', 'strand', 'thickStart', 'thickEnd', 'reserved', 'blockCount', // Number of blocks
|
|
20644
|
+
'blockSizes', // Comma separated list of block sizes
|
|
20645
|
+
'chromStarts', // Start positions relative to chromStart
|
|
20646
|
+
'origName', // NM_198053.2(CD247):c.462C>T (p.Asp154=) ClinVar Variation Report
|
|
20647
|
+
'clinSign', // Likely benign Clinical significance
|
|
20648
|
+
'reviewStatus', // based on: criteria provided,single submitter Review Status
|
|
20649
|
+
'type', // single nucleotide variant Type of Variant
|
|
20650
|
+
'geneId', // CD247 Gene Symbol
|
|
20651
|
+
'snpId', // 181656780 dbSNP ID
|
|
20652
|
+
'nsvId', // dbVar ID
|
|
20653
|
+
'rcvAcc', // RCV000642347 ClinVar Allele Submission
|
|
20654
|
+
'testedInGtr', // N Genetic Testing Registry
|
|
20655
|
+
'phenotypeList', // Immunodeficiency due to defect in cd3-zeta Phenotypes
|
|
20656
|
+
'phenotype', // MedGen:C1857798, OMIM:610163 Phenotype identifiers
|
|
20657
|
+
'origin', // germline Data origin
|
|
20658
|
+
'assembly', // GRCh37 Genome assembly
|
|
20659
|
+
'cytogenetic', // 1q24.2 Cytogenetic status
|
|
20660
|
+
'hgvsCod', // NM_198053.2:c.462C>T Nucleotide HGVS
|
|
20661
|
+
'hgvsProt', // NP_932170.1:p.Asp154= Protein HGVS
|
|
20662
|
+
'numSubmit', // 1 Number of submitters
|
|
20663
|
+
'lastEval', // Dec 19,2017 Last evaluation
|
|
20664
|
+
'guidelines', // Guidelines
|
|
20665
|
+
'otherIds']
|
|
20666
|
+
}
|
|
20667
|
+
};
|
|
20668
|
+
|
|
20194
20669
|
/*
|
|
20195
20670
|
* The MIT License (MIT)
|
|
20196
20671
|
*
|
|
20197
|
-
* Copyright (c)
|
|
20198
|
-
* Author: Jim Robinson
|
|
20672
|
+
* Copyright (c) 2014 Broad Institute
|
|
20199
20673
|
*
|
|
20200
20674
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
20201
20675
|
* of this software and associated documentation files (the "Software"), to deal
|
|
@@ -20216,1436 +20690,360 @@
|
|
|
20216
20690
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
20217
20691
|
* THE SOFTWARE.
|
|
20218
20692
|
*/
|
|
20693
|
+
/**
|
|
20694
|
+
* Test if the given value is a string or number. Not using typeof as it fails on boxed primitives.
|
|
20695
|
+
*
|
|
20696
|
+
* @param value
|
|
20697
|
+
* @returns boolean
|
|
20698
|
+
*/
|
|
20219
20699
|
|
|
20220
|
-
class DataRangeDialog {
|
|
20221
|
-
constructor($parent, alert) {
|
|
20222
|
-
// dialog container
|
|
20223
|
-
this.$container = $$1("<div>", {
|
|
20224
|
-
class: 'igv-generic-dialog-container'
|
|
20225
|
-
});
|
|
20226
|
-
$parent.append(this.$container);
|
|
20227
|
-
this.$container.offset({
|
|
20228
|
-
left: 0,
|
|
20229
|
-
top: 0
|
|
20230
|
-
}); // dialog header
|
|
20231
|
-
|
|
20232
|
-
const $header = $$1("<div>", {
|
|
20233
|
-
class: 'igv-generic-dialog-header'
|
|
20234
|
-
});
|
|
20235
|
-
this.$container.append($header);
|
|
20236
|
-
attachDialogCloseHandlerWithParent$1($header[0], () => {
|
|
20237
|
-
this.$minimum_input.val(undefined);
|
|
20238
|
-
this.$maximum_input.val(undefined);
|
|
20239
|
-
this.$container.offset({
|
|
20240
|
-
left: 0,
|
|
20241
|
-
top: 0
|
|
20242
|
-
});
|
|
20243
|
-
this.$container.hide();
|
|
20244
|
-
}); // minimun
|
|
20245
20700
|
|
|
20246
|
-
|
|
20247
|
-
|
|
20248
|
-
|
|
20249
|
-
|
|
20250
|
-
|
|
20251
|
-
$mindiv.text('Minimum');
|
|
20252
|
-
this.$minimum.append($mindiv);
|
|
20253
|
-
this.$minimum_input = $$1("<input>");
|
|
20254
|
-
this.$minimum.append(this.$minimum_input); // maximum
|
|
20701
|
+
function isSimpleType(value) {
|
|
20702
|
+
const simpleTypes = new Set(["boolean", "number", "string", "symbol"]);
|
|
20703
|
+
const valueType = typeof value;
|
|
20704
|
+
return value !== undefined && (simpleTypes.has(valueType) || value.substring || value.toFixed);
|
|
20705
|
+
}
|
|
20255
20706
|
|
|
20256
|
-
|
|
20257
|
-
|
|
20258
|
-
|
|
20259
|
-
|
|
20260
|
-
|
|
20261
|
-
|
|
20262
|
-
|
|
20263
|
-
|
|
20264
|
-
|
|
20707
|
+
function buildOptions(config, options) {
|
|
20708
|
+
var defaultOptions = {
|
|
20709
|
+
oauthToken: config.oauthToken,
|
|
20710
|
+
headers: config.headers,
|
|
20711
|
+
withCredentials: config.withCredentials,
|
|
20712
|
+
filename: config.filename
|
|
20713
|
+
};
|
|
20714
|
+
return Object.assign(defaultOptions, options);
|
|
20715
|
+
}
|
|
20716
|
+
/**
|
|
20717
|
+
* isMobile test from http://detectmobilebrowsers.com
|
|
20718
|
+
* TODO -- improve UI design so this isn't neccessary
|
|
20719
|
+
* @returns {boolean}
|
|
20720
|
+
*/
|
|
20721
|
+
// igv.isMobile = function () {
|
|
20722
|
+
//
|
|
20723
|
+
// const a = (navigator.userAgent || navigator.vendor || window.opera);
|
|
20724
|
+
// return (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) ||
|
|
20725
|
+
// /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4)))
|
|
20726
|
+
//
|
|
20727
|
+
// }
|
|
20265
20728
|
|
|
20266
|
-
const $buttons = $$1("<div>", {
|
|
20267
|
-
class: 'igv-generic-dialog-ok-cancel'
|
|
20268
|
-
});
|
|
20269
|
-
this.$container.append($buttons); // ok
|
|
20270
20729
|
|
|
20271
|
-
|
|
20272
|
-
|
|
20273
|
-
this.$ok.text('OK'); // cancel
|
|
20730
|
+
const doAutoscale = function (features) {
|
|
20731
|
+
var min, max;
|
|
20274
20732
|
|
|
20275
|
-
|
|
20276
|
-
|
|
20277
|
-
|
|
20278
|
-
|
|
20279
|
-
|
|
20280
|
-
|
|
20281
|
-
|
|
20282
|
-
|
|
20283
|
-
|
|
20284
|
-
});
|
|
20285
|
-
this.$container.hide();
|
|
20286
|
-
}); //this.$container.draggable({ handle:$header.get(0) });
|
|
20733
|
+
if (features.length > 0) {
|
|
20734
|
+
min = Number.MAX_VALUE;
|
|
20735
|
+
max = -Number.MAX_VALUE;
|
|
20736
|
+
features.forEach(function (f) {
|
|
20737
|
+
if (!Number.isNaN(f.value)) {
|
|
20738
|
+
min = Math.min(min, f.value);
|
|
20739
|
+
max = Math.max(max, f.value);
|
|
20740
|
+
}
|
|
20741
|
+
}); // Insure we have a zero baseline
|
|
20287
20742
|
|
|
20288
|
-
|
|
20289
|
-
|
|
20743
|
+
if (max > 0) min = Math.min(0, min);
|
|
20744
|
+
if (max < 0) max = 0;
|
|
20745
|
+
} else {
|
|
20746
|
+
// No features -- default
|
|
20747
|
+
min = 0;
|
|
20748
|
+
max = 100;
|
|
20290
20749
|
}
|
|
20291
20750
|
|
|
20292
|
-
|
|
20293
|
-
|
|
20294
|
-
|
|
20295
|
-
|
|
20751
|
+
return {
|
|
20752
|
+
min: min,
|
|
20753
|
+
max: max
|
|
20754
|
+
};
|
|
20755
|
+
};
|
|
20296
20756
|
|
|
20297
|
-
|
|
20298
|
-
|
|
20299
|
-
|
|
20757
|
+
const validateGenomicExtent = function (chromosomeLengthBP, genomicExtent, minimumBP) {
|
|
20758
|
+
let ss = genomicExtent.start;
|
|
20759
|
+
let ee = genomicExtent.end;
|
|
20760
|
+
|
|
20761
|
+
if (undefined === ee) {
|
|
20762
|
+
ss -= minimumBP / 2;
|
|
20763
|
+
ee = ss + minimumBP;
|
|
20764
|
+
|
|
20765
|
+
if (ee > chromosomeLengthBP) {
|
|
20766
|
+
ee = chromosomeLengthBP;
|
|
20767
|
+
ss = ee - minimumBP;
|
|
20768
|
+
} else if (ss < 0) {
|
|
20769
|
+
ss = 0;
|
|
20770
|
+
ee = minimumBP;
|
|
20771
|
+
}
|
|
20772
|
+
} else if (ee - ss < minimumBP) {
|
|
20773
|
+
const center = (ee + ss) / 2;
|
|
20774
|
+
|
|
20775
|
+
if (center - minimumBP / 2 < 0) {
|
|
20776
|
+
ss = 0;
|
|
20777
|
+
ee = ss + minimumBP;
|
|
20778
|
+
} else if (center + minimumBP / 2 > chromosomeLengthBP) {
|
|
20779
|
+
ee = chromosomeLengthBP;
|
|
20780
|
+
ss = ee - minimumBP;
|
|
20300
20781
|
} else {
|
|
20301
|
-
|
|
20302
|
-
|
|
20782
|
+
ss = center - minimumBP / 2;
|
|
20783
|
+
ee = ss + minimumBP;
|
|
20303
20784
|
}
|
|
20785
|
+
}
|
|
20304
20786
|
|
|
20305
|
-
|
|
20306
|
-
|
|
20307
|
-
|
|
20308
|
-
|
|
20309
|
-
|
|
20310
|
-
|
|
20311
|
-
|
|
20312
|
-
|
|
20313
|
-
|
|
20314
|
-
|
|
20315
|
-
|
|
20316
|
-
|
|
20317
|
-
|
|
20318
|
-
|
|
20319
|
-
this.$ok.unbind();
|
|
20320
|
-
this.$ok.on('click', e => {
|
|
20321
|
-
this.processResults(trackView);
|
|
20322
|
-
});
|
|
20787
|
+
genomicExtent.start = Math.ceil(ss);
|
|
20788
|
+
genomicExtent.end = Math.floor(ee);
|
|
20789
|
+
};
|
|
20790
|
+
/*!
|
|
20791
|
+
* is-number <https://github.com/jonschlinkert/is-number>
|
|
20792
|
+
*
|
|
20793
|
+
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
20794
|
+
* Released under the MIT License.
|
|
20795
|
+
*/
|
|
20796
|
+
|
|
20797
|
+
|
|
20798
|
+
const isNumber = function (num) {
|
|
20799
|
+
if (typeof num === 'number') {
|
|
20800
|
+
return num - num === 0;
|
|
20323
20801
|
}
|
|
20324
20802
|
|
|
20325
|
-
|
|
20326
|
-
|
|
20327
|
-
|
|
20803
|
+
if (typeof num === 'string' && num.trim() !== '') {
|
|
20804
|
+
return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);
|
|
20805
|
+
}
|
|
20328
20806
|
|
|
20329
|
-
|
|
20330
|
-
|
|
20331
|
-
|
|
20332
|
-
|
|
20807
|
+
return false;
|
|
20808
|
+
};
|
|
20809
|
+
|
|
20810
|
+
async function getFilename(url) {
|
|
20811
|
+
if (isString$3(url) && url.startsWith("https://drive.google.com")) {
|
|
20812
|
+
// This will fail if Google API key is not defined
|
|
20813
|
+
if (getApiKey() === undefined) {
|
|
20814
|
+
throw Error("Google drive is referenced, but API key is not defined. An API key is required for Google Drive access");
|
|
20333
20815
|
}
|
|
20334
20816
|
|
|
20335
|
-
|
|
20336
|
-
|
|
20337
|
-
|
|
20338
|
-
|
|
20339
|
-
top: 0
|
|
20340
|
-
});
|
|
20341
|
-
this.$container.hide();
|
|
20817
|
+
const json = await getDriveFileInfo(url);
|
|
20818
|
+
return json.originalFileName || json.name;
|
|
20819
|
+
} else {
|
|
20820
|
+
return getFilename$1(url);
|
|
20342
20821
|
}
|
|
20822
|
+
}
|
|
20343
20823
|
|
|
20344
|
-
|
|
20345
|
-
|
|
20346
|
-
|
|
20347
|
-
|
|
20348
|
-
|
|
20349
|
-
|
|
20350
|
-
|
|
20351
|
-
|
|
20824
|
+
function prettyBasePairNumber(raw) {
|
|
20825
|
+
var denom, units, value, floored;
|
|
20826
|
+
|
|
20827
|
+
if (raw > 1e7) {
|
|
20828
|
+
denom = 1e6;
|
|
20829
|
+
units = " mb";
|
|
20830
|
+
} else if (raw > 1e4) {
|
|
20831
|
+
denom = 1e3;
|
|
20832
|
+
units = " kb";
|
|
20833
|
+
value = raw / denom;
|
|
20834
|
+
floored = Math.floor(value);
|
|
20835
|
+
return numberFormatter$1(floored) + units;
|
|
20836
|
+
} else {
|
|
20837
|
+
return numberFormatter$1(raw) + " bp";
|
|
20352
20838
|
}
|
|
20353
20839
|
|
|
20840
|
+
value = raw / denom;
|
|
20841
|
+
floored = Math.floor(value);
|
|
20842
|
+
return floored.toString() + units;
|
|
20354
20843
|
}
|
|
20355
20844
|
|
|
20356
|
-
|
|
20357
|
-
|
|
20845
|
+
function isDataURL(obj) {
|
|
20846
|
+
return isString$3(obj) && obj.startsWith("data:");
|
|
20847
|
+
}
|
|
20848
|
+
|
|
20849
|
+
function createColumn(columnContainer, className) {
|
|
20850
|
+
const column = div$1({
|
|
20851
|
+
class: className
|
|
20852
|
+
});
|
|
20853
|
+
columnContainer.appendChild(column);
|
|
20854
|
+
}
|
|
20855
|
+
|
|
20856
|
+
function insertElementBefore(element, referenceNode) {
|
|
20857
|
+
referenceNode.parentNode.insertBefore(element, referenceNode);
|
|
20858
|
+
}
|
|
20859
|
+
|
|
20860
|
+
function insertElementAfter(element, referenceNode) {
|
|
20861
|
+
referenceNode.parentNode.insertBefore(element, referenceNode.nextSibling);
|
|
20862
|
+
}
|
|
20863
|
+
/**
|
|
20864
|
+
* Test to see if page is loaded in a secure context, that is by https or is localhost.
|
|
20865
|
+
*/
|
|
20866
|
+
|
|
20867
|
+
|
|
20868
|
+
function isSecureContext() {
|
|
20869
|
+
return window.location.protocol === "https:" || window.location.hostname === "localhost";
|
|
20870
|
+
} // reference: https://pretagteam.com/question/find-element-height-including-margin
|
|
20871
|
+
|
|
20872
|
+
|
|
20873
|
+
function getElementAbsoluteHeight(element) {
|
|
20874
|
+
// Get the DOM Node if you pass in a string
|
|
20875
|
+
element = typeof element === 'string' ? document.querySelector(element) : element;
|
|
20876
|
+
const styles = window.getComputedStyle(element);
|
|
20877
|
+
const margin = parseFloat(styles['marginTop']) + parseFloat(styles['marginBottom']);
|
|
20878
|
+
const height = element.offsetHeight;
|
|
20879
|
+
return Math.ceil(margin + height);
|
|
20880
|
+
}
|
|
20881
|
+
|
|
20882
|
+
/**
|
|
20883
|
+
* Decoder for bedpe records.
|
|
20358
20884
|
*
|
|
20359
|
-
*
|
|
20885
|
+
* Bedpe format was created by Aaron Quinlan et al as part of the bedtools project.
|
|
20886
|
+
* The spec is here: https://bedtools.readthedocs.io/en/latest/content/general-usage.html,
|
|
20360
20887
|
*
|
|
20361
|
-
*
|
|
20362
|
-
*
|
|
20363
|
-
* in the Software without restriction, including without limitation the rights
|
|
20364
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
20365
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
20366
|
-
* furnished to do so, subject to the following conditions:
|
|
20888
|
+
* 1 2 3 4 5 6 7 8 9 10 11-
|
|
20889
|
+
* chrom1 start1 end1 chrom2 start2 end2 name score strand1 strand2 <Any number of additional, user-defined fields>
|
|
20367
20890
|
*
|
|
20368
|
-
*
|
|
20369
|
-
*
|
|
20891
|
+
* However there are off spec variants, an important one being a 7 column format with score in place of the standard
|
|
20892
|
+
* name column.
|
|
20370
20893
|
*
|
|
20894
|
+
* A common variant is a "hiccups" output file, which is standard bedpe with the exception of a header line
|
|
20895
|
+
* of the form
|
|
20371
20896
|
*
|
|
20372
|
-
*
|
|
20373
|
-
*
|
|
20374
|
-
*
|
|
20375
|
-
*
|
|
20376
|
-
*
|
|
20377
|
-
*
|
|
20378
|
-
*
|
|
20897
|
+
* chr1 x1 x2 chr2 y1 y2 name score strand1 strand2 color observed expectedBL expectedDonut expectedH expectedV fdrBL fdrDonut fdrH fdrV
|
|
20898
|
+
*
|
|
20899
|
+
* The "hiccups" output is apparently not standardized as this is found at ENCODE, with a non-helpful "tsv" extension
|
|
20900
|
+
*
|
|
20901
|
+
* chr1 x1 x2 chr2 y1 y2 color observed expectedBL expectedDonut expectedH expectedV fdrBL fdrDonut fdrH fdrV numCollapsed centroid1 centroid2 radius
|
|
20902
|
+
* chr9 136790000 136795000 chr9 136990000 136995000 0,255,255 101.0 31.100368 38.40316 56.948116 34.040756 1.1876738E-13 1.05936405E-13 2.5148233E-4 1.7220993E-13 1 136792500 136992500 25590
|
|
20903
|
+
*
|
|
20904
|
+
* The "hiccups" documentation specfies yet another set of column headers
|
|
20905
|
+
* chromosome1 x1 x2 chromosome2 y1 y2 color observed expected_bottom_left expected_donut expected_horizontal expected_vertical fdr_bottom_left fdr_donut fdr_horizontal fdr_vertical number_collapsed centroid1 centroid2 radius
|
|
20906
|
+
*
|
|
20907
|
+
* @param tokens
|
|
20908
|
+
* @param ignore
|
|
20909
|
+
* @returns {{start1: number, end2: number, end1: number, chr1: *, chr2: *, start2: number}|undefined}
|
|
20379
20910
|
*/
|
|
20380
20911
|
|
|
20381
|
-
|
|
20382
|
-
|
|
20383
|
-
|
|
20912
|
+
function decodeBedpe(tokens, header) {
|
|
20913
|
+
if (tokens.length < 6) {
|
|
20914
|
+
console.log("Skipping line: " + tokens.join(' '));
|
|
20915
|
+
return undefined;
|
|
20916
|
+
}
|
|
20384
20917
|
|
|
20385
|
-
|
|
20386
|
-
|
|
20387
|
-
|
|
20388
|
-
|
|
20389
|
-
|
|
20390
|
-
|
|
20391
|
-
|
|
20392
|
-
|
|
20393
|
-
if (properties.hasOwnProperty(key)) {
|
|
20394
|
-
var value = properties[key];
|
|
20395
|
-
ctx[key] = value;
|
|
20396
|
-
}
|
|
20397
|
-
}
|
|
20398
|
-
},
|
|
20399
|
-
strokeLine: function (ctx, x1, y1, x2, y2, properties) {
|
|
20400
|
-
x1 = Math.floor(x1) + 0.5;
|
|
20401
|
-
y1 = Math.floor(y1) + 0.5;
|
|
20402
|
-
x2 = Math.floor(x2) + 0.5;
|
|
20403
|
-
y2 = Math.floor(y2) + 0.5;
|
|
20918
|
+
var feature = {
|
|
20919
|
+
chr1: tokens[0],
|
|
20920
|
+
start1: Number.parseInt(tokens[1]),
|
|
20921
|
+
end1: Number.parseInt(tokens[2]),
|
|
20922
|
+
chr2: tokens[3],
|
|
20923
|
+
start2: Number.parseInt(tokens[4]),
|
|
20924
|
+
end2: Number.parseInt(tokens[5])
|
|
20925
|
+
};
|
|
20404
20926
|
|
|
20405
|
-
|
|
20406
|
-
|
|
20407
|
-
|
|
20408
|
-
|
|
20927
|
+
if (isNaN(feature.start1) || isNaN(feature.end1) || isNaN(feature.start2) || isNaN(feature.end2)) {
|
|
20928
|
+
//throw Error(`Error parsing line: ${tokens.join('\t')}`);
|
|
20929
|
+
return undefined;
|
|
20930
|
+
} // Determine if this is a "hiccups" file. Store result on "header" so it doesn't need repeated for every feature
|
|
20409
20931
|
|
|
20410
|
-
ctx.beginPath();
|
|
20411
|
-
ctx.moveTo(x1, y1);
|
|
20412
|
-
ctx.lineTo(x2, y2);
|
|
20413
|
-
ctx.stroke();
|
|
20414
|
-
if (properties) ctx.restore();
|
|
20415
|
-
},
|
|
20416
|
-
fillRect: function (ctx, x, y, w, h, properties) {
|
|
20417
|
-
x = Math.round(x);
|
|
20418
|
-
y = Math.round(y);
|
|
20419
20932
|
|
|
20420
|
-
|
|
20421
|
-
|
|
20422
|
-
|
|
20423
|
-
}
|
|
20933
|
+
if (header && header.hiccups === undefined) {
|
|
20934
|
+
header.hiccups = header.columnNames ? isHiccups(header.columnNames) : false;
|
|
20935
|
+
}
|
|
20424
20936
|
|
|
20425
|
-
|
|
20426
|
-
|
|
20427
|
-
|
|
20428
|
-
|
|
20429
|
-
if (
|
|
20430
|
-
|
|
20431
|
-
IGVGraphics.setProperties(ctx, properties);
|
|
20937
|
+
const hiccups = header && header.hiccups;
|
|
20938
|
+
const stdColumns = hiccups ? 6 : 10;
|
|
20939
|
+
|
|
20940
|
+
if (!hiccups) {
|
|
20941
|
+
if (tokens.length > 6 && tokens[6] !== ".") {
|
|
20942
|
+
feature.name = tokens[6];
|
|
20432
20943
|
}
|
|
20433
20944
|
|
|
20434
|
-
|
|
20435
|
-
|
|
20436
|
-
if (properties) ctx.restore();
|
|
20437
|
-
},
|
|
20438
|
-
strokePolygon: function (ctx, x, y, properties) {
|
|
20439
|
-
if (properties) {
|
|
20440
|
-
ctx.save();
|
|
20441
|
-
IGVGraphics.setProperties(ctx, properties);
|
|
20945
|
+
if (tokens.length > 7 && tokens[7] !== ".") {
|
|
20946
|
+
feature.score = Number(tokens[7]);
|
|
20442
20947
|
}
|
|
20443
20948
|
|
|
20444
|
-
|
|
20445
|
-
|
|
20446
|
-
if (properties) ctx.restore();
|
|
20447
|
-
},
|
|
20448
|
-
fillText: function (ctx, text, x, y, properties, transforms) {
|
|
20449
|
-
if (properties || transforms) {
|
|
20450
|
-
ctx.save();
|
|
20949
|
+
if (tokens.length > 8 && tokens[8] !== ".") {
|
|
20950
|
+
feature.strand1 = tokens[8];
|
|
20451
20951
|
}
|
|
20452
20952
|
|
|
20453
|
-
if (
|
|
20454
|
-
|
|
20953
|
+
if (tokens.length > 9 && tokens[9] !== ".") {
|
|
20954
|
+
feature.strand2 = tokens[9];
|
|
20455
20955
|
}
|
|
20956
|
+
} // Optional extra columns
|
|
20456
20957
|
|
|
20457
|
-
if (transforms) {
|
|
20458
|
-
// Slow path with context saving and extra translate
|
|
20459
|
-
ctx.translate(x, y);
|
|
20460
20958
|
|
|
20461
|
-
|
|
20462
|
-
|
|
20959
|
+
if (header) {
|
|
20960
|
+
const colorColumn = header.colorColumn;
|
|
20463
20961
|
|
|
20464
|
-
|
|
20465
|
-
|
|
20466
|
-
|
|
20962
|
+
if (colorColumn && colorColumn < tokens.length) {
|
|
20963
|
+
feature.color = IGVColor.createColorString(tokens[colorColumn]);
|
|
20964
|
+
}
|
|
20467
20965
|
|
|
20468
|
-
|
|
20469
|
-
ctx.rotate(value['angle'] * Math.PI / 180);
|
|
20470
|
-
}
|
|
20471
|
-
}
|
|
20966
|
+
const thicknessColumn = header.thicknessColumn;
|
|
20472
20967
|
|
|
20473
|
-
|
|
20474
|
-
|
|
20475
|
-
ctx.fillText(text, x, y);
|
|
20968
|
+
if (thicknessColumn && thicknessColumn < tokens.length) {
|
|
20969
|
+
feature.thickness = tokens[thicknessColumn];
|
|
20476
20970
|
}
|
|
20477
20971
|
|
|
20478
|
-
if (
|
|
20479
|
-
|
|
20480
|
-
strokeText: function (ctx, text, x, y, properties, transforms) {
|
|
20481
|
-
if (properties || transforms) {
|
|
20482
|
-
ctx.save();
|
|
20972
|
+
if (tokens.length > stdColumns && header.columnNames && header.columnNames.length === tokens.length) {
|
|
20973
|
+
feature.extras = tokens.slice(stdColumns);
|
|
20483
20974
|
}
|
|
20975
|
+
} // Set total extent of feature
|
|
20484
20976
|
|
|
20485
|
-
if (properties) {
|
|
20486
|
-
IGVGraphics.setProperties(ctx, properties);
|
|
20487
|
-
}
|
|
20488
20977
|
|
|
20489
|
-
|
|
20490
|
-
|
|
20978
|
+
if (feature.chr1 === feature.chr2) {
|
|
20979
|
+
feature.chr = feature.chr1;
|
|
20980
|
+
feature.start = Math.min(feature.start1, feature.start2);
|
|
20981
|
+
feature.end = Math.max(feature.end1, feature.end2);
|
|
20982
|
+
}
|
|
20491
20983
|
|
|
20492
|
-
|
|
20493
|
-
|
|
20984
|
+
return feature;
|
|
20985
|
+
}
|
|
20986
|
+
/**
|
|
20987
|
+
* Hack for non-standard bedPE formats, where numeric score can be in column 7 (name field from spec)
|
|
20988
|
+
* @param features
|
|
20989
|
+
*/
|
|
20494
20990
|
|
|
20495
|
-
if (transform === 'translate') {
|
|
20496
|
-
ctx.translate(value['x'], value['y']);
|
|
20497
|
-
}
|
|
20498
20991
|
|
|
20499
|
-
|
|
20500
|
-
|
|
20501
|
-
}
|
|
20502
|
-
}
|
|
20503
|
-
|
|
20504
|
-
ctx.strokeText(text, 0, 0);
|
|
20505
|
-
} else {
|
|
20506
|
-
ctx.strokeText(text, x, y);
|
|
20507
|
-
}
|
|
20508
|
-
|
|
20509
|
-
if (properties || transforms) ctx.restore();
|
|
20510
|
-
},
|
|
20511
|
-
strokeCircle: function (ctx, x, y, radius, properties) {
|
|
20512
|
-
if (properties) {
|
|
20513
|
-
ctx.save();
|
|
20514
|
-
IGVGraphics.setProperties(ctx, properties);
|
|
20515
|
-
}
|
|
20516
|
-
|
|
20517
|
-
ctx.beginPath();
|
|
20518
|
-
ctx.arc(x, y, radius, 0, 2 * Math.PI);
|
|
20519
|
-
ctx.stroke();
|
|
20520
|
-
if (properties) ctx.restore();
|
|
20521
|
-
},
|
|
20522
|
-
fillCircle: function (ctx, x, y, radius, properties) {
|
|
20523
|
-
if (properties) {
|
|
20524
|
-
ctx.save();
|
|
20525
|
-
IGVGraphics.setProperties(ctx, properties);
|
|
20526
|
-
}
|
|
20527
|
-
|
|
20528
|
-
ctx.beginPath();
|
|
20529
|
-
ctx.arc(x, y, radius, 0, 2 * Math.PI);
|
|
20530
|
-
ctx.fill();
|
|
20531
|
-
if (properties) ctx.restore();
|
|
20532
|
-
},
|
|
20533
|
-
drawArrowhead: function (ctx, x, y, size, lineWidth) {
|
|
20534
|
-
ctx.save();
|
|
20535
|
-
|
|
20536
|
-
if (!size) {
|
|
20537
|
-
size = 5;
|
|
20538
|
-
}
|
|
20539
|
-
|
|
20540
|
-
if (lineWidth) {
|
|
20541
|
-
ctx.lineWidth = lineWidth;
|
|
20542
|
-
}
|
|
20543
|
-
|
|
20544
|
-
ctx.beginPath();
|
|
20545
|
-
ctx.moveTo(x, y - size / 2);
|
|
20546
|
-
ctx.lineTo(x, y + size / 2);
|
|
20547
|
-
ctx.lineTo(x + size, y);
|
|
20548
|
-
ctx.lineTo(x, y - size / 2);
|
|
20549
|
-
ctx.closePath();
|
|
20550
|
-
ctx.fill();
|
|
20551
|
-
ctx.restore();
|
|
20552
|
-
},
|
|
20553
|
-
dashedLine: function (ctx, x1, y1, x2, y2, dashLen) {
|
|
20554
|
-
let properties = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : {};
|
|
20555
|
-
if (dashLen === undefined) dashLen = 2;
|
|
20556
|
-
ctx.setLineDash([dashLen, dashLen]);
|
|
20557
|
-
IGVGraphics.strokeLine(ctx, x1, y1, x2, y2, properties);
|
|
20558
|
-
ctx.setLineDash([]);
|
|
20559
|
-
},
|
|
20560
|
-
roundRect: function (ctx, x, y, width, height, radius, fill, stroke) {
|
|
20561
|
-
if (typeof stroke == "undefined") {
|
|
20562
|
-
stroke = true;
|
|
20563
|
-
}
|
|
20564
|
-
|
|
20565
|
-
if (typeof radius === "undefined") {
|
|
20566
|
-
radius = 5;
|
|
20567
|
-
}
|
|
20568
|
-
|
|
20569
|
-
ctx.beginPath();
|
|
20570
|
-
ctx.moveTo(x + radius, y);
|
|
20571
|
-
ctx.lineTo(x + width - radius, y);
|
|
20572
|
-
ctx.quadraticCurveTo(x + width, y, x + width, y + radius);
|
|
20573
|
-
ctx.lineTo(x + width, y + height - radius);
|
|
20574
|
-
ctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height);
|
|
20575
|
-
ctx.lineTo(x + radius, y + height);
|
|
20576
|
-
ctx.quadraticCurveTo(x, y + height, x, y + height - radius);
|
|
20577
|
-
ctx.lineTo(x, y + radius);
|
|
20578
|
-
ctx.quadraticCurveTo(x, y, x + radius, y);
|
|
20579
|
-
ctx.closePath();
|
|
20580
|
-
|
|
20581
|
-
if (stroke) {
|
|
20582
|
-
ctx.stroke();
|
|
20583
|
-
}
|
|
20584
|
-
|
|
20585
|
-
if (fill) {
|
|
20586
|
-
ctx.fill();
|
|
20587
|
-
}
|
|
20588
|
-
},
|
|
20589
|
-
polygon: function (ctx, x, y, fill, stroke) {
|
|
20590
|
-
if (typeof stroke == "undefined") {
|
|
20591
|
-
stroke = true;
|
|
20592
|
-
}
|
|
20593
|
-
|
|
20594
|
-
ctx.beginPath();
|
|
20595
|
-
var len = x.length;
|
|
20596
|
-
ctx.moveTo(x[0], y[0]);
|
|
20597
|
-
|
|
20598
|
-
for (var i = 1; i < len; i++) {
|
|
20599
|
-
ctx.lineTo(x[i], y[i]); // this.moveTo(x[i], y[i]);
|
|
20600
|
-
}
|
|
20992
|
+
function fixBedPE(features) {
|
|
20993
|
+
if (features.length == 0) return; // Assume all features have same properties
|
|
20601
20994
|
|
|
20602
|
-
|
|
20995
|
+
const firstFeature = features[0];
|
|
20603
20996
|
|
|
20604
|
-
|
|
20605
|
-
|
|
20997
|
+
if (firstFeature.score === undefined && firstFeature.name !== undefined) {
|
|
20998
|
+
// Name field (col 7) is sometimes used for score.
|
|
20999
|
+
for (let f of features) {
|
|
21000
|
+
if (!(isNumber(f.name) || f.name === '.')) return;
|
|
20606
21001
|
}
|
|
20607
21002
|
|
|
20608
|
-
|
|
20609
|
-
|
|
21003
|
+
for (let f of features) {
|
|
21004
|
+
f.score = Number(f.name);
|
|
21005
|
+
delete f.name;
|
|
20610
21006
|
}
|
|
20611
|
-
}
|
|
20612
|
-
};
|
|
21007
|
+
} // Make copies of inter-chr features, one for each chromosome
|
|
20613
21008
|
|
|
20614
|
-
function doPath(ctx, x, y) {
|
|
20615
|
-
var i,
|
|
20616
|
-
len = x.length;
|
|
20617
21009
|
|
|
20618
|
-
|
|
20619
|
-
x[i] = Math.round(x[i]);
|
|
20620
|
-
y[i] = Math.round(y[i]);
|
|
20621
|
-
}
|
|
20622
|
-
|
|
20623
|
-
ctx.beginPath();
|
|
20624
|
-
ctx.moveTo(x[0], y[0]);
|
|
21010
|
+
const interChrFeatures = features.filter(f => f.chr1 !== f.chr2);
|
|
20625
21011
|
|
|
20626
|
-
for (
|
|
20627
|
-
|
|
21012
|
+
for (let f1 of interChrFeatures) {
|
|
21013
|
+
const f2 = Object.assign({}, f1);
|
|
21014
|
+
f2.dup = true;
|
|
21015
|
+
features.push(f2);
|
|
21016
|
+
f1.chr = f1.chr1;
|
|
21017
|
+
f1.start = f1.start1;
|
|
21018
|
+
f1.end = f1.end1;
|
|
21019
|
+
f2.chr = f2.chr2;
|
|
21020
|
+
f2.start = f2.start2;
|
|
21021
|
+
f2.end = f2.end2;
|
|
20628
21022
|
}
|
|
20629
|
-
|
|
20630
|
-
ctx.closePath();
|
|
20631
|
-
}
|
|
20632
|
-
|
|
20633
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
20634
|
-
|
|
20635
|
-
function createCommonjsModule(fn) {
|
|
20636
|
-
var module = { exports: {} };
|
|
20637
|
-
return fn(module, module.exports), module.exports;
|
|
20638
21023
|
}
|
|
21024
|
+
/**
|
|
21025
|
+
* Special decoder for Hic Domain files. In these files feature1 == feature2, they are really bed records.
|
|
21026
|
+
* @param tokens
|
|
21027
|
+
* @param ignore
|
|
21028
|
+
* @returns {*}
|
|
21029
|
+
*/
|
|
20639
21030
|
|
|
20640
|
-
var check = function (it) {
|
|
20641
|
-
return it && it.Math == Math && it;
|
|
20642
|
-
}; // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
20643
|
-
|
|
20644
|
-
|
|
20645
|
-
var global$1 = // eslint-disable-next-line es-x/no-global-this -- safe
|
|
20646
|
-
check(typeof globalThis == 'object' && globalThis) || check(typeof window == 'object' && window) || // eslint-disable-next-line no-restricted-globals -- safe
|
|
20647
|
-
check(typeof self == 'object' && self) || check(typeof commonjsGlobal == 'object' && commonjsGlobal) || // eslint-disable-next-line no-new-func -- fallback
|
|
20648
|
-
function () {
|
|
20649
|
-
return this;
|
|
20650
|
-
}() || Function('return this')();
|
|
20651
|
-
|
|
20652
|
-
var fails = function (exec) {
|
|
20653
|
-
try {
|
|
20654
|
-
return !!exec();
|
|
20655
|
-
} catch (error) {
|
|
20656
|
-
return true;
|
|
20657
|
-
}
|
|
20658
|
-
};
|
|
20659
|
-
|
|
20660
|
-
var descriptors = !fails(function () {
|
|
20661
|
-
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
20662
|
-
return Object.defineProperty({}, 1, {
|
|
20663
|
-
get: function () {
|
|
20664
|
-
return 7;
|
|
20665
|
-
}
|
|
20666
|
-
})[1] != 7;
|
|
20667
|
-
});
|
|
20668
|
-
|
|
20669
|
-
var functionBindNative = !fails(function () {
|
|
20670
|
-
// eslint-disable-next-line es-x/no-function-prototype-bind -- safe
|
|
20671
|
-
var test = function () {
|
|
20672
|
-
/* empty */
|
|
20673
|
-
}.bind(); // eslint-disable-next-line no-prototype-builtins -- safe
|
|
20674
|
-
|
|
20675
|
-
|
|
20676
|
-
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
20677
|
-
});
|
|
20678
|
-
|
|
20679
|
-
var call$2 = Function.prototype.call;
|
|
20680
|
-
var functionCall = functionBindNative ? call$2.bind(call$2) : function () {
|
|
20681
|
-
return call$2.apply(call$2, arguments);
|
|
20682
|
-
};
|
|
20683
|
-
|
|
20684
|
-
var $propertyIsEnumerable = {}.propertyIsEnumerable; // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
20685
|
-
|
|
20686
|
-
var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor; // Nashorn ~ JDK8 bug
|
|
20687
|
-
|
|
20688
|
-
var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({
|
|
20689
|
-
1: 2
|
|
20690
|
-
}, 1); // `Object.prototype.propertyIsEnumerable` method implementation
|
|
20691
|
-
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
20692
|
-
|
|
20693
|
-
var f$5 = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
20694
|
-
var descriptor = getOwnPropertyDescriptor$1(this, V);
|
|
20695
|
-
return !!descriptor && descriptor.enumerable;
|
|
20696
|
-
} : $propertyIsEnumerable;
|
|
20697
|
-
var objectPropertyIsEnumerable = {
|
|
20698
|
-
f: f$5
|
|
20699
|
-
};
|
|
20700
21031
|
|
|
20701
|
-
|
|
21032
|
+
function decodeBedpeDomain(tokens, header) {
|
|
21033
|
+
if (tokens.length < 8) return undefined;
|
|
20702
21034
|
return {
|
|
20703
|
-
|
|
20704
|
-
|
|
20705
|
-
|
|
20706
|
-
|
|
20707
|
-
|
|
20708
|
-
};
|
|
20709
|
-
|
|
20710
|
-
var FunctionPrototype$2 = Function.prototype;
|
|
20711
|
-
var bind$1 = FunctionPrototype$2.bind;
|
|
20712
|
-
var call$1 = FunctionPrototype$2.call;
|
|
20713
|
-
var uncurryThis = functionBindNative && bind$1.bind(call$1, call$1);
|
|
20714
|
-
var functionUncurryThis = functionBindNative ? function (fn) {
|
|
20715
|
-
return fn && uncurryThis(fn);
|
|
20716
|
-
} : function (fn) {
|
|
20717
|
-
return fn && function () {
|
|
20718
|
-
return call$1.apply(fn, arguments);
|
|
20719
|
-
};
|
|
20720
|
-
};
|
|
20721
|
-
|
|
20722
|
-
var toString$1 = functionUncurryThis({}.toString);
|
|
20723
|
-
var stringSlice = functionUncurryThis(''.slice);
|
|
20724
|
-
|
|
20725
|
-
var classofRaw = function (it) {
|
|
20726
|
-
return stringSlice(toString$1(it), 8, -1);
|
|
20727
|
-
};
|
|
20728
|
-
|
|
20729
|
-
var $Object$2 = Object;
|
|
20730
|
-
var split = functionUncurryThis(''.split); // fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
20731
|
-
|
|
20732
|
-
var indexedObject = fails(function () {
|
|
20733
|
-
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
20734
|
-
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
20735
|
-
return !$Object$2('z').propertyIsEnumerable(0);
|
|
20736
|
-
}) ? function (it) {
|
|
20737
|
-
return classofRaw(it) == 'String' ? split(it, '') : $Object$2(it);
|
|
20738
|
-
} : $Object$2;
|
|
20739
|
-
|
|
20740
|
-
var $TypeError$6 = TypeError; // `RequireObjectCoercible` abstract operation
|
|
20741
|
-
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
20742
|
-
|
|
20743
|
-
var requireObjectCoercible = function (it) {
|
|
20744
|
-
if (it == undefined) throw $TypeError$6("Can't call method on " + it);
|
|
20745
|
-
return it;
|
|
20746
|
-
};
|
|
20747
|
-
|
|
20748
|
-
var toIndexedObject = function (it) {
|
|
20749
|
-
return indexedObject(requireObjectCoercible(it));
|
|
20750
|
-
};
|
|
20751
|
-
|
|
20752
|
-
// `IsCallable` abstract operation
|
|
20753
|
-
// https://tc39.es/ecma262/#sec-iscallable
|
|
20754
|
-
var isCallable = function (argument) {
|
|
20755
|
-
return typeof argument == 'function';
|
|
20756
|
-
};
|
|
20757
|
-
|
|
20758
|
-
var isObject = function (it) {
|
|
20759
|
-
return typeof it == 'object' ? it !== null : isCallable(it);
|
|
20760
|
-
};
|
|
20761
|
-
|
|
20762
|
-
var aFunction = function (argument) {
|
|
20763
|
-
return isCallable(argument) ? argument : undefined;
|
|
20764
|
-
};
|
|
20765
|
-
|
|
20766
|
-
var getBuiltIn = function (namespace, method) {
|
|
20767
|
-
return arguments.length < 2 ? aFunction(global$1[namespace]) : global$1[namespace] && global$1[namespace][method];
|
|
20768
|
-
};
|
|
20769
|
-
|
|
20770
|
-
var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
|
|
20771
|
-
|
|
20772
|
-
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
|
|
20773
|
-
|
|
20774
|
-
var process$2 = global$1.process;
|
|
20775
|
-
var Deno = global$1.Deno;
|
|
20776
|
-
var versions = process$2 && process$2.versions || Deno && Deno.version;
|
|
20777
|
-
var v8 = versions && versions.v8;
|
|
20778
|
-
var match, version$1;
|
|
20779
|
-
|
|
20780
|
-
if (v8) {
|
|
20781
|
-
match = v8.split('.'); // in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
|
20782
|
-
// but their correct versions are not interesting for us
|
|
20783
|
-
|
|
20784
|
-
version$1 = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
|
20785
|
-
} // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
|
20786
|
-
// so check `userAgent` even if `.v8` exists, but 0
|
|
20787
|
-
|
|
20788
|
-
|
|
20789
|
-
if (!version$1 && engineUserAgent) {
|
|
20790
|
-
match = engineUserAgent.match(/Edge\/(\d+)/);
|
|
20791
|
-
|
|
20792
|
-
if (!match || match[1] >= 74) {
|
|
20793
|
-
match = engineUserAgent.match(/Chrome\/(\d+)/);
|
|
20794
|
-
if (match) version$1 = +match[1];
|
|
20795
|
-
}
|
|
20796
|
-
}
|
|
20797
|
-
|
|
20798
|
-
var engineV8Version = version$1;
|
|
20799
|
-
|
|
20800
|
-
/* eslint-disable es-x/no-symbol -- required for testing */
|
|
20801
|
-
|
|
20802
|
-
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
|
20803
|
-
var symbol = Symbol(); // Chrome 38 Symbol has incorrect toString conversion
|
|
20804
|
-
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
20805
|
-
|
|
20806
|
-
return !String(symbol) || !(Object(symbol) instanceof Symbol) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
20807
|
-
!Symbol.sham && engineV8Version && engineV8Version < 41;
|
|
20808
|
-
});
|
|
20809
|
-
|
|
20810
|
-
/* eslint-disable es-x/no-symbol -- required for testing */
|
|
20811
|
-
var useSymbolAsUid = nativeSymbol && !Symbol.sham && typeof Symbol.iterator == 'symbol';
|
|
20812
|
-
|
|
20813
|
-
var $Object$1 = Object;
|
|
20814
|
-
var isSymbol = useSymbolAsUid ? function (it) {
|
|
20815
|
-
return typeof it == 'symbol';
|
|
20816
|
-
} : function (it) {
|
|
20817
|
-
var $Symbol = getBuiltIn('Symbol');
|
|
20818
|
-
return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, $Object$1(it));
|
|
20819
|
-
};
|
|
20820
|
-
|
|
20821
|
-
var $String$1 = String;
|
|
20822
|
-
|
|
20823
|
-
var tryToString = function (argument) {
|
|
20824
|
-
try {
|
|
20825
|
-
return $String$1(argument);
|
|
20826
|
-
} catch (error) {
|
|
20827
|
-
return 'Object';
|
|
20828
|
-
}
|
|
20829
|
-
};
|
|
20830
|
-
|
|
20831
|
-
var $TypeError$5 = TypeError; // `Assert: IsCallable(argument) is true`
|
|
20832
|
-
|
|
20833
|
-
var aCallable = function (argument) {
|
|
20834
|
-
if (isCallable(argument)) return argument;
|
|
20835
|
-
throw $TypeError$5(tryToString(argument) + ' is not a function');
|
|
20836
|
-
};
|
|
20837
|
-
|
|
20838
|
-
// https://tc39.es/ecma262/#sec-getmethod
|
|
20839
|
-
|
|
20840
|
-
var getMethod = function (V, P) {
|
|
20841
|
-
var func = V[P];
|
|
20842
|
-
return func == null ? undefined : aCallable(func);
|
|
20843
|
-
};
|
|
20844
|
-
|
|
20845
|
-
var $TypeError$4 = TypeError; // `OrdinaryToPrimitive` abstract operation
|
|
20846
|
-
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
20847
|
-
|
|
20848
|
-
var ordinaryToPrimitive = function (input, pref) {
|
|
20849
|
-
var fn, val;
|
|
20850
|
-
if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
|
|
20851
|
-
if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val;
|
|
20852
|
-
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
|
|
20853
|
-
throw $TypeError$4("Can't convert object to primitive value");
|
|
20854
|
-
};
|
|
20855
|
-
|
|
20856
|
-
var defineProperty$1 = Object.defineProperty;
|
|
20857
|
-
|
|
20858
|
-
var defineGlobalProperty = function (key, value) {
|
|
20859
|
-
try {
|
|
20860
|
-
defineProperty$1(global$1, key, {
|
|
20861
|
-
value: value,
|
|
20862
|
-
configurable: true,
|
|
20863
|
-
writable: true
|
|
20864
|
-
});
|
|
20865
|
-
} catch (error) {
|
|
20866
|
-
global$1[key] = value;
|
|
20867
|
-
}
|
|
20868
|
-
|
|
20869
|
-
return value;
|
|
20870
|
-
};
|
|
20871
|
-
|
|
20872
|
-
var SHARED = '__core-js_shared__';
|
|
20873
|
-
var store$1 = global$1[SHARED] || defineGlobalProperty(SHARED, {});
|
|
20874
|
-
var sharedStore = store$1;
|
|
20875
|
-
|
|
20876
|
-
var shared = createCommonjsModule(function (module) {
|
|
20877
|
-
(module.exports = function (key, value) {
|
|
20878
|
-
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
20879
|
-
})('versions', []).push({
|
|
20880
|
-
version: '3.24.1',
|
|
20881
|
-
mode: 'global',
|
|
20882
|
-
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
20883
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE',
|
|
20884
|
-
source: 'https://github.com/zloirock/core-js'
|
|
20885
|
-
});
|
|
20886
|
-
});
|
|
20887
|
-
|
|
20888
|
-
var $Object = Object; // `ToObject` abstract operation
|
|
20889
|
-
// https://tc39.es/ecma262/#sec-toobject
|
|
20890
|
-
|
|
20891
|
-
var toObject = function (argument) {
|
|
20892
|
-
return $Object(requireObjectCoercible(argument));
|
|
20893
|
-
};
|
|
20894
|
-
|
|
20895
|
-
var hasOwnProperty = functionUncurryThis({}.hasOwnProperty); // `HasOwnProperty` abstract operation
|
|
20896
|
-
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
20897
|
-
// eslint-disable-next-line es-x/no-object-hasown -- safe
|
|
20898
|
-
|
|
20899
|
-
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
20900
|
-
return hasOwnProperty(toObject(it), key);
|
|
20901
|
-
};
|
|
20902
|
-
|
|
20903
|
-
var id = 0;
|
|
20904
|
-
var postfix = Math.random();
|
|
20905
|
-
var toString = functionUncurryThis(1.0.toString);
|
|
20906
|
-
|
|
20907
|
-
var uid = function (key) {
|
|
20908
|
-
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
|
|
20909
|
-
};
|
|
20910
|
-
|
|
20911
|
-
var WellKnownSymbolsStore = shared('wks');
|
|
20912
|
-
var Symbol$1 = global$1.Symbol;
|
|
20913
|
-
var symbolFor = Symbol$1 && Symbol$1['for'];
|
|
20914
|
-
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
|
|
20915
|
-
|
|
20916
|
-
var wellKnownSymbol = function (name) {
|
|
20917
|
-
if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
|
|
20918
|
-
var description = 'Symbol.' + name;
|
|
20919
|
-
|
|
20920
|
-
if (nativeSymbol && hasOwnProperty_1(Symbol$1, name)) {
|
|
20921
|
-
WellKnownSymbolsStore[name] = Symbol$1[name];
|
|
20922
|
-
} else if (useSymbolAsUid && symbolFor) {
|
|
20923
|
-
WellKnownSymbolsStore[name] = symbolFor(description);
|
|
20924
|
-
} else {
|
|
20925
|
-
WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
|
|
20926
|
-
}
|
|
20927
|
-
}
|
|
20928
|
-
|
|
20929
|
-
return WellKnownSymbolsStore[name];
|
|
20930
|
-
};
|
|
20931
|
-
|
|
20932
|
-
var $TypeError$3 = TypeError;
|
|
20933
|
-
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); // `ToPrimitive` abstract operation
|
|
20934
|
-
// https://tc39.es/ecma262/#sec-toprimitive
|
|
20935
|
-
|
|
20936
|
-
var toPrimitive = function (input, pref) {
|
|
20937
|
-
if (!isObject(input) || isSymbol(input)) return input;
|
|
20938
|
-
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
|
|
20939
|
-
var result;
|
|
20940
|
-
|
|
20941
|
-
if (exoticToPrim) {
|
|
20942
|
-
if (pref === undefined) pref = 'default';
|
|
20943
|
-
result = functionCall(exoticToPrim, input, pref);
|
|
20944
|
-
if (!isObject(result) || isSymbol(result)) return result;
|
|
20945
|
-
throw $TypeError$3("Can't convert object to primitive value");
|
|
20946
|
-
}
|
|
20947
|
-
|
|
20948
|
-
if (pref === undefined) pref = 'number';
|
|
20949
|
-
return ordinaryToPrimitive(input, pref);
|
|
20950
|
-
};
|
|
20951
|
-
|
|
20952
|
-
// https://tc39.es/ecma262/#sec-topropertykey
|
|
20953
|
-
|
|
20954
|
-
var toPropertyKey = function (argument) {
|
|
20955
|
-
var key = toPrimitive(argument, 'string');
|
|
20956
|
-
return isSymbol(key) ? key : key + '';
|
|
20957
|
-
};
|
|
20958
|
-
|
|
20959
|
-
var document$1 = global$1.document; // typeof document.createElement is 'object' in old IE
|
|
20960
|
-
|
|
20961
|
-
var EXISTS$1 = isObject(document$1) && isObject(document$1.createElement);
|
|
20962
|
-
|
|
20963
|
-
var documentCreateElement = function (it) {
|
|
20964
|
-
return EXISTS$1 ? document$1.createElement(it) : {};
|
|
20965
|
-
};
|
|
20966
|
-
|
|
20967
|
-
var ie8DomDefine = !descriptors && !fails(function () {
|
|
20968
|
-
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
20969
|
-
return Object.defineProperty(documentCreateElement('div'), 'a', {
|
|
20970
|
-
get: function () {
|
|
20971
|
-
return 7;
|
|
20972
|
-
}
|
|
20973
|
-
}).a != 7;
|
|
20974
|
-
});
|
|
20975
|
-
|
|
20976
|
-
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor; // `Object.getOwnPropertyDescriptor` method
|
|
20977
|
-
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
20978
|
-
|
|
20979
|
-
var f$4 = descriptors ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
|
|
20980
|
-
O = toIndexedObject(O);
|
|
20981
|
-
P = toPropertyKey(P);
|
|
20982
|
-
if (ie8DomDefine) try {
|
|
20983
|
-
return $getOwnPropertyDescriptor$1(O, P);
|
|
20984
|
-
} catch (error) {
|
|
20985
|
-
/* empty */
|
|
20986
|
-
}
|
|
20987
|
-
if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]);
|
|
20988
|
-
};
|
|
20989
|
-
var objectGetOwnPropertyDescriptor = {
|
|
20990
|
-
f: f$4
|
|
20991
|
-
};
|
|
20992
|
-
|
|
20993
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
20994
|
-
|
|
20995
|
-
var v8PrototypeDefineBug = descriptors && fails(function () {
|
|
20996
|
-
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
20997
|
-
return Object.defineProperty(function () {
|
|
20998
|
-
/* empty */
|
|
20999
|
-
}, 'prototype', {
|
|
21000
|
-
value: 42,
|
|
21001
|
-
writable: false
|
|
21002
|
-
}).prototype != 42;
|
|
21003
|
-
});
|
|
21004
|
-
|
|
21005
|
-
var $String = String;
|
|
21006
|
-
var $TypeError$2 = TypeError; // `Assert: Type(argument) is Object`
|
|
21007
|
-
|
|
21008
|
-
var anObject = function (argument) {
|
|
21009
|
-
if (isObject(argument)) return argument;
|
|
21010
|
-
throw $TypeError$2($String(argument) + ' is not an object');
|
|
21011
|
-
};
|
|
21012
|
-
|
|
21013
|
-
var $TypeError$1 = TypeError; // eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
21014
|
-
|
|
21015
|
-
var $defineProperty = Object.defineProperty; // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
21016
|
-
|
|
21017
|
-
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
21018
|
-
var ENUMERABLE = 'enumerable';
|
|
21019
|
-
var CONFIGURABLE$1 = 'configurable';
|
|
21020
|
-
var WRITABLE = 'writable'; // `Object.defineProperty` method
|
|
21021
|
-
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
21022
|
-
|
|
21023
|
-
var f$3 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Attributes) {
|
|
21024
|
-
anObject(O);
|
|
21025
|
-
P = toPropertyKey(P);
|
|
21026
|
-
anObject(Attributes);
|
|
21027
|
-
|
|
21028
|
-
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
21029
|
-
var current = $getOwnPropertyDescriptor(O, P);
|
|
21030
|
-
|
|
21031
|
-
if (current && current[WRITABLE]) {
|
|
21032
|
-
O[P] = Attributes.value;
|
|
21033
|
-
Attributes = {
|
|
21034
|
-
configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
|
|
21035
|
-
enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
|
|
21036
|
-
writable: false
|
|
21037
|
-
};
|
|
21038
|
-
}
|
|
21039
|
-
}
|
|
21040
|
-
|
|
21041
|
-
return $defineProperty(O, P, Attributes);
|
|
21042
|
-
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
21043
|
-
anObject(O);
|
|
21044
|
-
P = toPropertyKey(P);
|
|
21045
|
-
anObject(Attributes);
|
|
21046
|
-
if (ie8DomDefine) try {
|
|
21047
|
-
return $defineProperty(O, P, Attributes);
|
|
21048
|
-
} catch (error) {
|
|
21049
|
-
/* empty */
|
|
21050
|
-
}
|
|
21051
|
-
if ('get' in Attributes || 'set' in Attributes) throw $TypeError$1('Accessors not supported');
|
|
21052
|
-
if ('value' in Attributes) O[P] = Attributes.value;
|
|
21053
|
-
return O;
|
|
21054
|
-
};
|
|
21055
|
-
var objectDefineProperty = {
|
|
21056
|
-
f: f$3
|
|
21057
|
-
};
|
|
21058
|
-
|
|
21059
|
-
var createNonEnumerableProperty = descriptors ? function (object, key, value) {
|
|
21060
|
-
return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
|
|
21061
|
-
} : function (object, key, value) {
|
|
21062
|
-
object[key] = value;
|
|
21063
|
-
return object;
|
|
21064
|
-
};
|
|
21065
|
-
|
|
21066
|
-
var FunctionPrototype$1 = Function.prototype; // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
21067
|
-
|
|
21068
|
-
var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
|
|
21069
|
-
var EXISTS = hasOwnProperty_1(FunctionPrototype$1, 'name'); // additional protection from minified / mangled / dropped function names
|
|
21070
|
-
|
|
21071
|
-
var PROPER = EXISTS && function something() {
|
|
21072
|
-
/* empty */
|
|
21073
|
-
}.name === 'something';
|
|
21074
|
-
|
|
21075
|
-
var CONFIGURABLE = EXISTS && (!descriptors || descriptors && getDescriptor(FunctionPrototype$1, 'name').configurable);
|
|
21076
|
-
var functionName = {
|
|
21077
|
-
EXISTS: EXISTS,
|
|
21078
|
-
PROPER: PROPER,
|
|
21079
|
-
CONFIGURABLE: CONFIGURABLE
|
|
21080
|
-
};
|
|
21081
|
-
|
|
21082
|
-
var functionToString = functionUncurryThis(Function.toString); // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
21083
|
-
|
|
21084
|
-
if (!isCallable(sharedStore.inspectSource)) {
|
|
21085
|
-
sharedStore.inspectSource = function (it) {
|
|
21086
|
-
return functionToString(it);
|
|
21035
|
+
chr: tokens[0],
|
|
21036
|
+
start: Number.parseInt(tokens[1]),
|
|
21037
|
+
end: Number.parseInt(tokens[2]),
|
|
21038
|
+
color: IGVColor.createColorString(tokens[6]),
|
|
21039
|
+
value: Number(tokens[7])
|
|
21087
21040
|
};
|
|
21088
21041
|
}
|
|
21089
21042
|
|
|
21090
|
-
|
|
21091
|
-
|
|
21092
|
-
var WeakMap$1 = global$1.WeakMap;
|
|
21093
|
-
var nativeWeakMap = isCallable(WeakMap$1) && /native code/.test(inspectSource(WeakMap$1));
|
|
21094
|
-
|
|
21095
|
-
var keys = shared('keys');
|
|
21096
|
-
|
|
21097
|
-
var sharedKey = function (key) {
|
|
21098
|
-
return keys[key] || (keys[key] = uid(key));
|
|
21099
|
-
};
|
|
21100
|
-
|
|
21101
|
-
var hiddenKeys$1 = {};
|
|
21102
|
-
|
|
21103
|
-
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
21104
|
-
var TypeError$1 = global$1.TypeError;
|
|
21105
|
-
var WeakMap = global$1.WeakMap;
|
|
21106
|
-
var set$1, get, has;
|
|
21107
|
-
|
|
21108
|
-
var enforce = function (it) {
|
|
21109
|
-
return has(it) ? get(it) : set$1(it, {});
|
|
21110
|
-
};
|
|
21111
|
-
|
|
21112
|
-
var getterFor = function (TYPE) {
|
|
21113
|
-
return function (it) {
|
|
21114
|
-
var state;
|
|
21115
|
-
|
|
21116
|
-
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
|
21117
|
-
throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
|
|
21118
|
-
}
|
|
21119
|
-
|
|
21120
|
-
return state;
|
|
21121
|
-
};
|
|
21122
|
-
};
|
|
21123
|
-
|
|
21124
|
-
if (nativeWeakMap || sharedStore.state) {
|
|
21125
|
-
var store = sharedStore.state || (sharedStore.state = new WeakMap());
|
|
21126
|
-
var wmget = functionUncurryThis(store.get);
|
|
21127
|
-
var wmhas = functionUncurryThis(store.has);
|
|
21128
|
-
var wmset = functionUncurryThis(store.set);
|
|
21129
|
-
|
|
21130
|
-
set$1 = function (it, metadata) {
|
|
21131
|
-
if (wmhas(store, it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
21132
|
-
metadata.facade = it;
|
|
21133
|
-
wmset(store, it, metadata);
|
|
21134
|
-
return metadata;
|
|
21135
|
-
};
|
|
21136
|
-
|
|
21137
|
-
get = function (it) {
|
|
21138
|
-
return wmget(store, it) || {};
|
|
21139
|
-
};
|
|
21140
|
-
|
|
21141
|
-
has = function (it) {
|
|
21142
|
-
return wmhas(store, it);
|
|
21143
|
-
};
|
|
21144
|
-
} else {
|
|
21145
|
-
var STATE = sharedKey('state');
|
|
21146
|
-
hiddenKeys$1[STATE] = true;
|
|
21147
|
-
|
|
21148
|
-
set$1 = function (it, metadata) {
|
|
21149
|
-
if (hasOwnProperty_1(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
21150
|
-
metadata.facade = it;
|
|
21151
|
-
createNonEnumerableProperty(it, STATE, metadata);
|
|
21152
|
-
return metadata;
|
|
21153
|
-
};
|
|
21154
|
-
|
|
21155
|
-
get = function (it) {
|
|
21156
|
-
return hasOwnProperty_1(it, STATE) ? it[STATE] : {};
|
|
21157
|
-
};
|
|
21158
|
-
|
|
21159
|
-
has = function (it) {
|
|
21160
|
-
return hasOwnProperty_1(it, STATE);
|
|
21161
|
-
};
|
|
21043
|
+
function isHiccups(columns) {
|
|
21044
|
+
return columns && (columns.includes("fdrDonut") || columns.includes("fdr_donut"));
|
|
21162
21045
|
}
|
|
21163
21046
|
|
|
21164
|
-
var internalState = {
|
|
21165
|
-
set: set$1,
|
|
21166
|
-
get: get,
|
|
21167
|
-
has: has,
|
|
21168
|
-
enforce: enforce,
|
|
21169
|
-
getterFor: getterFor
|
|
21170
|
-
};
|
|
21171
|
-
|
|
21172
|
-
var makeBuiltIn_1 = createCommonjsModule(function (module) {
|
|
21173
|
-
var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
|
|
21174
|
-
var enforceInternalState = internalState.enforce;
|
|
21175
|
-
var getInternalState = internalState.get; // eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
21176
|
-
|
|
21177
|
-
var defineProperty = Object.defineProperty;
|
|
21178
|
-
var CONFIGURABLE_LENGTH = descriptors && !fails(function () {
|
|
21179
|
-
return defineProperty(function () {
|
|
21180
|
-
/* empty */
|
|
21181
|
-
}, 'length', {
|
|
21182
|
-
value: 8
|
|
21183
|
-
}).length !== 8;
|
|
21184
|
-
});
|
|
21185
|
-
var TEMPLATE = String(String).split('String');
|
|
21186
|
-
|
|
21187
|
-
var makeBuiltIn = module.exports = function (value, name, options) {
|
|
21188
|
-
if (String(name).slice(0, 7) === 'Symbol(') {
|
|
21189
|
-
name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
21190
|
-
}
|
|
21191
|
-
|
|
21192
|
-
if (options && options.getter) name = 'get ' + name;
|
|
21193
|
-
if (options && options.setter) name = 'set ' + name;
|
|
21194
|
-
|
|
21195
|
-
if (!hasOwnProperty_1(value, 'name') || CONFIGURABLE_FUNCTION_NAME && value.name !== name) {
|
|
21196
|
-
if (descriptors) defineProperty(value, 'name', {
|
|
21197
|
-
value: name,
|
|
21198
|
-
configurable: true
|
|
21199
|
-
});else value.name = name;
|
|
21200
|
-
}
|
|
21201
|
-
|
|
21202
|
-
if (CONFIGURABLE_LENGTH && options && hasOwnProperty_1(options, 'arity') && value.length !== options.arity) {
|
|
21203
|
-
defineProperty(value, 'length', {
|
|
21204
|
-
value: options.arity
|
|
21205
|
-
});
|
|
21206
|
-
}
|
|
21207
|
-
|
|
21208
|
-
try {
|
|
21209
|
-
if (options && hasOwnProperty_1(options, 'constructor') && options.constructor) {
|
|
21210
|
-
if (descriptors) defineProperty(value, 'prototype', {
|
|
21211
|
-
writable: false
|
|
21212
|
-
}); // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
|
|
21213
|
-
} else if (value.prototype) value.prototype = undefined;
|
|
21214
|
-
} catch (error) {
|
|
21215
|
-
/* empty */
|
|
21216
|
-
}
|
|
21217
|
-
|
|
21218
|
-
var state = enforceInternalState(value);
|
|
21219
|
-
|
|
21220
|
-
if (!hasOwnProperty_1(state, 'source')) {
|
|
21221
|
-
state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
|
|
21222
|
-
}
|
|
21223
|
-
|
|
21224
|
-
return value;
|
|
21225
|
-
}; // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
21226
|
-
// eslint-disable-next-line no-extend-native -- required
|
|
21227
|
-
|
|
21228
|
-
|
|
21229
|
-
Function.prototype.toString = makeBuiltIn(function toString() {
|
|
21230
|
-
return isCallable(this) && getInternalState(this).source || inspectSource(this);
|
|
21231
|
-
}, 'toString');
|
|
21232
|
-
});
|
|
21233
|
-
|
|
21234
|
-
var defineBuiltIn = function (O, key, value, options) {
|
|
21235
|
-
if (!options) options = {};
|
|
21236
|
-
var simple = options.enumerable;
|
|
21237
|
-
var name = options.name !== undefined ? options.name : key;
|
|
21238
|
-
if (isCallable(value)) makeBuiltIn_1(value, name, options);
|
|
21239
|
-
|
|
21240
|
-
if (options.global) {
|
|
21241
|
-
if (simple) O[key] = value;else defineGlobalProperty(key, value);
|
|
21242
|
-
} else {
|
|
21243
|
-
try {
|
|
21244
|
-
if (!options.unsafe) delete O[key];else if (O[key]) simple = true;
|
|
21245
|
-
} catch (error) {
|
|
21246
|
-
/* empty */
|
|
21247
|
-
}
|
|
21248
|
-
|
|
21249
|
-
if (simple) O[key] = value;else objectDefineProperty.f(O, key, {
|
|
21250
|
-
value: value,
|
|
21251
|
-
enumerable: false,
|
|
21252
|
-
configurable: !options.nonConfigurable,
|
|
21253
|
-
writable: !options.nonWritable
|
|
21254
|
-
});
|
|
21255
|
-
}
|
|
21256
|
-
|
|
21257
|
-
return O;
|
|
21258
|
-
};
|
|
21259
|
-
|
|
21260
|
-
var ceil = Math.ceil;
|
|
21261
|
-
var floor = Math.floor; // `Math.trunc` method
|
|
21262
|
-
// https://tc39.es/ecma262/#sec-math.trunc
|
|
21263
|
-
// eslint-disable-next-line es-x/no-math-trunc -- safe
|
|
21264
|
-
|
|
21265
|
-
var mathTrunc = Math.trunc || function trunc(x) {
|
|
21266
|
-
var n = +x;
|
|
21267
|
-
return (n > 0 ? floor : ceil)(n);
|
|
21268
|
-
};
|
|
21269
|
-
|
|
21270
|
-
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
|
21271
|
-
|
|
21272
|
-
var toIntegerOrInfinity = function (argument) {
|
|
21273
|
-
var number = +argument; // eslint-disable-next-line no-self-compare -- NaN check
|
|
21274
|
-
|
|
21275
|
-
return number !== number || number === 0 ? 0 : mathTrunc(number);
|
|
21276
|
-
};
|
|
21277
|
-
|
|
21278
|
-
var max = Math.max;
|
|
21279
|
-
var min$1 = Math.min; // Helper for a popular repeating case of the spec:
|
|
21280
|
-
// Let integer be ? ToInteger(index).
|
|
21281
|
-
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
21282
|
-
|
|
21283
|
-
var toAbsoluteIndex = function (index, length) {
|
|
21284
|
-
var integer = toIntegerOrInfinity(index);
|
|
21285
|
-
return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
|
|
21286
|
-
};
|
|
21287
|
-
|
|
21288
|
-
var min = Math.min; // `ToLength` abstract operation
|
|
21289
|
-
// https://tc39.es/ecma262/#sec-tolength
|
|
21290
|
-
|
|
21291
|
-
var toLength = function (argument) {
|
|
21292
|
-
return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
21293
|
-
};
|
|
21294
|
-
|
|
21295
|
-
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
21296
|
-
|
|
21297
|
-
var lengthOfArrayLike = function (obj) {
|
|
21298
|
-
return toLength(obj.length);
|
|
21299
|
-
};
|
|
21300
|
-
|
|
21301
|
-
var createMethod = function (IS_INCLUDES) {
|
|
21302
|
-
return function ($this, el, fromIndex) {
|
|
21303
|
-
var O = toIndexedObject($this);
|
|
21304
|
-
var length = lengthOfArrayLike(O);
|
|
21305
|
-
var index = toAbsoluteIndex(fromIndex, length);
|
|
21306
|
-
var value; // Array#includes uses SameValueZero equality algorithm
|
|
21307
|
-
// eslint-disable-next-line no-self-compare -- NaN check
|
|
21308
|
-
|
|
21309
|
-
if (IS_INCLUDES && el != el) while (length > index) {
|
|
21310
|
-
value = O[index++]; // eslint-disable-next-line no-self-compare -- NaN check
|
|
21311
|
-
|
|
21312
|
-
if (value != value) return true; // Array#indexOf ignores holes, Array#includes - not
|
|
21313
|
-
} else for (; length > index; index++) {
|
|
21314
|
-
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
21315
|
-
}
|
|
21316
|
-
return !IS_INCLUDES && -1;
|
|
21317
|
-
};
|
|
21318
|
-
};
|
|
21319
|
-
|
|
21320
|
-
var arrayIncludes = {
|
|
21321
|
-
// `Array.prototype.includes` method
|
|
21322
|
-
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
21323
|
-
includes: createMethod(true),
|
|
21324
|
-
// `Array.prototype.indexOf` method
|
|
21325
|
-
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
21326
|
-
indexOf: createMethod(false)
|
|
21327
|
-
};
|
|
21328
|
-
|
|
21329
|
-
var indexOf = arrayIncludes.indexOf;
|
|
21330
|
-
var push = functionUncurryThis([].push);
|
|
21331
|
-
|
|
21332
|
-
var objectKeysInternal = function (object, names) {
|
|
21333
|
-
var O = toIndexedObject(object);
|
|
21334
|
-
var i = 0;
|
|
21335
|
-
var result = [];
|
|
21336
|
-
var key;
|
|
21337
|
-
|
|
21338
|
-
for (key in O) !hasOwnProperty_1(hiddenKeys$1, key) && hasOwnProperty_1(O, key) && push(result, key); // Don't enum bug & hidden keys
|
|
21339
|
-
|
|
21340
|
-
|
|
21341
|
-
while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) {
|
|
21342
|
-
~indexOf(result, key) || push(result, key);
|
|
21343
|
-
}
|
|
21344
|
-
|
|
21345
|
-
return result;
|
|
21346
|
-
};
|
|
21347
|
-
|
|
21348
|
-
// IE8- don't enum bug keys
|
|
21349
|
-
var enumBugKeys = ['constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf'];
|
|
21350
|
-
|
|
21351
|
-
var hiddenKeys = enumBugKeys.concat('length', 'prototype'); // `Object.getOwnPropertyNames` method
|
|
21352
|
-
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
21353
|
-
// eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
|
|
21354
|
-
|
|
21355
|
-
var f$2 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
21356
|
-
return objectKeysInternal(O, hiddenKeys);
|
|
21357
|
-
};
|
|
21358
|
-
|
|
21359
|
-
var objectGetOwnPropertyNames = {
|
|
21360
|
-
f: f$2
|
|
21361
|
-
};
|
|
21362
|
-
|
|
21363
|
-
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
|
|
21364
|
-
var f$1 = Object.getOwnPropertySymbols;
|
|
21365
|
-
var objectGetOwnPropertySymbols = {
|
|
21366
|
-
f: f$1
|
|
21367
|
-
};
|
|
21368
|
-
|
|
21369
|
-
var concat = functionUncurryThis([].concat); // all object keys, includes non-enumerable and symbols
|
|
21370
|
-
|
|
21371
|
-
var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
21372
|
-
var keys = objectGetOwnPropertyNames.f(anObject(it));
|
|
21373
|
-
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
|
|
21374
|
-
return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
|
|
21375
|
-
};
|
|
21376
|
-
|
|
21377
|
-
var copyConstructorProperties = function (target, source, exceptions) {
|
|
21378
|
-
var keys = ownKeys(source);
|
|
21379
|
-
var defineProperty = objectDefineProperty.f;
|
|
21380
|
-
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
21381
|
-
|
|
21382
|
-
for (var i = 0; i < keys.length; i++) {
|
|
21383
|
-
var key = keys[i];
|
|
21384
|
-
|
|
21385
|
-
if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) {
|
|
21386
|
-
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
21387
|
-
}
|
|
21388
|
-
}
|
|
21389
|
-
};
|
|
21390
|
-
|
|
21391
|
-
var replacement = /#|\.prototype\./;
|
|
21392
|
-
|
|
21393
|
-
var isForced = function (feature, detection) {
|
|
21394
|
-
var value = data[normalize$1(feature)];
|
|
21395
|
-
return value == POLYFILL ? true : value == NATIVE ? false : isCallable(detection) ? fails(detection) : !!detection;
|
|
21396
|
-
};
|
|
21397
|
-
|
|
21398
|
-
var normalize$1 = isForced.normalize = function (string) {
|
|
21399
|
-
return String(string).replace(replacement, '.').toLowerCase();
|
|
21400
|
-
};
|
|
21401
|
-
|
|
21402
|
-
var data = isForced.data = {};
|
|
21403
|
-
var NATIVE = isForced.NATIVE = 'N';
|
|
21404
|
-
var POLYFILL = isForced.POLYFILL = 'P';
|
|
21405
|
-
var isForced_1 = isForced;
|
|
21406
|
-
|
|
21407
|
-
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
21408
|
-
/*
|
|
21409
|
-
options.target - name of the target object
|
|
21410
|
-
options.global - target is the global object
|
|
21411
|
-
options.stat - export as static methods of target
|
|
21412
|
-
options.proto - export as prototype methods of target
|
|
21413
|
-
options.real - real prototype method for the `pure` version
|
|
21414
|
-
options.forced - export even if the native feature is available
|
|
21415
|
-
options.bind - bind methods to the target, required for the `pure` version
|
|
21416
|
-
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
|
21417
|
-
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
|
21418
|
-
options.sham - add a flag to not completely full polyfills
|
|
21419
|
-
options.enumerable - export as enumerable property
|
|
21420
|
-
options.dontCallGetSet - prevent calling a getter on target
|
|
21421
|
-
options.name - the .name of the function if it does not match the key
|
|
21422
|
-
*/
|
|
21423
|
-
|
|
21424
|
-
var _export = function (options, source) {
|
|
21425
|
-
var TARGET = options.target;
|
|
21426
|
-
var GLOBAL = options.global;
|
|
21427
|
-
var STATIC = options.stat;
|
|
21428
|
-
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
21429
|
-
|
|
21430
|
-
if (GLOBAL) {
|
|
21431
|
-
target = global$1;
|
|
21432
|
-
} else if (STATIC) {
|
|
21433
|
-
target = global$1[TARGET] || defineGlobalProperty(TARGET, {});
|
|
21434
|
-
} else {
|
|
21435
|
-
target = (global$1[TARGET] || {}).prototype;
|
|
21436
|
-
}
|
|
21437
|
-
|
|
21438
|
-
if (target) for (key in source) {
|
|
21439
|
-
sourceProperty = source[key];
|
|
21440
|
-
|
|
21441
|
-
if (options.dontCallGetSet) {
|
|
21442
|
-
descriptor = getOwnPropertyDescriptor(target, key);
|
|
21443
|
-
targetProperty = descriptor && descriptor.value;
|
|
21444
|
-
} else targetProperty = target[key];
|
|
21445
|
-
|
|
21446
|
-
FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); // contained in target
|
|
21447
|
-
|
|
21448
|
-
if (!FORCED && targetProperty !== undefined) {
|
|
21449
|
-
if (typeof sourceProperty == typeof targetProperty) continue;
|
|
21450
|
-
copyConstructorProperties(sourceProperty, targetProperty);
|
|
21451
|
-
} // add a flag to not completely full polyfills
|
|
21452
|
-
|
|
21453
|
-
|
|
21454
|
-
if (options.sham || targetProperty && targetProperty.sham) {
|
|
21455
|
-
createNonEnumerableProperty(sourceProperty, 'sham', true);
|
|
21456
|
-
}
|
|
21457
|
-
|
|
21458
|
-
defineBuiltIn(target, key, sourceProperty, options);
|
|
21459
|
-
}
|
|
21460
|
-
};
|
|
21461
|
-
|
|
21462
|
-
// https://tc39.es/ecma262/#sec-object.keys
|
|
21463
|
-
// eslint-disable-next-line es-x/no-object-keys -- safe
|
|
21464
|
-
|
|
21465
|
-
var objectKeys = Object.keys || function keys(O) {
|
|
21466
|
-
return objectKeysInternal(O, enumBugKeys);
|
|
21467
|
-
};
|
|
21468
|
-
|
|
21469
|
-
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
21470
|
-
// eslint-disable-next-line es-x/no-object-defineproperties -- safe
|
|
21471
|
-
|
|
21472
|
-
var f = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
21473
|
-
anObject(O);
|
|
21474
|
-
var props = toIndexedObject(Properties);
|
|
21475
|
-
var keys = objectKeys(Properties);
|
|
21476
|
-
var length = keys.length;
|
|
21477
|
-
var index = 0;
|
|
21478
|
-
var key;
|
|
21479
|
-
|
|
21480
|
-
while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]);
|
|
21481
|
-
|
|
21482
|
-
return O;
|
|
21483
|
-
};
|
|
21484
|
-
var objectDefineProperties = {
|
|
21485
|
-
f: f
|
|
21486
|
-
};
|
|
21487
|
-
|
|
21488
|
-
var html = getBuiltIn('document', 'documentElement');
|
|
21489
|
-
|
|
21490
|
-
/* global ActiveXObject -- old IE, WSH */
|
|
21491
|
-
var GT = '>';
|
|
21492
|
-
var LT = '<';
|
|
21493
|
-
var PROTOTYPE = 'prototype';
|
|
21494
|
-
var SCRIPT = 'script';
|
|
21495
|
-
var IE_PROTO = sharedKey('IE_PROTO');
|
|
21496
|
-
|
|
21497
|
-
var EmptyConstructor = function () {
|
|
21498
|
-
/* empty */
|
|
21499
|
-
};
|
|
21500
|
-
|
|
21501
|
-
var scriptTag = function (content) {
|
|
21502
|
-
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
|
21503
|
-
}; // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
|
21504
|
-
|
|
21505
|
-
|
|
21506
|
-
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
|
21507
|
-
activeXDocument.write(scriptTag(''));
|
|
21508
|
-
activeXDocument.close();
|
|
21509
|
-
var temp = activeXDocument.parentWindow.Object;
|
|
21510
|
-
activeXDocument = null; // avoid memory leak
|
|
21511
|
-
|
|
21512
|
-
return temp;
|
|
21513
|
-
}; // Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
21514
|
-
|
|
21515
|
-
|
|
21516
|
-
var NullProtoObjectViaIFrame = function () {
|
|
21517
|
-
// Thrash, waste and sodomy: IE GC bug
|
|
21518
|
-
var iframe = documentCreateElement('iframe');
|
|
21519
|
-
var JS = 'java' + SCRIPT + ':';
|
|
21520
|
-
var iframeDocument;
|
|
21521
|
-
iframe.style.display = 'none';
|
|
21522
|
-
html.appendChild(iframe); // https://github.com/zloirock/core-js/issues/475
|
|
21523
|
-
|
|
21524
|
-
iframe.src = String(JS);
|
|
21525
|
-
iframeDocument = iframe.contentWindow.document;
|
|
21526
|
-
iframeDocument.open();
|
|
21527
|
-
iframeDocument.write(scriptTag('document.F=Object'));
|
|
21528
|
-
iframeDocument.close();
|
|
21529
|
-
return iframeDocument.F;
|
|
21530
|
-
}; // Check for document.domain and active x support
|
|
21531
|
-
// No need to use active x approach when document.domain is not set
|
|
21532
|
-
// see https://github.com/es-shims/es5-shim/issues/150
|
|
21533
|
-
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
|
21534
|
-
// avoid IE GC bug
|
|
21535
|
-
|
|
21536
|
-
|
|
21537
|
-
var activeXDocument;
|
|
21538
|
-
|
|
21539
|
-
var NullProtoObject = function () {
|
|
21540
|
-
try {
|
|
21541
|
-
activeXDocument = new ActiveXObject('htmlfile');
|
|
21542
|
-
} catch (error) {
|
|
21543
|
-
/* ignore */
|
|
21544
|
-
}
|
|
21545
|
-
|
|
21546
|
-
NullProtoObject = typeof document != 'undefined' ? document.domain && activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
|
21547
|
-
: NullProtoObjectViaIFrame() : NullProtoObjectViaActiveX(activeXDocument); // WSH
|
|
21548
|
-
|
|
21549
|
-
var length = enumBugKeys.length;
|
|
21550
|
-
|
|
21551
|
-
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
|
21552
|
-
|
|
21553
|
-
return NullProtoObject();
|
|
21554
|
-
};
|
|
21555
|
-
|
|
21556
|
-
hiddenKeys$1[IE_PROTO] = true; // `Object.create` method
|
|
21557
|
-
// https://tc39.es/ecma262/#sec-object.create
|
|
21558
|
-
// eslint-disable-next-line es-x/no-object-create -- safe
|
|
21559
|
-
|
|
21560
|
-
var objectCreate = Object.create || function create(O, Properties) {
|
|
21561
|
-
var result;
|
|
21562
|
-
|
|
21563
|
-
if (O !== null) {
|
|
21564
|
-
EmptyConstructor[PROTOTYPE] = anObject(O);
|
|
21565
|
-
result = new EmptyConstructor();
|
|
21566
|
-
EmptyConstructor[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill
|
|
21567
|
-
|
|
21568
|
-
result[IE_PROTO] = O;
|
|
21569
|
-
} else result = NullProtoObject();
|
|
21570
|
-
|
|
21571
|
-
return Properties === undefined ? result : objectDefineProperties.f(result, Properties);
|
|
21572
|
-
};
|
|
21573
|
-
|
|
21574
|
-
var defineProperty = objectDefineProperty.f;
|
|
21575
|
-
var UNSCOPABLES = wellKnownSymbol('unscopables');
|
|
21576
|
-
var ArrayPrototype = Array.prototype; // Array.prototype[@@unscopables]
|
|
21577
|
-
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
21578
|
-
|
|
21579
|
-
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
|
21580
|
-
defineProperty(ArrayPrototype, UNSCOPABLES, {
|
|
21581
|
-
configurable: true,
|
|
21582
|
-
value: objectCreate(null)
|
|
21583
|
-
});
|
|
21584
|
-
} // add a key to Array.prototype[@@unscopables]
|
|
21585
|
-
|
|
21586
|
-
|
|
21587
|
-
var addToUnscopables = function (key) {
|
|
21588
|
-
ArrayPrototype[UNSCOPABLES][key] = true;
|
|
21589
|
-
};
|
|
21590
|
-
|
|
21591
|
-
var $includes = arrayIncludes.includes; // FF99+ bug
|
|
21592
|
-
|
|
21593
|
-
var BROKEN_ON_SPARSE = fails(function () {
|
|
21594
|
-
return !Array(1).includes();
|
|
21595
|
-
}); // `Array.prototype.includes` method
|
|
21596
|
-
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
21597
|
-
|
|
21598
|
-
_export({
|
|
21599
|
-
target: 'Array',
|
|
21600
|
-
proto: true,
|
|
21601
|
-
forced: BROKEN_ON_SPARSE
|
|
21602
|
-
}, {
|
|
21603
|
-
includes: function includes(el
|
|
21604
|
-
/* , fromIndex = 0 */
|
|
21605
|
-
) {
|
|
21606
|
-
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
|
|
21607
|
-
}
|
|
21608
|
-
}); // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
21609
|
-
|
|
21610
|
-
addToUnscopables('includes');
|
|
21611
|
-
|
|
21612
|
-
const FileFormats = {
|
|
21613
|
-
gwascatalog: {
|
|
21614
|
-
fields: ['bin', 'chr', 'start', 'end', 'name', 'pubMedID', 'author', 'pubDate', 'journal', 'title', 'trait', 'initSample', 'replSample', 'region', 'genes', 'riskAllele', 'riskAlFreq', 'pValue', 'pValueDesc', 'orOrBeta', 'ci95', 'platform', 'cnv']
|
|
21615
|
-
},
|
|
21616
|
-
wgrna: {
|
|
21617
|
-
fields: ['bin', 'chr', 'start', 'end', 'name', 'score', 'strand', 'thickStart', 'thickEnd', 'type']
|
|
21618
|
-
},
|
|
21619
|
-
cpgislandext: {
|
|
21620
|
-
fields: ['bin', 'chr', 'start', 'end', 'name', 'length', 'cpgNum', 'gcNum', 'perCpg', 'perGc', 'obsExp']
|
|
21621
|
-
},
|
|
21622
|
-
clinVarMain: {
|
|
21623
|
-
fields: ['chr1', 'start', 'end', 'name', 'score', 'strand', 'thickStart', 'thickEnd', 'reserved', 'blockCount', // Number of blocks
|
|
21624
|
-
'blockSizes', // Comma separated list of block sizes
|
|
21625
|
-
'chromStarts', // Start positions relative to chromStart
|
|
21626
|
-
'origName', // NM_198053.2(CD247):c.462C>T (p.Asp154=) ClinVar Variation Report
|
|
21627
|
-
'clinSign', // Likely benign Clinical significance
|
|
21628
|
-
'reviewStatus', // based on: criteria provided,single submitter Review Status
|
|
21629
|
-
'type', // single nucleotide variant Type of Variant
|
|
21630
|
-
'geneId', // CD247 Gene Symbol
|
|
21631
|
-
'snpId', // 181656780 dbSNP ID
|
|
21632
|
-
'nsvId', // dbVar ID
|
|
21633
|
-
'rcvAcc', // RCV000642347 ClinVar Allele Submission
|
|
21634
|
-
'testedInGtr', // N Genetic Testing Registry
|
|
21635
|
-
'phenotypeList', // Immunodeficiency due to defect in cd3-zeta Phenotypes
|
|
21636
|
-
'phenotype', // MedGen:C1857798, OMIM:610163 Phenotype identifiers
|
|
21637
|
-
'origin', // germline Data origin
|
|
21638
|
-
'assembly', // GRCh37 Genome assembly
|
|
21639
|
-
'cytogenetic', // 1q24.2 Cytogenetic status
|
|
21640
|
-
'hgvsCod', // NM_198053.2:c.462C>T Nucleotide HGVS
|
|
21641
|
-
'hgvsProt', // NP_932170.1:p.Asp154= Protein HGVS
|
|
21642
|
-
'numSubmit', // 1 Number of submitters
|
|
21643
|
-
'lastEval', // Dec 19,2017 Last evaluation
|
|
21644
|
-
'guidelines', // Guidelines
|
|
21645
|
-
'otherIds']
|
|
21646
|
-
}
|
|
21647
|
-
};
|
|
21648
|
-
|
|
21649
21047
|
/*
|
|
21650
21048
|
* The MIT License (MIT)
|
|
21651
21049
|
*
|
|
@@ -21670,360 +21068,6 @@
|
|
|
21670
21068
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21671
21069
|
* THE SOFTWARE.
|
|
21672
21070
|
*/
|
|
21673
|
-
/**
|
|
21674
|
-
* Test if the given value is a string or number. Not using typeof as it fails on boxed primitives.
|
|
21675
|
-
*
|
|
21676
|
-
* @param value
|
|
21677
|
-
* @returns boolean
|
|
21678
|
-
*/
|
|
21679
|
-
|
|
21680
|
-
|
|
21681
|
-
function isSimpleType(value) {
|
|
21682
|
-
const simpleTypes = new Set(["boolean", "number", "string", "symbol"]);
|
|
21683
|
-
const valueType = typeof value;
|
|
21684
|
-
return value !== undefined && (simpleTypes.has(valueType) || value.substring || value.toFixed);
|
|
21685
|
-
}
|
|
21686
|
-
|
|
21687
|
-
function buildOptions(config, options) {
|
|
21688
|
-
var defaultOptions = {
|
|
21689
|
-
oauthToken: config.oauthToken,
|
|
21690
|
-
headers: config.headers,
|
|
21691
|
-
withCredentials: config.withCredentials,
|
|
21692
|
-
filename: config.filename
|
|
21693
|
-
};
|
|
21694
|
-
return Object.assign(defaultOptions, options);
|
|
21695
|
-
}
|
|
21696
|
-
/**
|
|
21697
|
-
* isMobile test from http://detectmobilebrowsers.com
|
|
21698
|
-
* TODO -- improve UI design so this isn't neccessary
|
|
21699
|
-
* @returns {boolean}
|
|
21700
|
-
*/
|
|
21701
|
-
// igv.isMobile = function () {
|
|
21702
|
-
//
|
|
21703
|
-
// const a = (navigator.userAgent || navigator.vendor || window.opera);
|
|
21704
|
-
// return (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) ||
|
|
21705
|
-
// /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4)))
|
|
21706
|
-
//
|
|
21707
|
-
// }
|
|
21708
|
-
|
|
21709
|
-
|
|
21710
|
-
const doAutoscale = function (features) {
|
|
21711
|
-
var min, max;
|
|
21712
|
-
|
|
21713
|
-
if (features.length > 0) {
|
|
21714
|
-
min = Number.MAX_VALUE;
|
|
21715
|
-
max = -Number.MAX_VALUE;
|
|
21716
|
-
features.forEach(function (f) {
|
|
21717
|
-
if (!Number.isNaN(f.value)) {
|
|
21718
|
-
min = Math.min(min, f.value);
|
|
21719
|
-
max = Math.max(max, f.value);
|
|
21720
|
-
}
|
|
21721
|
-
}); // Insure we have a zero baseline
|
|
21722
|
-
|
|
21723
|
-
if (max > 0) min = Math.min(0, min);
|
|
21724
|
-
if (max < 0) max = 0;
|
|
21725
|
-
} else {
|
|
21726
|
-
// No features -- default
|
|
21727
|
-
min = 0;
|
|
21728
|
-
max = 100;
|
|
21729
|
-
}
|
|
21730
|
-
|
|
21731
|
-
return {
|
|
21732
|
-
min: min,
|
|
21733
|
-
max: max
|
|
21734
|
-
};
|
|
21735
|
-
};
|
|
21736
|
-
|
|
21737
|
-
const validateGenomicExtent = function (chromosomeLengthBP, genomicExtent, minimumBP) {
|
|
21738
|
-
let ss = genomicExtent.start;
|
|
21739
|
-
let ee = genomicExtent.end;
|
|
21740
|
-
|
|
21741
|
-
if (undefined === ee) {
|
|
21742
|
-
ss -= minimumBP / 2;
|
|
21743
|
-
ee = ss + minimumBP;
|
|
21744
|
-
|
|
21745
|
-
if (ee > chromosomeLengthBP) {
|
|
21746
|
-
ee = chromosomeLengthBP;
|
|
21747
|
-
ss = ee - minimumBP;
|
|
21748
|
-
} else if (ss < 0) {
|
|
21749
|
-
ss = 0;
|
|
21750
|
-
ee = minimumBP;
|
|
21751
|
-
}
|
|
21752
|
-
} else if (ee - ss < minimumBP) {
|
|
21753
|
-
const center = (ee + ss) / 2;
|
|
21754
|
-
|
|
21755
|
-
if (center - minimumBP / 2 < 0) {
|
|
21756
|
-
ss = 0;
|
|
21757
|
-
ee = ss + minimumBP;
|
|
21758
|
-
} else if (center + minimumBP / 2 > chromosomeLengthBP) {
|
|
21759
|
-
ee = chromosomeLengthBP;
|
|
21760
|
-
ss = ee - minimumBP;
|
|
21761
|
-
} else {
|
|
21762
|
-
ss = center - minimumBP / 2;
|
|
21763
|
-
ee = ss + minimumBP;
|
|
21764
|
-
}
|
|
21765
|
-
}
|
|
21766
|
-
|
|
21767
|
-
genomicExtent.start = Math.ceil(ss);
|
|
21768
|
-
genomicExtent.end = Math.floor(ee);
|
|
21769
|
-
};
|
|
21770
|
-
/*!
|
|
21771
|
-
* is-number <https://github.com/jonschlinkert/is-number>
|
|
21772
|
-
*
|
|
21773
|
-
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
21774
|
-
* Released under the MIT License.
|
|
21775
|
-
*/
|
|
21776
|
-
|
|
21777
|
-
|
|
21778
|
-
const isNumber = function (num) {
|
|
21779
|
-
if (typeof num === 'number') {
|
|
21780
|
-
return num - num === 0;
|
|
21781
|
-
}
|
|
21782
|
-
|
|
21783
|
-
if (typeof num === 'string' && num.trim() !== '') {
|
|
21784
|
-
return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);
|
|
21785
|
-
}
|
|
21786
|
-
|
|
21787
|
-
return false;
|
|
21788
|
-
};
|
|
21789
|
-
|
|
21790
|
-
async function getFilename(url) {
|
|
21791
|
-
if (isString$3(url) && url.startsWith("https://drive.google.com")) {
|
|
21792
|
-
// This will fail if Google API key is not defined
|
|
21793
|
-
if (getApiKey() === undefined) {
|
|
21794
|
-
throw Error("Google drive is referenced, but API key is not defined. An API key is required for Google Drive access");
|
|
21795
|
-
}
|
|
21796
|
-
|
|
21797
|
-
const json = await getDriveFileInfo(url);
|
|
21798
|
-
return json.originalFileName || json.name;
|
|
21799
|
-
} else {
|
|
21800
|
-
return getFilename$1(url);
|
|
21801
|
-
}
|
|
21802
|
-
}
|
|
21803
|
-
|
|
21804
|
-
function prettyBasePairNumber(raw) {
|
|
21805
|
-
var denom, units, value, floored;
|
|
21806
|
-
|
|
21807
|
-
if (raw > 1e7) {
|
|
21808
|
-
denom = 1e6;
|
|
21809
|
-
units = " mb";
|
|
21810
|
-
} else if (raw > 1e4) {
|
|
21811
|
-
denom = 1e3;
|
|
21812
|
-
units = " kb";
|
|
21813
|
-
value = raw / denom;
|
|
21814
|
-
floored = Math.floor(value);
|
|
21815
|
-
return numberFormatter$1(floored) + units;
|
|
21816
|
-
} else {
|
|
21817
|
-
return numberFormatter$1(raw) + " bp";
|
|
21818
|
-
}
|
|
21819
|
-
|
|
21820
|
-
value = raw / denom;
|
|
21821
|
-
floored = Math.floor(value);
|
|
21822
|
-
return floored.toString() + units;
|
|
21823
|
-
}
|
|
21824
|
-
|
|
21825
|
-
function isDataURL(obj) {
|
|
21826
|
-
return isString$3(obj) && obj.startsWith("data:");
|
|
21827
|
-
}
|
|
21828
|
-
|
|
21829
|
-
function createColumn(columnContainer, className) {
|
|
21830
|
-
const column = div$1({
|
|
21831
|
-
class: className
|
|
21832
|
-
});
|
|
21833
|
-
columnContainer.appendChild(column);
|
|
21834
|
-
}
|
|
21835
|
-
|
|
21836
|
-
function insertElementBefore(element, referenceNode) {
|
|
21837
|
-
referenceNode.parentNode.insertBefore(element, referenceNode);
|
|
21838
|
-
}
|
|
21839
|
-
|
|
21840
|
-
function insertElementAfter(element, referenceNode) {
|
|
21841
|
-
referenceNode.parentNode.insertBefore(element, referenceNode.nextSibling);
|
|
21842
|
-
}
|
|
21843
|
-
/**
|
|
21844
|
-
* Test to see if page is loaded in a secure context, that is by https or is localhost.
|
|
21845
|
-
*/
|
|
21846
|
-
|
|
21847
|
-
|
|
21848
|
-
function isSecureContext() {
|
|
21849
|
-
return window.location.protocol === "https:" || window.location.hostname === "localhost";
|
|
21850
|
-
} // reference: https://pretagteam.com/question/find-element-height-including-margin
|
|
21851
|
-
|
|
21852
|
-
|
|
21853
|
-
function getElementAbsoluteHeight(element) {
|
|
21854
|
-
// Get the DOM Node if you pass in a string
|
|
21855
|
-
element = typeof element === 'string' ? document.querySelector(element) : element;
|
|
21856
|
-
const styles = window.getComputedStyle(element);
|
|
21857
|
-
const margin = parseFloat(styles['marginTop']) + parseFloat(styles['marginBottom']);
|
|
21858
|
-
const height = element.offsetHeight;
|
|
21859
|
-
return Math.ceil(margin + height);
|
|
21860
|
-
}
|
|
21861
|
-
|
|
21862
|
-
/**
|
|
21863
|
-
* Decoder for bedpe records.
|
|
21864
|
-
*
|
|
21865
|
-
* Bedpe format was created by Aaron Quinlan et al as part of the bedtools project.
|
|
21866
|
-
* The spec is here: https://bedtools.readthedocs.io/en/latest/content/general-usage.html,
|
|
21867
|
-
*
|
|
21868
|
-
* 1 2 3 4 5 6 7 8 9 10 11-
|
|
21869
|
-
* chrom1 start1 end1 chrom2 start2 end2 name score strand1 strand2 <Any number of additional, user-defined fields>
|
|
21870
|
-
*
|
|
21871
|
-
* However there are off spec variants, an important one being a 7 column format with score in place of the standard
|
|
21872
|
-
* name column.
|
|
21873
|
-
*
|
|
21874
|
-
* A common variant is a "hiccups" output file, which is standard bedpe with the exception of a header line
|
|
21875
|
-
* of the form
|
|
21876
|
-
*
|
|
21877
|
-
* chr1 x1 x2 chr2 y1 y2 name score strand1 strand2 color observed expectedBL expectedDonut expectedH expectedV fdrBL fdrDonut fdrH fdrV
|
|
21878
|
-
*
|
|
21879
|
-
* The "hiccups" output is apparently not standardized as this is found at ENCODE, with a non-helpful "tsv" extension
|
|
21880
|
-
*
|
|
21881
|
-
* chr1 x1 x2 chr2 y1 y2 color observed expectedBL expectedDonut expectedH expectedV fdrBL fdrDonut fdrH fdrV numCollapsed centroid1 centroid2 radius
|
|
21882
|
-
* chr9 136790000 136795000 chr9 136990000 136995000 0,255,255 101.0 31.100368 38.40316 56.948116 34.040756 1.1876738E-13 1.05936405E-13 2.5148233E-4 1.7220993E-13 1 136792500 136992500 25590
|
|
21883
|
-
*
|
|
21884
|
-
* The "hiccups" documentation specfies yet another set of column headers
|
|
21885
|
-
* chromosome1 x1 x2 chromosome2 y1 y2 color observed expected_bottom_left expected_donut expected_horizontal expected_vertical fdr_bottom_left fdr_donut fdr_horizontal fdr_vertical number_collapsed centroid1 centroid2 radius
|
|
21886
|
-
*
|
|
21887
|
-
* @param tokens
|
|
21888
|
-
* @param ignore
|
|
21889
|
-
* @returns {{start1: number, end2: number, end1: number, chr1: *, chr2: *, start2: number}|undefined}
|
|
21890
|
-
*/
|
|
21891
|
-
|
|
21892
|
-
function decodeBedpe(tokens, header) {
|
|
21893
|
-
if (tokens.length < 6) {
|
|
21894
|
-
console.log("Skipping line: " + tokens.join(' '));
|
|
21895
|
-
return undefined;
|
|
21896
|
-
}
|
|
21897
|
-
|
|
21898
|
-
var feature = {
|
|
21899
|
-
chr1: tokens[0],
|
|
21900
|
-
start1: Number.parseInt(tokens[1]),
|
|
21901
|
-
end1: Number.parseInt(tokens[2]),
|
|
21902
|
-
chr2: tokens[3],
|
|
21903
|
-
start2: Number.parseInt(tokens[4]),
|
|
21904
|
-
end2: Number.parseInt(tokens[5])
|
|
21905
|
-
};
|
|
21906
|
-
|
|
21907
|
-
if (isNaN(feature.start1) || isNaN(feature.end1) || isNaN(feature.start2) || isNaN(feature.end2)) {
|
|
21908
|
-
//throw Error(`Error parsing line: ${tokens.join('\t')}`);
|
|
21909
|
-
return undefined;
|
|
21910
|
-
} // Determine if this is a "hiccups" file. Store result on "header" so it doesn't need repeated for every feature
|
|
21911
|
-
|
|
21912
|
-
|
|
21913
|
-
if (header && header.hiccups === undefined) {
|
|
21914
|
-
header.hiccups = header.columnNames ? isHiccups(header.columnNames) : false;
|
|
21915
|
-
}
|
|
21916
|
-
|
|
21917
|
-
const hiccups = header && header.hiccups;
|
|
21918
|
-
const stdColumns = hiccups ? 6 : 10;
|
|
21919
|
-
|
|
21920
|
-
if (!hiccups) {
|
|
21921
|
-
if (tokens.length > 6 && tokens[6] !== ".") {
|
|
21922
|
-
feature.name = tokens[6];
|
|
21923
|
-
}
|
|
21924
|
-
|
|
21925
|
-
if (tokens.length > 7 && tokens[7] !== ".") {
|
|
21926
|
-
feature.score = Number(tokens[7]);
|
|
21927
|
-
}
|
|
21928
|
-
|
|
21929
|
-
if (tokens.length > 8 && tokens[8] !== ".") {
|
|
21930
|
-
feature.strand1 = tokens[8];
|
|
21931
|
-
}
|
|
21932
|
-
|
|
21933
|
-
if (tokens.length > 9 && tokens[9] !== ".") {
|
|
21934
|
-
feature.strand2 = tokens[9];
|
|
21935
|
-
}
|
|
21936
|
-
} // Optional extra columns
|
|
21937
|
-
|
|
21938
|
-
|
|
21939
|
-
if (header) {
|
|
21940
|
-
const colorColumn = header.colorColumn;
|
|
21941
|
-
|
|
21942
|
-
if (colorColumn && colorColumn < tokens.length) {
|
|
21943
|
-
feature.color = IGVColor.createColorString(tokens[colorColumn]);
|
|
21944
|
-
}
|
|
21945
|
-
|
|
21946
|
-
const thicknessColumn = header.thicknessColumn;
|
|
21947
|
-
|
|
21948
|
-
if (thicknessColumn && thicknessColumn < tokens.length) {
|
|
21949
|
-
feature.thickness = tokens[thicknessColumn];
|
|
21950
|
-
}
|
|
21951
|
-
|
|
21952
|
-
if (tokens.length > stdColumns && header.columnNames && header.columnNames.length === tokens.length) {
|
|
21953
|
-
feature.extras = tokens.slice(stdColumns);
|
|
21954
|
-
}
|
|
21955
|
-
} // Set total extent of feature
|
|
21956
|
-
|
|
21957
|
-
|
|
21958
|
-
if (feature.chr1 === feature.chr2) {
|
|
21959
|
-
feature.chr = feature.chr1;
|
|
21960
|
-
feature.start = Math.min(feature.start1, feature.start2);
|
|
21961
|
-
feature.end = Math.max(feature.end1, feature.end2);
|
|
21962
|
-
}
|
|
21963
|
-
|
|
21964
|
-
return feature;
|
|
21965
|
-
}
|
|
21966
|
-
/**
|
|
21967
|
-
* Hack for non-standard bedPE formats, where numeric score can be in column 7 (name field from spec)
|
|
21968
|
-
* @param features
|
|
21969
|
-
*/
|
|
21970
|
-
|
|
21971
|
-
|
|
21972
|
-
function fixBedPE(features) {
|
|
21973
|
-
if (features.length == 0) return; // Assume all features have same properties
|
|
21974
|
-
|
|
21975
|
-
const firstFeature = features[0];
|
|
21976
|
-
|
|
21977
|
-
if (firstFeature.score === undefined && firstFeature.name !== undefined) {
|
|
21978
|
-
// Name field (col 7) is sometimes used for score.
|
|
21979
|
-
for (let f of features) {
|
|
21980
|
-
if (!(isNumber(f.name) || f.name === '.')) return;
|
|
21981
|
-
}
|
|
21982
|
-
|
|
21983
|
-
for (let f of features) {
|
|
21984
|
-
f.score = Number(f.name);
|
|
21985
|
-
delete f.name;
|
|
21986
|
-
}
|
|
21987
|
-
} // Make copies of inter-chr features, one for each chromosome
|
|
21988
|
-
|
|
21989
|
-
|
|
21990
|
-
const interChrFeatures = features.filter(f => f.chr1 !== f.chr2);
|
|
21991
|
-
|
|
21992
|
-
for (let f1 of interChrFeatures) {
|
|
21993
|
-
const f2 = Object.assign({}, f1);
|
|
21994
|
-
f2.dup = true;
|
|
21995
|
-
features.push(f2);
|
|
21996
|
-
f1.chr = f1.chr1;
|
|
21997
|
-
f1.start = f1.start1;
|
|
21998
|
-
f1.end = f1.end1;
|
|
21999
|
-
f2.chr = f2.chr2;
|
|
22000
|
-
f2.start = f2.start2;
|
|
22001
|
-
f2.end = f2.end2;
|
|
22002
|
-
}
|
|
22003
|
-
}
|
|
22004
|
-
/**
|
|
22005
|
-
* Special decoder for Hic Domain files. In these files feature1 == feature2, they are really bed records.
|
|
22006
|
-
* @param tokens
|
|
22007
|
-
* @param ignore
|
|
22008
|
-
* @returns {*}
|
|
22009
|
-
*/
|
|
22010
|
-
|
|
22011
|
-
|
|
22012
|
-
function decodeBedpeDomain(tokens, header) {
|
|
22013
|
-
if (tokens.length < 8) return undefined;
|
|
22014
|
-
return {
|
|
22015
|
-
chr: tokens[0],
|
|
22016
|
-
start: Number.parseInt(tokens[1]),
|
|
22017
|
-
end: Number.parseInt(tokens[2]),
|
|
22018
|
-
color: IGVColor.createColorString(tokens[6]),
|
|
22019
|
-
value: Number(tokens[7])
|
|
22020
|
-
};
|
|
22021
|
-
}
|
|
22022
|
-
|
|
22023
|
-
function isHiccups(columns) {
|
|
22024
|
-
return columns && (columns.includes("fdrDonut") || columns.includes("fdr_donut"));
|
|
22025
|
-
}
|
|
22026
|
-
|
|
22027
21071
|
const knownFileExtensions = new Set(["narrowpeak", "broadpeak", "regionpeak", "peaks", "bedgraph", "wig", "gff3", "gff", "gtf", "fusionjuncspan", "refflat", "seg", "aed", "bed", "vcf", "bb", "bigbed", "biginteract", "biggenepred", "bignarrowpeak", "bw", "bigwig", "bam", "tdf", "refgene", "genepred", "genepredext", "bedpe", "bp", "snp", "rmsk", "cram", "gwas", "maf", "mut", "tsv", "hiccups"]);
|
|
22028
21072
|
/**
|
|
22029
21073
|
* Return a custom format object with the given name.
|
|
@@ -22429,7 +21473,7 @@
|
|
|
22429
21473
|
seq = reverseComplementSequence(seq);
|
|
22430
21474
|
}
|
|
22431
21475
|
|
|
22432
|
-
|
|
21476
|
+
this.browser.alert.present(seq);
|
|
22433
21477
|
}
|
|
22434
21478
|
}];
|
|
22435
21479
|
|
|
@@ -22449,7 +21493,7 @@
|
|
|
22449
21493
|
await navigator.clipboard.writeText(seq);
|
|
22450
21494
|
} catch (e) {
|
|
22451
21495
|
console.error(e);
|
|
22452
|
-
|
|
21496
|
+
this.browser.alert.present(`error copying sequence to clipboard ${e}`);
|
|
22453
21497
|
}
|
|
22454
21498
|
}
|
|
22455
21499
|
});
|
|
@@ -22920,7 +21964,7 @@
|
|
|
22920
21964
|
*/
|
|
22921
21965
|
|
|
22922
21966
|
|
|
22923
|
-
function normalize(vector) {
|
|
21967
|
+
function normalize$1(vector) {
|
|
22924
21968
|
var len = Math.sqrt(vector[0] * vector[0] + vector[1] * vector[1]);
|
|
22925
21969
|
return [vector[0] / len, vector[1] / len];
|
|
22926
21970
|
}
|
|
@@ -23747,8 +22791,8 @@
|
|
|
23747
22791
|
// and connect that point to the previous point (x0, y0) by a straight line.
|
|
23748
22792
|
|
|
23749
22793
|
|
|
23750
|
-
var unit_vec_p1_p0 = normalize([x0 - x1, y0 - y1]);
|
|
23751
|
-
var unit_vec_p1_p2 = normalize([x2 - x1, y2 - y1]);
|
|
22794
|
+
var unit_vec_p1_p0 = normalize$1([x0 - x1, y0 - y1]);
|
|
22795
|
+
var unit_vec_p1_p2 = normalize$1([x2 - x1, y2 - y1]);
|
|
23752
22796
|
|
|
23753
22797
|
if (unit_vec_p1_p0[0] * unit_vec_p1_p2[1] === unit_vec_p1_p0[1] * unit_vec_p1_p2[0]) {
|
|
23754
22798
|
this.lineTo(x1, y1);
|
|
@@ -23763,7 +22807,7 @@
|
|
|
23763
22807
|
var cos = unit_vec_p1_p0[0] * unit_vec_p1_p2[0] + unit_vec_p1_p0[1] * unit_vec_p1_p2[1];
|
|
23764
22808
|
var theta = Math.acos(Math.abs(cos)); // Calculate origin
|
|
23765
22809
|
|
|
23766
|
-
var unit_vec_p1_origin = normalize([unit_vec_p1_p0[0] + unit_vec_p1_p2[0], unit_vec_p1_p0[1] + unit_vec_p1_p2[1]]);
|
|
22810
|
+
var unit_vec_p1_origin = normalize$1([unit_vec_p1_p0[0] + unit_vec_p1_p2[0], unit_vec_p1_p0[1] + unit_vec_p1_p2[1]]);
|
|
23767
22811
|
var len_p1_origin = radius / Math.sin(theta / 2);
|
|
23768
22812
|
var x = x1 + len_p1_origin * unit_vec_p1_origin[0];
|
|
23769
22813
|
var y = y1 + len_p1_origin * unit_vec_p1_origin[1]; // Calculate start angle and end angle
|
|
@@ -25124,9 +24168,9 @@
|
|
|
25124
24168
|
}
|
|
25125
24169
|
};
|
|
25126
24170
|
|
|
25127
|
-
const _version = "2.13.
|
|
24171
|
+
const _version = "2.13.2";
|
|
25128
24172
|
|
|
25129
|
-
function version() {
|
|
24173
|
+
function version$1() {
|
|
25130
24174
|
return _version;
|
|
25131
24175
|
}
|
|
25132
24176
|
|
|
@@ -25182,7 +24226,7 @@
|
|
|
25182
24226
|
|
|
25183
24227
|
if (config.loadDefaultGenomes !== false) {
|
|
25184
24228
|
try {
|
|
25185
|
-
const url = DEFAULT_GENOMES_URL + `?randomSeed=${Math.random().toString(36)}&version=${version()}`; // prevent caching
|
|
24229
|
+
const url = DEFAULT_GENOMES_URL + `?randomSeed=${Math.random().toString(36)}&version=${version$1()}`; // prevent caching
|
|
25186
24230
|
|
|
25187
24231
|
const jsonArray = await igvxhr.loadJson(url, {
|
|
25188
24232
|
timeout: 5000
|
|
@@ -25192,7 +24236,7 @@
|
|
|
25192
24236
|
console.error(e);
|
|
25193
24237
|
|
|
25194
24238
|
try {
|
|
25195
|
-
const url = BACKUP_GENOMES_URL + `?randomSeed=${Math.random().toString(36)}&version=${version()}`; // prevent caching
|
|
24239
|
+
const url = BACKUP_GENOMES_URL + `?randomSeed=${Math.random().toString(36)}&version=${version$1()}`; // prevent caching
|
|
25196
24240
|
|
|
25197
24241
|
const jsonArray = await igvxhr.loadJson(url, {});
|
|
25198
24242
|
processJson(jsonArray);
|
|
@@ -25229,7 +24273,7 @@
|
|
|
25229
24273
|
return 'all' === chr.toLowerCase();
|
|
25230
24274
|
},
|
|
25231
24275
|
// Expand a genome id to a reference object, if needed
|
|
25232
|
-
expandReference: function (idOrConfig) {
|
|
24276
|
+
expandReference: function (alert, idOrConfig) {
|
|
25233
24277
|
// idOrConfig might be json
|
|
25234
24278
|
if (isString$3(idOrConfig) && idOrConfig.startsWith("{")) {
|
|
25235
24279
|
try {
|
|
@@ -25254,7 +24298,7 @@
|
|
|
25254
24298
|
const reference = knownGenomes[genomeID];
|
|
25255
24299
|
|
|
25256
24300
|
if (!reference) {
|
|
25257
|
-
|
|
24301
|
+
alert.present(new Error(`Unknown genome id: ${genomeID}`), undefined);
|
|
25258
24302
|
}
|
|
25259
24303
|
|
|
25260
24304
|
return reference;
|
|
@@ -25770,7 +24814,7 @@
|
|
|
25770
24814
|
// Track might have been removed during load
|
|
25771
24815
|
if (this.trackView && this.trackView.disposed !== true) {
|
|
25772
24816
|
this.showMessage(NOT_LOADED_MESSAGE);
|
|
25773
|
-
|
|
24817
|
+
this.browser.alert.present(error);
|
|
25774
24818
|
console.error(error);
|
|
25775
24819
|
}
|
|
25776
24820
|
} finally {
|
|
@@ -32328,6 +31372,32 @@
|
|
|
32328
31372
|
|
|
32329
31373
|
}
|
|
32330
31374
|
|
|
31375
|
+
/*
|
|
31376
|
+
* The MIT License (MIT)
|
|
31377
|
+
*
|
|
31378
|
+
* Copyright (c) 2016-2017 The Regents of the University of California
|
|
31379
|
+
* Author: Jim Robinson
|
|
31380
|
+
*
|
|
31381
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
31382
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
31383
|
+
* in the Software without restriction, including without limitation the rights
|
|
31384
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
31385
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
31386
|
+
* furnished to do so, subject to the following conditions:
|
|
31387
|
+
*
|
|
31388
|
+
* The above copyright notice and this permission notice shall be included in
|
|
31389
|
+
* all copies or substantial portions of the Software.
|
|
31390
|
+
*
|
|
31391
|
+
*
|
|
31392
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
31393
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
31394
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
31395
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
31396
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
31397
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
31398
|
+
* THE SOFTWARE.
|
|
31399
|
+
*/
|
|
31400
|
+
|
|
32331
31401
|
class HtsgetReader {
|
|
32332
31402
|
constructor(config, genome) {
|
|
32333
31403
|
this.config = config;
|
|
@@ -33969,6 +33039,562 @@
|
|
|
33969
33039
|
|
|
33970
33040
|
}
|
|
33971
33041
|
|
|
33042
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
33043
|
+
|
|
33044
|
+
function createCommonjsModule(fn) {
|
|
33045
|
+
var module = { exports: {} };
|
|
33046
|
+
return fn(module, module.exports), module.exports;
|
|
33047
|
+
}
|
|
33048
|
+
|
|
33049
|
+
var check = function (it) {
|
|
33050
|
+
return it && it.Math == Math && it;
|
|
33051
|
+
}; // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
33052
|
+
|
|
33053
|
+
|
|
33054
|
+
var global$1 = // eslint-disable-next-line es-x/no-global-this -- safe
|
|
33055
|
+
check(typeof globalThis == 'object' && globalThis) || check(typeof window == 'object' && window) || // eslint-disable-next-line no-restricted-globals -- safe
|
|
33056
|
+
check(typeof self == 'object' && self) || check(typeof commonjsGlobal == 'object' && commonjsGlobal) || // eslint-disable-next-line no-new-func -- fallback
|
|
33057
|
+
function () {
|
|
33058
|
+
return this;
|
|
33059
|
+
}() || Function('return this')();
|
|
33060
|
+
|
|
33061
|
+
var fails = function (exec) {
|
|
33062
|
+
try {
|
|
33063
|
+
return !!exec();
|
|
33064
|
+
} catch (error) {
|
|
33065
|
+
return true;
|
|
33066
|
+
}
|
|
33067
|
+
};
|
|
33068
|
+
|
|
33069
|
+
var descriptors = !fails(function () {
|
|
33070
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
33071
|
+
return Object.defineProperty({}, 1, {
|
|
33072
|
+
get: function () {
|
|
33073
|
+
return 7;
|
|
33074
|
+
}
|
|
33075
|
+
})[1] != 7;
|
|
33076
|
+
});
|
|
33077
|
+
|
|
33078
|
+
// `IsCallable` abstract operation
|
|
33079
|
+
// https://tc39.es/ecma262/#sec-iscallable
|
|
33080
|
+
var isCallable = function (argument) {
|
|
33081
|
+
return typeof argument == 'function';
|
|
33082
|
+
};
|
|
33083
|
+
|
|
33084
|
+
var functionBindNative = !fails(function () {
|
|
33085
|
+
// eslint-disable-next-line es-x/no-function-prototype-bind -- safe
|
|
33086
|
+
var test = function () {
|
|
33087
|
+
/* empty */
|
|
33088
|
+
}.bind(); // eslint-disable-next-line no-prototype-builtins -- safe
|
|
33089
|
+
|
|
33090
|
+
|
|
33091
|
+
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
33092
|
+
});
|
|
33093
|
+
|
|
33094
|
+
var FunctionPrototype$2 = Function.prototype;
|
|
33095
|
+
var bind$1 = FunctionPrototype$2.bind;
|
|
33096
|
+
var call$2 = FunctionPrototype$2.call;
|
|
33097
|
+
var uncurryThis = functionBindNative && bind$1.bind(call$2, call$2);
|
|
33098
|
+
var functionUncurryThis = functionBindNative ? function (fn) {
|
|
33099
|
+
return fn && uncurryThis(fn);
|
|
33100
|
+
} : function (fn) {
|
|
33101
|
+
return fn && function () {
|
|
33102
|
+
return call$2.apply(fn, arguments);
|
|
33103
|
+
};
|
|
33104
|
+
};
|
|
33105
|
+
|
|
33106
|
+
// we can't use just `it == null` since of `document.all` special case
|
|
33107
|
+
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
|
|
33108
|
+
var isNullOrUndefined = function (it) {
|
|
33109
|
+
return it === null || it === undefined;
|
|
33110
|
+
};
|
|
33111
|
+
|
|
33112
|
+
var $TypeError$6 = TypeError; // `RequireObjectCoercible` abstract operation
|
|
33113
|
+
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
33114
|
+
|
|
33115
|
+
var requireObjectCoercible = function (it) {
|
|
33116
|
+
if (isNullOrUndefined(it)) throw $TypeError$6("Can't call method on " + it);
|
|
33117
|
+
return it;
|
|
33118
|
+
};
|
|
33119
|
+
|
|
33120
|
+
var $Object$2 = Object; // `ToObject` abstract operation
|
|
33121
|
+
// https://tc39.es/ecma262/#sec-toobject
|
|
33122
|
+
|
|
33123
|
+
var toObject = function (argument) {
|
|
33124
|
+
return $Object$2(requireObjectCoercible(argument));
|
|
33125
|
+
};
|
|
33126
|
+
|
|
33127
|
+
var hasOwnProperty = functionUncurryThis({}.hasOwnProperty); // `HasOwnProperty` abstract operation
|
|
33128
|
+
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
33129
|
+
// eslint-disable-next-line es-x/no-object-hasown -- safe
|
|
33130
|
+
|
|
33131
|
+
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
33132
|
+
return hasOwnProperty(toObject(it), key);
|
|
33133
|
+
};
|
|
33134
|
+
|
|
33135
|
+
var FunctionPrototype$1 = Function.prototype; // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
33136
|
+
|
|
33137
|
+
var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
|
|
33138
|
+
var EXISTS$1 = hasOwnProperty_1(FunctionPrototype$1, 'name'); // additional protection from minified / mangled / dropped function names
|
|
33139
|
+
|
|
33140
|
+
var PROPER = EXISTS$1 && function something() {
|
|
33141
|
+
/* empty */
|
|
33142
|
+
}.name === 'something';
|
|
33143
|
+
|
|
33144
|
+
var CONFIGURABLE$1 = EXISTS$1 && (!descriptors || descriptors && getDescriptor(FunctionPrototype$1, 'name').configurable);
|
|
33145
|
+
var functionName = {
|
|
33146
|
+
EXISTS: EXISTS$1,
|
|
33147
|
+
PROPER: PROPER,
|
|
33148
|
+
CONFIGURABLE: CONFIGURABLE$1
|
|
33149
|
+
};
|
|
33150
|
+
|
|
33151
|
+
var defineProperty = Object.defineProperty;
|
|
33152
|
+
|
|
33153
|
+
var defineGlobalProperty = function (key, value) {
|
|
33154
|
+
try {
|
|
33155
|
+
defineProperty(global$1, key, {
|
|
33156
|
+
value: value,
|
|
33157
|
+
configurable: true,
|
|
33158
|
+
writable: true
|
|
33159
|
+
});
|
|
33160
|
+
} catch (error) {
|
|
33161
|
+
global$1[key] = value;
|
|
33162
|
+
}
|
|
33163
|
+
|
|
33164
|
+
return value;
|
|
33165
|
+
};
|
|
33166
|
+
|
|
33167
|
+
var SHARED = '__core-js_shared__';
|
|
33168
|
+
var store$1 = global$1[SHARED] || defineGlobalProperty(SHARED, {});
|
|
33169
|
+
var sharedStore = store$1;
|
|
33170
|
+
|
|
33171
|
+
var functionToString = functionUncurryThis(Function.toString); // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
33172
|
+
|
|
33173
|
+
if (!isCallable(sharedStore.inspectSource)) {
|
|
33174
|
+
sharedStore.inspectSource = function (it) {
|
|
33175
|
+
return functionToString(it);
|
|
33176
|
+
};
|
|
33177
|
+
}
|
|
33178
|
+
|
|
33179
|
+
var inspectSource = sharedStore.inspectSource;
|
|
33180
|
+
|
|
33181
|
+
var WeakMap$1 = global$1.WeakMap;
|
|
33182
|
+
var weakMapBasicDetection = isCallable(WeakMap$1) && /native code/.test(String(WeakMap$1));
|
|
33183
|
+
|
|
33184
|
+
var documentAll = typeof document == 'object' && document.all; // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
33185
|
+
|
|
33186
|
+
var SPECIAL_DOCUMENT_ALL = typeof documentAll == 'undefined' && documentAll !== undefined;
|
|
33187
|
+
var isObject = SPECIAL_DOCUMENT_ALL ? function (it) {
|
|
33188
|
+
return typeof it == 'object' ? it !== null : isCallable(it) || it === documentAll;
|
|
33189
|
+
} : function (it) {
|
|
33190
|
+
return typeof it == 'object' ? it !== null : isCallable(it);
|
|
33191
|
+
};
|
|
33192
|
+
|
|
33193
|
+
var document$1 = global$1.document; // typeof document.createElement is 'object' in old IE
|
|
33194
|
+
|
|
33195
|
+
var EXISTS = isObject(document$1) && isObject(document$1.createElement);
|
|
33196
|
+
|
|
33197
|
+
var documentCreateElement = function (it) {
|
|
33198
|
+
return EXISTS ? document$1.createElement(it) : {};
|
|
33199
|
+
};
|
|
33200
|
+
|
|
33201
|
+
var ie8DomDefine = !descriptors && !fails(function () {
|
|
33202
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
33203
|
+
return Object.defineProperty(documentCreateElement('div'), 'a', {
|
|
33204
|
+
get: function () {
|
|
33205
|
+
return 7;
|
|
33206
|
+
}
|
|
33207
|
+
}).a != 7;
|
|
33208
|
+
});
|
|
33209
|
+
|
|
33210
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
33211
|
+
|
|
33212
|
+
var v8PrototypeDefineBug = descriptors && fails(function () {
|
|
33213
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
33214
|
+
return Object.defineProperty(function () {
|
|
33215
|
+
/* empty */
|
|
33216
|
+
}, 'prototype', {
|
|
33217
|
+
value: 42,
|
|
33218
|
+
writable: false
|
|
33219
|
+
}).prototype != 42;
|
|
33220
|
+
});
|
|
33221
|
+
|
|
33222
|
+
var $String$1 = String;
|
|
33223
|
+
var $TypeError$5 = TypeError; // `Assert: Type(argument) is Object`
|
|
33224
|
+
|
|
33225
|
+
var anObject = function (argument) {
|
|
33226
|
+
if (isObject(argument)) return argument;
|
|
33227
|
+
throw $TypeError$5($String$1(argument) + ' is not an object');
|
|
33228
|
+
};
|
|
33229
|
+
|
|
33230
|
+
var call$1 = Function.prototype.call;
|
|
33231
|
+
var functionCall = functionBindNative ? call$1.bind(call$1) : function () {
|
|
33232
|
+
return call$1.apply(call$1, arguments);
|
|
33233
|
+
};
|
|
33234
|
+
|
|
33235
|
+
var aFunction = function (argument) {
|
|
33236
|
+
return isCallable(argument) ? argument : undefined;
|
|
33237
|
+
};
|
|
33238
|
+
|
|
33239
|
+
var getBuiltIn = function (namespace, method) {
|
|
33240
|
+
return arguments.length < 2 ? aFunction(global$1[namespace]) : global$1[namespace] && global$1[namespace][method];
|
|
33241
|
+
};
|
|
33242
|
+
|
|
33243
|
+
var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
|
|
33244
|
+
|
|
33245
|
+
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
|
|
33246
|
+
|
|
33247
|
+
var process$2 = global$1.process;
|
|
33248
|
+
var Deno = global$1.Deno;
|
|
33249
|
+
var versions = process$2 && process$2.versions || Deno && Deno.version;
|
|
33250
|
+
var v8 = versions && versions.v8;
|
|
33251
|
+
var match, version;
|
|
33252
|
+
|
|
33253
|
+
if (v8) {
|
|
33254
|
+
match = v8.split('.'); // in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
|
33255
|
+
// but their correct versions are not interesting for us
|
|
33256
|
+
|
|
33257
|
+
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
|
33258
|
+
} // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
|
33259
|
+
// so check `userAgent` even if `.v8` exists, but 0
|
|
33260
|
+
|
|
33261
|
+
|
|
33262
|
+
if (!version && engineUserAgent) {
|
|
33263
|
+
match = engineUserAgent.match(/Edge\/(\d+)/);
|
|
33264
|
+
|
|
33265
|
+
if (!match || match[1] >= 74) {
|
|
33266
|
+
match = engineUserAgent.match(/Chrome\/(\d+)/);
|
|
33267
|
+
if (match) version = +match[1];
|
|
33268
|
+
}
|
|
33269
|
+
}
|
|
33270
|
+
|
|
33271
|
+
var engineV8Version = version;
|
|
33272
|
+
|
|
33273
|
+
/* eslint-disable es-x/no-symbol -- required for testing */
|
|
33274
|
+
|
|
33275
|
+
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails(function () {
|
|
33276
|
+
var symbol = Symbol(); // Chrome 38 Symbol has incorrect toString conversion
|
|
33277
|
+
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
33278
|
+
|
|
33279
|
+
return !String(symbol) || !(Object(symbol) instanceof Symbol) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
33280
|
+
!Symbol.sham && engineV8Version && engineV8Version < 41;
|
|
33281
|
+
});
|
|
33282
|
+
|
|
33283
|
+
/* eslint-disable es-x/no-symbol -- required for testing */
|
|
33284
|
+
var useSymbolAsUid = symbolConstructorDetection && !Symbol.sham && typeof Symbol.iterator == 'symbol';
|
|
33285
|
+
|
|
33286
|
+
var $Object$1 = Object;
|
|
33287
|
+
var isSymbol = useSymbolAsUid ? function (it) {
|
|
33288
|
+
return typeof it == 'symbol';
|
|
33289
|
+
} : function (it) {
|
|
33290
|
+
var $Symbol = getBuiltIn('Symbol');
|
|
33291
|
+
return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, $Object$1(it));
|
|
33292
|
+
};
|
|
33293
|
+
|
|
33294
|
+
var $String = String;
|
|
33295
|
+
|
|
33296
|
+
var tryToString = function (argument) {
|
|
33297
|
+
try {
|
|
33298
|
+
return $String(argument);
|
|
33299
|
+
} catch (error) {
|
|
33300
|
+
return 'Object';
|
|
33301
|
+
}
|
|
33302
|
+
};
|
|
33303
|
+
|
|
33304
|
+
var $TypeError$4 = TypeError; // `Assert: IsCallable(argument) is true`
|
|
33305
|
+
|
|
33306
|
+
var aCallable = function (argument) {
|
|
33307
|
+
if (isCallable(argument)) return argument;
|
|
33308
|
+
throw $TypeError$4(tryToString(argument) + ' is not a function');
|
|
33309
|
+
};
|
|
33310
|
+
|
|
33311
|
+
// https://tc39.es/ecma262/#sec-getmethod
|
|
33312
|
+
|
|
33313
|
+
var getMethod = function (V, P) {
|
|
33314
|
+
var func = V[P];
|
|
33315
|
+
return isNullOrUndefined(func) ? undefined : aCallable(func);
|
|
33316
|
+
};
|
|
33317
|
+
|
|
33318
|
+
var $TypeError$3 = TypeError; // `OrdinaryToPrimitive` abstract operation
|
|
33319
|
+
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
33320
|
+
|
|
33321
|
+
var ordinaryToPrimitive = function (input, pref) {
|
|
33322
|
+
var fn, val;
|
|
33323
|
+
if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
|
|
33324
|
+
if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val;
|
|
33325
|
+
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
|
|
33326
|
+
throw $TypeError$3("Can't convert object to primitive value");
|
|
33327
|
+
};
|
|
33328
|
+
|
|
33329
|
+
var shared = createCommonjsModule(function (module) {
|
|
33330
|
+
(module.exports = function (key, value) {
|
|
33331
|
+
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
33332
|
+
})('versions', []).push({
|
|
33333
|
+
version: '3.25.1',
|
|
33334
|
+
mode: 'global',
|
|
33335
|
+
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
33336
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.25.1/LICENSE',
|
|
33337
|
+
source: 'https://github.com/zloirock/core-js'
|
|
33338
|
+
});
|
|
33339
|
+
});
|
|
33340
|
+
|
|
33341
|
+
var id = 0;
|
|
33342
|
+
var postfix = Math.random();
|
|
33343
|
+
var toString$1 = functionUncurryThis(1.0.toString);
|
|
33344
|
+
|
|
33345
|
+
var uid = function (key) {
|
|
33346
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$1(++id + postfix, 36);
|
|
33347
|
+
};
|
|
33348
|
+
|
|
33349
|
+
var WellKnownSymbolsStore = shared('wks');
|
|
33350
|
+
var Symbol$1 = global$1.Symbol;
|
|
33351
|
+
var symbolFor = Symbol$1 && Symbol$1['for'];
|
|
33352
|
+
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
|
|
33353
|
+
|
|
33354
|
+
var wellKnownSymbol = function (name) {
|
|
33355
|
+
if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(symbolConstructorDetection || typeof WellKnownSymbolsStore[name] == 'string')) {
|
|
33356
|
+
var description = 'Symbol.' + name;
|
|
33357
|
+
|
|
33358
|
+
if (symbolConstructorDetection && hasOwnProperty_1(Symbol$1, name)) {
|
|
33359
|
+
WellKnownSymbolsStore[name] = Symbol$1[name];
|
|
33360
|
+
} else if (useSymbolAsUid && symbolFor) {
|
|
33361
|
+
WellKnownSymbolsStore[name] = symbolFor(description);
|
|
33362
|
+
} else {
|
|
33363
|
+
WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
|
|
33364
|
+
}
|
|
33365
|
+
}
|
|
33366
|
+
|
|
33367
|
+
return WellKnownSymbolsStore[name];
|
|
33368
|
+
};
|
|
33369
|
+
|
|
33370
|
+
var $TypeError$2 = TypeError;
|
|
33371
|
+
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); // `ToPrimitive` abstract operation
|
|
33372
|
+
// https://tc39.es/ecma262/#sec-toprimitive
|
|
33373
|
+
|
|
33374
|
+
var toPrimitive = function (input, pref) {
|
|
33375
|
+
if (!isObject(input) || isSymbol(input)) return input;
|
|
33376
|
+
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
|
|
33377
|
+
var result;
|
|
33378
|
+
|
|
33379
|
+
if (exoticToPrim) {
|
|
33380
|
+
if (pref === undefined) pref = 'default';
|
|
33381
|
+
result = functionCall(exoticToPrim, input, pref);
|
|
33382
|
+
if (!isObject(result) || isSymbol(result)) return result;
|
|
33383
|
+
throw $TypeError$2("Can't convert object to primitive value");
|
|
33384
|
+
}
|
|
33385
|
+
|
|
33386
|
+
if (pref === undefined) pref = 'number';
|
|
33387
|
+
return ordinaryToPrimitive(input, pref);
|
|
33388
|
+
};
|
|
33389
|
+
|
|
33390
|
+
// https://tc39.es/ecma262/#sec-topropertykey
|
|
33391
|
+
|
|
33392
|
+
var toPropertyKey = function (argument) {
|
|
33393
|
+
var key = toPrimitive(argument, 'string');
|
|
33394
|
+
return isSymbol(key) ? key : key + '';
|
|
33395
|
+
};
|
|
33396
|
+
|
|
33397
|
+
var $TypeError$1 = TypeError; // eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
33398
|
+
|
|
33399
|
+
var $defineProperty = Object.defineProperty; // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
33400
|
+
|
|
33401
|
+
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
33402
|
+
var ENUMERABLE = 'enumerable';
|
|
33403
|
+
var CONFIGURABLE = 'configurable';
|
|
33404
|
+
var WRITABLE = 'writable'; // `Object.defineProperty` method
|
|
33405
|
+
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
33406
|
+
|
|
33407
|
+
var f$4 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Attributes) {
|
|
33408
|
+
anObject(O);
|
|
33409
|
+
P = toPropertyKey(P);
|
|
33410
|
+
anObject(Attributes);
|
|
33411
|
+
|
|
33412
|
+
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
33413
|
+
var current = $getOwnPropertyDescriptor$1(O, P);
|
|
33414
|
+
|
|
33415
|
+
if (current && current[WRITABLE]) {
|
|
33416
|
+
O[P] = Attributes.value;
|
|
33417
|
+
Attributes = {
|
|
33418
|
+
configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
|
|
33419
|
+
enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
|
|
33420
|
+
writable: false
|
|
33421
|
+
};
|
|
33422
|
+
}
|
|
33423
|
+
}
|
|
33424
|
+
|
|
33425
|
+
return $defineProperty(O, P, Attributes);
|
|
33426
|
+
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
33427
|
+
anObject(O);
|
|
33428
|
+
P = toPropertyKey(P);
|
|
33429
|
+
anObject(Attributes);
|
|
33430
|
+
if (ie8DomDefine) try {
|
|
33431
|
+
return $defineProperty(O, P, Attributes);
|
|
33432
|
+
} catch (error) {
|
|
33433
|
+
/* empty */
|
|
33434
|
+
}
|
|
33435
|
+
if ('get' in Attributes || 'set' in Attributes) throw $TypeError$1('Accessors not supported');
|
|
33436
|
+
if ('value' in Attributes) O[P] = Attributes.value;
|
|
33437
|
+
return O;
|
|
33438
|
+
};
|
|
33439
|
+
var objectDefineProperty = {
|
|
33440
|
+
f: f$4
|
|
33441
|
+
};
|
|
33442
|
+
|
|
33443
|
+
var createPropertyDescriptor = function (bitmap, value) {
|
|
33444
|
+
return {
|
|
33445
|
+
enumerable: !(bitmap & 1),
|
|
33446
|
+
configurable: !(bitmap & 2),
|
|
33447
|
+
writable: !(bitmap & 4),
|
|
33448
|
+
value: value
|
|
33449
|
+
};
|
|
33450
|
+
};
|
|
33451
|
+
|
|
33452
|
+
var createNonEnumerableProperty = descriptors ? function (object, key, value) {
|
|
33453
|
+
return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
|
|
33454
|
+
} : function (object, key, value) {
|
|
33455
|
+
object[key] = value;
|
|
33456
|
+
return object;
|
|
33457
|
+
};
|
|
33458
|
+
|
|
33459
|
+
var keys = shared('keys');
|
|
33460
|
+
|
|
33461
|
+
var sharedKey = function (key) {
|
|
33462
|
+
return keys[key] || (keys[key] = uid(key));
|
|
33463
|
+
};
|
|
33464
|
+
|
|
33465
|
+
var hiddenKeys$1 = {};
|
|
33466
|
+
|
|
33467
|
+
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
33468
|
+
var TypeError$1 = global$1.TypeError;
|
|
33469
|
+
var WeakMap = global$1.WeakMap;
|
|
33470
|
+
var set$1, get, has;
|
|
33471
|
+
|
|
33472
|
+
var enforce = function (it) {
|
|
33473
|
+
return has(it) ? get(it) : set$1(it, {});
|
|
33474
|
+
};
|
|
33475
|
+
|
|
33476
|
+
var getterFor = function (TYPE) {
|
|
33477
|
+
return function (it) {
|
|
33478
|
+
var state;
|
|
33479
|
+
|
|
33480
|
+
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
|
33481
|
+
throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
|
|
33482
|
+
}
|
|
33483
|
+
|
|
33484
|
+
return state;
|
|
33485
|
+
};
|
|
33486
|
+
};
|
|
33487
|
+
|
|
33488
|
+
if (weakMapBasicDetection || sharedStore.state) {
|
|
33489
|
+
var store = sharedStore.state || (sharedStore.state = new WeakMap());
|
|
33490
|
+
var wmget = functionUncurryThis(store.get);
|
|
33491
|
+
var wmhas = functionUncurryThis(store.has);
|
|
33492
|
+
var wmset = functionUncurryThis(store.set);
|
|
33493
|
+
|
|
33494
|
+
set$1 = function (it, metadata) {
|
|
33495
|
+
if (wmhas(store, it)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
33496
|
+
metadata.facade = it;
|
|
33497
|
+
wmset(store, it, metadata);
|
|
33498
|
+
return metadata;
|
|
33499
|
+
};
|
|
33500
|
+
|
|
33501
|
+
get = function (it) {
|
|
33502
|
+
return wmget(store, it) || {};
|
|
33503
|
+
};
|
|
33504
|
+
|
|
33505
|
+
has = function (it) {
|
|
33506
|
+
return wmhas(store, it);
|
|
33507
|
+
};
|
|
33508
|
+
} else {
|
|
33509
|
+
var STATE = sharedKey('state');
|
|
33510
|
+
hiddenKeys$1[STATE] = true;
|
|
33511
|
+
|
|
33512
|
+
set$1 = function (it, metadata) {
|
|
33513
|
+
if (hasOwnProperty_1(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
33514
|
+
metadata.facade = it;
|
|
33515
|
+
createNonEnumerableProperty(it, STATE, metadata);
|
|
33516
|
+
return metadata;
|
|
33517
|
+
};
|
|
33518
|
+
|
|
33519
|
+
get = function (it) {
|
|
33520
|
+
return hasOwnProperty_1(it, STATE) ? it[STATE] : {};
|
|
33521
|
+
};
|
|
33522
|
+
|
|
33523
|
+
has = function (it) {
|
|
33524
|
+
return hasOwnProperty_1(it, STATE);
|
|
33525
|
+
};
|
|
33526
|
+
}
|
|
33527
|
+
|
|
33528
|
+
var internalState = {
|
|
33529
|
+
set: set$1,
|
|
33530
|
+
get: get,
|
|
33531
|
+
has: has,
|
|
33532
|
+
enforce: enforce,
|
|
33533
|
+
getterFor: getterFor
|
|
33534
|
+
};
|
|
33535
|
+
|
|
33536
|
+
var makeBuiltIn_1 = createCommonjsModule(function (module) {
|
|
33537
|
+
var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
|
|
33538
|
+
var enforceInternalState = internalState.enforce;
|
|
33539
|
+
var getInternalState = internalState.get; // eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
33540
|
+
|
|
33541
|
+
var defineProperty = Object.defineProperty;
|
|
33542
|
+
var CONFIGURABLE_LENGTH = descriptors && !fails(function () {
|
|
33543
|
+
return defineProperty(function () {
|
|
33544
|
+
/* empty */
|
|
33545
|
+
}, 'length', {
|
|
33546
|
+
value: 8
|
|
33547
|
+
}).length !== 8;
|
|
33548
|
+
});
|
|
33549
|
+
var TEMPLATE = String(String).split('String');
|
|
33550
|
+
|
|
33551
|
+
var makeBuiltIn = module.exports = function (value, name, options) {
|
|
33552
|
+
if (String(name).slice(0, 7) === 'Symbol(') {
|
|
33553
|
+
name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
33554
|
+
}
|
|
33555
|
+
|
|
33556
|
+
if (options && options.getter) name = 'get ' + name;
|
|
33557
|
+
if (options && options.setter) name = 'set ' + name;
|
|
33558
|
+
|
|
33559
|
+
if (!hasOwnProperty_1(value, 'name') || CONFIGURABLE_FUNCTION_NAME && value.name !== name) {
|
|
33560
|
+
if (descriptors) defineProperty(value, 'name', {
|
|
33561
|
+
value: name,
|
|
33562
|
+
configurable: true
|
|
33563
|
+
});else value.name = name;
|
|
33564
|
+
}
|
|
33565
|
+
|
|
33566
|
+
if (CONFIGURABLE_LENGTH && options && hasOwnProperty_1(options, 'arity') && value.length !== options.arity) {
|
|
33567
|
+
defineProperty(value, 'length', {
|
|
33568
|
+
value: options.arity
|
|
33569
|
+
});
|
|
33570
|
+
}
|
|
33571
|
+
|
|
33572
|
+
try {
|
|
33573
|
+
if (options && hasOwnProperty_1(options, 'constructor') && options.constructor) {
|
|
33574
|
+
if (descriptors) defineProperty(value, 'prototype', {
|
|
33575
|
+
writable: false
|
|
33576
|
+
}); // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
|
|
33577
|
+
} else if (value.prototype) value.prototype = undefined;
|
|
33578
|
+
} catch (error) {
|
|
33579
|
+
/* empty */
|
|
33580
|
+
}
|
|
33581
|
+
|
|
33582
|
+
var state = enforceInternalState(value);
|
|
33583
|
+
|
|
33584
|
+
if (!hasOwnProperty_1(state, 'source')) {
|
|
33585
|
+
state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
|
|
33586
|
+
}
|
|
33587
|
+
|
|
33588
|
+
return value;
|
|
33589
|
+
}; // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
33590
|
+
// eslint-disable-next-line no-extend-native -- required
|
|
33591
|
+
|
|
33592
|
+
|
|
33593
|
+
Function.prototype.toString = makeBuiltIn(function toString() {
|
|
33594
|
+
return isCallable(this) && getInternalState(this).source || inspectSource(this);
|
|
33595
|
+
}, 'toString');
|
|
33596
|
+
});
|
|
33597
|
+
|
|
33972
33598
|
var defineBuiltInAccessor = function (target, name, descriptor) {
|
|
33973
33599
|
if (descriptor.get) makeBuiltIn_1(descriptor.get, name, {
|
|
33974
33600
|
getter: true
|
|
@@ -38117,6 +37743,290 @@
|
|
|
38117
37743
|
|
|
38118
37744
|
}
|
|
38119
37745
|
|
|
37746
|
+
var $propertyIsEnumerable = {}.propertyIsEnumerable; // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
37747
|
+
|
|
37748
|
+
var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor; // Nashorn ~ JDK8 bug
|
|
37749
|
+
|
|
37750
|
+
var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({
|
|
37751
|
+
1: 2
|
|
37752
|
+
}, 1); // `Object.prototype.propertyIsEnumerable` method implementation
|
|
37753
|
+
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
37754
|
+
|
|
37755
|
+
var f$3 = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
37756
|
+
var descriptor = getOwnPropertyDescriptor$1(this, V);
|
|
37757
|
+
return !!descriptor && descriptor.enumerable;
|
|
37758
|
+
} : $propertyIsEnumerable;
|
|
37759
|
+
var objectPropertyIsEnumerable = {
|
|
37760
|
+
f: f$3
|
|
37761
|
+
};
|
|
37762
|
+
|
|
37763
|
+
var toString = functionUncurryThis({}.toString);
|
|
37764
|
+
var stringSlice = functionUncurryThis(''.slice);
|
|
37765
|
+
|
|
37766
|
+
var classofRaw = function (it) {
|
|
37767
|
+
return stringSlice(toString(it), 8, -1);
|
|
37768
|
+
};
|
|
37769
|
+
|
|
37770
|
+
var $Object = Object;
|
|
37771
|
+
var split = functionUncurryThis(''.split); // fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
37772
|
+
|
|
37773
|
+
var indexedObject = fails(function () {
|
|
37774
|
+
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
37775
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
37776
|
+
return !$Object('z').propertyIsEnumerable(0);
|
|
37777
|
+
}) ? function (it) {
|
|
37778
|
+
return classofRaw(it) == 'String' ? split(it, '') : $Object(it);
|
|
37779
|
+
} : $Object;
|
|
37780
|
+
|
|
37781
|
+
var toIndexedObject = function (it) {
|
|
37782
|
+
return indexedObject(requireObjectCoercible(it));
|
|
37783
|
+
};
|
|
37784
|
+
|
|
37785
|
+
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; // `Object.getOwnPropertyDescriptor` method
|
|
37786
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
37787
|
+
|
|
37788
|
+
var f$2 = descriptors ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
|
37789
|
+
O = toIndexedObject(O);
|
|
37790
|
+
P = toPropertyKey(P);
|
|
37791
|
+
if (ie8DomDefine) try {
|
|
37792
|
+
return $getOwnPropertyDescriptor(O, P);
|
|
37793
|
+
} catch (error) {
|
|
37794
|
+
/* empty */
|
|
37795
|
+
}
|
|
37796
|
+
if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]);
|
|
37797
|
+
};
|
|
37798
|
+
var objectGetOwnPropertyDescriptor = {
|
|
37799
|
+
f: f$2
|
|
37800
|
+
};
|
|
37801
|
+
|
|
37802
|
+
var defineBuiltIn = function (O, key, value, options) {
|
|
37803
|
+
if (!options) options = {};
|
|
37804
|
+
var simple = options.enumerable;
|
|
37805
|
+
var name = options.name !== undefined ? options.name : key;
|
|
37806
|
+
if (isCallable(value)) makeBuiltIn_1(value, name, options);
|
|
37807
|
+
|
|
37808
|
+
if (options.global) {
|
|
37809
|
+
if (simple) O[key] = value;else defineGlobalProperty(key, value);
|
|
37810
|
+
} else {
|
|
37811
|
+
try {
|
|
37812
|
+
if (!options.unsafe) delete O[key];else if (O[key]) simple = true;
|
|
37813
|
+
} catch (error) {
|
|
37814
|
+
/* empty */
|
|
37815
|
+
}
|
|
37816
|
+
|
|
37817
|
+
if (simple) O[key] = value;else objectDefineProperty.f(O, key, {
|
|
37818
|
+
value: value,
|
|
37819
|
+
enumerable: false,
|
|
37820
|
+
configurable: !options.nonConfigurable,
|
|
37821
|
+
writable: !options.nonWritable
|
|
37822
|
+
});
|
|
37823
|
+
}
|
|
37824
|
+
|
|
37825
|
+
return O;
|
|
37826
|
+
};
|
|
37827
|
+
|
|
37828
|
+
var ceil = Math.ceil;
|
|
37829
|
+
var floor = Math.floor; // `Math.trunc` method
|
|
37830
|
+
// https://tc39.es/ecma262/#sec-math.trunc
|
|
37831
|
+
// eslint-disable-next-line es-x/no-math-trunc -- safe
|
|
37832
|
+
|
|
37833
|
+
var mathTrunc = Math.trunc || function trunc(x) {
|
|
37834
|
+
var n = +x;
|
|
37835
|
+
return (n > 0 ? floor : ceil)(n);
|
|
37836
|
+
};
|
|
37837
|
+
|
|
37838
|
+
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
|
37839
|
+
|
|
37840
|
+
var toIntegerOrInfinity = function (argument) {
|
|
37841
|
+
var number = +argument; // eslint-disable-next-line no-self-compare -- NaN check
|
|
37842
|
+
|
|
37843
|
+
return number !== number || number === 0 ? 0 : mathTrunc(number);
|
|
37844
|
+
};
|
|
37845
|
+
|
|
37846
|
+
var max = Math.max;
|
|
37847
|
+
var min$1 = Math.min; // Helper for a popular repeating case of the spec:
|
|
37848
|
+
// Let integer be ? ToInteger(index).
|
|
37849
|
+
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
37850
|
+
|
|
37851
|
+
var toAbsoluteIndex = function (index, length) {
|
|
37852
|
+
var integer = toIntegerOrInfinity(index);
|
|
37853
|
+
return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
|
|
37854
|
+
};
|
|
37855
|
+
|
|
37856
|
+
var min = Math.min; // `ToLength` abstract operation
|
|
37857
|
+
// https://tc39.es/ecma262/#sec-tolength
|
|
37858
|
+
|
|
37859
|
+
var toLength = function (argument) {
|
|
37860
|
+
return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
37861
|
+
};
|
|
37862
|
+
|
|
37863
|
+
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
37864
|
+
|
|
37865
|
+
var lengthOfArrayLike = function (obj) {
|
|
37866
|
+
return toLength(obj.length);
|
|
37867
|
+
};
|
|
37868
|
+
|
|
37869
|
+
var createMethod = function (IS_INCLUDES) {
|
|
37870
|
+
return function ($this, el, fromIndex) {
|
|
37871
|
+
var O = toIndexedObject($this);
|
|
37872
|
+
var length = lengthOfArrayLike(O);
|
|
37873
|
+
var index = toAbsoluteIndex(fromIndex, length);
|
|
37874
|
+
var value; // Array#includes uses SameValueZero equality algorithm
|
|
37875
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
37876
|
+
|
|
37877
|
+
if (IS_INCLUDES && el != el) while (length > index) {
|
|
37878
|
+
value = O[index++]; // eslint-disable-next-line no-self-compare -- NaN check
|
|
37879
|
+
|
|
37880
|
+
if (value != value) return true; // Array#indexOf ignores holes, Array#includes - not
|
|
37881
|
+
} else for (; length > index; index++) {
|
|
37882
|
+
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
37883
|
+
}
|
|
37884
|
+
return !IS_INCLUDES && -1;
|
|
37885
|
+
};
|
|
37886
|
+
};
|
|
37887
|
+
|
|
37888
|
+
var arrayIncludes = {
|
|
37889
|
+
// `Array.prototype.includes` method
|
|
37890
|
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
37891
|
+
includes: createMethod(true),
|
|
37892
|
+
// `Array.prototype.indexOf` method
|
|
37893
|
+
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
37894
|
+
indexOf: createMethod(false)
|
|
37895
|
+
};
|
|
37896
|
+
|
|
37897
|
+
var indexOf = arrayIncludes.indexOf;
|
|
37898
|
+
var push = functionUncurryThis([].push);
|
|
37899
|
+
|
|
37900
|
+
var objectKeysInternal = function (object, names) {
|
|
37901
|
+
var O = toIndexedObject(object);
|
|
37902
|
+
var i = 0;
|
|
37903
|
+
var result = [];
|
|
37904
|
+
var key;
|
|
37905
|
+
|
|
37906
|
+
for (key in O) !hasOwnProperty_1(hiddenKeys$1, key) && hasOwnProperty_1(O, key) && push(result, key); // Don't enum bug & hidden keys
|
|
37907
|
+
|
|
37908
|
+
|
|
37909
|
+
while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) {
|
|
37910
|
+
~indexOf(result, key) || push(result, key);
|
|
37911
|
+
}
|
|
37912
|
+
|
|
37913
|
+
return result;
|
|
37914
|
+
};
|
|
37915
|
+
|
|
37916
|
+
// IE8- don't enum bug keys
|
|
37917
|
+
var enumBugKeys = ['constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf'];
|
|
37918
|
+
|
|
37919
|
+
var hiddenKeys = enumBugKeys.concat('length', 'prototype'); // `Object.getOwnPropertyNames` method
|
|
37920
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
37921
|
+
// eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
|
|
37922
|
+
|
|
37923
|
+
var f$1 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
37924
|
+
return objectKeysInternal(O, hiddenKeys);
|
|
37925
|
+
};
|
|
37926
|
+
|
|
37927
|
+
var objectGetOwnPropertyNames = {
|
|
37928
|
+
f: f$1
|
|
37929
|
+
};
|
|
37930
|
+
|
|
37931
|
+
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
|
|
37932
|
+
var f = Object.getOwnPropertySymbols;
|
|
37933
|
+
var objectGetOwnPropertySymbols = {
|
|
37934
|
+
f: f
|
|
37935
|
+
};
|
|
37936
|
+
|
|
37937
|
+
var concat = functionUncurryThis([].concat); // all object keys, includes non-enumerable and symbols
|
|
37938
|
+
|
|
37939
|
+
var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
37940
|
+
var keys = objectGetOwnPropertyNames.f(anObject(it));
|
|
37941
|
+
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
|
|
37942
|
+
return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
|
|
37943
|
+
};
|
|
37944
|
+
|
|
37945
|
+
var copyConstructorProperties = function (target, source, exceptions) {
|
|
37946
|
+
var keys = ownKeys(source);
|
|
37947
|
+
var defineProperty = objectDefineProperty.f;
|
|
37948
|
+
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
37949
|
+
|
|
37950
|
+
for (var i = 0; i < keys.length; i++) {
|
|
37951
|
+
var key = keys[i];
|
|
37952
|
+
|
|
37953
|
+
if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) {
|
|
37954
|
+
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
37955
|
+
}
|
|
37956
|
+
}
|
|
37957
|
+
};
|
|
37958
|
+
|
|
37959
|
+
var replacement = /#|\.prototype\./;
|
|
37960
|
+
|
|
37961
|
+
var isForced = function (feature, detection) {
|
|
37962
|
+
var value = data[normalize(feature)];
|
|
37963
|
+
return value == POLYFILL ? true : value == NATIVE ? false : isCallable(detection) ? fails(detection) : !!detection;
|
|
37964
|
+
};
|
|
37965
|
+
|
|
37966
|
+
var normalize = isForced.normalize = function (string) {
|
|
37967
|
+
return String(string).replace(replacement, '.').toLowerCase();
|
|
37968
|
+
};
|
|
37969
|
+
|
|
37970
|
+
var data = isForced.data = {};
|
|
37971
|
+
var NATIVE = isForced.NATIVE = 'N';
|
|
37972
|
+
var POLYFILL = isForced.POLYFILL = 'P';
|
|
37973
|
+
var isForced_1 = isForced;
|
|
37974
|
+
|
|
37975
|
+
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
37976
|
+
/*
|
|
37977
|
+
options.target - name of the target object
|
|
37978
|
+
options.global - target is the global object
|
|
37979
|
+
options.stat - export as static methods of target
|
|
37980
|
+
options.proto - export as prototype methods of target
|
|
37981
|
+
options.real - real prototype method for the `pure` version
|
|
37982
|
+
options.forced - export even if the native feature is available
|
|
37983
|
+
options.bind - bind methods to the target, required for the `pure` version
|
|
37984
|
+
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
|
37985
|
+
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
|
37986
|
+
options.sham - add a flag to not completely full polyfills
|
|
37987
|
+
options.enumerable - export as enumerable property
|
|
37988
|
+
options.dontCallGetSet - prevent calling a getter on target
|
|
37989
|
+
options.name - the .name of the function if it does not match the key
|
|
37990
|
+
*/
|
|
37991
|
+
|
|
37992
|
+
var _export = function (options, source) {
|
|
37993
|
+
var TARGET = options.target;
|
|
37994
|
+
var GLOBAL = options.global;
|
|
37995
|
+
var STATIC = options.stat;
|
|
37996
|
+
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
37997
|
+
|
|
37998
|
+
if (GLOBAL) {
|
|
37999
|
+
target = global$1;
|
|
38000
|
+
} else if (STATIC) {
|
|
38001
|
+
target = global$1[TARGET] || defineGlobalProperty(TARGET, {});
|
|
38002
|
+
} else {
|
|
38003
|
+
target = (global$1[TARGET] || {}).prototype;
|
|
38004
|
+
}
|
|
38005
|
+
|
|
38006
|
+
if (target) for (key in source) {
|
|
38007
|
+
sourceProperty = source[key];
|
|
38008
|
+
|
|
38009
|
+
if (options.dontCallGetSet) {
|
|
38010
|
+
descriptor = getOwnPropertyDescriptor(target, key);
|
|
38011
|
+
targetProperty = descriptor && descriptor.value;
|
|
38012
|
+
} else targetProperty = target[key];
|
|
38013
|
+
|
|
38014
|
+
FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); // contained in target
|
|
38015
|
+
|
|
38016
|
+
if (!FORCED && targetProperty !== undefined) {
|
|
38017
|
+
if (typeof sourceProperty == typeof targetProperty) continue;
|
|
38018
|
+
copyConstructorProperties(sourceProperty, targetProperty);
|
|
38019
|
+
} // add a flag to not completely full polyfills
|
|
38020
|
+
|
|
38021
|
+
|
|
38022
|
+
if (options.sham || targetProperty && targetProperty.sham) {
|
|
38023
|
+
createNonEnumerableProperty(sourceProperty, 'sham', true);
|
|
38024
|
+
}
|
|
38025
|
+
|
|
38026
|
+
defineBuiltIn(target, key, sourceProperty, options);
|
|
38027
|
+
}
|
|
38028
|
+
};
|
|
38029
|
+
|
|
38120
38030
|
var FunctionPrototype = Function.prototype;
|
|
38121
38031
|
var apply = FunctionPrototype.apply;
|
|
38122
38032
|
var call = FunctionPrototype.call; // eslint-disable-next-line es-x/no-reflect -- safe
|
|
@@ -38136,6 +38046,8 @@
|
|
|
38136
38046
|
};
|
|
38137
38047
|
};
|
|
38138
38048
|
|
|
38049
|
+
var html = getBuiltIn('document', 'documentElement');
|
|
38050
|
+
|
|
38139
38051
|
var arraySlice = functionUncurryThis([].slice);
|
|
38140
38052
|
|
|
38141
38053
|
var $TypeError = TypeError;
|
|
@@ -53449,7 +53361,7 @@
|
|
|
53449
53361
|
message = "Sequence mismatch. Is this the correct genome for the loaded CRAM?";
|
|
53450
53362
|
}
|
|
53451
53363
|
|
|
53452
|
-
|
|
53364
|
+
this.browser.alert.present(new Error(message));
|
|
53453
53365
|
throw error;
|
|
53454
53366
|
}
|
|
53455
53367
|
}
|
|
@@ -57795,7 +57707,7 @@
|
|
|
57795
57707
|
const frameEnd = clickedAlignment.mate.position + bpWidth / 2;
|
|
57796
57708
|
this.browser.addMultiLocusPanel(clickedAlignment.mate.chr, frameStart, frameEnd, referenceFrame);
|
|
57797
57709
|
} else {
|
|
57798
|
-
|
|
57710
|
+
this.browser.alert.present(`Reference does not contain chromosome: ${clickedAlignment.mate.chr}`);
|
|
57799
57711
|
}
|
|
57800
57712
|
}
|
|
57801
57713
|
},
|
|
@@ -57809,9 +57721,9 @@
|
|
|
57809
57721
|
const seqstring = clickedAlignment.seq; //.map(b => String.fromCharCode(b)).join("");
|
|
57810
57722
|
|
|
57811
57723
|
if (!seqstring || "*" === seqstring) {
|
|
57812
|
-
|
|
57724
|
+
this.browser.alert.present("Read sequence: *");
|
|
57813
57725
|
} else {
|
|
57814
|
-
|
|
57726
|
+
this.browser.alert.present(seqstring);
|
|
57815
57727
|
}
|
|
57816
57728
|
}
|
|
57817
57729
|
});
|
|
@@ -57827,7 +57739,7 @@
|
|
|
57827
57739
|
await navigator.clipboard.writeText(seq);
|
|
57828
57740
|
} catch (e) {
|
|
57829
57741
|
console.error(e);
|
|
57830
|
-
|
|
57742
|
+
this.browser.alert.present(`error copying sequence to clipboard ${e}`);
|
|
57831
57743
|
}
|
|
57832
57744
|
}
|
|
57833
57745
|
});
|
|
@@ -58912,6 +58824,30 @@
|
|
|
58912
58824
|
}
|
|
58913
58825
|
};
|
|
58914
58826
|
|
|
58827
|
+
/*
|
|
58828
|
+
* The MIT License (MIT)
|
|
58829
|
+
*
|
|
58830
|
+
* Copyright (c) 2014 Broad Institute
|
|
58831
|
+
*
|
|
58832
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
58833
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
58834
|
+
* in the Software without restriction, including without limitation the rights
|
|
58835
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
58836
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
58837
|
+
* furnished to do so, subject to the following conditions:
|
|
58838
|
+
*
|
|
58839
|
+
* The above copyright notice and this permission notice shall be included in
|
|
58840
|
+
* all copies or substantial portions of the Software.
|
|
58841
|
+
*
|
|
58842
|
+
*
|
|
58843
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
58844
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
58845
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
58846
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
58847
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
58848
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
58849
|
+
* THE SOFTWARE.
|
|
58850
|
+
*/
|
|
58915
58851
|
const scrollbarExclusionTypes = new Set(['ruler', 'sequence', 'ideogram']);
|
|
58916
58852
|
const colorPickerExclusionTypes = new Set(['ruler', 'sequence', 'ideogram']);
|
|
58917
58853
|
|
|
@@ -60468,7 +60404,7 @@
|
|
|
60468
60404
|
seq = reverseComplementSequence(seq);
|
|
60469
60405
|
}
|
|
60470
60406
|
|
|
60471
|
-
|
|
60407
|
+
this.browser.alert.present(seq);
|
|
60472
60408
|
}
|
|
60473
60409
|
}];
|
|
60474
60410
|
|
|
@@ -60488,7 +60424,7 @@
|
|
|
60488
60424
|
await navigator.clipboard.writeText(seq);
|
|
60489
60425
|
} catch (e) {
|
|
60490
60426
|
console.error(e);
|
|
60491
|
-
|
|
60427
|
+
this.browser.alert.present(`error copying sequence to clipboard ${e}`);
|
|
60492
60428
|
}
|
|
60493
60429
|
}
|
|
60494
60430
|
});
|
|
@@ -60637,6 +60573,7 @@
|
|
|
60637
60573
|
start,
|
|
60638
60574
|
end,
|
|
60639
60575
|
bpPerPixel,
|
|
60576
|
+
visibilityWindow: this.visibilityWindow,
|
|
60640
60577
|
windowFunction: this.windowFunction
|
|
60641
60578
|
});
|
|
60642
60579
|
|
|
@@ -60663,6 +60600,7 @@
|
|
|
60663
60600
|
let items = [];
|
|
60664
60601
|
|
|
60665
60602
|
if (this.flipAxis !== undefined) {
|
|
60603
|
+
items.push('<hr>');
|
|
60666
60604
|
items.push({
|
|
60667
60605
|
label: "Flip y-axis",
|
|
60668
60606
|
click: () => {
|
|
@@ -61744,8 +61682,13 @@
|
|
|
61744
61682
|
} // Create the FeatureSource and override the default whole genome method
|
|
61745
61683
|
|
|
61746
61684
|
|
|
61747
|
-
|
|
61748
|
-
|
|
61685
|
+
if (config.featureSource) {
|
|
61686
|
+
this.featureSource = config.featureSource;
|
|
61687
|
+
delete config._featureSource;
|
|
61688
|
+
} else {
|
|
61689
|
+
this.featureSource = FeatureSource(config, this.browser.genome);
|
|
61690
|
+
this.featureSource.getWGFeatures = getWGFeatures;
|
|
61691
|
+
}
|
|
61749
61692
|
}
|
|
61750
61693
|
|
|
61751
61694
|
async postInit() {
|
|
@@ -61821,10 +61764,16 @@
|
|
|
61821
61764
|
for (let feature of featureList) {
|
|
61822
61765
|
// Reset transient property drawState. An undefined value => feature has not been drawn.
|
|
61823
61766
|
feature.drawState = undefined;
|
|
61824
|
-
let color
|
|
61767
|
+
let color;
|
|
61825
61768
|
|
|
61826
|
-
if (color
|
|
61827
|
-
color =
|
|
61769
|
+
if (typeof this.color === 'function') {
|
|
61770
|
+
color = this.color(feature);
|
|
61771
|
+
} else {
|
|
61772
|
+
color = this.color || feature.color || DEFAULT_ARC_COLOR;
|
|
61773
|
+
|
|
61774
|
+
if (color && this.config.useScore) {
|
|
61775
|
+
color = getAlphaColor(color, scoreShade(feature.score));
|
|
61776
|
+
}
|
|
61828
61777
|
}
|
|
61829
61778
|
|
|
61830
61779
|
ctx.lineWidth = feature.thickness || this.thickness || 1;
|
|
@@ -62140,14 +62089,10 @@
|
|
|
62140
62089
|
}
|
|
62141
62090
|
|
|
62142
62091
|
menuItemList() {
|
|
62143
|
-
let items = [
|
|
62144
|
-
name: "Set track color",
|
|
62145
|
-
click: () => {
|
|
62146
|
-
this.trackView.presentColorPicker();
|
|
62147
|
-
}
|
|
62148
|
-
}, '<hr/>'];
|
|
62092
|
+
let items = [];
|
|
62149
62093
|
|
|
62150
62094
|
if (this.hasValue) {
|
|
62095
|
+
items.push("<hr/>");
|
|
62151
62096
|
const lut = {
|
|
62152
62097
|
"nested": "Nested",
|
|
62153
62098
|
"proportional": "Proportional - All",
|
|
@@ -62611,6 +62556,31 @@
|
|
|
62611
62556
|
}
|
|
62612
62557
|
}
|
|
62613
62558
|
|
|
62559
|
+
/*
|
|
62560
|
+
* The MIT License (MIT)
|
|
62561
|
+
*
|
|
62562
|
+
* Copyright (c) 2016 University of California San Diego
|
|
62563
|
+
* Author: Jim Robinson
|
|
62564
|
+
*
|
|
62565
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
62566
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
62567
|
+
* in the Software without restriction, including without limitation the rights
|
|
62568
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
62569
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
62570
|
+
* furnished to do so, subject to the following conditions:
|
|
62571
|
+
*
|
|
62572
|
+
* The above copyright notice and this permission notice shall be included in
|
|
62573
|
+
* all copies or substantial portions of the Software.
|
|
62574
|
+
*
|
|
62575
|
+
*
|
|
62576
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
62577
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
62578
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
62579
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
62580
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
62581
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
62582
|
+
* THE SOFTWARE.
|
|
62583
|
+
*/
|
|
62614
62584
|
const isString = isString$3;
|
|
62615
62585
|
const DEFAULT_VISIBILITY_WINDOW = 1000000;
|
|
62616
62586
|
const TOP_MARGIN = 10;
|
|
@@ -64892,6 +64862,30 @@
|
|
|
64892
64862
|
}
|
|
64893
64863
|
}
|
|
64894
64864
|
|
|
64865
|
+
/*
|
|
64866
|
+
* The MIT License (MIT)
|
|
64867
|
+
*
|
|
64868
|
+
* Copyright (c) 2014 Broad Institute
|
|
64869
|
+
*
|
|
64870
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
64871
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
64872
|
+
* in the Software without restriction, including without limitation the rights
|
|
64873
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
64874
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
64875
|
+
* furnished to do so, subject to the following conditions:
|
|
64876
|
+
*
|
|
64877
|
+
* The above copyright notice and this permission notice shall be included in
|
|
64878
|
+
* all copies or substantial portions of the Software.
|
|
64879
|
+
*
|
|
64880
|
+
*
|
|
64881
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
64882
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
64883
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
64884
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
64885
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
64886
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
64887
|
+
* THE SOFTWARE.
|
|
64888
|
+
*/
|
|
64895
64889
|
let JUNCTION_MOTIF_PALETTE = new PaletteColorTable("Dark2"); // Lock in color-to-motif mapping so it's independent of data loading order. This list may not include all possible
|
|
64896
64890
|
// motif values as this varies depending on the RNA-seq pipeline. The current list is based on STAR v2.4 docs.
|
|
64897
64891
|
|
|
@@ -68328,7 +68322,7 @@
|
|
|
68328
68322
|
class: 'igv-container'
|
|
68329
68323
|
});
|
|
68330
68324
|
parentDiv.appendChild(this.root);
|
|
68331
|
-
Alert
|
|
68325
|
+
this.alert = new Alert(this.root);
|
|
68332
68326
|
this.columnContainer = div$1({
|
|
68333
68327
|
class: 'igv-column-container'
|
|
68334
68328
|
});
|
|
@@ -68495,7 +68489,7 @@
|
|
|
68495
68489
|
|
|
68496
68490
|
this.inputDialog = new InputDialog(this.root);
|
|
68497
68491
|
this.inputDialog.container.id = `igv-input-dialog-${guid$2()}`;
|
|
68498
|
-
this.dataRangeDialog = new DataRangeDialog($$1(this.root));
|
|
68492
|
+
this.dataRangeDialog = new DataRangeDialog(this, $$1(this.root));
|
|
68499
68493
|
this.dataRangeDialog.$container.get(0).id = `igv-data-range-dialog-${guid$2()}`;
|
|
68500
68494
|
this.genericColorPicker = new GenericColorPicker({
|
|
68501
68495
|
parent: this.columnContainer,
|
|
@@ -68683,7 +68677,7 @@
|
|
|
68683
68677
|
createColumn(this.columnContainer, 'igv-track-drag-column'); // Track gear column
|
|
68684
68678
|
|
|
68685
68679
|
createColumn(this.columnContainer, 'igv-gear-menu-column');
|
|
68686
|
-
const genomeConfig = await GenomeUtils.expandReference(session.reference || session.genome);
|
|
68680
|
+
const genomeConfig = await GenomeUtils.expandReference(this.alert, session.reference || session.genome);
|
|
68687
68681
|
await this.loadReference(genomeConfig, session.locus);
|
|
68688
68682
|
this.centerLineList = this.createCenterLineList(this.columnContainer); // Create ideogram and ruler track. Really this belongs in browser initialization, but creation is
|
|
68689
68683
|
// deferred because ideogram and ruler are treated as "tracks", and tracks require a reference frame
|
|
@@ -68862,7 +68856,7 @@
|
|
|
68862
68856
|
|
|
68863
68857
|
|
|
68864
68858
|
async loadGenome(idOrConfig) {
|
|
68865
|
-
const genomeConfig = await GenomeUtils.expandReference(idOrConfig);
|
|
68859
|
+
const genomeConfig = await GenomeUtils.expandReference(this.alert, idOrConfig);
|
|
68866
68860
|
await this.loadReference(genomeConfig, undefined);
|
|
68867
68861
|
const tracks = genomeConfig.tracks || []; // Insure that we always have a sequence track
|
|
68868
68862
|
|
|
@@ -69055,7 +69049,7 @@
|
|
|
69055
69049
|
}
|
|
69056
69050
|
|
|
69057
69051
|
msg += ": " + config.url;
|
|
69058
|
-
|
|
69052
|
+
this.alert.present(new Error(msg), undefined);
|
|
69059
69053
|
}
|
|
69060
69054
|
}
|
|
69061
69055
|
/**
|
|
@@ -69192,8 +69186,7 @@
|
|
|
69192
69186
|
const track = TrackFactory.getTrack(type, config, this);
|
|
69193
69187
|
|
|
69194
69188
|
if (undefined === track) {
|
|
69195
|
-
|
|
69196
|
-
return;
|
|
69189
|
+
this.alert.present(new Error(`Error creating track. Could not determine track type for file: ${config.url || config}`), undefined);
|
|
69197
69190
|
} else {
|
|
69198
69191
|
if (config.roi && config.roi.length > 0) {
|
|
69199
69192
|
track.roiSets = config.roi.map(r => new TrackROISet(r, this.genome));
|
|
@@ -69686,7 +69679,7 @@
|
|
|
69686
69679
|
const success = await this.search(string, init);
|
|
69687
69680
|
|
|
69688
69681
|
if (!success) {
|
|
69689
|
-
|
|
69682
|
+
this.alert.present(new Error(`Unrecognized locus: <b> ${string} </b>`));
|
|
69690
69683
|
}
|
|
69691
69684
|
|
|
69692
69685
|
return success;
|
|
@@ -69811,7 +69804,7 @@
|
|
|
69811
69804
|
|
|
69812
69805
|
toJSON() {
|
|
69813
69806
|
const json = {
|
|
69814
|
-
"version": version()
|
|
69807
|
+
"version": version$1()
|
|
69815
69808
|
};
|
|
69816
69809
|
|
|
69817
69810
|
if (this.showSampleNames !== undefined) {
|
|
@@ -70582,7 +70575,7 @@
|
|
|
70582
70575
|
setGoogleOauthToken,
|
|
70583
70576
|
setOauthToken,
|
|
70584
70577
|
oauth,
|
|
70585
|
-
version,
|
|
70578
|
+
version: version$1,
|
|
70586
70579
|
setApiKey,
|
|
70587
70580
|
doAutoscale,
|
|
70588
70581
|
TrackView
|