"use strict";(self.webpackChunk_jbrowse_web=self.webpackChunk_jbrowse_web||[]).push([[2094],{22094:function(e,t,r){r.r(t),r.d(t,{default:function(){return w}});var n=r(33028),a=r(32723),u=r(34795),s=r(9249),i=r(87371),c=r(45754),o=r(13820),f=r(87444),p=r(29598),h=r(33528),l=r(81073),v=r(26131),d=r(66518),w=function(e){(0,c.Z)(r,e);var t=(0,o.Z)(r);function r(){var e;(0,s.Z)(this,r);for(var n=arguments.length,a=new Array(n),u=0;u<n;u++)a[u]=arguments[u];return(e=t.call.apply(t,[this].concat(a))).setupP=void 0,e}return(0,i.Z)(r,[{key:"setupPre",value:function(){var e=(0,u.Z)((0,a.Z)().mark((function e(t){var r,n,u,s;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(t||{}).statusCallback,n=void 0===r?function(){}:r,u=new f.B({filehandle:(0,h.openLocation)(this.getConf("bigWigLocation"),this.pluginManager)}),e.next=4,(0,l.updateStatus)("Downloading bigwig header",n,(function(){return u.getHeader(t)}));case 4:return s=e.sent,e.abrupt("return",{bigwig:u,header:s});case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"setup",value:function(){var e=(0,u.Z)((0,a.Z)().mark((function e(t){var r=this;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setupP||(this.setupP=this.setupPre(t).catch((function(e){throw r.setupP=void 0,e}))),e.abrupt("return",this.setupP);case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getRefNames",value:function(){var e=(0,u.Z)((0,a.Z)().mark((function e(t){var r,n;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.setup(t);case 2:return r=e.sent,n=r.header,e.abrupt("return",Object.keys(n.refsByName));case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"refIdToName",value:function(){var e=(0,u.Z)((0,a.Z)().mark((function e(t){var r,n,u;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.setup();case 2:return n=e.sent,u=n.header,e.abrupt("return",null===(r=u.refsByNumber[t])||void 0===r?void 0:r.name);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getGlobalStats",value:function(){var e=(0,u.Z)((0,a.Z)().mark((function e(t){var r,n;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.setup(t);case 2:return r=e.sent,n=r.header,e.abrupt("return",(0,d.I9)(n.totalSummary));case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getFeatures",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=e.refName,i=e.start,c=e.end,o=r.bpPerPx,f=void 0===o?0:o,p=r.signal,h=r.resolution,l=void 0===h?1:h,d=r.statusCallback,w=void 0===d?function(){}:d;return(0,v.ObservableCreate)(function(){var o=(0,u.Z)((0,a.Z)().mark((function u(o){var p,h,v,d,b,g;return(0,a.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return w("Downloading bigwig data"),p=t.getConf("source"),a.next=4,t.setup(r);case 4:return h=a.sent,v=h.bigwig,a.next=8,v.getFeatures(s,i,c,(0,n.Z)((0,n.Z)({},r),{},{basesPerSpan:f/l}));case 8:for(d=a.sent,b=function(t){var r=d[t];p&&(r.source=p);var n="".concat(p,":").concat(e.refName,":").concat(r.start,"-").concat(r.end);r.refName=s,r.uniqueId=n,o.next({get:function(e){return r[e]},id:function(){return n},toJSON:function(){return r}})},g=0;g<d.length;g++)b(g);o.complete();case 12:case"end":return a.stop()}}),u)})));return function(e){return o.apply(this,arguments)}}(),p)}},{key:"estimateRegionsStats",value:function(){var e=(0,u.Z)((0,a.Z)().mark((function e(t){return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{featureDensity:0});case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"freeResources",value:function(){}}]),r}(p.BaseFeatureDataAdapter);w.capabilities=["hasResolution","hasLocalStats","hasGlobalStats"]}}]);
//# sourceMappingURL=2094.b4d36aa7.chunk.js.map