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