"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[26,7658],{97658:(e,t,s)=>{s.r(t),s.d(t,{default:()=>u});var a=s(56798),r=s(85291),n=s(16979),o=s(43800);class u extends a.BaseFeatureDataAdapter{constructor(e,t,s){super(e,t,s);const a=(0,o.readConfObject)(e,"features");this.features=u.makeFeatures(a||[])}static makeFeatures(e){const t=new Map;for(const s of e)if(s){const e=this.makeFeature(s),a=e.get("refName");let r=t.get(a);r||(r=[],t.set(a,r)),r.push(e)}for(const e of t.values())e.sort(((e,t)=>e.get("start")-t.get("start")));return t}static makeFeature(e){return new r.Z(e)}async getRefNames(){return[...this.features.keys()]}async getRefNameAliases(){return[...this.features.values()].map((e=>({refName:e[0].get("refName"),aliases:e[0].get("aliases")})))}getFeatures(e){const{refName:t,start:s,end:a}=e;return(0,n.ObservableCreate)((async e=>{const r=this.features.get(t)||[];for(const t of r)t.get("end")>s&&t.get("start")<a&&e.next(t);e.complete()}))}freeResources(){}}},20026:(e,t,s)=>{s.r(t),s.d(t,{default:()=>o});var a=s(56798),r=s(43800),n=s(97658);class o extends a.BaseAdapter{constructor(e,t,s){super(e,t,s);const a=(0,r.readConfObject)(e,"features");this.features=n.default.makeFeatures(a||[])}async getRegions(){const e=[];for(const[t,s]of this.features){let a;for(const r of s)a&&a.end>=r.get("start")&&a.start<=r.get("end")?a.end=r.get("end"):(a&&e.push(a),a={refName:t,start:r.get("start"),end:r.get("end")});a&&e.push(a)}return e.sort(((e,t)=>e.refName.localeCompare(t.refName))),e}freeResources(){}}}}]);
//# sourceMappingURL=26.7b03bba6.chunk.js.map