"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[4234],{14234:(e,t,a)=>{a.r(t),a.d(t,{default:()=>c});var s=a(87368),r=a(46377),i=a(99546),n=a(99834),o=a(66885),u=a(37957);class c extends r.BaseFeatureDataAdapter{static capabilities=["hasResolution","hasLocalStats","hasGlobalStats"];async setupPre(e){const{statusCallback:t=()=>{}}=e||{},a=this.pluginManager,r=new s.j({filehandle:(0,n.openLocation)(this.getConf("bigWigLocation"),a)});return{bigwig:r,header:await(0,i.updateStatus)("Downloading bigwig header",t,()=>r.getHeader(e))}}async setup(e){return this.setupP||(this.setupP=this.setupPre(e).catch(e=>{throw this.setupP=void 0,e})),this.setupP}async getRefNames(e){const{header:t}=await this.setup(e);return Object.keys(t.refsByName)}async refIdToName(e){const{header:t}=await this.setup();return t.refsByNumber[e]?.name}async getGlobalStats(e){const{header:t}=await this.setup(e);return(0,u.WD)(t.totalSummary)}getFeatures(e,t={}){const{refName:a,start:s,end:r}=e,{bpPerPx:n=0,resolution:u=1,stopToken:c,statusCallback:l=()=>{}}=t;return(0,o.ObservableCreate)(async o=>{const c=this.getConf("source"),h=this.getConf("resolutionMultiplier"),{bigwig:g}=await this.setup(t),p=await(0,i.updateStatus)("Downloading bigwig data",l,()=>g.getFeatures(a,s,r,{...t,basesPerSpan:n/u*h}));for(const t of p){c&&(t.source=c);const s=`${c}:${e.refName}:${t.start}-${t.end}`;t.refName=a,t.uniqueId=s,o.next({get:e=>t[e],id:()=>s,toJSON:()=>t})}o.complete()},c)}async getMultiRegionFeatureDensityStats(e){return{featureDensity:0}}}}}]);
//# sourceMappingURL=4234.2d124eee.chunk.js.map