view x/static/js/6021.21769087.chunk.js.map @ 125:49f3d3878413 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 5ea1f9c1eef1de76232e69aa6d34cda77d90d566
author fubar
date Sat, 05 Oct 2024 23:58:05 +0000
parents
children
line wrap: on
line source

{"version":3,"file":"static/js/6021.21769087.chunk.js","mappings":"8aAQA,MAAMA,EAAMC,GAAcA,EAAEC,eAAe,SAMrCC,EAAkBC,EAAAA,YACtB,UAA0B,MAAEC,EAAK,QAAEC,GAAWC,GAC5C,MAAMC,EAAQF,EAAQG,IAAI,SACpBC,EAAMJ,EAAQG,IAAI,OAClBE,EAAUL,EAAQG,IAAI,WACtBG,EAAQJ,IAAUE,EAAMV,EAAGQ,GAAS,GAAGR,EAAGQ,OAAWR,EAAGU,KACxDG,EAAUP,EAAQG,IAAI,WAGtBK,EAASR,EAAQG,IAAI,UACrBM,EAAUT,EAAQG,IAAI,WACtBO,EAAMC,OAAOC,YAAYb,EAAMQ,QAAQM,KAAIC,GAAO,CAACA,EAAIC,KAAMD,MAEnE,OACEhB,EAAAA,cAAA,OAAKG,IAAKA,GACP,CAACI,EAASC,GAAOU,QAAOC,KAAOA,IAAGC,KAAK,KACxCpB,EAAAA,cAAA,WACCS,EACCT,EAAAA,cAAA,aACEA,EAAAA,cAAA,aACEA,EAAAA,cAAA,UACEA,EAAAA,cAAA,UAAI,SACJA,EAAAA,cAAA,UAAI,UACJA,EAAAA,cAAA,UAAI,WAGRA,EAAAA,cAAA,aACGa,OAAOQ,QAAQZ,GAASM,KAAI,EAAEL,EAAQY,KACrCtB,EAAAA,cAAA,MAAIuB,IAAKb,GACPV,EAAAA,cAAA,MAAIwB,MAAO,CAAEC,WAAYb,EAAIF,GAASgB,QAAS,KAC/C1B,EAAAA,cAAA,UAAKU,GACLV,EAAAA,cAAA,WAAK2B,EAAAA,EAAAA,KAAIL,EAAKM,aAMtB5B,EAAAA,cAAA,YACGU,EAAQ,IACRC,EACG,QAAOgB,EAAAA,EAAAA,KAAIzB,EAAQG,IAAI,qBAAoBsB,EAAAA,EAAAA,KACzCzB,EAAQG,IAAI,kBACLsB,EAAAA,EAAAA,KAAIzB,EAAQG,IAAI,gBACzBsB,EAAAA,EAAAA,KAAIzB,EAAQG,IAAI,WAK9B,IAiBF,GAZsBwB,EAAAA,EAAAA,WACnBC,GAQQ9B,EAAAA,cAAC+B,EAAAA,EAAOC,EAAA,CAACC,YAAU,EAAClC,gBAAiBA,GAAqB+B,K","sources":["../../../plugins/wiggle/src/MultiLinearWiggleDisplay/components/Tooltip.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react'\nimport { Feature } from '@jbrowse/core/util'\n\n// locals\nimport { Source, toP } from '../../util'\nimport Tooltip, { TooltipContentsComponent } from '../../Tooltip'\n\nconst en = (n: number) => n.toLocaleString('en-US')\n\ninterface Props {\n  model: { sources: Source[] }\n  feature: Feature\n}\nconst TooltipContents = React.forwardRef<HTMLDivElement, Props>(\n  function TooltipContents2({ model, feature }, ref) {\n    const start = feature.get('start')\n    const end = feature.get('end')\n    const refName = feature.get('refName')\n    const coord = start === end ? en(start) : `${en(start)}..${en(end)}`\n    const sources = feature.get('sources') as\n      | Record<string, { score: number }>\n      | undefined\n    const source = feature.get('source')\n    const summary = feature.get('summary')\n    const obj = Object.fromEntries(model.sources.map(ent => [ent.name, ent]))\n\n    return (\n      <div ref={ref}>\n        {[refName, coord].filter(f => !!f).join(':')}\n        <br />\n        {sources ? (\n          <table>\n            <thead>\n              <tr>\n                <th>color</th>\n                <th>source</th>\n                <th>score</th>\n              </tr>\n            </thead>\n            <tbody>\n              {Object.entries(sources).map(([source, data]) => (\n                <tr key={source}>\n                  <td style={{ background: obj[source]!.color }}> </td>\n                  <td>{source}</td>\n                  <td>{toP(data.score)}</td>\n                </tr>\n              ))}\n            </tbody>\n          </table>\n        ) : (\n          <span>\n            {source}{' '}\n            {summary\n              ? `min:${toP(feature.get('minScore'))} avg:${toP(\n                  feature.get('score'),\n                )} max:${toP(feature.get('maxScore'))}`\n              : toP(feature.get('score'))}\n          </span>\n        )}\n      </div>\n    )\n  },\n)\n\ntype Coord = [number, number]\n\nconst WiggleTooltip = observer(\n  (props: {\n    model: { featureUnderMouse: Feature; sources: Source[]; rowHeight: number }\n    height: number\n    offsetMouseCoord: Coord\n    clientMouseCoord: Coord\n    clientRect?: DOMRect\n    TooltipContents?: TooltipContentsComponent\n  }) => {\n    return <Tooltip useClientY TooltipContents={TooltipContents} {...props} />\n  },\n)\nexport default WiggleTooltip\n\nexport { default as Tooltip } from '../../Tooltip'\n"],"names":["en","n","toLocaleString","TooltipContents","React","model","feature","ref","start","get","end","refName","coord","sources","source","summary","obj","Object","fromEntries","map","ent","name","filter","f","join","entries","data","key","style","background","color","toP","score","observer","props","Tooltip","_extends","useClientY"],"sourceRoot":""}