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AGzC,EAAGlF,GAAQ4H,YAE3B9H,EAAAA,cAAC+F,EAAa,CAAC9F,MAAOmF,EAAGlF,OAAQA,IACjCF,EAAAA,cAACgE,EAAAA,GAAe,CAACpE,MAAOA,IACxBI,EAAAA,cAAA,KAAGuC,UAAY,aAAYlC,QACzBL,EAAAA,cAACsE,EAAAA,EAAO,CAAC1E,MAAOA,IAChBI,EAAAA,cAAA,YACEA,EAAAA,cAAA,YAAU+H,GAAG,cACX/H,EAAAA,cAAA,QAAMmC,EAAG,EAAGO,EAAG,EAAGzC,MAAOJ,EAAWK,OAAQ6D,MAGhD/D,EAAAA,cAAA,KAAGgI,SAAS,oBACTlB,EAAexF,KAAI,EAAG+F,UAAUY,IAC/BjI,EAAAA,cAAA,KAAGkC,IAAK+F,GAAIZ,OAIlBrH,EAAAA,cAAA,KAAGuC,UAAY,aAAYlC,KAAW0D,MACpC/D,EAAAA,cAACI,EAAAA,GAAiB,CAACR,MAAOA,QAKlC4G,EAEJ,C","sources":["../../../plugins/dotplot-view/src/DotplotView/components/Axes.tsx","../../../plugins/dotplot-view/src/DotplotView/components/Grid.tsx","../../../plugins/dotplot-view/src/DotplotView/svgcomponents/SVGBackground.tsx","../../../plugins/dotplot-view/src/DotplotView/svgcomponents/SVGDotplotView.tsx"],"sourcesContent":["import React from 'react'\nimport { makeStyles } from 'tss-react/mui'\nimport { observer } from 'mobx-react'\nimport { getSnapshot } from 'mobx-state-tree'\nimport { getTickDisplayStr } from '@jbrowse/core/util'\nimport { bpToPx } from '@jbrowse/core/util/Base1DUtils'\nimport { useTheme } from '@mui/material'\n\n// locals\nimport { getBlockLabelKeysToHide } from './util'\nimport { DotplotViewModel } from '../model'\n\nconst useStyles = makeStyles()(() => ({\n vtext: {\n gridColumn: '1/2',\n gridRow: '1/2',\n pointerEvents: 'none',\n userSelect: 'none',\n },\n htext: {\n gridColumn: '2/2',\n gridRow: '2/2',\n pointerEvents: 'none',\n userSelect: 'none',\n },\n}))\nexport const HorizontalAxis = observer(function ({\n model,\n}: {\n model: DotplotViewModel\n}) {\n const { viewWidth, borderY } = model\n const { classes } = useStyles()\n return (\n \n )\n})\n\nexport const HorizontalAxisRaw = observer(function ({\n model,\n}: {\n model: DotplotViewModel\n}) {\n const { viewWidth, borderX, borderY, hview, htextRotation, hticks } = model\n const { offsetPx, width, dynamicBlocks, bpPerPx } = hview\n const dblocks = dynamicBlocks.contentBlocks\n const hide = getBlockLabelKeysToHide(dblocks, viewWidth, offsetPx)\n const theme = useTheme()\n const hviewSnap = {\n ...getSnapshot(hview),\n width,\n staticBlocks: hview.staticBlocks,\n }\n\n const ticks = hticks\n .map(\n tick =>\n [\n tick,\n bpToPx({\n refName: tick.refName,\n coord: tick.base,\n self: hviewSnap,\n })?.offsetPx,\n ] as const,\n )\n .filter(f => f[1] !== undefined)\n .map(f => [f[0], f[1]! - offsetPx] as const)\n\n return (\n <>\n {dblocks\n .filter(region => !hide.has(region.key))\n .map(region => {\n const x = region.offsetPx\n const y = 0\n const xoff = Math.floor(x - hview.offsetPx)\n\n return (\n \n {region.refName}\n \n )\n })}\n {ticks.map(([tick, x]) =>\n x > 0 && x < width ? (\n \n ) : null,\n )}\n {ticks\n .filter(t => t[0].type === 'major')\n .map(([tick, x]) =>\n x > 10 && x < width ? (\n \n {getTickDisplayStr(tick.base + 1, bpPerPx)}\n \n ) : null,\n )}\n \n {hview.assemblyNames.join(',')}\n \n \n )\n})\nexport const VerticalAxis = observer(function ({\n model,\n}: {\n model: DotplotViewModel\n}) {\n const { borderX, viewHeight } = model\n const { classes } = useStyles()\n return (\n \n )\n})\n\nexport const VerticalAxisRaw = observer(function ({\n model,\n}: {\n model: DotplotViewModel\n}) {\n const { viewHeight, borderX, borderY, vview, vtextRotation, vticks } = model\n const { offsetPx, width, dynamicBlocks, bpPerPx } = vview\n const dblocks = dynamicBlocks.contentBlocks\n const hide = getBlockLabelKeysToHide(dblocks, viewHeight, offsetPx)\n const theme = useTheme()\n const vviewSnap = {\n ...getSnapshot(vview),\n width,\n staticBlocks: vview.staticBlocks,\n }\n const ticks = vticks\n .map(\n tick =>\n [\n tick,\n bpToPx({\n refName: tick.refName,\n coord: tick.base,\n self: vviewSnap,\n })?.offsetPx,\n ] as const,\n )\n .filter(f => f[1] !== undefined)\n .map(f => [f[0], f[1]! - offsetPx] as const)\n\n return (\n <>\n {dblocks\n .filter(region => !hide.has(region.key))\n .map(region => {\n const y = region.offsetPx\n const x = borderX\n const yoff = Math.floor(viewHeight - y + offsetPx)\n\n return (\n \n {region.refName}\n \n )\n })}\n {ticks.map(([tick, y]) =>\n y > 0 ? (\n \n ) : null,\n )}\n {ticks\n .filter(t => t[0].type === 'major')\n .map(([tick, y]) =>\n y > 10 && y < viewHeight ? (\n \n {getTickDisplayStr(tick.base + 1, bpPerPx)}\n \n ) : null,\n )}\n \n {vview.assemblyNames.join(',')}\n \n \n )\n})\n","import React from 'react'\nimport { observer } from 'mobx-react'\nimport { useTheme } from '@mui/material'\n\n// locals\nimport { DotplotViewModel } from '../model'\n\nexport const GridRaw = observer(function ({\n model,\n children,\n}: {\n model: DotplotViewModel\n children?: React.ReactNode\n}) {\n const { viewWidth, viewHeight, hview, vview } = model\n const hblocks = hview.dynamicBlocks.contentBlocks\n const vblocks = vview.dynamicBlocks.contentBlocks\n if (!hblocks.length || !vblocks.length) {\n return null\n }\n const htop = hview.displayedRegionsTotalPx - hview.offsetPx\n const vtop = vview.displayedRegionsTotalPx - vview.offsetPx\n const hbottom = hblocks[0].offsetPx - hview.offsetPx\n const vbottom = vblocks[0].offsetPx - vview.offsetPx\n const theme = useTheme()\n const stroke = theme.palette.divider\n\n // Uses math.max/min avoid making very large SVG rect offscreen element,\n // which can sometimes fail to draw\n const rx = Math.max(hbottom, 0)\n const ry = Math.max(viewHeight - vtop, 0)\n const w = Math.min(htop - hbottom, viewWidth)\n const h = Math.min(viewHeight - vbottom - ry, viewHeight)\n\n let lastx = Infinity\n let lasty = Infinity\n return (\n <>\n \n \n {hblocks.map(region => {\n const x = region.offsetPx - hview.offsetPx\n const render = Math.floor(x) !== Math.floor(lastx)\n if (render) {\n lastx = x\n }\n return render ? (\n \n ) : null\n })}\n {vblocks.map(region => {\n const y = viewHeight - (region.offsetPx - vview.offsetPx)\n const render = Math.floor(y) !== Math.floor(lasty)\n if (render) {\n lasty = y\n }\n return render ? (\n \n ) : null\n })}\n \n \n \n {children}\n \n )\n})\n\nexport default function Grid({\n model,\n children,\n}: {\n model: DotplotViewModel\n children?: React.ReactNode\n}) {\n const { viewWidth, viewHeight } = model\n return (\n