"use strict";(self.webpackChunk_jbrowse_web=self.webpackChunk_jbrowse_web||[]).push([[8873],{98873:function(e,n,r){r.r(n),r.d(n,{default:function(){return g}});var t=r(33028),a=r(32723),u=r(34795),i=r(9249),c=r(87371),s=r(45754),o=r(13820),f=r(20783),p=r(33528),h=r(26131),v=r(78022),l=r(6556),d=r(78867),g=function(e){(0,s.Z)(r,e);var n=(0,o.Z)(r);function r(){var e;(0,i.Z)(this,r);for(var t=arguments.length,a=new Array(t),u=0;u<t;u++)a[u]=arguments[u];return(e=n.call.apply(n,[this].concat(a))).configured=void 0,e}return(0,c.Z)(r,[{key:"configurePre",value:function(){var e=(0,u.Z)((0,a.Z)().mark((function e(){var n,r,t,u,i,c,s,o;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.pluginManager,r=this.getConf("vcfGzLocation"),t=this.getConf(["index","location"]),u=this.getConf(["index","indexType"]),i=(0,p.openLocation)(r,n),c="CSI"===u,s=new v.pC({filehandle:i,csiFilehandle:c?(0,p.openLocation)(t,n):void 0,tbiFilehandle:c?void 0:(0,p.openLocation)(t,n),chunkCacheSize:50*Math.pow(2,20),chunkSizeLimit:1e9}),e.next=9,s.getHeader();case 9:return o=e.sent,e.abrupt("return",{vcf:s,parser:new l.Z({header:o})});case 11:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"configure",value:function(){var e=(0,u.Z)((0,a.Z)().mark((function e(){var n=this;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.configured||(this.configured=this.configurePre().catch((function(e){throw n.configured=void 0,e}))),e.abrupt("return",this.configured);case 2:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getRefNames",value:function(){var e=(0,u.Z)((0,a.Z)().mark((function e(){var n,r,t,u=arguments;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=u.length>0&&void 0!==u[0]?u[0]:{},e.next=3,this.configure();case 3:return r=e.sent,t=r.vcf,e.abrupt("return",t.getReferenceSequenceNames(n));case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getHeader",value:function(){var e=(0,u.Z)((0,a.Z)().mark((function e(){var n,r;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.configure();case 2:return n=e.sent,r=n.vcf,e.abrupt("return",r.getHeader());case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getMetadata",value:function(){var e=(0,u.Z)((0,a.Z)().mark((function e(){var n,r;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.configure();case 2:return n=e.sent,r=n.parser,e.abrupt("return",r.getMetadata());case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getFeatures",value:function(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,h.ObservableCreate)(function(){var i=(0,u.Z)((0,a.Z)().mark((function u(i){var c,s,o,f,p,h;return(0,a.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return c=e.refName,s=e.start,o=e.end,a.next=3,n.configure();case 3:return f=a.sent,p=f.vcf,h=f.parser,a.next=8,p.getLines(c,s,o,(0,t.Z)({lineCallback:function(e,r){i.next(new d.Z({variant:h.parseLine(e),parser:h,id:"".concat(n.id,"-vcf-").concat(r)}))}},r));case 8:i.complete();case 9:case"end":return a.stop()}}),u)})));return function(e){return i.apply(this,arguments)}}(),r.signal)}},{key:"freeResources",value:function(){}}]),r}(f.BaseFeatureDataAdapter)}}]);
//# sourceMappingURL=8873.80c7ad9e.chunk.js.map