igv 2.10.2 → 2.10.3

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/dist/igv.js CHANGED
@@ -22,8 +22,8 @@
22
22
  var document$2 = window.document;
23
23
  var getProto = Object.getPrototypeOf;
24
24
  var slice = arr.slice;
25
- var concat = arr.concat;
26
- var push = arr.push;
25
+ var concat$1 = arr.concat;
26
+ var push$1 = arr.push;
27
27
  var indexOf$1 = arr.indexOf;
28
28
  var class2type = {};
29
29
  var toString$3 = class2type.toString;
@@ -148,7 +148,7 @@
148
148
  },
149
149
  // For internal use only.
150
150
  // Behaves like an Array's method, not like a jQuery method.
151
- push: push,
151
+ push: push$1,
152
152
  sort: arr.sort,
153
153
  splice: arr.splice
154
154
  };
@@ -293,7 +293,7 @@
293
293
  if (isArrayLike(Object(arr))) {
294
294
  jQuery.merge(ret, typeof arr === "string" ? [arr] : arr);
295
295
  } else {
296
- push.call(ret, arr);
296
+ push$1.call(ret, arr);
297
297
  }
298
298
  }
299
299
 
@@ -363,7 +363,7 @@
363
363
  } // Flatten any nested arrays
364
364
 
365
365
 
366
- return concat.apply([], ret);
366
+ return concat$1.apply([], ret);
367
367
  },
368
368
  // A global GUID counter for objects
369
369
  guid: 1,
@@ -2985,7 +2985,9 @@
2985
2985
  return promise.then(null, fn);
2986
2986
  },
2987
2987
  // Keep pipe for back-compat
2988
- pipe: function () {
2988
+ pipe: function
2989
+ /* fnDone, fnFail, fnProgress */
2990
+ () {
2989
2991
  var fns = arguments;
2990
2992
  return jQuery.Deferred(function (newDefer) {
2991
2993
  jQuery.each(tuples, function (i, tuple) {
@@ -4890,7 +4892,7 @@
4890
4892
 
4891
4893
  function domManip(collection, args, callback, ignored) {
4892
4894
  // Flatten any nested arrays
4893
- args = concat.apply([], args);
4895
+ args = concat$1.apply([], args);
4894
4896
  var fragment,
4895
4897
  first,
4896
4898
  scripts,
@@ -5211,7 +5213,7 @@
5211
5213
  jQuery(insert[i])[original](elems); // Support: Android <=4.0 only, PhantomJS 1 only
5212
5214
  // .get() because push.apply(_, arraylike) throws on ancient WebKit
5213
5215
 
5214
- push.apply(ret, elems.get());
5216
+ push$1.apply(ret, elems.get());
5215
5217
  }
5216
5218
 
5217
5219
  return this.pushStack(ret);
@@ -7838,7 +7840,7 @@
7838
7840
 
7839
7841
 
7840
7842
  function getFilename$1(urlOrFile) {
7841
- if (urlOrFile instanceof File) {
7843
+ if (isFile(urlOrFile)) {
7842
7844
  return urlOrFile.name;
7843
7845
  } else if (isString$3(urlOrFile)) {
7844
7846
  let index = urlOrFile.lastIndexOf("/");
@@ -7855,11 +7857,20 @@
7855
7857
  throw Error(`Expected File or string, got ${typeof urlOrFile}`);
7856
7858
  }
7857
7859
  }
7860
+ /**
7861
+ * Test if object is a File or File-like object by testing for the "name" property. This is not a robust test,
7862
+ * but the purpose is to distinguish the object from url strings
7863
+ *
7864
+ * @param object
7865
+ */
7866
+
7858
7867
 
7859
- function isFilePath(path) {
7860
- return path instanceof File;
7868
+ function isFile(object) {
7869
+ return object.hasOwnProperty("name");
7861
7870
  }
7862
7871
 
7872
+ const isFilePath = isFile; // deprecated
7873
+
7863
7874
  function download(filename, data) {
7864
7875
  const element = document.createElement('a');
7865
7876
  element.setAttribute('href', data);
@@ -12057,7 +12068,7 @@
12057
12068
  }
12058
12069
 
12059
12070
  var zstream = ZStream;
12060
- const toString$1 = Object.prototype.toString;
12071
+ const toString$1$1 = Object.prototype.toString;
12061
12072
  /* Public constants ==========================================================*/
12062
12073
 
12063
12074
  /* ===========================================================================*/
@@ -12203,7 +12214,7 @@
12203
12214
  if (typeof opt.dictionary === 'string') {
12204
12215
  // If we need to compress text, change encoding to utf8.
12205
12216
  dict = strings.string2buf(opt.dictionary);
12206
- } else if (toString$1.call(opt.dictionary) === '[object ArrayBuffer]') {
12217
+ } else if (toString$1$1.call(opt.dictionary) === '[object ArrayBuffer]') {
12207
12218
  dict = new Uint8Array(opt.dictionary);
12208
12219
  } else {
12209
12220
  dict = opt.dictionary;
@@ -12257,7 +12268,7 @@
12257
12268
  if (typeof data === 'string') {
12258
12269
  // If we need to compress text, change encoding to utf8.
12259
12270
  strm.input = strings.string2buf(data);
12260
- } else if (toString$1.call(data) === '[object ArrayBuffer]') {
12271
+ } else if (toString$1$1.call(data) === '[object ArrayBuffer]') {
12261
12272
  strm.input = new Uint8Array(data);
12262
12273
  } else {
12263
12274
  strm.input = data;
@@ -17107,7 +17118,7 @@
17107
17118
  options.responseType = "arraybuffer";
17108
17119
  }
17109
17120
 
17110
- if (url instanceof File) {
17121
+ if (isFile(url)) {
17111
17122
  return loadFileSlice(url, options);
17112
17123
  } else {
17113
17124
  return load(url, options);
@@ -17146,7 +17157,7 @@
17146
17157
 
17147
17158
  url = await (typeof url === 'function' ? url() : url);
17148
17159
 
17149
- if (url instanceof File) {
17160
+ if (isFile(url)) {
17150
17161
  return loadFileSlice(url, options);
17151
17162
  } else if (typeof url.startsWith === 'function') {
17152
17163
  // Test for string
@@ -18399,7 +18410,7 @@
18399
18410
  },
18400
18411
 
18401
18412
  showColorPicker(track) {
18402
- return undefined === track.type || "bedtype" === track.type || "alignment" === track.type || "annotation" === track.type || "variant" === track.type || "wig" === track.type;
18413
+ return undefined === track.type || "bedtype" === track.type || "alignment" === track.type || "annotation" === track.type || "variant" === track.type || "wig" === track.type || 'interact' === track.type;
18403
18414
  },
18404
18415
 
18405
18416
  createMenuItem(label, action) {
@@ -18448,11 +18459,12 @@
18448
18459
  };
18449
18460
  }
18450
18461
 
18451
- function colorPickerMenuItem({
18452
- trackView,
18453
- label,
18454
- option
18455
- }) {
18462
+ function colorPickerMenuItem(_ref) {
18463
+ let {
18464
+ trackView,
18465
+ label,
18466
+ option
18467
+ } = _ref;
18456
18468
  const $e = $('<div>');
18457
18469
  $e.text(label);
18458
18470
  return {
@@ -18461,10 +18473,11 @@
18461
18473
  };
18462
18474
  }
18463
18475
 
18464
- function unsetColorMenuItem({
18465
- trackView,
18466
- label
18467
- }) {
18476
+ function unsetColorMenuItem(_ref2) {
18477
+ let {
18478
+ trackView,
18479
+ label
18480
+ } = _ref2;
18468
18481
  const $e = $('<div>');
18469
18482
  $e.text(label);
18470
18483
  return {
@@ -18892,7 +18905,7 @@
18892
18905
  }
18893
18906
 
18894
18907
  let alertDialog;
18895
- const Alert$1 = {
18908
+ const Alert = {
18896
18909
  init(root) {
18897
18910
  if (!alertDialog) {
18898
18911
  alertDialog = new AlertDialog(root);
@@ -19521,7 +19534,7 @@
19521
19534
  const max = parseFloat(this.$maximum_input.val());
19522
19535
 
19523
19536
  if (isNaN(min) || isNaN(max)) {
19524
- Alert$1.presentAlert(new Error('Must input numeric values'), undefined);
19537
+ Alert.presentAlert(new Error('Must input numeric values'), undefined);
19525
19538
  } else {
19526
19539
  trackView.setDataRange(min, max);
19527
19540
  }
@@ -19744,7 +19757,8 @@
19744
19757
  ctx.fill();
19745
19758
  ctx.restore();
19746
19759
  },
19747
- dashedLine: function (ctx, x1, y1, x2, y2, dashLen, properties = {}) {
19760
+ dashedLine: function (ctx, x1, y1, x2, y2, dashLen) {
19761
+ let properties = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : {};
19748
19762
  if (dashLen === undefined) dashLen = 2;
19749
19763
  ctx.setLineDash([dashLen, dashLen]);
19750
19764
  IGVGraphics.strokeLine(ctx, x1, y1, x2, y2, properties);
@@ -20596,7 +20610,7 @@
20596
20610
  const start = viewport.referenceFrame.start;
20597
20611
  const end = start + bpWindow;
20598
20612
  const sequence = await this.browser.genome.sequence.getSequence(chr, start, end);
20599
- Alert$1.presentAlert(sequence);
20613
+ Alert.presentAlert(sequence);
20600
20614
  }
20601
20615
  }, {
20602
20616
  label: 'Copy visible sequence',
@@ -22892,7 +22906,7 @@
22892
22906
  }
22893
22907
  };
22894
22908
 
22895
- const _version = "2.10.2";
22909
+ const _version = "2.10.3";
22896
22910
 
22897
22911
  function version$1() {
22898
22912
  return _version;
@@ -23022,7 +23036,7 @@
23022
23036
  const reference = knownGenomes[genomeID];
23023
23037
 
23024
23038
  if (!reference) {
23025
- Alert$1.presentAlert(new Error(`Unknown genome id: ${genomeID}`), undefined);
23039
+ Alert.presentAlert(new Error(`Unknown genome id: ${genomeID}`), undefined);
23026
23040
  }
23027
23041
 
23028
23042
  return reference;
@@ -23722,10 +23736,12 @@
23722
23736
  // entire browser as SVG
23723
23737
 
23724
23738
 
23725
- renderSVGContext(context, {
23726
- deltaX,
23727
- deltaY
23728
- }) {
23739
+ renderSVGContext(context, _ref) {
23740
+ let {
23741
+ deltaX,
23742
+ deltaY
23743
+ } = _ref;
23744
+
23729
23745
  // Nothing to do if zoomInNotice is active
23730
23746
  if (this.$zoomInNotice && this.$zoomInNotice.is(":visible")) {
23731
23747
  return;
@@ -23990,9 +24006,12 @@
23990
24006
  if (1 === this.browser.referenceFrameList.length) {
23991
24007
  string = chr;
23992
24008
  } else {
23993
- const loci = this.browser.referenceFrameList.map(({
23994
- locusSearchString
23995
- }) => locusSearchString);
24009
+ const loci = this.browser.referenceFrameList.map(_ref2 => {
24010
+ let {
24011
+ locusSearchString
24012
+ } = _ref2;
24013
+ return locusSearchString;
24014
+ });
23996
24015
  const index = this.browser.referenceFrameList.indexOf(this.referenceFrame);
23997
24016
  loci[index] = chr;
23998
24017
  string = loci.join(' ');
@@ -24048,7 +24067,7 @@
24048
24067
  str = `<div>${track.description}</div>`;
24049
24068
  } else {
24050
24069
  if (track.url) {
24051
- if (track.url instanceof File) {
24070
+ if (isFile(track.url)) {
24052
24071
  str = `<div><b>Filename: </b>${track.url.name}`;
24053
24072
  } else {
24054
24073
  str = `<div><b>URL: </b>${track.url}`;
@@ -24440,9 +24459,12 @@
24440
24459
  if (1 === this.browser.referenceFrameList.length) {
24441
24460
  searchString = chr;
24442
24461
  } else {
24443
- let loci = this.browser.referenceFrameList.map(({
24444
- locusSearchString
24445
- }) => locusSearchString);
24462
+ let loci = this.browser.referenceFrameList.map(_ref => {
24463
+ let {
24464
+ locusSearchString
24465
+ } = _ref;
24466
+ return locusSearchString;
24467
+ });
24446
24468
  loci[index] = chr;
24447
24469
  searchString = loci.join(' ');
24448
24470
  }
@@ -24643,9 +24665,10 @@
24643
24665
  });
24644
24666
  }
24645
24667
 
24646
- draw({
24647
- referenceFrame
24648
- }) {
24668
+ draw(_ref) {
24669
+ let {
24670
+ referenceFrame
24671
+ } = _ref;
24649
24672
  this.$canvas.hide();
24650
24673
  IGVGraphics.configureHighDPICanvas(this.ideogram_ctx, this.$viewport.width(), this.$viewport.height());
24651
24674
  this.trackView.track.draw({
@@ -24949,10 +24972,12 @@
24949
24972
  });
24950
24973
  }
24951
24974
 
24952
- draw({
24953
- context,
24954
- samples
24955
- }) {
24975
+ draw(_ref) {
24976
+ let {
24977
+ context,
24978
+ samples
24979
+ } = _ref;
24980
+
24956
24981
  if (!samples || samples.names.length === 0
24957
24982
  /* || samples.height < 1*/
24958
24983
  ) {
@@ -24981,10 +25006,12 @@
24981
25006
  }
24982
25007
  }
24983
25008
 
24984
- renderSVGContext(context, {
24985
- deltaX,
24986
- deltaY
24987
- }) {
25009
+ renderSVGContext(context, _ref2) {
25010
+ let {
25011
+ deltaX,
25012
+ deltaY
25013
+ } = _ref2;
25014
+
24988
25015
  if (typeof this.trackView.track.getSamples === 'function') {
24989
25016
  const samples = this.trackView.track.getSamples();
24990
25017
  const yScrollDelta = 0; // This is not relevant, scrolling is handled in "draw"
@@ -25061,12 +25088,13 @@
25061
25088
  return (h - (actualBoundingBoxAscent + actualBoundingBoxDescent)) / 2;
25062
25089
  }
25063
25090
 
25064
- function configureFont(ctx, {
25065
- textAlign,
25066
- textBaseline,
25067
- strokeStyle,
25068
- fillStyle
25069
- }, sampleHeight) {
25091
+ function configureFont(ctx, _ref3, sampleHeight) {
25092
+ let {
25093
+ textAlign,
25094
+ textBaseline,
25095
+ strokeStyle,
25096
+ fillStyle
25097
+ } = _ref3;
25070
25098
  const pixels = Math.min(sampleHeight, maxFontSize);
25071
25099
  ctx.font = `${pixels}px sans-serif`;
25072
25100
  ctx.textAlign = textAlign;
@@ -25075,10 +25103,11 @@
25075
25103
  }
25076
25104
 
25077
25105
  class GenericColorPicker extends GenericContainer {
25078
- constructor({
25079
- parent,
25080
- width
25081
- }) {
25106
+ constructor(_ref) {
25107
+ let {
25108
+ parent,
25109
+ width
25110
+ } = _ref;
25082
25111
  super({
25083
25112
  parent,
25084
25113
  width,
@@ -25491,10 +25520,11 @@
25491
25520
  this.gearContainer.remove();
25492
25521
  }
25493
25522
 
25494
- renderSVGContext(context, {
25495
- deltaX,
25496
- deltaY
25497
- }) {
25523
+ renderSVGContext(context, _ref) {
25524
+ let {
25525
+ deltaX,
25526
+ deltaY
25527
+ } = _ref;
25498
25528
  renderSVGAxis(context, this.track, this.axisCanvas, deltaX, deltaY);
25499
25529
  const {
25500
25530
  width: axisWidth
@@ -26546,10 +26576,12 @@
26546
26576
  }
26547
26577
  }
26548
26578
 
26549
- findExonContaining({
26550
- start,
26551
- end
26552
- }) {
26579
+ findExonContaining(_ref) {
26580
+ let {
26581
+ start,
26582
+ end
26583
+ } = _ref;
26584
+
26553
26585
  for (let exon of this.exons) {
26554
26586
  if (exon.end >= end && exon.start <= start) {
26555
26587
  return exon;
@@ -27976,14 +28008,15 @@
27976
28008
  }
27977
28009
 
27978
28010
  class SegFeature {
27979
- constructor({
27980
- sample,
27981
- chr,
27982
- start,
27983
- end,
27984
- value,
27985
- valueColumnName
27986
- }) {
28011
+ constructor(_ref) {
28012
+ let {
28013
+ sample,
28014
+ chr,
28015
+ start,
28016
+ end,
28017
+ value,
28018
+ valueColumnName
28019
+ } = _ref;
27987
28020
  this.sample = sample;
27988
28021
  this.chr = chr;
27989
28022
  this.start = start;
@@ -27992,10 +28025,11 @@
27992
28025
  this.valueColumnName = valueColumnName;
27993
28026
  }
27994
28027
 
27995
- setAttributes({
27996
- names,
27997
- values
27998
- }) {
28028
+ setAttributes(_ref2) {
28029
+ let {
28030
+ names,
28031
+ values
28032
+ } = _ref2;
27999
28033
  this.attributeNames = names;
28000
28034
  this.attributeValues = values;
28001
28035
  }
@@ -28100,7 +28134,7 @@
28100
28134
 
28101
28135
  if (config.name || config.label) {
28102
28136
  this.name = config.name || config.label;
28103
- } else if (config.url instanceof File) {
28137
+ } else if (isFile(config.url)) {
28104
28138
  this.name = config.url.name;
28105
28139
  } else if (isString$3(config.url) && !config.url.startsWith("data:")) {
28106
28140
  this.name = getFilename$1(config.url);
@@ -28193,7 +28227,7 @@
28193
28227
  throw Error(`Property '${key}' of track '${this.name} is a function. Functions cannot be saved in sessions.`);
28194
28228
  }
28195
28229
 
28196
- if (state[key] instanceof File) {
28230
+ if (isFile(state[key])) {
28197
28231
  const str = `Track ${this.name} is a local file. Sessions cannot be saved with local file references.`;
28198
28232
  throw Error(str);
28199
28233
  }
@@ -29218,14 +29252,15 @@
29218
29252
  }
29219
29253
 
29220
29254
  class GWASFeature {
29221
- constructor({
29222
- chr,
29223
- start,
29224
- end,
29225
- value,
29226
- line,
29227
- columns
29228
- }) {
29255
+ constructor(_ref) {
29256
+ let {
29257
+ chr,
29258
+ start,
29259
+ end,
29260
+ value,
29261
+ line,
29262
+ columns
29263
+ } = _ref;
29229
29264
  this.chr = chr;
29230
29265
  this.start = start;
29231
29266
  this.end = end;
@@ -31946,26 +31981,6 @@
31946
31981
  }
31947
31982
  }
31948
31983
 
31949
- // eslint-disable-next-line es/no-typed-arrays -- safe
31950
- var arrayBufferNative = typeof ArrayBuffer !== 'undefined' && typeof DataView !== 'undefined';
31951
-
31952
- var fails = function (exec) {
31953
- try {
31954
- return !!exec();
31955
- } catch (error) {
31956
- return true;
31957
- }
31958
- };
31959
-
31960
- var descriptors = !fails(function () {
31961
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
31962
- return Object.defineProperty({}, 1, {
31963
- get: function () {
31964
- return 7;
31965
- }
31966
- })[1] != 7;
31967
- });
31968
-
31969
31984
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
31970
31985
 
31971
31986
  function createCommonjsModule(fn) {
@@ -31985,40 +32000,136 @@
31985
32000
  return this;
31986
32001
  }() || Function('return this')();
31987
32002
 
32003
+ var FunctionPrototype$2 = Function.prototype;
32004
+ var bind$2 = FunctionPrototype$2.bind;
32005
+ var call$2 = FunctionPrototype$2.call;
32006
+ var callBind = bind$2 && bind$2.bind(call$2);
32007
+ var functionUncurryThis = bind$2 ? function (fn) {
32008
+ return fn && callBind(call$2, fn);
32009
+ } : function (fn) {
32010
+ return fn && function () {
32011
+ return call$2.apply(fn, arguments);
32012
+ };
32013
+ };
32014
+
32015
+ var fails = function (exec) {
32016
+ try {
32017
+ return !!exec();
32018
+ } catch (error) {
32019
+ return true;
32020
+ }
32021
+ };
32022
+
31988
32023
  // `IsCallable` abstract operation
31989
32024
  // https://tc39.es/ecma262/#sec-iscallable
31990
32025
  var isCallable = function (argument) {
31991
- return typeof argument === 'function';
32026
+ return typeof argument == 'function';
31992
32027
  };
31993
32028
 
32029
+ var String$4 = global$1.String;
32030
+
32031
+ var tryToString = function (argument) {
32032
+ try {
32033
+ return String$4(argument);
32034
+ } catch (error) {
32035
+ return 'Object';
32036
+ }
32037
+ };
32038
+
32039
+ var TypeError$9 = global$1.TypeError; // `Assert: IsCallable(argument) is true`
32040
+
32041
+ var aCallable = function (argument) {
32042
+ if (isCallable(argument)) return argument;
32043
+ throw TypeError$9(tryToString(argument) + ' is not a function');
32044
+ };
32045
+
32046
+ var arraySlice = functionUncurryThis([].slice);
32047
+
32048
+ var floor$1 = Math.floor;
32049
+
32050
+ var mergeSort = function (array, comparefn) {
32051
+ var length = array.length;
32052
+ var middle = floor$1(length / 2);
32053
+ return length < 8 ? insertionSort(array, comparefn) : merge(array, mergeSort(arraySlice(array, 0, middle), comparefn), mergeSort(arraySlice(array, middle), comparefn), comparefn);
32054
+ };
32055
+
32056
+ var insertionSort = function (array, comparefn) {
32057
+ var length = array.length;
32058
+ var i = 1;
32059
+ var element, j;
32060
+
32061
+ while (i < length) {
32062
+ j = i;
32063
+ element = array[i];
32064
+
32065
+ while (j && comparefn(array[j - 1], element) > 0) {
32066
+ array[j] = array[--j];
32067
+ }
32068
+
32069
+ if (j !== i++) array[j] = element;
32070
+ }
32071
+
32072
+ return array;
32073
+ };
32074
+
32075
+ var merge = function (array, left, right, comparefn) {
32076
+ var llength = left.length;
32077
+ var rlength = right.length;
32078
+ var lindex = 0;
32079
+ var rindex = 0;
32080
+
32081
+ while (lindex < llength || rindex < rlength) {
32082
+ array[lindex + rindex] = lindex < llength && rindex < rlength ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++] : lindex < llength ? left[lindex++] : right[rindex++];
32083
+ }
32084
+
32085
+ return array;
32086
+ };
32087
+
32088
+ var arraySort = mergeSort;
32089
+
32090
+ // eslint-disable-next-line es/no-typed-arrays -- safe
32091
+ var arrayBufferNative = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';
32092
+
32093
+ var descriptors = !fails(function () {
32094
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
32095
+ return Object.defineProperty({}, 1, {
32096
+ get: function () {
32097
+ return 7;
32098
+ }
32099
+ })[1] != 7;
32100
+ });
32101
+
31994
32102
  var isObject = function (it) {
31995
- return typeof it === 'object' ? it !== null : isCallable(it);
32103
+ return typeof it == 'object' ? it !== null : isCallable(it);
31996
32104
  };
31997
32105
 
31998
- // `RequireObjectCoercible` abstract operation
32106
+ var TypeError$8 = global$1.TypeError; // `RequireObjectCoercible` abstract operation
31999
32107
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
32108
+
32000
32109
  var requireObjectCoercible = function (it) {
32001
- if (it == undefined) throw TypeError("Can't call method on " + it);
32110
+ if (it == undefined) throw TypeError$8("Can't call method on " + it);
32002
32111
  return it;
32003
32112
  };
32004
32113
 
32114
+ var Object$5 = global$1.Object; // `ToObject` abstract operation
32005
32115
  // https://tc39.es/ecma262/#sec-toobject
32006
32116
 
32007
32117
  var toObject = function (argument) {
32008
- return Object(requireObjectCoercible(argument));
32118
+ return Object$5(requireObjectCoercible(argument));
32009
32119
  };
32010
32120
 
32011
- var hasOwnProperty = {}.hasOwnProperty; // `HasOwnProperty` abstract operation
32121
+ var hasOwnProperty = functionUncurryThis({}.hasOwnProperty); // `HasOwnProperty` abstract operation
32012
32122
  // https://tc39.es/ecma262/#sec-hasownproperty
32013
32123
 
32014
32124
  var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
32015
- return hasOwnProperty.call(toObject(it), key);
32125
+ return hasOwnProperty(toObject(it), key);
32016
32126
  };
32017
32127
 
32128
+ var defineProperty$1 = Object.defineProperty;
32129
+
32018
32130
  var setGlobal = function (key, value) {
32019
32131
  try {
32020
- // eslint-disable-next-line es/no-object-defineproperty -- safe
32021
- Object.defineProperty(global$1, key, {
32132
+ defineProperty$1(global$1, key, {
32022
32133
  value: value,
32023
32134
  configurable: true,
32024
32135
  writable: true
@@ -32038,7 +32149,7 @@
32038
32149
  (module.exports = function (key, value) {
32039
32150
  return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
32040
32151
  })('versions', []).push({
32041
- version: '3.18.3',
32152
+ version: '3.19.0',
32042
32153
  mode: 'global',
32043
32154
  copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
32044
32155
  });
@@ -32046,9 +32157,10 @@
32046
32157
 
32047
32158
  var id = 0;
32048
32159
  var postfix = Math.random();
32160
+ var toString$1 = functionUncurryThis(1.0.toString);
32049
32161
 
32050
32162
  var uid = function (key) {
32051
- return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
32163
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$1(++id + postfix, 36);
32052
32164
  };
32053
32165
 
32054
32166
  var aFunction = function (argument) {
@@ -32068,18 +32180,24 @@
32068
32180
  var match, version;
32069
32181
 
32070
32182
  if (v8) {
32071
- match = v8.split('.');
32072
- version = match[0] < 4 ? 1 : match[0] + match[1];
32073
- } else if (engineUserAgent) {
32183
+ match = v8.split('.'); // in old Chrome, versions of V8 isn't V8 = Chrome / 10
32184
+ // but their correct versions are not interesting for us
32185
+
32186
+ version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
32187
+ } // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
32188
+ // so check `userAgent` even if `.v8` exists, but 0
32189
+
32190
+
32191
+ if (!version && engineUserAgent) {
32074
32192
  match = engineUserAgent.match(/Edge\/(\d+)/);
32075
32193
 
32076
32194
  if (!match || match[1] >= 74) {
32077
32195
  match = engineUserAgent.match(/Chrome\/(\d+)/);
32078
- if (match) version = match[1];
32196
+ if (match) version = +match[1];
32079
32197
  }
32080
32198
  }
32081
32199
 
32082
- var engineV8Version = version && +version;
32200
+ var engineV8Version = version;
32083
32201
 
32084
32202
  /* eslint-disable es/no-symbol -- required for testing */
32085
32203
 
@@ -32096,14 +32214,19 @@
32096
32214
 
32097
32215
  var WellKnownSymbolsStore = shared('wks');
32098
32216
  var Symbol$1 = global$1.Symbol;
32217
+ var symbolFor = Symbol$1 && Symbol$1['for'];
32099
32218
  var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
32100
32219
 
32101
32220
  var wellKnownSymbol = function (name) {
32102
32221
  if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
32222
+ var description = 'Symbol.' + name;
32223
+
32103
32224
  if (nativeSymbol && hasOwnProperty_1(Symbol$1, name)) {
32104
32225
  WellKnownSymbolsStore[name] = Symbol$1[name];
32226
+ } else if (useSymbolAsUid && symbolFor) {
32227
+ WellKnownSymbolsStore[name] = symbolFor(description);
32105
32228
  } else {
32106
- WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
32229
+ WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
32107
32230
  }
32108
32231
  }
32109
32232
 
@@ -32115,13 +32238,15 @@
32115
32238
  test[TO_STRING_TAG$2] = 'z';
32116
32239
  var toStringTagSupport = String(test) === '[object z]';
32117
32240
 
32118
- var toString = {}.toString;
32241
+ var toString = functionUncurryThis({}.toString);
32242
+ var stringSlice = functionUncurryThis(''.slice);
32119
32243
 
32120
32244
  var classofRaw = function (it) {
32121
- return toString.call(it).slice(8, -1);
32245
+ return stringSlice(toString(it), 8, -1);
32122
32246
  };
32123
32247
 
32124
- var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag'); // ES3 wrong here
32248
+ var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
32249
+ var Object$4 = global$1.Object; // ES3 wrong here
32125
32250
 
32126
32251
  var CORRECT_ARGUMENTS = classofRaw(function () {
32127
32252
  return arguments;
@@ -32139,19 +32264,11 @@
32139
32264
  var classof = toStringTagSupport ? classofRaw : function (it) {
32140
32265
  var O, tag, result;
32141
32266
  return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case
32142
- : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG$1)) == 'string' ? tag // builtinTag case
32267
+ : typeof (tag = tryGet(O = Object$4(it), TO_STRING_TAG$1)) == 'string' ? tag // builtinTag case
32143
32268
  : CORRECT_ARGUMENTS ? classofRaw(O) // ES3 arguments fallback
32144
32269
  : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
32145
32270
  };
32146
32271
 
32147
- var tryToString = function (argument) {
32148
- try {
32149
- return String(argument);
32150
- } catch (error) {
32151
- return 'Object';
32152
- }
32153
- };
32154
-
32155
32272
  var document$1 = global$1.document; // typeof document.createElement is 'object' in old IE
32156
32273
 
32157
32274
  var EXISTS$1 = isObject(document$1) && isObject(document$1.createElement);
@@ -32169,21 +32286,27 @@
32169
32286
  }).a != 7;
32170
32287
  });
32171
32288
 
32289
+ var String$3 = global$1.String;
32290
+ var TypeError$7 = global$1.TypeError; // `Assert: Type(argument) is Object`
32291
+
32172
32292
  var anObject = function (argument) {
32173
32293
  if (isObject(argument)) return argument;
32174
- throw TypeError(String(argument) + ' is not an object');
32294
+ throw TypeError$7(String$3(argument) + ' is not an object');
32175
32295
  };
32176
32296
 
32297
+ var call$1 = Function.prototype.call;
32298
+ var functionCall = call$1.bind ? call$1.bind(call$1) : function () {
32299
+ return call$1.apply(call$1, arguments);
32300
+ };
32301
+
32302
+ var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
32303
+
32304
+ var Object$3 = global$1.Object;
32177
32305
  var isSymbol = useSymbolAsUid ? function (it) {
32178
32306
  return typeof it == 'symbol';
32179
32307
  } : function (it) {
32180
32308
  var $Symbol = getBuiltIn('Symbol');
32181
- return isCallable($Symbol) && Object(it) instanceof $Symbol;
32182
- };
32183
-
32184
- var aCallable = function (argument) {
32185
- if (isCallable(argument)) return argument;
32186
- throw TypeError(tryToString(argument) + ' is not a function');
32309
+ return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$3(it));
32187
32310
  };
32188
32311
 
32189
32312
  // https://tc39.es/ecma262/#sec-getmethod
@@ -32193,16 +32316,18 @@
32193
32316
  return func == null ? undefined : aCallable(func);
32194
32317
  };
32195
32318
 
32319
+ var TypeError$6 = global$1.TypeError; // `OrdinaryToPrimitive` abstract operation
32196
32320
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
32197
32321
 
32198
32322
  var ordinaryToPrimitive = function (input, pref) {
32199
32323
  var fn, val;
32200
- if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = fn.call(input))) return val;
32201
- if (isCallable(fn = input.valueOf) && !isObject(val = fn.call(input))) return val;
32202
- if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = fn.call(input))) return val;
32203
- throw TypeError("Can't convert object to primitive value");
32324
+ if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
32325
+ if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val;
32326
+ if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
32327
+ throw TypeError$6("Can't convert object to primitive value");
32204
32328
  };
32205
32329
 
32330
+ var TypeError$5 = global$1.TypeError;
32206
32331
  var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); // `ToPrimitive` abstract operation
32207
32332
  // https://tc39.es/ecma262/#sec-toprimitive
32208
32333
 
@@ -32213,9 +32338,9 @@
32213
32338
 
32214
32339
  if (exoticToPrim) {
32215
32340
  if (pref === undefined) pref = 'default';
32216
- result = exoticToPrim.call(input, pref);
32341
+ result = functionCall(exoticToPrim, input, pref);
32217
32342
  if (!isObject(result) || isSymbol(result)) return result;
32218
- throw TypeError("Can't convert object to primitive value");
32343
+ throw TypeError$5("Can't convert object to primitive value");
32219
32344
  }
32220
32345
 
32221
32346
  if (pref === undefined) pref = 'number';
@@ -32226,9 +32351,11 @@
32226
32351
 
32227
32352
  var toPropertyKey = function (argument) {
32228
32353
  var key = toPrimitive(argument, 'string');
32229
- return isSymbol(key) ? key : String(key);
32354
+ return isSymbol(key) ? key : key + '';
32230
32355
  };
32231
32356
 
32357
+ var TypeError$4 = global$1.TypeError; // eslint-disable-next-line es/no-object-defineproperty -- safe
32358
+
32232
32359
  var $defineProperty = Object.defineProperty; // `Object.defineProperty` method
32233
32360
  // https://tc39.es/ecma262/#sec-object.defineproperty
32234
32361
 
@@ -32241,7 +32368,7 @@
32241
32368
  } catch (error) {
32242
32369
  /* empty */
32243
32370
  }
32244
- if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
32371
+ if ('get' in Attributes || 'set' in Attributes) throw TypeError$4('Accessors not supported');
32245
32372
  if ('value' in Attributes) O[P] = Attributes.value;
32246
32373
  return O;
32247
32374
  };
@@ -32265,11 +32392,11 @@
32265
32392
  return object;
32266
32393
  };
32267
32394
 
32268
- var functionToString = Function.toString; // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
32395
+ var functionToString = functionUncurryThis(Function.toString); // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
32269
32396
 
32270
32397
  if (!isCallable(sharedStore.inspectSource)) {
32271
32398
  sharedStore.inspectSource = function (it) {
32272
- return functionToString.call(it);
32399
+ return functionToString(it);
32273
32400
  };
32274
32401
  }
32275
32402
 
@@ -32287,6 +32414,7 @@
32287
32414
  var hiddenKeys$1 = {};
32288
32415
 
32289
32416
  var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
32417
+ var TypeError$3 = global$1.TypeError;
32290
32418
  var WeakMap = global$1.WeakMap;
32291
32419
  var set$1, get, has;
32292
32420
 
@@ -32299,7 +32427,7 @@
32299
32427
  var state;
32300
32428
 
32301
32429
  if (!isObject(it) || (state = get(it)).type !== TYPE) {
32302
- throw TypeError('Incompatible receiver, ' + TYPE + ' required');
32430
+ throw TypeError$3('Incompatible receiver, ' + TYPE + ' required');
32303
32431
  }
32304
32432
 
32305
32433
  return state;
@@ -32308,30 +32436,30 @@
32308
32436
 
32309
32437
  if (nativeWeakMap || sharedStore.state) {
32310
32438
  var store = sharedStore.state || (sharedStore.state = new WeakMap());
32311
- var wmget = store.get;
32312
- var wmhas = store.has;
32313
- var wmset = store.set;
32439
+ var wmget = functionUncurryThis(store.get);
32440
+ var wmhas = functionUncurryThis(store.has);
32441
+ var wmset = functionUncurryThis(store.set);
32314
32442
 
32315
32443
  set$1 = function (it, metadata) {
32316
- if (wmhas.call(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
32444
+ if (wmhas(store, it)) throw new TypeError$3(OBJECT_ALREADY_INITIALIZED);
32317
32445
  metadata.facade = it;
32318
- wmset.call(store, it, metadata);
32446
+ wmset(store, it, metadata);
32319
32447
  return metadata;
32320
32448
  };
32321
32449
 
32322
32450
  get = function (it) {
32323
- return wmget.call(store, it) || {};
32451
+ return wmget(store, it) || {};
32324
32452
  };
32325
32453
 
32326
32454
  has = function (it) {
32327
- return wmhas.call(store, it);
32455
+ return wmhas(store, it);
32328
32456
  };
32329
32457
  } else {
32330
32458
  var STATE = sharedKey('state');
32331
32459
  hiddenKeys$1[STATE] = true;
32332
32460
 
32333
32461
  set$1 = function (it, metadata) {
32334
- if (hasOwnProperty_1(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
32462
+ if (hasOwnProperty_1(it, STATE)) throw new TypeError$3(OBJECT_ALREADY_INITIALIZED);
32335
32463
  metadata.facade = it;
32336
32464
  createNonEnumerableProperty(it, STATE, metadata);
32337
32465
  return metadata;
@@ -32354,16 +32482,16 @@
32354
32482
  getterFor: getterFor
32355
32483
  };
32356
32484
 
32357
- var FunctionPrototype = Function.prototype; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
32485
+ var FunctionPrototype$1 = Function.prototype; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
32358
32486
 
32359
32487
  var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
32360
- var EXISTS = hasOwnProperty_1(FunctionPrototype, 'name'); // additional protection from minified / mangled / dropped function names
32488
+ var EXISTS = hasOwnProperty_1(FunctionPrototype$1, 'name'); // additional protection from minified / mangled / dropped function names
32361
32489
 
32362
32490
  var PROPER = EXISTS && function something() {
32363
32491
  /* empty */
32364
32492
  }.name === 'something';
32365
32493
 
32366
- var CONFIGURABLE = EXISTS && (!descriptors || descriptors && getDescriptor(FunctionPrototype, 'name').configurable);
32494
+ var CONFIGURABLE = EXISTS && (!descriptors || descriptors && getDescriptor(FunctionPrototype$1, 'name').configurable);
32367
32495
  var functionName = {
32368
32496
  EXISTS: EXISTS,
32369
32497
  PROPER: PROPER,
@@ -32424,11 +32552,11 @@
32424
32552
  });
32425
32553
 
32426
32554
  var IE_PROTO = sharedKey('IE_PROTO');
32427
- var ObjectPrototype$1 = Object.prototype; // `Object.getPrototypeOf` method
32555
+ var Object$2 = global$1.Object;
32556
+ var ObjectPrototype$1 = Object$2.prototype; // `Object.getPrototypeOf` method
32428
32557
  // https://tc39.es/ecma262/#sec-object.getprototypeof
32429
- // eslint-disable-next-line es/no-object-getprototypeof -- safe
32430
32558
 
32431
- var objectGetPrototypeOf = correctPrototypeGetter ? Object.getPrototypeOf : function (O) {
32559
+ var objectGetPrototypeOf = correctPrototypeGetter ? Object$2.getPrototypeOf : function (O) {
32432
32560
  var object = toObject(O);
32433
32561
  if (hasOwnProperty_1(object, IE_PROTO)) return object[IE_PROTO];
32434
32562
  var constructor = object.constructor;
@@ -32437,12 +32565,15 @@
32437
32565
  return constructor.prototype;
32438
32566
  }
32439
32567
 
32440
- return object instanceof Object ? ObjectPrototype$1 : null;
32568
+ return object instanceof Object$2 ? ObjectPrototype$1 : null;
32441
32569
  };
32442
32570
 
32571
+ var String$2 = global$1.String;
32572
+ var TypeError$2 = global$1.TypeError;
32573
+
32443
32574
  var aPossiblePrototype = function (argument) {
32444
- if (typeof argument === 'object' || isCallable(argument)) return argument;
32445
- throw TypeError("Can't set " + String(argument) + ' as a prototype');
32575
+ if (typeof argument == 'object' || isCallable(argument)) return argument;
32576
+ throw TypeError$2("Can't set " + String$2(argument) + ' as a prototype');
32446
32577
  };
32447
32578
 
32448
32579
  /* eslint-disable no-proto -- safe */
@@ -32457,8 +32588,8 @@
32457
32588
 
32458
32589
  try {
32459
32590
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
32460
- setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
32461
- setter.call(test, []);
32591
+ setter = functionUncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
32592
+ setter(test, []);
32462
32593
  CORRECT_SETTER = test instanceof Array;
32463
32594
  } catch (error) {
32464
32595
  /* empty */
@@ -32467,7 +32598,7 @@
32467
32598
  return function setPrototypeOf(O, proto) {
32468
32599
  anObject(O);
32469
32600
  aPossiblePrototype(proto);
32470
- if (CORRECT_SETTER) setter.call(O, proto);else O.__proto__ = proto;
32601
+ if (CORRECT_SETTER) setter(O, proto);else O.__proto__ = proto;
32471
32602
  return O;
32472
32603
  };
32473
32604
  }() : undefined);
@@ -32480,7 +32611,7 @@
32480
32611
  var TypedArray = Int8Array && objectGetPrototypeOf(Int8Array);
32481
32612
  var TypedArrayPrototype = Int8ArrayPrototype && objectGetPrototypeOf(Int8ArrayPrototype);
32482
32613
  var ObjectPrototype = Object.prototype;
32483
- var isPrototypeOf = ObjectPrototype.isPrototypeOf;
32614
+ var TypeError$1 = global$1.TypeError;
32484
32615
  var TO_STRING_TAG = wellKnownSymbol('toStringTag');
32485
32616
  var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
32486
32617
  var TYPED_ARRAY_CONSTRUCTOR = uid('TYPED_ARRAY_CONSTRUCTOR'); // Fixing native typed arrays in Opera Presto crashes the browser, see #595
@@ -32518,12 +32649,12 @@
32518
32649
 
32519
32650
  var aTypedArray$1 = function (it) {
32520
32651
  if (isTypedArray(it)) return it;
32521
- throw TypeError('Target is not a typed array');
32652
+ throw TypeError$1('Target is not a typed array');
32522
32653
  };
32523
32654
 
32524
32655
  var aTypedArrayConstructor = function (C) {
32525
- if (isCallable(C) && (!objectSetPrototypeOf || isPrototypeOf.call(TypedArray, C))) return C;
32526
- throw TypeError(tryToString(C) + ' is not a typed array constructor');
32656
+ if (isCallable(C) && (!objectSetPrototypeOf || objectIsPrototypeOf(TypedArray, C))) return C;
32657
+ throw TypeError$1(tryToString(C) + ' is not a typed array constructor');
32527
32658
  };
32528
32659
 
32529
32660
  var exportTypedArrayMethod$1 = function (KEY, property, forced) {
@@ -32591,7 +32722,7 @@
32591
32722
  if (!NATIVE_ARRAY_BUFFER_VIEWS || !isCallable(TypedArray) || TypedArray === Function.prototype) {
32592
32723
  // eslint-disable-next-line no-shadow -- safe
32593
32724
  TypedArray = function TypedArray() {
32594
- throw TypeError('Incorrect invocation');
32725
+ throw TypeError$1('Incorrect invocation');
32595
32726
  };
32596
32727
 
32597
32728
  if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
@@ -32638,77 +32769,6 @@
32638
32769
  TypedArrayPrototype: TypedArrayPrototype
32639
32770
  };
32640
32771
 
32641
- var ceil = Math.ceil;
32642
- var floor$1 = Math.floor; // `ToIntegerOrInfinity` abstract operation
32643
- // https://tc39.es/ecma262/#sec-tointegerorinfinity
32644
-
32645
- var toIntegerOrInfinity = function (argument) {
32646
- var number = +argument; // eslint-disable-next-line no-self-compare -- safe
32647
-
32648
- return number !== number || number === 0 ? 0 : (number > 0 ? floor$1 : ceil)(number);
32649
- };
32650
-
32651
- var min$1 = Math.min; // `ToLength` abstract operation
32652
- // https://tc39.es/ecma262/#sec-tolength
32653
-
32654
- var toLength = function (argument) {
32655
- return argument > 0 ? min$1(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
32656
- };
32657
-
32658
- // https://tc39.es/ecma262/#sec-lengthofarraylike
32659
-
32660
- var lengthOfArrayLike = function (obj) {
32661
- return toLength(obj.length);
32662
- };
32663
-
32664
- // TODO: use something more complex like timsort?
32665
- var floor = Math.floor;
32666
-
32667
- var mergeSort = function (array, comparefn) {
32668
- var length = array.length;
32669
- var middle = floor(length / 2);
32670
- return length < 8 ? insertionSort(array, comparefn) : merge(mergeSort(array.slice(0, middle), comparefn), mergeSort(array.slice(middle), comparefn), comparefn);
32671
- };
32672
-
32673
- var insertionSort = function (array, comparefn) {
32674
- var length = array.length;
32675
- var i = 1;
32676
- var element, j;
32677
-
32678
- while (i < length) {
32679
- j = i;
32680
- element = array[i];
32681
-
32682
- while (j && comparefn(array[j - 1], element) > 0) {
32683
- array[j] = array[--j];
32684
- }
32685
-
32686
- if (j !== i++) array[j] = element;
32687
- }
32688
-
32689
- return array;
32690
- };
32691
-
32692
- var merge = function (left, right, comparefn) {
32693
- var llength = left.length;
32694
- var rlength = right.length;
32695
- var lindex = 0;
32696
- var rindex = 0;
32697
- var result = [];
32698
-
32699
- while (lindex < llength || rindex < rlength) {
32700
- if (lindex < llength && rindex < rlength) {
32701
- result.push(comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]);
32702
- } else {
32703
- result.push(lindex < llength ? left[lindex++] : right[rindex++]);
32704
- }
32705
- }
32706
-
32707
- return result;
32708
- };
32709
-
32710
- var arraySort = mergeSort;
32711
-
32712
32772
  var firefox = engineUserAgent.match(/firefox\/(\d+)/i);
32713
32773
  var engineFfVersion = !!firefox && +firefox[1];
32714
32774
 
@@ -32717,24 +32777,25 @@
32717
32777
  var webkit = engineUserAgent.match(/AppleWebKit\/(\d+)\./);
32718
32778
  var engineWebkitVersion = !!webkit && +webkit[1];
32719
32779
 
32780
+ var Array$1 = global$1.Array;
32720
32781
  var aTypedArray = arrayBufferViewCore.aTypedArray;
32721
32782
  var exportTypedArrayMethod = arrayBufferViewCore.exportTypedArrayMethod;
32722
32783
  var Uint16Array$1 = global$1.Uint16Array;
32723
- var nativeSort = Uint16Array$1 && Uint16Array$1.prototype.sort; // WebKit
32724
-
32725
- var ACCEPT_INCORRECT_ARGUMENTS = !!nativeSort && !fails(function () {
32726
- var array = new Uint16Array$1(2);
32727
- array.sort(null);
32728
- array.sort({});
32729
- });
32730
- var STABLE_SORT = !!nativeSort && !fails(function () {
32784
+ var un$Sort = Uint16Array$1 && functionUncurryThis(Uint16Array$1.prototype.sort); // WebKit
32785
+
32786
+ var ACCEPT_INCORRECT_ARGUMENTS = !!un$Sort && !(fails(function () {
32787
+ un$Sort(new Uint16Array$1(2), null);
32788
+ }) && fails(function () {
32789
+ un$Sort(new Uint16Array$1(2), {});
32790
+ }));
32791
+ var STABLE_SORT = !!un$Sort && !fails(function () {
32731
32792
  // feature detection can be too slow, so check engines versions
32732
32793
  if (engineV8Version) return engineV8Version < 74;
32733
32794
  if (engineFfVersion) return engineFfVersion < 67;
32734
32795
  if (engineIsIeOrEdge) return true;
32735
32796
  if (engineWebkitVersion) return engineWebkitVersion < 602;
32736
32797
  var array = new Uint16Array$1(516);
32737
- var expected = Array(516);
32798
+ var expected = Array$1(516);
32738
32799
  var index, mod;
32739
32800
 
32740
32801
  for (index = 0; index < 516; index++) {
@@ -32743,7 +32804,7 @@
32743
32804
  expected[index] = index - 2 * mod + 3;
32744
32805
  }
32745
32806
 
32746
- array.sort(function (a, b) {
32807
+ un$Sort(array, function (a, b) {
32747
32808
  return (a / 4 | 0) - (b / 4 | 0);
32748
32809
  });
32749
32810
 
@@ -32767,25 +32828,9 @@
32767
32828
 
32768
32829
 
32769
32830
  exportTypedArrayMethod('sort', function sort(comparefn) {
32770
- var array = this;
32771
32831
  if (comparefn !== undefined) aCallable(comparefn);
32772
- if (STABLE_SORT) return nativeSort.call(array, comparefn);
32773
- aTypedArray(array);
32774
- var arrayLength = lengthOfArrayLike(array);
32775
- var items = Array(arrayLength);
32776
- var index;
32777
-
32778
- for (index = 0; index < arrayLength; index++) {
32779
- items[index] = array[index];
32780
- }
32781
-
32782
- items = arraySort(array, getSortCompare(comparefn));
32783
-
32784
- for (index = 0; index < arrayLength; index++) {
32785
- array[index] = items[index];
32786
- }
32787
-
32788
- return array;
32832
+ if (STABLE_SORT) return un$Sort(this, comparefn);
32833
+ return arraySort(aTypedArray(this), getSortCompare(comparefn));
32789
32834
  }, !STABLE_SORT || ACCEPT_INCORRECT_ARGUMENTS);
32790
32835
 
32791
32836
  class HtsgetReader {
@@ -33122,13 +33167,14 @@
33122
33167
  */
33123
33168
 
33124
33169
 
33125
- async getFeatures({
33126
- chr,
33127
- start,
33128
- end,
33129
- bpPerPixel,
33130
- visibilityWindow
33131
- }) {
33170
+ async getFeatures(_ref) {
33171
+ let {
33172
+ chr,
33173
+ start,
33174
+ end,
33175
+ bpPerPixel,
33176
+ visibilityWindow
33177
+ } = _ref;
33132
33178
  const genome = this.genome;
33133
33179
  const queryChr = genome ? genome.getChromosomeName(chr) : chr;
33134
33180
  const isWholeGenome = "all" === queryChr.toLowerCase(); // Various conditions that can create a feature load
@@ -34253,13 +34299,14 @@
34253
34299
  this.wgValues = {};
34254
34300
  }
34255
34301
 
34256
- async getFeatures({
34257
- chr,
34258
- start,
34259
- end,
34260
- bpPerPixel,
34261
- windowFunction
34262
- }) {
34302
+ async getFeatures(_ref) {
34303
+ let {
34304
+ chr,
34305
+ start,
34306
+ end,
34307
+ bpPerPixel,
34308
+ windowFunction
34309
+ } = _ref;
34263
34310
  const features = chr.toLowerCase() === "all" ? await this.getWGValues(windowFunction) : await this.reader.readFeatures(chr, start, chr, end, bpPerPixel, windowFunction);
34264
34311
  const isBigWig = this.reader.type === "bigwig";
34265
34312
 
@@ -34830,12 +34877,13 @@
34830
34877
  this.reader = new TDFReader(config, genome);
34831
34878
  }
34832
34879
 
34833
- async getFeatures({
34834
- chr,
34835
- start,
34836
- end,
34837
- bpPerPixel
34838
- }) {
34880
+ async getFeatures(_ref) {
34881
+ let {
34882
+ chr,
34883
+ start,
34884
+ end,
34885
+ bpPerPixel
34886
+ } = _ref;
34839
34887
  const genomicInterval = new GenomicInterval(chr, start, end);
34840
34888
  const genome = this.genome;
34841
34889
 
@@ -35125,6 +35173,7 @@
35125
35173
  py = this.margin;
35126
35174
  }
35127
35175
 
35176
+ const pixelWidth = options.pixelWidth;
35128
35177
  const cy = py + h / 2;
35129
35178
  const h2 = h / 2;
35130
35179
  const py2 = cy - h2 / 2;
@@ -35135,14 +35184,17 @@
35135
35184
 
35136
35185
  if (exonCount === 0) {
35137
35186
  // single-exon transcript
35138
- ctx.fillRect(coord.px, py, coord.pw, h); // Arrows
35187
+ const xLeft = Math.max(0, coord.px);
35188
+ const xRight = Math.min(pixelWidth, coord.px1);
35189
+ const width = Math.max(coord.pw, xRight - xLeft);
35190
+ ctx.fillRect(xLeft, py, width, h); // Arrows
35139
35191
  // Do not draw if strand is not +/-
35140
35192
 
35141
35193
  if (direction !== 0) {
35142
35194
  ctx.fillStyle = "white";
35143
35195
  ctx.strokeStyle = "white";
35144
35196
 
35145
- for (let x = coord.px + step / 2; x < coord.px1; x += step) {
35197
+ for (let x = xLeft + step / 2; x < xRight; x += step) {
35146
35198
  // draw arrowheads along central line indicating transcribed orientation
35147
35199
  IGVGraphics.strokeLine(ctx, x - direction * 2, cy - 2, x, cy);
35148
35200
  IGVGraphics.strokeLine(ctx, x - direction * 2, cy + 2, x, cy);
@@ -35155,7 +35207,6 @@
35155
35207
  // multi-exon transcript
35156
35208
  IGVGraphics.strokeLine(ctx, coord.px + 1, cy, coord.px1 - 1, cy); // center line for introns
35157
35209
 
35158
- const pixelWidth = options.pixelWidth;
35159
35210
  const xLeft = Math.max(0, coord.px) + step / 2;
35160
35211
  const xRight = Math.min(pixelWidth, coord.px1);
35161
35212
 
@@ -36435,16 +36486,17 @@
36435
36486
  return features;
36436
36487
  }
36437
36488
 
36438
- draw({
36439
- context,
36440
- renderSVG,
36441
- pixelTop,
36442
- pixelWidth,
36443
- pixelHeight,
36444
- features,
36445
- bpPerPixel,
36446
- bpStart
36447
- }) {
36489
+ draw(_ref) {
36490
+ let {
36491
+ context,
36492
+ renderSVG,
36493
+ pixelTop,
36494
+ pixelWidth,
36495
+ pixelHeight,
36496
+ features,
36497
+ bpPerPixel,
36498
+ bpStart
36499
+ } = _ref;
36448
36500
  IGVGraphics.fillRect(context, 0, 0, pixelWidth, pixelHeight, {
36449
36501
  'fillStyle': "rgb(255, 255, 255)"
36450
36502
  });
@@ -36917,8 +36969,8 @@
36917
36969
 
36918
36970
  for (let i = 0; i < this.tracks.length; i++) {
36919
36971
  if (i > 0) popupData.push('<hr/>');
36920
- popupData.push(`<div style=background-color:#f7f8fa;border-bottom-style:dashed;border-bottom-width:1px;margin-bottom:5px;margin-top:5px;font-size:medium><b>${this.tracks[i].name}</b></div>`);
36921
- const trackPopupData = this.tracks[i].popupData(clickState);
36972
+ popupData.push(`<div style=background-color:rgb(245,245,245);border-bottom-style:dashed;border-bottom-width:1px;padding-bottom:5px;padding-top:10px;font-weight:bold;font-size:larger >${this.tracks[i].name}</div>`);
36973
+ const trackPopupData = this.tracks[i].popupData(clickState, featuresArray[i]);
36922
36974
  popupData.push(...trackPopupData);
36923
36975
  }
36924
36976
 
@@ -37146,12 +37198,13 @@
37146
37198
  this.score = this.calculateScore(options, alignmentContainer);
37147
37199
  }
37148
37200
 
37149
- calculateScore({
37150
- position,
37151
- option,
37152
- direction,
37153
- tag
37154
- }, alignmentContainer) {
37201
+ calculateScore(_ref, alignmentContainer) {
37202
+ let {
37203
+ position,
37204
+ option,
37205
+ direction,
37206
+ tag
37207
+ } = _ref;
37155
37208
  if (!option) option = "BASE";
37156
37209
  const alignment = this.findAlignment(position);
37157
37210
 
@@ -39396,15 +39449,16 @@
39396
39449
  f: f$3
39397
39450
  };
39398
39451
 
39399
- var split = ''.split; // fallback for non-array-like ES3 and non-enumerable old V8 strings
39452
+ var Object$1 = global$1.Object;
39453
+ var split = functionUncurryThis(''.split); // fallback for non-array-like ES3 and non-enumerable old V8 strings
39400
39454
 
39401
39455
  var indexedObject = fails(function () {
39402
39456
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
39403
39457
  // eslint-disable-next-line no-prototype-builtins -- safe
39404
- return !Object('z').propertyIsEnumerable(0);
39458
+ return !Object$1('z').propertyIsEnumerable(0);
39405
39459
  }) ? function (it) {
39406
- return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
39407
- } : Object;
39460
+ return classofRaw(it) == 'String' ? split(it, '') : Object$1(it);
39461
+ } : Object$1;
39408
39462
 
39409
39463
  var toIndexedObject = function (it) {
39410
39464
  return indexedObject(requireObjectCoercible(it));
@@ -39421,20 +39475,43 @@
39421
39475
  } catch (error) {
39422
39476
  /* empty */
39423
39477
  }
39424
- if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
39478
+ if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]);
39425
39479
  };
39426
39480
  var objectGetOwnPropertyDescriptor = {
39427
39481
  f: f$2
39428
39482
  };
39429
39483
 
39484
+ var ceil = Math.ceil;
39485
+ var floor = Math.floor; // `ToIntegerOrInfinity` abstract operation
39486
+ // https://tc39.es/ecma262/#sec-tointegerorinfinity
39487
+
39488
+ var toIntegerOrInfinity = function (argument) {
39489
+ var number = +argument; // eslint-disable-next-line no-self-compare -- safe
39490
+
39491
+ return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
39492
+ };
39493
+
39430
39494
  var max = Math.max;
39431
- var min = Math.min; // Helper for a popular repeating case of the spec:
39495
+ var min$1 = Math.min; // Helper for a popular repeating case of the spec:
39432
39496
  // Let integer be ? ToInteger(index).
39433
39497
  // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
39434
39498
 
39435
39499
  var toAbsoluteIndex = function (index, length) {
39436
39500
  var integer = toIntegerOrInfinity(index);
39437
- return integer < 0 ? max(integer + length, 0) : min(integer, length);
39501
+ return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
39502
+ };
39503
+
39504
+ var min = Math.min; // `ToLength` abstract operation
39505
+ // https://tc39.es/ecma262/#sec-tolength
39506
+
39507
+ var toLength = function (argument) {
39508
+ return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
39509
+ };
39510
+
39511
+ // https://tc39.es/ecma262/#sec-lengthofarraylike
39512
+
39513
+ var lengthOfArrayLike = function (obj) {
39514
+ return toLength(obj.length);
39438
39515
  };
39439
39516
 
39440
39517
  var createMethod = function (IS_INCLUDES) {
@@ -39466,6 +39543,7 @@
39466
39543
  };
39467
39544
 
39468
39545
  var indexOf = arrayIncludes.indexOf;
39546
+ var push = functionUncurryThis([].push);
39469
39547
 
39470
39548
  var objectKeysInternal = function (object, names) {
39471
39549
  var O = toIndexedObject(object);
@@ -39473,11 +39551,11 @@
39473
39551
  var result = [];
39474
39552
  var key;
39475
39553
 
39476
- for (key in O) !hasOwnProperty_1(hiddenKeys$1, key) && hasOwnProperty_1(O, key) && result.push(key); // Don't enum bug & hidden keys
39554
+ for (key in O) !hasOwnProperty_1(hiddenKeys$1, key) && hasOwnProperty_1(O, key) && push(result, key); // Don't enum bug & hidden keys
39477
39555
 
39478
39556
 
39479
39557
  while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) {
39480
- ~indexOf(result, key) || result.push(key);
39558
+ ~indexOf(result, key) || push(result, key);
39481
39559
  }
39482
39560
 
39483
39561
  return result;
@@ -39504,10 +39582,12 @@
39504
39582
  f: f
39505
39583
  };
39506
39584
 
39585
+ var concat = functionUncurryThis([].concat); // all object keys, includes non-enumerable and symbols
39586
+
39507
39587
  var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
39508
39588
  var keys = objectGetOwnPropertyNames.f(anObject(it));
39509
39589
  var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
39510
- return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
39590
+ return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
39511
39591
  };
39512
39592
 
39513
39593
  var copyConstructorProperties = function (target, source) {
@@ -39579,7 +39659,7 @@
39579
39659
  FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); // contained in target
39580
39660
 
39581
39661
  if (!FORCED && targetProperty !== undefined) {
39582
- if (typeof sourceProperty === typeof targetProperty) continue;
39662
+ if (typeof sourceProperty == typeof targetProperty) continue;
39583
39663
  copyConstructorProperties(sourceProperty, targetProperty);
39584
39664
  } // add a flag to not completely full polyfills
39585
39665
 
@@ -39593,33 +39673,22 @@
39593
39673
  }
39594
39674
  };
39595
39675
 
39596
- var functionBindContext = function (fn, that, length) {
39597
- aCallable(fn);
39598
- if (that === undefined) return fn;
39599
-
39600
- switch (length) {
39601
- case 0:
39602
- return function () {
39603
- return fn.call(that);
39604
- };
39605
-
39606
- case 1:
39607
- return function (a) {
39608
- return fn.call(that, a);
39609
- };
39676
+ var FunctionPrototype = Function.prototype;
39677
+ var apply = FunctionPrototype.apply;
39678
+ var bind$1 = FunctionPrototype.bind;
39679
+ var call = FunctionPrototype.call; // eslint-disable-next-line es/no-reflect -- safe
39610
39680
 
39611
- case 2:
39612
- return function (a, b) {
39613
- return fn.call(that, a, b);
39614
- };
39681
+ var functionApply = typeof Reflect == 'object' && Reflect.apply || (bind$1 ? call.bind(apply) : function () {
39682
+ return call.apply(apply, arguments);
39683
+ });
39615
39684
 
39616
- case 3:
39617
- return function (a, b, c) {
39618
- return fn.call(that, a, b, c);
39619
- };
39620
- }
39685
+ var bind = functionUncurryThis(functionUncurryThis.bind); // optional / simple context binding
39621
39686
 
39622
- return function () {
39687
+ var functionBindContext = function (fn, that) {
39688
+ aCallable(fn);
39689
+ return that === undefined ? fn : bind ? bind(fn, that) : function
39690
+ /* ...args */
39691
+ () {
39623
39692
  return fn.apply(that, arguments);
39624
39693
  };
39625
39694
  };
@@ -39633,8 +39702,10 @@
39633
39702
  var set = global$1.setImmediate;
39634
39703
  var clear = global$1.clearImmediate;
39635
39704
  var process$1 = global$1.process;
39636
- var MessageChannel$1 = global$1.MessageChannel;
39637
39705
  var Dispatch = global$1.Dispatch;
39706
+ var Function$1 = global$1.Function;
39707
+ var MessageChannel$1 = global$1.MessageChannel;
39708
+ var String$1 = global$1.String;
39638
39709
  var counter = 0;
39639
39710
  var queue = {};
39640
39711
  var ONREADYSTATECHANGE = 'onreadystatechange';
@@ -39648,8 +39719,7 @@
39648
39719
  }
39649
39720
 
39650
39721
  var run = function (id) {
39651
- // eslint-disable-next-line no-prototype-builtins -- safe
39652
- if (queue.hasOwnProperty(id)) {
39722
+ if (hasOwnProperty_1(queue, id)) {
39653
39723
  var fn = queue[id];
39654
39724
  delete queue[id];
39655
39725
  fn();
@@ -39668,21 +39738,16 @@
39668
39738
 
39669
39739
  var post = function (id) {
39670
39740
  // old engines have not location.origin
39671
- global$1.postMessage(String(id), location.protocol + '//' + location.host);
39741
+ global$1.postMessage(String$1(id), location.protocol + '//' + location.host);
39672
39742
  }; // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
39673
39743
 
39674
39744
 
39675
39745
  if (!set || !clear) {
39676
39746
  set = function setImmediate(fn) {
39677
- var args = [];
39678
- var argumentsLength = arguments.length;
39679
- var i = 1;
39680
-
39681
- while (argumentsLength > i) args.push(arguments[i++]);
39747
+ var args = arraySlice(arguments, 1);
39682
39748
 
39683
39749
  queue[++counter] = function () {
39684
- // eslint-disable-next-line no-new-func -- spec requirement
39685
- (isCallable(fn) ? fn : Function(fn)).apply(undefined, args);
39750
+ functionApply(isCallable(fn) ? fn : Function$1(fn), undefined, args);
39686
39751
  };
39687
39752
 
39688
39753
  defer(counter);
@@ -39709,7 +39774,7 @@
39709
39774
  channel = new MessageChannel$1();
39710
39775
  port = channel.port2;
39711
39776
  channel.port1.onmessage = listener;
39712
- defer = functionBindContext(port.postMessage, port, 1); // Browsers with postMessage, skip WebWorkers
39777
+ defer = functionBindContext(port.postMessage, port); // Browsers with postMessage, skip WebWorkers
39713
39778
  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
39714
39779
  } else if (global$1.addEventListener && isCallable(global$1.postMessage) && !global$1.importScripts && location && location.protocol !== 'file:' && !fails(post)) {
39715
39780
  defer = post;
@@ -42426,7 +42491,8 @@
42426
42491
  }, function (t, e, r) {
42427
42492
 
42428
42493
  t.exports = class {
42429
- constructor(t = {}) {
42494
+ constructor() {
42495
+ let t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
42430
42496
  if (!(t.maxSize && t.maxSize > 0)) throw new TypeError("`maxSize` must be a number greater than 0");
42431
42497
  this.maxSize = t.maxSize, this.cache = new Map(), this.oldCache = new Map(), this._size = 0;
42432
42498
  }
@@ -54948,7 +55014,7 @@
54948
55014
  message = "Sequence mismatch. Is this the correct genome for the loaded CRAM?";
54949
55015
  }
54950
55016
 
54951
- Alert$1.presentAlert(new Error(message));
55017
+ Alert.presentAlert(new Error(message));
54952
55018
  throw error;
54953
55019
  }
54954
55020
  }
@@ -55126,7 +55192,10 @@
55126
55192
  return Buffer.from(arrayBuffer);
55127
55193
  }
55128
55194
 
55129
- async read(buffer, offset = 0, length = Infinity, position = 0) {
55195
+ async read(buffer) {
55196
+ let offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
55197
+ let length = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Infinity;
55198
+ let position = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
55130
55199
  let readPosition = position;
55131
55200
 
55132
55201
  if (readPosition === null) {
@@ -55155,11 +55224,12 @@
55155
55224
  }
55156
55225
 
55157
55226
  class BufferCache {
55158
- constructor({
55159
- fetch,
55160
- size = 10000000,
55161
- chunkSize = 32768
55162
- }) {
55227
+ constructor(_ref) {
55228
+ let {
55229
+ fetch,
55230
+ size = 10000000,
55231
+ chunkSize = 32768
55232
+ } = _ref;
55163
55233
  this.fetch = fetch;
55164
55234
  this.chunkSize = chunkSize;
55165
55235
  this.lruCache = new QuickLRU({
@@ -55185,10 +55255,11 @@
55185
55255
 
55186
55256
  const chunks = await Promise.all(fetches);
55187
55257
  const chunksOffset = position - chunks[0].chunkNumber * this.chunkSize;
55188
- chunks.forEach(({
55189
- data,
55190
- chunkNumber
55191
- }) => {
55258
+ chunks.forEach(_ref2 => {
55259
+ let {
55260
+ data,
55261
+ chunkNumber
55262
+ } = _ref2;
55192
55263
  const chunkPositionStart = chunkNumber * this.chunkSize;
55193
55264
  let copyStart = 0;
55194
55265
  let copyEnd = this.chunkSize;
@@ -55218,7 +55289,9 @@
55218
55289
  } // From https://github.com/sindresorhus/quick-lru
55219
55290
 
55220
55291
  class QuickLRU {
55221
- constructor(options = {}) {
55292
+ constructor() {
55293
+ let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
55294
+
55222
55295
  if (!(options.maxSize && options.maxSize > 0)) {
55223
55296
  throw new TypeError('`maxSize` must be a number greater than 0');
55224
55297
  }
@@ -56887,7 +56960,7 @@
56887
56960
  this.highlightedAlignmentReadNamed = clickedAlignment.readName;
56888
56961
  this.browser.presentMultiLocusPanel(clickedAlignment, referenceFrame);
56889
56962
  } else {
56890
- Alert$1.presentAlert(`Reference does not contain chromosome: ${clickedAlignment.mate.chr}`);
56963
+ Alert.presentAlert(`Reference does not contain chromosome: ${clickedAlignment.mate.chr}`);
56891
56964
  }
56892
56965
  }
56893
56966
  },
@@ -56903,9 +56976,9 @@
56903
56976
  const seqstring = alignment.seq; //.map(b => String.fromCharCode(b)).join("");
56904
56977
 
56905
56978
  if (!seqstring || "*" === seqstring) {
56906
- Alert$1.presentAlert("Read sequence: *");
56979
+ Alert.presentAlert("Read sequence: *");
56907
56980
  } else {
56908
- Alert$1.presentAlert(seqstring);
56981
+ Alert.presentAlert(seqstring);
56909
56982
  }
56910
56983
  }
56911
56984
  });
@@ -57989,7 +58062,7 @@
57989
58062
  this.header = await this.getHeader(); // cricital, don't remove'
57990
58063
 
57991
58064
  if (undefined === this.visibilityWindow && this.config.indexed !== false) {
57992
- const fn = this.config.url instanceof File ? this.config.url.name : this.config.url;
58065
+ const fn = FileUtils.isFile(this.config.url) ? this.config.url.name : this.config.url;
57993
58066
 
57994
58067
  if (isString(fn) && fn.toLowerCase().includes("gnomad")) {
57995
58068
  this.visibilityWindow = 1000; // these are known to be very dense
@@ -58088,15 +58161,16 @@
58088
58161
  this.nVariantRows = count;
58089
58162
  }
58090
58163
 
58091
- draw({
58092
- context,
58093
- pixelWidth,
58094
- pixelHeight,
58095
- bpPerPixel,
58096
- bpStart,
58097
- pixelTop,
58098
- features
58099
- }) {
58164
+ draw(_ref) {
58165
+ let {
58166
+ context,
58167
+ pixelWidth,
58168
+ pixelHeight,
58169
+ bpPerPixel,
58170
+ bpStart,
58171
+ pixelTop,
58172
+ features
58173
+ } = _ref;
58100
58174
  IGVGraphics.fillRect(context, 0, pixelTop, pixelWidth, pixelHeight, {
58101
58175
  'fillStyle': "rgb(255, 255, 255)"
58102
58176
  });
@@ -59761,13 +59835,14 @@
59761
59835
  this.genome = genome;
59762
59836
  }
59763
59837
 
59764
- async getFeatures({
59765
- chr,
59766
- start,
59767
- end,
59768
- bpPerPixel,
59769
- visibilityWindow
59770
- }) {
59838
+ async getFeatures(_ref) {
59839
+ let {
59840
+ chr,
59841
+ start,
59842
+ end,
59843
+ bpPerPixel,
59844
+ visibilityWindow
59845
+ } = _ref;
59771
59846
  const genome = this.genome;
59772
59847
 
59773
59848
  if (!this.featureCache) {
@@ -59893,12 +59968,13 @@
59893
59968
  return this.height;
59894
59969
  }
59895
59970
 
59896
- draw({
59897
- context,
59898
- referenceFrame,
59899
- pixelWidth,
59900
- pixelHeight
59901
- }) {
59971
+ draw(_ref) {
59972
+ let {
59973
+ context,
59974
+ referenceFrame,
59975
+ pixelWidth,
59976
+ pixelHeight
59977
+ } = _ref;
59902
59978
  const chr = referenceFrame.chr;
59903
59979
  const chromosome = referenceFrame.genome.getChromosome(chr);
59904
59980
 
@@ -59955,15 +60031,16 @@
59955
60031
 
59956
60032
  }
59957
60033
 
59958
- function drawIdeogram({
59959
- ctx,
59960
- chr,
59961
- referenceFrame,
59962
- genome,
59963
- width,
59964
- height,
59965
- stainColors
59966
- }) {
60034
+ function drawIdeogram(_ref2) {
60035
+ let {
60036
+ ctx,
60037
+ chr,
60038
+ referenceFrame,
60039
+ genome,
60040
+ width,
60041
+ height,
60042
+ stainColors
60043
+ } = _ref2;
59967
60044
  const shim = 1;
59968
60045
  const shim2 = 0.5 * shim;
59969
60046
  const ideogramTop = 0;
@@ -60179,24 +60256,17 @@
60179
60256
  }
60180
60257
 
60181
60258
  if (featureList) {
60182
- const rowFeatureCount = [];
60183
-
60184
- for (let feature of featureList) {
60185
- junctionRenderingContext.referenceFrame = options.viewport.referenceFrame;
60186
- junctionRenderingContext.referenceFrameStart = junctionRenderingContext.referenceFrame.start;
60187
- junctionRenderingContext.referenceFrameEnd = junctionRenderingContext.referenceFrameStart + junctionRenderingContext.referenceFrame.toBP($(options.viewport.contentDiv).width()); // For a given viewport, records where features that are < 2px in width have been rendered already.
60188
- // This prevents wasteful rendering of multiple such features onto the same pixels.
60259
+ junctionRenderingContext.referenceFrame = options.viewport.referenceFrame;
60260
+ junctionRenderingContext.referenceFrameStart = junctionRenderingContext.referenceFrame.start;
60261
+ junctionRenderingContext.referenceFrameEnd = junctionRenderingContext.referenceFrameStart + junctionRenderingContext.referenceFrame.toBP($(options.viewport.contentDiv).width()); // For a given viewport, records where features that are < 2px in width have been rendered already.
60262
+ // This prevents wasteful rendering of multiple such features onto the same pixels.
60189
60263
 
60190
- junctionRenderingContext.featureZoomOutTracker = {};
60264
+ junctionRenderingContext.featureZoomOutTracker = {};
60191
60265
 
60192
- for (let feature of featureList) {
60193
- if (feature.end < bpStart) continue;
60194
- if (feature.start > bpEnd) break;
60195
- const row = this.displayMode === 'COLLAPSED' ? 0 : feature.row;
60196
- const featureDensity = pixelWidth / rowFeatureCount[row];
60197
- options.drawLabel = options.labelAllFeatures || featureDensity > 10;
60198
- this.renderJunction(feature, bpStart, bpPerPixel, pixelHeight, ctx, options);
60199
- }
60266
+ for (let feature of featureList) {
60267
+ if (feature.end < bpStart) continue;
60268
+ if (feature.start > bpEnd) break;
60269
+ this.renderJunction(feature, bpStart, bpPerPixel, pixelHeight, ctx);
60200
60270
  }
60201
60271
  } else {
60202
60272
  console.log("No feature list");
@@ -62413,14 +62483,16 @@
62413
62483
  return this.height;
62414
62484
  }
62415
62485
 
62416
- draw({
62417
- context,
62418
- referenceFrame,
62419
- pixelWidth,
62420
- pixelHeight,
62421
- bpPerPixel,
62422
- bpStart
62423
- }) {
62486
+ draw(_ref) {
62487
+ let {
62488
+ context,
62489
+ referenceFrame,
62490
+ pixelWidth,
62491
+ pixelHeight,
62492
+ bpPerPixel,
62493
+ bpStart
62494
+ } = _ref;
62495
+
62424
62496
  if (GenomeUtils.isWholeGenomeView(referenceFrame.chr)) {
62425
62497
  this.drawWholeGenome({
62426
62498
  context,
@@ -62439,12 +62511,13 @@
62439
62511
  }
62440
62512
  }
62441
62513
 
62442
- drawWholeGenome({
62443
- context,
62444
- pixelWidth,
62445
- pixelHeight,
62446
- bpPerPixel
62447
- }) {
62514
+ drawWholeGenome(_ref2) {
62515
+ let {
62516
+ context,
62517
+ pixelWidth,
62518
+ pixelHeight,
62519
+ bpPerPixel
62520
+ } = _ref2;
62448
62521
  context.save();
62449
62522
  IGVGraphics.fillRect(context, 0, 0, pixelWidth, pixelHeight, {
62450
62523
  'fillStyle': 'white'
@@ -62461,13 +62534,14 @@
62461
62534
  context.restore();
62462
62535
  }
62463
62536
 
62464
- doDraw({
62465
- context,
62466
- referenceFrame,
62467
- pixelWidth,
62468
- pixelHeight,
62469
- bpStart
62470
- }) {
62537
+ doDraw(_ref3) {
62538
+ let {
62539
+ context,
62540
+ referenceFrame,
62541
+ pixelWidth,
62542
+ pixelHeight,
62543
+ bpStart
62544
+ } = _ref3;
62471
62545
  context.clearRect(0, 0, pixelWidth, pixelHeight);
62472
62546
  const tickHeight = 6;
62473
62547
  const shim = 2;
@@ -62649,7 +62723,7 @@
62649
62723
  class: 'igv-container'
62650
62724
  });
62651
62725
  parentDiv.appendChild(this.root);
62652
- Alert$1.init(this.root);
62726
+ Alert.init(this.root);
62653
62727
  this.columnContainer = div$1({
62654
62728
  class: 'igv-column-container'
62655
62729
  });
@@ -63243,9 +63317,12 @@
63243
63317
  }
63244
63318
 
63245
63319
  getRulerTrackView() {
63246
- const list = this.trackViews.filter(({
63247
- track
63248
- }) => 'ruler' === track.id);
63320
+ const list = this.trackViews.filter(_ref => {
63321
+ let {
63322
+ track
63323
+ } = _ref;
63324
+ return 'ruler' === track.id;
63325
+ });
63249
63326
  return list.length > 0 ? list[0] : undefined;
63250
63327
  }
63251
63328
  /**
@@ -63279,7 +63356,7 @@
63279
63356
  const newTrack = await this.createTrack(config);
63280
63357
 
63281
63358
  if (undefined === newTrack) {
63282
- Alert$1.presentAlert(new Error(`Unknown file type: ${config.url || config}`), undefined);
63359
+ Alert.presentAlert(new Error(`Unknown file type: ${config.url || config}`), undefined);
63283
63360
  return newTrack;
63284
63361
  } // Set order field of track here. Otherwise track order might get shuffled during asynchronous load
63285
63362
 
@@ -63333,7 +63410,7 @@
63333
63410
  }
63334
63411
 
63335
63412
  msg += ": " + config.url;
63336
- Alert$1.presentAlert(new Error(msg), undefined);
63413
+ Alert.presentAlert(new Error(msg), undefined);
63337
63414
  } finally {
63338
63415
  // TODO: If loadTrack() is called individually - not via loadTrackList() - call this.resize()
63339
63416
  if (false === doResize) ; else {
@@ -63842,7 +63919,7 @@
63842
63919
  const success = await this.search(string, init);
63843
63920
 
63844
63921
  if (!success) {
63845
- Alert$1.presentAlert(new Error(`Unrecognized locus: <b> ${string} </b>`));
63922
+ Alert.presentAlert(new Error(`Unrecognized locus: <b> ${string} </b>`));
63846
63923
  }
63847
63924
 
63848
63925
  return success;
@@ -63893,7 +63970,7 @@
63893
63970
  async loadSampleInformation(url) {
63894
63971
  var name = url;
63895
63972
 
63896
- if (url instanceof File) {
63973
+ if (isFile(url)) {
63897
63974
  name = url.name;
63898
63975
  }
63899
63976