"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[8900],{58900:(e,t,a)=>{a.r(t),a.d(t,{default:()=>C});var n=a(66204),r=a(29520),c=a(80013),s=a(46338),l=a(53447),o=a(39780),h=a(70539),i=a(62301),u=a(7146),d=a(35421),m=a(88196),g=a(38684),p=a(80846),b=a(90872);const k=(0,g.ZL)()({dialogContent:{width:"40em"}}),C=(0,p.observer)((function({model:e,handleClose:t}){const{classes:a}=k(),[g,p]=(0,n.useState)(""),[C,E]=(0,n.useState)(!0),[S,Z]=(0,n.useState)(!0),[w,y]=(0,n.useState)(!0);let v;try{new RegExp(g)}catch(e){v=e}return n.createElement(d.Dialog,{maxWidth:"xl",open:!0,onClose:t,title:"Sequence search"},n.createElement(r.Z,{className:a.dialogContent},n.createElement(c.Z,null,"Supply a sequence to search for. A track will be created with the resulting matches once submitted. You can also supply regex style expressions e.g. AACT(C|T)."),n.createElement(s.Z,{value:g,onChange:e=>p(e.target.value),helperText:"Sequence search pattern"}),n.createElement(l.Z,null,n.createElement(o.Z,{control:n.createElement(h.Z,{checked:C,onChange:e=>E(e.target.checked)}),label:"Search forward strand"}),n.createElement(o.Z,{control:n.createElement(h.Z,{checked:S,onChange:e=>Z(e.target.checked)}),label:"Search reverse strand"}),n.createElement(o.Z,{control:n.createElement(h.Z,{checked:w,onChange:e=>y(e.target.checked)}),label:"Case insensitive"})),v?n.createElement(c.Z,{color:"error"},`${v}`):null),n.createElement(i.Z,null,n.createElement(u.Z,{onClick:()=>{if(g){const t="sequence_search_"+ +Date.now(),a=(0,b.getSession)(e),{assemblyManager:n}=a,r=e.assemblyNames[0];(0,b.isSessionWithAddTracks)(a)&&(a.addTrackConf({trackId:t,name:`Sequence search ${g}`,assemblyNames:[r],type:"FeatureTrack",adapter:{type:"SequenceSearchAdapter",search:g,searchForward:C,searchReverse:S,caseInsensitive:w,sequenceAdapter:(0,m.getSnapshot)(n.get(r)?.configuration.sequence.adapter)}}),e.showTrack(t))}t()},variant:"contained",color:"primary"},"Submit"),n.createElement(u.Z,{onClick:()=>t(),variant:"contained",color:"secondary"},"Close")))}))}}]);
//# sourceMappingURL=8900.872bc3be.chunk.js.map