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9/C,IACxCkuC,EAAOp+B,KAAK8oC,EAAUqH,WAAWjgD,IAGnC,OAAQ+/C,EAAOhI,QAAQmI,eACrB,IAAK,QACL,IAAK,WACHH,EAAOI,OACP,MAEF,QACEJ,EAAS,KAKb,OADAnH,EAAU0B,kBACH,WACc,UAAnB1B,EAAUl1C,MACVk1C,EAAU0B,kBAEL1B,EAAUkH,YACb5R,EAAOrsC,SAAQ,SAASusC,GACtBwK,EAAUmB,SAAS3L,MAIvB2R,GACAA,EAAOK","sources":["webpack://grafana/./.yarn/__virtual__/@emotion-css-virtual-15ef12e38d/3/opt/drone/yarncache/@emotion-css-npm-11.7.1-25ff8755a7-ac1f56656f.zip/node_modules/@emotion/css/create-instance/dist/emotion-css-create-instance.esm.js","webpack://grafana/./.yarn/__virtual__/@emotion-css-virtual-15ef12e38d/3/opt/drone/yarncache/@emotion-css-npm-11.7.1-25ff8755a7-ac1f56656f.zip/node_modules/@emotion/css/dist/emotion-css.esm.js","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/TimelineHeaderRow/TimelineCollapser.tsx","webpack://grafana/./packages/jaeger-ui-components/src/utils/DraggableManager/EUpdateTypes.tsx","webpack://grafana/./packages/jaeger-ui-components/src/utils/DraggableManager/DraggableManager.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/TimelineHeaderRow/TimelineColumnResizer.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/TimelineHeaderRow/TimelineViewingLayer.tsx","webpack://grafana/./packages/jaeger-ui-components/src/utils/date.tsx","webpack://grafana/./packages/jaeger-ui-components/src/utils/number.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/utils.tsx","webpack://grafana/./packages/jaeger-ui-components/src/Theme.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/Ticks.tsx","webpack://grafana/./packages/jaeger-ui-components/src/uberUtilityStyles.ts","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/TimelineRow.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/TimelineHeaderRow/TimelineHeaderRow.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/ListView/Positions.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/ListView/index.tsx","webpack://grafana/./packages/jaeger-ui-components/src/common/NewWindowIcon.tsx","webpack://grafana/./packages/jaeger-ui-components/src/uiElementsContext.tsx","webpack://grafana/./packages/jaeger-ui-components/src/url/externalLinkContext.tsx","webpack://grafana/./packages/jaeger-ui-components/src/url/ReferenceLink.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/ReferencesButton.tsx","webpack://grafana/./packages/jaeger-ui-components/src/utils/span-ancestor-ids.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/SpanTreeOffset.tsx","webpack://grafana/./.yarn/__virtual__/recompose-virtual-99cd162ab8/3/opt/drone/yarncache/recompose-npm-0.30.0-55700f15a5-18e5825233.zip/node_modules/recompose/dist/Recompose.esm.js","webpack://grafana/./packages/jaeger-ui-components/src/common/CopyIcon.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/KeyValuesTable.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianKeyValues.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianKeyValues.markers.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianLogs.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBar.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBarRow.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/TextList.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianText.tsx","webpack://grafana/./packages/jaeger-ui-components/src/common/LabeledList.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianReferences.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/index.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetailRow.tsx","webpack://grafana/./packages/jaeger-ui-components/src/utils/color-generator.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/VirtualizedTraceView.tsx","webpack://grafana/./packages/jaeger-ui-components/src/constants/tag-keys.tsx","webpack://grafana/./packages/jaeger-ui-components/src/keyboard-mappings.tsx","webpack://grafana/./packages/jaeger-ui-components/src/keyboard-shortcuts.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/index.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TracePageHeader/SpanGraph/CanvasSpanGraph.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TracePageHeader/SpanGraph/render-into-canvas.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TracePageHeader/SpanGraph/TickLabels.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TracePageHeader/SpanGraph/GraphTicks.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TracePageHeader/SpanGraph/Scrubber.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TracePageHeader/SpanGraph/ViewingLayer.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TracePageHeader/SpanGraph/index.tsx","webpack://grafana/./packages/jaeger-ui-components/src/common/UiFindInput.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TracePageHeader/TracePageSearchBar.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TracePageHeader/TracePageSearchBar.markers.tsx","webpack://grafana/./packages/jaeger-ui-components/src/common/BreakableText.tsx","webpack://grafana/./packages/jaeger-ui-components/src/common/LoadingIndicator.tsx","webpack://grafana/./packages/jaeger-ui-components/src/constants/index.tsx","webpack://grafana/./packages/jaeger-ui-components/src/common/TraceName.tsx","webpack://grafana/./packages/jaeger-ui-components/src/model/trace-viewer.ts","webpack://grafana/../../opt/drone/yarncache/lru-memoize-npm-1.1.0-281b40912f-cc0c8f8427.zip/node_modules/lru-memoize/dist/lru-memoize.es.js","webpack://grafana/./packages/jaeger-ui-components/src/constants/default-config.tsx","webpack://grafana/./packages/jaeger-ui-components/src/utils/config/get-config.tsx","webpack://grafana/./packages/jaeger-ui-components/src/model/span.tsx","webpack://grafana/./packages/jaeger-ui-components/src/model/link-patterns.tsx","webpack://grafana/./packages/jaeger-ui-components/src/common/ExternalLinks.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TracePageHeader/TracePageHeader.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/DetailState.tsx","webpack://grafana/./packages/jaeger-ui-components/src/selectors/process.js","webpack://grafana/./packages/jaeger-ui-components/src/selectors/span.js","webpack://grafana/./packages/jaeger-ui-components/src/utils/TreeNode.js","webpack://grafana/./packages/jaeger-ui-components/src/selectors/trace.js","webpack://grafana/./packages/jaeger-ui-components/src/utils/sort.js","webpack://grafana/./packages/jaeger-ui-components/src/model/transform-trace-data.tsx","webpack://grafana/./packages/jaeger-ui-components/src/utils/filter-spans.tsx","webpack://grafana/./public/app/core/utils/tracing.ts","webpack://grafana/./public/app/plugins/datasource/jaeger/responseTransform.ts","webpack://grafana/./.yarn/__virtual__/react-icon-base-virtual-e209b164a7/3/opt/drone/yarncache/react-icon-base-npm-2.1.0-caadf8254e-62b6bfe486.zip/node_modules/react-icon-base/lib/index.js","webpack://grafana/./.yarn/__virtual__/react-icons-virtual-f314220a93/3/opt/drone/yarncache/react-icons-npm-2.2.7-c2e0e4d90b-74e692fdd3.zip/node_modules/react-icons/lib/io/alert.js","webpack://grafana/./.yarn/__virtual__/react-icons-virtual-f314220a93/3/opt/drone/yarncache/react-icons-npm-2.2.7-c2e0e4d90b-74e692fdd3.zip/node_modules/react-icons/lib/io/android-locate.js","webpack://grafana/./.yarn/__virtual__/react-icons-virtual-f314220a93/3/opt/drone/yarncache/react-icons-npm-2.2.7-c2e0e4d90b-74e692fdd3.zip/node_modules/react-icons/lib/io/android-open.js","webpack://grafana/./.yarn/__virtual__/react-icons-virtual-f314220a93/3/opt/drone/yarncache/react-icons-npm-2.2.7-c2e0e4d90b-74e692fdd3.zip/node_modules/react-icons/lib/io/arrow-right-a.js","webpack://grafana/./.yarn/__virtual__/react-icons-virtual-f314220a93/3/opt/drone/yarncache/react-icons-npm-2.2.7-c2e0e4d90b-74e692fdd3.zip/node_modules/react-icons/lib/io/chevron-right.js","webpack://grafana/./.yarn/__virtual__/react-icons-virtual-f314220a93/3/opt/drone/yarncache/react-icons-npm-2.2.7-c2e0e4d90b-74e692fdd3.zip/node_modules/react-icons/lib/io/ios-arrow-down.js","webpack://grafana/./.yarn/__virtual__/react-icons-virtual-f314220a93/3/opt/drone/yarncache/react-icons-npm-2.2.7-c2e0e4d90b-74e692fdd3.zip/node_modules/react-icons/lib/io/ios-arrow-right.js","webpack://grafana/./.yarn/__virtual__/react-icons-virtual-f314220a93/3/opt/drone/yarncache/react-icons-npm-2.2.7-c2e0e4d90b-74e692fdd3.zip/node_modules/react-icons/lib/io/link.js","webpack://grafana/./.yarn/__virtual__/react-icons-virtual-f314220a93/3/opt/drone/yarncache/react-icons-npm-2.2.7-c2e0e4d90b-74e692fdd3.zip/node_modules/react-icons/lib/io/network.js","webpack://grafana/./.yarn/__virtual__/react-icons-virtual-f314220a93/3/opt/drone/yarncache/react-icons-npm-2.2.7-c2e0e4d90b-74e692fdd3.zip/node_modules/react-icons/lib/md/file-upload.js","webpack://grafana/./.yarn/__virtual__/react-icons-virtual-f314220a93/3/opt/drone/yarncache/react-icons-npm-2.2.7-c2e0e4d90b-74e692fdd3.zip/node_modules/react-icons/lib/md/keyboard-arrow-right.js","webpack://grafana/../../opt/drone/yarncache/change-emitter-npm-0.1.6-9daba4f281-0ed494ba99.zip/node_modules/change-emitter/lib/index.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/index.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/addEvents.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/bind.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/bindMultiple.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/bindSequence.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/bindSingle.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/detach.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/dom-event.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/fireCallback.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/getKeyInfo.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/getMatches.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/getReverseMap.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/handleKey.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/handleKeyEvent.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/modifiersMatch.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/pickBestAction.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/reset.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/resetSequenceTimer.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/resetSequences.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/stopCallback.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/trigger.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/prototype/unbind.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/Combokeys/reset.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/helpers/characterFromEvent.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/helpers/eventModifiers.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/helpers/isModifier.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/helpers/keysFromString.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/helpers/preventDefault.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/helpers/shift-map.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/helpers/special-aliases.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/helpers/special-characters-map.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/helpers/special-keys-map.js","webpack://grafana/../../opt/drone/yarncache/combokeys-npm-3.0.1-45601d2e33-37ad8d0257.zip/node_modules/combokeys/helpers/stopPropagation.js","webpack://grafana/../../opt/drone/yarncache/copy-to-clipboard-npm-3.3.1-18029bce99-3c7b1c333d.zip/node_modules/copy-to-clipboard/index.js","webpack://grafana/../../opt/drone/yarncache/deep-freeze-npm-0.0.1-12d684fc1a-1e43c98e44.zip/node_modules/deep-freeze/index.js","webpack://grafana/../../opt/drone/yarncache/fbjs-npm-0.8.18-79fe681dcf-668731b946.zip/node_modules/fbjs/lib/shallowEqual.js","webpack://grafana/../../opt/drone/yarncache/fuzzy-npm-0.1.3-a0dfe08bd0-acc09c6173.zip/node_modules/fuzzy/lib/fuzzy.js","webpack://grafana/../../opt/drone/yarncache/hoist-non-react-statics-npm-2.5.5-e15c7ba611-ee2d05e5c7.zip/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","webpack://grafana/../../opt/drone/yarncache/json-markup-npm-1.1.3-2762e9da70-aa4e1935fc.zip/node_modules/json-markup/index.js","webpack://grafana/../../opt/drone/yarncache/prop-types-npm-15.8.1-17c71ee7ee-c056d3f1c0.zip/node_modules/prop-types/factoryWithThrowingShims.js","webpack://grafana/../../opt/drone/yarncache/prop-types-npm-15.8.1-17c71ee7ee-c056d3f1c0.zip/node_modules/prop-types/index.js","webpack://grafana/../../opt/drone/yarncache/prop-types-npm-15.8.1-17c71ee7ee-c056d3f1c0.zip/node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack://grafana/../../opt/drone/yarncache/symbol-observable-npm-1.2.0-9e812a0a39-48ffbc22e3.zip/node_modules/symbol-observable/es/index.js","webpack://grafana/../../opt/drone/yarncache/symbol-observable-npm-1.2.0-9e812a0a39-48ffbc22e3.zip/node_modules/symbol-observable/es/ponyfill.js","webpack://grafana/../../opt/drone/yarncache/toggle-selection-npm-1.0.6-c506b73005-a90dc80ed1.zip/node_modules/toggle-selection/index.js"],"sourcesContent":["import createCache from '@emotion/cache';\nimport { serializeStyles } from '@emotion/serialize';\nimport { getRegisteredStyles, insertStyles } from '@emotion/utils';\n\nfunction insertWithoutScoping(cache, serialized) {\n if (cache.inserted[serialized.name] === undefined) {\n return cache.insert('', serialized, cache.sheet, true);\n }\n}\n\nfunction merge(registered, css, className) {\n var registeredStyles = [];\n var rawClassName = getRegisteredStyles(registered, registeredStyles, className);\n\n if (registeredStyles.length < 2) {\n return className;\n }\n\n return rawClassName + css(registeredStyles);\n}\n\nvar createEmotion = function createEmotion(options) {\n var cache = createCache(options); // $FlowFixMe\n\n cache.sheet.speedy = function (value) {\n if (process.env.NODE_ENV !== 'production' && this.ctr !== 0) {\n throw new Error('speedy must be changed before any rules are inserted');\n }\n\n this.isSpeedy = value;\n };\n\n cache.compat = true;\n\n var css = function css() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var serialized = serializeStyles(args, cache.registered, undefined);\n insertStyles(cache, serialized, false);\n return cache.key + \"-\" + serialized.name;\n };\n\n var keyframes = function keyframes() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n var serialized = serializeStyles(args, cache.registered);\n var animation = \"animation-\" + serialized.name;\n insertWithoutScoping(cache, {\n name: serialized.name,\n styles: \"@keyframes \" + animation + \"{\" + serialized.styles + \"}\"\n });\n return animation;\n };\n\n var injectGlobal = function injectGlobal() {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n var serialized = serializeStyles(args, cache.registered);\n insertWithoutScoping(cache, serialized);\n };\n\n var cx = function cx() {\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n\n return merge(cache.registered, css, classnames(args));\n };\n\n return {\n css: css,\n cx: cx,\n injectGlobal: injectGlobal,\n keyframes: keyframes,\n hydrate: function hydrate(ids) {\n ids.forEach(function (key) {\n cache.inserted[key] = true;\n });\n },\n flush: function flush() {\n cache.registered = {};\n cache.inserted = {};\n cache.sheet.flush();\n },\n // $FlowFixMe\n sheet: cache.sheet,\n cache: cache,\n getRegisteredStyles: getRegisteredStyles.bind(null, cache.registered),\n merge: merge.bind(null, cache.registered, css)\n };\n};\n\nvar classnames = function classnames(args) {\n var cls = '';\n\n for (var i = 0; i < args.length; i++) {\n var arg = args[i];\n if (arg == null) continue;\n var toAdd = void 0;\n\n switch (typeof arg) {\n case 'boolean':\n break;\n\n case 'object':\n {\n if (Array.isArray(arg)) {\n toAdd = classnames(arg);\n } else {\n toAdd = '';\n\n for (var k in arg) {\n if (arg[k] && k) {\n toAdd && (toAdd += ' ');\n toAdd += k;\n }\n }\n }\n\n break;\n }\n\n default:\n {\n toAdd = arg;\n }\n }\n\n if (toAdd) {\n cls && (cls += ' ');\n cls += toAdd;\n }\n }\n\n return cls;\n};\n\nexport default createEmotion;\n","import '@emotion/cache';\nimport '@emotion/serialize';\nimport '@emotion/utils';\nimport createEmotion from '../create-instance/dist/emotion-css-create-instance.esm.js';\n\nvar _createEmotion = createEmotion({\n key: 'css'\n}),\n flush = _createEmotion.flush,\n hydrate = _createEmotion.hydrate,\n cx = _createEmotion.cx,\n merge = _createEmotion.merge,\n getRegisteredStyles = _createEmotion.getRegisteredStyles,\n injectGlobal = _createEmotion.injectGlobal,\n keyframes = _createEmotion.keyframes,\n css = _createEmotion.css,\n sheet = _createEmotion.sheet,\n cache = _createEmotion.cache;\n\nexport { cache, css, cx, flush, getRegisteredStyles, hydrate, injectGlobal, keyframes, merge, sheet };\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { IconButton, useStyles2 } from '@grafana/ui';\nimport { css } from '@emotion/css';\nimport React from 'react';\n\nconst getStyles = () => {\n return {\n TimelineCollapser: css`\n align-items: center;\n display: flex;\n flex: none;\n justify-content: center;\n margin-right: 0.5rem;\n `,\n };\n};\n\ntype CollapserProps = {\n onCollapseAll: () => void;\n onCollapseOne: () => void;\n onExpandOne: () => void;\n onExpandAll: () => void;\n};\n\nexport function TimelineCollapser(props: CollapserProps) {\n const { onExpandAll, onExpandOne, onCollapseAll, onCollapseOne } = props;\n const styles = useStyles2(getStyles);\n return (\n
\n \n \n \n \n
\n );\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// // export default {\n// const updateTypes = {\n// DRAG_END: 'DRAG_END',\n// DRAG_MOVE: 'DRAG_MOVE',\n// DRAG_START: 'DRAG_START',\n// MOUSE_ENTER: 'MOUSE_ENTER',\n// MOUSE_LEAVE: 'MOUSE_LEAVE',\n// MOUSE_MOVE: 'MOUSE_MOVE',\n// };\n\n// const typeUpdateTypes = updateTypes as { [K in keyof typeof updateTypes]: K };\n\nenum EUpdateTypes {\n DragEnd = 'DragEnd',\n DragMove = 'DragMove',\n DragStart = 'DragStart',\n MouseEnter = 'MouseEnter',\n MouseLeave = 'MouseLeave',\n MouseMove = 'MouseMove',\n}\n\nexport default EUpdateTypes;\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { get as _get } from 'lodash';\n\nimport EUpdateTypes from './EUpdateTypes';\nimport { DraggableBounds, DraggingUpdate } from './types';\nimport { TNil } from '../../types';\n\nconst LEFT_MOUSE_BUTTON = 0;\n\ntype DraggableManagerOptions = {\n getBounds: (tag: string | TNil) => DraggableBounds;\n onMouseEnter?: (update: DraggingUpdate) => void;\n onMouseLeave?: (update: DraggingUpdate) => void;\n onMouseMove?: (update: DraggingUpdate) => void;\n onDragStart?: (update: DraggingUpdate) => void;\n onDragMove?: (update: DraggingUpdate) => void;\n onDragEnd?: (update: DraggingUpdate) => void;\n resetBoundsOnResize?: boolean;\n tag?: string;\n};\n\nexport default class DraggableManager {\n // cache the last known DraggableBounds (invalidate via `#resetBounds())\n _bounds: DraggableBounds | TNil;\n _isDragging: boolean;\n // optional callbacks for various dragging events\n _onMouseEnter: ((update: DraggingUpdate) => void) | TNil;\n _onMouseLeave: ((update: DraggingUpdate) => void) | TNil;\n _onMouseMove: ((update: DraggingUpdate) => void) | TNil;\n _onDragStart: ((update: DraggingUpdate) => void) | TNil;\n _onDragMove: ((update: DraggingUpdate) => void) | TNil;\n _onDragEnd: ((update: DraggingUpdate) => void) | TNil;\n // whether to reset the bounds on window resize\n _resetBoundsOnResize: boolean;\n\n /**\n * Get the `DraggableBounds` for the current drag. The returned value is\n * cached until either `#resetBounds()` is called or the window is resized\n * (assuming `_resetBoundsOnResize` is `true`). The `DraggableBounds` defines\n * the range the current drag can span to. It also establishes the left offset\n * to adjust `clientX` by (from the `MouseEvent`s).\n */\n getBounds: (tag: string | TNil) => DraggableBounds;\n\n // convenience data\n tag: string | TNil;\n\n // handlers for integration with DOM elements\n handleMouseEnter: (event: React.MouseEvent) => void;\n handleMouseMove: (event: React.MouseEvent) => void;\n handleMouseLeave: (event: React.MouseEvent) => void;\n handleMouseDown: (event: React.MouseEvent) => void;\n\n constructor({ getBounds, tag, resetBoundsOnResize = true, ...rest }: DraggableManagerOptions) {\n this.handleMouseDown = this._handleDragEvent;\n this.handleMouseEnter = this._handleMinorMouseEvent;\n this.handleMouseMove = this._handleMinorMouseEvent;\n this.handleMouseLeave = this._handleMinorMouseEvent;\n\n this.getBounds = getBounds;\n this.tag = tag;\n this._isDragging = false;\n this._bounds = undefined;\n this._resetBoundsOnResize = Boolean(resetBoundsOnResize);\n if (this._resetBoundsOnResize) {\n window.addEventListener('resize', this.resetBounds);\n }\n this._onMouseEnter = rest.onMouseEnter;\n this._onMouseLeave = rest.onMouseLeave;\n this._onMouseMove = rest.onMouseMove;\n this._onDragStart = rest.onDragStart;\n this._onDragMove = rest.onDragMove;\n this._onDragEnd = rest.onDragEnd;\n }\n\n _getBounds(): DraggableBounds {\n if (!this._bounds) {\n this._bounds = this.getBounds(this.tag);\n }\n return this._bounds;\n }\n\n _getPosition(clientX: number) {\n const { clientXLeft, maxValue, minValue, width } = this._getBounds();\n let x = clientX - clientXLeft;\n let value = x / width;\n if (minValue != null && value < minValue) {\n value = minValue;\n x = minValue * width;\n } else if (maxValue != null && value > maxValue) {\n value = maxValue;\n x = maxValue * width;\n }\n return { value, x };\n }\n\n _stopDragging() {\n window.removeEventListener('mousemove', this._handleDragEvent);\n window.removeEventListener('mouseup', this._handleDragEvent);\n const style = _get(document, 'body.style');\n if (style) {\n style.userSelect = null;\n }\n this._isDragging = false;\n }\n\n isDragging() {\n return this._isDragging;\n }\n\n dispose() {\n if (this._isDragging) {\n this._stopDragging();\n }\n if (this._resetBoundsOnResize) {\n window.removeEventListener('resize', this.resetBounds);\n }\n this._bounds = undefined;\n this._onMouseEnter = undefined;\n this._onMouseLeave = undefined;\n this._onMouseMove = undefined;\n this._onDragStart = undefined;\n this._onDragMove = undefined;\n this._onDragEnd = undefined;\n }\n\n resetBounds = () => {\n this._bounds = undefined;\n };\n\n _handleMinorMouseEvent = (event: React.MouseEvent) => {\n const { button, clientX, type: eventType } = event;\n if (this._isDragging || button !== LEFT_MOUSE_BUTTON) {\n return;\n }\n let type: EUpdateTypes | null = null;\n let handler: ((update: DraggingUpdate) => void) | TNil;\n if (eventType === 'mouseenter') {\n type = EUpdateTypes.MouseEnter;\n handler = this._onMouseEnter;\n } else if (eventType === 'mouseleave') {\n type = EUpdateTypes.MouseLeave;\n handler = this._onMouseLeave;\n } else if (eventType === 'mousemove') {\n type = EUpdateTypes.MouseMove;\n handler = this._onMouseMove;\n } else {\n throw new Error(`invalid event type: ${eventType}`);\n }\n if (!handler) {\n return;\n }\n const { value, x } = this._getPosition(clientX);\n handler({\n event,\n type,\n value,\n x,\n manager: this,\n tag: this.tag,\n });\n };\n\n _handleDragEvent = (event: MouseEvent | React.MouseEvent) => {\n const { button, clientX, type: eventType } = event;\n let type: EUpdateTypes | null = null;\n let handler: ((update: DraggingUpdate) => void) | TNil;\n if (eventType === 'mousedown') {\n if (this._isDragging || button !== LEFT_MOUSE_BUTTON) {\n return;\n }\n window.addEventListener('mousemove', this._handleDragEvent);\n window.addEventListener('mouseup', this._handleDragEvent);\n const style = _get(document, 'body.style');\n if (style) {\n style.userSelect = 'none';\n }\n this._isDragging = true;\n\n type = EUpdateTypes.DragStart;\n handler = this._onDragStart;\n } else if (eventType === 'mousemove') {\n if (!this._isDragging) {\n return;\n }\n type = EUpdateTypes.DragMove;\n handler = this._onDragMove;\n } else if (eventType === 'mouseup') {\n if (!this._isDragging) {\n return;\n }\n this._stopDragging();\n type = EUpdateTypes.DragEnd;\n handler = this._onDragEnd;\n } else {\n throw new Error(`invalid event type: ${eventType}`);\n }\n if (!handler) {\n return;\n }\n const { value, x } = this._getPosition(clientX);\n handler({\n event,\n type,\n value,\n x,\n manager: this,\n tag: this.tag,\n });\n };\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { css } from '@emotion/css';\nimport cx from 'classnames';\nimport { stylesFactory } from '@grafana/ui';\n\nimport { TNil } from '../../types';\nimport DraggableManager, { DraggableBounds, DraggingUpdate } from '../../utils/DraggableManager';\n\nexport const getStyles = stylesFactory(() => {\n return {\n TimelineColumnResizer: css`\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n `,\n wrapper: css`\n bottom: 0;\n position: absolute;\n top: 0;\n `,\n dragger: css`\n border-left: 2px solid transparent;\n cursor: col-resize;\n height: 5000px;\n margin-left: -1px;\n position: absolute;\n top: 0;\n width: 1px;\n z-index: 10;\n &:hover {\n border-left: 2px solid rgba(0, 0, 0, 0.3);\n }\n &::before {\n position: absolute;\n top: 0;\n bottom: 0;\n left: -8px;\n right: 0;\n content: ' ';\n }\n `,\n draggerDragging: css`\n background: rgba(136, 0, 136, 0.05);\n width: unset;\n &::before {\n left: -2000px;\n right: -2000px;\n }\n `,\n draggerDraggingLeft: css`\n border-left: 2px solid #808;\n border-right: 1px solid #999;\n `,\n draggerDraggingRight: css`\n border-left: 1px solid #999;\n border-right: 2px solid #808;\n `,\n gripIcon: css`\n position: absolute;\n top: 0;\n bottom: 0;\n &::before,\n &::after {\n border-right: 1px solid #ccc;\n content: ' ';\n height: 9px;\n position: absolute;\n right: 9px;\n top: 25px;\n }\n &::after {\n right: 5px;\n }\n `,\n gripIconDragging: css`\n &::before,\n &::after {\n border-right: 1px solid rgba(136, 0, 136, 0.5);\n }\n `,\n };\n});\n\ntype TimelineColumnResizerProps = {\n min: number;\n max: number;\n onChange: (newSize: number) => void;\n position: number;\n columnResizeHandleHeight: number;\n};\n\ntype TimelineColumnResizerState = {\n dragPosition: number | TNil;\n};\n\nexport default class TimelineColumnResizer extends React.PureComponent<\n TimelineColumnResizerProps,\n TimelineColumnResizerState\n> {\n state: TimelineColumnResizerState;\n\n _dragManager: DraggableManager;\n _rootElm: Element | TNil;\n\n constructor(props: TimelineColumnResizerProps) {\n super(props);\n this._dragManager = new DraggableManager({\n getBounds: this._getDraggingBounds,\n onDragEnd: this._handleDragEnd,\n onDragMove: this._handleDragUpdate,\n onDragStart: this._handleDragUpdate,\n });\n this._rootElm = undefined;\n this.state = {\n dragPosition: null,\n };\n }\n\n componentWillUnmount() {\n this._dragManager.dispose();\n }\n\n _setRootElm = (elm: Element | TNil) => {\n this._rootElm = elm;\n };\n\n _getDraggingBounds = (): DraggableBounds => {\n if (!this._rootElm) {\n throw new Error('invalid state');\n }\n const { left: clientXLeft, width } = this._rootElm.getBoundingClientRect();\n const { min, max } = this.props;\n return {\n clientXLeft,\n width,\n maxValue: max,\n minValue: min,\n };\n };\n\n _handleDragUpdate = ({ value }: DraggingUpdate) => {\n this.setState({ dragPosition: value });\n };\n\n _handleDragEnd = ({ manager, value }: DraggingUpdate) => {\n manager.resetBounds();\n this.setState({ dragPosition: null });\n this.props.onChange(value);\n };\n\n render() {\n let left;\n let draggerStyle: React.CSSProperties;\n const { position, columnResizeHandleHeight } = this.props;\n const { dragPosition } = this.state;\n left = `${position * 100}%`;\n const gripStyle = { left };\n let isDraggingLeft = false;\n let isDraggingRight = false;\n const styles = getStyles();\n\n if (this._dragManager.isDragging() && this._rootElm && dragPosition != null) {\n isDraggingLeft = dragPosition < position;\n isDraggingRight = dragPosition > position;\n left = `${dragPosition * 100}%`;\n // Draw a highlight from the current dragged position back to the original\n // position, e.g. highlight the change. Draw the highlight via `left` and\n // `right` css styles (simpler than using `width`).\n const draggerLeft = `${Math.min(position, dragPosition) * 100}%`;\n // subtract 1px for draggerRight to deal with the right border being off\n // by 1px when dragging left\n const draggerRight = `calc(${(1 - Math.max(position, dragPosition)) * 100}% - 1px)`;\n draggerStyle = { left: draggerLeft, right: draggerRight };\n } else {\n draggerStyle = gripStyle;\n }\n draggerStyle.height = columnResizeHandleHeight;\n\n const isDragging = isDraggingLeft || isDraggingRight;\n return (\n
\n \n \n
\n );\n }\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { css, cx } from '@emotion/css';\nimport { stylesFactory } from '@grafana/ui';\nimport { TUpdateViewRangeTimeFunction, ViewRangeTime, ViewRangeTimeUpdate } from '../types';\nimport { TNil } from '../../types';\nimport DraggableManager, { DraggableBounds, DraggingUpdate } from '../../utils/DraggableManager';\n\n// exported for testing\nexport const getStyles = stylesFactory(() => {\n return {\n TimelineViewingLayer: css`\n label: TimelineViewingLayer;\n bottom: 0;\n cursor: vertical-text;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n `,\n TimelineViewingLayerCursorGuide: css`\n label: TimelineViewingLayerCursorGuide;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n width: 1px;\n background-color: red;\n `,\n TimelineViewingLayerDragged: css`\n label: TimelineViewingLayerDragged;\n position: absolute;\n top: 0;\n bottom: 0;\n `,\n TimelineViewingLayerDraggedDraggingLeft: css`\n label: TimelineViewingLayerDraggedDraggingLeft;\n border-left: 1px solid;\n `,\n TimelineViewingLayerDraggedDraggingRight: css`\n label: TimelineViewingLayerDraggedDraggingRight;\n border-right: 1px solid;\n `,\n TimelineViewingLayerDraggedShiftDrag: css`\n label: TimelineViewingLayerDraggedShiftDrag;\n background-color: rgba(68, 68, 255, 0.2);\n border-color: #44f;\n `,\n TimelineViewingLayerDraggedReframeDrag: css`\n label: TimelineViewingLayerDraggedReframeDrag;\n background-color: rgba(255, 68, 68, 0.2);\n border-color: #f44;\n `,\n TimelineViewingLayerFullOverlay: css`\n label: TimelineViewingLayerFullOverlay;\n bottom: 0;\n cursor: col-resize;\n left: 0;\n position: fixed;\n right: 0;\n top: 0;\n user-select: none;\n `,\n };\n});\n\ntype TimelineViewingLayerProps = {\n /**\n * `boundsInvalidator` is an arbitrary prop that lets the component know the\n * bounds for dragging need to be recalculated. In practice, the name column\n * width serves fine for this.\n */\n boundsInvalidator: any | null | undefined;\n updateNextViewRangeTime: (update: ViewRangeTimeUpdate) => void;\n updateViewRangeTime: TUpdateViewRangeTimeFunction;\n viewRangeTime: ViewRangeTime;\n};\n\ntype TDraggingLeftLayout = {\n isDraggingLeft: boolean;\n left: string;\n width: string;\n};\n\ntype TOutOfViewLayout = {\n isOutOfView: true;\n};\n\nfunction isOutOfView(layout: TDraggingLeftLayout | TOutOfViewLayout): layout is TOutOfViewLayout {\n return Reflect.has(layout, 'isOutOfView');\n}\n\n/**\n * Map from a sub range to the greater view range, e.g, when the view range is\n * the middle half ([0.25, 0.75]), a value of 0.25 befomes 3/8.\n * @returns {number}\n */\nfunction mapFromViewSubRange(viewStart: number, viewEnd: number, value: number) {\n return viewStart + value * (viewEnd - viewStart);\n}\n\n/**\n * Map a value from the view ([0, 1]) to a sub-range, e.g, when the view range is\n * the middle half ([0.25, 0.75]), a value of 3/8 becomes 1/4.\n * @returns {number}\n */\nfunction mapToViewSubRange(viewStart: number, viewEnd: number, value: number) {\n return (value - viewStart) / (viewEnd - viewStart);\n}\n\n/**\n * Get the layout for the \"next\" view range time, e.g. the difference from the\n * drag start and the drag end. This is driven by `shiftStart`, `shiftEnd` or\n * `reframe` on `props.viewRangeTime`, not by the current state of the\n * component. So, it reflects in-progress dragging from the span minimap.\n */\nfunction getNextViewLayout(start: number, position: number): TDraggingLeftLayout | TOutOfViewLayout {\n let [left, right] = start < position ? [start, position] : [position, start];\n if (left >= 1 || right <= 0) {\n return { isOutOfView: true };\n }\n if (left < 0) {\n left = 0;\n }\n if (right > 1) {\n right = 1;\n }\n return {\n isDraggingLeft: start > position,\n left: `${left * 100}%`,\n width: `${(right - left) * 100}%`,\n };\n}\n\n/**\n * Render the visual indication of the \"next\" view range.\n */\nfunction getMarkers(viewStart: number, viewEnd: number, from: number, to: number, isShift: boolean): React.ReactNode {\n const mappedFrom = mapToViewSubRange(viewStart, viewEnd, from);\n const mappedTo = mapToViewSubRange(viewStart, viewEnd, to);\n const layout = getNextViewLayout(mappedFrom, mappedTo);\n if (isOutOfView(layout)) {\n return null;\n }\n const { isDraggingLeft, left, width } = layout;\n const styles = getStyles();\n const cls = cx({\n [styles.TimelineViewingLayerDraggedDraggingRight]: !isDraggingLeft,\n [styles.TimelineViewingLayerDraggedReframeDrag]: !isShift,\n [styles.TimelineViewingLayerDraggedShiftDrag]: isShift,\n });\n return (\n \n );\n}\n\n/**\n * `TimelineViewingLayer` is rendered on top of the TimelineHeaderRow time\n * labels; it handles showing the current view range and handles mouse UX for\n * modifying it.\n */\nexport default class TimelineViewingLayer extends React.PureComponent {\n _draggerReframe: DraggableManager;\n _root: Element | TNil;\n\n constructor(props: TimelineViewingLayerProps) {\n super(props);\n this._draggerReframe = new DraggableManager({\n getBounds: this._getDraggingBounds,\n onDragEnd: this._handleReframeDragEnd,\n onDragMove: this._handleReframeDragUpdate,\n onDragStart: this._handleReframeDragUpdate,\n onMouseLeave: this._handleReframeMouseLeave,\n onMouseMove: this._handleReframeMouseMove,\n });\n this._root = undefined;\n }\n\n UNSAFE_componentWillReceiveProps(nextProps: TimelineViewingLayerProps) {\n const { boundsInvalidator } = this.props;\n if (boundsInvalidator !== nextProps.boundsInvalidator) {\n this._draggerReframe.resetBounds();\n }\n }\n\n componentWillUnmount() {\n this._draggerReframe.dispose();\n }\n\n _setRoot = (elm: Element | TNil) => {\n this._root = elm;\n };\n\n _getDraggingBounds = (): DraggableBounds => {\n if (!this._root) {\n throw new Error('invalid state');\n }\n const { left: clientXLeft, width } = this._root.getBoundingClientRect();\n return { clientXLeft, width };\n };\n\n _handleReframeMouseMove = ({ value }: DraggingUpdate) => {\n const [viewStart, viewEnd] = this.props.viewRangeTime.current;\n const cursor = mapFromViewSubRange(viewStart, viewEnd, value);\n this.props.updateNextViewRangeTime({ cursor });\n };\n\n _handleReframeMouseLeave = () => {\n this.props.updateNextViewRangeTime({ cursor: undefined });\n };\n\n _handleReframeDragUpdate = ({ value }: DraggingUpdate) => {\n const { current, reframe } = this.props.viewRangeTime;\n const [viewStart, viewEnd] = current;\n const shift = mapFromViewSubRange(viewStart, viewEnd, value);\n const anchor = reframe ? reframe.anchor : shift;\n const update = { reframe: { anchor, shift } };\n this.props.updateNextViewRangeTime(update);\n };\n\n _handleReframeDragEnd = ({ manager, value }: DraggingUpdate) => {\n const { current, reframe } = this.props.viewRangeTime;\n const [viewStart, viewEnd] = current;\n const shift = mapFromViewSubRange(viewStart, viewEnd, value);\n const anchor = reframe ? reframe.anchor : shift;\n const [start, end] = shift < anchor ? [shift, anchor] : [anchor, shift];\n manager.resetBounds();\n this.props.updateViewRangeTime(start, end, 'timeline-header');\n };\n\n render() {\n const { viewRangeTime } = this.props;\n const { current, cursor, reframe, shiftEnd, shiftStart } = viewRangeTime;\n const [viewStart, viewEnd] = current;\n const haveNextTimeRange = reframe != null || shiftEnd != null || shiftStart != null;\n let cusrorPosition: string | TNil;\n if (!haveNextTimeRange && cursor != null && cursor >= viewStart && cursor <= viewEnd) {\n cusrorPosition = `${mapToViewSubRange(viewStart, viewEnd, cursor) * 100}%`;\n }\n const styles = getStyles();\n return (\n \n {cusrorPosition != null && (\n \n )}\n {reframe != null && getMarkers(viewStart, viewEnd, reframe.anchor, reframe.shift, false)}\n {shiftEnd != null && getMarkers(viewStart, viewEnd, viewEnd, shiftEnd, true)}\n {shiftStart != null && getMarkers(viewStart, viewEnd, viewStart, shiftStart, true)}\n \n );\n }\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport moment from 'moment-timezone';\nimport { round as _round, dropWhile as _dropWhile } from 'lodash';\n\nimport { toFloatPrecision } from './number';\n\nconst TODAY = 'Today';\nconst YESTERDAY = 'Yesterday';\n\nexport const STANDARD_DATE_FORMAT = 'YYYY-MM-DD';\nexport const STANDARD_TIME_FORMAT = 'HH:mm';\nexport const STANDARD_DATETIME_FORMAT = 'MMMM D YYYY, HH:mm:ss.SSS';\nexport const ONE_MILLISECOND = 1000;\nexport const ONE_SECOND = 1000 * ONE_MILLISECOND;\nexport const ONE_MINUTE = 60 * ONE_SECOND;\nexport const ONE_HOUR = 60 * ONE_MINUTE;\nexport const ONE_DAY = 24 * ONE_HOUR;\nexport const DEFAULT_MS_PRECISION = Math.log10(ONE_MILLISECOND);\n\nconst UNIT_STEPS: Array<{ unit: string; microseconds: number; ofPrevious: number }> = [\n { unit: 'd', microseconds: ONE_DAY, ofPrevious: 24 },\n { unit: 'h', microseconds: ONE_HOUR, ofPrevious: 60 },\n { unit: 'm', microseconds: ONE_MINUTE, ofPrevious: 60 },\n { unit: 's', microseconds: ONE_SECOND, ofPrevious: 1000 },\n { unit: 'ms', microseconds: ONE_MILLISECOND, ofPrevious: 1000 },\n { unit: 'μs', microseconds: 1, ofPrevious: 1000 },\n];\n\n/**\n * @param {number} timestamp\n * @param {number} initialTimestamp\n * @param {number} totalDuration\n * @returns {number} 0-100 percentage\n */\nexport function getPercentageOfDuration(duration: number, totalDuration: number) {\n return (duration / totalDuration) * 100;\n}\n\nconst quantizeDuration = (duration: number, floatPrecision: number, conversionFactor: number) =>\n toFloatPrecision(duration / conversionFactor, floatPrecision) * conversionFactor;\n\n/**\n * @param {number} duration (in microseconds)\n * @returns {string} formatted, unit-labelled string with time in milliseconds\n */\nexport function formatDate(duration: number) {\n return moment(duration / ONE_MILLISECOND).format(STANDARD_DATE_FORMAT);\n}\n\n/**\n * @param {number} duration (in microseconds)\n * @returns {string} formatted, unit-labelled string with time in milliseconds\n */\nexport function formatTime(duration: number) {\n return moment(duration / ONE_MILLISECOND).format(STANDARD_TIME_FORMAT);\n}\n\n/**\n * @param {number} duration (in microseconds)\n * @returns {string} formatted, unit-labelled string with time in milliseconds\n */\nexport function formatDatetime(duration: number) {\n return moment(duration / ONE_MILLISECOND).format(STANDARD_DATETIME_FORMAT);\n}\n\n/**\n * @param {number} duration (in microseconds)\n * @returns {string} formatted, unit-labelled string with time in milliseconds\n */\nexport function formatMillisecondTime(duration: number) {\n const targetDuration = quantizeDuration(duration, DEFAULT_MS_PRECISION, ONE_MILLISECOND);\n return `${moment.duration(targetDuration / ONE_MILLISECOND).asMilliseconds()}ms`;\n}\n\n/**\n * @param {number} duration (in microseconds)\n * @returns {string} formatted, unit-labelled string with time in seconds\n */\nexport function formatSecondTime(duration: number) {\n const targetDuration = quantizeDuration(duration, DEFAULT_MS_PRECISION, ONE_SECOND);\n return `${moment.duration(targetDuration / ONE_MILLISECOND).asSeconds()}s`;\n}\n\n/**\n * Humanizes the duration for display.\n *\n * Example:\n * 5000ms => 5s\n * 1000μs => 1ms\n * 183840s => 2d 3h\n *\n * @param {number} duration (in microseconds)\n * @return {string} formatted duration\n */\nexport function formatDuration(duration: number): string {\n // Drop all units that are too large except the last one\n const [primaryUnit, secondaryUnit] = _dropWhile(\n UNIT_STEPS,\n ({ microseconds }, index) => index < UNIT_STEPS.length - 1 && microseconds > duration\n );\n\n if (primaryUnit.ofPrevious === 1000) {\n // If the unit is decimal based, display as a decimal\n return `${_round(duration / primaryUnit.microseconds, 2)}${primaryUnit.unit}`;\n }\n\n const primaryValue = Math.floor(duration / primaryUnit.microseconds);\n const primaryUnitString = `${primaryValue}${primaryUnit.unit}`;\n const secondaryValue = Math.round((duration / secondaryUnit.microseconds) % primaryUnit.ofPrevious);\n const secondaryUnitString = `${secondaryValue}${secondaryUnit.unit}`;\n return secondaryValue === 0 ? primaryUnitString : `${primaryUnitString} ${secondaryUnitString}`;\n}\n\nexport function formatRelativeDate(value: any, fullMonthName = false) {\n const m = moment.isMoment(value) ? value : moment(value);\n const monthFormat = fullMonthName ? 'MMMM' : 'MMM';\n const dt = new Date();\n if (dt.getFullYear() !== m.year()) {\n return m.format(`${monthFormat} D, YYYY`);\n }\n const mMonth = m.month();\n const mDate = m.date();\n const date = dt.getDate();\n if (mMonth === dt.getMonth() && mDate === date) {\n return TODAY;\n }\n dt.setDate(date - 1);\n if (mMonth === dt.getMonth() && mDate === dt.getDate()) {\n return YESTERDAY;\n }\n return m.format(`${monthFormat} D`);\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/**\n * given a number and a desired precision for the floating\n * side, return the number at the new precision.\n *\n * toFloatPrecision(3.55, 1) // 3.5\n * toFloatPrecision(0.04422, 2) // 0.04\n * toFloatPrecision(6.24e6, 2) // 6240000.00\n *\n * does not support numbers that use \"e\" notation on toString.\n *\n * @param {number} number\n * @param {number} precision\n * @returns {number} number at new floating precision\n */\nexport function toFloatPrecision(number: number, precision: number): number {\n const log10Length = Math.floor(Math.log10(Math.abs(number))) + 1;\n const targetPrecision = precision + log10Length;\n\n if (targetPrecision <= 0) {\n return Math.trunc(number);\n }\n\n return Number(number.toPrecision(targetPrecision));\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { TraceSpan } from '../types/trace';\n\nexport type ViewedBoundsFunctionType = (start: number, end: number) => { start: number; end: number };\n/**\n * Given a range (`min`, `max`) and factoring in a zoom (`viewStart`, `viewEnd`)\n * a function is created that will find the position of a sub-range (`start`, `end`).\n * The calling the generated method will return the result as a `{ start, end }`\n * object with values ranging in [0, 1].\n *\n * @param {number} min The start of the outer range.\n * @param {number} max The end of the outer range.\n * @param {number} viewStart The start of the zoom, on a range of [0, 1],\n * relative to the `min`, `max`.\n * @param {number} viewEnd The end of the zoom, on a range of [0, 1],\n * relative to the `min`, `max`.\n * @returns {(number, number) => Object} Created view bounds function\n */\nexport function createViewedBoundsFunc(viewRange: { min: number; max: number; viewStart: number; viewEnd: number }) {\n const { min, max, viewStart, viewEnd } = viewRange;\n const duration = max - min;\n const viewMin = min + viewStart * duration;\n const viewMax = max - (1 - viewEnd) * duration;\n const viewWindow = viewMax - viewMin;\n\n /**\n * View bounds function\n * @param {number} start The start of the sub-range.\n * @param {number} end The end of the sub-range.\n * @returns {Object} The resultant range.\n */\n return (start: number, end: number) => ({\n start: (start - viewMin) / viewWindow,\n end: (end - viewMin) / viewWindow,\n });\n}\n\n/**\n * Returns `true` if the `span` has a tag matching `key` = `value`.\n *\n * @param {string} key The tag key to match on.\n * @param {any} value The tag value to match.\n * @param {{tags}} span An object with a `tags` property of { key, value }\n * items.\n * @returns {boolean} True if a match was found.\n */\nexport function spanHasTag(key: string, value: any, span: TraceSpan) {\n if (!Array.isArray(span.tags) || !span.tags.length) {\n return false;\n }\n return span.tags.some((tag) => tag.key === key && tag.value === value);\n}\n\nexport const isClientSpan = spanHasTag.bind(null, 'span.kind', 'client');\nexport const isServerSpan = spanHasTag.bind(null, 'span.kind', 'server');\n\nconst isErrorBool = spanHasTag.bind(null, 'error', true);\nconst isErrorStr = spanHasTag.bind(null, 'error', 'true');\nexport const isErrorSpan = (span: TraceSpan) => isErrorBool(span) || isErrorStr(span);\n\n/**\n * Returns `true` if at least one of the descendants of the `parentSpanIndex`\n * span contains an error tag.\n *\n * @param {TraceSpan[]} spans The spans for a trace - should be\n * sorted with children following parents.\n * @param {number} parentSpanIndex The index of the parent span - only\n * subsequent spans with depth less than\n * the parent span will be checked.\n * @returns {boolean} Returns `true` if a descendant contains an error tag.\n */\nexport function spanContainsErredSpan(spans: TraceSpan[], parentSpanIndex: number) {\n const { depth } = spans[parentSpanIndex];\n let i = parentSpanIndex + 1;\n for (; i < spans.length && spans[i].depth > depth; i++) {\n if (isErrorSpan(spans[i])) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Expects the first span to be the parent span.\n */\nexport function findServerChildSpan(spans: TraceSpan[]) {\n if (spans.length <= 1 || !isClientSpan(spans[0])) {\n return false;\n }\n const span = spans[0];\n const spanChildDepth = span.depth + 1;\n let i = 1;\n while (i < spans.length && spans[i].depth === spanChildDepth) {\n if (isServerSpan(spans[i])) {\n return spans[i];\n }\n i++;\n }\n return null;\n}\n\nexport const isKindClient = (span: TraceSpan): Boolean =>\n span.tags.some(({ key, value }) => key === 'span.kind' && value === 'client');\n\nexport { formatDuration } from '../utils/date';\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport tinycolor from 'tinycolor2';\nimport { GrafanaTheme2 } from '@grafana/data';\n\n/**\n * Tries to get a dark variant color. Either by simply inverting the luminosity and darkening or lightening the color\n * a bit, or if base is provided, tries 2 variants of lighter and darker colors and checks which is more readable with\n * the base.\n * @param theme\n * @param hex\n * @param base\n */\nexport function autoColor(theme: GrafanaTheme2, hex: string, base?: string) {\n if (theme.isLight) {\n return hex;\n } else {\n if (base) {\n const color = tinycolor(hex);\n return tinycolor\n .mostReadable(\n base,\n [\n color.clone().lighten(25),\n color.clone().lighten(10),\n color,\n color.clone().darken(10),\n color.clone().darken(25),\n ],\n {\n includeFallbackColors: false,\n }\n )\n .toHex8String();\n }\n const color = tinycolor(hex).toHsl();\n color.l = 1 - color.l;\n const newColor = tinycolor(color);\n return newColor.isLight() ? newColor.darken(5).toHex8String() : newColor.lighten(5).toHex8String();\n }\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { css } from '@emotion/css';\nimport cx from 'classnames';\nimport { useStyles2 } from '@grafana/ui';\nimport { GrafanaTheme2 } from '@grafana/data';\n\nimport { formatDuration } from './utils';\nimport { TNil } from '../types';\nimport { autoColor } from '../Theme';\n\nconst getStyles = (theme: GrafanaTheme2) => {\n return {\n Ticks: css`\n label: Ticks;\n pointer-events: none;\n `,\n TicksTick: css`\n label: TicksTick;\n position: absolute;\n height: 100%;\n width: 1px;\n background: ${autoColor(theme, '#d8d8d8')};\n &:last-child {\n width: 0;\n }\n `,\n TicksTickLabel: css`\n label: TicksTickLabel;\n left: 0.25rem;\n position: absolute;\n `,\n TicksTickLabelEndAnchor: css`\n label: TicksTickLabelEndAnchor;\n left: initial;\n right: 0.25rem;\n `,\n };\n};\n\ntype TicksProps = {\n endTime?: number | TNil;\n numTicks: number;\n showLabels?: boolean | TNil;\n startTime?: number | TNil;\n};\n\nexport default function Ticks(props: TicksProps) {\n const { endTime, numTicks, showLabels, startTime } = props;\n\n let labels: undefined | string[];\n if (showLabels) {\n labels = [];\n const viewingDuration = (endTime || 0) - (startTime || 0);\n for (let i = 0; i < numTicks; i++) {\n const durationAtTick = (startTime || 0) + (i / (numTicks - 1)) * viewingDuration;\n labels.push(formatDuration(durationAtTick));\n }\n }\n const styles = useStyles2(getStyles);\n const ticks: React.ReactNode[] = [];\n for (let i = 0; i < numTicks; i++) {\n const portion = i / (numTicks - 1);\n ticks.push(\n \n {labels && (\n = 1 })}>\n {labels[i]}\n \n )}\n \n );\n }\n return
{ticks}
;\n}\n\nTicks.defaultProps = {\n endTime: null,\n showLabels: null,\n startTime: null,\n};\n","import { css } from '@emotion/css';\n\nexport const ubRelative = css`\n position: relative;\n`;\n\nexport const ubMb1 = css`\n margin-bottom: 0.25rem;\n`;\n\nexport const ubMy1 = css`\n margin-top: 0.25rem;\n margin-bottom: 0.25rem;\n`;\n\nexport const ubM0 = css`\n margin: 0;\n`;\n\nexport const ubPx2 = css`\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n`;\n\nexport const ubPb2 = css`\n padding-bottom: 0.5rem;\n`;\n\nexport const ubFlex = css`\n display: flex;\n`;\n\nexport const ubItemsCenter = css`\n align-items: center;\n`;\n\nexport const ubFlexAuto = css`\n flex: 1 1 auto;\n min-width: 0; /* 1 */\n min-height: 0; /* 1 */\n`;\n\nexport const ubTxRightAlign = css`\n text-align: right;\n`;\n\nexport const ubInlineBlock = css`\n display: inline-block;\n`;\n\nexport const uAlignIcon = css`\n margin: -0.2rem 0.25rem 0 0;\n`;\n\nexport const uTxEllipsis = css`\n text-overflow: ellipsis;\n`;\n\nexport const uWidth100 = css`\n width: 100%;\n`;\n\nexport const uTxMuted = css`\n color: #aaa;\n`;\n\nexport const ubJustifyEnd = css`\n justify-content: flex-end;\n`;\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { css } from '@emotion/css';\nimport cx from 'classnames';\nimport { useStyles2 } from '@grafana/ui';\nimport { ubRelative } from '../uberUtilityStyles';\n\nconst getStyles = () => {\n return {\n flexRow: css`\n display: flex;\n flex: 0 1 auto;\n flex-direction: row;\n `,\n };\n};\n\ntype TTimelineRowProps = {\n children: React.ReactNode;\n className?: string;\n};\n\ninterface TimelineRowCellProps extends React.HTMLAttributes {\n children: React.ReactNode;\n className?: string;\n width: number;\n style?: {};\n}\n\nexport default function TimelineRow(props: TTimelineRowProps) {\n const { children, className = '', ...rest } = props;\n const styles = useStyles2(getStyles);\n return (\n
\n {children}\n
\n );\n}\n\nTimelineRow.defaultProps = {\n className: '',\n};\n\nexport function TimelineRowCell(props: TimelineRowCellProps) {\n const { children, className = '', width, style, ...rest } = props;\n const widthPercent = `${width * 100}%`;\n const mergedStyle = { ...style, flexBasis: widthPercent, maxWidth: widthPercent };\n return (\n
\n {children}\n
\n );\n}\n\nTimelineRowCell.defaultProps = { className: '', style: {} };\n\nTimelineRow.Cell = TimelineRowCell;\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { css } from '@emotion/css';\nimport cx from 'classnames';\nimport { useStyles2 } from '@grafana/ui';\nimport { GrafanaTheme2 } from '@grafana/data';\n\nimport { TimelineCollapser } from './TimelineCollapser';\nimport TimelineColumnResizer from './TimelineColumnResizer';\nimport TimelineViewingLayer from './TimelineViewingLayer';\nimport Ticks from '../Ticks';\nimport TimelineRow from '../TimelineRow';\nimport { TUpdateViewRangeTimeFunction, ViewRangeTime, ViewRangeTimeUpdate } from '../types';\nimport { autoColor } from '../../Theme';\nimport { ubFlex, ubPx2 } from '../../uberUtilityStyles';\n\nconst getStyles = (theme: GrafanaTheme2) => {\n return {\n TimelineHeaderRow: css`\n label: TimelineHeaderRow;\n background: ${autoColor(theme, '#ececec')};\n border-bottom: 1px solid ${autoColor(theme, '#ccc')};\n height: 38px;\n line-height: 38px;\n width: 100%;\n z-index: 4;\n position: relative;\n `,\n TimelineHeaderRowTitle: css`\n label: TimelineHeaderRowTitle;\n flex: 1;\n overflow: hidden;\n margin: 0;\n text-overflow: ellipsis;\n white-space: nowrap;\n `,\n TimelineHeaderWrapper: css`\n label: TimelineHeaderWrapper;\n align-items: center;\n `,\n };\n};\n\ntype TimelineHeaderRowProps = {\n duration: number;\n nameColumnWidth: number;\n numTicks: number;\n onCollapseAll: () => void;\n onCollapseOne: () => void;\n onColummWidthChange: (width: number) => void;\n onExpandAll: () => void;\n onExpandOne: () => void;\n updateNextViewRangeTime: (update: ViewRangeTimeUpdate) => void;\n updateViewRangeTime: TUpdateViewRangeTimeFunction;\n viewRangeTime: ViewRangeTime;\n columnResizeHandleHeight: number;\n};\n\nexport default function TimelineHeaderRow(props: TimelineHeaderRowProps) {\n const {\n duration,\n nameColumnWidth,\n numTicks,\n onCollapseAll,\n onCollapseOne,\n onColummWidthChange,\n onExpandAll,\n onExpandOne,\n updateViewRangeTime,\n updateNextViewRangeTime,\n viewRangeTime,\n columnResizeHandleHeight,\n } = props;\n const [viewStart, viewEnd] = viewRangeTime.current;\n const styles = useStyles2(getStyles);\n return (\n \n \n

Service & Operation

\n \n
\n \n \n \n \n \n
\n );\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\ntype THeightGetter = (index: number) => number;\n\n/**\n * Keeps track of the height and y-position for anything sequenctial where\n * y-positions follow one-after-another and can be derived from the height of\n * the prior entries. The height is known from an accessor function parameter\n * to the methods that require new knowledge the heights.\n *\n * @export\n * @class Positions\n */\nexport default class Positions {\n /**\n * Indicates how far past the explicitly required height or y-values should\n * checked.\n */\n bufferLen: number;\n dataLen: number;\n heights: number[];\n /**\n * `lastI` keeps track of which values have already been visited. In many\n * scenarios, values do not need to be revisited. But, revisiting is required\n * when heights have changed, so `lastI` can be forced.\n */\n lastI: number;\n ys: number[];\n\n constructor(bufferLen: number) {\n this.ys = [];\n this.heights = [];\n this.bufferLen = bufferLen;\n this.dataLen = -1;\n this.lastI = -1;\n }\n\n /**\n * Used to make sure the length of y-values and heights is consistent with\n * the context; in particular `lastI` needs to remain valid.\n */\n profileData(dataLength: number) {\n if (dataLength !== this.dataLen) {\n this.dataLen = dataLength;\n this.ys.length = dataLength;\n this.heights.length = dataLength;\n if (this.lastI >= dataLength) {\n this.lastI = dataLength - 1;\n }\n }\n }\n\n /**\n * Calculate and save the heights and y-values, based on `heightGetter`, from\n * `lastI` until the`max` index; the starting point (`lastI`) can be forced\n * via the `forcedLastI` parameter.\n * @param {number=} forcedLastI\n */\n calcHeights(max: number, heightGetter: THeightGetter, forcedLastI?: number) {\n if (forcedLastI != null) {\n this.lastI = forcedLastI;\n }\n let _max = max + this.bufferLen;\n if (_max <= this.lastI) {\n return;\n }\n if (_max >= this.heights.length) {\n _max = this.heights.length - 1;\n }\n let i = this.lastI;\n if (this.lastI === -1) {\n i = 0;\n this.ys[0] = 0;\n }\n while (i <= _max) {\n // eslint-disable-next-line no-multi-assign\n const h = (this.heights[i] = heightGetter(i));\n this.ys[i + 1] = this.ys[i] + h;\n i++;\n }\n this.lastI = _max;\n }\n\n /**\n * Verify the height and y-values from `lastI` up to `yValue`.\n */\n calcYs(yValue: number, heightGetter: THeightGetter) {\n while ((this.ys[this.lastI] == null || yValue > this.ys[this.lastI]) && this.lastI < this.dataLen - 1) {\n this.calcHeights(this.lastI, heightGetter);\n }\n }\n\n /**\n * Get the latest height for index `_i`. If it's in new terretory\n * (_i > lastI), find the heights (and y-values) leading up to it. If it's in\n * known territory (_i <= lastI) and the height is different than what is\n * known, recalculate subsequent y values, but don't confirm the heights of\n * those items, just update based on the difference.\n */\n confirmHeight(_i: number, heightGetter: THeightGetter) {\n let i = _i;\n if (i > this.lastI) {\n this.calcHeights(i, heightGetter);\n return;\n }\n const h = heightGetter(i);\n if (h === this.heights[i]) {\n return;\n }\n const chg = h - this.heights[i];\n this.heights[i] = h;\n // shift the y positions by `chg` for all known y positions\n while (++i <= this.lastI) {\n this.ys[i] += chg;\n }\n if (this.ys[this.lastI + 1] != null) {\n this.ys[this.lastI + 1] += chg;\n }\n }\n\n /**\n * Given a target y-value (`yValue`), find the closest index (in the `.ys`\n * array) that is prior to the y-value; e.g. map from y-value to index in\n * `.ys`.\n */\n findFloorIndex(yValue: number, heightGetter: THeightGetter): number {\n this.calcYs(yValue, heightGetter);\n\n let imin = 0;\n let imax = this.lastI;\n\n if (this.ys.length < 2 || yValue < this.ys[1]) {\n return 0;\n }\n if (yValue > this.ys[imax]) {\n return imax;\n }\n let i;\n while (imin < imax) {\n // eslint-disable-next-line no-bitwise\n i = (imin + 0.5 * (imax - imin)) | 0;\n if (yValue > this.ys[i]) {\n if (yValue <= this.ys[i + 1]) {\n return i;\n }\n imin = i;\n } else if (yValue < this.ys[i]) {\n if (yValue >= this.ys[i - 1]) {\n return i - 1;\n }\n imax = i;\n } else {\n return i;\n }\n }\n throw new Error(`unable to find floor index for y=${yValue}`);\n }\n\n /**\n * Get the `y` and `height` for a given row.\n *\n * @returns {{ height: number, y: number }}\n */\n getRowPosition(index: number, heightGetter: THeightGetter) {\n this.confirmHeight(index, heightGetter);\n return {\n height: this.heights[index],\n y: this.ys[index],\n };\n }\n\n /**\n * Get the estimated height of the whole shebang by extrapolating based on\n * the average known height.\n */\n getEstimatedHeight(): number {\n const known = this.ys[this.lastI] + this.heights[this.lastI];\n if (this.lastI >= this.dataLen - 1) {\n // eslint-disable-next-line no-bitwise\n return known | 0;\n }\n // eslint-disable-next-line no-bitwise\n return ((known / (this.lastI + 1)) * this.heights.length) | 0;\n }\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\n\nimport Positions from './Positions';\nimport { TNil } from '../../types';\n\ntype TWrapperProps = {\n style: React.CSSProperties;\n ref: (elm: HTMLDivElement) => void;\n onScroll?: () => void;\n};\n\n/**\n * @typedef\n */\ntype TListViewProps = {\n /**\n * Number of elements in the list.\n */\n dataLength: number;\n /**\n * Convert item index (number) to the key (string). ListView uses both indexes\n * and keys to handle the addition of new rows.\n */\n getIndexFromKey: (key: string) => number;\n /**\n * Convert item key (string) to the index (number). ListView uses both indexes\n * and keys to handle the addition of new rows.\n */\n getKeyFromIndex: (index: number) => string;\n /**\n * Number of items to draw and add to the DOM, initially.\n */\n initialDraw?: number;\n /**\n * The parent provides fallback height measurements when there is not a\n * rendered element to measure.\n */\n itemHeightGetter: (index: number, key: string) => number;\n /**\n * Function that renders an item; rendered items are added directly to the\n * DOM, they are not wrapped in list item wrapper HTMLElement.\n */\n // itemRenderer(itemKey, style, i, attrs)\n itemRenderer: (\n itemKey: string,\n style: Record,\n index: number,\n attributes: Record\n ) => React.ReactNode;\n /**\n * `className` for the HTMLElement that holds the items.\n */\n itemsWrapperClassName?: string;\n /**\n * When adding new items to the DOM, this is the number of items to add above\n * and below the current view. E.g. if list is 100 items and is scrolled\n * halfway down (so items [46, 55] are in view), then when a new range of\n * items is rendered, it will render items `46 - viewBuffer` to\n * `55 + viewBuffer`.\n */\n viewBuffer: number;\n /**\n * The minimum number of items offscreen in either direction; e.g. at least\n * `viewBuffer` number of items must be off screen above and below the\n * current view, or more items will be rendered.\n */\n viewBufferMin: number;\n /**\n * When `true`, expect `_wrapperElm` to have `overflow: visible` and to,\n * essentially, be tall to the point the entire page will will end up\n * scrolling as a result of the ListView. Similar to react-virtualized\n * window scroller.\n *\n * - Ref: https://bvaughn.github.io/react-virtualized/#/components/WindowScroller\n * - Ref:https://github.com/bvaughn/react-virtualized/blob/497e2a1942529560681d65a9ef9f5e9c9c9a49ba/docs/WindowScroller.md\n */\n windowScroller?: boolean;\n /**\n * You need to pass in scrollElement when windowScroller is set to false.\n * This element is responsible for tracking scrolling for lazy loading.\n */\n scrollElement?: Element;\n};\n\nconst DEFAULT_INITIAL_DRAW = 100;\n\n/**\n * Virtualized list view component, for the most part, only renders the window\n * of items that are in-view with some buffer before and after. Listens for\n * scroll events and updates which items are rendered. See react-virtualized\n * for a suite of components with similar, but generalized, functionality.\n * https://github.com/bvaughn/react-virtualized\n *\n * Note: Presently, ListView cannot be a PureComponent. This is because ListView\n * is sensitive to the underlying state that drives the list items, but it\n * doesn't actually receive that state. So, a render may still be required even\n * if ListView's props are unchanged.\n *\n * @export\n * @class ListView\n */\nexport default class ListView extends React.Component {\n /**\n * Keeps track of the height and y-value of items, by item index, in the\n * ListView.\n */\n _yPositions: Positions;\n /**\n * Keep track of the known / measured heights of the rendered items; populated\n * with values through observation and keyed on the item key, not the item\n * index.\n */\n _knownHeights: Map;\n /**\n * The start index of the items currently drawn.\n */\n _startIndexDrawn: number;\n /**\n * The end index of the items currently drawn.\n */\n _endIndexDrawn: number;\n /**\n * The start index of the items currently in view.\n */\n _startIndex: number;\n /**\n * The end index of the items currently in view.\n */\n _endIndex: number;\n /**\n * Height of the visual window, e.g. height of the scroller element.\n */\n _viewHeight: number;\n /**\n * `scrollTop` of the current scroll position.\n */\n _scrollTop: number;\n /**\n * Used to keep track of whether or not a re-calculation of what should be\n * drawn / viewable has been scheduled.\n */\n _isScrolledOrResized: boolean;\n /**\n * If `windowScroller` is true, this notes how far down the page the scroller\n * is located. (Note: repositioning and below-the-fold views are untested)\n */\n _htmlTopOffset: number;\n _windowScrollListenerAdded: boolean;\n _htmlElm: HTMLElement;\n /**\n * Element holding the scroller.\n */\n _wrapperElm: Element | TNil;\n /**\n * HTMLElement holding the rendered items.\n */\n _itemHolderElm: HTMLElement | TNil;\n\n static defaultProps = {\n initialDraw: DEFAULT_INITIAL_DRAW,\n itemsWrapperClassName: '',\n windowScroller: false,\n };\n\n constructor(props: TListViewProps) {\n super(props);\n\n this._yPositions = new Positions(200);\n // _knownHeights is (item-key -> observed height) of list items\n this._knownHeights = new Map();\n\n this._startIndexDrawn = 2 ** 20;\n this._endIndexDrawn = -(2 ** 20);\n this._startIndex = 0;\n this._endIndex = 0;\n this._viewHeight = -1;\n this._scrollTop = -1;\n this._isScrolledOrResized = false;\n\n this._htmlTopOffset = -1;\n this._windowScrollListenerAdded = false;\n // _htmlElm is only relevant if props.windowScroller is true\n this._htmlElm = document.documentElement as any;\n this._wrapperElm = undefined;\n this._itemHolderElm = undefined;\n }\n\n componentDidMount() {\n if (this.props.windowScroller) {\n if (this._wrapperElm) {\n const { top } = this._wrapperElm.getBoundingClientRect();\n this._htmlTopOffset = top + this._htmlElm.scrollTop;\n }\n window.addEventListener('scroll', this._onScroll);\n this._windowScrollListenerAdded = true;\n } else {\n // The wrapper element should be the one that handles the scrolling. Once we are not using scroll-canvas we can remove this.\n this._wrapperElm = this.props.scrollElement;\n this._wrapperElm?.addEventListener('scroll', this._onScroll);\n }\n }\n\n componentDidUpdate() {\n if (this._itemHolderElm) {\n this._scanItemHeights();\n }\n }\n\n componentWillUnmount() {\n if (this._windowScrollListenerAdded) {\n window.removeEventListener('scroll', this._onScroll);\n } else {\n this._wrapperElm?.removeEventListener('scroll', this._onScroll);\n }\n }\n\n getViewHeight = () => this._viewHeight;\n\n /**\n * Get the index of the item at the bottom of the current view.\n */\n getBottomVisibleIndex = (): number => {\n const bottomY = this._scrollTop + this._viewHeight;\n return this._yPositions.findFloorIndex(bottomY, this._getHeight);\n };\n\n /**\n * Get the index of the item at the top of the current view.\n */\n getTopVisibleIndex = (): number => this._yPositions.findFloorIndex(this._scrollTop, this._getHeight);\n\n getRowPosition = (index: number): { height: number; y: number } =>\n this._yPositions.getRowPosition(index, this._getHeight);\n\n scrollToIndex = (index: number) => {\n // calculate the position of the list view relative to the scroll parent\n const { scrollElement } = this.props;\n const scrollElementTop = scrollElement?.getBoundingClientRect().top || 0;\n const listViewTop = (scrollElement?.scrollTop || 0) + (this._itemHolderElm?.getBoundingClientRect().top || 0);\n const listViewOffset = listViewTop - scrollElementTop;\n\n const itemOffset = this.getRowPosition(index).y;\n\n // hard code a small offset to leave a little bit of space above the focused span, so it is visually clear\n // that there is content above\n this.props.scrollElement?.scrollTo({ top: itemOffset + listViewOffset - 80 });\n };\n\n /**\n * Scroll event listener that schedules a remeasuring of which items should be\n * rendered.\n */\n _onScroll = () => {\n if (!this._isScrolledOrResized) {\n this._isScrolledOrResized = true;\n window.requestAnimationFrame(this._positionList);\n }\n };\n\n /**\n * Returns true is the view height (scroll window) or scroll position have\n * changed.\n */\n _isViewChanged() {\n if (!this._wrapperElm) {\n return false;\n }\n const useRoot = this.props.windowScroller;\n const clientHeight = useRoot ? this._htmlElm.clientHeight : this._wrapperElm.clientHeight;\n const scrollTop = useRoot ? this._htmlElm.scrollTop : this._wrapperElm.scrollTop;\n return clientHeight !== this._viewHeight || scrollTop !== this._scrollTop;\n }\n\n /**\n * Recalculate _startIndex and _endIndex, e.g. which items are in view.\n */\n _calcViewIndexes() {\n const useRoot = this.props.windowScroller;\n // funky if statement is to satisfy flow\n if (!useRoot) {\n /* istanbul ignore next */\n if (!this._wrapperElm) {\n this._viewHeight = -1;\n this._startIndex = 0;\n this._endIndex = 0;\n return;\n }\n this._viewHeight = this._wrapperElm.clientHeight;\n this._scrollTop = this._wrapperElm.scrollTop;\n } else {\n this._viewHeight = window.innerHeight - this._htmlTopOffset;\n this._scrollTop = window.scrollY;\n }\n const yStart = this._scrollTop;\n const yEnd = this._scrollTop + this._viewHeight;\n this._startIndex = this._yPositions.findFloorIndex(yStart, this._getHeight);\n this._endIndex = this._yPositions.findFloorIndex(yEnd, this._getHeight);\n }\n\n /**\n * Checked to see if the currently rendered items are sufficient, if not,\n * force an update to trigger more items to be rendered.\n */\n _positionList = () => {\n this._isScrolledOrResized = false;\n if (!this._wrapperElm) {\n return;\n }\n this._calcViewIndexes();\n // indexes drawn should be padded by at least props.viewBufferMin\n const maxStart = this.props.viewBufferMin > this._startIndex ? 0 : this._startIndex - this.props.viewBufferMin;\n const minEnd =\n this.props.viewBufferMin < this.props.dataLength - this._endIndex\n ? this._endIndex + this.props.viewBufferMin\n : this.props.dataLength - 1;\n if (maxStart < this._startIndexDrawn || minEnd > this._endIndexDrawn) {\n this.forceUpdate();\n }\n };\n\n _initWrapper = (elm: HTMLElement | TNil) => {\n if (!this.props.windowScroller) {\n return;\n }\n this._wrapperElm = elm;\n if (elm) {\n this._viewHeight = elm.clientHeight;\n }\n };\n\n _initItemHolder = (elm: HTMLElement | TNil) => {\n this._itemHolderElm = elm;\n this._scanItemHeights();\n };\n\n /**\n * Go through all items that are rendered and save their height based on their\n * item-key (which is on a data-* attribute). If any new or adjusted heights\n * are found, re-measure the current known y-positions (via .yPositions).\n */\n _scanItemHeights = () => {\n const getIndexFromKey = this.props.getIndexFromKey;\n if (!this._itemHolderElm) {\n return;\n }\n // note the keys for the first and last altered heights, the `yPositions`\n // needs to be updated\n let lowDirtyKey = null;\n let highDirtyKey = null;\n let isDirty = false;\n // iterating childNodes is faster than children\n // https://jsperf.com/large-htmlcollection-vs-large-nodelist\n const nodes = this._itemHolderElm.childNodes;\n const max = nodes.length;\n for (let i = 0; i < max; i++) {\n const node: HTMLElement = nodes[i] as any;\n // use `.getAttribute(...)` instead of `.dataset` for jest / JSDOM\n const itemKey = node.getAttribute('data-item-key');\n if (!itemKey) {\n // eslint-disable-next-line no-console\n console.warn('itemKey not found');\n continue;\n }\n // measure the first child, if it's available, otherwise the node itself\n // (likely not transferable to other contexts, and instead is specific to\n // how we have the items rendered)\n const measureSrc: Element = node.firstElementChild || node;\n const observed = measureSrc.clientHeight;\n const known = this._knownHeights.get(itemKey);\n if (observed !== known) {\n this._knownHeights.set(itemKey, observed);\n if (!isDirty) {\n isDirty = true;\n // eslint-disable-next-line no-multi-assign\n lowDirtyKey = highDirtyKey = itemKey;\n } else {\n highDirtyKey = itemKey;\n }\n }\n }\n if (lowDirtyKey != null && highDirtyKey != null) {\n // update yPositions, then redraw\n const imin = getIndexFromKey(lowDirtyKey);\n const imax = highDirtyKey === lowDirtyKey ? imin : getIndexFromKey(highDirtyKey);\n this._yPositions.calcHeights(imax, this._getHeight, imin);\n this.forceUpdate();\n }\n };\n\n /**\n * Get the height of the element at index `i`; first check the known heights,\n * fallback to `.props.itemHeightGetter(...)`.\n */\n _getHeight = (i: number) => {\n const key = this.props.getKeyFromIndex(i);\n const known = this._knownHeights.get(key);\n // known !== known iff known is NaN\n // eslint-disable-next-line no-self-compare\n if (known != null && known === known) {\n return known;\n }\n return this.props.itemHeightGetter(i, key);\n };\n\n render() {\n const {\n dataLength,\n getKeyFromIndex,\n initialDraw = DEFAULT_INITIAL_DRAW,\n itemRenderer,\n viewBuffer,\n viewBufferMin,\n } = this.props;\n const heightGetter = this._getHeight;\n const items = [];\n let start;\n let end;\n\n this._yPositions.profileData(dataLength);\n\n if (!this._wrapperElm) {\n start = 0;\n end = (initialDraw < dataLength ? initialDraw : dataLength) - 1;\n } else {\n if (this._isViewChanged()) {\n this._calcViewIndexes();\n }\n const maxStart = viewBufferMin > this._startIndex ? 0 : this._startIndex - viewBufferMin;\n const minEnd = viewBufferMin < dataLength - this._endIndex ? this._endIndex + viewBufferMin : dataLength - 1;\n if (maxStart < this._startIndexDrawn || minEnd > this._endIndexDrawn) {\n start = viewBuffer > this._startIndex ? 0 : this._startIndex - viewBuffer;\n end = this._endIndex + viewBuffer;\n if (end >= dataLength) {\n end = dataLength - 1;\n }\n } else {\n start = this._startIndexDrawn;\n end = this._endIndexDrawn > dataLength - 1 ? dataLength - 1 : this._endIndexDrawn;\n }\n }\n\n this._yPositions.calcHeights(end, heightGetter, start || -1);\n this._startIndexDrawn = start;\n this._endIndexDrawn = end;\n\n items.length = end - start + 1;\n for (let i = start; i <= end; i++) {\n const { y: top, height } = this._yPositions.getRowPosition(i, heightGetter);\n const style = {\n height,\n top,\n position: 'absolute',\n };\n const itemKey = getKeyFromIndex(i);\n const attrs = { 'data-item-key': itemKey };\n items.push(itemRenderer(itemKey, style, i, attrs));\n }\n const wrapperProps: TWrapperProps = {\n style: { position: 'relative' },\n ref: this._initWrapper,\n };\n if (!this.props.windowScroller) {\n wrapperProps.onScroll = this._onScroll;\n wrapperProps.style.height = '100%';\n wrapperProps.style.overflowY = 'auto';\n }\n const scrollerStyle = {\n position: 'relative' as 'relative',\n height: this._yPositions.getEstimatedHeight(),\n };\n return (\n
\n
\n \n {items}\n
\n
\n \n );\n }\n}\n","// Copyright (c) 2018 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React from 'react';\nimport cx from 'classnames';\nimport IoAndroidOpen from 'react-icons/lib/io/android-open';\nimport { css } from '@emotion/css';\nimport { useStyles2 } from '@grafana/ui';\n\nexport const getStyles = () => {\n return {\n NewWindowIconLarge: css`\n label: NewWindowIconLarge;\n font-size: 1.5em;\n `,\n };\n};\n\ntype Props = {\n isLarge?: boolean;\n className?: string;\n};\n\nexport default function NewWindowIcon(props: Props) {\n const { isLarge, className, ...rest } = props;\n const styles = useStyles2(getStyles);\n const cls = cx({ [styles.NewWindowIconLarge]: isLarge }, className);\n return ;\n}\n\nNewWindowIcon.defaultProps = {\n isLarge: false,\n};\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React, { ReactElement } from 'react';\n\nexport type TooltipPlacement =\n | 'top'\n | 'left'\n | 'right'\n | 'bottom'\n | 'topLeft'\n | 'topRight'\n | 'bottomLeft'\n | 'bottomRight'\n | 'leftTop'\n | 'leftBottom'\n | 'rightTop'\n | 'rightBottom';\nexport type PopoverProps = {\n children: ReactElement;\n content: ReactElement;\n arrowPointAtCenter?: boolean;\n overlayClassName?: string;\n placement?: TooltipPlacement;\n};\n\nexport const UIPopover: React.ComponentType = function UIPopover(props: PopoverProps) {\n return (\n \n {(elements: Elements) => {\n return ;\n }}\n \n );\n};\n\nexport type TooltipProps = {\n title: string | ReactElement;\n getPopupContainer?: (triggerNode: Element) => HTMLElement;\n overlayClassName?: string;\n children: ReactElement;\n placement?: TooltipPlacement;\n mouseLeaveDelay?: number;\n arrowPointAtCenter?: boolean;\n onVisibleChange?: (visible: boolean) => void;\n};\n\nexport const UITooltip: React.ComponentType = function UITooltip(props: TooltipProps) {\n return (\n \n {(elements: Elements) => {\n return ;\n }}\n \n );\n};\n\nexport type IconProps = {\n type: string;\n className?: string;\n onClick?: React.MouseEventHandler;\n};\n\nexport const UIIcon: React.ComponentType = function UIIcon(props: IconProps) {\n return (\n \n {(elements: Elements) => {\n return ;\n }}\n \n );\n};\n\nexport type DropdownProps = {\n overlay: React.ReactNode;\n placement?: 'topLeft' | 'topCenter' | 'topRight' | 'bottomLeft' | 'bottomCenter' | 'bottomRight';\n trigger?: Array<'click' | 'hover' | 'contextMenu'>;\n children?: React.ReactNode;\n};\n\nexport const UIDropdown = function UIDropdown(props: DropdownProps) {\n return (\n \n {(elements: Elements) => {\n return ;\n }}\n \n );\n};\n\nexport type MenuProps = {\n children?: React.ReactNode;\n};\n\nexport const UIMenu = function UIMenu(props: MenuProps) {\n return (\n \n {(elements: Elements) => {\n return ;\n }}\n \n );\n};\n\nexport type MenuItemProps = {\n children?: React.ReactNode;\n};\n\nexport const UIMenuItem = function UIMenuItem(props: MenuItemProps) {\n return (\n \n {(elements: Elements) => {\n return ;\n }}\n \n );\n};\n\nexport type ButtonHTMLType = 'submit' | 'button' | 'reset';\nexport type ButtonProps = {\n children?: React.ReactNode;\n className?: string;\n htmlType?: ButtonHTMLType;\n icon?: string;\n onClick?: React.MouseEventHandler;\n disabled?: boolean;\n};\n\nexport const UIButton = function UIButton(props: ButtonProps) {\n return (\n \n {(elements: Elements) => {\n return ;\n }}\n \n );\n};\n\nexport type DividerProps = {\n className?: string;\n type?: 'vertical' | 'horizontal';\n};\n\nexport const UIDivider = function UIDivider(props: DividerProps) {\n return (\n \n {(elements: Elements) => {\n return ;\n }}\n \n );\n};\n\nexport type InputProps = {\n autosize?: boolean | null;\n placeholder?: string;\n onChange: (value: React.ChangeEvent) => void;\n suffix: React.ReactNode;\n value?: string;\n};\n\nexport const UIInput: React.FC = function UIInput(props: InputProps) {\n return (\n \n {(elements: Elements) => {\n return ;\n }}\n \n );\n};\n\nexport type InputGroupProps = {\n className?: string;\n compact?: boolean;\n style?: React.CSSProperties;\n children?: React.ReactNode;\n};\n\nexport const UIInputGroup = function UIInputGroup(props: InputGroupProps) {\n return (\n \n {(elements: Elements) => {\n return ;\n }}\n \n );\n};\n\nexport type Elements = {\n Popover: React.ComponentType;\n Tooltip: React.ComponentType;\n Icon: React.ComponentType;\n Dropdown: React.ComponentType;\n Menu: React.ComponentType;\n MenuItem: React.ComponentType;\n Button: React.ComponentType;\n Divider: React.ComponentType;\n Input: React.ComponentType;\n InputGroup: React.ComponentType;\n};\n\n/**\n * Allows for injecting custom UI elements that will be used. Mainly for styling and removing dependency on\n * any specific UI library but can also inject specific behaviour.\n */\nconst UIElementsContext = React.createContext(undefined);\nUIElementsContext.displayName = 'UIElementsContext';\nexport default UIElementsContext;\n\ntype GetElementsContextProps = {\n children: (elements: Elements) => React.ReactNode;\n};\n\n/**\n * Convenience render prop style component to handle error state when elements are not defined.\n */\nexport function GetElementsContext(props: GetElementsContextProps) {\n return (\n \n {(value: Elements | undefined) => {\n if (!value) {\n throw new Error('Elements context is required. You probably forget to use UIElementsContext.Provider');\n }\n return props.children(value);\n }}\n \n );\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React from 'react';\n\n/**\n * There are several places where external links to spans are created. The url layout though is something\n * that should be decided on the application level and not on the component level but at the same time\n * propagating the factory function everywhere could be cumbersome so we use this context for that.\n */\nconst ExternalLinkContext = React.createContext<((traceID: string, spanID: string) => string) | undefined>(undefined);\nExternalLinkContext.displayName = 'ExternalLinkContext';\nexport default ExternalLinkContext;\n","// Copyright (c) 2019 The Jaeger Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React from 'react';\nimport { TraceSpanReference } from '../types/trace';\nimport ExternalLinkContext from './externalLinkContext';\n\ntype ReferenceLinkProps = {\n reference: TraceSpanReference;\n children: React.ReactNode;\n className?: string;\n focusSpan: (spanID: string) => void;\n onClick?: () => void;\n};\n\nexport default function ReferenceLink(props: ReferenceLinkProps) {\n const { reference, children, className, focusSpan, ...otherProps } = props;\n delete otherProps.onClick;\n if (reference.span) {\n return (\n focusSpan(reference.spanID)} className={className} {...otherProps}>\n {children}\n \n );\n }\n\n return (\n \n {(createLinkToExternalSpan) => {\n if (!createLinkToExternalSpan) {\n throw new Error(\"ExternalLinkContext does not have a value, you probably forgot to setup it's provider\");\n }\n return (\n \n {children}\n \n );\n }}\n \n );\n}\n","// Copyright (c) 2019 The Jaeger Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React from 'react';\nimport { css } from '@emotion/css';\nimport { stylesFactory } from '@grafana/ui';\n\nimport NewWindowIcon from '../common/NewWindowIcon';\nimport { TraceSpanReference } from '../types/trace';\nimport { UITooltip, UIDropdown, UIMenuItem, UIMenu, TooltipPlacement } from '../uiElementsContext';\nimport ReferenceLink from '../url/ReferenceLink';\n\nexport const getStyles = stylesFactory(() => {\n return {\n MultiParent: css`\n padding: 0 5px;\n color: #000;\n & ~ & {\n margin-left: 5px;\n }\n `,\n TraceRefLink: css`\n display: flex;\n justify-content: space-between;\n `,\n NewWindowIcon: css`\n margin: 0.2em 0 0;\n `,\n tooltip: css`\n max-width: none;\n `,\n };\n});\n\ntype TReferencesButtonProps = {\n references: TraceSpanReference[];\n children: React.ReactNode;\n tooltipText: string;\n focusSpan: (spanID: string) => void;\n};\n\nexport default class ReferencesButton extends React.PureComponent {\n referencesList = (references: TraceSpanReference[]) => {\n const styles = getStyles();\n return (\n \n {references.map((ref) => {\n const { span, spanID } = ref;\n return (\n \n \n {span\n ? `${span.process.serviceName}:${span.operationName} - ${ref.spanID}`\n : `(another trace) - ${ref.spanID}`}\n {!span && }\n \n \n );\n })}\n \n );\n };\n\n render() {\n const { references, children, tooltipText, focusSpan } = this.props;\n const styles = getStyles();\n\n const tooltipProps = {\n arrowPointAtCenter: true,\n mouseLeaveDelay: 0.5,\n placement: 'bottom' as TooltipPlacement,\n title: tooltipText,\n overlayClassName: styles.tooltip,\n };\n\n if (references.length > 1) {\n return (\n \n \n {children}\n \n \n );\n }\n const ref = references[0];\n return (\n \n \n {children}\n \n \n );\n }\n}\n","// Copyright (c) 2019 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { find as _find, get as _get } from 'lodash';\n\nimport { TNil } from '../types';\nimport { TraceSpan } from '../types/trace';\n\nfunction getFirstAncestor(span: TraceSpan): TraceSpan | TNil {\n return _get(\n _find(\n span.references,\n ({ span: ref, refType }) => ref && ref.spanID && (refType === 'CHILD_OF' || refType === 'FOLLOWS_FROM')\n ),\n 'span'\n );\n}\n\nexport default function spanAncestorIds(span: TraceSpan | TNil): string[] {\n const ancestorIDs: string[] = [];\n if (!span) {\n return ancestorIDs;\n }\n let ref = getFirstAncestor(span);\n while (ref) {\n ancestorIDs.push(ref.spanID);\n ref = getFirstAncestor(ref);\n }\n return ancestorIDs;\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React from 'react';\nimport { get as _get } from 'lodash';\nimport IoChevronRight from 'react-icons/lib/io/chevron-right';\nimport IoIosArrowDown from 'react-icons/lib/io/ios-arrow-down';\nimport { css } from '@emotion/css';\nimport cx from 'classnames';\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { stylesFactory, withTheme2 } from '@grafana/ui';\n\nimport { TraceSpan } from '../types/trace';\nimport spanAncestorIds from '../utils/span-ancestor-ids';\nimport { autoColor } from '../Theme';\n\nexport const getStyles = stylesFactory((theme: GrafanaTheme2) => {\n return {\n SpanTreeOffset: css`\n label: SpanTreeOffset;\n color: ${autoColor(theme, '#000')};\n position: relative;\n `,\n SpanTreeOffsetParent: css`\n label: SpanTreeOffsetParent;\n &:hover {\n cursor: pointer;\n }\n `,\n indentGuide: css`\n label: indentGuide;\n /* The size of the indentGuide is based off of the iconWrapper */\n padding-right: calc(0.5rem + 12px);\n height: 100%;\n border-left: 3px solid transparent;\n display: inline-flex;\n &::before {\n content: '';\n padding-left: 1px;\n background-color: ${autoColor(theme, 'lightgrey')};\n }\n `,\n indentGuideActive: css`\n label: indentGuideActive;\n border-color: ${autoColor(theme, 'darkgrey')};\n &::before {\n background-color: transparent;\n }\n `,\n iconWrapper: css`\n label: iconWrapper;\n position: absolute;\n right: 0.25rem;\n `,\n };\n});\n\ntype TProps = {\n childrenVisible?: boolean;\n onClick?: () => void;\n span: TraceSpan;\n showChildrenIcon?: boolean;\n\n hoverIndentGuideIds: Set;\n addHoverIndentGuideId: (spanID: string) => void;\n removeHoverIndentGuideId: (spanID: string) => void;\n theme: GrafanaTheme2;\n};\n\nexport class UnthemedSpanTreeOffset extends React.PureComponent {\n static displayName = 'UnthemedSpanTreeOffset';\n\n ancestorIds: string[];\n\n static defaultProps = {\n childrenVisible: false,\n showChildrenIcon: true,\n };\n\n constructor(props: TProps) {\n super(props);\n\n this.ancestorIds = spanAncestorIds(props.span);\n // Some traces have multiple root-level spans, this connects them all under one guideline and adds the\n // necessary padding for the collapse icon on root-level spans.\n this.ancestorIds.push('root');\n\n this.ancestorIds.reverse();\n }\n\n /**\n * If the mouse leaves to anywhere except another span with the same ancestor id, this span's ancestor id is\n * removed from the set of hoverIndentGuideIds.\n *\n * @param {Object} event - React Synthetic event tied to mouseleave. Includes the related target which is\n * the element the user is now hovering.\n * @param {string} ancestorId - The span id that the user was hovering over.\n */\n handleMouseLeave = (event: React.MouseEvent, ancestorId: string) => {\n if (\n !(event.relatedTarget instanceof HTMLSpanElement) ||\n _get(event, 'relatedTarget.dataset.ancestorId') !== ancestorId\n ) {\n this.props.removeHoverIndentGuideId(ancestorId);\n }\n };\n\n /**\n * If the mouse entered this span from anywhere except another span with the same ancestor id, this span's\n * ancestorId is added to the set of hoverIndentGuideIds.\n *\n * @param {Object} event - React Synthetic event tied to mouseenter. Includes the related target which is\n * the last element the user was hovering.\n * @param {string} ancestorId - The span id that the user is now hovering over.\n */\n handleMouseEnter = (event: React.MouseEvent, ancestorId: string) => {\n if (\n !(event.relatedTarget instanceof HTMLSpanElement) ||\n _get(event, 'relatedTarget.dataset.ancestorId') !== ancestorId\n ) {\n this.props.addHoverIndentGuideId(ancestorId);\n }\n };\n\n render() {\n const { childrenVisible, onClick, showChildrenIcon, span, theme } = this.props;\n const { hasChildren, spanID } = span;\n const wrapperProps = hasChildren ? { onClick, role: 'switch', 'aria-checked': childrenVisible } : null;\n const icon = showChildrenIcon && hasChildren && (childrenVisible ? : );\n const styles = getStyles(theme);\n return (\n \n {this.ancestorIds.map((ancestorId) => (\n this.handleMouseEnter(event, ancestorId)}\n onMouseLeave={(event) => this.handleMouseLeave(event, ancestorId)}\n />\n ))}\n {icon && (\n this.handleMouseEnter(event, spanID)}\n onMouseLeave={(event) => this.handleMouseLeave(event, spanID)}\n data-test-id=\"icon-wrapper\"\n >\n {icon}\n \n )}\n \n );\n }\n}\n\nexport default withTheme2(UnthemedSpanTreeOffset);\n","import React, { createFactory, Component, createElement } from 'react';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport shallowEqual from 'fbjs/lib/shallowEqual';\nimport _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport { polyfill } from 'react-lifecycles-compat';\nimport _objectWithoutPropertiesLoose from '@babel/runtime/helpers/esm/objectWithoutPropertiesLoose';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport { createChangeEmitter } from 'change-emitter';\nimport $$observable from 'symbol-observable';\n\nvar setStatic = function setStatic(key, value) {\n return function (BaseComponent) {\n /* eslint-disable no-param-reassign */\n BaseComponent[key] = value;\n /* eslint-enable no-param-reassign */\n\n return BaseComponent;\n };\n};\n\nvar setDisplayName = function setDisplayName(displayName) {\n return setStatic('displayName', displayName);\n};\n\nvar getDisplayName = function getDisplayName(Component$$1) {\n if (typeof Component$$1 === 'string') {\n return Component$$1;\n }\n\n if (!Component$$1) {\n return undefined;\n }\n\n return Component$$1.displayName || Component$$1.name || 'Component';\n};\n\nvar wrapDisplayName = function wrapDisplayName(BaseComponent, hocName) {\n return hocName + \"(\" + getDisplayName(BaseComponent) + \")\";\n};\n\nvar mapProps = function mapProps(propsMapper) {\n return function (BaseComponent) {\n var factory = createFactory(BaseComponent);\n\n var MapProps = function MapProps(props) {\n return factory(propsMapper(props));\n };\n\n if (process.env.NODE_ENV !== 'production') {\n return setDisplayName(wrapDisplayName(BaseComponent, 'mapProps'))(MapProps);\n }\n\n return MapProps;\n };\n};\n\nvar withProps = function withProps(input) {\n var hoc = mapProps(function (props) {\n return _extends({}, props, typeof input === 'function' ? input(props) : input);\n });\n\n if (process.env.NODE_ENV !== 'production') {\n return function (BaseComponent) {\n return setDisplayName(wrapDisplayName(BaseComponent, 'withProps'))(hoc(BaseComponent));\n };\n }\n\n return hoc;\n};\n\nvar pick = function pick(obj, keys) {\n var result = {};\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (obj.hasOwnProperty(key)) {\n result[key] = obj[key];\n }\n }\n\n return result;\n};\n\nvar withPropsOnChange = function withPropsOnChange(shouldMapOrKeys, propsMapper) {\n return function (BaseComponent) {\n var factory = createFactory(BaseComponent);\n var shouldMap = typeof shouldMapOrKeys === 'function' ? shouldMapOrKeys : function (props, nextProps) {\n return !shallowEqual(pick(props, shouldMapOrKeys), pick(nextProps, shouldMapOrKeys));\n };\n\n var WithPropsOnChange =\n /*#__PURE__*/\n function (_Component) {\n _inheritsLoose(WithPropsOnChange, _Component);\n\n function WithPropsOnChange() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _Component.call.apply(_Component, [this].concat(args)) || this;\n _this.state = {\n computedProps: propsMapper(_this.props),\n prevProps: _this.props\n };\n return _this;\n }\n\n WithPropsOnChange.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {\n if (shouldMap(prevState.prevProps, nextProps)) {\n return {\n computedProps: propsMapper(nextProps),\n prevProps: nextProps\n };\n }\n\n return {\n prevProps: nextProps\n };\n };\n\n var _proto = WithPropsOnChange.prototype;\n\n _proto.render = function render() {\n return factory(_extends({}, this.props, this.state.computedProps));\n };\n\n return WithPropsOnChange;\n }(Component);\n\n polyfill(WithPropsOnChange);\n\n if (process.env.NODE_ENV !== 'production') {\n return setDisplayName(wrapDisplayName(BaseComponent, 'withPropsOnChange'))(WithPropsOnChange);\n }\n\n return WithPropsOnChange;\n };\n};\n\nvar mapValues = function mapValues(obj, func) {\n var result = {};\n /* eslint-disable no-restricted-syntax */\n\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n result[key] = func(obj[key], key);\n }\n }\n /* eslint-enable no-restricted-syntax */\n\n\n return result;\n};\n\nvar withHandlers = function withHandlers(handlers) {\n return function (BaseComponent) {\n var factory = createFactory(BaseComponent);\n\n var WithHandlers =\n /*#__PURE__*/\n function (_Component) {\n _inheritsLoose(WithHandlers, _Component);\n\n function WithHandlers() {\n var _this;\n\n for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {\n _args[_key] = arguments[_key];\n }\n\n _this = _Component.call.apply(_Component, [this].concat(_args)) || this;\n _this.handlers = mapValues(typeof handlers === 'function' ? handlers(_this.props) : handlers, function (createHandler) {\n return function () {\n var handler = createHandler(_this.props);\n\n if (process.env.NODE_ENV !== 'production' && typeof handler !== 'function') {\n console.error( // eslint-disable-line no-console\n 'withHandlers(): Expected a map of higher-order functions. ' + 'Refer to the docs for more info.');\n }\n\n return handler.apply(void 0, arguments);\n };\n });\n return _this;\n }\n\n var _proto = WithHandlers.prototype;\n\n _proto.render = function render() {\n return factory(_extends({}, this.props, this.handlers));\n };\n\n return WithHandlers;\n }(Component);\n\n if (process.env.NODE_ENV !== 'production') {\n return setDisplayName(wrapDisplayName(BaseComponent, 'withHandlers'))(WithHandlers);\n }\n\n return WithHandlers;\n };\n};\n\nvar defaultProps = function defaultProps(props) {\n return function (BaseComponent) {\n var factory = createFactory(BaseComponent);\n\n var DefaultProps = function DefaultProps(ownerProps) {\n return factory(ownerProps);\n };\n\n DefaultProps.defaultProps = props;\n\n if (process.env.NODE_ENV !== 'production') {\n return setDisplayName(wrapDisplayName(BaseComponent, 'defaultProps'))(DefaultProps);\n }\n\n return DefaultProps;\n };\n};\n\nvar omit = function omit(obj, keys) {\n var rest = _extends({}, obj);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (rest.hasOwnProperty(key)) {\n delete rest[key];\n }\n }\n\n return rest;\n};\n\nvar renameProp = function renameProp(oldName, newName) {\n var hoc = mapProps(function (props) {\n var _extends2;\n\n return _extends({}, omit(props, [oldName]), (_extends2 = {}, _extends2[newName] = props[oldName], _extends2));\n });\n\n if (process.env.NODE_ENV !== 'production') {\n return function (BaseComponent) {\n return setDisplayName(wrapDisplayName(BaseComponent, 'renameProp'))(hoc(BaseComponent));\n };\n }\n\n return hoc;\n};\n\nvar keys = Object.keys;\n\nvar mapKeys = function mapKeys(obj, func) {\n return keys(obj).reduce(function (result, key) {\n var val = obj[key];\n /* eslint-disable no-param-reassign */\n\n result[func(val, key)] = val;\n /* eslint-enable no-param-reassign */\n\n return result;\n }, {});\n};\n\nvar renameProps = function renameProps(nameMap) {\n var hoc = mapProps(function (props) {\n return _extends({}, omit(props, keys(nameMap)), mapKeys(pick(props, keys(nameMap)), function (_, oldName) {\n return nameMap[oldName];\n }));\n });\n\n if (process.env.NODE_ENV !== 'production') {\n return function (BaseComponent) {\n return setDisplayName(wrapDisplayName(BaseComponent, 'renameProps'))(hoc(BaseComponent));\n };\n }\n\n return hoc;\n};\n\nvar flattenProp = function flattenProp(propName) {\n return function (BaseComponent) {\n var factory = createFactory(BaseComponent);\n\n var FlattenProp = function FlattenProp(props) {\n return factory(_extends({}, props, props[propName]));\n };\n\n if (process.env.NODE_ENV !== 'production') {\n return setDisplayName(wrapDisplayName(BaseComponent, 'flattenProp'))(FlattenProp);\n }\n\n return FlattenProp;\n };\n};\n\nvar withState = function withState(stateName, stateUpdaterName, initialState) {\n return function (BaseComponent) {\n var factory = createFactory(BaseComponent);\n\n var WithState =\n /*#__PURE__*/\n function (_Component) {\n _inheritsLoose(WithState, _Component);\n\n function WithState() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _Component.call.apply(_Component, [this].concat(args)) || this;\n _this.state = {\n stateValue: typeof initialState === 'function' ? initialState(_this.props) : initialState\n };\n\n _this.updateStateValue = function (updateFn, callback) {\n return _this.setState(function (_ref) {\n var stateValue = _ref.stateValue;\n return {\n stateValue: typeof updateFn === 'function' ? updateFn(stateValue) : updateFn\n };\n }, callback);\n };\n\n return _this;\n }\n\n var _proto = WithState.prototype;\n\n _proto.render = function render() {\n var _extends2;\n\n return factory(_extends({}, this.props, (_extends2 = {}, _extends2[stateName] = this.state.stateValue, _extends2[stateUpdaterName] = this.updateStateValue, _extends2)));\n };\n\n return WithState;\n }(Component);\n\n if (process.env.NODE_ENV !== 'production') {\n return setDisplayName(wrapDisplayName(BaseComponent, 'withState'))(WithState);\n }\n\n return WithState;\n };\n};\n\nvar withStateHandlers = function withStateHandlers(initialState, stateUpdaters) {\n return function (BaseComponent) {\n var factory = createFactory(BaseComponent);\n\n var WithStateHandlers =\n /*#__PURE__*/\n function (_Component) {\n _inheritsLoose(WithStateHandlers, _Component);\n\n function WithStateHandlers() {\n var _this;\n\n for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {\n _args[_key] = arguments[_key];\n }\n\n _this = _Component.call.apply(_Component, [this].concat(_args)) || this;\n _this.state = typeof initialState === 'function' ? initialState(_this.props) : initialState;\n _this.stateUpdaters = mapValues(stateUpdaters, function (handler) {\n return function (mayBeEvent) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n // Having that functional form of setState can be called async\n // we need to persist SyntheticEvent\n if (mayBeEvent && typeof mayBeEvent.persist === 'function') {\n mayBeEvent.persist();\n }\n\n _this.setState(function (state, props) {\n return handler(state, props).apply(void 0, [mayBeEvent].concat(args));\n });\n };\n });\n return _this;\n }\n\n var _proto = WithStateHandlers.prototype;\n\n _proto.render = function render() {\n return factory(_extends({}, this.props, this.state, this.stateUpdaters));\n };\n\n return WithStateHandlers;\n }(Component);\n\n if (process.env.NODE_ENV !== 'production') {\n return setDisplayName(wrapDisplayName(BaseComponent, 'withStateHandlers'))(WithStateHandlers);\n }\n\n return WithStateHandlers;\n };\n};\n\nvar noop = function noop() {};\n\nvar withReducer = function withReducer(stateName, dispatchName, reducer, initialState) {\n return function (BaseComponent) {\n var factory = createFactory(BaseComponent);\n\n var WithReducer =\n /*#__PURE__*/\n function (_Component) {\n _inheritsLoose(WithReducer, _Component);\n\n function WithReducer() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _Component.call.apply(_Component, [this].concat(args)) || this;\n _this.state = {\n stateValue: _this.initializeStateValue()\n };\n\n _this.dispatch = function (action, callback) {\n if (callback === void 0) {\n callback = noop;\n }\n\n return _this.setState(function (_ref) {\n var stateValue = _ref.stateValue;\n return {\n stateValue: reducer(stateValue, action)\n };\n }, function () {\n return callback(_this.state.stateValue);\n });\n };\n\n return _this;\n }\n\n var _proto = WithReducer.prototype;\n\n _proto.initializeStateValue = function initializeStateValue() {\n if (initialState !== undefined) {\n return typeof initialState === 'function' ? initialState(this.props) : initialState;\n }\n\n return reducer(undefined, {\n type: '@@recompose/INIT'\n });\n };\n\n _proto.render = function render() {\n var _extends2;\n\n return factory(_extends({}, this.props, (_extends2 = {}, _extends2[stateName] = this.state.stateValue, _extends2[dispatchName] = this.dispatch, _extends2)));\n };\n\n return WithReducer;\n }(Component);\n\n if (process.env.NODE_ENV !== 'production') {\n return setDisplayName(wrapDisplayName(BaseComponent, 'withReducer'))(WithReducer);\n }\n\n return WithReducer;\n };\n};\n\nvar identity = function identity(Component$$1) {\n return Component$$1;\n};\n\nvar branch = function branch(test, left, right) {\n if (right === void 0) {\n right = identity;\n }\n\n return function (BaseComponent) {\n var leftFactory;\n var rightFactory;\n\n var Branch = function Branch(props) {\n if (test(props)) {\n leftFactory = leftFactory || createFactory(left(BaseComponent));\n return leftFactory(props);\n }\n\n rightFactory = rightFactory || createFactory(right(BaseComponent));\n return rightFactory(props);\n };\n\n if (process.env.NODE_ENV !== 'production') {\n return setDisplayName(wrapDisplayName(BaseComponent, 'branch'))(Branch);\n }\n\n return Branch;\n };\n};\n\nvar renderComponent = function renderComponent(Component$$1) {\n return function (_) {\n var factory = createFactory(Component$$1);\n\n var RenderComponent = function RenderComponent(props) {\n return factory(props);\n };\n\n if (process.env.NODE_ENV !== 'production') {\n RenderComponent.displayName = wrapDisplayName(Component$$1, 'renderComponent');\n }\n\n return RenderComponent;\n };\n};\n\nvar Nothing =\n/*#__PURE__*/\nfunction (_Component) {\n _inheritsLoose(Nothing, _Component);\n\n function Nothing() {\n return _Component.apply(this, arguments) || this;\n }\n\n var _proto = Nothing.prototype;\n\n _proto.render = function render() {\n return null;\n };\n\n return Nothing;\n}(Component);\n\nvar renderNothing = function renderNothing(_) {\n return Nothing;\n};\n\nvar shouldUpdate = function shouldUpdate(test) {\n return function (BaseComponent) {\n var factory = createFactory(BaseComponent);\n\n var ShouldUpdate =\n /*#__PURE__*/\n function (_Component) {\n _inheritsLoose(ShouldUpdate, _Component);\n\n function ShouldUpdate() {\n return _Component.apply(this, arguments) || this;\n }\n\n var _proto = ShouldUpdate.prototype;\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n return test(this.props, nextProps);\n };\n\n _proto.render = function render() {\n return factory(this.props);\n };\n\n return ShouldUpdate;\n }(Component);\n\n if (process.env.NODE_ENV !== 'production') {\n return setDisplayName(wrapDisplayName(BaseComponent, 'shouldUpdate'))(ShouldUpdate);\n }\n\n return ShouldUpdate;\n };\n};\n\nvar pure = function pure(BaseComponent) {\n var hoc = shouldUpdate(function (props, nextProps) {\n return !shallowEqual(props, nextProps);\n });\n\n if (process.env.NODE_ENV !== 'production') {\n return setDisplayName(wrapDisplayName(BaseComponent, 'pure'))(hoc(BaseComponent));\n }\n\n return hoc(BaseComponent);\n};\n\nvar onlyUpdateForKeys = function onlyUpdateForKeys(propKeys) {\n var hoc = shouldUpdate(function (props, nextProps) {\n return !shallowEqual(pick(nextProps, propKeys), pick(props, propKeys));\n });\n\n if (process.env.NODE_ENV !== 'production') {\n return function (BaseComponent) {\n return setDisplayName(wrapDisplayName(BaseComponent, 'onlyUpdateForKeys'))(hoc(BaseComponent));\n };\n }\n\n return hoc;\n};\n\nvar onlyUpdateForPropTypes = function onlyUpdateForPropTypes(BaseComponent) {\n var propTypes = BaseComponent.propTypes;\n\n if (process.env.NODE_ENV !== 'production') {\n if (!propTypes) {\n /* eslint-disable */\n console.error('A component without any `propTypes` was passed to ' + '`onlyUpdateForPropTypes()`. Check the implementation of the ' + (\"component with display name \\\"\" + getDisplayName(BaseComponent) + \"\\\".\"));\n /* eslint-enable */\n }\n }\n\n var propKeys = Object.keys(propTypes || {});\n var OnlyUpdateForPropTypes = onlyUpdateForKeys(propKeys)(BaseComponent);\n\n if (process.env.NODE_ENV !== 'production') {\n return setDisplayName(wrapDisplayName(BaseComponent, 'onlyUpdateForPropTypes'))(OnlyUpdateForPropTypes);\n }\n\n return OnlyUpdateForPropTypes;\n};\n\nvar withContext = function withContext(childContextTypes, getChildContext) {\n return function (BaseComponent) {\n var factory = createFactory(BaseComponent);\n\n var WithContext =\n /*#__PURE__*/\n function (_Component) {\n _inheritsLoose(WithContext, _Component);\n\n function WithContext() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _Component.call.apply(_Component, [this].concat(args)) || this;\n\n _this.getChildContext = function () {\n return getChildContext(_this.props);\n };\n\n return _this;\n }\n\n var _proto = WithContext.prototype;\n\n _proto.render = function render() {\n return factory(this.props);\n };\n\n return WithContext;\n }(Component);\n\n WithContext.childContextTypes = childContextTypes;\n\n if (process.env.NODE_ENV !== 'production') {\n return setDisplayName(wrapDisplayName(BaseComponent, 'withContext'))(WithContext);\n }\n\n return WithContext;\n };\n};\n\nvar getContext = function getContext(contextTypes) {\n return function (BaseComponent) {\n var factory = createFactory(BaseComponent);\n\n var GetContext = function GetContext(ownerProps, context) {\n return factory(_extends({}, ownerProps, context));\n };\n\n GetContext.contextTypes = contextTypes;\n\n if (process.env.NODE_ENV !== 'production') {\n return setDisplayName(wrapDisplayName(BaseComponent, 'getContext'))(GetContext);\n }\n\n return GetContext;\n };\n};\n\nvar lifecycle = function lifecycle(spec) {\n return function (BaseComponent) {\n var factory = createFactory(BaseComponent);\n\n if (process.env.NODE_ENV !== 'production' && spec.hasOwnProperty('render')) {\n console.error('lifecycle() does not support the render method; its behavior is to ' + 'pass all props and state to the base component.');\n }\n\n var Lifecycle =\n /*#__PURE__*/\n function (_Component) {\n _inheritsLoose(Lifecycle, _Component);\n\n function Lifecycle() {\n return _Component.apply(this, arguments) || this;\n }\n\n var _proto = Lifecycle.prototype;\n\n _proto.render = function render() {\n return factory(_extends({}, this.props, this.state));\n };\n\n return Lifecycle;\n }(Component);\n\n Object.keys(spec).forEach(function (hook) {\n return Lifecycle.prototype[hook] = spec[hook];\n });\n\n if (process.env.NODE_ENV !== 'production') {\n return setDisplayName(wrapDisplayName(BaseComponent, 'lifecycle'))(Lifecycle);\n }\n\n return Lifecycle;\n };\n};\n\nvar isClassComponent = function isClassComponent(Component$$1) {\n return Boolean(Component$$1 && Component$$1.prototype && typeof Component$$1.prototype.render === 'function');\n};\n\nvar toClass = function toClass(baseComponent) {\n var _class, _temp;\n\n return isClassComponent(baseComponent) ? baseComponent : (_temp = _class =\n /*#__PURE__*/\n function (_Component) {\n _inheritsLoose(ToClass, _Component);\n\n function ToClass() {\n return _Component.apply(this, arguments) || this;\n }\n\n var _proto = ToClass.prototype;\n\n _proto.render = function render() {\n if (typeof baseComponent === 'string') {\n return React.createElement(baseComponent, this.props);\n }\n\n return baseComponent(this.props, this.context);\n };\n\n return ToClass;\n }(Component), _class.displayName = getDisplayName(baseComponent), _class.propTypes = baseComponent.propTypes, _class.contextTypes = baseComponent.contextTypes, _class.defaultProps = baseComponent.defaultProps, _temp);\n};\n\nfunction toRenderProps(hoc) {\n var RenderPropsComponent = function RenderPropsComponent(props) {\n return props.children(props);\n };\n\n return hoc(RenderPropsComponent);\n}\n\nvar fromRenderProps = function fromRenderProps(RenderPropsComponent, propsMapper, renderPropName) {\n if (renderPropName === void 0) {\n renderPropName = 'children';\n }\n\n return function (BaseComponent) {\n var baseFactory = React.createFactory(BaseComponent);\n var renderPropsFactory = React.createFactory(RenderPropsComponent);\n\n var FromRenderProps = function FromRenderProps(ownerProps) {\n var _renderPropsFactory;\n\n return renderPropsFactory((_renderPropsFactory = {}, _renderPropsFactory[renderPropName] = function () {\n return baseFactory(_extends({}, ownerProps, propsMapper.apply(void 0, arguments)));\n }, _renderPropsFactory));\n };\n\n if (process.env.NODE_ENV !== 'production') {\n return setDisplayName(wrapDisplayName(BaseComponent, 'fromRenderProps'))(FromRenderProps);\n }\n\n return FromRenderProps;\n };\n};\n\nvar setPropTypes = function setPropTypes(propTypes) {\n return setStatic('propTypes', propTypes);\n};\n\nvar compose = function compose() {\n for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n return funcs.reduce(function (a, b) {\n return function () {\n return a(b.apply(void 0, arguments));\n };\n }, function (arg) {\n return arg;\n });\n};\n\nvar createSink = function createSink(callback) {\n var Sink =\n /*#__PURE__*/\n function (_Component) {\n _inheritsLoose(Sink, _Component);\n\n function Sink() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _Component.call.apply(_Component, [this].concat(args)) || this;\n _this.state = {};\n return _this;\n }\n\n Sink.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps) {\n callback(nextProps);\n return null;\n };\n\n var _proto = Sink.prototype;\n\n _proto.render = function render() {\n return null;\n };\n\n return Sink;\n }(Component);\n\n polyfill(Sink);\n return Sink;\n};\n\nvar componentFromProp = function componentFromProp(propName) {\n var Component$$1 = function Component$$1(props) {\n return createElement(props[propName], omit(props, [propName]));\n };\n\n Component$$1.displayName = \"componentFromProp(\" + propName + \")\";\n return Component$$1;\n};\n\nvar nest = function nest() {\n for (var _len = arguments.length, Components = new Array(_len), _key = 0; _key < _len; _key++) {\n Components[_key] = arguments[_key];\n }\n\n var factories = Components.map(createFactory);\n\n var Nest = function Nest(_ref) {\n var children = _ref.children,\n props = _objectWithoutPropertiesLoose(_ref, [\"children\"]);\n\n return factories.reduceRight(function (child, factory) {\n return factory(props, child);\n }, children);\n };\n\n if (process.env.NODE_ENV !== 'production') {\n var displayNames = Components.map(getDisplayName);\n Nest.displayName = \"nest(\" + displayNames.join(', ') + \")\";\n }\n\n return Nest;\n};\n\nvar hoistStatics = function hoistStatics(higherOrderComponent, blacklist) {\n return function (BaseComponent) {\n var NewComponent = higherOrderComponent(BaseComponent);\n hoistNonReactStatics(NewComponent, BaseComponent, blacklist);\n return NewComponent;\n };\n};\n\nvar _config = {\n fromESObservable: null,\n toESObservable: null\n};\n\nvar configureObservable = function configureObservable(c) {\n _config = c;\n};\n\nvar config = {\n fromESObservable: function fromESObservable(observable) {\n return typeof _config.fromESObservable === 'function' ? _config.fromESObservable(observable) : observable;\n },\n toESObservable: function toESObservable(stream) {\n return typeof _config.toESObservable === 'function' ? _config.toESObservable(stream) : stream;\n }\n};\n\nvar componentFromStreamWithConfig = function componentFromStreamWithConfig(config$$1) {\n return function (propsToVdom) {\n return (\n /*#__PURE__*/\n function (_Component) {\n _inheritsLoose(ComponentFromStream, _Component);\n\n function ComponentFromStream() {\n var _config$fromESObserva;\n\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _Component.call.apply(_Component, [this].concat(args)) || this;\n _this.state = {\n vdom: null\n };\n _this.propsEmitter = createChangeEmitter();\n _this.props$ = config$$1.fromESObservable((_config$fromESObserva = {\n subscribe: function subscribe(observer) {\n var unsubscribe = _this.propsEmitter.listen(function (props) {\n if (props) {\n observer.next(props);\n } else {\n observer.complete();\n }\n });\n\n return {\n unsubscribe: unsubscribe\n };\n }\n }, _config$fromESObserva[$$observable] = function () {\n return this;\n }, _config$fromESObserva));\n _this.vdom$ = config$$1.toESObservable(propsToVdom(_this.props$));\n return _this;\n }\n\n var _proto = ComponentFromStream.prototype;\n\n _proto.componentWillMount = function componentWillMount() {\n var _this2 = this;\n\n // Subscribe to child prop changes so we know when to re-render\n this.subscription = this.vdom$.subscribe({\n next: function next(vdom) {\n _this2.setState({\n vdom: vdom\n });\n }\n });\n this.propsEmitter.emit(this.props);\n };\n\n _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n // Receive new props from the owner\n this.propsEmitter.emit(nextProps);\n };\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps, nextState) {\n return nextState.vdom !== this.state.vdom;\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n // Call without arguments to complete stream\n this.propsEmitter.emit(); // Clean-up subscription before un-mounting\n\n this.subscription.unsubscribe();\n };\n\n _proto.render = function render() {\n return this.state.vdom;\n };\n\n return ComponentFromStream;\n }(Component)\n );\n };\n};\n\nvar componentFromStream = function componentFromStream(propsToVdom) {\n return componentFromStreamWithConfig(config)(propsToVdom);\n};\n\nvar identity$1 = function identity(t) {\n return t;\n};\n\nvar mapPropsStreamWithConfig = function mapPropsStreamWithConfig(config$$1) {\n var componentFromStream$$1 = componentFromStreamWithConfig({\n fromESObservable: identity$1,\n toESObservable: identity$1\n });\n return function (transform) {\n return function (BaseComponent) {\n var factory = createFactory(BaseComponent);\n var fromESObservable = config$$1.fromESObservable,\n toESObservable = config$$1.toESObservable;\n return componentFromStream$$1(function (props$) {\n var _ref;\n\n return _ref = {\n subscribe: function subscribe(observer) {\n var subscription = toESObservable(transform(fromESObservable(props$))).subscribe({\n next: function next(childProps) {\n return observer.next(factory(childProps));\n }\n });\n return {\n unsubscribe: function unsubscribe() {\n return subscription.unsubscribe();\n }\n };\n }\n }, _ref[$$observable] = function () {\n return this;\n }, _ref;\n });\n };\n };\n};\n\nvar mapPropsStream = function mapPropsStream(transform) {\n var hoc = mapPropsStreamWithConfig(config)(transform);\n\n if (process.env.NODE_ENV !== 'production') {\n return function (BaseComponent) {\n return setDisplayName(wrapDisplayName(BaseComponent, 'mapPropsStream'))(hoc(BaseComponent));\n };\n }\n\n return hoc;\n};\n\nvar createEventHandlerWithConfig = function createEventHandlerWithConfig(config$$1) {\n return function () {\n var _config$fromESObserva;\n\n var emitter = createChangeEmitter();\n var stream = config$$1.fromESObservable((_config$fromESObserva = {\n subscribe: function subscribe(observer) {\n var unsubscribe = emitter.listen(function (value) {\n return observer.next(value);\n });\n return {\n unsubscribe: unsubscribe\n };\n }\n }, _config$fromESObserva[$$observable] = function () {\n return this;\n }, _config$fromESObserva));\n return {\n handler: emitter.emit,\n stream: stream\n };\n };\n};\nvar createEventHandler = createEventHandlerWithConfig(config);\n\n// Higher-order component helpers\n\nexport { mapProps, withProps, withPropsOnChange, withHandlers, defaultProps, renameProp, renameProps, flattenProp, withState, withStateHandlers, withReducer, branch, renderComponent, renderNothing, shouldUpdate, pure, onlyUpdateForKeys, onlyUpdateForPropTypes, withContext, getContext, lifecycle, toClass, toRenderProps, fromRenderProps, setStatic, setPropTypes, setDisplayName, compose, getDisplayName, wrapDisplayName, shallowEqual, isClassComponent, createSink, componentFromProp, nest, hoistStatics, componentFromStream, componentFromStreamWithConfig, mapPropsStream, mapPropsStreamWithConfig, createEventHandler, createEventHandlerWithConfig, configureObservable as setObservableConfig };\n","// Copyright (c) 2019 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { css } from '@emotion/css';\nimport cx from 'classnames';\nimport copy from 'copy-to-clipboard';\nimport { stylesFactory } from '@grafana/ui';\n\nimport { UITooltip, TooltipPlacement, UIButton } from '../uiElementsContext';\n\nconst getStyles = stylesFactory(() => {\n return {\n CopyIcon: css`\n background-color: transparent;\n border: none;\n color: inherit;\n height: 100%;\n overflow: hidden;\n padding: 0px;\n &:focus {\n background-color: rgba(255, 255, 255, 0.25);\n color: inherit;\n }\n `,\n };\n});\n\ntype PropsType = {\n className?: string;\n copyText: string;\n icon?: string;\n placement?: TooltipPlacement;\n tooltipTitle: string;\n};\n\ntype StateType = {\n hasCopied: boolean;\n};\n\nexport default class CopyIcon extends React.PureComponent {\n static defaultProps: Partial = {\n className: undefined,\n icon: 'copy',\n placement: 'left',\n };\n\n state = {\n hasCopied: false,\n };\n\n handleClick = () => {\n this.setState({\n hasCopied: true,\n });\n copy(this.props.copyText);\n };\n\n handleTooltipVisibilityChange = (visible: boolean) => {\n if (!visible && this.state.hasCopied) {\n this.setState({\n hasCopied: false,\n });\n }\n };\n\n render() {\n const styles = getStyles();\n return (\n \n \n \n );\n }\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport jsonMarkup from 'json-markup';\nimport { css } from '@emotion/css';\nimport cx from 'classnames';\nimport { useStyles2 } from '@grafana/ui';\nimport { GrafanaTheme2 } from '@grafana/data';\n\nimport CopyIcon from '../../common/CopyIcon';\nimport { TNil } from '../../types';\nimport { TraceKeyValuePair, TraceLink } from '../../types/trace';\nimport { UIDropdown, UIIcon, UIMenu, UIMenuItem } from '../../uiElementsContext';\nimport { autoColor } from '../../Theme';\nimport { ubInlineBlock, uWidth100 } from '../../uberUtilityStyles';\n\nconst copyIconClassName = 'copyIcon';\n\nexport const getStyles = (theme: GrafanaTheme2) => {\n return {\n KeyValueTable: css`\n label: KeyValueTable;\n background: ${autoColor(theme, '#fff')};\n border: 1px solid ${autoColor(theme, '#ddd')};\n margin-bottom: 0.7em;\n max-height: 450px;\n overflow: auto;\n `,\n body: css`\n label: body;\n vertical-align: baseline;\n `,\n row: css`\n label: row;\n & > td {\n padding: 0.25rem 0.5rem;\n padding: 0.25rem 0.5rem;\n vertical-align: top;\n }\n &:nth-child(2n) > td {\n background: ${autoColor(theme, '#f5f5f5')};\n }\n &:not(:hover) .${copyIconClassName} {\n visibility: hidden;\n }\n `,\n keyColumn: css`\n label: keyColumn;\n color: ${autoColor(theme, '#888')};\n white-space: pre;\n width: 125px;\n `,\n copyColumn: css`\n label: copyColumn;\n text-align: right;\n `,\n linkIcon: css`\n label: linkIcon;\n vertical-align: middle;\n font-weight: bold;\n `,\n };\n};\n\nconst jsonObjectOrArrayStartRegex = /^(\\[|\\{)/;\n\nfunction parseIfComplexJson(value: any) {\n // if the value is a string representing actual json object or array, then use json-markup\n if (typeof value === 'string' && jsonObjectOrArrayStartRegex.test(value)) {\n // otherwise just return as is\n try {\n return JSON.parse(value);\n // eslint-disable-next-line no-empty\n } catch (_) {}\n }\n return value;\n}\n\nexport const LinkValue = (props: { href: string; title?: string; children: React.ReactNode }) => {\n const styles = useStyles2(getStyles);\n return (\n \n {props.children} \n \n );\n};\n\nLinkValue.defaultProps = {\n title: '',\n};\n\nconst linkValueList = (links: TraceLink[]) => (\n \n {links.map(({ text, url }, index) => (\n // `index` is necessary in the key because url can repeat\n \n {text}\n \n ))}\n \n);\n\ntype KeyValuesTableProps = {\n data: TraceKeyValuePair[];\n linksGetter: ((pairs: TraceKeyValuePair[], index: number) => TraceLink[]) | TNil;\n};\n\nexport default function KeyValuesTable(props: KeyValuesTableProps) {\n const { data, linksGetter } = props;\n const styles = useStyles2(getStyles);\n return (\n
\n \n \n {data.map((row, i) => {\n const markup = {\n __html: jsonMarkup(parseIfComplexJson(row.value)),\n };\n const jsonTable =
;\n const links = linksGetter ? linksGetter(data, i) : null;\n let valueMarkup;\n if (links && links.length === 1) {\n valueMarkup = (\n
\n \n {jsonTable}\n \n
\n );\n } else if (links && links.length > 1) {\n valueMarkup = (\n
\n \n \n {jsonTable} \n \n \n
\n );\n } else {\n valueMarkup = jsonTable;\n }\n return (\n // `i` is necessary in the key because row.key can repeat\n
\n \n \n \n \n );\n })}\n \n
\n {row.key}\n {valueMarkup}\n \n
\n
\n );\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport IoIosArrowDown from 'react-icons/lib/io/ios-arrow-down';\nimport IoIosArrowRight from 'react-icons/lib/io/ios-arrow-right';\nimport { css } from '@emotion/css';\nimport cx from 'classnames';\n\nimport * as markers from './AccordianKeyValues.markers';\nimport KeyValuesTable from './KeyValuesTable';\nimport { TNil } from '../../types';\nimport { TraceKeyValuePair, TraceLink } from '../../types/trace';\nimport { autoColor } from '../../Theme';\nimport { uAlignIcon, uTxEllipsis } from '../../uberUtilityStyles';\nimport { useStyles2 } from '@grafana/ui';\nimport { GrafanaTheme2 } from '@grafana/data';\n\nexport const getStyles = (theme: GrafanaTheme2) => {\n return {\n header: css`\n label: header;\n cursor: pointer;\n overflow: hidden;\n padding: 0.25em 0.1em;\n text-overflow: ellipsis;\n white-space: nowrap;\n &:hover {\n background: ${autoColor(theme, '#e8e8e8')};\n }\n `,\n headerEmpty: css`\n label: headerEmpty;\n background: none;\n cursor: initial;\n `,\n headerHighContrast: css`\n label: headerHighContrast;\n &:hover {\n background: ${autoColor(theme, '#ddd')};\n }\n `,\n emptyIcon: css`\n label: emptyIcon;\n color: ${autoColor(theme, '#aaa')};\n `,\n summary: css`\n label: summary;\n display: inline;\n list-style: none;\n padding: 0;\n `,\n summaryItem: css`\n label: summaryItem;\n display: inline;\n margin-left: 0.7em;\n padding-right: 0.5rem;\n border-right: 1px solid ${autoColor(theme, '#ddd')};\n &:last-child {\n padding-right: 0;\n border-right: none;\n }\n `,\n summaryLabel: css`\n label: summaryLabel;\n color: ${autoColor(theme, '#777')};\n `,\n summaryDelim: css`\n label: summaryDelim;\n color: ${autoColor(theme, '#bbb')};\n padding: 0 0.2em;\n `,\n };\n};\n\ntype AccordianKeyValuesProps = {\n className?: string | TNil;\n data: TraceKeyValuePair[];\n highContrast?: boolean;\n interactive?: boolean;\n isOpen: boolean;\n label: string;\n linksGetter: ((pairs: TraceKeyValuePair[], index: number) => TraceLink[]) | TNil;\n onToggle?: null | (() => void);\n};\n\n// export for tests\nexport function KeyValuesSummary(props: { data?: TraceKeyValuePair[] }) {\n const { data } = props;\n const styles = useStyles2(getStyles);\n\n if (!Array.isArray(data) || !data.length) {\n return null;\n }\n\n return (\n
    \n {data.map((item, i) => (\n // `i` is necessary in the key because item.key can repeat\n
  • \n {item.key}\n =\n {String(item.value)}\n
  • \n ))}\n
\n );\n}\n\nKeyValuesSummary.defaultProps = {\n data: null,\n};\n\nexport default function AccordianKeyValues(props: AccordianKeyValuesProps) {\n const { className, data, highContrast, interactive, isOpen, label, linksGetter, onToggle } = props;\n const isEmpty = !Array.isArray(data) || !data.length;\n const styles = useStyles2(getStyles);\n const iconCls = cx(uAlignIcon, { [styles.emptyIcon]: isEmpty });\n let arrow: React.ReactNode | null = null;\n let headerProps: {} | null = null;\n if (interactive) {\n arrow = isOpen ? : ;\n headerProps = {\n 'aria-checked': isOpen,\n onClick: isEmpty ? null : onToggle,\n role: 'switch',\n };\n }\n\n return (\n
\n \n {arrow}\n \n {label}\n {isOpen || ':'}\n \n {!isOpen && }\n
\n {isOpen && }\n \n );\n}\n\nAccordianKeyValues.defaultProps = {\n className: null,\n highContrast: false,\n interactive: true,\n onToggle: null,\n};\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport const LABEL = 'label';\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { sortBy as _sortBy } from 'lodash';\nimport IoIosArrowDown from 'react-icons/lib/io/ios-arrow-down';\nimport IoIosArrowRight from 'react-icons/lib/io/ios-arrow-right';\nimport { css } from '@emotion/css';\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { useStyles2 } from '@grafana/ui';\n\nimport AccordianKeyValues from './AccordianKeyValues';\nimport { formatDuration } from '../utils';\nimport { TNil } from '../../types';\nimport { TraceLog, TraceKeyValuePair, TraceLink } from '../../types/trace';\nimport { autoColor } from '../../Theme';\nimport { uAlignIcon, ubMb1 } from '../../uberUtilityStyles';\n\nconst getStyles = (theme: GrafanaTheme2) => {\n return {\n AccordianLogs: css`\n label: AccordianLogs;\n border: 1px solid ${autoColor(theme, '#d8d8d8')};\n position: relative;\n margin-bottom: 0.25rem;\n `,\n AccordianLogsHeader: css`\n label: AccordianLogsHeader;\n background: ${autoColor(theme, '#e4e4e4')};\n color: inherit;\n display: block;\n padding: 0.25rem 0.5rem;\n &:hover {\n background: ${autoColor(theme, '#dadada')};\n }\n `,\n AccordianLogsContent: css`\n label: AccordianLogsContent;\n background: ${autoColor(theme, '#f0f0f0')};\n border-top: 1px solid ${autoColor(theme, '#d8d8d8')};\n padding: 0.5rem 0.5rem 0.25rem 0.5rem;\n `,\n AccordianLogsFooter: css`\n label: AccordianLogsFooter;\n color: ${autoColor(theme, '#999')};\n `,\n };\n};\n\ntype AccordianLogsProps = {\n interactive?: boolean;\n isOpen: boolean;\n linksGetter: ((pairs: TraceKeyValuePair[], index: number) => TraceLink[]) | TNil;\n logs: TraceLog[];\n onItemToggle?: (log: TraceLog) => void;\n onToggle?: () => void;\n openedItems?: Set;\n timestamp: number;\n};\n\nexport default function AccordianLogs(props: AccordianLogsProps) {\n const { interactive, isOpen, linksGetter, logs, openedItems, onItemToggle, onToggle, timestamp } = props;\n let arrow: React.ReactNode | null = null;\n let HeaderComponent: 'span' | 'a' = 'span';\n let headerProps: {} | null = null;\n if (interactive) {\n arrow = isOpen ? : ;\n HeaderComponent = 'a';\n headerProps = {\n 'aria-checked': isOpen,\n onClick: onToggle,\n role: 'switch',\n };\n }\n\n const styles = useStyles2(getStyles);\n return (\n
\n \n {arrow} Logs ({logs.length})\n \n {isOpen && (\n
\n {_sortBy(logs, 'timestamp').map((log, i) => (\n onItemToggle(log) : null}\n />\n ))}\n \n Log timestamps are relative to the start time of the full trace.\n \n
\n )}\n
\n );\n}\n\nAccordianLogs.defaultProps = {\n interactive: true,\n linksGetter: undefined,\n onItemToggle: undefined,\n onToggle: undefined,\n openedItems: undefined,\n};\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport cx from 'classnames';\nimport { css } from '@emotion/css';\nimport { groupBy as _groupBy } from 'lodash';\nimport React from 'react';\nimport { compose, onlyUpdateForKeys, withProps, withState } from 'recompose';\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { useStyles2 } from '@grafana/ui';\nimport { autoColor } from '../Theme';\nimport { TraceSpan } from '../types/trace';\nimport { TNil } from '../types';\nimport { UIPopover } from '../uiElementsContext';\nimport AccordianLogs from './SpanDetail/AccordianLogs';\nimport { ViewedBoundsFunctionType } from './utils';\n\nconst getStyles = (theme: GrafanaTheme2) => {\n return {\n wrapper: css`\n label: wrapper;\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n overflow: hidden;\n z-index: 0;\n `,\n bar: css`\n label: bar;\n border-radius: 3px;\n min-width: 2px;\n position: absolute;\n height: 36%;\n top: 32%;\n `,\n rpc: css`\n label: rpc;\n position: absolute;\n top: 35%;\n bottom: 35%;\n z-index: 1;\n `,\n label: css`\n label: label;\n color: #aaa;\n font-size: 12px;\n font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;\n line-height: 1em;\n white-space: nowrap;\n padding: 0 0.5em;\n position: absolute;\n `,\n logMarker: css`\n label: logMarker;\n background-color: ${autoColor(theme, '#2c3235')};\n cursor: pointer;\n height: 60%;\n min-width: 1px;\n position: absolute;\n top: 20%;\n &:hover {\n background-color: ${autoColor(theme, '#464c54')};\n }\n &::before,\n &::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n border: 1px solid transparent;\n }\n &::after {\n left: 0;\n }\n `,\n };\n};\n\ntype TCommonProps = {\n color: string;\n onClick?: (evt: React.MouseEvent) => void;\n viewEnd: number;\n viewStart: number;\n getViewedBounds: ViewedBoundsFunctionType;\n rpc:\n | {\n viewStart: number;\n viewEnd: number;\n color: string;\n }\n | TNil;\n traceStartTime: number;\n span: TraceSpan;\n className?: string;\n labelClassName?: string;\n};\n\ntype TInnerProps = {\n label: string;\n setLongLabel: () => void;\n setShortLabel: () => void;\n} & TCommonProps;\n\ntype TOuterProps = {\n longLabel: string;\n shortLabel: string;\n} & TCommonProps;\n\nfunction toPercent(value: number) {\n return `${(value * 100).toFixed(1)}%`;\n}\n\nfunction SpanBar(props: TInnerProps) {\n const {\n viewEnd,\n viewStart,\n getViewedBounds,\n color,\n label,\n onClick,\n setLongLabel,\n setShortLabel,\n rpc,\n traceStartTime,\n span,\n className,\n labelClassName,\n } = props;\n // group logs based on timestamps\n const logGroups = _groupBy(span.logs, (log) => {\n const posPercent = getViewedBounds(log.timestamp, log.timestamp).start;\n // round to the nearest 0.2%\n return toPercent(Math.round(posPercent * 500) / 500);\n });\n const styles = useStyles2(getStyles);\n\n return (\n \n \n
\n {label}\n
\n \n
\n {Object.keys(logGroups).map((positionKey) => (\n \n }\n >\n
\n \n ))}\n
\n {rpc && (\n \n )}\n
\n );\n}\n\nexport default compose(\n withState('label', 'setLabel', (props: { shortLabel: string }) => props.shortLabel),\n withProps(\n ({\n setLabel,\n shortLabel,\n longLabel,\n }: {\n setLabel: (label: string) => void;\n shortLabel: string;\n longLabel: string;\n }) => ({\n setLongLabel: () => setLabel(longLabel),\n setShortLabel: () => setLabel(shortLabel),\n })\n ),\n onlyUpdateForKeys(['label', 'rpc', 'viewStart', 'viewEnd'])\n)(SpanBar);\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport IoAlert from 'react-icons/lib/io/alert';\nimport IoArrowRightA from 'react-icons/lib/io/arrow-right-a';\nimport IoNetwork from 'react-icons/lib/io/network';\nimport MdFileUpload from 'react-icons/lib/md/file-upload';\nimport { css, keyframes } from '@emotion/css';\nimport cx from 'classnames';\nimport { stylesFactory, withTheme2 } from '@grafana/ui';\nimport { GrafanaTheme2 } from '@grafana/data';\n\nimport ReferencesButton from './ReferencesButton';\nimport TimelineRow from './TimelineRow';\nimport { formatDuration, ViewedBoundsFunctionType } from './utils';\nimport SpanTreeOffset from './SpanTreeOffset';\nimport SpanBar from './SpanBar';\nimport Ticks from './Ticks';\n\nimport { SpanLinkFunc, TNil } from '../types';\nimport { TraceSpan } from '../types/trace';\nimport { autoColor } from '../Theme';\n\nconst spanBarClassName = 'spanBar';\nconst spanBarLabelClassName = 'spanBarLabel';\nconst nameWrapperClassName = 'nameWrapper';\nconst nameWrapperMatchingFilterClassName = 'nameWrapperMatchingFilter';\nconst viewClassName = 'jaegerView';\nconst nameColumnClassName = 'nameColumn';\n\nconst getStyles = stylesFactory((theme: GrafanaTheme2) => {\n const animations = {\n flash: keyframes`\n label: flash;\n from {\n background-color: ${autoColor(theme, '#68b9ff')};\n }\n to {\n background-color: default;\n }\n `,\n };\n\n return {\n nameWrapper: css`\n label: nameWrapper;\n line-height: 27px;\n overflow: hidden;\n display: flex;\n `,\n nameWrapperMatchingFilter: css`\n label: nameWrapperMatchingFilter;\n background-color: ${autoColor(theme, '#fffce4')};\n `,\n nameColumn: css`\n label: nameColumn;\n position: relative;\n white-space: nowrap;\n z-index: 1;\n &:hover {\n z-index: 1;\n }\n `,\n endpointName: css`\n label: endpointName;\n color: ${autoColor(theme, '#808080')};\n `,\n view: css`\n label: view;\n position: relative;\n `,\n viewExpanded: css`\n label: viewExpanded;\n background: ${autoColor(theme, '#f8f8f8')};\n outline: 1px solid ${autoColor(theme, '#ddd')};\n `,\n viewExpandedAndMatchingFilter: css`\n label: viewExpandedAndMatchingFilter;\n background: ${autoColor(theme, '#fff3d7')};\n outline: 1px solid ${autoColor(theme, '#ddd')};\n `,\n row: css`\n label: row;\n &:hover .${spanBarClassName} {\n opacity: 1;\n }\n &:hover .${spanBarLabelClassName} {\n color: ${autoColor(theme, '#000')};\n }\n &:hover .${nameWrapperClassName} {\n background: #f8f8f8;\n background: linear-gradient(\n 90deg,\n ${autoColor(theme, '#fafafa')},\n ${autoColor(theme, '#f8f8f8')} 75%,\n ${autoColor(theme, '#eee')}\n );\n }\n &:hover .${viewClassName} {\n background-color: ${autoColor(theme, '#f5f5f5')};\n outline: 1px solid ${autoColor(theme, '#ddd')};\n }\n `,\n rowClippingLeft: css`\n label: rowClippingLeft;\n & .${nameColumnClassName}::before {\n content: ' ';\n height: 100%;\n position: absolute;\n width: 6px;\n background-image: linear-gradient(\n to right,\n ${autoColor(theme, 'rgba(25, 25, 25, 0.25)')},\n ${autoColor(theme, 'rgba(32, 32, 32, 0)')}\n );\n left: 100%;\n z-index: -1;\n }\n `,\n rowClippingRight: css`\n label: rowClippingRight;\n & .${viewClassName}::before {\n content: ' ';\n height: 100%;\n position: absolute;\n width: 6px;\n background-image: linear-gradient(\n to left,\n ${autoColor(theme, 'rgba(25, 25, 25, 0.25)')},\n ${autoColor(theme, 'rgba(25, 25, 25, 0.25)')}\n );\n right: 0%;\n z-index: 1;\n }\n `,\n rowExpanded: css`\n label: rowExpanded;\n & .${spanBarClassName} {\n opacity: 1;\n }\n & .${spanBarLabelClassName} {\n color: ${autoColor(theme, '#000')};\n }\n & .${nameWrapperClassName}, &:hover .${nameWrapperClassName} {\n background: ${autoColor(theme, '#f0f0f0')};\n box-shadow: 0 1px 0 ${autoColor(theme, '#ddd')};\n }\n & .${nameWrapperMatchingFilterClassName} {\n background: ${autoColor(theme, '#fff3d7')};\n }\n &:hover .${viewClassName} {\n background: ${autoColor(theme, '#eee')};\n }\n `,\n rowMatchingFilter: css`\n label: rowMatchingFilter;\n background-color: ${autoColor(theme, '#fffce4')};\n &:hover .${nameWrapperClassName} {\n background: linear-gradient(\n 90deg,\n ${autoColor(theme, '#fff5e1')},\n ${autoColor(theme, '#fff5e1')} 75%,\n ${autoColor(theme, '#ffe6c9')}\n );\n }\n &:hover .${viewClassName} {\n background-color: ${autoColor(theme, '#fff3d7')};\n outline: 1px solid ${autoColor(theme, '#ddd')};\n }\n `,\n rowFocused: css`\n label: rowFocused;\n background-color: ${autoColor(theme, '#cbe7ff')};\n animation: ${animations.flash} 1s cubic-bezier(0.12, 0, 0.39, 0);\n & .${nameWrapperClassName}, .${viewClassName}, .${nameWrapperMatchingFilterClassName} {\n background-color: ${autoColor(theme, '#cbe7ff')};\n animation: ${animations.flash} 1s cubic-bezier(0.12, 0, 0.39, 0);\n }\n & .${spanBarClassName} {\n opacity: 1;\n }\n & .${spanBarLabelClassName} {\n color: ${autoColor(theme, '#000')};\n }\n &:hover .${nameWrapperClassName}, :hover .${viewClassName} {\n background: ${autoColor(theme, '#d5ebff')};\n box-shadow: 0 1px 0 ${autoColor(theme, '#ddd')};\n }\n `,\n\n rowExpandedAndMatchingFilter: css`\n label: rowExpandedAndMatchingFilter;\n &:hover .${viewClassName} {\n background: ${autoColor(theme, '#ffeccf')};\n }\n `,\n\n name: css`\n label: name;\n color: ${autoColor(theme, '#000')};\n cursor: pointer;\n flex: 1 1 auto;\n outline: none;\n overflow: hidden;\n padding-left: 4px;\n padding-right: 0.25em;\n position: relative;\n text-overflow: ellipsis;\n &::before {\n content: ' ';\n position: absolute;\n top: 4px;\n bottom: 4px;\n left: 0;\n border-left: 4px solid;\n border-left-color: inherit;\n }\n\n /* This is so the hit area of the span-name extends the rest of the width of the span-name column */\n &::after {\n background: transparent;\n bottom: 0;\n content: ' ';\n left: 0;\n position: absolute;\n top: 0;\n width: 1000px;\n }\n &:focus {\n text-decoration: none;\n }\n &:hover > small {\n color: ${autoColor(theme, '#000')};\n }\n `,\n nameDetailExpanded: css`\n label: nameDetailExpanded;\n &::before {\n bottom: 0;\n }\n `,\n svcName: css`\n label: svcName;\n padding: 0 0.25rem 0 0.5rem;\n font-size: 1.05em;\n `,\n svcNameChildrenCollapsed: css`\n label: svcNameChildrenCollapsed;\n font-weight: bold;\n font-style: italic;\n `,\n errorIcon: css`\n label: errorIcon;\n border-radius: 6.5px;\n color: ${autoColor(theme, '#fff')};\n font-size: 0.85em;\n margin-right: 0.25rem;\n padding: 1px;\n `,\n rpcColorMarker: css`\n label: rpcColorMarker;\n border-radius: 6.5px;\n display: inline-block;\n font-size: 0.85em;\n height: 1em;\n margin-right: 0.25rem;\n padding: 1px;\n width: 1em;\n vertical-align: middle;\n `,\n labelRight: css`\n label: labelRight;\n left: 100%;\n `,\n labelLeft: css`\n label: labelLeft;\n right: 100%;\n `,\n };\n});\n\ntype SpanBarRowProps = {\n className?: string;\n theme: GrafanaTheme2;\n color: string;\n columnDivision: number;\n isChildrenExpanded: boolean;\n isDetailExpanded: boolean;\n isMatchingFilter: boolean;\n isFocused: boolean;\n onDetailToggled: (spanID: string) => void;\n onChildrenToggled: (spanID: string) => void;\n numTicks: number;\n rpc?:\n | {\n viewStart: number;\n viewEnd: number;\n color: string;\n operationName: string;\n serviceName: string;\n }\n | TNil;\n noInstrumentedServer?:\n | {\n color: string;\n serviceName: string;\n }\n | TNil;\n showErrorIcon: boolean;\n getViewedBounds: ViewedBoundsFunctionType;\n traceStartTime: number;\n span: TraceSpan;\n focusSpan: (spanID: string) => void;\n hoverIndentGuideIds: Set;\n addHoverIndentGuideId: (spanID: string) => void;\n removeHoverIndentGuideId: (spanID: string) => void;\n clippingLeft?: boolean;\n clippingRight?: boolean;\n createSpanLink?: SpanLinkFunc;\n};\n\n/**\n * This was originally a stateless function, but changing to a PureComponent\n * reduced the render time of expanding a span row detail by ~50%. This is\n * even true in the case where the stateless function has the same prop types as\n * this class and arrow functions are created in the stateless function as\n * handlers to the onClick props. E.g. for now, the PureComponent is more\n * performance than the stateless function.\n */\nexport class UnthemedSpanBarRow extends React.PureComponent {\n static displayName = 'UnthemedSpanBarRow';\n static defaultProps: Partial = {\n className: '',\n rpc: null,\n };\n\n _detailToggle = () => {\n this.props.onDetailToggled(this.props.span.spanID);\n };\n\n _childrenToggle = () => {\n this.props.onChildrenToggled(this.props.span.spanID);\n };\n\n render() {\n const {\n className,\n color,\n columnDivision,\n isChildrenExpanded,\n isDetailExpanded,\n isMatchingFilter,\n isFocused,\n numTicks,\n rpc,\n noInstrumentedServer,\n showErrorIcon,\n getViewedBounds,\n traceStartTime,\n span,\n focusSpan,\n hoverIndentGuideIds,\n addHoverIndentGuideId,\n removeHoverIndentGuideId,\n clippingLeft,\n clippingRight,\n theme,\n createSpanLink,\n } = this.props;\n const {\n duration,\n hasChildren: isParent,\n operationName,\n process: { serviceName },\n } = span;\n const label = formatDuration(duration);\n const viewBounds = getViewedBounds(span.startTime, span.startTime + span.duration);\n const viewStart = viewBounds.start;\n const viewEnd = viewBounds.end;\n const styles = getStyles(theme);\n\n const labelDetail = `${serviceName}::${operationName}`;\n let longLabel;\n let hintClassName;\n if (viewStart > 1 - viewEnd) {\n longLabel = `${labelDetail} | ${label}`;\n hintClassName = styles.labelLeft;\n } else {\n longLabel = `${label} | ${labelDetail}`;\n hintClassName = styles.labelRight;\n }\n\n return (\n \n \n \n \n \n \n {showErrorIcon && (\n \n )}\n {serviceName}{' '}\n {rpc && (\n \n \n {rpc.serviceName}\n \n )}\n {noInstrumentedServer && (\n \n {' '}\n \n {noInstrumentedServer.serviceName}\n \n )}\n \n {rpc ? rpc.operationName : operationName}\n | {label}\n \n {createSpanLink &&\n (() => {\n const link = createSpanLink(span);\n if (link) {\n return (\n {\n if (!(event.ctrlKey || event.metaKey || event.shiftKey) && link.onClick) {\n event.preventDefault();\n link.onClick(event);\n }\n }\n : undefined\n }\n >\n {link.content}\n \n );\n } else {\n return null;\n }\n })()}\n\n {span.references && span.references.length > 1 && (\n \n \n \n )}\n {span.subsidiarilyReferencedBy && span.subsidiarilyReferencedBy.length > 0 && (\n \n \n \n )}\n \n \n \n \n \n \n \n );\n }\n}\n\nexport default withTheme2(UnthemedSpanBarRow);\n","// Copyright (c) 2019 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { css } from '@emotion/css';\nimport cx from 'classnames';\nimport { useStyles2 } from '@grafana/ui';\n\nconst getStyles = () => {\n return {\n TextList: css`\n max-height: 450px;\n overflow: auto;\n `,\n List: css`\n width: 100%;\n list-style: none;\n padding: 0;\n margin: 0;\n `,\n item: css`\n padding: 0.25rem 0.5rem;\n vertical-align: top;\n &:nth-child(2n) {\n background: #f5f5f5;\n }\n `,\n };\n};\n\ntype TextListProps = {\n data: string[];\n};\n\nexport default function TextList(props: TextListProps) {\n const { data } = props;\n const styles = useStyles2(getStyles);\n return (\n
\n
    \n {data.map((row, i) => {\n return (\n // `i` is necessary in the key because row.key can repeat\n
  • \n {row}\n
  • \n );\n })}\n
\n
\n );\n}\n","// Copyright (c) 2019 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { css } from '@emotion/css';\nimport cx from 'classnames';\nimport IoIosArrowDown from 'react-icons/lib/io/ios-arrow-down';\nimport IoIosArrowRight from 'react-icons/lib/io/ios-arrow-right';\nimport { useStyles2 } from '@grafana/ui';\nimport { GrafanaTheme2 } from '@grafana/data';\n\nimport TextList from './TextList';\nimport { TNil } from '../../types';\nimport { getStyles as getAccordianKeyValuesStyles } from './AccordianKeyValues';\nimport { autoColor } from '../../Theme';\nimport { uAlignIcon } from '../../uberUtilityStyles';\n\nconst getStyles = (theme: GrafanaTheme2) => {\n return {\n header: css`\n cursor: pointer;\n overflow: hidden;\n padding: 0.25em 0.1em;\n text-overflow: ellipsis;\n white-space: nowrap;\n &:hover {\n background: ${autoColor(theme, '#e8e8e8')};\n }\n `,\n };\n};\n\ntype AccordianTextProps = {\n className?: string | TNil;\n headerClassName?: string | TNil;\n data: string[];\n highContrast?: boolean;\n interactive?: boolean;\n isOpen: boolean;\n label: React.ReactNode | string;\n onToggle?: null | (() => void);\n TextComponent?: React.ElementType<{ data: string[] }>;\n};\n\nfunction DefaultTextComponent({ data }: { data: string[] }) {\n return ;\n}\n\nexport default function AccordianText(props: AccordianTextProps) {\n const {\n className,\n data,\n headerClassName,\n interactive,\n isOpen,\n label,\n onToggle,\n TextComponent = DefaultTextComponent,\n } = props;\n const isEmpty = !Array.isArray(data) || !data.length;\n const accordianKeyValuesStyles = useStyles2(getAccordianKeyValuesStyles);\n const iconCls = cx(uAlignIcon, { [accordianKeyValuesStyles.emptyIcon]: isEmpty });\n let arrow: React.ReactNode | null = null;\n let headerProps: {} | null = null;\n if (interactive) {\n arrow = isOpen ? : ;\n headerProps = {\n 'aria-checked': isOpen,\n onClick: isEmpty ? null : onToggle,\n role: 'switch',\n };\n }\n const styles = useStyles2(getStyles);\n return (\n
\n
\n {arrow}\n {label} ({data.length})\n
\n {isOpen && }\n
\n );\n}\n\nAccordianText.defaultProps = {\n className: null,\n highContrast: false,\n interactive: true,\n onToggle: null,\n};\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { css } from '@emotion/css';\nimport cx from 'classnames';\nimport { useStyles2 } from '@grafana/ui';\nimport { GrafanaTheme2 } from '@grafana/data';\n\nimport { UIDivider } from '../uiElementsContext';\n\nconst getStyles = (theme: GrafanaTheme2) => {\n return {\n LabeledList: css`\n label: LabeledList;\n list-style: none;\n margin: 0;\n padding: 0;\n `,\n LabeledListItem: css`\n label: LabeledListItem;\n display: inline-block;\n `,\n LabeledListLabel: css`\n label: LabeledListLabel;\n color: ${theme.isLight ? '#999' : '#666'};\n margin-right: 0.25rem;\n `,\n };\n};\n\ntype LabeledListProps = {\n className?: string;\n dividerClassName?: string;\n items: Array<{ key: string; label: React.ReactNode; value: React.ReactNode }>;\n};\n\nexport default function LabeledList(props: LabeledListProps) {\n const { className, dividerClassName, items } = props;\n const styles = useStyles2(getStyles);\n return (\n
    \n {items.map(({ key, label, value }, i) => {\n const divider = i < items.length - 1 && (\n
  • \n \n
  • \n );\n return [\n
  • \n {label}\n {value}\n
  • ,\n divider,\n ];\n })}\n
\n );\n}\n","// Copyright (c) 2019 The Jaeger Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { css } from '@emotion/css';\nimport cx from 'classnames';\nimport { useStyles2 } from '@grafana/ui';\n\nimport IoIosArrowDown from 'react-icons/lib/io/ios-arrow-down';\nimport IoIosArrowRight from 'react-icons/lib/io/ios-arrow-right';\nimport { TraceSpanReference } from '../../types/trace';\nimport ReferenceLink from '../../url/ReferenceLink';\nimport { uAlignIcon } from '../../uberUtilityStyles';\n\nconst getStyles = () => {\n return {\n ReferencesList: css`\n background: #fff;\n border: 1px solid #ddd;\n margin-bottom: 0.7em;\n max-height: 450px;\n overflow: auto;\n `,\n list: css`\n width: 100%;\n list-style: none;\n padding: 0;\n margin: 0;\n background: #fff;\n `,\n itemContent: css`\n padding: 0.25rem 0.5rem;\n display: flex;\n width: 100%;\n justify-content: space-between;\n `,\n item: css`\n &:nth-child(2n) {\n background: #f5f5f5;\n }\n `,\n debugInfo: css`\n letter-spacing: 0.25px;\n margin: 0.5em 0 0;\n `,\n debugLabel: css`\n margin: 0 5px 0 5px;\n &::before {\n color: #bbb;\n content: attr(data-label);\n }\n `,\n };\n};\n\ntype AccordianReferencesProps = {\n data: TraceSpanReference[];\n highContrast?: boolean;\n interactive?: boolean;\n isOpen: boolean;\n onToggle?: null | (() => void);\n focusSpan: (uiFind: string) => void;\n};\n\ntype ReferenceItemProps = {\n data: TraceSpanReference[];\n focusSpan: (uiFind: string) => void;\n};\n\n// export for test\nexport function References(props: ReferenceItemProps) {\n const { data, focusSpan } = props;\n const styles = useStyles2(getStyles);\n\n return (\n
\n
    \n {data.map((reference) => {\n return (\n
  • \n \n \n {reference.span ? (\n \n {reference.span.process.serviceName}\n {reference.span.operationName}\n \n ) : (\n < span in another trace >\n )}\n \n \n {reference.refType}\n \n \n {reference.spanID}\n \n \n \n \n
  • \n );\n })}\n
\n
\n );\n}\n\nexport default class AccordianReferences extends React.PureComponent {\n static defaultProps: Partial = {\n highContrast: false,\n interactive: true,\n onToggle: null,\n };\n\n render() {\n const { data, interactive, isOpen, onToggle, focusSpan } = this.props;\n const isEmpty = !Array.isArray(data) || !data.length;\n const iconCls = uAlignIcon;\n let arrow: React.ReactNode | null = null;\n let headerProps: {} | null = null;\n if (interactive) {\n arrow = isOpen ? : ;\n headerProps = {\n 'aria-checked': isOpen,\n onClick: isEmpty ? null : onToggle,\n role: 'switch',\n };\n }\n return (\n
\n
\n {arrow}\n \n References\n {' '}\n ({data.length})\n
\n {isOpen && }\n
\n );\n }\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React from 'react';\nimport { css } from '@emotion/css';\nimport cx from 'classnames';\nimport { DataLinkButton, TextArea, useStyles2 } from '@grafana/ui';\nimport { GrafanaTheme2, LinkModel } from '@grafana/data';\nimport IoLink from 'react-icons/lib/io/link';\n\nimport AccordianKeyValues from './AccordianKeyValues';\nimport AccordianLogs from './AccordianLogs';\nimport AccordianText from './AccordianText';\nimport DetailState from './DetailState';\nimport { formatDuration } from '../utils';\nimport LabeledList from '../../common/LabeledList';\nimport { SpanLinkFunc, TNil } from '../../types';\nimport { TraceKeyValuePair, TraceLink, TraceLog, TraceSpan } from '../../types/trace';\nimport AccordianReferences from './AccordianReferences';\nimport { autoColor } from '../../Theme';\nimport { UIDivider } from '../../uiElementsContext';\nimport {\n uAlignIcon,\n ubFlex,\n ubFlexAuto,\n ubItemsCenter,\n ubM0,\n ubMb1,\n ubMy1,\n ubTxRightAlign,\n} from '../../uberUtilityStyles';\n\nconst getStyles = (theme: GrafanaTheme2) => {\n return {\n divider: css`\n label: divider;\n background: ${autoColor(theme, '#ddd')};\n `,\n dividerVertical: css`\n label: dividerVertical;\n display: block;\n height: 1px;\n width: 100%;\n margin: 24px 0;\n clear: both;\n vertical-align: middle;\n position: relative;\n top: -0.06em;\n `,\n debugInfo: css`\n label: debugInfo;\n display: block;\n letter-spacing: 0.25px;\n margin: 0.5em 0 -0.75em;\n text-align: right;\n `,\n debugLabel: css`\n label: debugLabel;\n &::before {\n color: ${autoColor(theme, '#bbb')};\n content: attr(data-label);\n }\n `,\n debugValue: css`\n label: debugValue;\n background-color: inherit;\n border: none;\n color: ${autoColor(theme, '#888')};\n cursor: pointer;\n &:hover {\n color: ${autoColor(theme, '#333')};\n }\n `,\n AccordianWarnings: css`\n label: AccordianWarnings;\n background: ${autoColor(theme, '#fafafa')};\n border: 1px solid ${autoColor(theme, '#e4e4e4')};\n margin-bottom: 0.25rem;\n `,\n AccordianWarningsHeader: css`\n label: AccordianWarningsHeader;\n background: ${autoColor(theme, '#fff7e6')};\n padding: 0.25rem 0.5rem;\n &:hover {\n background: ${autoColor(theme, '#ffe7ba')};\n }\n `,\n AccordianWarningsHeaderOpen: css`\n label: AccordianWarningsHeaderOpen;\n border-bottom: 1px solid ${autoColor(theme, '#e8e8e8')};\n `,\n AccordianWarningsLabel: css`\n label: AccordianWarningsLabel;\n color: ${autoColor(theme, '#d36c08')};\n `,\n Textarea: css`\n word-break: break-all;\n white-space: pre;\n `,\n LinkIcon: css`\n font-size: 1.5em;\n `,\n };\n};\n\ntype SpanDetailProps = {\n detailState: DetailState;\n linksGetter: ((links: TraceKeyValuePair[], index: number) => TraceLink[]) | TNil;\n logItemToggle: (spanID: string, log: TraceLog) => void;\n logsToggle: (spanID: string) => void;\n processToggle: (spanID: string) => void;\n span: TraceSpan;\n tagsToggle: (spanID: string) => void;\n traceStartTime: number;\n warningsToggle: (spanID: string) => void;\n stackTracesToggle: (spanID: string) => void;\n referencesToggle: (spanID: string) => void;\n focusSpan: (uiFind: string) => void;\n createSpanLink?: SpanLinkFunc;\n focusedSpanId?: string;\n createFocusSpanLink: (traceId: string, spanId: string) => LinkModel;\n};\n\nexport default function SpanDetail(props: SpanDetailProps) {\n const {\n detailState,\n linksGetter,\n logItemToggle,\n logsToggle,\n processToggle,\n span,\n tagsToggle,\n traceStartTime,\n warningsToggle,\n stackTracesToggle,\n referencesToggle,\n focusSpan,\n createSpanLink,\n createFocusSpanLink,\n } = props;\n const {\n isTagsOpen,\n isProcessOpen,\n logs: logsState,\n isWarningsOpen,\n isReferencesOpen,\n isStackTracesOpen,\n } = detailState;\n const {\n operationName,\n process,\n duration,\n relativeStartTime,\n traceID,\n spanID,\n logs,\n tags,\n warnings,\n references,\n stackTraces,\n } = span;\n const overviewItems = [\n {\n key: 'svc',\n label: 'Service:',\n value: process.serviceName,\n },\n {\n key: 'duration',\n label: 'Duration:',\n value: formatDuration(duration),\n },\n {\n key: 'start',\n label: 'Start Time:',\n value: formatDuration(relativeStartTime),\n },\n ];\n const styles = useStyles2(getStyles);\n const link = createSpanLink?.(span);\n const focusSpanLink = createFocusSpanLink(traceID, spanID);\n\n return (\n
\n
\n

{operationName}

\n \n
\n {link ? (\n \n ) : null}\n \n
\n
\n tagsToggle(spanID)}\n />\n {process.tags && (\n processToggle(spanID)}\n />\n )}\n
\n {logs && logs.length > 0 && (\n logsToggle(spanID)}\n onItemToggle={(logItem) => logItemToggle(spanID, logItem)}\n timestamp={traceStartTime}\n />\n )}\n {warnings && warnings.length > 0 && (\n Warnings}\n data={warnings}\n isOpen={isWarningsOpen}\n onToggle={() => warningsToggle(spanID)}\n />\n )}\n {stackTraces && stackTraces.length && (\n {\n let text;\n if (textComponentProps.data?.length > 1) {\n text = textComponentProps.data\n .map((stackTrace, index) => `StackTrace ${index + 1}:\\n${stackTrace}`)\n .join('\\n');\n } else {\n text = textComponentProps.data?.[0];\n }\n return (\n \n );\n }}\n onToggle={() => stackTracesToggle(spanID)}\n />\n )}\n {references && references.length > 0 && (references.length > 1 || references[0].refType !== 'CHILD_OF') && (\n referencesToggle(spanID)}\n focusSpan={focusSpan}\n />\n )}\n \n {\n // click handling logic copied from react router:\n // https://github.com/remix-run/react-router/blob/997b4d67e506d39ac6571cb369d6d2d6b3dda557/packages/react-router-dom/index.tsx#L392-L394s\n if (\n focusSpanLink.onClick &&\n e.button === 0 && // Ignore everything but left clicks\n (!e.currentTarget.target || e.currentTarget.target === '_self') && // Let browser handle \"target=_blank\" etc.\n !(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) // Ignore clicks with modifier keys\n ) {\n e.preventDefault();\n focusSpanLink.onClick(e);\n }\n }}\n >\n \n \n {spanID}\n \n
\n
\n );\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React from 'react';\nimport { css } from '@emotion/css';\n\nimport SpanDetail from './SpanDetail';\nimport DetailState from './SpanDetail/DetailState';\nimport SpanTreeOffset from './SpanTreeOffset';\nimport TimelineRow from './TimelineRow';\nimport { autoColor } from '../Theme';\nimport { stylesFactory, withTheme2 } from '@grafana/ui';\nimport { GrafanaTheme2, LinkModel } from '@grafana/data';\n\nimport { TraceLog, TraceSpan, TraceKeyValuePair, TraceLink } from '../types/trace';\nimport { SpanLinkFunc } from '../types';\n\nconst getStyles = stylesFactory((theme: GrafanaTheme2) => {\n return {\n expandedAccent: css`\n cursor: pointer;\n height: 100%;\n overflow: hidden;\n position: absolute;\n width: 100%;\n &::before {\n border-left: 4px solid;\n pointer-events: none;\n width: 1000px;\n }\n &::after {\n border-right: 1000px solid;\n border-color: inherit;\n cursor: pointer;\n opacity: 0.2;\n }\n\n /* border-color inherit must come AFTER other border declarations for accent */\n &::before,\n &::after {\n border-color: inherit;\n content: ' ';\n position: absolute;\n height: 100%;\n }\n\n &:hover::after {\n opacity: 0.35;\n }\n `,\n infoWrapper: css`\n label: infoWrapper;\n border: 1px solid ${autoColor(theme, '#d3d3d3')};\n border-top: 3px solid;\n padding: 0.75rem;\n `,\n };\n});\n\ntype SpanDetailRowProps = {\n color: string;\n columnDivision: number;\n detailState: DetailState;\n onDetailToggled: (spanID: string) => void;\n linksGetter: (span: TraceSpan, links: TraceKeyValuePair[], index: number) => TraceLink[];\n logItemToggle: (spanID: string, log: TraceLog) => void;\n logsToggle: (spanID: string) => void;\n processToggle: (spanID: string) => void;\n referencesToggle: (spanID: string) => void;\n warningsToggle: (spanID: string) => void;\n stackTracesToggle: (spanID: string) => void;\n span: TraceSpan;\n tagsToggle: (spanID: string) => void;\n traceStartTime: number;\n focusSpan: (uiFind: string) => void;\n hoverIndentGuideIds: Set;\n addHoverIndentGuideId: (spanID: string) => void;\n removeHoverIndentGuideId: (spanID: string) => void;\n theme: GrafanaTheme2;\n createSpanLink?: SpanLinkFunc;\n focusedSpanId?: string;\n createFocusSpanLink: (traceId: string, spanId: string) => LinkModel;\n};\n\nexport class UnthemedSpanDetailRow extends React.PureComponent {\n _detailToggle = () => {\n this.props.onDetailToggled(this.props.span.spanID);\n };\n\n _linksGetter = (items: TraceKeyValuePair[], itemIndex: number) => {\n const { linksGetter, span } = this.props;\n return linksGetter(span, items, itemIndex);\n };\n\n render() {\n const {\n color,\n columnDivision,\n detailState,\n logItemToggle,\n logsToggle,\n processToggle,\n referencesToggle,\n warningsToggle,\n stackTracesToggle,\n span,\n tagsToggle,\n traceStartTime,\n focusSpan,\n hoverIndentGuideIds,\n addHoverIndentGuideId,\n removeHoverIndentGuideId,\n theme,\n createSpanLink,\n focusedSpanId,\n createFocusSpanLink,\n } = this.props;\n const styles = getStyles(theme);\n return (\n \n \n \n \n \n \n \n \n
\n \n
\n
\n
\n );\n }\n}\n\nexport default withTheme2(UnthemedSpanDetailRow);\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport memoizeOne from 'memoize-one';\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { colors } from '@grafana/ui';\n\n// TS needs the precise return type\nfunction strToRgb(s: string): [number, number, number] {\n if (s.length !== 7) {\n return [0, 0, 0];\n }\n const r = s.slice(1, 3);\n const g = s.slice(3, 5);\n const b = s.slice(5);\n return [parseInt(r, 16), parseInt(g, 16), parseInt(b, 16)];\n}\n\nclass ColorGenerator {\n colorsHex: string[];\n colorsRgb: Array<[number, number, number]>;\n cache: Map;\n currentIdx: number;\n\n constructor(colorsHex: string[]) {\n this.colorsHex = colorsHex;\n this.colorsRgb = colorsHex.map(strToRgb);\n this.cache = new Map();\n this.currentIdx = 0;\n }\n\n _getColorIndex(key: string): number {\n let i = this.cache.get(key);\n if (i == null) {\n i = this.currentIdx;\n this.cache.set(key, this.currentIdx);\n this.currentIdx = ++this.currentIdx % this.colorsHex.length;\n }\n return i;\n }\n\n /**\n * Will assign a color to an arbitrary key.\n * If the key has been used already, it will\n * use the same color.\n */\n getColorByKey(key: string) {\n const i = this._getColorIndex(key);\n return this.colorsHex[i];\n }\n\n /**\n * Retrieve the RGB values associated with a key. Adds the key and associates\n * it with a color if the key is not recognized.\n * @returns {number[]} An array of three ints [0, 255] representing a color.\n */\n getRgbColorByKey(key: string): [number, number, number] {\n const i = this._getColorIndex(key);\n return this.colorsRgb[i];\n }\n\n clear() {\n this.cache.clear();\n this.currentIdx = 0;\n }\n}\n\nconst getGenerator = memoizeOne((colors: string[]) => {\n return new ColorGenerator(colors);\n});\n\nexport function clear() {\n getGenerator([]);\n}\n\nexport function getColorByKey(key: string, theme: GrafanaTheme2) {\n return getGenerator(colors).getColorByKey(key);\n}\n\nexport function getRgbColorByKey(key: string, theme: GrafanaTheme2): [number, number, number] {\n return getGenerator(colors).getRgbColorByKey(key);\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { css } from '@emotion/css';\n\nimport { isEqual } from 'lodash';\nimport memoizeOne from 'memoize-one';\nimport { stylesFactory, withTheme2 } from '@grafana/ui';\nimport { GrafanaTheme2, LinkModel } from '@grafana/data';\n\nimport ListView from './ListView';\nimport SpanBarRow from './SpanBarRow';\nimport DetailState from './SpanDetail/DetailState';\nimport SpanDetailRow from './SpanDetailRow';\nimport {\n createViewedBoundsFunc,\n findServerChildSpan,\n isErrorSpan,\n isKindClient,\n spanContainsErredSpan,\n ViewedBoundsFunctionType,\n} from './utils';\nimport { Accessors } from '../ScrollManager';\nimport { getColorByKey } from '../utils/color-generator';\nimport { SpanLinkFunc, TNil } from '../types';\nimport { TraceLog, TraceSpan, Trace, TraceKeyValuePair, TraceLink } from '../types/trace';\nimport TTraceTimeline from '../types/TTraceTimeline';\nimport { PEER_SERVICE } from '../constants/tag-keys';\n\ntype TExtractUiFindFromStateReturn = {\n uiFind: string | undefined;\n};\n\nconst getStyles = stylesFactory(() => {\n return {\n rowsWrapper: css`\n width: 100%;\n `,\n row: css`\n width: 100%;\n `,\n };\n});\n\ntype RowState = {\n isDetail: boolean;\n span: TraceSpan;\n spanIndex: number;\n};\n\ntype TVirtualizedTraceViewOwnProps = {\n currentViewRangeTime: [number, number];\n findMatchesIDs: Set | TNil;\n scrollToFirstVisibleSpan: () => void;\n registerAccessors: (accesors: Accessors) => void;\n trace: Trace;\n focusSpan: (uiFind: string) => void;\n linksGetter: (span: TraceSpan, items: TraceKeyValuePair[], itemIndex: number) => TraceLink[];\n childrenToggle: (spanID: string) => void;\n clearShouldScrollToFirstUiFindMatch: () => void;\n detailLogItemToggle: (spanID: string, log: TraceLog) => void;\n detailLogsToggle: (spanID: string) => void;\n detailWarningsToggle: (spanID: string) => void;\n detailStackTracesToggle: (spanID: string) => void;\n detailReferencesToggle: (spanID: string) => void;\n detailProcessToggle: (spanID: string) => void;\n detailTagsToggle: (spanID: string) => void;\n detailToggle: (spanID: string) => void;\n setSpanNameColumnWidth: (width: number) => void;\n setTrace: (trace: Trace | TNil, uiFind: string | TNil) => void;\n hoverIndentGuideIds: Set;\n addHoverIndentGuideId: (spanID: string) => void;\n removeHoverIndentGuideId: (spanID: string) => void;\n theme: GrafanaTheme2;\n createSpanLink?: SpanLinkFunc;\n scrollElement?: Element;\n focusedSpanId?: string;\n createFocusSpanLink: (traceId: string, spanId: string) => LinkModel;\n};\n\ntype VirtualizedTraceViewProps = TVirtualizedTraceViewOwnProps & TExtractUiFindFromStateReturn & TTraceTimeline;\n\n// export for tests\nexport const DEFAULT_HEIGHTS = {\n bar: 28,\n detail: 161,\n detailWithLogs: 197,\n};\n\nconst NUM_TICKS = 5;\n\nfunction generateRowStates(\n spans: TraceSpan[] | TNil,\n childrenHiddenIDs: Set,\n detailStates: Map\n): RowState[] {\n if (!spans) {\n return [];\n }\n let collapseDepth = null;\n const rowStates = [];\n for (let i = 0; i < spans.length; i++) {\n const span = spans[i];\n const { spanID, depth } = span;\n let hidden = false;\n if (collapseDepth != null) {\n if (depth >= collapseDepth) {\n hidden = true;\n } else {\n collapseDepth = null;\n }\n }\n if (hidden) {\n continue;\n }\n if (childrenHiddenIDs.has(spanID)) {\n collapseDepth = depth + 1;\n }\n rowStates.push({\n span,\n isDetail: false,\n spanIndex: i,\n });\n if (detailStates.has(spanID)) {\n rowStates.push({\n span,\n isDetail: true,\n spanIndex: i,\n });\n }\n }\n return rowStates;\n}\n\nfunction getClipping(currentViewRange: [number, number]) {\n const [zoomStart, zoomEnd] = currentViewRange;\n return {\n left: zoomStart > 0,\n right: zoomEnd < 1,\n };\n}\n\nfunction generateRowStatesFromTrace(\n trace: Trace | TNil,\n childrenHiddenIDs: Set,\n detailStates: Map\n): RowState[] {\n return trace ? generateRowStates(trace.spans, childrenHiddenIDs, detailStates) : [];\n}\n\nconst memoizedGenerateRowStates = memoizeOne(generateRowStatesFromTrace);\nconst memoizedViewBoundsFunc = memoizeOne(createViewedBoundsFunc, isEqual);\nconst memoizedGetClipping = memoizeOne(getClipping, isEqual);\n\n// export from tests\nexport class UnthemedVirtualizedTraceView extends React.Component {\n listView: ListView | TNil;\n\n constructor(props: VirtualizedTraceViewProps) {\n super(props);\n const { setTrace, trace, uiFind } = props;\n setTrace(trace, uiFind);\n }\n\n componentDidMount() {\n this.scrollToSpan(this.props.focusedSpanId);\n }\n\n shouldComponentUpdate(nextProps: VirtualizedTraceViewProps) {\n // If any prop updates, VirtualizedTraceViewImpl should update.\n const nextPropKeys = Object.keys(nextProps) as Array;\n for (let i = 0; i < nextPropKeys.length; i += 1) {\n if (nextProps[nextPropKeys[i]] !== this.props[nextPropKeys[i]]) {\n // Unless the only change was props.shouldScrollToFirstUiFindMatch changing to false.\n if (nextPropKeys[i] === 'shouldScrollToFirstUiFindMatch') {\n if (nextProps[nextPropKeys[i]]) {\n return true;\n }\n } else {\n return true;\n }\n }\n }\n return false;\n }\n\n componentDidUpdate(prevProps: Readonly) {\n const { registerAccessors, trace } = prevProps;\n const {\n shouldScrollToFirstUiFindMatch,\n clearShouldScrollToFirstUiFindMatch,\n scrollToFirstVisibleSpan,\n registerAccessors: nextRegisterAccessors,\n setTrace,\n trace: nextTrace,\n uiFind,\n focusedSpanId,\n } = this.props;\n\n if (trace !== nextTrace) {\n setTrace(nextTrace, uiFind);\n }\n\n if (this.listView && registerAccessors !== nextRegisterAccessors) {\n nextRegisterAccessors(this.getAccessors());\n }\n\n if (shouldScrollToFirstUiFindMatch) {\n scrollToFirstVisibleSpan();\n clearShouldScrollToFirstUiFindMatch();\n }\n\n if (focusedSpanId !== prevProps.focusedSpanId) {\n this.scrollToSpan(focusedSpanId);\n }\n }\n\n getRowStates(): RowState[] {\n const { childrenHiddenIDs, detailStates, trace } = this.props;\n return memoizedGenerateRowStates(trace, childrenHiddenIDs, detailStates);\n }\n\n getClipping(): { left: boolean; right: boolean } {\n const { currentViewRangeTime } = this.props;\n return memoizedGetClipping(currentViewRangeTime);\n }\n\n getViewedBounds(): ViewedBoundsFunctionType {\n const { currentViewRangeTime, trace } = this.props;\n const [zoomStart, zoomEnd] = currentViewRangeTime;\n\n return memoizedViewBoundsFunc({\n min: trace.startTime,\n max: trace.endTime,\n viewStart: zoomStart,\n viewEnd: zoomEnd,\n });\n }\n\n getAccessors() {\n const lv = this.listView;\n if (!lv) {\n throw new Error('ListView unavailable');\n }\n return {\n getViewRange: this.getViewRange,\n getSearchedSpanIDs: this.getSearchedSpanIDs,\n getCollapsedChildren: this.getCollapsedChildren,\n getViewHeight: lv.getViewHeight,\n getBottomRowIndexVisible: lv.getBottomVisibleIndex,\n getTopRowIndexVisible: lv.getTopVisibleIndex,\n getRowPosition: lv.getRowPosition,\n mapRowIndexToSpanIndex: this.mapRowIndexToSpanIndex,\n mapSpanIndexToRowIndex: this.mapSpanIndexToRowIndex,\n };\n }\n\n getViewRange = () => this.props.currentViewRangeTime;\n\n getSearchedSpanIDs = () => this.props.findMatchesIDs;\n\n getCollapsedChildren = () => this.props.childrenHiddenIDs;\n\n mapRowIndexToSpanIndex = (index: number) => this.getRowStates()[index].spanIndex;\n\n mapSpanIndexToRowIndex = (index: number) => {\n const max = this.getRowStates().length;\n for (let i = 0; i < max; i++) {\n const { spanIndex } = this.getRowStates()[i];\n if (spanIndex === index) {\n return i;\n }\n }\n throw new Error(`unable to find row for span index: ${index}`);\n };\n\n setListView = (listView: ListView | TNil) => {\n const isChanged = this.listView !== listView;\n this.listView = listView;\n if (listView && isChanged) {\n this.props.registerAccessors(this.getAccessors());\n }\n };\n\n // use long form syntax to avert flow error\n // https://github.com/facebook/flow/issues/3076#issuecomment-290944051\n getKeyFromIndex = (index: number) => {\n const { isDetail, span } = this.getRowStates()[index];\n return `${span.traceID}--${span.spanID}--${isDetail ? 'detail' : 'bar'}`;\n };\n\n getIndexFromKey = (key: string) => {\n const parts = key.split('--');\n const _traceID = parts[0];\n const _spanID = parts[1];\n const _isDetail = parts[2] === 'detail';\n const max = this.getRowStates().length;\n for (let i = 0; i < max; i++) {\n const { span, isDetail } = this.getRowStates()[i];\n if (span.spanID === _spanID && span.traceID === _traceID && isDetail === _isDetail) {\n return i;\n }\n }\n return -1;\n };\n\n getRowHeight = (index: number) => {\n const { span, isDetail } = this.getRowStates()[index];\n if (!isDetail) {\n return DEFAULT_HEIGHTS.bar;\n }\n if (Array.isArray(span.logs) && span.logs.length) {\n return DEFAULT_HEIGHTS.detailWithLogs;\n }\n return DEFAULT_HEIGHTS.detail;\n };\n\n renderRow = (key: string, style: React.CSSProperties, index: number, attrs: {}) => {\n const { isDetail, span, spanIndex } = this.getRowStates()[index];\n return isDetail\n ? this.renderSpanDetailRow(span, key, style, attrs)\n : this.renderSpanBarRow(span, spanIndex, key, style, attrs);\n };\n\n scrollToSpan = (spanID?: string) => {\n if (spanID == null) {\n return;\n }\n const i = this.getRowStates().findIndex((row) => row.span.spanID === spanID);\n if (i >= 0) {\n this.listView?.scrollToIndex(i);\n }\n };\n\n renderSpanBarRow(span: TraceSpan, spanIndex: number, key: string, style: React.CSSProperties, attrs: {}) {\n const { spanID } = span;\n const { serviceName } = span.process;\n const {\n childrenHiddenIDs,\n childrenToggle,\n detailStates,\n detailToggle,\n findMatchesIDs,\n spanNameColumnWidth,\n trace,\n focusSpan,\n hoverIndentGuideIds,\n addHoverIndentGuideId,\n removeHoverIndentGuideId,\n theme,\n createSpanLink,\n focusedSpanId,\n } = this.props;\n // to avert flow error\n if (!trace) {\n return null;\n }\n const color = getColorByKey(serviceName, theme);\n const isCollapsed = childrenHiddenIDs.has(spanID);\n const isDetailExpanded = detailStates.has(spanID);\n const isMatchingFilter = findMatchesIDs ? findMatchesIDs.has(spanID) : false;\n const isFocused = spanID === focusedSpanId;\n const showErrorIcon = isErrorSpan(span) || (isCollapsed && spanContainsErredSpan(trace.spans, spanIndex));\n\n // Check for direct child \"server\" span if the span is a \"client\" span.\n let rpc = null;\n if (isCollapsed) {\n const rpcSpan = findServerChildSpan(trace.spans.slice(spanIndex));\n if (rpcSpan) {\n const rpcViewBounds = this.getViewedBounds()(rpcSpan.startTime, rpcSpan.startTime + rpcSpan.duration);\n rpc = {\n color: getColorByKey(rpcSpan.process.serviceName, theme),\n operationName: rpcSpan.operationName,\n serviceName: rpcSpan.process.serviceName,\n viewEnd: rpcViewBounds.end,\n viewStart: rpcViewBounds.start,\n };\n }\n }\n\n const peerServiceKV = span.tags.find((kv) => kv.key === PEER_SERVICE);\n // Leaf, kind == client and has peer.service.tag, is likely a client span that does a request\n // to an uninstrumented/external service\n let noInstrumentedServer = null;\n if (!span.hasChildren && peerServiceKV && isKindClient(span)) {\n noInstrumentedServer = {\n serviceName: peerServiceKV.value,\n color: getColorByKey(peerServiceKV.value, theme),\n };\n }\n\n const styles = getStyles();\n return (\n
\n \n
\n );\n }\n\n renderSpanDetailRow(span: TraceSpan, key: string, style: React.CSSProperties, attrs: {}) {\n const { spanID } = span;\n const { serviceName } = span.process;\n const {\n detailLogItemToggle,\n detailLogsToggle,\n detailProcessToggle,\n detailReferencesToggle,\n detailWarningsToggle,\n detailStackTracesToggle,\n detailStates,\n detailTagsToggle,\n detailToggle,\n spanNameColumnWidth,\n trace,\n focusSpan,\n hoverIndentGuideIds,\n addHoverIndentGuideId,\n removeHoverIndentGuideId,\n linksGetter,\n theme,\n createSpanLink,\n focusedSpanId,\n createFocusSpanLink,\n } = this.props;\n const detailState = detailStates.get(spanID);\n if (!trace || !detailState) {\n return null;\n }\n const color = getColorByKey(serviceName, theme);\n const styles = getStyles();\n return (\n
\n \n
\n );\n }\n\n render() {\n const styles = getStyles();\n const { scrollElement } = this.props;\n return (\n
\n \n
\n );\n }\n}\n\nexport default withTheme2(UnthemedVirtualizedTraceView);\n","// Copyright (c) 2018 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport const HTTP_METHOD = 'http.method' as 'http.method';\nexport const PEER_SERVICE = 'peer.service' as 'peer.service';\nexport const SPAN_KIND = 'span.kind' as 'span.kind';\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nconst keyboardMappings: Record = {\n scrollPageDown: { binding: 's', label: 'Scroll down' },\n scrollPageUp: { binding: 'w', label: 'Scroll up' },\n scrollToNextVisibleSpan: { binding: 'f', label: 'Scroll to the next visible span' },\n scrollToPrevVisibleSpan: { binding: 'b', label: 'Scroll to the previous visible span' },\n panLeft: { binding: ['a', 'left'], label: 'Pan left' },\n panLeftFast: { binding: ['shift+a', 'shift+left'], label: 'Pan left — Large' },\n panRight: { binding: ['d', 'right'], label: 'Pan right' },\n panRightFast: { binding: ['shift+d', 'shift+right'], label: 'Pan right — Large' },\n zoomIn: { binding: 'up', label: 'Zoom in' },\n zoomInFast: { binding: 'shift+up', label: 'Zoom in — Large' },\n zoomOut: { binding: 'down', label: 'Zoom out' },\n zoomOutFast: { binding: 'shift+down', label: 'Zoom out — Large' },\n collapseAll: { binding: ']', label: 'Collapse All' },\n expandAll: { binding: '[', label: 'Expand All' },\n collapseOne: { binding: 'p', label: 'Collapse One Level' },\n expandOne: { binding: 'o', label: 'Expand One Level' },\n searchSpans: { binding: 'ctrl+b', label: 'Search Spans' },\n clearSearch: { binding: 'escape', label: 'Clear Search' },\n};\n\nexport default keyboardMappings;\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport Combokeys from 'combokeys';\n\nimport keyboardMappings from './keyboard-mappings';\n\nexport type CombokeysHandler =\n | (() => void)\n | ((event: React.KeyboardEvent) => void)\n | ((event: React.KeyboardEvent, s: string) => void);\n\nexport type ShortcutCallbacks = {\n [name: string]: CombokeysHandler;\n};\n\nlet instance: Combokeys | undefined;\n\nfunction getInstance(): Combokeys {\n if (instance) {\n return instance;\n }\n const local = new Combokeys(document.body);\n instance = local;\n return local;\n}\n\nexport function merge(callbacks: ShortcutCallbacks) {\n const inst = getInstance();\n Object.keys(callbacks).forEach((name) => {\n const keysHandler = callbacks[name];\n if (keysHandler) {\n inst.bind(keyboardMappings[name].binding, keysHandler);\n }\n });\n}\n\nexport function reset() {\n const combokeys = getInstance();\n combokeys.reset();\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React from 'react';\nimport { css } from '@emotion/css';\nimport { GrafanaTheme2, LinkModel } from '@grafana/data';\nimport { stylesFactory, withTheme2 } from '@grafana/ui';\n\nimport TimelineHeaderRow from './TimelineHeaderRow';\nimport VirtualizedTraceView from './VirtualizedTraceView';\nimport { merge as mergeShortcuts } from '../keyboard-shortcuts';\nimport { Accessors } from '../ScrollManager';\nimport { TUpdateViewRangeTimeFunction, ViewRange, ViewRangeTimeUpdate } from './types';\nimport { SpanLinkFunc, TNil } from '../types';\nimport { TraceSpan, Trace, TraceLog, TraceKeyValuePair, TraceLink } from '../types/trace';\nimport TTraceTimeline from '../types/TTraceTimeline';\nimport { autoColor } from '../Theme';\nimport ExternalLinkContext from '../url/externalLinkContext';\n\ntype TExtractUiFindFromStateReturn = {\n uiFind: string | undefined;\n};\n\nconst getStyles = stylesFactory((theme: GrafanaTheme2) => {\n return {\n TraceTimelineViewer: css`\n label: TraceTimelineViewer;\n border-bottom: 1px solid ${autoColor(theme, '#bbb')};\n\n & .json-markup {\n line-height: 17px;\n font-size: 13px;\n font-family: monospace;\n white-space: pre-wrap;\n }\n\n & .json-markup-key {\n font-weight: bold;\n }\n\n & .json-markup-bool {\n color: ${autoColor(theme, 'firebrick')};\n }\n\n & .json-markup-string {\n color: ${autoColor(theme, 'teal')};\n }\n\n & .json-markup-null {\n color: ${autoColor(theme, 'teal')};\n }\n\n & .json-markup-number {\n color: ${autoColor(theme, 'blue', 'black')};\n }\n `,\n };\n});\n\ntype TProps = TExtractUiFindFromStateReturn & {\n registerAccessors: (accessors: Accessors) => void;\n findMatchesIDs: Set | TNil;\n scrollToFirstVisibleSpan: () => void;\n traceTimeline: TTraceTimeline;\n trace: Trace;\n updateNextViewRangeTime: (update: ViewRangeTimeUpdate) => void;\n updateViewRangeTime: TUpdateViewRangeTimeFunction;\n viewRange: ViewRange;\n focusSpan: (uiFind: string) => void;\n createLinkToExternalSpan: (traceID: string, spanID: string) => string;\n\n setSpanNameColumnWidth: (width: number) => void;\n collapseAll: (spans: TraceSpan[]) => void;\n collapseOne: (spans: TraceSpan[]) => void;\n expandAll: () => void;\n expandOne: (spans: TraceSpan[]) => void;\n\n childrenToggle: (spanID: string) => void;\n clearShouldScrollToFirstUiFindMatch: () => void;\n detailLogItemToggle: (spanID: string, log: TraceLog) => void;\n detailLogsToggle: (spanID: string) => void;\n detailWarningsToggle: (spanID: string) => void;\n detailStackTracesToggle: (spanID: string) => void;\n detailReferencesToggle: (spanID: string) => void;\n detailProcessToggle: (spanID: string) => void;\n detailTagsToggle: (spanID: string) => void;\n detailToggle: (spanID: string) => void;\n setTrace: (trace: Trace | TNil, uiFind: string | TNil) => void;\n addHoverIndentGuideId: (spanID: string) => void;\n removeHoverIndentGuideId: (spanID: string) => void;\n linksGetter: (span: TraceSpan, items: TraceKeyValuePair[], itemIndex: number) => TraceLink[];\n theme: GrafanaTheme2;\n createSpanLink?: SpanLinkFunc;\n scrollElement?: Element;\n focusedSpanId?: string;\n createFocusSpanLink: (traceId: string, spanId: string) => LinkModel;\n};\n\ntype State = {\n // Will be set to real height of the component so it can be passed down to size some other elements.\n height: number;\n};\n\nconst NUM_TICKS = 5;\n\n/**\n * `TraceTimelineViewer` now renders the header row because it is sensitive to\n * `props.viewRange.time.cursor`. If `VirtualizedTraceView` renders it, it will\n * re-render the ListView every time the cursor is moved on the trace minimap\n * or `TimelineHeaderRow`.\n */\nexport class UnthemedTraceTimelineViewer extends React.PureComponent {\n constructor(props: TProps) {\n super(props);\n this.state = { height: 0 };\n }\n\n componentDidMount() {\n mergeShortcuts({\n collapseAll: this.collapseAll,\n expandAll: this.expandAll,\n collapseOne: this.collapseOne,\n expandOne: this.expandOne,\n });\n }\n\n collapseAll = () => {\n this.props.collapseAll(this.props.trace.spans);\n };\n\n collapseOne = () => {\n this.props.collapseOne(this.props.trace.spans);\n };\n\n expandAll = () => {\n this.props.expandAll();\n };\n\n expandOne = () => {\n this.props.expandOne(this.props.trace.spans);\n };\n\n render() {\n const {\n setSpanNameColumnWidth,\n updateNextViewRangeTime,\n updateViewRangeTime,\n viewRange,\n createLinkToExternalSpan,\n traceTimeline,\n theme,\n ...rest\n } = this.props;\n const { trace } = rest;\n const styles = getStyles(theme);\n\n return (\n \n ref && this.setState({ height: ref.getBoundingClientRect().height })}\n >\n \n \n \n \n );\n }\n}\n\nexport default withTheme2(UnthemedTraceTimelineViewer);\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { css } from '@emotion/css';\n\nimport renderIntoCanvas from './render-into-canvas';\nimport { getRgbColorByKey } from '../../utils/color-generator';\nimport { TNil } from '../../types';\n\nimport { autoColor } from '../../Theme';\nimport { withTheme2, stylesFactory } from '@grafana/ui';\nimport { GrafanaTheme2 } from '@grafana/data';\n\nconst getStyles = stylesFactory((theme: GrafanaTheme2) => {\n return {\n CanvasSpanGraph: css`\n label: CanvasSpanGraph;\n background: ${autoColor(theme, '#fafafa')};\n height: 60px;\n position: absolute;\n width: 100%;\n `,\n };\n});\n\ntype CanvasSpanGraphProps = {\n items: Array<{ valueWidth: number; valueOffset: number; serviceName: string }>;\n valueWidth: number;\n theme: GrafanaTheme2;\n};\n\nexport class UnthemedCanvasSpanGraph extends React.PureComponent {\n _canvasElm: HTMLCanvasElement | TNil;\n\n constructor(props: CanvasSpanGraphProps) {\n super(props);\n this._canvasElm = undefined;\n }\n\n getColor = (key: string) => getRgbColorByKey(key, this.props.theme);\n\n componentDidMount() {\n this._draw();\n }\n\n componentDidUpdate() {\n this._draw();\n }\n\n _setCanvasRef = (elm: HTMLCanvasElement | TNil) => {\n this._canvasElm = elm;\n };\n\n _draw() {\n if (this._canvasElm) {\n const { valueWidth: totalValueWidth, items } = this.props;\n renderIntoCanvas(this._canvasElm, items, totalValueWidth, this.getColor, autoColor(this.props.theme, '#fff'));\n }\n }\n\n render() {\n return ;\n }\n}\n\nexport default withTheme2(UnthemedCanvasSpanGraph);\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { TNil } from '../..';\n\n// exported for tests\nexport const ITEM_ALPHA = 0.8;\nexport const MIN_ITEM_HEIGHT = 2;\nexport const MAX_TOTAL_HEIGHT = 200;\nexport const MIN_ITEM_WIDTH = 10;\nexport const MIN_TOTAL_HEIGHT = 60;\nexport const MAX_ITEM_HEIGHT = 6;\n\nexport default function renderIntoCanvas(\n canvas: HTMLCanvasElement,\n items: Array<{ valueWidth: number; valueOffset: number; serviceName: string }>,\n totalValueWidth: number,\n getFillColor: (serviceName: string) => [number, number, number],\n bgColor: string\n) {\n const fillCache: Map = new Map();\n const cHeight = items.length < MIN_TOTAL_HEIGHT ? MIN_TOTAL_HEIGHT : Math.min(items.length, MAX_TOTAL_HEIGHT);\n const cWidth = window.innerWidth * 2;\n // eslint-disable-next-line no-param-reassign\n canvas.width = cWidth;\n // eslint-disable-next-line no-param-reassign\n canvas.height = cHeight;\n const itemHeight = Math.min(MAX_ITEM_HEIGHT, Math.max(MIN_ITEM_HEIGHT, cHeight / items.length));\n const itemYChange = cHeight / items.length;\n\n const ctx = canvas.getContext('2d', { alpha: false }) as CanvasRenderingContext2D;\n ctx.fillStyle = bgColor;\n ctx.fillRect(0, 0, cWidth, cHeight);\n for (let i = 0; i < items.length; i++) {\n const { valueWidth, valueOffset, serviceName } = items[i];\n const x = (valueOffset / totalValueWidth) * cWidth;\n let width = (valueWidth / totalValueWidth) * cWidth;\n if (width < MIN_ITEM_WIDTH) {\n width = MIN_ITEM_WIDTH;\n }\n let fillStyle = fillCache.get(serviceName);\n if (!fillStyle) {\n fillStyle = `rgba(${getFillColor(serviceName).concat(ITEM_ALPHA).join()})`;\n fillCache.set(serviceName, fillStyle);\n }\n ctx.fillStyle = fillStyle;\n ctx.fillRect(x, i * itemYChange, width, itemHeight);\n }\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React from 'react';\nimport { css } from '@emotion/css';\nimport { useStyles2 } from '@grafana/ui';\n\nimport { formatDuration } from '../../utils/date';\n\nconst getStyles = () => {\n return {\n TickLabels: css`\n label: TickLabels;\n height: 1rem;\n position: relative;\n `,\n TickLabelsLabel: css`\n label: TickLabelsLabel;\n color: #717171;\n font-size: 0.7rem;\n position: absolute;\n user-select: none;\n `,\n };\n};\n\ntype TickLabelsProps = {\n numTicks: number;\n duration: number;\n};\n\nexport default function TickLabels(props: TickLabelsProps) {\n const { numTicks, duration } = props;\n const styles = useStyles2(getStyles);\n\n const ticks = [];\n for (let i = 0; i < numTicks + 1; i++) {\n const portion = i / numTicks;\n const style = portion === 1 ? { right: '0%' } : { left: `${portion * 100}%` };\n ticks.push(\n
\n {formatDuration(duration * portion)}\n
\n );\n }\n\n return
{ticks}
;\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React from 'react';\nimport { css } from '@emotion/css';\nimport { useStyles2 } from '@grafana/ui';\n\nconst getStyles = () => {\n return {\n GraphTick: css`\n label: GraphTick;\n stroke: #aaa;\n stroke-width: 1px;\n `,\n };\n};\n\ntype GraphTicksProps = {\n numTicks: number;\n};\n\nexport default function GraphTicks(props: GraphTicksProps) {\n const { numTicks } = props;\n const styles = useStyles2(getStyles);\n const ticks = [];\n // i starts at 1, limit is `i < numTicks` so the first and last ticks aren't drawn\n for (let i = 1; i < numTicks; i++) {\n const x = `${(i / numTicks) * 100}%`;\n ticks.push();\n }\n\n return (\n \n {ticks}\n \n );\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React from 'react';\nimport cx from 'classnames';\nimport { css } from '@emotion/css';\nimport { useStyles2 } from '@grafana/ui';\n\nexport const getStyles = () => {\n return {\n ScrubberHandleExpansion: cx(\n css`\n label: ScrubberHandleExpansion;\n cursor: col-resize;\n fill-opacity: 0;\n fill: #44f;\n `,\n 'scrubber-handle-expansion'\n ),\n ScrubberHandle: cx(\n css`\n label: ScrubberHandle;\n cursor: col-resize;\n fill: #555;\n `,\n 'scrubber-handle'\n ),\n ScrubberLine: cx(\n css`\n label: ScrubberLine;\n pointer-events: none;\n stroke: #555;\n `,\n 'scrubber-line'\n ),\n ScrubberDragging: css`\n label: ScrubberDragging;\n & .scrubber-handle-expansion {\n fill-opacity: 1;\n }\n & .scrubber-handle {\n fill: #44f;\n }\n & > .scrubber-line {\n stroke: #44f;\n }\n `,\n ScrubberHandles: css`\n label: ScrubberHandles;\n &:hover > .scrubber-handle-expansion {\n fill-opacity: 1;\n }\n &:hover > .scrubber-handle {\n fill: #44f;\n }\n &:hover + .scrubber.line {\n stroke: #44f;\n }\n `,\n };\n};\n\ntype ScrubberProps = {\n isDragging: boolean;\n position: number;\n onMouseDown: (evt: React.MouseEvent) => void;\n onMouseEnter: (evt: React.MouseEvent) => void;\n onMouseLeave: (evt: React.MouseEvent) => void;\n};\n\nexport default function Scrubber({ isDragging, onMouseDown, onMouseEnter, onMouseLeave, position }: ScrubberProps) {\n const xPercent = `${position * 100}%`;\n const styles = useStyles2(getStyles);\n const className = cx({ [styles.ScrubberDragging]: isDragging });\n return (\n \n \n {/* handleExpansion is only visible when `isDragging` is true */}\n \n \n \n \n \n );\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport cx from 'classnames';\nimport * as React from 'react';\nimport { css } from '@emotion/css';\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { withTheme2, stylesFactory } from '@grafana/ui';\n\nimport GraphTicks from './GraphTicks';\nimport Scrubber from './Scrubber';\nimport { TUpdateViewRangeTimeFunction, UIButton, ViewRange, ViewRangeTimeUpdate, TNil } from '../..';\nimport { autoColor } from '../../Theme';\nimport DraggableManager, { DraggableBounds, DraggingUpdate, EUpdateTypes } from '../../utils/DraggableManager';\n\nexport const getStyles = stylesFactory((theme: GrafanaTheme2) => {\n // Need this cause emotion will merge emotion generated classes into single className if used with cx from emotion\n // package and the selector won't work\n const ViewingLayerResetZoomHoverClassName = 'JaegerUiComponents__ViewingLayerResetZoomHoverClassName';\n const ViewingLayerResetZoom = css`\n label: ViewingLayerResetZoom;\n display: none;\n position: absolute;\n right: 1%;\n top: 10%;\n z-index: 1;\n `;\n return {\n ViewingLayer: css`\n label: ViewingLayer;\n cursor: vertical-text;\n position: relative;\n z-index: 1;\n &:hover > .${ViewingLayerResetZoomHoverClassName} {\n display: unset;\n }\n `,\n ViewingLayerGraph: css`\n label: ViewingLayerGraph;\n border: 1px solid ${autoColor(theme, '#999')};\n /* need !important here to overcome something from semantic UI */\n overflow: visible !important;\n position: relative;\n transform-origin: 0 0;\n width: 100%;\n `,\n ViewingLayerInactive: css`\n label: ViewingLayerInactive;\n fill: ${autoColor(theme, 'rgba(214, 214, 214, 0.5)')};\n `,\n ViewingLayerCursorGuide: css`\n label: ViewingLayerCursorGuide;\n stroke: ${autoColor(theme, '#f44')};\n stroke-width: 1;\n `,\n ViewingLayerDraggedShift: css`\n label: ViewingLayerDraggedShift;\n fill-opacity: 0.2;\n `,\n ViewingLayerDrag: css`\n label: ViewingLayerDrag;\n fill: ${autoColor(theme, '#44f')};\n `,\n ViewingLayerFullOverlay: css`\n label: ViewingLayerFullOverlay;\n bottom: 0;\n cursor: col-resize;\n left: 0;\n position: fixed;\n right: 0;\n top: 0;\n user-select: none;\n `,\n ViewingLayerResetZoom,\n ViewingLayerResetZoomHoverClassName,\n };\n});\n\ntype ViewingLayerProps = {\n height: number;\n numTicks: number;\n updateViewRangeTime: TUpdateViewRangeTimeFunction;\n updateNextViewRangeTime: (update: ViewRangeTimeUpdate) => void;\n viewRange: ViewRange;\n theme: GrafanaTheme2;\n};\n\ntype ViewingLayerState = {\n /**\n * Cursor line should not be drawn when the mouse is over the scrubber handle.\n */\n preventCursorLine: boolean;\n};\n\n/**\n * Designate the tags for the different dragging managers. Exported for tests.\n */\nexport const dragTypes = {\n /**\n * Tag for dragging the right scrubber, e.g. end of the current view range.\n */\n SHIFT_END: 'SHIFT_END',\n /**\n * Tag for dragging the left scrubber, e.g. start of the current view range.\n */\n SHIFT_START: 'SHIFT_START',\n /**\n * Tag for dragging a new view range.\n */\n REFRAME: 'REFRAME',\n};\n\n/**\n * Returns the layout information for drawing the view-range differential, e.g.\n * show what will change when the mouse is released. Basically, this is the\n * difference from the start of the drag to the current position.\n *\n * @returns {{ x: string, width: string, leadginX: string }}\n */\nfunction getNextViewLayout(start: number, position: number) {\n const [left, right] = start < position ? [start, position] : [position, start];\n return {\n x: `${left * 100}%`,\n width: `${(right - left) * 100}%`,\n leadingX: `${position * 100}%`,\n };\n}\n\n/**\n * `ViewingLayer` is rendered on top of the Canvas rendering of the minimap and\n * handles showing the current view range and handles mouse UX for modifying it.\n */\nexport class UnthemedViewingLayer extends React.PureComponent {\n state: ViewingLayerState;\n\n _root: Element | TNil;\n\n /**\n * `_draggerReframe` handles clicking and dragging on the `ViewingLayer` to\n * redefined the view range.\n */\n _draggerReframe: DraggableManager;\n\n /**\n * `_draggerStart` handles dragging the left scrubber to adjust the start of\n * the view range.\n */\n _draggerStart: DraggableManager;\n\n /**\n * `_draggerEnd` handles dragging the right scrubber to adjust the end of\n * the view range.\n */\n _draggerEnd: DraggableManager;\n\n constructor(props: ViewingLayerProps) {\n super(props);\n\n this._draggerReframe = new DraggableManager({\n getBounds: this._getDraggingBounds,\n onDragEnd: this._handleReframeDragEnd,\n onDragMove: this._handleReframeDragUpdate,\n onDragStart: this._handleReframeDragUpdate,\n onMouseMove: this._handleReframeMouseMove,\n onMouseLeave: this._handleReframeMouseLeave,\n tag: dragTypes.REFRAME,\n });\n\n this._draggerStart = new DraggableManager({\n getBounds: this._getDraggingBounds,\n onDragEnd: this._handleScrubberDragEnd,\n onDragMove: this._handleScrubberDragUpdate,\n onDragStart: this._handleScrubberDragUpdate,\n onMouseEnter: this._handleScrubberEnterLeave,\n onMouseLeave: this._handleScrubberEnterLeave,\n tag: dragTypes.SHIFT_START,\n });\n\n this._draggerEnd = new DraggableManager({\n getBounds: this._getDraggingBounds,\n onDragEnd: this._handleScrubberDragEnd,\n onDragMove: this._handleScrubberDragUpdate,\n onDragStart: this._handleScrubberDragUpdate,\n onMouseEnter: this._handleScrubberEnterLeave,\n onMouseLeave: this._handleScrubberEnterLeave,\n tag: dragTypes.SHIFT_END,\n });\n\n this._root = undefined;\n this.state = {\n preventCursorLine: false,\n };\n }\n\n componentWillUnmount() {\n this._draggerReframe.dispose();\n this._draggerEnd.dispose();\n this._draggerStart.dispose();\n }\n\n _setRoot = (elm: SVGElement | TNil) => {\n this._root = elm;\n };\n\n _getDraggingBounds = (tag: string | TNil): DraggableBounds => {\n if (!this._root) {\n throw new Error('invalid state');\n }\n const { left: clientXLeft, width } = this._root.getBoundingClientRect();\n const [viewStart, viewEnd] = this.props.viewRange.time.current;\n let maxValue = 1;\n let minValue = 0;\n if (tag === dragTypes.SHIFT_START) {\n maxValue = viewEnd;\n } else if (tag === dragTypes.SHIFT_END) {\n minValue = viewStart;\n }\n return { clientXLeft, maxValue, minValue, width };\n };\n\n _handleReframeMouseMove = ({ value }: DraggingUpdate) => {\n this.props.updateNextViewRangeTime({ cursor: value });\n };\n\n _handleReframeMouseLeave = () => {\n this.props.updateNextViewRangeTime({ cursor: null });\n };\n\n _handleReframeDragUpdate = ({ value }: DraggingUpdate) => {\n const shift = value;\n const { time } = this.props.viewRange;\n const anchor = time.reframe ? time.reframe.anchor : shift;\n const update = { reframe: { anchor, shift } };\n this.props.updateNextViewRangeTime(update);\n };\n\n _handleReframeDragEnd = ({ manager, value }: DraggingUpdate) => {\n const { time } = this.props.viewRange;\n const anchor = time.reframe ? time.reframe.anchor : value;\n const [start, end] = value < anchor ? [value, anchor] : [anchor, value];\n manager.resetBounds();\n this.props.updateViewRangeTime(start, end, 'minimap');\n };\n\n _handleScrubberEnterLeave = ({ type }: DraggingUpdate) => {\n const preventCursorLine = type === EUpdateTypes.MouseEnter;\n this.setState({ preventCursorLine });\n };\n\n _handleScrubberDragUpdate = ({ event, tag, type, value }: DraggingUpdate) => {\n if (type === EUpdateTypes.DragStart) {\n event.stopPropagation();\n }\n if (tag === dragTypes.SHIFT_START) {\n this.props.updateNextViewRangeTime({ shiftStart: value });\n } else if (tag === dragTypes.SHIFT_END) {\n this.props.updateNextViewRangeTime({ shiftEnd: value });\n }\n };\n\n _handleScrubberDragEnd = ({ manager, tag, value }: DraggingUpdate) => {\n const [viewStart, viewEnd] = this.props.viewRange.time.current;\n let update: [number, number];\n if (tag === dragTypes.SHIFT_START) {\n update = [value, viewEnd];\n } else if (tag === dragTypes.SHIFT_END) {\n update = [viewStart, value];\n } else {\n // to satisfy flow\n throw new Error('bad state');\n }\n manager.resetBounds();\n this.setState({ preventCursorLine: false });\n this.props.updateViewRangeTime(update[0], update[1], 'minimap');\n };\n\n /**\n * Resets the zoom to fully zoomed out.\n */\n _resetTimeZoomClickHandler = () => {\n this.props.updateViewRangeTime(0, 1);\n };\n\n /**\n * Renders the difference between where the drag started and the current\n * position, e.g. the red or blue highlight.\n *\n * @returns React.Node[]\n */\n _getMarkers(from: number, to: number) {\n const styles = getStyles(this.props.theme);\n const layout = getNextViewLayout(from, to);\n return [\n ,\n ,\n ];\n }\n\n render() {\n const { height, viewRange, numTicks, theme } = this.props;\n const { preventCursorLine } = this.state;\n const { current, cursor, shiftStart, shiftEnd, reframe } = viewRange.time;\n const haveNextTimeRange = shiftStart != null || shiftEnd != null || reframe != null;\n const [viewStart, viewEnd] = current;\n let leftInactive = 0;\n if (viewStart) {\n leftInactive = viewStart * 100;\n }\n let rightInactive = 100;\n if (viewEnd) {\n rightInactive = 100 - viewEnd * 100;\n }\n let cursorPosition: string | undefined;\n if (!haveNextTimeRange && cursor != null && !preventCursorLine) {\n cursorPosition = `${cursor * 100}%`;\n }\n const styles = getStyles(theme);\n\n return (\n
\n {(viewStart !== 0 || viewEnd !== 1) && (\n \n Reset Selection\n \n )}\n \n {leftInactive > 0 && (\n \n )}\n {rightInactive > 0 && (\n \n )}\n \n {cursorPosition && (\n \n )}\n {shiftStart != null && this._getMarkers(viewStart, shiftStart)}\n {shiftEnd != null && this._getMarkers(viewEnd, shiftEnd)}\n \n \n {reframe != null && this._getMarkers(reframe.anchor, reframe.shift)}\n \n {/* fullOverlay updates the mouse cursor blocks mouse events */}\n {haveNextTimeRange &&
}\n
\n );\n }\n}\n\nexport default withTheme2(UnthemedViewingLayer);\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport cx from 'classnames';\nimport memoizeOne from 'memoize-one';\n\nimport CanvasSpanGraph from './CanvasSpanGraph';\nimport TickLabels from './TickLabels';\nimport ViewingLayer from './ViewingLayer';\nimport { TUpdateViewRangeTimeFunction, ViewRange, ViewRangeTimeUpdate } from '../..';\nimport { TraceSpan, Trace } from '../../types/trace';\nimport { ubPb2, ubPx2, ubRelative } from '../../uberUtilityStyles';\n\nconst DEFAULT_HEIGHT = 60;\nconst TIMELINE_TICK_INTERVAL = 4;\n\ntype SpanGraphProps = {\n height?: number;\n trace: Trace;\n viewRange: ViewRange;\n updateViewRangeTime: TUpdateViewRangeTimeFunction;\n updateNextViewRangeTime: (nextUpdate: ViewRangeTimeUpdate) => void;\n};\n\ntype SpanItem = {\n valueOffset: number;\n valueWidth: number;\n serviceName: string;\n};\n\nfunction getItem(span: TraceSpan): SpanItem {\n return {\n valueOffset: span.relativeStartTime,\n valueWidth: span.duration,\n serviceName: span.process.serviceName,\n };\n}\n\nfunction getItems(trace: Trace): SpanItem[] {\n return trace.spans.map(getItem);\n}\n\nconst memoizedGetitems = memoizeOne(getItems);\n\nexport default class SpanGraph extends React.PureComponent {\n static defaultProps = {\n height: DEFAULT_HEIGHT,\n };\n\n render() {\n const { height, trace, viewRange, updateNextViewRangeTime, updateViewRangeTime } = this.props;\n if (!trace) {\n return
;\n }\n\n const items = memoizedGetitems(trace);\n return (\n
\n \n
\n \n \n
\n
\n );\n }\n}\n","// Copyright (c) 2019 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\n\nimport { TNil } from '../types/index';\nimport { UIIcon, UIInput } from '../uiElementsContext';\n\ntype Props = {\n allowClear?: boolean;\n inputProps: Record;\n location: Location;\n match: any;\n trackFindFunction?: (str: string | TNil) => void;\n value: string | undefined;\n onChange: (value: string) => void;\n};\n\nexport default class UiFindInput extends React.PureComponent {\n static defaultProps: Partial = {\n inputProps: {},\n trackFindFunction: undefined,\n value: undefined,\n };\n\n clearUiFind = () => {\n this.props.onChange('');\n };\n\n render() {\n const { allowClear, inputProps, value } = this.props;\n\n const suffix = (\n <>\n {allowClear && value && value.length && }\n {inputProps.suffix}\n \n );\n\n return (\n this.props.onChange(e.target.value)}\n suffix={suffix}\n value={value}\n />\n );\n }\n}\n","// Copyright (c) 2018 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport cx from 'classnames';\nimport IoAndroidLocate from 'react-icons/lib/io/android-locate';\nimport { css } from '@emotion/css';\nimport { useStyles2 } from '@grafana/ui';\n\nimport * as markers from './TracePageSearchBar.markers';\nimport UiFindInput from '../common/UiFindInput';\nimport { TNil } from '../types';\n\nimport { UIButton, UIInputGroup } from '../uiElementsContext';\nimport { ubFlexAuto, ubJustifyEnd } from '../uberUtilityStyles';\n// eslint-disable-next-line no-duplicate-imports\nimport { memo } from 'react';\n\nexport const getStyles = () => {\n return {\n TracePageSearchBar: css`\n label: TracePageSearchBar;\n `,\n TracePageSearchBarBar: css`\n label: TracePageSearchBarBar;\n max-width: 20rem;\n transition: max-width 0.5s;\n &:focus-within {\n max-width: 100%;\n }\n `,\n TracePageSearchBarCount: css`\n label: TracePageSearchBarCount;\n opacity: 0.6;\n `,\n TracePageSearchBarBtn: css`\n label: TracePageSearchBarBtn;\n border-left: none;\n transition: 0.2s;\n `,\n TracePageSearchBarBtnDisabled: css`\n label: TracePageSearchBarBtnDisabled;\n opacity: 0.5;\n `,\n TracePageSearchBarLocateBtn: css`\n label: TracePageSearchBarLocateBtn;\n padding: 1px 8px 4px;\n `,\n };\n};\n\ntype TracePageSearchBarProps = {\n textFilter: string | TNil;\n prevResult: () => void;\n nextResult: () => void;\n clearSearch: () => void;\n focusUiFindMatches: () => void;\n resultCount: number;\n navigable: boolean;\n searchValue: string;\n onSearchValueChange: (value: string) => void;\n hideSearchButtons?: boolean;\n};\n\nexport default memo(function TracePageSearchBar(props: TracePageSearchBarProps) {\n const {\n clearSearch,\n focusUiFindMatches,\n navigable,\n nextResult,\n prevResult,\n resultCount,\n textFilter,\n onSearchValueChange,\n searchValue,\n hideSearchButtons,\n } = props;\n const styles = useStyles2(getStyles);\n\n const count = textFilter ? {resultCount} : null;\n\n const btnClass = cx(styles.TracePageSearchBarBtn, { [styles.TracePageSearchBarBtnDisabled]: !textFilter });\n const uiFindInputInputProps = {\n 'data-test': markers.IN_TRACE_SEARCH,\n className: cx(styles.TracePageSearchBarBar, ubFlexAuto),\n name: 'search',\n suffix: count,\n };\n\n return (\n
\n {/* style inline because compact overwrites the display */}\n \n \n {!hideSearchButtons && (\n <>\n {navigable && (\n <>\n \n \n \n \n \n \n )}\n \n \n )}\n \n
\n );\n});\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport const IN_TRACE_SEARCH = 'in-trace-search';\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { css } from '@emotion/css';\nimport { useStyles2 } from '@grafana/ui';\n\nconst getStyles = () => {\n return {\n BreakableText: css`\n label: BreakableText;\n display: inline-block;\n white-space: pre;\n `,\n };\n};\n\nconst WORD_RX = /\\W*\\w+\\W*/g;\n\ntype Props = {\n text: string;\n className?: string;\n wordRegexp?: RegExp;\n};\n\n// TODO typescript doesn't understand text or null as react nodes\n// https://github.com/Microsoft/TypeScript/issues/21699\nexport default function BreakableText(\n props: Props\n): any /* React.ReactNode /* React.ReactElement | React.ReactElement[] \\*\\/ */ {\n const { className, text, wordRegexp = WORD_RX } = props;\n const styles = useStyles2(getStyles);\n if (!text) {\n return typeof text === 'string' ? text : null;\n }\n const spans = [];\n wordRegexp.exec('');\n // if the given text has no words, set the first match to the entire text\n let match: RegExpExecArray | string[] | null = wordRegexp.exec(text) || [text];\n while (match) {\n spans.push(\n \n {match[0]}\n \n );\n match = wordRegexp.exec(text);\n }\n return spans;\n}\n\nBreakableText.defaultProps = {\n wordRegexp: WORD_RX,\n};\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React from 'react';\nimport cx from 'classnames';\nimport { css, keyframes } from '@emotion/css';\nimport { useStyles2 } from '@grafana/ui';\n\nimport { UIIcon } from '../uiElementsContext';\n\nconst getStyles = () => {\n const LoadingIndicatorColorAnim = keyframes`\n /*\n rgb(0, 128, 128) == teal\n rgba(0, 128, 128, 0.3) == #bedfdf\n */\n from {\n color: #bedfdf;\n }\n to {\n color: teal;\n }\n `;\n return {\n LoadingIndicator: css`\n label: LoadingIndicator;\n animation: ${LoadingIndicatorColorAnim} 1s infinite alternate;\n font-size: 36px;\n /* outline / stroke the loading indicator */\n text-shadow: -0.5px 0 rgba(0, 128, 128, 0.6), 0 0.5px rgba(0, 128, 128, 0.6), 0.5px 0 rgba(0, 128, 128, 0.6),\n 0 -0.5px rgba(0, 128, 128, 0.6);\n `,\n LoadingIndicatorCentered: css`\n label: LoadingIndicatorCentered;\n display: block;\n margin-left: auto;\n margin-right: auto;\n `,\n LoadingIndicatorSmall: css`\n label: LoadingIndicatorSmall;\n font-size: 0.7em;\n `,\n };\n};\n\ntype LoadingIndicatorProps = {\n centered?: boolean;\n className?: string;\n small?: boolean;\n};\n\nexport default function LoadingIndicator(props: LoadingIndicatorProps) {\n const { centered, className, small, ...rest } = props;\n const styles = useStyles2(getStyles);\n const cls = cx(styles.LoadingIndicator, {\n [styles.LoadingIndicatorCentered]: centered,\n [styles.LoadingIndicatorSmall]: small,\n className,\n });\n return ;\n}\n\nLoadingIndicator.defaultProps = {\n centered: false,\n className: undefined,\n small: false,\n};\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport const TOP_NAV_HEIGHT = 46 as 46;\n\nexport const FALLBACK_DAG_MAX_NUM_SERVICES = 100 as 100;\nexport const FALLBACK_TRACE_NAME = '' as '';\n\nexport const FETCH_DONE = 'FETCH_DONE' as 'FETCH_DONE';\nexport const FETCH_ERROR = 'FETCH_ERROR' as 'FETCH_ERROR';\nexport const FETCH_LOADING = 'FETCH_LOADING' as 'FETCH_LOADING';\n\nexport const fetchedState = {\n DONE: FETCH_DONE,\n ERROR: FETCH_ERROR,\n LOADING: FETCH_LOADING,\n};\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { css } from '@emotion/css';\nimport cx from 'classnames';\nimport { useStyles2 } from '@grafana/ui';\nimport { GrafanaTheme2 } from '@grafana/data';\n\nimport BreakableText from './BreakableText';\nimport LoadingIndicator from './LoadingIndicator';\nimport { fetchedState, FALLBACK_TRACE_NAME } from '../constants';\nimport { FetchedState, TNil } from '../types';\nimport { ApiError } from '../types/api-error';\n\nconst getStyles = (theme: GrafanaTheme2) => {\n return {\n TraceName: css`\n label: TraceName;\n font-size: ${theme.typography.size.lg};\n `,\n TraceNameError: css`\n label: TraceNameError;\n color: #c00;\n `,\n };\n};\n\ntype Props = {\n className?: string;\n error?: ApiError | TNil;\n state?: FetchedState | TNil;\n traceName?: string | TNil;\n};\n\nexport default function TraceName(props: Props) {\n const { className, error, state, traceName } = props;\n const isErred = state === fetchedState.ERROR;\n let title: string | React.ReactNode = traceName || FALLBACK_TRACE_NAME;\n const styles = useStyles2(getStyles);\n let errorCssClass = '';\n if (isErred) {\n errorCssClass = styles.TraceNameError;\n let titleStr = '';\n if (error) {\n titleStr = typeof error === 'string' ? error : error.message || String(error);\n }\n if (!titleStr) {\n titleStr = 'Error: Unknown error';\n }\n title = titleStr;\n title = ;\n } else if (state === fetchedState.LOADING) {\n title = ;\n } else {\n const text = String(traceName || FALLBACK_TRACE_NAME);\n title = ;\n }\n return {title};\n}\n","// Copyright (c) 2020 The Jaeger Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { memoize } from 'lodash';\n\nimport { TraceSpan } from '../types/trace';\n\nexport function _getTraceNameImpl(spans: TraceSpan[]) {\n // Use a span with no references to another span in given array\n // prefering the span with the fewest references\n // using start time as a tie breaker\n let candidateSpan: TraceSpan | undefined;\n const allIDs: Set = new Set(spans.map(({ spanID }) => spanID));\n\n for (let i = 0; i < spans.length; i++) {\n const hasInternalRef =\n spans[i].references &&\n spans[i].references.some(({ traceID, spanID }) => traceID === spans[i].traceID && allIDs.has(spanID));\n if (hasInternalRef) {\n continue;\n }\n\n if (!candidateSpan) {\n candidateSpan = spans[i];\n continue;\n }\n\n const thisRefLength = (spans[i].references && spans[i].references.length) || 0;\n const candidateRefLength = (candidateSpan.references && candidateSpan.references.length) || 0;\n\n if (\n thisRefLength < candidateRefLength ||\n (thisRefLength === candidateRefLength && spans[i].startTime < candidateSpan.startTime)\n ) {\n candidateSpan = spans[i];\n }\n }\n return candidateSpan ? `${candidateSpan.process.serviceName}: ${candidateSpan.operationName}` : '';\n}\n\nexport const getTraceName = memoize(_getTraceNameImpl, (spans: TraceSpan[]) => {\n if (!spans.length) {\n return 0;\n }\n return spans[0].traceID;\n});\n","// \nvar hasOwn = function hasOwn(object, key) {\n return Object.prototype.hasOwnProperty.call(object, key);\n};\n\nfunction deepEquals(equals, deepObjects) {\n function deep(valueA, valueB) {\n if (equals(valueA, valueB)) {\n return true;\n }\n\n if (Array.isArray(valueA)) {\n if (!Array.isArray(valueB) || valueA.length !== valueB.length) {\n return false;\n } // Check deep equality of each value in A against the same indexed value in B\n\n\n if (!valueA.every(function (value, index) {\n return deep(value, valueB[index]);\n })) {\n return false;\n } // could not find unequal items\n\n\n return true;\n }\n\n if (Array.isArray(valueB)) {\n return false;\n }\n\n if (typeof valueA === \"object\") {\n if (typeof valueB !== \"object\") {\n return false;\n }\n\n var isANull = valueA === null;\n var isBNull = valueB === null;\n\n if (isANull || isBNull) {\n return isANull === isBNull;\n }\n\n var aKeys = Object.keys(valueA);\n var bKeys = Object.keys(valueB);\n\n if (aKeys.length !== bKeys.length) {\n return false;\n } // Should we compare with shallow equivalence or deep equivalence?\n\n\n var equalityChecker = deepObjects ? deep : equals; // Check if objects share same keys, and each of those keys are equal\n\n if (!aKeys.every(function (aKey) {\n return hasOwn(valueA, aKey) && hasOwn(valueB, aKey) && equalityChecker(valueA[aKey], valueB[aKey]);\n })) {\n return false;\n } // could not find unequal keys or values\n\n\n return true;\n }\n\n return false;\n }\n\n return deep;\n}\n\n// \nvar findIndex = function findIndex(arr, fn) {\n for (var i = 0; i < arr.length; i++) {\n if (fn(arr[i])) {\n return i;\n }\n }\n\n return -1;\n};\n\nfunction lruCache(limit, equals) {\n var entries = [];\n\n function get(key) {\n var cacheIndex = findIndex(entries, function (entry) {\n return equals(key, entry.key);\n }); // We found a cached entry\n\n if (cacheIndex > -1) {\n var entry = entries[cacheIndex]; // Cached entry not at top of cache, move it to the top\n\n if (cacheIndex > 0) {\n entries.splice(cacheIndex, 1);\n entries.unshift(entry);\n }\n\n return entry.value;\n } // No entry found in cache, return null\n\n\n return undefined;\n }\n\n function put(key, value) {\n if (!get(key)) {\n entries.unshift({\n key: key,\n value: value\n });\n\n if (entries.length > limit) {\n entries.pop();\n }\n }\n }\n\n return {\n get: get,\n put: put\n };\n}\n\n// \nfunction singletonCache(equals) {\n var entry;\n return {\n get: function get(key) {\n if (entry && equals(key, entry.key)) {\n return entry.value;\n }\n },\n put: function put(key, value) {\n entry = {\n key: key,\n value: value\n };\n }\n };\n}\n\n// \n\nfunction createCache(limit, equals) {\n return limit === 1 ? singletonCache(equals) : lruCache(limit, equals);\n}\n\nfunction createEqualsFn(basicEquals, deepObjects) {\n // Choose strategy for basic or deep object equals\n var equals = deepObjects ? deepEquals(basicEquals, deepObjects) : basicEquals;\n return function (valueA, valueB) {\n // The arguments are always the argument array-like objects\n // Different lengths means they are not the same\n if (valueA.length !== valueB.length) {\n return false;\n } // Compare the values\n\n\n for (var index = 0; index < valueA.length; index += 1) {\n if (!equals(valueA[index], valueB[index])) {\n return false;\n }\n } // Found no conflicts\n\n\n return true;\n };\n}\n\nfunction memoize() {\n var limit = 1;\n\n var equals = function equals(valueA, valueB) {\n return valueA === valueB;\n };\n\n var deepObjects = false;\n\n for (var _len = arguments.length, config = new Array(_len), _key = 0; _key < _len; _key++) {\n config[_key] = arguments[_key];\n }\n\n if (typeof config[0] === \"number\") {\n limit = config.shift();\n }\n\n if (typeof config[0] === \"function\") {\n equals = config.shift();\n } else if (typeof config[0] === \"undefined\") {\n // Support passing undefined equal argument;\n config.shift();\n }\n\n if (typeof config[0] === \"boolean\") {\n deepObjects = config[0];\n }\n\n var cache = createCache(limit, createEqualsFn(equals, deepObjects));\n return function (fn) {\n return function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n var value = cache.get(args);\n\n if (value === undefined) {\n value = fn.apply(fn, args);\n cache.put(args, value);\n }\n\n return value;\n };\n };\n}\n\nexport default memoize;\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport deepFreeze from 'deep-freeze';\n\nimport { FALLBACK_DAG_MAX_NUM_SERVICES } from './index';\n\nexport default deepFreeze(\n Object.defineProperty(\n {\n archiveEnabled: false,\n dependencies: {\n dagMaxNumServices: FALLBACK_DAG_MAX_NUM_SERVICES,\n menuEnabled: true,\n },\n linkPatterns: [],\n menu: [\n {\n label: 'About Jaeger',\n items: [\n {\n label: 'GitHub',\n url: 'https://github.com/uber/jaeger',\n },\n {\n label: 'Docs',\n url: 'http://jaeger.readthedocs.io/en/latest/',\n },\n {\n label: 'Twitter',\n url: 'https://twitter.com/JaegerTracing',\n },\n {\n label: 'Discussion Group',\n url: 'https://groups.google.com/forum/#!forum/jaeger-tracing',\n },\n {\n label: 'Gitter.im',\n url: 'https://gitter.im/jaegertracing/Lobby',\n },\n {\n label: 'Blog',\n url: 'https://medium.com/jaegertracing/',\n },\n ],\n },\n ],\n search: {\n maxLookback: {\n label: '2 Days',\n value: '2d',\n },\n maxLimit: 1500,\n },\n tracking: {\n gaID: null,\n trackErrors: true,\n },\n },\n // fields that should be individually merged vs wholesale replaced\n '__mergeFields',\n { value: ['dependencies', 'search', 'tracking'] }\n )\n);\n\nexport const deprecations = [\n {\n formerKey: 'dependenciesMenuEnabled',\n currentKey: 'dependencies.menuEnabled',\n },\n {\n formerKey: 'gaTrackingID',\n currentKey: 'tracking.gaID',\n },\n];\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { get as _get } from 'lodash';\n\nimport defaultConfig from '../../constants/default-config';\n\n/**\n * Merge the embedded config from the query service (if present) with the\n * default config from `../../constants/default-config`.\n */\nexport default function getConfig() {\n return defaultConfig;\n}\n\nexport function getConfigValue(path: string) {\n return _get(getConfig(), path);\n}\n","// Copyright (c) 2017 The Jaeger Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { TraceSpan } from '../types/trace';\n\n/**\n * Searches the span.references to find 'CHILD_OF' reference type or returns null.\n * @param {TraceSpan} span The span whose parent is to be returned.\n * @returns {TraceSpan|null} The parent span if there is one, null otherwise.\n */\nexport function getParent(span: TraceSpan) {\n const parentRef = span.references ? span.references.find((ref) => ref.refType === 'CHILD_OF') : null;\n return parentRef ? parentRef.span : null;\n}\n","// Copyright (c) 2017 The Jaeger Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { uniq as _uniq } from 'lodash';\nimport memoize from 'lru-memoize';\nimport { getConfigValue } from '../utils/config/get-config';\nimport { getParent } from './span';\nimport { TNil } from '../types';\nimport { TraceSpan, TraceLink, TraceKeyValuePair, Trace } from '../types/trace';\n\nconst parameterRegExp = /#\\{([^{}]*)\\}/g;\n\ntype ProcessedTemplate = {\n parameters: string[];\n template: (template: { [key: string]: any }) => string;\n};\n\ntype ProcessedLinkPattern = {\n object: any;\n type: (link: string) => boolean;\n key: (link: string) => boolean;\n value: (value: any) => boolean;\n url: ProcessedTemplate;\n text: ProcessedTemplate;\n parameters: string[];\n};\n\ntype TLinksRV = Array<{ url: string; text: string }>;\n\nfunction getParamNames(str: string) {\n const names = new Set();\n str.replace(parameterRegExp, (match, name) => {\n names.add(name);\n return match;\n });\n return Array.from(names);\n}\n\nfunction stringSupplant(str: string, encodeFn: (unencoded: any) => string, map: Record) {\n return str.replace(parameterRegExp, (_, name) => {\n const value = map[name];\n return value == null ? '' : encodeFn(value);\n });\n}\n\nexport function processTemplate(template: any, encodeFn: (unencoded: any) => string): ProcessedTemplate {\n if (typeof template !== 'string') {\n /*\n\n // kept on ice until #123 is implemented:\n if (template && Array.isArray(template.parameters) && (typeof template.template === 'function')) {\n return template;\n }\n\n */\n throw new Error('Invalid template');\n }\n return {\n parameters: getParamNames(template),\n template: stringSupplant.bind(null, template, encodeFn),\n };\n}\n\nexport function createTestFunction(entry: any) {\n if (typeof entry === 'string') {\n return (arg: any) => arg === entry;\n }\n if (Array.isArray(entry)) {\n return (arg: any) => entry.indexOf(arg) > -1;\n }\n /*\n\n // kept on ice until #123 is implemented:\n if (entry instanceof RegExp) {\n return (arg: any) => entry.test(arg);\n }\n if (typeof entry === 'function') {\n return entry;\n }\n\n */\n if (entry == null) {\n return () => true;\n }\n throw new Error(`Invalid value: ${entry}`);\n}\n\nconst identity = (a: any): typeof a => a;\n\nexport function processLinkPattern(pattern: any): ProcessedLinkPattern | TNil {\n try {\n const url = processTemplate(pattern.url, encodeURIComponent);\n const text = processTemplate(pattern.text, identity);\n return {\n object: pattern,\n type: createTestFunction(pattern.type),\n key: createTestFunction(pattern.key),\n value: createTestFunction(pattern.value),\n url,\n text,\n parameters: _uniq(url.parameters.concat(text.parameters)),\n };\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(`Ignoring invalid link pattern: ${error}`, pattern);\n return null;\n }\n}\n\nexport function getParameterInArray(name: string, array: TraceKeyValuePair[]) {\n if (array) {\n return array.find((entry) => entry.key === name);\n }\n return undefined;\n}\n\nexport function getParameterInAncestor(name: string, span: TraceSpan) {\n let currentSpan: TraceSpan | TNil = span;\n while (currentSpan) {\n const result = getParameterInArray(name, currentSpan.tags) || getParameterInArray(name, currentSpan.process.tags);\n if (result) {\n return result;\n }\n currentSpan = getParent(currentSpan);\n }\n return undefined;\n}\n\nfunction callTemplate(template: ProcessedTemplate, data: any) {\n return template.template(data);\n}\n\nexport function computeTraceLink(linkPatterns: ProcessedLinkPattern[], trace: Trace) {\n const result: TLinksRV = [];\n const validKeys = (Object.keys(trace) as Array).filter(\n (key) => typeof trace[key] === 'string' || trace[key] === 'number'\n );\n\n linkPatterns\n .filter((pattern) => pattern.type('traces'))\n .forEach((pattern) => {\n const parameterValues: Record = {};\n const allParameters = pattern.parameters.every((parameter) => {\n const key = parameter as keyof Trace;\n if (validKeys.includes(key)) {\n // At this point is safe to access to trace object using parameter variable because\n // we validated parameter against validKeys, this implies that parameter a keyof Trace.\n parameterValues[parameter] = trace[key];\n return true;\n }\n return false;\n });\n if (allParameters) {\n result.push({\n url: callTemplate(pattern.url, parameterValues),\n text: callTemplate(pattern.text, parameterValues),\n });\n }\n });\n\n return result;\n}\n\nexport function computeLinks(\n linkPatterns: ProcessedLinkPattern[],\n span: TraceSpan,\n items: TraceKeyValuePair[],\n itemIndex: number\n) {\n const item = items[itemIndex];\n let type = 'logs';\n const processTags = span.process.tags === items;\n if (processTags) {\n type = 'process';\n }\n const spanTags = span.tags === items;\n if (spanTags) {\n type = 'tags';\n }\n const result: Array<{ url: string; text: string }> = [];\n linkPatterns.forEach((pattern) => {\n if (pattern.type(type) && pattern.key(item.key) && pattern.value(item.value)) {\n const parameterValues: Record = {};\n const allParameters = pattern.parameters.every((parameter) => {\n let entry = getParameterInArray(parameter, items);\n if (!entry && !processTags) {\n // do not look in ancestors for process tags because the same object may appear in different places in the hierarchy\n // and the cache in getLinks uses that object as a key\n entry = getParameterInAncestor(parameter, span);\n }\n if (entry) {\n parameterValues[parameter] = entry.value;\n return true;\n }\n // eslint-disable-next-line no-console\n console.warn(\n `Skipping link pattern, missing parameter ${parameter} for key ${item.key} in ${type}.`,\n pattern.object\n );\n return false;\n });\n if (allParameters) {\n result.push({\n url: callTemplate(pattern.url, parameterValues),\n text: callTemplate(pattern.text, parameterValues),\n });\n }\n }\n });\n return result;\n}\n\nexport function createGetLinks(linkPatterns: ProcessedLinkPattern[], cache: WeakMap) {\n return (span: TraceSpan, items: TraceKeyValuePair[], itemIndex: number) => {\n if (linkPatterns.length === 0) {\n return [];\n }\n const item = items[itemIndex];\n let result = cache.get(item);\n if (!result) {\n result = computeLinks(linkPatterns, span, items, itemIndex);\n cache.set(item, result);\n }\n return result;\n };\n}\n\nconst processedLinks: ProcessedLinkPattern[] = (getConfigValue('linkPatterns') || [])\n .map(processLinkPattern)\n .filter(Boolean);\n\nexport const getTraceLinks: (trace: Trace | undefined) => TLinksRV = memoize(10)((trace: Trace | undefined) => {\n const result: TLinksRV = [];\n if (!trace) {\n return result;\n }\n return computeTraceLink(processedLinks, trace);\n});\n\nexport default createGetLinks(processedLinks, new WeakMap());\n","// Copyright (c) 2019 The Jaeger Authors.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { UIDropdown, UIMenu, UIMenuItem } from '..';\nimport NewWindowIcon from './NewWindowIcon';\n\ntype Link = {\n text: string;\n url: string;\n};\n\ntype ExternalLinksProps = {\n links: Link[];\n className?: string;\n};\n\nconst LinkValue = (props: { href: string; title?: string; children?: React.ReactNode; className?: string }) => (\n \n {props.children} \n \n);\n\n// export for testing\nexport const linkValueList = (links: Link[]) => (\n \n {links.map(({ text, url }, index) => (\n // `index` is necessary in the key because url can repeat\n \n {text}\n \n ))}\n \n);\n\nexport default function ExternalLinks(props: ExternalLinksProps) {\n const { links } = props;\n if (links.length === 1) {\n return ;\n }\n return (\n \n \n \n \n \n );\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\nimport { get as _get, maxBy as _maxBy, values as _values } from 'lodash';\nimport MdKeyboardArrowRight from 'react-icons/lib/md/keyboard-arrow-right';\nimport { css } from '@emotion/css';\nimport cx from 'classnames';\nimport { dateTimeFormat, GrafanaTheme2, TimeZone } from '@grafana/data';\nimport { useStyles2 } from '@grafana/ui';\n\nimport SpanGraph from './SpanGraph';\nimport TracePageSearchBar from './TracePageSearchBar';\nimport { autoColor, TUpdateViewRangeTimeFunction, ViewRange, ViewRangeTimeUpdate } from '..';\nimport LabeledList from '../common/LabeledList';\nimport TraceName from '../common/TraceName';\nimport { getTraceName } from '../model/trace-viewer';\nimport { TNil } from '../types';\nimport { Trace } from '../types/trace';\nimport { formatDuration } from '../utils/date';\nimport { getTraceLinks } from '../model/link-patterns';\n\nimport ExternalLinks from '../common/ExternalLinks';\nimport { uTxMuted } from '../uberUtilityStyles';\n\nconst getStyles = (theme: GrafanaTheme2) => {\n return {\n TracePageHeader: css`\n label: TracePageHeader;\n & > :first-child {\n border-bottom: 1px solid ${autoColor(theme, '#e8e8e8')};\n }\n & > :nth-child(2) {\n background-color: ${autoColor(theme, '#eee')};\n border-bottom: 1px solid ${autoColor(theme, '#e4e4e4')};\n }\n & > :last-child {\n border-bottom: 1px solid ${autoColor(theme, '#ccc')};\n }\n `,\n TracePageHeaderTitleRow: css`\n label: TracePageHeaderTitleRow;\n align-items: center;\n display: flex;\n `,\n TracePageHeaderBack: css`\n label: TracePageHeaderBack;\n align-items: center;\n align-self: stretch;\n background-color: #fafafa;\n border-bottom: 1px solid #ddd;\n border-right: 1px solid #ddd;\n color: inherit;\n display: flex;\n font-size: 1.4rem;\n padding: 0 1rem;\n margin-bottom: -1px;\n &:hover {\n background-color: #f0f0f0;\n border-color: #ccc;\n }\n `,\n TracePageHeaderTitleLink: css`\n label: TracePageHeaderTitleLink;\n align-items: center;\n display: flex;\n flex: 1;\n\n &:hover * {\n text-decoration: underline;\n }\n &:hover > *,\n &:hover small {\n text-decoration: none;\n }\n `,\n TracePageHeaderDetailToggle: css`\n label: TracePageHeaderDetailToggle;\n font-size: 2.5rem;\n transition: transform 0.07s ease-out;\n `,\n TracePageHeaderDetailToggleExpanded: css`\n label: TracePageHeaderDetailToggleExpanded;\n transform: rotate(90deg);\n `,\n TracePageHeaderTitle: css`\n label: TracePageHeaderTitle;\n color: inherit;\n flex: 1;\n font-size: 1.7em;\n line-height: 1em;\n margin: 0 0 0 0.5em;\n padding-bottom: 0.5em;\n `,\n TracePageHeaderTitleCollapsible: css`\n label: TracePageHeaderTitleCollapsible;\n margin-left: 0;\n `,\n TracePageHeaderOverviewItems: css`\n label: TracePageHeaderOverviewItems;\n border-bottom: 1px solid #e4e4e4;\n padding: 0.25rem 0.5rem !important;\n `,\n TracePageHeaderOverviewItemValueDetail: cx(\n css`\n label: TracePageHeaderOverviewItemValueDetail;\n color: #aaa;\n `,\n 'trace-item-value-detail'\n ),\n TracePageHeaderOverviewItemValue: css`\n label: TracePageHeaderOverviewItemValue;\n &:hover > .trace-item-value-detail {\n color: unset;\n }\n `,\n TracePageHeaderArchiveIcon: css`\n label: TracePageHeaderArchiveIcon;\n font-size: 1.78em;\n margin-right: 0.15em;\n `,\n TracePageHeaderTraceId: css`\n label: TracePageHeaderTraceId;\n white-space: nowrap;\n `,\n };\n};\n\ntype TracePageHeaderEmbedProps = {\n canCollapse: boolean;\n clearSearch: () => void;\n focusUiFindMatches: () => void;\n hideMap: boolean;\n hideSummary: boolean;\n nextResult: () => void;\n onSlimViewClicked: () => void;\n onTraceGraphViewClicked: () => void;\n prevResult: () => void;\n resultCount: number;\n slimView: boolean;\n textFilter: string | TNil;\n trace: Trace;\n traceGraphView: boolean;\n updateNextViewRangeTime: (update: ViewRangeTimeUpdate) => void;\n updateViewRangeTime: TUpdateViewRangeTimeFunction;\n viewRange: ViewRange;\n searchValue: string;\n onSearchValueChange: (value: string) => void;\n hideSearchButtons?: boolean;\n timeZone: TimeZone;\n};\n\nexport const HEADER_ITEMS = [\n {\n key: 'timestamp',\n label: 'Trace Start',\n renderer(trace: Trace, timeZone: TimeZone, styles: ReturnType) {\n // Convert date from micro to milli seconds\n const dateStr = dateTimeFormat(trace.startTime / 1000, { timeZone, defaultWithMS: true });\n const match = dateStr.match(/^(.+)(:\\d\\d\\.\\d+)$/);\n return match ? (\n \n {match[1]}\n {match[2]}\n \n ) : (\n dateStr\n );\n },\n },\n {\n key: 'duration',\n label: 'Duration',\n renderer: (trace: Trace) => formatDuration(trace.duration),\n },\n {\n key: 'service-count',\n label: 'Services',\n renderer: (trace: Trace) => new Set(_values(trace.processes).map((p) => p.serviceName)).size,\n },\n {\n key: 'depth',\n label: 'Depth',\n renderer: (trace: Trace) => _get(_maxBy(trace.spans, 'depth'), 'depth', 0) + 1,\n },\n {\n key: 'span-count',\n label: 'Total Spans',\n renderer: (trace: Trace) => trace.spans.length,\n },\n];\n\nexport default function TracePageHeader(props: TracePageHeaderEmbedProps) {\n const {\n canCollapse,\n clearSearch,\n focusUiFindMatches,\n hideMap,\n hideSummary,\n nextResult,\n onSlimViewClicked,\n prevResult,\n resultCount,\n slimView,\n textFilter,\n trace,\n traceGraphView,\n updateNextViewRangeTime,\n updateViewRangeTime,\n viewRange,\n searchValue,\n onSearchValueChange,\n hideSearchButtons,\n timeZone,\n } = props;\n\n const styles = useStyles2(getStyles);\n const links = React.useMemo(() => {\n if (!trace) {\n return [];\n }\n return getTraceLinks(trace);\n }, [trace]);\n\n if (!trace) {\n return null;\n }\n\n const summaryItems =\n !hideSummary &&\n !slimView &&\n HEADER_ITEMS.map((item) => {\n const { renderer, ...rest } = item;\n return { ...rest, value: renderer(trace, timeZone, styles) };\n });\n\n const title = (\n

\n {' '}\n {trace.traceID}\n

\n );\n\n return (\n
\n
\n {links && links.length > 0 && }\n {canCollapse ? (\n \n \n {title}\n \n ) : (\n title\n )}\n \n
\n {summaryItems && }\n {!hideMap && !slimView && (\n \n )}\n
\n );\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { TraceLog } from '../../types/trace';\n\n/**\n * Which items of a {@link SpanDetail} component are expanded.\n */\nexport default class DetailState {\n isTagsOpen: boolean;\n isProcessOpen: boolean;\n logs: { isOpen: boolean; openedItems: Set };\n isWarningsOpen: boolean;\n isStackTracesOpen: boolean;\n isReferencesOpen: boolean;\n\n constructor(oldState?: DetailState) {\n const {\n isTagsOpen,\n isProcessOpen,\n isReferencesOpen,\n isWarningsOpen,\n isStackTracesOpen,\n logs,\n }: DetailState | Record = oldState || {};\n this.isTagsOpen = Boolean(isTagsOpen);\n this.isProcessOpen = Boolean(isProcessOpen);\n this.isReferencesOpen = Boolean(isReferencesOpen);\n this.isWarningsOpen = Boolean(isWarningsOpen);\n this.isStackTracesOpen = Boolean(isStackTracesOpen);\n this.logs = {\n isOpen: Boolean(logs && logs.isOpen),\n openedItems: logs && logs.openedItems ? new Set(logs.openedItems) : new Set(),\n };\n }\n\n toggleTags() {\n const next = new DetailState(this);\n next.isTagsOpen = !this.isTagsOpen;\n return next;\n }\n\n toggleProcess() {\n const next = new DetailState(this);\n next.isProcessOpen = !this.isProcessOpen;\n return next;\n }\n\n toggleReferences() {\n const next = new DetailState(this);\n next.isReferencesOpen = !this.isReferencesOpen;\n return next;\n }\n\n toggleWarnings() {\n const next = new DetailState(this);\n next.isWarningsOpen = !this.isWarningsOpen;\n return next;\n }\n\n toggleStackTraces() {\n const next = new DetailState(this);\n next.isStackTracesOpen = !this.isStackTracesOpen;\n return next;\n }\n\n toggleLogs() {\n const next = new DetailState(this);\n next.logs.isOpen = !this.logs.isOpen;\n return next;\n }\n\n toggleLogItem(logItem: TraceLog) {\n const next = new DetailState(this);\n if (next.logs.openedItems.has(logItem)) {\n next.logs.openedItems.delete(logItem);\n } else {\n next.logs.openedItems.add(logItem);\n }\n return next;\n }\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport const getProcessServiceName = (proc) => proc.serviceName;\nexport const getProcessTags = (proc) => proc.tags;\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { createSelector } from 'reselect';\nimport fuzzy from 'fuzzy';\n\nimport { getProcessServiceName } from './process';\n\nexport const getSpanId = (span) => span.spanID;\nexport const getSpanName = (span) => span.operationName;\nexport const getSpanDuration = (span) => span.duration;\nexport const getSpanTimestamp = (span) => span.startTime;\nexport const getSpanProcessId = (span) => span.processID;\nexport const getSpanReferences = (span) => span.references || [];\nexport const getSpanReferenceByType = createSelector(\n createSelector(({ span }) => span, getSpanReferences),\n ({ type }) => type,\n (references, type) => references.find((ref) => ref.refType === type)\n);\nexport const getSpanParentId = createSelector(\n (span) => getSpanReferenceByType({ span, type: 'CHILD_OF' }),\n (childOfRef) => (childOfRef ? childOfRef.spanID : null)\n);\n\nexport const getSpanProcess = (span) => {\n if (!span.process) {\n throw new Error(\n `\n you must hydrate the spans with the processes, perhaps\n using hydrateSpansWithProcesses(), before accessing a span's process\n `\n );\n }\n\n return span.process;\n};\n\nexport const getSpanServiceName = createSelector(getSpanProcess, getProcessServiceName);\n\nexport const filterSpansForTimestamps = createSelector(\n ({ spans }) => spans,\n ({ leftBound }) => leftBound,\n ({ rightBound }) => rightBound,\n (spans, leftBound, rightBound) =>\n spans.filter((span) => getSpanTimestamp(span) >= leftBound && getSpanTimestamp(span) <= rightBound)\n);\n\nexport const filterSpansForText = createSelector(\n ({ spans }) => spans,\n ({ text }) => text,\n (spans, text) =>\n fuzzy\n .filter(text, spans, {\n extract: (span) => `${getSpanServiceName(span)} ${getSpanName(span)}`,\n })\n .map(({ original }) => original)\n);\n\nconst getTextFilterdSpansAsMap = createSelector(filterSpansForText, (matchingSpans) =>\n matchingSpans.reduce(\n (obj, span) => ({\n ...obj,\n [getSpanId(span)]: span,\n }),\n {}\n )\n);\n\nexport const highlightSpansForTextFilter = createSelector(\n ({ spans }) => spans,\n getTextFilterdSpansAsMap,\n (spans, textFilteredSpansMap) =>\n spans.map((span) => ({\n ...span,\n muted: !textFilteredSpansMap[getSpanId(span)],\n }))\n);\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport default class TreeNode {\n static iterFunction(fn, depth = 0) {\n return (node) => fn(node.value, node, depth);\n }\n\n static searchFunction(search) {\n if (typeof search === 'function') {\n return search;\n }\n\n return (value, node) => (search instanceof TreeNode ? node === search : value === search);\n }\n\n constructor(value, children = []) {\n this.value = value;\n this.children = children;\n }\n\n get depth() {\n return this.children.reduce((depth, child) => Math.max(child.depth + 1, depth), 1);\n }\n\n get size() {\n let i = 0;\n this.walk(() => i++);\n return i;\n }\n\n addChild(child) {\n this.children.push(child instanceof TreeNode ? child : new TreeNode(child));\n return this;\n }\n\n find(search) {\n const searchFn = TreeNode.iterFunction(TreeNode.searchFunction(search));\n if (searchFn(this)) {\n return this;\n }\n for (let i = 0; i < this.children.length; i++) {\n const result = this.children[i].find(search);\n if (result) {\n return result;\n }\n }\n return null;\n }\n\n getPath(search) {\n const searchFn = TreeNode.iterFunction(TreeNode.searchFunction(search));\n\n const findPath = (currentNode, currentPath) => {\n // skip if we already found the result\n const attempt = currentPath.concat([currentNode]);\n // base case: return the array when there is a match\n if (searchFn(currentNode)) {\n return attempt;\n }\n for (let i = 0; i < currentNode.children.length; i++) {\n const child = currentNode.children[i];\n const match = findPath(child, attempt);\n if (match) {\n return match;\n }\n }\n return null;\n };\n\n return findPath(this, []);\n }\n\n walk(fn, depth = 0) {\n const nodeStack = [];\n let actualDepth = depth;\n nodeStack.push({ node: this, depth: actualDepth });\n while (nodeStack.length) {\n const { node, depth: nodeDepth } = nodeStack.pop();\n fn(node.value, node, nodeDepth);\n actualDepth = nodeDepth + 1;\n let i = node.children.length - 1;\n while (i >= 0) {\n nodeStack.push({ node: node.children[i], depth: actualDepth });\n i--;\n }\n }\n }\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { createSelector, createStructuredSelector } from 'reselect';\n\nimport {\n getSpanId,\n getSpanName,\n getSpanServiceName,\n getSpanTimestamp,\n getSpanDuration,\n getSpanProcessId,\n} from './span';\nimport { getProcessServiceName } from './process';\nimport { formatMillisecondTime, formatSecondTime, ONE_SECOND } from '../utils/date';\nimport { numberSortComparator } from '../utils/sort';\nimport TreeNode from '../utils/TreeNode';\n\nexport const getTraceId = (trace) => trace.traceID;\n\nexport const getTraceSpans = (trace) => trace.spans;\n\nconst getTraceProcesses = (trace) => trace.processes;\n\nconst getSpanWithProcess = createSelector(\n (state) => state.span,\n (state) => state.processes,\n (span, processes) => ({\n ...span,\n process: processes[getSpanProcessId(span)],\n })\n);\n\nexport const getTraceSpansAsMap = createSelector(getTraceSpans, (spans) =>\n spans.reduce((map, span) => map.set(getSpanId(span), span), new Map())\n);\n\nexport const TREE_ROOT_ID = '__root__';\n\n/**\n * Build a tree of { value: spanID, children } items derived from the\n * `span.references` information. The tree represents the grouping of parent /\n * child relationships. The root-most node is nominal in that\n * `.value === TREE_ROOT_ID`. This is done because a root span (the main trace\n * span) is not always included with the trace data. Thus, there can be\n * multiple top-level spans, and the root node acts as their common parent.\n *\n * The children are sorted by `span.startTime` after the tree is built.\n *\n * @param {Trace} trace The trace to build the tree of spanIDs.\n * @return {TreeNode} A tree of spanIDs derived from the relationships\n * between spans in the trace.\n */\nexport function getTraceSpanIdsAsTree(trace) {\n const nodesById = new Map(trace.spans.map((span) => [span.spanID, new TreeNode(span.spanID)]));\n const spansById = new Map(trace.spans.map((span) => [span.spanID, span]));\n const root = new TreeNode(TREE_ROOT_ID);\n trace.spans.forEach((span) => {\n const node = nodesById.get(span.spanID);\n if (Array.isArray(span.references) && span.references.length) {\n const { refType, spanID: parentID } = span.references[0];\n if (refType === 'CHILD_OF' || refType === 'FOLLOWS_FROM') {\n const parent = nodesById.get(parentID) || root;\n parent.children.push(node);\n } else {\n throw new Error(`Unrecognized ref type: ${refType}`);\n }\n } else {\n root.children.push(node);\n }\n });\n const comparator = (nodeA, nodeB) => {\n const a = spansById.get(nodeA.value);\n const b = spansById.get(nodeB.value);\n return +(a.startTime > b.startTime) || +(a.startTime === b.startTime) - 1;\n };\n trace.spans.forEach((span) => {\n const node = nodesById.get(span.spanID);\n if (node.children.length > 1) {\n node.children.sort(comparator);\n }\n });\n root.children.sort(comparator);\n return root;\n}\n\n// attach \"process\" as an object to each span.\nexport const hydrateSpansWithProcesses = (trace) => {\n const spans = getTraceSpans(trace);\n const processes = getTraceProcesses(trace);\n\n return {\n ...trace,\n spans: spans.map((span) => getSpanWithProcess({ span, processes })),\n };\n};\n\nexport const getTraceSpanCount = createSelector(getTraceSpans, (spans) => spans.length);\n\nexport const getTraceTimestamp = createSelector(getTraceSpans, (spans) =>\n spans.reduce(\n (prevTimestamp, span) => (prevTimestamp ? Math.min(prevTimestamp, getSpanTimestamp(span)) : getSpanTimestamp(span)),\n null\n )\n);\n\nexport const getTraceDuration = createSelector(getTraceSpans, getTraceTimestamp, (spans, timestamp) =>\n spans.reduce(\n (prevDuration, span) =>\n prevDuration\n ? Math.max(getSpanTimestamp(span) - timestamp + getSpanDuration(span), prevDuration)\n : getSpanDuration(span),\n null\n )\n);\n\nexport const getTraceEndTimestamp = createSelector(\n getTraceTimestamp,\n getTraceDuration,\n (timestamp, duration) => timestamp + duration\n);\n\nexport const getParentSpan = createSelector(\n getTraceSpanIdsAsTree,\n getTraceSpansAsMap,\n (tree, spanMap) =>\n tree.children\n .map((node) => spanMap.get(node.value))\n .sort((spanA, spanB) => numberSortComparator(getSpanTimestamp(spanA), getSpanTimestamp(spanB)))[0]\n);\n\nexport const getTraceDepth = createSelector(getTraceSpanIdsAsTree, (spanTree) => spanTree.depth - 1);\n\nexport const getSpanDepthForTrace = createSelector(\n createSelector((state) => state.trace, getTraceSpanIdsAsTree),\n createSelector((state) => state.span, getSpanId),\n (node, spanID) => node.getPath(spanID).length - 1\n);\n\nexport const getTraceServices = createSelector(getTraceProcesses, (processes) =>\n Object.keys(processes).reduce(\n (services, processID) => services.add(getProcessServiceName(processes[processID])),\n new Set()\n )\n);\n\nexport const getTraceServiceCount = createSelector(getTraceServices, (services) => services.size);\n\n// establish constants to determine how math should be handled\n// for nanosecond-to-millisecond conversions.\nexport const DURATION_FORMATTERS = {\n ms: formatMillisecondTime,\n s: formatSecondTime,\n};\n\nconst getDurationFormatterForTrace = createSelector(getTraceDuration, (totalDuration) =>\n totalDuration >= ONE_SECOND ? DURATION_FORMATTERS.s : DURATION_FORMATTERS.ms\n);\n\nexport const formatDurationForUnit = createSelector(\n ({ duration }) => duration,\n ({ unit }) => DURATION_FORMATTERS[unit],\n (duration, formatter) => formatter(duration)\n);\n\nexport const formatDurationForTrace = createSelector(\n ({ duration }) => duration,\n createSelector(({ trace }) => trace, getDurationFormatterForTrace),\n (duration, formatter) => formatter(duration)\n);\n\nexport const getSortedSpans = createSelector(\n ({ trace }) => trace,\n ({ spans }) => spans,\n ({ sort }) => sort,\n (trace, spans, { dir, comparator, selector }) =>\n [...spans].sort((spanA, spanB) => dir * comparator(selector(spanA, trace), selector(spanB, trace)))\n);\n\nconst getTraceSpansByHierarchyPosition = createSelector(getTraceSpanIdsAsTree, (tree) => {\n const hierarchyPositionMap = new Map();\n let i = 0;\n tree.walk((spanID) => hierarchyPositionMap.set(spanID, i++));\n return hierarchyPositionMap;\n});\n\nexport const getTreeSizeForTraceSpan = createSelector(\n createSelector((state) => state.trace, getTraceSpanIdsAsTree),\n createSelector((state) => state.span, getSpanId),\n (tree, spanID) => {\n const node = tree.find(spanID);\n if (!node) {\n return -1;\n }\n return node.size - 1;\n }\n);\n\nexport const getSpanHierarchySortPositionForTrace = createSelector(\n createSelector(({ trace }) => trace, getTraceSpansByHierarchyPosition),\n ({ span }) => span,\n (hierarchyPositionMap, span) => hierarchyPositionMap.get(getSpanId(span))\n);\n\nexport const getTraceName = createSelector(\n createSelector(\n createSelector(hydrateSpansWithProcesses, getParentSpan),\n createStructuredSelector({\n name: getSpanName,\n serviceName: getSpanServiceName,\n })\n ),\n ({ name, serviceName }) => `${serviceName}: ${name}`\n);\n\nexport const omitCollapsedSpans = createSelector(\n ({ spans }) => spans,\n createSelector(({ trace }) => trace, getTraceSpanIdsAsTree),\n ({ collapsed }) => collapsed,\n (spans, tree, collapse) => {\n const hiddenSpanIds = collapse.reduce((result, collapsedSpanId) => {\n tree.find(collapsedSpanId).walk((id) => id !== collapsedSpanId && result.add(id));\n return result;\n }, new Set());\n\n return hiddenSpanIds.size > 0 ? spans.filter((span) => !hiddenSpanIds.has(getSpanId(span))) : spans;\n }\n);\n\nexport const DEFAULT_TICK_INTERVAL = 4;\nexport const DEFAULT_TICK_WIDTH = 3;\nexport const getTicksForTrace = createSelector(\n ({ trace }) => trace,\n ({ interval = DEFAULT_TICK_INTERVAL }) => interval,\n ({ width = DEFAULT_TICK_WIDTH }) => width,\n (\n trace,\n interval,\n width\n // timestamps will be spaced over the interval, starting from the initial timestamp\n ) =>\n [...Array(interval + 1).keys()].map((num) => ({\n timestamp: getTraceTimestamp(trace) + getTraceDuration(trace) * (num / interval),\n width,\n }))\n);\n\n// TODO: delete this when the backend can ensure uniqueness\n/* istanbul ignore next */\nexport const enforceUniqueSpanIds = createSelector(\n /* istanbul ignore next */ (trace) => trace,\n getTraceSpans,\n /* istanbul ignore next */ (trace, spans) => {\n const map = new Map();\n\n return {\n ...trace,\n spans: spans.reduce((result, span) => {\n const spanID = map.has(getSpanId(span)) ? `${getSpanId(span)}_${map.get(getSpanId(span))}` : getSpanId(span);\n const updatedSpan = { ...span, spanID };\n\n if (spanID !== getSpanId(span)) {\n // eslint-disable-next-line no-console\n console.warn('duplicate spanID in trace replaced', getSpanId(span), 'new:', spanID);\n }\n\n // set the presence of the span in the map or increment the number\n map.set(getSpanId(span), (map.get(getSpanId(span)) || 0) + 1);\n\n return result.concat([updatedSpan]);\n }, []),\n };\n }\n);\n\n// TODO: delete this when the backend can ensure uniqueness\nexport const dropEmptyStartTimeSpans = createSelector(\n /* istanbul ignore next */ (trace) => trace,\n getTraceSpans,\n /* istanbul ignore next */ (trace, spans) => ({\n ...trace,\n spans: spans.filter((span) => !!getSpanTimestamp(span)),\n })\n);\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport function localeStringComparator(itemA, itemB) {\n return itemA.localeCompare(itemB);\n}\n\nexport function numberSortComparator(itemA, itemB) {\n return itemA - itemB;\n}\n\nexport function classNameForSortDir(dir) {\n return `sorted ${dir === 1 ? 'ascending' : 'descending'}`;\n}\n\nexport function getNewSortForClick(prevSort, column) {\n const { defaultDir = 1 } = column;\n\n return {\n key: column.name,\n dir: prevSort.key === column.name ? -1 * prevSort.dir : defaultDir,\n };\n}\n\nexport function createSortClickHandler(column, currentSortKey, currentSortDir, updateSort) {\n return function onClickSortingElement() {\n const { key, dir } = getNewSortForClick({ key: currentSortKey, dir: currentSortDir }, column);\n updateSort(key, dir);\n };\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { isEqual as _isEqual } from 'lodash';\n\n// @ts-ignore\nimport { getTraceSpanIdsAsTree } from '../selectors/trace';\nimport { getConfigValue } from '../utils/config/get-config';\nimport { TraceKeyValuePair, TraceSpan, Trace, TraceResponse } from '../types/trace';\n// @ts-ignore\nimport TreeNode from '../utils/TreeNode';\nimport { getTraceName } from './trace-viewer';\n\n// exported for tests\nexport function deduplicateTags(spanTags: TraceKeyValuePair[]) {\n const warningsHash: Map = new Map();\n const tags: TraceKeyValuePair[] = spanTags.reduce((uniqueTags, tag) => {\n if (!uniqueTags.some((t) => t.key === tag.key && t.value === tag.value)) {\n uniqueTags.push(tag);\n } else {\n warningsHash.set(`${tag.key}:${tag.value}`, `Duplicate tag \"${tag.key}:${tag.value}\"`);\n }\n return uniqueTags;\n }, []);\n const warnings = Array.from(warningsHash.values());\n return { tags, warnings };\n}\n\n// exported for tests\nexport function orderTags(spanTags: TraceKeyValuePair[], topPrefixes?: string[]) {\n const orderedTags: TraceKeyValuePair[] = spanTags.slice();\n const tp = (topPrefixes || []).map((p: string) => p.toLowerCase());\n\n orderedTags.sort((a, b) => {\n const aKey = a.key.toLowerCase();\n const bKey = b.key.toLowerCase();\n\n for (let i = 0; i < tp.length; i++) {\n const p = tp[i];\n if (aKey.startsWith(p) && !bKey.startsWith(p)) {\n return -1;\n }\n if (!aKey.startsWith(p) && bKey.startsWith(p)) {\n return 1;\n }\n }\n\n if (aKey > bKey) {\n return 1;\n }\n if (aKey < bKey) {\n return -1;\n }\n return 0;\n });\n\n return orderedTags;\n}\n\n/**\n * NOTE: Mutates `data` - Transform the HTTP response data into the form the app\n * generally requires.\n */\nexport default function transformTraceData(data: TraceResponse | undefined): Trace | null {\n if (!data?.traceID) {\n return null;\n }\n const traceID = data.traceID.toLowerCase();\n\n let traceEndTime = 0;\n let traceStartTime = Number.MAX_SAFE_INTEGER;\n const spanIdCounts = new Map();\n const spanMap = new Map();\n // filter out spans with empty start times\n // eslint-disable-next-line no-param-reassign\n data.spans = data.spans.filter((span) => Boolean(span.startTime));\n\n const max = data.spans.length;\n for (let i = 0; i < max; i++) {\n const span: TraceSpan = data.spans[i] as TraceSpan;\n const { startTime, duration, processID } = span;\n //\n let spanID = span.spanID;\n // check for start / end time for the trace\n if (startTime < traceStartTime) {\n traceStartTime = startTime;\n }\n if (startTime + duration > traceEndTime) {\n traceEndTime = startTime + duration;\n }\n // make sure span IDs are unique\n const idCount = spanIdCounts.get(spanID);\n if (idCount != null) {\n // eslint-disable-next-line no-console\n console.warn(`Dupe spanID, ${idCount + 1} x ${spanID}`, span, spanMap.get(spanID));\n if (_isEqual(span, spanMap.get(spanID))) {\n // eslint-disable-next-line no-console\n console.warn('\\t two spans with same ID have `isEqual(...) === true`');\n }\n spanIdCounts.set(spanID, idCount + 1);\n spanID = `${spanID}_${idCount}`;\n span.spanID = spanID;\n } else {\n spanIdCounts.set(spanID, 1);\n }\n span.process = data.processes[processID];\n spanMap.set(spanID, span);\n }\n // tree is necessary to sort the spans, so children follow parents, and\n // siblings are sorted by start time\n const tree = getTraceSpanIdsAsTree(data);\n const spans: TraceSpan[] = [];\n const svcCounts: Record = {};\n\n // Eslint complains about number type not needed but then TS complains it is implicitly any.\n // eslint-disable-next-line @typescript-eslint/no-inferrable-types\n tree.walk((spanID: string, node: TreeNode, depth: number = 0) => {\n if (spanID === '__root__') {\n return;\n }\n const span = spanMap.get(spanID) as TraceSpan;\n if (!span) {\n return;\n }\n const { serviceName } = span.process;\n svcCounts[serviceName] = (svcCounts[serviceName] || 0) + 1;\n span.relativeStartTime = span.startTime - traceStartTime;\n span.depth = depth - 1;\n span.hasChildren = node.children.length > 0;\n span.warnings = span.warnings || [];\n span.tags = span.tags || [];\n span.references = span.references || [];\n const tagsInfo = deduplicateTags(span.tags);\n span.tags = orderTags(tagsInfo.tags, getConfigValue('topTagPrefixes'));\n span.warnings = span.warnings.concat(tagsInfo.warnings);\n span.references.forEach((ref, index) => {\n const refSpan = spanMap.get(ref.spanID) as TraceSpan;\n if (refSpan) {\n // eslint-disable-next-line no-param-reassign\n ref.span = refSpan;\n if (index > 0) {\n // Don't take into account the parent, just other references.\n refSpan.subsidiarilyReferencedBy = refSpan.subsidiarilyReferencedBy || [];\n refSpan.subsidiarilyReferencedBy.push({\n spanID,\n traceID,\n span,\n refType: ref.refType,\n });\n }\n }\n });\n spans.push(span);\n });\n const traceName = getTraceName(spans);\n const services = Object.keys(svcCounts).map((name) => ({ name, numberOfSpans: svcCounts[name] }));\n return {\n services,\n spans,\n traceID,\n traceName,\n // can't use spread operator for intersection types\n // repl: https://goo.gl/4Z23MJ\n // issue: https://github.com/facebook/flow/issues/1511\n processes: data.processes,\n duration: traceEndTime - traceStartTime,\n startTime: traceStartTime,\n endTime: traceEndTime,\n };\n}\n","// Copyright (c) 2019 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { TraceKeyValuePair, TraceSpan } from '../types/trace';\nimport { TNil } from '../types';\n\nexport default function filterSpans(textFilter: string, spans: TraceSpan[] | TNil) {\n if (!spans) {\n return null;\n }\n\n // if a span field includes at least one filter in includeFilters, the span is a match\n const includeFilters: string[] = [];\n\n // values with keys that include text in any one of the excludeKeys will be ignored\n const excludeKeys: string[] = [];\n\n // split textFilter by whitespace, remove empty strings, and extract includeFilters and excludeKeys\n textFilter\n .split(/\\s+/)\n .filter(Boolean)\n .forEach((w) => {\n if (w[0] === '-') {\n excludeKeys.push(w.substr(1).toLowerCase());\n } else {\n includeFilters.push(w.toLowerCase());\n }\n });\n\n const isTextInFilters = (filters: string[], text: string) =>\n filters.some((filter) => text.toLowerCase().includes(filter));\n\n const isTextInKeyValues = (kvs: TraceKeyValuePair[]) =>\n kvs\n ? kvs.some((kv) => {\n // ignore checking key and value for a match if key is in excludeKeys\n if (isTextInFilters(excludeKeys, kv.key)) {\n return false;\n }\n // match if key or value matches an item in includeFilters\n return isTextInFilters(includeFilters, kv.key) || isTextInFilters(includeFilters, kv.value.toString());\n })\n : false;\n\n const isSpanAMatch = (span: TraceSpan) =>\n isTextInFilters(includeFilters, span.operationName) ||\n isTextInFilters(includeFilters, span.process.serviceName) ||\n isTextInKeyValues(span.tags) ||\n (span.logs !== null && span.logs.some((log) => isTextInKeyValues(log.fields))) ||\n isTextInKeyValues(span.process.tags) ||\n includeFilters.some((filter) => filter === span.spanID);\n\n // declare as const because need to disambiguate the type\n const rv: Set = new Set(spans.filter(isSpanAMatch).map((span: TraceSpan) => span.spanID));\n return rv;\n}\n","/**\n * Get non overlapping duration of the ranges as they can overlap or have gaps.\n */\nimport { FieldType, MutableDataFrame, NodeGraphDataFrameFieldNames as Fields } from '@grafana/data';\n\nexport function getNonOverlappingDuration(ranges: Array<[number, number]>): number {\n ranges.sort((a, b) => a[0] - b[0]);\n const mergedRanges = ranges.reduce((acc, range) => {\n if (!acc.length) {\n return [range];\n }\n const tail = acc.slice(-1)[0];\n const [prevStart, prevEnd] = tail;\n const [start, end] = range;\n if (end < prevEnd) {\n // In this case the range is completely inside the prev range so we can just ignore it.\n return acc;\n }\n\n if (start > prevEnd) {\n // There is no overlap so we can just add it to stack\n return [...acc, range];\n }\n\n // We know there is overlap and current range ends later than previous so we can just extend the range\n return [...acc.slice(0, -1), [prevStart, end]] as Array<[number, number]>;\n }, [] as Array<[number, number]>);\n\n return mergedRanges.reduce((acc, range) => {\n return acc + (range[1] - range[0]);\n }, 0);\n}\n\n/**\n * Returns a map of the spans with children array for easier processing. It will also contain empty spans in case\n * span is missing but other spans are it's children. This is more generic because it needs to allow iterating over\n * both arrays and dataframe views.\n */\nexport function makeSpanMap(getSpan: (index: number) => { span: T; id: string; parentIds: string[] } | undefined): {\n [id: string]: { span: T; children: string[] };\n} {\n const spanMap: { [id: string]: { span?: T; children: string[] } } = {};\n\n let span;\n for (let index = 0; (span = getSpan(index)), !!span; index++) {\n if (!spanMap[span.id]) {\n spanMap[span.id] = {\n span: span.span,\n children: [],\n };\n } else {\n spanMap[span.id].span = span.span;\n }\n\n for (const parentId of span.parentIds) {\n if (parentId) {\n if (!spanMap[parentId]) {\n spanMap[parentId] = {\n span: undefined,\n children: [span.id],\n };\n } else {\n spanMap[parentId].children.push(span.id);\n }\n }\n }\n }\n return spanMap as { [id: string]: { span: T; children: string[] } };\n}\n\nexport function getStats(duration: number, traceDuration: number, selfDuration: number) {\n return {\n main: `${toFixedNoTrailingZeros(duration)}ms (${toFixedNoTrailingZeros((duration / traceDuration) * 100)}%)`,\n secondary: `${toFixedNoTrailingZeros(selfDuration)}ms (${toFixedNoTrailingZeros(\n (selfDuration / duration) * 100\n )}%)`,\n };\n}\n\nfunction toFixedNoTrailingZeros(n: number) {\n return parseFloat(n.toFixed(2));\n}\n\n/**\n * Create default frames used when returning data for node graph.\n */\nexport function makeFrames() {\n const nodesFrame = new MutableDataFrame({\n fields: [\n { name: Fields.id, type: FieldType.string },\n { name: Fields.title, type: FieldType.string },\n { name: Fields.subTitle, type: FieldType.string },\n { name: Fields.mainStat, type: FieldType.string, config: { displayName: 'Total time (% of trace)' } },\n { name: Fields.secondaryStat, type: FieldType.string, config: { displayName: 'Self time (% of total)' } },\n {\n name: Fields.color,\n type: FieldType.number,\n config: { color: { mode: 'continuous-GrYlRd' }, displayName: 'Self time / Trace duration' },\n },\n ],\n meta: {\n preferredVisualisationType: 'nodeGraph',\n },\n });\n\n const edgesFrame = new MutableDataFrame({\n fields: [\n { name: Fields.id, type: FieldType.string },\n { name: Fields.target, type: FieldType.string },\n { name: Fields.source, type: FieldType.string },\n ],\n meta: {\n preferredVisualisationType: 'nodeGraph',\n },\n });\n\n return [nodesFrame, edgesFrame];\n}\n","import {\n DataFrame,\n DataSourceInstanceSettings,\n FieldType,\n MutableDataFrame,\n TraceLog,\n TraceSpanRow,\n} from '@grafana/data';\nimport { transformTraceData } from '@jaegertracing/jaeger-ui-components';\nimport { JaegerResponse, Span, TraceProcess, TraceResponse } from './types';\n\nexport function createTraceFrame(data: TraceResponse): DataFrame {\n const spans = data.spans.map((s) => toSpanRow(s, data.processes));\n\n const frame = new MutableDataFrame({\n fields: [\n { name: 'traceID', type: FieldType.string },\n { name: 'spanID', type: FieldType.string },\n { name: 'parentSpanID', type: FieldType.string },\n { name: 'operationName', type: FieldType.string },\n { name: 'serviceName', type: FieldType.string },\n { name: 'serviceTags', type: FieldType.other },\n { name: 'startTime', type: FieldType.number },\n { name: 'duration', type: FieldType.number },\n { name: 'logs', type: FieldType.other },\n { name: 'tags', type: FieldType.other },\n { name: 'warnings', type: FieldType.other },\n { name: 'stackTraces', type: FieldType.other },\n ],\n meta: {\n preferredVisualisationType: 'trace',\n custom: {\n traceFormat: 'jaeger',\n },\n },\n });\n\n for (const span of spans) {\n frame.add(span);\n }\n\n return frame;\n}\n\nfunction toSpanRow(span: Span, processes: Record): TraceSpanRow {\n return {\n spanID: span.spanID,\n traceID: span.traceID,\n parentSpanID: span.references?.find((r) => r.refType === 'CHILD_OF')?.spanID,\n operationName: span.operationName,\n // from micro to millis\n startTime: span.startTime / 1000,\n duration: span.duration / 1000,\n logs: span.logs.map((l) => ({\n ...l,\n timestamp: l.timestamp / 1000,\n })),\n tags: span.tags,\n warnings: span.warnings ?? undefined,\n stackTraces: span.stackTraces,\n serviceName: processes[span.processID].serviceName,\n serviceTags: processes[span.processID].tags,\n };\n}\n\nexport function createTableFrame(data: TraceResponse[], instanceSettings: DataSourceInstanceSettings): DataFrame {\n const frame = new MutableDataFrame({\n fields: [\n {\n name: 'traceID',\n type: FieldType.string,\n config: {\n displayNameFromDS: 'Trace ID',\n links: [\n {\n title: 'Trace: ${__value.raw}',\n url: '',\n internal: {\n datasourceUid: instanceSettings.uid,\n datasourceName: instanceSettings.name,\n query: {\n query: '${__value.raw}',\n },\n },\n },\n ],\n },\n },\n { name: 'traceName', type: FieldType.string, config: { displayNameFromDS: 'Trace name' } },\n { name: 'startTime', type: FieldType.time, config: { displayNameFromDS: 'Start time' } },\n { name: 'duration', type: FieldType.number, config: { displayNameFromDS: 'Duration', unit: 'µs' } },\n ],\n meta: {\n preferredVisualisationType: 'table',\n },\n });\n // Show the most recent traces\n const traceData = data.map(transformToTraceData).sort((a, b) => b?.startTime! - a?.startTime!);\n\n for (const trace of traceData) {\n frame.add(trace);\n }\n\n return frame;\n}\n\nfunction transformToTraceData(data: TraceResponse) {\n const traceData = transformTraceData(data);\n if (!traceData) {\n return;\n }\n\n return {\n traceID: traceData.traceID,\n startTime: traceData.startTime / 1000,\n duration: traceData.duration,\n traceName: traceData.traceName,\n };\n}\n\nexport function transformToJaeger(data: MutableDataFrame): JaegerResponse {\n let traceResponse: TraceResponse = {\n traceID: '',\n spans: [],\n processes: {},\n warnings: null,\n };\n let processes: string[] = [];\n\n for (let i = 0; i < data.length; i++) {\n const span = data.get(i);\n\n // Set traceID\n if (!traceResponse.traceID) {\n traceResponse.traceID = span.traceID;\n }\n\n // Create process if doesn't exist\n if (!processes.find((p) => p === span.serviceName)) {\n processes.push(span.serviceName);\n traceResponse.processes[`p${processes.length}`] = {\n serviceName: span.serviceName,\n tags: span.serviceTags,\n };\n }\n\n // Create span\n traceResponse.spans.push({\n traceID: span.traceID,\n spanID: span.spanID,\n duration: span.duration * 1000,\n references: span.parentSpanID\n ? [\n {\n refType: 'CHILD_OF',\n spanID: span.parentSpanID,\n traceID: span.traceID,\n },\n ]\n : [],\n flags: 0,\n logs: span.logs.map((l: TraceLog) => ({\n ...l,\n timestamp: l.timestamp * 1000,\n })),\n operationName: span.operationName,\n processID:\n Object.keys(traceResponse.processes).find(\n (key) => traceResponse.processes[key].serviceName === span.serviceName\n ) || '',\n startTime: span.startTime * 1000,\n tags: span.tags,\n warnings: span.warnings ? span.warnings : null,\n });\n }\n\n return { data: [traceResponse], total: 0, limit: 0, offset: 0, errors: null };\n}\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nvar IconBase = function IconBase(_ref, _ref2) {\n var children = _ref.children;\n var color = _ref.color;\n var size = _ref.size;\n var style = _ref.style;\n var width = _ref.width;\n var height = _ref.height;\n\n var props = _objectWithoutProperties(_ref, ['children', 'color', 'size', 'style', 'width', 'height']);\n\n var _ref2$reactIconBase = _ref2.reactIconBase;\n var reactIconBase = _ref2$reactIconBase === undefined ? {} : _ref2$reactIconBase;\n\n var computedSize = size || reactIconBase.size || '1em';\n return _react2.default.createElement('svg', _extends({\n children: children,\n fill: 'currentColor',\n preserveAspectRatio: 'xMidYMid meet',\n height: height || computedSize,\n width: width || computedSize\n }, reactIconBase, props, {\n style: _extends({\n verticalAlign: 'middle',\n color: color || reactIconBase.color\n }, reactIconBase.style || {}, style)\n }));\n};\n\nIconBase.propTypes = {\n color: _propTypes2.default.string,\n size: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]),\n width: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]),\n height: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]),\n style: _propTypes2.default.object\n};\n\nIconBase.contextTypes = {\n reactIconBase: _propTypes2.default.shape(IconBase.propTypes)\n};\n\nexports.default = IconBase;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar IoAlert = function IoAlert(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm25 37.5h-10v-7.5h10v7.5z m-1.2-12.5h-7.5l-1.3-22.5h10z' })\n )\n );\n};\n\nexports.default = IoAlert;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar IoAndroidLocate = function IoAndroidLocate(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm17.5 13.8c3.4 0 6.3 2.8 6.3 6.2s-2.9 6.3-6.3 6.3-6.2-2.9-6.2-6.3 2.8-6.2 6.2-6.2z m14.9 4.6h2.6v3.2h-2.6c-0.8 7-6.3 12.5-13.3 13.3v2.6h-3.2v-2.6c-7-0.8-12.5-6.3-13.3-13.3h-2.6v-3.2h2.6c0.8-7 6.3-12.5 13.3-13.3v-2.6h3.2v2.6c7 0.8 12.5 6.3 13.3 13.3z m-14.9 13.2c6.4 0 11.6-5.2 11.6-11.6s-5.2-11.6-11.6-11.6-11.6 5.2-11.6 11.6 5.2 11.6 11.6 11.6z' })\n )\n );\n};\n\nexports.default = IoAndroidLocate;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar IoAndroidOpen = function IoAndroidOpen(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm31.6 31.6v-10.3h3.4v10.3c0 1.8-1.6 3.4-3.4 3.4h-23.2c-1.8 0-3.4-1.6-3.4-3.4v-23.2c0-1.8 1.6-3.4 3.4-3.4h10.4v3.4h-10.4v23.2h23.2z m-9.1-26.6h12.5v12.5h-3.4v-6.8l-16.8 16.8-2.3-2.3 16.8-16.8h-6.8v-3.4z' })\n )\n );\n};\n\nexports.default = IoAndroidOpen;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar IoArrowRightA = function IoArrowRightA(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm35 20l-15 15v-8.7h-15v-12.5h15v-8.8z' })\n )\n );\n};\n\nexports.default = IoArrowRightA;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar IoChevronRight = function IoChevronRight(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm23.3 20l-13.1-13.6c-0.3-0.3-0.3-0.9 0-1.2l2.4-2.4c0.3-0.3 0.9-0.4 1.2-0.1l16 16.7c0.1 0.1 0.2 0.4 0.2 0.6s-0.1 0.5-0.2 0.6l-16 16.7c-0.3 0.3-0.9 0.3-1.2 0l-2.4-2.5c-0.3-0.3-0.3-0.9 0-1.2z' })\n )\n );\n};\n\nexports.default = IoChevronRight;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar IoIosArrowDown = function IoIosArrowDown(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm31 12.5l1.5 1.6-12.5 13.4-12.5-13.4 1.5-1.6 11 11.7z' })\n )\n );\n};\n\nexports.default = IoIosArrowDown;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar IoIosArrowRight = function IoIosArrowRight(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm12.5 9l1.6-1.5 13.4 12.5-13.4 12.5-1.6-1.5 11.7-11z' })\n )\n );\n};\n\nexports.default = IoIosArrowRight;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar IoLink = function IoLink(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm20 16.3z m8.8-3.8c3.4 0 6.2 2.8 6.2 6.3v2.5c0 3.4-2.8 6.2-6.2 6.2h-8.8c-2.6 0-4.7-1.6-5.7-3.7-0.3-0.8-0.5-1.6-0.5-2.5v-2.5h3.7v2.5c0 1.4 1.1 2.5 2.5 2.5h8.8c1.4 0 2.5-1.1 2.5-2.5v-2.5c0-1.5-1.1-2.5-2.5-2.5h-1.3c-0.5-2.5-2.5-3.8-2.5-3.8h3.8z m-3 3.8c0.3 0.7 0.5 1.6 0.5 2.5v2.5h-3.8v-2.5c0-1.5-1.1-2.5-2.5-2.5h-8.7c-1.5 0-2.5 1-2.5 2.5v2.5c0 1.4 1 2.5 2.5 2.5h1.2c0.5 2.4 2.5 3.7 2.5 3.7h-3.7c-3.5 0-6.3-2.8-6.3-6.2v-2.5c0-3.5 2.8-6.3 6.3-6.3h8.7c2.6 0 4.8 1.6 5.8 3.8z' })\n )\n );\n};\n\nexports.default = IoLink;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar IoNetwork = function IoNetwork(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm35 7.5c0 1.9-1 3.4-2.5 4.3v7.3l-10 5v4.1c1.5 0.9 2.5 2.4 2.5 4.3 0 2.7-2.3 5-5 5s-5-2.3-5-5c0-1.9 1-3.4 2.5-4.3v-4.1l-10-5v-7.3c-1.5-0.9-2.5-2.4-2.5-4.3 0-2.7 2.3-5 5-5s5 2.3 5 5c0 1.9-1 3.4-2.5 4.3v4.1l7.5 3.8 7.5-3.8v-4.1c-1.5-0.9-2.5-2.4-2.5-4.3 0-2.7 2.3-5 5-5s5 2.3 5 5z m-25-2.5c-1.4 0-2.5 1.1-2.5 2.5s1.1 2.5 2.5 2.5 2.5-1.1 2.5-2.5-1.1-2.5-2.5-2.5z m10 30c1.4 0 2.5-1.1 2.5-2.5s-1.1-2.5-2.5-2.5-2.5 1.1-2.5 2.5 1.1 2.5 2.5 2.5z m10-25c1.4 0 2.5-1.1 2.5-2.5s-1.1-2.5-2.5-2.5-2.5 1.1-2.5 2.5 1.1 2.5 2.5 2.5z' })\n )\n );\n};\n\nexports.default = IoNetwork;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdFileUpload = function MdFileUpload(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm8.4 30h23.2v3.4h-23.2v-3.4z m6.6-3.4v-10h-6.6l11.6-11.6 11.6 11.6h-6.6v10h-10z' })\n )\n );\n};\n\nexports.default = MdFileUpload;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdKeyboardArrowRight = function MdKeyboardArrowRight(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm14.3 27.3l7.7-7.7-7.7-7.7 2.3-2.3 10 10-10 10z' })\n )\n );\n};\n\nexports.default = MdKeyboardArrowRight;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar createChangeEmitter = exports.createChangeEmitter = function createChangeEmitter() {\n var currentListeners = [];\n var nextListeners = currentListeners;\n\n function ensureCanMutateNextListeners() {\n if (nextListeners === currentListeners) {\n nextListeners = currentListeners.slice();\n }\n }\n\n function listen(listener) {\n if (typeof listener !== 'function') {\n throw new Error('Expected listener to be a function.');\n }\n\n var isSubscribed = true;\n\n ensureCanMutateNextListeners();\n nextListeners.push(listener);\n\n return function () {\n if (!isSubscribed) {\n return;\n }\n\n isSubscribed = false;\n\n ensureCanMutateNextListeners();\n var index = nextListeners.indexOf(listener);\n nextListeners.splice(index, 1);\n };\n }\n\n function emit() {\n currentListeners = nextListeners;\n var listeners = currentListeners;\n for (var i = 0; i < listeners.length; i++) {\n listeners[i].apply(listeners, arguments);\n }\n }\n\n return {\n listen: listen,\n emit: emit\n };\n};","/* eslint-env node, browser */\n'use strict'\n\nmodule.exports = function (element, options) {\n var self = this\n var Combokeys = self.constructor\n\n /**\n * an object of passed options\n *\n * @type { storeInstancesGlobally?: true }\n */\n\n self.options = Object.assign({ storeInstancesGlobally: true }, options || {})\n\n /**\n * a list of all the callbacks setup via Combokeys.bind()\n *\n * @type {Object}\n */\n self.callbacks = {}\n\n /**\n * direct map of string combinations to callbacks used for trigger()\n *\n * @type {Object}\n */\n self.directMap = {}\n\n /**\n * keeps track of what level each sequence is at since multiple\n * sequences can start out with the same sequence\n *\n * @type {Object}\n */\n self.sequenceLevels = {}\n\n /**\n * variable to store the setTimeout call\n *\n * @type {null|number}\n */\n self.resetTimer = null\n\n /**\n * temporary state where we will ignore the next keyup\n *\n * @type {boolean|string}\n */\n self.ignoreNextKeyup = false\n\n /**\n * temporary state where we will ignore the next keypress\n *\n * @type {boolean}\n */\n self.ignoreNextKeypress = false\n\n /**\n * are we currently inside of a sequence?\n * type of action (\"keyup\" or \"keydown\" or \"keypress\") or false\n *\n * @type {boolean|string}\n */\n self.nextExpectedAction = false\n\n self.element = element\n\n self.addEvents()\n\n if (self.options.storeInstancesGlobally) {\n Combokeys.instances.push(self)\n }\n\n return self\n}\n\nmodule.exports.prototype.bind = require('./prototype/bind')\nmodule.exports.prototype.bindMultiple = require('./prototype/bindMultiple')\nmodule.exports.prototype.unbind = require('./prototype/unbind')\nmodule.exports.prototype.trigger = require('./prototype/trigger')\nmodule.exports.prototype.reset = require('./prototype/reset.js')\nmodule.exports.prototype.stopCallback = require('./prototype/stopCallback')\nmodule.exports.prototype.handleKey = require('./prototype/handleKey')\nmodule.exports.prototype.addEvents = require('./prototype/addEvents')\nmodule.exports.prototype.bindSingle = require('./prototype/bindSingle')\nmodule.exports.prototype.getKeyInfo = require('./prototype/getKeyInfo')\nmodule.exports.prototype.pickBestAction = require('./prototype/pickBestAction')\nmodule.exports.prototype.getReverseMap = require('./prototype/getReverseMap')\nmodule.exports.prototype.getMatches = require('./prototype/getMatches')\nmodule.exports.prototype.resetSequences = require('./prototype/resetSequences')\nmodule.exports.prototype.fireCallback = require('./prototype/fireCallback')\nmodule.exports.prototype.bindSequence = require('./prototype/bindSequence')\nmodule.exports.prototype.resetSequenceTimer = require('./prototype/resetSequenceTimer')\nmodule.exports.prototype.detach = require('./prototype/detach')\n\nmodule.exports.instances = []\nmodule.exports.reset = require('./reset')\n\n/**\n * variable to store the flipped version of MAP from above\n * needed to check if we should use keypress or not when no action\n * is specified\n *\n * @type {Object|undefined}\n */\nmodule.exports.REVERSE_MAP = null\n","/* eslint-env node, browser */\n'use strict'\nmodule.exports = function () {\n var self = this\n var on = require('./dom-event')\n var element = self.element\n\n self.eventHandler = require('./handleKeyEvent').bind(self)\n\n on(element, 'keypress', self.eventHandler)\n on(element, 'keydown', self.eventHandler)\n on(element, 'keyup', self.eventHandler)\n}\n","/* eslint-env node, browser */\n'use strict'\n/**\n * binds an event to Combokeys\n *\n * can be a single key, a combination of keys separated with +,\n * an array of keys, or a sequence of keys separated by spaces\n *\n * be sure to list the modifier keys first to make sure that the\n * correct key ends up getting bound (the last key in the pattern)\n *\n * @param {string|Array} keys\n * @param {Function} callback\n * @param {string=} action - \"keypress\", \"keydown\", or \"keyup\"\n * @returns void\n */\nmodule.exports = function (keys, callback, action) {\n var self = this\n\n keys = keys instanceof Array ? keys : [keys]\n self.bindMultiple(keys, callback, action)\n return self\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * binds multiple combinations to the same callback\n *\n * @param {Array} combinations\n * @param {Function} callback\n * @param {string|undefined} action\n * @returns void\n */\nmodule.exports = function (combinations, callback, action) {\n var self = this\n\n for (var j = 0; j < combinations.length; ++j) {\n self.bindSingle(combinations[j], callback, action)\n }\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * binds a key sequence to an event\n *\n * @param {string} combo - combo specified in bind call\n * @param {Array} keys\n * @param {Function} callback\n * @param {string=} action\n * @returns void\n */\nmodule.exports = function (combo, keys, callback, action) {\n var self = this\n\n // start off by adding a sequence level record for this combination\n // and setting the level to 0\n self.sequenceLevels[combo] = 0\n\n /**\n * callback to increase the sequence level for this sequence and reset\n * all other sequences that were active\n *\n * @param {string} nextAction\n * @returns {Function}\n */\n function increaseSequence (nextAction) {\n return function () {\n self.nextExpectedAction = nextAction\n ++self.sequenceLevels[combo]\n self.resetSequenceTimer()\n }\n }\n\n /**\n * wraps the specified callback inside of another function in order\n * to reset all sequence counters as soon as this sequence is done\n *\n * @param {Event} e\n * @returns void\n */\n function callbackAndReset (e) {\n var characterFromEvent\n self.fireCallback(callback, e, combo)\n\n // we should ignore the next key up if the action is key down\n // or keypress. this is so if you finish a sequence and\n // release the key the final key will not trigger a keyup\n if (action !== 'keyup') {\n characterFromEvent = require('../../helpers/characterFromEvent')\n self.ignoreNextKeyup = characterFromEvent(e)\n }\n\n // weird race condition if a sequence ends with the key\n // another sequence begins with\n setTimeout(\n function () {\n self.resetSequences()\n },\n 10\n )\n }\n\n // loop through keys one at a time and bind the appropriate callback\n // function. for any key leading up to the final one it should\n // increase the sequence. after the final, it should reset all sequences\n //\n // if an action is specified in the original bind call then that will\n // be used throughout. otherwise we will pass the action that the\n // next key in the sequence should match. this allows a sequence\n // to mix and match keypress and keydown events depending on which\n // ones are better suited to the key provided\n for (var j = 0; j < keys.length; ++j) {\n var isFinal = j + 1 === keys.length\n var wrappedCallback = isFinal ? callbackAndReset : increaseSequence(action || self.getKeyInfo(keys[j + 1]).action)\n self.bindSingle(keys[j], wrappedCallback, action, combo, j)\n }\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * binds a single keyboard combination\n *\n * @param {string} combination\n * @param {Function} callback\n * @param {string=} action\n * @param {string=} sequenceName - name of sequence if part of sequence\n * @param {number=} level - what part of the sequence the command is\n * @returns void\n */\nmodule.exports = function (combination, callback, action, sequenceName, level) {\n var self = this\n\n // store a direct mapped reference for use with Combokeys.trigger\n self.directMap[combination + ':' + action] = callback\n\n // make sure multiple spaces in a row become a single space\n combination = combination.replace(/\\s+/g, ' ')\n\n var sequence = combination.split(' ')\n var info\n\n // if this pattern is a sequence of keys then run through this method\n // to reprocess each pattern one key at a time\n if (sequence.length > 1) {\n self.bindSequence(combination, sequence, callback, action)\n return\n }\n\n info = self.getKeyInfo(combination, action)\n\n // make sure to initialize array if this is the first time\n // a callback is added for this key\n self.callbacks[info.key] = self.callbacks[info.key] || []\n\n // remove an existing match if there is one\n self.getMatches(info.key, info.modifiers, {type: info.action}, sequenceName, combination, level)\n\n // add this call back to the array\n // if it is a sequence put it at the beginning\n // if not put it at the end\n //\n // this is important because the way these are processed expects\n // the sequence ones to come first\n self.callbacks[info.key][sequenceName ? 'unshift' : 'push']({\n callback: callback,\n modifiers: info.modifiers,\n action: info.action,\n seq: sequenceName,\n level: level,\n combo: combination\n })\n}\n","var off = require('./dom-event').off\nmodule.exports = function () {\n var self = this\n var element = self.element\n\n off(element, 'keypress', self.eventHandler)\n off(element, 'keydown', self.eventHandler)\n off(element, 'keyup', self.eventHandler)\n}\n","module.exports = on\nmodule.exports.on = on\nmodule.exports.off = off\n\nfunction on (element, event, callback, capture) {\n !element.addEventListener && (event = 'on' + event)\n ;(element.addEventListener || element.attachEvent).call(element, event, callback, capture)\n return callback\n}\n\nfunction off (element, event, callback, capture) {\n !element.removeEventListener && (event = 'on' + event)\n ;(element.removeEventListener || element.detachEvent).call(element, event, callback, capture)\n return callback\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * actually calls the callback function\n *\n * if your callback function returns false this will use the jquery\n * convention - prevent default and stop propogation on the event\n *\n * @param {Function} callback\n * @param {Event} e\n * @returns void\n */\nmodule.exports = function (callback, e, combo, sequence) {\n var self = this\n var preventDefault\n var stopPropagation\n\n // if this event should not happen stop here\n if (self.stopCallback(e, e.target || e.srcElement, combo, sequence)) {\n return\n }\n\n if (callback(e, combo) === false) {\n preventDefault = require('../../helpers/preventDefault')\n preventDefault(e)\n stopPropagation = require('../../helpers/stopPropagation')\n stopPropagation(e)\n }\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * Gets info for a specific key combination\n *\n * @param {string} combination key combination (\"command+s\" or \"a\" or \"*\")\n * @param {string=} action\n * @returns {Object}\n */\nmodule.exports = function (combination, action) {\n var self = this\n var keysFromString\n var keys\n var key\n var j\n var modifiers = []\n var SPECIAL_ALIASES\n var SHIFT_MAP\n var isModifier\n\n keysFromString = require('../../helpers/keysFromString')\n // take the keys from this pattern and figure out what the actual\n // pattern is all about\n keys = keysFromString(combination)\n\n SPECIAL_ALIASES = require('../../helpers/special-aliases')\n SHIFT_MAP = require('../../helpers/shift-map')\n isModifier = require('../../helpers/isModifier')\n for (j = 0; j < keys.length; ++j) {\n key = keys[j]\n\n // normalize key names\n if (SPECIAL_ALIASES[key]) {\n key = SPECIAL_ALIASES[key]\n }\n\n // if this is not a keypress event then we should\n // be smart about using shift keys\n // this will only work for US keyboards however\n if (action && action !== 'keypress' && SHIFT_MAP[key]) {\n key = SHIFT_MAP[key]\n modifiers.push('shift')\n }\n\n // if this key is a modifier then add it to the list of modifiers\n if (isModifier(key)) {\n modifiers.push(key)\n }\n }\n\n // depending on what the key combination is\n // we will try to pick the best event for it\n action = self.pickBestAction(key, modifiers, action)\n\n return {\n key: key,\n modifiers: modifiers,\n action: action\n }\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * finds all callbacks that match based on the keycode, modifiers,\n * and action\n *\n * @param {string} character\n * @param {Array} modifiers\n * @param {Event|Object} e\n * @param {string=} sequenceName - name of the sequence we are looking for\n * @param {string=} combination\n * @param {number=} level\n * @returns {Array}\n */\nmodule.exports = function (character, modifiers, e, sequenceName, combination, level) {\n var self = this\n var j\n var callback\n var matches = []\n var action = e.type\n var isModifier\n var modifiersMatch\n\n if (\n action === 'keypress' &&\n // Firefox fires keypress for arrows\n !(e.code && e.code.slice(0, 5) === 'Arrow')\n ) {\n // 'any-character' callbacks are only on `keypress`\n var anyCharCallbacks = self.callbacks['any-character'] || []\n anyCharCallbacks.forEach(function (callback) {\n matches.push(callback)\n })\n }\n\n if (!self.callbacks[character]) { return matches }\n\n isModifier = require('../../helpers/isModifier')\n // if a modifier key is coming up on its own we should allow it\n if (action === 'keyup' && isModifier(character)) {\n modifiers = [character]\n }\n\n // loop through all callbacks for the key that was pressed\n // and see if any of them match\n for (j = 0; j < self.callbacks[character].length; ++j) {\n callback = self.callbacks[character][j]\n\n // if a sequence name is not specified, but this is a sequence at\n // the wrong level then move onto the next match\n if (!sequenceName && callback.seq && self.sequenceLevels[callback.seq] !== callback.level) {\n continue\n }\n\n // if the action we are looking for doesn't match the action we got\n // then we should keep going\n if (action !== callback.action) {\n continue\n }\n\n // if this is a keypress event and the meta key and control key\n // are not pressed that means that we need to only look at the\n // character, otherwise check the modifiers as well\n //\n // chrome will not fire a keypress if meta or control is down\n // safari will fire a keypress if meta or meta+shift is down\n // firefox will fire a keypress if meta or control is down\n modifiersMatch = require('./modifiersMatch')\n if ((action === 'keypress' && !e.metaKey && !e.ctrlKey) || modifiersMatch(modifiers, callback.modifiers)) {\n // when you bind a combination or sequence a second time it\n // should overwrite the first one. if a sequenceName or\n // combination is specified in this call it does just that\n //\n // @todo make deleting its own method?\n var deleteCombo = !sequenceName && callback.combo === combination\n var deleteSequence = sequenceName && callback.seq === sequenceName && callback.level === level\n if (deleteCombo || deleteSequence) {\n self.callbacks[character].splice(j, 1)\n }\n\n matches.push(callback)\n }\n }\n\n return matches\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * reverses the map lookup so that we can look for specific keys\n * to see what can and can't use keypress\n *\n * @return {Object}\n */\nmodule.exports = function () {\n var self = this\n var constructor = self.constructor\n var SPECIAL_KEYS_MAP\n\n if (!constructor.REVERSE_MAP) {\n constructor.REVERSE_MAP = {}\n SPECIAL_KEYS_MAP = require('../../helpers/special-keys-map')\n for (var key in SPECIAL_KEYS_MAP) {\n // pull out the numeric keypad from here cause keypress should\n // be able to detect the keys from the character\n if (key > 95 && key < 112) {\n continue\n }\n\n if (SPECIAL_KEYS_MAP.hasOwnProperty(key)) {\n constructor.REVERSE_MAP[SPECIAL_KEYS_MAP[key]] = key\n }\n }\n }\n return constructor.REVERSE_MAP\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * handles a character key event\n *\n * @param {string} character\n * @param {Array} modifiers\n * @param {Event} e\n * @returns void\n */\nmodule.exports = function (character, modifiers, e) {\n var self = this\n var callbacks\n var j\n var doNotReset = {}\n var maxLevel = 0\n var processedSequenceCallback = false\n var isModifier\n var ignoreThisKeypress\n\n callbacks = self.getMatches(character, modifiers, e)\n // Calculate the maxLevel for sequences so we can only execute the longest callback sequence\n for (j = 0; j < callbacks.length; ++j) {\n if (callbacks[j].seq) {\n maxLevel = Math.max(maxLevel, callbacks[j].level)\n }\n }\n\n // loop through matching callbacks for this key event\n for (j = 0; j < callbacks.length; ++j) {\n // fire for all sequence callbacks\n // this is because if for example you have multiple sequences\n // bound such as \"g i\" and \"g t\" they both need to fire the\n // callback for matching g cause otherwise you can only ever\n // match the first one\n if (callbacks[j].seq) {\n // only fire callbacks for the maxLevel to prevent\n // subsequences from also firing\n //\n // for example 'a option b' should not cause 'option b' to fire\n // even though 'option b' is part of the other sequence\n //\n // any sequences that do not match here will be discarded\n // below by the resetSequences call\n if (callbacks[j].level !== maxLevel) {\n continue\n }\n\n processedSequenceCallback = true\n\n // keep a list of which sequences were matches for later\n doNotReset[callbacks[j].seq] = 1\n self.fireCallback(callbacks[j].callback, e, callbacks[j].combo, callbacks[j].seq)\n continue\n }\n\n // if there were no sequence matches but we are still here\n // that means this is a regular match so we should fire that\n if (!processedSequenceCallback) {\n self.fireCallback(callbacks[j].callback, e, callbacks[j].combo)\n }\n }\n\n // if the key you pressed matches the type of sequence without\n // being a modifier (ie \"keyup\" or \"keypress\") then we should\n // reset all sequences that were not matched by this event\n //\n // this is so, for example, if you have the sequence \"h a t\" and you\n // type \"h e a r t\" it does not match. in this case the \"e\" will\n // cause the sequence to reset\n //\n // modifier keys are ignored because you can have a sequence\n // that contains modifiers such as \"enter ctrl+space\" and in most\n // cases the modifier key will be pressed before the next key\n //\n // also if you have a sequence such as \"ctrl+b a\" then pressing the\n // \"b\" key will trigger a \"keypress\" and a \"keydown\"\n //\n // the \"keydown\" is expected when there is a modifier, but the\n // \"keypress\" ends up matching the nextExpectedAction since it occurs\n // after and that causes the sequence to reset\n //\n // we ignore keypresses in a sequence that directly follow a keydown\n // for the same character\n ignoreThisKeypress = e.type === 'keypress' && self.ignoreNextKeypress\n isModifier = require('../../helpers/isModifier')\n if (e.type === self.nextExpectedAction && !isModifier(character) && !ignoreThisKeypress) {\n self.resetSequences(doNotReset)\n }\n\n self.ignoreNextKeypress = processedSequenceCallback && e.type === 'keydown'\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * handles a keydown event\n *\n * @param {Event} e\n * @returns void\n */\nmodule.exports = function (e) {\n var self = this\n var characterFromEvent\n var eventModifiers\n\n // normalize e.which for key events\n // @see http://stackoverflow.com/questions/4285627/javascript-keycode-vs-charcode-utter-confusion\n if (typeof e.which !== 'number') {\n e.which = e.keyCode\n }\n characterFromEvent = require('../../helpers/characterFromEvent')\n var character = characterFromEvent(e)\n\n // no character found then stop\n if (character === undefined) {\n return\n }\n\n // need to use === for the character check because the character can be 0\n if (e.type === 'keyup' && self.ignoreNextKeyup === character) {\n self.ignoreNextKeyup = false\n return\n }\n\n eventModifiers = require('../../helpers/eventModifiers')\n self.handleKey(character, eventModifiers(e), e)\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * checks if two arrays are equal\n *\n * @param {Array} modifiers1\n * @param {Array} modifiers2\n * @returns {boolean}\n */\nmodule.exports = function (modifiers1, modifiers2) {\n return modifiers1.sort().join(',') === modifiers2.sort().join(',')\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * picks the best action based on the key combination\n *\n * @param {string} key - character for key\n * @param {Array} modifiers\n * @param {string=} action passed in\n */\nmodule.exports = function (key, modifiers, action) {\n var self = this\n\n // if no action was picked in we should try to pick the one\n // that we think would work best for this key\n if (!action) {\n action = self.getReverseMap()[key] ? 'keydown' : 'keypress'\n }\n\n // modifier keys don't work as expected with keypress,\n // switch to keydown\n if (action === 'keypress' && modifiers.length) {\n action = 'keydown'\n }\n\n return action\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * resets the library back to its initial state. This is useful\n * if you want to clear out the current keyboard shortcuts and bind\n * new ones - for example if you switch to another page\n *\n * @returns void\n */\nmodule.exports = function () {\n var self = this\n self.callbacks = {}\n self.directMap = {}\n return this\n}\n","/* eslint-env node, browser */\n'use strict'\n/**\n * called to set a 1 second timeout on the specified sequence\n *\n * this is so after each key press in the sequence you have 1 second\n * to press the next key before you have to start over\n *\n * @returns void\n */\nmodule.exports = function () {\n var self = this\n\n clearTimeout(self.resetTimer)\n self.resetTimer = setTimeout(\n function () {\n self.resetSequences()\n },\n 1000\n )\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * resets all sequence counters except for the ones passed in\n *\n * @param {Object} doNotReset\n * @returns void\n */\nmodule.exports = function (doNotReset) {\n var self = this\n\n doNotReset = doNotReset || {}\n\n var activeSequences = false\n var key\n\n for (key in self.sequenceLevels) {\n if (doNotReset[key]) {\n activeSequences = true\n continue\n }\n self.sequenceLevels[key] = 0\n }\n\n if (!activeSequences) {\n self.nextExpectedAction = false\n }\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n* should we stop this event before firing off callbacks\n*\n* @param {Event} e\n* @param {Element} element\n* @return {boolean}\n*/\nmodule.exports = function (e, element) {\n // if the element has the class \"combokeys\" then no need to stop\n if ((' ' + element.className + ' ').indexOf(' combokeys ') > -1) {\n return false\n }\n\n var tagName = element.tagName.toLowerCase()\n\n // stop for input, select, and textarea\n return tagName === 'input' || tagName === 'select' || tagName === 'textarea' || element.isContentEditable\n}\n","/* eslint-env node, browser */\n'use strict'\n/**\n * triggers an event that has already been bound\n *\n * @param {string} keys\n * @param {string=} action\n * @returns void\n */\nmodule.exports = function (keys, action) {\n var self = this\n if (self.directMap[keys + ':' + action]) {\n self.directMap[keys + ':' + action]({}, keys)\n }\n return this\n}\n","/* eslint-env node, browser */\n'use strict'\n/**\n * unbinds an event to Combokeys\n *\n * the unbinding sets the callback function of the specified key combo\n * to an empty function and deletes the corresponding key in the\n * directMap dict.\n *\n * TODO: actually remove this from the callbacks dictionary instead\n * of binding an empty function\n *\n * the keycombo+action has to be exactly the same as\n * it was defined in the bind method\n *\n * @param {string|Array} keys\n * @param {string} action\n * @returns void\n */\nmodule.exports = function (keys, action) {\n var self = this\n\n return self.bind(keys, function () {}, action)\n}\n","/* eslint-env node, browser */\n'use strict'\n\nmodule.exports = function () {\n var self = this\n\n self.instances.forEach(function (combokeys) {\n combokeys.reset()\n })\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * takes the event and returns the key character\n *\n * @param {Event} e\n * @return {string}\n */\nmodule.exports = function (e) {\n var SPECIAL_KEYS_MAP,\n SPECIAL_CHARACTERS_MAP\n SPECIAL_KEYS_MAP = require('./special-keys-map')\n SPECIAL_CHARACTERS_MAP = require('./special-characters-map')\n\n // for keypress events we should return the character as is\n if (e.type === 'keypress') {\n var character = String.fromCharCode(e.which)\n\n // if the shift key is not pressed then it is safe to assume\n // that we want the character to be lowercase. this means if\n // you accidentally have caps lock on then your key bindings\n // will continue to work\n //\n // the only side effect that might not be desired is if you\n // bind something like 'A' cause you want to trigger an\n // event when capital A is pressed caps lock will no longer\n // trigger the event. shift+a will though.\n if (!e.shiftKey) {\n character = character.toLowerCase()\n }\n\n return character\n }\n\n // for non keypress events the special maps are needed\n if (SPECIAL_KEYS_MAP[e.which] !== undefined) {\n return SPECIAL_KEYS_MAP[e.which]\n }\n\n if (SPECIAL_CHARACTERS_MAP[e.which] !== undefined) {\n return SPECIAL_CHARACTERS_MAP[e.which]\n }\n\n // if it is not in the special map\n\n // with keydown and keyup events the character seems to always\n // come in as an uppercase character whether you are pressing shift\n // or not. we should make sure it is always lowercase for comparisons\n return String.fromCharCode(e.which).toLowerCase()\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * takes a key event and figures out what the modifiers are\n *\n * @param {Event} e\n * @returns {Array}\n */\nmodule.exports = function (e) {\n var modifiers = []\n\n if (e.shiftKey) {\n modifiers.push('shift')\n }\n\n if (e.altKey) {\n modifiers.push('alt')\n }\n\n if (e.ctrlKey) {\n modifiers.push('ctrl')\n }\n\n if (e.metaKey) {\n modifiers.push('meta')\n }\n\n return modifiers\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * determines if the keycode specified is a modifier key or not\n *\n * @param {string} key\n * @returns {boolean}\n */\nmodule.exports = function (key) {\n return key === 'shift' || key === 'ctrl' || key === 'alt' || key === 'meta'\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * Converts from a string key combination to an array\n *\n * @param {string} combination like \"command+shift+l\"\n * @return {Array}\n */\nmodule.exports = function (combination) {\n if (combination === '+') {\n return ['+']\n }\n\n return combination.split('+')\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * prevents default for this event\n *\n * @param {Event} e\n * @returns void\n */\nmodule.exports = function (e) {\n if (e.preventDefault) {\n e.preventDefault()\n return\n }\n\n e.returnValue = false\n}\n","/* eslint-env node, browser */\n'use strict'\n/**\n * this is a mapping of keys that require shift on a US keypad\n * back to the non shift equivelents\n *\n * this is so you can use keyup events with these keys\n *\n * note that this will only work reliably on US keyboards\n *\n * @type {Object}\n */\nmodule.exports = {\n '~': '`',\n '!': '1',\n '@': '2',\n '#': '3',\n '$': '4',\n '%': '5',\n '^': '6',\n '&': '7',\n '*': '8',\n '(': '9',\n ')': '0',\n '_': '-',\n '+': '=',\n ':': ';',\n '\"': \"'\",\n '<': ',',\n '>': '.',\n '?': '/',\n '|': '\\\\'\n}\n","/* eslint-env node, browser */\n'use strict'\n/**\n * this is a list of special strings you can use to map\n * to modifier keys when you specify your keyboard shortcuts\n *\n * @type {Object}\n */\nmodule.exports = {\n 'option': 'alt',\n 'command': 'meta',\n 'return': 'enter',\n 'escape': 'esc',\n 'mod': /Mac|iPod|iPhone|iPad/.test(navigator.platform) ? 'meta' : 'ctrl'\n}\n","/* eslint-env node, browser */\n'use strict'\n/**\n * mapping for special characters so they can support\n *\n * this dictionary is only used incase you want to bind a\n * keyup or keydown event to one of these keys\n *\n * @type {Object}\n */\nmodule.exports = {\n 106: '*',\n 107: 'plus',\n 109: 'minus',\n 110: '.',\n 111: '/',\n 186: ';',\n 187: '=',\n 188: ',',\n 189: '-',\n 190: '.',\n 191: '/',\n 192: '`',\n 219: '[',\n 220: '\\\\',\n 221: ']',\n 222: \"'\"\n}\n","/* eslint-env node, browser */\n'use strict'\n/**\n * mapping of special keycodes to their corresponding keys\n *\n * everything in this dictionary cannot use keypress events\n * so it has to be here to map to the correct keycodes for\n * keyup/keydown events\n *\n * @type {Object}\n */\nmodule.exports = {\n 8: 'backspace',\n 9: 'tab',\n 13: 'enter',\n 16: 'shift',\n 17: 'ctrl',\n 18: 'alt',\n 20: 'capslock',\n 27: 'esc',\n 32: 'space',\n 33: 'pageup',\n 34: 'pagedown',\n 35: 'end',\n 36: 'home',\n 37: 'left',\n 38: 'up',\n 39: 'right',\n 40: 'down',\n 45: 'ins',\n 46: 'del',\n 91: 'meta',\n 93: 'meta',\n 173: 'minus',\n 187: 'plus',\n 189: 'minus',\n 224: 'meta'\n}\n\n/**\n * loop through the f keys, f1 to f19 and add them to the map\n * programatically\n */\nfor (var i = 1; i < 20; ++i) {\n module.exports[111 + i] = 'f' + i\n}\n\n/**\n * loop through to map numbers on the numeric keypad\n */\nfor (i = 0; i <= 9; ++i) {\n module.exports[i + 96] = i\n}\n","/* eslint-env node, browser */\n'use strict'\n\n/**\n * stops propogation for this event\n *\n * @param {Event} e\n * @returns void\n */\nmodule.exports = function (e) {\n if (e.stopPropagation) {\n e.stopPropagation()\n return\n }\n\n e.cancelBubble = true\n}\n","\"use strict\";\n\nvar deselectCurrent = require(\"toggle-selection\");\n\nvar clipboardToIE11Formatting = {\n \"text/plain\": \"Text\",\n \"text/html\": \"Url\",\n \"default\": \"Text\"\n}\n\nvar defaultMessage = \"Copy to clipboard: #{key}, Enter\";\n\nfunction format(message) {\n var copyKey = (/mac os x/i.test(navigator.userAgent) ? \"⌘\" : \"Ctrl\") + \"+C\";\n return message.replace(/#{\\s*key\\s*}/g, copyKey);\n}\n\nfunction copy(text, options) {\n var debug,\n message,\n reselectPrevious,\n range,\n selection,\n mark,\n success = false;\n if (!options) {\n options = {};\n }\n debug = options.debug || false;\n try {\n reselectPrevious = deselectCurrent();\n\n range = document.createRange();\n selection = document.getSelection();\n\n mark = document.createElement(\"span\");\n mark.textContent = text;\n // reset user styles for span element\n mark.style.all = \"unset\";\n // prevents scrolling to the end of the page\n mark.style.position = \"fixed\";\n mark.style.top = 0;\n mark.style.clip = \"rect(0, 0, 0, 0)\";\n // used to preserve spaces and line breaks\n mark.style.whiteSpace = \"pre\";\n // do not inherit user-select (it may be `none`)\n mark.style.webkitUserSelect = \"text\";\n mark.style.MozUserSelect = \"text\";\n mark.style.msUserSelect = \"text\";\n mark.style.userSelect = \"text\";\n mark.addEventListener(\"copy\", function(e) {\n e.stopPropagation();\n if (options.format) {\n e.preventDefault();\n if (typeof e.clipboardData === \"undefined\") { // IE 11\n debug && console.warn(\"unable to use e.clipboardData\");\n debug && console.warn(\"trying IE specific stuff\");\n window.clipboardData.clearData();\n var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting[\"default\"]\n window.clipboardData.setData(format, text);\n } else { // all other browsers\n e.clipboardData.clearData();\n e.clipboardData.setData(options.format, text);\n }\n }\n if (options.onCopy) {\n e.preventDefault();\n options.onCopy(e.clipboardData);\n }\n });\n\n document.body.appendChild(mark);\n\n range.selectNodeContents(mark);\n selection.addRange(range);\n\n var successful = document.execCommand(\"copy\");\n if (!successful) {\n throw new Error(\"copy command was unsuccessful\");\n }\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using execCommand: \", err);\n debug && console.warn(\"trying IE specific stuff\");\n try {\n window.clipboardData.setData(options.format || \"text\", text);\n options.onCopy && options.onCopy(window.clipboardData);\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using clipboardData: \", err);\n debug && console.error(\"falling back to prompt\");\n message = format(\"message\" in options ? options.message : defaultMessage);\n window.prompt(message, text);\n }\n } finally {\n if (selection) {\n if (typeof selection.removeRange == \"function\") {\n selection.removeRange(range);\n } else {\n selection.removeAllRanges();\n }\n }\n\n if (mark) {\n document.body.removeChild(mark);\n }\n reselectPrevious();\n }\n\n return success;\n}\n\nmodule.exports = copy;\n","module.exports = function deepFreeze (o) {\n Object.freeze(o);\n\n Object.getOwnPropertyNames(o).forEach(function (prop) {\n if (o.hasOwnProperty(prop)\n && o[prop] !== null\n && (typeof o[prop] === \"object\" || typeof o[prop] === \"function\")\n && !Object.isFrozen(o[prop])) {\n deepFreeze(o[prop]);\n }\n });\n \n return o;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n * \n */\n\n/*eslint-disable no-self-compare */\n\n'use strict';\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n // Added the nonzero y check to make Flow happy, but it is redundant\n return x !== 0 || y !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n}\n\n/**\n * Performs equality by iterating through keys on an object and returning false\n * when any key has values which are not strictly equal between the arguments.\n * Returns true when the values of all keys are strictly equal.\n */\nfunction shallowEqual(objA, objB) {\n if (is(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n // Test for A's keys different from B.\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n}\n\nmodule.exports = shallowEqual;","/*\n * Fuzzy\n * https://github.com/myork/fuzzy\n *\n * Copyright (c) 2012 Matt York\n * Licensed under the MIT license.\n */\n\n(function() {\n\nvar root = this;\n\nvar fuzzy = {};\n\n// Use in node or in browser\nif (typeof exports !== 'undefined') {\n module.exports = fuzzy;\n} else {\n root.fuzzy = fuzzy;\n}\n\n// Return all elements of `array` that have a fuzzy\n// match against `pattern`.\nfuzzy.simpleFilter = function(pattern, array) {\n return array.filter(function(str) {\n return fuzzy.test(pattern, str);\n });\n};\n\n// Does `pattern` fuzzy match `str`?\nfuzzy.test = function(pattern, str) {\n return fuzzy.match(pattern, str) !== null;\n};\n\n// If `pattern` matches `str`, wrap each matching character\n// in `opts.pre` and `opts.post`. If no match, return null\nfuzzy.match = function(pattern, str, opts) {\n opts = opts || {};\n var patternIdx = 0\n , result = []\n , len = str.length\n , totalScore = 0\n , currScore = 0\n // prefix\n , pre = opts.pre || ''\n // suffix\n , post = opts.post || ''\n // String to compare against. This might be a lowercase version of the\n // raw string\n , compareString = opts.caseSensitive && str || str.toLowerCase()\n , ch;\n\n pattern = opts.caseSensitive && pattern || pattern.toLowerCase();\n\n // For each character in the string, either add it to the result\n // or wrap in template if it's the next string in the pattern\n for(var idx = 0; idx < len; idx++) {\n ch = str[idx];\n if(compareString[idx] === pattern[patternIdx]) {\n ch = pre + ch + post;\n patternIdx += 1;\n\n // consecutive characters should increase the score more than linearly\n currScore += 1 + currScore;\n } else {\n currScore = 0;\n }\n totalScore += currScore;\n result[result.length] = ch;\n }\n\n // return rendered string if we have a match for every char\n if(patternIdx === pattern.length) {\n // if the string is an exact match with pattern, totalScore should be maxed\n totalScore = (compareString === pattern) ? Infinity : totalScore;\n return {rendered: result.join(''), score: totalScore};\n }\n\n return null;\n};\n\n// The normal entry point. Filters `arr` for matches against `pattern`.\n// It returns an array with matching values of the type:\n//\n// [{\n// string: 'lah' // The rendered string\n// , index: 2 // The index of the element in `arr`\n// , original: 'blah' // The original element in `arr`\n// }]\n//\n// `opts` is an optional argument bag. Details:\n//\n// opts = {\n// // string to put before a matching character\n// pre: ''\n//\n// // string to put after matching character\n// , post: ''\n//\n// // Optional function. Input is an entry in the given arr`,\n// // output should be the string to test `pattern` against.\n// // In this example, if `arr = [{crying: 'koala'}]` we would return\n// // 'koala'.\n// , extract: function(arg) { return arg.crying; }\n// }\nfuzzy.filter = function(pattern, arr, opts) {\n if(!arr || arr.length === 0) {\n return [];\n }\n if (typeof pattern !== 'string') {\n return arr;\n }\n opts = opts || {};\n return arr\n .reduce(function(prev, element, idx, arr) {\n var str = element;\n if(opts.extract) {\n str = opts.extract(element);\n }\n var rendered = fuzzy.match(pattern, str, opts);\n if(rendered != null) {\n prev[prev.length] = {\n string: rendered.rendered\n , score: rendered.score\n , index: idx\n , original: element\n };\n }\n return prev;\n }, [])\n\n // Sort by score. Browsers are inconsistent wrt stable/unstable\n // sorting, so force stable by using the index in the case of tie.\n // See http://ofb.net/~sethml/is-sort-stable.html\n .sort(function(a,b) {\n var compare = b.score - a.score;\n if(compare) return compare;\n return a.index - b.index;\n });\n};\n\n\n}());\n\n","'use strict';\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\n\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = getPrototypeOf && getPrototypeOf(Object);\n\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components\n\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n try { // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n\n return targetComponent;\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","'use strict'\n\nvar INDENT = ' '\n\nfunction inlineRule (objRule) {\n var str = ''\n objRule && Object.keys(objRule).forEach(function (rule) {\n str += rule + ':' + objRule[rule] + ';'\n })\n return str\n}\n\nfunction Stylize (styleFile) {\n function styleClass (cssClass) {\n return 'class=\"' + cssClass + '\"'\n }\n\n function styleInline (cssClass) {\n return 'style=\"' + inlineRule(styleFile['.' + cssClass]) + '\"'\n }\n\n if (!styleFile) return styleClass\n return styleInline\n}\n\nfunction type (doc) {\n if (doc === null) return 'null'\n if (Array.isArray(doc)) return 'array'\n if (typeof doc === 'string' && /^https?:/.test(doc)) return 'link'\n if (typeof doc === 'object' && typeof doc.toISOString === 'function') return 'date'\n\n return typeof doc\n}\n\nfunction escape (str) {\n return str.replace(//g, '>')\n}\n\nmodule.exports = function (doc, styleFile) {\n var indent = ''\n var style = Stylize(styleFile)\n\n var forEach = function (list, start, end, fn) {\n if (!list.length) return start + ' ' + end\n\n var out = start + '\\n'\n\n indent += INDENT\n list.forEach(function (key, i) {\n out += indent + fn(key) + (i < list.length - 1 ? ',' : '') + '\\n'\n })\n indent = indent.slice(0, -INDENT.length)\n\n return out + indent + end\n }\n\n function visit (obj) {\n if (obj === undefined) return ''\n\n switch (type(obj)) {\n case 'boolean':\n return '' + obj + ''\n\n case 'number':\n return '' + obj + ''\n\n case 'date':\n return '\"' + escape(obj.toISOString()) + '\"'\n\n case 'null':\n return 'null'\n\n case 'string':\n return '\"' + escape(obj.replace(/\\n/g, '\\n' + indent)) + '\"'\n\n case 'link':\n return '\"' + escape(obj) + '\"'\n\n case 'array':\n return forEach(obj, '[', ']', visit)\n\n case 'object':\n var keys = Object.keys(obj).filter(function (key) {\n return obj[key] !== undefined\n })\n\n return forEach(keys, '{', '}', function (key) {\n return '\"' + key + '\": ' + visit(obj[key])\n })\n }\n\n return ''\n }\n\n return '
' + visit(doc) + '
'\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/* global window */\nimport ponyfill from './ponyfill.js';\n\nvar root;\n\nif (typeof self !== 'undefined') {\n root = self;\n} else if (typeof window !== 'undefined') {\n root = window;\n} else if (typeof global !== 'undefined') {\n root = global;\n} else if (typeof module !== 'undefined') {\n root = module;\n} else {\n root = Function('return this')();\n}\n\nvar result = ponyfill(root);\nexport default result;\n","export default function symbolObservablePonyfill(root) {\n\tvar result;\n\tvar Symbol = root.Symbol;\n\n\tif (typeof Symbol === 'function') {\n\t\tif (Symbol.observable) {\n\t\t\tresult = Symbol.observable;\n\t\t} else {\n\t\t\tresult = Symbol('observable');\n\t\t\tSymbol.observable = result;\n\t\t}\n\t} else {\n\t\tresult = '@@observable';\n\t}\n\n\treturn result;\n};\n","\nmodule.exports = function () {\n var selection = document.getSelection();\n if (!selection.rangeCount) {\n return function () {};\n }\n var active = document.activeElement;\n\n var ranges = [];\n for (var i = 0; i < selection.rangeCount; i++) {\n ranges.push(selection.getRangeAt(i));\n }\n\n switch (active.tagName.toUpperCase()) { // .toUpperCase handles XHTML\n case 'INPUT':\n case 'TEXTAREA':\n active.blur();\n break;\n\n default:\n active = null;\n break;\n }\n\n selection.removeAllRanges();\n return function () {\n selection.type === 'Caret' &&\n selection.removeAllRanges();\n\n if (!selection.rangeCount) {\n ranges.forEach(function(range) {\n selection.addRange(range);\n });\n }\n\n active &&\n active.focus();\n };\n};\n"],"names":["insertWithoutScoping","cache","serialized","undefined","inserted","name","insert","sheet","merge","registered","css","className","registeredStyles","rawClassName","length","classnames","args","cls","i","arg","toAdd","Array","isArray","k","options","speedy","value","this","isSpeedy","compat","_len","arguments","_key","key","cx","_len4","_key4","injectGlobal","_len3","_key3","keyframes","_len2","_key2","animation","styles","hydrate","ids","forEach","flush","getRegisteredStyles","bind","_createEmotion","getStyles","TimelineCollapser","props","onExpandAll","onExpandOne","onCollapseAll","onCollapseOne","useStyles2","IconButton","tooltip","size","tooltipPlacement","onClick","EUpdateTypes","DraggableManager","constructor","getBounds","tag","resetBoundsOnResize","rest","_bounds","event","button","clientX","type","eventType","_isDragging","handler","_onMouseEnter","_onMouseLeave","Error","_onMouseMove","x","_getPosition","manager","window","addEventListener","_handleDragEvent","style","_get","document","userSelect","_onDragStart","_onDragMove","_stopDragging","_onDragEnd","handleMouseDown","handleMouseEnter","_handleMinorMouseEvent","handleMouseMove","handleMouseLeave","_resetBoundsOnResize","Boolean","resetBounds","onMouseEnter","onMouseLeave","onMouseMove","onDragStart","onDragMove","onDragEnd","_getBounds","clientXLeft","maxValue","minValue","width","removeEventListener","isDragging","dispose","stylesFactory","TimelineColumnResizer","wrapper","dragger","draggerDragging","draggerDraggingLeft","draggerDraggingRight","gripIcon","gripIconDragging","React","super","elm","_rootElm","left","getBoundingClientRect","min","max","setState","dragPosition","onChange","_dragManager","_getDraggingBounds","_handleDragEnd","_handleDragUpdate","state","componentWillUnmount","render","draggerStyle","position","columnResizeHandleHeight","gripStyle","isDraggingLeft","isDraggingRight","Math","right","height","ref","_setRootElm","onMouseDown","TimelineViewingLayer","TimelineViewingLayerCursorGuide","TimelineViewingLayerDragged","TimelineViewingLayerDraggedDraggingLeft","TimelineViewingLayerDraggedDraggingRight","TimelineViewingLayerDraggedShiftDrag","TimelineViewingLayerDraggedReframeDrag","TimelineViewingLayerFullOverlay","mapFromViewSubRange","viewStart","viewEnd","mapToViewSubRange","getMarkers","from","to","isShift","layout","start","isOutOfView","getNextViewLayout","Reflect","has","_root","viewRangeTime","current","cursor","updateNextViewRangeTime","reframe","shift","update","anchor","end","updateViewRangeTime","_draggerReframe","_handleReframeDragEnd","_handleReframeDragUpdate","_handleReframeMouseLeave","_handleReframeMouseMove","UNSAFE_componentWillReceiveProps","nextProps","boundsInvalidator","shiftEnd","shiftStart","cusrorPosition","_setRoot","ONE_MILLISECOND","ONE_SECOND","ONE_MINUTE","ONE_HOUR","DEFAULT_MS_PRECISION","log10","UNIT_STEPS","unit","microseconds","ofPrevious","quantizeDuration","duration","floatPrecision","conversionFactor","number","precision","targetPrecision","floor","abs","trunc","Number","toPrecision","toFloatPrecision","formatDuration","primaryUnit","secondaryUnit","_dropWhile","index","_round","primaryUnitString","secondaryValue","round","secondaryUnitString","spanHasTag","span","tags","some","isClientSpan","isServerSpan","isErrorBool","isErrorStr","isErrorSpan","autoColor","theme","hex","base","isLight","color","tinycolor","clone","lighten","darken","includeFallbackColors","toHex8String","toHsl","l","newColor","Ticks","TicksTick","TicksTickLabel","TicksTickLabelEndAnchor","endTime","numTicks","showLabels","startTime","labels","viewingDuration","durationAtTick","push","ticks","portion","defaultProps","ubRelative","ubMb1","ubMy1","ubM0","ubPx2","ubPb2","ubFlex","ubItemsCenter","ubFlexAuto","ubTxRightAlign","ubInlineBlock","uAlignIcon","uTxEllipsis","uWidth100","uTxMuted","ubJustifyEnd","flexRow","TimelineRow","children","TimelineRowCell","widthPercent","mergedStyle","flexBasis","maxWidth","Cell","TimelineHeaderRow","TimelineHeaderRowTitle","TimelineHeaderWrapper","nameColumnWidth","onColummWidthChange","Positions","bufferLen","ys","heights","dataLen","lastI","profileData","dataLength","calcHeights","heightGetter","forcedLastI","_max","h","calcYs","yValue","confirmHeight","_i","chg","findFloorIndex","imin","imax","getRowPosition","y","getEstimatedHeight","known","DEFAULT_INITIAL_DRAW","ListView","_viewHeight","bottomY","_scrollTop","_yPositions","_getHeight","scrollElement","scrollElementTop","top","listViewOffset","scrollTop","_itemHolderElm","itemOffset","scrollTo","_isScrolledOrResized","requestAnimationFrame","_positionList","_wrapperElm","_calcViewIndexes","maxStart","viewBufferMin","_startIndex","minEnd","_endIndex","_startIndexDrawn","_endIndexDrawn","forceUpdate","windowScroller","clientHeight","_scanItemHeights","getIndexFromKey","lowDirtyKey","highDirtyKey","isDirty","nodes","childNodes","node","itemKey","getAttribute","console","warn","observed","firstElementChild","_knownHeights","get","set","getKeyFromIndex","itemHeightGetter","Map","_htmlTopOffset","_windowScrollListenerAdded","_htmlElm","documentElement","componentDidMount","_onScroll","componentDidUpdate","_isViewChanged","useRoot","innerHeight","scrollY","yStart","yEnd","initialDraw","itemRenderer","viewBuffer","items","attrs","wrapperProps","_initWrapper","onScroll","overflowY","scrollerStyle","margin","padding","itemsWrapperClassName","_initItemHolder","NewWindowIconLarge","NewWindowIcon","isLarge","UIPopover","GetElementsContext","elements","Popover","UITooltip","Tooltip","UIIcon","Icon","UIDropdown","Dropdown","UIMenu","Menu","UIMenuItem","MenuItem","UIButton","Button","UIDivider","Divider","UIInput","Input","UIInputGroup","InputGroup","UIElementsContext","displayName","Consumer","ExternalLinkContext","ReferenceLink","reference","focusSpan","otherProps","role","spanID","createLinkToExternalSpan","href","traceID","target","rel","MultiParent","TraceRefLink","ReferencesButton","references","map","process","serviceName","operationName","tooltipText","tooltipProps","arrowPointAtCenter","mouseLeaveDelay","placement","title","overlayClassName","overlay","referencesList","trigger","getFirstAncestor","_find","refType","SpanTreeOffset","SpanTreeOffsetParent","indentGuide","indentGuideActive","iconWrapper","UnthemedSpanTreeOffset","ancestorId","relatedTarget","HTMLSpanElement","removeHoverIndentGuideId","addHoverIndentGuideId","ancestorIds","ancestorIDs","spanAncestorIds","reverse","childrenVisible","showChildrenIcon","hasChildren","icon","hoverIndentGuideIds","withTheme2","mapProps","propsMapper","BaseComponent","factory","createFactory","pick","obj","keys","result","hasOwnProperty","shouldUpdate","Object","Component","test","ShouldUpdate","_Component","apply","_proto","prototype","shouldComponentUpdate","onlyUpdateForKeys","propKeys","config$$1","_config","fromESObservable","toESObservable","config","observable","stream","CopyIcon","hasCopied","copy","copyText","visible","onVisibleChange","handleTooltipVisibilityChange","tooltipTitle","htmlType","handleClick","copyIconClassName","KeyValueTable","body","row","keyColumn","copyColumn","linkIcon","jsonObjectOrArrayStartRegex","parseIfComplexJson","JSON","parse","_","LinkValue","linkValueList","links","text","url","KeyValuesTable","data","linksGetter","markup","__html","jsonMarkup","jsonTable","dangerouslySetInnerHTML","valueMarkup","stringify","header","headerEmpty","headerHighContrast","emptyIcon","summary","summaryItem","summaryLabel","summaryDelim","KeyValuesSummary","item","String","AccordianKeyValues","highContrast","interactive","isOpen","label","onToggle","isEmpty","iconCls","arrow","headerProps","AccordianLogs","AccordianLogsHeader","AccordianLogsContent","AccordianLogsFooter","logs","openedItems","onItemToggle","timestamp","HeaderComponent","_sortBy","log","fields","bar","rpc","logMarker","toPercent","toFixed","funcs","reduce","a","b","compose","stateName","stateUpdaterName","initialState","shortLabel","WithState","_this","call","concat","stateValue","updateStateValue","updateFn","callback","_ref","_extends2","input","setLabel","longLabel","setLongLabel","setShortLabel","getViewedBounds","traceStartTime","labelClassName","logGroups","_groupBy","posPercent","onMouseOver","background","positionKey","content","spanBarClassName","spanBarLabelClassName","nameWrapperClassName","nameWrapperMatchingFilterClassName","viewClassName","nameColumnClassName","animations","nameWrapper","nameWrapperMatchingFilter","nameColumn","endpointName","view","viewExpanded","viewExpandedAndMatchingFilter","rowClippingLeft","rowClippingRight","rowExpanded","rowMatchingFilter","rowFocused","rowExpandedAndMatchingFilter","nameDetailExpanded","svcName","svcNameChildrenCollapsed","errorIcon","rpcColorMarker","labelRight","labelLeft","UnthemedSpanBarRow","onDetailToggled","onChildrenToggled","columnDivision","isChildrenExpanded","isDetailExpanded","isMatchingFilter","isFocused","noInstrumentedServer","showErrorIcon","clippingLeft","clippingRight","createSpanLink","isParent","viewBounds","labelDetail","hintClassName","_childrenToggle","_detailToggle","borderColor","tabIndex","backgroundColor","errorIconColor","link","marginRight","ctrlKey","metaKey","shiftKey","preventDefault","subsidiarilyReferencedBy","TextList","List","DefaultTextComponent","AccordianText","headerClassName","TextComponent","accordianKeyValuesStyles","getAccordianKeyValuesStyles","LabeledList","LabeledListItem","LabeledListLabel","dividerClassName","divider","ReferencesList","list","itemContent","debugInfo","debugLabel","References","AccordianReferences","dividerVertical","debugValue","AccordianWarnings","AccordianWarningsHeader","AccordianWarningsHeaderOpen","AccordianWarningsLabel","Textarea","LinkIcon","SpanDetail","detailState","logItemToggle","logsToggle","processToggle","tagsToggle","warningsToggle","stackTracesToggle","referencesToggle","createFocusSpanLink","isTagsOpen","isProcessOpen","logsState","isWarningsOpen","isReferencesOpen","isStackTracesOpen","relativeStartTime","warnings","stackTraces","overviewItems","focusSpanLink","DataLinkButton","buttonProps","logItem","textComponentProps","stackTrace","join","TextArea","readOnly","cols","rows","e","currentTarget","altKey","expandedAccent","infoWrapper","UnthemedSpanDetailRow","itemIndex","focusedSpanId","overflow","borderTopColor","_linksGetter","strToRgb","s","r","slice","g","parseInt","ColorGenerator","colorsHex","colorsRgb","currentIdx","_getColorIndex","getColorByKey","getRgbColorByKey","clear","getGenerator","memoizeOne","colors","rowsWrapper","DEFAULT_HEIGHTS","memoizedGenerateRowStates","trace","childrenHiddenIDs","detailStates","spans","collapseDepth","rowStates","depth","hidden","isDetail","spanIndex","generateRowStates","memoizedViewBoundsFunc","viewRange","viewMin","viewWindow","isEqual","memoizedGetClipping","currentViewRange","zoomStart","zoomEnd","UnthemedVirtualizedTraceView","currentViewRangeTime","findMatchesIDs","getRowStates","listView","isChanged","registerAccessors","getAccessors","parts","split","_traceID","_spanID","_isDetail","renderSpanDetailRow","renderSpanBarRow","findIndex","scrollToIndex","setTrace","uiFind","scrollToSpan","nextPropKeys","prevProps","shouldScrollToFirstUiFindMatch","clearShouldScrollToFirstUiFindMatch","scrollToFirstVisibleSpan","nextRegisterAccessors","nextTrace","getClipping","lv","getViewRange","getSearchedSpanIDs","getCollapsedChildren","getViewHeight","getBottomRowIndexVisible","getBottomVisibleIndex","getTopRowIndexVisible","getTopVisibleIndex","mapRowIndexToSpanIndex","mapSpanIndexToRowIndex","childrenToggle","detailToggle","spanNameColumnWidth","isCollapsed","parentSpanIndex","spanContainsErredSpan","rpcSpan","spanChildDepth","findServerChildSpan","rpcViewBounds","peerServiceKV","find","kv","isKindClient","SpanBarRow","detailLogItemToggle","detailLogsToggle","detailProcessToggle","detailReferencesToggle","detailWarningsToggle","detailStackTracesToggle","detailTagsToggle","zIndex","SpanDetailRow","setListView","getRowHeight","renderRow","scrollPageDown","binding","scrollPageUp","scrollToNextVisibleSpan","scrollToPrevVisibleSpan","panLeft","panLeftFast","panRight","panRightFast","zoomIn","zoomInFast","zoomOut","zoomOutFast","collapseAll","expandAll","collapseOne","expandOne","searchSpans","clearSearch","instance","getInstance","local","Combokeys","TraceTimelineViewer","UnthemedTraceTimelineViewer","callbacks","inst","keysHandler","keyboardMappings","mergeShortcuts","setSpanNameColumnWidth","traceTimeline","time","VirtualizedTraceView","CanvasSpanGraph","UnthemedCanvasSpanGraph","_canvasElm","_draw","valueWidth","totalValueWidth","canvas","getFillColor","bgColor","fillCache","cHeight","cWidth","innerWidth","itemHeight","itemYChange","ctx","getContext","alpha","fillStyle","fillRect","valueOffset","renderIntoCanvas","getColor","_setCanvasRef","TickLabels","TickLabelsLabel","GraphTick","GraphTicks","x1","y1","x2","y2","ScrubberHandleExpansion","ScrubberHandle","ScrubberLine","ScrubberDragging","ScrubberHandles","Scrubber","xPercent","transform","ViewingLayerResetZoomHoverClassName","ViewingLayerResetZoom","ViewingLayer","ViewingLayerGraph","ViewingLayerInactive","ViewingLayerCursorGuide","ViewingLayerDraggedShift","ViewingLayerDrag","ViewingLayerFullOverlay","dragTypes","UnthemedViewingLayer","preventCursorLine","stopPropagation","_draggerStart","_handleScrubberDragEnd","_handleScrubberDragUpdate","_handleScrubberEnterLeave","_draggerEnd","_getMarkers","leadingX","haveNextTimeRange","leftInactive","cursorPosition","rightInactive","_resetTimeZoomClickHandler","strokeWidth","getItem","memoizedGetitems","SpanGraph","UiFindInput","allowClear","inputProps","suffix","clearUiFind","autosize","placeholder","trackFindFunction","TracePageSearchBar","TracePageSearchBarBar","TracePageSearchBarCount","TracePageSearchBarBtn","TracePageSearchBarBtnDisabled","TracePageSearchBarLocateBtn","memo","focusUiFindMatches","navigable","nextResult","prevResult","resultCount","textFilter","onSearchValueChange","searchValue","hideSearchButtons","count","btnClass","uiFindInputInputProps","compact","display","disabled","BreakableText","WORD_RX","wordRegexp","exec","match","LoadingIndicatorColorAnim","LoadingIndicator","LoadingIndicatorCentered","LoadingIndicatorSmall","centered","small","FALLBACK_TRACE_NAME","fetchedState","TraceName","typography","lg","TraceNameError","error","traceName","isErred","errorCssClass","titleStr","message","getTraceName","memoize","candidateSpan","allIDs","Set","thisRefLength","candidateRefLength","hasOwn","object","createCache","limit","equals","entry","put","singletonCache","entries","cacheIndex","arr","fn","splice","unshift","pop","lruCache","createEqualsFn","basicEquals","deepObjects","deep","valueA","valueB","every","isANull","isBNull","aKeys","bKeys","equalityChecker","aKey","deepEquals","deepFreeze","defineProperty","archiveEnabled","dependencies","dagMaxNumServices","menuEnabled","linkPatterns","menu","search","maxLookback","maxLimit","tracking","gaID","trackErrors","getConfigValue","path","defaultConfig","getParent","parentRef","parameterRegExp","getParamNames","str","names","replace","add","stringSupplant","encodeFn","processTemplate","template","parameters","createTestFunction","indexOf","identity","getParameterInArray","array","callTemplate","computeLinks","processTags","pattern","parameterValues","allParameters","parameter","currentSpan","getParameterInAncestor","processedLinks","encodeURIComponent","_uniq","filter","getTraceLinks","validKeys","includes","computeTraceLink","WeakMap","ExternalLinks","TracePageHeader","TracePageHeaderTitleRow","TracePageHeaderBack","TracePageHeaderTitleLink","TracePageHeaderDetailToggle","TracePageHeaderDetailToggleExpanded","TracePageHeaderTitle","TracePageHeaderTitleCollapsible","TracePageHeaderOverviewItems","TracePageHeaderOverviewItemValueDetail","TracePageHeaderOverviewItemValue","TracePageHeaderArchiveIcon","TracePageHeaderTraceId","HEADER_ITEMS","renderer","timeZone","dateStr","dateTimeFormat","defaultWithMS","_values","processes","p","_maxBy","canCollapse","hideMap","hideSummary","onSlimViewClicked","slimView","traceGraphView","summaryItems","DetailState","oldState","toggleTags","next","toggleProcess","toggleReferences","toggleWarnings","toggleStackTraces","toggleLogs","toggleLogItem","delete","getProcessServiceName","proc","getSpanId","getSpanName","getSpanDuration","getSpanTimestamp","getSpanProcessId","processID","getSpanReferenceByType","getSpanServiceName","childOfRef","filterSpansForText","leftBound","rightBound","extract","original","getTextFilterdSpansAsMap","matchingSpans","textFilteredSpansMap","muted","TreeNode","static","child","walk","addChild","iterFunction","searchFunction","searchFn","getPath","findPath","currentNode","currentPath","attempt","nodeStack","actualDepth","nodeDepth","getTraceSpans","getTraceProcesses","getSpanWithProcess","getTraceSpansAsMap","getTraceSpanIdsAsTree","nodesById","spansById","root","parentID","comparator","nodeA","nodeB","sort","getTraceTimestamp","prevTimestamp","getTraceDuration","prevDuration","getParentSpan","tree","spanMap","spanA","spanB","numberSortComparator","itemA","itemB","getTraceServices","spanTree","services","DURATION_FORMATTERS","ms","targetDuration","moment","asMilliseconds","asSeconds","getDurationFormatterForTrace","totalDuration","getTraceSpansByHierarchyPosition","formatter","dir","selector","hierarchyPositionMap","collapsed","collapse","hiddenSpanIds","collapsedSpanId","id","interval","num","updatedSpan","deduplicateTags","spanTags","warningsHash","uniqueTags","t","values","orderTags","topPrefixes","orderedTags","tp","toLowerCase","bKey","startsWith","transformTraceData","traceEndTime","MAX_SAFE_INTEGER","spanIdCounts","idCount","_isEqual","svcCounts","tagsInfo","refSpan","numberOfSpans","filterSpans","includeFilters","excludeKeys","w","substr","isTextInFilters","filters","isTextInKeyValues","kvs","toString","getNonOverlappingDuration","ranges","acc","range","tail","prevStart","prevEnd","makeSpanMap","getSpan","parentId","parentIds","getStats","traceDuration","selfDuration","main","toFixedNoTrailingZeros","secondary","n","parseFloat","makeFrames","MutableDataFrame","Fields","FieldType","mode","meta","preferredVisualisationType","createTraceFrame","toSpanRow","parentSpanID","serviceTags","frame","custom","traceFormat","createTableFrame","instanceSettings","displayNameFromDS","internal","datasourceUid","uid","datasourceName","query","traceData","transformToTraceData","transformToJaeger","traceResponse","flags","total","offset","errors","exports","_extends","assign","source","_react2","_interopRequireDefault","_propTypes2","__esModule","default","IconBase","_ref2","_objectWithoutProperties","_ref2$reactIconBase","reactIconBase","computedSize","createElement","fill","preserveAspectRatio","verticalAlign","propTypes","string","oneOfType","contextTypes","shape","module","_reactIconBase2","viewBox","d","currentListeners","nextListeners","ensureCanMutateNextListeners","listen","listener","isSubscribed","emit","listeners","element","self","storeInstancesGlobally","directMap","sequenceLevels","resetTimer","ignoreNextKeyup","ignoreNextKeypress","nextExpectedAction","addEvents","instances","bindMultiple","unbind","reset","stopCallback","handleKey","bindSingle","getKeyInfo","pickBestAction","getReverseMap","getMatches","resetSequences","fireCallback","bindSequence","resetSequenceTimer","detach","REVERSE_MAP","on","eventHandler","action","combinations","j","combo","increaseSequence","nextAction","callbackAndReset","characterFromEvent","setTimeout","wrappedCallback","combination","sequenceName","level","info","sequence","modifiers","seq","off","capture","attachEvent","detachEvent","srcElement","SPECIAL_ALIASES","SHIFT_MAP","isModifier","keysFromString","character","modifiersMatch","matches","code","deleteCombo","deleteSequence","SPECIAL_KEYS_MAP","ignoreThisKeypress","doNotReset","maxLevel","processedSequenceCallback","eventModifiers","which","keyCode","modifiers1","modifiers2","clearTimeout","activeSequences","tagName","isContentEditable","combokeys","SPECIAL_CHARACTERS_MAP","fromCharCode","returnValue","navigator","platform","cancelBubble","deselectCurrent","clipboardToIE11Formatting","debug","reselectPrevious","selection","mark","success","createRange","getSelection","textContent","all","clip","whiteSpace","webkitUserSelect","MozUserSelect","msUserSelect","format","clipboardData","clearData","setData","onCopy","appendChild","selectNodeContents","addRange","execCommand","err","copyKey","userAgent","prompt","removeRange","removeAllRanges","removeChild","o","freeze","getOwnPropertyNames","prop","isFrozen","is","objA","objB","keysA","keysB","fuzzy","simpleFilter","opts","ch","patternIdx","len","totalScore","currScore","pre","post","compareString","caseSensitive","idx","Infinity","rendered","score","prev","compare","REACT_STATICS","childContextTypes","getDefaultProps","getDerivedStateFromProps","mixins","KNOWN_STATICS","caller","callee","arity","getOwnPropertySymbols","getOwnPropertyDescriptor","getPrototypeOf","objectPrototype","hoistNonReactStatics","targetComponent","sourceComponent","blacklist","inheritedComponent","descriptor","INDENT","Stylize","styleFile","cssClass","objRule","rule","escape","doc","indent","out","visit","toISOString","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","propName","componentName","location","propFullName","secret","getShim","isRequired","ReactPropTypes","bigint","bool","func","symbol","any","arrayOf","elementType","instanceOf","objectOf","oneOf","exact","checkPropTypes","PropTypes","Symbol","rangeCount","active","activeElement","getRangeAt","toUpperCase","blur","focus"],"sourceRoot":""}