"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 k}});var n=r(33028),a=r(32723),u=r(34795),s=r(9249),i=r(87371),c=r(45754),o=r(86906),f=r(78982),p=r(29598),l=r(33528),v=r(81073),b=r(26131),h=r(14956),d=r(91750),w=r(84040),Z=r(9077),g=r(66518),k=function(e){(0,c.Z)(r,e);var t=(0,o.Z)(r);function r(e,n,a){var u;return(0,s.Z)(this,r),(u=t.call(this,e,n,a)).bigwig=void 0,u.bigwig=new f.B({filehandle:(0,l.openLocation)((0,Z.readConfObject)(e,"bigWigLocation"),u.pluginManager)}),u}return(0,i.Z)(r,[{key:"setup",value:function(){var e=(0,u.Z)((0,a.Z)().mark((function e(t){var r,n,u=this;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,e.abrupt("return",(0,v.updateStatus)("Downloading bigwig header",n,(function(){return u.bigwig.getHeader(t)})));case 2:case"end":return e.stop()}}),e)})));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.refsByName,e.abrupt("return",Object.keys(n));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.refsByNumber,e.abrupt("return",null===(r=u[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.totalSummary,e.abrupt("return",(0,g.I9)(n));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,l=r.resolution,v=void 0===l?1:l,Z=r.statusCallback,g=void 0===Z?function(){}:Z;return(0,b.ObservableCreate)(function(){var e=(0,u.Z)((0,a.Z)().mark((function e(u){return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return g("Downloading bigwig data"),e.next=3,t.bigwig.getFeatureStream(s,i,c,(0,n.Z)((0,n.Z)({},r),{},{basesPerSpan:f/v}));case 3:e.sent.pipe((0,d.J)(),(0,w.U)((function(e){return new h.Z({id:"".concat(s,":").concat(e.start,"-").concat(e.end),data:(0,n.Z)((0,n.Z)({},e),{},{refName:s})})}))).subscribe(u);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.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);k.capabilities=["hasResolution","hasLocalStats","hasGlobalStats"]}}]);
//# sourceMappingURL=2094.3347cdf2.chunk.js.map