jbrowse-plugin-graphgenomeviewer 9.0.1 → 9.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/AddTrackWorkflow-NKX57TBD.js +2 -0
- package/dist/chunks/AddTrackWorkflow-NKX57TBD.js.map +7 -0
- package/dist/chunks/GbzBaseSyntenyAdapter-V5WC3WDU.js +9 -0
- package/dist/chunks/GbzBaseSyntenyAdapter-V5WC3WDU.js.map +7 -0
- package/dist/chunks/GraphGenomeView-XPSOKJYF.js +10 -0
- package/dist/chunks/GraphGenomeView-XPSOKJYF.js.map +7 -0
- package/dist/chunks/GraphSettingsDialog-GXZGESAF.js +2 -0
- package/dist/chunks/GraphSettingsDialog-GXZGESAF.js.map +7 -0
- package/dist/chunks/{HighlightColorDialog-6EOFDJDZ.js → HighlightColorDialog-4IZ7TVKH.js} +2 -2
- package/dist/chunks/{LinearGraphDisplay-DHDMNOW4.js → LinearGraphDisplay-KTRPJ7TC.js} +2 -2
- package/dist/chunks/MinigraphBubbleAdapter-AQQKKQB7.js +2 -0
- package/dist/chunks/{MinigraphBubbleAdapter-K2D7CW3M.js.map → MinigraphBubbleAdapter-AQQKKQB7.js.map} +1 -1
- package/dist/chunks/RgfaTabixAdapter-6KXWQZIB.js +2 -0
- package/dist/chunks/{RgfaTabixAdapter-PF2RC3RZ.js.map → RgfaTabixAdapter-6KXWQZIB.js.map} +1 -1
- package/dist/chunks/WalkFormsAdapter-XUL6CPR2.js +2 -0
- package/dist/chunks/WalkFormsAdapter-XUL6CPR2.js.map +7 -0
- package/dist/chunks/WalkTabixSyntenyAdapter-V5TDUHFA.js +2 -0
- package/dist/chunks/{WalkTabixSyntenyAdapter-AQ56UH4Y.js.map → WalkTabixSyntenyAdapter-V5TDUHFA.js.map} +1 -1
- package/dist/chunks/chunk-2JCLWDPA.js +2 -0
- package/dist/chunks/{chunk-UH3LQSHA.js.map → chunk-2JCLWDPA.js.map} +3 -3
- package/dist/chunks/chunk-2TMRTF2T.js +4 -0
- package/dist/chunks/chunk-2TMRTF2T.js.map +7 -0
- package/dist/chunks/chunk-3CTVGI6C.js +2 -0
- package/dist/chunks/chunk-3CTVGI6C.js.map +7 -0
- package/dist/chunks/chunk-4QUWP4KD.js +2 -0
- package/dist/chunks/{chunk-I6NW3VGS.js.map → chunk-4QUWP4KD.js.map} +4 -4
- package/dist/chunks/chunk-4YSZIJBZ.js +4 -0
- package/dist/chunks/{chunk-5YY3OGK6.js.map → chunk-4YSZIJBZ.js.map} +4 -4
- package/dist/chunks/chunk-54ZVDV3O.js +2 -0
- package/dist/chunks/chunk-54ZVDV3O.js.map +7 -0
- package/dist/chunks/chunk-5DK3PP4N.js +2 -0
- package/dist/chunks/chunk-5DK3PP4N.js.map +7 -0
- package/dist/chunks/chunk-D6TY2QEG.js +2 -0
- package/dist/chunks/chunk-D6TY2QEG.js.map +7 -0
- package/dist/chunks/chunk-I2GHOE2S.js +4 -0
- package/dist/chunks/chunk-I2GHOE2S.js.map +7 -0
- package/dist/chunks/{chunk-RYM2UTLL.js → chunk-JH7I3SYQ.js} +2 -2
- package/dist/chunks/chunk-N4H4SII4.js +2 -0
- package/dist/chunks/chunk-N4H4SII4.js.map +7 -0
- package/dist/chunks/chunk-RSNSHOEE.js +3 -0
- package/dist/chunks/chunk-RSNSHOEE.js.map +7 -0
- package/dist/chunks/chunk-TBC7SPZD.js +6 -0
- package/dist/chunks/chunk-TBC7SPZD.js.map +7 -0
- package/dist/chunks/{chunk-ZN2NTCLU.js → chunk-X67CQRA4.js} +1 -1
- package/dist/chunks/{chunk-ZN2NTCLU.js.map → chunk-X67CQRA4.js.map} +2 -2
- package/dist/chunks/{chunk-HHWF6AVX.js → chunk-YROUE32O.js} +2 -2
- package/dist/chunks/chunk-YROUE32O.js.map +7 -0
- package/dist/chunks/{chunk-CRMC2DTD.js → chunk-ZV6BRYEP.js} +2 -2
- package/dist/chunks/chunk-ZVMXECJA.js +2 -0
- package/dist/chunks/chunk-ZVMXECJA.js.map +7 -0
- package/dist/chunks/{renderSvg-CZH4IATB.js → renderSvg-7DAEH3FR.js} +2 -2
- package/dist/jbrowse-plugin-graphgenomeviewer.esm.js +5 -5
- package/dist/jbrowse-plugin-graphgenomeviewer.esm.js.map +4 -4
- package/package.json +1 -1
- package/src/GbzBaseSyntenyAdapter/configSchema.ts +2 -2
- package/src/GetSubgraph.ts +1 -0
- package/src/GraphAddTrackWorkflow/AddTrackWorkflow.tsx +2 -2
- package/src/GraphAddTrackWorkflow/buildTrackConfig.ts +0 -5
- package/src/GraphAddTrackWorkflow/graphManifest.ts +1 -1
- package/src/GraphAddTrackWorkflow/walkReference.ts +1 -2
- package/src/GraphGenomeView/components/GraphCanvas.tsx +4 -4
- package/src/GraphGenomeView/components/GraphLoadStatus.test.tsx +40 -0
- package/src/GraphGenomeView/components/GraphLoadStatus.tsx +41 -12
- package/src/GraphGenomeView/components/GraphSettingsDialog.tsx +5 -4
- package/src/GraphGenomeView/components/GraphStats.tsx +3 -3
- package/src/GraphGenomeView/components/GraphToolbar.tsx +3 -3
- package/src/GraphGenomeView/components/HoverTooltip.test.tsx +45 -0
- package/src/GraphGenomeView/components/HoverTooltip.tsx +13 -0
- package/src/GraphGenomeView/components/ImportForm.test.tsx +38 -0
- package/src/GraphGenomeView/components/ImportForm.tsx +37 -5
- package/src/{LinearGraphDisplay → GraphGenomeView}/components/SubgraphContextSelect.test.tsx +5 -8
- package/src/{LinearGraphDisplay → GraphGenomeView}/components/SubgraphContextSelect.tsx +6 -4
- package/src/{LinearGraphDisplay → GraphGenomeView}/components/SubgraphHaplotypesField.test.tsx +4 -9
- package/src/{LinearGraphDisplay → GraphGenomeView}/components/SubgraphHaplotypesField.tsx +12 -12
- package/src/GraphGenomeView/model.color.test.ts +467 -0
- package/src/GraphGenomeView/model.fit.test.ts +1034 -0
- package/src/GraphGenomeView/model.launch.test.ts +799 -0
- package/src/GraphGenomeView/model.layout.test.ts +1149 -0
- package/src/GraphGenomeView/model.load.test.ts +907 -0
- package/src/GraphGenomeView/model.ts +110 -10
- package/src/GraphGenomeView/model.walkRows.test.ts +1152 -0
- package/src/GraphGenomeView/modelTestMocks.ts +109 -0
- package/src/GraphGenomeView/modelTestSupport.ts +137 -0
- package/src/GraphGenomeView/pane/graphViews.ts +9 -7
- package/src/GraphGenomeView/pane/loadActions.ts +29 -15
- package/src/GraphGenomeView/pane/paneBase.test.ts +23 -0
- package/src/GraphGenomeView/pane/paneBase.ts +12 -14
- package/src/GraphGenomeView/pane/renderingActions.ts +6 -10
- package/src/GraphGenomeView/pane/settingActions.ts +9 -8
- package/src/GraphGenomeView/pane/walkRowViews.ts +9 -13
- package/src/GraphGenomeView/subgraphLoad.test.ts +88 -17
- package/src/GraphGenomeView/viewModel.ts +4 -26
- package/src/LinearGraphDisplay/LinearGraphDisplay.test.ts +94 -80
- package/src/LinearGraphDisplay/configSchema.ts +0 -2
- package/src/LinearGraphDisplay/graphFacetConfigSchema.ts +0 -4
- package/src/LinearGraphDisplay/index.ts +1 -3
- package/src/LinearGraphDisplay/model.ts +130 -159
- package/src/MinigraphBubbleAdapter/configSchema.ts +1 -1
- package/src/RgfaTabixAdapter/configSchema.ts +2 -2
- package/src/RgfaTabixAdapter/walkFiles.test.ts +14 -0
- package/src/RgfaTabixAdapter/walkReader.ts +2 -0
- package/src/WalkFormsAdapter/configSchema.ts +2 -2
- package/src/WalkFormsAdapter/formRows.ts +2 -2
- package/src/WalkTabixSyntenyAdapter/configSchema.ts +2 -2
- package/src/graphTrackConfig.ts +5 -0
- package/src/launchFromGraph/linearViewTarget.ts +8 -0
- package/src/nodeLimitError.ts +13 -0
- package/src/panSNTabix.ts +1 -50
- package/src/slotDefaults.test.ts +12 -0
- package/src/slotDefaults.ts +12 -0
- package/src/tabixSlots.ts +51 -0
- package/src/version.ts +1 -1
- package/dist/chunks/AddTrackWorkflow-VKX2F7EK.js +0 -2
- package/dist/chunks/AddTrackWorkflow-VKX2F7EK.js.map +0 -7
- package/dist/chunks/GbzBaseSyntenyAdapter-HN5P4AGF.js +0 -2
- package/dist/chunks/GbzBaseSyntenyAdapter-HN5P4AGF.js.map +0 -7
- package/dist/chunks/GraphGenomeView-GB6W6UZ4.js +0 -10
- package/dist/chunks/GraphGenomeView-GB6W6UZ4.js.map +0 -7
- package/dist/chunks/GraphTrackSettingsDialog-P2XQATEX.js +0 -4
- package/dist/chunks/GraphTrackSettingsDialog-P2XQATEX.js.map +0 -7
- package/dist/chunks/MinigraphBubbleAdapter-K2D7CW3M.js +0 -2
- package/dist/chunks/RgfaTabixAdapter-PF2RC3RZ.js +0 -2
- package/dist/chunks/WalkFormsAdapter-E5VINQZN.js +0 -2
- package/dist/chunks/WalkFormsAdapter-E5VINQZN.js.map +0 -7
- package/dist/chunks/WalkTabixSyntenyAdapter-AQ56UH4Y.js +0 -2
- package/dist/chunks/chunk-2CSE6SGH.js +0 -2
- package/dist/chunks/chunk-2CSE6SGH.js.map +0 -7
- package/dist/chunks/chunk-3ETSJ4Z2.js +0 -3
- package/dist/chunks/chunk-3ETSJ4Z2.js.map +0 -7
- package/dist/chunks/chunk-57DOGFYN.js +0 -2
- package/dist/chunks/chunk-57DOGFYN.js.map +0 -7
- package/dist/chunks/chunk-5YY3OGK6.js +0 -4
- package/dist/chunks/chunk-EPSEVFYY.js +0 -4
- package/dist/chunks/chunk-EPSEVFYY.js.map +0 -7
- package/dist/chunks/chunk-HHWF6AVX.js.map +0 -7
- package/dist/chunks/chunk-I6NW3VGS.js +0 -2
- package/dist/chunks/chunk-M2D7NUOY.js +0 -2
- package/dist/chunks/chunk-M2D7NUOY.js.map +0 -7
- package/dist/chunks/chunk-NIGOHOFJ.js +0 -6
- package/dist/chunks/chunk-NIGOHOFJ.js.map +0 -7
- package/dist/chunks/chunk-OTHDGBEZ.js +0 -9
- package/dist/chunks/chunk-OTHDGBEZ.js.map +0 -7
- package/dist/chunks/chunk-T5X4OJJ2.js +0 -2
- package/dist/chunks/chunk-T5X4OJJ2.js.map +0 -7
- package/dist/chunks/chunk-T7NMFIRW.js +0 -2
- package/dist/chunks/chunk-T7NMFIRW.js.map +0 -7
- package/dist/chunks/chunk-UH3LQSHA.js +0 -2
- package/dist/chunks/chunk-ULWTJWXX.js +0 -2
- package/dist/chunks/chunk-ULWTJWXX.js.map +0 -7
- package/src/GraphGenomeView/model.test.ts +0 -5579
- package/src/GraphGenomeView/retiredNodeColor.test.ts +0 -46
- package/src/GraphGenomeView/retiredNodeColor.ts +0 -76
- package/src/LinearGraphDisplay/components/GraphTrackSettingsDialog.tsx +0 -22
- package/src/LinearGraphDisplay/graphFacetConfigSchema.test.ts +0 -13
- /package/dist/chunks/{HighlightColorDialog-6EOFDJDZ.js.map → HighlightColorDialog-4IZ7TVKH.js.map} +0 -0
- /package/dist/chunks/{LinearGraphDisplay-DHDMNOW4.js.map → LinearGraphDisplay-KTRPJ7TC.js.map} +0 -0
- /package/dist/chunks/{chunk-RYM2UTLL.js.map → chunk-JH7I3SYQ.js.map} +0 -0
- /package/dist/chunks/{chunk-CRMC2DTD.js.map → chunk-ZV6BRYEP.js.map} +0 -0
- /package/dist/chunks/{renderSvg-CZH4IATB.js.map → renderSvg-7DAEH3FR.js.map} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as W,b as vt}from"./chunk-2CSE6SGH.js";import{B as St,C as xt,a as tt,b as nt,c as J,d as ot,e as rt,f as Q,h as at,i as it,j as st,k as lt,l as ct,m as pt,o as ee,p as ut,q as te,r as dt,t as ue,u as ft,v as ht,w as yt,x as bt,z as wt}from"./chunk-CRMC2DTD.js";import{N as Je,O as Qe,R as pe,T as et,U as mt,V as gt,a as P,c as We,f as q,g as Ne,h as Oe,q as De,r as Fe,t as $e,u as je,v as Ke,w as qe}from"./chunk-EPSEVFYY.js";import{s as z}from"./chunk-ULWTJWXX.js";import{Ba as Ze,E as _e,Kb as H,L as ze,Ob as le,P as Xe,Q as Be,Qb as ce,Sb as _,a as X,b as ye,d as be,ga as se,ka as U,nc as Ue,oa as Ve,qa as Ye,w as Ae}from"./chunk-3ETSJ4Z2.js";import{n as He}from"./chunk-RYM2UTLL.js";import{d as E}from"./chunk-WKD7ALOU.js";import{j as $}from"./chunk-TC265JAP.js";import{a as Ie,e as T,f as Ge,g as Te,h as M,i as C}from"./chunk-J2PN6CG3.js";import{D as Ee,G as K,H as B,b as we,c as Se,e as ie,k as xe,o as Pe,p as ke,s as Me,v as j,w as Re,y as Ce,z as Le}from"./chunk-WE7DQVXF.js";import{a as G,b as o,c as h,d}from"./chunk-DUU6T2I5.js";function Pt(t){return Promise.resolve(new H(t))}var A=JBrowseExports["@jbrowse/render-core/useRenderingBackend"],mn=t=>A!=null&&t in Object(A)?A[t]:Object.assign(function(){throw new Error("This JBrowse does not provide '"+t+"' from '@jbrowse/render-core/useRenderingBackend' to plugins: GraphGenomeView was built for a different JBrowse version, so update the plugin or JBrowse")},{jbrowseHostMissing:t});var kt=mn("useRenderingBackend"),wo=A&&A.__esModule?A.default:A;var de=nt(1),Mt=d(function({model:e}){let[n,i]=C(null);return T(()=>{if(!n)return;let r=new H(n),c=X(()=>{Ze(Ue()),r.resize(e.paneWidth,e.canvasHeight),e.paintHover(r,e.drawnBatch)});return()=>{c(),r.dispose()}},[n,e]),o("canvas",{ref:i,"data-testid":"graph-hover-layer",style:de})});var ne=d(function({row:e,at:n,hint:i,after:r,column:c}){let l=c===void 0?void 0:{paddingLeft:c+5};return e.swatch?h("div",{title:[e.title,i].filter(Boolean).join(" \xB7 ")||void 0,children:[h("div",{style:te,children:[o("span",{style:{display:"flex",flex:"none",justifyContent:"center",width:c},children:o(ee,{swatch:e.swatch})}),h("span",{children:[e.strong?o("strong",{children:e.strong}):null,e.label]}),r]}),n?o("div",{style:l,"data-testid":"graph-walk-at",children:n}):e.under?o("div",{style:l,children:e.under}):null]}):o("div",{style:dt,children:e.label})}),gn={pointerEvents:"auto",cursor:"pointer",border:"none",background:"none",padding:"0 2px",font:"inherit",textDecoration:"underline"},Rt=d(function({model:e}){let n=pt(e);if(n.length===0)return null;let i=n.flatMap(l=>l.rows),r=it(i),c=at(i);return o("div",{style:{...ut,lineHeight:`${r}px`},children:n.map(({testid:l,rows:p,heading:s,spaced:u},m)=>h(Ie,{children:[s?o("div",{style:{...ft,paddingTop:m===0?0:ue},children:s}):null,o("div",{"data-testid":l,style:u?{paddingTop:ue}:void 0,children:p.map(w=>o(ne,{row:w,column:c,at:w.walk?e.hoveredOn(w.walk):void 0,after:w.closesBubble?o("button",{type:"button",style:gn,"data-testid":"graph-close-bubble",onClick:()=>{e.closeBubbles()},children:"close"}):null},w.key))})]},l))})});var vn={position:"absolute",left:0,top:0,zIndex:4,display:"grid",gap:Xe,lineHeight:"normal"},yn={height:Be,padding:"2px 6px",boxSizing:"border-box",fontFamily:"inherit",fontSize:11,color:"inherit",cursor:"pointer",border:"none",background:"none",textAlign:"left",display:"block"},bn={position:"relative"},wn={gridColumn:"1 / -1",height:Qe,padding:"2px 6px",boxSizing:"border-box",display:"flex",gap:14,fontSize:11,lineHeight:"15px"},Sn=d(function({model:e,lift:n,width:i,height:r,cell:c,handlers:l,canvasStyle:p}){let[s,u]=C(null),[m,w]=C(null),S=n.walks[0];T(()=>{if(!s||!m)return;let I=new H(s),O=new H(m),D=ye(()=>e.buildDrawing(n,!1)),V,Y=[X(()=>{let R=e.facetGrid;R&&I.resize(R.width,R.height);let L=D.get();L&&(L!==V&&(I.uploadGeometry(L.batch),V=L),e.applySelection(I),e.paint(I))}),X(()=>{let R=e.facetGrid;R&&O.resize(R.width,R.height);let L=D.get();L&&e.paintHover(O,L.batch)})];return()=>{for(let R of Y)R();I.dispose(),O.dispose()}},[s,m,e,n]);let N=e.walkLabel(S.name);return h("div",{style:c,children:[o("button",{type:"button",style:yn,"data-testid":"graph-facet-title",onClick:()=>{e.liftWalks([S.name]),e.setFacet("")},children:o(ne,{row:lt(e,S),hint:`click to lift ${N} alone`,at:e.hoveredOn(S)})}),h("div",{style:bn,children:[o("canvas",{ref:u,"data-testid":"graph-facet-canvas",style:{...p,width:i,height:r,display:"block"},...l}),o("canvas",{ref:w,style:de})]})]})}),xn=d(function({model:e,handlers:n,canvasStyle:i}){let r=e.facetPanels,c=e.facetGrid,l=e.facetPlacement;if(!r||!c||!l)return null;let{columns:p,width:s,height:u}=c;return h("div",{"data-testid":"graph-facet-panels",style:{...vn,width:e.paneWidth,minHeight:e.canvasHeight,gridTemplateColumns:`repeat(${p}, ${s}px)`,background:U},children:[r.map((m,w)=>o(Sn,{model:e,lift:m,width:s,height:u,cell:{gridRow:Math.floor(l.cells[w]/p)+1,gridColumn:l.cells[w]%p+1},handlers:n,canvasStyle:i},m.walks[0].name)),o("div",{style:{...wn,gridRow:Math.floor(l.cells.reduce((m,w)=>Math.max(m,w),-1/0)/p)+2},"data-testid":"graph-facet-key",children:ct(e).map(m=>o(ne,{row:m},m.key))})]})}),Ct=xn;var Lt=P(o("path",{d:"M3 5v4h2V5h4V3H5c-1.1 0-2 .9-2 2m2 10H3v4c0 1.1.9 2 2 2h4v-2H5zm14 4h-4v2h4c1.1 0 2-.9 2-2v-4h-2zm0-16h-4v2h4v4h2V5c0-1.1-.9-2-2-2"}),"CropFree");var Et=P([o("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"},"0"),o("path",{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2z"},"1")],"ZoomIn");var It=P(o("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14M7 9h5v1H7z"}),"ZoomOut");var Pn=d(function({model:e}){let n=e.colorSchemeLock;return o(W,{label:"Color",size:"small",sx:{minWidth:100},disabled:n!==void 0,title:n?.why,shown:n?.value,value:e.chosenColorScheme,options:De.map(({value:i})=>({value:i,label:e.colorSchemeLabel(i)})),testId:"graph-color-select",onChange:i=>{e.setColorScheme(i)}})}),Gt=Pn;var Tt=z()({stats:{marginLeft:"auto"},perf:{color:"#888",fontVariantNumeric:"tabular-nums"}});function fe(t){return t===void 0?"\u2013":`${Math.round(t)}ms`}var kn=d(function({model:e}){let{classes:n}=Tt(),{lastFetchMs:i,lastLayoutMs:r,lastGeometryMs:c}=e,l=i!==void 0||r!==void 0||c!==void 0;return e.showPerf&&l?h(B,{variant:"caption",className:n.perf,"data-testid":"graph-perf-stats",children:["fetch ",fe(i)," \xB7 layout ",fe(r)," \xB7 geom"," ",fe(c)]}):null}),Mn=d(function({model:e}){let{classes:n}=Tt();return h("div",{className:n.stats,"data-testid":"graph-stats","data-node-count":e.nodeCount,"data-edge-count":e.edgeCount,"data-path-count":e.pathCount,"data-fetch-ms":e.lastFetchMs??"","data-layout-ms":e.lastLayoutMs??"","data-geometry-ms":e.lastGeometryMs??"","data-geometry-strokes":e.lastGeometryStrokeCount??"",children:[h(B,{variant:"body2",component:"span",children:[e.nodeCount," nodes, ",e.edgeCount," edges",e.pathCount>0?`, ${e.pathCount} paths`:""]})," ",o(kn,{model:e})]})}),Ht=Mn;var Rn=d(function({model:e}){let{graph:n}=e;return o(W,{label:"Layout",size:"small",sx:{minWidth:140},testId:"graph-layout-select",value:e.chosenLayoutMode,options:We.map(({value:i,label:r,description:c,available:l})=>({value:i,label:r,description:c,disabled:n?!l(n):!1})),onChange:i=>{e.switchLayout(i)}})}),At=Rn;var Cn=d(function({model:e}){return e.chosenLayoutMode!=="walkrows"||e.repeatChoices.length===0?null:o(W,{label:"Repeat",size:"small",sx:{minWidth:130,maxWidth:260},testId:"graph-repeat-select",value:e.selectedRepeat?.key??"",options:e.repeatOptions,onChange:n=>{e.setRepeatKey(n)}})}),_t=Cn;var zt=P(o("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");var Wt=P(o("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVert");var Ln=d(function({model:e}){let n=e.highlightMenuItems({picks:!1});return o(we,{size:"small",tooltip:"Graph options",menuItems:[...n.length>0?[{label:"Haplotypes",icon:mt,subMenu:n}]:[],...e.layoutOptionMenuItems({repeat:!1}),{label:"Show",icon:Fe,subMenu:[...e.showMenuItems(),...e.modeDrawsNodes&&e.walkChoices.length>1?[{type:"checkbox",label:"Show walk rows under the graph",checked:e.walkStrip,onClick:()=>{e.setWalkStrip(!e.walkStrip)}}]:[],{type:"checkbox",label:"Show timings",checked:e.showPerf,onClick:()=>{e.setShowPerf(!e.showPerf)}}]},{type:"divider"},{label:"Graph settings...",icon:gt,helpText:"Subgraph node limit; node width and path colors; the force-directed layout engine",onClick:()=>{$(e).queueDialog(i=>[vt,{model:e,onClose:i}])}},{type:"divider"},{label:"Close graph",icon:zt,onClick:()=>{e.clearGraph()}}],children:o(Wt,{})})}),Nt=Ln;var En=z()({formControl:{minWidth:130,maxWidth:260}}),In=d(function({model:e}){let{classes:n}=En(),i=Ge(),{walkChoices:r}=e;if(r.length===0||!e.liftsWalks)return null;let c=new Set(r.map(s=>s.name)),l=new Map(r.map(s=>[s.name,s.label])),p=e.walkLayers.map(s=>s.walk).filter(s=>c.has(s));return r.length>Ye?o(Pe,{size:"small",variant:"outlined",color:"inherit","data-testid":"graph-walk-choose",onClick:()=>{$(e).queueDialog(s=>[Ve,{model:e,onClose:s}])},children:p.length>0?`${p.length} of ${r.length} haplotypes`:"Highlight haplotypes..."}):h(Me,{size:"small",className:n.formControl,children:[o(Re,{id:i,children:"Highlight"}),o(Ee,{labelId:i,multiple:!0,value:p,label:"Highlight","data-testid":"graph-walk-select",renderValue:s=>s.map(u=>l.get(u)).join(", "),onChange:s=>{let{value:u}=s.target;e.liftAmongChoices(typeof u=="string"?u.split(","):u)},children:r.map(({name:s,label:u})=>h(Le,{value:s,dense:!0,children:[o(ke,{size:"small",checked:p.includes(s)}),o(Ce,{primary:u})]},s))})]})}),Ot=In;var Gn=z()({toolbar:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:4,padding:"2px 4px",borderBottom:"1px solid #ddd"}}),Tn=d(function({model:e}){return o(B,{variant:"body2",children:e.zoomPercent})}),Hn=d(function({model:e}){let{classes:n}=Gn(),i=r=>{e.zoom(r,e.viewBox.width/2,e.viewBox.height/2)};return h("div",{className:n.toolbar,children:[o(At,{model:e}),o(Gt,{model:e}),o(Ot,{model:e}),o(_t,{model:e}),o(K,{title:"Zoom in",children:o(j,{size:"small",onClick:()=>{i(1.5)},children:o(Et,{})})}),o(K,{title:"Zoom out",children:o(j,{size:"small",onClick:()=>{i(1/1.5)},children:o(It,{})})}),o(K,{title:"Zoom to fit",children:o(j,{size:"small",onClick:()=>{e.refitView()},children:o(Lt,{})})}),o(Tn,{model:e}),o(Ht,{model:e}),o(Nt,{model:e})]})}),Dt=Hn;var An={position:"absolute",bottom:Je,lineHeight:"normal",background:"rgba(0,0,0,0.75)",color:"white",padding:"4px 8px",borderRadius:4,fontSize:12,pointerEvents:"none",zIndex:6};function he({label:t,readout:e}){return h(G,{children:[o("strong",{children:t})," \u2014 ",e]})}function _n(t,e){if(e)return{testId:"graph-chip-tooltip",body:he(e)};let n=t.hoveredNode?t.hoverNodeById?.get(t.hoveredNode):void 0;if(n){let l=t.hoverDrawing?.members.get(n.id),p=Oe(n);return{body:h(G,{children:[o("strong",{children:n.name}),l?` and ${l.length-1} more`:""," \u2014"," ",n.length.toLocaleString()," bp, depth ",n.depth.toFixed(1),p?h(G,{children:[o("br",{}),p.sample," ",q(p)," (rank ",n.stable?.rank,")"]}):null,n.moved?h(G,{children:[o("br",{}),"End of a component too large to draw here"]}):null]})}}let i=t.hoveredEdge===null?void 0:t.graph?.edges[t.hoveredEdge];if(i){let l=Ne(i,t.deletions.find(p=>p.edgeIndex===t.hoveredEdge),p=>t.nodeById?.get(p)?.name??p);return{body:l.deletion?h(G,{children:[o("strong",{children:"Deletion"})," ",l.deletion.bp,o("br",{}),l.deletion.where]}):h(G,{children:["Edge: ",l.ends]})}}let r=t.hoveredWalkRowText;if(r)return{testId:"graph-walk-row-tooltip",body:he(r)};let c=t.hoveredTubeText;return c?{testId:"graph-tube-tooltip",body:he(c)}:void 0}var zn=d(function({model:e,chip:n}){let i=_n(e,n);return i?o("div",{style:{...An,right:e.tooltipRightPx},"data-testid":i.testId,children:i.body}):null}),Xt=zn;var Bt=P(o("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList");var Ft=P(o("path",{d:"M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z"}),"FilterListOff");var Vt=P(o("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info");var Wn={x:0,y:0};function Nn(t,e){let{own:n,reference:i,highlight:r}=t.nodeLaunchTargets(e);return[{label:"Node details",icon:Vt,onClick:()=>{t.showNodeDetails(e)}},...et({own:n,reference:i,highlight:r,onShowLinear:c=>{t.showInLinearView(c)},onHighlight:t.canHighlightInLinearView?c=>{t.highlightInLinearView(c)}:void 0})]}function On(t){return t>=1e3?`${Math.round(t/1e3)} k`:`${t}`}function Dn(t,e,n){let i=n??t.walkRowBars,r=t.walkRowLaunchTarget(e,i),c=r?.assembly,l=e>0?i?.rows[e-1]:void 0,p=l?.sample,s=!n&&t.walkRowBars,u=t.walkRowSamples;return[r&&c?{label:`Linear genome view \u2014 ${c} ${q(r.location)}`,icon:pe,onClick:()=>{t.showInLinearView({location:r.location,assembly:c})}}:{label:"Linear genome view",icon:pe,disabled:!0,disabledHelpText:r?`No assembly in this session is ${r.location.haplotype??r.label}`:"This walk states no contig coordinates",onClick:()=>{}},...l?.abridgedSteps?[{label:`Load the ${On(l.abridgedSteps)} abridged steps`,onClick:()=>{t.expandWalk(l.name)}}]:[],...l&&t.liftsWalks&&t.modeDrawsNodes?[{type:"checkbox",label:`Highlight ${l.label}`,checked:t.walkLayers.some(m=>m.walk===l.name),onClick:()=>{t.toggleWalk(l.name)}}]:[],...s&&p&&!(u?.length===1&&u[0]===p)?[{label:`Show only ${p}`,icon:Bt,onClick:()=>{t.setWalkRowSamples([p])}}]:[],...s&&u?[{label:"Show every sample",icon:Ft,onClick:()=>{t.setWalkRowSamples(void 0)}}]:[]]}var oe=d(function({model:e,at:n,onClose:i}){return o(Se,{anchor:n,offset:Wn,onClose:i,menuItems:()=>n===void 0?[]:"nodeId"in n?Nn(e,n.nodeId):Dn(e,n.row,n.bars)})});var Xn={display:"flex",flexWrap:"wrap",gap:"2px 14px",padding:"2px 8px 6px",fontSize:11,color:"#333"},Bn={position:"absolute",pointerEvents:"none",background:"rgba(255,255,255,0.92)",border:"1px solid #ccc",borderRadius:3,padding:"1px 6px",fontSize:11,whiteSpace:"nowrap",zIndex:4},Fn=d(function({bars:e,frame:n,ramp:i,rowGenes:r}){let c=rt(),l=Te(()=>ze(e,n,{ramp:i,rowGenes:r,idPrefix:c}),[e,n,i,r,c]);return o(Q,{el:l})}),Vn=d(function({model:e}){let n=e.walkStripRows,i=e.walkStripFrame,r=e.stripHover,c=n?[n.reference,...n.rows]:[],l=r?c.findIndex(m=>m.name===r.row):-1,p=c[l];if(!n||!i||i.labelled||!r||!p)return null;let s=(n.origin+r.offset)*i.scaleX+i.translateX,u=s>i.width/2?{right:i.width-s+12}:{left:s+12};return h("div",{"data-testid":"graph-walk-strip-tip",style:{...Bn,...u,top:l*i.rowPx+i.translateY-18},children:[p.label," \xB7"," ",Ae(p,l===0?void 0:n.reference)]})}),Yn=d(function({model:e,bars:n,frame:i}){return o(Q,{el:je(n,i,e.walkStripMarks)})}),Zn=d(function({model:e}){let n=e.walkStripRows,i=e.walkStripFrame,[r,c]=C();if(!n||!i)return null;let l=s=>{let u=s.currentTarget.getBoundingClientRect();return $e(n,i,s.clientX-u.left,s.clientY-u.top)},p=_e(n,{ramp:e.referenceRampDomain,rampCss:He,genes:qe(i,e.walkRowGenes,e.walkRowGeneGaps),annotation:e.walkRowAnnotation});return h("div",{"data-testid":"graph-walk-strip",style:{position:"relative",borderTop:"1px solid #ddd"},onMouseEnter:()=>{e.setPointerInPane(!0)},onMouseLeave:()=>{E(e)&&(e.setPointerInPane(!1),e.setStripHover(null))},children:[h("svg",{width:i.width,height:i.height,style:{display:"block"},onMouseLeave:()=>{E(e)&&e.setStripHover(null)},onMouseMove:s=>{let u=l(s);s.currentTarget.style.cursor=u&&u.index>0?"pointer":"",e.setStripHover(u?{row:u.row.name,offset:u.offset}:null)},onClick:s=>{let u=l(s);u&&u.index>0&&e.toggleWalk(u.row.name)},onContextMenu:s=>{let u=l(s);u&&(s.preventDefault(),c({clientX:s.clientX,clientY:s.clientY,row:u.index}))},children:[o(Fn,{bars:n,frame:i,ramp:e.referenceRampDomain,rowGenes:e.walkRowGenes}),o(Yn,{model:e,bars:n,frame:i}),o(Q,{el:Ke(n,i,new Set(e.walkLayers.map(s=>s.walk)))})]}),o(Vn,{model:e}),h("div",{style:Xn,"data-testid":"graph-walk-strip-key",children:[p.map(s=>h("div",{style:te,children:[o(ee,{swatch:st(s.swatch)}),o("span",{children:s.label})]},s.label)),o("span",{style:{color:"#777"},children:"Ticks mark where each walk passes the node under the pointer; click a haplotype's bar to lift its walk"})]}),o(oe,{model:e,at:r&&{...r,bars:n},onClose:()=>{c(void 0)}})]})}),Yt=Zn;var $n=d(function({model:e}){let n=e.walkStripLocator;return n?h(J,{model:e,zIndex:4,overflow:"visible",testId:"graph-walk-strip-locator",children:[o("circle",{cx:n.x,cy:n.y,r:11,fill:"none",stroke:"white",strokeWidth:4}),o("circle",{cx:n.x,cy:n.y,r:11,fill:"none",stroke:"#111",strokeWidth:1.75})]}):null}),Zt=$n;var jn=1.1,Kn=100,qn=40,Un=800,Jn=10,$t=2;function me(t){let e=t.deltaY*(t.deltaMode===1?qn:t.deltaMode===2?Un:1),n=(t.ctrlKey?Jn:1)*e/Kn;return jn**-Math.max(-$t,Math.min($t,n))}var Qn=40,eo=100,to=24,jt=Math.log(16);function no(t,e){let n=t*Math.exp(-Math.max(0,e)/to);return Math.abs(n)<.001?t:t-n}function oo(t,e){let n=Math.abs(t.deltaX)>Math.abs(t.deltaY);return t.ctrlKey||t.metaKey||!n&&(!e||e.scrollZoom)?"zoom":n?"pan":"page"}function Ut(t,e,n){T(()=>{if(!t)return;let i=-1/0,r={backlog:0,x:0,y:0,frame:0,last:0},c=p=>{let s=no(r.backlog,Math.min(100,p-r.last));r.backlog-=s,r.last=p,r.frame=r.backlog?requestAnimationFrame(c):0,E(n)&&n.zoom(Math.exp(s),r.x,r.y)},l=p=>{if(n.hostPlacesX||n.followsHostView)return;let m=((p.target instanceof Element?p.target.closest("canvas"):null)??(n.facetPanels?null:e))?.getBoundingClientRect();if(m&&p.clientY-m.top<n.referenceStripZonePx)return;let w=oo(p,n.host);if(w!=="page"){if(n.host&&p.stopPropagation(),p.preventDefault(),w==="pan"){if(p.timeStamp-i>eo){let S=p.deltaMode===1?Qn:1;n.setTransform(n.scale,n.translateX-p.deltaX*S,n.translateY)}return}i=p.timeStamp,m&&(r.x=p.clientX-m.left,r.y=p.clientY-m.top,r.backlog=Math.max(-jt,Math.min(jt,r.backlog+Math.log(me(p)))),r.frame||(r.last=performance.now()-1e3/60,r.frame=requestAnimationFrame(c)))}};return t.addEventListener("wheel",l,{passive:!1}),()=>{cancelAnimationFrame(r.frame),t.removeEventListener("wheel",l)}},[t,e,n])}var Kt=3,ge="data-gesture-owner",F=t=>({x:t.clientX,y:t.clientY});function qt(t){let[e,n]=[...t.values()];return{spread:Math.hypot(e.x-n.x,e.y-n.y),mid:{x:(e.x+n.x)/2,y:(e.y+n.y)/2}}}function Jt(t){let e=M({x:0,y:0}),n=M({x:0,y:0}),i=M(!1),r=M(void 0),c=a=>r.current!==void 0&&a.pointerId!==r.current,l=M(new Map),p=M(null),s=M(null),u=M(!1),m=M(null),w=M(!1),S=M({frame:0,pan:null,hover:null,pinch:!1});T(()=>()=>{cancelAnimationFrame(S.current.frame)},[]);let[N,I]=C(),[O,D]=C(!1),[V,Y]=C(void 0);function R(a){let f=a.currentTarget.getBoundingClientRect();return{x:a.clientX-f.left,y:a.clientY-f.top}}function L(a,f){if(t.layoutResult?.tubeMap)return t.tubeMapNodeAt(a,f);let g=t.referenceStripNodeAt(a,f);if(g)return g;let{nodePositions:v}=t;if(!v)return null;let{x:y,y:b}=se(a,f,t,t.axisScale);return le(v,y,b,t.axisScale,t.positionsVersion,t.nodeInk)}function tn(a,f){let{nodePositions:g,graph:v}=t;if(!g||!v)return null;let{x:y,y:b}=se(a,f,t,t.axisScale);return ce(g,v,y,b,t.axisScale,t.effectiveDrawPaths&&!t.facetPanels,t.positionsVersion,t.deletionEdgeIndexes,t.hiddenEdgeIndexes,t.deletionRoutes,t.layoutResult?.stranded)}function nn(a){a.button===0&&a.preventDefault()}function on(a){if(a.button!==0)return;let f=l.current;if(c(a)){t.isPanning&&!w.current&&a.pointerType==="touch"&&f.size===1&&(a.currentTarget.setPointerCapture(a.pointerId),f.set(a.pointerId,F(a)),s.current=qt(f),i.current=!0);return}i.current=!1,n.current={x:a.clientX,y:a.clientY},a.currentTarget.removeAttribute(ge);let g=t.followsHostView;if(t.hostPlacesX||g&&a.shiftKey)return;a.currentTarget.setPointerCapture(a.pointerId),r.current=a.pointerId,p.current=a.currentTarget,f.clear(),f.set(a.pointerId,F(a));let{x:v,y}=R(a),b=y<t.referenceStripZonePx,k=t.layoutResult?.tubeMap||b?null:L(v,y);g&&k&&a.currentTarget.setAttribute(ge,""),w.current=g,u.current=b&&!g,k?t.setDraggingNode(k):t.setPanning(!0),e.current={x:a.clientX,y:a.clientY}}function ve(){let a=s.current,f=p.current;if(!a||!f)return;let g=qt(l.current),v=f.getBoundingClientRect();a.spread>0&&g.spread>0&&t.zoom(g.spread/a.spread,a.mid.x-v.left,a.mid.y-v.top),t.setTransform(t.scale,t.translateX+g.mid.x-a.mid.x,t.translateY+g.mid.y-a.mid.y),s.current=g}function rn(){let a=S.current,{pan:f,hover:g,pinch:v}=a;if(a.frame=0,a.pan=null,a.hover=null,a.pinch=!1,v&&ve(),f&&u.current?t.host?.horizontalScroll(-f.dx):f&&w.current?t.setTransform(t.scale,t.translateX,t.translateY+f.dy):f&&t.setTransform(t.scale,t.translateX+f.dx,t.translateY+f.dy),!g)return;let{x:y,y:b}=g,k=t.facetPanels?void 0:yt(t.overlayLabels,y,b);Y(x=>x?.label===k?.label&&x?.readout===k?.readout?x:k),be(()=>{if(t.walkRowBars){let x=t.walkRowAt(y,b);t.setHoveredWalkRow(x===void 0?null:t.walkRowList[x].name)}if(t.nodePositions&&t.graph){let x=L(y,b);t.setHoveredPanel(t.tubeMapPanelAt(b)),t.setHoveredNode(x,{x:y,y:b}),D(x!==null&&!t.hostPlacesX&&!t.layoutResult?.tubeMap&&b>=t.referenceStripZonePx),t.setHoveredTube(x===null&&t.layoutResult?.tubeMap?t.tubeAt(y,b):null),t.setHoveredEdge(x||t.layoutResult?.tubeMap||!t.hoverLightsEverything?null:tn(y,b))}})}function Z(){S.current.frame||(S.current.frame=requestAnimationFrame(rn))}function an(){let a=S.current;cancelAnimationFrame(a.frame),a.frame=0,a.pan=null,a.hover=null,a.pinch=!1}function sn(a){let f=l.current;if(s.current&&f.has(a.pointerId)){f.set(a.pointerId,F(a)),S.current.pinch=!0,Z();return}if(c(a)||m.current)return;let g=a.clientX-e.current.x,v=a.clientY-e.current.y;e.current={x:a.clientX,y:a.clientY},Math.hypot(a.clientX-n.current.x,a.clientY-n.current.y)>Kt&&(i.current=!0);let y=S.current;if(t.draggingNode)t.moveNode(t.draggingNode,g/t.scaleX,v/t.scaleY);else if(t.isPanning)y.pan={dx:(y.pan?.dx??0)+g,dy:(y.pan?.dy??0)+v},Z();else{let b=a.currentTarget.getBoundingClientRect();y.hover={x:a.clientX-b.left,y:a.clientY-b.top},Z()}}function re(a){let f=l.current;if(s.current&&f.has(a.pointerId)){S.current.pinch&&(S.current.pinch=!1,ve()),f.delete(a.pointerId),s.current=null;let[[g,v]]=[...f];r.current=g,e.current=v;return}c(a)||(r.current=void 0,f.clear(),E(t)&&t.stopDragging())}function ln(a){c(a)||(Y(void 0),D(!1),m.current?S.current.hover=null:(r.current=void 0,l.current.clear(),s.current=null,an(),E(t)&&t.stopDragging()),E(t)&&t.clearHover())}function cn(a){let{x:f,y:g}=R(a),v=L(f,g),{clientX:y,clientY:b}=a;if(v){a.preventDefault(),I({clientX:y,clientY:b,nodeId:v});return}let k=t.walkRowAt(f,g);k!==void 0&&(a.preventDefault(),I({clientX:y,clientY:b,row:k}))}function pn(a){if(!i.current){let{x:f,y:g}=R(a),v=L(f,g);t.setSelectedNode(v),v&&t.showNodeDetails(v)}}T(()=>()=>{m.current?.end()},[]);function un(a){if(a.button!==0||t.hostPlacesX||t.followsHostView||!(a.target instanceof Element)||!a.target.closest(`[${tt}]`))return;m.current?.end(),u.current=!1,w.current=!1;let f=a.pointerId,g=F(a),v=g,y={moved:!1,end:()=>{window.removeEventListener("pointermove",b,!0),window.removeEventListener("pointerup",k,!0),window.removeEventListener("pointercancel",k,!0),y.moved&&E(t)&&t.stopDragging()}};function b(x){if(x.pointerId!==f)return;if(!y.moved){if(Math.hypot(x.clientX-g.x,x.clientY-g.y)<=Kt)return;y.moved=!0,t.setPanning(!0)}let ae=S.current;ae.pan={dx:(ae.pan?.dx??0)+x.clientX-v.x,dy:(ae.pan?.dy??0)+x.clientY-v.y},v=F(x),Z()}function k(x){x.pointerId===f&&(y.end(),setTimeout(()=>{m.current===y&&(m.current=null)},0))}m.current=y,window.addEventListener("pointermove",b,!0),window.addEventListener("pointerup",k,!0),window.addEventListener("pointercancel",k,!0)}function dn(a){m.current?.moved&&(m.current=null,a.stopPropagation())}let fn={cursor:t.isPanning||t.draggingNode?"grabbing":O?"move":"grab",touchAction:t.hostPlacesX?"auto":"none",overscrollBehavior:"contain"},hn=t.host!==void 0&&!t.hostPlacesX&&!t.followsHostView?{[ge]:"",onMouseDown:a=>{a.stopPropagation()}}:{};return{canvasStyle:fn,surfaceProps:hn,handlers:{onMouseDown:nn,onPointerDown:on,onPointerMove:sn,onPointerUp:re,onPointerCancel:re,onLostPointerCapture:re,onPointerLeave:ln,onClick:pn,onContextMenu:cn},contextMenu:N,hoveredChip:V,labelHandlers:{onPointerDown:un,onClickCapture:dn},closeContextMenu:()=>{I(void 0)}}}var ro={position:"relative"},ao={position:"relative",lineHeight:0,isolation:"isolate"},io={position:"absolute",left:0,right:0,bottom:0,zIndex:0},so={position:"absolute",inset:0,zIndex:10,lineHeight:"normal",pointerEvents:"none"},lo={position:"absolute",left:6,transform:"translateY(-50%)",background:"rgba(255,255,255,0.82)",padding:"0 4px",borderRadius:3,fontSize:11,lineHeight:"16px",whiteSpace:"nowrap",pointerEvents:"none",zIndex:4},co=d(function({model:e}){return o(G,{children:e.visibleRowLabels.map(({label:n,y:i,top:r})=>o("div",{"data-testid":"graph-row-label",style:{...lo,top:r},children:n},i))})}),po={position:"absolute",display:"flex",flexDirection:"column",borderRadius:3,overflowX:"hidden",overflowY:"auto",zIndex:4},Qt={position:"absolute",transform:"translate(-50%, -50%)",background:"rgba(255,255,255,0.78)",padding:"0 3px",borderRadius:3,fontSize:10,lineHeight:"13px",whiteSpace:"nowrap",pointerEvents:"none",zIndex:3},uo={...Qt,color:"#18181c",fontWeight:600},fo=d(function({model:e}){let n=M(null),i=e.legendAtRest;return T(()=>{let r=n.current;if(!r||!i)return;let c=new ResizeObserver(()=>{l()}),l=()=>{r.firstElementChild&&c.observe(r.firstElementChild),E(e)&&e.legendAtRest&&e.setLegendSize({width:r.offsetWidth,height:r.scrollHeight})};return c.observe(r),l(),()=>{c.disconnect()}},[e,i]),o("div",{ref:n,"data-legend-corner":e.legendCorner,style:{...po,...e.legendCorner==="top-right"?{top:_+e.referenceStripZonePx,right:_}:{bottom:_,left:_},maxHeight:e.canvasHeight-2*_-e.referenceStripZonePx},children:o(Rt,{model:e})})}),ho=d(function({model:e}){let n=e.overlayLabels.sizes,i=n.flatMap(({key:r,leader:c})=>c?[{key:r,...c}]:[]);return h(G,{children:[i.length>0?o(J,{model:e,zIndex:2,overflow:"visible",children:i.map(({key:r,arcX:c,arcY:l,labelX:p,labelY:s})=>o("line",{"data-testid":"graph-label-leader",x1:c,y1:l,x2:p,y2:s,stroke:"#18181c",strokeWidth:1},r))}):null,n.map(({key:r,text:c,x:l,y:p,kind:s})=>o("div",{"data-testid":"graph-size-label",style:{...s==="deletion"?uo:Qt,left:l,top:p},children:c},r))]})}),en=d(function({model:e,handle:{canvasRef:n,canvas:i},ownChrome:r}){let{handlers:c,canvasStyle:l,surfaceProps:p,labelHandlers:s,contextMenu:u,closeContextMenu:m,hoveredChip:w}=Jt(e),[S,N]=C(null);Ut(S,i,e);let I=e.facetPanels!==void 0;return h("div",{style:ro,...p,children:[r?o(Dt,{model:e}):null,h("div",{ref:N,style:ao,...s,onMouseEnter:()=>{e.setPointerInPane(!0)},onMouseLeave:()=>{E(e)&&e.setPointerInPane(!1)},children:[e.referenceStripShown?o("div",{style:{...io,top:e.referenceStripZonePx,background:U}}):null,o("canvas",{ref:n,"data-testid":"graph-genome-canvas",style:{...l,width:e.paneWidth,height:e.canvasHeight,display:"block",position:"relative",zIndex:1},...c}),I?o(Ct,{model:e,handlers:c,canvasStyle:l}):h(G,{children:[o(St,{model:e}),o(Mt,{model:e}),o(wt,{model:e}),o(co,{model:e}),o(ho,{model:e}),o(ot,{model:e}),o(ht,{model:e}),o(bt,{model:e}),o(xt,{model:e}),o(Zt,{model:e}),o(fo,{model:e})]}),r?o("div",{style:so,children:o(xe,{isVisible:e.isLoading,immediate:!e.layoutResult,statusMessage:e.statusMessage,onCancel:e.canCancelLoad?()=>{e.cancelLoad()}:void 0})}):null,o(Xt,{model:e,chip:w})]}),e.walkStripShown?o(Yt,{model:e}):null,o(oe,{model:e,at:u,onClose:m}),r?.renderError?o(ie,{error:r.renderError,onReset:r.retryRender}):null,r&&e.error?o(ie,{error:e.error,onReset:e.canRetryLoad?()=>{e.retryLoad()}:void 0}):null]})}),mo=d(function({model:e}){let{canvasRef:n,canvas:i,error:r,retry:c}=kt(Pt,e);return o(en,{model:e,handle:{canvasRef:n,canvas:i},ownChrome:{renderError:r,retryRender:c}})}),go=d(function({model:e,handle:n}){return n?o(en,{model:e,handle:n}):o(mo,{model:e})}),Ui=go;export{Pt as a,Ui as b};
|
|
2
|
-
//# sourceMappingURL=chunk-T5X4OJJ2.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/GraphGenomeView/renderer/GraphRenderer.ts", "jbrowse-host:@jbrowse/render-core/useRenderingBackend", "../../src/GraphGenomeView/components/HoverLayer.tsx", "../../src/GraphGenomeView/components/Legend.tsx", "../../src/GraphGenomeView/components/FacetPanels.tsx", "../../node_modules/.pnpm/@mui+icons-material@9.5.0_@mui+material@9.5.0_@emotion+react@11.14.0_@types+react@19.3._abf953b0c56c79ebdc461ec953894a27/node_modules/@mui/icons-material/CropFree.mjs", "../../node_modules/.pnpm/@mui+icons-material@9.5.0_@mui+material@9.5.0_@emotion+react@11.14.0_@types+react@19.3._abf953b0c56c79ebdc461ec953894a27/node_modules/@mui/icons-material/ZoomIn.mjs", "../../node_modules/.pnpm/@mui+icons-material@9.5.0_@mui+material@9.5.0_@emotion+react@11.14.0_@types+react@19.3._abf953b0c56c79ebdc461ec953894a27/node_modules/@mui/icons-material/ZoomOut.mjs", "../../src/GraphGenomeView/components/ColorSchemeSelect.tsx", "../../src/GraphGenomeView/components/GraphStats.tsx", "../../src/GraphGenomeView/components/LayoutSelect.tsx", "../../src/GraphGenomeView/components/RepeatSelect.tsx", "../../node_modules/.pnpm/@mui+icons-material@9.5.0_@mui+material@9.5.0_@emotion+react@11.14.0_@types+react@19.3._abf953b0c56c79ebdc461ec953894a27/node_modules/@mui/icons-material/Close.mjs", "../../node_modules/.pnpm/@mui+icons-material@9.5.0_@mui+material@9.5.0_@emotion+react@11.14.0_@types+react@19.3._abf953b0c56c79ebdc461ec953894a27/node_modules/@mui/icons-material/MoreVert.mjs", "../../src/GraphGenomeView/components/SettingsMenu.tsx", "../../src/GraphGenomeView/components/WalkSelect.tsx", "../../src/GraphGenomeView/components/GraphToolbar.tsx", "../../src/GraphGenomeView/components/HoverTooltip.tsx", "../../node_modules/.pnpm/@mui+icons-material@9.5.0_@mui+material@9.5.0_@emotion+react@11.14.0_@types+react@19.3._abf953b0c56c79ebdc461ec953894a27/node_modules/@mui/icons-material/FilterList.mjs", "../../node_modules/.pnpm/@mui+icons-material@9.5.0_@mui+material@9.5.0_@emotion+react@11.14.0_@types+react@19.3._abf953b0c56c79ebdc461ec953894a27/node_modules/@mui/icons-material/FilterListOff.mjs", "../../node_modules/.pnpm/@mui+icons-material@9.5.0_@mui+material@9.5.0_@emotion+react@11.14.0_@types+react@19.3._abf953b0c56c79ebdc461ec953894a27/node_modules/@mui/icons-material/Info.mjs", "../../src/GraphGenomeView/components/PaneContextMenu.tsx", "../../src/GraphGenomeView/components/WalkStrip.tsx", "../../src/GraphGenomeView/components/WalkStripLocator.tsx", "../../node_modules/.pnpm/@jbrowse+bandage-core@13.3.1/node_modules/@jbrowse/bandage-core/dist/chunks/chunk-TDQLINVI.js", "../../src/GraphGenomeView/components/usePaneGestures.ts", "../../src/GraphGenomeView/components/GraphCanvas.tsx"],
|
|
4
|
-
"sourcesContent": ["import { Canvas2DRenderer } from '@jbrowse/bandage-core/renderer/Canvas2DRenderer'\n\n// Canvas2D only, and deliberately not through render-core's GPU ladder. The\n// batch is strokes and arrowheads in layout units, and stroking them batched by\n// colour is inside a frame budget at the node counts this view caps itself at\n// (agent-docs/reference/GRAPH_SCALE_AND_LOD.md), so a GPU backend would buy a few\n// milliseconds for ~30 KB of bundled HAL and a shader toolchain. If one is ever\n// wanted, it should take the same `Renderer` interface and draw the batch as\n// instances \u2014 a capsule per node segment, a bezier ribbon per edge stroke \u2014\n// rather than reviving a triangle mesh; agent-docs/ideas/waiting-on-a-number scopes it.\nexport function createGraphRenderer(canvas: HTMLCanvasElement) {\n return Promise.resolve(new Canvas2DRenderer(canvas))\n}\n", "const host = JBrowseExports[\"@jbrowse/render-core/useRenderingBackend\"]\nconst read = name =>\n host != null && name in Object(host)\n ? host[name]\n : Object.assign(\n function () {\n throw new Error(\"This JBrowse does not provide '\" + name + \"' from '\" + \"@jbrowse/render-core/useRenderingBackend\" + \"' to plugins: \" + \"GraphGenomeView was built for a different JBrowse version, so update the plugin or JBrowse\")\n },\n { jbrowseHostMissing: name },\n )\nexport const CONTEXT_LOST_REPORT_GRACE_MS = /* @__PURE__ */ read(\"CONTEXT_LOST_REPORT_GRACE_MS\")\nexport const OFFSCREEN_RELEASE_BAND = /* @__PURE__ */ read(\"OFFSCREEN_RELEASE_BAND\")\nexport const createGpuContextLostError = /* @__PURE__ */ read(\"createGpuContextLostError\")\nexport const createGpuDeviceLostError = /* @__PURE__ */ read(\"createGpuDeviceLostError\")\nexport const createGpuSurfaceLostError = /* @__PURE__ */ read(\"createGpuSurfaceLostError\")\nexport const isGpuContextLostError = /* @__PURE__ */ read(\"isGpuContextLostError\")\nexport const useRenderingBackend = /* @__PURE__ */ read(\"useRenderingBackend\")\nexport default host && host.__esModule ? host.default : host", "import { useEffect, useState } from 'react'\n\nimport { Canvas2DRenderer } from '@jbrowse/bandage-core/renderer/Canvas2DRenderer'\nimport { autorun } from 'mobx'\nimport { observer } from 'mobx-react'\n\nimport { paneLayerStyle } from './PaneLayer'\nimport { dependOn } from '../pane/paneBase'\nimport { trackedDpr } from '../trackedDpr'\n\nimport type { GraphPaneModel } from '../model'\n\nexport const hoverLayerStyle = paneLayerStyle(1)\n\n// The pane's hover, on a transparent canvas over its drawing and tube map\nexport default observer(function HoverLayer({\n model,\n}: {\n model: GraphPaneModel\n}) {\n const [canvas, setCanvas] = useState<HTMLCanvasElement | null>(null)\n useEffect(() => {\n if (!canvas) {\n return undefined\n }\n const renderer = new Canvas2DRenderer(canvas)\n const dispose = autorun(() => {\n dependOn(trackedDpr())\n renderer.resize(model.paneWidth, model.canvasHeight)\n model.paintHover(renderer, model.drawnBatch)\n })\n return () => {\n dispose()\n renderer.dispose()\n }\n }, [canvas, model])\n return (\n <canvas\n ref={setCanvas}\n data-testid=\"graph-hover-layer\"\n style={hoverLayerStyle}\n />\n )\n})\n", "import { Fragment } from 'react'\nimport type { ReactNode } from 'react'\n\nimport { observer } from 'mobx-react'\n\nimport { LegendSwatchView } from './LegendSwatch'\nimport {\n HEADING_GAP_PX,\n legendBoxStyle,\n legendHeadingStyle,\n legendNoteStyle,\n legendRowStyle,\n} from './legendStyles'\nimport { legendSections, rowPitch, swatchColumn } from '../legendSections'\n\nimport type { LegendRow } from '../legendSections'\nimport type { GraphPaneModel } from '../model'\n\n// One row: its swatch then its words, or a note with neither.\n// `at`, where the hovered node sits on a walk, stands in for the line under\n// it. A `column` centres the swatch in a slot that wide and indents the line\n// under to the words.\nexport const LegendRowView = observer(function LegendRowView({\n row,\n at,\n hint,\n after,\n column,\n}: {\n row: LegendRow\n at?: string\n hint?: string\n after?: ReactNode\n column?: number\n}) {\n const indent = column === undefined ? undefined : { paddingLeft: column + 5 }\n return row.swatch ? (\n <div title={[row.title, hint].filter(Boolean).join(' \u00B7 ') || undefined}>\n <div style={legendRowStyle}>\n <span\n style={{\n display: 'flex',\n flex: 'none',\n justifyContent: 'center',\n width: column,\n }}\n >\n <LegendSwatchView swatch={row.swatch} />\n </span>\n <span>\n {row.strong ? <strong>{row.strong}</strong> : null}\n {row.label}\n </span>\n {after}\n </div>\n {at ? (\n <div style={indent} data-testid=\"graph-walk-at\">\n {at}\n </div>\n ) : row.under ? (\n <div style={indent}>{row.under}</div>\n ) : null}\n </div>\n ) : (\n <div style={legendNoteStyle}>{row.label}</div>\n )\n})\n\nconst closeStyle = {\n pointerEvents: 'auto' as const,\n cursor: 'pointer',\n border: 'none',\n background: 'none',\n padding: '0 2px',\n font: 'inherit',\n textDecoration: 'underline',\n}\n\n// Every key the drawing needs in one box, a section each, every line at one\n// pitch\nexport const LegendPanel = observer(function LegendPanel({\n model,\n}: {\n model: GraphPaneModel\n}) {\n const sections = legendSections(model)\n if (sections.length === 0) {\n return null\n }\n const rows = sections.flatMap(section => section.rows)\n const pitch = rowPitch(rows)\n const column = swatchColumn(rows)\n return (\n <div style={{ ...legendBoxStyle, lineHeight: `${pitch}px` }}>\n {sections.map(({ testid, rows, heading, spaced }, i) => (\n <Fragment key={testid}>\n {heading ? (\n <div\n style={{\n ...legendHeadingStyle,\n paddingTop: i === 0 ? 0 : HEADING_GAP_PX,\n }}\n >\n {heading}\n </div>\n ) : null}\n <div\n data-testid={testid}\n style={spaced ? { paddingTop: HEADING_GAP_PX } : undefined}\n >\n {rows.map(row => (\n <LegendRowView\n key={row.key}\n row={row}\n column={column}\n at={row.walk ? model.hoveredOn(row.walk) : undefined}\n after={\n row.closesBubble ? (\n <button\n type=\"button\"\n style={closeStyle}\n data-testid=\"graph-close-bubble\"\n onClick={() => {\n model.closeBubbles()\n }}\n >\n close\n </button>\n ) : null\n }\n />\n ))}\n </div>\n </Fragment>\n ))}\n </div>\n )\n})\n", "import { useEffect, useState } from 'react'\n\nimport { FACET_GAP_PX, FACET_TITLE_PX } from '@jbrowse/bandage-core/facetGrid'\nimport { Canvas2DRenderer } from '@jbrowse/bandage-core/renderer/Canvas2DRenderer'\nimport { autorun, computed } from 'mobx'\nimport { observer } from 'mobx-react'\n\nimport { hoverLayerStyle } from './HoverLayer'\nimport { LegendRowView } from './Legend'\nimport { facetKeyRows, walkKeyRow } from '../legendSections'\nimport { FACET_KEY_ROW_PX } from '../pane/fitViews'\nimport { PAPER_CSS } from '../pane/paneBase'\n\nimport type { PaneHandlers } from './usePaneGestures'\nimport type { GraphPaneModel } from '../model'\nimport type { WalkLift } from '@jbrowse/bandage-core/walkHighlight'\n\n// The pane faceted by walk: the same layout drawn once per lifted walk, each\n// panel with that walk alone shading along itself, so walks compare by where\n// they go rather than by which lane is which colour. The panels share the\n// pane's transform, so a pan, zoom or hover in one is in all of them.\n\nconst gridStyle = {\n position: 'absolute' as const,\n left: 0,\n top: 0,\n zIndex: 4,\n display: 'grid',\n gap: FACET_GAP_PX,\n lineHeight: 'normal',\n}\n\nconst titleStyle = {\n height: FACET_TITLE_PX,\n padding: '2px 6px',\n boxSizing: 'border-box' as const,\n fontFamily: 'inherit',\n fontSize: 11,\n color: 'inherit',\n cursor: 'pointer',\n border: 'none',\n background: 'none',\n textAlign: 'left' as const,\n display: 'block',\n}\n\nconst panelStyle = { position: 'relative' as const }\n\nconst keyStyle = {\n gridColumn: '1 / -1',\n height: FACET_KEY_ROW_PX,\n padding: '2px 6px',\n boxSizing: 'border-box' as const,\n display: 'flex',\n gap: 14,\n fontSize: 11,\n lineHeight: '15px',\n}\n\nconst FacetPanel = observer(function FacetPanel({\n model,\n lift,\n width,\n height,\n cell,\n handlers,\n canvasStyle,\n}: {\n model: GraphPaneModel\n lift: WalkLift\n width: number\n height: number\n cell: { gridRow: number; gridColumn: number }\n handlers: PaneHandlers\n canvasStyle: React.CSSProperties\n}) {\n const [canvas, setCanvas] = useState<HTMLCanvasElement | null>(null)\n const [hoverCanvas, setHoverCanvas] = useState<HTMLCanvasElement | null>(null)\n const walk = lift.walks[0]!\n useEffect(() => {\n if (!canvas || !hoverCanvas) {\n return undefined\n }\n const renderer = new Canvas2DRenderer(canvas)\n const hover = new Canvas2DRenderer(hoverCanvas)\n const drawing = computed(() => model.buildDrawing(lift, false))\n let uploaded: ReturnType<typeof model.buildDrawing>\n const disposers = [\n autorun(() => {\n const grid = model.facetGrid\n if (grid) {\n renderer.resize(grid.width, grid.height)\n }\n const built = drawing.get()\n if (!built) {\n return\n }\n if (built !== uploaded) {\n renderer.uploadGeometry(built.batch)\n uploaded = built\n }\n model.applySelection(renderer)\n model.paint(renderer)\n }),\n autorun(() => {\n const grid = model.facetGrid\n if (grid) {\n hover.resize(grid.width, grid.height)\n }\n const built = drawing.get()\n if (built) {\n model.paintHover(hover, built.batch)\n }\n }),\n ]\n return () => {\n for (const dispose of disposers) {\n dispose()\n }\n renderer.dispose()\n hover.dispose()\n }\n }, [canvas, hoverCanvas, model, lift])\n\n const label = model.walkLabel(walk.name)\n return (\n <div style={cell}>\n <button\n type=\"button\"\n style={titleStyle}\n data-testid=\"graph-facet-title\"\n onClick={() => {\n model.liftWalks([walk.name])\n model.setFacet('')\n }}\n >\n <LegendRowView\n row={walkKeyRow(model, walk)}\n hint={`click to lift ${label} alone`}\n at={model.hoveredOn(walk)}\n />\n </button>\n <div style={panelStyle}>\n <canvas\n ref={setCanvas}\n data-testid=\"graph-facet-canvas\"\n style={{ ...canvasStyle, width, height, display: 'block' }}\n {...handlers}\n />\n <canvas ref={setHoverCanvas} style={hoverLayerStyle} />\n </div>\n </div>\n )\n})\n\nconst FacetPanels = observer(function FacetPanels({\n model,\n handlers,\n canvasStyle,\n}: {\n model: GraphPaneModel\n handlers: PaneHandlers\n canvasStyle: React.CSSProperties\n}) {\n const panels = model.facetPanels\n const grid = model.facetGrid\n const place = model.facetPlacement\n if (!panels || !grid || !place) {\n return null\n }\n const { columns, width, height } = grid\n return (\n <div\n data-testid=\"graph-facet-panels\"\n style={{\n ...gridStyle,\n width: model.paneWidth,\n minHeight: model.canvasHeight,\n gridTemplateColumns: `repeat(${columns}, ${width}px)`,\n background: PAPER_CSS,\n }}\n >\n {panels.map((lift, i) => (\n <FacetPanel\n key={lift.walks[0]!.name}\n model={model}\n lift={lift}\n width={width}\n height={height}\n cell={{\n gridRow: Math.floor(place.cells[i]! / columns) + 1,\n gridColumn: (place.cells[i]! % columns) + 1,\n }}\n handlers={handlers}\n canvasStyle={canvasStyle}\n />\n ))}\n <div\n style={{\n ...keyStyle,\n gridRow:\n Math.floor(\n place.cells.reduce((a, b) => Math.max(a, b), -Infinity) / columns,\n ) + 2,\n }}\n data-testid=\"graph-facet-key\"\n >\n {facetKeyRows(model).map(row => (\n <LegendRowView key={row.key} row={row} />\n ))}\n </div>\n </div>\n )\n})\n\nexport default FacetPanels\n", "\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M3 5v4h2V5h4V3H5c-1.1 0-2 .9-2 2m2 10H3v4c0 1.1.9 2 2 2h4v-2H5zm14 4h-4v2h4c1.1 0 2-.9 2-2v-4h-2zm0-16h-4v2h4v4h2V5c0-1.1-.9-2-2-2\"\n}), 'CropFree');", "\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon([/*#__PURE__*/_jsx(\"path\", {\n d: \"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14\"\n}, \"0\"), /*#__PURE__*/_jsx(\"path\", {\n d: \"M12 10h-2v2H9v-2H7V9h2V7h1v2h2z\"\n}, \"1\")], 'ZoomIn');", "\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14M7 9h5v1H7z\"\n}), 'ZoomOut');", "import { COLOR_SCHEMES } from '@jbrowse/bandage-core/colorSchemes'\nimport { observer } from 'mobx-react'\n\nimport LabelledSelect from './LabelledSelect'\n\nimport type { GraphPaneModel } from '../model'\n\nconst ColorSchemeSelect = observer(function ColorSchemeSelect({\n model,\n}: {\n model: GraphPaneModel\n}) {\n const fixed = model.colorSchemeLock\n return (\n <LabelledSelect\n label=\"Color\"\n size=\"small\"\n sx={{ minWidth: 100 }}\n disabled={fixed !== undefined}\n title={fixed?.why}\n shown={fixed?.value}\n value={model.chosenColorScheme}\n options={COLOR_SCHEMES.map(({ value }) => ({\n value,\n label: model.colorSchemeLabel(value),\n }))}\n testId=\"graph-color-select\"\n onChange={scheme => {\n model.setColorScheme(scheme)\n }}\n />\n )\n})\n\nexport default ColorSchemeSelect\n", "import { Typography } from '@mui/material'\nimport { observer } from 'mobx-react'\nimport { makeStyles } from 'tss-react/mui'\n\nimport type { GraphPaneModel } from '../model'\n\nconst useStyles = makeStyles()({\n stats: {\n marginLeft: 'auto',\n },\n perf: {\n color: '#888',\n fontVariantNumeric: 'tabular-nums',\n },\n})\n\nfunction fmtMs(ms: number | undefined) {\n return ms === undefined ? '\u2013' : `${Math.round(ms)}ms`\n}\n\n// The perf READOUT, off by default: it sat in the toolbar of every published\n// graph figure, where one machine's fetch time is a number a reader has to work\n// out is not about them. `showPerf` is in the settings menu.\n//\n// The numbers themselves are not conditional \u2014 they ride the stats element's\n// data-* attributes either way (see GraphStats), so a browser test asserting a\n// timing budget never depends on a display setting, and turning the text off\n// costs no coverage. They live there rather than on this element so that\n// switching the text off leaves no empty node behind to carry them.\nconst GraphPerf = observer(function GraphPerf({\n model,\n}: {\n model: GraphPaneModel\n}) {\n const { classes } = useStyles()\n const { lastFetchMs, lastLayoutMs, lastGeometryMs } = model\n const hasMetrics =\n lastFetchMs !== undefined ||\n lastLayoutMs !== undefined ||\n lastGeometryMs !== undefined\n return model.showPerf && hasMetrics ? (\n <Typography\n variant=\"caption\"\n className={classes.perf}\n data-testid=\"graph-perf-stats\"\n >\n fetch {fmtMs(lastFetchMs)} \u00B7 layout {fmtMs(lastLayoutMs)} \u00B7 geom{' '}\n {fmtMs(lastGeometryMs)}\n </Typography>\n ) : null\n})\n\nconst GraphStats = observer(function GraphStats({\n model,\n}: {\n model: GraphPaneModel\n}) {\n const { classes } = useStyles()\n return (\n <div\n className={classes.stats}\n data-testid=\"graph-stats\"\n data-node-count={model.nodeCount}\n data-edge-count={model.edgeCount}\n data-path-count={model.pathCount}\n // unconditional, whatever `showPerf` is doing to the text beside them \u2014\n // see GraphPerf\n data-fetch-ms={model.lastFetchMs ?? ''}\n data-layout-ms={model.lastLayoutMs ?? ''}\n data-geometry-ms={model.lastGeometryMs ?? ''}\n data-geometry-strokes={model.lastGeometryStrokeCount ?? ''}\n >\n <Typography variant=\"body2\" component=\"span\">\n {model.nodeCount} nodes, {model.edgeCount} edges\n {model.pathCount > 0 ? `, ${model.pathCount} paths` : ''}\n </Typography>{' '}\n <GraphPerf model={model} />\n </div>\n )\n})\n\nexport default GraphStats\n", "import { LAYOUT_MODES } from '@jbrowse/bandage-core/layoutModes'\nimport { observer } from 'mobx-react'\n\nimport LabelledSelect from './LabelledSelect'\n\nimport type { GraphPaneModel } from '../model'\n\nconst LayoutSelect = observer(function LayoutSelect({\n model,\n}: {\n model: GraphPaneModel\n}) {\n const { graph } = model\n return (\n <LabelledSelect\n label=\"Layout\"\n size=\"small\"\n sx={{ minWidth: 140 }}\n testId=\"graph-layout-select\"\n value={model.chosenLayoutMode}\n options={LAYOUT_MODES.map(({ value, label, description, available }) => ({\n value,\n label,\n description,\n disabled: graph ? !available(graph) : false,\n }))}\n onChange={mode => {\n void model.switchLayout(mode)\n }}\n />\n )\n})\n\nexport default LayoutSelect\n", "import { observer } from 'mobx-react'\n\nimport LabelledSelect from './LabelledSelect'\n\nimport type { GraphPaneModel } from '../model'\n\n// Which tandem repeat array walk rows slice each walk by and tile, or the\n// whole window\nconst RepeatSelect = observer(function RepeatSelect({\n model,\n}: {\n model: GraphPaneModel\n}) {\n if (\n model.chosenLayoutMode !== 'walkrows' ||\n model.repeatChoices.length === 0\n ) {\n return null\n }\n return (\n <LabelledSelect\n label=\"Repeat\"\n size=\"small\"\n sx={{ minWidth: 130, maxWidth: 260 }}\n testId=\"graph-repeat-select\"\n value={model.selectedRepeat?.key ?? ''}\n options={model.repeatOptions}\n onChange={key => {\n model.setRepeatKey(key)\n }}\n />\n )\n})\n\nexport default RepeatSelect\n", "\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n}), 'Close');", "\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2\"\n}), 'MoreVert');", "import { CascadingMenuButton } from '@jbrowse/core/ui'\nimport { getSession } from '@jbrowse/core/util'\nimport CloseIcon from '@mui/icons-material/Close'\nimport MoreVertIcon from '@mui/icons-material/MoreVert'\nimport RouteIcon from '@mui/icons-material/Route'\nimport SettingsIcon from '@mui/icons-material/Settings'\nimport VisibilityIcon from '@mui/icons-material/Visibility'\nimport { observer } from 'mobx-react'\n\nimport GraphSettingsDialog from './GraphSettingsDialog'\n\nimport type { GraphPaneModel } from '../model'\n\nconst SettingsMenu = observer(function SettingsMenu({\n model,\n}: {\n model: GraphPaneModel\n}) {\n // the toolbar beside this menu picks the walks and the repeat\n const haplotypes = model.highlightMenuItems({ picks: false })\n\n return (\n <CascadingMenuButton\n size=\"small\"\n tooltip=\"Graph options\"\n menuItems={[\n ...(haplotypes.length > 0\n ? [{ label: 'Haplotypes', icon: RouteIcon, subMenu: haplotypes }]\n : []),\n ...model.layoutOptionMenuItems({ repeat: false }),\n {\n label: 'Show',\n icon: VisibilityIcon,\n subMenu: [\n ...model.showMenuItems(),\n ...(model.modeDrawsNodes && model.walkChoices.length > 1\n ? [\n {\n type: 'checkbox' as const,\n label: 'Show walk rows under the graph',\n checked: model.walkStrip,\n onClick: () => {\n model.setWalkStrip(!model.walkStrip)\n },\n },\n ]\n : []),\n {\n type: 'checkbox' as const,\n label: 'Show timings',\n checked: model.showPerf,\n onClick: () => {\n model.setShowPerf(!model.showPerf)\n },\n },\n ],\n },\n { type: 'divider' as const },\n {\n label: 'Graph settings...',\n icon: SettingsIcon,\n helpText:\n 'Subgraph node limit; node width and path colors; the force-directed layout engine',\n onClick: () => {\n getSession(model).queueDialog(onClose => [\n GraphSettingsDialog,\n { model, onClose },\n ])\n },\n },\n { type: 'divider' as const },\n {\n label: 'Close graph',\n icon: CloseIcon,\n onClick: () => {\n model.clearGraph()\n },\n },\n ]}\n >\n <MoreVertIcon />\n </CascadingMenuButton>\n )\n})\n\nexport default SettingsMenu\n", "import { useId } from 'react'\n\nimport { getSession } from '@jbrowse/core/util'\nimport {\n Button,\n Checkbox,\n FormControl,\n InputLabel,\n ListItemText,\n MenuItem,\n Select,\n} from '@mui/material'\nimport { observer } from 'mobx-react'\nimport { makeStyles } from 'tss-react/mui'\n\nimport { ChooseWalksDialog, WALK_MENU_ITEMS } from '../pane/paneBase'\n\nimport type { GraphPaneModel } from '../model'\n\nconst useStyles = makeStyles()({\n formControl: {\n minWidth: 130,\n maxWidth: 260,\n },\n})\n\n// Which walks to lift out of the drawing: Bandage's path highlight, for as many\n// of the haplotypes a GBZ cut carries as the reader picks. Absent from a graph\n// with no walks, and from a tube map, whose tubes are the walks.\nconst WalkSelect = observer(function WalkSelect({\n model,\n}: {\n model: GraphPaneModel\n}) {\n const { classes } = useStyles()\n const labelId = useId()\n const { walkChoices } = model\n if (walkChoices.length === 0 || !model.liftsWalks) {\n return null\n }\n const names = new Set(walkChoices.map(c => c.name))\n const labels = new Map(walkChoices.map(c => [c.name, c.label]))\n const picked = model.walkLayers\n .map(layer => layer.walk)\n .filter(name => names.has(name))\n if (walkChoices.length > WALK_MENU_ITEMS) {\n return (\n <Button\n size=\"small\"\n variant=\"outlined\"\n color=\"inherit\"\n data-testid=\"graph-walk-choose\"\n onClick={() => {\n getSession(model).queueDialog(onClose => [\n ChooseWalksDialog,\n { model, onClose },\n ])\n }}\n >\n {picked.length > 0\n ? `${picked.length} of ${walkChoices.length} haplotypes`\n : 'Highlight haplotypes...'}\n </Button>\n )\n }\n return (\n <FormControl size=\"small\" className={classes.formControl}>\n <InputLabel id={labelId}>Highlight</InputLabel>\n <Select\n labelId={labelId}\n multiple\n value={picked}\n label=\"Highlight\"\n data-testid=\"graph-walk-select\"\n renderValue={selected => selected.map(n => labels.get(n)).join(', ')}\n onChange={e => {\n const { value } = e.target\n model.liftAmongChoices(\n typeof value === 'string' ? value.split(',') : value,\n )\n }}\n >\n {walkChoices.map(({ name, label }) => (\n <MenuItem key={name} value={name} dense>\n <Checkbox size=\"small\" checked={picked.includes(name)} />\n <ListItemText primary={label} />\n </MenuItem>\n ))}\n </Select>\n </FormControl>\n )\n})\n\nexport default WalkSelect\n", "import CropFreeIcon from '@mui/icons-material/CropFree'\nimport ZoomInIcon from '@mui/icons-material/ZoomIn'\nimport ZoomOutIcon from '@mui/icons-material/ZoomOut'\nimport { IconButton, Tooltip, Typography } from '@mui/material'\nimport { observer } from 'mobx-react'\nimport { makeStyles } from 'tss-react/mui'\n\nimport ColorSchemeSelect from './ColorSchemeSelect'\nimport GraphStats from './GraphStats'\nimport LayoutSelect from './LayoutSelect'\nimport RepeatSelect from './RepeatSelect'\nimport SettingsMenu from './SettingsMenu'\nimport WalkSelect from './WalkSelect'\n\nimport type { GraphPaneModel } from '../model'\n\nconst useStyles = makeStyles()({\n toolbar: {\n display: 'flex',\n flexWrap: 'wrap',\n alignItems: 'center',\n gap: 4,\n padding: '2px 4px',\n borderBottom: '1px solid #ddd',\n },\n})\n\nconst ZoomDisplay = observer(function ZoomDisplay({\n model,\n}: {\n model: GraphPaneModel\n}) {\n return <Typography variant=\"body2\">{model.zoomPercent}</Typography>\n})\n\nconst GraphToolbar = observer(function GraphToolbar({\n model,\n}: {\n model: GraphPaneModel\n}) {\n const { classes } = useStyles()\n const zoomAboutCentre = (factor: number) => {\n model.zoom(factor, model.viewBox.width / 2, model.viewBox.height / 2)\n }\n return (\n <div className={classes.toolbar}>\n <LayoutSelect model={model} />\n <ColorSchemeSelect model={model} />\n <WalkSelect model={model} />\n <RepeatSelect model={model} />\n <Tooltip title=\"Zoom in\">\n <IconButton\n size=\"small\"\n onClick={() => {\n zoomAboutCentre(1.5)\n }}\n >\n <ZoomInIcon />\n </IconButton>\n </Tooltip>\n <Tooltip title=\"Zoom out\">\n <IconButton\n size=\"small\"\n onClick={() => {\n zoomAboutCentre(1 / 1.5)\n }}\n >\n <ZoomOutIcon />\n </IconButton>\n </Tooltip>\n <Tooltip title=\"Zoom to fit\">\n <IconButton\n size=\"small\"\n onClick={() => {\n model.refitView()\n }}\n >\n <CropFreeIcon />\n </IconButton>\n </Tooltip>\n <ZoomDisplay model={model} />\n <GraphStats model={model} />\n <SettingsMenu model={model} />\n </div>\n )\n})\n\nexport default GraphToolbar\n", "import type { ReactNode } from 'react'\n\nimport { edgeHoverText, regionLabel } from '@jbrowse/bandage-core/hoverText'\nimport { observer } from 'mobx-react'\n\nimport { nodeOwnLocation } from '../../launchFromGraph/contributors'\nimport { TOOLTIP_INSET_PX } from '../pane/fitViews'\n\nimport type { chipReadoutAt } from './LabelLayer'\nimport type { GraphPaneModel } from '../model'\n\n// Bottom right of the canvas, clear of the row labels on the left edge and of\n// a walk strip under the canvas. Where the legend reaches down to it, it moves\n// left of the legend.\nconst tooltipStyle = {\n position: 'absolute' as const,\n bottom: TOOLTIP_INSET_PX,\n lineHeight: 'normal',\n background: 'rgba(0,0,0,0.75)',\n color: 'white',\n padding: '4px 8px',\n borderRadius: 4,\n fontSize: 12,\n pointerEvents: 'none' as const,\n zIndex: 6,\n}\n\ntype Readout = NonNullable<ReturnType<typeof chipReadoutAt>>\n\nfunction labelled({ label, readout }: Readout) {\n return (\n <>\n <strong>{label}</strong> \u2014 {readout}\n </>\n )\n}\n\n// What the pointer is on, the most specific first: a gene chip, a node, an\n// edge, then a walk row or a tube\nfunction hoverTip(\n model: GraphPaneModel,\n chip: Readout | undefined,\n): { testId?: string; body: ReactNode } | undefined {\n if (chip) {\n return { testId: 'graph-chip-tooltip', body: labelled(chip) }\n }\n const node = model.hoveredNode\n ? model.hoverNodeById?.get(model.hoveredNode)\n : undefined\n if (node) {\n const merged = model.hoverDrawing?.members.get(node.id)\n const own = nodeOwnLocation(node)\n return {\n body: (\n <>\n <strong>{node.name}</strong>\n {merged ? ` and ${merged.length - 1} more` : ''} \u2014{' '}\n {node.length.toLocaleString()} bp, depth {node.depth.toFixed(1)}\n {/* the assembly that contributed the segment, and where on it */}\n {own ? (\n <>\n <br />\n {own.sample} {regionLabel(own)} (rank {node.stable?.rank})\n </>\n ) : null}\n {/* gfa-to-tabix --max-component left its component off the\n reference, so the cut holds only its ends */}\n {node.moved ? (\n <>\n <br />\n End of a component too large to draw here\n </>\n ) : null}\n </>\n ),\n }\n }\n const edge =\n model.hoveredEdge === null\n ? undefined\n : model.graph?.edges[model.hoveredEdge]\n if (edge) {\n const text = edgeHoverText(\n edge,\n model.deletions.find(d => d.edgeIndex === model.hoveredEdge),\n id => model.nodeById?.get(id)?.name ?? id,\n )\n // a deletion edge skips backbone that some haplotype lacks, so its\n // readout gives the bp skipped\n return {\n body: text.deletion ? (\n <>\n <strong>Deletion</strong> {text.deletion.bp}\n <br />\n {text.deletion.where}\n </>\n ) : (\n <>Edge: {text.ends}</>\n ),\n }\n }\n const walkRow = model.hoveredWalkRowText\n if (walkRow) {\n return { testId: 'graph-walk-row-tooltip', body: labelled(walkRow) }\n }\n const tube = model.hoveredTubeText\n return tube\n ? { testId: 'graph-tube-tooltip', body: labelled(tube) }\n : undefined\n}\n\nconst HoverTooltip = observer(function HoverTooltip({\n model,\n chip,\n}: {\n model: GraphPaneModel\n chip: Readout | undefined\n}) {\n const tip = hoverTip(model, chip)\n return tip ? (\n <div\n style={{ ...tooltipStyle, right: model.tooltipRightPx }}\n data-testid={tip.testId}\n >\n {tip.body}\n </div>\n ) : null\n})\n\nexport default HoverTooltip\n", "\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z\"\n}), 'FilterList');", "\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M10.83 8H21V6H8.83zm5 5H18v-2h-4.17zM14 16.83V18h-4v-2h3.17l-3-3H6v-2h2.17l-3-3H3V6h.17L1.39 4.22 2.8 2.81l18.38 18.38-1.41 1.41z\"\n}), 'FilterListOff');", "\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z\"\n}), 'Info');", "import { regionLabel } from '@jbrowse/bandage-core/hoverText'\nimport { ContextMenu } from '@jbrowse/core/ui'\nimport FilterListIcon from '@mui/icons-material/FilterList'\nimport FilterListOffIcon from '@mui/icons-material/FilterListOff'\nimport InfoIcon from '@mui/icons-material/Info'\nimport LineStyleIcon from '@mui/icons-material/LineStyle'\nimport { observer } from 'mobx-react'\n\nimport { nodeLaunchMenuItems } from '../../launchFromGraph/graphMenuItems'\n\nimport type { GraphPaneModel } from '../model'\nimport type { WalkRows } from '@jbrowse/bandage-core/layout/walkRows'\nimport type { ContextMenuAnchor, MenuItem } from '@jbrowse/core/ui'\n\n// What a right-click landed on: a node, or a row of `bars`, walk rows' own\n// unless a strip's\nexport type PaneContextAt = ContextMenuAnchor &\n ({ nodeId: string } | { row: number; bars?: WalkRows })\n\nconst AT_POINTER = { x: 0, y: 0 }\n\n// Flat rather than under a \"Launch view\" submenu, since its two or three items\n// are all about the node just clicked\nfunction nodeMenuItems(model: GraphPaneModel, nodeId: string): MenuItem[] {\n const { own, reference, highlight } = model.nodeLaunchTargets(nodeId)\n return [\n {\n label: 'Node details',\n icon: InfoIcon,\n onClick: () => {\n model.showNodeDetails(nodeId)\n },\n },\n ...nodeLaunchMenuItems({\n own,\n reference,\n highlight,\n onShowLinear: target => {\n model.showInLinearView(target)\n },\n onHighlight: model.canHighlightInLinearView\n ? target => {\n model.highlightInLinearView(target)\n }\n : undefined,\n }),\n ]\n}\n\nfunction formatSteps(steps: number) {\n return steps >= 1000 ? `${Math.round(steps / 1000)} k` : `${steps}`\n}\n\n// A walk row's bar stands for a span of its haplotype's own contig, so the\n// question a right-click asks is answered by a linear view on that assembly,\n// with its genes\nfunction walkRowMenuItems(\n model: GraphPaneModel,\n row: number,\n bars: WalkRows | undefined,\n): MenuItem[] {\n const rows = bars ?? model.walkRowBars\n const target = model.walkRowLaunchTarget(row, rows)\n const assembly = target?.assembly\n const walk = row > 0 ? rows?.rows[row - 1] : undefined\n const sample = walk?.sample\n // the strip's rows are not walk rows', and take no sample filter\n const filters = !bars && model.walkRowBars\n const shown = model.walkRowSamples\n return [\n target && assembly\n ? {\n label: `Linear genome view \u2014 ${assembly} ${regionLabel(target.location)}`,\n icon: LineStyleIcon,\n onClick: () => {\n model.showInLinearView({ location: target.location, assembly })\n },\n }\n : {\n label: 'Linear genome view',\n icon: LineStyleIcon,\n disabled: true,\n disabledHelpText: target\n ? `No assembly in this session is ${target.location.haplotype ?? target.label}`\n : 'This walk states no contig coordinates',\n onClick: () => {},\n },\n ...(walk?.abridgedSteps\n ? [\n {\n label: `Load the ${formatSteps(walk.abridgedSteps)} abridged steps`,\n onClick: () => {\n model.expandWalk(walk.name)\n },\n },\n ]\n : []),\n ...(walk && model.liftsWalks && model.modeDrawsNodes\n ? [\n {\n type: 'checkbox' as const,\n label: `Highlight ${walk.label}`,\n checked: model.walkLayers.some(l => l.walk === walk.name),\n onClick: () => {\n model.toggleWalk(walk.name)\n },\n },\n ]\n : []),\n ...(filters && sample && !(shown?.length === 1 && shown[0] === sample)\n ? [\n {\n label: `Show only ${sample}`,\n icon: FilterListIcon,\n onClick: () => {\n model.setWalkRowSamples([sample])\n },\n },\n ]\n : []),\n ...(filters && shown\n ? [\n {\n label: 'Show every sample',\n icon: FilterListOffIcon,\n onClick: () => {\n model.setWalkRowSamples(undefined)\n },\n },\n ]\n : []),\n ]\n}\n\n// core's context menu, opened at the pointer itself rather than beside it\nexport default observer(function PaneContextMenu({\n model,\n at,\n onClose,\n}: {\n model: GraphPaneModel\n at: PaneContextAt | undefined\n onClose: () => void\n}) {\n return (\n <ContextMenu\n anchor={at}\n offset={AT_POINTER}\n onClose={onClose}\n menuItems={() =>\n at === undefined\n ? []\n : 'nodeId' in at\n ? nodeMenuItems(model, at.nodeId)\n : walkRowMenuItems(model, at.row, at.bars)\n }\n />\n )\n})\n", "import { useMemo, useState } from 'react'\n\nimport {\n walkRowReadout,\n walkRowsKey,\n walkRowsTree,\n} from '@jbrowse/bandage-core/layout/walkRowDraw'\nimport {\n stripGeneGaps,\n stripRowAt,\n walkMarksTree,\n walkStripLabelsTree,\n} from '@jbrowse/bandage-core/layout/walkStrip'\nimport { RAMP_GRADIENT_CSS } from '@jbrowse/bandage-core/referenceRampCss'\nimport { isAlive } from '@jbrowse/mobx-state-tree'\nimport { observer } from 'mobx-react'\n\nimport ElTree, { useSvgId } from './ElTree'\nimport { LegendSwatchView } from './LegendSwatch'\nimport PaneContextMenu from './PaneContextMenu'\nimport { legendRowStyle } from './legendStyles'\nimport { walkRowSwatch } from '../legendSections'\n\nimport type { GraphPaneModel } from '../model'\nimport type { RowGene } from '@jbrowse/bandage-core/layout/walkRowDraw'\nimport type { WalkRows } from '@jbrowse/bandage-core/layout/walkRows'\nimport type { StripFrame } from '@jbrowse/bandage-core/layout/walkStrip'\n\n// Walk rows under a layout that draws nodes, each haplotype's walk on its own\n// bp, linked to the drawing above: the hovered node ticks every bar where its\n// walk passes it, and a point on a bar lights its node, ringed, above. The\n// bars share the drawing's colours, so under the reference-position ramp a hue\n// in the drawing is the same hue on each bar. Every row is shown; rows too\n// thin to letter say who they are on hover.\n\nconst keyStyle = {\n display: 'flex',\n flexWrap: 'wrap' as const,\n gap: '2px 14px',\n padding: '2px 8px 6px',\n fontSize: 11,\n color: '#333',\n}\n\nconst tipStyle = {\n position: 'absolute' as const,\n pointerEvents: 'none' as const,\n background: 'rgba(255,255,255,0.92)',\n border: '1px solid #ccc',\n borderRadius: 3,\n padding: '1px 6px',\n fontSize: 11,\n whiteSpace: 'nowrap' as const,\n zIndex: 4,\n}\n\n// The bars, built once per rows, frame, colouring and genes rather than per\n// hover\nconst StripBars = observer(function StripBars({\n bars,\n frame,\n ramp,\n rowGenes,\n}: {\n bars: WalkRows\n frame: StripFrame\n ramp: { start: number; end: number } | undefined\n rowGenes: Map<string, RowGene[]> | undefined\n}) {\n const idPrefix = useSvgId()\n const tree = useMemo(\n () => walkRowsTree(bars, frame, { ramp, rowGenes, idPrefix }),\n [bars, frame, ramp, rowGenes, idPrefix],\n )\n return <ElTree el={tree} />\n})\n\n// The hovered row's readout where the rows are too thin to letter, at the\n// pointer's place on its bar. Its own observer, so a move along a bar redraws\n// the tip and not the strip.\nexport const StripTip = observer(function StripTip({\n model,\n}: {\n model: GraphPaneModel\n}) {\n const bars = model.walkStripRows\n const frame = model.walkStripFrame\n const hover = model.stripHover\n const all = bars ? [bars.reference, ...bars.rows] : []\n const index = hover ? all.findIndex(r => r.name === hover.row) : -1\n const row = all[index]\n if (!bars || !frame || frame.labelled || !hover || !row) {\n return null\n }\n const x = (bars.origin + hover.offset) * frame.scaleX + frame.translateX\n // past the middle it opens leftward, so a long readout stays in the pane\n const side =\n x > frame.width / 2 ? { right: frame.width - x + 12 } : { left: x + 12 }\n return (\n <div\n data-testid=\"graph-walk-strip-tip\"\n style={{\n ...tipStyle,\n ...side,\n top: index * frame.rowPx + frame.translateY - 18,\n }}\n >\n {row.label} \u00B7{' '}\n {walkRowReadout(row, index === 0 ? undefined : bars.reference)}\n </div>\n )\n})\n\n// Its own observer, so the node a hover lights redraws the ticks and not the\n// strip\nconst StripMarks = observer(function StripMarks({\n model,\n bars,\n frame,\n}: {\n model: GraphPaneModel\n bars: WalkRows\n frame: StripFrame\n}) {\n return <ElTree el={walkMarksTree(bars, frame, model.walkStripMarks)} />\n})\n\nconst WalkStrip = observer(function WalkStrip({\n model,\n}: {\n model: GraphPaneModel\n}) {\n const bars = model.walkStripRows\n const frame = model.walkStripFrame\n const [menu, setMenu] = useState<{\n clientX: number\n clientY: number\n row: number\n }>()\n if (!bars || !frame) {\n return null\n }\n const hit = (e: React.MouseEvent<SVGSVGElement>) => {\n const box = e.currentTarget.getBoundingClientRect()\n return stripRowAt(bars, frame, e.clientX - box.left, e.clientY - box.top)\n }\n const key = walkRowsKey(bars, {\n ramp: model.referenceRampDomain,\n rampCss: RAMP_GRADIENT_CSS,\n genes: stripGeneGaps(frame, model.walkRowGenes, model.walkRowGeneGaps),\n annotation: model.walkRowAnnotation,\n })\n return (\n <div\n data-testid=\"graph-walk-strip\"\n style={{ position: 'relative', borderTop: '1px solid #ddd' }}\n onMouseEnter={() => {\n model.setPointerInPane(true)\n }}\n onMouseLeave={() => {\n if (isAlive(model)) {\n model.setPointerInPane(false)\n model.setStripHover(null)\n }\n }}\n >\n <svg\n width={frame.width}\n height={frame.height}\n style={{ display: 'block' }}\n onMouseLeave={() => {\n if (isAlive(model)) {\n model.setStripHover(null)\n }\n }}\n onMouseMove={e => {\n const at = hit(e)\n e.currentTarget.style.cursor = at && at.index > 0 ? 'pointer' : ''\n model.setStripHover(\n at ? { row: at.row.name, offset: at.offset } : null,\n )\n }}\n onClick={e => {\n const at = hit(e)\n if (at && at.index > 0) {\n model.toggleWalk(at.row.name)\n }\n }}\n onContextMenu={e => {\n const at = hit(e)\n if (at) {\n e.preventDefault()\n setMenu({ clientX: e.clientX, clientY: e.clientY, row: at.index })\n }\n }}\n >\n <StripBars\n bars={bars}\n frame={frame}\n ramp={model.referenceRampDomain}\n rowGenes={model.walkRowGenes}\n />\n <StripMarks model={model} bars={bars} frame={frame} />\n <ElTree\n el={walkStripLabelsTree(\n bars,\n frame,\n new Set(model.walkLayers.map(l => l.walk)),\n )}\n />\n </svg>\n <StripTip model={model} />\n <div style={keyStyle} data-testid=\"graph-walk-strip-key\">\n {key.map(entry => (\n <div key={entry.label} style={legendRowStyle}>\n <LegendSwatchView swatch={walkRowSwatch(entry.swatch)} />\n <span>{entry.label}</span>\n </div>\n ))}\n <span style={{ color: '#777' }}>\n Ticks mark where each walk passes the node under the pointer; click a\n haplotype's bar to lift its walk\n </span>\n </div>\n <PaneContextMenu\n model={model}\n at={menu && { ...menu, bars }}\n onClose={() => {\n setMenu(undefined)\n }}\n />\n </div>\n )\n})\n\nexport default WalkStrip\n", "import { observer } from 'mobx-react'\n\nimport { PaneSvgLayer } from './PaneLayer'\n\nimport type { GraphPaneModel } from '../model'\n\n// A ring round the node a point on the walk strip lights, so a one-bp node\n// can be found in a hairball\nconst WalkStripLocator = observer(function WalkStripLocator({\n model,\n}: {\n model: GraphPaneModel\n}) {\n const at = model.walkStripLocator\n return at ? (\n <PaneSvgLayer\n model={model}\n zIndex={4}\n overflow=\"visible\"\n testId=\"graph-walk-strip-locator\"\n >\n <circle\n cx={at.x}\n cy={at.y}\n r={11}\n fill=\"none\"\n stroke=\"white\"\n strokeWidth={4}\n />\n <circle\n cx={at.x}\n cy={at.y}\n r={11}\n fill=\"none\"\n stroke=\"#111\"\n strokeWidth={1.75}\n />\n </PaneSvgLayer>\n ) : null\n})\n\nexport default WalkStripLocator\n", "// src/util/wheelZoom.ts\nvar ZOOM_PER_NOTCH = 1.1;\nvar NOTCH_PX = 100;\nvar LINE_PX = 40;\nvar PAGE_PX = 800;\nvar PINCH_GAIN = 10;\nvar MAX_NOTCHES_PER_EVENT = 2;\nfunction wheelZoomFactor(e) {\n const px = e.deltaY * (e.deltaMode === 1 ? LINE_PX : e.deltaMode === 2 ? PAGE_PX : 1);\n const notches = (e.ctrlKey ? PINCH_GAIN : 1) * px / NOTCH_PX;\n return ZOOM_PER_NOTCH ** -Math.max(-MAX_NOTCHES_PER_EVENT, Math.min(MAX_NOTCHES_PER_EVENT, notches));\n}\n\nexport {\n wheelZoomFactor\n};\n", "import { useEffect, useRef, useState } from 'react'\n\nimport {\n findHoveredEdge,\n findHoveredNode,\n} from '@jbrowse/bandage-core/util/hitDetection'\nimport { wheelZoomFactor } from '@jbrowse/bandage-core/util/wheelZoom'\nimport { screenToLayout } from '@jbrowse/bandage-core/viewport'\nimport { isAlive } from '@jbrowse/mobx-state-tree'\nimport { runInAction } from 'mobx'\n\nimport { chipReadoutAt } from './LabelLayer'\nimport { PANS_WITH_DRAWING } from './PaneLayer'\n\nimport type { PaneContextAt } from './PaneContextMenu'\nimport type { GraphPaneModel } from '../model'\n\nconst WHEEL_LINE_PX = 40\n\n// A trackpad pinch trails a little sideways scroll that would pan the drawing\n// out from under it; core's linear view ignores deltaX this long after a zoom.\nconst ZOOM_ACTIVE_MS = 100\n\n// A wheel notch lands as a few frames of eased zoom rather than one jump, the\n// way core's linear view zooms, and a trackpad's bursts zoom at an even pace.\n// The backlog is in log(scale), capped so a free-spinning wheel cannot bank a\n// zoom that runs on after the hand stops.\nconst ZOOM_EASE_MS = 24\nconst MAX_ZOOM_BACKLOG = Math.log(16)\n\n// How much of the owed zoom, in log(scale), to apply this frame. A frame's\n// timestamp is when it began, so a wheel handled late in one leaves elapsedMs\n// negative, which would ease the zoom backwards.\nexport function easeZoom(backlog: number, elapsedMs: number) {\n const rest = backlog * Math.exp(-Math.max(0, elapsedMs) / ZOOM_EASE_MS)\n return Math.abs(rest) < 1e-3 ? backlog : backlog - rest\n}\n\n// What a wheel does over a pane that draws its own coordinates. Inside a linear\n// view it follows the view's rules: ctrl/\u2318+wheel (a trackpad pinch) zooms, a\n// plain vertical wheel zooms only with the session's scroll-to-zoom on and\n// otherwise scrolls the page, and a sideways swipe pans. A graph view of its\n// own zooms on a plain wheel.\nexport function wheelAction(\n e: Pick<WheelEvent, 'deltaX' | 'deltaY' | 'ctrlKey' | 'metaKey'>,\n host: { scrollZoom?: boolean } | undefined,\n) {\n const sideways = Math.abs(e.deltaX) > Math.abs(e.deltaY)\n if (e.ctrlKey || e.metaKey || (!sideways && (!host || host.scrollZoom))) {\n return 'zoom'\n }\n return sideways ? 'pan' : 'page'\n}\n\n// Bound on the whole canvas area, so a wheel over a label, pin or legend acts\n// as it does over the drawing. Imperative, because React registers wheel\n// listeners as passive and this one has to preventDefault.\nexport function useWheelZoom(\n area: HTMLElement | null,\n canvas: HTMLCanvasElement | null | undefined,\n model: GraphPaneModel,\n) {\n useEffect(() => {\n if (!area) {\n return undefined\n }\n let lastZoom = -Infinity\n const ease = { backlog: 0, x: 0, y: 0, frame: 0, last: 0 }\n const step = (now: number) => {\n const owed = easeZoom(ease.backlog, Math.min(100, now - ease.last))\n ease.backlog -= owed\n ease.last = now\n ease.frame = ease.backlog ? requestAnimationFrame(step) : 0\n if (isAlive(model)) {\n model.zoom(Math.exp(owed), ease.x, ease.y)\n }\n }\n // a drawing the view places or drives leaves the wheel to the view\n const handleWheel = (e: WheelEvent) => {\n if (model.hostPlacesX || model.followsHostView) {\n return\n }\n const under =\n e.target instanceof Element ? e.target.closest('canvas') : null\n const origin = under ?? (model.facetPanels ? null : canvas)\n const rect = origin?.getBoundingClientRect()\n // the strip is the linear view's bp, so its wheel is the view's\n if (rect && e.clientY - rect.top < model.referenceStripZonePx) {\n return\n }\n const action = wheelAction(e, model.host)\n if (action === 'page') {\n return\n }\n if (model.host) {\n e.stopPropagation()\n }\n e.preventDefault()\n if (action === 'pan') {\n if (e.timeStamp - lastZoom > ZOOM_ACTIVE_MS) {\n const px = e.deltaMode === 1 ? WHEEL_LINE_PX : 1\n model.setTransform(\n model.scale,\n model.translateX - e.deltaX * px,\n model.translateY,\n )\n }\n return\n }\n lastZoom = e.timeStamp\n if (!rect) {\n return\n }\n ease.x = e.clientX - rect.left\n ease.y = e.clientY - rect.top\n ease.backlog = Math.max(\n -MAX_ZOOM_BACKLOG,\n Math.min(MAX_ZOOM_BACKLOG, ease.backlog + Math.log(wheelZoomFactor(e))),\n )\n if (!ease.frame) {\n ease.last = performance.now() - 1000 / 60\n ease.frame = requestAnimationFrame(step)\n }\n }\n area.addEventListener('wheel', handleWheel, { passive: false })\n return () => {\n cancelAnimationFrame(ease.frame)\n area.removeEventListener('wheel', handleWheel)\n }\n }, [area, canvas, model])\n}\n\nconst CLICK_SLOP_PX = 3\n\n// core's marker on an element whose presses the linear view's pan leaves alone\nconst GESTURE_OWNER = 'data-gesture-owner'\n\ninterface Point {\n x: number\n y: number\n}\n\nconst pointOf = (e: { clientX: number; clientY: number }): Point => ({\n x: e.clientX,\n y: e.clientY,\n})\n\nfunction pinchOf(points: Map<number, Point>) {\n const [a, b] = [...points.values()] as [Point, Point]\n return {\n spread: Math.hypot(a.x - b.x, a.y - b.y),\n mid: { x: (a.x + b.x) / 2, y: (a.y + b.y) / 2 },\n }\n}\n\n// The pointer on a canvas drawing the pane's transform: the pane's own, or any\n// facet panel, since the panels share it. Coordinates are read against the\n// canvas the event is on.\nexport function usePaneGestures(model: GraphPaneModel) {\n // Where the pointer was last, and whether it has travelled since mousedown \u2014\n // per-gesture scratch that nothing renders from, which is what a ref is for.\n // Whether a drag is in progress is model state (`isPanning`/`draggingNode`),\n // because the cursor renders from it.\n const lastMouseRef = useRef({ x: 0, y: 0 })\n const downRef = useRef({ x: 0, y: 0 })\n const hasMovedRef = useRef(false)\n // The pointer driving a drag, so a stray second one neither restarts nor\n // ends it. A second finger on a pan pinches instead: `points` holds the\n // captured fingers, and `pinch` the spread and midpoint the drawing last\n // zoomed from, measured against the canvas the pan started on.\n const dragPointerRef = useRef<number | undefined>(undefined)\n const isOtherPointer = (e: React.PointerEvent) =>\n dragPointerRef.current !== undefined &&\n e.pointerId !== dragPointerRef.current\n const pointsRef = useRef(new Map<number, Point>())\n const dragCanvasRef = useRef<Element | null>(null)\n const pinchRef = useRef<ReturnType<typeof pinchOf> | null>(null)\n const stripPanRef = useRef(false)\n // a press on a bubble label pans through window listeners, so the canvas\n // under the pointer leaves those moves alone\n const labelPanRef = useRef<{ end: () => void; moved: boolean } | null>(null)\n const verticalPanRef = useRef(false)\n // A pan and a hover are applied once per frame, not once per mousemove:\n // mousemove fires in bursts well above the frame rate, and each pan step\n // repainted the canvas and re-placed every overlay label, while each hover\n // step ran both hit indexes. The pending pan is the summed delta; the pending\n // hover is the last pointer position, since only the last one can be right.\n const pendingRef = useRef<{\n frame: number\n pan: { dx: number; dy: number } | null\n hover: { x: number; y: number } | null\n pinch: boolean\n }>({ frame: 0, pan: null, hover: null, pinch: false })\n useEffect(\n () => () => {\n cancelAnimationFrame(pendingRef.current.frame)\n },\n [],\n )\n const [contextMenu, setContextMenu] = useState<PaneContextAt>()\n // whether a press here would drag a node, for the cursor; state rather than\n // a read of `hoveredAt`, which changes on every move over a node\n const [overDraggable, setOverDraggable] = useState(false)\n const [hoveredChip, setHoveredChip] =\n useState<ReturnType<typeof chipReadoutAt>>(undefined)\n\n // the event's point in pane px, against the canvas it is on\n function pointerAt(e: React.MouseEvent) {\n const rect = e.currentTarget.getBoundingClientRect()\n return { x: e.clientX - rect.left, y: e.clientY - rect.top }\n }\n\n // The node at a pane point, which mousedown, mousemove and click all need.\n // Takes the point rather than the event so a caller that already has one\n // does not pay for a second getBoundingClientRect.\n function nodeAt(sx: number, sy: number) {\n if (model.layoutResult?.tubeMap) {\n return model.tubeMapNodeAt(sx, sy)\n }\n const onStrip = model.referenceStripNodeAt(sx, sy)\n if (onStrip) {\n return onStrip\n }\n const { nodePositions } = model\n if (!nodePositions) {\n return null\n }\n const { x, y } = screenToLayout(sx, sy, model, model.axisScale)\n return findHoveredNode(\n nodePositions,\n x,\n y,\n model.axisScale,\n model.positionsVersion,\n model.nodeInk,\n )\n }\n\n function edgeAt(sx: number, sy: number) {\n const { nodePositions, graph } = model\n if (!nodePositions || !graph) {\n return null\n }\n const { x, y } = screenToLayout(sx, sy, model, model.axisScale)\n return findHoveredEdge(\n nodePositions,\n graph,\n x,\n y,\n model.axisScale,\n // resolved, so the hit index bounds the ribbons that are actually\n // drawn \u2014 see effectiveDrawPaths. Facet panels draw none.\n model.effectiveDrawPaths && !model.facetPanels,\n model.positionsVersion,\n model.deletionEdgeIndexes,\n model.hiddenEdgeIndexes,\n model.deletionRoutes,\n model.layoutResult?.stranded,\n )\n }\n\n function onMouseDown(e: React.MouseEvent) {\n if (e.button === 0) {\n e.preventDefault()\n }\n }\n\n // Captured, so a drag keeps going over a bubble chip or the gap between\n // facet panels, and a finger drags as a mouse does\n function onPointerDown(e: React.PointerEvent) {\n if (e.button !== 0) {\n return\n }\n const points = pointsRef.current\n if (isOtherPointer(e)) {\n if (\n model.isPanning &&\n !verticalPanRef.current &&\n e.pointerType === 'touch' &&\n points.size === 1\n ) {\n e.currentTarget.setPointerCapture(e.pointerId)\n points.set(e.pointerId, pointOf(e))\n pinchRef.current = pinchOf(points)\n hasMovedRef.current = true\n }\n return\n }\n hasMovedRef.current = false\n downRef.current = { x: e.clientX, y: e.clientY }\n e.currentTarget.removeAttribute(GESTURE_OWNER)\n const follows = model.followsHostView\n // shift-drag is the view's range select\n if (model.hostPlacesX || (follows && e.shiftKey)) {\n return\n }\n e.currentTarget.setPointerCapture(e.pointerId)\n dragPointerRef.current = e.pointerId\n dragCanvasRef.current = e.currentTarget\n points.clear()\n points.set(e.pointerId, pointOf(e))\n const { x, y } = pointerAt(e)\n const onStrip = y < model.referenceStripZonePx\n // a tube map's boxes are the layout's, and the strip's are bp, not\n // positions to drag\n const node = model.layoutResult?.tubeMap || onStrip ? null : nodeAt(x, y)\n // A drawing the view drives leaves the press to the view's own pan,\n // which carries the drawing sideways, and takes only the vertical. A\n // press on a node is the node's: the marker keeps the view's pan off it,\n // since this handler runs before the view's. The strip is the view's bp,\n // so dragging it scrolls the view in either case.\n if (follows && node) {\n e.currentTarget.setAttribute(GESTURE_OWNER, '')\n }\n verticalPanRef.current = follows\n stripPanRef.current = onStrip && !follows\n if (node) {\n model.setDraggingNode(node)\n } else {\n model.setPanning(true)\n }\n lastMouseRef.current = { x: e.clientX, y: e.clientY }\n }\n\n // zooms about where the fingers' midpoint was and pans by how far it moved\n function pinchStep() {\n const was = pinchRef.current\n const canvas = dragCanvasRef.current\n if (!was || !canvas) {\n return\n }\n const now = pinchOf(pointsRef.current)\n const rect = canvas.getBoundingClientRect()\n if (was.spread > 0 && now.spread > 0) {\n model.zoom(\n now.spread / was.spread,\n was.mid.x - rect.left,\n was.mid.y - rect.top,\n )\n }\n model.setTransform(\n model.scale,\n model.translateX + now.mid.x - was.mid.x,\n model.translateY + now.mid.y - was.mid.y,\n )\n pinchRef.current = now\n }\n\n function applyPending() {\n const pending = pendingRef.current\n const { pan, hover, pinch } = pending\n pending.frame = 0\n pending.pan = null\n pending.hover = null\n pending.pinch = false\n if (pinch) {\n pinchStep()\n }\n if (pan && stripPanRef.current) {\n model.host?.horizontalScroll(-pan.dx)\n } else if (pan && verticalPanRef.current) {\n model.setTransform(\n model.scale,\n model.translateX,\n model.translateY + pan.dy,\n )\n } else if (pan) {\n model.setTransform(\n model.scale,\n model.translateX + pan.dx,\n model.translateY + pan.dy,\n )\n }\n if (!hover) {\n return\n }\n const { x: sx, y: sy } = hover\n const chip = model.facetPanels\n ? undefined\n : chipReadoutAt(model.overlayLabels, sx, sy)\n setHoveredChip(was =>\n was?.label === chip?.label && was?.readout === chip?.readout ? was : chip,\n )\n runInAction(() => {\n if (model.walkRowBars) {\n const i = model.walkRowAt(sx, sy)\n model.setHoveredWalkRow(\n i === undefined ? null : model.walkRowList[i]!.name,\n )\n }\n if (model.nodePositions && model.graph) {\n const node = nodeAt(sx, sy)\n model.setHoveredPanel(model.tubeMapPanelAt(sy))\n model.setHoveredNode(node, { x: sx, y: sy })\n setOverDraggable(\n node !== null &&\n !model.hostPlacesX &&\n !model.layoutResult?.tubeMap &&\n sy >= model.referenceStripZonePx,\n )\n model.setHoveredTube(\n node === null && model.layoutResult?.tubeMap\n ? model.tubeAt(sx, sy)\n : null,\n )\n model.setHoveredEdge(\n node || model.layoutResult?.tubeMap || !model.hoverLightsEverything\n ? null\n : edgeAt(sx, sy),\n )\n }\n })\n }\n\n function scheduleFrame() {\n if (!pendingRef.current.frame) {\n pendingRef.current.frame = requestAnimationFrame(applyPending)\n }\n }\n\n function dropPending() {\n const pending = pendingRef.current\n cancelAnimationFrame(pending.frame)\n pending.frame = 0\n pending.pan = null\n pending.hover = null\n pending.pinch = false\n }\n\n function onPointerMove(e: React.PointerEvent) {\n const points = pointsRef.current\n if (pinchRef.current && points.has(e.pointerId)) {\n points.set(e.pointerId, pointOf(e))\n pendingRef.current.pinch = true\n scheduleFrame()\n return\n }\n if (isOtherPointer(e) || labelPanRef.current) {\n return\n }\n const dx = e.clientX - lastMouseRef.current.x\n const dy = e.clientY - lastMouseRef.current.y\n lastMouseRef.current = { x: e.clientX, y: e.clientY }\n\n // from where the button went down, not per event: a slow drag moves a\n // pixel at a time\n if (\n Math.hypot(e.clientX - downRef.current.x, e.clientY - downRef.current.y) >\n CLICK_SLOP_PX\n ) {\n hasMovedRef.current = true\n }\n\n const pending = pendingRef.current\n if (model.draggingNode) {\n model.moveNode(model.draggingNode, dx / model.scaleX, dy / model.scaleY)\n } else if (model.isPanning) {\n pending.pan = {\n dx: (pending.pan?.dx ?? 0) + dx,\n dy: (pending.pan?.dy ?? 0) + dy,\n }\n scheduleFrame()\n } else {\n const rect = e.currentTarget.getBoundingClientRect()\n pending.hover = { x: e.clientX - rect.left, y: e.clientY - rect.top }\n scheduleFrame()\n }\n }\n\n // also the end of a capture the browser took back\n function onPointerUp(e: React.PointerEvent) {\n const points = pointsRef.current\n if (pinchRef.current && points.has(e.pointerId)) {\n if (pendingRef.current.pinch) {\n pendingRef.current.pinch = false\n pinchStep()\n }\n points.delete(e.pointerId)\n pinchRef.current = null\n const [[id, at]] = [...points] as [[number, Point]]\n dragPointerRef.current = id\n lastMouseRef.current = at\n return\n }\n if (isOtherPointer(e)) {\n return\n }\n dragPointerRef.current = undefined\n points.clear()\n if (isAlive(model)) {\n model.stopDragging()\n }\n }\n\n // also fired by the canvas unmounting under a resting pointer, after the\n // view closing it has destroyed the model, and by a finger lifting. A pan\n // started on a label runs on window listeners, so crossing onto another\n // label or the legend leaves it going.\n function onPointerLeave(e: React.PointerEvent) {\n if (isOtherPointer(e)) {\n return\n }\n setHoveredChip(undefined)\n setOverDraggable(false)\n if (labelPanRef.current) {\n pendingRef.current.hover = null\n } else {\n dragPointerRef.current = undefined\n pointsRef.current.clear()\n pinchRef.current = null\n dropPending()\n if (isAlive(model)) {\n model.stopDragging()\n }\n }\n if (isAlive(model)) {\n model.clearHover()\n }\n }\n\n // Right-clicking a node is the gesture that asks \"where is this?\", and until\n // now the graph had no answer: a node named an assembly and an offset in its\n // tags that nothing surfaced. The items come from the model's launch targets,\n // so what is offered is what can actually be opened.\n function onContextMenu(e: React.MouseEvent) {\n const { x, y } = pointerAt(e)\n const node = nodeAt(x, y)\n const { clientX, clientY } = e\n if (node) {\n e.preventDefault()\n setContextMenu({ clientX, clientY, nodeId: node })\n return\n }\n const row = model.walkRowAt(x, y)\n if (row !== undefined) {\n e.preventDefault()\n setContextMenu({ clientX, clientY, row })\n }\n }\n\n function onClick(e: React.MouseEvent) {\n // a click that ended a drag selects nothing\n if (!hasMovedRef.current) {\n const { x, y } = pointerAt(e)\n const node = nodeAt(x, y)\n model.setSelectedNode(node)\n if (node) {\n model.showNodeDetails(node)\n }\n }\n }\n\n // A press on a bubble's label or tick pans once it travels, as a press on\n // the drawing does, rather than leaving a patch of the graph that will not\n // drag; one that stays put is a click on the label. The click that ends a\n // pan is swallowed before the label sees it.\n useEffect(\n () => () => {\n labelPanRef.current?.end()\n },\n [],\n )\n function onLabelPointerDown(e: React.PointerEvent) {\n if (\n e.button !== 0 ||\n model.hostPlacesX ||\n model.followsHostView ||\n !(e.target instanceof Element) ||\n !e.target.closest(`[${PANS_WITH_DRAWING}]`)\n ) {\n return\n }\n labelPanRef.current?.end()\n stripPanRef.current = false\n verticalPanRef.current = false\n const id = e.pointerId\n const start = pointOf(e)\n let last = start\n const gesture = {\n moved: false,\n end: () => {\n window.removeEventListener('pointermove', move, true)\n window.removeEventListener('pointerup', release, true)\n window.removeEventListener('pointercancel', release, true)\n if (gesture.moved && isAlive(model)) {\n model.stopDragging()\n }\n },\n }\n function move(ev: PointerEvent) {\n if (ev.pointerId !== id) {\n return\n }\n if (!gesture.moved) {\n if (\n Math.hypot(ev.clientX - start.x, ev.clientY - start.y) <=\n CLICK_SLOP_PX\n ) {\n return\n }\n gesture.moved = true\n model.setPanning(true)\n }\n const pending = pendingRef.current\n pending.pan = {\n dx: (pending.pan?.dx ?? 0) + ev.clientX - last.x,\n dy: (pending.pan?.dy ?? 0) + ev.clientY - last.y,\n }\n last = pointOf(ev)\n scheduleFrame()\n }\n // the click, if any, lands before the timeout clears the gesture\n function release(ev: PointerEvent) {\n if (ev.pointerId === id) {\n gesture.end()\n setTimeout(() => {\n if (labelPanRef.current === gesture) {\n labelPanRef.current = null\n }\n }, 0)\n }\n }\n labelPanRef.current = gesture\n window.addEventListener('pointermove', move, true)\n window.addEventListener('pointerup', release, true)\n window.addEventListener('pointercancel', release, true)\n }\n function onLabelClickCapture(e: React.MouseEvent) {\n if (labelPanRef.current?.moved) {\n labelPanRef.current = null\n e.stopPropagation()\n }\n }\n\n const canvasStyle: React.CSSProperties = {\n cursor:\n model.isPanning || model.draggingNode\n ? 'grabbing'\n : overDraggable\n ? 'move'\n : 'grab',\n // a pane the linear view drags leaves a finger its scroll\n touchAction: model.hostPlacesX ? 'auto' : 'none',\n overscrollBehavior: 'contain',\n }\n\n // A hosted pane that pans itself claims every press on its surface, labels\n // and strip included: the linear view's pan starts on pointerdown and skips\n // `[data-gesture-owner]`, and its shift-drag range select starts on\n // mousedown.\n const claimsPress =\n model.host !== undefined && !model.hostPlacesX && !model.followsHostView\n const surfaceProps = claimsPress\n ? {\n [GESTURE_OWNER]: '',\n onMouseDown: (e: React.MouseEvent) => {\n e.stopPropagation()\n },\n }\n : {}\n\n return {\n canvasStyle,\n surfaceProps,\n handlers: {\n onMouseDown,\n onPointerDown,\n onPointerMove,\n onPointerUp,\n onPointerCancel: onPointerUp,\n onLostPointerCapture: onPointerUp,\n onPointerLeave,\n onClick,\n onContextMenu,\n },\n contextMenu,\n hoveredChip,\n labelHandlers: {\n onPointerDown: onLabelPointerDown,\n onClickCapture: onLabelClickCapture,\n },\n closeContextMenu: () => {\n setContextMenu(undefined)\n },\n }\n}\n\nexport type PaneHandlers = ReturnType<typeof usePaneGestures>['handlers']\n", "import { useEffect, useRef, useState } from 'react'\n\nimport { LEGEND_INSET_PX } from '@jbrowse/bandage-core/labelLayout'\nimport { ErrorBanner, LoadingOverlay } from '@jbrowse/core/ui'\nimport { isAlive } from '@jbrowse/mobx-state-tree'\nimport { useRenderingBackend } from '@jbrowse/render-core/useRenderingBackend'\nimport { observer } from 'mobx-react'\n\nimport BubbleHalos from './BubbleHalos'\nimport FacetPanels from './FacetPanels'\nimport GenePins from './GenePins'\nimport GraphToolbar from './GraphToolbar'\nimport HoverLayer from './HoverLayer'\nimport HoverTooltip from './HoverTooltip'\nimport LabelLayer from './LabelLayer'\nimport { LegendPanel } from './Legend'\nimport PaneContextMenu from './PaneContextMenu'\nimport { PaneSvgLayer } from './PaneLayer'\nimport ReferenceStripOverlay from './ReferenceStripOverlay'\nimport TubeMapOverlay from './TubeMapOverlay'\nimport WalkRowsOverlay from './WalkRowsOverlay'\nimport WalkStrip from './WalkStrip'\nimport WalkStripLocator from './WalkStripLocator'\nimport { usePaneGestures, useWheelZoom } from './usePaneGestures'\nimport { PAPER_CSS } from '../pane/paneBase'\nimport { createGraphRenderer } from '../renderer/GraphRenderer'\n\nimport type { GraphPaneModel } from '../model'\nimport type { CanvasHandle } from '@jbrowse/display-kit/DisplayChromeBase'\n\nconst wrapperStyle = { position: 'relative' as const }\n\n// The overlay origin has to be the canvas, not the wrapper: the wrapper also\n// holds the toolbar, so anything positioned against it is offset by the\n// toolbar's height, and a row label lands a whole row off the row it names.\nconst canvasAreaStyle = {\n position: 'relative' as const,\n lineHeight: 0,\n isolation: 'isolate' as const,\n}\n\n// Under a transparent canvas, from below the reference strip down, so the\n// linear view's gridlines show only behind the strip\nconst paperStyle = {\n position: 'absolute' as const,\n left: 0,\n right: 0,\n bottom: 0,\n zIndex: 0,\n}\n\n// Above the labels, pins and legends drawn over the canvas, and with the line\n// height the canvas area zeroes, which would collapse the overlay's label\nconst loadingLayerStyle = {\n position: 'absolute' as const,\n inset: 0,\n zIndex: 10,\n lineHeight: 'normal',\n pointerEvents: 'none' as const,\n}\n\nconst rowLabelStyle = {\n position: 'absolute' as const,\n left: 6,\n transform: 'translateY(-50%)',\n background: 'rgba(255,255,255,0.82)',\n padding: '0 4px',\n borderRadius: 3,\n fontSize: 11,\n // explicit, because the canvas container zeroes line-height to kill the\n // inline-block gap under the canvas. Inherited, that collapses the label to a\n // zero-height box: it still paints, but it has no layout, so anything asking\n // whether it is visible (a screenshot spec's waitForVisible, a11y tooling)\n // is told no.\n lineHeight: '16px',\n whiteSpace: 'nowrap' as const,\n pointerEvents: 'none' as const,\n zIndex: 4,\n}\n\n// Names the rows of a row-structured layout (anchored, sample rows). Without\n// them the layout draws real structure that cannot be read: a stack of bars\n// where every row means something and nothing says what.\n//\n// Positioned from the layout's own `rowLabels` through the same transform the\n// canvas draws with, so a label tracks its row across pan and zoom instead of\n// sitting at a measured pixel. It therefore has to be mounted in the canvas's\n// own positioning context (canvasAreaStyle) \u2014 against the wrapper it picks up\n// the toolbar's height and names the wrong row. Pinned to the left edge rather\n// than to the row's own x, because a row's leftmost node is wherever its first\n// allele happens to branch.\n//\n// Keyed on the row, not on the label: two rows can have the same words. The\n// sample-row layout names row 0 for the assembly the backbone comes from and\n// the rows below it for the samples contributing alleles, and a diploid\n// reference is in both lists \u2014 one haplotype is the reference path, the other\n// walks alleles of its own, and `parsePanSN` reduces both to one sample name.\nconst RowLabels = observer(function RowLabels({\n model,\n}: {\n model: GraphPaneModel\n}) {\n return (\n <>\n {model.visibleRowLabels.map(({ label, y, top }) => (\n <div\n key={y}\n data-testid=\"graph-row-label\"\n style={{ ...rowLabelStyle, top }}\n >\n {label}\n </div>\n ))}\n </>\n )\n})\n\n// In the corner model.legendCorner picks. Every key stretches to the widest,\n// so together they read as one panel. It takes the pointer, for its rows'\n// titles and its close button.\nconst legendStackStyle = {\n position: 'absolute' as const,\n display: 'flex',\n flexDirection: 'column' as const,\n borderRadius: 3,\n overflowX: 'hidden' as const,\n overflowY: 'auto' as const,\n zIndex: 4,\n}\n\nconst nodeLabelStyle = {\n position: 'absolute' as const,\n transform: 'translate(-50%, -50%)',\n background: 'rgba(255,255,255,0.78)',\n padding: '0 3px',\n borderRadius: 3,\n fontSize: 10,\n lineHeight: '13px',\n whiteSpace: 'nowrap' as const,\n pointerEvents: 'none' as const,\n zIndex: 3,\n}\n\n// Matches EDGE_DELETION_COLOR, so the words and the arc they name are one thing.\nconst deletionLabelStyle = {\n ...nodeLabelStyle,\n color: '#18181c',\n fontWeight: 600,\n}\n\n// Measures itself for the model, so no label is placed under a legend and\n// none gives way to one that is not drawn.\n//\n// At rest only, and again on returning to rest: a hover's walk keys would\n// otherwise refit the view, and the refit clears the hover that grew them\nexport const Legends = observer(function Legends({\n model,\n}: {\n model: GraphPaneModel\n}) {\n const ref = useRef<HTMLDivElement>(null)\n const atRest = model.legendAtRest\n useEffect(() => {\n const el = ref.current\n if (!el || !atRest) {\n return\n }\n // the last callback can land after the track is closed. scrollHeight is\n // the whole key, even where the pane caps it to scroll, so the pane\n // still grows to show it all when it can. The key mounts once it has\n // sections, which can be after this, so each measure observes it.\n const observer = new ResizeObserver(() => {\n measure()\n })\n const measure = () => {\n if (el.firstElementChild) {\n observer.observe(el.firstElementChild)\n }\n if (isAlive(model) && model.legendAtRest) {\n model.setLegendSize({ width: el.offsetWidth, height: el.scrollHeight })\n }\n }\n observer.observe(el)\n measure()\n return () => {\n observer.disconnect()\n }\n }, [model, atRest])\n return (\n <div\n ref={ref}\n data-legend-corner={model.legendCorner}\n style={{\n ...legendStackStyle,\n ...(model.legendCorner === 'top-right'\n ? {\n top: LEGEND_INSET_PX + model.referenceStripZonePx,\n right: LEGEND_INSET_PX,\n }\n : { bottom: LEGEND_INSET_PX, left: LEGEND_INSET_PX }),\n maxHeight:\n model.canvasHeight - 2 * LEGEND_INSET_PX - model.referenceStripZonePx,\n }}\n >\n <LegendPanel model={model} />\n </div>\n )\n})\n\n// Writes each drawn thing's size onto it, which is what Bandage's Length label\n// does and what the tooltip alone could not: a graph you have to hover to read\n// is a graph nobody reads. graphLabels applies the same transform the canvas\n// draws with \u2014 so a label tracks its node across pan and zoom \u2014 and decides\n// which labels fit; this only paints them, mounted in the canvas's own\n// positioning context for the reason RowLabels is.\nconst GraphSizeLabels = observer(function GraphSizeLabels({\n model,\n}: {\n model: GraphPaneModel\n}) {\n const labels = model.overlayLabels.sizes\n // A label too wide for the arc it names is placed clear of it and tethered\n // back; nothing else in the drawing carries one.\n const leaders = labels.flatMap(({ key, leader }) =>\n leader ? [{ key, ...leader }] : [],\n )\n return (\n <>\n {/* under the labels (z 3), so a leader runs beneath the text it points\n from; the placement culls a label past the canvas edge, so the\n layer leaves overflow visible */}\n {leaders.length > 0 ? (\n <PaneSvgLayer model={model} zIndex={2} overflow=\"visible\">\n {leaders.map(({ key, arcX, arcY, labelX, labelY }) => (\n <line\n key={key}\n data-testid=\"graph-label-leader\"\n x1={arcX}\n y1={arcY}\n x2={labelX}\n y2={labelY}\n stroke=\"#18181c\"\n strokeWidth={1}\n />\n ))}\n </PaneSvgLayer>\n ) : null}\n {labels.map(({ key, text, x, y, kind }) => (\n <div\n key={key}\n data-testid=\"graph-size-label\"\n style={{\n ...(kind === 'deletion' ? deletionLabelStyle : nodeLabelStyle),\n left: x,\n top: y,\n }}\n >\n {text}\n </div>\n ))}\n </>\n )\n})\n\ntype PaneCanvas = Pick<CanvasHandle, 'canvasRef' | 'canvas'>\n\ninterface OwnChrome {\n renderError: unknown\n retryRender: () => void\n}\n\n// `ownChrome` absent for a pane inside a track, whose controls, loading\n// state and errors are the track's `DisplayChrome`. A hosted pane whose x the\n// host places takes no pan or wheel of its own: those are the linear view's,\n// as on any other track. One drawing its own coordinates inside a track keeps\n// them, and keeps them from the view.\nconst GraphCanvasBody = observer(function GraphCanvasBody({\n model,\n handle: { canvasRef, canvas },\n ownChrome,\n}: {\n model: GraphPaneModel\n handle: PaneCanvas\n ownChrome?: OwnChrome\n}) {\n const {\n handlers,\n canvasStyle,\n surfaceProps,\n labelHandlers,\n contextMenu,\n closeContextMenu,\n hoveredChip,\n } = usePaneGestures(model)\n const [area, setArea] = useState<HTMLDivElement | null>(null)\n useWheelZoom(area, canvas, model)\n const faceted = model.facetPanels !== undefined\n\n return (\n <div style={wrapperStyle} {...surfaceProps}>\n {ownChrome ? <GraphToolbar model={model} /> : null}\n\n <div\n ref={setArea}\n style={canvasAreaStyle}\n {...labelHandlers}\n onMouseEnter={() => {\n model.setPointerInPane(true)\n }}\n onMouseLeave={() => {\n if (isAlive(model)) {\n model.setPointerInPane(false)\n }\n }}\n >\n {model.referenceStripShown ? (\n <div\n style={{\n ...paperStyle,\n top: model.referenceStripZonePx,\n background: PAPER_CSS,\n }}\n />\n ) : null}\n <canvas\n ref={canvasRef}\n data-testid=\"graph-genome-canvas\"\n style={{\n ...canvasStyle,\n width: model.paneWidth,\n height: model.canvasHeight,\n display: 'block',\n position: 'relative',\n zIndex: 1,\n }}\n {...handlers}\n />\n\n {faceted ? (\n <FacetPanels\n model={model}\n handlers={handlers}\n canvasStyle={canvasStyle}\n />\n ) : (\n <>\n <TubeMapOverlay model={model} />\n <HoverLayer model={model} />\n <ReferenceStripOverlay model={model} />\n <RowLabels model={model} />\n <GraphSizeLabels model={model} />\n <BubbleHalos model={model} />\n <GenePins model={model} />\n <LabelLayer model={model} />\n <WalkRowsOverlay model={model} />\n <WalkStripLocator model={model} />\n <Legends model={model} />\n </>\n )}\n\n {ownChrome ? (\n <div style={loadingLayerStyle}>\n <LoadingOverlay\n isVisible={model.isLoading}\n immediate={!model.layoutResult}\n statusMessage={model.statusMessage}\n onCancel={\n model.canCancelLoad\n ? () => {\n model.cancelLoad()\n }\n : undefined\n }\n />\n </div>\n ) : null}\n\n <HoverTooltip model={model} chip={hoveredChip} />\n </div>\n\n {model.walkStripShown ? <WalkStrip model={model} /> : null}\n\n <PaneContextMenu\n model={model}\n at={contextMenu}\n onClose={closeContextMenu}\n />\n\n {ownChrome?.renderError ? (\n <ErrorBanner\n error={ownChrome.renderError}\n onReset={ownChrome.retryRender}\n />\n ) : null}\n\n {ownChrome && model.error ? (\n <ErrorBanner\n error={model.error}\n onReset={\n model.canRetryLoad\n ? () => {\n model.retryLoad()\n }\n : undefined\n }\n />\n ) : null}\n </div>\n )\n})\n\nconst StandaloneGraphCanvas = observer(function StandaloneGraphCanvas({\n model,\n}: {\n model: GraphPaneModel\n}) {\n const { canvasRef, canvas, error, retry } = useRenderingBackend(\n createGraphRenderer,\n model,\n )\n return (\n <GraphCanvasBody\n model={model}\n handle={{ canvasRef, canvas }}\n ownChrome={{ renderError: error, retryRender: retry }}\n />\n )\n})\n\nconst GraphCanvas = observer(function GraphCanvas({\n model,\n handle,\n}: {\n model: GraphPaneModel\n handle?: PaneCanvas\n}) {\n return handle ? (\n <GraphCanvasBody model={model} handle={handle} />\n ) : (\n <StandaloneGraphCanvas model={model} />\n )\n})\n\nexport default GraphCanvas\n"],
|
|
5
|
-
"mappings": "kiCAUO,SAASA,GAAoBC,EAA2B,CAC7D,OAAO,QAAQ,QAAQ,IAAIC,EAAiBD,CAAM,CAAC,CACrD,CCZA,IAAME,EAAO,eAAe,0CAA0C,EAChEC,GAAOC,GACXF,GAAQ,MAAQE,KAAQ,OAAOF,CAAI,EAC/BA,EAAKE,CAAI,EACT,OAAO,OACL,UAAY,CACV,MAAM,IAAI,MAAM,kCAAoCA,EAAO,0JAAyK,CACtO,EACA,CAAE,mBAAoBA,CAAK,CAC7B,EAOC,IAAMC,GAAsCC,GAAK,qBAAqB,EACtEC,GAAQC,GAAQA,EAAK,WAAaA,EAAK,QAAUA,ECLjD,IAAMC,GAAkBC,GAAe,CAAC,EAGxCC,GAAQC,EAAS,SAAoB,CAC1C,MAAAC,CACF,EAEG,CACD,GAAM,CAACC,EAAQC,CAAS,EAAIC,EAAmC,IAAI,EACnE,OAAAC,EAAU,IAAM,CACd,GAAI,CAACH,EACH,OAEF,IAAMI,EAAW,IAAIC,EAAiBL,CAAM,EACtC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": ["createGraphRenderer", "canvas", "Canvas2DRenderer", "host", "read", "name", "useRenderingBackend", "read", "useRenderingBackend_default", "host", "hoverLayerStyle", "paneLayerStyle", "HoverLayer_default", "observer", "model", "canvas", "setCanvas", "useState", "useEffect", "renderer", "Canvas2DRenderer", "dispose", "autorun", "dependOn", "trackedDpr", "jsx", "LegendRowView", "observer", "row", "at", "hint", "after", "column", "indent", "jsxs", "legendRowStyle", "jsx", "LegendSwatchView", "legendNoteStyle", "closeStyle", "LegendPanel", "model", "sections", "legendSections", "rows", "section", "pitch", "rowPitch", "swatchColumn", "legendBoxStyle", "testid", "heading", "spaced", "i", "Fragment", "legendHeadingStyle", "HEADING_GAP_PX", "gridStyle", "FACET_GAP_PX", "titleStyle", "FACET_TITLE_PX", "panelStyle", "keyStyle", "FACET_KEY_ROW_PX", "FacetPanel", "observer", "model", "lift", "width", "height", "cell", "handlers", "canvasStyle", "canvas", "setCanvas", "useState", "hoverCanvas", "setHoverCanvas", "walk", "useEffect", "renderer", "Canvas2DRenderer", "hover", "drawing", "computed", "uploaded", "disposers", "autorun", "grid", "built", "dispose", "label", "jsxs", "jsx", "LegendRowView", "walkKeyRow", "hoverLayerStyle", "FacetPanels", "panels", "place", "columns", "PAPER_CSS", "i", "a", "b", "facetKeyRows", "row", "FacetPanels_default", "CropFree_default", "createSvgIcon", "jsx", "ZoomIn_default", "createSvgIcon", "jsx", "ZoomOut_default", "createSvgIcon", "jsx", "ColorSchemeSelect", "observer", "model", "fixed", "jsx", "LabelledSelect_default", "COLOR_SCHEMES", "value", "scheme", "ColorSchemeSelect_default", "useStyles", "makeStyles", "fmtMs", "ms", "GraphPerf", "observer", "model", "classes", "lastFetchMs", "lastLayoutMs", "lastGeometryMs", "hasMetrics", "jsxs", "Typography", "GraphStats", "jsx", "GraphStats_default", "LayoutSelect", "observer", "model", "graph", "jsx", "LabelledSelect_default", "LAYOUT_MODES", "value", "label", "description", "available", "mode", "LayoutSelect_default", "RepeatSelect", "observer", "model", "jsx", "LabelledSelect_default", "key", "RepeatSelect_default", "Close_default", "createSvgIcon", "jsx", "MoreVert_default", "createSvgIcon", "jsx", "SettingsMenu", "observer", "model", "haplotypes", "jsx", "CascadingMenuButton", "Route_default", "Visibility_default", "Settings_default", "getSession", "onClose", "GraphSettingsDialog_default", "Close_default", "MoreVert_default", "SettingsMenu_default", "useStyles", "makeStyles", "WalkSelect", "observer", "model", "classes", "labelId", "useId", "walkChoices", "names", "c", "labels", "picked", "layer", "name", "WALK_MENU_ITEMS", "jsx", "Button", "getSession", "onClose", "ChooseWalksDialog", "jsxs", "FormControl", "InputLabel", "Select", "selected", "n", "e", "value", "label", "MenuItem", "Checkbox", "ListItemText", "WalkSelect_default", "useStyles", "makeStyles", "ZoomDisplay", "observer", "model", "jsx", "Typography", "GraphToolbar", "classes", "zoomAboutCentre", "factor", "jsxs", "LayoutSelect_default", "ColorSchemeSelect_default", "WalkSelect_default", "RepeatSelect_default", "Tooltip", "IconButton", "ZoomIn_default", "ZoomOut_default", "CropFree_default", "GraphStats_default", "SettingsMenu_default", "GraphToolbar_default", "tooltipStyle", "TOOLTIP_INSET_PX", "labelled", "label", "readout", "jsxs", "Fragment", "jsx", "hoverTip", "model", "chip", "node", "merged", "own", "nodeOwnLocation", "regionLabel", "edge", "text", "edgeHoverText", "d", "id", "walkRow", "tube", "HoverTooltip", "observer", "tip", "HoverTooltip_default", "FilterList_default", "createSvgIcon", "jsx", "FilterListOff_default", "createSvgIcon", "jsx", "Info_default", "createSvgIcon", "jsx", "AT_POINTER", "nodeMenuItems", "model", "nodeId", "own", "reference", "highlight", "Info_default", "nodeLaunchMenuItems", "target", "formatSteps", "steps", "walkRowMenuItems", "row", "bars", "rows", "assembly", "walk", "sample", "filters", "shown", "regionLabel", "LineStyle_default", "l", "FilterList_default", "FilterListOff_default", "PaneContextMenu_default", "observer", "at", "onClose", "jsx", "ContextMenu", "keyStyle", "tipStyle", "StripBars", "observer", "bars", "frame", "ramp", "rowGenes", "idPrefix", "useSvgId", "tree", "useMemo", "walkRowsTree", "jsx", "ElTree", "StripTip", "model", "hover", "all", "index", "r", "row", "x", "side", "jsxs", "walkRowReadout", "StripMarks", "walkMarksTree", "WalkStrip", "menu", "setMenu", "useState", "hit", "e", "box", "stripRowAt", "key", "walkRowsKey", "RAMP_GRADIENT_CSS", "stripGeneGaps", "isAlive", "at", "walkStripLabelsTree", "l", "entry", "legendRowStyle", "LegendSwatchView", "walkRowSwatch", "PaneContextMenu_default", "WalkStrip_default", "WalkStripLocator", "observer", "model", "at", "jsxs", "PaneSvgLayer", "jsx", "WalkStripLocator_default", "ZOOM_PER_NOTCH", "NOTCH_PX", "LINE_PX", "PAGE_PX", "PINCH_GAIN", "MAX_NOTCHES_PER_EVENT", "wheelZoomFactor", "e", "px", "notches", "WHEEL_LINE_PX", "ZOOM_ACTIVE_MS", "ZOOM_EASE_MS", "MAX_ZOOM_BACKLOG", "easeZoom", "backlog", "elapsedMs", "rest", "wheelAction", "e", "host", "sideways", "useWheelZoom", "area", "canvas", "model", "useEffect", "lastZoom", "ease", "step", "now", "owed", "isAlive", "handleWheel", "rect", "action", "px", "wheelZoomFactor", "CLICK_SLOP_PX", "GESTURE_OWNER", "pointOf", "pinchOf", "points", "a", "b", "usePaneGestures", "lastMouseRef", "useRef", "downRef", "hasMovedRef", "dragPointerRef", "isOtherPointer", "pointsRef", "dragCanvasRef", "pinchRef", "stripPanRef", "labelPanRef", "verticalPanRef", "pendingRef", "contextMenu", "setContextMenu", "useState", "overDraggable", "setOverDraggable", "hoveredChip", "setHoveredChip", "pointerAt", "nodeAt", "sx", "sy", "onStrip", "nodePositions", "x", "y", "screenToLayout", "findHoveredNode", "edgeAt", "graph", "findHoveredEdge", "onMouseDown", "onPointerDown", "follows", "node", "pinchStep", "was", "applyPending", "pending", "pan", "hover", "pinch", "chip", "chipReadoutAt", "runInAction", "i", "scheduleFrame", "dropPending", "onPointerMove", "dx", "dy", "onPointerUp", "id", "at", "onPointerLeave", "onContextMenu", "clientX", "clientY", "row", "onClick", "onLabelPointerDown", "PANS_WITH_DRAWING", "start", "last", "gesture", "move", "release", "ev", "onLabelClickCapture", "canvasStyle", "surfaceProps", "wrapperStyle", "canvasAreaStyle", "paperStyle", "loadingLayerStyle", "rowLabelStyle", "RowLabels", "observer", "model", "jsx", "Fragment", "label", "y", "top", "legendStackStyle", "nodeLabelStyle", "deletionLabelStyle", "Legends", "ref", "useRef", "atRest", "useEffect", "el", "measure", "isAlive", "LEGEND_INSET_PX", "LegendPanel", "GraphSizeLabels", "labels", "leaders", "key", "leader", "jsxs", "PaneSvgLayer", "arcX", "arcY", "labelX", "labelY", "text", "x", "kind", "GraphCanvasBody", "canvasRef", "canvas", "ownChrome", "handlers", "canvasStyle", "surfaceProps", "labelHandlers", "contextMenu", "closeContextMenu", "hoveredChip", "usePaneGestures", "area", "setArea", "useState", "useWheelZoom", "faceted", "GraphToolbar_default", "PAPER_CSS", "FacetPanels_default", "TubeMapOverlay_default", "HoverLayer_default", "ReferenceStripOverlay_default", "BubbleHalos_default", "GenePins_default", "LabelLayer_default", "WalkRowsOverlay_default", "WalkStripLocator_default", "LoadingOverlay", "HoverTooltip_default", "WalkStrip_default", "PaneContextMenu_default", "ErrorBanner", "StandaloneGraphCanvas", "error", "retry", "useRenderingBackend", "createGraphRenderer", "GraphCanvas", "handle", "GraphCanvas_default"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e=JBrowseExports["@jbrowse/core/configuration"],t=o=>e!=null&&o in Object(e)?e[o]:Object.assign(function(){throw new Error("This JBrowse does not provide '"+o+"' from '@jbrowse/core/configuration' to plugins: GraphGenomeView was built for a different JBrowse version, so update the plugin or JBrowse")},{jbrowseHostMissing:o}),n=t("ConfigurationReference"),r=t("ConfigurationSchema");var s=t("getConf");var i=t("readConfObject");var a=t("setConf");var c=e&&e.__esModule?e.default:e;export{n as a,r as b,s as c,i as d,a as e};
|
|
2
|
-
//# sourceMappingURL=chunk-T7NMFIRW.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["jbrowse-host:@jbrowse/core/configuration"],
|
|
4
|
-
"sourcesContent": ["const host = JBrowseExports[\"@jbrowse/core/configuration\"]\nconst read = name =>\n host != null && name in Object(host)\n ? host[name]\n : Object.assign(\n function () {\n throw new Error(\"This JBrowse does not provide '\" + name + \"' from '\" + \"@jbrowse/core/configuration\" + \"' to plugins: \" + \"GraphGenomeView was built for a different JBrowse version, so update the plugin or JBrowse\")\n },\n { jbrowseHostMissing: name },\n )\nexport const ConfigurationReference = /* @__PURE__ */ read(\"ConfigurationReference\")\nexport const ConfigurationSchema = /* @__PURE__ */ read(\"ConfigurationSchema\")\nexport const ConfigurationSchemaUnion = /* @__PURE__ */ read(\"ConfigurationSchemaUnion\")\nexport const DEFAULT_FORMAT_DETAILS_DEPTH = /* @__PURE__ */ read(\"DEFAULT_FORMAT_DETAILS_DEPTH\")\nexport const FormatAboutConfigSchemaFactory = /* @__PURE__ */ read(\"FormatAboutConfigSchemaFactory\")\nexport const FormatDetailsConfigSchemaFactory = /* @__PURE__ */ read(\"FormatDetailsConfigSchemaFactory\")\nexport const applyConfSettings = /* @__PURE__ */ read(\"applyConfSettings\")\nexport const applyRetiredSpellings = /* @__PURE__ */ read(\"applyRetiredSpellings\")\nexport const arraySlotUnion = /* @__PURE__ */ read(\"arraySlotUnion\")\nexport const bamIndexFields = /* @__PURE__ */ read(\"bamIndexFields\")\nexport const bamIndexSchema = /* @__PURE__ */ read(\"bamIndexSchema\")\nexport const canonicalSpelling = /* @__PURE__ */ read(\"canonicalSpelling\")\nexport const changesKeyedField = /* @__PURE__ */ read(\"changesKeyedField\")\nexport const declaredSnapshot = /* @__PURE__ */ read(\"declaredSnapshot\")\nexport const evaluateForFeature = /* @__PURE__ */ read(\"evaluateForFeature\")\nexport const evaluateJexl = /* @__PURE__ */ read(\"evaluateJexl\")\nexport const expandTabixShorthand = /* @__PURE__ */ read(\"expandTabixShorthand\")\nexport const expandUriShorthand = /* @__PURE__ */ read(\"expandUriShorthand\")\nexport const fillIndexType = /* @__PURE__ */ read(\"fillIndexType\")\nexport const fillLocations = /* @__PURE__ */ read(\"fillLocations\")\nexport const fullConfSnapshot = /* @__PURE__ */ read(\"fullConfSnapshot\")\nexport const getConf = /* @__PURE__ */ read(\"getConf\")\nexport const getConfigurationSchemaDefinition = /* @__PURE__ */ read(\"getConfigurationSchemaDefinition\")\nexport const getConfigurationSchemaMetadata = /* @__PURE__ */ read(\"getConfigurationSchemaMetadata\")\nexport const getConfigurationSchemaUnion = /* @__PURE__ */ read(\"getConfigurationSchemaUnion\")\nexport const getSlotDefinition = /* @__PURE__ */ read(\"getSlotDefinition\")\nexport const getTypeNamesFromExplicitlyTypedUnion = /* @__PURE__ */ read(\"getTypeNamesFromExplicitlyTypedUnion\")\nexport const hydrateTrackConfig = /* @__PURE__ */ read(\"hydrateTrackConfig\")\nexport const indexSnapshot = /* @__PURE__ */ read(\"indexSnapshot\")\nexport const indexSuffix = /* @__PURE__ */ read(\"indexSuffix\")\nexport const isBareConfigurationSchemaType = /* @__PURE__ */ read(\"isBareConfigurationSchemaType\")\nexport const isCallbackValue = /* @__PURE__ */ read(\"isCallbackValue\")\nexport const isConfigurationModel = /* @__PURE__ */ read(\"isConfigurationModel\")\nexport const isConfigurationSchemaType = /* @__PURE__ */ read(\"isConfigurationSchemaType\")\nexport const isConfigurationSlot = /* @__PURE__ */ read(\"isConfigurationSlot\")\nexport const isConstantEntry = /* @__PURE__ */ read(\"isConstantEntry\")\nexport const isCsiLocation = /* @__PURE__ */ read(\"isCsiLocation\")\nexport const isKeyedWrites = /* @__PURE__ */ read(\"isKeyedWrites\")\nexport const isSlotDefinitionEntry = /* @__PURE__ */ read(\"isSlotDefinitionEntry\")\nexport const keyedBase = /* @__PURE__ */ read(\"keyedBase\")\nexport const keyedWritesAt = /* @__PURE__ */ read(\"keyedWritesAt\")\nexport const liftPlot = /* @__PURE__ */ read(\"liftPlot\")\nexport const liftRetiredSpellings = /* @__PURE__ */ read(\"liftRetiredSpellings\")\nexport const makeSlotFacade = /* @__PURE__ */ read(\"makeSlotFacade\")\nexport const mergeConfSettings = /* @__PURE__ */ read(\"mergeConfSettings\")\nexport const mergeFormatCallbacks = /* @__PURE__ */ read(\"mergeFormatCallbacks\")\nexport const parsePlot = /* @__PURE__ */ read(\"parsePlot\")\nexport const partitionAdvanced = /* @__PURE__ */ read(\"partitionAdvanced\")\nexport const plotKeysOf = /* @__PURE__ */ read(\"plotKeysOf\")\nexport const plotList = /* @__PURE__ */ read(\"plotList\")\nexport const plotOf = /* @__PURE__ */ read(\"plotOf\")\nexport const plotWrites = /* @__PURE__ */ read(\"plotWrites\")\nexport const preProcessConfigSnapshot = /* @__PURE__ */ read(\"preProcessConfigSnapshot\")\nexport const preProcessSnapshotWith = /* @__PURE__ */ read(\"preProcessSnapshotWith\")\nexport const readConfObject = /* @__PURE__ */ read(\"readConfObject\")\nexport const readConfigValue = /* @__PURE__ */ read(\"readConfigValue\")\nexport const refuseOnWrite = /* @__PURE__ */ read(\"refuseOnWrite\")\nexport const refusingUndeclaredKeys = /* @__PURE__ */ read(\"refusingUndeclaredKeys\")\nexport const requestedIndexType = /* @__PURE__ */ read(\"requestedIndexType\")\nexport const requirementProblems = /* @__PURE__ */ read(\"requirementProblems\")\nexport const setConf = /* @__PURE__ */ read(\"setConf\")\nexport const shorthandTargets = /* @__PURE__ */ read(\"shorthandTargets\")\nexport const shorthandTargetsOf = /* @__PURE__ */ read(\"shorthandTargetsOf\")\nexport const slotChoices = /* @__PURE__ */ read(\"slotChoices\")\nexport const slotValueRefusal = /* @__PURE__ */ read(\"slotValueRefusal\")\nexport const staleKeyedMembers = /* @__PURE__ */ read(\"staleKeyedMembers\")\nexport const tabixIndexFields = /* @__PURE__ */ read(\"tabixIndexFields\")\nexport const tabixIndexSchema = /* @__PURE__ */ read(\"tabixIndexSchema\")\nexport const tabixIndexSnapshot = /* @__PURE__ */ read(\"tabixIndexSnapshot\")\nexport const toCallbackValue = /* @__PURE__ */ read(\"toCallbackValue\")\nexport const toFixedValue = /* @__PURE__ */ read(\"toFixedValue\")\nexport const writesWholeAt = /* @__PURE__ */ read(\"writesWholeAt\")\nexport default host && host.__esModule ? host.default : host"],
|
|
5
|
-
"mappings": "AAAA,IAAMA,EAAO,eAAe,6BAA6B,EACnDC,EAAOC,GACXF,GAAQ,MAAQE,KAAQ,OAAOF,CAAI,EAC/BA,EAAKE,CAAI,EACT,OAAO,OACL,UAAY,CACV,MAAM,IAAI,MAAM,kCAAoCA,EAAO,6IAA4J,CACzN,EACA,CAAE,mBAAoBA,CAAK,CAC7B,EACOC,EAAyCF,EAAK,wBAAwB,EACtEG,EAAsCH,EAAK,qBAAqB,EAoBtE,IAAMI,EAA0BC,EAAK,SAAS,EAiC9C,IAAMC,EAAiCC,EAAK,gBAAgB,EAM5D,IAAMC,EAA0BC,EAAK,SAAS,EAYrD,IAAOC,EAAQC,GAAQA,EAAK,WAAaA,EAAK,QAAUA",
|
|
6
|
-
"names": ["host", "read", "name", "ConfigurationReference", "ConfigurationSchema", "getConf", "read", "readConfObject", "read", "setConf", "read", "configuration_default", "host"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as c}from"./chunk-ZN2NTCLU.js";import{a as l}from"./chunk-WCFLR4AJ.js";import{i as u,j as b}from"./chunk-NIGOHOFJ.js";import{h as i}from"./chunk-GH6WRWYC.js";var N={steps:"walkStepBudget",bytes:"walkByteBudget"},y=class{constructor(e,t){this.reader=e;this.adapter=t;this.source={names:e=>this.reader.referenceSequences(e),bytes:async(e,t)=>{let d=0;for(let{refName:n,start:r,end:s}of e)b(n,r,s),d+=await this.reader.bytesFor(n,{start:r,end:s},t);return d}}}async haplotypeNames(e={}){let{haplotypes:t}=await this.reader.header(e);return t.length>0?t:void 0}budgets(){return{stepBudget:this.adapter.getConf("walkStepBudget"),byteBudget:this.adapter.getConf("walkByteBudget"),budgetNames:N}}async subgraph(e,t,{signal:d,haplotypes:n,walkRows:r,expand:s,expandSamples:o}){let g=this.budgets(),p=u(n?.map(a=>i(this.adapter,a)),e),m=r&&p&&(n?.length??0)<=c?p:void 0,h=r&&o?.length&&o.length<=c?u(o.map(a=>i(this.adapter,a)),e):void 0,f=s?.length?a=>s.includes(a):void 0,{graph:B,kept:S,fragments:k,departures:w}=await this.reader.cut(e,t,{...g,stepBudget:r?1/0:g.stepBudget,signal:d,keep:p,...m||h||f?{expand:a=>!!m?.(a)||!!h?.(a)||!!f?.(a)}:{}});return l(B.tables(S,k,w),t,r)}async referenceNodes(e,t,d){let n=await this.reader.referenceNodes(e,t,d),r=new Set;return n.filter(s=>{let o=!r.has(s.id);return r.add(s.id),o})}};export{y as a};
|
|
2
|
-
//# sourceMappingURL=chunk-UH3LQSHA.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as D}from"./chunk-P5SI66S3.js";import{a as w,d as P}from"./chunk-TMM73K4C.js";import{d as x}from"./chunk-T7NMFIRW.js";import{f as B}from"./chunk-EGZZ3ADM.js";var g;function N(){return g??(g=import("./bandage-layout-UZEOCKMS.js").then(e=>e.default()).catch(e=>{throw g=void 0,e})),g}async function E(e){return(await N()).computeLayout(e.graph,e.options)}var G=[{value:"fmmm",label:"Bandage (FMMM)",description:"Bandage's force-directed layout: OGDF's fast multipole multilevel method, compiled to wasm."},{value:"stress",label:"Stress",description:"Plain JS: the reference drawn straight and each variant placed against it, an allele as a lens, a repeat loop as a ring, a deletion as an arch; stress by stochastic gradient descent for components with no reference."}],V=G.map(e=>e.value);var Y=async e=>{let n=performance.now();return{result:e.options.engine==="stress"?D(e):await E(e),duration:performance.now()-n}};function K(e){return Array.isArray(e)&&e.every(n=>typeof n=="string")}function we(e){let n=w(e).slice(1);return n.length>0?n:void 0}function $(e){return e.type==="WalkTabixSyntenyAdapter"||e.type==="RgfaTabixAdapter"&&(typeof e.walksUri=="string"&&e.walksUri!==""||B(e.walksLocation))}function Ne(e){return e.type==="GbzBaseSyntenyAdapter"||$(e)}function Ee(e){let{defaultHaplotypes:n}=e;return $(e)&&K(n)&&n.length>0?n:void 0}function Re(e){return w(e)[0]}function Le(e){return P(e).adapter}function Se(e,n){return e===void 0||e===n?void 0:`The graph is cut on its reference, ${e}: open it from a view of ${e}`}function i(e,n){return typeof e.get=="function"?e.get(n):e[n]}function b(e,n){return e.find(t=>t.trackId===n)}function h(e){return`${e.trackId} ${e.name??""}`}var J=new Set(["BedAdapter","BedTabixAdapter","BigBedAdapter","VcfAdapter","VcfTabixAdapter"]),S=/repeat|tandem|\bstr\b|vntr|trf|trgt|vamos|expansion|microsat/i;function ot(e,n){let t=n?b(e,n):void 0;return t||e.filter(o=>J.has(o.adapterType)).find(o=>S.test(h(o)))}var v=/^\w+=[^;]*(;\w+=[^;]*)*$/;function W(e){let n=i(e,"name");if(!(typeof n!="string"||!v.test(n)))return Object.fromEntries(n.split(";").map(t=>{let r=t.indexOf("=");return[t.slice(0,r),t.slice(r+1)]}))}function d(e,n){let t=i(e,n);return t!==void 0?t:i(e,"INFO")?.[n]??W(e)?.[n]}var U=["RUS","MOTIFS","RU","motifs","motif","sequence","consensus"],z=["RUL","period","PERIOD","consensusSize","unit","unitLength"],X=["TRID","REPID","VARID","ID","name","id"];function k(e,n){for(let t of n){let r=d(e,t),o=String((Array.isArray(r)?r[0]:r)??"").split(",")[0].trim();if(o!==""&&o!==".")return o}}var H=/^[ACGTURYSWKMBDHVN]+$/i;function Q(e){let n=Number(k(e,z));if(Number.isFinite(n)&&n>0)return Math.round(n);let t=k(e,U);return t&&H.test(t)?t.length:void 0}function m(e){return(Array.isArray(e)?e:String(e??"").split(",")).map(t=>{let r=t===""||t===null||t===void 0?NaN:Number(t);return Number.isFinite(r)?r:void 0})}function L(e){return(Array.isArray(e)?e:String(e??"").split(",")).map(t=>{let r=String(t??"").trim();return r===""||r==="."?void 0:r})}var R="<CNV:TR>";function q(e){let n=L(i(e,"ALT"));if(!n.includes(R))return;let t=m(d(e,"RN")),r=L(d(e,"RUS")),o=m(d(e,"RUL")),s=m(d(e,"RUC")),a=m(d(e,"RB")),c=0;return n.map((u,f)=>{let p=t[f]??(u===R?1:0),y=0,_=0;for(let C=0;C<p;C++,c++){let A=r[c],I=o[c]??(A&&H.test(A)?A.length:void 0),O=s[c],M=a[c]??(I&&O!==void 0?Math.round(I*O):void 0);M!==void 0&&(y+=M,_++)}return u===R&&p>0&&_===p?y:void 0})}function Z(e,n,t){let r=e?.includes("|");return(e??"").split(/[/|]/).flatMap((o,s)=>{let a=o===""?NaN:Number(o),c=a>0?n[a-1]:t;return!Number.isInteger(a)||c===void 0?[]:[{bp:c,...r?{haplotype:s+1}:{}}]})}function ee(e,n,t){let r=i(e,"samples"),o={};for(let[s,a]of Object.entries(r??{})){let c=m(a.SD),u=m(a.AL).flatMap((p,y)=>p!==void 0&&p>0?[c[y]===void 0?{bp:p}:{bp:p,spanningReads:c[y]}]:[]),f=u.length>0||!n?u:Z(L(a.GT)[0],n,t);f.length>0&&(o[s]=f)}return Object.keys(o).length>0?o:void 0}function te(e,n){let t=d(e,"start"),r=d(e,"end"),o=m(d(e,"SVLEN"))[0];return n&&o!==void 0?{start:t+1,end:t+1+o}:{start:t,end:r}}function st(e){let n=[];for(let t of e){let r=q(t),{start:o,end:s}=te(t,r!==void 0),a=Q(t);if(!(s>o)||a===void 0)continue;let c=d(t,"refName"),u=k(t,U),f=k(t,X);n.push({key:`${c}:${o}-${s}`,name:(f&&!v.test(f)?f:void 0)??(u&&u.length<=12?`(${u})n`:`${c}:${(o+1).toLocaleString("en-US")}-${s.toLocaleString("en-US")}`),refName:c,start:o,end:s,unit:a,motif:u,calls:ee(t,r,s-o)})}return n.sort((t,r)=>t.start-r.start)}function T(e){let n=[];for(let t of[...e].sort((r,o)=>r.start-o.start)){let r=n.at(-1);r&&t.start<=r.end?r.end=Math.max(r.end,t.end):n.push({...t})}return n}function F(e){let n=[],t=new Map;for(let r of[...e].sort((o,s)=>o.start-s.start)){let o=`${r.refName} ${r.strand} ${r.name}`,s=t.get(o);if(s&&r.start<s.end)s.end=Math.max(s.end,r.end),s.exons=T([...s.exons,...r.exons]);else{let a={...r,exons:T(r.exons)};n.push(a),t.set(o,a)}}return n}var ne=new Set(["Gff3TabixAdapter","Gff3Adapter","BedTabixAdapter","BedAdapter","GtfTabixAdapter","GtfAdapter","BigBedAdapter","NCListAdapter"]),re=/gene|refseq|gencode|ensembl|annotation/i,oe=new Set(["BedTabixAdapter","BedAdapter"]);function yt(e,n){let t=n?b(e,n):void 0;if(t)return t;let r=e.filter(o=>ne.has(o.adapterType)&&!S.test(h(o)));return r.find(o=>re.test(h(o)))??r.find(o=>!oe.has(o.adapterType))}var se=/\bTEs?\b|transpos/i;function Tt(e){return e&&se.test(h(e))?"TE":"gene"}function bt(e,n){let t=e.tracks?.find(r=>x(r.configuration,"trackId")===n)?.displays[0];return t?x(t.configuration,"filter")??[]:[]}var ie=new Set(["chromosome","region","contig","supercontig","scaffold"]),ae=new Set(["exon","CDS","five_prime_UTR","three_prime_UTR","UTR"]);function j(e,n){let t=i(e,"type");typeof t=="string"&&ae.has(t)&&n.push({start:i(e,"start"),end:i(e,"end")});let r=i(e,"subfeatures");for(let o of r??[])j(o,n)}function kt(e){let n=[];for(let t of e){let r=i(t,"gene_name")??i(t,"name")??i(t,"gene")??i(t,"gene_id"),o=i(t,"start"),s=i(t,"end");if(!r||!(s>o)||ie.has(i(t,"type")))continue;let a=[];j(t,a),n.push({name:r,refName:i(t,"refName"),start:o,end:s,strand:i(t,"strand")??0,exons:a.length?T(a):[{start:o,end:s}]})}return F(n)}var l=JBrowseExports["tss-react/mui"],ce=e=>l!=null&&e in Object(l)?l[e]:Object.assign(function(){throw new Error("This JBrowse does not provide '"+e+"' from 'tss-react/mui' to plugins: GraphGenomeView was built for a different JBrowse version, so update the plugin or JBrowse")},{jbrowseHostMissing:e});var xt=ce("makeStyles"),wt=l&&l.__esModule?l.default:l;export{G as a,V as b,Y as c,we as d,$ as e,Ne as f,Ee as g,Re as h,Le as i,Se as j,J as k,ot as l,st as m,ne as n,yt as o,Tt as p,bt as q,kt as r,xt as s};
|
|
2
|
-
//# sourceMappingURL=chunk-ULWTJWXX.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../node_modules/.pnpm/@jbrowse+graph-fmmm-layout@1.0.2/node_modules/@jbrowse/graph-fmmm-layout/esm/loadFmmm.js", "../../node_modules/.pnpm/@jbrowse+graph-fmmm-layout@1.0.2/node_modules/@jbrowse/graph-fmmm-layout/esm/fmmmLayout.js", "../../node_modules/.pnpm/@jbrowse+bandage-core@13.3.1/node_modules/@jbrowse/bandage-core/dist/chunks/chunk-CO6RGQAD.js", "../../src/graphTrackConfig.ts", "../../src/GraphGenomeView/trackFeatures.ts", "../../src/GraphGenomeView/repeats/repeatFeatures.ts", "../../node_modules/.pnpm/@jbrowse+bandage-core@13.3.1/node_modules/@jbrowse/bandage-core/dist/chunks/chunk-EQDQ7P4Y.js", "../../src/GraphGenomeView/genes/geneFeatures.ts", "jbrowse-host:tss-react/mui"],
|
|
4
|
-
"sourcesContent": ["let cached;\nexport function loadFmmm() {\n cached !== null && cached !== void 0 ? cached : (cached = import('./bandage-layout.js')\n .then(mod => mod.default())\n .catch((e) => {\n cached = undefined;\n throw e;\n }));\n return cached;\n}\n", "import { loadFmmm } from \"./loadFmmm.js\";\nexport async function fmmmLayout(request) {\n const engine = await loadFmmm();\n return engine.computeLayout(request.graph, request.options);\n}\n", "// src/layoutEngines.ts\nimport { fmmmLayout } from \"@jbrowse/graph-fmmm-layout\";\nimport { stressLayout } from \"@jbrowse/graph-stress-layout\";\nvar LAYOUT_ENGINES = [\n {\n value: \"fmmm\",\n label: \"Bandage (FMMM)\",\n description: \"Bandage's force-directed layout: OGDF's fast multipole multilevel method, compiled to wasm.\"\n },\n {\n value: \"stress\",\n label: \"Stress\",\n description: \"Plain JS: the reference drawn straight and each variant placed against it, an allele as a lens, a repeat loop as a ring, a deletion as an arch; stress by stochastic gradient descent for components with no reference.\"\n }\n];\nvar LAYOUT_ENGINE_VALUES = LAYOUT_ENGINES.map((e) => e.value);\nfunction isLayoutEngineKind(value) {\n return LAYOUT_ENGINE_VALUES.includes(value);\n}\nvar layoutEngine = async (request) => {\n const start = performance.now();\n const result = request.options.engine === \"stress\" ? stressLayout(request) : await fmmmLayout(request);\n return { result, duration: performance.now() - start };\n};\n\nexport {\n LAYOUT_ENGINES,\n LAYOUT_ENGINE_VALUES,\n isLayoutEngineKind,\n layoutEngine\n};\n", "import {\n getConfAssemblyNamesOrNone,\n toTrackConfigEntry,\n} from '@jbrowse/core/util/tracks'\n\nimport { snapshotNamesFile } from './locationName.ts'\n\nimport type { AnyTrackConfig } from '@jbrowse/core/configuration'\n\nfunction isStringArray(value: unknown): value is string[] {\n return Array.isArray(value) && value.every(item => typeof item === 'string')\n}\n\n// The assemblies the track names after its reference, which is what core's\n// MultiWaySyntenyDisplay opens a lane-declaring source on.\nexport function trackLanes(track: AnyTrackConfig) {\n const lanes = getConfAssemblyNamesOrNone(track).slice(1)\n return lanes.length > 0 ? lanes : undefined\n}\n\n// Whether a track names a walk file, by the `walksUri` shorthand as written\n// or the location it expands to: an rGFA track may, and a\n// WalkTabixSyntenyAdapter one does\nexport function walkIndexed(adapterConfig: Record<string, unknown>) {\n return (\n adapterConfig.type === 'WalkTabixSyntenyAdapter' ||\n (adapterConfig.type === 'RgfaTabixAdapter' &&\n ((typeof adapterConfig.walksUri === 'string' &&\n adapterConfig.walksUri !== '') ||\n snapshotNamesFile(adapterConfig.walksLocation)))\n )\n}\n\n// Whether a track's cut reads `haplotypes`: a GBZ cut does, and so does an\n// rGFA one with a walk file\nexport function cutsByHaplotype(adapterConfig: Record<string, unknown>) {\n return (\n adapterConfig.type === 'GbzBaseSyntenyAdapter' || walkIndexed(adapterConfig)\n )\n}\n\n// The haplotypes a walk-indexed track's config names to cut for until the\n// user picks others\nexport function configHaplotypes(adapterConfig: Record<string, unknown>) {\n const { defaultHaplotypes } = adapterConfig\n return walkIndexed(adapterConfig) &&\n isStringArray(defaultHaplotypes) &&\n defaultHaplotypes.length > 0\n ? defaultHaplotypes\n : undefined\n}\n\n// A graph is cut on the first assembly its track names, the rule\n// GbzBaseSyntenyAdapter states for its anchor. Every other assembly the track\n// names holds its sequence as rank>0 alleles off that reference's backbone, so\n// a window on one has no reference coordinates to frame the cut by.\nexport function graphReferenceAssembly(track: AnyTrackConfig) {\n return getConfAssemblyNamesOrNone(track)[0]\n}\n\n// A track's adapter config, from a live node or a session's frozen entry\nexport function trackAdapterSnapshot(track: AnyTrackConfig) {\n return toTrackConfigEntry(track).adapter as Record<string, unknown>\n}\n\nexport function offReferenceProblem(\n referenceAssembly: string | undefined,\n assemblyName: string,\n) {\n return referenceAssembly === undefined || referenceAssembly === assemblyName\n ? undefined\n : `The graph is cut on its reference, ${referenceAssembly}: open it from a view of ${referenceAssembly}`\n}\n", "import type { Feature } from '@jbrowse/core/util'\n\nexport type FeatureLike = Feature | Record<string, unknown>\n\nexport function ownField(f: FeatureLike, name: string): unknown {\n return typeof (f as Feature).get === 'function'\n ? (f as Feature).get(name)\n : (f as Record<string, unknown>)[name]\n}\n\nexport interface TrackChoice {\n trackId: string\n name?: string\n adapterType: string\n}\n\nexport function namedTrack<T extends TrackChoice>(tracks: T[], named: string) {\n return tracks.find(t => t.trackId === named)\n}\n\n// what a track-name hint such as /repeat|tandem/ is matched against\nexport function trackLabel(t: TrackChoice) {\n return `${t.trackId} ${t.name ?? ''}`\n}\n", "import { namedTrack, ownField, trackLabel } from '../trackFeatures'\n\nimport type { FeatureLike, TrackChoice } from '../trackFeatures'\n\nexport interface RepeatCall {\n bp: number\n // TRGT's `SD`. Zero means the allele is a copy of the one the reads did\n // support, so its length states nothing about a second haplotype; absent\n // where the genotyper writes no such field.\n spanningReads?: number\n // the PanSN haplotype a phased genotype puts this allele on\n haplotype?: number\n}\n\n// A tandem repeat array as the walk rows need it: its span on the reference,\n// which is what the bars measure between, and its unit length, which is what\n// they tile by. Read off whatever repeat annotation the session has, since the\n// tools all state the same two facts under different names: VCF 4.5's\n// `<CNV:TR>` allele gives `RUL` and `RUS` (one entry per repeat sequence,\n// grouped by `RN`), UCSC simpleRepeat and TRF give `period` and the consensus\n// `sequence`, TRGT gives `MOTIFS` and `TRID`, ExpansionHunter `RU` and `REPID`,\n// HipSTR and GangSTR `PERIOD`, vamos its `motifs`. A VCF record's INFO is\n// searched as well as its top level, and a list's first entry is the unit the\n// bars tile by: for a compound array that is the first repeat sequence, which\n// is the expanding one at every such locus in the common catalogues.\nexport interface RepeatArray {\n key: string\n name: string\n refName: string\n start: number\n end: number\n unit: number\n motif?: string\n // Each sample's genotyped alleles, from a genotyper's per-sample `AL`\n // (TRGT) or a genotype over VCF 4.5 <CNV:TR> alleles; absent from a\n // catalogue.\n calls?: Record<string, RepeatCall[]>\n}\n\nexport const REPEAT_ADAPTER_TYPES = new Set([\n 'BedAdapter',\n 'BedTabixAdapter',\n 'BigBedAdapter',\n 'VcfAdapter',\n 'VcfTabixAdapter',\n])\n\nexport const REPEAT_TRACK_HINT =\n /repeat|tandem|\\bstr\\b|vntr|trf|trgt|vamos|expansion|microsat/i\n\nexport function pickRepeatTrack<T extends TrackChoice>(\n tracks: T[],\n named: string,\n) {\n const chosen = named ? namedTrack(tracks, named) : undefined\n if (chosen) {\n return chosen\n }\n const candidates = tracks.filter(t => REPEAT_ADAPTER_TYPES.has(t.adapterType))\n return candidates.find(t => REPEAT_TRACK_HINT.test(trackLabel(t)))\n}\n\n// A TRGT repeat catalogue is a BED whose name column packs the record:\n// `ID=HTT;MOTIFS=CAG,CCG;STRUC=(CAG)nCAACAG(CCG)n`. Read as fields when it\n// has that shape.\nconst PACKED_NAME = /^\\w+=[^;]*(;\\w+=[^;]*)*$/\n\nfunction packedName(f: FeatureLike) {\n const name = ownField(f, 'name')\n if (typeof name !== 'string' || !PACKED_NAME.test(name)) {\n return undefined\n }\n return Object.fromEntries(\n name.split(';').map(pair => {\n const i = pair.indexOf('=')\n return [pair.slice(0, i), pair.slice(i + 1)]\n }),\n )\n}\n\n// A field at the feature's top level, in a VCF record's INFO, or in a packed\n// name column, in that order.\nfunction field(f: FeatureLike, name: string): unknown {\n const top = ownField(f, name)\n if (top !== undefined) {\n return top\n }\n const info = ownField(f, 'INFO') as Record<string, unknown> | undefined\n return info?.[name] ?? packedName(f)?.[name]\n}\n\nconst MOTIF_FIELDS = [\n 'RUS',\n 'MOTIFS',\n 'RU',\n 'motifs',\n 'motif',\n 'sequence',\n 'consensus',\n]\nconst PERIOD_FIELDS = [\n 'RUL',\n 'period',\n 'PERIOD',\n 'consensusSize',\n 'unit',\n 'unitLength',\n]\nconst NAME_FIELDS = ['TRID', 'REPID', 'VARID', 'ID', 'name', 'id']\n\n// The first entry of a list-valued field, whether it arrived parsed or as\n// the comma-joined text a VCF INFO or a BED column holds; VCF's missing \".\"\n// counts as absent.\nfunction first(f: FeatureLike, names: string[]) {\n for (const name of names) {\n const value = field(f, name)\n const one = String((Array.isArray(value) ? value[0] : value) ?? '')\n .split(',')[0]!\n .trim()\n if (one !== '' && one !== '.') {\n return one\n }\n }\n return undefined\n}\n\nconst IUPAC = /^[ACGTURYSWKMBDHVN]+$/i\n\n// The unit in bp: a stated period, else the length of the first motif.\nexport function repeatUnitOf(f: FeatureLike) {\n const period = Number(first(f, PERIOD_FIELDS))\n if (Number.isFinite(period) && period > 0) {\n return Math.round(period)\n }\n const motif = first(f, MOTIF_FIELDS)\n return motif && IUPAC.test(motif) ? motif.length : undefined\n}\n\n// A per-sample list field, parsed or as the comma-joined text a VCF column\n// holds. A missing entry stays missing: read as 0, an absent `SD` would make\n// every allele of every genotyper that writes no such field unspanned.\nfunction numbers(value: unknown) {\n const raw: unknown[] = Array.isArray(value)\n ? value\n : String(value ?? '').split(',')\n return raw.map(one => {\n const n =\n one === '' || one === null || one === undefined ? NaN : Number(one)\n return Number.isFinite(n) ? n : undefined\n })\n}\n\nfunction strings(value: unknown) {\n const raw: unknown[] = Array.isArray(value)\n ? value\n : String(value ?? '').split(',')\n return raw.map(one => {\n const text = String(one ?? '').trim()\n return text === '' || text === '.' ? undefined : text\n })\n}\n\nconst TANDEM_REPEAT = '<CNV:TR>'\n\n// Each ALT allele's length, off VCF 4.5's flattened list-of-lists: RN says how\n// many RUS/RUL/RUC/RB entries each allele takes, and the allele's bases are\n// its runs' RB, or unit length times count where RB is missing. An allele that\n// is not <CNV:TR>, or has a run stating neither, has none.\nfunction tandemAlleleBp(f: FeatureLike) {\n const alts = strings(ownField(f, 'ALT'))\n if (!alts.includes(TANDEM_REPEAT)) {\n return undefined\n }\n const rn = numbers(field(f, 'RN'))\n const rus = strings(field(f, 'RUS'))\n const rul = numbers(field(f, 'RUL'))\n const ruc = numbers(field(f, 'RUC'))\n const rb = numbers(field(f, 'RB'))\n let k = 0\n return alts.map((alt, i) => {\n const n = rn[i] ?? (alt === TANDEM_REPEAT ? 1 : 0)\n let bp = 0\n let known = 0\n for (let j = 0; j < n; j++, k++) {\n const motif = rus[k]\n const unitLength =\n rul[k] ?? (motif && IUPAC.test(motif) ? motif.length : undefined)\n const count = ruc[k]\n const runBp =\n rb[k] ??\n (unitLength && count !== undefined\n ? Math.round(unitLength * count)\n : undefined)\n if (runBp !== undefined) {\n bp += runBp\n known++\n }\n }\n return alt === TANDEM_REPEAT && n > 0 && known === n ? bp : undefined\n })\n}\n\n// A sample's alleles through its genotype: 0 is the reference's, an index\n// past it the ALT allele's. A phased genotype's k-th allele is PanSN\n// haplotype k, the order vg deconstruct writes an assembly's haplotypes in.\nfunction genotyped(\n gt: string | undefined,\n alleleBp: (number | undefined)[],\n referenceBp: number,\n) {\n const phased = gt?.includes('|')\n return (gt ?? '').split(/[/|]/).flatMap((index, k): RepeatCall[] => {\n const i = index === '' ? NaN : Number(index)\n const bp = i > 0 ? alleleBp[i - 1] : referenceBp\n if (!Number.isInteger(i) || bp === undefined) {\n return []\n }\n return [{ bp, ...(phased ? { haplotype: k + 1 } : {}) }]\n })\n}\n\nfunction callsOf(\n f: FeatureLike,\n alleleBp: (number | undefined)[] | undefined,\n referenceBp: number,\n) {\n const samples = ownField(f, 'samples') as\n Record<string, Record<string, unknown>> | undefined\n const called: Record<string, RepeatCall[]> = {}\n for (const [sample, fields] of Object.entries(samples ?? {})) {\n const reads = numbers(fields.SD)\n const lengths = numbers(fields.AL).flatMap((bp, i) =>\n bp !== undefined && bp > 0\n ? [reads[i] === undefined ? { bp } : { bp, spanningReads: reads[i] }]\n : [],\n )\n const calls =\n lengths.length > 0 || !alleleBp\n ? lengths\n : genotyped(strings(fields.GT)[0], alleleBp, referenceBp)\n if (calls.length > 0) {\n called[sample] = calls\n }\n }\n return Object.keys(called).length > 0 ? called : undefined\n}\n\n// A <CNV:TR> record's POS is the base before the array and SVLEN the\n// reference allele's length, while a VCF feature starts at that padding base.\nfunction spanOf(f: FeatureLike, tandem: boolean) {\n const start = field(f, 'start') as number\n const end = field(f, 'end') as number\n const svlen = numbers(field(f, 'SVLEN'))[0]\n return tandem && svlen !== undefined\n ? { start: start + 1, end: start + 1 + svlen }\n : { start, end }\n}\n\nexport function repeatArraysFrom(features: FeatureLike[]): RepeatArray[] {\n const arrays: RepeatArray[] = []\n for (const f of features) {\n const alleleBp = tandemAlleleBp(f)\n const { start, end } = spanOf(f, alleleBp !== undefined)\n const unit = repeatUnitOf(f)\n if (!(end > start) || unit === undefined) {\n continue\n }\n const refName = field(f, 'refName') as string\n const motif = first(f, MOTIF_FIELDS)\n const stated = first(f, NAME_FIELDS)\n arrays.push({\n key: `${refName}:${start}-${end}`,\n name:\n (stated && !PACKED_NAME.test(stated) ? stated : undefined) ??\n (motif && motif.length <= 12\n ? `(${motif})n`\n : `${refName}:${(start + 1).toLocaleString('en-US')}-${end.toLocaleString('en-US')}`),\n refName,\n start,\n end,\n unit,\n motif,\n calls: callsOf(f, alleleBp, end - start),\n })\n }\n return arrays.sort((a, b) => a.start - b.start)\n}\n", "// src/genes/geneFiles.ts\nvar GENE_TYPE = /(gene|gene_segment|RNA|transcript)$/i;\nvar isGene = (type) => GENE_TYPE.test(type) || type === \"CDS\" || type === \"exon\";\nfunction mergedIntervals(intervals) {\n const out = [];\n for (const iv of [...intervals].sort((a, b) => a.start - b.start)) {\n const last = out.at(-1);\n if (last && iv.start <= last.end) {\n last.end = Math.max(last.end, iv.end);\n } else {\n out.push({ ...iv });\n }\n }\n return out;\n}\nfunction strandOf(s) {\n return s === \"+\" ? 1 : s === \"-\" ? -1 : 0;\n}\nfunction unescape(value) {\n try {\n return decodeURIComponent(value);\n } catch {\n return value;\n }\n}\nfunction attributes(column) {\n const out = /* @__PURE__ */ new Map();\n for (const pair of column.split(\";\")) {\n const eq = pair.indexOf(\"=\");\n if (eq > 0) {\n out.set(pair.slice(0, eq).trim(), unescape(pair.slice(eq + 1).trim()));\n }\n }\n return out;\n}\nfunction gff3Row(line) {\n const cols = line.split(\"\t\");\n const start = Number(cols[3]);\n const end = Number(cols[4]);\n if (cols.length < 9 || !Number.isInteger(start) || !Number.isInteger(end)) {\n return void 0;\n }\n return {\n refName: cols[0],\n type: cols[2],\n start: start - 1,\n end,\n strand: strandOf(cols[6]),\n attrs: attributes(cols[8])\n };\n}\nfunction genesFromGff3Lines(lines) {\n const rows = [];\n for (const line of lines) {\n if (line.startsWith(\"##FASTA\")) {\n break;\n }\n const row = line.startsWith(\"#\") ? void 0 : gff3Row(line);\n if (row) {\n rows.push(row);\n }\n }\n const parentOf = /* @__PURE__ */ new Map();\n for (const { attrs } of rows) {\n const id = attrs.get(\"ID\");\n const parent = attrs.get(\"Parent\")?.split(\",\")[0];\n if (id && parent) {\n parentOf.set(id, parent);\n }\n }\n const rootOf = (row) => {\n let id = row.attrs.get(\"Parent\")?.split(\",\")[0] ?? row.attrs.get(\"ID\");\n if (!id) {\n return row.attrs.get(\"gene_id\");\n }\n const seen = /* @__PURE__ */ new Set();\n while (id && parentOf.has(id) && !seen.has(id)) {\n seen.add(id);\n id = parentOf.get(id);\n }\n return id;\n };\n const groups = /* @__PURE__ */ new Map();\n rows.forEach((row, i) => {\n const root = rootOf(row) ?? `#${i}`;\n const key = `${row.refName}\t${root}`;\n const group = groups.get(key) ?? groups.set(key, { rows: [] }).get(key);\n group.rows.push(row);\n if (!row.attrs.has(\"Parent\") && !group.top) {\n group.top = row;\n }\n });\n const genes = [];\n for (const [key, { top, rows: rows2 }] of groups) {\n if (top && !isGene(top.type)) {\n continue;\n }\n const first = top ?? rows2[0];\n const start = top?.start ?? Math.min(...rows2.map((r) => r.start));\n const end = top?.end ?? Math.max(...rows2.map((r) => r.end));\n const a = first.attrs;\n const spans = (type) => rows2.filter((r) => r.type === type).map((r) => ({ start: r.start, end: r.end }));\n const exons = spans(\"exon\");\n const coding = spans(\"CDS\");\n const transcribed = rows2.some(\n (r) => r !== top && r.type !== \"exon\" && r.type !== \"CDS\"\n );\n genes.push({\n name: a.get(\"Name\") ?? a.get(\"gene_name\") ?? a.get(\"gene\") ?? a.get(\"gene_id\") ?? key.split(\"\t\")[1],\n refName: first.refName,\n start,\n end,\n strand: first.strand,\n // A range read holds only the rows over its window, so a gene with\n // transcripts but no exon or CDS there is intronic in it. Only a gene\n // with no transcripts, as a bacterium's gene and CDS, is one exon.\n exons: exons.length ? mergedIntervals(exons) : transcribed ? mergedIntervals(coding) : [{ start, end }]\n });\n }\n return genes;\n}\nfunction mergeOverlappingByName(genes) {\n const out = [];\n const open = /* @__PURE__ */ new Map();\n for (const g of [...genes].sort((a, b) => a.start - b.start)) {\n const key = `${g.refName}\t${g.strand}\t${g.name}`;\n const last = open.get(key);\n if (last && g.start < last.end) {\n last.end = Math.max(last.end, g.end);\n last.exons = mergedIntervals([...last.exons, ...g.exons]);\n } else {\n const gene = { ...g, exons: mergedIntervals(g.exons) };\n out.push(gene);\n open.set(key, gene);\n }\n }\n return out;\n}\nvar BED_HEADER = /^(#|track\\s|browser\\s)/;\nfunction genesFromBed(text) {\n const rows = [];\n for (const line of text.split(\"\\n\")) {\n const cols = line.replace(/\\r$/, \"\").split(\"\t\");\n const start = Number(cols[1]);\n const end = Number(cols[2]);\n if (BED_HEADER.test(line) || cols.length < 3 || !Number.isInteger(start) || !(end > start)) {\n continue;\n }\n const refName = cols[0];\n const name = cols[3] && cols[3] !== \".\" ? cols[3] : `${refName}:${start + 1}-${end}`;\n const sizes = cols[10]?.split(\",\").filter((s) => s !== \"\").map(Number);\n const starts = cols[11]?.split(\",\").filter((s) => s !== \"\").map(Number);\n const blocks = sizes?.length && sizes.length === starts?.length ? sizes.map((size, i) => ({\n start: start + starts[i],\n end: start + starts[i] + size\n })) : [{ start, end }];\n rows.push({\n name,\n refName,\n start,\n end,\n strand: strandOf(cols[5]),\n exons: blocks\n });\n }\n return mergeOverlappingByName(rows);\n}\nfunction sniffedFormat(text) {\n const first = text.split(\"\\n\", 1e3).find((l) => l.trim() !== \"\" && !BED_HEADER.test(l));\n const cols = first?.split(\"\t\") ?? [];\n return /^\\d+$/.test(cols[1] ?? \"\") && /^\\d+$/.test(cols[2] ?? \"\") ? \"bed\" : \"gff3\";\n}\nfunction genesFromText(text, format = sniffedFormat(text)) {\n return format === \"bed\" ? genesFromBed(text) : genesFromGff3Lines(text.split(/\\r?\\n/));\n}\n\nexport {\n mergedIntervals,\n genesFromGff3Lines,\n mergeOverlappingByName,\n genesFromBed,\n genesFromText\n};\n", "import {\n mergeOverlappingByName,\n mergedIntervals,\n} from '@jbrowse/bandage-core/genes/geneFiles'\nimport { readConfObject } from '@jbrowse/core/configuration'\n\nimport { REPEAT_TRACK_HINT } from '../repeats/repeatFeatures'\nimport { namedTrack, ownField, trackLabel } from '../trackFeatures'\n\nimport type { FeatureLike, TrackChoice } from '../trackFeatures'\nimport type { GeneModel } from '@jbrowse/bandage-core/genes/genePins'\nimport type { AnyConfigurationModel } from '@jbrowse/core/configuration'\n\n// The adapters whose tracks hold gene models, in the order the session's\n// tracks are searched when no track is named.\nexport const GENE_ADAPTER_TYPES = new Set([\n 'Gff3TabixAdapter',\n 'Gff3Adapter',\n 'BedTabixAdapter',\n 'BedAdapter',\n 'GtfTabixAdapter',\n 'GtfAdapter',\n 'BigBedAdapter',\n 'NCListAdapter',\n])\n\nconst GENE_TRACK_HINT = /gene|refseq|gencode|ensembl|annotation/i\n\n// A BED track is as often peaks or repeats as genes, so one counts only where\n// its name says it is annotation\nconst BED_ADAPTER_TYPES = new Set(['BedTabixAdapter', 'BedAdapter'])\n\n// Which of the session's tracks to read genes from: the named one while the\n// assembly has it (a saved pick can name a track since removed), else the\n// first gene-bearing track on the assembly whose name says it is annotation,\n// else the first non-BED gene-bearing track. A track whose name says repeats is\n// never picked unnamed, as \"RepeatMasker annotation\" would be.\nexport function pickGeneTrack<T extends TrackChoice>(\n tracks: T[],\n named: string,\n) {\n const chosen = named ? namedTrack(tracks, named) : undefined\n if (chosen) {\n return chosen\n }\n const candidates = tracks.filter(\n t =>\n GENE_ADAPTER_TYPES.has(t.adapterType) &&\n !REPEAT_TRACK_HINT.test(trackLabel(t)),\n )\n return (\n candidates.find(t => GENE_TRACK_HINT.test(trackLabel(t))) ??\n candidates.find(t => !BED_ADAPTER_TYPES.has(t.adapterType))\n )\n}\n\nconst TE_TRACK_HINT = /\\bTEs?\\b|transpos/i\n\n// What a walk row's boxes are, for the key: TEs where the annotation track's\n// name says so, else genes\nexport function annotationNoun(track: TrackChoice | undefined) {\n return track && TE_TRACK_HINT.test(trackLabel(track)) ? 'TE' : 'gene'\n}\n\ninterface LaneView {\n tracks?: readonly {\n configuration: AnyConfigurationModel\n displays: readonly { configuration: AnyConfigurationModel }[]\n }[]\n}\n\n// The `filter` of the gene track's lane in the view the graph is drawn in, so\n// the chips name what the lane draws. None where the view shows no such lane,\n// or has no tracks, as a graph genome view of its own.\nexport function laneFilters(view: object, trackId: string | undefined) {\n const lane = (view as LaneView).tracks?.find(\n t => readConfObject(t.configuration, 'trackId') === trackId,\n )?.displays[0]\n return lane\n ? ((readConfObject(lane.configuration, 'filter') as string[] | undefined) ??\n [])\n : []\n}\n\n// Records spanning a whole sequence, the types the GFF3 adapter declines to\n// widen a fetch for. RefSeq opens every molecule with a `region` named\n// ANONYMOUS.\nconst WHOLE_SEQUENCE_TYPES = new Set([\n 'chromosome',\n 'region',\n 'contig',\n 'supercontig',\n 'scaffold',\n])\n\n// JBrowse's BED parser splits a coding BED12 block into CDS and UTR parts and\n// keeps `exon` for non-coding ones, so all of them are exon\nconst EXON_PARTS = new Set([\n 'exon',\n 'CDS',\n 'five_prime_UTR',\n 'three_prime_UTR',\n 'UTR',\n])\n\nfunction exonsOf(f: FeatureLike, into: { start: number; end: number }[]) {\n const type = ownField(f, 'type')\n if (typeof type === 'string' && EXON_PARTS.has(type)) {\n into.push({\n start: ownField(f, 'start') as number,\n end: ownField(f, 'end') as number,\n })\n }\n const children = ownField(f, 'subfeatures') as FeatureLike[] | undefined\n for (const child of children ?? []) {\n exonsOf(child, into)\n }\n}\n\n// Genes from a track's features: every top-level feature but a whole-sequence\n// record, named by the first of gene_name, name, gene and gene_id it carries,\n// with the exons found anywhere under it merged. A feature with no exons is one exon,\n// its whole span. A BED track gives one feature per transcript, so a name's\n// overlapping features merge, while its copies down the contig stay apart.\n// UCSC's ncbiRefSeq.gff gene records carry their symbol only as gene_id. A\n// feature with none of those names is left out: its raw ID, RefSeq's\n// `id-NC_000913.3:1978503..1979270`, only restates where it is.\nexport function geneModelsFrom(features: FeatureLike[]): GeneModel[] {\n const genes: GeneModel[] = []\n for (const f of features) {\n const name =\n (ownField(f, 'gene_name') as string | undefined) ??\n (ownField(f, 'name') as string | undefined) ??\n (ownField(f, 'gene') as string | undefined) ??\n (ownField(f, 'gene_id') as string | undefined)\n const start = ownField(f, 'start') as number\n const end = ownField(f, 'end') as number\n if (\n !name ||\n !(end > start) ||\n WHOLE_SEQUENCE_TYPES.has(ownField(f, 'type') as string)\n ) {\n continue\n }\n const exons: { start: number; end: number }[] = []\n exonsOf(f, exons)\n genes.push({\n name,\n refName: ownField(f, 'refName') as string,\n start,\n end,\n strand: (ownField(f, 'strand') as number | undefined) ?? 0,\n exons: exons.length ? mergedIntervals(exons) : [{ start, end }],\n })\n }\n return mergeOverlappingByName(genes)\n}\n", "const host = JBrowseExports[\"tss-react/mui\"]\nconst read = name =>\n host != null && name in Object(host)\n ? host[name]\n : Object.assign(\n function () {\n throw new Error(\"This JBrowse does not provide '\" + name + \"' from '\" + \"tss-react/mui\" + \"' to plugins: \" + \"GraphGenomeView was built for a different JBrowse version, so update the plugin or JBrowse\")\n },\n { jbrowseHostMissing: name },\n )\nexport const cx = /* @__PURE__ */ read(\"cx\")\nexport const keyframes = /* @__PURE__ */ read(\"keyframes\")\nexport const makeStyles = /* @__PURE__ */ read(\"makeStyles\")\nexport default host && host.__esModule ? host.default : host"],
|
|
5
|
-
"mappings": "uKAAA,IAAIA,EACG,SAASC,GAAW,CACvB,OAAAD,IAAiDA,EAAS,OAAO,8BAAqB,EACjF,KAAKE,GAAOA,EAAI,QAAQ,CAAC,EACzB,MAAO,GAAM,CACd,MAAAF,EAAS,OACH,CACV,CAAC,GACMA,CACX,CCRA,eAAsBG,EAAWC,EAAS,CAEtC,OADe,MAAMC,EAAS,GAChB,cAAcD,EAAQ,MAAOA,EAAQ,OAAO,CAC9D,CCDA,IAAIE,EAAiB,CACnB,CACE,MAAO,OACP,MAAO,iBACP,YAAa,6FACf,EACA,CACE,MAAO,SACP,MAAO,SACP,YAAa,yNACf,CACF,EACIC,EAAuBD,EAAe,IAAK,GAAM,EAAE,KAAK,EAI5D,IAAIE,EAAe,MAAOC,GAAY,CACpC,IAAMC,EAAQ,YAAY,IAAI,EAE9B,MAAO,CAAE,OADMD,EAAQ,QAAQ,SAAW,SAAWE,EAAaF,CAAO,EAAI,MAAMG,EAAWH,CAAO,EACpF,SAAU,YAAY,IAAI,EAAIC,CAAM,CACvD,ECdA,SAASG,EAAcC,EAAmC,CACxD,OAAO,MAAM,QAAQA,CAAK,GAAKA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K,CACxB,CAAC,EAEH,IAAMI,EAAWD,EAASH,EAAG,aAAa,EAC1C,QAAWK,KAASD,GAAY,CAAC,EAC/BL,EAAQM,EAAOJ,CAAI,CAEvB,CAUO,SAASK,GAAeC,EAAsC,CACnE,IAAMC,EAAqB,CAAC,EAC5B,QAAWR,KAAKO,EAAU,CACxB,IAAME,EACHN,EAASH,EAAG,WAAW,GACvBG,EAASH,EAAG,MAAM,GAClBG,EAASH,EAAG,MAAM,GAClBG,EAASH,EAAG,SAAS,EAClBU,EAAQP,EAASH,EAAG,OAAO,EAC3BW,EAAMR,EAASH,EAAG,KAAK,EAC7B,GACE,CAACS,GACD,EAAEE,EAAMD,IACRb,GAAqB,IAAIM,EAASH,EAAG,MAAM,CAAW,EAEtD,SAEF,IAAMY,EAA0C,CAAC,EACjDb,EAAQC,EAAGY,CAAK,EAChBJ,EAAM,KAAK,CACT,KAAAC,EACA,QAASN,EAASH,EAAG,SAAS,EAC9B,MAAAU,EACA,IAAAC,EACA,OAASR,EAASH,EAAG,QAAQ,GAA4B,EACzD,MAAOY,EAAM,OAASC,EAAgBD,CAAK,EAAI,CAAC,CAAE,MAAAF,EAAO,IAAAC,CAAI,CAAC,CAChE,CAAC,CACH,CACA,OAAOG,EAAuBN,CAAK,CACrC,CC5JA,IAAMO,EAAO,eAAe,eAAe,EACrCC,GAAOC,GACXF,GAAQ,MAAQE,KAAQ,OAAOF,CAAI,EAC/BA,EAAKE,CAAI,EACT,OAAO,OACL,UAAY,CACV,MAAM,IAAI,MAAM,kCAAoCA,EAAO,+HAA8I,CAC3M,EACA,CAAE,mBAAoBA,CAAK,CAC7B,EAGC,IAAMC,GAA6BC,GAAK,YAAY,EACpDC,GAAQC,GAAQA,EAAK,WAAaA,EAAK,QAAUA",
|
|
6
|
-
"names": ["cached", "loadFmmm", "mod", "fmmmLayout", "request", "loadFmmm", "LAYOUT_ENGINES", "LAYOUT_ENGINE_VALUES", "layoutEngine", "request", "start", "stressLayout", "fmmmLayout", "isStringArray", "value", "item", "trackLanes", "track", "lanes", "getConfAssemblyNamesOrNone", "walkIndexed", "adapterConfig", "snapshotNamesFile", "cutsByHaplotype", "configHaplotypes", "defaultHaplotypes", "graphReferenceAssembly", "trackAdapterSnapshot", "toTrackConfigEntry", "offReferenceProblem", "referenceAssembly", "assemblyName", "ownField", "f", "name", "namedTrack", "tracks", "named", "trackLabel", "t", "REPEAT_ADAPTER_TYPES", "REPEAT_TRACK_HINT", "pickRepeatTrack", "tracks", "named", "chosen", "namedTrack", "t", "trackLabel", "PACKED_NAME", "packedName", "f", "name", "ownField", "pair", "i", "field", "top", "MOTIF_FIELDS", "PERIOD_FIELDS", "NAME_FIELDS", "first", "names", "value", "one", "IUPAC", "repeatUnitOf", "period", "motif", "numbers", "n", "strings", "text", "TANDEM_REPEAT", "tandemAlleleBp", "alts", "rn", "rus", "rul", "ruc", "rb", "k", "alt", "bp", "known", "j", "unitLength", "count", "runBp", "genotyped", "gt", "alleleBp", "referenceBp", "phased", "index", "callsOf", "samples", "called", "sample", "fields", "reads", "lengths", "calls", "spanOf", "tandem", "start", "end", "svlen", "repeatArraysFrom", "features", "arrays", "unit", "refName", "stated", "a", "b", "mergedIntervals", "intervals", "out", "iv", "a", "b", "last", "mergeOverlappingByName", "genes", "out", "open", "g", "a", "b", "key", "last", "mergedIntervals", "gene", "GENE_ADAPTER_TYPES", "GENE_TRACK_HINT", "BED_ADAPTER_TYPES", "pickGeneTrack", "tracks", "named", "chosen", "namedTrack", "candidates", "t", "REPEAT_TRACK_HINT", "trackLabel", "TE_TRACK_HINT", "annotationNoun", "track", "laneFilters", "view", "trackId", "lane", "readConfObject", "WHOLE_SEQUENCE_TYPES", "EXON_PARTS", "exonsOf", "f", "into", "type", "ownField", "children", "child", "geneModelsFrom", "features", "genes", "name", "start", "end", "exons", "mergedIntervals", "mergeOverlappingByName", "host", "read", "name", "makeStyles", "read", "mui_default", "host"]
|
|
7
|
-
}
|