"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[946],{90946:(e,t,s)=>{s.r(t),s.d(t,{default:()=>c});var a=s(46377),r=s(99546),n=s(66885),i=s(44728),o=s(82088);class c extends a.BaseFeatureDataAdapter{async configure(){const e=await(this.getSubAdapter?.(this.getConf("sequenceAdapter")));if(!e)throw new Error("Error getting subadapter");return e.dataAdapter}async getRefNames(){return(await this.configure()).getRefNames()}getFeatures(e,t){return(0,n.ObservableCreate)((async s=>{const a=await this.configure(),n=e.end+1e4,c=Math.max(0,e.start-1e4);if(n<0||c>n)return void s.complete();const d=a.getFeatures({...e,start:c,end:n},t),f=await(0,i._)(d.pipe((0,o.$)())),u=f[0]?.get("seq")||"",h=this.getConf("search"),g=this.getConf("searchForward"),l=this.getConf("searchReverse"),m=this.getConf("caseInsensitive"),p=new RegExp(h,"g"+(m?"i":""));if(h){if(g){const t=u.matchAll(p);for(const a of t){const t=c+a.index,n=c+a.index+a[0].length;(0,r.doesIntersect2)(t,n,e.start,e.end)&&s.next(new r.SimpleFeature({uniqueId:`${this.id}-${t}-${a[0]}-pos`,refName:e.refName,start:t,end:n,name:a[0],strand:1}))}}if(l){const t=(0,r.revcom)(u).matchAll(p);for(const a of t){const t=n-a.index,i=n-a.index-a[0].length;(0,r.doesIntersect2)(i,t,e.start,e.end)&&s.next(new r.SimpleFeature({uniqueId:`${this.id}-${i}-${a[0]}-neg`,refName:e.refName,start:i,end:t,name:a[0],strand:-1}))}}}s.complete()}))}freeResources(){}}}}]);
//# sourceMappingURL=946.a06b170c.chunk.js.map