"use strict";(self.webpackChunk_jbrowse_web=self.webpackChunk_jbrowse_web||[]).push([[9443],{9443:(e,t,n)=>{n.r(t),n.d(t,{default:()=>i});n(41867);var o=n(4592),r=n(3762),s=n(72896),l=n(80838);const i=(0,r.observer)((e=>{const{model:t}=e;return(0,l.jsxs)("div",{children:[(0,l.jsx)(o.qb,{...e}),(0,l.jsx)(s.Z,{model:t})]})}))},72896:(e,t,n)=>{n.d(t,{Z:()=>x});var o=n(41867),r=n(90872),s=n(3762),l=n(93524),i=n(80838);const a=e=>{const{color:t="rgb(255,255,255,0.8)"}=e;return(0,i.jsx)("rect",{...e,fill:t})},c=(0,s.observer)((function(e){let{model:t,rowHeight:n,labelWidth:r,exportSVG:s}=e;const{needsCustomLegend:l,needsScalebar:c,needsFullHeightScalebar:h,rowHeightTooSmallForScalebar:d,renderColorBoxes:g,sources:x}=t,m=Math.min(n,12),u=n>11,f=g?15:0,j=r+f+5,p=(s?10:0)||(c&&!d?50:0);return x?(0,i.jsxs)(i.Fragment,{children:[h?(0,i.jsx)(a,{y:0,x:p,width:j,height:(x.length+.25)*n}):null,x.map(((e,t)=>{const r=Math.min(20,n);return(0,i.jsxs)(o.Fragment,{children:[h?null:(0,i.jsx)(a,{y:t*n+1,x:p,width:j,height:r}),e.color?(0,i.jsx)(a,{y:t*n+1,x:p,width:f,height:l?n:r,color:e.color}):null,u?(0,i.jsx)("text",{y:t*n+13,x:p+f+2,fontSize:m,children:e.name}):null]},"".concat(e.name,"-").concat(t))}))]}):null})),h=(0,s.observer)((e=>{let{model:t}=e;const{ticks:n,scaleType:o}=t,{width:s}=(0,r.getContainingView)(t),l="[".concat(null===n||void 0===n?void 0:n.values[0],"-").concat(null===n||void 0===n?void 0:n.values[1],"]")+("log"===o?" (log scale)":""),c=(0,r.measureText)(l,14),h=s-c-25;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a,{y:0,x:h,width:c+6,height:16}),(0,i.jsx)("text",{y:13,x:h,children:l})]})}));var d=n(14846);const g=(0,s.observer)((function(e){let{children:t,model:n,exportSVG:o}=e;if(o)return(0,i.jsx)(i.Fragment,{children:t});{const{height:e}=n;return(0,i.jsx)("svg",{style:{position:"absolute",top:0,left:0,pointerEvents:"none",height:e,width:(0,r.getContainingView)(n).width},children:t})}})),x=(0,s.observer)((function(e){const{model:t,orientation:n,exportSVG:o}=e,{stats:s,needsCustomLegend:a,needsFullHeightScalebar:x,rowHeightTooSmallForScalebar:m,rowHeight:u,sources:f,ticks:j}=t,p=Math.min(u,12),w=u>11,{width:b}=(0,r.getContainingView)(t);if(!(s&&f))return null;const v=Math.max(...f.map((e=>(0,r.measureText)(e.name,p))).map((e=>w?e:20))||[0]);return(0,i.jsx)(g,{...e,children:x?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("g",{transform:"translate(".concat(o?0:(0,d.os)(t),",0)"),children:(0,i.jsx)(l.Z,{model:t,orientation:n})}),(0,i.jsx)("g",{transform:"translate(".concat(b-v-100,",0)"),children:(0,i.jsx)(c,{exportSVG:o,model:t,rowHeight:12,labelWidth:v})})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c,{exportSVG:o,model:t,rowHeight:t.rowHeight,labelWidth:v}),m||a?(0,i.jsx)(h,{...e}):f.map(((e,o)=>(0,i.jsx)("g",{transform:"translate(0 ".concat(u*o,")"),children:(0,i.jsx)(l.Z,{model:t,orientation:n})},"".concat(JSON.stringify(j),"-").concat(o))))]})})}))},14846:(e,t,n)=>{n.d(t,{A1:()=>s,os:()=>a,vi:()=>l});var o=n(90872),r=n(43800);function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const o=t.map((t=>e.findIndex((e=>e.name===t)))).sort(((e,t)=>e-t));let r=0;for(const s of o){const t=Math.max(r,s-n);t>=r&&e.splice(t,0,e.splice(s,1)[0]),r+=1}return e}function l(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const o=t.map((t=>e.findIndex((e=>e.name===t)))).sort(((e,t)=>t-e));let r=e.length-1;for(const s of o){const t=Math.min(r,s+n);t<=r&&e.splice(t,0,e.splice(s,1)[0]),r-=1}return e}const i=12.8;function a(e){const{prefersOffset:t}=e,{trackLabels:n}=(0,o.getContainingView)(e),s=(0,o.getContainingTrack)(e),l=(0,r.getConf)(s,"name");return"overlapping"!==n||t?10:(0,o.measureText)(l,i)+100}}}]);
//# sourceMappingURL=9443.09d7eba6.chunk.js.map