import{r as o}from"./rxjs-DT7GVwt0.js";import{S as n}from"./simpleFeature-B-AvwKyW.js";import f from"./FromConfigAdapter-DJPUaDhS.js";import{a7 as u,a8 as m}from"./index-Bm2SqMk3.js";import"./index-6rN3ss-L.js";class x extends f{getFeatures(e){return o.ObservableCreate(async r=>{const t=(await u(super.getFeatures(e).pipe(m())))[0];r.next(new n({...t.toJSON(),uniqueId:`${t.id()}:${e.start}-${e.end}`,end:e.end,start:e.start,seq:t.get("seq").slice(Math.max(e.start-t.get("start"),0),Math.max(e.end-t.get("start"),0))})),r.complete()})}async getRegions(){const e=[];for(const[r,a]of this.features){let t;for(const s of a)t&&t.end>=s.get("start")&&t.start<=s.get("end")?t.end=s.get("end"):(t&&e.push(t),t={refName:r,start:s.get("start"),end:s.get("end")});t&&e.push(t)}return e}freeResources(){}}export{x as default};
