"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[8526],{8526:(e,t,o)=>{o.r(t),o.d(t,{default:()=>l});var n=o(97486),r=o(68446),s=o(40474),i=o(69500);const l=(0,r.observer)((function(e){const{model:t}=e;return(0,i.jsxs)("div",{children:[(0,i.jsx)(n.GQ,{...e}),(0,i.jsx)(s.A,{model:t})]})}))},40474:(e,t,o)=>{o.d(t,{A:()=>m});var n=o(99546),r=o(68446),s=o(69500);const i=e=>{const{color:t="rgb(255,255,255,0.8)"}=e;return(0,s.jsx)("rect",{...e,...(0,n.getFillProps)(t)})},l=function({source:e,idx:t,rowHeight:o,labelWidth:n,model:r,exportSVG:l}){const a=Math.min(20,o),{needsCustomLegend:c,graphType:h,needsFullHeightScalebar:d,rowHeightTooSmallForScalebar:x,renderColorBoxes:g}=r,u=Math.min(o,12),m=o>11,p=g?15:0,j=n+p+5,b=(l?10:0)||(h&&!x?50:0);return(0,s.jsxs)(s.Fragment,{children:[d?null:(0,s.jsx)(i,{y:t*o+1,x:b,width:j,height:a}),e.color?(0,s.jsx)(i,{y:t*o+1,x:b,width:p,height:c?o:a,color:e.color}):null,m?(0,s.jsx)("text",{y:t*o+13,x:b+p+2,fontSize:u,children:e.name}):null]})},a=(0,r.observer)((function({model:e,rowHeight:t,exportSVG:o}){const{graphType:n,needsFullHeightScalebar:r,rowHeightTooSmallForScalebar:a,renderColorBoxes:c,sources:h,labelWidth:d}=e,x=d+(c?15:0)+5,g=(o?10:0)||(n&&!a?50:0);return h?(0,s.jsxs)(s.Fragment,{children:[r?(0,s.jsx)(i,{y:0,x:g,width:x,height:(h.length+.25)*t}):null,h.map(((n,r)=>(0,s.jsx)(l,{source:n,idx:r,model:e,rowHeight:t,exportSVG:o,labelWidth:d},`${n.name}-${r}`)))]}):null}));var c=o(58474),h=o(90461);const d=(0,r.observer)((function({model:e,orientation:t,exportSVG:o}){const{labelWidth:r}=e,{width:i}=(0,n.getContainingView)(e);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("g",{transform:`translate(${o?0:(0,c.A3)(e)},0)`,children:(0,s.jsx)(h.A,{model:e,orientation:t})}),(0,s.jsx)("g",{transform:`translate(${i-r-100},0)`,children:(0,s.jsx)(a,{exportSVG:o,model:e,rowHeight:12})})]})})),x=(0,r.observer)((({model:e})=>{const{ticks:t,scaleType:o}=e,{width:r}=(0,n.getContainingView)(e),l=`[${t?.values[0]}-${t?.values[1]}]${"log"===o?" (log scale)":""}`,a=(0,n.measureText)(l,14),c=r-a-25;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i,{y:0,x:c,width:a+6,height:16}),(0,s.jsx)("text",{y:13,x:c,children:l})]})})),g=(0,r.observer)((function({model:e,orientation:t,exportSVG:o}){const{sources:n,rowHeight:r,rowHeightTooSmallForScalebar:i,needsCustomLegend:l,ticks:c}=e;return n?.length?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a,{exportSVG:o,model:e,rowHeight:e.rowHeight}),i||l?(0,s.jsx)(x,{model:e}):n.map(((o,n)=>(0,s.jsx)("g",{transform:`translate(0 ${r*n})`,children:(0,s.jsx)(h.A,{model:e,orientation:t})},`${JSON.stringify(c)}-${n}`)))]}):null})),u=(0,r.observer)((function({children:e,model:t,exportSVG:o}){const{height:r}=t;return o?e:(0,s.jsx)("svg",{style:{position:"absolute",top:0,left:0,pointerEvents:"none",height:r,width:(0,n.getContainingView)(t).width},children:e})})),m=(0,r.observer)((function(e){const{model:t,orientation:o,exportSVG:n}=e,{showSidebar:r,stats:i,needsFullHeightScalebar:l,sources:a}=t;return i&&a?(0,s.jsx)(u,{...e,children:r?l?(0,s.jsx)(d,{model:t,orientation:o,exportSVG:n}):(0,s.jsx)(g,{model:t,orientation:o,exportSVG:n}):null}):null}))},58474:(e,t,o)=>{o.d(t,{A3:()=>a,BO:()=>s,oJ:()=>i});var n=o(68584),r=o(99546);function s(e,t,o=1){const n=t.map((t=>e.findIndex((e=>e.name===t)))).sort(((e,t)=>e-t));let r=0;for(const t of n){const n=Math.max(r,t-o);n>=r&&e.splice(n,0,e.splice(t,1)[0]),r+=1}return e}function i(e,t,o=1){const n=t.map((t=>e.findIndex((e=>e.name===t)))).sort(((e,t)=>t-e));let r=e.length-1;for(const t of n){const n=Math.min(r,t+o);n<=r&&e.splice(n,0,e.splice(t,1)[0]),r-=1}return e}const l=12.8;function a(e){const{prefersOffset:t}=e,{trackLabels:o}=(0,r.getContainingView)(e),s=(0,r.getContainingTrack)(e),i=(0,n.getConf)(s,"name");return"overlapping"!==o||t?10:(0,r.measureText)(i,l)+100}}}]);
//# sourceMappingURL=8526.652775c6.chunk.js.map