"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[4700],{64700:(e,n,t)=>{t.r(n),t.d(n,{default:()=>m});var s=t(87083),a=t(84144),i=t(95054),l=t(68446),o=t(7552),r=t(31409),c=t.n(r),u=t(69500);function d({value:e}){const[n,t]=(0,o.useState)(!1),[s,a]=(0,o.useState)(!1),i=String(e);return i.length>100?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("button",{type:"button",onClick:()=>{c()(i),a(!0),setTimeout((()=>{a(!1)}),700)},children:s?"Copied to clipboard":"Copy"}),(0,u.jsx)("button",{type:"button",onClick:()=>{t((e=>!e))},children:n?"Show less":"Show more"}),(0,u.jsx)("div",{children:n?i:`${i.slice(0,100)}...`})]}):(0,u.jsx)("div",{children:i})}var h=t(99546),f=t(65895);const b=(0,o.lazy)((()=>t.e(3301).then(t.bind(t,33301)))),v=(0,l.observer)((function({model:e,feat:n}){const{view:t,level:s,trackId:a}=e;return(0,u.jsxs)("ul",{children:["LinearSyntenyView"===t.type?(0,u.jsx)("li",{children:(0,u.jsx)(f.A,{href:"#",onClick:a=>{a.preventDefault();const{views:i}=t;if(void 0!==s)i[s]?.navTo(n),i[s+1]?.navTo(n.mate);else{const t=n,s=n.mate,a=t.assemblyName,l=s.assemblyName,o=i.find((e=>e.assemblyNames[0]===a)),r=i.find((e=>e.assemblyNames[0]===l));o&&r||(0,h.getSession)(e).notify([o?`Unable to find ${(0,h.assembleLocString)(t)} in synteny view`:"",r?`Unable to find ${(0,h.assembleLocString)(s)} in synteny view`:""].join(" ... ")),o?.navTo(t),r?.navTo(s)}},children:"Center view on this feature"})}):null,(0,u.jsx)("li",{children:(0,u.jsx)(f.A,{href:"#",onClick:t=>{t.preventDefault();const s=new h.SimpleFeature(n),i=(0,h.getSession)(e);i.queueDialog((e=>[b,{session:i,feature:s,trackId:a,handleClose:e}]))},children:"Launch new linear synteny view on this feature"})})]})})),m=(0,l.observer)((function(e){const{model:n}=e,{featureData:t}=n,l=structuredClone(t);return l?(0,u.jsxs)(i.A,{children:[(0,u.jsx)(a.default,{...e,feature:l,formatter:e=>(0,u.jsx)(d,{value:e})}),(0,u.jsx)(s.default,{title:"Link to view",children:(0,u.jsx)(v,{model:n,feat:l})})]}):(0,u.jsx)("div",{children:"No feature loaded, may not be available after page refresh because it was too large for localStorage"})}))}}]);
//# sourceMappingURL=4700.4f24b326.chunk.js.map