"use strict";(self.webpackChunk_jbrowse_web=self.webpackChunk_jbrowse_web||[]).push([[8170],{58170:function(e,n,t){t.r(n),t.d(n,{AboutContents:function(){return A},FileInfoPanel:function(){return Z},default:function(){return k}});var o=t(33028),r=t(32723),i=t(34795),a=t(96234),s=t(96902),c=t(21051),l=t.n(c),u=t(35388),f=t(44536),g=t(52809),d=t(91188),b=t(99836),p=t(43971),C=t(20893),x=t(97531),h=t(16151),j=t(58941),m=t(29938),v=(0,d.ZL)()({content:{minWidth:800}});function Z(e){var n=e.config,t=(0,s.useState)(),o=(0,a.Z)(t,2),c=o[0],l=o[1],f=(0,s.useState)(),g=(0,a.Z)(f,2),d=g[0],p=g[1],h=(0,x.getSession)(n).rpcManager;(0,s.useEffect)((function(){var e=new AbortController,t=e.signal,o=!1;return(0,i.Z)((0,r.Z)().mark((function e(){var i,a;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,i=(0,b.readConfObject)(n,"adapter"),e.next=4,h.call(n.trackId,"CoreGetInfo",{adapterConfig:i,signal:t});case 4:a=e.sent,o||p(a),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),o||(console.error(e.t0),l(e.t0));case 11:case"end":return e.stop()}}),e,null,[[0,8]])})))(),function(){e.abort(),o=!0}}),[n,h]);var v="string"===typeof d?{header:"<pre>".concat(d.replace(/</g,"&lt;").replace(/>/g,"&gt;"),"</pre>")}:d||{};return null!==d?(0,m.jsx)(j.BaseCard,{title:"File info",children:c?(0,m.jsx)(u.Z,{color:"error",children:"".concat(c)}):void 0===d?(0,m.jsx)(C.Z,{message:"Loading file data"}):(0,m.jsx)(j.Attributes,{attributes:v})}):null}function A(e){var n=e.config,t=(0,s.useState)(!1),r=(0,a.Z)(t,2),i=r[0],c=r[1],u=(0,b.readConfObject)(n),g=(0,x.getSession)(n),d=(0,b.getConf)(g,["formatAbout","hideUris"])||(0,b.readConfObject)(n,["formatAbout","hideUris"]),p=(0,x.getEnv)(g).pluginManager,C=p.evaluateExtensionPoint("Core-customizeAbout",{config:(0,o.Z)((0,o.Z)((0,o.Z)({},u),(0,b.getConf)(g,["formatAbout","config"],{config:u})),(0,b.readConfObject)(n,["formatAbout","config"],{config:u}))},{session:g,config:n}),h=p.evaluateExtensionPoint("Core-extraAboutPanel",null,{session:g,config:n});return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(j.BaseCard,{title:"Configuration",children:[d?null:(0,m.jsx)(f.Z,{variant:"contained",style:{float:"right"},onClick:function(){l()(JSON.stringify(u,null,2)),c(!0),setTimeout((function(){return c(!1)}),1e3)},children:i?"Copied to clipboard!":"Copy config"}),(0,m.jsx)(j.Attributes,{attributes:C,omit:["displays","baseUri","refNames","formatAbout"],hideUris:d})]}),h?(0,m.jsx)(j.BaseCard,{title:h.name,children:(0,m.jsx)(h.Component,{config:n})}):null,(0,m.jsx)(Z,{config:n})]})}function k(e){var n=e.config,t=e.handleClose,o=v().classes,r=(0,x.getSession)(n),i=(0,h.getTrackName)(n,r),a=(0,x.getEnv)(r).pluginManager.evaluateExtensionPoint("Core-replaceAbout",A,{session:r,config:n});return(0,m.jsx)(p.Z,{open:!0,onClose:t,title:i,maxWidth:"xl",children:(0,m.jsx)(g.Z,{className:o.content,children:(0,m.jsx)(a,{config:n})})})}}}]);
//# sourceMappingURL=8170.5e7dc8a7.chunk.js.map