mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-11 14:53:49 +00:00
2f86d4cf38
The commit contains the following changes: - Show vmui when requesting /graph page in order to be compatible with Prometheus datasource in Grafana. - Properly encode query args at vmui url. - Set the number of points on the graph to the number of horizontal pixels divided by 2. Previously it was hardcoded to 30. - Do not save server url to persistent storage at browser, since it should be always obtained from the url. - Run `make vmui-update` for updating vmui embedded into VictoriaMetrics.
1 line
No EOL
37 KiB
JavaScript
1 line
No EOL
37 KiB
JavaScript
(this.webpackJsonpvmui=this.webpackJsonpvmui||[]).push([[0],{340:function(e,t,n){},348:function(e,t,n){},350:function(e,t,n){"use strict";n.r(t);var a=n(2),c=n(0),r=n.n(c),i=n(24),o=n.n(i),s=(n(340),n(16)),l=n(423),u=n(421),j=Object(c.createContext)({showInfoMessage:function(){}}),d=function(){return Object(c.useContext)(j)},b=function(e){var t=e.children,n=Object(c.useState)({}),r=Object(s.a)(n,2),i=r[0],o=r[1],d=Object(c.useState)(!1),b=Object(s.a)(d,2),O=b[0],h=b[1],f=Object(c.useState)(void 0),x=Object(s.a)(f,2),p=x[0],v=x[1];Object(c.useEffect)((function(){p&&(o({message:p,key:(new Date).getTime()}),h(!0))}),[p]);return Object(a.jsxs)(j.Provider,{value:{showInfoMessage:v},children:[Object(a.jsx)(l.a,{open:O,autoHideDuration:4e3,onClose:function(e,t){"clickaway"!==t&&(v(void 0),h(!1))},children:Object(a.jsx)(u.a,{children:i.message})},i.key),t]})},O=n(413),h=n(403),f=n(417),x=n(92),p=n(391),v=n(405),m=n(384),y=n(386),g=n(387),S=n(426),E=n(207),w=n(184),T=n.n(w),A=n(13),C=n(12),_=n(62),k=n.n(_),R=n(181),U=n.n(R);k.a.extend(U.a);var D=window.screen.availWidth/2,M=[{long:"days",short:"d",possible:"day"},{long:"weeks",short:"w",possible:"week"},{long:"months",short:"M",possible:"mon"},{long:"years",short:"y",possible:"year"},{long:"hours",short:"h",possible:"hour"},{long:"minutes",short:"m",possible:"min"},{long:"seconds",short:"s",possible:"sec"},{long:"milliseconds",short:"ms",possible:"millisecond"}],I=M.map((function(e){return e.short})),N=function(e,t){var n=(t||new Date).valueOf()/1e3,a=e.trim().split(" ").reduce((function(e,t){var n=function(e){var t=e.match(/\d+/g),n=e.match(/[a-zA-Z]+/g);if(n&&t&&I.includes(n[0]))return Object(A.a)({},n[0],t[0])}(t);return n?Object(C.a)(Object(C.a)({},e),n):Object(C.a)({},e)}),{}),c=k.a.duration(a).asSeconds();return{start:n-c,end:n,step:Math.ceil(c/D),date:P(t||new Date)}},P=function(e){return k()(e).format("YYYY-MM-DD[T]HH:mm:ss")},L=function(e){return new Date(1e3*e)},H=function(e,t){t?window.localStorage.setItem(e,JSON.stringify({value:t})):F([e])},B=function(e){var t=window.localStorage.getItem(e);if(null!==t)try{var n;return null===(n=JSON.parse(t))||void 0===n?void 0:n.value}catch(a){return t}},F=function(e){return e.forEach((function(e){return window.localStorage.removeItem(e)}))},z=["BASIC_AUTH_DATA","BEARER_AUTH_DATA"],q=n(182),Y=n.n(q),Q=n(128),W=n.n(Q),G={query:"g0.expr","time.duration":"g0.range_input","time.period.date":"g0.end_input","time.period.step":"g0.step_input",stacked:"g0.stacked"},J=function(e){var t=new Map(Object.entries(G)),n=[];t.forEach((function(t,a){encodeURIComponent(t);var c=W()(e,a,"");if(c){var r=encodeURIComponent(c);n.push("".concat(t,"=").concat(r))}})),function(e){var t=window;if(t){var n="".concat(t.location.protocol,"//").concat(t.location.host).concat(t.location.pathname,"?").concat(e);t.history.pushState({path:n},"",n)}}(n.join("&"))},V=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.location.search,a=Y.a.parse(n,{ignoreQueryPrefix:!0});return W()(a,e,t||"")},Z=V("g0.range_input","1h"),K=V("g0.end_input",void 0),X={serverUrl:window.location.href.replace(/\/(?:prometheus\/)?(?:graph|vmui)\/.*/,"/prometheus/"),displayType:"chart",query:V("g0.expr",B("LAST_QUERY")||"\n"),time:{duration:Z,period:N(Z,K&&new Date(K))},queryControls:{autoRefresh:!1,autocomplete:B("AUTOCOMPLETE")||!1}};function $(e,t){switch(t.type){case"SET_DISPLAY_TYPE":return Object(C.a)(Object(C.a)({},e),{},{displayType:t.payload});case"SET_SERVER":return Object(C.a)(Object(C.a)({},e),{},{serverUrl:t.payload});case"SET_QUERY":return Object(C.a)(Object(C.a)({},e),{},{query:t.payload});case"SET_DURATION":return Object(C.a)(Object(C.a)({},e),{},{time:Object(C.a)(Object(C.a)({},e.time),{},{duration:t.payload,period:N(t.payload,L(e.time.period.end))})});case"SET_UNTIL":return Object(C.a)(Object(C.a)({},e),{},{time:Object(C.a)(Object(C.a)({},e.time),{},{period:N(e.time.duration,t.payload)})});case"SET_PERIOD":var n=function(e){var t=k.a.duration(e.to.valueOf()-e.from.valueOf());return["d","h","m","s"].map((function(e){return{val:t.get(e),str:e}})).filter((function(e){return 0!==e.val})).map((function(e){return"".concat(e.val).concat(e.str)})).join(" ")}(t.payload);return Object(C.a)(Object(C.a)({},e),{},{queryControls:Object(C.a)(Object(C.a)({},e.queryControls),{},{autoRefresh:!1}),time:Object(C.a)(Object(C.a)({},e.time),{},{duration:n,period:N(n,t.payload.to)})});case"TOGGLE_AUTOREFRESH":return Object(C.a)(Object(C.a)({},e),{},{queryControls:Object(C.a)(Object(C.a)({},e.queryControls),{},{autoRefresh:!e.queryControls.autoRefresh})});case"TOGGLE_AUTOCOMPLETE":return Object(C.a)(Object(C.a)({},e),{},{queryControls:Object(C.a)(Object(C.a)({},e.queryControls),{},{autocomplete:!e.queryControls.autocomplete})});case"RUN_QUERY":return Object(C.a)(Object(C.a)({},e),{},{time:Object(C.a)(Object(C.a)({},e.time),{},{period:N(e.time.duration,L(e.time.period.end))})});case"RUN_QUERY_TO_NOW":return Object(C.a)(Object(C.a)({},e),{},{time:Object(C.a)(Object(C.a)({},e.time),{},{period:N(e.time.duration)})});default:throw new Error}}var ee=Object(c.createContext)({}),te=function(){return Object(c.useContext)(ee).state},ne=function(){return Object(c.useContext)(ee).dispatch},ae=Object.entries(X).reduce((function(e,t){var n=Object(s.a)(t,2),a=n[0],c=n[1];return Object(C.a)(Object(C.a)({},e),{},Object(A.a)({},a,V(a)||c))}),{}),ce=function(e){var t=e.children,n=Object(c.useReducer)($,ae),r=Object(s.a)(n,2),i=r[0],o=r[1];Object(c.useEffect)((function(){J(i)}),[i]);var l=Object(c.useMemo)((function(){return{state:i,dispatch:o}}),[i,o]);return Object(a.jsx)(ee.Provider,{value:l,children:t})},re=function(e){return Object(a.jsxs)(f.a,{position:"relative",display:"inline-flex",children:[Object(a.jsx)(m.a,Object(C.a)({variant:"determinate"},e)),Object(a.jsx)(f.a,{top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",children:Object(a.jsx)(x.a,{variant:"caption",component:"div",children:"".concat(e.label,"s")})})]})},ie=n(385),oe=Object(ie.a)({colorizing:{color:"white"}}),se=function(){var e=oe(),t=ne(),n=te().queryControls.autoRefresh,i=Object(c.useState)(5),o=Object(s.a)(i,2),l=o[0],u=o[1],j=Object(c.useState)(),d=Object(s.a)(j,2),b=d[0],O=d[1],h=r.a.useState(100),x=Object(s.a)(h,2),p=x[0],v=x[1];Object(c.useEffect)((function(){var e;return n&&(O((new Date).valueOf()),e=setInterval((function(){O((new Date).valueOf()),t({type:"RUN_QUERY_TO_NOW"})}),1e3*l)),function(){e&&clearInterval(e)}}),[l,n]),Object(c.useEffect)((function(){var e=setInterval((function(){if(n&&b){var e=((new Date).valueOf()-b)/1e3,t=Math.floor(e/l*100);v(t)}}),16);return function(){clearInterval(e)}}),[n,b,l]);var m=function(){u((function(e){switch(e){case 1:return 2;case 2:return 5;case 5:return 1;default:return 5}}))};return Object(a.jsxs)(f.a,{display:"flex",alignItems:"center",children:[Object(a.jsx)(y.a,{control:Object(a.jsx)(g.a,{size:"small",className:e.colorizing,checked:n,onChange:function(){t({type:"TOGGLE_AUTOREFRESH"})}}),label:"Auto-refresh"}),n&&Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(re,{className:e.colorizing,label:l,value:p,onClick:function(){m()}}),Object(a.jsx)(S.a,{title:"Change delay refresh",children:Object(a.jsx)(f.a,{ml:1,children:Object(a.jsx)(E.a,{onClick:function(){m()},children:Object(a.jsx)(T.a,{style:{color:"white"}})})})})]})]})},le=n(187),ue=n.n(le),je=n(185),de=n.n(je),be=n(186),Oe=n.n(be),he=n(389),fe=n(430),xe=n(10),pe=Object(xe.a)({root:{padding:6,color:"white","&.Mui-selected":{color:"white"}}})(he.a),ve=function(){var e=te().displayType,t=ne();return Object(a.jsxs)(fe.a,{value:e,exclusive:!0,onChange:function(n,a){return t({type:"SET_DISPLAY_TYPE",payload:null!==a&&void 0!==a?a:e})},children:[Object(a.jsxs)(pe,{value:"chart","aria-label":"display as chart",children:[Object(a.jsx)(de.a,{}),"\xa0Query Range as Chart"]}),Object(a.jsxs)(pe,{value:"code","aria-label":"display as code",children:[Object(a.jsx)(Oe.a,{}),"\xa0Instant Query as JSON"]}),Object(a.jsxs)(pe,{value:"table","aria-label":"display as table",children:[Object(a.jsx)(ue.a,{}),"\xa0Instant Query as Table"]})]})},me=n(25),ye=n(27),ge=n(46),Se=n.n(ge),Ee=n(107),we=(n(348),n(188)),Te=function(e){var t=e.xScale,n=e.height,r=Object(c.useRef)(null);return Object(c.useEffect)((function(){Object(ye.o)(r.current).call(Object(ye.a)(t))}),[t]),Object(a.jsx)("g",{ref:r,className:"x axis",transform:"translate(0, ".concat(n,")")})},Ae=n(419),Ce=function(e){var t=Math.abs(e),n=".2~s";return t>0&&t<.001&&(n=".0e"),t>=.001&&t<1&&(n=".3~f"),Object(Ae.a)(n)(e)},_e=function(e){var t=e.yScale,n=e.label,r=Object(c.useRef)(null);return Object(c.useEffect)((function(){t&&Object(ye.o)(r.current).call(Object(ye.b)(t).tickFormat(Ce))}),[t]),Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)("g",{className:"y axis",ref:r}),n&&Object(a.jsx)("text",{style:{fontSize:"0.6rem"},transform:"translate(0,-2)",children:n})]})},ke=function(e){var t=e.height,n=e.x;return Object(a.jsx)(a.Fragment,{children:n&&Object(a.jsx)("line",{x1:n,y1:"0",x2:n,y2:t,stroke:"black",strokeDasharray:"4"})})},Re=function(e){var t=e.yScale,n=e.xScale,r=e.datesInChart,i=e.onInteraction,o=e.setSelection,l=Object(c.useRef)(null),u=Object(c.useState)(),j=Object(s.a)(u,2),d=j[0],b=j[1],O=Object(c.useState)(),h=Object(s.a)(O,2),f=h[0],x=h[1],p=Object(c.useState)(!1),v=Object(s.a)(p,2),m=v[0],y=v[1];function g(e){var t=e.selection;if(t){if(!e.sourceEvent)return;y(!0);var a=t.map((function(e){return n.invert(e)})),c=Object(s.a)(a,2),r=c[0],i=c[1];o(r,i),Object(ye.o)(l.current).call(E.move,null)}else y(!1)}var S=function(e){e.sourceEvent&&b(void 0)},E=Object(c.useMemo)((function(){return Object(ye.d)().extent([[0,0],[n.range()[1],t.range()[0]]]).on("end",g).on("start",S)}),[g,n,t]);return Object(c.useEffect)((function(){var e=Object(ye.c)((function(e){return e})).center;Object(ye.o)(l.current).on("touchmove mousemove",(function(t){var a=Object(ye.i)(t);m||(!function(t){var a=n.invert(t),c=e(r,a,1);b(c)}(a[0]),x(a[1]))})).on("mouseout",(function(){m||b(void 0)}))}),[n,r,m]),Object(c.useEffect)((function(){i(d,f)}),[d,f,i]),Object(c.useEffect)((function(){E&&n&&Object(ye.o)(l.current).call(E)}),[n,E]),Object(a.jsx)(a.Fragment,{children:Object(a.jsx)("g",{ref:l})})},Ue=n(390),De=Object(ie.a)((function(){return{wrapper:{maxWidth:"40vw"}}})),Me=function(e){var t=e.data,n=e.time,c=De();return Object(a.jsxs)(f.a,{px:1,className:c.wrapper,children:[Object(a.jsx)(f.a,{fontStyle:"italic",mb:.5,children:Object(a.jsx)(x.a,{variant:"subtitle1",children:"".concat(null===n||void 0===n?void 0:n.toLocaleDateString()," ").concat(null===n||void 0===n?void 0:n.toLocaleTimeString())})}),Object(a.jsx)(f.a,{mb:.5,my:1,children:Object(a.jsx)(x.a,{variant:"subtitle2",children:"Value: ".concat(new Intl.NumberFormat(void 0,{maximumFractionDigits:10}).format(t.value))})}),Object(a.jsx)(f.a,{children:Object(a.jsx)(x.a,{variant:"body2",children:t.metrics.map((function(e){var t=e.key,n=e.value;return Object(a.jsxs)(f.a,{component:"span",mb:.25,display:"flex",flexDirection:"row",alignItems:"center",children:[Object(a.jsxs)("span",{children:[t,":\xa0"]}),Object(a.jsx)("span",{style:{fontWeight:"bold"},children:n})]},t)}))})})]})},Ie=function(e){var t=e.series,n=e.timePresets,r=e.height,i=e.color,o=e.categories,l=Object(c.useState)(window.innerWidth),u=Object(s.a)(l,2),j=u[0],d=u[1],b=ne(),O=10,h=20,x=40,p=50,v=Object(c.useMemo)((function(){return j-p-h}),[j,p,h]),m=Object(c.useMemo)((function(){return r-O-x}),[O,x]),y=Object(c.useMemo)((function(){return Object(ye.m)().domain([n.start,n.end].map(L)).range([0,v])}),[v,n]),g=Object(c.useState)(!1),S=Object(s.a)(g,2),E=S[0],w=S[1],T=Object(c.useState)(),A=Object(s.a)(T,2),C=A[0],_=A[1],k=Object(c.useMemo)((function(){var e,n=t.reduce((function(e,t){return[].concat(Object(me.a)(e),Object(me.a)(t.values))}),[]).map((function(e){return e.value})),a=null!==(e=Object(ye.g)(n))&&void 0!==e?e:1,c=Object(ye.h)(n)||0;return Object(ye.k)().domain([c>0?0:c,a<0?0:a]).range([m,0]).nice()}),[t,m]),R=Object(c.useMemo)((function(){return Object(ye.f)().x((function(e){return y(L(e.key))})).y((function(e){return k(e.value||0)}))}),[y,k]),U=function(e){return R(e.values)},D=Object(c.useCallback)(function(){var e=Object(Ee.a)(Se.a.mark((function e(n,a){var c,r,i,o;return Se.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:"number"===typeof n?a&&t&&t[0]&&(c=k.invert(a),r=t.map((function(e){var t;return null===(t=e.values[n])||void 0===t?void 0:t.value})).reduce((function(e,t,n){var a=Math.abs(c-t);return a<e.delta&&(e={delta:a,index:n}),e}),{delta:1/0,index:0}),i=L(t[0].values[n].key),o=i.valueOf()<(y.domain()[1].valueOf()+y.domain()[0].valueOf())/2,_({date:i,xCoord:y(i),index:n,activeSeries:r.index,leftPart:o}),w(!0)):(w(!1),_(void 0));case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),[y,k,t]),M=Object(c.useMemo)((function(){return(null===C||void 0===C?void 0:C.activeSeries)?{value:t[C.activeSeries].values[C.index].value,metrics:o.map((function(e){return{key:e.key,value:t[C.activeSeries].metric[e.key]}}))}:void 0}),[C,t]),I=Object(c.useRef)(null),N=Object(c.useMemo)((function(){return t&&t[0]?t[0].values.map((function(e){return e.key})).map(L):[]}),[t]),P=function(e,t){b({type:"SET_PERIOD",payload:{from:e,to:t}})};return Object(a.jsx)(we.a,{bounds:!0,onResize:function(e){var t=e.bounds;return t&&d(null===t||void 0===t?void 0:t.width)},children:function(e){var n=e.measureRef;return Object(a.jsxs)("div",{ref:n,style:{width:"100%"},children:[I&&M&&Object(a.jsx)(Ue.a,{disableScrollLock:!0,style:{pointerEvents:"none"},id:"chart-tooltip-popover",open:E,anchorEl:I.current,anchorOrigin:{vertical:"top",horizontal:(null===C||void 0===C?void 0:C.leftPart)?20:-20},transformOrigin:{vertical:"top",horizontal:(null===C||void 0===C?void 0:C.leftPart)?"left":"right"},disableRestoreFocus:!0,children:Object(a.jsx)(f.a,{m:1,children:Object(a.jsx)(Me,{data:M,time:null===C||void 0===C?void 0:C.date})})}),Object(a.jsx)("svg",{width:"100%",height:r,children:Object(a.jsxs)("g",{transform:"translate(".concat(p,", ").concat(O,")"),children:[Object(a.jsx)("defs",{children:Object(a.jsx)("clipPath",{id:"clip-line",children:Object(a.jsx)("rect",{transform:"translate(0, -2)",width:y.range()[1]+4,height:k.range()[0]+2})})}),Object(a.jsx)(Te,{xScale:y,height:m}),Object(a.jsx)(_e,{yScale:k,label:""}),t.map((function(e,t){return Object(a.jsx)("path",{stroke:i(e.metadata.name),className:"line",style:{opacity:void 0!==(null===C||void 0===C?void 0:C.activeSeries)?t===(null===C||void 0===C?void 0:C.activeSeries)?1:.2:1},d:U(e),clipPath:"url(#clip-line)"},t)})),Object(a.jsx)("g",{ref:I,children:Object(a.jsx)(ke,{height:m,x:null===C||void 0===C?void 0:C.xCoord})}),Object(a.jsx)(Re,{xScale:y,yScale:k,datesInChart:N,onInteraction:D,setSelection:P})]})})]})}})},Ne=n(114),Pe=function(e){if(0===Object.keys(e.metric).length)return"Query result";var t=e.metric,n=t.__name__,a=Object(Ne.a)(t,["__name__"]);return"".concat(n||""," {").concat(Object.entries(a).map((function(e){return"".concat(e[0],": ").concat(e[1])})).join(", "),"}")},Le=n(422),He=Object(ie.a)({legendWrapper:{display:"grid",width:"100%",gridTemplateColumns:"repeat(auto-fit)",gridColumnGap:".5em",paddingLeft:"8px"}}),Be=function(e){var t=e.labels,n=e.onChange,r=e.categories,i=He(),o=Object(c.useMemo)((function(){return t.length>0?r.filter((function(e){return 1===e.variations})).map((function(e){return"".concat(e.key,": ").concat(t[0].labelData[e.key])})):[]}),[r,t]),s=Object(c.useMemo)((function(){return r.filter((function(e){return 1!==e.variations})).map((function(e){return e.key}))}),[r]);return Object(a.jsxs)("div",{children:[Object(a.jsx)("div",{style:{textAlign:"center"},children:"Legend for ".concat(o.join(", "))}),Object(a.jsx)("div",{className:i.legendWrapper,children:t.map((function(e,t){return Object(a.jsx)("div",{children:Object(a.jsx)(y.a,{control:Object(a.jsx)(Le.a,{size:"small",checked:e.checked,onChange:function(){n(t)},style:{color:e.color,padding:"4px"}}),label:Object(a.jsx)(x.a,{variant:"body2",children:s.map((function(t){return"".concat(t,": ").concat(e.labelData[t])})).join(", ")})})},e.seriesName)}))})]})},Fe=function(e){return Object(c.useMemo)((function(){var t={};return e.forEach((function(e){return Object.entries(e.metric).forEach((function(e){return t[e[0]]?t[e[0]].options.add(e[1]):t[e[0]]={options:new Set([e[1]])}}))})),Object.entries(t).map((function(e){return{key:e[0],variations:e[1].options.size}})).sort((function(e,t){return e.variations-t.variations}))}),[e])},ze=Object(ie.a)({inlineBtn:{"&:hover":{cursor:"pointer"}}}),qe=function(e){var t=e.handler,n=e.text,c=ze();return Object(a.jsx)(p.a,{component:"span",className:c.inlineBtn,onClick:t,children:n})},Ye=ye.n,Qe=function(e){var t=e.data,n=e.timePresets,r=Object(c.useState)(20),i=Object(s.a)(r,2),o=i[0],l=i[1],u=Object(c.useMemo)((function(){return null===t||void 0===t?void 0:t.map((function(e){return{metadata:{name:Pe(e)},metric:e.metric,values:e.values.map((function(e){return{key:e[0],value:+e[1]}}))}}))}),[t]),j=Object(c.useMemo)((function(){return u.slice(0,o)}),[u,o]),d=Fe(t),b=Object(c.useMemo)((function(){return j.map((function(e){return e.metadata.name}))}),[j]),O=Object(c.useState)(b),h=Object(s.a)(O,2),f=h[0],x=h[1];Object(c.useEffect)((function(){f.join(",")!==b.join(",")&&x(b)}),[b,x,f]);var p=Object(c.useMemo)((function(){return u.length}),[u]),v=Object(c.useMemo)((function(){var e=f.length,t=e<=Ye.length?Ye:Object(ye.j)(e).map((function(t){return t/e})).map(ye.e);return Object(ye.l)().domain(f).range(t)}),[f]),m=Object(c.useMemo)((function(){return f.map((function(e){var t;return{color:v(e),seriesName:e,labelData:null===(t=j.find((function(t){return t.metadata.name===e})))||void 0===t?void 0:t.metric,checked:!0}}))}),[v,f]),y=Object(c.useState)(m),g=Object(s.a)(y,2),S=g[0],E=g[1];Object(c.useEffect)((function(){E(m)}),[m]);var w=Object(c.useMemo)((function(){return S.filter((function(e){return e.checked})).map((function(e){return e.seriesName}))}),[S]),T=Object(c.useMemo)((function(){return j.filter((function(e){return w.includes(e.metadata.name)}))}),[j,w]);return Object(a.jsx)(a.Fragment,{children:p>0?Object(a.jsxs)(a.Fragment,{children:[p>20&&Object(a.jsx)("div",{style:{textAlign:"center"},children:p>o?Object(a.jsxs)("span",{style:{fontStyle:"italic"},children:["Showing only first ",o," of ",p," series.\xa0",o+20>=p?Object(a.jsx)(qe,{handler:function(){return l(p)},text:"Show all"}):Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(qe,{handler:function(){return l((function(e){return Math.min(e+20,p)}))},text:"Show ".concat(20," more")}),",\xa0",Object(a.jsx)(qe,{handler:function(){return l(p)},text:"show all"}),"."]})]}):Object(a.jsxs)("span",{style:{fontStyle:"italic"},children:["Showing all series.\xa0",Object(a.jsx)(qe,{handler:function(){return l(20)},text:"Show only ".concat(20)}),"."]})}),Object(a.jsx)(Ie,{height:400,series:T,color:v,timePresets:n,categories:d}),Object(a.jsx)(Be,{labels:S,onChange:function(e){E((function(t){if(t){var n=Object(me.a)(t);return n[e]=Object(C.a)(Object(C.a)({},n[e]),{},{checked:!n[e].checked}),n}return t}))},categories:d})]}):Object(a.jsx)("div",{style:{textAlign:"center"},children:"No data to show"})})},We=n(392),Ge=n(205),Je=n(393),Ve=n(394),Ze=n(395),Ke=n(396),Xe=n(397),$e=Object(ie.a)({deemphasized:{opacity:.4}}),et=function(e){var t=e.data,n=$e(),r=Fe(t),i=Object(c.useMemo)((function(){return null===t||void 0===t?void 0:t.map((function(e){return{metadata:r.map((function(t){return e.metric[t.key]||"-"})),value:e.value[1]}}))}),[r,t]);return Object(a.jsx)(a.Fragment,{children:i.length>0?Object(a.jsx)(We.a,{component:Ge.a,children:Object(a.jsxs)(Je.a,{"aria-label":"simple table",children:[Object(a.jsx)(Ve.a,{children:Object(a.jsxs)(Ze.a,{children:[r.map((function(e,t){return Object(a.jsx)(Ke.a,{style:{textTransform:"capitalize"},children:e.key},t)})),Object(a.jsx)(Ke.a,{align:"right",children:"Value"})]})}),Object(a.jsx)(Xe.a,{children:i.map((function(e,t){return Object(a.jsxs)(Ze.a,{children:[e.metadata.map((function(e,c){var r=i[t-1]&&i[t-1].metadata[c];return Object(a.jsx)(Ke.a,{className:r===e?n.deemphasized:void 0,children:e},c)})),Object(a.jsx)(Ke.a,{align:"right",children:e.value})]},t)}))})]})}):Object(a.jsx)("div",{style:{textAlign:"center"},children:"No data to show"})})},tt=n(424),nt=n(411),at=n(412),ct=n(408),rt=n(418),it=n(3),ot=n(9),st=n(110),lt=n(201),ut=n(202),jt={windows:"Windows",mac:"Mac OS",linux:"Linux"},dt=function(){return(Object.values(jt).find((function(e){return navigator.userAgent.indexOf(e)>=0}))||"unknown")===jt.mac},bt=function(e){var t=e.query,n=e.setQuery,r=e.runQuery,i=e.server,o=e.oneLiner,l=void 0!==o&&o,u=e.autocomplete,j=Object(c.useRef)(null),d=Object(c.useState)(),b=Object(s.a)(d,2),O=b[0],h=b[1];return Object(c.useEffect)((function(){return j.current&&h(new ot.d({parent:j.current})),function(){return null===O||void 0===O?void 0:O.destroy()}}),[]),Object(c.useEffect)((function(){var e=new lt.a;e.activateCompletion(u),e.setComplete({url:i});var a=ot.d.updateListener.of((function(e){e.docChanged&&n(e.state.doc.toJSON().map((function(e){return e.trim()})).join(""))}));null===O||void 0===O||O.setState(it.e.create({doc:t,extensions:[ut.a,Object(ot.k)(st.a),a,e.asExtension(),Object(ot.k)([{key:dt()?"Cmd-Enter":"Ctrl-Enter",run:function(){return r(),!0}}])]}))}),[i,O,u]),Object(a.jsx)(a.Fragment,{children:Object(a.jsx)("div",{ref:j,className:l?"one-line-scroll":void 0})})},Ot=n(416),ht=function(){return Object(a.jsx)(We.a,{component:Ge.a,children:Object(a.jsxs)(Je.a,{"aria-label":"simple table",size:"small",children:[Object(a.jsx)(Ve.a,{children:Object(a.jsxs)(Ze.a,{children:[Object(a.jsx)(Ke.a,{children:"Long"}),Object(a.jsx)(Ke.a,{children:"Short"})]})}),Object(a.jsx)(Xe.a,{children:M.map((function(e,t){return Object(a.jsxs)(Ze.a,{children:[Object(a.jsx)(Ke.a,{component:"th",scope:"row",children:e.long}),Object(a.jsx)(Ke.a,{children:e.short})]},t)}))})]})})},ft=function(e){var t=e.setDuration,n=Object(c.useState)(!1),i=Object(s.a)(n,2),o=i[0],l=i[1],u=r.a.useState(null),j=Object(s.a)(u,2),d=j[0],b=j[1],O=Object(c.useState)(),h=Object(s.a)(O,2),p=h[0],v=h[1],m=te().time,y=m.period.end,g=m.duration,S=ne(),E=Object(c.useState)(g),w=Object(s.a)(E,2),T=w[0],A=w[1];Object(c.useEffect)((function(){A(g)}),[g]),Object(c.useEffect)((function(){v(P(L(y)))}),[y]),Object(c.useEffect)((function(){o||t(T)}),[T,o]);var C=function(){b(null)},_=Boolean(d);return Object(a.jsxs)(f.a,{m:1,flexDirection:"row",display:"flex",children:[Object(a.jsxs)(f.a,{px:1,children:[Object(a.jsx)(f.a,{children:Object(a.jsx)(rt.a,{label:"Duration",value:T,onChange:function(e){A(e.target.value)},fullWidth:!0,onBlur:function(){l(!1)},onFocus:function(){l(!0)}})}),Object(a.jsx)(f.a,{my:2,children:Object(a.jsxs)(x.a,{variant:"body2",children:["Possible options",Object(a.jsx)("span",{"aria-owns":_?"mouse-over-popover":void 0,"aria-haspopup":"true",style:{cursor:"pointer"},onMouseEnter:function(e){b(e.currentTarget)},onMouseLeave:C,children:":\xa0"}),Object(a.jsx)(Ue.a,{open:_,anchorEl:d,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},style:{pointerEvents:"none"},onClose:C,disableRestoreFocus:!0,children:Object(a.jsx)(ht,{})}),Object(a.jsx)(qe,{handler:function(){return A("5m")},text:"5m"}),",\xa0",Object(a.jsx)(qe,{handler:function(){return A("1h")},text:"1h"}),",\xa0",Object(a.jsx)(qe,{handler:function(){return A("1h 30m")},text:"1h 30m"})]})})]}),Object(a.jsxs)(f.a,{px:1,children:[Object(a.jsx)(f.a,{children:Object(a.jsx)(Ot.a,{variant:"inline",ampm:!1,label:"Until",value:p,onChange:function(e){return S({type:"SET_UNTIL",payload:e})},onError:console.log,format:"DD/MM/YYYY HH:mm:ss"})}),Object(a.jsx)(f.a,{my:2,children:Object(a.jsxs)(x.a,{variant:"body2",children:["Will be changed to current time for auto-refresh mode.\xa0",Object(a.jsx)(qe,{handler:function(){return S({type:"RUN_QUERY_TO_NOW"})},text:"Switch to now"})]})})]})]})},xt=n(192),pt=n.n(xt),vt=n(194),mt=n.n(vt),yt=n(409),gt=n(429),St=n(428),Et=n(406),wt=n(410),Tt=n(420),At=n(401),Ct=n(399),_t=n(427),kt=n(398),Rt=n(404),Ut=n(400),Dt=n(407),Mt=n(402),It=function(e){var t=e.children,n=e.value,c=e.index,r=Object(Ne.a)(e,["children","value","index"]);return Object(a.jsx)("div",Object(C.a)(Object(C.a)({role:"tabpanel",hidden:n!==c,id:"auth-config-tabpanel-".concat(c),"aria-labelledby":"auth-config-tab-".concat(c)},r),{},{children:n===c&&Object(a.jsx)(f.a,{py:2,children:t})}))},Nt=n(190),Pt=n.n(Nt),Lt=n(191),Ht=n.n(Lt),Bt={authMethod:"NO_AUTH",saveAuthLocally:!1},Ft=B("AUTH_TYPE"),zt=B("BASIC_AUTH_DATA"),qt=B("BEARER_AUTH_DATA"),Yt=Object(C.a)(Object(C.a)({},Bt),{},{authMethod:Ft||Bt.authMethod,basicData:zt,bearerData:qt,saveAuthLocally:!(!zt&&!qt)}),Qt=function(){F(z)};function Wt(e,t){switch(t.type){case"SET_BASIC_AUTH":return t.payload.checkbox?H("BASIC_AUTH_DATA",t.payload.value):Qt(),H("AUTH_TYPE","BASIC_AUTH"),Object(C.a)(Object(C.a)({},e),{},{authMethod:"BASIC_AUTH",basicData:t.payload.value});case"SET_BEARER_AUTH":return t.payload.checkbox?H("BEARER_AUTH_DATA",t.payload.value):Qt(),H("AUTH_TYPE","BEARER_AUTH"),Object(C.a)(Object(C.a)({},e),{},{authMethod:"BEARER_AUTH",bearerData:t.payload.value});case"SET_NO_AUTH":return!t.payload.checkbox&&Qt(),H("AUTH_TYPE","NO_AUTH"),Object(C.a)(Object(C.a)({},e),{},{authMethod:"NO_AUTH"});default:throw new Error}}var Gt=Object(c.createContext)({}),Jt=function(){return Object(c.useContext)(Gt).state},Vt=function(e){var t=e.children,n=Object(c.useReducer)(Wt,Yt),r=Object(s.a)(n,2),i=r[0],o=r[1],l=Object(c.useMemo)((function(){return{state:i,dispatch:o}}),[i,o]);return Object(a.jsx)(Gt.Provider,{value:l,children:t})},Zt=Object(ie.a)((function(){return Object(St.a)({tabsContent:{height:"200px"}})})),Kt="Bearer ",Xt=[{title:"No auth",id:"NO_AUTH"},{title:"Basic Auth",id:"BASIC_AUTH"},{title:"Bearer Token",id:"BEARER_AUTH"}],$t=function(e){var t=Zt(),n=e.onClose,r=e.open,i=Jt(),o=i.saveAuthLocally,l=i.basicData,u=i.bearerData,j=i.authMethod,d=Object(c.useContext)(Gt).dispatch,b=Object(c.useState)(o),O=Object(s.a)(b,2),h=O[0],p=O[1],v=Object(c.useState)(l||{password:"",login:""}),m=Object(s.a)(v,2),g=m[0],S=m[1],E=Object(c.useState)((null===u||void 0===u?void 0:u.token)||Kt),w=Object(s.a)(E,2),T=w[0],A=w[1],_=Object(c.useState)(Xt.findIndex((function(e){return e.id===j}))||0),k=Object(s.a)(_,2),R=k[0],U=k[1],D=function(){n()};return Object(a.jsxs)(gt.a,{onClose:D,"aria-labelledby":"simple-dialog-title",open:r,children:[Object(a.jsx)(yt.a,{id:"simple-dialog-title",children:"Request Auth Settings"}),Object(a.jsxs)(Et.a,{children:[Object(a.jsx)(wt.a,{children:"This affects Authorization header sent to the server you specify. Not shown in URL and can be optionally stored on a client side"}),Object(a.jsx)(Tt.a,{value:R,onChange:function(e,t){U(t)},indicatorColor:"primary",textColor:"primary",children:Xt.map((function(e){return Object(a.jsx)(At.a,{label:e.title},e.id)}))}),Object(a.jsxs)(f.a,{p:0,display:"flex",flexDirection:"column",className:t.tabsContent,children:[Object(a.jsxs)(f.a,{flexGrow:1,children:[Object(a.jsx)(It,{value:R,index:0,children:Object(a.jsx)(x.a,{style:{fontStyle:"italic"},children:"No Authorization Header"})}),Object(a.jsxs)(It,{value:R,index:1,children:[Object(a.jsxs)(Ct.a,{margin:"dense",fullWidth:!0,children:[Object(a.jsx)(_t.a,{htmlFor:"basic-login",children:"User"}),Object(a.jsx)(kt.a,{id:"basic-login",startAdornment:Object(a.jsx)(Rt.a,{position:"start",children:Object(a.jsx)(Pt.a,{})}),required:!0,onChange:function(e){return S((function(t){return Object(C.a)(Object(C.a)({},t),{},{login:e.target.value||""})}))},value:(null===g||void 0===g?void 0:g.login)||""})]}),Object(a.jsxs)(Ct.a,{margin:"dense",fullWidth:!0,children:[Object(a.jsx)(_t.a,{htmlFor:"basic-pass",children:"Password"}),Object(a.jsx)(kt.a,{id:"basic-pass",startAdornment:Object(a.jsx)(Rt.a,{position:"start",children:Object(a.jsx)(Ht.a,{})}),onChange:function(e){return S((function(t){return Object(C.a)(Object(C.a)({},t),{},{password:e.target.value||""})}))},value:(null===g||void 0===g?void 0:g.password)||""})]})]}),Object(a.jsx)(It,{value:R,index:2,children:Object(a.jsx)(rt.a,{id:"bearer-auth",label:"Bearer token",multiline:!0,fullWidth:!0,value:T,onChange:function(e){var t=e.target.value;t.startsWith(Kt)?A(t):A(Kt)},InputProps:{onPaste:function(e){var t=e.clipboardData.getData("text/plain");t.startsWith(Kt)?A(t):A(Kt+t),e.preventDefault()}},rowsMax:6})})]}),Object(a.jsxs)(Ct.a,{children:[Object(a.jsx)(y.a,{control:Object(a.jsx)(Le.a,{checked:h,onChange:function(){return p((function(e){return!e}))},name:"checkedB",color:"primary"}),label:"Persist Auth Data Locally"}),Object(a.jsx)(Ut.a,{children:h?"Auth Data and the Selected method will be saved to LocalStorage":"Auth Data won't be saved. All previously saved Auth Data will be removed"})]})]})]}),Object(a.jsx)(Dt.a,{children:Object(a.jsx)(Mt.a,{onClick:function(){switch(R){case 0:d({type:"SET_NO_AUTH",payload:{checkbox:h}});break;case 1:d({type:"SET_BASIC_AUTH",payload:{checkbox:h,value:g}});break;case 2:d({type:"SET_BEARER_AUTH",payload:{checkbox:h,value:{token:T}}})}D()},color:"primary",children:"Apply"})})]})},en=n(193),tn=n.n(en),nn=n(388),an=n(195),cn=n.n(an),rn=function(){var e=te(),t=e.serverUrl,n=e.query,r=e.time.duration,i=ne(),o=te().queryControls.autocomplete,l=Object(c.useState)(!1),u=Object(s.a)(l,2),j=u[0],d=u[1],b=Object(c.useState)(!0),O=Object(s.a)(b,2),h=O[0],p=O[1],v=Object(c.useState)(!1),m=Object(s.a)(v,2),w=m[0],T=m[1],A=Object(c.useRef)(null),C=Object(c.useRef)(null),_=function(){return i({type:"RUN_QUERY"})};return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)(tt.a,{expanded:h,onChange:function(){return p((function(e){return!e}))},children:[Object(a.jsxs)(nt.a,{expandIcon:Object(a.jsx)(pt.a,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:[Object(a.jsx)(f.a,{mr:2,children:Object(a.jsx)(x.a,{variant:"h6",component:"h2",children:"Query Configuration"})}),Object(a.jsx)(f.a,{flexGrow:1,onClick:function(e){return e.stopPropagation()},onFocusCapture:function(e){return e.stopPropagation()},children:Object(a.jsx)(nn.a,{disablePortal:!h,container:C.current,children:Object(a.jsx)(bt,{server:t,query:n,oneLiner:!h,autocomplete:o,runQuery:_,setQuery:function(e){return i({type:"SET_QUERY",payload:e})}})})})]}),Object(a.jsx)(at.a,{children:Object(a.jsxs)(ct.a,{container:!0,spacing:2,children:[Object(a.jsx)(ct.a,{item:!0,xs:12,md:6,children:Object(a.jsxs)(f.a,{children:[Object(a.jsxs)(f.a,{py:2,display:"flex",alignItems:"center",children:[Object(a.jsx)(rt.a,{variant:"outlined",fullWidth:!0,label:"Server URL",value:t,inputProps:{style:{fontFamily:"Monospace"}},onChange:function(e){var t=e.target.value;i({type:"SET_SERVER",payload:t})}}),Object(a.jsx)(f.a,{ml:1,children:Object(a.jsx)(S.a,{title:"Execute Query",children:Object(a.jsx)(E.a,{onClick:_,children:Object(a.jsx)(tn.a,{})})})}),Object(a.jsx)(f.a,{children:Object(a.jsx)(S.a,{title:"Request Auth Settings",children:Object(a.jsx)(E.a,{onClick:function(){return d(!0)},children:Object(a.jsx)(mt.a,{})})})})]}),Object(a.jsxs)(f.a,{py:2,display:"flex",children:[Object(a.jsx)(f.a,{flexGrow:1,mr:2,children:Object(a.jsx)("div",{ref:C})}),Object(a.jsxs)("div",{children:[Object(a.jsx)(S.a,{title:"Query Editor Settings",children:Object(a.jsx)(E.a,{onClick:function(){return T(!w)},children:Object(a.jsx)(cn.a,{ref:A})})}),Object(a.jsx)(Ue.a,{open:w,transformOrigin:{vertical:-20,horizontal:"left"},onClose:function(){return T(!1)},anchorEl:A.current,children:Object(a.jsx)(f.a,{p:2,children:Object(a.jsx)(y.a,{control:Object(a.jsx)(g.a,{size:"small",checked:o,onChange:function(){i({type:"TOGGLE_AUTOCOMPLETE"}),H("AUTOCOMPLETE",!o)}}),label:"Autocomplete"})})})]})]})]})}),Object(a.jsx)(ct.a,{item:!0,xs:8,md:6,children:Object(a.jsx)(f.a,{style:{borderRadius:"4px",borderColor:"#b9b9b9",borderStyle:"solid",borderWidth:"1px",height:"calc(100% - 18px)",marginTop:"16px"},children:Object(a.jsx)(ft,{setDuration:function(e){return i({type:"SET_DURATION",payload:e})},duration:r})})})]})})]}),Object(a.jsx)($t,{open:j,onClose:function(){return d(!1)}})]})},on=function(){var e=te(),t=e.query,n=e.displayType,a=e.serverUrl,r=e.time.period,i=Jt(),o=i.basicData,l=i.bearerData,u=i.authMethod,j=Object(c.useState)(!1),d=Object(s.a)(j,2),b=d[0],O=d[1],h=Object(c.useState)(),f=Object(s.a)(h,2),x=f[0],p=f[1],v=Object(c.useState)(),m=Object(s.a)(v,2),y=m[0],g=m[1],S=Object(c.useState)(),E=Object(s.a)(S,2),w=E[0],T=E[1];Object(c.useEffect)((function(){w&&(p(void 0),g(void 0))}),[w]);var A=Object(c.useMemo)((function(){if(r){if(!a)return void T("Please enter Server URL");if(!t.trim())return void T("Please enter a valid Query and execute it");if(function(e){var t;try{t=new URL(e)}catch(n){return!1}return"http:"===t.protocol||"https:"===t.protocol}(a))return"chart"===n?function(e,t,n){return"".concat(e,"/api/v1/query_range?query=").concat(encodeURIComponent(t),"&start=").concat(n.start,"&end=").concat(n.end,"&step=").concat(n.step)}(a,t,r):function(e,t,n){return"".concat(e,"/api/v1/query?query=").concat(encodeURIComponent(t),"&start=").concat(n.start,"&end=").concat(n.end,"&step=").concat(n.step)}(a,t,r);T("Please provide a valid URL")}}),[a,r,n]);return Object(c.useEffect)((function(){Object(Ee.a)(Se.a.mark((function e(){var a,c,r,i;return Se.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!A){e.next=32;break}return a=new Headers,"BASIC_AUTH"===u&&a.set("Authorization","Basic "+btoa("".concat((null===o||void 0===o?void 0:o.login)||"",":").concat((null===o||void 0===o?void 0:o.password)||""))),"BEARER_AUTH"===u&&a.set("Authorization",(null===l||void 0===l?void 0:l.token)||""),O(!0),e.next=7,fetch(A,{headers:a});case 7:if(!(c=e.sent).ok){e.next=17;break}return H("LAST_QUERY",t),e.next=12,c.json();case 12:r=e.sent,T(void 0),"chart"===n?p(r.data.result):g(r.data.result),e.next=31;break;case 17:return e.t0=T,e.next=20,c.json();case 20:if(e.t2=i=e.sent,e.t1=null===e.t2,e.t1){e.next=24;break}e.t1=void 0===i;case 24:if(!e.t1){e.next=28;break}e.t3=void 0,e.next=29;break;case 28:e.t3=i.error;case 29:e.t4=e.t3,(0,e.t0)(e.t4);case 31:O(!1);case 32:case"end":return e.stop()}}),e)})))()}),[A,a,n]),{fetchUrl:A,isLoading:b,graphData:x,liveData:y,error:w}},sn=function(e){var t=e.data,n=d().showInfoMessage,r=Object(c.useMemo)((function(){return JSON.stringify(t,null,2)}),[t]);return Object(a.jsxs)(f.a,{position:"relative",children:[Object(a.jsx)(f.a,{flexDirection:"column",justifyContent:"flex-end",display:"flex",style:{position:"fixed",right:"16px"},children:Object(a.jsx)(Mt.a,{variant:"outlined",onClick:function(e){navigator.clipboard.writeText(r),n("Formatted JSON has been copied"),e.preventDefault()},children:"Copy JSON"})}),Object(a.jsx)("pre",{children:r})]})},ln=n(196),un=n.n(ln),jn=function(e){var t=e.url,n=d().showInfoMessage;return Object(a.jsx)(f.a,{pl:2,py:1,flexShrink:0,display:"flex",children:Object(a.jsx)(S.a,{title:"Copy Query URL",children:Object(a.jsx)(E.a,{size:"small",onClick:function(e){t&&(navigator.clipboard.writeText(t),n("Value has been copied"),e.preventDefault())},children:Object(a.jsx)(un.a,{style:{color:"white"}})})})})},dn=function(){var e=te(),t=e.displayType,n=e.time.period,c=on(),r=c.fetchUrl,i=c.isLoading,o=c.liveData,s=c.graphData,l=c.error;return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(O.a,{position:"static",children:Object(a.jsxs)(h.a,{children:[Object(a.jsxs)(f.a,{display:"flex",children:[Object(a.jsxs)(x.a,{variant:"h5",children:[Object(a.jsx)("span",{style:{fontWeight:"bolder"},children:"VM"}),Object(a.jsx)("span",{style:{fontWeight:"lighter"},children:"UI"})]}),Object(a.jsx)("div",{style:{fontSize:"10px",marginTop:"-2px"},children:Object(a.jsx)("div",{children:"BETA"})})]}),Object(a.jsx)("div",{style:{fontSize:"10px",position:"absolute",top:"40px",opacity:".4"},children:Object(a.jsx)(p.a,{color:"inherit",href:"https://github.com/VictoriaMetrics/vmui/issues/new",target:"_blank",children:"Create an issue"})}),Object(a.jsx)(f.a,{ml:4,flexGrow:1,children:Object(a.jsx)(se,{})}),Object(a.jsx)(ve,{}),Object(a.jsx)(jn,{url:r})]})}),Object(a.jsxs)(f.a,{display:"flex",flexDirection:"column",style:{minHeight:"calc(100vh - 64px)"},children:[Object(a.jsx)(f.a,{m:2,children:Object(a.jsx)(rn,{})}),Object(a.jsxs)(f.a,{flexShrink:1,children:[i&&Object(a.jsx)(v.a,{in:i,style:{transitionDelay:i?"300ms":"0ms"},children:Object(a.jsx)(f.a,{alignItems:"center",flexDirection:"column",display:"flex",style:{width:"100%",maxWidth:"calc(100vh - 32px)",position:"absolute",height:"150px",background:"linear-gradient(rgba(255,255,255,.7), rgba(255,255,255,.7), rgba(255,255,255,0))"},m:2,children:Object(a.jsx)(m.a,{})})}),Object(a.jsxs)(f.a,{p:2,children:[l&&Object(a.jsx)(u.a,{color:"error",style:{fontSize:"14px"},children:l}),s&&n&&"chart"===t&&Object(a.jsx)(Qe,{data:s,timePresets:n}),o&&"code"===t&&Object(a.jsx)(sn,{data:o}),o&&"table"===t&&Object(a.jsx)(et,{data:o})]})]})]})]})},bn=n(200),On=n(415),hn=n(414),fn=n(31),xn=n(197),pn=function(){var e=Object(bn.a)({typography:{fontSize:10}});return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(hn.a,{})," ",Object(a.jsxs)(fn.a,{utils:xn.a,children:[" ",Object(a.jsxs)(On.a,{theme:e,children:[" ",Object(a.jsxs)(ce,{children:[" ",Object(a.jsxs)(Vt,{children:[" ",Object(a.jsxs)(b,{children:[" ",Object(a.jsx)(dn,{})]})]})]})]})]})]})},vn=function(e){e&&e instanceof Function&&n.e(3).then(n.bind(null,432)).then((function(t){var n=t.getCLS,a=t.getFID,c=t.getFCP,r=t.getLCP,i=t.getTTFB;n(e),a(e),c(e),r(e),i(e)}))};o.a.render(Object(a.jsx)(r.a.StrictMode,{children:Object(a.jsx)(pn,{})}),document.getElementById("root")),vn()}},[[350,1,2]]]); |