{ia(void 0),Da(0),Oa(1)},[ia,Oa,Da]);function os(){ir(void 0)}(0,o.useEffect)(()=>{Zs(),os()},[Rt,Zs]);const is=(0,o.useCallback)(qs=>{sa===qs?Jn(""):(qt?.(qs),Jn(qs),Zs())},[Jn,Zs,qt,sa]);if(!as)return null;const Ls=o.createElement(Ge,{data:as,rangeMin:Xn,rangeMax:ba,matchedLabels:cr,setRangeMin:Da,setRangeMax:Oa,onItemFocused:qs=>ia(qs),focusedItemData:pa,textAlign:Ns,sandwichItem:Ps,onSandwich:qs=>{Zs(),ir(qs)},onFocusPillClick:Zs,onSandwichPillClick:os,colorScheme:ar,showFlameGraphOnly:Ln,collapsing:!na}),ks=o.createElement(pn,{data:as,onSymbolClick:is,search:sa,matchedLabels:cr,sandwichItem:Ps,onSandwich:ir,onSearch:Jn,onTableSort:mn});let Pr;return Ln||Va===N.F8.FlameGraph?Pr=Ls:Va===N.F8.TopTable?Pr=o.createElement("div",{className:Is.tableContainer},ks):Va===N.F8.Both&&(Mn?Pr=o.createElement("div",null,o.createElement("div",{className:Is.verticalGraphContainer},Ls),o.createElement("div",{className:Is.verticalTableContainer},ks)):Pr=o.createElement("div",{className:Is.horizontalContainer},o.createElement("div",{className:Is.horizontalTableContainer},ks),o.createElement("div",{className:Is.horizontalGraphContainer},Ls))),o.createElement(r.D.Provider,{value:Cs},o.createElement("div",{ref:Ds,className:Is.container},!Ln&&o.createElement(pt,{search:sa,setSearch:Jn,selectedView:Va,setSelectedView:qs=>{ts(qs),gn?.(qs)},containerWidth:Ms,onReset:()=>{Zs(),os()},textAlign:Ns,onTextAlignChange:qs=>{cs(qs),Cn?.(qs)},showResetButton:!!(pa||Ps),colorScheme:ar,onColorSchemeChange:lr,stickyHeader:!!Tn,extraHeaderElements:$n,vertical:Mn,isDiffMode:!!as.isDiffFlamegraph()}),o.createElement("div",{className:Is.body},Pr)))};function fn(Rt){const qt=Rt?.isDiffFlamegraph()?N.yU.Default:N.zM.PackageBased,[gn,Cn]=(0,o.useState)(qt);return(0,o.useEffect)(()=>{Cn(qt)},[qt]),[gn,Cn]}function An(Rt,qt){return(0,o.useMemo)(()=>{if(Rt&&qt){const gn=new Set;let Cn=on.filter(qt.getUniqueLabels(),Rt);if(Cn)for(let mn of Cn)gn.add(qt.getUniqueLabels()[mn]);return gn}},[Rt,qt])}function hn(Rt){return{container:(0,t.css)({label:"container",overflow:"auto",height:"100%",display:"flex",flex:"1 1 0",flexDirection:"column",minHeight:0,gap:Rt.spacing(1)}),body:(0,t.css)({label:"body",flexGrow:1}),tableContainer:(0,t.css)({height:800}),horizontalContainer:(0,t.css)({label:"horizontalContainer",display:"flex",minHeight:0,flexDirection:"row",columnGap:Rt.spacing(1),width:"100%"}),horizontalGraphContainer:(0,t.css)({flexBasis:"50%"}),horizontalTableContainer:(0,t.css)({flexBasis:"50%",maxHeight:800}),verticalGraphContainer:(0,t.css)({marginBottom:Rt.spacing(1)}),verticalTableContainer:(0,t.css)({height:800})}}const ca=Xt},5546:(Q,A,e)=>{"use strict";e.d(A,{F8:()=>n,Zk:()=>t,yU:()=>s,zM:()=>o});var t=(r=>(r.Bytes="bytes",r.Short="short",r.Nanoseconds="ns",r))(t||{}),n=(r=>(r.TopTable="topTable",r.FlameGraph="flameGraph",r.Both="both",r))(n||{}),o=(r=>(r.ValueBased="valueBased",r.PackageBased="packageBased",r))(o||{}),s=(r=>(r.Default="default",r.DiffColorBlind="diffColorBlind",r))(s||{})},20323:(Q,A,e)=>{"use strict";e.d(A,{e:()=>u});var t=e(96540),n=e(40996),o=e(14186),s=e(10354);const r=/^(-?\d+(?:\.\d+)?)(ms|[Mwdhmsy])$/,g=(c,i)=>!(c.match(i)||!c),u=c=>{const i=c.validationRegex||r,[l,f]=(0,t.useState)(()=>c.value?g(c.value,i):!1);(0,n.A)(()=>{f(g(c.value,i))},500,[c.value]);const d={labelWidth:26,disabled:c.disabled??!1,invalid:l,error:c.isInvalidError};return c.label&&(d.label=c.label,d.tooltip=c.tooltip||""),t.createElement(o.I,{...d},t.createElement(s.p,{type:"text",placeholder:c.placeholder||"0",width:c.width||40,onChange:h=>{c.onChange(h.currentTarget.value)},value:c.value,"aria-label":c.ariaLabel||"interval input"}))}},61653:(Q,A,e)=>{"use strict";e.d(A,{Dk:()=>p,NI:()=>a,ft:()=>h,x3:()=>d});var t=e(32196),n=e(96540),o=e(50877),s=e(22391),r=e(29020),g=e(35931),u=e(40845),c=e(39268),i=e(14186),l=e(88323),f=e(10354);const d="None",h="Duration",p="Tag";function m({options:E,onOptionsChange:D}){const b=(0,u.of)(v),C=[d,h,p].map(o.z);return n.createElement("div",{className:(0,t.css)({width:"100%"})},n.createElement(c.C,{className:b.row},n.createElement(i.I,{label:"Label",labelWidth:26,tooltip:"Default: duration",grow:!0},n.createElement(l.l6,{inputId:"label",options:C,value:E.jsonData.spanBar?.type||"",onChange:y=>{(0,s.lO)({onOptionsChange:D,options:E},"spanBar",{...E.jsonData.spanBar,type:y?.value??""})},placeholder:"Duration",isClearable:!0,"aria-label":"select-label-name",width:40}))),E.jsonData.spanBar?.type===p&&n.createElement(c.C,{className:b.row},n.createElement(i.I,{label:"Tag key",labelWidth:26,tooltip:"Tag key which will be used to get the tag value. A span's attributes and resources will be searched for the tag key"},n.createElement(f.p,{type:"text",placeholder:"Enter tag key",onChange:y=>(0,s.lO)({onOptionsChange:D,options:E},"spanBar",{...E.jsonData.spanBar,tag:y.currentTarget.value}),value:E.jsonData.spanBar?.tag||"",width:40}))))}const a=({options:E,onOptionsChange:D})=>{let b=E.type;return b+=E.type==="tempo"?"/configure-tempo-data-source/#span-bar":"/#span-bar",n.createElement(r.I,{title:"Span bar",description:n.createElement(g.H,{description:"Add additional info next to the service and operation on a span bar row in the trace view.",suffix:b,feature:"the span bar"})},n.createElement(m,{options:E,onOptionsChange:D}))},v=E=>({infoText:(0,t.css)({label:"infoText",paddingBottom:E.spacing(2),color:E.colors.text.secondary}),row:(0,t.css)({label:"row",alignItems:"baseline"})})},63009:(Q,A,e)=>{"use strict";e.d(A,{l:()=>u});var t=e(32196),n=e(96540),o=e(40845),s=e(57752),r=e(76892),g=e(27746);const u=({values:i,onChange:l,id:f})=>{const d=(0,o.of)(c);return n.createElement("div",{className:d.wrapper},i.length?i.map((h,p)=>n.createElement("div",{className:d.pair,key:p},n.createElement(s.o,{id:`${f}-key-${p}`,placeholder:"Tag name",value:h.key,onChange:m=>{l(i.map((a,v)=>v===p?{...a,key:String(m)}:a))}}),n.createElement(r.c,{"aria-label":"equals",className:d.operator},"as"),n.createElement(s.o,{id:`${f}-value-${p}`,placeholder:"New name (optional)",value:h.value||"",onChange:m=>{l(i.map((a,v)=>v===p?{...a,value:String(m)}:a))}}),n.createElement(g.I,{onClick:()=>l([...i.slice(0,p),...i.slice(p+1)]),className:(0,t.cx)(d.removeTag,"query-part"),"aria-label":"Remove tag",type:"button",icon:"times"}),p===i.length-1?n.createElement(g.I,{onClick:()=>l([...i,{key:"",value:""}]),className:"query-part","aria-label":"Add tag",type:"button",icon:"plus"}):null)):n.createElement(g.I,{icon:"plus",onClick:()=>l([...i,{key:"",value:""}]),className:"query-part","aria-label":"Add tag",type:"button"}))},c=i=>({wrapper:(0,t.css)({display:"flex",flexDirection:"column",gap:`${i.spacing(.5)} 0`}),pair:(0,t.css)({display:"flex",justifyContent:"start",alignItems:"center"}),operator:(0,t.css)({color:i.v1.palette.orange,width:"auto"}),removeTag:(0,t.css)({marginRight:i.spacing(.5)})})},43549:(Q,A,e)=>{"use strict";e.d(A,{FJ:()=>v,T0:()=>E,XX:()=>a,cJ:()=>m,sn:()=>d});var t=e(32196),n=e(96540),o=e(91062),s=e(35931),r=e(55882),g=e(39268),u=e(14186),c=e(15292),i=e(10354),l=e(20323),f=e(63009);function d(D){if(D?.tracesToLogsV2)return D.tracesToLogsV2;if(!D?.tracesToLogs)return;const b={customQuery:!1};return b.datasourceUid=D.tracesToLogs.datasourceUid,b.tags=D.tracesToLogs.mapTagNamesEnabled?D.tracesToLogs.mappedTags:D.tracesToLogs.tags?.map(C=>({key:C})),b.filterByTraceID=D.tracesToLogs.filterByTraceID,b.filterBySpanID=D.tracesToLogs.filterBySpanID,b.spanStartTimeShift=D.tracesToLogs.spanStartTimeShift,b.spanEndTimeShift=D.tracesToLogs.spanEndTimeShift,b}function h({options:D,onOptionsChange:b}){const C=["loki","elasticsearch","grafana-splunk-datasource","grafana-opensearch-datasource","grafana-falconlogscale-datasource","googlecloud-logging-datasource"],y=(0,n.useMemo)(()=>d(D.jsonData)||{customQuery:!1},[D.jsonData]),{query:M="",tags:T,customQuery:I}=y,x=(0,n.useCallback)(S=>{b({...D,jsonData:{...D.jsonData,tracesToLogsV2:{...y,...S},tracesToLogs:void 0}})},[b,D,y]);return n.createElement("div",{className:(0,t.css)({width:"100%"})},n.createElement(g.C,null,n.createElement(u.I,{tooltip:"The logs data source the trace is going to navigate to",label:"Data source",labelWidth:26},n.createElement(r.s,{inputId:"trace-to-logs-data-source-picker",filter:S=>C.includes(S.type),current:y.datasourceUid,noDefault:!0,width:40,onChange:S=>x({datasourceUid:S.uid})}))),n.createElement(g.C,null,n.createElement(l.e,{label:m("start"),tooltip:a("start","0"),value:y.spanStartTimeShift||"",onChange:S=>{x({spanStartTimeShift:S})},isInvalidError:v})),n.createElement(g.C,null,n.createElement(l.e,{label:m("end"),tooltip:a("end","0"),value:y.spanEndTimeShift||"",onChange:S=>{x({spanEndTimeShift:S})},isInvalidError:v})),n.createElement(g.C,null,n.createElement(u.I,{tooltip:"Tags that will be used in the query. Default tags: 'cluster', 'hostname', 'namespace', 'pod', 'service.name', 'service.namespace'",label:"Tags",labelWidth:26},n.createElement(f.l,{values:T??[],onChange:S=>x({tags:S})}))),n.createElement(p,{disabled:I,type:"trace",id:"filterByTraceID",value:!!y.filterByTraceID,onChange:S=>x({filterByTraceID:S})}),n.createElement(p,{disabled:I,type:"span",id:"filterBySpanID",value:!!y.filterBySpanID,onChange:S=>x({filterBySpanID:S})}),n.createElement(g.C,null,n.createElement(u.I,{tooltip:"Use a custom query with the possibility to interpolate variables from the trace or span",label:"Use custom query",labelWidth:26},n.createElement(c.K,{id:"customQuerySwitch",value:I,onChange:S=>x({customQuery:S.currentTarget.checked})}))),I&&n.createElement(u.I,{label:"Query",labelWidth:26,tooltip:"The query that will run when navigating from a trace to logs data source. Interpolate tags using the `$__tags` keyword",grow:!0},n.createElement(i.p,{label:"Query",type:"text",allowFullScreen:!0,value:M,onChange:S=>x({query:S.currentTarget.value})})))}function p(D){return n.createElement(g.C,null,n.createElement(u.I,{disabled:D.disabled,label:`Filter by ${D.type} ID`,labelWidth:26,grow:!0,tooltip:`Filters logs by ${D.type} ID`},n.createElement(c.K,{id:D.id,value:D.value,onChange:b=>D.onChange(b.currentTarget.checked)})))}const m=D=>`Span ${D} time shift`,a=(D,b)=>`Shifts the ${D} time of the span. Default: ${b} (Time units can be used here, for example: 5s, -1m, 3h)`,v="Invalid time shift. See tooltip for examples.",E=({options:D,onOptionsChange:b})=>{let C=D.type;return C+=D.type==="tempo"?"/configure-tempo-data-source/#trace-to-logs":"/#trace-to-logs",n.createElement(o.A,{title:"Trace to logs",description:n.createElement(s.H,{description:"Navigate from a trace span to the selected data source's logs.",suffix:C,feature:"trace to logs"}),isCollapsible:!0,isInitiallyOpen:!0},n.createElement(h,{options:D,onOptionsChange:b}))}},80822:(Q,A,e)=>{"use strict";e.d(A,{Wn:()=>r,_k:()=>s});var t=e(41260),n=e(11261),o=e(21423);function s(d,h){const p=r({data:d.series},{data:h.series}).data;return{...d,series:p}}function r(d,h){if(!d)return i(h);h.data.forEach(v=>{const E=d.data.find(D=>f(D,v));if(!E){d.data.push(l(v));return}g(E,v)});const p=[...d.errors??[],...h.errors??[]];p.length>0&&(d.errors=p);const m=d.error??h.error;m!=null&&(d.error=m);const a=[...d.traceIds??[],...h.traceIds??[]];return a.length>0&&(d.traceIds=a),d}function g(d,h){const p=Math.max(d.fields.length,h.fields.length);for(let m=0;mv.name===d.fields[m].name):h.fields[m];if(a&&(d.fields[m].values=[].concat.apply(a.values,d.fields[m].values),a.nanos)){const v=d.fields[m].nanos?.slice()||[];d.fields[m].nanos=h.fields[m].nanos?.concat(v)}}d.length+=h.length,d.meta={...d.meta,stats:c(d.meta?.stats??[],h.meta?.stats??[])}}const u="Summary: total bytes processed";function c(d,h){const p=d.find(v=>v.displayName===u),m=h.find(v=>v.displayName===u);if(m!=null&&p!=null)return[{value:m.value+p.value,displayName:u,unit:p.unit}];const a=m??p;return a!=null?[a]:[]}function i(d){return{...d,data:d.data.map(l)}}function l(d){return{...d,fields:d.fields.map(h=>({...h,values:h.values}))}}function f(d,h){if(d.refId!==h.refId)return!1;const p=d.meta?.type,m=h.meta?.type;if(p!==m)return!1;if(p===t.m.TimeSeriesMulti){const E=d.fields.find(b=>b.type===n.PU.number),D=h.fields.find(b=>b.type===n.PU.number);return E===void 0||D===void 0?!1:(0,o.ab)(E.labels??{},D.labels??{})}const a=d.meta?.custom?.frameType,v=h.meta?.custom?.frameType;return a==="LabeledTimeValues"&&v==="LabeledTimeValues"}},32528:(Q,A,e)=>{"use strict";e.d(A,{GT:()=>g,dY:()=>c,jP:()=>s,pl:()=>r});var t=e(37471),n=e(25352),o=e(11261);function s(i){return i.sort((f,d)=>f[0]-d[0]),i.reduce((f,d)=>{if(!f.length)return[d];const h=f.slice(-1)[0],[p,m]=h,[a,v]=d;return vm?[...f,d]:[...f.slice(0,-1),[p,v]]},[]).reduce((f,d)=>f+(d[1]-d[0]),0)}function r(i){const l={};let f;for(let d=0;f=i(d),!!f;d++){l[f.id]?l[f.id].span=f.span:l[f.id]={span:f.span,children:[]};for(const h of f.parentIds)h&&(l[h]?l[h].children.push(f.id):l[h]={span:void 0,children:[f.id]})}return l}function g(i,l,f){return{main:`${u(i)}ms (${u(i/l*100)}%)`,secondary:`${u(f)}ms (${u(f/i*100)}%)`}}function u(i){return parseFloat(i.toFixed(2))}function c(){const i=new t.k({fields:[{name:n.u.id,type:o.PU.string},{name:n.u.title,type:o.PU.string},{name:n.u.subTitle,type:o.PU.string},{name:n.u.mainStat,type:o.PU.string,config:{displayName:"Total time (% of trace)"}},{name:n.u.secondaryStat,type:o.PU.string,config:{displayName:"Self time (% of total)"}},{name:n.u.color,type:o.PU.number,config:{color:{mode:"continuous-GrYlRd"},displayName:"Self time / Trace duration"}}],meta:{preferredVisualisationType:"nodeGraph"}}),l=new t.k({fields:[{name:n.u.id,type:o.PU.string},{name:n.u.target,type:o.PU.string},{name:n.u.source,type:o.PU.string}],meta:{preferredVisualisationType:"nodeGraph"}});return[i,l]}},5261:(Q,A,e)=>{"use strict";e.d(A,{L:()=>n,y:()=>o});var t=e(32264);function n(s){return{grafana_version:t.$.buildInfo.version,plugin_type:String(s.type),plugin_version:s.info.version,plugin_id:s.id,plugin_name:s.name}}function o(s){return{...n(s.meta),datasource_uid:s.uid}}},44027:(Q,A,e)=>{"use strict";e.d(A,{G:()=>u});var t=e(96540),n=e(92470),o=e(95187),s=e(14110),r=e(5261);const g="grafana_plugin_";function u(){const i=(0,n.Q)();return(0,t.useMemo)(()=>{const l=(0,o.S)(i)?(0,r.y)(i.instanceSettings):(0,r.L)(i.meta);return(f,d)=>{if(!c(f))throw new Error(`Interactions reported in plugins should start with: "${g}".`);return(0,s.rR)(f,{...d,...l})}},[i])}function c(i){return i.startsWith(g)&&i.length>g.length}},61298:(Q,A,e)=>{"use strict";e.d(A,{fX:()=>o,nB:()=>n,n_:()=>t,p6:()=>s});var t=(r=>(r.DashboardView="dashboard-view",r.DataRequest="data-request",r))(t||{});const n=r=>!!r.payload.page,o=r=>!!r.payload.interactionName,s=r=>!!r.payload.experimentId},14110:(Q,A,e)=>{"use strict";e.d(A,{G$:()=>s,Jy:()=>r,Xp:()=>u,rR:()=>g});var t=e(32264),n=e(12131),o=e(63415);const s=c=>{(0,o.x$)().addEvent({type:o.on.MetaAnalytics,payload:c})},r=()=>{const c=n.Ny.getLocation(),i=`${t.$.appSubUrl??""}${c.pathname}${c.search}${c.hash}`;(0,o.x$)().addEvent({type:o.on.Pageview,payload:{page:i}})},g=(c,i)=>{(0,o.x$)().addEvent({type:o.on.Interaction,payload:{interactionName:c,properties:i}})},u=(c,i,l)=>{(0,o.x$)().addEvent({type:o.on.ExperimentView,payload:{experimentId:c,experimentGroup:i,experimentVariant:l}})}},55882:(Q,A,e)=>{"use strict";e.d(A,{s:()=>l});var t=e(96540),n=e(22391),o=e(51527),s=e(13544),r=e(88323),g=e(66864),u=e(98624),c=e(19347),i=e(26657);class l extends t.PureComponent{constructor(d){super(d),this.dataSourceSrv=(0,c.l)(),this.state={},this.onChange=(h,p)=>{if(p.action==="clear"&&this.props.onClear){this.props.onClear();return}const m=this.dataSourceSrv.getInstanceSettings(h.value);m&&(this.props.onChange(m),this.setState({error:void 0}))}}componentDidMount(){const{current:d}=this.props;this.dataSourceSrv.getInstanceSettings(d)||this.setState({error:"Could not find data source "+d})}getCurrentValue(){const{current:d,hideTextValue:h,noDefault:p}=this.props;if(!d&&p)return;const m=this.dataSourceSrv.getInstanceSettings(d);if(m)return{label:m.name.slice(0,37),value:m.uid,imgUrl:m.meta.info.logos.small,hideText:h,meta:m.meta};const a=(0,n.Iz)(d);return a===i.dR.uid||a===i.dR.name?{label:a,value:a,hideText:h}:{label:(a??"no name")+" - not found",value:a??void 0,imgUrl:"",hideText:h}}getDataSourceOptions(){const{alerting:d,tracing:h,metrics:p,mixed:m,dashboard:a,variables:v,annotations:E,pluginId:D,type:b,filter:C,logs:y}=this.props;return this.dataSourceSrv.getList({alerting:d,tracing:h,metrics:p,logs:y,dashboard:a,mixed:m,variables:v,annotations:E,pluginId:D,filter:C,type:b}).map(T=>({value:T.name,label:`${T.name}${T.isDefault?" (default)":""}`,imgUrl:T.meta.info.logos.small,meta:T.meta}))}render(){const{autoFocus:d,onBlur:h,onClear:p,openMenuOnFocus:m,placeholder:a,width:v,inputId:E,disabled:D=!1,isLoading:b=!1}=this.props,{error:C}=this.state,y=this.getDataSourceOptions(),M=this.getCurrentValue(),T=typeof p=="function";return t.createElement("div",{"aria-label":"Data source picker select container","data-testid":s.Tp.components.DataSourcePicker.container},t.createElement(r.l6,{isLoading:b,disabled:D,"aria-label":"Select a data source","data-testid":s.Tp.components.DataSourcePicker.inputV2,inputId:E||"data-source-picker",className:"ds-picker select-container",isMulti:!1,isClearable:T,backspaceRemovesValue:!1,onChange:this.onChange,options:y,autoFocus:d,onBlur:h,width:v,openMenuOnFocus:m,maxMenuHeight:500,placeholder:a,noOptionsMessage:"No datasources found",value:M??null,invalid:!!C||!!this.props.invalid,getOptionLabel:I=>I.meta&&(0,o.x)(I.meta.signature)&&I!==M?t.createElement(g.Gy,{align:"center",justify:"space-between",height:"auto"},t.createElement("span",null,I.label)," ",t.createElement(u.B,{status:I.meta.signature})):I.label||""}))}}l.defaultProps={autoFocus:!1,openMenuOnFocus:!1,placeholder:"Select data source"}},96937:(Q,A,e)=>{"use strict";e.d(A,{f:()=>t,p:()=>n});let t=()=>{throw new Error("EmbeddedDashboard requires runtime initialization")};function n(o){t=o}},97152:(Q,A,e)=>{"use strict";e.d(A,{a:()=>n,e:()=>o});var t=e(96540);let n=({message:s})=>t.createElement("div",null,"Unable to render data: ",s,".");function o(s){n=s}},24308:(Q,A,e)=>{"use strict";e.d(A,{Y:()=>o,m:()=>n});var t=e(96540);let n=()=>t.createElement("div",null,"PanelRenderer can only be used after Grafana instance has been started.");function o(s){n=s}},46235:(Q,A,e)=>{"use strict";e.d(A,{V:()=>n,l:()=>o});var t=e(96540);let n=({children:s})=>t.createElement("div",null,s);function o(s){n=s}},32264:(Q,A,e)=>{"use strict";e.d(A,{$:()=>l,p:()=>r});var t=e(2543),n=e.n(t),o=e(42994),s=e(97594);class r{constructor(d){this.publicDashboardsEnabled=!0,this.snapshotEnabled=!0,this.datasources={},this.panels={},this.apps={},this.auth={},this.minRefreshInterval="",this.appUrl="",this.appSubUrl="",this.namespace="default",this.windowTitlePrefix="",this.newPanelTitle="",this.externalUserMngLinkUrl="",this.externalUserMngLinkName="",this.externalUserMngInfo="",this.allowOrgCreate=!1,this.feedbackLinksEnabled=!0,this.disableLoginForm=!1,this.defaultDatasource="",this.alertingEnabled=!1,this.alertingErrorOrTimeout="",this.alertingNoDataOrNullValues="",this.alertingMinInterval=1,this.angularSupportEnabled=!1,this.authProxyEnabled=!1,this.exploreEnabled=!1,this.queryHistoryEnabled=!1,this.helpEnabled=!1,this.profileEnabled=!1,this.newsFeedEnabled=!0,this.ldapEnabled=!1,this.jwtHeaderName="",this.jwtUrlLogin=!1,this.sigV4AuthEnabled=!1,this.azureAuthEnabled=!1,this.secureSocksDSProxyEnabled=!1,this.samlEnabled=!1,this.samlName="",this.autoAssignOrg=!0,this.verifyEmailEnabled=!1,this.oauth={},this.rbacEnabled=!0,this.disableUserSignUp=!1,this.loginHint="",this.passwordHint="",this.loginError=void 0,this.viewersCanEdit=!1,this.editorsCanAdmin=!1,this.disableSanitizeHtml=!1,this.trustedTypesDefaultPolicyEnabled=!1,this.cspReportOnlyEnabled=!1,this.liveEnabled=!0,this.featureToggles={},this.anonymousEnabled=!1,this.anonymousDeviceLimit=void 0,this.licenseInfo={},this.rendererAvailable=!1,this.rendererVersion="",this.secretsManagerPluginEnabled=!1,this.supportBundlesEnabled=!1,this.http2Enabled=!1,this.grafanaJavascriptAgent={enabled:!1,customEndpoint:"",apiKey:"",errorInstrumentalizationEnabled:!0,consoleInstrumentalizationEnabled:!1,webVitalsInstrumentalizationEnabled:!1},this.pluginCatalogURL="https://grafana.com/grafana/plugins/",this.pluginAdminEnabled=!0,this.pluginAdminExternalManageEnabled=!1,this.pluginCatalogHiddenPlugins=[],this.pluginsCDNBaseURL="",this.expressionsEnabled=!1,this.awsAllowedAuthProviders=[],this.awsAssumeRoleEnabled=!1,this.azure={managedIdentityEnabled:!1,workloadIdentityEnabled:!1,userIdentityEnabled:!1},this.caching={enabled:!1},this.unifiedAlertingEnabled=!1,this.unifiedAlerting={minInterval:"",alertStateHistoryBackend:void 0,alertStateHistoryPrimary:void 0},this.recordedQueries={enabled:!0},this.featureHighlights={enabled:!1},this.reporting={enabled:!0},this.analytics={enabled:!0},this.googleAnalytics4SendManualPageViews=!1,this.sqlConnectionLimits={maxOpenConns:100,maxIdleConns:100,connMaxLifetime:14400},this.disableFrontendSandboxForPlugins=[],this.bootData=d.bootData;const h={datasources:{},windowTitlePrefix:"Grafana - ",panels:{},newPanelTitle:"Panel Title",playlist_timespan:"1m",unsaved_changes_warning:!0,appUrl:"",appSubUrl:"",buildInfo:{version:"1.0",commit:"1",env:"production"},viewersCanEdit:!1,editorsCanAdmin:!1,disableSanitizeHtml:!1};(0,t.merge)(this,h,d),this.buildInfo=d.buildInfo||h.buildInfo,this.dateFormats&&o.WC.update(this.dateFormats),this.buildInfo.env==="development"&&u(this),g(this),this.featureToggles.disableAngular&&(this.angularSupportEnabled=!1),this.theme2=(0,s.g)(this.bootData.user.theme),this.bootData.user.lightTheme=this.theme2.isLight,this.theme=this.theme2.v1}}function g(f){const d=f.featureToggles,h="grafana.featureToggles",p=window.localStorage.getItem(h);if(p){const m=p.split(",");for(const a of m){const[v,E]=a.split("="),D=E==="true"||E==="1";d[v]=D,console.log(`Setting feature toggle ${v} = ${D} via localstorage`)}}}function u(f){if(window.location.href.indexOf("__feature")===-1)return;new URLSearchParams(window.location.search).forEach((h,p)=>{if(p.startsWith("__feature.")){const m=f.featureToggles,a=p.substring(10),v=h==="true"||h==="";v!==m[p]&&(m[a]=v,console.log(`Setting feature toggle ${a} = ${v} via url`))}})}const c=window.grafanaBootData||{settings:{},user:{},navTree:[]},i=c.settings;i.bootData=c;const l=new r(i)},13303:(Q,A,e)=>{"use strict";e.r(A),e.d(A,{CopyPanelEvent:()=>l.ah,DataSourcePicker:()=>x.s,DataSourceWithBackend:()=>D.iy,EchoEventType:()=>r.on,EmbeddedDashboard:()=>L.f,FakeEchoSrv:()=>r.c_,GrafanaBootConfig:()=>h.p,HealthCheckError:()=>D.b1,HealthStatus:()=>D.VQ,HistoryWrapper:()=>i.K9,MetaAnalyticsEventName:()=>p.n_,PanelDataErrorView:()=>y.a,PanelRenderer:()=>C.m,PluginPage:()=>I.V,RefreshEvent:()=>l._,StreamingFrameAction:()=>c.Kh,SystemJS:()=>m.zO,ThemeChangedEvent:()=>l.E8,TimeRangeUpdatedEvent:()=>l.sR,config:()=>h.$,createDataSourcePluginEventProperties:()=>S.y,createMonitoringLogger:()=>E.DW,createPluginEventProperties:()=>S.L,createQueryRunner:()=>T.d,featureEnabled:()=>v.a,frameToMetricFindValue:()=>b.$h,getAngularLoader:()=>n.E,getAppEvents:()=>l.J7,getBackendSrv:()=>t.AI,getDataSourceSrv:()=>o.l,getEchoSrv:()=>r.x$,getGrafanaLiveSrv:()=>c.oF,getLegacyAngularInjector:()=>u.C,getLocationSrv:()=>s.X,getPluginComponentExtensions:()=>f.Dp,getPluginExtensions:()=>f.O3,getPluginImportUtils:()=>m.o,getPluginLinkExtensions:()=>f.Kf,getRunRequest:()=>T.XJ,getTemplateSrv:()=>g.w,isExperimentViewEvent:()=>p.p6,isFetchError:()=>t.NF,isInteractionEvent:()=>p.fX,isPageviewEvent:()=>p.nB,isPluginExtensionComponent:()=>d.a,isPluginExtensionLink:()=>d.D,loadPluginCss:()=>m.PL,locationSearchToObject:()=>i.SE,locationService:()=>i.Ny,logDebug:()=>E.MD,logError:()=>E.vV,logInfo:()=>E.fH,logWarning:()=>E.FF,navigationLogger:()=>i.Lc,registerEchoBackend:()=>r.pl,reportExperimentView:()=>a.Xp,reportInteraction:()=>a.rR,reportMetaAnalytics:()=>a.G$,reportPageview:()=>a.Jy,setAngularLoader:()=>n.w,setAppEvents:()=>l.H8,setBackendSrv:()=>t.u5,setDataSourceSrv:()=>o.h,setEchoSrv:()=>r.H2,setEmbeddedDashboard:()=>L.p,setGrafanaLiveSrv:()=>c.S8,setLegacyAngularInjector:()=>u.j,setLocationService:()=>i.vG,setLocationSrv:()=>s.T,setPluginExtensionGetter:()=>f.cE,setPluginImportUtils:()=>m.se,setQueryRunnerFactory:()=>T.HC,setReturnToPreviousHook:()=>P._,setRunRequest:()=>T.pC,setTemplateSrv:()=>g.d,toDataQueryError:()=>M.u,toDataQueryResponse:()=>b.bE,usePluginInteractionReporter:()=>O.G,useReturnToPrevious:()=>P.i});var t=e(17172),n=e(7376),o=e(19347),s=e(23509),r=e(63415),g=e(72574),u=e(81634),c=e(78731),i=e(12131),l=e(3591),f=e(4402),d=e(80882),h=e(32264),p=e(61298),m=e(89191),a=e(14110),v=e(33378),E=e(34867),D=e(26657),b=e(47773),C=e(24308),y=e(97152),M=e(12091),T=e(63639),I=e(46235),x=e(55882),S=e(5261),O=e(44027),P=e(14778),L=e(96937)},7376:(Q,A,e)=>{"use strict";e.d(A,{E:()=>o,w:()=>n});let t;function n(s){t=s}function o(){return t}},63415:(Q,A,e)=>{"use strict";e.d(A,{H2:()=>o,c_:()=>g,on:()=>t,pl:()=>r,x$:()=>s});var t=(u=>(u.Performance="performance",u.MetaAnalytics="meta-analytics",u.Pageview="pageview",u.Interaction="interaction",u.ExperimentView="experimentview",u.GrafanaJavascriptAgent="grafana-javascript-agent",u))(t||{});let n;function o(u){if(n instanceof g)for(const c of n.buffer)u.addEvent(c.event,c.meta);n=u}function s(){return n||(n=new g),n}const r=u=>{s().addBackend(u)};class g{constructor(){this.buffer=[]}flush(){this.buffer=[]}addBackend(c){}addEvent(c,i){this.buffer.push({event:c,meta:i})}}},12131:(Q,A,e)=>{"use strict";e.d(A,{K9:()=>u,Lc:()=>d,Ny:()=>i,SE:()=>c,vG:()=>l});var t=e(17929),n=e(76885),o=e(95344),s=e(91040),r=e(40621),g=e(32264);class u{constructor(p){this.history=p||t.zR({basename:g.$.appSubUrl??"/"}),this.partial=this.partial.bind(this),this.push=this.push.bind(this),this.replace=this.replace.bind(this),this.getSearch=this.getSearch.bind(this),this.getHistory=this.getHistory.bind(this),this.getLocation=this.getLocation.bind(this)}getHistory(){return this.history}getSearch(){return new URLSearchParams(this.history.location.search)}partial(p,m){const a=this.history.location,v=this.getSearchObject();for(const D of Object.keys(p))p[D]===null||p[D]===void 0?delete v[D]:v[D]=p[D];const E=n.kM.renderUrl(a.pathname,v);m?this.history.replace(E,this.history.location.state):this.history.push(E,this.history.location.state)}push(p){this.history.push(p)}replace(p){this.history.replace(p)}reload(){const p=this.history.location.state?.routeReloadCounter;this.history.replace({...this.history.location,state:{routeReloadCounter:p?p+1:1}})}getLocation(){return this.history.location}getSearchObject(){return c(this.history.location.search)}update(p){if((0,o.l)("LocationSrv","update","partial, push or replace"),p.partial&&p.query)this.partial(p.query,p.partial);else{const m={pathname:p.path};p.query&&(m.search=n.kM.toUrlParams(p.query)),p.replace?this.replace(m):this.push(m)}}}function c(h){let p=typeof h=="number"?String(h):h;return p.length>0?p.startsWith("?")?n.kM.parseKeyValue(p.substring(1)):n.kM.parseKeyValue(p):{}}let i=new u;const l=h=>{throw new Error("locationService can be only overriden in test environment")},f=(0,s.h)("Router"),d=f.logger;(0,r.h)("location",i,f)},23509:(Q,A,e)=>{"use strict";e.d(A,{T:()=>n,X:()=>o});let t;function n(s){t=s}function o(){return t}},63639:(Q,A,e)=>{"use strict";e.d(A,{HC:()=>n,XJ:()=>g,d:()=>o,pC:()=>r});let t;const n=u=>{if(t)throw new Error("Runner should only be set when Grafana is starting.");t=u},o=()=>{if(!t)throw new Error("`createQueryRunner` can only be used after Grafana instance has started.");return t()};let s;function r(u){if(s)throw new Error("runRequest function should only be set once, when Grafana is starting.");s=u}function g(){if(!s)throw new Error("getRunRequest can only be used after Grafana instance has started.");return s}},3591:(Q,A,e)=>{"use strict";e.d(A,{E8:()=>o,H8:()=>u,J7:()=>c,_:()=>n,ah:()=>r,sR:()=>s});var t=e(65463);class n extends t.a{}n.type="refresh";class o extends t.x{}o.type="theme-changed";class s extends t.x{}s.type="time-range-updated";class r extends t.x{}r.type="copy-panel";let g;function u(i){g=i}function c(){return g}},17172:(Q,A,e)=>{"use strict";e.d(A,{AI:()=>s,NF:()=>t,u5:()=>o});function t(r){return typeof r=="object"&&r!==null&&"status"in r&&"data"in r}let n;const o=r=>{n=r},s=()=>n},19347:(Q,A,e)=>{"use strict";e.d(A,{h:()=>n,l:()=>o});let t;function n(s){t=s}function o(){return t}},81634:(Q,A,e)=>{"use strict";e.d(A,{C:()=>o,j:()=>n});let t;const n=s=>{t=s},o=()=>t},78731:(Q,A,e)=>{"use strict";e.d(A,{Kh:()=>t.Kh,S8:()=>o,oF:()=>s});var t=e(9631);let n;const o=r=>{n=r},s=()=>n},4402:(Q,A,e)=>{"use strict";e.d(A,{Dp:()=>u,Kf:()=>g,O3:()=>r,cE:()=>o});var t=e(80882);let n;function o(c){if(n)throw new Error("setPluginExtensionGetter() function should only be called once, when Grafana is starting.");n=c}function s(){if(!n)throw new Error("getPluginExtensionGetter() can only be used after the Grafana instance has started.");return n}const r=c=>s()(c),g=c=>{const{extensions:i}=r(c);return{extensions:i.filter(t.D)}},u=c=>{const{extensions:i}=r(c);return{extensions:i.filter(t.a)}}},80882:(Q,A,e)=>{"use strict";e.d(A,{D:()=>n,a:()=>o});var t=e(74135);function n(s){return s?s.type===t.u.link&&("path"in s||"onClick"in s):!1}function o(s){return s?s.type===t.u.component&&"component"in s:!1}},72574:(Q,A,e)=>{"use strict";e.d(A,{d:()=>n,w:()=>o});let t;const n=s=>{t=s},o=()=>t},26657:(Q,A,e)=>{"use strict";e.d(A,{iy:()=>M,dR:()=>E,b1:()=>b,VQ:()=>C,s9:()=>D,ph:()=>I,x7:()=>T});var t=e(62467),n=e(75505),o=e(44240),s=e(63720),r=e(66847),g=e(40187),u=e(22391),c=e(55004),i=e(89667),l=e(92341),f=e(32264),d=e(19347),h=e(78731),p=e(17172),m=e(9631),a=e(47773);function v(x){const{intervalMs:S,maxDataPoints:O,requestId:P,panelId:L,queryCachingTTL:U,range:{from:R,to:B}}=x;if(!x.targets.length)return(0,t.of)({data:[]});const H={intervalMs:S,maxDataPoints:O,queryCachingTTL:U,timeRange:{from:R.valueOf().toString(),to:B.valueOf().toString(),timezone:x.timezone}};return(0,p.AI)().fetch({url:`/api/public/dashboards/${f.$.publicDashboardAccessToken}/panels/${L}/query`,method:"POST",data:H,requestId:P}).pipe((0,s.n)(w=>(0,t.of)((0,a.bE)(w,x.targets))),(0,r.W)(w=>(0,t.of)((0,a.bE)(w))))}const E=Object.freeze({type:"__expr__",uid:"__expr__",name:"Expression"});function D(x){if(!x)return!1;const S=typeof x=="string"?x:x.type;return S===E.type||S===E.name||S==="-100"}class b extends Error{constructor(S,O){super(S),this.details=O,this.name="HealthCheckError"}}var C=(x=>(x.Unknown="UNKNOWN",x.OK="OK",x.Error="ERROR",x))(C||{}),y=(x=>(x.PluginID="X-Plugin-Id",x.DatasourceUID="X-Datasource-Uid",x.DashboardUID="X-Dashboard-Uid",x.PanelID="X-Panel-Id",x.PanelPluginId="X-Panel-Plugin-Id",x.QueryGroupID="X-Query-Group-Id",x.FromExpression="X-Grafana-From-Expr",x.SkipQueryCache="X-Cache-Skip",x))(y||{});class M extends g.mA{constructor(S){super(S),this.streamOptionsProvider=I}query(S){if(f.$.publicDashboardAccessToken)return v(S);const{intervalMs:O,maxDataPoints:P,queryCachingTTL:L,range:U,requestId:R,hideFromInspector:B=!1}=S;let H=S.targets;this.filterQuery&&(H=H.filter(k=>this.filterQuery(k)));let w=!1;const N=new Set,V=new Set,G=H.map(k=>{let Y=this.getRef(),ee=this.id,re=!0;if(D(k.datasource))return w=!0,{...k,datasource:E};if(k.datasource){const J=(0,d.l)().getInstanceSettings(k.datasource,S.scopedVars);if(!J)throw new Error(`Unknown Datasource: ${JSON.stringify(k.datasource)}`);const ne=J.rawRef??(0,u.p$)(J),q=J.id;(ne.uid!==Y.uid||ee!==q)&&(Y=ne,ee=q,re=!1)}return Y.type?.length&&N.add(Y.type),Y.uid?.length&&V.add(Y.uid),{...re?this.applyTemplateVariables(k,S.scopedVars,S.filters):k,datasource:Y,datasourceId:ee,intervalMs:O,maxDataPoints:P,queryCachingTTL:L}});if(!G.length)return(0,t.of)({data:[]});const _={queries:G,from:U?.from.valueOf().toString(),to:U?.to.valueOf().toString()};if(f.$.featureToggles.queryOverLive)return(0,h.oF)().getQueryData({request:S,body:_});const K={};K["X-Plugin-Id"]=Array.from(N).join(", "),K["X-Datasource-Uid"]=Array.from(V).join(", ");let j="/api/ds/query?ds_type="+this.type;return w&&(K["X-Grafana-From-Expr"]="true",j+="&expression=true"),R&&(j+=`&requestId=${R}`),S.dashboardUID&&(K["X-Dashboard-Uid"]=S.dashboardUID),S.panelId&&(K["X-Panel-Id"]=`${S.panelId}`),S.panelPluginId&&(K["X-Panel-Plugin-Id"]=`${S.panelPluginId}`),S.queryGroupId&&(K["X-Query-Group-Id"]=`${S.queryGroupId}`),S.skipQueryCache&&(K["X-Cache-Skip"]="true"),(0,p.AI)().fetch({url:j,method:"POST",data:_,requestId:R,hideFromInspector:B,headers:K}).pipe((0,s.n)(k=>{const Y=(0,a.bE)(k,G);return Y.data?.length&&Y.data.find(ee=>ee.meta?.channel)?T(Y,S,this.streamOptionsProvider):(0,t.of)(Y)}),(0,r.W)(k=>(0,t.of)((0,a.bE)(k))))}getRequestHeaders(){const S={};return S["X-Plugin-Id"]=this.type,S["X-Datasource-Uid"]=this.uid,S}interpolateVariablesInQueries(S,O,P){return S.map(L=>this.applyTemplateVariables(L,O,P))}applyTemplateVariables(S,O,P){return S}async getResource(S,O,P){const L=this.getRequestHeaders();return(await(0,n.s)((0,p.AI)().fetch({...P,method:"GET",headers:P?.headers?{...P.headers,...L}:L,params:O??P?.params,url:`/api/datasources/uid/${this.uid}/resources/${S}`}))).data}async postResource(S,O,P){const L=this.getRequestHeaders();return(await(0,n.s)((0,p.AI)().fetch({...P,method:"POST",headers:P?.headers?{...P.headers,...L}:L,data:O??{...O},url:`/api/datasources/uid/${this.uid}/resources/${S}`}))).data}async callHealthCheck(){return(0,n.s)((0,p.AI)().fetch({method:"GET",url:`/api/datasources/uid/${this.uid}/health`,showErrorAlert:!1,headers:this.getRequestHeaders()})).then(S=>S.data).catch(S=>S.data)}async testDatasource(){return this.callHealthCheck().then(S=>S.status==="OK"?{status:"success",message:S.message}:Promise.reject({status:"error",message:S.message,error:new b(S.message,S.details)}))}}function T(x,S,O){const P=(0,h.oF)();if(!P)return(0,t.of)(x);const L=[],U=[];for(const R of x.data){const B=(0,c.DG)(R.meta?.channel);if(B){const H=R;U.push(P.getDataStream({addr:B,buffer:O(S,H),frame:(0,i.Nw)(R)}))}else L.push(R)}return L.length&&U.push((0,t.of)({...x,data:L})),U.length===1?U[0]:(0,o.h)(...U)}const I=(x,S)=>{const O={maxLength:x.maxDataPoints??500,action:m.Kh.Append};return x.rangeRaw?.to==="now"&&(O.maxDelta=x.range.to.valueOf()-x.range.from.valueOf()),O};M=(0,l.Y)(M)},33378:(Q,A,e)=>{"use strict";e.d(A,{a:()=>n});var t=e(32264);const n=o=>{const{enabledFeatures:s}=t.$.licenseInfo;return s&&s[o]}},34867:(Q,A,e)=>{"use strict";e.d(A,{DW:()=>c,FF:()=>r,MD:()=>g,fH:()=>s,vV:()=>u});var t=e(32631),n=e(37930),o=e(32264);function s(i,l){o.$.grafanaJavascriptAgent.enabled&&t.P.api.pushLog([i],{level:n.$b.INFO,context:l})}function r(i,l){o.$.grafanaJavascriptAgent.enabled&&t.P.api.pushLog([i],{level:n.$b.WARN,context:l})}function g(i,l){o.$.grafanaJavascriptAgent.enabled&&t.P.api.pushLog([i],{level:n.$b.DEBUG,context:l})}function u(i,l){o.$.grafanaJavascriptAgent.enabled&&t.P.api.pushError(i,{context:l})}function c(i,l){const f=d=>({source:i,...l,...d});return{logDebug:(d,h)=>g(d,f(h)),logInfo:(d,h)=>s(d,f(h)),logWarning:(d,h)=>r(d,f(h)),logError:(d,h)=>u(d,f(h))}}},89191:(Q,A,e)=>{"use strict";e.d(A,{PL:()=>i,o:()=>d,se:()=>f,zO:()=>c});var t=e(59511),n=e.n(t),o=e(65024),s=e.n(o),r=e(57516),g=e.n(r),u=e(32264);const c=window.System;async function i(h){try{const p=u.$.bootData.user.theme==="light"?h.light:h.dark;return c.import(p)}catch(p){console.error(p)}}let l;function f(h){if(l)throw new Error("pluginImportUtils should only be set once, when Grafana is starting.");l=h}function d(){if(!l)throw new Error("pluginImportUtils can only be used after Grafana instance has started.");return l}window.__grafana_amd_define=window.define,window.define=void 0},47773:(Q,A,e)=>{"use strict";e.d(A,{$h:()=>f,bE:()=>u});var t=e(39070),n=e(89667),o=e(14236),s=e(11261),r=e(12091);const g={severity:"info",text:"Cached response"};function u(d,h){const p={data:[],state:t.Gu.Done},m="traceId"in d?d.traceId:void 0;m!=null&&(p.traceIds=[m]);const a=d;if(a.data?.results){const v=a.data.results,E=h?.length?h.map(C=>C.refId):Object.keys(v),D=c(a),b=[];for(const C of E){const y=v[C];y&&(y.refId=C,b.push(y))}for(const C of b){if(C.error){const y={refId:C.refId,message:C.error,status:C.status};m!=null&&(y.traceId=m),p.error||(p.error={...y}),p.errors?p.errors.push({...y}):p.errors=[{...y}],p.state=t.Gu.Error}if(C.frames?.length){for(let y of C.frames){D&&(y=i(y));const M=(0,n.or)(y);M.refId||(M.refId=C.refId),p.data.push(M)}continue}if(C.series?.length)for(const y of C.series)y.refId||(y.refId=C.refId),p.data.push((0,o.Vc)(y));if(C.tables?.length)for(const y of C.tables)y.refId||(y.refId=C.refId),p.data.push((0,o.Vc)(y))}}return a.status&&a.status!==200&&(p.state!==t.Gu.Error&&(p.state=t.Gu.Error),p.error||(p.error=(0,r.u)(d))),p}function c(d){const h=d?.headers;return!h||!h.get?!1:h.get("X-Cache")==="HIT"}function i(d){return{...d,schema:{...d.schema,fields:[...d.schema?.fields??[]],meta:{...d.schema?.meta,notices:[...d.schema?.meta?.notices??[],g],isCachedResponse:!0}}}}function l(d){const h=u(d);if(h.error?.data?.message)return{status:"error",message:h.error.data.message,details:h.error?.data?.error?{message:h.error.data.error}:void 0};if(h.error?.refId&&h.error?.message)return{status:"error",message:h.error.message};throw d}function f(d){if(!d||!d.length)return[];const h=[];let p=d.fields.find(m=>m.type===s.PU.string);if(p||(p=d.fields.find(m=>m.type!==s.PU.time)),p)for(let m=0;m{"use strict";e.d(A,{_:()=>n,i:()=>o});let t;const n=s=>{t=s},o=()=>t?t():()=>console.error("ReturnToPrevious hook not found")},52622:(Q,A,e)=>{"use strict";e.d(A,{$N:()=>R,$l:()=>N,$m:()=>Y,$p:()=>P,D7:()=>c,F8:()=>L,GR:()=>h,J1:()=>u,L4:()=>a,Lt:()=>b,Ly:()=>M,NU:()=>p,Nj:()=>D,ON:()=>C,QH:()=>n,QR:()=>t,RU:()=>s,SV:()=>U,T6:()=>G,TZ:()=>V,WQ:()=>o,Wq:()=>K,Y$:()=>f,aG:()=>g,dx:()=>m,eX:()=>w,fY:()=>ee,gs:()=>E,lm:()=>T,ob:()=>_,on:()=>v,qM:()=>k,q_:()=>r,uH:()=>i,vM:()=>l,vp:()=>ne,wV:()=>x,xB:()=>B,yL:()=>d,yp:()=>O,zT:()=>re});var t=(q=>(q.AlertStates="alertStates",q.Annotations="annotations",q.Series="series",q))(t||{}),n=(q=>(q.Linear="linear",q.Quad="quad",q))(n||{}),o=(q=>(q.Clamped="clamped",q.Mod="mod",q))(o||{}),s=(q=>(q.Field="field",q.Fixed="fixed",q.Template="template",q))(s||{}),r=(q=>(q.Field="field",q.Fixed="fixed",q.Mapping="mapping",q))(r||{}),g=(q=>(q.Auto="auto",q.Coords="coords",q.Geohash="geohash",q.Lookup="lookup",q))(g||{}),u=(q=>(q.Count="count",q.Size="size",q))(u||{}),c=(q=>(q.auto="auto",q.ge="ge",q.le="le",q.unknown="unknown",q))(c||{}),i=(q=>(q.Ascending="Ascending",q.Descending="Descending",q))(i||{}),l=(q=>(q.Auto="auto",q.Bottom="bottom",q.Hidden="hidden",q.Left="left",q.Right="right",q.Top="top",q))(l||{}),f=(q=>(q.Series="series",q.Text="text",q))(f||{}),d=(q=>(q.Always="always",q.Auto="auto",q.Never="never",q))(d||{}),h=(q=>(q.Bars="bars",q.Line="line",q.Points="points",q))(h||{}),p=(q=>(q.Constant="constant",q.NegativeY="negative-Y",q))(p||{}),m=(q=>(q.Linear="linear",q.Smooth="smooth",q.StepAfter="stepAfter",q.StepBefore="stepBefore",q))(m||{}),a=(q=>(q.Linear="linear",q.Log="log",q.Ordinal="ordinal",q.Symlog="symlog",q))(a||{}),v=(q=>(q.Hue="hue",q.None="none",q.Opacity="opacity",q.Scheme="scheme",q))(v||{}),E=(q=>(q.None="none",q.Normal="normal",q.Percent="percent",q))(E||{}),D=(q=>(q[q.After=1]="After",q[q.Before=-1]="Before",q[q.Center=0]="Center",q))(D||{}),b=(q=>(q[q.Horizontal=0]="Horizontal",q[q.Vertical=1]="Vertical",q))(b||{}),C=(q=>(q[q.Down=-1]="Down",q[q.Left=-1]="Left",q[q.Right=1]="Right",q[q.Up=1]="Up",q))(C||{});const y={dash:[]};var M=(q=>(q.Area="area",q.Dashed="dashed",q.DashedAndArea="dashed+area",q.Line="line",q.LineAndArea="line+area",q.Off="off",q.Series="series",q))(M||{}),T=(q=>(q.Hidden="hidden",q.List="list",q.Table="table",q))(T||{});const I={calcs:[]};var x=(q=>(q.Auto="auto",q.Horizontal="horizontal",q.Vertical="vertical",q))(x||{});const S={timezone:[]};var O=(q=>(q.Background="background",q.BackgroundSolid="background_solid",q.None="none",q.Value="value",q))(O||{}),P=(q=>(q.Area="area",q.Line="line",q.None="none",q))(P||{}),L=(q=>(q.Auto="auto",q.Center="center",q))(L||{}),U=(q=>(q.Auto="auto",q.Name="name",q.None="none",q.Value="value",q.ValueAndName="value_and_name",q))(U||{}),R=(q=>(q.Multi="multi",q.None="none",q.Single="single",q))(R||{}),B=(q=>(q.Ascending="asc",q.Descending="desc",q.None="none",q))(B||{});const H={calcs:[]};var w=(q=>(q.Basic="basic",q.Gradient="gradient",q.Lcd="lcd",q))(w||{}),N=(q=>(q.Color="color",q.Hidden="hidden",q.Text="text",q))(N||{}),V=(q=>(q.Auto="auto",q.Left="left",q.Top="top",q))(V||{}),G=(q=>(q.Auto="auto",q.Manual="manual",q))(G||{}),_=(q=>(q.Auto="auto",q.BasicGauge="basic",q.ColorBackground="color-background",q.ColorBackgroundSolid="color-background-solid",q.ColorText="color-text",q.Custom="custom",q.DataLinks="data-links",q.Gauge="gauge",q.GradientGauge="gradient-gauge",q.Image="image",q.JSONView="json-view",q.LcdGauge="lcd-gauge",q.Sparkline="sparkline",q))(_||{}),K=(q=>(q.Basic="basic",q.Gradient="gradient",q))(K||{});const j={fields:[],reducer:[]};var k=(q=>(q.Lg="lg",q.Md="md",q.Sm="sm",q))(k||{}),Y=(q=>(q.CSV="csv",q.Date="date",q.Distributed="distributed",q.DoubleQuote="doublequote",q.Glob="glob",q.HTML="html",q.JSON="json",q.Lucene="lucene",q.PercentEncode="percentencode",q.Pipe="pipe",q.QueryParam="queryparam",q.Raw="raw",q.Regex="regex",q.SQLString="sqlstring",q.SingleQuote="singlequote",q.Text="text",q.UriEncode="uriencode",q))(Y||{}),ee=(q=>(q.exact="exact",q.none="none",q.numbers="numbers",q.signature="signature",q))(ee||{}),re=(q=>(q.EQ="eq",q.GT="gt",q.GTE="gte",q.LT="lt",q.LTE="lte",q.NEQ="neq",q))(re||{});const J={align:"auto",inspect:!1},ne="browser"},33623:(Q,A,e)=>{"use strict";e.d(A,{KQ:()=>o,QB:()=>s});var t=e(52622);const n="10.4.19",o={barRadius:0,barWidth:.97,fullHighlight:!1,groupWidth:.7,orientation:t.wV.Auto,showValue:t.yL.Auto,stacking:t.gs.None,xTickLabelRotation:0,xTickLabelSpacing:0},s={fillOpacity:80,gradientMode:t.on.None,lineWidth:1}},16371:(Q,A,e)=>{"use strict";e.d(A,{K:()=>o});var t=e(52622);const n="10.4.19",o={displayMode:t.eX.Gradient,maxVizHeight:300,minVizHeight:16,minVizWidth:8,namePlacement:t.TZ.Auto,showUnfilled:!0,sizing:t.T6.Auto,valueMode:t.$l.Color}},37827:(Q,A,e)=>{"use strict";e.d(A,{K:()=>n});const t="10.4.19",n={selectedSeries:0}},44955:(Q,A,e)=>{"use strict";e.d(A,{K:()=>o});var t=e(52622);const n="10.4.19",o={minVizHeight:75,minVizWidth:75,showThresholdLabels:!1,showThresholdMarkers:!0,sizing:t.T6.Auto}},87487:(Q,A,e)=>{"use strict";e.d(A,{KQ:()=>n});const t="10.4.19",n={layers:[]},o={allLayers:!0,id:"zero",lat:0,lon:0,zoom:1};var s=(g=>(g.Details="details",g.None="none",g))(s||{}),r=(g=>(g.Coords="coords",g.Fit="fit",g.Zero="zero",g))(r||{})},96529:(Q,A,e)=>{"use strict";e.d(A,{KQ:()=>r});var t=e(52622);const n="10.4.19";var o=(g=>(g.Opacity="opacity",g.Scheme="scheme",g))(o||{}),s=(g=>(g.Exponential="exponential",g.Linear="linear",g))(s||{});const r={calculate:!1,cellGap:1,cellValues:{},color:{scheme:"Oranges",fill:"dark-orange",reverse:!1,exponent:.5,steps:64},exemplars:{color:"rgba(255,0,255,0.7)"},filterValues:{le:1e-9},legend:{show:!0},showValue:t.yL.Auto,tooltip:{mode:t.$N.Single,yHistogram:!1,showColorScale:!1}}},42226:(Q,A,e)=>{"use strict";e.d(A,{KQ:()=>o,QB:()=>s});var t=e(52622);const n="10.4.19",o={bucketCount:30,bucketOffset:0},s={fillOpacity:80,gradientMode:t.on.None,lineWidth:1}},69383:(Q,A,e)=>{"use strict";e.d(A,{K:()=>n});const t="10.4.19",n={showImage:!0}},65391:(Q,A,e)=>{"use strict";e.d(A,{KQ:()=>g});const t="10.4.19";var n=(u=>(u.Donut="donut",u.Pie="pie",u))(n||{}),o=(u=>(u.Name="name",u.Percent="percent",u.Value="value",u))(o||{}),s=(u=>(u.Percent="percent",u.Value="value",u))(s||{});const r={values:[]},g={displayLabels:[]}},89607:(Q,A,e)=>{"use strict";e.d(A,{K:()=>o});var t=e(52622);const n="10.4.19",o={colorMode:t.yp.Value,graphMode:t.$p.Area,justifyMode:t.F8.Auto,showPercentChange:!1,textMode:t.SV.Auto,wideLayout:!0}},15821:(Q,A,e)=>{"use strict";e.d(A,{KQ:()=>o,QB:()=>s});var t=e(52622);const n="10.4.19",o={alignValue:"left",mergeValues:!0,rowHeight:.9,showValue:t.yL.Auto},s={fillOpacity:70,lineWidth:0}},64337:(Q,A,e)=>{"use strict";e.d(A,{KQ:()=>o,QB:()=>s});var t=e(52622);const n="10.4.19",o={colWidth:.9,rowHeight:.9,showValue:t.yL.Auto},s={fillOpacity:70,lineWidth:1}},52037:(Q,A,e)=>{"use strict";e.d(A,{K:()=>o});var t=e(52622);const n="10.4.19",o={cellHeight:t.qM.Sm,footer:{show:!1,countRows:!1,reducer:[]},frameIndex:0,showHeader:!0,showTypeIcons:!1,sortBy:[]}},12183:(Q,A,e)=>{"use strict";e.d(A,{KQ:()=>g});const t="10.4.19";var n=(u=>(u.Code="code",u.HTML="html",u.Markdown="markdown",u))(n||{}),o=(u=>(u.Go="go",u.Html="html",u.Json="json",u.Markdown="markdown",u.Plaintext="plaintext",u.Sql="sql",u.Typescript="typescript",u.Xml="xml",u.Yaml="yaml",u))(o||{});const s="plaintext",r={language:"plaintext",showLineNumbers:!1,showMiniMap:!1},g={content:`# Title
For markdown syntax help: [commonmark.org/help](https://commonmark.org/help/)`,mode:"markdown"}},10055:(Q,A,e)=>{"use strict";e.d(A,{KQ:()=>u});var t=e(52622);const n="10.4.19";var o=(c=>(c.Auto="auto",c.Manual="manual",c))(o||{}),s=(c=>(c.Lines="lines",c.Points="points",c.PointsAndLines="points+lines",c))(s||{});const r={exclude:[]},g={label:t.yL.Auto,show:"points"},u={series:[]}},73134:(Q,A,e)=>{"use strict";e.d(A,{CO:()=>g,GW:()=>M,OA:()=>D,Ol:()=>d,QB:()=>y,Ye:()=>T,ZG:()=>c,aD:()=>o,bf:()=>s,bt:()=>b,dM:()=>p,lt:()=>a,rw:()=>r,ss:()=>C,yV:()=>v});const t={tags:[]},n={exclude:!1,ids:[]},o={list:[]},s={builtIn:0,enable:!0,hide:!1},r={includeAll:!1,multi:!1,options:[],skipUrlSync:!1};var g=(I=>(I[I.never=0]="never",I[I.onDashboardLoad=1]="onDashboardLoad",I[I.onTimeRangeChanged=2]="onTimeRangeChanged",I))(g||{}),u=(I=>(I[I.dontHide=0]="dontHide",I[I.hideLabel=1]="hideLabel",I[I.hideVariable=2]="hideVariable",I))(u||{}),c=(I=>(I[I.alphabeticalAsc=1]="alphabeticalAsc",I[I.alphabeticalCaseInsensitiveAsc=5]="alphabeticalCaseInsensitiveAsc",I[I.alphabeticalCaseInsensitiveDesc=6]="alphabeticalCaseInsensitiveDesc",I[I.alphabeticalDesc=2]="alphabeticalDesc",I[I.disabled=0]="disabled",I[I.naturalAsc=7]="naturalAsc",I[I.naturalDesc=8]="naturalDesc",I[I.numericalAsc=3]="numericalAsc",I[I.numericalDesc=4]="numericalDesc",I))(c||{});const i={asDropdown:!1,includeVars:!1,keepTime:!1,tags:[],targetBlank:!1};var l=(I=>(I.ContinuousBlPu="continuous-BlPu",I.ContinuousBlYlRd="continuous-BlYlRd",I.ContinuousBlues="continuous-blues",I.ContinuousGrYlRd="continuous-GrYlRd",I.ContinuousGreens="continuous-greens",I.ContinuousPurples="continuous-purples",I.ContinuousRdYlGr="continuous-RdYlGr",I.ContinuousReds="continuous-reds",I.ContinuousYlBl="continuous-YlBl",I.ContinuousYlRd="continuous-YlRd",I.Fixed="fixed",I.PaletteClassic="palette-classic",I.PaletteClassicByName="palette-classic-by-name",I.Shades="shades",I.Thresholds="thresholds",I))(l||{});const f={h:9,w:12,x:0,y:0};var d=(I=>(I.Absolute="absolute",I.Percentage="percentage",I))(d||{});const h={steps:[]};var p=(I=>(I.RangeToText="range",I.RegexToText="regex",I.SpecialValue="special",I.ValueToText="value",I))(p||{}),m=(I=>(I.Empty="empty",I.False="false",I.NaN="nan",I.Null="null",I.NullAndNan="null+nan",I.True="true",I))(m||{});const a={hidden:!1,refresh_intervals:["5s","10s","30s","1m","5m","15m","30m","1h","2h","1d"],time_options:["5m","15m","1h","6h","12h","24h","2d","7d","30d"]};var v=(I=>(I[I.Crosshair=1]="Crosshair",I[I.Off=0]="Off",I[I.Tooltip=2]="Tooltip",I))(v||{});const E=0,D={links:[],repeatDirection:"h",targets:[],transformations:[],transparent:!1},b={overrides:[]},C={id:""},y={links:[],mappings:[]},M={collapsed:!1,panels:[]},T={editable:!0,fiscalYearStartMonth:0,graphTooltip:0,links:[],panels:[],schemaVersion:36,tags:[],timezone:"browser"}},39651:(Q,A,e)=>{"use strict";e.d(A,{Gu:()=>o,gB:()=>n});var t=e(52622);const n={align:"auto",inspect:!1,cellOptions:{type:t.ob.Auto}};var o=(s=>(s.NotStarted="NotStarted",s.Loading="Loading",s.Streaming="Streaming",s.Done="Done",s.Error="Error",s))(o||{})},79422:(Q,A,e)=>{"use strict";e.d(A,{Ye:()=>o,lt:()=>r,rw:()=>s,zL:()=>n});var t=e(73134),n=(h=>(h[h.dontHide=0]="dontHide",h[h.hideLabel=1]="hideLabel",h[h.hideVariable=2]="hideVariable",h))(n||{});const o=t.Ye,s={...t.rw},r=t.lt,g=t.OA,u=t.GW,c=t.QB,i=t.bt,l=t.ss,f=t.bf,d=t.aD},42418:(Q,A,e)=>{"use strict";e.d(A,{F:()=>i,H:()=>l});var t=e(32196),n=e(96540),o=e(13544),s=e(40845),r=e(55852),g=e(14578),u=e(90613),c=e(94753);const i=n.forwardRef(({title:d,onRemove:h,children:p,buttonContent:m,elevated:a,bottomSpacing:v,topSpacing:E,className:D,severity:b="error",...C},y)=>{const M=(0,s.$j)(),I=f(M,b,!!d,a,v,E),x={error:"alert",warning:"alert",info:"status",success:"status"},S=C.role||x[b],O=C["aria-label"]||d;return n.createElement("div",{ref:y,className:(0,t.cx)(I.wrapper,D),role:S,"aria-label":O,...C},n.createElement(u.a,{"data-testid":o.Tp.components.Alert.alertV2(b),display:"flex",backgroundColor:b,borderRadius:"default",paddingY:1,paddingX:2,borderStyle:"solid",borderColor:b,alignItems:"stretch",boxShadow:a?"z3":void 0},n.createElement(u.a,{paddingTop:1,paddingRight:2},n.createElement("div",{className:I.icon},n.createElement(g.I,{size:"xl",name:l(b)}))),n.createElement(u.a,{paddingY:1,grow:1},n.createElement(c.E,{color:"primary",weight:"medium"},d),p&&n.createElement("div",{className:I.content},p)),h&&!m&&n.createElement("div",{className:I.close},n.createElement(r.$n,{"aria-label":"Close alert",icon:"times",onClick:h,type:"button",fill:"text",variant:"secondary"})),h&&m&&n.createElement(u.a,{marginLeft:1,display:"flex",alignItems:"center"},n.createElement(r.$n,{"aria-label":"Close alert",variant:"secondary",onClick:h,type:"button"},m))))});i.displayName="Alert";const l=d=>{switch(d){case"error":return"exclamation-circle";case"warning":return"exclamation-triangle";case"info":return"info-circle";case"success":return"check"}},f=(d,h,p,m,a,v)=>{const E=d.colors[h];return{wrapper:(0,t.css)({flexGrow:1,marginBottom:d.spacing(a??2),marginTop:d.spacing(v??0),position:"relative","&:before":{content:'""',position:"absolute",top:0,left:0,bottom:0,right:0,background:d.colors.background.primary,zIndex:-1}}),icon:(0,t.css)({color:E.text}),content:(0,t.css)({color:d.colors.text.primary,paddingTop:p?d.spacing(.5):0,maxHeight:"50vh",overflowY:"auto"}),close:(0,t.css)({position:"relative",color:d.colors.text.secondary,background:"none",display:"flex",top:"-6px",right:"-14px"})}}},28270:(Q,A,e)=>{"use strict";e.d(A,{p:()=>h});var t=e(32196),n=e(2543),o=e(96540),s=e(40845),r=e(88575),g=e(32982);const u=o.memo(()=>{const m=(0,s.of)(c);return o.createElement("div",{className:m.ellipsis},o.createElement("span",{className:m.firstDot},"."),o.createElement("span",{className:m.secondDot},"."),o.createElement("span",{className:m.thirdDot},"."))});u.displayName="EllipsisAnimated";const c=()=>({ellipsis:(0,t.css)({display:"inline"}),firstDot:(0,t.css)({animation:`${i} 2s linear infinite`}),secondDot:(0,t.css)({animation:`${l} 2s linear infinite`}),thirdDot:(0,t.css)({animation:`${f} 2s linear infinite`})}),i=(0,t.keyframes)`
0% {
opacity: 1;
}
65% {
opacity: 1;
}
66% {
opacity: 0.5;
}
100% {
opacity: 0;
}
`,l=(0,t.keyframes)`
0% {
opacity: 0;
}
21% {
opacity: 0.5;
}
22% {
opacity: 1;
}
65% {
opacity: 1;
}
66% {
opacity: 0.5;
}
100% {
opacity: 0;
}
`,f=(0,t.keyframes)`
0% {
opacity: 0;
}
43% {
opacity: 0.5;
}
44% {
opacity: 1;
}
65% {
opacity: 1;
}
66% {
opacity: 0.5;
}
100% {
opacity: 0;
}
`,d=2*1e3;function h(m){const{invalid:a,loading:v,onFinishChange:E,saveErrorMessage:D="Error saving this value",error:b,children:C,disabled:y,...M}=m,[T,I]=o.useState({isLoading:!1,showSuccess:!1,showError:a}),x=(0,o.useRef)(null);o.useEffect(()=>{let U;if(T.showSuccess){const R=T.showError?0:d;U=setTimeout(()=>{I({...T,showSuccess:!1})},R)}return()=>{window.clearTimeout(U)}},[T]);const S=(0,o.useCallback)(U=>{a||(I({...T,isLoading:!0,showSuccess:!1}),E(U).then(()=>{I({isLoading:!1,showSuccess:!0,showError:!1})}).catch(()=>{I({...T,isLoading:!1,showError:!0})}))},[a,T,E]),O=(0,o.useMemo)(()=>(0,n.debounce)(S,600,{leading:!1}),[S]),P=a||T.showError||void 0,L=(0,s.of)(p);return o.createElement(o.Fragment,null,o.createElement(r.D,{...M,loading:v||void 0,invalid:P,disabled:y,error:b||T.showError&&D,ref:x,className:L.widthFitContent},o.cloneElement(C(U=>{O(U)}))),T.isLoading&&o.createElement(g.r,{referenceElement:x.current,placement:"right"},"Saving ",o.createElement(u,null)),T.showSuccess&&o.createElement(g.r,{suffixIcon:"check",referenceElement:x.current,placement:"right"},"Saved!"))}h.displayName="AutoSaveField";const p=()=>({widthFitContent:(0,t.css)({width:"fit-content"})})},39938:(Q,A,e)=>{"use strict";e.d(A,{E:()=>f});var t=e(32196),n=e(96540),o=e(70255),s=e(84140),r=e(40845),g=e(72129),u=e(14578),c=e(56034);const i=n.memo(({icon:p,color:m,text:a,tooltip:v,className:E,...D})=>{const b=(0,r.of)(h,m),C=n.createElement("div",{className:(0,t.cx)(b.wrapper,E),...D},p&&n.createElement(u.I,{name:p,size:"sm"}),a);return v?n.createElement(c.m,{content:v,placement:"auto"},C):C});i.displayName="Badge";const l=({rootProps:p})=>{const m=(0,r.of)(d);return n.createElement(o.A,{width:60,height:22,containerClassName:m.container,...p})},f=(0,g.j)(i,l),d=()=>({container:(0,t.css)({lineHeight:1})}),h=(p,m)=>{let a=p.visualization.getColorByName(m),v="",E="",D="";return p.isDark?(E=(0,s.A)(a).setAlpha(.15).toString(),v=(0,s.A)(a).setAlpha(.25).toString(),D=(0,s.A)(a).lighten(15).toString()):(E=(0,s.A)(a).setAlpha(.15).toString(),v=(0,s.A)(a).setAlpha(.25).toString(),D=(0,s.A)(a).darken(20).toString()),{wrapper:(0,t.css)({display:"inline-flex",padding:"1px 4px",borderRadius:p.shape.radius.default,background:E,border:`1px solid ${v}`,color:D,fontWeight:p.typography.fontWeightRegular,gap:"2px",fontSize:p.typography.bodySmall.fontSize,lineHeight:p.typography.bodySmall.lineHeight,alignItems:"center"})}}},97696:(Q,A,e)=>{"use strict";e.d(A,{xE:()=>C});var t=e(32196),n=e(96540),o=e(84140),s=e(58649),r=e(47070),g=e(50082),u=e(83195),c=e(24293),i=e(8066),l=e(13544),f=e(52622),d=e(29413),h=e(55852),p=e(9286);const m=18,a=50,v=150,E=1.5,D=1,b=10;class C extends n.PureComponent{render(){const{onClick:B,className:H,theme:w}=this.props,{title:N}=this.props.value,V=T(this.props);return B?n.createElement("button",{type:"button",style:V.wrapper,onClick:B,className:(0,t.cx)((0,h.my)(w),H)},n.createElement("div",{style:V.title},N),this.renderBarAndValue()):n.createElement("div",{style:V.wrapper,className:H},N&&n.createElement("div",{style:V.title},N),this.renderBarAndValue())}renderBarAndValue(){switch(this.props.displayMode){case"lcd":return this.renderRetroBars();case"basic":case"gradient":default:return this.renderBasicAndGradientBars()}}renderBasicAndGradientBars(){const{value:B,showUnfilled:H,valueDisplayMode:w}=this.props,N=O(this.props);return n.createElement("div",{style:N.wrapper},w!==f.$l.Hidden&&n.createElement(p.i,{"data-testid":l.Tp.components.Panels.Visualization.BarGauge.valueV2,value:B,style:N.value}),H&&n.createElement("div",{style:N.emptyBar}),n.createElement("div",{style:N.bar}))}renderRetroBars(){const{display:B,field:H,value:w,itemSpacing:N,alignmentFactors:V,orientation:G,lcdCellWidth:_,text:K,valueDisplayMode:j,theme:k}=this.props,{valueHeight:Y,valueWidth:ee,maxBarHeight:re,maxBarWidth:J,wrapperWidth:ne,wrapperHeight:q}=I(this.props),te=H.min??s.tw,oe=H.max??s.d1,ue=y(G),ie=oe-te,ge=ue?re:J,he=N,De=Math.floor(ge/_),pe=Math.floor((ge-he*De)/De),le=L(this.props),Ee=U(V||w,le,ee,Y,G,K),Re={width:`${ne}px`,height:`${q}px`,display:"flex"};ue?(Re.flexDirection="column-reverse",Re.alignItems="center"):(Re.flexDirection="row",Re.alignItems="center",Ee.justifyContent="flex-end");const me=[];for(let Me=0;Me40&&G===f.TZ.Auto||G===f.TZ.Top){if(V?.titleSize)return{fontSize:V?.titleSize,width:0,height:V.titleSize*E,placement:"above"};const ne=Math.max(Math.min(B*.45,a),17);return{fontSize:ne/E,width:0,height:ne,placement:"above"}}const Y=Math.max(B*.6,m)/E,ee=(0,d.kD)(_,Y),re=Math.min(ee.width+15,H*.4);return{fontSize:V?.titleSize??Y,height:0,width:re,placement:"left"}}function T(R){const B={display:"flex",overflow:"hidden",width:"100%"},H=M(R),w={fontSize:`${H.fontSize}px`,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",width:"100%",alignItems:"center",alignSelf:"center"};return y(R.orientation)?(B.flexDirection="column-reverse",w.textAlign="center"):H.placement==="above"?B.flexDirection="column":(B.flexDirection="row",w.width=`${H.width}px`,w.textAlign="right",w.paddingRight="10px"),{wrapper:B,title:w}}function I(R){const{height:B,width:H,orientation:w,text:N,alignmentFactors:V,valueDisplayMode:G}=R,_=M(R),K=V??R.value,j=(0,u.cN)(K);let k=0,Y=0,ee=0,re=0,J=0,ne=0;const q=N?.valueSize??Math.max(_.fontSize,12),oe=(0,d.kD)(j,q).width+b*2;return y(w)?(N?.valueSize?ee=N.valueSize*D:ee=Math.min(Math.max(B*.1,m),a),re=H,G===f.$l.Hidden&&(ee=0,re=0),k=B-(_.height+ee),Y=H,J=H,ne=B-_.height):(G===f.$l.Hidden?(ee=0,re=0):(ee=B-_.height,re=Math.max(Math.min(H*.2,v),oe)),k=B-_.height,Y=H-re-_.width,_.placement==="above"?(J=H,ne=B-_.height):(J=H-_.width,ne=B)),{valueWidth:re,valueHeight:ee,maxBarWidth:Y,maxBarHeight:k,wrapperHeight:ne,wrapperWidth:J}}function x(R,B,H){if(R===null)return{background:c.F,border:c.F};const w=H?H(R).color:null;return w?B===null||isNaN(B.numeric)||R!==null&&R>B.numeric?{background:(0,o.A)(w).setAlpha(.18).toRgbString(),border:"transparent",isLit:!1}:{background:(0,o.A)(w).setAlpha(.95).toRgbString(),backgroundShade:(0,o.A)(w).setAlpha(.55).toRgbString(),border:(0,o.A)(w).setAlpha(.9).toRgbString(),isLit:!0}:{background:c.F,border:c.F}}function S(R,B,H){const w=Math.min((R-B)/(H-B),1);return isNaN(w)?0:w}function O(R){const{displayMode:B,field:H,value:w,alignmentFactors:N,orientation:V,theme:G,text:_}=R,{valueWidth:K,valueHeight:j,maxBarHeight:k,maxBarWidth:Y}=I(R),ee=H.min??s.tw,re=H.max??s.d1,J=S(w.numeric,ee,re),ne=L(R),q=w.color??c.F,oe=U(N||w,ne,K,j,V,_),ue=B==="basic",ie={display:"flex",flexGrow:1},ge={borderRadius:G.shape.radius.default,position:"relative",zIndex:1},he={background:G.colors.background.secondary,flexGrow:1,display:"flex",borderRadius:G.shape.radius.default,position:"relative"};if(y(V)){const De=Math.max(J*k,1);ie.flexDirection="column",ie.justifyContent="flex-end",ge.transition="height 1s",ge.height=`${De}px`,ge.width=`${Y}px`,he.bottom="-3px",he.width=`${K}px`,ue?(ge.background=`${(0,o.A)(q).setAlpha(.35).toRgbString()}`,ge.borderTop=`2px solid ${q}`):ge.background=P(R,k)}else{const De=Math.max(J*Y,1);ie.flexDirection="row-reverse",ie.justifyContent="flex-end",ie.alignItems="stretch",ge.transition="width 1s",ge.height=`${k}px`,ge.width=`${De}px`,he.left="-3px",he.height=`${j}px`,ue?(ge.background=`${(0,o.A)(q).setAlpha(.35).toRgbString()}`,ge.borderRight=`2px solid ${q}`):ge.background=P(R,Y)}return{wrapper:ie,bar:ge,value:oe,emptyBar:he}}function P(R,B){const{field:H,value:w,orientation:N,theme:V}=R,G=y(N)?"0deg":"90deg",_=H.min,K=H.max;let j="",k=0,Y=(0,i.Hs)(H.color?.mode);if(Y.id===c.Y.Thresholds){const ee=H.thresholds;for(let re=0;re{"use strict";e.d(A,{yV:()=>L,yp:()=>x,$p:()=>S,F8:()=>O,SV:()=>P});var t=e(32196),n=e(96540),o=e(55852),s=e(9286),r=e(84140),g=e(11261),u=e(83195),c=e(52622),i=e(24284),l=e(29413),f=e(5926),d=e(14578);const h=({percentChange:U,styles:R})=>{const B=U&&(U>0?"arrow-up":U<0?"arrow-down":void 0);return n.createElement("div",{style:R.containerStyles},B&&n.createElement(d.I,{name:B,height:R.iconSize,width:R.iconSize,viewBox:"6 6 12 12"}),p(U))},p=U=>U?.toLocaleString(void 0,{style:"percent",maximumSignificantDigits:3})??"",m=1.2,a=30,v=500;class E{constructor(R){this.props=R;const{width:B,height:H,value:w,text:N}=R;this.valueColor=w.color??"gray",this.panelPadding=H>100?12:8,this.textValues=I(R),this.justifyCenter=T(R.justifyMode,this.textValues.title),this.valueToAlignTo=this.textValues.valueToAlignTo,this.titleToAlignTo=this.textValues.titleToAlignTo,this.titleFontSize=0,this.valueFontSize=0,this.chartHeight=0,this.chartWidth=0,this.maxTextWidth=B-this.panelPadding*2,this.maxTextHeight=H-this.panelPadding*2,N&&(N.titleSize&&(this.titleFontSize=N.titleSize,this.titleToAlignTo=void 0),N.valueSize&&(this.valueFontSize=N.valueSize,this.valueToAlignTo=""))}getTitleStyles(){const R={fontSize:`${this.titleFontSize}px`,lineHeight:m};return(this.props.colorMode===x.Background||this.props.colorMode===x.BackgroundSolid)&&(R.color=(0,i.mZ)(this.valueColor,this.props.theme.isDark)),R}getValueStyles(){const R={fontSize:this.valueFontSize,fontWeight:v,lineHeight:m,position:"relative",zIndex:1};switch(this.justifyCenter&&(R.textAlign="center"),this.props.colorMode){case x.Value:R.color=this.valueColor;break;case x.Background:case x.BackgroundSolid:R.color=(0,i.mZ)(this.valueColor,this.props.theme.isDark);break;case x.None:R.color=this.props.theme.colors.text.primary;break}return R}getPercentChangeStyles(R){const H=this.getValueAndTitleContainerStyles(),w=Math.max(this.valueFontSize/2.5,12);let N=Math.max(this.valueFontSize/3,10);const V=R>0?this.props.theme.visualization.getColorByName("green"):this.props.theme.visualization.getColorByName("red"),G={fontSize:w,fontWeight:v,lineHeight:m,position:"relative",display:"flex",alignItems:"center",gap:Math.max(w/3,4),zIndex:1,color:V};switch(this.justifyCenter&&(G.textAlign="center"),H.flexDirection==="column"&&w>12&&(G.marginTop=-(w/4)),H.flexDirection==="row"&&(G.alignItems="baseline",G.lineHeight=m*2.5),this.props.colorMode){case x.Background:case x.BackgroundSolid:G.color=(0,i.mZ)(this.valueColor,this.props.theme.isDark);break}return this.props.textMode===P.None&&(G.fontSize=(0,l.Vr)(p(R),this.maxTextWidth*.8,this.maxTextHeight*.8,m,void 0,v),N=G.fontSize*.8),{containerStyles:G,iconSize:N}}getValueAndTitleContainerStyles(){const R={display:"flex",flexWrap:"wrap"};return this.justifyCenter&&(R.alignItems="center",R.justifyContent="center",R.flexGrow=1,R.gap="0.75ch"),R}getPanelStyles(){const{width:R,height:B,theme:H,colorMode:w,textMode:N}=this.props,V={width:`${R}px`,height:`${B}px`,padding:`${N===P.None?2:this.panelPadding}px`,borderRadius:H.shape.radius.default,position:"relative",display:"flex"},G=H.isDark?1:-.7;switch(w){case x.Background:const _=(0,r.A)(this.valueColor).darken(15*G).spin(8).toRgbString(),K=(0,r.A)(this.valueColor).darken(5*G).spin(-8).toRgbString();V.background=`linear-gradient(120deg, ${_}, ${K})`;break;case x.BackgroundSolid:V.background=(0,r.A)(this.valueColor).toString();break;case x.Value:V.background="transparent";break}return this.justifyCenter&&(V.alignItems="center",V.flexDirection="row"),V}renderChart(){const{sparkline:R,colorMode:B}=this.props;if(!R||R.y?.type!==g.PU.number)return null;let H,w;switch(B){case x.Background:case x.BackgroundSolid:H="rgba(255,255,255,0.4)",w=(0,r.A)(this.valueColor).brighten(40).toRgbString();break;case x.None:case x.Value:default:w=this.valueColor,H=(0,r.A)(this.valueColor).setAlpha(.2).toRgbString();break}const N={custom:{drawStyle:c.GR.Line,lineWidth:1,fillColor:H,lineColor:w}};return n.createElement("div",{style:this.getChartStyles()},n.createElement(f.O,{height:this.chartHeight,width:this.chartWidth,sparkline:R,config:N,theme:this.props.theme}))}getChartStyles(){return{position:"absolute",right:0,bottom:0}}}class D extends E{constructor(R){super(R);const B=this.titleToAlignTo?.length?.3:1;this.valueToAlignTo.length&&(this.valueFontSize=(0,l.Vr)(this.valueToAlignTo,this.maxTextWidth*B,this.maxTextHeight,m,void 0,v)),this.titleToAlignTo?.length&&(this.titleFontSize=(0,l.Vr)(this.titleToAlignTo,this.maxTextWidth*.6,this.maxTextHeight,m,a),this.titleFontSize=Math.min(this.valueFontSize*.7,this.titleFontSize))}getValueAndTitleContainerStyles(){const R=super.getValueAndTitleContainerStyles();return R.flexDirection="row",R.alignItems="center",R.flexGrow=1,this.justifyCenter||(R.justifyContent="space-between"),R}renderChart(){return null}getPanelStyles(){const R=super.getPanelStyles();return R.alignItems="center",R}}class b extends E{constructor(R){super(R);const{width:B,height:H}=R,w=.5,N=.6,V=1-N,G=.4;this.chartWidth=B,this.chartHeight=H*w,this.titleToAlignTo?.length&&(this.titleFontSize=(0,l.Vr)(this.titleToAlignTo,this.maxTextWidth*N,this.maxTextHeight*G,m,a)),this.valueToAlignTo.length&&(this.valueFontSize=(0,l.Vr)(this.valueToAlignTo,this.maxTextWidth*V,this.maxTextHeight*w,m,void 0,v))}getValueAndTitleContainerStyles(){const R=super.getValueAndTitleContainerStyles();return R.flexDirection="row",R.flexGrow=1,this.justifyCenter||(R.justifyContent="space-between"),R}getPanelStyles(){const R=super.getPanelStyles();return R.flexDirection="row",R.justifyContent="space-between",R}}class C extends E{constructor(R){super(R);const{width:B,height:H}=R,w=.15,N=.25;let V=0;this.chartHeight=H*N,this.chartWidth=B,this.titleToAlignTo?.length&&(this.titleFontSize=(0,l.Vr)(this.titleToAlignTo,this.maxTextWidth,H*w,m,a),V=this.titleFontSize*m),this.valueToAlignTo.length&&(this.valueFontSize=(0,l.Vr)(this.valueToAlignTo,this.maxTextWidth,this.maxTextHeight-this.chartHeight-V,m,void 0,v)),this.titleToAlignTo?.length&&(this.titleFontSize=Math.min(this.valueFontSize*.7,this.titleFontSize)),this.chartHeight=H-this.titleFontSize*m-this.valueFontSize*m}getValueAndTitleContainerStyles(){const R=super.getValueAndTitleContainerStyles();return R.flexDirection="column",R.justifyContent="center",R}getPanelStyles(){const R=super.getPanelStyles();return R.flexDirection="column",R}}class y extends E{constructor(R){super(R);const{height:B}=R,H=.15;let w=0;this.titleToAlignTo?.length&&(this.titleFontSize=(0,l.Vr)(this.titleToAlignTo,this.maxTextWidth,B*H,m,a),w=this.titleFontSize*m),this.valueToAlignTo.length&&(this.valueFontSize=(0,l.Vr)(this.valueToAlignTo,this.maxTextWidth,this.maxTextHeight-w,m,void 0,v)),this.titleToAlignTo?.length&&(this.titleFontSize=Math.min(this.valueFontSize*.7,this.titleFontSize))}getValueAndTitleContainerStyles(){const R=super.getValueAndTitleContainerStyles();return R.flexDirection="column",R.flexGrow=1,R}renderChart(){return null}getPanelStyles(){const R=super.getPanelStyles();return R.alignItems="center",R}}function M(U){const{width:R,height:B,sparkline:H}=U;return R/B>2.5&&!U.disableWideLayout?B>50&&H&&H.y.values.length>1?new b(U):new D(U):B>100&&H&&H.y.values.length>1?new C(U):new y(U)}function T(U,R){return U===O.Center?!0:(R??"").length===0}function I(U){const{value:R,alignmentFactors:B,count:H}=U;let{textMode:w}=U;const N=B?B.title:R.title,V=(0,u.cN)(B||R);switch(w===P.Auto&&(H??1)===1&&(w=P.Value),w){case P.Name:return{...R,title:void 0,prefix:void 0,suffix:void 0,text:R.title||"",titleToAlignTo:void 0,valueToAlignTo:N??"",tooltip:(0,u.cN)(R)};case P.Value:return{...R,title:void 0,titleToAlignTo:void 0,valueToAlignTo:V,tooltip:R.title};case P.None:return{numeric:R.numeric,color:R.color,title:void 0,text:"",titleToAlignTo:void 0,valueToAlignTo:"1",tooltip:`Name: ${R.title}
Value: ${(0,u.cN)(R)}`};case P.ValueAndName:default:return{...R,titleToAlignTo:N,valueToAlignTo:V}}}var x=(U=>(U.Background="background",U.BackgroundSolid="background_solid",U.None="none",U.Value="value",U))(x||{}),S=(U=>(U.None="none",U.Line="line",U.Area="area",U))(S||{}),O=(U=>(U.Auto="auto",U.Center="center",U))(O||{}),P=(U=>(U.Auto="auto",U.Value="value",U.ValueAndName="value_and_name",U.Name="name",U.None="none",U))(P||{});class L extends n.PureComponent{render(){const{onClick:R,className:B,hasLinks:H,theme:w}=this.props,N=M(this.props),V=N.getPanelStyles(),G=N.getValueAndTitleContainerStyles(),_=N.getValueStyles(),K=N.getTitleStyles(),j=N.textValues,k=this.props.value.percentChange,Y=k!=null&&!Number.isNaN(k),ee=H?void 0:j.tooltip;return R?n.createElement("button",{type:"button",className:(0,t.cx)((0,o.my)(w),B),style:V,onClick:R,title:ee},n.createElement("div",{style:G},j.title&&n.createElement("div",{style:K},j.title),n.createElement(s.i,{value:j,style:_})),N.renderChart()):n.createElement("div",{className:B,style:V,title:ee},n.createElement("div",{style:G},j.title&&n.createElement("div",{style:K},j.title),n.createElement(s.i,{value:j,style:_}),Y&&n.createElement(h,{percentChange:k,styles:N.getPercentChangeStyles(k)})),N.renderChart())}}L.defaultProps={justifyMode:"auto"}},54438:(Q,A,e)=>{"use strict";e.d(A,{J:()=>u});var t=e(32196),n=e(96540),o=e(23257),s=e.n(o),r=e(40845),g=e(5313);const u=(0,n.forwardRef)(({name:i,value:l,hidden:f,facets:d,onClick:h,className:p,loading:m,searchTerm:a,active:v,style:E,title:D,highlightParts:b,...C},y)=>{const M=(0,r.$j)(),T=c(M),I=a?[a]:[],x=(0,n.useCallback)(O=>{h&&!f&&h(i,l,O)},[h,i,f,l]);let S=l||i;return d&&(S=`${S} (${d})`),n.createElement("button",{key:S,ref:y,onClick:x,style:E,title:D||S,type:"button",role:"option","aria-selected":!!v,className:(0,t.cx)(T.base,v&&T.active,m&&T.loading,f&&T.hidden,p,h&&!f&&T.hover),...C},b!==void 0?n.createElement(g.z,{text:S,highlightClassName:T.matchHighLight,highlightParts:b}):n.createElement(s(),{textToHighlight:S,searchWords:I,autoEscape:!0,highlightClassName:T.matchHighLight}))});u.displayName="Label";const c=i=>({base:(0,t.css)({display:"inline-block",cursor:"pointer",fontSize:i.typography.size.sm,lineHeight:i.typography.bodySmall.lineHeight,backgroundColor:i.colors.background.secondary,color:i.colors.text.primary,whiteSpace:"nowrap",textShadow:"none",padding:i.spacing(.5),borderRadius:i.shape.radius.default,border:"none",marginRight:i.spacing(1),marginBottom:i.spacing(.5)}),loading:(0,t.css)({fontWeight:i.typography.fontWeightMedium,backgroundColor:i.colors.primary.shade,color:i.colors.text.primary,animation:"pulse 3s ease-out 0s infinite normal forwards","@keyframes pulse":{"0%":{color:i.colors.text.primary},"50%":{color:i.colors.text.secondary},"100%":{color:i.colors.text.disabled}}}),active:(0,t.css)({fontWeight:i.typography.fontWeightMedium,backgroundColor:i.colors.primary.main,color:i.colors.primary.contrastText}),matchHighLight:(0,t.css)({background:"inherit",color:i.components.textHighlight.text,backgroundColor:i.components.textHighlight.background}),hidden:(0,t.css)({opacity:.6,cursor:"default",border:"1px solid transparent"}),hover:(0,t.css)({["&:hover"]:{opacity:.85,cursor:"pointer"}})})},55852:(Q,A,e)=>{"use strict";e.d(A,{$n:()=>l,Ez:()=>v,U_:()=>m,hs:()=>d,my:()=>a,z9:()=>f});var t=e(32196),n=e(96540),o=e(40845),s=e(16797),r=e(87266),g=e(14578),u=e(56034);const c=null,i=null,l=n.forwardRef(({variant:E="primary",size:D="md",fill:b="solid",icon:C,fullWidth:y,children:M,className:T,type:I="button",tooltip:x,tooltipPlacement:S,...O},P)=>{const L=(0,o.$j)(),U=d({theme:L,size:D,variant:E,fill:b,fullWidth:y,iconOnly:!M}),R=n.createElement("button",{className:(0,t.cx)(U.button,T),type:I,...O,ref:x?void 0:P},C&&n.createElement(g.I,{name:C,size:D,className:U.icon}),M&&n.createElement("span",{className:U.content},M));return x?n.createElement(u.m,{ref:P,content:x,placement:S},R):R});l.displayName="Button";const f=n.forwardRef(({variant:E="primary",size:D="md",fill:b="solid",icon:C,fullWidth:y,children:M,className:T,onBlur:I,onFocus:x,disabled:S,tooltip:O,tooltipPlacement:P,...L},U)=>{const R=(0,o.$j)(),B=d({theme:R,fullWidth:y,size:D,variant:E,fill:b,iconOnly:!M}),H=(0,t.cx)(B.button,{[(0,t.css)(B.disabled,{pointerEvents:"none"})]:S},T),w=n.createElement("a",{className:H,...L,tabIndex:S?-1:0,"aria-disabled":S,ref:O?void 0:U},C&&n.createElement(g.I,{name:C,size:D,className:B.icon}),M&&n.createElement("span",{className:B.content},M));return O?n.createElement(u.m,{ref:U,content:O,placement:P},w):w});f.displayName="LinkButton";const d=E=>{const{theme:D,variant:b,fill:C="solid",size:y,iconOnly:M,fullWidth:T}=E,{height:I,padding:x,fontSize:S}=(0,r.SM)(y,D),O=m(D,b,C),P=p(D,b,C),L=(0,s.getFocusStyles)(D),U=D.spacing.gridSize*x-1;return{button:(0,t.css)({label:"button",display:"inline-flex",alignItems:"center",fontSize:S,fontWeight:D.typography.fontWeightMedium,fontFamily:D.typography.fontFamily,padding:`0 ${U}px`,height:D.spacing(I),lineHeight:`${D.spacing.gridSize*I-2}px`,verticalAlign:"middle",cursor:"pointer",borderRadius:D.shape.radius.default,"&:focus":L,"&:focus-visible":L,"&:focus:not(:focus-visible)":(0,s.getMouseFocusStyles)(D),...T&&{flexGrow:1,justifyContent:"center"},...O,":disabled":P,"&[disabled]":P}),disabled:(0,t.css)(P),img:(0,t.css)({width:"16px",height:"16px",margin:D.spacing(0,1,0,.5)}),icon:M?(0,t.css)({marginRight:D.spacing(-x/2),marginLeft:D.spacing(-x/2)}):(0,t.css)({marginRight:D.spacing(x/2)}),content:(0,t.css)({display:"flex",flexDirection:"row",alignItems:"center",whiteSpace:"nowrap",overflow:"hidden",height:"100%"})}};function h(E,D,b){let C=D.border,y="transparent",M="transparent";return D.name==="secondary"&&(y=D.border,M=E.colors.emphasize(D.border,.25),C=E.colors.border.strong),b==="outline"?{background:"transparent",color:D.text,border:`1px solid ${C}`,transition:E.transitions.create(["background-color","border-color","color"],{duration:E.transitions.duration.short}),"&:hover":{background:D.transparent,borderColor:E.colors.emphasize(C,.25),color:D.text}}:b==="text"?{background:"transparent",color:D.text,border:"1px solid transparent",transition:E.transitions.create(["background-color","color"],{duration:E.transitions.duration.short}),"&:focus":{outline:"none",textDecoration:"none"},"&:hover":{background:D.transparent,textDecoration:"none"}}:{background:D.main,color:D.contrastText,border:`1px solid ${y}`,transition:E.transitions.create(["background-color","box-shadow","border-color","color"],{duration:E.transitions.duration.short}),"&:hover":{background:D.shade,color:D.contrastText,boxShadow:E.shadows.z1,borderColor:M}}}function p(E,D,b){const C={cursor:"not-allowed",boxShadow:"none",color:E.colors.text.disabled,transition:"none"};return b==="text"?{...C,background:"transparent",border:"1px solid transparent"}:b==="outline"?{...C,background:"transparent",border:`1px solid ${E.colors.border.weak}`}:{...C,background:E.colors.action.disabledBackground,border:"1px solid transparent"}}function m(E,D,b){switch(D){case"secondary":return h(E,E.colors.secondary,b);case"destructive":return h(E,E.colors.error,b);case"success":return h(E,E.colors.success,b);case"primary":default:return h(E,E.colors.primary,b)}}const a=E=>(0,t.css)({background:"transparent",color:E.colors.text.primary,border:"none",padding:0}),v=E=>(0,t.css)({background:"transparent",border:"none",padding:0,fontFamily:"inherit",color:"inherit",height:"100%","&:hover":{background:"transparent",color:"inherit"}})},19727:(Q,A,e)=>{"use strict";e.d(A,{e:()=>s});var t=e(32196),n=e(96540),o=e(40845);const s=(0,n.forwardRef)(({className:g,children:u,...c},i)=>{const l=(0,o.of)(r);return n.createElement("div",{ref:i,className:(0,t.cx)("button-group",l.wrapper,g),...c},u)});s.displayName="ButtonGroup";const r=g=>({wrapper:(0,t.css)({display:"flex","> .button-group:not(:first-child) > button, > button:not(:first-child)":{borderTopLeftRadius:0,borderBottomLeftRadius:0},"> .button-group:not(:last-child) > button, > button:not(:last-child)":{borderTopRightRadius:0,borderBottomRightRadius:0,borderRightWidth:0}})})},61458:(Q,A,e)=>{"use strict";e.d(A,{V:()=>s});var t=e(32196),n=e(96540),o=e(40845);const s=({className:g,children:u})=>{const c=(0,o.of)(r);return n.createElement("div",{className:(0,t.cx)(c,g)},u)},r=()=>(0,t.css)({display:"flex",button:{flexGrow:1,justifyContent:"center"},"> *":{flexGrow:1},label:{flexGrow:1,textAlign:"center"}})},32012:(Q,A,e)=>{"use strict";e.d(A,{H:()=>c});var t=e(32196),n=e(24442),o=e(96540),s=e(40845),r=e(55852),g=e(58898),u=e(14578);const c=l=>{const{onChange:f,className:d,loadData:h,icon:p,buttonProps:m,hideDownIcon:a,variant:v,disabled:E,...D}=l,b=(0,s.of)(i);let C=l.children;return a||(C=[l.children,o.createElement(u.I,{key:"down-icon",name:"angle-down",className:b.icons.right})]),o.createElement(n.A,{onChange:(0,g.k)(f),loadData:(0,g.W)(h),dropdownClassName:b.popup,...D,expandIcon:null},o.createElement(r.$n,{icon:p,disabled:E,variant:v,...m??{}},C))};c.displayName="ButtonCascader";const i=l=>({popup:(0,t.css)({label:"popup",zIndex:l.zIndex.dropdown}),icons:{right:(0,t.css)({margin:"1px 0 0 4px"}),left:(0,t.css)({margin:"-1px 4px 0 0"})}})},76442:(Q,A,e)=>{"use strict";e.d(A,{c:()=>s});var t=e(32196),n=e(96540),o=e(40845);const s=({message:g,callToActionElement:u,footer:c,className:i})=>{const l=(0,o.of)(r);return n.createElement("div",{className:(0,t.cx)([l.wrapper,i])},g&&n.createElement("div",{className:l.message},g),u,c&&n.createElement("div",{className:l.footer},c))},r=g=>({wrapper:(0,t.css)({label:"call-to-action-card",background:g.colors.background.secondary,borderRadius:g.shape.radius.default,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flexGrow:1,padding:g.spacing(3),[g.breakpoints.down("sm")]:{padding:g.spacing(3,1)}}),message:(0,t.css)({marginBottom:g.spacing(3),fontStyle:"italic"}),footer:(0,t.css)({marginTop:g.spacing(3)})})},10860:(Q,A,e)=>{"use strict";e.d(A,{H:()=>y,Z:()=>u});var t=e(32196),n=e(96540),o=e(40845),s=e(16797),r=e(81507);const g=n.createContext(null),u=({disabled:M,href:T,onClick:I,children:x,isSelected:S,isCompact:O,className:P,...L})=>{const U=(0,n.useMemo)(()=>n.Children.toArray(x).some(w=>n.isValidElement(w)&&w.type===c),[x]),R=M||!I&&!T,B=I&&!M?I:void 0,H=(0,o.of)(r.i,M,R,S,O);return n.createElement(r.Q,{disableEvents:M,disableHover:R,isSelected:S,className:(0,t.cx)(H.container,P),...L},n.createElement(g.Provider,{value:{href:T,onClick:B,disabled:M,isSelected:S}},!U&&n.createElement(c,null),x))},c=({children:M,className:T,"aria-label":I})=>{const x=(0,n.useContext)(g),S=(0,o.of)(i),{href:O,onClick:P,isSelected:L}=x??{href:void 0,onClick:void 0,isSelected:void 0};return n.createElement("h2",{className:(0,t.cx)(S.heading,T)},O?n.createElement("a",{href:O,className:S.linkHack,"aria-label":I,onClick:P},M):P?n.createElement("button",{onClick:P,className:S.linkHack,"aria-label":I,type:"button"},M):n.createElement(n.Fragment,null,M),L!==void 0&&n.createElement("input",{"aria-label":"option",type:"radio",checked:L,readOnly:!0}))};c.displayName="Heading";const i=M=>({heading:(0,t.css)({gridArea:"Heading",justifySelf:"start",display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%",marginBottom:0,fontSize:M.typography.size.md,letterSpacing:"inherit",lineHeight:M.typography.body.lineHeight,color:M.colors.text.primary,fontWeight:M.typography.fontWeightMedium,"& input[readonly]":{cursor:"inherit"}}),linkHack:(0,t.css)({all:"unset","&::after":{position:"absolute",content:'""',top:0,bottom:0,left:0,right:0,borderRadius:M.shape.radius.default},"&:focus-visible":{outline:"none",outlineOffset:0,boxShadow:"none","&::after":{...(0,s.getFocusStyles)(M),zIndex:1}}})}),l=({children:M,className:T})=>{const I=(0,o.of)(f);return n.createElement("div",{className:(0,t.cx)(I.tagList,T)},M)};l.displayName="Tags";const f=M=>({tagList:(0,t.css)({position:"relative",gridArea:"Tags",alignSelf:"center"})}),d=({children:M,className:T})=>{const I=(0,o.of)(h);return n.createElement("p",{className:(0,t.cx)(I.description,T)},M)};d.displayName="Description";const h=M=>({description:(0,t.css)({width:"100%",gridArea:"Description",margin:M.spacing(1,0,0),color:M.colors.text.secondary,lineHeight:M.typography.body.lineHeight})}),p=({children:M,align:T="start",className:I})=>{const x=(0,o.of)(m);return n.createElement("div",{className:(0,t.cx)(x.media,I,(0,t.css)({alignSelf:T}))},M)};p.displayName="Figure";const m=M=>({media:(0,t.css)({position:"relative",gridArea:"Figure",marginRight:M.spacing(2),width:"40px","> img":{width:"100%"},"&:empty":{display:"none"}})}),a=(0,n.memo)(({children:M,className:T,separator:I="|"})=>{const x=(0,o.of)(v);let S=M;const O=n.Children.toArray(M).filter(Boolean);return O.length?(S=O.map((P,L)=>n.createElement("div",{key:`element_${L}`,className:x.metadataItem},P)),O.length>1&&I&&(S=O.reduce((P,L,U)=>[P,n.createElement("span",{key:`separator_${U}`,className:x.separator},I),L])),n.createElement("div",{className:(0,t.cx)(x.metadata,T)},S)):null});a.displayName="Meta";const v=M=>({metadata:(0,t.css)({gridArea:"Meta",display:"flex",alignItems:"center",width:"100%",fontSize:M.typography.size.sm,color:M.colors.text.secondary,margin:M.spacing(.5,0,0),lineHeight:M.typography.bodySmall.lineHeight,overflowWrap:"anywhere"}),metadataItem:(0,t.css)({zIndex:0}),separator:(0,t.css)({margin:`0 ${M.spacing(1)}`})}),E=({children:M,disabled:T,variant:I,className:x})=>{const S=(0,o.of)(D),P=(0,n.useContext)(g)?.disabled||T,L=I==="primary"?S.actions:S.secondaryActions;return n.createElement("div",{className:(0,t.cx)(L,x)},n.Children.map(M,U=>n.isValidElement(U)?(0,n.cloneElement)(U,{disabled:P,...U.props}):null))},D=M=>({actions:(0,t.css)({display:"flex",flexDirection:"row",flexWrap:"wrap",gap:M.spacing(1),gridArea:"Actions",marginTop:M.spacing(2)}),secondaryActions:(0,t.css)({alignSelf:"center",color:M.colors.text.secondary,display:"flex",flexDirection:"row",flexWrap:"wrap",gap:M.spacing(1),gridArea:"Secondary",marginTop:M.spacing(2)})}),b=({children:M,disabled:T,className:I})=>n.createElement(E,{variant:"primary",disabled:T,className:I},M);b.displayName="Actions";const C=({children:M,disabled:T,className:I})=>n.createElement(E,{variant:"secondary",disabled:T,className:I},M);C.displayName="SecondaryActions";const y=M=>({inner:(0,t.css)({display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%",flexWrap:"wrap"}),...i(M),...v(M),...h(M),...m(M),...D(M),...f(M)});u.Heading=c,u.Tags=l,u.Figure=p,u.Meta=a,u.Actions=b,u.SecondaryActions=C,u.Description=d},81507:(Q,A,e)=>{"use strict";e.d(A,{Q:()=>u,i:()=>c});var t=e(32196),n=e(96540),o=e(40845),s=e(16797);const r=({children:i,href:l})=>{const{inner:f}=(0,o.of)(g);return l?n.createElement("a",{className:f,href:l},i):n.createElement(n.Fragment,null,i)},g=i=>({inner:(0,t.css)({display:"flex",width:"100%",padding:i.spacing(2)})}),u=({children:i,disableEvents:l,disableHover:f,isSelected:d,className:h,href:p,...m})=>{const{oldContainer:a}=(0,o.of)(c,l,f,d);return n.createElement("div",{...m,className:(0,t.cx)(a,h)},n.createElement(r,{href:p},i))},c=(i,l=!1,f=!1,d,h)=>{const p=d!==void 0;return{container:(0,t.css)({display:"grid",position:"relative",gridTemplateColumns:"auto 1fr auto",gridTemplateRows:"1fr auto auto auto",gridAutoColumns:"1fr",gridAutoFlow:"row",gridTemplateAreas:`
"Figure Heading Tags"
"Figure Meta Tags"
"Figure Description Tags"
"Figure Actions Secondary"`,width:"100%",padding:i.spacing(h?1:2),background:i.colors.background.secondary,borderRadius:i.shape.radius.default,marginBottom:"8px",pointerEvents:l?"none":"auto",transition:i.transitions.create(["background-color","box-shadow","border-color","color"],{duration:i.transitions.duration.short}),...!f&&{"&:hover":{background:i.colors.emphasize(i.colors.background.secondary,.03),cursor:"pointer",zIndex:1},"&:focus":s.getFocusStyles(i)},...p&&{cursor:"pointer"},...d&&{outline:`solid 2px ${i.colors.primary.border}`}}),oldContainer:(0,t.css)({display:"flex",width:"100%",background:i.colors.background.secondary,borderRadius:i.shape.radius.default,position:"relative",pointerEvents:l?"none":"auto",marginBottom:i.spacing(1),transition:i.transitions.create(["background-color","box-shadow","border-color","color"],{duration:i.transitions.duration.short}),...!f&&{"&:hover":{background:i.colors.emphasize(i.colors.background.secondary,.03),cursor:"pointer",zIndex:1},"&:focus":s.getFocusStyles(i)}})}}},3988:(Q,A,e)=>{"use strict";e.d(A,{v:()=>d});var t=e(32196),n=e(47078),o=e.n(n),s=e(24442),r=e(96540),g=e(14578),u=e(10354),c=e(88323),i=e(58898);const l=(0,t.css)({"&:focus":{outline:"none"}}),f=" / ";class d extends r.PureComponent{constructor(p){super(p),this.flattenOptions=(E,D=[])=>{let b=[];for(const C of E){const y=[...D];y.push(C),!C.items||C.items.length===0?b.push({singleLabel:y[y.length-1].label,label:y.map(M=>M.label).join(this.props.separator||f),value:y.map(M=>M.value)}):b=[...b,...this.flattenOptions(C.items,y)]}return b},this.getSearchableOptions=o()(E=>this.flattenOptions(E)),this.onChange=(E,D)=>{const b=this.props.hideActiveLevelLabel?"":this.props.displayAllSelectedLevels?D.map(y=>y.label).join(this.props.separator||f):D[D.length-1].label,C={rcValue:{value:E,label:b},focusCascade:!0,activeLabel:b,isSearching:!1};this.setState(C),this.props.onSelect(D[D.length-1].value)},this.onSelect=E=>{const D=E.value||[],b=this.props.displayAllSelectedLevels?E.label:E.singleLabel||"",C={activeLabel:b,rcValue:{value:D,label:b},isSearching:!1,focusCascade:!1};this.setState(C),this.props.onSelect(D[D.length-1])},this.onCreateOption=E=>{this.setState({activeLabel:E,rcValue:[],isSearching:!1}),this.props.onSelect(E)},this.onBlur=()=>{this.setState({isSearching:!1,focusCascade:!1}),this.state.activeLabel===""&&this.setState({rcValue:[]}),this.props.onBlur?.()},this.onBlurCascade=()=>{this.setState({focusCascade:!1}),this.props.onBlur?.()},this.onInputKeyDown=E=>{["ArrowDown","ArrowUp","Enter","ArrowLeft","ArrowRight","Backspace"].includes(E.key)||this.setState({focusCascade:!1,isSearching:!0})},this.onSelectInputChange=E=>{E===""&&this.setState({isSearching:!1})};const m=this.getSearchableOptions(p.options),{rcValue:a,activeLabel:v}=this.setInitialValue(m,p.initialValue);this.state={isSearching:!1,focusCascade:!1,rcValue:a,activeLabel:v}}setInitialValue(p,m){if(!m)return{rcValue:[],activeLabel:""};for(const a of p){const v=a.value||[];if(v[v.length-1]===m)return{rcValue:v,activeLabel:this.props.displayAllSelectedLevels?a.label:a.singleLabel||""}}return this.props.allowCustomValue?{rcValue:[],activeLabel:m}:{rcValue:[],activeLabel:""}}render(){const{allowCustomValue:p,formatCreateLabel:m,placeholder:a,width:v,changeOnSelect:E,options:D,disabled:b}=this.props,{focusCascade:C,isSearching:y,rcValue:M,activeLabel:T}=this.state,I=this.getSearchableOptions(D);return r.createElement("div",null,y?r.createElement(c.l6,{allowCustomValue:p,placeholder:a,autoFocus:!C,onChange:this.onSelect,onBlur:this.onBlur,options:I,onCreateOption:this.onCreateOption,formatCreateLabel:m,width:v,onInputChange:this.onSelectInputChange,disabled:b}):r.createElement(s.A,{onChange:(0,i.k)(this.onChange),options:D,changeOnSelect:E,value:M.value,fieldNames:{label:"label",value:"value",children:"items"},expandIcon:null,open:this.props.alwaysOpen,disabled:b},r.createElement("div",{className:l},r.createElement(u.p,{autoFocus:this.props.autoFocus,width:v,placeholder:a,onBlur:this.onBlurCascade,value:T,onKeyDown:this.onInputKeyDown,onChange:()=>{},suffix:C?r.createElement(g.I,{name:"angle-up"}):r.createElement(g.I,{name:"angle-down",style:{marginBottom:0,marginLeft:"4px"}}),disabled:b}))))}}d.defaultProps={changeOnSelect:!0}},58898:(Q,A,e)=>{"use strict";e.d(A,{W:()=>n,k:()=>t});const t=r=>(g,u)=>{r&&r(g.map(c=>String(c)),o(u))},n=r=>g=>{r&&r(o(g))},o=r=>r.map(s),s=r=>({value:r.value??"",label:r.label})},8866:(Q,A,e)=>{"use strict";e.d(A,{N:()=>n});var t=e(96540);class n extends t.PureComponent{constructor(){super(...arguments),this.myRef=(0,t.createRef)(),this.state={hasEventListener:!1},this.onOutsideClick=s=>{const r=this.myRef.current;(!r||s.target instanceof Node&&!r.contains(s.target))&&this.props.onClick()}}componentDidMount(){this.props.parent.addEventListener("click",this.onOutsideClick,this.props.useCapture),this.props.includeButtonPress&&this.props.parent.addEventListener("keyup",this.onOutsideClick,this.props.useCapture)}componentWillUnmount(){this.props.parent.removeEventListener("click",this.onOutsideClick,this.props.useCapture),this.props.includeButtonPress&&this.props.parent.removeEventListener("keyup",this.onOutsideClick,this.props.useCapture)}render(){return t.createElement("div",{ref:this.myRef},this.props.children)}}n.defaultProps={includeButtonPress:!0,parent:typeof window<"u"?window:void 0,useCapture:!1}},10534:(Q,A,e)=>{"use strict";e.d(A,{b:()=>i});var t=e(32196),n=e(96540),o=e(76412),s=e(40845),r=e(55852),g=e(14578),u=e(32982);const c=2*1e3;function i({onClipboardCopy:d,onClipboardError:h,children:p,getText:m,icon:a,variant:v,...E}){const D=(0,s.of)(f),[b,C]=(0,n.useState)(!1);(0,n.useEffect)(()=>{let T;return b&&(T=setTimeout(()=>{C(!1)},c)),()=>{window.clearTimeout(T)}},[b]);const y=(0,n.useRef)(null),M=(0,n.useCallback)(async()=>{const T=m();try{await l(T,y),C(!0),d?.(T)}catch(I){h?.(T,I)}},[m,d,h]);return n.createElement(n.Fragment,null,b&&n.createElement(u.r,{placement:"top",referenceElement:y.current},n.createElement(o.x,{i18nKey:"clipboard-button.inline-toast.success"},"Copied")),n.createElement(r.$n,{onClick:M,icon:a,variant:b?"success":v,"aria-label":b?"Copied":void 0,...E,className:(0,t.cx)(D.button,b&&D.successButton,E.className),ref:y},p,b&&n.createElement("div",{className:D.successOverlay},n.createElement(g.I,{name:"check"}))))}const l=async(d,h)=>{if(navigator.clipboard&&window.isSecureContext)return navigator.clipboard.writeText(d);{const p=document.createElement("textarea");h.current?.appendChild(p),p.value=d,p.focus(),p.select(),document.execCommand("copy"),p.remove()}},f=d=>({button:(0,t.css)({position:"relative"}),successButton:(0,t.css)({"> *":(0,t.css)({visibility:"hidden"})}),successOverlay:(0,t.css)({position:"absolute",top:0,bottom:0,right:0,left:0,visibility:"visible"})})},57418:(Q,A,e)=>{"use strict";e.d(A,{M:()=>i});var t=e(32196),n=e(2543),o=e.n(n),s=e(96540),r=e(40845),g=e(16797),u=e(14578),c=e(62930);const i=({label:f,isOpen:d,onToggle:h,className:p,contentClassName:m,children:a,labelId:v,loading:E=!1,headerDataTestId:D,contentDataTestId:b})=>{const[C,y]=(0,s.useState)(d),M=(0,r.of)(l),T=S=>{S.target instanceof HTMLElement&&S.target.tagName==="A"||(S.preventDefault(),S.stopPropagation(),h?.(!C),y(!C))},{current:I}=(0,s.useRef)((0,n.uniqueId)()),x=v??`collapse-label-${I}`;return s.createElement(s.Fragment,null,s.createElement("div",{onClick:T,className:(0,t.cx)(M.header,p)},s.createElement("button",{type:"button",id:`collapse-button-${I}`,className:M.button,onClick:T,"aria-expanded":C&&!E,"aria-controls":`collapse-content-${I}`,"aria-labelledby":x},E?s.createElement(c.y,{className:M.spinner}):s.createElement(u.I,{name:C?"angle-up":"angle-down",className:M.icon})),s.createElement("div",{className:M.label,id:`collapse-label-${I}`,"data-testid":D},f)),C&&s.createElement("div",{id:`collapse-content-${I}`,className:(0,t.cx)(M.content,m),"data-testid":b},a))},l=f=>({header:(0,t.css)({display:"flex",cursor:"pointer",boxSizing:"border-box",flexDirection:"row-reverse",position:"relative",justifyContent:"space-between",fontSize:f.typography.size.lg,padding:`${f.spacing(.5)} 0`,"&:focus-within":(0,g.getFocusStyles)(f)}),button:(0,t.css)({all:"unset","&:focus-visible":{outline:"none",outlineOffset:"unset",transition:"none",boxShadow:"none"}}),icon:(0,t.css)({color:f.colors.text.secondary}),content:(0,t.css)({padding:`${f.spacing(2)} 0`}),spinner:(0,t.css)({display:"flex",alignItems:"center",width:f.spacing(2)}),label:(0,t.css)({display:"flex"})})},82762:(Q,A,e)=>{"use strict";e.d(A,{S:()=>c,a:()=>u});var t=e(32196),n=e(96540),o=e(40845),s=e(55852),r=e(14578);const g=i=>({collapse:(0,t.css)({label:"collapse",marginBottom:i.spacing(1),backgroundColor:i.colors.background.primary,border:`1px solid ${i.colors.border.weak}`,position:"relative",borderRadius:i.shape.radius.default,width:"100%",display:"flex",flexDirection:"column",flex:"1 1 0"}),collapseBody:(0,t.css)({label:"collapse__body",padding:i.spacing(i.components.panel.padding),paddingTop:0,flex:1,overflow:"hidden",display:"flex",flexDirection:"column"}),bodyContentWrapper:(0,t.css)({label:"bodyContentWrapper",flex:1,overflow:"hidden"}),loader:(0,t.css)({label:"collapse__loader",height:"2px",position:"relative",overflow:"hidden",background:"none",margin:i.spacing(.5)}),loaderActive:(0,t.css)({label:"collapse__loader_active","&:after":{content:"' '",display:"block",width:"25%",top:0,height:"250%",position:"absolute",animation:"loader 2s cubic-bezier(0.17, 0.67, 0.83, 0.67) 500ms",animationIterationCount:100,left:"-25%",background:i.colors.primary.main},"@keyframes loader":{from:{left:"-25%",opacity:.1},to:{left:"100%",opacity:1}}}),header:(0,t.css)({label:"collapse__header",padding:i.spacing(1,2,1,2),display:"flex",transition:"all 0.1s linear"}),headerCollapsed:(0,t.css)({label:"collapse__header--collapsed",padding:i.spacing(1,2,1,2)}),headerLabel:(0,t.css)({label:"collapse__header-label",fontWeight:i.typography.fontWeightMedium,marginRight:i.spacing(1),fontSize:i.typography.size.md,display:"flex",flex:"0 0 100%"}),icon:(0,t.css)({label:"collapse__icon",margin:i.spacing(.25,1,0,-1)})}),u=({isOpen:i,onToggle:l,...f})=>{const[d,h]=(0,n.useState)(i);return n.createElement(c,{isOpen:d,collapsible:!0,...f,onToggle:()=>{h(!d),l&&l(!d)}})},c=({isOpen:i,label:l,loading:f,collapsible:d,onToggle:h,className:p,children:m})=>{const a=(0,o.of)(s.my),v=(0,o.of)(g),E=()=>{h&&h(!i)},D=(0,t.cx)([v.collapse,p]),b=f?(0,t.cx)([v.loader,v.loaderActive]):(0,t.cx)([v.loader]),C=d?(0,t.cx)([v.header]):(0,t.cx)([v.headerCollapsed]);return n.createElement("div",{className:D},n.createElement("button",{type:"button",className:(0,t.cx)(a,C),onClick:E},d&&n.createElement(r.I,{className:v.icon,name:i?"angle-down":"angle-right"}),n.createElement("div",{className:(0,t.cx)([v.headerLabel])},l)),i&&n.createElement("div",{className:(0,t.cx)([v.collapseBody])},n.createElement("div",{className:b}),n.createElement("div",{className:v.bodyContentWrapper},m)))};c.displayName="Collapse"},36314:(Q,A,e)=>{"use strict";e.d(A,{A:()=>i});var t=e(32196),n=e(2543),o=e.n(n),s=e(96540),r=e(84140),g=e(40845),u=e(10354);const c=(0,s.forwardRef)(({color:d,onChange:h,isClearable:p=!1,onClick:m,onBlur:a,disabled:v,buttonAriaLabel:E,...D},b)=>{const[C,y]=(0,s.useState)(d),[M,T]=(0,s.useState)(d),I=(0,s.useMemo)(()=>(0,n.debounce)(h,100),[]);(0,s.useEffect)(()=>{const O=(0,r.A)(d);O.isValid()&&d!==M&&(y(O.toString()),T(d))},[d,M]);const x=O=>{const{value:P}=O.currentTarget;if(y(P),P===""&&p){I(P);return}const L=(0,r.A)(P);L.isValid()&&I(L.toString())},S=O=>{(0,r.A)(C).isValid()||y(d),a?.(O)};return s.createElement(u.p,{...D,value:C,onChange:x,disabled:v,onClick:m,onBlur:S,addonBefore:s.createElement(l,{onClick:m,ariaLabel:E,disabled:v,color:d}),ref:b})});c.displayName="ColorInput";const i=c,l=({color:d,onClick:h,disabled:p,ariaLabel:m})=>{const a=(0,g.of)(f);return s.createElement("button",{type:"button",onClick:h,"aria-label":m,disabled:p||!h,className:(0,t.cx)(a,(0,t.css)({backgroundColor:d}))})},f=d=>(0,t.css)({height:"100%",width:`${d.spacing.gridSize*4}px`,borderRadius:`${d.shape.radius.default} 0 0 ${d.shape.radius.default}`,border:`1px solid ${d.colors.border.medium}`})},83598:(Q,A,e)=>{"use strict";e.d(A,{Dp:()=>h,sk:()=>d});var t=e(32196),n=e(96540),o=e(40845),s=e(3911),r=e(40321),g=e(13840),u=e(95868),c=e(70045),i=e(83876),l=e(70104);const f=(m,a="ColorPicker")=>{var v;return v=class extends n.Component{constructor(){super(...arguments),this.pickerTriggerRef=(0,n.createRef)()}render(){const{theme:E,children:D,onChange:b,color:C}=this.props,y=p(E),M=n.createElement(m,{...this.props,children:null,onChange:b});return n.createElement(u.I,{content:M,hideAfter:300},(T,I,x)=>n.createElement(n.Fragment,null,this.pickerTriggerRef.current&&n.createElement(g.A,{...x,referenceElement:this.pickerTriggerRef.current,wrapperClassName:y.colorPicker,onMouseLeave:I,onMouseEnter:T,onKeyDown:S=>(0,r.Q)(S,I)}),D?D({ref:this.pickerTriggerRef,showColorPicker:T,hideColorPicker:I}):n.createElement(i.q,{ref:this.pickerTriggerRef,onClick:T,onMouseLeave:I,color:E.visualization.getColorByName(C||"#000000"),"aria-label":C})))}},v.displayName=a,v},d=(0,o.cV)(f(c.$,"ColorPicker")),h=(0,o.cV)(f(l.o,"SeriesColorPicker")),p=(0,s.N)(m=>({colorPicker:(0,t.css)({position:"absolute",zIndex:m.zIndex.tooltip,color:m.colors.text.primary,maxWidth:"400px",fontSize:m.typography.size.sm,padding:"15px !important",'& [data-placement^="top"]':{paddingLeft:"0 !important",paddingRight:"0 !important"},'& [data-placement^="bottom"]':{paddingLeft:"0 !important",paddingRight:"0 !important"},'& [data-placement^="left"]':{paddingTop:"0 !important"},'& [data-placement^="right"]':{paddingTop:"0 !important"}})}))},99128:(Q,A,e)=>{"use strict";e.d(A,{i:()=>l});var t=e(32196),n=e(96540),o=e(7612),s=e(65229),r=e(23596),g=e(40845),u=e(8866),c=e(36314),i=e(95151);const l=(0,n.forwardRef)(({value:d="",onChange:h,returnColorAs:p="rgb",...m},a)=>{const[v,E]=(0,n.useState)(d),[D,b]=(0,n.useState)(!1),C=(0,g.$j)(),y=(0,g.of)(f),M=(0,g.of)(i.$);return(0,s.A)(T=>{if(T===d)return;if(!T){h("");return}const I=C.visualization.getColorByName(T);h(p==="rgb"?r.asRgbString(I):r.asHexString(I))},500,[v]),n.createElement(u.N,{onClick:()=>b(!1)},n.createElement("div",{className:y.wrapper},D&&!m.disabled&&n.createElement(o.p9,{"data-testid":"color-popover",color:v,onChange:E,className:(0,t.cx)(M.root,y.picker)}),n.createElement(c.A,{...m,theme:C,color:v,onChange:E,buttonAriaLabel:"Open color picker",onClick:()=>b(!0),onBlur:()=>b(!1),ref:a,isClearable:!0})))});l.displayName="ColorPickerInput";const f=d=>({wrapper:(0,t.css)({position:"relative"}),picker:(0,t.css)({"&.react-colorful":{position:"absolute",width:"100%",zIndex:11,bottom:"36px"}}),inner:(0,t.css)({position:"absolute"})})},70045:(Q,A,e)=>{"use strict";e.d(A,{$:()=>v});var t=e(32196),n=e(7887),o=e(96540),s=e(23596),r=e(40845),g=e(3911),u=e(83876),c=e(2543);function i(D,b){const C=new Array(D.length);for(let y=0;y{const M=(0,c.upperFirst)(D.name),T=(0,r.of)(d);return o.createElement("div",{className:T.colorRow},o.createElement("div",{className:T.colorLabel},M),o.createElement("div",{...y,className:T.swatchRow},i(D.shades,I=>o.createElement(u.q,{key:I.name,"aria-label":I.name,variant:I.primary?u.h.Large:u.h.Small,isSelected:I.name===b,color:I.color,onClick:()=>C(I.name)}))))},d=D=>({colorRow:(0,t.css)({display:"grid",gridTemplateColumns:"25% 1fr",gridColumnGap:D.spacing(2),padding:D.spacing(.5,0),"&:hover":{background:D.colors.background.secondary}}),colorLabel:(0,t.css)({paddingLeft:D.spacing(2),display:"flex",alignItems:"center"}),swatchRow:(0,t.css)({display:"flex",gap:D.spacing(1),alignItems:"center",justifyContent:"space-around",flexDirection:"row"})}),h=({color:D,onChange:b})=>{const C=(0,r.$j)(),y=(0,r.of)(p),M=[];for(const T of C.visualization.hues)M.push(o.createElement(f,{key:T.name,selectedColor:D,hue:T,onColorSelect:b}));return o.createElement(o.Fragment,null,o.createElement("div",{className:y.swatches},M),o.createElement("div",{className:y.extraColors},o.createElement(u.q,{isSelected:D==="transparent",color:"rgba(0,0,0,0)",label:"Transparent",onClick:()=>b("transparent")}),o.createElement(u.q,{isSelected:D==="text",color:C.colors.text.primary,label:"Text color",onClick:()=>b("text")})))},p=D=>({container:(0,t.css)({display:"flex",flexDirection:"column"}),extraColors:(0,t.css)({display:"flex",alignItems:"center",justifyContent:"space-around",gap:D.spacing(1),padding:D.spacing(1,0)}),swatches:(0,t.css)({display:"grid",flexGrow:1})});var m=e(95151);class a extends o.Component{constructor(b){super(b),this.getTabClassName=C=>{const{activePicker:y}=this.state;return`ColorPickerPopover__tab ${y===C&&"ColorPickerPopover__tab--active"}`},this.handleChange=C=>{const{onChange:y,enableNamedColors:M,theme:T}=this.props;if(M)return y(C);y(s.asHexString(T.visualization.getColorByName(C)))},this.onTabChange=C=>()=>this.setState({activePicker:C}),this.renderPicker=()=>{const{activePicker:C}=this.state,{color:y}=this.props;switch(C){case"spectrum":return o.createElement(m.A,{color:y,onChange:this.handleChange});case"palette":return o.createElement(h,{color:y,onChange:this.handleChange});default:return this.renderCustomPicker(C)}},this.renderCustomPicker=C=>{const{customPickers:y,color:M,theme:T}=this.props;return y?o.createElement(y[C].tabComponent,{color:M,theme:T,onChange:this.handleChange}):null},this.renderCustomPickerTabs=()=>{const{customPickers:C}=this.props;return C?o.createElement(o.Fragment,null,Object.keys(C).map(y=>o.createElement("button",{className:this.getTabClassName(y),onClick:this.onTabChange(y),key:y,type:"button"},C[y].name))):null},this.state={activePicker:"palette"}}render(){const{theme:b}=this.props,C=E(b);return o.createElement(n.n1,{contain:!0,restoreFocus:!0,autoFocus:!0},o.createElement("div",{tabIndex:-1,className:C.colorPickerPopover},o.createElement("div",{className:C.colorPickerPopoverTabs},o.createElement("button",{className:this.getTabClassName("palette"),onClick:this.onTabChange("palette"),type:"button"},"Colors"),o.createElement("button",{className:this.getTabClassName("spectrum"),onClick:this.onTabChange("spectrum"),type:"button"},"Custom"),this.renderCustomPickerTabs()),o.createElement("div",{className:C.colorPickerPopoverContent},this.renderPicker())))}}const v=(0,r.cV)(a);v.displayName="ColorPickerPopover";const E=(0,g.N)(D=>({colorPickerPopover:(0,t.css)({borderRadius:D.shape.radius.default,boxShadow:D.shadows.z3,background:D.colors.background.primary,border:`1px solid ${D.colors.border.weak}`,".ColorPickerPopover__tab":{width:"50%",textAlign:"center",padding:D.spacing(1,0),background:D.colors.background.secondary,color:D.colors.text.secondary,fontSize:D.typography.bodySmall.fontSize,cursor:"pointer",border:"none","&:focus:not(:focus-visible)":{outline:"none",boxShadow:"none"},":focus-visible":{position:"relative"}},".ColorPickerPopover__tab--active":{color:D.colors.text.primary,fontWeight:D.typography.fontWeightMedium,background:D.colors.background.primary}}),colorPickerPopoverContent:(0,t.css)({width:"246px",fontSize:D.typography.bodySmall.fontSize,minHeight:"184px",padding:D.spacing(1),display:"flex",flexDirection:"column"}),colorPickerPopoverTabs:(0,t.css)({display:"flex",width:"100%",borderRadius:`${D.shape.radius.default} ${D.shape.radius.default} 0 0`})}))},83876:(Q,A,e)=>{"use strict";e.d(A,{h:()=>u,q:()=>c});var t=e(32196),n=e(7887),o=e(96540),s=e(84140),r=e(13544),g=e(40845),u=(l=>(l.Small="small",l.Large="large",l))(u||{});const c=o.forwardRef(({color:l,label:f,variant:d="small",isSelected:h,"aria-label":p,...m},a)=>{const v=(0,g.$j)(),{isFocusVisible:E,focusProps:D}=(0,n.og)(),b=i(v,d,l,E,h),C=!!f,y=p||f;return o.createElement("div",{ref:a,className:b.wrapper,"data-testid":r.Tp.components.ColorSwatch.name,...m},C&&o.createElement("span",{className:b.label},f),o.createElement("button",{className:b.swatch,...D,"aria-label":y?`${y} color`:"Pick a color",type:"button"}))}),i=(l,f,d,h,p)=>{const m=(0,s.A)(d),v=f==="small"?"16px":"32px";let E="none";return m.getAlpha()<.1&&(E=`2px solid ${l.colors.border.medium}`),{wrapper:(0,t.css)({display:"flex",alignItems:"center",cursor:"pointer"}),label:(0,t.css)({marginRight:l.spacing(1)}),swatch:(0,t.css)({width:v,height:v,background:`${d}`,border:E,borderRadius:l.shape.radius.circle,outlineOffset:"1px",outline:h?`2px solid ${l.colors.primary.main}`:"none",boxShadow:p?`inset 0 0 0 2px ${d}, inset 0 0 0 4px ${l.colors.getContrastText(d)}`:"none",transition:l.transitions.create(["transform"],{duration:l.transitions.duration.short}),"&:hover":{transform:"scale(1.1)"},"@media (forced-colors: active)":{forcedColorAdjust:"none"}})}};c.displayName="ColorSwatch"},70104:(Q,A,e)=>{"use strict";e.d(A,{o:()=>g,t:()=>u});var t=e(32196),n=e(96540),o=e(40845),s=e(74716),r=e(70045);const g=i=>{const l=(0,o.of)(c),{yaxis:f,onToggleAxis:d,color:h,...p}=i,m=d?{yaxis:{name:"Y-Axis",tabComponent(){return n.createElement(s.d,{key:"yaxisSwitch",label:"Use right y-axis",className:l.colorPickerAxisSwitch,labelClass:l.colorPickerAxisSwitchLabel,checked:f===2,onChange:()=>{d&&d()}})}}}:void 0;return n.createElement(r.$,{...p,color:h||"#000000",customPickers:m})},u=(0,o.cV)(g),c=()=>({colorPickerAxisSwitch:(0,t.css)({width:"100%"}),colorPickerAxisSwitchLabel:(0,t.css)({display:"flex",flexGrow:1})})},95151:(Q,A,e)=>{"use strict";e.d(A,{$:()=>l,A:()=>f});var t=e(32196),n=e(96540),o=e(7612),s=e(65229),r=e(84140),g=e(23596),u=e(40845),c=e(36314);const i=({color:d,onChange:h})=>{const[p,m]=(0,n.useState)(d);(0,s.A)(D=>{h(g.asHexString(a.visualization.getColorByName(D)))},500,[p]);const a=(0,u.$j)(),v=(0,u.of)(l),E=(0,n.useMemo)(()=>p.startsWith("rgba")?p:(0,r.A)(a.visualization.getColorByName(d)).toRgbString(),[p,a,d]);return n.createElement("div",{className:v.wrapper},n.createElement(o.p9,{className:v.root,color:E,onChange:m}),n.createElement(c.A,{theme:a,color:E,onChange:m,className:v.colorInput}))},l=d=>({wrapper:(0,t.css)({flexGrow:1}),root:(0,t.css)({"&.react-colorful":{width:"auto"},".react-colorful":{"&__saturation":{borderRadius:`${d.shape.radius.default} ${d.shape.radius.default} 0 0`},"&__alpha":{borderRadius:`0 0 ${d.shape.radius.default} ${d.shape.radius.default}`},"&__alpha, &__hue":{height:d.spacing(2),position:"relative"},"&__pointer":{height:d.spacing(2),width:d.spacing(2)}}}),colorInput:(0,t.css)({marginTop:d.spacing(2)})}),f=i},82702:(Q,A,e)=>{"use strict";e.d(A,{Z:()=>u});var t=e(32196),n=e(96540),o=e(40845),s=e(3911),r=e(55852);class g extends n.PureComponent{constructor(){super(...arguments),this.mainButtonRef=n.createRef(),this.confirmButtonRef=n.createRef(),this.state={showConfirm:!1},this.onClickButton=l=>{l&&l.preventDefault(),this.setState({showConfirm:!0},()=>{this.props.autoFocus&&this.confirmButtonRef.current&&this.confirmButtonRef.current.focus()}),this.props.onClick&&this.props.onClick()},this.onClickCancel=l=>{l&&l.preventDefault(),this.setState({showConfirm:!1},()=>{this.mainButtonRef.current?.focus()}),this.props.onCancel&&this.props.onCancel()},this.onConfirm=l=>{l&&l.preventDefault(),this.props.onConfirm(),this.props.closeOnConfirm&&this.setState({showConfirm:!1})}}render(){const{theme:l,className:f,size:d,disabled:h,confirmText:p,confirmVariant:m,children:a}=this.props,v=c(l),E=(0,t.cx)(f,this.state.showConfirm?v.buttonHide:v.buttonShow,h&&v.buttonDisabled),D=(0,t.cx)(v.confirmButton,this.state.showConfirm?v.confirmButtonShow:v.confirmButtonHide),b=h?()=>{}:this.onClickButton;return n.createElement("span",{className:v.buttonContainer},n.createElement("div",{className:(0,t.cx)(h&&v.disabled)},n.createElement("span",{className:E},typeof a=="string"?n.createElement(r.$n,{size:d,fill:"text",onClick:b,ref:this.mainButtonRef},a):n.cloneElement(a,{onClick:b,ref:this.mainButtonRef}))),n.createElement("span",{className:D},n.createElement(r.$n,{size:d,variant:m,onClick:this.onConfirm,ref:this.confirmButtonRef},p),n.createElement(r.$n,{size:d,fill:"text",onClick:this.onClickCancel},"Cancel")))}}const u=(0,o.cV)(g),c=(0,s.N)(i=>({buttonContainer:(0,t.css)({display:"flex",alignItems:"center",justifyContent:"flex-end"}),buttonDisabled:(0,t.css)({textDecoration:"none",color:i.colors.text.primary,opacity:.65,pointerEvents:"none"}),buttonShow:(0,t.css)({opacity:1,transition:"opacity 0.1s ease",zIndex:2}),buttonHide:(0,t.css)({opacity:0,transition:"opacity 0.1s ease, visibility 0 0.1s",visibility:"hidden",zIndex:0}),confirmButton:(0,t.css)({alignItems:"flex-start",background:i.colors.background.primary,display:"flex",position:"absolute",pointerEvents:"none"}),confirmButtonShow:(0,t.css)({zIndex:1,opacity:1,transition:"opacity 0.08s ease-out, transform 0.1s ease-out",transform:"translateX(0)",pointerEvents:"all"}),confirmButtonHide:(0,t.css)({opacity:0,visibility:"hidden",transition:"opacity 0.12s ease-in, transform 0.14s ease-in, visibility 0s 0.12s",transform:"translateX(100px)"}),disabled:(0,t.css)({cursor:"not-allowed"})}));u.defaultProps={size:"md",confirmText:"Save",disabled:!1,confirmVariant:"primary"},u.displayName="ConfirmButton"},91605:(Q,A,e)=>{"use strict";e.d(A,{e:()=>s});var t=e(96540),n=e(55852),o=e(82702);const s=({size:r,disabled:g,onConfirm:u,"aria-label":c,closeOnConfirm:i})=>t.createElement(o.Z,{confirmText:"Delete",confirmVariant:"destructive",size:r||"md",disabled:g,onConfirm:u,closeOnConfirm:i},t.createElement(n.$n,{"aria-label":c,variant:"destructive",icon:"times",size:r||"sm"}))},96374:(Q,A,e)=>{"use strict";e.d(A,{u:()=>i});var t=e(32196),n=e(96540),o=e(13544),s=e(40845),r=e(55852),g=e(10354),u=e(66864),c=e(37390);const i=({isOpen:f,title:d,body:h,description:p,confirmText:m,confirmVariant:a="destructive",confirmationText:v,dismissText:E="Cancel",dismissVariant:D="secondary",alternativeText:b,modalClass:C,icon:y="exclamation-triangle",onConfirm:M,onDismiss:T,onAlternative:I,confirmButtonVariant:x="destructive"})=>{const[S,O]=(0,n.useState)(!!v),P=(0,s.of)(l),L=(0,n.useRef)(null),U=B=>{O(v?.toLowerCase().localeCompare(B.currentTarget.value.toLowerCase())!==0)};(0,n.useEffect)(()=>{f&&L.current?.focus()},[f]),(0,n.useEffect)(()=>{f&&O(!!v)},[f,v]);const R=async()=>{O(!0);try{await M()}finally{O(!1)}};return n.createElement(c.a,{className:(0,t.cx)(P.modal,C),title:d,icon:y,isOpen:f,onDismiss:T},n.createElement("div",{className:P.modalText},h,p?n.createElement("div",{className:P.modalDescription},p):null,v?n.createElement("div",{className:P.modalConfirmationInput},n.createElement(u.Gy,null,n.createElement(g.p,{placeholder:`Type "${v}" to confirm`,onChange:U}))):null),n.createElement(c.a.ButtonRow,null,n.createElement(r.$n,{variant:D,onClick:T,fill:"outline"},E),n.createElement(r.$n,{variant:x,onClick:R,disabled:S,ref:L,"data-testid":o.Tp.pages.ConfirmModal.delete},m),I?n.createElement(r.$n,{variant:"primary",onClick:I},b):null))},l=f=>({modal:(0,t.css)({width:"500px"}),modalText:(0,t.css)({fontSize:f.typography.h5.fontSize,color:f.colors.text.primary}),modalDescription:(0,t.css)({fontSize:f.typography.body.fontSize}),modalConfirmationInput:(0,t.css)({paddingTop:f.spacing(1)})})},28122:(Q,A,e)=>{"use strict";e.d(A,{t:()=>g});var t=e(96540),n=e(29647),o=e(13544),s=e(38138),r=e(17464);const g=t.memo(({x:u,y:c,onClose:i,focusOnOpen:l=!0,renderMenuItems:f,renderHeader:d})=>{const h=(0,t.useRef)(null),[p,m]=(0,t.useState)({});(0,t.useLayoutEffect)(()=>{const b=h.current;if(b){const C=b.getBoundingClientRect(),y=5,M={right:window.innerWidth{i?.()});const a=d?.(),v=f?.(),E=b=>{l&&b(0)},D=b=>{b.key==="Escape"&&(b.preventDefault(),b.stopPropagation(),i?.())};return t.createElement(r.ZL,null,t.createElement(s.W,{header:a,ref:h,style:p,ariaLabel:o.Tp.components.Menu.MenuComponent("Context"),onOpen:E,onClick:i,onKeyDown:D},v))});g.displayName="ContextMenu"},51686:(Q,A,e)=>{"use strict";e.d(A,{n:()=>o});var t=e(96540),n=e(28122);const o=({children:s,renderMenuItems:r,focusOnOpen:g=!0})=>{const[u,c]=(0,t.useState)(!1),[i,l]=(0,t.useState)({x:0,y:0});return t.createElement(t.Fragment,null,s({openMenu:f=>{c(!0),l({x:f.pageX,y:f.pageY})}}),u&&t.createElement(n.t,{onClose:()=>c(!1),x:i.x,y:i.y,renderMenuItems:r,focusOnOpen:g}))}},40276:(Q,A,e)=>{"use strict";e.d(A,{E:()=>u,A:()=>c});var t=e(32196),n=e(96540),o=e(62295),s=e(40845);const r=({children:l})=>{const[f,d]=(0,n.useState)(!1),[h,p]=(0,n.useState)(!1),m=(0,n.useRef)(null),a=(0,n.useRef)(null),v=(0,s.of)(g);return(0,n.useEffect)(()=>{const E=new IntersectionObserver(D=>{D.forEach(b=>{b.target===m.current?d(!b.isIntersecting):b.target===a.current&&p(!b.isIntersecting)})});return[m,a].forEach(D=>{D.current&&E.observe(D.current)}),()=>E.disconnect()},[]),n.createElement(n.Fragment,null,n.createElement("div",{className:(0,t.cx)(v.scrollIndicator,v.scrollTopIndicator,{[v.scrollIndicatorVisible]:f})}),n.createElement("div",{className:v.scrollContent},n.createElement("div",{ref:m}),l,n.createElement("div",{ref:a})),n.createElement("div",{className:(0,t.cx)(v.scrollIndicator,v.scrollBottomIndicator,{[v.scrollIndicatorVisible]:h})}))},g=l=>({scrollContent:(0,t.css)({flex:1,position:"relative"}),scrollIndicator:(0,t.css)({height:l.spacing(6),left:0,opacity:0,pointerEvents:"none",position:"absolute",right:0,transition:l.transitions.create("opacity"),zIndex:1}),scrollTopIndicator:(0,t.css)({background:`linear-gradient(0deg, transparent, ${l.colors.background.canvas})`,top:0}),scrollBottomIndicator:(0,t.css)({background:`linear-gradient(180deg, transparent, ${l.colors.background.canvas})`,bottom:0}),scrollIndicatorVisible:(0,t.css)({opacity:1})}),u=({autoHide:l=!1,autoHideTimeout:f=200,setScrollTop:d,className:h,testId:p,autoHeightMin:m="0",autoHeightMax:a="100%",hideTracksWhenNotNeeded:v=!1,hideHorizontalTrack:E,hideVerticalTrack:D,scrollRefCallback:b,showScrollIndicators:C=!1,updateAfterMountMs:y,scrollTop:M,onScroll:T,children:I})=>{const x=(0,n.useRef)(null),S=(0,s.of)(i);(0,n.useEffect)(()=>{x.current&&b&&b(x.current.view)},[x,b]),(0,n.useEffect)(()=>{x.current&&M!=null&&x.current.scrollTop(M)},[M]),(0,n.useEffect)(()=>{y&&setTimeout(()=>{const w=x.current;w?.update&&w.update()},y)},[y]);function O(w,N,V){return V.style&&N&&(V.style.display="none"),n.createElement("div",{...V,className:w})}const P=(0,n.useCallback)(w=>O("track-horizontal",E,w),[E]),L=(0,n.useCallback)(w=>O("track-vertical",D,w),[D]),U=(0,n.useCallback)(w=>n.createElement("div",{...w,className:"thumb-horizontal"}),[]),R=(0,n.useCallback)(w=>n.createElement("div",{...w,className:"thumb-vertical"}),[]),B=(0,n.useCallback)(w=>(w.style&&w.style.WebkitOverflowScrolling==="touch"&&(w.style.WebkitOverflowScrolling="auto"),n.createElement("div",{...w,className:"scrollbar-view"})),[]),H=(0,n.useCallback)(()=>{x.current&&d&&d(x.current.getValues())},[d]);return n.createElement(o.Ay,{"data-testid":p,ref:x,className:(0,t.cx)(S.customScrollbar,h,{[S.scrollbarWithScrollIndicators]:C}),onScrollStop:H,autoHeight:!0,autoHide:l,autoHideTimeout:f,hideTracksWhenNotNeeded:v,autoHeightMax:a,autoHeightMin:m,renderTrackHorizontal:P,renderTrackVertical:L,renderThumbHorizontal:U,renderThumbVertical:R,renderView:B,onScroll:T},C?n.createElement(r,null,I):I)},c=u,i=l=>({customScrollbar:(0,t.css)({display:"flex",flexGrow:1,".scrollbar-view":{display:"flex",flexGrow:1,flexDirection:"column"},".track-vertical":{borderRadius:l.shape.borderRadius(2),width:`${l.spacing(1)} !important`,right:0,bottom:l.spacing(.25),top:l.spacing(.25)},".track-horizontal":{borderRadius:l.shape.borderRadius(2),height:`${l.spacing(1)} !important`,right:l.spacing(.25),bottom:l.spacing(.25),left:l.spacing(.25)},".thumb-vertical":{background:l.colors.action.focus,borderRadius:l.shape.borderRadius(2),opacity:0},".thumb-horizontal":{background:l.colors.action.focus,borderRadius:l.shape.borderRadius(2),opacity:0},"&:hover":{".thumb-vertical, .thumb-horizontal":{opacity:1,transition:"opacity 0.3s ease-in-out"}}}),scrollbarWithScrollIndicators:(0,t.css)({".scrollbar-view":{position:"static !important"}})})},14689:(Q,A,e)=>{"use strict";e.d(A,{R:()=>o});var t=e(96540),n=e(55852);function o({link:s,buttonProps:r}){return t.createElement("a",{href:s.href,target:s.target,rel:"noreferrer",onClick:s.onClick?g=>{!(g.ctrlKey||g.metaKey||g.shiftKey)&&s.onClick&&(g.preventDefault(),s.onClick(g))}:void 0},t.createElement(n.$n,{icon:s.target==="_blank"?"external-link-alt":void 0,variant:"primary",size:"sm",...r},s.title))}},64078:(Q,A,e)=>{"use strict";e.d(A,{l:()=>I});var t=e(32196),n=e(95361),o=e(18491),s=e(36376),r=e(28848),g=e.n(r),u=e(96540),c=e(80292),i=e(75226),l=e(29317),f=e(91890),d=e(6709),h=e(41781),p=e(40845),m=e(72307),a=e(40276),v=e(10354),E=e(17464),D=e(43538);class b{getBoundingClientRect(){const O=window.getSelection(),P=O&&O.anchorNode;return P&&P.parentElement?P.parentElement.getBoundingClientRect():{top:0,left:0,bottom:0,right:0,width:0,height:0,x:0,y:0,toJSON:()=>{}}}get clientWidth(){return this.getBoundingClientRect().width}get clientHeight(){return this.getBoundingClientRect().height}}const C=(S,O)=>S-O*Math.floor(S/O),y={builtInVariable:{pattern:/(\${\S+?})/}},M=[(0,h.D)({onlyIn:S=>"type"in S&&S.type==="code_block",getSyntax:()=>"links"},{...g().languages,links:y})],T=S=>({input:(0,v.n)({theme:S,invalid:!1}).input,editor:(0,t.css)({".token.builtInVariable":{color:S.colors.success.text},".token.variable":{color:S.colors.primary.text}}),suggestionsWrapper:(0,t.css)({boxShadow:S.shadows.z2}),wrapperOverrides:(0,t.css)({width:"100%","> .slate-query-field__wrapper":{padding:0,backgroundColor:"transparent",border:"none"}})}),I=(0,u.memo)(({value:S,onChange:O,suggestions:P,placeholder:L="http://your-grafana.com/d/000000010/annotations"})=>{const U=(0,u.useRef)(null),R=(0,p.of)(T),[B,H]=(0,u.useState)(!1),[w,N]=(0,u.useState)(0),[V,G]=(0,u.useState)((0,m.mO)(S)),_=(0,c.A)(V),[K,j]=(0,u.useState)(0),k=[(0,n.cY)(({rects:ue})=>({alignmentAxis:ue.reference.width})),(0,o.UU)({fallbackAxisSideDirection:"start",crossAxis:!1,boundary:document.body}),(0,o.BN)()],{refs:Y,floatingStyles:ee}=(0,s.we)({open:B,placement:"bottom-start",onOpenChange:H,middleware:k,whileElementsMounted:o.ll,strategy:"fixed"}),re=(0,u.useRef)({showingSuggestions:B,suggestions:P,suggestionsIndex:w,linkUrl:V,onChange:O});re.current={showingSuggestions:B,suggestions:P,suggestionsIndex:w,linkUrl:V,onChange:O};const J=(0,u.useRef)(null);(0,u.useEffect)(()=>{j(x(J.current,w))},[w]);const ne=u.useCallback((ue,ie)=>{if(!re.current.showingSuggestions){if(ue.key==="="||ue.key==="$"||ue.keyCode===32&&ue.ctrlKey){const ge=new b;return Y.setReference(ge),H(!0)}return ie()}switch(ue.key){case"Backspace":case"Escape":return H(!1),N(0);case"Enter":return ue.preventDefault(),te(re.current.suggestions[re.current.suggestionsIndex]);case"ArrowDown":case"ArrowUp":ue.preventDefault();const ge=ue.key==="ArrowDown"?1:-1;return N(he=>C(he+ge,re.current.suggestions.length));default:return ie()}},[]);(0,u.useEffect)(()=>{_&&_.selection.isFocused&&!V.selection.isFocused&&re.current.onChange(i.A.serialize(V))},[V,_]);const q=u.useCallback(({value:ue})=>{G(ue)},[]),te=(ue,ie=U.current)=>{const he=oe()==="$";ue.origin!==f.$0.Template||ue.value===d.c.includeVars?ie.insertText(`${he?"":"$"}{${ue.value}}`):ie.insertText(`${he?"":"$"}{${ue.value}:queryparam}`),G(ie.value),H(!1),N(0),re.current.onChange(i.A.serialize(ie.value))},oe=()=>{const ue=document.getElementById("data-link-input");let ie="",ge,he;return window.getSelection&&(ge=window.getSelection(),ge&&ge.rangeCount>0&&(he=ge.getRangeAt(0).cloneRange(),he.collapse(!0),he.setStart(ue,0),ie=he.toString().slice(-1))),ie};return u.createElement("div",{className:R.wrapperOverrides},u.createElement("div",{className:"slate-query-field__wrapper"},u.createElement("div",{id:"data-link-input",className:"slate-query-field"},B&&u.createElement(E.ZL,null,u.createElement("div",{ref:Y.setFloating,style:ee},u.createElement(a.A,{scrollTop:K,autoHeightMax:"300px",setScrollTop:({scrollTop:ue})=>j(ue)},u.createElement(D.k,{activeRef:J,suggestions:re.current.suggestions,onSuggestionSelect:te,onClose:()=>H(!1),activeIndex:w})))),u.createElement(l.KE,{schema:m.yx,ref:U,placeholder:L,value:re.current.linkUrl,onChange:q,onKeyDown:(ue,ie,ge)=>ne(ue,ge),plugins:M,className:(0,t.cx)(R.editor,R.input,(0,t.css)({padding:"3px 8px"}))}))))});I.displayName="DataLinkInput";function x(S,O){return(S?.clientHeight??0)*O}},43538:(Q,A,e)=>{"use strict";e.d(A,{k:()=>i});var t=e(32196),n=e(2543),o=e.n(n),s=e(96540),r=e(37151),g=e(40845),u=e(33552);const c=f=>({list:(0,t.css)({borderBottom:`1px solid ${f.colors.border.weak}`,"&:last-child":{border:"none"}}),wrapper:(0,t.css)({background:f.colors.background.primary,width:"250px"}),item:(0,t.css)({background:"none",padding:"2px 8px",userSelect:"none",color:f.colors.text.primary,cursor:"pointer","&:hover":{background:f.colors.action.hover}}),label:(0,t.css)({color:f.colors.text.secondary}),activeItem:(0,t.css)({background:f.colors.background.secondary,"&:hover":{background:f.colors.background.secondary}}),itemValue:(0,t.css)({fontFamily:f.typography.fontFamilyMonospace,fontSize:f.typography.size.sm})}),i=({suggestions:f,...d})=>{const h=(0,s.useRef)(null);(0,r.A)(h,()=>{d.onClose&&d.onClose()});const p=(0,s.useMemo)(()=>(0,n.groupBy)(f,a=>a.origin),[f]),m=(0,g.of)(c);return s.createElement("div",{role:"menu",ref:h,className:m.wrapper},Object.keys(p).map((a,v)=>{const E=v===0?0:Object.keys(p).reduce((D,b,C)=>C>=v?D:D+p[b].length,0);return s.createElement(l,{...d,suggestions:p[a],label:`${(0,n.capitalize)(a)}`,activeIndex:d.activeIndex,activeIndexOffset:E,key:a})}))};i.displayName="DataLinkSuggestions";const l=s.memo(({activeIndex:f,activeIndexOffset:d,label:h,onClose:p,onSuggestionSelect:m,suggestions:a,activeRef:v})=>{const E=(0,g.of)(c);return s.createElement(s.Fragment,null,s.createElement(u.B,{className:E.list,items:a,renderItem:(D,b)=>{const C=b+d===f;return s.createElement("div",{role:"menuitem",tabIndex:0,className:(0,t.cx)(E.item,C&&E.activeItem),ref:C?v:void 0,onClick:()=>{m(D)},title:D.documentation},s.createElement("span",{className:E.itemValue},s.createElement("span",{className:E.label},h)," ",D.label))}}))});l.displayName="DataLinkSuggestionsList"},59796:(Q,A,e)=>{"use strict";e.d(A,{e:()=>c});var t=e(32196),n=e(96540),o=e(13544),s=e(14555),r=e(51686),g=e(59093),u=e(64539);const c=({children:i,links:l,style:f})=>{const d=[{items:(0,s.J)(l),label:"Data links"}],h=d[0].items.length,p=()=>d.map((a,v)=>n.createElement(g.r,{key:`${a.label}${v}`,label:a.label},(a.items||[]).map((E,D)=>n.createElement(u.D,{key:`${a.label}-${v}-${D}}`,url:E.url,label:E.label,target:E.target,icon:E.icon,active:E.active,onClick:E.onClick})))),m=(0,t.css)({cursor:"context-menu"});if(h>1)return n.createElement(r.n,{renderMenuItems:p},({openMenu:a})=>i({openMenu:a,targetClassName:m}));{const a=l()[0];return n.createElement("a",{href:a.href,onClick:a.onClick,target:a.target,title:a.title,style:{...f,overflow:"hidden",display:"flex"},"data-testid":o.Tp.components.DataLinksContextMenu.singleLink},i({}))}}},64919:(Q,A,e)=>{"use strict";e.d(A,{e:()=>D});var t=e(32196),n=e(2543),o=e(96540),s=e(40845),r=e(55852),g=e(37390),u=e(14555),c=e(88575),i=e(10354),l=e(15292),f=e(64078);const d=C=>({listItem:(0,t.css)({marginBottom:C.spacing()}),infoText:(0,t.css)({paddingBottom:C.spacing(2),marginLeft:"66px",color:C.colors.text.secondary})}),h=o.memo(({index:C,value:y,onChange:M,suggestions:T,isLast:I})=>{const x=(0,s.of)(d),S=(L,U)=>{M(C,{...y,url:L},U)},O=L=>{M(C,{...y,title:L.target.value})},P=()=>{M(C,{...y,targetBlank:!y.targetBlank})};return o.createElement("div",{className:x.listItem},o.createElement(c.D,{label:"Title"},o.createElement(i.p,{value:y.title,onChange:O,placeholder:"Show details"})),o.createElement(c.D,{label:"URL",invalid:(0,u.F)(y.url),error:"Data link is an Explore URL in a deprecated format. Please visit the URL to be redirected, and edit this data link to use that URL."},o.createElement(f.l,{value:y.url,onChange:S,suggestions:T})),o.createElement(c.D,{label:"Open in new tab"},o.createElement(l.d,{value:y.targetBlank||!1,onChange:P})),I&&o.createElement("div",{className:x.infoText},"With data links you can reference data variables like series name, labels and values. Type CMD+Space, CTRL+Space, or $ to open variable suggestions."))});h.displayName="DataLinkEditor";const p=({link:C,index:y,getSuggestions:M,onSave:T,onCancel:I})=>{const[x,S]=(0,o.useState)(C);return o.createElement(o.Fragment,null,o.createElement(h,{value:x,index:y,isLast:!1,suggestions:M(),onChange:(O,P)=>{S(P)}}),o.createElement(g.a.ButtonRow,null,o.createElement(r.$n,{variant:"secondary",onClick:()=>I(y),fill:"outline"},"Cancel"),o.createElement(r.$n,{onClick:()=>{T(y,x)}},"Save")))};var m=e(72093),a=e(29158);const v=({link:C,onEdit:y,onRemove:M})=>{const T=(0,s.of)(E),{title:I="",url:x=""}=C,S=I.trim()!=="",O=x.trim()!=="",P=(0,u.F)(x);return o.createElement("div",{className:T.wrapper},o.createElement("div",{className:T.titleWrapper},o.createElement("div",{className:(0,t.cx)(T.url,!O&&T.notConfigured,P&&T.errored)},S?I:"Data link title not provided"),o.createElement("div",{className:T.actionButtons},o.createElement(a.K,{name:"pen",onClick:y,tooltip:"Edit data link title"}),o.createElement(a.K,{name:"times",onClick:M,tooltip:"Remove data link title"}))),o.createElement("div",{className:(0,t.cx)(T.url,!O&&T.notConfigured,P&&T.errored),title:x},O?x:"Data link url not provided"),P&&o.createElement(m.P,null,"Explore data link may not work in the future. Please edit."))},E=C=>({wrapper:(0,t.css)({marginBottom:C.spacing(2),width:"100%","&:last-child":{marginBottom:0},display:"flex",flexDirection:"column"}),titleWrapper:(0,t.css)({label:"data-links-list-item-title",justifyContent:"space-between",display:"flex",width:"100%",alignItems:"center"}),actionButtons:(0,t.css)({marginLeft:C.spacing(1),display:"flex"}),errored:(0,t.css)({color:C.colors.error.text,fontStyle:"italic"}),notConfigured:(0,t.css)({fontStyle:"italic"}),title:(0,t.css)({color:C.colors.text.primary,fontSize:C.typography.size.sm,fontWeight:C.typography.fontWeightMedium}),url:(0,t.css)({color:C.colors.text.secondary,fontSize:C.typography.size.sm,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"90%"})}),D=({links:C,onChange:y,getSuggestions:M,data:T})=>{const[I,x]=(0,o.useState)(null),[S,O]=(0,o.useState)(!1),P=(0,s.of)(b),L=C??[],U=I!==null,R=(N,V)=>{if(S)if(V.title.trim()===""&&V.url.trim()===""){O(!1),x(null);return}else x(null),O(!1);const G=(0,n.cloneDeep)(L);G[N]=V,y(G),x(null)},B=()=>{let N=(0,n.cloneDeep)(L);x(N.length),O(!0)},H=N=>{S&&O(!1),x(null)},w=N=>{const V=(0,n.cloneDeep)(L);V.splice(N,1),y(V)};return o.createElement(o.Fragment,null,L.length>0&&o.createElement("div",{className:P.wrapper},L.map((N,V)=>o.createElement(v,{key:`${N.title}/${V}`,index:V,link:N,onChange:R,onEdit:()=>x(V),onRemove:()=>w(V),data:T}))),U&&I!==null&&o.createElement(g.a,{title:"Edit link",isOpen:!0,closeOnBackdropClick:!1,onDismiss:()=>{H(I)}},o.createElement(p,{index:I,link:S?{title:"",url:""}:L[I],data:T,onSave:R,onCancel:H,getSuggestions:M})),o.createElement(r.$n,{size:"sm",icon:"plus",onClick:B,variant:"secondary"},"Add link"))},b=C=>({wrapper:(0,t.css)({marginBottom:C.spacing(2)})})},79961:(Q,A,e)=>{"use strict";e.d(A,{n:()=>g});var t=e(32196),n=e(96540),o=e(40845),s=e(14578),r=e(14689);function g({links:c}){const i=(0,o.of)(u);if(c.length===1)return n.createElement(r.R,{link:c[0]});const l=c.filter(d=>d.target==="_blank"),f=c.filter(d=>d.target==="_self");return n.createElement(n.Fragment,null,f.map((d,h)=>n.createElement(r.R,{key:h,link:d})),n.createElement("div",{className:i.wrapper},n.createElement("p",{className:i.externalLinksHeading},"External links"),l.map((d,h)=>n.createElement("a",{key:h,href:d.href,target:d.target,className:i.externalLink},n.createElement(s.I,{name:"external-link-alt"}),d.title))))}const u=c=>({wrapper:(0,t.css)({flexBasis:"150px",width:"100px",marginTop:c.spacing(1)}),externalLinksHeading:(0,t.css)({color:c.colors.text.secondary,fontWeight:c.typography.fontWeightRegular,fontSize:c.typography.size.sm,margin:0}),externalLink:(0,t.css)({color:c.colors.text.link,fontWeight:c.typography.fontWeightRegular,display:"block",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","&:hover":{textDecoration:"underline"},div:{marginRight:c.spacing(1)}})})},19849:(Q,A,e)=>{"use strict";e.d(A,{i:()=>s});var t=e(96540),n=e(15292),o=e(14186);function s({options:r,onOptionsChange:g}){return t.createElement(t.Fragment,null,t.createElement("h3",{className:"page-heading"},"Alerting"),t.createElement("div",{className:"gf-form-group"},t.createElement("div",{className:"gf-form-inline"},t.createElement("div",{className:"gf-form"},t.createElement(o.I,{labelWidth:29,label:"Manage alert rules in Alerting UI",disabled:r.readOnly,tooltip:"Manage alert rules for this data source. To manage other alerting resources, add an Alertmanager data source."},t.createElement(n.K,{value:r.jsonData.manageAlerts!==!1,onChange:u=>g({...r,jsonData:{...r.jsonData,manageAlerts:u.currentTarget.checked}})}))))))}},28623:(Q,A,e)=>{"use strict";e.d(A,{K:()=>u});var t=e(96540),n=e(55852),o=e(14186),s=e(39268),r=e(10354),g=e(21744);const u=({hasCert:c,label:i,onChange:l,onClick:f,placeholder:d})=>t.createElement(s.C,null,t.createElement(o.I,{label:i,labelWidth:14,disabled:c},c?t.createElement(r.p,{type:"text",value:"configured",width:24}):t.createElement(g.f,{rows:7,onChange:l,placeholder:d,required:!0})),c&&t.createElement(n.$n,{variant:"secondary",onClick:f,style:{marginLeft:4}},"Reset"))},11184:(Q,A,e)=>{"use strict";e.d(A,{P:()=>d});var t=e(32196),n=e(2543),o=e.n(n),s=e(96540),r=e(40845),g=e(55852),u=e(90090),c=e(14578),i=e(56286);const l=()=>({layout:(0,t.css)({display:"flex",alignItems:"center",marginBottom:"4px","> *":{marginLeft:"4px",marginBottom:0,height:"100%","&:first-child, &:last-child":{marginLeft:0}}})}),f=({header:p,onBlur:m,onChange:a,onRemove:v,onReset:E})=>{const D=(0,r.of)(l);return s.createElement("div",{className:D.layout},s.createElement(u.z,{label:"Header",name:"name",placeholder:"X-Custom-Header",labelWidth:5,value:p.name||"",onChange:b=>a({...p,name:b.target.value}),onBlur:m}),s.createElement(i.L,{label:"Value","aria-label":"Value",name:"value",isConfigured:p.configured,value:p.value,labelWidth:5,inputWidth:p.configured?11:12,placeholder:"Header Value",onReset:()=>E(p.id),onChange:b=>a({...p,value:b.target.value}),onBlur:m}),s.createElement(g.$n,{type:"button","aria-label":"Remove header",variant:"secondary",size:"xs",onClick:b=>v(p.id)},s.createElement(c.I,{name:"trash-alt"})))};f.displayName="CustomHeaderRow";class d extends s.PureComponent{constructor(m){super(m),this.state={headers:[]},this.updateSettings=()=>{const{headers:D}=this.state,b=Object.fromEntries(Object.entries(this.props.dataSourceConfig.jsonData).filter(([y,M])=>!y.startsWith("httpHeaderName"))),C=Object.fromEntries(Object.entries(this.props.dataSourceConfig.secureJsonData||{}).filter(([y,M])=>!y.startsWith("httpHeaderValue")));for(const[y,M]of D.entries())b[`httpHeaderName${y+1}`]=M.name,M.configured||(C[`httpHeaderValue${y+1}`]=M.value);this.props.onChange({...this.props.dataSourceConfig,jsonData:b,secureJsonData:C})},this.onHeaderAdd=()=>{this.setState(D=>({headers:[...D.headers,{id:(0,n.uniqueId)(),name:"",value:"",configured:!1}]}))},this.onHeaderChange=(D,b)=>{this.setState(({headers:C})=>({headers:C.map((y,M)=>D!==M?y:{...b})}))},this.onHeaderReset=D=>{this.setState(({headers:b})=>({headers:b.map((C,y)=>C.id!==D?C:{...C,value:"",configured:!1})}))},this.onHeaderRemove=D=>{this.setState(({headers:b})=>({headers:b.filter(C=>C.id!==D)}),this.updateSettings)};const{jsonData:a,secureJsonData:v,secureJsonFields:E}=this.props.dataSourceConfig;this.state={headers:Object.keys(a).sort().filter(D=>D.startsWith("httpHeaderName")).map((D,b)=>({id:(0,n.uniqueId)(),name:a[D],value:v!==void 0?v[D]:"",configured:E&&E[`httpHeaderValue${b+1}`]||!1}))}}render(){const{headers:m}=this.state,{dataSourceConfig:a}=this.props;return s.createElement("div",{className:"gf-form-group"},s.createElement("div",{className:"gf-form"},s.createElement("h6",null,"Custom HTTP Headers")),s.createElement("div",null,m.map((v,E)=>s.createElement(f,{key:v.id,header:v,onChange:D=>{this.onHeaderChange(E,D)},onBlur:this.updateSettings,onRemove:this.onHeaderRemove,onReset:this.onHeaderReset}))),!a.readOnly&&s.createElement("div",{className:"gf-form"},s.createElement(g.$n,{variant:"secondary",icon:"plus",type:"button",onClick:v=>{this.onHeaderAdd()}},"Add header")))}}var h=null},91409:(Q,A,e)=>{"use strict";e.d(A,{t:()=>T});var t=e(32196),n=e(96540),o=e(13544),s=e(40845),r=e(90090),g=e(38894),u=e(14186),c=e(91634),i=e(14578),l=e(88323),f=e(15292),d=e(79924),h=e(56286);const p=({dataSourceConfig:I,onChange:x})=>{const S=I.secureJsonData?I.secureJsonData.basicAuthPassword:"",O=()=>{x({...I,secureJsonData:{...I.secureJsonData,basicAuthPassword:""},secureJsonFields:{...I.secureJsonFields,basicAuthPassword:!1}})},P=L=>{x({...I,secureJsonData:{...I.secureJsonData,basicAuthPassword:L.currentTarget.value}})};return n.createElement(n.Fragment,null,n.createElement(u.I,{disabled:I.readOnly},n.createElement(r.z,{label:"User",labelWidth:10,inputWidth:18,placeholder:"user",value:I.basicAuthUser,onChange:L=>x({...I,basicAuthUser:L.currentTarget.value})})),n.createElement(u.I,{disabled:I.readOnly},n.createElement(h.L,{isConfigured:!!(I.secureJsonFields&&I.secureJsonFields.basicAuthPassword),value:S||"",inputWidth:18,labelWidth:10,onReset:O,onChange:P})))};var m=e(11184);const a=26,v=({dataSourceConfig:I,onChange:x,showForwardOAuthIdentityOption:S=!0})=>n.createElement(n.Fragment,null,n.createElement("div",{className:"gf-form-inline"},n.createElement(u.I,{label:"TLS Client Auth",labelWidth:a,disabled:I.readOnly},n.createElement(f.K,{id:"http-settings-tls-client-auth",value:I.jsonData.tlsAuth||!1,onChange:O=>x({...I.jsonData,tlsAuth:O.currentTarget.checked})})),n.createElement(u.I,{label:"With CA Cert",tooltip:"Needed for verifying self-signed TLS Certs",labelWidth:a,disabled:I.readOnly},n.createElement(f.K,{id:"http-settings-ca-cert",value:I.jsonData.tlsAuthWithCACert||!1,onChange:O=>x({...I.jsonData,tlsAuthWithCACert:O.currentTarget.checked})}))),n.createElement("div",{className:"gf-form-inline"},n.createElement(u.I,{label:"Skip TLS Verify",labelWidth:a,disabled:I.readOnly},n.createElement(f.K,{id:"http-settings-skip-tls-verify",value:I.jsonData.tlsSkipVerify||!1,onChange:O=>x({...I.jsonData,tlsSkipVerify:O.currentTarget.checked})}))),S&&n.createElement("div",{className:"gf-form-inline"},n.createElement(u.I,{label:"Forward OAuth Identity",tooltip:"Forward the user's upstream OAuth identity to the data source (Their access token gets passed along).",labelWidth:a,disabled:I.readOnly},n.createElement(f.K,{id:"http-settings-forward-oauth",value:I.jsonData.oauthPassThru||!1,onChange:O=>x({...I.jsonData,oauthPassThru:O.currentTarget.checked})}))));var E=e(17081),D=e(95180);const b=[{label:"Server (default)",value:"proxy"},{label:"Browser",value:"direct"}],C={label:"Server (default)",value:"proxy"},y=()=>n.createElement("div",{className:"grafana-info-box m-t-2"},n.createElement("p",null,"Access mode controls how requests to the data source will be handled.",n.createElement("strong",null,"\xA0",n.createElement("i",null,"Server"))," ","should be the preferred way if nothing else is stated."),n.createElement("div",{className:"alert-title"},"Server access mode (Default):"),n.createElement("p",null,"All requests will be made from the browser to Grafana backend/server which in turn will forward the requests to the data source and by that circumvent possible Cross-Origin Resource Sharing (CORS) requirements. The URL needs to be accessible from the grafana backend/server if you select this access mode."),n.createElement("div",{className:"alert-title"},"Browser access mode:"),n.createElement("p",null,"All requests will be made from the browser directly to the data source and may be subject to Cross-Origin Resource Sharing (CORS) requirements. The URL needs to be accessible from the browser if you select this access mode.")),M=26,T=I=>{const{defaultUrl:x,dataSourceConfig:S,onChange:O,showAccessOptions:P,sigV4AuthToggleEnabled:L,showForwardOAuthIdentityOption:U,azureAuthSettings:R,renderSigV4Editor:B,secureSocksDSProxyEnabled:H,urlLabel:w,urlDocs:N}=I,[V,G]=(0,n.useState)(!1),[_,K]=(0,n.useState)(!1),j=(0,s.$j)();let k;const Y=(0,n.useCallback)(oe=>{const ue=R?.azureAuthSupported&&R.getAzureAuthEnabled(S)||!1;if(K(ue),ue){const ie=S.jsonData.oauthPassThru!==void 0?S.jsonData.oauthPassThru:!1;oe={...oe,jsonData:{...S.jsonData,oauthPassThru:ue?!1:ie}}}O({...S,...oe})},[R,S,O]);switch(S.access){case"direct":k=n.createElement(n.Fragment,null,"Your access method is ",n.createElement("em",null,"Browser"),", this means the URL needs to be accessible from the browser.",N);break;case"proxy":k=n.createElement(n.Fragment,null,"Your access method is ",n.createElement("em",null,"Server"),", this means the URL needs to be accessible from the grafana backend/server.",N);break;default:k=n.createElement(n.Fragment,null,"Specify a complete HTTP URL (for example http://your_server:8080) ",N)}const ee=n.createElement(l.l6,{"aria-label":"Access",className:"width-20 gf-form-input",options:b,value:b.filter(oe=>oe.value===S.access)[0]||C,onChange:oe=>Y({access:oe.value}),disabled:S.readOnly}),re=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/.test(S.url),J=(0,t.css)({boxShadow:`inset 0 0px 5px ${j.v1.palette.red}`}),ne=(0,t.cx)({["width-20"]:!0,[J]:!re}),q=(0,n.useId)(),te=n.createElement(c.p,{id:q,className:ne,placeholder:x,value:S.url,"data-testid":o.Tp.components.DataSource.DataSourceHttpSettings.urlInput,onChange:oe=>Y({url:oe.currentTarget.value}),disabled:S.readOnly});return n.createElement("div",{className:"gf-form-group"},n.createElement(n.Fragment,null,n.createElement("h3",{className:"page-heading"},"HTTP"),n.createElement("div",{className:"gf-form-group"},n.createElement("div",{className:"gf-form"},n.createElement(r.z,{interactive:!!N,label:w??"URL",labelWidth:13,tooltip:k,inputEl:te})),P&&n.createElement(n.Fragment,null,n.createElement("div",{className:"gf-form-inline"},n.createElement("div",{className:"gf-form"},n.createElement(r.z,{label:"Access",labelWidth:13,inputWidth:20,inputEl:ee})),n.createElement("div",{className:"gf-form"},n.createElement("button",{type:"button",className:"gf-form-label query-keyword pointer",onClick:()=>G(oe=>!oe)},"Help\xA0",n.createElement(i.I,{name:V?"angle-down":"angle-right",style:{marginBottom:0}})))),V&&n.createElement(y,null)),S.access==="proxy"&&n.createElement("div",{className:"gf-form-group"},n.createElement("div",{className:"gf-form"},n.createElement(g.I,{width:13,tooltip:"Grafana proxy deletes forwarded cookies by default. Specify cookies by name that should be forwarded to the data source."},"Allowed cookies"),n.createElement(d.u,{tags:S.jsonData.keepCookies,width:40,onChange:oe=>Y({jsonData:{...S.jsonData,keepCookies:oe}}),disabled:S.readOnly})),n.createElement("div",{className:"gf-form"},n.createElement(r.z,{label:"Timeout",type:"number",labelWidth:13,inputWidth:20,tooltip:"HTTP request timeout in seconds",placeholder:"Timeout in seconds","aria-label":"Timeout in seconds",value:S.jsonData.timeout,onChange:oe=>{Y({jsonData:{...S.jsonData,timeout:parseInt(oe.currentTarget.value,10)}})},disabled:S.readOnly}))))),n.createElement(n.Fragment,null,n.createElement("h3",{className:"page-heading"},"Auth"),n.createElement("div",{className:"gf-form-group"},n.createElement("div",{className:"gf-form-inline"},n.createElement(u.I,{label:"Basic auth",labelWidth:M,disabled:S.readOnly},n.createElement(f.K,{id:"http-settings-basic-auth",value:S.basicAuth,onChange:oe=>{Y({basicAuth:oe.currentTarget.checked})}})),n.createElement(u.I,{label:"With Credentials",tooltip:"Whether credentials such as cookies or auth headers should be sent with cross-site requests.",labelWidth:M,disabled:S.readOnly},n.createElement(f.K,{id:"http-settings-with-credentials",value:S.withCredentials,onChange:oe=>{Y({withCredentials:oe.currentTarget.checked})}}))),R?.azureAuthSupported&&n.createElement("div",{className:"gf-form-inline"},n.createElement(u.I,{label:"Azure Authentication",tooltip:"Use Azure authentication for Azure endpoint.",labelWidth:M,disabled:S.readOnly},n.createElement(f.K,{id:"http-settings-azure-auth",value:_,onChange:oe=>{Y(R.setAzureAuthEnabled(S,oe.currentTarget.checked))}}))),L&&n.createElement("div",{className:"gf-form-inline"},n.createElement(u.I,{label:"SigV4 auth",labelWidth:M,disabled:S.readOnly},n.createElement(f.K,{id:"http-settings-sigv4-auth",value:S.jsonData.sigV4Auth||!1,onChange:oe=>{Y({jsonData:{...S.jsonData,sigV4Auth:oe.currentTarget.checked}})}}))),S.access==="proxy"&&n.createElement(v,{dataSourceConfig:S,onChange:oe=>Y({jsonData:oe}),showForwardOAuthIdentityOption:_?!1:U})),S.basicAuth&&n.createElement(n.Fragment,null,n.createElement("h6",null,"Basic Auth Details"),n.createElement("div",{className:"gf-form-group"},n.createElement(p,{...I}))),R?.azureAuthSupported&&_&&R.azureSettingsUI&&n.createElement(R.azureSettingsUI,{dataSourceConfig:S,onChange:O}),S.jsonData.sigV4Auth&&L&&B,(S.jsonData.tlsAuth||S.jsonData.tlsAuthWithCACert)&&n.createElement(D.j,{dataSourceConfig:S,onChange:O}),S.access==="proxy"&&n.createElement(m.P,{dataSourceConfig:S,onChange:O})),H&&n.createElement(E.Y,{options:S,onOptionsChange:O}))}},17081:(Q,A,e)=>{"use strict";e.d(A,{Y:()=>s});var t=e(96540),n=e(15292),o=e(14186);function s({options:r,onOptionsChange:g}){return t.createElement(t.Fragment,null,t.createElement("h3",{className:"page-heading"},"Secure Socks Proxy"),t.createElement("div",{className:"gf-form-group"},t.createElement("div",{className:"gf-form-inline"},t.createElement("div",{className:"gf-form"},t.createElement(o.I,{labelWidth:26,label:"Enabled",tooltip:"Connect to this datasource via the secure socks proxy."},t.createElement(n.K,{value:r.jsonData.enableSecureSocksProxy??!1,onChange:u=>g({...r,jsonData:{...r.jsonData,enableSecureSocksProxy:u.currentTarget.checked}})}))))))}},95180:(Q,A,e)=>{"use strict";e.d(A,{j:()=>u});var t=e(32196),n=e(96540),o=e(90090),s=e(14578),r=e(56034),g=e(28623);const u=({dataSourceConfig:c,onChange:i})=>{const l=c.secureJsonFields&&c.secureJsonFields.tlsCACert,f=c.secureJsonFields&&c.secureJsonFields.tlsClientCert,d=c.secureJsonFields&&c.secureJsonFields.tlsClientKey,h=c.jsonData&&c.jsonData.serverName,p=v=>E=>{E.preventDefault();const D={...c.secureJsonFields};D[v]=!1,i({...c,secureJsonFields:D})},m=v=>E=>{const D={...c.secureJsonData};D[v]=E.currentTarget.value,i({...c,secureJsonData:D})},a=v=>{const E={...c.jsonData,serverName:v.currentTarget.value};i({...c,jsonData:E})};return n.createElement("div",{className:"gf-form-group"},n.createElement("div",{className:(0,t.cx)("gf-form",(0,t.css)({alignItems:"baseline"}))},n.createElement("h6",null,"TLS/SSL Auth Details"),n.createElement(r.m,{placement:"right-end",content:"TLS/SSL Certs are encrypted and stored in the Grafana database.",theme:"info"},n.createElement(s.I,{name:"info-circle",size:"xs",style:{marginLeft:"10px"}}))),n.createElement("div",null,c.jsonData.tlsAuthWithCACert&&n.createElement(g.K,{hasCert:!!l,onChange:m("tlsCACert"),placeholder:"Begins with -----BEGIN CERTIFICATE-----",label:"CA Cert",onClick:p("tlsCACert")}),c.jsonData.tlsAuth&&n.createElement(n.Fragment,null,n.createElement("div",{className:"gf-form"},n.createElement(o.z,{label:"ServerName",labelWidth:7,inputWidth:30,placeholder:"domain.example.com",value:h&&c.jsonData.serverName,onChange:a})),n.createElement(g.K,{hasCert:!!f,label:"Client Cert",onChange:m("tlsClientCert"),placeholder:"Begins with -----BEGIN CERTIFICATE-----",onClick:p("tlsClientCert")}),n.createElement(g.K,{hasCert:!!d,label:"Client Key",placeholder:"Begins with -----BEGIN RSA PRIVATE KEY-----",onChange:m("tlsClientKey"),onClick:p("tlsClientKey")}))))}},56181:(Q,A,e)=>{"use strict";e.d(A,{l:()=>c});var t=e(32196),n=e(96540),o=e(29426),s=e(40845),r=e(8866),g=e(14578),u=e(72265);const c=(0,n.memo)(f=>{const d=(0,s.of)(l),{isOpen:h,onClose:p}=f;return h?n.createElement(r.N,{useCapture:!0,includeButtonPress:!1,onClick:p},n.createElement("div",{className:d.modal,"data-testid":"date-picker"},n.createElement(i,{...f}))):null});c.displayName="DatePicker";const i=(0,n.memo)(({value:f,minDate:d,maxDate:h,onChange:p})=>{const m=(0,s.of)(u.h2);return n.createElement(o.Ay,{className:m.body,tileClassName:m.title,value:f||new Date,minDate:d,maxDate:h,nextLabel:n.createElement(g.I,{name:"angle-right"}),prevLabel:n.createElement(g.I,{name:"angle-left"}),onChange:a=>{a&&!Array.isArray(a)&&p(a)},locale:"en"})});i.displayName="Body";const l=f=>({modal:(0,t.css)({zIndex:f.zIndex.modal,position:"absolute",boxShadow:f.shadows.z3,backgroundColor:f.colors.background.primary,border:`1px solid ${f.colors.border.weak}`,borderTopLeftRadius:f.shape.radius.default,borderBottomLeftRadius:f.shape.radius.default,"button:disabled":{color:f.colors.text.disabled}})})},98239:(Q,A,e)=>{"use strict";e.d(A,{l:()=>c});var t=e(32196),n=e(96540),o=e(47232),s=e(40845),r=e(10354),g=e(56181);const u=l=>(0,o.KQ)(l).format("L"),c=({value:l,minDate:f,maxDate:d,onChange:h,closeOnSelect:p,placeholder:m="Date",...a})=>{const[v,E]=n.useState(!1),D=(0,s.of)(i);return n.createElement("div",{className:D.container},n.createElement(r.p,{type:"text",autoComplete:"off",placeholder:m,value:l&&u(l),onClick:()=>E(!0),onChange:b=>{b.target.value===""&&h("")},className:D.input,...a}),n.createElement(g.l,{isOpen:v,value:l&&typeof l!="string"?l:(0,o.KQ)().toDate(),minDate:f,maxDate:d,onChange:b=>{h(b),p&&E(!1)},onClose:()=>E(!1)}))},i=()=>({container:(0,t.css)({position:"relative"}),input:(0,t.css)({"input[type='date']::-webkit-inner-spin-button, input[type='date']::-webkit-calendar-picker-indicator":{display:"none",WebkitAppearance:"none"}})})},63383:(Q,A,e)=>{"use strict";e.d(A,{K:()=>M});var t=e(32196),n=e(80279),o=e(7887),s=e(82148),r=e(96540),g=e(29426),u=e(39522),c=e(49045),i=e(72724),l=e(47232),f=e(13390),d=e(40845),h=e(55852),p=e(14186),m=e(14578),a=e(10354),v=e(66864),E=e(88448),D=e(17464),b=e(66070),C=e(72265),y=e(47619);const M=({date:S,maxDate:O,minDate:P,label:L,onChange:U,disabledHours:R,disabledMinutes:B,disabledSeconds:H,showSeconds:w=!0})=>{const[N,V]=(0,r.useState)(!1),G=(0,r.useRef)(null),{overlayProps:_,underlayProps:K}=(0,s.e)({onClose:()=>V(!1),isDismissable:!0,isOpen:N,shouldCloseOnInteractOutside:ge=>{const he=document.getElementsByClassName(b.i)[0];return!(he&&he.contains(ge))}},G),{dialogProps:j}=(0,n.s)({},G),k=(0,d.$j)(),{modalBackdrop:Y}=(0,d.of)(E.o),ee=(0,c.A)(`(min-width: ${k.breakpoints.values.lg}px)`),re=(0,d.of)(x),[J,ne]=(0,r.useState)(),[q,te]=(0,r.useState)(),oe=(0,u.E)(J,q,{placement:"bottom-start"}),ue=(0,r.useCallback)(ge=>{V(!1),U(ge)},[U]),ie=(0,r.useCallback)(ge=>{ge.preventDefault(),V(!0)},[V]);return r.createElement("div",{"data-testid":"date-time-picker",style:{position:"relative"}},r.createElement(T,{date:S,onChange:U,isFullscreen:ee,onOpen:ie,label:L,ref:ne,showSeconds:w}),N?ee?r.createElement(D.ZL,null,r.createElement(o.n1,{contain:!0,autoFocus:!0,restoreFocus:!0},r.createElement("div",{ref:G,..._,...j},r.createElement(I,{date:S,onChange:ue,isFullscreen:!0,onClose:()=>V(!1),maxDate:O,minDate:P,ref:te,style:oe.styles.popper,showSeconds:w,disabledHours:R,disabledMinutes:B,disabledSeconds:H})))):r.createElement(D.ZL,null,r.createElement("div",{className:Y,...K}),r.createElement(o.n1,{contain:!0,autoFocus:!0,restoreFocus:!0},r.createElement("div",{ref:G,..._,...j},r.createElement("div",{className:re.modal},r.createElement(I,{date:S,maxDate:O,minDate:P,onChange:ue,isFullscreen:!1,onClose:()=>V(!1),showSeconds:w,disabledHours:R,disabledMinutes:B,disabledSeconds:H}))))):null)},T=r.forwardRef(({date:S,label:O,onChange:P,onOpen:L,showSeconds:U=!0},R)=>{const B=U?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD HH:mm",[H,w]=(0,r.useState)(()=>({value:S?(0,i.LE)(S):(0,i.LE)((0,l.KQ)()),invalid:!1}));(0,r.useEffect)(()=>{S&&w({invalid:!(0,y.f)((0,i.LE)(S,{format:B})),value:(0,l.Ar)(S)?(0,i.LE)(S,{format:B}):S})},[S,B]);const N=(0,r.useCallback)(_=>{const K=!(0,y.f)(_.currentTarget.value);w({value:_.currentTarget.value,invalid:K})},[]),V=(0,r.useCallback)(()=>{if(!H.invalid){const _=(0,l.KQ)(H.value);P(_)}},[H,P]),G=r.createElement(h.$n,{"aria-label":"Time picker",icon:"calendar-alt",variant:"secondary",onClick:L});return r.createElement(p.I,{label:O,invalid:!!(H.value&&H.invalid),className:(0,t.css)({marginBottom:0})},r.createElement(a.p,{onChange:N,addonAfter:G,value:H.value,onBlur:V,"data-testid":f.X.DateTimePicker.input,placeholder:"Select date/time",ref:R}))});T.displayName="DateTimeInput";const I=r.forwardRef(({date:S,onClose:O,onChange:P,isFullscreen:L,maxDate:U,minDate:R,style:B,showSeconds:H=!0,disabledHours:w,disabledMinutes:N,disabledSeconds:V},G)=>{const _=(0,d.of)(C.h2),K=(0,d.of)(x),[j,k]=(0,r.useState)(()=>S&&S.isValid()?S.toDate():new Date),Y=(0,r.useCallback)(re=>{re&&!Array.isArray(re)&&k(J=>(re.setHours(J.getHours()),re.setMinutes(J.getMinutes()),re.setSeconds(J.getSeconds()),re))},[]),ee=(0,r.useCallback)(re=>{k(re.toDate())},[]);return r.createElement("div",{className:(0,t.cx)(K.container,{[K.fullScreen]:L}),style:B,ref:G},r.createElement(g.Ay,{next2Label:null,prev2Label:null,value:j,nextLabel:r.createElement(m.I,{name:"angle-right"}),nextAriaLabel:"Next month",prevLabel:r.createElement(m.I,{name:"angle-left"}),prevAriaLabel:"Previous month",onChange:Y,locale:"en",className:_.body,tileClassName:_.title,maxDate:U,minDate:R}),r.createElement("div",{className:K.time},r.createElement(b.R,{showSeconds:H,onChange:ee,value:(0,l.KQ)(j),disabledHours:w,disabledMinutes:N,disabledSeconds:V})),r.createElement(v.Gy,null,r.createElement(h.$n,{type:"button",onClick:()=>P((0,l.KQ)(j))},"Apply"),r.createElement(h.$n,{variant:"secondary",type:"button",onClick:O},"Cancel")))});I.displayName="DateTimeCalendar";const x=S=>({container:(0,t.css)({padding:S.spacing(1),border:`1px ${S.colors.border.weak} solid`,borderRadius:S.shape.radius.default,backgroundColor:S.colors.background.primary,zIndex:S.zIndex.modal}),fullScreen:(0,t.css)({position:"absolute"}),time:(0,t.css)({marginBottom:S.spacing(2)}),modal:(0,t.css)({position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:S.zIndex.modal,maxWidth:"280px"})})},3759:(Q,A,e)=>{"use strict";e.d(A,{N:()=>b});var t=e(32196),n=e(80279),o=e(7887),s=e(82148),r=e(96540),g=e(39522),u=e(40845),c=e(76412),i=e(55852),l=e(40276),f=e(88575),d=e(14578),h=e(10354),p=e(56034),m=e(42617),a=e(65172),v=e(32432),E=e(28716);const D=v.o.filter(I=>(0,E.QU)(I.from));function b(I){const{timeRange:x,onChange:S}=I,[O,P]=(0,r.useState)(!1),L=(0,r.useCallback)(()=>P(!1),[]),U=(0,E.Bw)(x),[R,B]=(0,r.useState)({value:U.from,validation:(0,E.kB)(U.from)}),[H,w]=(0,r.useState)({value:U.to,validation:(0,E.kB)(U.to)}),N=(0,r.useRef)(null),{overlayProps:V,underlayProps:G}=(0,s.e)({onClose:()=>P(!1),isDismissable:!0,isOpen:O},N),{dialogProps:_}=(0,n.s)({},N),[K,j]=(0,r.useState)(null),[k,Y]=(0,r.useState)(null),ee=(0,g.E)(K,k,{placement:"auto-start"}),re=(0,u.of)(M(R.validation.errorMessage,H.validation.errorMessage)),J=te=>{const oe=(0,E.Tl)(te);oe&&(L(),B({...R,value:te.from}),w({...H,value:te.to}),S(oe))},ne=(0,r.useCallback)(te=>{te.stopPropagation(),te.preventDefault(),P(!O)},[O]),q=te=>{if(te.preventDefault(),!H.validation.isValid||!R.validation.isValid)return;const oe=(0,E.Tl)({from:R.value,to:H.value,display:""});oe&&(S(oe),P(!1))};return r.createElement("div",{className:re.container,ref:j},r.createElement("button",{className:re.pickerInput,type:"button",onClick:ne},r.createElement("span",{className:re.clockIcon},r.createElement(d.I,{name:"clock-nine"})),r.createElement("span",null,U.from," to ",U.to),r.createElement("span",{className:re.caretIcon},r.createElement(d.I,{name:O?"angle-up":"angle-down",size:"lg"}))),O&&r.createElement("div",null,r.createElement("div",{role:"presentation",className:re.backdrop,...G}),r.createElement(o.n1,{contain:!0,autoFocus:!0,restoreFocus:!0},r.createElement("div",{ref:N,...V,..._},r.createElement("div",{className:re.content,ref:Y,style:ee.styles.popper,...ee.attributes},r.createElement("div",{className:re.body},r.createElement(l.A,{className:re.leftSide,hideHorizontalTrack:!0},r.createElement(a.l,{title:(0,c.t)("time-picker.time-range.example-title","Example time ranges"),options:D,onChange:J,value:U})),r.createElement("div",{className:re.rightSide},r.createElement("div",{className:re.title},r.createElement(m.e,null,r.createElement(p.m,{content:r.createElement(C,null),placement:"bottom",theme:"info"},r.createElement("div",null,r.createElement(c.x,{i18nKey:"time-picker.time-range.specify"},"Specify time range ",r.createElement(d.I,{name:"info-circle"})))))),r.createElement(f.D,{label:"From",invalid:!R.validation.isValid,error:R.validation.errorMessage},r.createElement(h.p,{onClick:te=>te.stopPropagation(),onBlur:()=>B({...R,validation:(0,E.kB)(R.value)}),onChange:te=>B({...R,value:te.currentTarget.value}),value:R.value})),r.createElement(f.D,{label:"To",invalid:!H.validation.isValid,error:H.validation.errorMessage},r.createElement(h.p,{onClick:te=>te.stopPropagation(),onBlur:()=>w({...H,validation:(0,E.kB)(H.value)}),onChange:te=>w({...H,value:te.currentTarget.value}),value:H.value})),r.createElement(i.$n,{"aria-label":"TimePicker submit button",onClick:q},"Apply time range"))))))))}const C=()=>{const I=(0,u.of)(y);return r.createElement(r.Fragment,null,r.createElement("div",{className:I.supported},"Supported formats: ",r.createElement("code",{className:I.tooltip},"now-[digit]s/m/h/d/w")),r.createElement("div",null,"Example: to select a time range from 10 minutes ago to now"),r.createElement("code",{className:I.tooltip},"From: now-10m To: now"),r.createElement("div",{className:I.link},"For more information see"," ",r.createElement("a",{href:"https://grafana.com/docs/grafana/latest/dashboards/time-range-controls/"},"docs ",r.createElement(d.I,{name:"external-link-alt"})),"."))},y=I=>({supported:(0,t.css)({marginBottom:I.spacing(1)}),tooltip:(0,t.css)({margin:0}),link:(0,t.css)({marginTop:I.spacing(1)})}),M=(I,x)=>S=>{const O=(0,h.n)({theme:S,invalid:!1}),L=250+T(S,I)+T(S,x);return{backdrop:(0,t.css)({position:"fixed",zIndex:S.zIndex.modalBackdrop,top:0,right:0,bottom:0,left:0}),container:(0,t.css)({display:"flex",position:"relative"}),pickerInput:(0,t.cx)(O.input,O.wrapper,(0,t.css)({display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",paddingRight:0,paddingLeft:0,lineHeight:`${S.spacing.gridSize*S.components.height.md-2}px`})),caretIcon:(0,t.cx)(O.suffix,(0,t.css)({position:"relative",marginLeft:S.spacing(.5)})),clockIcon:(0,t.cx)(O.prefix,(0,t.css)({position:"relative",marginRight:S.spacing(.5)})),content:(0,t.css)({background:S.colors.background.primary,boxShadow:S.shadows.z3,position:"absolute",zIndex:S.zIndex.modal,width:"500px",top:"100%",borderRadius:S.shape.radius.default,border:`1px solid ${S.colors.border.weak}`,left:0,whiteSpace:"normal"}),body:(0,t.css)({display:"flex",height:`${L}px`}),description:(0,t.css)({color:S.colors.text.secondary,fontSize:S.typography.size.sm}),leftSide:(0,t.css)({width:"50% !important",borderRight:`1px solid ${S.colors.border.medium}`}),rightSide:(0,t.css)({width:"50%",padding:S.spacing(1)}),title:(0,t.css)({marginBottom:S.spacing(1)})}};function T(I,x){return x?x.length>34?I.spacing.gridSize*6.5:I.spacing.gridSize*4:0}},28716:(Q,A,e)=>{"use strict";e.d(A,{Bw:()=>o,QU:()=>r,Tl:()=>n,kB:()=>s});const t=/^now$|^now\-(\d{1,10})([wdhms])$/,n=i=>({from:g(i.from),to:g(i.to)}),o=i=>{const l=c(i.from),f=c(i.to);return{from:l,to:f,display:`${l} to ${f}`}},s=(i,l=Date.now())=>r(i)?g(i)>Math.ceil(l/1e3)?{isValid:!1,errorMessage:"Can not enter value prior to January 1, 1970."}:{isValid:!0}:{isValid:!1,errorMessage:"Value not in relative time format."},r=i=>t.test(i),g=i=>{const l=t.exec(i);if(!l||l.length!==3)return 0;const[,f,d]=l,h=parseInt(f,10);return isNaN(h)?0:h*u[d]},u={w:604800,d:86400,h:3600,m:60,s:1},c=i=>i<=0?"now":i>=u.w&&i%u.w===0?`now-${i/u.w}w`:i>=u.d&&i%u.d===0?`now-${i/u.d}d`:i>=u.h&&i%u.h===0?`now-${i/u.h}h`:i>=u.m&&i%u.m===0?`now-${i/u.m}m`:`now-${i}s`},66070:(Q,A,e)=>{"use strict";e.d(A,{R:()=>l,i:()=>i});var t=e(32196),n=e(57389),o=e(96540),s=e(47232),r=e(40845),g=e(16797),u=e(87266),c=e(14578);const i="time-of-day-picker-panel",l=({minuteStep:h=1,showHour:p=!0,showSeconds:m=!1,onChange:a,value:v,size:E="auto",disabled:D,disabledHours:b,disabledMinutes:C,disabledSeconds:y})=>{const M=(0,r.of)(d);return o.createElement(n.A,{className:(0,t.cx)((0,u.lH)()[E],M.input),popupClassName:(0,t.cx)(M.picker,i),defaultValue:(0,s.AN)(),onChange:T=>{if((0,s.u8)(T))return a((0,s.KQ)(T))},allowEmpty:!1,showSecond:m,value:(0,s.AN)(v),showHour:p,minuteStep:h,inputIcon:o.createElement(f,{wrapperStyle:M.caretWrapper}),disabled:D,disabledHours:b,disabledMinutes:C,disabledSeconds:y})},f=({wrapperStyle:h=""})=>o.createElement("div",{className:h},o.createElement(c.I,{name:"angle-down"})),d=h=>{const p=h.components.input.background,m=h.v1.palette.black,a=h.colors.background.secondary,v=h.shape.radius.default,E=h.components.input.borderColor;return{caretWrapper:(0,t.css)({position:"absolute",right:"8px",top:"50%",transform:"translateY(-50%)",display:"inline-block",textAlign:"right",color:h.colors.text.secondary}),picker:(0,t.css)({".rc-time-picker-panel-select":{fontSize:"14px",backgroundColor:p,borderColor:E,li:{outlineWidth:"2px","&.rc-time-picker-panel-select-option-selected":{backgroundColor:"inherit",border:`1px solid ${h.v1.palette.orange}`,borderRadius:v},"&:hover":{background:a},"&.rc-time-picker-panel-select-option-disabled":{color:h.colors.action.disabledText}}},".rc-time-picker-panel-inner":{boxShadow:`0px 4px 4px ${m}`,backgroundColor:p,borderColor:E,borderRadius:v,marginTop:"3px",".rc-time-picker-panel-input-wrap":{marginRight:"2px","&, .rc-time-picker-panel-input":{backgroundColor:p,paddingTop:"2px"}},".rc-time-picker-panel-combobox":{display:"flex"}}}),input:(0,t.css)({".rc-time-picker-input":{backgroundColor:p,borderRadius:v,borderColor:E,height:h.spacing(4),"&:focus":(0,g.getFocusStyles)(h),"&:disabled":{backgroundColor:h.colors.action.disabledBackground,color:h.colors.action.disabledText,border:`1px solid ${h.colors.action.disabledBackground}`,"&:focus":{boxShadow:"none"}}}})}}},54230:(Q,A,e)=>{"use strict";e.d(A,{b:()=>m});var t=e(32196),n=e(96540),o=e(47232),s=e(43127),r=e(13544),g=e(40845),u=e(8866),c=e(14578),i=e(10354),l=e(85068),f=e(3799),d=e(32432),h=e(47619);const p=()=>{},m=({value:v,onChange:E,onChangeTimeZone:D=p,clearable:b,hideTimeZone:C=!0,timeZone:y="browser",placeholder:M="Select time range",isReversed:T=!0,hideQuickRanges:I=!1,disabled:x=!1,showIcon:S=!1})=>{const[O,P]=(0,n.useState)(!1),L=(0,g.of)(a,x),U=w=>{w.stopPropagation(),w.preventDefault(),!x&&P(!O)},R=()=>{P(!1)},B=w=>{R(),E(w)},H=w=>{w.stopPropagation();const N=(0,o.KQ)(null),V=(0,o.KQ)(null);E({from:N,to:V,raw:{from:N,to:V}})};return n.createElement("div",{className:L.container},n.createElement("button",{type:"button",className:L.pickerInput,"data-testid":r.Tp.components.TimePicker.openButton,onClick:U},S&&n.createElement(c.I,{name:"clock-nine",size:"sm",className:L.icon}),n.createElement(f.f,{value:v,timeZone:y,placeholder:M}),!x&&n.createElement("span",{className:L.caretIcon},(0,h.X)(v)&&b&&n.createElement(c.I,{className:L.clearIcon,name:"times",size:"lg",onClick:H}),n.createElement(c.I,{name:O?"angle-up":"angle-down",size:"lg"}))),O&&n.createElement(u.N,{includeButtonPress:!1,onClick:R},n.createElement(l.r,{timeZone:y,value:(0,h.X)(v)?v:(0,s.E2)(),onChange:B,quickOptions:d.o,onChangeTimeZone:D,className:L.content,hideTimeZone:C,isReversed:T,hideQuickRanges:I})))},a=(v,E=!1)=>{const D=(0,i.n)({theme:v,invalid:!1});return{container:(0,t.css)({display:"flex",position:"relative"}),content:(0,t.css)({marginLeft:0,position:"absolute",top:"116%",zIndex:v.zIndex.dropdown}),pickerInput:(0,t.cx)(D.input,E&&D.inputDisabled,D.wrapper,(0,t.css)({display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",paddingRight:0,lineHeight:`${v.spacing.gridSize*4-2}px`})),caretIcon:(0,t.cx)(D.suffix,(0,t.css)({position:"relative",top:"-1px",marginLeft:v.spacing(.5)})),clearIcon:(0,t.css)({marginRight:v.spacing(.5),"&:hover":{color:v.colors.text.maxContrast}}),placeholder:(0,t.css)({color:v.colors.text.disabled,opacity:1}),icon:(0,t.css)({marginRight:v.spacing(.5)})}}},15666:(Q,A,e)=>{"use strict";e.d(A,{$6:()=>D,_8:()=>y,xS:()=>C});var t=e(32196),n=e(80279),o=e(7887),s=e(82148),r=e(96540),g=e(65879),u=e(72724),c=e(91410),i=e(85858),l=e(13544),f=e(40845),d=e(76412),h=e(19727),p=e(88448),m=e(27746),a=e(56034),v=e(85068),E=e(32432);function D(x){const[S,O]=(0,r.useState)(!1),{value:P,onMoveBackward:L,onMoveForward:U,onZoom:R,onError:B,timeZone:H,fiscalYearStartMonth:w,timeSyncButton:N,isSynced:V,history:G,onChangeTimeZone:_,onChangeFiscalYearStartMonth:K,hideQuickRanges:j,widthOverride:k,isOnCanvas:Y,onToolbarTimePickerClick:ee}=x,re=Re=>{x.onChange(Re),O(!1)};(0,r.useEffect)(()=>{S&&ee&&ee()},[S,ee]);const J=()=>{O(Re=>!Re)},ne=()=>{O(!1)},q=(0,r.createRef)(),te=(0,r.createRef)(),{overlayProps:oe,underlayProps:ue}=(0,s.e)({onClose:ne,isDismissable:!0,isOpen:S,shouldCloseOnInteractOutside:Re=>!te.current?.contains(Re)},q),{dialogProps:ie}=(0,n.s)({},q),ge=(0,f.of)(T),{modalBackdrop:he}=(0,f.of)(p.o),De=!g.isRelativeTime(P.raw.from)||!g.isRelativeTime(P.raw.to),pe=V?"active":Y?"canvas":"default",Te=P?.to?.isBefore(P.from)?"exclamation-triangle":"clock-nine",Ee=M(P,H);return r.createElement(h.e,{className:ge.container},De&&r.createElement(m.I,{"aria-label":(0,d.t)("time-picker.range-picker.backwards-time-aria-label","Move time range backwards"),variant:pe,onClick:L,icon:"angle-left",narrow:!0}),r.createElement(a.m,{ref:te,content:r.createElement(C,{timeRange:P,timeZone:H}),placement:"bottom",interactive:!0},r.createElement(m.I,{"data-testid":l.Tp.components.TimePicker.openButton,"aria-label":(0,d.t)("time-picker.range-picker.current-time-selected","Time range selected: {{currentTimeRange}}",{currentTimeRange:Ee}),"aria-controls":"TimePickerContent",onClick:J,icon:Te,isOpen:S,variant:pe},r.createElement(y,{...x}))),S&&r.createElement("div",{"data-testid":l.Tp.components.TimePicker.overlayContent},r.createElement("div",{role:"presentation",className:(0,t.cx)(he,ge.backdrop),...ue}),r.createElement(o.n1,{contain:!0,autoFocus:!0,restoreFocus:!0},r.createElement("section",{className:ge.content,ref:q,...oe,...ie},r.createElement(v.r,{timeZone:H,fiscalYearStartMonth:w,value:P,onChange:re,quickOptions:E.o,history:G,showHistory:!0,widthOverride:k,onChangeTimeZone:_,onChangeFiscalYearStartMonth:K,hideQuickRanges:j,onError:B})))),N,De&&r.createElement(m.I,{"aria-label":(0,d.t)("time-picker.range-picker.forwards-time-aria-label","Move time range forwards"),onClick:U,icon:"angle-right",narrow:!0,variant:pe}),r.createElement(a.m,{content:b,placement:"bottom"},r.createElement(m.I,{"aria-label":(0,d.t)("time-picker.range-picker.zoom-out-button","Zoom out time range"),onClick:R,icon:"search-minus",variant:pe})))}D.displayName="TimeRangePicker";const b=()=>r.createElement(r.Fragment,null,r.createElement(d.x,{i18nKey:"time-picker.range-picker.zoom-out-tooltip"},"Time range zoom out ",r.createElement("br",null)," CTRL+Z")),C=({timeRange:x,timeZone:S})=>{const O=(0,f.of)(I);return r.createElement(r.Fragment,null,(0,u.LE)(x.from,{timeZone:S}),r.createElement("div",{className:"text-center"},r.createElement(d.x,{i18nKey:"time-picker.range-picker.to"},"to")),(0,u.LE)(x.to,{timeZone:S}),r.createElement("div",{className:"text-center"},r.createElement("span",{className:O.utc},(0,c.le)(S))))},y=(0,r.memo)(({hideText:x,value:S,timeZone:O})=>{const P=(0,f.of)(I);return x?null:r.createElement("span",{className:P.container},r.createElement("span",null,M(S,O)),r.createElement("span",{className:P.utc},g.describeTimeRangeAbbreviation(S,O)))});y.displayName="TimePickerButtonLabel";const M=(x,S)=>{const O={to:i.isMathString(x.raw.to)?x.raw.to:x.to,from:i.isMathString(x.raw.from)?x.raw.from:x.from};return g.describeTimeRange(O,S)},T=x=>({container:(0,t.css)({position:"relative",display:"flex",verticalAlign:"middle"}),backdrop:(0,t.css)({display:"none",[x.breakpoints.down("sm")]:{display:"block"}}),content:(0,t.css)({position:"absolute",right:0,top:"116%",zIndex:x.zIndex.dropdown,[x.breakpoints.down("sm")]:{position:"fixed",right:"50%",top:"50%",transform:"translate(50%, -50%)",zIndex:x.zIndex.modal}})}),I=x=>({container:(0,t.css)({display:"flex",alignItems:"center",whiteSpace:"nowrap"}),utc:(0,t.css)({color:x.v1.palette.orange,fontSize:x.typography.size.sm,paddingLeft:"6px",lineHeight:"28px",verticalAlign:"bottom",fontWeight:x.typography.fontWeightMedium})})},72265:(Q,A,e)=>{"use strict";e.d(A,{h2:()=>h,nB:()=>c});var t=e(32196),n=e(96540),o=e(29426),s=e(91410),r=e(53531),g=e(40845),u=e(14578);function c({onChange:p,from:m,to:a,timeZone:v}){const E=i(m,a,new Date,v),D=f(p,v),b=(0,g.of)(h);return n.createElement(o.Ay,{selectRange:!0,next2Label:null,prev2Label:null,className:b.body,tileClassName:b.title,value:E,nextLabel:n.createElement(u.I,{name:"angle-right"}),prevLabel:n.createElement(u.I,{name:"angle-left"}),onChange:D,locale:"en"})}c.displayName="Body";function i(p,m,a=new Date,v){let E=p.isValid()?p.toDate():a,D=m.isValid()?m.toDate():a;return v&&([E,D]=l(E,D,v)),E>D?[D,E]:[E,D]}function l(p,m,a){const v=(0,s.HD)(a);if(!v)return[p,m];const E=v.utcOffset(p.getTime()),D=v.utcOffset(m.getTime()),b=p.getTimezoneOffset(),C=m.getTimezoneOffset(),y=E-b,M=D-C,T=new Date(p.getTime()-y*1e3*60),I=new Date(m.getTime()-M*1e3*60);return[T,I]}function f(p,m){return(0,n.useCallback)(a=>{if(!Array.isArray(a))return console.error("onCalendarChange: should be run in selectRange={true}");if(a[0]&&a[1]){const v=(0,r.b)(d(a[0]),{timeZone:m}),E=(0,r.b)(d(a[1]),{timeZone:m});p(v,E)}},[p,m])}function d(p){return[p.getFullYear(),p.getMonth(),p.getDate(),p.getHours(),p.getMinutes(),p.getSeconds()]}const h=p=>{const m=".react-calendar__tile--hasActive:not(.react-calendar__tile--range)";return{title:(0,t.css)({color:p.colors.text.primary,backgroundColor:p.colors.background.primary,fontSize:p.typography.size.md,border:"1px solid transparent","&:hover":{position:"relative"},"&:disabled":{color:p.colors.action.disabledText}}),body:(0,t.css)({zIndex:p.zIndex.modal,backgroundColor:p.colors.background.primary,width:"268px",".react-calendar__navigation":{display:"flex"},".react-calendar__navigation__label, .react-calendar__navigation__arrow, .react-calendar__navigation":{paddingTop:"4px",backgroundColor:"inherit",color:p.colors.text.primary,border:0,fontWeight:p.typography.fontWeightMedium},".react-calendar__month-view__weekdays":{backgroundColor:"inherit",textAlign:"center",color:p.colors.primary.text,abbr:{border:0,textDecoration:"none",cursor:"default",display:"block",padding:"4px 0 4px 0"}},".react-calendar__month-view__days":{backgroundColor:"inherit"},".react-calendar__tile, .react-calendar__tile--now":{marginBottom:"4px",backgroundColor:"inherit",height:"26px"},".react-calendar__navigation__label, .react-calendar__navigation > button:focus, .time-picker-calendar-tile:focus":{outline:0},[`${m}, .react-calendar__tile--active, .react-calendar__tile--active:hover`]:{color:p.colors.primary.contrastText,fontWeight:p.typography.fontWeightMedium,background:p.colors.primary.main,boxShadow:"none",border:"0px"},".react-calendar__tile--rangeEnd, .react-calendar__tile--rangeStart":{padding:0,border:"0px",color:p.colors.primary.contrastText,fontWeight:p.typography.fontWeightMedium,background:p.colors.primary.main,abbr:{backgroundColor:p.colors.primary.main,borderRadius:"100px",display:"block",paddingTop:"2px",height:"26px"}},[`${m}, .react-calendar__tile--rangeStart`]:{borderTopLeftRadius:"20px",borderBottomLeftRadius:"20px"},[`${m}, .react-calendar__tile--rangeEnd`]:{borderTopRightRadius:"20px",borderBottomRightRadius:"20px"}})}}},85068:(Q,A,e)=>{"use strict";e.d(A,{r:()=>ge});var t=e(32196),n=e(96540),o=e(47232),s=e(65879),r=e(13544),g=e(40845),u=e(16797),c=e(76412),i=e(40276),l=e(67647),f=e(14578),d=e(2543),h=e(91410),p=e(55852),m=e(88575),a=e(94354),v=e(88323),E=e(20333),D=e(79451),b=e(17624),C=e(67459),y=e(32432);const M=ye=>{const{timeZone:Le,fiscalYearStartMonth:We,timestamp:Be=Date.now(),onChangeTimeZone:Ye,onChangeFiscalYearStartMonth:at}=ye,[st,Ke]=(0,n.useState)(!1),[Xe,He]=(0,n.useState)("tz"),Ge=(0,n.useCallback)(be=>{be&&be.stopPropagation(),Ke(!st)},[st,Ke]),xe=(0,g.of)(T);if(!(0,d.isString)(Le))return null;const $e=(0,h.QZ)(Le,Be);return $e?n.createElement("div",null,n.createElement("section",{"aria-label":(0,c.t)("time-picker.footer.time-zone-selection","Time zone selection"),className:xe.container},n.createElement("div",{className:xe.timeZoneContainer},n.createElement("div",{className:xe.timeZone},n.createElement(C.U,{title:$e.name}),n.createElement("div",{className:xe.spacer}),n.createElement(D.E,{info:$e})),n.createElement(b.X,{timeZone:Le,timestamp:Be})),n.createElement("div",{className:xe.spacer}),n.createElement(p.$n,{variant:"secondary",onClick:Ge,size:"sm"},n.createElement(c.x,{i18nKey:"time-picker.footer.change-settings-button"},"Change time settings"))),st?n.createElement("div",{className:xe.editContainer},n.createElement("div",null,n.createElement(a.z,{value:Xe,options:[{label:(0,c.t)("time-picker.footer.time-zone-option","Time zone"),value:"tz"},{label:(0,c.t)("time-picker.footer.fiscal-year-option","Fiscal year"),value:"fy"}],onChange:He})),Xe==="tz"?n.createElement("section",{"data-testid":r.Tp.components.TimeZonePicker.containerV2,className:(0,t.cx)(xe.timeZoneContainer,xe.timeSettingContainer)},n.createElement(E.U,{includeInternal:!0,onChange:be=>{Ge(),(0,d.isString)(be)&&Ye(be)},onBlur:Ge,menuShouldPortal:!1})):n.createElement("section",{"data-testid":r.Tp.components.TimeZonePicker.containerV2,className:(0,t.cx)(xe.timeZoneContainer,xe.timeSettingContainer)},n.createElement(m.D,{className:xe.fiscalYearField,label:(0,c.t)("time-picker.footer.fiscal-year-start","Fiscal year start month")},n.createElement(v.l6,{value:We,menuShouldPortal:!1,options:y.Z,onChange:be=>{at&&at(be.value??0)}})))):null):null},T=ye=>({container:(0,t.css)({borderTop:`1px solid ${ye.colors.border.weak}`,padding:"11px",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"}),editContainer:(0,t.css)({borderTop:`1px solid ${ye.colors.border.weak}`,padding:"11px",justifyContent:"space-between",alignItems:"center"}),spacer:(0,t.css)({marginLeft:"7px"}),timeSettingContainer:(0,t.css)({paddingTop:ye.spacing(1)}),fiscalYearField:(0,t.css)({marginBottom:0}),timeZoneContainer:(0,t.css)({display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",flexGrow:1}),timeZone:(0,t.css)({display:"flex",flexDirection:"row",alignItems:"baseline",flexGrow:1})});var I=e(42617),x=e(53531),S=e(72724),O=e(10354),P=e(56034),L=e(47619),U=e(80279),R=e(7887),B=e(82148),H=e(88448),w=e(72265),N=e(67061);function V({onClose:ye,onApply:Le}){return n.createElement(N.B,{gap:2,justifyContent:"space-between"},n.createElement(p.$n,{variant:"secondary",onClick:ye},n.createElement(c.x,{i18nKey:"time-picker.calendar.cancel-button"},"Cancel")),n.createElement(p.$n,{onClick:Le},n.createElement(c.x,{i18nKey:"time-picker.calendar.apply-button"},"Apply time range")))}V.displayName="Footer";var G=e(29158);function _({onClose:ye}){return n.createElement(N.B,{justifyContent:"space-between"},n.createElement(I.e,null,n.createElement(c.x,{i18nKey:"time-picker.calendar.select-time"},"Select a time range")),n.createElement(G.K,{"data-testid":r.Tp.components.TimePicker.calendar.closeButton,tooltip:(0,c.t)("time-picker.calendar.close","Close calendar"),name:"times",variant:"secondary",onClick:ye}))}_.displayName="Header";const K=(ye,Le=!1)=>({container:(0,t.css)({top:0,position:"absolute",[`${Le?"left":"right"}`]:"546px"}),modalContainer:(0,t.css)({label:"modalContainer",margin:"0 auto"}),calendar:(0,t.css)({display:"flex",flexDirection:"column",gap:ye.spacing(1),padding:ye.spacing(1),label:"calendar",boxShadow:ye.shadows.z3,backgroundColor:ye.colors.background.primary,border:`1px solid ${ye.colors.border.weak}`,borderRadius:ye.shape.radius.default}),modal:(0,t.css)({label:"modal",boxShadow:ye.shadows.z3,left:"50%",position:"fixed",top:"50%",transform:"translate(-50%, -50%)",zIndex:ye.zIndex.modal})});function j(ye){const Le=(0,g.$j)(),{modalBackdrop:We}=(0,g.of)(H.o),Be=K(Le,ye.isReversed),{isOpen:Ye,isFullscreen:at,onClose:st}=ye,Ke=n.createRef(),{dialogProps:Xe}=(0,U.s)({"aria-label":r.Tp.components.TimePicker.calendar.label},Ke),{overlayProps:He}=(0,B.e)({isDismissable:!0,isOpen:Ye,onClose:st},Ke),Ge=!at;if(!Ye)return null;const xe=n.createElement("section",{className:Be.calendar,ref:Ke,...He,...Xe,"data-testid":r.Tp.components.TimePicker.calendar.label},n.createElement(_,{...ye}),n.createElement(w.nB,{...ye}),Ge&&n.createElement(V,{...ye}));return Ge?n.createElement(B.Sf,null,n.createElement("div",{className:We}),n.createElement(R.n1,{contain:!0,autoFocus:!0,restoreFocus:!0},n.createElement("div",{className:Be.modal},n.createElement("div",{className:Be.modalContainer},xe)))):n.createElement(R.n1,{contain:!0,restoreFocus:!0,autoFocus:!0},n.createElement("div",{className:Be.container},xe))}const k=(0,n.memo)(j);j.displayName="TimePickerCalendar";const Y={default:()=>(0,c.t)("time-picker.range-content.default-error",'Please enter a past date or "now"'),range:()=>(0,c.t)("time-picker.range-content.range-error",`"From" can't be after "To"`)},ee=ye=>{const{value:Le,isFullscreen:We=!1,timeZone:Be,onApply:Ye,isReversed:at,fiscalYearStartMonth:st,onError:Ke}=ye,[Xe,He]=J(Le.raw.from,Le.raw.to,Be),Ge=(0,g.of)(q),[xe,$e]=(0,n.useState)(Xe),[be,Z]=(0,n.useState)(He),[ae,de]=(0,n.useState)(!1),ve=(0,n.useId)(),Ue=(0,n.useId)();(0,n.useEffect)(()=>{const[Mt,Yt]=J(Le.raw.from,Le.raw.to,Be);$e(Mt),Z(Yt)},[Le.raw.from,Le.raw.to,Be]);const _e=(0,n.useCallback)(Mt=>{Mt.preventDefault(),de(!0)},[de]),ze=(0,n.useCallback)(()=>{if(be.invalid||xe.invalid)return;const Mt={from:xe.value,to:be.value},Yt=s.convertRawToRange(Mt,Be,st);Ye(Yt)},[xe.invalid,xe.value,Ye,Be,be.invalid,be.value,st]),Ve=(0,n.useCallback)((Mt,Yt)=>{const[zt,_t]=J(Mt,Yt,Be);$e(zt),Z(_t)},[Be]),Ne=Mt=>{Mt.key==="Enter"&&ze()},ot=()=>{const Mt={from:xe.value,to:be.value};navigator.clipboard.writeText(JSON.stringify(Mt))},nt=async()=>{const Mt=await navigator.clipboard.readText();let Yt;try{Yt=JSON.parse(Mt)}catch{Ke&&Ke(Mt);return}const[zt,_t]=J(Yt.from,Yt.to,Be);$e(zt),Z(_t)},pt=s.convertRawToRange({from:"now/fy",to:"now/fy"},Be,st),mt=(0,c.t)("time-picker.range-content.fiscal-year","Fiscal year"),gt=n.createElement("div",{className:Ge.tooltip},s.isFiscal(Le)?n.createElement(P.m,{content:`${mt}: ${pt.from.format("MMM-DD")} - ${pt.to.format("MMM-DD")}`},n.createElement(f.I,{name:"info-circle"})):null),Pt=n.createElement(p.$n,{"aria-label":(0,c.t)("time-picker.range-content.open-input-calendar","Open calendar"),"data-testid":r.Tp.components.TimePicker.calendar.openButton,icon:"calendar-alt",variant:"secondary",type:"button",onClick:_e});return n.createElement("div",null,n.createElement("div",{className:Ge.fieldContainer},n.createElement(m.D,{label:(0,c.t)("time-picker.range-content.from-input","From"),invalid:xe.invalid,error:xe.errorMessage},n.createElement(O.p,{id:ve,onClick:Mt=>Mt.stopPropagation(),onChange:Mt=>Ve(Mt.currentTarget.value,be.value),addonAfter:Pt,onKeyDown:Ne,"data-testid":r.Tp.components.TimePicker.fromField,value:xe.value})),gt),n.createElement("div",{className:Ge.fieldContainer},n.createElement(m.D,{label:(0,c.t)("time-picker.range-content.to-input","To"),invalid:be.invalid,error:be.errorMessage},n.createElement(O.p,{id:Ue,onClick:Mt=>Mt.stopPropagation(),onChange:Mt=>Ve(xe.value,Mt.currentTarget.value),addonAfter:Pt,onKeyDown:Ne,"data-testid":r.Tp.components.TimePicker.toField,value:be.value})),gt),n.createElement("div",{className:Ge.buttonsContainer},n.createElement(p.$n,{"data-testid":r.Tp.components.TimePicker.copyTimeRange,icon:"copy",variant:"secondary",tooltip:(0,c.t)("time-picker.copy-paste.tooltip-copy","Copy time range to clipboard"),type:"button",onClick:ot}),n.createElement(p.$n,{"data-testid":r.Tp.components.TimePicker.pasteTimeRange,icon:"clipboard-alt",variant:"secondary",tooltip:(0,c.t)("time-picker.copy-paste.tooltip-paste","Paste time range"),type:"button",onClick:nt}),n.createElement(p.$n,{"data-testid":r.Tp.components.TimePicker.applyTimeRange,type:"button",onClick:ze},n.createElement(c.x,{i18nKey:"time-picker.range-content.apply-button"},"Apply time range"))),n.createElement(k,{isFullscreen:We,isOpen:ae,from:(0,x.b)(xe.value,{timeZone:Be}),to:(0,x.b)(be.value,{timeZone:Be}),onApply:ze,onClose:()=>de(!1),onChange:Ve,timeZone:Be,isReversed:at}))};function re(ye,Le,We){const Be={from:ye,to:Le},Ye=s.convertRawToRange(Be,We);return!(Ye.from.isSame(Ye.to)||Ye.from.isBefore(Ye.to))}function J(ye,Le,We){const Be=ne(ye,We),Ye=ne(Le,We),at=!(0,L.f)(Be,!1,We),st=!(0,L.f)(Ye,!0,We),Ke=re(Be,Ye,We)&&!st;return[{value:Be,invalid:at||Ke,errorMessage:Ke&&!at?Y.range():Y.default()},{value:Ye,invalid:st,errorMessage:Y.default()}]}function ne(ye,Le){return(0,o.Ar)(ye)?(0,S.LE)(ye,{timeZone:Le}):ye}function q(ye){return{fieldContainer:(0,t.css)({display:"flex"}),buttonsContainer:(0,t.css)({display:"flex",gap:ye.spacing(.5),marginTop:ye.spacing(1)}),tooltip:(0,t.css)({paddingLeft:ye.spacing(1),paddingTop:ye.spacing(3)})}}var te=e(65172);const oe=(ye,Le)=>s.convertRawToRange({from:ye.from,to:ye.to},Le),ue=(ye,Le)=>{const We=(0,S.LE)(ye.from,{timeZone:Le}),Be=(0,S.LE)(ye.to,{timeZone:Le});return{from:We,to:Be,display:`${We} to ${Be}`}},ie=ye=>{const{quickOptions:Le=[],isReversed:We,isFullscreen:Be,hideQuickRanges:Ye,timeZone:at,fiscalYearStartMonth:st,value:Ke,onChange:Xe,history:He,showHistory:Ge,className:xe,hideTimeZone:$e,onChangeTimeZone:be,onChangeFiscalYearStartMonth:Z}=ye,ae=!He?.length,de=Be&&Ge||!Be&&(Ge&&!ae||!Ye),ve=(0,g.of)(Ee,We,Ye,de,Be),Ue=le(He,at),_e=Te(Ke.raw,Le),[ze,Ve]=(0,n.useState)(""),Ne=Le.filter(nt=>nt.display.toLowerCase().includes(ze.toLowerCase())),ot=nt=>Xe(oe(nt));return n.createElement("div",{id:"TimePickerContent",className:(0,t.cx)(ve.container,xe)},n.createElement("div",{className:ve.body},(!Be||!Ye)&&n.createElement("div",{className:ve.rightSide},n.createElement("div",{className:ve.timeRangeFilter},n.createElement(l.Z,{width:0,value:ze,onChange:Ve,placeholder:(0,c.t)("time-picker.content.filter-placeholder","Search quick ranges")})),n.createElement(i.E,null,!Be&&n.createElement(he,{...ye,historyOptions:Ue}),!Ye&&n.createElement(te.l,{options:Ne,onChange:ot,value:_e}))),Be&&n.createElement("div",{className:ve.leftSide},n.createElement(De,{...ye,historyOptions:Ue}))),!$e&&Be&&n.createElement(M,{timeZone:at,fiscalYearStartMonth:st,onChangeTimeZone:be,onChangeFiscalYearStartMonth:Z}))},ge=ye=>{const{widthOverride:Le}=ye,We=(0,g.$j)(),Be=(Le||window.innerWidth)>=We.breakpoints.values.lg;return n.createElement(ie,{...ye,isFullscreen:Be})},he=ye=>{const{value:Le,hideQuickRanges:We,onChange:Be,timeZone:Ye,historyOptions:at=[],showHistory:st,onError:Ke}=ye,Xe=(0,g.of)(Re),He=(0,o.Ar)(Le.raw.from)||(0,o.Ar)(Le.raw.to),[Ge,xe]=(0,n.useState)(!He),$e=We?!1:Ge,be=Z=>Be(oe(Z,Ye));return n.createElement("fieldset",null,n.createElement("div",{className:Xe.header},n.createElement("button",{type:"button",className:Xe.expandButton,onClick:()=>{We||xe(!$e)},"data-testid":r.Tp.components.TimePicker.absoluteTimeRangeTitle,"aria-expanded":!$e,"aria-controls":"expanded-timerange"},n.createElement(I.e,null,n.createElement(c.x,{i18nKey:"time-picker.absolute.title"},"Absolute time range")),!We&&n.createElement(f.I,{name:$e?"angle-down":"angle-up"}))),!$e&&n.createElement("div",{className:Xe.body,id:"expanded-timerange"},n.createElement("div",{className:Xe.form},n.createElement(ee,{value:Le,onApply:Be,timeZone:Ye,isFullscreen:!1,onError:Ke})),st&&n.createElement(te.l,{title:(0,c.t)("time-picker.absolute.recent-title","Recently used absolute ranges"),options:at,onChange:be,placeholderEmpty:null})))},De=ye=>{const{onChange:Le,value:We,timeZone:Be,fiscalYearStartMonth:Ye,isReversed:at,historyOptions:st,onError:Ke}=ye,Xe=(0,g.of)(me,ye.hideQuickRanges),He=Ge=>Le(oe(Ge,Be));return n.createElement(n.Fragment,null,n.createElement("div",{className:Xe.container},n.createElement("div",{className:Xe.title,"data-testid":r.Tp.components.TimePicker.absoluteTimeRangeTitle},n.createElement(I.e,null,n.createElement(c.x,{i18nKey:"time-picker.absolute.title"},"Absolute time range"))),n.createElement(ee,{value:We,timeZone:Be,fiscalYearStartMonth:Ye,onApply:Le,isFullscreen:!0,isReversed:at,onError:Ke})),ye.showHistory&&n.createElement("div",{className:Xe.recent},n.createElement(te.l,{title:(0,c.t)("time-picker.absolute.recent-title","Recently used absolute ranges"),options:st||[],onChange:He,placeholderEmpty:n.createElement(pe,null)})))},pe=(0,n.memo)(()=>{const ye=(0,g.of)(Me),Le=(0,c.t)("time-picker.content.empty-recent-list-info","It looks like you haven't used this time picker before. As soon as you enter some time intervals, recently used intervals will appear here.");return n.createElement("div",{className:ye.container},n.createElement("div",null,n.createElement("span",null,Le)),n.createElement(c.x,{i18nKey:"time-picker.content.empty-recent-list-docs"},n.createElement("div",null,n.createElement("a",{className:ye.link,href:"https://grafana.com/docs/grafana/latest/dashboards/time-range-controls",target:"_new"},"Read the documentation"),n.createElement("span",null," to find out more about how to enter custom time ranges."))))});function le(ye,Le){return!Array.isArray(ye)||ye.length===0?[]:ye.map(We=>ue(We,Le))}pe.displayName="EmptyRecentList";const Te=(ye,Le)=>(0,n.useMemo)(()=>{if(s.isRelativeTimeRange(ye))return Le.find(We=>We.from===ye.from&&We.to===ye.to)},[ye,Le]),Ee=(ye,Le,We,Be,Ye)=>({container:(0,t.css)({background:ye.colors.background.primary,boxShadow:ye.shadows.z3,width:`${Ye?"546px":"262px"}`,borderRadius:ye.shape.radius.default,border:`1px solid ${ye.colors.border.weak}`,[`${Le?"left":"right"}`]:0}),body:(0,t.css)({display:"flex",flexDirection:"row-reverse",height:`${Be?"381px":"217px"}`,maxHeight:"100vh"}),leftSide:(0,t.css)({display:"flex",flexDirection:"column",borderRight:`${Le?"none":`1px solid ${ye.colors.border.weak}`}`,width:`${We?"100%":"60%"}`,overflow:"hidden",order:Le?1:0}),rightSide:(0,t.css)({width:`${Ye?"40%":"100%"}; !important`,borderRight:Le?`1px solid ${ye.colors.border.weak}`:"none",display:"flex",flexDirection:"column"}),timeRangeFilter:(0,t.css)({padding:ye.spacing(1)}),spacing:(0,t.css)({marginTop:"16px"})}),Re=ye=>({header:(0,t.css)({display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",borderBottom:`1px solid ${ye.colors.border.weak}`,padding:"7px 9px 7px 9px"}),expandButton:(0,t.css)({backgroundColor:"transparent",border:"none",display:"flex",width:"100%","&:focus-visible":(0,u.getFocusStyles)(ye)}),body:(0,t.css)({borderBottom:`1px solid ${ye.colors.border.weak}`}),form:(0,t.css)({padding:"7px 9px 7px 9px"})}),me=(ye,Le)=>({container:(0,t.css)({paddingTop:"9px",paddingLeft:"11px",paddingRight:Le?"11px":"20%"}),title:(0,t.css)({marginBottom:"11px"}),recent:(0,t.css)({flexGrow:1,display:"flex",flexDirection:"column",justifyContent:"flex-end",paddingTop:ye.spacing(1)})}),Me=ye=>({container:(0,t.css)({padding:"12px",margin:"12px","a, span":{fontSize:"13px"}}),link:(0,t.css)({color:ye.colors.text.link})})},42617:(Q,A,e)=>{"use strict";e.d(A,{e:()=>r});var t=e(32196),n=e(96540),o=e(40845);const s=g=>({text:(0,t.css)({fontSize:g.typography.size.md,fontWeight:g.typography.fontWeightMedium,color:g.colors.text.primary,margin:0,display:"flex"})}),r=(0,n.memo)(({children:g})=>{const u=(0,o.of)(s);return n.createElement("h3",{className:u.text},g)});r.displayName="TimePickerTitle"},3799:(Q,A,e)=>{"use strict";e.d(A,{f:()=>g});var t=e(32196),n=e(96540),o=e(40845),s=e(15666),r=e(47619);const g=(0,n.memo)(function({hideText:i,value:l,timeZone:f="browser",placeholder:d="No time range selected",className:h}){const p=(0,o.of)(u);return i?null:n.createElement("span",{className:h},(0,r.X)(l)?n.createElement(s._8,{value:l,timeZone:f}):n.createElement("span",{className:p.placeholder},d))}),u=c=>({placeholder:(0,t.css)({color:c.colors.text.disabled,opacity:1})})},65172:(Q,A,e)=>{"use strict";e.d(A,{l:()=>l});var t=e(32196),n=e(96540),o=e(40845),s=e(76412),r=e(42617),g=e(62938),u=e(16797);const c=a=>({container:(0,t.css)({display:"flex",alignItems:"center",flexDirection:"row-reverse",justifyContent:"space-between"}),selected:(0,t.css)({background:a.colors.action.selected,fontWeight:a.typography.fontWeightMedium}),radio:(0,t.css)({opacity:0,width:"0 !important","&:focus-visible + label":(0,u.getFocusStyles)(a)}),label:(0,t.css)({cursor:"pointer",flex:1,padding:"7px 9px 7px 9px","&:hover":{background:a.colors.action.hover,cursor:"pointer"}})}),i=(0,n.memo)(({value:a,onSelect:v,selected:E=!1,name:D})=>{const b=(0,o.of)(c),C=(0,g.A)();return n.createElement("li",{className:(0,t.cx)(b.container,E&&b.selected)},n.createElement("input",{className:b.radio,checked:E,name:D,type:"checkbox",id:C,onChange:()=>v(a)}),n.createElement("label",{className:b.label,htmlFor:C},a.display))});i.displayName="TimeRangeOption";const l=a=>{const v=(0,o.of)(p),{title:E,options:D,placeholderEmpty:b}=a;return typeof b<"u"&&D.length<=0?n.createElement(n.Fragment,null,b):E?n.createElement("section",{"aria-label":E},n.createElement("fieldset",null,n.createElement("div",{className:v.title},n.createElement(r.e,null,E)),n.createElement(f,{...a}))):n.createElement(f,{...a})},f=({options:a,value:v,onChange:E,title:D})=>{const b=(0,o.of)(m);return n.createElement(n.Fragment,null,n.createElement("ul",{"aria-roledescription":(0,s.t)("time-picker.time-range.aria-role","Time range selection")},a.map((C,y)=>n.createElement(i,{key:d(C,y),value:C,selected:h(C,v),onSelect:E,name:D??(0,s.t)("time-picker.time-range.default-title","Time ranges")}))),n.createElement("div",{className:b.grow}))};function d(a,v){return`${a.from}-${a.to}-${v}`}function h(a,v){return!v||!a?!1:v.from===a.from&&v.to===a.to}const p=()=>({title:(0,t.css)({display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 16px 5px 9px"})}),m=()=>({grow:(0,t.css)({flexGrow:1,alignItems:"flex-start"})})},20333:(Q,A,e)=>{"use strict";e.d(A,{U:()=>E});var t=e(2543),n=e(96540),o=e(91410),s=e(76412),r=e(88323),g=e(32196),u=e(40845);const c=T=>{const{children:I,label:x}=T,S=(0,u.of)(i);return x?n.createElement("div",null,n.createElement("div",{className:S.header},n.createElement("span",{className:S.label},x)),I):n.createElement("div",null,I)},i=T=>({header:(0,g.css)({padding:"7px 10px",width:"100%",borderTop:`1px solid ${T.colors.border.weak}`,textTransform:"capitalize"}),label:(0,g.css)({fontSize:T.typography.size.sm,color:T.colors.text.secondary,fontWeight:T.typography.fontWeightMedium})});var l=e(17624),f=e(14578),d=e(79451),h=e(67459);const p="tz-utc-offset",m=T=>{const{children:I,innerProps:x,innerRef:S,data:O,isSelected:P,isFocused:L}=T,U=(0,u.of)(v),R=Date.now(),B=(0,g.cx)(U.container,L&&U.containerFocused);if(!(0,t.isString)(O.value))return null;const H=(0,o.QZ)(O.value,R);return n.createElement("div",{className:B,...x,ref:S,"aria-label":"Select option"},n.createElement("div",{className:(0,g.cx)(U.leftColumn,U.row)},n.createElement("div",{className:(0,g.cx)(U.leftColumn,U.wideRow)},n.createElement(h.U,{title:I}),n.createElement("div",{className:U.spacer}),n.createElement(d.E,{info:H})),n.createElement("div",{className:U.rightColumn},n.createElement(l.X,{timeZone:H?.ianaName||O.value,timestamp:R,className:p}),P&&n.createElement("span",null,n.createElement(f.I,{name:"check"})))))},a=T=>{const{children:I,innerProps:x,innerRef:S,data:O,isSelected:P,isFocused:L}=T,U=(0,u.of)(v),R=Date.now(),B=(0,g.cx)(U.container,L&&U.containerFocused);if(!(0,t.isString)(O.value))return null;const H=(0,o.QZ)(O.value,R);return n.createElement("div",{className:B,...x,ref:S,"aria-label":"Select option"},n.createElement("div",{className:U.body},n.createElement("div",{className:U.row},n.createElement("div",{className:U.leftColumn},n.createElement(h.U,{title:I})),n.createElement("div",{className:U.rightColumn},P&&n.createElement("span",null,n.createElement(f.I,{name:"check"})))),n.createElement("div",{className:U.row},n.createElement("div",{className:U.leftColumn},n.createElement(d.E,{info:H})),n.createElement("div",{className:U.rightColumn},n.createElement(l.X,{timestamp:R,timeZone:H?.ianaName||O.value,className:p})))))},v=T=>({container:(0,g.css)({display:"flex",alignItems:"center",flexDirection:"row",flexShrink:0,whiteSpace:"nowrap",cursor:"pointer",padding:"6px 8px 4px","&:hover":{background:T.colors.action.hover}}),containerFocused:(0,g.css)({background:T.colors.action.hover}),body:(0,g.css)({display:"flex",fontWeight:T.typography.fontWeightMedium,flexDirection:"column",flexGrow:1}),row:(0,g.css)({display:"flex",flexDirection:"row"}),leftColumn:(0,g.css)({flexGrow:1,textOverflow:"ellipsis"}),rightColumn:(0,g.css)({justifyContent:"flex-end",alignItems:"center"}),wideRow:(0,g.css)({display:"flex",flexDirection:"row",alignItems:"baseline"}),spacer:(0,g.css)({marginLeft:"6px"})}),E=T=>{const{onChange:I,width:x,autoFocus:S=!1,onBlur:O,value:P,includeInternal:L=!1,disabled:U=!1,inputId:R,menuShouldPortal:B=!0,openMenuOnFocus:H=!0}=T,w=D(L),N=b(w,P),V=y(),G=x&&x<=45?a:m,_=(0,n.useCallback)(K=>{if(!K||!(0,t.isString)(K.value))return I(P);I(K.value)},[I,P]);return n.createElement(r.l6,{inputId:R,value:N,placeholder:(0,s.t)("time-picker.zone.select-search-input","Type to search (country, city, abbreviation)"),autoFocus:S,menuShouldPortal:B,openMenuOnFocus:H,width:x,filterOption:V,options:w,onChange:_,onBlur:O,components:{Option:G,Group:c},disabled:U,"aria-label":(0,s.t)("time-picker.zone.select-aria-label","Time zone picker")})},D=T=>{const I=Date.now();return(0,o.U3)(T).map(S=>{const O=S.zones.reduce((P,L)=>{const U=(0,o.QZ)(L,I);return U&&P.push({label:U.name,value:U.zone,searchIndex:M(U,I)}),P},[]);return{label:S.name,options:O}})},b=(T,I)=>(0,n.useMemo)(()=>{if(I===void 0)return;const x=(0,t.toLower)(I);return T.find(O=>O.label?x.startsWith((0,t.toLower)(O.label)):C(x))?.options.find(O=>(0,t.isEmpty)(x)?O.value===o.g$.default:(0,t.toLower)(O.value)===x)},[T,I]),C=T=>{switch(T){case o.g$.default:case o.g$.localBrowserTime:case o.g$.utc:return!0;default:return!1}},y=()=>(0,n.useCallback)((T,I)=>!I||!T.data||!T.data.searchIndex?!0:T.data.searchIndex.indexOf((0,t.toLower)(I))>-1,[]),M=(T,I)=>{const x=[(0,t.toLower)(T.name),(0,t.toLower)(T.abbreviation),(0,t.toLower)((0,l.t)(I,T.zone))];for(const S of T.countries)x.push((0,t.toLower)(S.name)),x.push((0,t.toLower)(S.code));return x.join("|")}},79451:(Q,A,e)=>{"use strict";e.d(A,{E:()=>s});var t=e(32196),n=e(96540),o=e(40845);const s=({info:u})=>{const c=(0,o.of)(g),i=r(u);return u?n.createElement("div",{className:c.description},i):null},r=u=>(0,n.useMemo)(()=>{const c=[];if(!u)return"";if(u.name==="Europe/Simferopol")return"Ukraine, EEST";if(u.countries.length>0){const i=u.countries[0];c.push(i.name)}return u.abbreviation&&c.push(u.abbreviation),c.join(", ")},[u]),g=u=>({description:(0,t.css)({fontWeight:"normal",fontSize:u.typography.size.sm,color:u.colors.text.secondary,whiteSpace:"normal",textOverflow:"ellipsis"})})},17624:(Q,A,e)=>{"use strict";e.d(A,{X:()=>u,t:()=>c});var t=e(32196),n=e(2543),o=e.n(n),s=e(96540),r=e(72724),g=e(40845);const u=l=>{const{timestamp:f,timeZone:d,className:h}=l,p=(0,g.of)(i);return(0,n.isString)(d)?s.createElement(s.Fragment,null,s.createElement("span",{className:(0,t.cx)(p.offset,h)},c(f,d))):null},c=(l,f)=>{const d=(0,r.LE)(l,{timeZone:f,format:"Z"});return d==="+00:00"?"UTC":`UTC${d}`},i=l=>{const f=(0,t.css)({fontWeight:"normal",fontSize:l.typography.size.sm,color:l.colors.text.secondary,whiteSpace:"normal"});return{offset:(0,t.css)(f,{color:l.colors.text.primary,background:l.colors.background.secondary,padding:"2px 5px",borderRadius:l.shape.radius.default,marginLeft:"4px"})}}},67459:(Q,A,e)=>{"use strict";e.d(A,{U:()=>s});var t=e(32196),n=e(96540),o=e(40845);const s=({title:g})=>{const u=(0,o.of)(r);return g?n.createElement("span",{className:u.title},g):null},r=g=>({title:(0,t.css)({fontWeight:g.typography.fontWeightRegular,textOverflow:"ellipsis"})})},15648:(Q,A,e)=>{"use strict";e.d(A,{l:()=>r});var t=e(96540),n=e(13544),o=e(88323);const s=[{value:"",label:"Default"},{value:"saturday",label:"Saturday"},{value:"sunday",label:"Sunday"},{value:"monday",label:"Monday"}],r=g=>{const{onChange:u,width:c,autoFocus:i=!1,onBlur:l,value:f,disabled:d=!1,inputId:h}=g,p=(0,t.useCallback)(m=>{m.value!==void 0&&u(m.value)},[u]);return t.createElement(o.l6,{inputId:h,value:s.find(m=>m.value===f)?.value,placeholder:n.Tp.components.WeekStartPicker.placeholder,autoFocus:i,openMenuOnFocus:!0,width:c,options:s,onChange:p,onBlur:l,disabled:d})}},32432:(Q,A,e)=>{"use strict";e.d(A,{Z:()=>n,o:()=>t});const t=[{from:"now-5m",to:"now",display:"Last 5 minutes"},{from:"now-15m",to:"now",display:"Last 15 minutes"},{from:"now-30m",to:"now",display:"Last 30 minutes"},{from:"now-1h",to:"now",display:"Last 1 hour"},{from:"now-3h",to:"now",display:"Last 3 hours"},{from:"now-6h",to:"now",display:"Last 6 hours"},{from:"now-12h",to:"now",display:"Last 12 hours"},{from:"now-24h",to:"now",display:"Last 24 hours"},{from:"now-2d",to:"now",display:"Last 2 days"},{from:"now-7d",to:"now",display:"Last 7 days"},{from:"now-30d",to:"now",display:"Last 30 days"},{from:"now-90d",to:"now",display:"Last 90 days"},{from:"now-6M",to:"now",display:"Last 6 months"},{from:"now-1y",to:"now",display:"Last 1 year"},{from:"now-2y",to:"now",display:"Last 2 years"},{from:"now-5y",to:"now",display:"Last 5 years"},{from:"now-1d/d",to:"now-1d/d",display:"Yesterday"},{from:"now-2d/d",to:"now-2d/d",display:"Day before yesterday"},{from:"now-7d/d",to:"now-7d/d",display:"This day last week"},{from:"now-1w/w",to:"now-1w/w",display:"Previous week"},{from:"now-1M/M",to:"now-1M/M",display:"Previous month"},{from:"now-1Q/fQ",to:"now-1Q/fQ",display:"Previous fiscal quarter"},{from:"now-1y/y",to:"now-1y/y",display:"Previous year"},{from:"now-1y/fy",to:"now-1y/fy",display:"Previous fiscal year"},{from:"now/d",to:"now/d",display:"Today"},{from:"now/d",to:"now",display:"Today so far"},{from:"now/w",to:"now/w",display:"This week"},{from:"now/w",to:"now",display:"This week so far"},{from:"now/M",to:"now/M",display:"This month"},{from:"now/M",to:"now",display:"This month so far"},{from:"now/y",to:"now/y",display:"This year"},{from:"now/y",to:"now",display:"This year so far"},{from:"now/fQ",to:"now",display:"This fiscal quarter so far"},{from:"now/fQ",to:"now/fQ",display:"This fiscal quarter"},{from:"now/fy",to:"now",display:"This fiscal year so far"},{from:"now/fy",to:"now/fy",display:"This fiscal year"}],n=[{label:"January",value:0},{label:"February",value:1},{label:"March",value:2},{label:"April",value:3},{label:"May",value:4},{label:"June",value:5},{label:"July",value:6},{label:"August",value:7},{label:"September",value:8},{label:"October",value:9},{label:"November",value:10},{label:"December",value:11}]},47619:(Q,A,e)=>{"use strict";e.d(A,{X:()=>r,f:()=>s});var t=e(47232),n=e(85858),o=e(53531);function s(g,u,c){return(0,t.Ar)(g)?g.isValid():n.isMathString(g)?n.isValid(g):(0,o.b)(g,{roundUp:u,timeZone:c}).isValid()}function r(g){return n.isValid(g.from)&&n.isValid(g.to)}},25994:(Q,A,e)=>{"use strict";e.d(A,{c:()=>s});var t=e(32196),n=e(96540),o=e(40845);const s=({direction:g="horizontal",spacing:u=2})=>{const c=(0,o.of)(r,u);return g==="vertical"?n.createElement("div",{className:c.verticalDivider}):n.createElement("hr",{className:c.horizontalDivider})};s.displayName="Divider";const r=(g,u)=>({horizontalDivider:(0,t.css)({borderTop:`1px solid ${g.colors.border.weak}`,margin:g.spacing(u,0),width:"100%"}),verticalDivider:(0,t.css)({borderRight:`1px solid ${g.colors.border.weak}`,margin:g.spacing(0,u),height:"100%"})})},69144:(Q,A,e)=>{"use strict";e.d(A,{l:()=>n});var t=e(32196);const n=(o,s)=>{const r=s||"middle",g=o.colors.emphasize(o.colors.background.secondary,.15),u=o.colors.primary.border,c=o.spacing(2),i=4,l=200;let f="50%",d="50%";switch(r){case"start":{f="0%",d="0%";break}case"end":{f="100%",d="100%";break}}const h=(0,t.css)({position:"relative","&:before":{content:'""',position:"absolute",transition:o.transitions.create("border-color"),zIndex:1},"&:after":{background:g,content:'""',position:"absolute",transition:o.transitions.create("background"),transform:"translate(-50%, -50%)",borderRadius:o.shape.radius.pill,zIndex:1},"&:hover":{"&:before":{borderColor:u},"&:after":{background:u}}});return{dragHandleVertical:(0,t.cx)(h,(0,t.css)({cursor:"col-resize",width:c,"&:before":{borderRight:"1px solid transparent",height:"100%",left:f,transform:"translateX(-50%)"},"&:after":{left:f,top:"50%",height:l,width:i}})),dragHandleHorizontal:(0,t.cx)(h,(0,t.css)({height:c,cursor:"row-resize","&:before":{borderTop:"1px solid transparent",top:d,transform:"translateY(-50%)",width:"100%"},"&:after":{left:"50%",top:d,height:i,width:l}}))}}},87978:(Q,A,e)=>{"use strict";e.d(A,{_:()=>p});var t=e(32196),n=e(80279),o=e(7887),s=e(82148),r=e(50848),g=e(96540),u=e(13544),c=e(40845),i=e(76412),l=e(40276),f=e(69144),d=e(29158),h=e(94753);function p({children:C,onClose:y,closeOnMaskClick:M=!0,scrollableContent:T=!0,title:I,subtitle:x,width:S,size:O="md",tabs:P}){const[L,U,R]=m(),B=(0,c.of)(E),H=(0,c.of)(b,O,L??S),w=(0,c.of)(f.l),N=g.useRef(null),{dialogProps:V,titleProps:G}=(0,n.s)({},N),{overlayProps:_}=(0,s.e)({isDismissable:!1,isOpen:!0,onClose:y},N);v();const K=(0,t.cx)(B.drawer,H),j=g.createElement("div",{className:B.content},C);return g.createElement(r.A,{open:!0,onClose:y,placement:"right",getContainer:".main-view",className:B.drawerContent,rootClassName:K,width:"",motion:{motionAppear:!0,motionName:B.drawerMotion},maskClassName:B.mask,maskClosable:M,maskMotion:{motionAppear:!0,motionName:B.maskMotion}},g.createElement(o.n1,{restoreFocus:!0,contain:!0,autoFocus:!0},g.createElement("div",{"aria-label":typeof I=="string"?u.Tp.components.Drawer.General.title(I):u.Tp.components.Drawer.General.title("no title"),className:B.container,..._,...V,ref:N},g.createElement("div",{className:(0,t.cx)(w.dragHandleVertical,B.resizer),onMouseDown:U,onTouchStart:R}),typeof I=="string"&&g.createElement("div",{className:(0,t.cx)(B.header,!!P&&B.headerWithTabs)},g.createElement("div",{className:B.actions},g.createElement(d.K,{name:"times",variant:"secondary",onClick:y,"data-testid":u.Tp.components.Drawer.General.close,tooltip:(0,i.t)("grafana-ui.drawer.close","Close")})),g.createElement("div",{className:B.titleWrapper},g.createElement(h.E,{element:"h3",...G},I),x&&g.createElement("div",{className:B.subtitle,"data-testid":u.Tp.components.Drawer.General.subtitle},x),P&&g.createElement("div",{className:B.tabsWrapper},P))),typeof I!="string"&&I,T?g.createElement(l.E,null,j):j)))}function m(){const[C,y]=(0,g.useState)(void 0),M=(0,g.useCallback)(P=>{y(a(P.clientX))},[]),T=(0,g.useCallback)(P=>{const L=P.touches[0];y(a(L.clientX))},[]),I=(0,g.useCallback)(P=>{document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",I)},[M]),x=(0,g.useCallback)(P=>{document.removeEventListener("touchmove",T),document.removeEventListener("touchend",x)},[T]);function S(P){P.stopPropagation(),P.preventDefault(),document.addEventListener("mousemove",M),document.addEventListener("mouseup",I)}function O(P){P.stopPropagation(),P.preventDefault(),document.addEventListener("touchmove",T),document.addEventListener("touchend",x)}return[C,S,O]}function a(C){let y=document.body.offsetWidth-(C-document.body.offsetLeft);return`${Math.min(y/document.body.clientWidth*100,98).toFixed(2)}vw`}function v(){(0,g.useEffect)(()=>{if(document.body)return document.body.classList.add("body-drawer-open"),()=>{document.body.classList.remove("body-drawer-open")}},[])}const E=C=>({container:(0,t.css)({display:"flex",flexDirection:"column",height:"100%",flex:"1 1 0",minHeight:"100%",position:"relative"}),drawer:(0,t.css)({".main-view &":{top:80},".main-view--search-bar-hidden &":{top:40},".main-view--chrome-hidden &":{top:0},".rc-drawer-content-wrapper":{boxShadow:C.shadows.z3}}),drawerContent:(0,t.css)({backgroundColor:`${C.colors.background.primary} !important`,display:"flex",overflow:"unset",flexDirection:"column"}),drawerMotion:(0,t.css)({"&-appear":{transform:"translateX(100%)",transition:"none !important","&-active":{transition:`${C.transitions.create("transform")} !important`,transform:"translateX(0)"}}}),mask:(0,t.css)({backgroundColor:"transparent",position:"fixed","&:before":{backgroundColor:`${C.components.overlay.background} !important`,backdropFilter:"blur(1px)",bottom:0,content:'""',left:0,position:"fixed",right:0,".main-view &":{top:80},".main-view--search-bar-hidden &":{top:40},".main-view--chrome-hidden &":{top:0}}}),maskMotion:(0,t.css)({"&-appear":{opacity:0,"&-active":{opacity:1,transition:C.transitions.create("opacity")}}}),header:(0,t.css)({label:"drawer-header",flexGrow:0,padding:C.spacing(2,2,3),borderBottom:`1px solid ${C.colors.border.weak}`}),headerWithTabs:(0,t.css)({borderBottom:"none"}),actions:(0,t.css)({position:"absolute",right:C.spacing(1),top:C.spacing(1)}),titleWrapper:(0,t.css)({label:"drawer-title",overflowWrap:"break-word"}),subtitle:(0,t.css)({label:"drawer-subtitle",color:C.colors.text.secondary,paddingTop:C.spacing(1)}),content:(0,t.css)({padding:C.spacing(2),height:"100%",flexGrow:1}),tabsWrapper:(0,t.css)({label:"drawer-tabs",paddingLeft:C.spacing(2),margin:C.spacing(1,-1,-3,-3)}),resizer:(0,t.css)({top:0,left:C.spacing(-1),bottom:0,position:"absolute",zIndex:C.zIndex.modal})}),D={sm:{width:"25vw",minWidth:384},md:{width:"50vw",minWidth:568},lg:{width:"75vw",minWidth:744}};function b(C,y,M){let T=M??D[y].width,I=D[y].minWidth;return(0,t.css)({".rc-drawer-content-wrapper":{label:`drawer-content-wrapper-${y}`,width:T,minWidth:I,overflow:"unset",[C.breakpoints.down("md")]:{width:`calc(100% - ${C.spacing(2)}) !important`,minWidth:0}}})}},9261:(Q,A,e)=>{"use strict";e.d(A,{f:()=>d});var t=e(32196),n=e(95361),o=e(18491),s=e(36376),r=e(7887),g=e(96540),u=e(40845),c=e(38138),i=e(64539),l=e(27746);const f=p=>{const{className:m,options:a,value:v,onChange:E,narrow:D,variant:b,...C}=p,y=(0,u.of)(h),[M,T]=(0,g.useState)(!1),I=[(0,n.cY)(0),(0,o.UU)({fallbackAxisSideDirection:"end",crossAxis:!1,boundary:document.body}),(0,o.BN)()],{context:x,refs:S,floatingStyles:O}=(0,s.we)({open:M,placement:"bottom-end",onOpenChange:T,middleware:I,whileElementsMounted:o.ll}),P=(0,s.kp)(x),L=(0,s.s9)(x),{getReferenceProps:U,getFloatingProps:R}=(0,s.bv)([L,P]),B=H=>{E(H),T(!1)};return g.createElement("div",{className:y.wrapper},g.createElement(l.I,{className:m,isOpen:M,narrow:D,variant:b,ref:S.setReference,...U(),...C},v?.label||(v?.value!=null?String(v?.value):null)),M&&g.createElement("div",{className:y.menuWrapper,ref:S.setFloating,...R(),style:O},g.createElement(r.n1,{contain:!0,autoFocus:!0,restoreFocus:!0},g.createElement(c.W,{tabIndex:-1,onClose:()=>T(!1)},a.map(H=>g.createElement(i.D,{key:`${H.value}`,label:H.label??String(H.value),onClick:()=>B(H),active:H.value===v?.value,ariaChecked:H.value===v?.value,ariaLabel:H.ariaLabel||H.label,role:"menuitemradio"}))))))};f.displayName="ButtonSelect";const d=g.memo(f),h=p=>({wrapper:(0,t.css)({position:"relative",display:"inline-flex"}),menuWrapper:(0,t.css)({zIndex:p.zIndex.dropdown})})},83122:(Q,A,e)=>{"use strict";e.d(A,{m:()=>f});var t=e(32196),n=e(95361),o=e(18491),s=e(36376),r=e(7887),g=e(96540),u=e(86634),c=e(67892),i=e(18976),l=e(17464);const f=g.memo(({children:h,overlay:p,placement:m,offset:a,onVisibleChange:v})=>{const[E,D]=(0,g.useState)(!1),b=(0,g.useRef)(null);(0,g.useEffect)(()=>{v?.(E)},[v,E]);const C=[(0,n.cY)({mainAxis:a?.[0]??8,crossAxis:a?.[1]??0}),(0,o.UU)({fallbackAxisSideDirection:"end",crossAxis:!1,boundary:document.body}),(0,o.BN)()],{context:y,refs:M,floatingStyles:T}=(0,s.we)({open:E,placement:(0,i.O)(m),onOpenChange:D,middleware:C,whileElementsMounted:o.ll}),I=(0,s.kp)(y),x=(0,s.s9)(y),{getReferenceProps:S,getFloatingProps:O}=(0,s.bv)([x,I]),P=150,L=d(P),U=()=>{D(!1)},R=B=>{B.key==="Tab"&&D(!1)};return g.createElement(g.Fragment,null,g.cloneElement(h,{ref:M.setReference,...S()}),E&&g.createElement(l.ZL,null,g.createElement(r.n1,{autoFocus:!0,restoreFocus:!0,contain:!0},g.createElement("div",{ref:M.setFloating,style:T,onClick:U,onKeyDown:R},g.createElement(u.A,{nodeRef:b,appear:!0,in:!0,timeout:{appear:P,exit:0,enter:0},classNames:L},g.createElement("div",{ref:b},c.renderOrCallToRender(p,{...O()})))))))});f.displayName="Dropdown";const d=h=>({appear:(0,t.css)({opacity:"0",position:"relative",transform:"scaleY(0.5)",transformOrigin:"top"}),appearActive:(0,t.css)({opacity:"1",transform:"scaleY(1)",transition:`transform ${h}ms cubic-bezier(0.2, 0, 0.2, 1), opacity ${h}ms cubic-bezier(0.2, 0, 0.2, 1)`})})},41670:(Q,A,e)=>{"use strict";e.d(A,{Z:()=>s});var t=e(32196),n=e(96540),o=e(40845);const s=({children:g})=>{const u=(0,o.of)(r);return n.createElement("div",{className:u.container},g)},r=g=>({container:(0,t.css)({borderLeft:`3px solid ${g.colors.info.main}`,backgroundColor:`${g.colors.background.secondary}`,padding:g.spacing(2),minWidth:"350px",borderRadius:g.shape.radius.default,marginBottom:g.spacing(4)})})},66602:(Q,A,e)=>{"use strict";e.d(A,{Xc:()=>u,Xw:()=>g,tH:()=>r});var t=e(96540),n=e(32631),o=e(42418),s=e(52446);class r extends t.PureComponent{constructor(){super(...arguments),this.state={error:null,errorInfo:null}}componentDidCatch(i,l){n.P?.api?.pushError(i),this.setState({error:i,errorInfo:l}),this.props.onError&&this.props.onError(i)}componentDidUpdate(i){const{dependencies:l,onRecover:f}=this.props;if(this.state.error&&l&&i.dependencies){for(let d=0;dp?f==="alertbox"?t.createElement(o.F,{title:i||""},t.createElement("details",{style:{whiteSpace:"pre-wrap"}},h&&h.toString(),t.createElement("br",null),p.componentStack)):t.createElement(s.D,{title:i||"",error:h,errorInfo:p}):l)}}g.defaultProps={title:"An unexpected error happened",style:"alertbox"};function u(c,i={}){const l=f=>t.createElement(g,{...i},t.createElement(c,{...f}));return l.displayName="WithErrorBoundary",l}},52446:(Q,A,e)=>{"use strict";e.d(A,{D:()=>s});var t=e(32196),n=e(96540),o=e(40845);const s=({error:g,errorInfo:u,title:c})=>{const i=(0,o.of)(r);return n.createElement("div",{className:i},n.createElement("h2",null,c),n.createElement("details",{style:{whiteSpace:"pre-wrap"}},g&&g.toString(),n.createElement("br",null),u&&u.componentStack))};s.displayName="ErrorWithStack";const r=()=>(0,t.css)({width:"500px",margin:"64px auto"})},37270:(Q,A,e)=>{"use strict";e.d(A,{gH:()=>d,wI:()=>m});var t=e(32196),n=e(2543),o=e.n(n),s=e(96540),r=e(20978),g=e(47172),u=e(83195),c=e(40845),i=e(42418),l=e(14578),f=e(95950);function d({options:b,children:C,readAs:y,onLoad:M,fileListRenderer:T,onFileRemove:I}){const[x,S]=(0,s.useState)([]),[O,P]=(0,s.useState)([]),L=(0,u.j_)("decbytes")(b?.maxSize?b?.maxSize:0),U=(0,s.useCallback)((Y,ee)=>{S(re=>re.map(J=>(J.id===Y.id&&ee(J),J)))},[]),R=(0,s.useCallback)((Y,ee,re)=>{let J=Y.map(E);if(b?.multiple===!1?S(J):S(ne=>[...ne,...J]),K(ee),b?.onDrop)b.onDrop(Y,ee,re);else for(const ne of J){const q=new FileReader,te=()=>{y?q[y](ne.file):q.readAsText(ne.file)};U(ne,oe=>{oe.abortUpload=()=>{q.abort()},oe.retryUpload=()=>{U(ne,ue=>{ue.error=null,ue.progress=void 0}),te()}}),q.onabort=()=>{U(ne,oe=>{oe.error=new DOMException("Aborted")})},q.onprogress=oe=>{U(ne,ue=>{ue.progress=oe.loaded})},q.onload=()=>{M?.(q.result)},q.onerror=()=>{U(ne,oe=>{oe.error=q.error})},te()}},[M,b,y,U]),B=Y=>{const ee=x.filter(re=>Y.id!==re.id);S(ee),I?.(Y)},{getRootProps:H,getInputProps:w,isDragActive:N}=(0,r.VB)({...b,useFsAccessApi:!1,onDrop:R,accept:p(b?.accept)}),V=(0,c.$j)(),G=D(V,N),_=x.map(Y=>T?T(Y,B):s.createElement(f.I,{key:Y.id,file:Y,removeFile:B})),K=Y=>{let ee=[];Y.map(re=>{re.errors.map(J=>{ee.findIndex(ne=>ne.code===J.code&&ne.message===J.message)===-1&&ee.push(J)})}),P(ee)},j=Y=>s.createElement("div",{className:G.errorAlert},s.createElement(i.F,{title:"Upload failed",severity:"error",onRemove:k},Y.map(ee=>{switch(ee.code){case g.O4.FileTooLarge:return s.createElement("div",{key:ee.message+ee.code},"File is larger than ",(0,u.cN)(L));default:return s.createElement("div",{key:ee.message+ee.code},ee.message)}}))),k=()=>{P([])};return s.createElement("div",{className:G.container},s.createElement("div",{"data-testid":"dropzone",...H({className:G.dropzone})},s.createElement("input",{...w()}),C??s.createElement(m,{primaryText:a(x,b)})),O.length>0&&j(O),s.createElement("small",{className:(0,t.cx)(G.small,G.acceptContainer)},b?.maxSize&&`Max file size: ${(0,u.cN)(L)}`,b?.maxSize&&b?.accept&&s.createElement("span",{className:G.acceptSeparator},"|"),b?.accept&&v(b.accept)),_)}function h(b){return["txt","json","csv","xls","yml"].some(C=>b.match(C))?"text/plain":"application/octet-stream"}function p(b){return(0,n.isString)(b)?{[h(b)]:[b]}:Array.isArray(b)?b.reduce((C,y)=>{const M=h(y);return C[M]=C[M]?[...C[M],y]:[y],C},{}):b}function m({primaryText:b="Drop file here or click to upload",secondaryText:C=""}){const y=(0,c.$j)(),M=D(y);return s.createElement("div",{className:(0,t.cx)(M.defaultDropZone),"data-testid":"file-drop-zone-default-children"},s.createElement(l.I,{className:(0,t.cx)(M.icon),name:"upload",size:"xl"}),s.createElement("h6",{className:(0,t.cx)(M.primaryText)},b),s.createElement("small",{className:M.small},C))}function a(b,C){return C?.multiple===void 0||C?.multiple?"Upload file":b.length?"Replace file":"Upload file"}function v(b){return(0,n.isString)(b)?`Accepted file type: ${b}`:Array.isArray(b)?`Accepted file types: ${b.join(", ")}`:`Accepted file types: ${Object.values(b).flat().join(", ")}`}function E(b){return{id:(0,n.uniqueId)("file"),file:b,error:null}}function D(b,C){return{container:(0,t.css)({display:"flex",flexDirection:"column",width:"100%",padding:b.spacing(2),borderRadius:b.shape.radius.default,border:`1px dashed ${b.colors.border.strong}`,backgroundColor:C?b.colors.background.secondary:b.colors.background.primary,cursor:"pointer",alignItems:"center",justifyContent:"center"}),dropzone:(0,t.css)({height:"100%",width:"100%",display:"flex",flexDirection:"column"}),defaultDropZone:(0,t.css)({textAlign:"center"}),icon:(0,t.css)({marginBottom:b.spacing(1)}),primaryText:(0,t.css)({marginBottom:b.spacing(1)}),acceptContainer:(0,t.css)({textAlign:"center",margin:0}),acceptSeparator:(0,t.css)({margin:`0 ${b.spacing(1)}`}),small:(0,t.css)({color:b.colors.text.secondary}),errorAlert:(0,t.css)({paddingTop:"10px"})}}},95950:(Q,A,e)=>{"use strict";e.d(A,{I:()=>l});var t=e(32196),n=e(96540),o=e(83195),s=e(40845),r=e(53550),g=e(55852),u=e(14578),c=e(29158);const i="Remove file";function l({file:d,removeFile:h}){const p=(0,s.of)(f),{file:m,progress:a,error:v,abortUpload:E,retryUpload:D}=d,b=()=>v?n.createElement(n.Fragment,null,n.createElement("span",{className:p.error},v.message),D&&n.createElement(c.K,{name:"sync",tooltip:"Retry",tooltipPlacement:"top",onClick:D}),h&&n.createElement(c.K,{className:D?p.marginLeft:"",name:"trash-alt",onClick:()=>h(d),tooltip:i})):a&&m.size>a?n.createElement(n.Fragment,null,n.createElement("progress",{className:p.progressBar,max:m.size,value:a}),n.createElement("span",{className:p.paddingLeft},Math.round(a/m.size*100),"%"),E&&n.createElement(g.$n,{variant:"secondary",type:"button",fill:"text",onClick:E},"Cancel upload")):h&&n.createElement(c.K,{name:"trash-alt",onClick:()=>h(d),tooltip:i,tooltipPlacement:"top"}),C=(0,o.j_)("decbytes")(m.size);return n.createElement("div",{className:p.fileListContainer},n.createElement("span",{className:p.fileNameWrapper},n.createElement(u.I,{name:"file-blank",size:"lg","aria-hidden":!0}),n.createElement("span",{className:p.padding},(0,r.i)(m.name)),n.createElement("span",null,(0,o.cN)(C))),n.createElement("div",{className:p.fileNameWrapper},b()))}function f(d){return{fileListContainer:(0,t.css)({width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",padding:d.spacing(2),border:`1px dashed ${d.colors.border.medium}`,backgroundColor:`${d.colors.background.secondary}`,marginTop:d.spacing(1)}),fileNameWrapper:(0,t.css)({display:"flex",flexDirection:"row",alignItems:"center"}),padding:(0,t.css)({padding:d.spacing(0,1)}),paddingLeft:(0,t.css)({paddingLeft:d.spacing(2)}),marginLeft:(0,t.css)({marginLeft:d.spacing(1)}),error:(0,t.css)({paddingRight:d.spacing(2),color:d.colors.error.text}),progressBar:(0,t.css)({borderRadius:d.shape.radius.default,height:"4px","::-webkit-progress-bar":{backgroundColor:d.colors.border.weak,borderRadius:d.shape.radius.default},"::-webkit-progress-value":{backgroundColor:d.colors.primary.main,borderRadius:d.shape.radius.default}})}}},92887:(Q,A,e)=>{"use strict";e.d(A,{IB:()=>n.I,gH:()=>t.gH,wI:()=>t.wI});var t=e(37270),n=e(95950)},73546:(Q,A,e)=>{"use strict";e.d(A,{e:()=>l});var t=e(32196),n=e(96540),o=e(62938),s=e(13544),r=e(40845),g=e(16797),u=e(53550),c=e(55852),i=e(14578);const l=({onFileUpload:d,className:h,children:p="Upload file",accept:m="*",size:a="md",showFileName:v})=>{const E=(0,r.of)(f(a)),[D,b]=(0,n.useState)(""),C=(0,o.A)(),y=(0,n.useCallback)(M=>{const T=M.currentTarget?.files?.[0];T&&b(T.name??""),d(M)},[d]);return n.createElement(n.Fragment,null,n.createElement("input",{type:"file",id:C,className:E.fileUpload,onChange:y,multiple:!1,accept:m,"data-testid":s.Tp.components.FileUpload.inputField}),n.createElement("label",{htmlFor:C,className:(0,t.cx)(E.labelWrapper,h)},n.createElement(i.I,{name:"upload",className:E.icon}),p),v&&D&&n.createElement("span",{"aria-label":"File name",className:E.fileName,"data-testid":s.Tp.components.FileUpload.fileNameSpan},(0,u.i)(D)))},f=d=>h=>{const p=(0,c.hs)({theme:h,variant:"primary",size:d,iconOnly:!1}),m=(0,g.getFocusStyles)(h);return{fileUpload:(0,t.css)({height:"0.1px",opacity:"0",overflow:"hidden",position:"absolute",width:"0.1px",zIndex:-1,"&:focus + label":m,"&:focus-visible + label":m}),labelWrapper:p.button,icon:p.icon,fileName:(0,t.css)({marginLeft:h.spacing(.5)})}}},67647:(Q,A,e)=>{"use strict";e.d(A,{Z:()=>u});var t=e(96540),n=e(54479);function o(...c){const i=t.useRef(null);return t.useEffect(()=>{c.forEach(l=>{l&&(typeof l=="function"?l(i.current):l.current=i.current)})},[c]),i}var s=e(55852),r=e(14578),g=e(10354);const u=t.forwardRef(({value:c,width:i,onChange:l,escapeRegex:f=!0,...d},h)=>{const p=t.useRef(null),m=o(h,p),a=c!==""?t.createElement(s.$n,{icon:"times",fill:"text",size:"sm",onClick:v=>{p.current?.focus(),l(""),v.stopPropagation()}},"Clear"):null;return t.createElement(g.p,{prefix:t.createElement(r.I,{name:"search"}),suffix:a,width:i,type:"text",value:f?(0,n.xb)(c??""):c,onChange:v=>l(f?(0,n.jD)(v.currentTarget.value):v.currentTarget.value),...d,ref:m})});u.displayName="FilterInput"},92174:(Q,A,e)=>{"use strict";e.d(A,{m:()=>g});var t=e(32196),n=e(96540),o=e(40845),s=e(55852),r=e(14578);const g=({label:c,selected:i,onClick:l,icon:f="check"})=>{const d=(0,o.of)(u),h=(0,o.of)(s.my);return n.createElement("button",{type:"button",className:(0,t.cx)(h,d.wrapper,i&&d.selected),onClick:l},n.createElement("span",null,c),i&&n.createElement(r.I,{name:f,className:d.icon}))},u=c=>({wrapper:(0,t.css)({background:c.colors.background.secondary,borderRadius:c.shape.radius.pill,padding:c.spacing(0,2),fontSize:c.typography.bodySmall.fontSize,fontWeight:c.typography.fontWeightMedium,lineHeight:c.typography.bodySmall.lineHeight,color:c.colors.text.secondary,display:"flex",alignItems:"center",height:"32px",position:"relative",border:`1px solid ${c.colors.background.secondary}`,whiteSpace:"nowrap","&:hover":{background:c.colors.action.hover,color:c.colors.text.primary}}),selected:(0,t.css)({color:c.colors.text.primary,background:c.colors.action.selected,"&:hover":{background:c.colors.action.focus}}),icon:(0,t.css)({marginLeft:c.spacing(.5)})})},90090:(Q,A,e)=>{"use strict";e.d(A,{z:()=>r});var t=e(32196),n=e(96540),o=e(38894);const s={labelWidth:6,inputWidth:12},r=({label:u,tooltip:c,labelWidth:i,inputWidth:l,inputEl:f,className:d,interactive:h,...p})=>{const m=g();return n.createElement("div",{className:(0,t.cx)(m.formField,d)},n.createElement(o.I,{width:i,tooltip:c,interactive:h},u),f||n.createElement("input",{type:"text",className:`gf-form-input ${l?`width-${l}`:""}`,...p,disabled:p.disabled}))};r.displayName="FormField",r.defaultProps=s;const g=()=>({formField:(0,t.css)({display:"flex",flexDirection:"row",alignItems:"flex-start",textAlign:"left",position:"relative"})})},38894:(Q,A,e)=>{"use strict";e.d(A,{I:()=>u});var t=e(46942),n=e.n(t),o=e(96540),s=e(14578),r=e(56034);const u=({children:c,isFocused:i,isInvalid:l,className:f,htmlFor:d,tooltip:h,width:p,interactive:m,...a})=>{const v=n()(f,`gf-form-label width-${p||"10"}`,{"gf-form-label--is-focused":i,"gf-form-label--is-invalid":l});return o.createElement("label",{className:v,...a,htmlFor:d},c,h&&o.createElement(r.m,{placement:"top",content:h,theme:"info",interactive:m},o.createElement(s.I,{name:"info-circle",size:"sm",style:{marginLeft:"10px"}})))}},9286:(Q,A,e)=>{"use strict";e.d(A,{i:()=>o});var t=e(96540);function n(s){return s<20?.9:s<26?.8:.6}const o=({value:s,className:r,style:g,...u})=>{const c=(s.prefix??"").length>0,i=(s.suffix??"").length>0;let l;if(g&&g.fontSize&&typeof g.fontSize=="number"){const f=g.fontSize,d=n(f);l={fontSize:f*d}}return t.createElement("div",{className:r,style:g,...u},t.createElement("div",null,c&&t.createElement("span",null,s.prefix),t.createElement("span",null,s.text),i&&t.createElement("span",{style:l},s.suffix)))};o.displayName="FormattedDisplayValue"},10880:(Q,A,e)=>{"use strict";e.d(A,{S:()=>g});var t=e(32196),n=e(96540),o=e(40845),s=e(16797),r=e(60029);const g=n.forwardRef(({label:c,description:i,value:l,htmlValue:f,onChange:d,disabled:h,className:p,indeterminate:m,invalid:a,...v},E)=>{const D=(0,n.useCallback)(y=>{d&&d(y)},[d]),b=(0,o.of)(u,a),C=m?"mixed":void 0;return n.createElement("label",{className:(0,t.cx)(b.wrapper,p)},n.createElement("div",{className:b.checkboxWrapper},n.createElement("input",{type:"checkbox",className:(0,t.cx)(b.input,m&&b.inputIndeterminate),checked:l,disabled:h,onChange:D,value:f,"aria-checked":C,...v,ref:E}),n.createElement("span",{className:b.checkmark})),c&&n.createElement("span",{className:b.label},c),i&&n.createElement("span",{className:b.description},i))}),u=(c,i=!1)=>{const l=(0,r.f)(c),f=2,d=1,h=p=>i?c.colors.error.border:p;return{wrapper:(0,t.css)({display:"inline-grid",alignItems:"center",columnGap:c.spacing(d),gridAutoRows:"max-content",position:"relative",verticalAlign:"middle"}),input:(0,t.css)({position:"absolute",zIndex:1,top:0,left:0,width:"100% !important",height:"100%",opacity:0,"&:focus + span, &:focus-visible + span":(0,s.getFocusStyles)(c),"&:focus:not(:focus-visible) + span":(0,s.getMouseFocusStyles)(c),"&:checked + span":{background:c.colors.primary.main,border:`1px solid ${h(c.colors.primary.main)}`,"&:hover":{background:c.colors.primary.shade},"&:after":{content:'""',position:"absolute",zIndex:2,left:"4px",top:0,width:"6px",height:"12px",border:`solid ${c.colors.primary.contrastText}`,borderWidth:"0 3px 3px 0",transform:"rotate(45deg)"}},"&:disabled + span":{backgroundColor:c.colors.action.disabledBackground,cursor:"not-allowed",border:`1px solid ${h(c.colors.action.disabledBackground)}`,"&:hover":{backgroundColor:c.colors.action.disabledBackground},"&:after":{borderColor:c.colors.action.disabledText}}}),inputIndeterminate:(0,t.css)({"&[aria-checked='mixed'] + span":{border:`1px solid ${h(c.colors.primary.main)}`,background:c.colors.primary.main,"&:hover":{background:c.colors.primary.shade},"&:after":{content:'""',position:"absolute",zIndex:2,left:"2px",right:"2px",top:"calc(50% - 1.5px)",height:"3px",border:`1.5px solid ${c.colors.primary.contrastText}`,backgroundColor:c.colors.primary.contrastText,width:"auto",transform:"none"}},"&:disabled[aria-checked='mixed'] + span":{backgroundColor:c.colors.action.disabledBackground,border:`1px solid ${h(c.colors.error.transparent)}`,"&:after":{borderColor:c.colors.action.disabledText}}}),checkboxWrapper:(0,t.css)({display:"flex",alignItems:"center",gridColumnStart:1,gridRowStart:1}),checkmark:(0,t.css)({position:"relative",zIndex:2,display:"inline-block",width:c.spacing(f),height:c.spacing(f),borderRadius:c.shape.radius.default,background:c.components.input.background,border:`1px solid ${h(c.components.input.borderColor)}`,"&:hover":{cursor:"pointer",borderColor:h(c.components.input.borderHover)}}),label:(0,t.cx)(l.label,(0,t.css)({gridColumnStart:2,gridRowStart:1,position:"relative",zIndex:2,cursor:"pointer",maxWidth:"fit-content",lineHeight:c.typography.bodySmall.lineHeight,marginBottom:0})),description:(0,t.cx)(l.description,(0,t.css)({gridColumnStart:2,gridRowStart:2,lineHeight:c.typography.bodySmall.lineHeight,marginTop:0}))}};g.displayName="Checkbox"},88575:(Q,A,e)=>{"use strict";e.d(A,{D:()=>u});var t=e(32196),n=e(96540),o=e(40845),s=e(67892),r=e(72093),g=e(60029);const u=n.forwardRef(({label:l,description:f,horizontal:d,invalid:h,loading:p,disabled:m,required:a,error:v,children:E,className:D,validationMessageHorizontalOverflow:b,htmlFor:C,...y},M)=>{const T=(0,o.of)(i),I=C??(0,s.getChildId)(E),x=typeof l=="string"?n.createElement(g.J,{htmlFor:I,description:f},`${l}${a?" *":""}`):l,S=c({invalid:h,disabled:m,loading:p});return n.createElement("div",{className:(0,t.cx)(T.field,d&&T.fieldHorizontal,D),...y},x,n.createElement("div",null,n.createElement("div",{ref:M},n.cloneElement(E,S)),h&&v&&!d&&n.createElement("div",{className:(0,t.cx)(T.fieldValidationWrapper,{[T.validationMessageHorizontalOverflow]:!!b})},n.createElement(r.P,null,v))),h&&v&&d&&n.createElement("div",{className:(0,t.cx)(T.fieldValidationWrapper,T.fieldValidationWrapperHorizontal,{[T.validationMessageHorizontalOverflow]:!!b})},n.createElement(r.P,null,v)))});u.displayName="Field";function c(l){for(const f in l)l[f]===void 0&&delete l[f];return l}const i=l=>({field:(0,t.css)({display:"flex",flexDirection:"column",marginBottom:l.spacing(2)}),fieldHorizontal:(0,t.css)({flexDirection:"row",justifyContent:"space-between",flexWrap:"wrap"}),fieldValidationWrapper:(0,t.css)({marginTop:l.spacing(.5)}),fieldValidationWrapperHorizontal:(0,t.css)({flex:"1 1 100%"}),validationMessageHorizontalOverflow:(0,t.css)({width:0,overflowX:"visible","& > *":{whiteSpace:"nowrap"}})})},95984:(Q,A,e)=>{"use strict";e.d(A,{E:()=>n});var t=e(49785);const n=({name:o,control:s,children:r,...g})=>{const{fields:u,append:c,prepend:i,remove:l,swap:f,move:d,insert:h}=(0,t.jz)({control:s,name:o,...g});return r({fields:u,append:c,prepend:i,remove:l,swap:f,move:d,insert:h})}},84167:(Q,A,e)=>{"use strict";e.d(A,{n:()=>r});var t=e(32196),n=e(96540),o=e(40845),s=e(17408);const r=({label:u,children:c,className:i,...l})=>{const f=(0,o.of)(g);return n.createElement("fieldset",{className:(0,t.cx)(f.wrapper,i),...l},u&&n.createElement(s.s,null,u),c)},g=u=>({wrapper:(0,t.css)({marginBottom:u.spacing(4),"&:last-child":{marginBottom:0}})})},72093:(Q,A,e)=>{"use strict";e.d(A,{P:()=>r});var t=e(32196),n=e(96540),o=e(40845),s=e(14578);const r=({children:u,horizontal:c,className:i})=>{const l=(0,o.of)(g),f=(0,t.cx)(c?l.horizontal:l.vertical,i);return n.createElement("div",{role:"alert",className:f},n.createElement(s.I,{className:l.fieldValidationMessageIcon,name:"exclamation-triangle"}),u)},g=u=>{const c=`
font-size: ${u.typography.size.sm};
font-weight: ${u.typography.fontWeightMedium};
padding: ${u.spacing(.5,1)};
color: ${u.colors.error.contrastText};
background: ${u.colors.error.main};
border-radius: ${u.shape.radius.default};
position: relative;
display: inline-block;
align-self: flex-start;
a {
color: ${u.colors.error.contrastText};
text-decoration: underline;
}
a:hover {
text-decoration: none;
}
`;return{vertical:(0,t.css)(c,{margin:u.spacing(.5,0,0,0),"&:before":{content:'""',position:"absolute",left:"9px",top:"-5px",width:0,height:0,borderWidth:"0 4px 5px 4px",borderColor:`transparent transparent ${u.colors.error.main} transparent`,borderStyle:"solid"}}),horizontal:(0,t.css)(c,{marginLeft:"10px","&:before":{content:'""',position:"absolute",left:"-5px",top:"9px",width:0,height:0,borderWidth:"4px 5px 4px 0",borderColor:"transparent #e02f44 transparent transparent",borderStyle:"solid"}}),fieldValidationMessageIcon:(0,t.css)({marginRight:u.spacing()})}}},51253:(Q,A,e)=>{"use strict";e.d(A,{l:()=>s});var t=e(32196),n=e(96540),o=e(49785);function s({defaultValues:r,onSubmit:g,validateOnMount:u=!1,validateFieldsOnMount:c,children:i,validateOn:l="onSubmit",maxWidth:f=600,...d}){const{handleSubmit:h,trigger:p,formState:m,...a}=(0,o.mN)({mode:l,defaultValues:r});return(0,n.useEffect)(()=>{u&&p(c)},[p,c,u]),n.createElement("form",{className:(0,t.css)({maxWidth:f!=="none"?f+"px":f,width:"100%"}),onSubmit:h(g),...d},i({errors:m.errors,formState:m,trigger:p,...a}))}},14186:(Q,A,e)=>{"use strict";e.d(A,{I:()=>u});var t=e(32196),n=e(96540),o=e(40845),s=e(67892),r=e(72093),g=e(76892);const u=({children:i,label:l,tooltip:f,labelWidth:d="auto",invalid:h,loading:p,disabled:m,required:a,className:v,htmlFor:E,grow:D,shrink:b,error:C,transparent:y,interactive:M,...T})=>{const I=(0,o.$j)(),x=c(I,D,b),S=E??(0,s.getChildId)(i),O=typeof l=="string"?n.createElement(g.c,{interactive:M,width:d,tooltip:f,htmlFor:S,transparent:y},`${l}${a?" *":""}`):l;return n.createElement("div",{className:(0,t.cx)(x.container,v),...T},O,n.createElement("div",{className:x.childContainer},n.cloneElement(i,{invalid:h,disabled:m,loading:p}),h&&C&&n.createElement("div",{className:(0,t.cx)(x.fieldValidationWrapper)},n.createElement(r.P,null,C))))};u.displayName="InlineField";const c=(i,l,f)=>({container:(0,t.css)({display:"flex",flexDirection:"row",alignItems:"flex-start",textAlign:"left",position:"relative",flex:`${l?1:0} ${f?1:0} auto`,margin:`0 ${i.spacing(.5)} ${i.spacing(.5)} 0`}),childContainer:(0,t.css)({flex:`${l?1:0} ${f?1:0} auto`}),fieldValidationWrapper:(0,t.css)({marginTop:i.spacing(.5)})})},39268:(Q,A,e)=>{"use strict";e.d(A,{C:()=>s});var t=e(32196),n=e(96540),o=e(40845);const s=({children:g,className:u,...c})=>{const i=(0,o.of)(r);return n.createElement("div",{className:(0,t.cx)(i.container,u),...c},g)},r=g=>({container:(0,t.css)({label:"InlineFieldRow",display:"flex",flexDirection:"row",flexWrap:"wrap",alignContent:"flex-start",rowGap:g.spacing(.5)})})},76892:(Q,A,e)=>{"use strict";e.d(A,{c:()=>g});var t=e(32196),n=e(96540),o=e(40845),s=e(14578),r=e(56034);const g=({children:c,className:i,tooltip:l,width:f,transparent:d,interactive:h,as:p="label",...m})=>{const a=(0,o.of)(u,d,f);return n.createElement(p,{className:(0,t.cx)(a.label,i),...m},c,l&&n.createElement(r.m,{interactive:h,placement:"top",content:l,theme:"info"},n.createElement(s.I,{tabIndex:0,name:"info-circle",size:"sm",className:a.icon})))},u=(c,i=!1,l)=>({label:(0,t.css)({display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0,padding:c.spacing(0,1),fontWeight:c.typography.fontWeightMedium,fontSize:c.typography.size.sm,backgroundColor:i?"transparent":c.colors.background.secondary,height:c.spacing(c.components.height.md),lineHeight:c.spacing(c.components.height.md),marginRight:c.spacing(.5),borderRadius:c.shape.radius.default,border:"none",width:l?l!=="auto"?`${8*l}px`:l:"100%",color:c.colors.text.primary}),icon:(0,t.css)({color:c.colors.text.secondary,marginLeft:"10px",":hover":{color:c.colors.text.primary}})})},63056:(Q,A,e)=>{"use strict";e.d(A,{e:()=>s});var t=e(32196),n=e(96540),o=e(40845);const s=({children:g,className:u,grow:c,...i})=>{const l=(0,o.of)(r,c);return n.createElement("div",{className:(0,t.cx)(l.container,u),...i},g)};s.displayName="InlineSegmentGroup";const r=(g,u)=>({container:(0,t.css)({display:"flex",flexDirection:"row",alignItems:"flex-start",textAlign:"left",position:"relative",flex:`${u?1:0} 0 auto`,marginBottom:g.spacing(.5)})})},60029:(Q,A,e)=>{"use strict";e.d(A,{J:()=>r,f:()=>g});var t=e(32196),n=e(96540),o=e(40845),s=e(14578);const r=({children:u,description:c,className:i,category:l,...f})=>{const d=(0,o.of)(g),h=l?.map((p,m)=>n.createElement("span",{className:d.categories,key:`${p}/${m}`},n.createElement("span",null,p),n.createElement(s.I,{name:"angle-right",className:d.chevron})));return n.createElement("div",{className:(0,t.cx)(d.label,i)},n.createElement("label",{...f},n.createElement("div",{className:d.labelContent},h,u),c&&n.createElement("span",{className:d.description},c)))},g=u=>({label:(0,t.css)({label:"Label",fontSize:u.typography.size.sm,fontWeight:u.typography.fontWeightMedium,lineHeight:1.25,marginBottom:u.spacing(.5),color:u.colors.text.primary,maxWidth:"480px"}),labelContent:(0,t.css)({display:"flex",alignItems:"center"}),description:(0,t.css)({label:"Label-description",color:u.colors.text.secondary,fontSize:u.typography.size.sm,fontWeight:u.typography.fontWeightRegular,marginTop:u.spacing(.25),display:"block"}),categories:(0,t.css)({label:"Label-categories",display:"inline-flex",alignItems:"center"}),chevron:(0,t.css)({margin:u.spacing(0,.25)})})},91634:(Q,A,e)=>{"use strict";e.d(A,{O:()=>r,p:()=>g});var t=e(46942),n=e.n(t),o=e(96540),s=e(29734),r=(u=>(u.Invalid="invalid",u.Valid="valid",u))(r||{});class g extends o.PureComponent{constructor(){super(...arguments),this.state={error:null},this.validatorAsync=c=>i=>{const l=(0,s.tf)(i.target.value,c);this.setState(f=>({...f,error:l?l[0]:null}))},this.populateEventPropsWithStatus=(c,i)=>{const l={...c};return i&&Object.keys(s.Pw).forEach(f=>{((0,s.K)(f,i)||c[f])&&(l[f]=async d=>{d.persist(),(0,s.K)(f,i)&&await this.validatorAsync(i[f]).apply(this,[d]),c[f]&&c[f].apply(null,[d,this.status])})}),l}}get status(){return this.state.error?"invalid":"valid"}get isInvalid(){return this.status==="invalid"}render(){const{validationEvents:c,className:i,hideErrorMessage:l,inputRef:f,...d}=this.props,{error:h}=this.state,p=n()("gf-form-input",{invalid:this.isInvalid},i),m=this.populateEventPropsWithStatus(d,c);return o.createElement("div",{style:{flexGrow:1}},o.createElement("input",{...m,ref:f,className:p}),h&&!l&&o.createElement("span",null,h))}}g.defaultProps={className:""}},24169:(Q,A,e)=>{"use strict";e.d(A,{A:()=>r,s:()=>s});var t=e(96540),n=e(28581),o=e(14578);const s=g=>{const u=g.selectProps.menuIsOpen;return t.createElement(n.c.IndicatorsContainer,{...g},t.createElement(o.I,{name:u?"angle-up":"angle-down",style:{marginTop:"7px"}}))},r=s},11206:(Q,A,e)=>{"use strict";e.d(A,{A:()=>s,l:()=>o});var t=e(96540),n=e(28581);const o=r=>{const{children:g}=r;return t.createElement(n.c.NoOptionsMessage,{...r},t.createElement("div",{className:"gf-form-select-box__desc-option"},t.createElement("div",{className:"gf-form-select-box__desc-option__body"},g)))},s=o},99091:(Q,A,e)=>{"use strict";e.d(A,{DW:()=>y,l6:()=>C});var t=e(46942),n=e.n(t),o=e(96540),s=e(28581),r=e(46005),g=e(8539),u=e(66963),c=e(60578),i=e(40276),l=e(80970),f=e(62235),d=e(23731),h=e(56034),p=e(24169),m=e(11206),a=e(14578);const v=I=>{const{children:x,isSelected:S,data:O}=I;return o.createElement(s.c.Option,{...I},o.createElement("div",{className:"gf-form-select-box__desc-option"},O.imgUrl&&o.createElement("img",{className:"gf-form-select-box__desc-option__img",src:O.imgUrl,alt:""}),o.createElement("div",{className:"gf-form-select-box__desc-option__body"},o.createElement("div",null,x),O.description&&o.createElement("div",{className:"gf-form-select-box__desc-option__desc"},O.description)),S&&o.createElement(a.I,{name:"check","aria-hidden":"true"})))},E=null,D=I=>o.createElement(s.c.MenuList,{...I},o.createElement(i.E,{autoHide:!1,autoHeightMax:"inherit"},I.children)),b=class extends o.PureComponent{render(){const{defaultValue:I,getOptionLabel:x,getOptionValue:S,onChange:O,options:P,placeholder:L,width:U,value:R,className:B,isDisabled:H,isLoading:w,isSearchable:N,isClearable:V,backspaceRemovesValue:G,isMulti:_,autoFocus:K,openMenuOnFocus:j,onBlur:k,maxMenuHeight:Y,noOptionsMessage:ee,isOpen:re,components:J,tooltipContent:ne,tabSelectsValue:q,onCloseMenu:te,onOpenMenu:oe,allowCustomValue:ue,formatCreateLabel:ie,"aria-label":ge}=this.props;let he="";U&&(he="width-"+U);let De=r.Ay;const pe={};ue&&(De=u.A,pe.formatCreateLabel=ie??(Ee=>Ee));const le=n()("gf-form-input","gf-form-input--form-dropdown",he,B),Te={...b.defaultProps.components,...J};return o.createElement(M,{onCloseMenu:te,onOpenMenu:oe,tooltipContent:ne,isOpen:re},(Ee,Re)=>o.createElement(De,{captureMenuScroll:!1,classNamePrefix:"gf-form-select-box",className:le,components:Te,defaultValue:I,value:R,getOptionLabel:x,getOptionValue:S,menuShouldScrollIntoView:!1,isSearchable:N,onChange:O,options:P,placeholder:L||"Choose",styles:(0,d.A)(this.context),isDisabled:H,isLoading:w,isClearable:V,autoFocus:K,onBlur:k,openMenuOnFocus:j,maxMenuHeight:Y,noOptionsMessage:ee,isMulti:_,backspaceRemovesValue:G,menuIsOpen:re,onMenuOpen:Ee,onMenuClose:Re,tabSelectsValue:q,"aria-label":ge,...pe}))}};let C=b;C.contextType=c.D,C.defaultProps={className:"",isDisabled:!1,isSearchable:!0,isClearable:!1,isMulti:!1,openMenuOnFocus:!1,autoFocus:!1,isLoading:!1,backspaceRemovesValue:!0,maxMenuHeight:300,tabSelectsValue:!0,allowCustomValue:!1,components:{Option:v,SingleValue:f.K,IndicatorsContainer:p.A,MenuList:D,Group:l.n}};class y extends o.PureComponent{render(){const{defaultValue:x,getOptionLabel:S,getOptionValue:O,onChange:P,placeholder:L,width:U,value:R,className:B,loadOptions:H,defaultOptions:w,isLoading:N,loadingMessage:V,noOptionsMessage:G,isDisabled:_,isSearchable:K,isClearable:j,backspaceRemovesValue:k,autoFocus:Y,onBlur:ee,openMenuOnFocus:re,maxMenuHeight:J,isMulti:ne,tooltipContent:q,onCloseMenu:te,onOpenMenu:oe,isOpen:ue}=this.props;let ie="";U&&(ie="width-"+U);const ge=n()("gf-form-input","gf-form-input--form-dropdown",ie,B);return o.createElement(M,{onCloseMenu:te,onOpenMenu:oe,tooltipContent:q,isOpen:ue},(he,De)=>o.createElement(g.A,{captureMenuScroll:!1,classNamePrefix:"gf-form-select-box",className:ge,components:{Option:v,SingleValue:f.K,IndicatorsContainer:p.A,NoOptionsMessage:m.A},defaultValue:x,value:R,getOptionLabel:S,getOptionValue:O,menuShouldScrollIntoView:!1,onChange:P,loadOptions:H,isLoading:N,defaultOptions:w,placeholder:L||"Choose",styles:(0,d.A)(this.context),loadingMessage:V,noOptionsMessage:G,isDisabled:_,isSearchable:K,isClearable:j,autoFocus:Y,onBlur:ee,openMenuOnFocus:re,maxMenuHeight:J,isMulti:ne,backspaceRemovesValue:k}))}}y.contextType=c.D,y.defaultProps={className:"",components:{},loadingMessage:()=>"Loading...",isDisabled:!1,isClearable:!1,isMulti:!1,isSearchable:!0,backspaceRemovesValue:!0,autoFocus:!1,openMenuOnFocus:!1,maxMenuHeight:300};class M extends o.PureComponent{constructor(){super(...arguments),this.state={isOpenInternal:!1},this.onOpenMenu=()=>{const{onOpenMenu:x}=this.props;x&&x(),this.setState({isOpenInternal:!0})},this.onCloseMenu=()=>{const{onCloseMenu:x}=this.props;x&&x(),this.setState({isOpenInternal:!1})}}render(){const{children:x,isOpen:S,tooltipContent:O}=this.props,{isOpenInternal:P}=this.state;let L;return(P||S)&&(L=!1),O?o.createElement(h.m,{show:L,content:O,placement:"bottom"},o.createElement("div",null,x(this.onOpenMenu,this.onCloseMenu))):o.createElement("div",null,x(this.onOpenMenu,this.onCloseMenu))}}const T=null},74716:(Q,A,e)=>{"use strict";e.d(A,{d:()=>g});var t=e(2543),n=e.n(t),o=e(96540),s=e(14578),r=e(56034);class g extends o.PureComponent{constructor(){super(...arguments),this.state={id:(0,t.uniqueId)()},this.internalOnChange=c=>{c.stopPropagation(),this.props.onChange(c)}}render(){const{labelClass:c="",switchClass:i="",label:l,checked:f,disabled:d,transparent:h,className:p,tooltip:m,tooltipPlacement:a}=this.props,v=this.state.id,E=`gf-form-label ${c} ${h?"gf-form-label--transparent":""} pointer`,D=`gf-form-switch ${i} ${h?"gf-form-switch--transparent":""}`;return o.createElement("div",{className:"gf-form-switch-container-react"},o.createElement("label",{htmlFor:v,className:`gf-form gf-form-switch-container ${p||""}`},l&&o.createElement("div",{className:E},l,m&&o.createElement(r.m,{placement:a||"auto",content:m,theme:"info"},o.createElement(s.I,{name:"info-circle",size:"sm",style:{marginLeft:"10px"}}))),o.createElement("div",{className:D},o.createElement("input",{disabled:d,id:v,type:"checkbox",checked:f,onChange:this.internalOnChange}),o.createElement("span",{className:"gf-form-switch__slider"}))))}}},17408:(Q,A,e)=>{"use strict";e.d(A,{s:()=>r});var t=e(32196),n=e(96540),o=e(40845);const s=g=>({legend:(0,t.css)({fontSize:g.typography.h3.fontSize,fontWeight:g.typography.fontWeightRegular,margin:g.spacing(0,0,2,0)})}),r=({children:g,className:u,...c})=>{const i=(0,o.of)(s);return n.createElement("legend",{className:(0,t.cx)(i.legend,u),...c},g)}},94354:(Q,A,e)=>{"use strict";e.d(A,{z:()=>h});var t=e(32196),n=e(2543),o=e(96540),s=e(8887),r=e(40845),g=e(14578),u=e(13544),c=e(16797),i=e(56034),l=e(87266);const f=o.forwardRef(({children:m,active:a=!1,disabled:v=!1,size:E="md",onChange:D,onClick:b,id:C,name:y=void 0,description:M,fullWidth:T,"aria-label":I},x)=>{const S=(0,r.of)(d,E,T),O=o.createElement("input",{type:"radio",className:S.radio,onChange:D,onClick:b,disabled:v,id:C,checked:a,name:y,"aria-label":I,ref:x});return M?o.createElement("div",{className:S.radioOption,"data-testid":u.Tp.components.RadioButton.container},o.createElement(i.m,{content:M,placement:"bottom"},O),o.createElement("label",{className:S.radioLabel,htmlFor:C,title:M||I},m)):o.createElement("div",{className:S.radioOption,"data-testid":u.Tp.components.RadioButton.container},O,o.createElement("label",{className:S.radioLabel,htmlFor:C,title:M||I},m))});f.displayName="RadioButton";const d=(m,a,v)=>{const{fontSize:E,height:D,padding:b}=(0,l.SM)(a,m),C=m.colors.text.secondary,y=m.colors.text.primary,M=D*m.spacing.gridSize-4-2;return{radioOption:(0,t.css)({display:"flex",justifyContent:"space-between",position:"relative",flex:v?"1 0 0":"none",textAlign:"center"}),radio:(0,t.css)({position:"absolute",opacity:0,zIndex:2,width:"100% !important",height:"100%",cursor:"pointer","&:checked + label":{color:m.colors.text.primary,fontWeight:m.typography.fontWeightMedium,background:m.colors.action.selected,zIndex:1},"&:focus + label, &:focus-visible + label":(0,c.getFocusStyles)(m),"&:focus:not(:focus-visible) + label":(0,c.getMouseFocusStyles)(m),"&:disabled + label":{color:m.colors.text.disabled,cursor:"not-allowed"}}),radioLabel:(0,t.css)({display:"flex",alignItems:"center",justifyContent:"center",fontSize:E,height:`${M}px`,lineHeight:`${M}px`,color:C,padding:m.spacing(0,b),borderRadius:m.shape.radius.default,background:m.colors.background.primary,cursor:"pointer",userSelect:"none",whiteSpace:"nowrap",flexGrow:1,"&:hover":{color:y}})}};function h({options:m,value:a,onChange:v,onClick:E,disabled:D,disabledOptions:b,size:C="md",id:y,className:M,fullWidth:T=!1,autoFocus:I=!1,"aria-label":x,invalid:S=!1}){const O=(0,o.useCallback)(H=>()=>{v&&v(H.value)},[v]),P=(0,o.useCallback)(H=>()=>{E&&E(H.value)},[E]),L=y??(0,n.uniqueId)("radiogroup-"),U=(0,o.useRef)(L),R=(0,r.of)(p),B=(0,o.useRef)(null);return(0,o.useEffect)(()=>{I&&B.current&&B.current.focus()},[I]),o.createElement("div",{role:"radiogroup","aria-label":x,className:(0,t.cx)(R.radioGroup,T&&R.fullWidth,S&&R.invalid,M)},m.map((H,w)=>{const N=b&&H.value&&b.includes(H.value),V=H.icon?(0,s.Uo)(H.icon):void 0,G=!!(H.imgUrl||H.label||H.component);return o.createElement(f,{size:C,disabled:N||D,active:a===H.value,key:`o.label-${w}`,"aria-label":H.ariaLabel,onChange:O(H),onClick:P(H),id:`option-${H.value}-${L}`,name:U.current,description:H.description,fullWidth:T,ref:a===H.value?B:void 0},V&&o.createElement(g.I,{name:V,className:(0,t.cx)(G&&R.icon)}),H.imgUrl&&o.createElement("img",{src:H.imgUrl,alt:H.label,className:R.img}),H.label," ",H.component?o.createElement(H.component,null):null)}))}h.displayName="RadioButtonGroup";const p=m=>({radioGroup:(0,t.css)({display:"inline-flex",flexDirection:"row",flexWrap:"nowrap",border:`1px solid ${m.components.input.borderColor}`,borderRadius:m.shape.radius.default,padding:"2px"}),fullWidth:(0,t.css)({display:"flex"}),icon:(0,t.css)({marginRight:"6px"}),img:(0,t.css)({width:m.spacing(2),height:m.spacing(2),marginRight:m.spacing(1)}),invalid:(0,t.css)({border:`1px solid ${m.colors.error.border}`})})},5173:(Q,A,e)=>{"use strict";e.d(A,{a:()=>u});var t=e(32196),n=e(2543),o=e(96540),s=e(40845);const r=({id:i,name:l,label:f,checked:d,value:h,disabled:p,description:m,onChange:a})=>{const v=(0,s.of)(g);return o.createElement("label",{title:m,className:v.label},o.createElement("input",{id:i,name:l,type:"radio",checked:d,value:h,disabled:p,className:v.input,onChange:()=>a&&a(i)}),o.createElement("div",null,f,m&&o.createElement("div",{className:v.description},m)))},g=i=>({input:(0,t.css)({position:"relative",appearance:"none",outline:"none",backgroundColor:i.colors.background.canvas,width:`${i.spacing(2)} !important`,height:i.spacing(2),border:`1px solid ${i.colors.border.medium}`,borderRadius:i.shape.radius.circle,margin:"3px 0",":checked":{backgroundColor:i.v1.palette.white,border:`5px solid ${i.colors.primary.main}`},":disabled":{backgroundColor:`${i.colors.action.disabledBackground} !important`,borderColor:i.colors.border.weak},":disabled:checked":{border:`1px solid ${i.colors.border.weak}`},":disabled:checked::after":{content:'""',width:"6px",height:"6px",backgroundColor:i.colors.text.disabled,borderRadius:i.shape.radius.circle,display:"inline-block",position:"absolute",top:"4px",left:"4px"},":focus":{outline:"none !important",boxShadow:`0 0 0 1px ${i.colors.background.canvas}, 0 0 0 3px ${i.colors.primary.main}`}}),label:(0,t.css)({fontSize:i.typography.fontSize,lineHeight:"22px",display:"grid",gridTemplateColumns:`${i.spacing(2)} auto`,gap:i.spacing(1)}),description:(0,t.css)({fontSize:i.typography.size.sm,color:i.colors.text.secondary})});function u({name:i,id:l,options:f,value:d,onChange:h,className:p,disabled:m,disabledOptions:a=[]}){const v=(0,s.of)(c),E=l??(0,n.uniqueId)("radiogroup-list-");return o.createElement("div",{id:l,className:(0,t.cx)(v.container,p),role:"radiogroup"},f.map((D,b)=>{const C=`${E}-${b}`,y=d&&d===D.value,M=m||a.some(I=>I===D.value),T=()=>h&&D.value&&h(D.value);return o.createElement(r,{key:b,id:C,name:i,label:D.label,description:D.description,checked:y,value:D.value,disabled:M,onChange:T})}))}const c=i=>({container:(0,t.css)({display:"grid",gap:i.spacing(1)})})},87266:(Q,A,e)=>{"use strict";e.d(A,{SM:()=>c,Xb:()=>s,g$:()=>r,gm:()=>o,lH:()=>g});var t=e(32196),n=e(16797);const o=i=>(0,t.css)({"&:focus":(0,n.getFocusStyles)(i)}),s=(i,l=!1)=>{const f=l?i.colors.error.border:i.components.input.borderColor,d=l?i.colors.error.shade:i.components.input.borderHover,h=i.components.input.background,p=i.components.input.text,m=i.isDark?"#2e2f35":"#bab4ca";return(0,t.cx)(r(i),(0,t.css)({background:h,lineHeight:i.typography.body.lineHeight,fontSize:i.typography.size.md,color:p,border:`1px solid ${f}`,"&:-webkit-autofill, &:-webkit-autofill:hover":{boxShadow:`inset 0 0 0 1px rgba(255, 255, 255, 0), inset 0 0 0 100px ${h}!important`,WebkitTextFillColor:`${p} !important`,borderColor:m},"&:-webkit-autofill:focus":{boxShadow:`0 0 0 2px ${i.colors.background.primary}, 0 0 0px 4px ${i.colors.primary.main}, inset 0 0 0 1px rgba(255, 255, 255, 0), inset 0 0 0 100px ${h}!important`,WebkitTextFillColor:`${p} !important`},"&:hover":{borderColor:d},"&:focus":{outline:"none"},"&:disabled":{backgroundColor:i.colors.action.disabledBackground,color:i.colors.action.disabledText,border:`1px solid ${i.colors.action.disabledBackground}`,"&:hover":{borderColor:f}},"&::placeholder":{color:i.colors.text.disabled,opacity:1}}))},r=i=>(0,t.css)({padding:i.spacing(0,1,0,1)}),g=()=>({sm:(0,t.css)({width:u("sm")}),md:(0,t.css)({width:u("md")}),lg:(0,t.css)({width:u("lg")}),auto:(0,t.css)({width:u("auto")})}),u=i=>{switch(i){case"sm":return"200px";case"md":return"320px";case"lg":return"580px";case"auto":default:return"auto"}};function c(i,l){switch(i){case"sm":return{padding:1,fontSize:l.typography.size.sm,height:l.components.height.sm};case"lg":return{padding:3,fontSize:l.typography.size.lg,height:l.components.height.lg};case"md":default:return{padding:2,fontSize:l.typography.size.md,height:l.components.height.md}}}},95164:(Q,A,e)=>{"use strict";e.d(A,{_:()=>m});var t=e(34796),n=e.n(t),o=e(96540),s=e(83195),r=e(58649),g=e(50082),u=e(52622),c=e(29413),i=e(55852),l=e(24293),f=e(47737);const d={mode:g.O.Absolute,steps:[{value:-1/0,color:"green"},{value:80,color:"red"}]};function h(a,v,E,D){const b=E!=null,C=D===u.wV.Vertical?v:a,y=Math.min(C*.15/1.5,20),M=y*1.5,T=b?v-M:v,I=Math.min(T,a);return{showLabel:b,gaugeHeight:I,titleFontSize:y}}function p(a,v,E,D){if(v.color?.mode!==l.Y.Thresholds)return[{value:v.min??r.tw,color:E.color??l.F}];const b=v.thresholds??d,C=b.mode===g.O.Percentage,y=b.steps;let M=v.min??r.tw,T=v.max??r.d1;C&&(M=0,T=100);const I=(0,f.yQ)(M,y),x=(0,f.yQ)(T,y),S=[{value:+M.toFixed(a),color:D.visualization.getColorByName(I.color)}];let O=!0;for(let P=0;P{const{width:v,value:E,height:D,onClick:b,text:C,theme:y,orientation:M}=this.props,T=h(v,D,E.title,M),I=M===u.wV.Vertical?`${T.gaugeHeight}px`:"100%",x=o.createElement("div",{style:{height:`${T.gaugeHeight}px`,width:I},ref:S=>this.canvasElement=S});return o.createElement(o.Fragment,null,b?o.createElement("button",{className:(0,i.my)(y),type:"button",onClick:b},x):x,T.showLabel&&o.createElement("div",{style:{textAlign:"center",fontSize:C?.titleSize??T.titleFontSize,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",position:"relative",width:I,top:"-4px",cursor:"default"}},E.title))}}componentDidMount(){this.draw()}componentDidUpdate(){this.draw()}draw(){const{field:v,showThresholdLabels:E,showThresholdMarkers:D,width:b,height:C,theme:y,value:M,orientation:T}=this.props,I=h(b,C,M.title),x=T===u.wV.Vertical?I.gaugeHeight:b,S=Math.min(x,I.gaugeHeight),O=y.colors.background.secondary,P=E?1.5:1,L=Math.min(S/5.5,40)/P,U=L/5,R=(0,s.cN)(M),H=Math.min(x,S*1.3)*.9-((L+(D?U:0)+(E?10:0))*2+10),w=this.props.text?.valueSize??(0,c.Vr)(R,H,S,1,L*1.7),N=Math.max(w/2.5,12);let V=v.min??r.tw,G=v.max??r.d1,_=M.numeric;v.thresholds?.mode===g.O.Percentage&&(V=0,G=100,M.percent===void 0?_=(_-V)/(G-V)*100:_=M.percent*100);const K=v.decimals===void 0?2:v.decimals;D&&(V=+V.toFixed(K),G=+G.toFixed(K));const j={series:{gauges:{gauge:{min:V,max:G,neutralValue:v.custom?.neutral,background:{color:O},border:{color:null},shadow:{show:!1},width:L},frame:{show:!1},label:{show:!1},layout:{margin:0,thresholdWidth:0,vMargin:0},cell:{border:{width:0}},threshold:{values:p(K,v,M,y),label:{show:E,margin:U+1,font:{size:N}},show:D,width:U},value:{color:M.color,formatter:()=>R,font:{size:w,family:y.typography.fontFamily}},show:!0}}},k={data:[[0,_]],label:M.title};try{this.canvasElement&&n().plot(this.canvasElement,[k],j)}catch(Y){console.error("Gauge rendering error",Y,j,M)}}render(){return o.createElement("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",overflow:"hidden"},className:this.props.className},this.renderVisualization())}}m.defaultProps={showThresholdMarkers:!0,showThresholdLabels:!1,field:{min:0,max:100,thresholds:d}}},14578:(Q,A,e)=>{"use strict";e.d(A,{I:()=>c});var t=e(32196),n=e(96540),o=e(8867),s=e(8887),r=e(40845),g=e(78318);const u=i=>({icon:(0,t.css)({display:"inline-block",fill:"currentColor",flexShrink:0,label:"Icon",lineHeight:0,verticalAlign:"middle"}),orange:(0,t.css)({fill:i.v1.palette.orange})}),c=n.forwardRef(({size:i="md",type:l="default",name:f,className:d,style:h,title:p="",...m},a)=>{const v=(0,r.of)(u);(0,s.n6)(f)||console.warn("Icon component passed an invalid icon name",f);const E=f==="fa fa-spinner"?"spinner":f,D=(0,g.Wj)(),b=(0,g.cs)(i),C=b,y=f.startsWith("gf-bar-align")?16:f.startsWith("gf-interp")?30:b,M=(0,g.Xi)(E,l),T=`${D}${M}/${E}.svg`,I=(0,t.cx)(v.icon,d,l==="mono"?{[v.orange]:f==="favorite"}:"",E==="spinner"&&"fa-spin");return n.createElement(o.default,{innerRef:a,src:T,width:y,height:C,title:p,className:I,style:h,...m})});c.displayName="Icon"},78318:(Q,A,e)=>{"use strict";e.d(A,{Wj:()=>r,Xi:()=>n,cs:()=>o});const t=["grafana","favorite","heart-break","heart","panel-add","library-panel","circle-mono"];function n(g,u){return g?.startsWith("gf-")?"custom":t.includes(g)?"mono":u==="default"?"unicons":u==="solid"?"solid":"mono"}function o(g){switch(g){case"xs":return 12;case"sm":return 14;case"md":return 16;case"lg":return 18;case"xl":return 24;case"xxl":return 36;case"xxxl":return 48}}let s;function r(){if(s)return s;const g=typeof window<"u"&&window.__grafana_public_path__;return g?s=g+"img/icons/":s="public/img/icons/",s}},29158:(Q,A,e)=>{"use strict";e.d(A,{K:()=>l});var t=e(32196),n=e(96540),o=e(95344),s=e(23596),r=e(40845),g=e(16797),u=e(14578),c=e(78318),i=e(56034);const l=n.forwardRef((d,h)=>{const{size:p="md",variant:m="secondary"}=d;let a;p==="xxl"||p==="xxxl"?((0,o.l)("IconButton",'size="xxl" and size="xxxl"','size="xl"'),a="xl"):a=p;const v=(0,r.of)(f,a,m);let E,D;if("tooltip"in d){const{tooltip:b}=d;E=typeof b=="string"?b:void 0}else if("ariaLabel"in d||"aria-label"in d){const{ariaLabel:b,["aria-label"]:C}=d;E=C||b,D=h}if("tooltip"in d){const{name:b,iconType:C,className:y,tooltip:M,tooltipPlacement:T,...I}=d;return n.createElement(i.m,{ref:h,content:M,placement:T},n.createElement("button",{...I,ref:D,"aria-label":E,className:(0,t.cx)(v.button,y),type:"button"},n.createElement(u.I,{name:b,size:a,className:v.icon,type:C})))}else{const{name:b,iconType:C,className:y,...M}=d;return n.createElement("button",{...M,ref:D,"aria-label":E,className:(0,t.cx)(v.button,y),type:"button"},n.createElement(u.I,{name:b,size:a,className:v.icon,type:C}))}});l.displayName="IconButton";const f=(d,h,p)=>{const m=(0,c.cs)(h)+d.spacing.gridSize;let a=d.colors.text.primary;return p==="primary"?a=d.colors.primary.text:p==="destructive"&&(a=d.colors.error.text),{button:(0,t.css)({zIndex:0,position:"relative",margin:`0 ${d.spacing.x0_5} 0 0`,boxShadow:"none",border:"none",display:"inline-flex",background:"transparent",justifyContent:"center",alignItems:"center",padding:0,color:a,"&[disabled], &:disabled":{cursor:"not-allowed",color:d.colors.action.disabledText,opacity:.65},"&:before":{zIndex:-1,position:"absolute",opacity:0,width:`${m}px`,height:`${m}px`,borderRadius:d.shape.radius.default,content:'""',transitionDuration:"0.2s",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionProperty:"opacity"},"&:focus, &:focus-visible":(0,g.getFocusStyles)(d),"&:focus:not(:focus-visible)":(0,g.getMouseFocusStyles)(d),"&:hover":{"&:before":{backgroundColor:p==="secondary"?d.colors.action.hover:s.alpha(a,.12),opacity:1}}}),icon:(0,t.css)({verticalAlign:"baseline"})}}},86460:(Q,A,e)=>{"use strict";e.d(A,{e:()=>u,y:()=>i});var t=e(32196),n=e(96540),o=e(41987),s=e(40845),r=e(39938),g=e(37166);const u=n.memo(n.forwardRef(({title:f,featureState:d,...h},p)=>{const m=(0,s.of)(c),a=d?n.createElement(n.Fragment,null,n.createElement("div",{className:m.badge},n.createElement(i,{featureState:d})),n.createElement("h3",null,f)):n.createElement("h3",null,f);return n.createElement(g.w,{branded:!0,title:a,urlTitle:"Read documentation",ref:p,...h})}));u.displayName="FeatureInfoBox";const c=f=>({badge:(0,t.css)({marginBottom:f.spacing(1)})}),i=({featureState:f,tooltip:d})=>{const h=l(f);return n.createElement(r.E,{text:h.text,color:h.color,icon:h.icon,tooltip:d})};function l(f){switch(f){case o.Ay.alpha:return{text:"Alpha",icon:"exclamation-triangle",color:"orange"}}return{text:"Beta",icon:"rocket",color:"blue"}}},37166:(Q,A,e)=>{"use strict";e.d(A,{w:()=>g});var t=e(32196),n=e(96540),o=e(40845),s=e(42418),r=e(14578);const g=n.memo(n.forwardRef(({title:c,className:i,children:l,branded:f,url:d,urlTitle:h,onDismiss:p,severity:m="info",...a},v)=>{const E=(0,o.of)(u);return n.createElement(s.F,{severity:m,className:i,...a,ref:v,title:c},n.createElement("div",null,l),d&&n.createElement("a",{href:d,className:(0,t.cx)("external-link",E.docsLink),target:"_blank",rel:"noreferrer"},n.createElement(r.I,{name:"book"})," ",h||"Read more"))}));g.displayName="InfoBox";const u=c=>({docsLink:(0,t.css)({display:"inline-block",marginTop:c.spacing(2)})})},32982:(Q,A,e)=>{"use strict";e.d(A,{r:()=>i});var t=e(32196),n=e(95361),o=e(18491),s=e(36376),r=e(96540),g=e(40845),u=e(14578),c=e(17464);function i({referenceElement:d,children:h,suffixIcon:p,placement:m}){const a=(0,g.of)(l),v=(0,g.$j)(),E=[(0,n.cY)(8),(0,o.UU)({fallbackAxisSideDirection:"end",crossAxis:!1,boundary:document.body}),(0,o.BN)()],{context:D,refs:b,floatingStyles:C}=(0,s.we)({open:!0,placement:m,middleware:E,whileElementsMounted:o.ll,strategy:"fixed"});(0,r.useLayoutEffect)(()=>{b.setReference(d)},[d,b]);const{styles:y}=(0,s.DL)(D,{initial:({side:M})=>({opacity:0,transform:f(M,v)}),duration:v.transitions.duration.shortest});return r.createElement(c.ZL,null,r.createElement("div",{style:{display:"inline-block",...C},ref:b.setFloating,"aria-live":"polite"},r.createElement("span",{className:(0,t.cx)(a.root),style:y},h&&r.createElement("span",null,h),p&&r.createElement(u.I,{name:p}))))}const l=d=>({root:(0,t.css)({...d.typography.bodySmall,willChange:"transform",background:d.components.tooltip.background,color:d.components.tooltip.text,padding:d.spacing(.5,1.5),borderRadius:d.shape.radius.pill,display:"inline-flex",gap:d.spacing(.5),alignItems:"center"})}),f=(d,h)=>{switch(d){case"top":return`translateY(${h.spacing(1)})`;case"bottom":return`translateY(-${h.spacing(1)})`;case"left":return`translateX(${h.spacing(1)})`;case"right":return`translateX(-${h.spacing(1)})`}}},51440:(Q,A,e)=>{"use strict";e.d(A,{D:()=>s});var t=e(96540),n=e(29413),o=e(10354);const s=t.forwardRef((g,u)=>{const{defaultValue:c="",minWidth:i=10,maxWidth:l,onCommitChange:f,onKeyDown:d,onBlur:h,...p}=g,[m,a]=t.useState(c),[v,E]=t.useState(i);return(0,t.useEffect)(()=>{E(r(m.toString(),i,l))},[m,l,i]),t.createElement(o.p,{...p,ref:u,value:m.toString(),onChange:D=>{a(D.currentTarget.value)},width:v,onBlur:D=>{h?h(D):f&&f(D)},onKeyDown:D=>{d?d(D):D.key==="Enter"&&f&&f(D)},"data-testid":"autosize-input"})});function r(g,u,c){if(!g)return u;const i=3,l=(0,n.kD)(g.toString(),14).width/8+i;return u&&lc?c:l}s.displayName="AutoSizeInput"},10354:(Q,A,e)=>{"use strict";e.d(A,{n:()=>i,p:()=>c});var t=e(32196),n=e(96540),o=e(71473),s=e(40845),r=e(3911),g=e(87266),u=e(62930);const c=n.forwardRef((l,f)=>{const{className:d,addonAfter:h,addonBefore:p,prefix:m,suffix:a,invalid:v,loading:E,width:D=0,...b}=l,[C,y]=(0,o.A)(),[M,T]=(0,o.A)(),I=(0,s.$j)(),x=i({theme:I,invalid:!!v,width:D});return n.createElement("div",{className:(0,t.cx)(x.wrapper,d),"data-testid":"input-wrapper"},!!p&&n.createElement("div",{className:x.addon},p),n.createElement("div",{className:x.inputWrapper},m&&n.createElement("div",{className:x.prefix,ref:C},m),n.createElement("input",{ref:f,className:x.input,...b,style:{paddingLeft:m?y.width+12:void 0,paddingRight:a||E?T.width+12:void 0}}),(a||E)&&n.createElement("div",{className:x.suffix,ref:M},E&&n.createElement(u.y,{className:x.loadingIndicator,inline:!0}),a)),!!h&&n.createElement("div",{className:x.addon},h))});c.displayName="Input";const i=(0,r.N)(({theme:l,invalid:f=!1,width:d})=>{const h="28px",p=(0,t.css)({position:"absolute",top:0,zIndex:1,display:"flex",alignItems:"center",justifyContent:"center",flexGrow:0,flexShrink:0,fontSize:l.typography.size.md,height:"100%",minWidth:h,color:l.colors.text.secondary});return{wrapper:(0,t.cx)((0,t.css)({label:"input-wrapper",display:"flex",width:d?l.spacing(d):"100%",height:l.spacing(l.components.height.md),borderRadius:l.shape.radius.default,"&:hover":{"> .prefix, .suffix, .input":{borderColor:f?l.colors.error.border:l.colors.primary.border},"input[type='number']":{appearance:"textfield"},"input[type='number']::-webkit-inner-spin-button, input[type='number']::-webkit-outer-spin-button":{WebkitAppearance:"inner-spin-button !important",opacity:1}}})),inputWrapper:(0,t.css)({label:"input-inputWrapper",position:"relative",flexGrow:1,zIndex:1,"&:not(:first-child):last-child":{"> input":{borderLeft:"none",borderTopLeftRadius:0,borderBottomLeftRadius:0}},"&:first-child:not(:last-child)":{"> input":{borderRight:"none",borderTopRightRadius:0,borderBottomRightRadius:0}},"&:not(:first-child):not(:last-child)":{"> input":{borderRight:"none",borderTopRightRadius:0,borderBottomRightRadius:0,borderTopLeftRadius:0,borderBottomLeftRadius:0}},input:{"&:not(:first-child)":{paddingLeft:h},"&:not(:last-child)":{paddingRight:h},"&[readonly]":{cursor:"default"}}}),input:(0,t.cx)((0,g.gm)(l),(0,g.Xb)(l,f),(0,t.css)({label:"input-input",position:"relative",zIndex:0,flexGrow:1,borderRadius:l.shape.radius.default,height:"100%",width:"100%"})),inputDisabled:(0,t.css)({backgroundColor:l.colors.action.disabledBackground,color:l.colors.action.disabledText,border:`1px solid ${l.colors.action.disabledBackground}`,"&:focus":{boxShadow:"none"}}),addon:(0,t.css)({label:"input-addon",display:"flex",justifyContent:"center",alignItems:"center",flexGrow:0,flexShrink:0,position:"relative","&:first-child":{borderTopRightRadius:0,borderBottomRightRadius:0,"> :last-child":{borderTopRightRadius:0,borderBottomRightRadius:0}},"&:last-child":{borderTopLeftRadius:0,borderBottomLeftRadius:0,"> :first-child":{borderTopLeftRadius:0,borderBottomLeftRadius:0}},"> *:focus":{zIndex:2}}),prefix:(0,t.cx)(p,(0,t.css)({label:"input-prefix",paddingLeft:l.spacing(1),paddingRight:l.spacing(.5),borderRight:"none",borderTopRightRadius:0,borderBottomRightRadius:0})),suffix:(0,t.cx)(p,(0,t.css)({label:"input-suffix",paddingLeft:l.spacing(1),paddingRight:l.spacing(1),marginBottom:"-2px",borderLeft:"none",borderTopLeftRadius:0,borderBottomLeftRadius:0,right:0})),loadingIndicator:(0,t.css)({"& + *":{marginLeft:l.spacing(.5)}})}})},16504:(Q,A,e)=>{"use strict";e.d(A,{e:()=>n});var t=e(49785);const n=t.xI},28389:(Q,A,e)=>{"use strict";e.d(A,{j:()=>a});var t=e(32196),n=e(2543),o=e(96540),s=e(32885),r=e(39070),g=e(40845),u=e(14578),c=e(19384),i=e(56034),l=e(29158);const f=(0,t.css)({display:"flex",alignItems:"center",height:"100%"});function d({row:b,__rowID:C}){return o.createElement("div",{className:f},o.createElement(l.K,{tooltip:"toggle row expanded","aria-controls":C,name:b.isExpanded?"angle-down":"angle-right","aria-expanded":b.isExpanded,...b.getToggleRowExpandedProps(),size:"lg"}))}const h="__expander";function p(b){return[{id:h,Cell:d,disableSortBy:!0,width:0},...b.map(C=>({id:C.id,accessor:C.id,Header:C.header||(()=>null),sortType:C.sortType||"alphanumeric",disableSortBy:!C.sortType,width:C.disableGrow?0:void 0,visible:C.visible,...C.cell&&{Cell:C.cell}}))]}const m=b=>{const C=b.colors.emphasize(b.colors.background.primary,.03);return{container:(0,t.css)({display:"flex",gap:b.spacing(2),flexDirection:"column",width:"100%",overflowX:"auto"}),table:(0,t.css)({borderRadius:b.shape.radius.default,width:"100%",td:{padding:b.spacing(1)},"td, th":{minWidth:b.spacing(3)}}),disableGrow:(0,t.css)({width:0}),header:(0,t.css)({borderBottom:`1px solid ${b.colors.border.weak}`,"&, & > button":{position:"relative",whiteSpace:"nowrap",padding:b.spacing(1)},"& > button":{"&:after":{content:'"\\00a0"'},width:"100%",height:"100%",background:"none",border:"none",paddingRight:b.spacing(2.5),textAlign:"left",fontWeight:b.typography.fontWeightMedium}}),row:(0,t.css)({label:"row",borderBottom:`1px solid ${b.colors.border.weak}`,"&:hover":{backgroundColor:C},"&:last-child":{borderBottom:0}}),expandedRow:(0,t.css)({label:"expanded-row-content",borderBottom:"none"}),expandedContentRow:(0,t.css)({label:"expanded-row-content",td:{borderBottom:`1px solid ${b.colors.border.weak}`,position:"relative",padding:b.spacing(2,2,2,5),"&:before":{content:'""',position:"absolute",width:"1px",top:0,left:"16px",bottom:b.spacing(2),background:b.colors.border.medium}}}),sortableHeader:(0,t.css)({"&&":{padding:0}})}};function a({className:b,columns:C,data:y,getRowId:M,headerTooltips:T,pageSize:I=0,renderExpandedRow:x,fetchData:S}){const O=(0,g.of)(m),P=(0,o.useMemo)(()=>p(C),[C]),L=v(),U=(0,o.useCallback)(j=>`${L}-${j.id}`.replace(/\s/g,""),[L]),R=[s.useSortBy,s.useExpanded],B=y.length>I,H=I>0&&B;H&&R.push(s.usePagination);const w=(0,s.useTable)({columns:P,data:y,autoResetExpanded:!1,autoResetSortBy:!1,disableMultiSort:!0,manualSortBy:!!S,getRowId:M,initialState:{hiddenColumns:[!x&&h,...P.filter(j=>!(!j.visible||j.visible(y))).map(j=>j.id).filter(r.zz)].filter(r.zz)}},...R),{getTableProps:N,getTableBodyProps:V,headerGroups:G,prepareRow:_}=w,{sortBy:K}=w.state;return(0,o.useEffect)(()=>{S&&S({sortBy:K})},[K,S]),(0,o.useEffect)(()=>{H&&w.setPageSize(I)},[H,I,w.setPageSize,w]),o.createElement("div",{className:O.container},o.createElement("table",{...N(),className:(0,t.cx)(O.table,b)},o.createElement("thead",null,G.map(j=>{const{key:k,...Y}=j.getHeaderGroupProps();return o.createElement("tr",{key:k,...Y},j.headers.map(ee=>{const{key:re,...J}=ee.getHeaderProps(),ne=T?.[ee.id];return o.createElement("th",{key:re,className:(0,t.cx)(O.header,{[O.disableGrow]:ee.width===0,[O.sortableHeader]:ee.canSort}),...J,...ee.isSorted&&{"aria-sort":ee.isSortedDesc?"descending":"ascending"}},o.createElement(D,{column:ee,headerTooltip:ne}))}))})),o.createElement("tbody",{...V()},(H?w.page:w.rows).map(j=>{_(j);const{key:k,...Y}=j.getRowProps(),ee=U(j),re=j.isExpanded;return o.createElement(o.Fragment,{key:k},o.createElement("tr",{...Y,className:(0,t.cx)(O.row,re&&O.expandedRow)},j.cells.map(J=>{const{key:ne,...q}=J.getCellProps();return o.createElement("td",{key:ne,...q},J.render("Cell",{__rowID:ee}))})),re&&x&&o.createElement("tr",{...Y,id:ee,className:O.expandedContentRow},o.createElement("td",{colSpan:j.cells.length},x(j.original))))}))),H&&o.createElement("span",null,o.createElement(c.d,{currentPage:w.state.pageIndex+1,numberOfPages:w.pageOptions.length,onNavigate:j=>w.gotoPage(j-1)})))}const v=()=>(0,o.useMemo)(()=>(0,n.uniqueId)("InteractiveTable"),[]),E=b=>({sortIcon:(0,t.css)({position:"absolute",top:b.spacing(1)}),headerTooltipIcon:(0,t.css)({marginLeft:b.spacing(.5)})});function D({column:{canSort:b,render:C,isSorted:y,isSortedDesc:M,getSortByToggleProps:T},headerTooltip:I}){const x=(0,g.of)(E),{onClick:S}=T(),O=o.createElement(o.Fragment,null,C("Header"),I&&o.createElement(i.m,{theme:"info-alt",content:I.content,placement:"top-end"},o.createElement(u.I,{className:x.headerTooltipIcon,name:I.iconName||"info-circle","data-testid":"header-tooltip-icon"})),y&&o.createElement("span",{"aria-hidden":"true",className:x.sortIcon},o.createElement(u.I,{name:M?"angle-down":"angle-up"})));return b?o.createElement("button",{type:"button",onClick:S},O):O}},24022:(Q,A,e)=>{"use strict";e.d(A,{B:()=>o});var t=e(96540),n=e(44533);class o extends t.PureComponent{constructor(){super(...arguments),this.wrapperRef=(0,t.createRef)(),this.renderJson=()=>{const{json:r,config:g,open:u,onDidRender:c}=this.props,i=this.wrapperRef.current,l=new n.O(r,u,g);i.hasChildNodes()?i.replaceChild(l.render(),i.lastChild):i.appendChild(l.render()),c&&c(l.json)}}componentDidMount(){this.renderJson()}componentDidUpdate(){this.renderJson()}render(){const{className:r}=this.props;return t.createElement("div",{className:r,ref:this.wrapperRef})}}o.defaultProps={open:3,config:{animateOpen:!0}}},44533:(Q,A,e)=>{"use strict";e.d(A,{O:()=>v});var t=e(2543);function n(E){return E.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function o(E){return!!E&&typeof E==="object"}function s(E){if(E===void 0)return"";if(E===null||typeof E=="object"&&!E.constructor)return"Object";const b=/function ([^(]*)/.exec(E.constructor.toString());return b&&b.length>1?b[1]:""}function r(E){return E===null?"null":typeof E}function g(E,D){const b=r(E);return b==="null"||b==="undefined"?b:(b==="string"&&(D='"'+n(D)+'"'),b==="function"?E.toString().replace(/[\r\n]/g,"").replace(/\{.*\}/,"")+"{\u2026}":D)}let u="";function c(E){return o(E)?(u=s(E),Array.isArray(E)&&(u+="["+E.length+"]")):u=g(E,E.toString()),u}function i(E){return`json-formatter-${E}`}function l(E,D,b){const C=document.createElement(E);return D&&C.classList.add(i(D)),b!==void 0&&(b instanceof Node?C.appendChild(b):C.appendChild(document.createTextNode(String(b)))),C}const f=/(^\d{1,4}[\.|\\/|-]\d{1,2}[\.|\\/|-]\d{1,4})(\s*(?:0?[1-9]:[0-5]|1(?=[012])\d:[0-5])\d\s*[ap]m)?$/,d=/\d{2}:\d{2}:\d{2} GMT-\d{4}/,h=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/,p=10,m=typeof window<"u"&&window.requestAnimationFrame||(E=>(E(),0)),a={animateOpen:!0,animateClose:!0};class v{constructor(D,b=1,C=a,y){this.json=D,this.open=b,this.config=C,this.key=y,this._isOpen=null,this.element=null,this.skipChildren=!1}get isOpen(){return this._isOpen!==null?this._isOpen:this.open>0}set isOpen(D){this._isOpen=D}get isDate(){return this.type==="string"&&(f.test(this.json)||h.test(this.json)||d.test(this.json))}get isUrl(){return this.type==="string"&&this.json.indexOf("http")===0}get isArray(){return Array.isArray(this.json)}get isObject(){return o(this.json)}get isEmptyObject(){return!this.keys.length&&!this.isArray}get isEmpty(){return this.isEmptyObject||this.keys&&!this.keys.length&&this.isArray}get hasKey(){return typeof this.key<"u"}get constructorName(){return s(this.json)}get type(){return r(this.json)}get keys(){return this.isObject?Object.keys(this.json).map(D=>D||'""'):[]}toggleOpen(){this.isOpen=!this.isOpen,this.element&&(this.isOpen?this.appendChildren(this.config.animateOpen):this.removeChildren(this.config.animateClose),this.element.classList.toggle(i("open")))}openAtDepth(D=1){D<0||(this.open=D,this.isOpen=D!==0,this.element&&(this.removeChildren(!1),D===0?this.element.classList.remove(i("open")):(this.appendChildren(this.config.animateOpen),this.element.classList.add(i("open")))))}isNumberArray(){return this.json.length>0&&this.json.length<4&&((0,t.isNumber)(this.json[0])||(0,t.isNumber)(this.json[1]))}renderArray(){const D=l("span");return D.appendChild(l("span","bracket","[")),this.isNumberArray()?(this.json.forEach((b,C)=>{C>0&&D.appendChild(l("span","array-comma",",")),D.appendChild(l("span","number",b))}),this.skipChildren=!0):D.appendChild(l("span","number",this.json.length)),D.appendChild(l("span","bracket","]")),D}render(D=!1){this.element=l("div","row");const b=l("a","toggler-link"),C=l("span","toggler");if(this.isObject&&b.appendChild(C),this.hasKey&&b.appendChild(l("span","key",`${this.key}:`)),this.isObject){const M=l("span","value"),T=l("span"),I=l("span","constructor-name",this.constructorName);if(T.appendChild(I),this.isArray){const x=this.renderArray();T.appendChild(x)}M.appendChild(T),b.appendChild(M)}else{const M=this.isUrl?l("a"):l("span");M.classList.add(i(this.type)),this.isDate&&M.classList.add(i("date")),this.isUrl&&(M.classList.add(i("url")),M.setAttribute("href",this.json));const T=g(this.json,this.json);M.appendChild(document.createTextNode(T)),b.appendChild(M)}const y=l("div","children");return this.isObject&&y.classList.add(i("object")),this.isArray&&y.classList.add(i("array")),this.isEmpty&&y.classList.add(i("empty")),this.config&&this.config.theme&&this.element.classList.add(i(this.config.theme)),this.isOpen&&this.element.classList.add(i("open")),D||this.element.appendChild(b),this.skipChildren?b.removeChild(C):this.element.appendChild(y),this.isObject&&this.isOpen&&this.appendChildren(),this.isObject&&b.addEventListener("click",this.toggleOpen.bind(this)),this.element}appendChildren(D=!1){const b=this.element&&this.element.querySelector(`div.${i("children")}`);if(!(!b||this.isEmpty))if(D){let C=0;const y=()=>{const M=this.keys[C],T=new v(this.json[M],this.open-1,this.config,M);b.appendChild(T.render()),C+=1,Cp?y():m(y))};m(y)}else this.keys.forEach(C=>{const y=new v(this.json[C],this.open-1,this.config,C);b.appendChild(y.render())})}removeChildren(D=!1){const b=this.element&&this.element.querySelector(`div.${i("children")}`);if(D){let C=0;const y=()=>{b&&b.children.length&&(b.removeChild(b.children[0]),C+=1,C>p?y():m(y))};m(y)}else b&&(b.innerHTML="")}}},90613:(Q,A,e)=>{"use strict";e.d(A,{a:()=>r});var t=e(32196),n=e(96540),o=e(40845),s=e(16795);const r=(0,n.forwardRef)((i,l)=>{const{children:f,margin:d,marginX:h,marginY:p,marginTop:m,marginBottom:a,marginLeft:v,marginRight:E,padding:D,paddingX:b,paddingY:C,paddingTop:y,paddingBottom:M,paddingLeft:T,paddingRight:I,display:x,backgroundColor:S,grow:O,shrink:P,basis:L,flex:U,borderColor:R,borderStyle:B,borderRadius:H,justifyContent:w,alignItems:N,boxShadow:V,element:G,gap:_,...K}=i,j=(0,o.of)(c,d,h,p,m,a,v,E,D,b,C,y,M,T,I,x,S,O,P,L,U,R,B,H,w,N,V,_),k=G??"div";return n.createElement(k,{ref:l,className:j.root,...K},f)});r.displayName="Box";const g=(i,l)=>{switch(i){case"error":case"success":case"info":case"warning":return l.colors[i].borderTransparent;default:return i?l.colors.border[i]:void 0}},u=(i,l)=>{switch(i){case"error":case"success":case"info":case"warning":return l.colors[i].transparent;default:return i?l.colors.background[i]:void 0}},c=(i,l,f,d,h,p,m,a,v,E,D,b,C,y,M,T,I,x,S,O,P,L,U,R,B,H,w,N)=>({root:(0,t.css)([(0,s.Y)(i,l,V=>({margin:i.spacing(V)})),(0,s.Y)(i,f,V=>({marginLeft:i.spacing(V),marginRight:i.spacing(V)})),(0,s.Y)(i,d,V=>({marginTop:i.spacing(V),marginBottom:i.spacing(V)})),(0,s.Y)(i,h,V=>({marginTop:i.spacing(V)})),(0,s.Y)(i,p,V=>({marginBottom:i.spacing(V)})),(0,s.Y)(i,m,V=>({marginLeft:i.spacing(V)})),(0,s.Y)(i,a,V=>({marginRight:i.spacing(V)})),(0,s.Y)(i,v,V=>({padding:i.spacing(V)})),(0,s.Y)(i,E,V=>({paddingLeft:i.spacing(V),paddingRight:i.spacing(V)})),(0,s.Y)(i,D,V=>({paddingTop:i.spacing(V),paddingBottom:i.spacing(V)})),(0,s.Y)(i,b,V=>({paddingTop:i.spacing(V)})),(0,s.Y)(i,C,V=>({paddingBottom:i.spacing(V)})),(0,s.Y)(i,y,V=>({paddingLeft:i.spacing(V)})),(0,s.Y)(i,M,V=>({paddingRight:i.spacing(V)})),(0,s.Y)(i,T,V=>({display:V})),(0,s.Y)(i,I,V=>({backgroundColor:u(V,i)})),(0,s.Y)(i,x,V=>({flexGrow:V})),(0,s.Y)(i,S,V=>({flexShrink:V})),(0,s.Y)(i,O,V=>({flexBasis:V})),(0,s.Y)(i,P,V=>({flex:V})),(0,s.Y)(i,U,V=>({borderStyle:V})),(0,s.Y)(i,L,V=>({borderColor:g(V,i)})),(U||L)&&{borderWidth:"1px"},(0,s.Y)(i,B,V=>({justifyContent:V})),(0,s.Y)(i,H,V=>({alignItems:V})),(0,s.Y)(i,R,V=>({borderRadius:i.shape.radius[V]})),(0,s.Y)(i,w,V=>({boxShadow:i.shadows[V]})),(0,s.Y)(i,N,V=>({gap:i.spacing(V)}))])})},71259:(Q,A,e)=>{"use strict";e.d(A,{x:()=>r});var t=e(32196),n=e(96540),o=e(40845),s=e(16795);const r=(0,n.forwardRef)((u,c)=>{const{children:i,gap:l,columns:f,minColumnWidth:d,...h}=u,p=(0,o.of)(g,l,f,d);return n.createElement("div",{ref:c,...h,className:p.grid},i)});r.displayName="Grid";const g=(u,c,i,l)=>({grid:(0,t.css)([{display:"grid"},(0,s.Y)(u,c,f=>({gap:u.spacing(f)})),l&&(0,s.Y)(u,l,f=>({gridTemplateColumns:`repeat(auto-fill, minmax(${u.spacing(f)}, 1fr))`})),i&&(0,s.Y)(u,i,f=>({gridTemplateColumns:`repeat(${f}, 1fr)`}))])})},66864:(Q,A,e)=>{"use strict";e.d(A,{Gy:()=>g,PE:()=>r,gW:()=>u,mc:()=>c});var t=e(32196),n=e(96540),o=e(40845),s=(d=>(d[d.Horizontal=0]="Horizontal",d[d.Vertical=1]="Vertical",d))(s||{});const r=({children:d,orientation:h=0,spacing:p="sm",justify:m="flex-start",align:a="normal",wrap:v=!1,width:E="100%",height:D="100%",...b})=>{const C=(0,o.of)(i,h,p,m,a,v);return n.createElement("div",{className:C.layout,style:{width:E,height:D},...b},n.Children.toArray(d).filter(Boolean).map((y,M)=>n.createElement("div",{className:C.childWrapper,key:M},y)))},g=({children:d,spacing:h,justify:p,align:m="center",wrap:a,width:v,height:E})=>n.createElement(r,{spacing:h,justify:p,orientation:0,align:m,width:v,height:E,wrap:a},d),u=({children:d,spacing:h,justify:p,align:m,width:a,height:v})=>n.createElement(r,{spacing:h,justify:p,orientation:1,align:m,width:a,height:v},d),c=({children:d,padding:h,margin:p,grow:m,shrink:a})=>{const v=(0,o.of)(f,h,p);return n.createElement("div",{className:(0,t.cx)(v.wrapper,m!==void 0&&(0,t.css)({flexGrow:m}),a!==void 0&&(0,t.css)({flexShrink:a}))},d)},i=(d,h,p,m,a,v)=>{const E=p!=="none"?d.spacing(l[p]):0,D=h===0&&!v||h===1?0:`-${E}`,b=h===1?"vertical-group":"horizontal-group";return{layout:(0,t.css)({label:b,display:"flex",flexDirection:h===1?"column":"row",flexWrap:v?"wrap":"nowrap",justifyContent:m,alignItems:a,height:"100%",maxWidth:"100%",marginBottom:D}),childWrapper:(0,t.css)({label:"layoutChildrenWrapper",marginBottom:h===0&&!v?0:E,marginRight:h===0?E:0,display:"flex",alignItems:a,"&:last-child":{marginBottom:h===1?0:void 0,marginRight:h===0?0:void 0}})}},l={none:0,xs:.5,sm:1,md:2,lg:3},f=(d,h,p)=>{const m=h&&h!=="none"&&d.spacing(l[h])||0,a=p&&p!=="none"&&d.spacing(l[p])||0;return{wrapper:(0,t.css)({label:"container",margin:a,padding:m})}}},18348:(Q,A,e)=>{"use strict";e.d(A,{N:()=>n});var t=e(96540);const n=(0,t.createContext)({boostZIndex:()=>()=>{}})},68402:(Q,A,e)=>{"use strict";e.d(A,{$:()=>o});var t=e(96540),n=e(90613);const o=({v:s=0,h:r=0,layout:g})=>t.createElement(n.a,{paddingRight:r,paddingBottom:s,display:g==="inline"?"inline-block":"block"})},67061:(Q,A,e)=>{"use strict";e.d(A,{B:()=>r});var t=e(32196),n=e(96540),o=e(40845),s=e(16795);const r=n.forwardRef((u,c)=>{const{gap:i=1,alignItems:l,justifyContent:f,direction:d,wrap:h,children:p,grow:m,shrink:a,basis:v,flex:E,...D}=u,b=(0,o.of)(g,i,l,f,d,h,m,a,v,E);return n.createElement("div",{ref:c,className:b.flex,...D},p)});r.displayName="Stack";const g=(u,c,i,l,f,d,h,p,m,a)=>({flex:(0,t.css)([{display:"flex"},(0,s.Y)(u,f,v=>({flexDirection:v})),(0,s.Y)(u,d,v=>({flexWrap:v})),(0,s.Y)(u,i,v=>({alignItems:v})),(0,s.Y)(u,l,v=>({justifyContent:v})),(0,s.Y)(u,c,v=>({gap:u.spacing(v)})),(0,s.Y)(u,h,v=>({flexGrow:v})),(0,s.Y)(u,p,v=>({flexShrink:v})),(0,s.Y)(u,m,v=>({flexBasis:v})),(0,s.Y)(u,a,v=>({flex:v}))])})},16795:(Q,A,e)=>{"use strict";e.d(A,{Y:()=>n});function t(o,s,r,g){const u=s[g];if(u!=null)return{[o.breakpoints.up(g)]:r(u)}}function n(o,s,r){return s==null?null:typeof s!="object"||!("xs"in s)?r(s):[t(o,s,r,"xs"),t(o,s,r,"sm"),t(o,s,r,"md"),t(o,s,r,"lg"),t(o,s,r,"xl"),t(o,s,r,"xxl")]}},50720:(Q,A,e)=>{"use strict";e.d(A,{N:()=>r});var t=e(96540),n=e(54625),o=e(71733),s=e(40672);const r=(0,t.forwardRef)(({href:g,children:u,...c},i)=>{const l=o.I.stripBaseFromUrl(s.sQ.sanitizeUrl(g??""));return t.createElement(n.Link,{ref:i,to:l,...c},u)});r.displayName="Link"},72109:(Q,A,e)=>{"use strict";e.d(A,{Y:()=>l});var t=e(32196),n=e(96540),o=e(40672),s=e(71733),r=e(40845),g=e(14578),u=e(71356),c=e(50720);const i={h1:"xl",h2:"xl",h3:"lg",h4:"lg",h5:"md",h6:"md",body:"md",bodySmall:"xs"},l=(0,n.forwardRef)(({href:d,color:h="link",external:p=!1,inline:m=!0,variant:a="body",weight:v,icon:E,children:D,...b},C)=>{const y=o.sQ.sanitizeUrl(d??""),M=(0,r.$j)(),T=f(M,m,a,v,h),I=E||"external-link-alt";if(p)return n.createElement("a",{href:y,ref:C,...b,target:"_blank",rel:"noreferrer",className:T},D,n.createElement(g.I,{size:i[a]||"md",name:I}));const x=s.I.stripBaseFromUrl(y);return n.createElement(c.N,{ref:C,href:x,...b,className:T},D,E&&n.createElement(g.I,{name:E,size:i[a]||"md"}))});l.displayName="TextLink";const f=(d,h,p,m,a)=>(0,t.css)([p&&{...d.typography[p]},m&&{fontWeight:(0,u.iV)(m,d)},a&&{color:d.colors.text[a]},{alignItems:"center",gap:"0.25em",display:"inline-flex",textDecoration:"none","&:hover":{textDecoration:"underline",color:d.colors.text.link}},h&&{textDecoration:"underline","&:hover":{textDecoration:"none"}}])},85918:(Q,A,e)=>{"use strict";e.d(A,{p:()=>r});var t=e(32196),n=e(96540),o=e(3911);const s=(0,o.N)((g=!1)=>({list:(0,t.css)({listStyleType:"none",margin:0,padding:0}),item:(0,t.css)({display:g&&"inline-block"||"block"})}));class r extends n.PureComponent{constructor(u){super(u)}render(){const{items:u,renderItem:c,getItemKey:i,className:l,inline:f}=this.props,d=s(f);return n.createElement("ul",{className:(0,t.cx)(d.list,l)},u.map((h,p)=>n.createElement("li",{className:d.item,key:i?i(h):p},c(h,p))))}}},1551:(Q,A,e)=>{"use strict";e.d(A,{c:()=>o});var t=e(96540),n=e(85918);class o extends t.PureComponent{render(){return t.createElement(n.p,{inline:!0,...this.props})}}},33552:(Q,A,e)=>{"use strict";e.d(A,{B:()=>o});var t=e(96540),n=e(85918);class o extends t.PureComponent{render(){return t.createElement(n.p,{...this.props})}}},57514:(Q,A,e)=>{"use strict";e.d(A,{G:()=>l});var t=e(32196),n=e(96540),o=e(40845);const s=28,r=2.4,g=500,u=4e3,c=300,i=100/s*100;function l({width:d,delay:h=c,ariaLabel:p="Loading bar"}){const m=Math.min(Math.max(Math.round(d*r),g),u),a=(0,o.of)(f,h,m),v={overflow:"hidden"};return n.createElement("div",{style:v},n.createElement("div",{"aria-label":p,className:a.bar}))}const f=(d,h,p)=>{const m=(0,t.keyframes)({"0%":{transform:"translateX(-100%)"},"85%, 100%":{transform:`translateX(${i}%)`}});return{bar:(0,t.css)({width:s+"%",height:1,background:"linear-gradient(90deg, rgba(110, 159, 255, 0) 0%, #6E9FFF 80.75%, rgba(110, 159, 255, 0) 100%)",transform:"translateX(-100%)",animationName:m,animationDelay:`${h}ms`,animationDuration:`${p}ms`,animationTimingFunction:"linear",animationIterationCount:"infinite",willChange:"transform"})}}},39558:(Q,A,e)=>{"use strict";e.d(A,{_:()=>r});var t=e(32196),n=e(96540),o=e(40845),s=e(62930);const r=({text:u,className:c,...i})=>{const l=(0,o.of)(g);return n.createElement("div",{className:(0,t.cx)(l.container,c),...i},u," ",n.createElement(s.y,{inline:!0}))},g=u=>({container:(0,t.css)({marginBottom:u.spacing(4)})})},76218:(Q,A,e)=>{"use strict";e.d(A,{O:()=>s});var t=e(96540),n=e(88323),o=e(64278);const s=({value:r,onChange:g,context:u,item:c})=>{const i=c.settings??{},l=(0,o.sE)(u.data,i?.filter),f=(0,o.m3)(l,r,void 0,void 0,i.baseNameMode),d=(0,t.useCallback)(p=>{if(!(p&&!(0,o.v3)(p.value,l)))return g(p?.value)},[l,g]),h=f.find(p=>p.value===r);return t.createElement(t.Fragment,null,t.createElement(n.l6,{value:h,placeholder:i.placeholderText??"Select field",options:f,onChange:d,noOptionsMessage:i.noFieldsMessage,width:i.width,isClearable:i.isClearable!==!1}))}},9988:(Q,A,e)=>{"use strict";e.d(A,{bx:()=>c,cH:()=>f});var t=e(96540),n=e(11261),o=e(1173),s=e(85200),r=e(4025),g=e(88323);const u=(0,t.memo)(d=>{const{data:h,options:p,onChange:m,id:a}=d,v=i(h),E=l(v,p),D=(0,t.useCallback)(C=>m(C.value),[m]),b=E.find(C=>C.value===p);return t.createElement(g.l6,{inputId:a,value:b,options:E,onChange:D})});u.displayName="FieldTypeMatcherEditor";const c=[{value:n.PU.number,label:"Number",icon:(0,r.lV)(n.PU.number)},{value:n.PU.string,label:"String",icon:(0,r.lV)(n.PU.string)},{value:n.PU.time,label:"Time",icon:(0,r.lV)(n.PU.time)},{value:n.PU.boolean,label:"Boolean",icon:(0,r.lV)(n.PU.boolean)},{value:n.PU.trace,label:"Traces",icon:(0,r.lV)(n.PU.trace)},{value:n.PU.enum,label:"Enum",icon:(0,r.lV)(n.PU.enum)},{value:n.PU.other,label:"Other",icon:(0,r.lV)(n.PU.other)}],i=d=>(0,t.useMemo)(()=>{const h=new Map;for(const p of c)h.set(p.value,0);for(const p of d)for(const m of p.fields){const a=m.type||n.PU.other;let v=h.get(a);v||(v=0),h.set(a,v+1)}return h},[d]),l=(d,h)=>(0,t.useMemo)(()=>{let p=!1;const m=[];for(const a of c){const v=d.get(a.value),E=h===a.value;(v||E)&&m.push({...a,label:`${a.label} (${d.get(a.value)})`}),E&&(p=!0)}return h&&!p&&m.push({value:h,label:`${h} (No matches)`}),m},[d,h]),f={id:o.Ct.byType,component:u,matcher:s.sJ.get(o.Ct.byType),name:"Fields with type",description:"Set properties for fields of a specific type (number, string, boolean)",optionsToLabel:d=>d}},19346:(Q,A,e)=>{"use strict";e.d(A,{N:()=>l,r1:()=>p});var t=e(32196),n=e(96540),o=e(75059),s=e(1173),r=e(85200),g=e(52622),u=e(40845),c=e(10354),i=e(88323);const l=[{label:"==",value:g.zT.EQ},{label:"!=",value:g.zT.NEQ},{label:">",value:g.zT.GT},{label:">=",value:g.zT.GTE},{label:"<",value:g.zT.LT},{label:"<=",value:g.zT.LTE}];function f(m){return m===o.gy.allIsNull||m===o.gy.allIsZero}const d=({options:m,onChange:a})=>{const v=(0,u.of)(h),E=(0,n.useMemo)(()=>o.AS.selectOptions([m?.reducer]),[m?.reducer]),D=(0,n.useCallback)(T=>a({...m,reducer:T.value}),[m,a]),b=(0,n.useCallback)(T=>a({...m,op:T.value}),[m,a]),C=(0,n.useCallback)(T=>{const I=T.currentTarget.valueAsNumber;return a({...m,value:I})},[m,a]),y=m??{},M=f(m.reducer);return n.createElement("div",{className:v.spot},n.createElement(i.l6,{value:E.current,options:E.options,onChange:D,placeholder:"Select field reducer"}),y.reducer&&!M&&n.createElement(n.Fragment,null,n.createElement(i.l6,{value:l.find(T=>T.value===y.op),options:l,onChange:b,"aria-label":"Comparison operator",width:19}),n.createElement(c.p,{type:"number",value:y.value,onChange:C})))},h=m=>({spot:(0,t.css)({display:"flex",flexDirection:"row",alignItems:"center",alignContent:"flex-end",gap:"4px"})}),p={id:s.Ct.byValue,component:d,matcher:r.sJ.get(s.Ct.byValue),name:"Fields with values",description:"Set properties for fields with reducer condition",optionsToLabel:m=>`${m?.reducer} ${m?.op} ${m?.value}`}},74668:(Q,A,e)=>{"use strict";e.d(A,{R:()=>l,X:()=>u});var t=e(96540),n=e(28240),o=e(1173),s=e(85200),r=e(88323);const g=(f,d,h)=>{if(!h)return;let p=f.find(m=>!d.some(a=>m===a));if(p)return p};function u({value:f,data:d,onChange:h,placeholder:p}){const m=(0,t.useMemo)(()=>c(d),[d]),[a,v]=(0,t.useState)({refIds:[],value:void 0}),E=(0,t.useMemo)(()=>m.find(b=>b.value===f)??g(m,a.refIds,a.value),[f,m,a]),D=(0,t.useCallback)(b=>{h(b?.value)},[h]);return(m!==a.refIds||E?.value!==a.value)&&v({refIds:m,value:E?.value}),t.createElement(r.l6,{options:m,onChange:D,isClearable:!0,placeholder:p??"Select query refId",value:E})}function c(f){const d=new Map;for(const p of f){const m=p.refId??"",a=d.get(m)??[];a.length===0&&d.set(m,a),a.push(p)}const h=[];for(const[p,m]of d.entries())h.push({value:p,label:`Query: ${p??"(missing refId)"}`,description:i(m)});return h}function i(f){return`Frames (${f.length}):
${f.slice(0,Math.min(3,f.length)).map(d=>(0,n.Ri)(d)).join(", ")} ${f.length>3?"...":""}`}const l={id:o.Ct.byFrameRefID,component:f=>t.createElement(u,{value:f.options,data:f.data,onChange:f.onChange}),matcher:s.sJ.get(o.Ct.byFrameRefID),name:"Fields returned by query",description:"Set properties for fields from a specific query",optionsToLabel:f=>f}},84349:(Q,A,e)=>{"use strict";e.d(A,{g:()=>v});var t=e(83077),n=e(96540),o=e(1173),s=e(85200),r=e(10354);const g=(0,n.memo)(E=>{const{options:D,onChange:b}=E,C=(0,n.useCallback)(y=>b(y.target.value),[b]);return n.createElement(r.p,{placeholder:"Enter regular expression",defaultValue:D,onBlur:C})});g.displayName="FieldNameByRegexMatcherEditor";const u={id:o.Ct.byRegexp,component:g,matcher:s.sJ.get(o.Ct.byRegexp),name:"Fields with name matching regex",description:"Set properties for fields with names matching a regex",optionsToLabel:E=>E};var c=e(88323),i=e(64278);const l=(0,n.memo)(E=>{const{data:D,options:b,onChange:C,id:y}=E,M=(0,i.sE)(D),T=(0,i.m3)(M,b),I=(0,n.useCallback)(S=>{if((0,i.v3)(S.value,M))return C(S.value)},[M,C]),x=T.find(S=>S.value===b);return n.createElement(c.l6,{value:x,options:T,onChange:I,inputId:y})});l.displayName="FieldNameMatcherEditor";const f={id:o.Ct.byName,component:l,matcher:s.sJ.get(o.Ct.byName),name:"Fields with name",description:"Set properties for a specific field",optionsToLabel:E=>E},d=(0,n.memo)(E=>{const{data:D,options:b,onChange:C}=E,{readOnly:y,prefix:M}=b,T=(0,i.sE)(D),I=(0,i.m3)(T,void 0),x=(0,n.useCallback)(S=>{if(Array.isArray(S))return C({...b,names:S.reduce((O,P)=>((0,i.v3)(P.value,T)&&O.push(P.value),O),[])})},[T,C,b]);if(y){const S=(b.names??[]).join(", ");return n.createElement(r.p,{value:S,readOnly:!0,disabled:!0,prefix:M})}return n.createElement(c.KF,{value:b.names,options:I,onChange:x})});d.displayName="FieldNameMatcherEditor";const h={id:o.Ct.byNames,component:d,matcher:s.sJ.get(o.Ct.byNames),name:"Fields with name",description:"Set properties for a specific field",optionsToLabel:E=>(E.names??[]).join(", "),excludeFromPicker:!0};var p=e(9988),m=e(19346),a=e(74668);const v=new t.O(()=>[f,u,p.cH,a.R,h,m.r1])},64278:(Q,A,e)=>{"use strict";e.d(A,{BP:()=>g,m3:()=>c,sE:()=>u,v3:()=>r});var t=e(96540),n=e(28240),o=e(27310),s=e(4025);function r(i,l){return i?l.display.has(i)||l.raw.has(i):!1}function g(i,l){const f={display:new Set,raw:new Set,fields:new Map};for(const d of i)for(const h of d.fields){if(l&&!l(h))continue;const p=(0,n.Ct)(h,d,i);f.display.add(p),f.fields.set(p,h),h.name&&p!==h.name&&(f.raw.add(h.name),f.fields.set(h.name,h))}return f}function u(i,l){return(0,t.useMemo)(()=>g(i,l),[i,l])}function c(i,l,f,d,h){return(0,t.useMemo)(()=>{let p=!1;const m=[];if(f&&m.push(f),h===o.X4.OnlyBaseNames)for(const a of i.raw)!p&&a===l&&(p=!0),m.push({value:a,label:`${a} (base field name)`});else{for(const a of i.display){!p&&a===l&&(p=!0);const v=i.fields.get(a);(!d||d===v?.type)&&m.push({value:a,label:a,icon:v?(0,s.SS)(v):void 0})}if(h!==o.X4.ExcludeBaseNames)for(const a of i.raw)i.display.has(a)||(!p&&a===l&&(p=!0),m.push({value:a,label:`${a} (base field name)`}))}return l&&!p&&m.push({value:l,label:`${l} (not found)`}),m},[i,l,f,d,h])}},38138:(Q,A,e)=>{"use strict";e.d(A,{W:()=>i});var t=e(32196),n=e(96540),o=e(40845),s=e(27183),r=e(59093),g=e(64539),u=e(32653);const c=n.forwardRef(({header:f,children:d,ariaLabel:h,onOpen:p,onClose:m,onKeyDown:a,...v},E)=>{const D=(0,o.of)(l),b=(0,n.useRef)(null);(0,n.useImperativeHandle)(E,()=>b.current);const[C]=(0,u.t)({localRef:b,onOpen:p,onClose:m,onKeyDown:a});return n.createElement("div",{...v,tabIndex:-1,ref:b,className:D.wrapper,role:"menu","aria-label":h,onKeyDown:C},f&&n.createElement("div",{className:(0,t.cx)(D.header,!!d&&n.Children.toArray(d).length>0&&D.headerBorder)},f),d)});c.displayName="Menu";const i=Object.assign(c,{Item:g.D,Divider:s.N,Group:r.r}),l=f=>({header:(0,t.css)({padding:`${f.spacing(.5,1,1,1)}`}),headerBorder:(0,t.css)({borderBottom:`1px solid ${f.colors.border.weak}`}),wrapper:(0,t.css)({background:`${f.colors.background.primary}`,boxShadow:`${f.shadows.z3}`,display:"inline-block",borderRadius:`${f.shape.radius.default}`,padding:`${f.spacing(.5,0)}`})})},27183:(Q,A,e)=>{"use strict";e.d(A,{N:()=>s});var t=e(32196),n=e(96540),o=e(40845);function s(){const g=(0,o.of)(r);return n.createElement("div",{className:g.divider})}const r=g=>({divider:(0,t.css)({height:1,backgroundColor:g.colors.border.weak,margin:g.spacing(.5,0)})})},59093:(Q,A,e)=>{"use strict";e.d(A,{r:()=>g});var t=e(32196),n=e(2543),o=e.n(n),s=e(96540),r=e(40845);const g=({label:c,ariaLabel:i,children:l})=>{const f=(0,r.of)(u),d=`group-label-${(0,n.uniqueId)()}`;return s.createElement("div",{role:"group","aria-labelledby":!i&&c?d:void 0,"aria-label":i},c&&s.createElement("label",{id:d,className:f.groupLabel,"aria-hidden":!0},c),l)};g.displayName="MenuGroup";const u=c=>({groupLabel:(0,t.css)({color:c.colors.text.secondary,fontSize:c.typography.size.sm,padding:c.spacing(.5,1)})})},64539:(Q,A,e)=>{"use strict";e.d(A,{D:()=>d});var t=e(32196),n=e(96540),o=e(40845),s=e(16797),r=e(14578),g=e(67061),u=e(13544),c=e(32653);const i=p=>{if(!p)return!1;const m=p.parentElement.getBoundingClientRect(),a=p.getBoundingClientRect();return a.width!==0&&m.right+a.width+10>window.innerWidth},l=n.memo(({items:p,isOpen:m,openedWithArrow:a,setOpenedWithArrow:v,close:E,customStyle:D})=>{const b=(0,o.of)(f),C=(0,n.useRef)(null),[y]=(0,c.t)({localRef:C,isMenuOpen:m,openedWithArrow:a,setOpenedWithArrow:v,close:E}),[M,T]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{m&&C.current&&T(i(C.current))},[m]),n.createElement(n.Fragment,null,n.createElement("div",{className:b.iconWrapper,"aria-hidden":!0,"data-testid":u.Tp.components.Menu.SubMenu.icon},n.createElement(r.I,{name:"angle-right",className:b.icon})),m&&n.createElement("div",{ref:C,className:(0,t.cx)(b.subMenu,{[b.pushLeft]:M}),"data-testid":u.Tp.components.Menu.SubMenu.container,style:D},n.createElement("div",{tabIndex:-1,className:b.itemsWrapper,role:"menu",onKeyDown:y},p)))});l.displayName="SubMenu";const f=p=>({iconWrapper:(0,t.css)({display:"flex",flex:1,justifyContent:"end"}),icon:(0,t.css)({opacity:.7,marginLeft:p.spacing(1),color:p.colors.text.secondary}),itemsWrapper:(0,t.css)({background:p.colors.background.primary,boxShadow:p.shadows.z3,display:"inline-block",borderRadius:p.shape.radius.default}),pushLeft:(0,t.css)({right:"100%",left:"unset"}),subMenu:(0,t.css)({position:"absolute",top:0,left:"100%",zIndex:p.zIndex.dropdown})}),d=n.memo(n.forwardRef((p,m)=>{const{url:a,icon:v,label:E,description:D,ariaLabel:b,ariaChecked:C,target:y,onClick:M,className:T,active:I,disabled:x,destructive:S,childItems:O,role:P="menuitem",tabIndex:L=-1,customSubMenuContainerStyles:U,shortcut:R,testId:B}=p,H=(0,o.of)(h),[w,N]=(0,n.useState)(I),[V,G]=(0,n.useState)(!1),[_,K]=(0,n.useState)(!1),j=(0,n.useCallback)(()=>{x||(G(!0),N(!0))},[x]),k=(0,n.useCallback)(()=>{x||(G(!1),N(!1))},[x]),Y=O&&O.length>0,ee=Y?"div":a===void 0?"button":"a",re=(0,t.cx)({[H.item]:!0,[H.active]:w,[H.disabled]:x,[H.destructive]:S&&!x},T),J={[ee==="button"?"disabled":"aria-disabled"]:x,...ee==="a"&&x&&{href:void 0,onClick:void 0},...x&&{tabIndex:-1,["data-disabled"]:x}},ne=(0,n.useRef)(null);(0,n.useImperativeHandle)(m,()=>ne.current);const q=ue=>{switch(ue.key){case"ArrowRight":ue.preventDefault(),ue.stopPropagation(),Y&&(G(!0),K(!0),N(!0));break;default:break}},te=()=>{G(!1),N(!1),ne?.current?.focus()},oe=!!(R&&R.length>0);return n.createElement(ee,{target:y,className:re,rel:y==="_blank"?"noopener noreferrer":void 0,href:a,onClick:M,onMouseEnter:j,onMouseLeave:k,onKeyDown:q,role:a===void 0?P:void 0,"data-role":"menuitem",ref:ne,"data-testid":B,"aria-label":b,"aria-checked":C,tabIndex:L,...J},n.createElement(g.B,{direction:"row",justifyContent:"flex-start",alignItems:"center"},v&&n.createElement(r.I,{name:v,className:H.icon,"aria-hidden":!0}),n.createElement("span",{className:H.ellipsis},E),n.createElement("div",{className:(0,t.cx)(H.rightWrapper,{[H.withShortcut]:oe})},oe&&n.createElement("div",{className:H.shortcut},n.createElement(r.I,{name:"keyboard",title:"keyboard shortcut"}),R),Y&&n.createElement(l,{items:O,isOpen:V,openedWithArrow:_,setOpenedWithArrow:K,close:te,customStyle:U}))),D&&n.createElement("div",{className:(0,t.cx)(H.description,H.ellipsis,{[H.descriptionWithIcon]:v!==void 0})},D))}));d.displayName="MenuItem";const h=p=>({item:(0,t.css)({background:"none",cursor:"pointer",whiteSpace:"nowrap",color:p.colors.text.primary,display:"flex",flexDirection:"column",alignItems:"stretch",padding:p.spacing(.5,2),minHeight:p.spacing(4),margin:0,border:"none",width:"100%",position:"relative","&:hover, &:focus, &:focus-visible":{background:p.colors.action.hover,color:p.colors.text.primary,textDecoration:"none"},"&:focus-visible":(0,s.getFocusStyles)(p)}),active:(0,t.css)({background:p.colors.action.hover}),destructive:(0,t.css)({color:p.colors.error.text,svg:{color:p.colors.error.text},"&:hover, &:focus, &:focus-visible":{background:p.colors.error.main,color:p.colors.error.contrastText,svg:{color:p.colors.error.contrastText}}}),disabled:(0,t.css)({color:p.colors.action.disabledText,label:"menu-item-disabled","&:hover, &:focus, &:focus-visible":{cursor:"not-allowed",background:"none",color:p.colors.action.disabledText}}),icon:(0,t.css)({opacity:.7,color:p.colors.text.secondary}),rightWrapper:(0,t.css)({display:"flex",alignItems:"center",marginLeft:"auto"}),withShortcut:(0,t.css)({minWidth:p.spacing(10.5)}),shortcut:(0,t.css)({display:"flex",alignItems:"center",gap:p.spacing(1),marginLeft:p.spacing(2),color:p.colors.text.secondary,opacity:.7}),description:(0,t.css)({...p.typography.bodySmall,color:p.colors.text.secondary,textAlign:"start"}),descriptionWithIcon:(0,t.css)({marginLeft:p.spacing(3)}),ellipsis:(0,t.css)({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"})})},32653:(Q,A,e)=>{"use strict";e.d(A,{t:()=>r});var t=e(96540),n=e(94701);const o=(g,u)=>(g%u+u)%u,s=-1,r=({localRef:g,isMenuOpen:u,openedWithArrow:c,setOpenedWithArrow:i,close:l,onOpen:f,onClose:d,onKeyDown:h})=>{const[p,m]=(0,t.useState)(s);return(0,t.useEffect)(()=>{u&&c&&(m(0),i?.(!1))},[u,c,i]),(0,t.useEffect)(()=>{const v=g?.current?.querySelectorAll('[data-role="menuitem"]:not([data-disabled])');v?.[p]?.focus(),v?.forEach((E,D)=>{E.tabIndex=D===p?0:-1})},[g,p]),(0,n.A)(()=>{f?.(m)}),[v=>{const E=g?.current?.querySelectorAll('[data-role="menuitem"]:not([data-disabled])'),D=E?.length??0;switch(v.key){case"ArrowUp":v.preventDefault(),v.stopPropagation(),m(o(p-1,D));break;case"ArrowDown":v.preventDefault(),v.stopPropagation(),m(o(p+1,D));break;case"ArrowLeft":v.preventDefault(),v.stopPropagation(),m(s),l?.();break;case"Home":v.preventDefault(),v.stopPropagation(),m(0);break;case"End":v.preventDefault(),v.stopPropagation(),m(D-1);break;case"Enter":v.preventDefault(),v.stopPropagation(),E?.[p]?.click();break;case"Escape":d?.();break;case"Tab":v.preventDefault(),d?.();break;default:break}h?.(v)}]}},37390:(Q,A,e)=>{"use strict";e.d(A,{a:()=>d});var t=e(32196),n=e(80279),o=e(7887),s=e(82148),r=e(96540),g=e(40845),u=e(76412),c=e(29158),i=e(66864),l=e(29473),f=e(88448);function d(m){const{title:a,children:v,isOpen:E=!1,closeOnEscape:D=!0,closeOnBackdropClick:b=!0,className:C,contentClassName:y,onDismiss:M,onClickBackdrop:T,trapFocus:I=!0}=m,x=(0,g.of)(f.o),S=(0,r.useRef)(null),{overlayProps:O,underlayProps:P}=(0,s.e)({isKeyboardDismissDisabled:!D,isOpen:E,onClose:M},S),{dialogProps:L,titleProps:U}=(0,n.s)({},S);if(!E)return null;const R=(0,t.cx)(x.modalHeader,typeof a!="string"&&x.modalHeaderWithTabs);return r.createElement(s.Sf,null,r.createElement("div",{role:"presentation",className:x.modalBackdrop,onClick:T||(b?M:void 0),...P}),r.createElement(o.n1,{contain:I,autoFocus:!0,restoreFocus:!0},r.createElement("div",{className:(0,t.cx)(x.modal,C),ref:S,...O,...L},r.createElement("div",{className:R},typeof a=="string"&&r.createElement(p,{...m,title:a,id:U.id}),typeof a!="string"&&a,r.createElement("div",{className:x.modalHeaderClose},r.createElement(c.K,{name:"times",size:"xl",onClick:M,"aria-label":(0,u.t)("grafana-ui.modal.close-tooltip","Close")}))),r.createElement("div",{className:(0,t.cx)(x.modalContent,y)},v))))}function h({leftItems:m,children:a}){const v=(0,g.of)(f.o);return m?r.createElement("div",{className:v.modalButtonRow},r.createElement(i.Gy,{justify:"space-between"},r.createElement(i.Gy,{justify:"flex-start",spacing:"md"},m),r.createElement(i.Gy,{justify:"flex-end",spacing:"md"},a))):r.createElement("div",{className:v.modalButtonRow},r.createElement(i.Gy,{justify:"flex-end",spacing:"md",wrap:!0},a))}d.ButtonRow=h;function p({icon:m,iconTooltip:a,title:v,id:E}){return r.createElement(l.r,{icon:m,iconTooltip:a,title:v,id:E})}},29473:(Q,A,e)=>{"use strict";e.d(A,{r:()=>s});var t=e(96540),n=e(40845),o=e(88448);const s=({icon:r,iconTooltip:g,title:u,children:c,id:i})=>{const l=(0,n.of)(o.o);return t.createElement(t.Fragment,null,t.createElement("h2",{className:l.modalHeaderTitle,id:i},u),c)}},95246:(Q,A,e)=>{"use strict";e.d(A,{O:()=>n});var t=e(96540);const n=({children:o})=>t.createElement("div",{className:"share-modal-body"},t.createElement("div",{className:"share-modal-header"},t.createElement("div",{className:"share-modal-content"},o)))},25897:(Q,A,e)=>{"use strict";e.d(A,{J:()=>r});var t=e(96540),n=e(40675),o=e(63021),s=e(29473);const r=({icon:g,title:u,tabs:c,activeTab:i,onChangeTab:l})=>t.createElement(s.r,{icon:g,title:u},t.createElement(o.U,{hideBorder:!0},c.map((f,d)=>t.createElement(n.o,{key:`${f.value}-${d}`,label:f.label,icon:f.icon,suffix:f.tabSuffix,active:f.value===i,onChangeTab:()=>l(f)}))))},71678:(Q,A,e)=>{"use strict";e.d(A,{$s:()=>r,EO:()=>s,YO:()=>o,wE:()=>n});var t=e(96540);const n=t.createContext({component:null,props:{},showModal:()=>{},hideModal:()=>{}});class o extends t.Component{constructor(u){super(u),this.showModal=(c,i)=>{this.setState({component:c,props:i})},this.hideModal=()=>{this.setState({component:null,props:{}})},this.state={component:u.component||null,props:u.props||{},showModal:this.showModal,hideModal:this.hideModal}}render(){return t.createElement(n.Provider,{value:this.state},this.props.children)}}const s=()=>t.createElement(n.Consumer,null,({component:g,props:u})=>g?t.createElement(g,{...u}):null),r=n.Consumer},88448:(Q,A,e)=>{"use strict";e.d(A,{o:()=>n});var t=e(32196);const n=o=>{const s=o.shape.radius.default;return{modal:(0,t.css)({position:"fixed",zIndex:o.zIndex.modal,background:o.colors.background.primary,boxShadow:o.shadows.z3,borderRadius:s,border:`1px solid ${o.colors.border.weak}`,backgroundClip:"padding-box",outline:"none",width:"750px",maxWidth:"100%",left:0,right:0,marginLeft:"auto",marginRight:"auto",top:"10%",maxHeight:"80%",display:"flex",flexDirection:"column"}),modalBackdrop:(0,t.css)({position:"fixed",zIndex:o.zIndex.modalBackdrop,top:0,right:0,bottom:0,left:0,backgroundColor:o.components.overlay.background,backdropFilter:"blur(1px)"}),modalHeader:(0,t.css)({label:"modalHeader",display:"flex",alignItems:"center",minHeight:"42px",margin:o.spacing(1,2,0,2)}),modalHeaderWithTabs:(0,t.css)({borderBottom:`1px solid ${o.colors.border.weak}`}),modalHeaderTitle:(0,t.css)({fontSize:o.typography.size.lg,margin:o.spacing(0,4,0,1),display:"flex",alignItems:"center",position:"relative",top:"2px"}),modalHeaderIcon:(0,t.css)({marginRight:o.spacing(2),fontSize:"inherit","&:before":{verticalAlign:"baseline"}}),modalHeaderClose:(0,t.css)({height:"100%",display:"flex",alignItems:"center",color:o.colors.text.secondary,flexGrow:1,justifyContent:"flex-end"}),modalContent:(0,t.css)({overflow:"auto",padding:o.spacing(3),width:"100%"}),modalButtonRow:(0,t.css)({paddingTop:o.spacing(3)})}}},32372:(Q,A,e)=>{"use strict";e.d(A,{B:()=>h});var t=e(32196),n=e(96540),o=e(96915),s=e(13544),r=e(40845),g=e(85828),u=e(19716);function c(m){for(let a=m.length-1;a>0;a--){const v=m.charAt(a);if(v==="$")return{index:a,prefix:m.substring(a)};if(v===" "||v===" "||v==='"'||v==="'")return{index:a+1,prefix:m.substring(a+1)}}return{index:0,prefix:m}}function i(m,a,v,E){const D=[];for(const b of v)a&&!b.label.startsWith(a)||D.push({...b,kind:l(m,b.kind),range:E,insertText:b.insertText??b.label});return D}function l(m,a){switch(a){case u.q.Method:return m.languages.CompletionItemKind.Method;case u.q.Field:return m.languages.CompletionItemKind.Field;case u.q.Property:return m.languages.CompletionItemKind.Property;case u.q.Constant:return m.languages.CompletionItemKind.Constant;case u.q.Text:return m.languages.CompletionItemKind.Text}return m.languages.CompletionItemKind.Text}function f(m,a,v,E){if(!(!a||!v))return m.languages.registerCompletionItemProvider(a,{triggerCharacters:["$"],provideCompletionItems:(D,b,C)=>{if(D.id!==E)return;const y={startLineNumber:b.lineNumber,endLineNumber:b.lineNumber,startColumn:b.column,endColumn:b.column};if(C.triggerCharacter==="$")return y.startColumn=b.column-1,{suggestions:i(m,"$",v(),y)};const M=D.getValueInRange({startLineNumber:b.lineNumber,startColumn:1,endLineNumber:b.lineNumber,endColumn:b.column}),{index:T,prefix:I}=c(M);y.startColumn=T+1;const x=i(m,I,v(),y);if(x.length)return{suggestions:x}}})}class d extends n.PureComponent{constructor(a){super(a),this.loadCustomLanguage=()=>{const{language:v}=this.props,E=o.l.getIfExists(v);return E?E.init():Promise.resolve()},this.getEditorValue=()=>"",this.onBlur=()=>{const{onBlur:v}=this.props;v&&v(this.getEditorValue())},this.onFocus=()=>{const{onFocus:v}=this.props;v&&v(this.getEditorValue())},this.onSave=()=>{const{onSave:v}=this.props;v&&v(this.getEditorValue())},this.handleBeforeMount=v=>{this.monaco=v;const{onBeforeEditorMount:E}=this.props;E?.(v)},this.handleOnMount=(v,E)=>{const{getSuggestions:D,language:b,onChange:C,onEditorDidMount:y}=this.props;this.modelId=v.getModel()?.id,this.getEditorValue=()=>v.getValue(),D&&this.modelId&&(this.completionCancel=f(E,b,D,this.modelId)),v.onKeyDown(T=>{T.keyCode===E.KeyCode.KeyS&&(T.ctrlKey||T.metaKey)&&(T.preventDefault(),this.onSave())});const M=this.loadCustomLanguage();C&&v.getModel()?.onDidChangeContent(()=>C(v.getValue())),y&&M.then(()=>y(v,E))}}componentWillUnmount(){this.completionCancel&&this.completionCancel.dispose(),this.props.onEditorWillUnmount?.()}componentDidUpdate(a){const{getSuggestions:v,language:E}=this.props,D=a.language!==E;if(a.getSuggestions!==v||D){if(this.completionCancel&&this.completionCancel.dispose(),!this.monaco){console.warn("Monaco instance not loaded yet");return}v&&this.modelId&&(this.completionCancel=f(this.monaco,E,v,this.modelId))}D&&this.loadCustomLanguage()}render(){const{theme:a,language:v,width:E,height:D,showMiniMap:b,showLineNumbers:C,readOnly:y,monacoOptions:M}=this.props,{alwaysConsumeMouseWheel:T,...I}=M??{},x=this.props.value??"",S=x.length>100,O=this.props.containerStyles??p(a).container,P={wordWrap:"off",tabSize:2,codeLens:!1,contextmenu:!1,minimap:{enabled:S&&b,renderCharacters:!1},readOnly:y,lineNumbersMinChars:4,lineDecorationsWidth:1*a.spacing.gridSize,overviewRulerBorder:!1,automaticLayout:!0,padding:{top:.5*a.spacing.gridSize,bottom:.5*a.spacing.gridSize},fixedOverflowWidgets:!0,scrollbar:{alwaysConsumeMouseWheel:T??!1}};return C||(P.glyphMargin=!1,P.folding=!1,P.lineNumbers="off",P.lineNumbersMinChars=0),n.createElement("div",{className:O,onFocus:this.onFocus,onBlur:this.onBlur,"data-testid":s.Tp.components.CodeEditor.container},n.createElement(g.m,{width:E,height:D,language:v,value:x,options:{...P,...I??{}},beforeMount:this.handleBeforeMount,onMount:this.handleOnMount,keepCurrentModel:!0}))}}const h=(0,r.cV)(d),p=m=>({container:(0,t.css)({borderRadius:m.shape.radius.default,border:`1px solid ${m.components.input.borderColor}`})})},85828:(Q,A,e)=>{"use strict";e.d(A,{m:()=>g});var t=e(96540),n=e(16817);const o=u=>{const c=(0,n.A)(async()=>await u);return{...c,dependency:c.value}};var s=e(52446),r=e(39558);const g=u=>{const{loading:c,error:i,dependency:l}=o(e.e(8926).then(e.bind(e,16556)));if(c)return t.createElement(r._,{text:""});if(i)return t.createElement(s.D,{title:"React Monaco Editor failed to load",error:i,errorInfo:{componentStack:i?.stack||""}});const f=l.ReactMonacoEditor;return t.createElement(f,{...u})}},19716:(Q,A,e)=>{"use strict";e.d(A,{q:()=>t});var t=(n=>(n.Method="method",n.Field="field",n.Property="property",n.Constant="constant",n.Text="text",n))(t||{})},99544:(Q,A,e)=>{"use strict";e.d(A,{O:()=>n});var t=e(19716);function n(o){const s="${"+o.value+"}",r=o.value===o.label?o.origin:`${o.label} / ${o.origin}`;return{label:s,kind:t.q.Property,detail:r,documentation:o.documentation}}},95247:(Q,A,e)=>{"use strict";e.d(A,{d:()=>l});var t=e(32196),n=e(96540),o=e(13544),s=e(40845),r=e(16797),g=e(14578),u=e(29158),c=e(50720),i=e(15068);const l=n.memo(({title:d,section:h,parent:p,pageIcon:m,onGoBack:a,children:v,titleHref:E,parentHref:D,leftItems:b,isFullscreen:C,className:y,"aria-label":M,buttonOverflowAlignment:T="right",forceShowLeftItems:I=!1})=>{const x=(0,s.of)(f),S=(0,t.cx)("page-toolbar",x.toolbar,{["page-toolbar--fullscreen"]:C,[x.noPageIcon]:!m},y),O=n.createElement(n.Fragment,null,n.createElement("span",{className:x.truncateText},d),h&&n.createElement("span",{className:x.pre}," / ",h));return n.createElement("nav",{className:S,"aria-label":M},n.createElement("div",{className:x.leftWrapper},m&&!a&&n.createElement("div",{className:x.pageIcon},n.createElement(g.I,{name:m,size:"lg","aria-hidden":!0})),a&&n.createElement("div",{className:x.pageIcon},n.createElement(u.K,{name:"arrow-left",tooltip:"Go back (Esc)",tooltipPlacement:"bottom",size:"xxl","data-testid":o.Tp.components.BackButton.backArrow,onClick:a})),n.createElement("nav",{"aria-label":"Search links",className:x.navElement},p&&D&&n.createElement(n.Fragment,null,n.createElement(c.N,{"aria-label":`Search dashboard in the ${p} folder`,className:(0,t.cx)(x.titleText,x.parentLink,x.titleLink,x.truncateText),href:D},p," ",n.createElement("span",{className:x.parentIcon})),E&&n.createElement("span",{className:(0,t.cx)(x.titleText,x.titleDivider),"aria-hidden":!0},"/")),(d||!!b?.length)&&n.createElement("div",{className:x.titleWrapper},d&&n.createElement("h1",{className:x.h1Styles},E?n.createElement(c.N,{"aria-label":"Search dashboard by name",className:(0,t.cx)(x.titleText,x.titleLink),href:E},O):n.createElement("div",{className:x.titleText},O)),b?.map((P,L)=>n.createElement("div",{className:(0,t.cx)(x.leftActionItem,{[x.forceShowLeftActionItems]:I}),key:L},P))))),n.createElement(i.U,{alignment:T},n.Children.toArray(v).filter(Boolean)))});l.displayName="PageToolbar";const f=d=>{const{spacing:h,typography:p}=d,m=(0,r.getFocusStyles)(d);return{pre:(0,t.css)({whiteSpace:"pre"}),toolbar:(0,t.css)({alignItems:"center",background:d.colors.background.canvas,display:"flex",gap:d.spacing(2),justifyContent:"space-between",padding:d.spacing(1.5,2),[d.breakpoints.down("md")]:{paddingLeft:"53px"}}),noPageIcon:(0,t.css)({[d.breakpoints.down("md")]:{paddingLeft:d.spacing(2)}}),leftWrapper:(0,t.css)({display:"flex",flexWrap:"nowrap",maxWidth:"70%"}),pageIcon:(0,t.css)({display:"none",[d.breakpoints.up("sm")]:{display:"flex",paddingRight:d.spacing(1),alignItems:"center"}}),truncateText:(0,t.css)({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}),titleWrapper:(0,t.css)({display:"flex",margin:0,minWidth:0}),navElement:(0,t.css)({display:"flex",alignItems:"center",minWidth:0}),h1Styles:(0,t.css)({margin:h(0,1,0,0),lineHeight:"inherit",flexGrow:1,minWidth:0}),parentIcon:(0,t.css)({marginLeft:d.spacing(.5)}),titleText:(0,t.css)({display:"flex",fontSize:p.size.lg,margin:0,borderRadius:d.shape.radius.default}),titleLink:(0,t.css)({"&:focus-visible":m}),titleDivider:(0,t.css)({padding:h(0,.5,0,.5),display:"none",[d.breakpoints.up("md")]:{display:"unset"}}),parentLink:(0,t.css)({display:"none",[d.breakpoints.up("md")]:{display:"unset",flex:1}}),leftActionItem:(0,t.css)({display:"none",alignItems:"center",paddingRight:h(.5),[d.breakpoints.up("md")]:{display:"flex"}}),forceShowLeftActionItems:(0,t.css)({display:"flex"})}}},19384:(Q,A,e)=>{"use strict";e.d(A,{d:()=>g});var t=e(32196),n=e(96540),o=e(40845),s=e(55852),r=e(14578);const g=({currentPage:c,numberOfPages:i,onNavigate:l,hideWhenSinglePage:f,showSmallVersion:d,className:h})=>{const p=(0,o.of)(u),m=d?1:8,a=(0,n.useMemo)(()=>{const v=[...new Array(i).keys()],E=i>m,D=(b,C)=>n.createElement("li",{key:b,className:p.item},n.createElement(s.$n,{size:"sm",variant:C,onClick:()=>l(b)},b));return v.reduce((b,C)=>{const y=C+1,M=y===c?"primary":"secondary",T=m,I=i-m+1,x=I-T,S=y===1||y===i,O=x>-1&&c>=T&&c<=I,P=d?1:3,L=d?0:2;return E?S||c=0&&c>I&&y>I||x<0&&c>=T&&y>I||O&&y>=c-L&&y<=c+L?b.push(D(y,M)):(y===T&&cI||O&&(y===c-P||y===c+P))&&b.push(n.createElement("li",{key:y,className:p.item},n.createElement(r.I,{className:p.ellipsis,name:"ellipsis-v"}))):b.push(D(y,M)),b},[])},[c,i,l,m,d,p.ellipsis,p.item]);return f&&i<=1?null:n.createElement("div",{className:(0,t.cx)(p.container,h)},n.createElement("ol",null,n.createElement("li",{className:p.item},n.createElement(s.$n,{"aria-label":"previous page",size:"sm",variant:"secondary",onClick:()=>l(c-1),disabled:c===1},n.createElement(r.I,{name:"angle-left"}))),a,n.createElement("li",{className:p.item},n.createElement(s.$n,{"aria-label":"next page",size:"sm",variant:"secondary",onClick:()=>l(c+1),disabled:c===i},n.createElement(r.I,{name:"angle-right"})))))},u=()=>({container:(0,t.css)({float:"right"}),item:(0,t.css)({display:"inline-block",paddingLeft:"10px",marginBottom:"5px"}),ellipsis:(0,t.css)({transform:"rotate(90deg)"})})},89963:(Q,A,e)=>{"use strict";e.d(A,{I:()=>u});var t=e(32196),n=e(96540),o=e(13544),s=e(40845),r=e(14578),g=e(56034);const u=({onCancel:i,loading:l})=>{const f=(0,s.of)(c);return l?n.createElement(g.m,{content:"Cancel query"},n.createElement(r.I,{className:(0,t.cx)("spin-clockwise",{[f.clickable]:!!i}),name:"sync",size:"sm",onClick:i,"data-testid":o.Tp.components.LoadingIndicator.icon})):null},c=()=>({clickable:(0,t.css)({cursor:"pointer"})})},79041:(Q,A,e)=>{"use strict";e.d(A,{XF:()=>s,d2:()=>r,e4:()=>o});var t=e(96540),n=e(18226);const o=t.createContext({eventsScope:"global",eventBus:new n.o}),s=o.Provider,r=()=>t.useContext(o)},91052:(Q,A,e)=>{"use strict";e.d(A,{NR:()=>U});var t=e(89963),n=e(32196),o=e(96540),s=e(42941),r=e(49185),g=e(39070),u=e(13544),c=e(40845),i=e(16797);function l({children:R,delay:B}){const[H,w]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{window.setTimeout(()=>{w(!0)},B)},[R,B]),o.createElement(o.Fragment,null,H?R:null)}var f=e(14578),d=e(57514),h=e(56034),p=e(83122),m=e(27746);function a({menu:R,title:B,placement:H="bottom",offset:w,dragClassCancel:N,menuButtonClass:V,onOpenMenu:G}){const _=B?u.Tp.components.Panels.Panel.menu(B):"panel-menu-button",K=(0,o.useCallback)(j=>{j&&G&&G()},[G]);return o.createElement(p.m,{overlay:R,placement:H,offset:w,onVisibleChange:K},o.createElement(m.I,{"aria-label":`Menu for panel with ${B?`title ${B}`:"no title"}`,title:"Menu",icon:"ellipsis-v",iconSize:"md",narrow:!0,"data-testid":_,className:(0,n.cx)(V,N)}))}function v({menu:R,title:B,dragClass:H,children:w,offset:N=-32,onOpenMenu:V}){const G=(0,c.of)(E),_=(0,o.useRef)(null),K=u.Tp.components.Panels.Panel.HoverWidget,j=(0,o.useCallback)(Y=>{_.current?.setPointerCapture(Y.pointerId)},[]),k=(0,o.useCallback)(Y=>{_.current?.releasePointerCapture(Y.pointerId)},[]);return w===void 0||o.Children.count(w)===0?null:o.createElement("div",{className:(0,n.cx)(G.container,"show-on-hover"),style:{top:N},"data-testid":K.container},H&&o.createElement("div",{className:(0,n.cx)(G.square,G.draggable,H),onPointerDown:j,onPointerUp:k,ref:_,"data-testid":K.dragIcon},o.createElement(f.I,{name:"expand-arrows",className:G.draggableIcon})),w,R&&o.createElement(a,{menu:R,title:B,placement:"bottom",menuButtonClass:G.menuButton,onOpenMenu:V}))}function E(R){return{container:(0,n.css)({label:"hover-container-widget",transition:"all .1s linear",display:"flex",position:"absolute",zIndex:1,right:0,boxSizing:"content-box",alignItems:"center",background:R.colors.background.secondary,color:R.colors.text.primary,border:`1px solid ${R.colors.border.weak}`,borderRadius:R.shape.radius.default,height:R.spacing(4),boxShadow:R.shadows.z1}),square:(0,n.css)({display:"flex",justifyContent:"center",alignItems:"center",width:R.spacing(4),height:"100%"}),draggable:(0,n.css)({cursor:"move",[R.breakpoints.down("md")]:{display:"none"}}),menuButton:(0,n.css)({background:"inherit",border:"none","&:hover":{background:R.colors.secondary.main}}),draggableIcon:(0,n.css)({transform:"rotate(45deg)",color:R.colors.text.secondary,"&:hover":{color:R.colors.text.primary}})}}var D=e(55852);const b=(0,o.forwardRef)(({className:R,children:B,href:H,onClick:w,target:N,title:V,...G},_)=>{const K=(0,c.of)(C);return H?o.createElement("a",{ref:_,href:H,onClick:w,target:N,title:V,className:(0,n.cx)(K.linkItem,R),...G},B):w?o.createElement(D.$n,{ref:_,className:(0,n.cx)(K.item,R),variant:"secondary",fill:"text",onClick:w},B):o.createElement("span",{ref:_,className:(0,n.cx)(K.item,R),...G},B)});b.displayName="TitleItem";const C=R=>{const B=(0,n.css)({color:`${R.colors.text.secondary}`,label:"panel-header-item",cursor:"auto",border:"none",borderRadius:`${R.shape.radius.default}`,padding:`${R.spacing(0,1)}`,height:`${R.spacing(R.components.panel.headerHeight)}`,display:"flex",alignItems:"center",justifyContent:"center","&:focus, &:focus-visible":{...(0,i.getFocusStyles)(R),zIndex:1},"&: focus:not(:focus-visible)":(0,i.getMouseFocusStyles)(R),"&:hover ":{boxShadow:`${R.shadows.z1}`,background:`${R.colors.background.secondary}`,color:`${R.colors.text.primary}`}});return{item:B,linkItem:(0,n.cx)(B,(0,n.css)({cursor:"pointer"}))}};function y({description:R,className:B}){const H=(0,c.of)(M),w=()=>{const N=typeof R=="function"?R():R;return o.createElement("div",{className:"panel-info-content markdown-html"},o.createElement("div",{dangerouslySetInnerHTML:{__html:N}}))};return R!==""?o.createElement(h.m,{interactive:!0,content:w},o.createElement(b,{className:(0,n.cx)(B,H.description)},o.createElement(f.I,{name:"info-circle",size:"md"}))):null}const M=R=>({description:(0,n.css)({code:{whiteSpace:"normal",wordWrap:"break-word"},"pre > code":{display:"block"}})});function T({message:R,onClick:B,ariaLabel:H="status"}){const w=(0,c.of)(I);return o.createElement(m.I,{className:w.buttonStyles,onClick:B,variant:"destructive",icon:"exclamation-triangle",iconSize:"md",tooltip:R||"","aria-label":H,"data-testid":u.Tp.components.Panels.Panel.status("error")})}const I=R=>{const{headerHeight:B,padding:H}=R.components.panel;return{buttonStyles:(0,n.css)({label:"panel-header-state-button",display:"flex",alignItems:"center",justifyContent:"center",padding:R.spacing(H),width:R.spacing(B),height:R.spacing(B),borderRadius:R.shape.radius.default})}};function x({width:R,height:B,children:H,padding:w="md",title:N="",description:V="",displayMode:G="default",titleItems:_,menu:K,dragClass:j,dragClassCancel:k,hoverHeader:Y=!1,hoverHeaderOffset:ee,loadingState:re,statusMessage:J,statusMessageOnClick:ne,leftItems:q,actions:te,onCancelQuery:oe,onOpenMenu:ue,collapsible:ie=!1,collapsed:ge,onToggleCollapse:he}){const De=(0,c.$j)(),pe=(0,c.of)(L),le=(0,o.useId)(),Te=!Y,[Ee,Re]=(0,s.A)(!0);ge===void 0&&(ge=!Ee);const me="show-on-hover",Me=G==="transparent",ye=O(De,Te),{contentStyle:Le,innerWidth:We,innerHeight:Be}=P(w,De,ye,ge,B,R),Ye={height:ye,cursor:j?"move":"auto"},at={width:R,height:ge?void 0:B},[st,{width:Ke}]=(0,r.A)();q&&(te=q);const Xe=typeof N=="string"?u.Tp.components.Panels.Panel.title(N):"Panel",He=o.createElement(o.Fragment,null,!ie&&N&&o.createElement("h6",{title:typeof N=="string"?N:void 0,className:pe.title},N),ie&&o.createElement("h6",{className:pe.title},o.createElement("button",{type:"button",className:pe.clearButtonStyles,onClick:()=>{Re(),he&&he(!ge)},"aria-expanded":!ge,"aria-controls":ge?void 0:le},o.createElement(f.I,{name:ge?"angle-right":"angle-down","aria-hidden":!!N,"aria-label":N?void 0:"toggle collapse panel"}),N)),o.createElement("div",{className:(0,n.cx)(pe.titleItems,k),"data-testid":"title-items-container"},o.createElement(y,{description:V,className:k}),_),re===g.Gu.Streaming&&o.createElement(h.m,{content:oe?"Stop streaming":"Streaming"},o.createElement(b,{className:k,"data-testid":"panel-streaming",onClick:oe},o.createElement(f.I,{name:"circle-mono",size:"md",className:pe.streaming}))),re===g.Gu.Loading&&oe&&o.createElement(l,{delay:2e3},o.createElement(h.m,{content:"Cancel query"},o.createElement(b,{className:(0,n.cx)(k,pe.pointer),"data-testid":"panel-cancel-query",onClick:oe},o.createElement(f.I,{name:"sync-slash",size:"md"})))),o.createElement("div",{className:pe.rightAligned},te&&o.createElement("div",{className:pe.rightActions},S(te,Ge=>Ge))));return o.createElement("div",{className:(0,n.cx)(pe.container,{[pe.transparentContainer]:Me}),style:at,"data-testid":Xe,tabIndex:0,ref:st},o.createElement("div",{className:pe.loadingBarContainer},re===g.Gu.Loading?o.createElement(d.G,{width:Ke,ariaLabel:"Panel loading bar"}):null),Y&&o.createElement(o.Fragment,null,o.createElement(v,{menu:K,title:typeof N=="string"?N:void 0,offset:ee,dragClass:j,onOpenMenu:ue},He),J&&o.createElement("div",{className:pe.errorContainerFloating},o.createElement(T,{message:J,onClick:ne,ariaLabel:"Panel status"}))),Te&&o.createElement("div",{className:(0,n.cx)(pe.headerContainer,j),style:Ye,"data-testid":"header-container"},J&&o.createElement("div",{className:k},o.createElement(T,{message:J,onClick:ne,ariaLabel:"Panel status"})),He,K&&o.createElement(a,{menu:K,title:typeof N=="string"?N:void 0,placement:"bottom-end",menuButtonClass:(0,n.cx)(pe.menuItem,k,me),onOpenMenu:ue})),!ge&&o.createElement("div",{id:le,className:(0,n.cx)(pe.content,B===void 0&&pe.containNone),style:Le},typeof H=="function"?H(We,Be):H))}const S=(R,B)=>{const H=o.Children.toArray(R).filter(Boolean);return H.length>0?B(H):null},O=(R,B)=>B?R.spacing.gridSize*R.components.panel.headerHeight:0,P=(R,B,H,w,N,V)=>{const G=(R==="md"?B.components.panel.padding:0)*B.spacing.gridSize,_=G*2,K=1*2;let j=0;V&&(j=V-_-K);let k=0;return N&&(k=N-H-_-K),w&&(k=H),{contentStyle:{padding:G},innerWidth:j,innerHeight:k}},L=R=>{const{background:B,borderColor:H,padding:w}=R.components.panel;return{container:(0,n.css)({label:"panel-container",backgroundColor:B,border:`1px solid ${H}`,position:"relative",borderRadius:R.shape.radius.default,height:"100%",display:"flex",flexDirection:"column","> *":{zIndex:0},"&:hover, &:active, &:focus":{zIndex:R.zIndex.activePanel},".show-on-hover":{opacity:"0",visibility:"hidden"},"&:focus-visible, &:hover":{".show-on-hover":{opacity:"1",visibility:"visible"}},"&:focus-visible":(0,i.getFocusStyles)(R),"&:focus-within:not(:focus)":{".show-on-hover":{visibility:"visible",opacity:"1"}}}),transparentContainer:(0,n.css)({label:"panel-transparent-container",backgroundColor:"transparent",border:"1px solid transparent",boxSizing:"border-box","&:hover":{border:`1px solid ${H}`}}),loadingBarContainer:(0,n.css)({label:"panel-loading-bar-container",position:"absolute",top:0,width:"100%"}),containNone:(0,n.css)({contain:"none"}),content:(0,n.css)({label:"panel-content",flexGrow:1,contain:"size layout"}),headerContainer:(0,n.css)({label:"panel-header",display:"flex",alignItems:"center"}),pointer:(0,n.css)({cursor:"pointer"}),streaming:(0,n.css)({label:"panel-streaming",marginRight:0,color:R.colors.success.text,"&:hover":{color:R.colors.success.text}}),title:(0,n.css)({label:"panel-title",display:"flex",marginBottom:0,padding:R.spacing(0,w),textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontSize:R.typography.h6.fontSize,fontWeight:R.typography.h6.fontWeight}),items:(0,n.css)({display:"flex"}),item:(0,n.css)({display:"flex",justifyContent:"center",alignItems:"center"}),hiddenMenu:(0,n.css)({visibility:"hidden"}),menuItem:(0,n.css)({label:"panel-menu",border:"none",background:R.colors.secondary.main,"&:hover":{background:R.colors.secondary.shade}}),errorContainerFloating:(0,n.css)({label:"error-container",position:"absolute",left:0,top:0,zIndex:1}),rightActions:(0,n.css)({display:"flex",padding:R.spacing(0,w),gap:R.spacing(1)}),rightAligned:(0,n.css)({label:"right-aligned-container",marginLeft:"auto",display:"flex",alignItems:"center"}),titleItems:(0,n.css)({display:"flex",height:"100%"}),clearButtonStyles:(0,n.css)({alignItems:"center",display:"flex",gap:R.spacing(.5),background:"transparent",color:R.colors.text.primary,border:"none",padding:0,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontSize:R.typography.h6.fontSize,fontWeight:R.typography.h6.fontWeight})}},U=x;U.LoadingIndicator=t.I,U.TitleItem=b},88895:(Q,A,e)=>{"use strict";e.d(A,{B:()=>t});var t=(n=>(n.ToggleSelection="select",n.AppendToSelection="append",n))(t||{})},52494:(Q,A,e)=>{"use strict";e.d(A,{_:()=>s});var t=e(32196),n=e(96540),o=e(40845);const s=({children:g,className:u,...c})=>{const i=(0,o.of)(r);return n.createElement("div",{className:(0,t.cx)(i,u),...c},g)},r=g=>(0,t.css)({backgroundColor:g.components.panel.background,border:`1px solid ${g.components.panel.borderColor}`,borderRadius:g.shape.radius.default})},98624:(Q,A,e)=>{"use strict";e.d(A,{B:()=>s});var t=e(96540),n=e(43429),o=e(39938);const s=({status:g,color:u,...c})=>{const i=r(g);return t.createElement(o.E,{text:i.text,color:i.color,icon:i.icon,tooltip:i.tooltip,...c})};s.displayName="PluginSignatureBadge";function r(g){switch(g||(g=n.Ac.invalid),g){case n.Ac.internal:return{text:"Core",color:"blue",tooltip:"Core plugin that is bundled with Grafana"};case n.Ac.valid:return{text:"Signed",icon:"lock",color:"green",tooltip:"Signed and verified plugin"};case n.Ac.invalid:return{text:"Invalid signature",icon:"exclamation-triangle",color:"red",tooltip:"Invalid plugin signature"};case n.Ac.modified:return{text:"Modified signature",icon:"exclamation-triangle",color:"red",tooltip:"Valid signature but content has been modified"};case n.Ac.missing:return{text:"Missing signature",icon:"exclamation-triangle",color:"red",tooltip:"Missing plugin signature"};default:return{text:"Unsigned",icon:"exclamation-triangle",color:"red",tooltip:"Unsigned external plugin"}}}},17464:(Q,A,e)=>{"use strict";e.d(A,{ZL:()=>s,gF:()=>r,qB:()=>g});var t=e(96540),n=e(40961),o=e(40845);function s(c){const{children:i,className:l,root:f,forwardedRef:d}=c,h=(0,o.$j)(),p=(0,t.useRef)(null),m=f??r();return p.current||(p.current=document.createElement("div"),l&&(p.current.className=l),p.current.style.position="relative",p.current.style.zIndex=`${h.zIndex.portal}`),(0,t.useLayoutEffect)(()=>(p.current&&m.appendChild(p.current),()=>{p.current&&m.removeChild(p.current)}),[m]),n.createPortal(t.createElement("div",{ref:d},i),p.current)}function r(){return window.document.getElementById("grafana-portal-container")??document.body}function g(){return t.createElement("div",{id:"grafana-portal-container"})}const u=t.forwardRef((c,i)=>t.createElement(s,{...c,forwardedRef:i}));u.displayName="RefForwardingPortal"},20084:(Q,A,e)=>{"use strict";e.d(A,{X:()=>C});var t=e(32196),n=e(46942),o=e.n(n),s=e(2543),r=e.n(s),g=e(96540),u=e(75226),c=e(29317),i=e(13544),l=e(80903),f=e(4269),d=e(88295),h=e(74738),p=e(31589),m=e(1020),a=e(99453),v=e(40845),E=e(16797),D=e(72307);class b extends g.PureComponent{constructor(T){super(T),this.lastExecutedValue=null,this.mounted=!1,this.editor=null,this.onChange=(P,L)=>{const U=P.document!==this.state.value.document,R=this.state.value;this.props.onRichValueChange&&this.props.onRichValueChange(P),this.setState({value:P},()=>{if(U){const B=u.A.serialize(R)!==u.A.serialize(P);B&&L&&this.runOnChangeAndRunQuery(),B&&!L&&this.runOnChangeDebounced()}})},this.runOnChange=()=>{const{onChange:P}=this.props,L=u.A.serialize(this.state.value);P&&P(this.cleanText(L))},this.runOnRunQuery=()=>{const{onRunQuery:P}=this.props;P&&(P(),this.lastExecutedValue=this.state.value)},this.runOnChangeAndRunQuery=()=>{this.runOnChange(),this.runOnRunQuery()},this.handleBlur=(P,L,U)=>{const{onBlur:R}=this.props;if(R)R();else{const B=this.lastExecutedValue?u.A.serialize(this.lastExecutedValue):"",H=u.A.serialize(L.value);B!==H&&this.runOnChangeAndRunQuery()}return U()},this.runOnChangeDebounced=(0,s.debounce)(this.runOnChange,500);const{onTypeahead:I,cleanText:x,portalOrigin:S,onWillApplySuggestion:O}=T;this.plugins=[(0,l.Pz)({onTypeahead:I,cleanText:x,portalOrigin:S,onWillApplySuggestion:O}),(0,f.U)({handler:this.runOnChangeAndRunQuery}),(0,d.O)(),(0,h.v)(),(0,p.l)(),(0,m.T)(),(0,a.s)(),...T.additionalPlugins||[]].filter(P=>P),this.state={suggestions:[],typeaheadContext:null,typeaheadPrefix:"",typeaheadText:"",value:(0,D.mO)(T.query||"",T.syntax)}}componentDidMount(){this.mounted=!0}componentWillUnmount(){this.mounted=!1}componentDidUpdate(T,I){const{query:x,syntax:S,syntaxLoaded:O}=this.props;if(!T.syntaxLoaded&&O&&this.editor){const L=this.editor.insertText(" ").deleteBackward(1);this.onChange(L.value,!0)}const{value:P}=this.state;x!==T.query&&x!==u.A.serialize(P)&&this.setState({value:(0,D.mO)(x||"",S)})}cleanText(T){return T.replace(/[\r]/g,"")}render(){const{disabled:T,theme:I}=this.props,x=o()("slate-query-field__wrapper",{"slate-query-field__wrapper--disabled":T}),S=y(I);return g.createElement("div",{className:(0,t.cx)(x,S.wrapper)},g.createElement("div",{className:"slate-query-field","data-testid":i.Tp.components.QueryField.container},g.createElement(c.KE,{ref:O=>this.editor=O,schema:D.yx,autoCorrect:!1,readOnly:this.props.disabled,onBlur:this.handleBlur,onClick:this.props.onClick,onChange:O=>{this.onChange(O.value,!1)},placeholder:this.props.placeholder,plugins:this.plugins,spellCheck:!1,value:this.state.value})))}}const C=(0,v.cV)(b);C.defaultProps={onBlur:()=>{}};const y=M=>{const T=(0,E.getFocusStyles)(M);return{wrapper:(0,t.css)({"&:focus-within":T})}}},11134:(Q,A,e)=>{"use strict";e.d(A,{cC:()=>f,cb:()=>i});var t=e(91e3),n=e(96540),o=e(70416),s=e(13544),r=e(76412),g=e(19727),u=e(9261),c=e(27746);const i=["5s","10s","30s","1m","5m","15m","30m","1h","2h","1d"],l=class extends n.PureComponent{constructor(p){super(p),this.onChangeSelect=m=>{const{onIntervalChanged:a}=this.props;a&&m.value!=null&&a(m.value)}}getVariant(){return this.props.isLive?"primary":this.props.isLoading?"destructive":this.props.primary?"primary":this.props.isOnCanvas?"canvas":"default"}render(){const{onRefresh:p,intervals:m,tooltip:a,value:v,text:E,isLoading:D,noIntervalPicker:b,width:C,showAutoInterval:y}=this.props,M=v||"",T=this.getVariant(),I=h({intervals:m,showAutoInterval:y}),x=I.find(({value:N})=>N===M),S=d(l.offOption.value);let O=x||S;O.label===S.label&&(O={value:""});const P=O.ariaLabel,L=(0,r.t)("refresh-picker.aria-label.duration-selected","Choose refresh time interval with current interval {{durationAriaLabel}} selected",{durationAriaLabel:P}),U=(0,r.t)("refresh-picker.aria-label.choose-interval","Auto refresh turned off. Choose refresh time interval"),R=O.value===""?U:L,B=(0,r.t)("refresh-picker.tooltip.interval-selected","Set auto refresh interval"),H=(0,r.t)("refresh-picker.tooltip.turned-off","Auto refresh off"),w=O.value===""?H:B;return n.createElement(g.e,{className:"refresh-picker"},n.createElement(c.I,{"aria-label":E,tooltip:a,onClick:p,variant:T,icon:D?"spinner":"sync",style:C?{width:C}:void 0,"data-testid":s.Tp.components.RefreshPicker.runButtonV2},E),!b&&n.createElement(u.f,{value:O,options:I,onChange:this.onChangeSelect,variant:T,"data-testid":s.Tp.components.RefreshPicker.intervalButtonV2,"aria-label":R,tooltip:w}))}};let f=l;f.offOption={label:"Off",value:"",ariaLabel:"Turn off auto refresh"},f.liveOption={label:"Live",value:"LIVE",ariaLabel:"Turn on live streaming"},f.autoOption={label:"Auto",value:"auto",ariaLabel:"Select refresh from the query range"},f.isLive=p=>p===l.liveOption.value;function d(p){switch(p){case f.liveOption.value:return{label:(0,r.t)("refresh-picker.live-option.label","Live"),value:p,ariaLabel:(0,r.t)("refresh-picker.live-option.aria-label","Turn on live streaming")};case f.offOption.value:return{label:(0,r.t)("refresh-picker.off-option.label","Off"),value:p,ariaLabel:(0,r.t)("refresh-picker.off-option.aria-label","Turn off auto refresh")};case f.autoOption.value:return{label:(0,r.t)("refresh-picker.auto-option.label",f.autoOption.label),value:p,ariaLabel:(0,r.t)("refresh-picker.auto-option.aria-label",f.autoOption.ariaLabel)}}return{label:p,value:p}}function h({intervals:p=i,showAutoInterval:m=!1}={}){const a=p.map(v=>{const E=(0,o.E9)(v),D=(0,t.a)(E);return{label:v,value:v,ariaLabel:D}});return m&&a.unshift(d(f.autoOption.value)),a.unshift(d(f.offOption.value)),a}},44522:(Q,A,e)=>{"use strict";e.d(A,{I:()=>o});var t=e(96540),n=e(40672);function o({component:s,content:r,...g}){return t.createElement(s||"span",{dangerouslySetInnerHTML:{__html:n.sQ.sanitize(r)},...g})}},56286:(Q,A,e)=>{"use strict";e.d(A,{L:()=>c});var t=e(32196),n=e(2543),o=e.n(n),s=e(96540),r=e(55852),g=e(90090);const u=()=>({noRadiusInput:(0,t.css)({borderBottomRightRadius:"0 !important",borderTopRightRadius:"0 !important"}),noRadiusButton:(0,t.css)({borderBottomLeftRadius:"0 !important",borderTopLeftRadius:"0 !important"})}),c=({label:i="Password",labelWidth:l,inputWidth:f=12,onReset:d,isConfigured:h,tooltip:p,placeholder:m="Password",interactive:a,...v})=>{const E=u();return s.createElement(g.z,{label:i,tooltip:p,interactive:a,labelWidth:l,inputEl:h?s.createElement(s.Fragment,null,s.createElement("input",{type:"text",className:(0,t.cx)(`gf-form-input width-${f}`,E.noRadiusInput),disabled:!0,value:"configured",...(0,n.omit)(v,"value")}),s.createElement(r.$n,{onClick:d,variant:"secondary",type:"button"},"Reset")):s.createElement("input",{type:"password",className:`gf-form-input width-${f}`,placeholder:m,...v})})};c.displayName="SecretFormField"},9226:(Q,A,e)=>{"use strict";e.d(A,{L4:()=>u});var t=e(96540),n=e(55852),o=e(10354),s=e(67061);const r="configured",g="Reset",u=({isConfigured:c,onReset:i,...l})=>t.createElement(s.B,null,!c&&t.createElement(o.p,{...l,type:"password"}),c&&t.createElement(t.Fragment,null,t.createElement(o.p,{...l,type:"text",disabled:!0,value:r}),t.createElement(n.$n,{onClick:i,variant:"secondary"},g)))},49718:(Q,A,e)=>{"use strict";e.d(A,{L:()=>t.L4});var t=e(9226)},58724:(Q,A,e)=>{"use strict";e.d(A,{lp:()=>l});var t=e(32196),n=e(96540),o=e(40845),s=e(55852),r=e(66864),g=e(21744);const u="configured",c="Reset",i=f=>({configuredStyle:(0,t.css)({minHeight:f.spacing(f.components.height.md),paddingTop:f.spacing(.5),resize:"none"})}),l=({isConfigured:f,onReset:d,...h})=>{const p=(0,o.of)(i);return n.createElement(r.Gy,null,!f&&n.createElement(g.f,{...h}),f&&n.createElement(g.f,{...h,rows:1,disabled:!0,value:u,className:(0,t.cx)(p.configuredStyle)}),f&&n.createElement(s.$n,{onClick:d,variant:"secondary"},c))}},7968:(Q,A,e)=>{"use strict";e.d(A,{l:()=>t.lp});var t=e(58724)},38401:(Q,A,e)=>{"use strict";e.d(A,{Y:()=>l});var t=e(32196),n=e(2543),o=e.n(n),s=e(96540),r=e(40845),g=e(76892),u=e(13102),c=e(86997),i=e(2336);function l({options:f,value:d,onChange:h,Component:p,className:m,allowCustomValue:a,allowEmptyValue:v,placeholder:E,disabled:D,inputMinWidth:b,inputPlaceholder:C,onExpandedChange:y,autofocus:M=!1,...T}){const[I,x,S,O]=(0,i.Q)(M,y),P=b?Math.max(b,x):x,L=(0,r.of)(c.m);if(!S){const U=(0,n.isObject)(d)?d.label:d,R=U!=null?String(U):void 0;return s.createElement(I,{disabled:D,Component:p||s.createElement(g.c,{className:(0,t.cx)(L.segment,{[L.queryPlaceholder]:E!==void 0&&!d,[L.disabled]:D},m)},R||E)})}return s.createElement(u.a,{...T,value:d&&!(0,n.isObject)(d)?{value:d}:d,placeholder:C,options:f,width:P,onClickOutside:()=>O(!1),allowCustomValue:a,allowEmptyValue:v,onChange:U=>{O(!1),h(U)}})}},83684:(Q,A,e)=>{"use strict";e.d(A,{s:()=>d});var t=e(32196),n=e(2543),o=e.n(n),s=e(96540),r=e(41053),g=e(40845),u=e(76412),c=e(76892),i=e(13102),l=e(86997),f=e(2336);function d({value:p,onChange:m,loadOptions:a,reloadOptionsOnChange:v=!1,Component:E,className:D,allowCustomValue:b,allowEmptyValue:C,disabled:y,placeholder:M,inputMinWidth:T,inputPlaceholder:I,autofocus:x=!1,onExpandedChange:S,noOptionMessageHandler:O=h,...P}){const[L,U]=(0,r.A)(a,[a]),[R,B,H,w]=(0,f.Q)(x,S),N=T?Math.max(T,B):B,V=(0,g.of)(l.m);if(!H){const G=(0,n.isObject)(p)?p.label:p,_=G!=null?String(G):void 0;return s.createElement(R,{onClick:v?void 0:U,disabled:y,Component:E||s.createElement(c.c,{className:(0,t.cx)(V.segment,{[V.queryPlaceholder]:M!==void 0&&!p,[V.disabled]:y},D)},_||M)})}return s.createElement(i.a,{...P,value:p&&!(0,n.isObject)(p)?{value:p}:p,placeholder:I,options:L.value??[],loadOptions:v?U:void 0,width:N,noOptionsMessage:O(L),allowCustomValue:b,allowEmptyValue:C,onClickOutside:()=>{w(!1)},onChange:G=>{w(!1),m(G)}})}function h(p){return p.loading?(0,u.t)("grafana-ui.segment-async.loading","Loading options..."):p.error?(0,u.t)("grafana-ui.segment-async.error","Failed to load options"):(0,u.t)("grafana-ui.segment-async.no-options","No options found")}},57752:(Q,A,e)=>{"use strict";e.d(A,{o:()=>l});var t=e(32196),n=e(96540),o=e(37151),s=e(40845),r=e(29413),g=e(76892),u=e(86997),c=e(2336);const i=14;function l({value:f,onChange:d,Component:h,className:p,placeholder:m,inputPlaceholder:a,disabled:v,autofocus:E=!1,onExpandedChange:D,...b}){const C=(0,n.useRef)(null),[y,M]=(0,n.useState)(f),[T,I]=(0,n.useState)((0,r.kD)((f||"").toString(),i).width),[x,,S,O]=(0,c.Q)(E,D),P=(0,s.of)(u.m);if((0,o.A)(C,()=>{O(!1),d(y)}),!S)return n.createElement(x,{disabled:v,Component:h||n.createElement(g.c,{className:(0,t.cx)(P.segment,{[P.queryPlaceholder]:m!==void 0&&!y,[P.disabled]:v},p)},f||m)});const L=(0,t.css)({width:`${Math.max(T+20,32)}px`});return n.createElement("input",{...b,ref:C,autoFocus:!0,className:(0,t.cx)("gf-form gf-form-input",L),value:y,placeholder:a,onChange:U=>{const{width:R}=(0,r.kD)(U.target.value,i);I(R),M(U.target.value)},onBlur:()=>{O(!1),d(y)},onKeyDown:U=>{[13,27].includes(U.keyCode)&&(O(!1),d(y))}})}},64765:(Q,A,e)=>{"use strict";e.d(A,{L:()=>g});var t=e(32196),n=e(96540),o=e(40845),s=e(39268),r=e(76892);const g=({label:c,htmlFor:i,children:l,fill:f})=>{const d=(0,o.of)(u);return n.createElement(n.Fragment,null,n.createElement(s.C,null,n.createElement(r.c,{htmlFor:i,width:12,className:d.label},c),l,f&&n.createElement("div",{className:d.fill},n.createElement(r.c,null,""))))},u=c=>({label:(0,t.css)({color:c.colors.primary.text}),fill:(0,t.css)({flexGrow:1,marginBottom:c.spacing(.5)})})},13102:(Q,A,e)=>{"use strict";e.d(A,{a:()=>s});var t=e(96540),n=e(40845),o=e(88323);function s({value:r,placeholder:g="",options:u=[],onChange:c,onClickOutside:i,loadOptions:l=void 0,width:f,noOptionsMessage:d="",allowCustomValue:h=!1,allowEmptyValue:p=!1,...m}){const a=(0,t.useRef)(null),v=(0,n.$j)();let E=f>0?f/v.spacing.gridSize:void 0,D,b={};return l?(D=o.DW,b={loadOptions:l,defaultOptions:!0}):D=o.l6,t.createElement("div",{...m,ref:a},t.createElement(D,{width:E,noOptionsMessage:d,placeholder:g,autoFocus:!0,isOpen:!0,onChange:c,options:u,value:r,closeMenuOnSelect:!1,onCloseMenu:()=>{if(a&&a.current){const C=a.current.querySelector('input[id^="react-select-"]');C&&(C.value||p)?c({value:C.value,label:C.value}):i()}},allowCustomValue:h,...b}))}},86997:(Q,A,e)=>{"use strict";e.d(A,{m:()=>n});var t=e(32196);const n=o=>{const s="v1"in o?o.v1.palette:o.palette;return{segment:(0,t.css)({cursor:"pointer",width:"auto"}),queryPlaceholder:(0,t.css)({color:s.gray2}),disabled:(0,t.css)({cursor:"not-allowed",opacity:.65,boxShadow:"none"})}}},2336:(Q,A,e)=>{"use strict";e.d(A,{Q:()=>s});var t=e(96540),n=e(40845),o=e(55852);const s=(r,g)=>{const u=(0,t.useRef)(null),c=(0,n.of)(o.my),[i,l]=(0,t.useState)(r),[f,d]=(0,t.useState)(0),h=m=>{l(m),g&&g(m)};return[({Component:m,onClick:a,disabled:v})=>t.createElement("button",{type:"button",className:c,ref:u,disabled:v,onClick:()=>{h(!0),u&&u.current&&d(u.current.clientWidth*1.25),a?.()}},m),f,i,h]}},5342:(Q,A,e)=>{"use strict";e.d(A,{O:()=>r,p:()=>g});var t=e(96540),n=e(40845),o=e(29158),s=e(88824);const r=({innerProps:u,children:c})=>{const i=(0,n.$j)(),l=(0,s.J)(i);return t.createElement("div",{...u,className:l.multiValueContainer},c)},g=({children:u,innerProps:c})=>{const i=(0,n.$j)(),l=(0,s.J)(i);return t.createElement(o.K,{...c,name:"times",size:"sm",className:l.multiValueRemove,tooltip:"Remove"})}},88323:(Q,A,e)=>{"use strict";e.d(A,{Iv:()=>K,DW:()=>V,gZ:()=>_,KF:()=>N,l6:()=>w,KA:()=>D.K,ip:()=>G});var t=e(96540),n=e(72635),o=e(46005),s=e(8539),r=e(93943),g=e(66963),u=e(50877),c=e(40845),i=e(14578),l=e(62930);function f({selectProps:j}){const k=j.menuIsOpen,Y=k?"search":"angle-down",ee=k?"sm":"md";return t.createElement(i.I,{name:Y,size:ee})}var d=e(32196),h=e(10354);const p=t.forwardRef((j,k)=>{const{children:Y}=j,ee=(0,c.$j)(),re=(0,h.n)({theme:ee,invalid:!1});return t.createElement("div",{className:(0,d.cx)(re.suffix,(0,d.css)({position:"relative"})),ref:k},Y)});p.displayName="IndicatorsContainer";var m=e(87266);const a=t.forwardRef(function({focused:k,invalid:Y,disabled:ee,children:re,innerProps:J,prefix:ne,...q},te){const oe=(0,c.of)(v,Y,!!ne);return t.createElement("div",{className:oe.input,...J,ref:te},ne&&t.createElement("div",{className:(0,d.cx)(oe.prefix)},ne),re)}),v=(j,k,Y)=>{const ee=(0,h.n)({theme:j,invalid:k});return{input:(0,d.cx)((0,m.g$)(j),(0,d.css)({width:"100%",maxWidth:"100%",display:"flex",flexDirection:"row",alignItems:"center",flexWrap:"wrap",justifyContent:"space-between",paddingRight:0,position:"relative",boxSizing:"border-box"}),Y&&(0,d.css)({paddingLeft:0})),prefix:(0,d.cx)(ee.prefix,(0,d.css)({position:"relative"}))}};var E=e(5342),D=e(4603),b=e(12681),C=e(80970),y=e(62235),M=e(88824);class T extends t.Component{render(){const{children:k}=this.props,{selectProps:Y}=this.props;if(Y&&Array.isArray(k)&&Array.isArray(k[0])&&Y.maxVisibleValues!==void 0&&!(Y.showAllSelectedWhenOpen&&Y.menuIsOpen)){const[ee,...re]=k,J=ee.slice(0,Y.maxVisibleValues);return this.renderContainer([J,...re])}return this.renderContainer(k)}renderContainer(k){const{isMulti:Y,theme:ee,selectProps:re}=this.props,J=this.props.selectProps?.noMultiValueWrap&&!this.props.selectProps?.menuIsOpen,ne=(0,M.J)(ee),q=re["data-testid"],te=(0,d.cx)(ne.valueContainer,Y&&ne.valueContainerMulti,J&&ne.valueContainerMultiNoWrap);return t.createElement("div",{"data-testid":q,className:te},k)}}const I=(0,c.cV)(T);var x=e(23731);const S=(j,k)=>{if(Array.isArray(j)){const Y=j.filter(Boolean);return Y?.length?Y:void 0}if(typeof j=="object")return[j];if(typeof j=="string"||typeof j=="number"){const Y=O(j,k);if(Y)return[Y]}},O=(j,k)=>{for(const Y of k)if("options"in Y){let ee=O(j,Y.options);if(ee)return ee}else if("value"in Y&&Y.value===j)return Y;return null},P=j=>j.map(({description:k,...Y})=>Y),L=j=>{const{children:k,innerProps:Y,selectProps:{menuIsOpen:ee,onMenuClose:re,onMenuOpen:J},isFocused:ne,isMulti:q,getValue:te,innerRef:oe}=j,ue=j.selectProps;return ue.renderControl?t.createElement(ue.renderControl,{isOpen:ee,value:q?te():te()[0],ref:oe,onClick:ee?re:J,onBlur:re,disabled:!!ue.disabled,invalid:!!ue.invalid}):t.createElement(a,{ref:oe,innerProps:Y,prefix:ue.prefix,focused:ne,invalid:!!ue.invalid,disabled:!!ue.disabled},k)};function U({allowCustomValue:j=!1,allowCreateWhileLoading:k=!1,"aria-label":Y,"data-testid":ee,autoFocus:re=!1,backspaceRemovesValue:J=!0,blurInputOnSelect:ne,cacheOptions:q,className:te,closeMenuOnSelect:oe=!0,components:ue,createOptionPosition:ie="last",defaultOptions:ge,defaultValue:he,disabled:De=!1,filterOption:pe,formatCreateLabel:le,getOptionLabel:Te,getOptionValue:Ee,inputValue:Re,invalid:me,isClearable:Me=!1,id:ye,isLoading:Le=!1,isMulti:We=!1,inputId:Be,isOpen:Ye,isOptionDisabled:at,isSearchable:st=!0,loadOptions:Ke,loadingMessage:Xe="Loading options...",maxMenuHeight:He=300,minMenuHeight:Ge,maxVisibleValues:xe,menuPlacement:$e="auto",menuPosition:be,menuShouldPortal:Z=!0,noOptionsMessage:ae=(0,n.t)("grafana-ui.select.no-options-label","No options found"),onBlur:de,onChange:ve,onCloseMenu:Ue,onCreateOption:_e,onInputChange:ze,onKeyDown:Ve,onMenuScrollToBottom:Ne,onMenuScrollToTop:ot,onOpenMenu:nt,onFocus:pt,openMenuOnFocus:mt=!1,options:gt=[],placeholder:Pt=(0,n.t)("grafana-ui.select.placeholder","Choose"),prefix:Mt,renderControl:Yt,showAllSelectedWhenOpen:zt=!0,tabSelectsValue:_t=!0,value:rt,virtualized:It=!1,noMultiValueWrap:Dn,width:ft,isValidNewOption:yt,formatOptionLabel:jt,hideSelectedOptions:cn,...pn}){const on=(0,c.$j)(),Xt=(0,M.J)(on),fn=(0,t.useRef)(null),[An,hn]=(0,t.useState)(!1),ca=(0,x.z)(on,ft),[Rt,qt]=(0,t.useState)(!!Re);(0,t.useEffect)(()=>{if(Ke&&Ye&&fn.current&&fn.current.controlRef&&$e==="auto"){const Ln=window.innerHeight-fn.current.controlRef.getBoundingClientRect().bottom;hn(Ln{if(We&&Ln==null)return ve([],na);ve(Ln,na)},[We,ve]);let Cn=o.Ay;const mn={};let Sn={},Tn;if(We&&Ke)Tn=rt;else if(We&&rt&&Array.isArray(rt)&&!Ke)Tn=rt.map(Ln=>{const na=O(Ln.value??Ln,gt);return!j||na?na:typeof Ln=="string"?(0,u.z)(Ln):Ln});else if(Ke){const Ln=he||rt;Tn=Ln?[Ln]:[]}else Tn=S(rt,gt);const $n={"aria-label":Y,"data-testid":ee,autoFocus:re,backspaceRemovesValue:J,blurInputOnSelect:ne,captureMenuScroll:Ne||ot,closeMenuOnSelect:oe,defaultValue:he,disabled:De,filterOption:Rt?pe:null,getOptionLabel:Te,getOptionValue:Ee,hideSelectedOptions:cn,inputValue:Re,invalid:me,isClearable:Me,id:ye,isDisabled:De,isLoading:Le,isMulti:We,inputId:Be,isOptionDisabled:at,isSearchable:st,maxMenuHeight:He,minMenuHeight:Ge,maxVisibleValues:xe,menuIsOpen:Ye,menuPlacement:$e==="auto"&&An?"top":$e,menuPosition:be,menuShouldBlockScroll:!0,menuPortalTarget:Z&&typeof document<"u"?document.body:void 0,menuShouldScrollIntoView:!1,onBlur:de,onChange:gn,onInputChange:(Ln,na)=>{qt(!!Ln),ze?.(Ln,na)},onKeyDown:Ve,onMenuClose:Ue,onMenuOpen:nt,onMenuScrollToBottom:Ne,onMenuScrollToTop:ot,onFocus:pt,formatOptionLabel:jt,openMenuOnFocus:mt,options:It?P(gt):gt,placeholder:Pt,prefix:Mt,renderControl:Yt,showAllSelectedWhenOpen:zt,tabSelectsValue:_t,value:We?Tn:Tn?.[0],noMultiValueWrap:Dn};j&&(Cn=g.A,mn.allowCreateWhileLoading=k,mn.formatCreateLabel=le??R,mn.onCreateOption=_e,mn.createOptionPosition=ie,mn.isValidNewOption=yt),Ke&&(Cn=j?r.A:s.A,Sn={loadOptions:Ke,cacheOptions:q,defaultOptions:ge});const Mn=It?b.zd:b.eB;return t.createElement(t.Fragment,null,t.createElement(Cn,{ref:fn,components:{MenuList:Mn,Group:C.n,ValueContainer:I,IndicatorsContainer:B,IndicatorSeparator:H,Control:L,Option:b.o5,ClearIndicator(Ln){const{clearValue:na}=Ln;return t.createElement(i.I,{name:"times",role:"button","aria-label":"select-clear-value",className:Xt.singleValueRemove,onMouseDown:pa=>{pa.preventDefault(),pa.stopPropagation(),na()}})},LoadingIndicator(){return t.createElement(l.y,{inline:!0})},LoadingMessage(){return t.createElement("div",{className:Xt.loadingMessage},Xe)},NoOptionsMessage(){return t.createElement("div",{className:Xt.loadingMessage,"aria-label":"No options provided"},ae)},DropdownIndicator:f,SingleValue(Ln){return t.createElement(y.K,{...Ln,isDisabled:De})},SelectContainer:D.K,MultiValueContainer:E.O,MultiValueRemove:De?()=>null:E.p,...ue},styles:ca,className:te,...$n,...mn,...Sn,...pn}))}function R(j){return t.createElement("div",{style:{display:"flex",gap:"8px",alignItems:"center"}},t.createElement("div",null,j),t.createElement("div",{style:{flexGrow:1}}),t.createElement("div",{className:"muted small",style:{display:"flex",gap:"8px",alignItems:"center"}},"Hit enter to add"))}function B(j){const{showAllSelectedWhenOpen:k,maxVisibleValues:Y,menuIsOpen:ee}=j.selectProps,re=j.getValue();if(Y!==void 0&&Array.isArray(j.children)){const J=re.length;if(J>Y&&!(k&&ee)){const ne=[...j.children];return ne.splice(-1,0,t.createElement("span",{key:"excess-values",id:"excess-values"},"(+",J-Y,")")),t.createElement(p,{...j},ne)}}return t.createElement(p,{...j})}function H(){return t.createElement(t.Fragment,null)}function w(j){return t.createElement(U,{...j})}function N(j){return t.createElement(U,{...j,isMulti:!0})}function V(j){return t.createElement(U,{...j})}function G(j){return t.createElement(U,{virtualized:!0,...j})}function _(j){return t.createElement(U,{virtualized:!0,...j})}function K(j){return t.createElement(U,{...j,isMulti:!0})}},4603:(Q,A,e)=>{"use strict";e.d(A,{K:()=>c});var t=e(32196),n=e(96540),o=e(28581),s=e(40845),r=e(16797),g=e(87266),u=e(10354);const c=l=>{const{isDisabled:f,isFocused:d,children:h,selectProps:{invalid:p=!1}}=l,m=(0,s.of)(i,d,f,p);return n.createElement(o.c.SelectContainer,{...l,className:(0,t.cx)(m.wrapper,l.className)},h)},i=(l,f,d,h)=>{const p=(0,u.n)({theme:l,invalid:h});return{wrapper:(0,t.cx)(p.wrapper,(0,g.Xb)(l,h),f&&(0,t.css)((0,r.getFocusStyles)(l)),d&&p.inputDisabled,(0,t.css)({position:"relative",boxSizing:"border-box",flexDirection:"row",flexWrap:"wrap",alignItems:"stretch",justifyContent:"space-between",minHeight:"32px",height:"auto",maxWidth:"100%",padding:0,cursor:d?"not-allowed":"pointer"}))}}},12681:(Q,A,e)=>{"use strict";e.d(A,{eB:()=>f,o5:()=>m,zd:()=>p});var t=e(32196),n=e(2543),o=e.n(n),s=e(96540),r=e(91793),g=e(8887),u=e(40845),c=e(40276),i=e(14578),l=e(88824);const f=({children:a,maxHeight:v,innerRef:E,innerProps:D})=>{const b=(0,u.$j)(),C=(0,l.J)(b);return s.createElement("div",{...D,className:C.menu,style:{maxHeight:v},"aria-label":"Select options menu"},s.createElement(c.E,{scrollRefCallback:E,autoHide:!1,autoHeightMax:"inherit",hideHorizontalTrack:!0},a))};f.displayName="SelectMenu";const d=37,h=7,p=({children:a,maxHeight:v,options:E,getValue:D})=>{const b=(0,u.$j)(),C=(0,l.J)(b),[y]=D(),T=(y?E.findIndex(O=>O.value===y.value):0)*d;if(!Array.isArray(a))return null;const x=((0,n.max)(E.map(O=>O.label?.length))??0)*h,S=Math.min(E.length*d,v);return s.createElement(r.Y1,{className:C.menu,height:S,width:x,"aria-label":"Select options menu",itemCount:a.length,itemSize:d,initialScrollOffset:T},({index:O,style:P})=>s.createElement("div",{style:{...P,overflow:"hidden"}},a[O]))};p.displayName="VirtualizedSelectMenu";const m=({children:a,data:v,innerProps:E,innerRef:D,isFocused:b,isSelected:C,renderOptionLabel:y})=>{const M=(0,u.$j)(),T=(0,l.J)(M),I=v.icon?(0,g.Uo)(v.icon):void 0,{onMouseMove:x,onMouseOver:S,...O}=E;return s.createElement("div",{ref:D,className:(0,t.cx)(T.option,b&&T.optionFocused,C&&T.optionSelected,v.isDisabled&&T.optionDisabled),...O,"aria-label":"Select option",title:v.title},I&&s.createElement(i.I,{name:I,className:T.optionIcon}),v.imgUrl&&s.createElement("img",{className:T.optionImage,src:v.imgUrl,alt:v.label||String(v.value)}),s.createElement("div",{className:T.optionBody},s.createElement("span",null,y?y(v):a),v.description&&s.createElement("div",{className:T.optionDescription},v.description),v.component&&s.createElement(v.component,null)))};m.displayName="SelectMenuOptions"},80970:(Q,A,e)=>{"use strict";e.d(A,{n:()=>c});var t=e(32196),n=e(96540),o=e(3911),s=e(40845),r=e(14578);const g=(0,o.N)(i=>({header:(0,t.css)({display:"flex",alignItems:"center",justifyContent:"flex-start",justifyItems:"center",cursor:"pointer",padding:"7px 10px",width:"100%",borderBottom:`1px solid ${i.colors.background.secondary}`,"&:hover":{color:i.colors.text.maxContrast}}),label:(0,t.css)({flexGrow:1}),icon:(0,t.css)({paddingRight:"2px"})}));class u extends n.PureComponent{constructor(){super(...arguments),this.state={expanded:!1},this.onToggleChildren=()=>{this.setState(l=>({expanded:!l.expanded}))}}componentDidMount(){if(this.props.data.expanded)this.setState({expanded:!0});else if(this.props.selectProps&&this.props.selectProps.value){const{value:l}=this.props.selectProps.value;l&&this.props.options.some(f=>f.value===l)&&this.setState({expanded:!0})}}componentDidUpdate(l){l.selectProps.inputValue!==""&&this.setState({expanded:!0})}render(){const{children:l,label:f,theme:d}=this.props,{expanded:h}=this.state,p=g(d);return n.createElement("div",null,n.createElement("div",{className:p.header,onClick:this.onToggleChildren,role:"presentation"},n.createElement("span",{className:p.label},f),n.createElement(r.I,{className:p.icon,name:h?"angle-up":"angle-down"})),h&&l)}}const c=(0,s.cV)(u)},62235:(Q,A,e)=>{"use strict";e.d(A,{K:()=>d});var t=e(32196),n=e(96540),o=e(28581),s=e(8887),r=e(40845);function g(p,m={}){const{duration:a=250,delay:v=250}=m,[E,D]=(0,n.useState)(p),b=(0,n.useRef)();return(0,n.useEffect)(()=>{let C;if(p)C=setTimeout(()=>{b.current=new Date,D(p)},v);else{const y=b.current?Date.now()-b.current.valueOf():0,M=()=>{b.current=void 0,D(p)};y>=a?M():C=setTimeout(M,a-y)}return()=>{C&&(clearTimeout(C),C=void 0)}},[p,a,v]),E}var u=e(14578),c=e(62930),i=e(31511),l=e(72960);const f=p=>({singleValue:(0,t.css)({label:"singleValue",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",boxSizing:"border-box",maxWidth:"100%",gridArea:"1 / 1 / 2 / 3"}),spinnerWrapper:(0,t.css)({width:"16px",height:"16px",display:"inline-block",marginRight:"10px",position:"relative",verticalAlign:"middle",overflow:"hidden"}),spinnerIcon:(0,t.css)({width:"100%",height:"100%",position:"absolute"}),optionIcon:(0,t.css)({marginRight:p.spacing(1),color:p.colors.text.secondary}),disabled:(0,t.css)({color:p.colors.text.disabled}),isOpen:(0,t.css)({color:p.colors.text.disabled})}),d=p=>{const{children:m,data:a,isDisabled:v}=p,E=(0,r.of)(f),D=g(a.loading||!1,{delay:250,duration:750}),b=a.icon?(0,s.Uo)(a.icon):void 0;return n.createElement(o.c.SingleValue,{...p,className:(0,t.cx)(E.singleValue,v&&E.disabled,p.selectProps.menuIsOpen&&E.isOpen)},a.imgUrl?n.createElement(h,{loading:D,imgUrl:a.imgUrl,styles:E,alt:String(a.label??a.value)}):n.createElement(n.Fragment,null,n.createElement(l.n,{horizontal:!0,size:16,visible:D,duration:150},n.createElement("div",{className:E.spinnerWrapper},n.createElement(c.y,{className:E.spinnerIcon,inline:!0}))),b&&n.createElement(u.I,{name:b,role:"img",className:E.optionIcon})),!a.hideText&&m)},h=p=>n.createElement("div",{className:p.styles.spinnerWrapper},n.createElement(i.A,{duration:150,visible:p.loading},n.createElement(c.y,{className:p.styles.spinnerIcon,inline:!0})),n.createElement(i.A,{duration:150,visible:!p.loading},n.createElement("img",{className:p.styles.spinnerIcon,src:p.imgUrl,alt:p.alt})))},88824:(Q,A,e)=>{"use strict";e.d(A,{J:()=>o});var t=e(32196),n=e(3911);const o=(0,n.N)(s=>({menu:(0,t.css)({label:"grafana-select-menu",background:s.components.dropdown.background,boxShadow:s.shadows.z3,position:"relative",minWidth:"100%",zIndex:1}),option:(0,t.css)({label:"grafana-select-option",padding:"8px",display:"flex",alignItems:"center",flexDirection:"row",flexShrink:0,whiteSpace:"nowrap",cursor:"pointer",borderLeft:"2px solid transparent","&:hover":{background:s.colors.action.hover,"@media (forced-colors: active), (prefers-contrast: more)":{border:`1px solid ${s.colors.primary.border}`}}}),optionIcon:(0,t.css)({marginRight:s.spacing(1)}),optionImage:(0,t.css)({label:"grafana-select-option-image",width:"16px",marginRight:"10px"}),optionDescription:(0,t.css)({label:"grafana-select-option-description",fontWeight:"normal",fontSize:s.typography.size.sm,color:s.colors.text.secondary,whiteSpace:"normal",lineHeight:s.typography.body.lineHeight}),optionBody:(0,t.css)({label:"grafana-select-option-body",display:"flex",fontWeight:s.typography.fontWeightMedium,flexDirection:"column",flexGrow:1}),optionFocused:(0,t.css)({label:"grafana-select-option-focused",background:s.colors.action.focus,"@media (forced-colors: active), (prefers-contrast: more)":{border:`1px solid ${s.colors.primary.border}`}}),optionSelected:(0,t.css)({background:s.colors.action.selected}),optionDisabled:(0,t.css)({label:"grafana-select-option-disabled",backgroundColor:s.colors.action.disabledBackground,color:s.colors.action.disabledText,cursor:"not-allowed"}),singleValue:(0,t.css)({label:"grafana-select-single-value",color:s.components.input.text,gridArea:"1 / 1 / 2 / 3",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",boxSizing:"border-box",maxWidth:"100%"}),valueContainer:(0,t.css)({label:"grafana-select-value-container",alignItems:"center",display:"grid",position:"relative",boxSizing:"border-box",flex:"1 1 0%",outline:"none",overflow:"hidden"}),valueContainerMulti:(0,t.css)({label:"grafana-select-value-container-multi",flexWrap:"wrap",display:"flex"}),valueContainerMultiNoWrap:(0,t.css)({flexWrap:"nowrap"}),loadingMessage:(0,t.css)({label:"grafana-select-loading-message",padding:s.spacing(1),textAlign:"center",width:"100%"}),multiValueContainer:(0,t.css)({label:"grafana-select-multi-value-container",display:"flex",alignItems:"center",lineHeight:1,background:s.colors.background.secondary,borderRadius:s.shape.radius.default,margin:s.spacing(.25,1,.25,0),padding:s.spacing(.25,0,.25,1),color:s.colors.text.primary,fontSize:s.typography.size.sm,overflow:"hidden",whiteSpace:"nowrap","&:hover":{background:s.colors.emphasize(s.colors.background.secondary)}}),multiValueRemove:(0,t.css)({label:"grafana-select-multi-value-remove",margin:s.spacing(0,.5),cursor:"pointer",svg:{marginBottom:0}}),singleValueRemove:(0,t.css)({cursor:"pointer","&:hover":{color:s.colors.text.primary}})}))},23731:(Q,A,e)=>{"use strict";e.d(A,{A:()=>n,z:()=>o});var t=e(96540);function n(s){return{clearIndicator:()=>({}),container:()=>({}),control:()=>({}),dropdownIndicator:()=>({}),group:()=>({}),groupHeading:()=>({}),indicatorsContainer:()=>({}),indicatorSeparator:()=>({}),input:function(r){return{...r,color:"inherit",margin:0,padding:0,zIndex:1}},loadingIndicator:()=>({}),loadingMessage:()=>({}),menu:()=>({}),menuList:({maxHeight:r})=>({maxHeight:r}),multiValue:()=>({}),multiValueLabel:()=>({overflow:"hidden",textOverflow:"ellipsis"}),multiValueRemove:()=>({}),noOptionsMessage:()=>({}),option:()=>({}),placeholder:r=>({...r,color:s.colors.text.secondary}),singleValue:()=>({}),valueContainer:()=>({})}}function o(s,r){return(0,t.useMemo)(()=>({...n(s),menuPortal:g=>({...g,zIndex:s.zIndex.portal}),menu:({top:g,bottom:u,position:c})=>({top:g,bottom:u,position:c,minWidth:"100%",zIndex:s.zIndex.dropdown}),container:()=>({width:r?s.spacing(r):"100%",display:r==="auto"?"inline-flex":"flex"}),option:(g,u)=>({...g,opacity:u.isDisabled?.5:1})}),[s,r])}},62883:()=>{},67570:(Q,A,e)=>{"use strict";e.d(A,{u:()=>h});var t=e(2543),n=e.n(t),o=e(96540),s=e(13752),r=e(62467),g=e(11150),u=e(96083),c=e(63720),i=e(59099),l=e(54479),f=e(11134);function d(p){return{label:p,value:stringToMs(p)}}class h extends o.PureComponent{constructor(m){super(m),this.propsSubject=new s.B,this.subscription=null}componentDidMount(){this.subscription=this.propsSubject.pipe((0,c.n)(m=>f.cC.isLive(m.interval)?(0,r.of)({}):m.loading?g.t:(0,u.Y)((0,l.dc)(m.interval))),(0,i.M)(()=>this.props.func())).subscribe(),this.propsSubject.next(this.props)}componentDidUpdate(m){f.cC.isLive(m.interval)&&f.cC.isLive(this.props.interval)||(0,t.isEqual)(m,this.props)||this.propsSubject.next(this.props)}componentWillUnmount(){this.subscription&&this.subscription.unsubscribe(),this.propsSubject.unsubscribe()}render(){return null}}},63250:(Q,A,e)=>{"use strict";e.d(A,{I1:()=>v,_$:()=>h,gl:()=>f});var t=e(2543),n=e.n(t),o=e(75059),s=e(47070),r=e(50082),g=e(62398),u=e(24293),c=e(90708),i=e(47737);const l=["reduceOptions","orientation"];function f(E,D,b){let C=E.options;if(E.fieldConfig=E.fieldConfig||{defaults:{},overrides:[]},D==="singlestat"&&b.angular)return d(E,b);for(const y of l)b.hasOwnProperty(y)&&(C[y]=(0,t.cloneDeep)(b[y]));return C}function d(E,D){const b=D.angular,C=o.AS.getIfExists(b.valueName),y={reduceOptions:{calcs:[C?C.id:o.gy.mean]},orientation:s.wV.Horizontal},M={};if(b.format&&(M.unit=b.format),b.tableColumn&&(y.reduceOptions.fields=`/^${b.tableColumn}$/`),b.nullPointMode&&(M.nullValueMode=b.nullPointMode),b.nullText&&(M.noValue=b.nullText),(b.decimals||b.decimals===0)&&(M.decimals=b.decimals),b.thresholds&&b.colors){const I=b.thresholds.split(",").map(S=>Number(S.trim())),x=[];for(const S of b.colors){const O=x.length-1;O>=0?x.push({value:I[O],color:S}):x.push({value:-1/0,color:S})}M.thresholds={mode:r.O.Absolute,steps:x}}const T=(0,g.bh)(b,M.thresholds);return T&&T.length&&(M.mappings=T),b.gauge&&b.gauge.show&&(M.min=b.gauge.minValue,M.max=b.gauge.maxValue),E.fieldConfig.defaults=M,y}function h(E){if(!E.options)return{};const D=parseFloat(E.pluginVersion||"6.1");let b=E.options;D<6.2&&(b=m(b)),D<6.3&&(b=p(b));const{fieldOptions:C}=b;if(D<6.6&&C){if(C&&C.override){const{override:T,...I}=b.fieldOptions;b={...b,fieldOptions:{...I,overrides:[]}}}let y=C?.defaults?.thresholds;y?delete C.defaults.thresholds:(y=C?.thresholds,delete C.thresholds),y&&(C.defaults.thresholds={mode:r.O.Absolute,steps:y});const{defaults:M}=C;M.color&&typeof M.color=="string"&&(M.color={mode:u.Y.Fixed,fixedColor:M.color}),(0,c.BF)(M)}if(D<7&&(E.fieldConfig=E.fieldConfig||{defaults:{},overrides:[]},E.fieldConfig={defaults:C&&C.defaults?{...E.fieldConfig.defaults,...C.defaults}:E.fieldConfig.defaults,overrides:C&&C.overrides?[...E.fieldConfig.overrides,...C.overrides]:E.fieldConfig.overrides},C&&(b.reduceOptions={values:C.values,limit:C.limit,calcs:C.calcs}),delete b.fieldOptions),D<7.1){const y=E.fieldConfig.defaults.title;y!=null&&(E.fieldConfig.defaults.displayName=y,delete E.fieldConfig.defaults.title)}if(D<8){const y=E.fieldConfig?.defaults;let M=y?.unit;M==="percent"?((0,t.isNumber)(y.min)||(y.min=0),(0,t.isNumber)(y.max)||(y.max=100)):M==="percentunit"&&((0,t.isNumber)(y.min)||(y.min=0),(0,t.isNumber)(y.max)||(y.max=1))}return b}function p(E){const{fieldOptions:D}=E;if(!D)return E;const{mappings:b,...C}=E.fieldOptions;let y;return E.thresholds&&(y={mode:r.O.Absolute,steps:a(E.thresholds)}),{...E,fieldOptions:{...C,defaults:{...D.defaults,mappings:b,thresholds:y}}}}function m(E){const{valueOptions:D}=E;if(!D)return E;const b={},C={};if(b.mappings=E.valueMappings,b.thresholds=E.thresholds,b.defaults=C,C.unit=D.unit,C.decimals=D.decimals,D.stat){const M=o.AS.get(D.stat);M&&(b.calcs=[M.id])}C.min=E.minValue,C.max=E.maxValue;const y={...E,fieldOptions:b};return(0,t.omit)(y,"valueMappings","thresholds","valueOptions","minValue","maxValue")}function a(E){if(!E||!E.length)return;const D=E.map(b=>({value:b.value===null?-1/0:b.value,color:b.color}));return(0,i.RU)(D),D[0].value=-1/0,D}function v(E){return(0,g.bh)(E)}},37713:(Q,A,e)=>{"use strict";e.d(A,{I1:()=>t.I1,_$:()=>t._$,gl:()=>t.gl});var t=e(63250)},47097:(Q,A,e)=>{"use strict";e.d(A,{F:()=>f});var t=e(32196),n=e(94659),o=e(9821),s=e(96540),r=e(40845),g=e(80427);const u=d=>{const{value:h,children:p,visible:m,placement:a,tipFormatter:v,...E}=d,D=(0,s.useRef)(null),b=(0,s.useRef)(null),C=(0,r.of)(c);function y(){b.current!==null&&cancelAnimationFrame(b.current)}function M(){b.current=requestAnimationFrame(()=>{D.current?.forceAlign()})}return(0,s.useEffect)(()=>(m?M():y(),y),[h,m]),s.createElement(g.A,{overlayClassName:C.tooltip,placement:a,overlay:v??h,overlayInnerStyle:{minHeight:"auto"},ref:D,visible:m,...E},p)},c=d=>({tooltip:(0,t.css)({position:"absolute",display:"block",visibility:"visible",fontSize:d.typography.bodySmall.fontSize,opacity:.9,padding:3,zIndex:d.zIndex.tooltip})}),i=u;var l=e(24849);const f=({min:d,max:h,onChange:p,onAfterChange:m,orientation:a="horizontal",reverse:v,step:E,formatTooltipResult:D,value:b,tooltipAlwaysVisible:C=!0})=>{const y=(0,s.useCallback)(S=>{p?.(typeof S=="number"?[S,S]:S)},[p]),M=(0,s.useCallback)(S=>{m?.(typeof S=="number"?[S,S]:S)},[m]),T=a==="horizontal",I=(0,r.of)(l.$,T),x=(S,O)=>s.createElement(i,{value:O.value,visible:C||O.dragging,tipFormatter:D?()=>D(O.value):void 0,placement:T?"top":"right"},S);return s.createElement("div",{className:(0,t.cx)(I.container,I.slider)},s.createElement(n.Global,{styles:I.tooltip}),s.createElement(o.A,{min:d,max:h,step:E,defaultValue:b,range:!0,onChange:y,onChangeComplete:M,vertical:!T,reverse:v,handleRender:x}))};f.displayName="RangeSlider"},77014:(Q,A,e)=>{"use strict";e.d(A,{A:()=>c});var t=e(32196),n=e(94659),o=e(9821),s=e(96540),r=e(40845),g=e(10354),u=e(24849);const c=({min:i,max:l,onChange:f,onAfterChange:d,orientation:h="horizontal",reverse:p,step:m,value:a,ariaLabelForHandle:v,marks:E,included:D})=>{const b=h==="horizontal",C=(0,r.of)(u.$,b,!!E),y=o.A,[M,T]=(0,s.useState)(a??i),I=(0,s.useCallback)(U=>{const R=typeof U=="number"?U:U[0];T(R),f?.(R)},[T,f]),x=(0,s.useCallback)(U=>{let R=+U.target.value;Number.isNaN(R)&&(R=0),T(R),f&&f(R),d&&d(R)},[f,d]),S=(0,s.useCallback)(U=>{const R=+U.target.value;R>l?T(l):R{const R=typeof U=="number"?U:U[0];d?.(R)},[d]),P=b?[]:[C.sliderInputVertical],L=b?[]:[C.sliderInputFieldVertical];return s.createElement("div",{className:(0,t.cx)(C.container,C.slider)},s.createElement(n.Global,{styles:C.tooltip}),s.createElement("div",{className:(0,t.cx)(C.sliderInput,...P)},s.createElement(y,{min:i,max:l,step:m,defaultValue:a,value:M,onChange:I,onChangeComplete:O,vertical:!b,reverse:p,ariaLabelForHandle:v,marks:E,included:D}),s.createElement(g.p,{type:"text",className:(0,t.cx)(C.sliderInputField,...L),value:M,onChange:x,onBlur:S,min:i,max:l})))};c.displayName="Slider"},24849:(Q,A,e)=>{"use strict";e.d(A,{$:()=>o});var t=e(32196),n=e(94659);const o=(s,r,g=!1)=>{const{spacing:u}=s,c=s.colors.border.strong,i=s.colors.primary.main,l=s.colors.primary.main,d=`box-shadow: 0px 0px 0px 6px ${s.colors.primary.transparent}`;return{container:(0,t.css)({width:"100%",margin:r?"inherit":u(1,3,1,1),paddingBottom:r&&g?s.spacing(1):"inherit",height:r?"auto":"100%"}),slider:(0,t.css)`
.rc-slider {
display: flex;
flex-grow: 1;
margin-left: 7px; // half the size of the handle to align handle to the left on 0 value
}
.rc-slider-mark {
top: ${s.spacing(1.75)};
}
.rc-slider-mark-text {
color: ${s.colors.text.disabled};
font-size: ${s.typography.bodySmall.fontSize};
}
.rc-slider-mark-text-active {
color: ${s.colors.text.primary};
}
.rc-slider-handle {
border: none;
background-color: ${l};
box-shadow: ${s.shadows.z1};
cursor: pointer;
opacity: 1;
}
.rc-slider-handle:hover,
.rc-slider-handle:active,
.rc-slider-handle-click-focused:focus {
${d};
}
// The triple class names is needed because that's the specificity used in the source css :(
.rc-slider-handle-dragging.rc-slider-handle-dragging.rc-slider-handle-dragging,
.rc-slider-handle:focus-visible {
box-shadow: 0 0 0 5px ${s.colors.text.primary};
}
.rc-slider-dot,
.rc-slider-dot-active {
background-color: ${s.colors.text.primary};
border-color: ${s.colors.text.primary};
}
.rc-slider-track {
background-color: ${i};
}
.rc-slider-rail {
background-color: ${c};
cursor: pointer;
}
`,tooltip:(0,n.css)`
body {
.rc-slider-tooltip {
cursor: grab;
user-select: none;
z-index: ${s.zIndex.tooltip};
}
.rc-slider-tooltip-inner {
color: ${s.colors.text.primary};
background-color: transparent !important;
border-radius: 0;
box-shadow: none;
}
.rc-slider-tooltip-placement-top .rc-slider-tooltip-arrow {
display: none;
}
.rc-slider-tooltip-placement-top {
padding: 0;
}
}
`,sliderInput:(0,t.css)({display:"flex",flexDirection:"row",alignItems:"center",width:"100%"}),sliderInputVertical:(0,t.css)({flexDirection:"column",height:"100%",".rc-slider":{margin:0,order:2}}),sliderInputField:(0,t.css)({marginLeft:s.spacing(3),width:"60px",input:{textAlign:"center"}}),sliderInputFieldVertical:(0,t.css)({margin:`0 0 ${s.spacing(3)} 0`,order:1})}}},5926:(Q,A,e)=>{"use strict";e.d(A,{O:()=>a});var t=e(2543),n=e(96540),o=e(39624),s=e(21423),r=e(11261),g=e(8066),u=e(52622),c=e(81297),i=e(51336),l=e(16895),f=e(73060),d=e(14236),h=e(46294);function p(v,E){const D=v.y.values.length,b={...v.y.config,...E},C=v.x??{name:"",values:[...Array(D).keys()],type:r.PU.number,config:{}};let y={refId:"sparkline",fields:[C,{...v.y,config:b}],length:D};return(0,f.g2)(C.values)||(y=(0,d.ES)(y,0)),(0,h.M)({frame:y,refFieldPseudoMin:v.timeRange?.from.valueOf(),refFieldPseudoMax:v.timeRange?.to.valueOf()})}const m={drawStyle:u.GR.Line,showPoints:u.yL.Auto,axisPlacement:u.vM.Hidden,pointSize:2};class a extends n.PureComponent{constructor(E){super(E);const D=p(E.sparkline,E.config);this.state={data:(0,l.bq)(D,(0,l.ro)(D)),alignedDataFrame:D,configBuilder:this.prepareConfig(D)}}static getDerivedStateFromProps(E,D){const b=p(E.sparkline,E.config),C=(0,o.C)(b);return C?{...D,data:(0,l.bq)(C,(0,l.ro)(C)),alignedDataFrame:C}:{...D}}componentDidUpdate(E,D){const{alignedDataFrame:b}=this.state;if(!b)return;let C=!1;E.sparkline!==this.props.sparkline?C=!(0,s.bW)(this.state.alignedDataFrame,D.alignedDataFrame):C=!(0,t.isEqual)(E.config,this.props.config),C&&this.setState({configBuilder:this.prepareConfig(b)})}getYRange(E){let{min:D,max:b}=this.state.alignedDataFrame.fields[1].state?.range;const C=+this.state.alignedDataFrame.fields[1].config?.noValue;return Number.isNaN(C)||(D=Math.min(D,+C),b=Math.max(b,+C)),D===b?(D===0?b=100:(D=0,b*=2),[D,b]):[Math.max(D,E.config.min??-1/0),Math.min(b,E.config.max??1/0)]}prepareConfig(E){const{theme:D}=this.props,b=new i.e;b.setCursor({show:!1,x:!1,y:!1});const C=E.fields[0];b.addScale({scaleKey:"x",orientation:u.Lt.Horizontal,direction:u.ON.Right,isTime:!1,range:()=>{const{sparkline:y}=this.props;if(y.x){if(y.timeRange&&y.x.type===r.PU.time)return[y.timeRange.from.valueOf(),y.timeRange.to.valueOf()];const M=y.x.values;return[M[0],M[M.length-1]]}return[0,y.y.values.length-1]}}),b.addAxis({scaleKey:"x",theme:D,placement:u.vM.Hidden});for(let y=0;ythis.getYRange(M)}),b.addAxis({scaleKey:x,theme:D,placement:u.vM.Hidden});const S=(0,g.Qi)(M),O=S.getCalculator(M,D)(0,0),P=I.drawStyle===u.GR.Points?u.yL.Always:I.showPoints;b.addSeries({pxAlign:!1,scaleKey:x,theme:D,colorMode:S,thresholds:T.thresholds,drawStyle:I.drawStyle,lineColor:I.lineColor??O,lineWidth:I.lineWidth,lineInterpolation:I.lineInterpolation,showPoints:P,pointSize:I.pointSize,fillOpacity:I.fillOpacity,fillColor:I.fillColor,lineStyle:I.lineStyle,gradientMode:I.gradientMode})}return b}render(){const{data:E,configBuilder:D}=this.state,{width:b,height:C}=this.props;return n.createElement(c.Z,{data:E,config:D,width:b,height:C})}}},62930:(Q,A,e)=>{"use strict";e.d(A,{y:()=>c});var t=e(32196),n=e(96540),o=e(8867),s=e(40845),r=e(4025),g=e(14578),u=e(78318);const c=({className:f,inline:d=!1,iconClassName:h,style:p,size:m="md"})=>{const a=(0,s.of)(i),v=(0,s.of)(l,m);if(typeof m!="string"||!(0,r.rJ)(m)){const E=(0,u.Wj)(),D="spinner",b=(0,u.Xi)(D,"default"),C=`${E}${b}/${D}.svg`;return n.createElement("div",{"data-testid":"Spinner",style:p,className:(0,t.cx)({[a.inline]:d},v.wrapper,f)},n.createElement(o.default,{src:C,width:m,height:m,className:(0,t.cx)("fa-spin",v.icon,f),style:p}))}return n.createElement("div",{"data-testid":"Spinner",style:p,className:(0,t.cx)({[a.inline]:d},f)},n.createElement(g.I,{className:(0,t.cx)("fa-spin",h),name:"spinner",size:m,"aria-label":"loading spinner"}))},i=f=>({inline:(0,t.css)({display:"inline-block"})}),l=(f,d)=>({wrapper:(0,t.css)({fontSize:typeof d=="string"?d:`${d}px`}),icon:(0,t.css)({display:"inline-block",fill:"currentColor",flexShrink:0,label:"Icon",lineHeight:0,verticalAlign:"middle"})})},34722:(Q,A,e)=>{"use strict";e.d(A,{O:()=>u});var t=e(32196),n=e(2543),o=e.n(n),s=e(96540),r=e(40845),g=e(69144);function u(v){const{direction:E="row",initialSize:D=.5,primaryPaneStyles:b,secondaryPaneStyles:C,onSizeChanged:y,onResizing:M,dragPosition:T="middle",children:I}=v,{containerRef:x,firstPaneRef:S,minDimProp:O,splitterProps:P,secondPaneRef:L}=h(E,y,M),U=s.Children.toArray(I),R=(0,r.of)(c,E),B=(0,r.of)(g.l,T),H=E==="column"?B.dragHandleHorizontal:B.dragHandleVertical,w=(0,s.useId)(),V=U.length===2?"visible":"hidden";let G=D;return I[1]||(G=1),s.createElement("div",{ref:x,className:R.container},s.createElement("div",{ref:S,className:R.panel,style:{flexGrow:(0,n.clamp)(G,0,1),[O]:"min-content",...b},id:`start-panel-${w}`},U[0]),U[1]&&s.createElement(s.Fragment,null,s.createElement("div",{className:H,...P,role:"separator","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":D*100,"aria-controls":`start-panel-${w}`,"aria-label":"Pane resize widget",tabIndex:0}),s.createElement("div",{ref:L,className:R.panel,style:{flexGrow:(0,n.clamp)(1-D,0,1),[O]:"min-content",visibility:`${V}`,...C},id:`end-panel-${w}`},U[1])))}function c(v,E){return{container:(0,t.css)({display:"flex",flexDirection:E==="row"?"row":"column",width:"100%",flexGrow:1,overflow:"hidden"}),panel:(0,t.css)({display:"flex",position:"relative",flexBasis:0}),dragEdge:{second:(0,t.css)({top:0,left:v.spacing(-1),bottom:0,position:"absolute",zIndex:v.zIndex.modal}),first:(0,t.css)({top:0,left:v.spacing(-1),bottom:0,position:"absolute",zIndex:v.zIndex.modal})}}}const i=.3,l=new Set(["ArrowUp","ArrowDown"]),f=new Set(["ArrowLeft","ArrowRight"]),d={row:{dim:"width",axis:"clientX",min:"minWidth",max:"maxWidth"},column:{dim:"height",axis:"clientY",min:"minHeight",max:"maxHeight"}};function h(v,E,D){const C=(0,s.useRef)(null),y=(0,s.useRef)(null),M=(0,s.useRef)(null),T=(0,s.useRef)(null),I=(0,s.useRef)(null),x=(0,s.useRef)("1fr"),S=(0,s.useRef)(void 0),O=(0,s.useRef)(void 0),P=d[v].dim,L=d[v].axis,U=d[v].min,R=d[v].max;a(T.current,ee=>{for(const re of ee){if(!re.target.isSameNode(T.current)||!y.current)return;const J=y.current.getBoundingClientRect()[P],ne=m(y.current);C.current.ariaValueNow=`${(0,n.clamp)((J-ne[U])/(ne[R]-ne[U])*100,0,100)}`}},500,[R,U,v,P]);const B=(0,s.useRef)(null),H=(0,s.useCallback)(ee=>{y.current&&(x.current=y.current.getBoundingClientRect()[P],I.current=T.current.getBoundingClientRect()[P],B.current=ee[L],C.current.setPointerCapture(ee.pointerId),S.current=m(y.current),O.current=void 0)},[P,L]),w=(0,s.useCallback)(ee=>{if(B.current!==null&&x.current!=="1fr"){const re=ee[L]-B.current,J=S.current,ne=(0,n.clamp)(x.current+re,J[U],J[R]),q=ne/(I.current-16);y.current.style.flexGrow=`${q}`,M.current.style.flexGrow=`${1-q}`;const te=p(ne,J[U],J[R]-J[U]);C.current.ariaValueNow=`${te}`,D?.(q,ne)}},[16,L,U,R,D]),N=(0,s.useCallback)(ee=>{ee.preventDefault(),ee.stopPropagation(),C.current.releasePointerCapture(ee.pointerId),B.current=null,typeof x.current=="number"&&E?.(parseFloat(y.current.style.flexGrow),x.current)},[E]),V=(0,s.useRef)(new Set),G=(0,s.useRef)(null),_=(0,s.useCallback)(ee=>{if(V.current.size===0){G.current=null;return}else if(x.current==="1fr")return;const ne=(ee-(G.current??ee))*i;let q=0;v==="row"?(V.current.has("ArrowLeft")&&(q-=ne),V.current.has("ArrowRight")&&(q+=ne)):(V.current.has("ArrowUp")&&(q-=ne),V.current.has("ArrowDown")&&(q+=ne));const te=S.current,oe=y.current.getBoundingClientRect()[P],ue=(0,n.clamp)(oe+q,te[U],te[R]),ie=ue/(I.current-16);y.current.style.flexGrow=`${ie}`,M.current.style.flexGrow=`${1-ie}`,C.current.ariaValueNow=p(ue,te[U],te[R]),D?.(ie,ue),G.current=ee,window.requestAnimationFrame(_)},[v,16,U,R,P,D]),K=(0,s.useCallback)(ee=>{if(!y.current||!M.current||!C.current||!T.current)return;if(ee.key==="Enter"){O.current===void 0?(O.current=y.current.style.flexGrow,y.current.style.flexGrow="0",M.current.style.flexGrow="1"):(y.current.style.flexGrow=O.current,M.current.style.flexGrow=`${1-parseFloat(O.current)}`,O.current=void 0);return}else if(ee.key==="Home"){S.current=m(y.current),I.current=T.current.getBoundingClientRect()[P];const J=S.current[U]/(I.current-16);y.current.style.flexGrow=`${J}`,M.current.style.flexGrow=`${1-J}`,C.current.ariaValueNow="0";return}else if(ee.key==="End"){S.current=m(y.current),I.current=T.current.getBoundingClientRect()[P];const J=S.current[R]/(I.current-16);y.current.style.flexGrow=`${J}`,M.current.style.flexGrow=`${1-J}`,C.current.ariaValueNow="100";return}if(!(v==="column"&&l.has(ee.key)||v==="row"&&f.has(ee.key))||V.current.has(ee.key))return;if(O.current=void 0,ee.preventDefault(),ee.stopPropagation(),x.current=y.current.getBoundingClientRect()[P],I.current=T.current.getBoundingClientRect()[P],S.current=m(y.current),!V.current.has(ee.key)){const J=V.current.size===0;V.current.add(ee.key),J&&window.requestAnimationFrame(_)}},[v,_,16,R,P,U]),j=(0,s.useCallback)(ee=>{v==="row"&&!f.has(ee.key)||v==="column"&&!l.has(ee.key)||(V.current.delete(ee.key),typeof x.current=="number"&&E?.(parseFloat(y.current.style.flexGrow),x.current))},[v,E]),k=(0,s.useCallback)(()=>{if(!y.current||!M.current)return;y.current.style.flexGrow="0.5",M.current.style.flexGrow="0.5";const ee=m(y.current);S.current=ee,x.current=y.current.getBoundingClientRect()[P],C.current.ariaValueNow=`${(x.current-ee[U])/(ee[R]-ee[U])*100}`},[R,P,U]),Y=(0,s.useCallback)(()=>{V.current.size>0&&(V.current.clear(),B.current=null,typeof x.current=="number"&&E?.(parseFloat(y.current.style.flexGrow),x.current))},[E]);return{containerRef:T,firstPaneRef:y,minDimProp:U,splitterProps:{onPointerUp:N,onPointerDown:H,onPointerMove:w,onKeyDown:K,onKeyUp:j,onDoubleClick:k,onBlur:Y,ref:C,style:{[P]:"16px"}},secondPaneRef:M}}function p(v,E,D){return`${(0,n.clamp)((v-E)/(D-E)*100,0,100)}`}function m(v){const E=document.body.style.overflow,D=v.style.width,b=v.style.height,C=v.style.flexGrow;document.body.style.overflow="hidden",v.style.flexGrow="0";const{width:y,height:M}=v.getBoundingClientRect();v.style.flexGrow="100";const{width:T,height:I}=v.getBoundingClientRect();return document.body.style.overflow=E,v.style.width=D,v.style.height=b,v.style.flexGrow=C,{minWidth:y,maxWidth:T,minHeight:M,maxHeight:I}}function a(v,E,D=0,b){const C=(0,n.throttle)(E,D);(0,s.useLayoutEffect)(()=>{if(!v)return;const y=new ResizeObserver(C);return y.observe(v,{box:"device-pixel-content-box"}),()=>y.disconnect()},b)}},42734:(Q,A,e)=>{"use strict";e.d(A,{S:()=>g});var t=e(2543),n=e.n(t),o=e(96540),s=e(75059),r=e(88323);class g extends o.PureComponent{constructor(){super(...arguments),this.checkInput=()=>{const{stats:c,allowMultiple:i,defaultStat:l,onChange:f}=this.props,d=s.AS.list(c);if(d.length!==c.length){const h=d.map(m=>m.id),p=(0,t.difference)(c,h);console.warn("Unknown stats",p,c),f(d.map(m=>m.id))}!i&&c.length>1&&(console.warn("Removing extra stat",c),f([c[0]])),l&&c.length<1&&f([l])},this.onSelectionChange=c=>{const{onChange:i}=this.props;Array.isArray(c)?i(c.map(l=>l.value)):i(c&&c.value?[c.value]:[])}}componentDidMount(){this.checkInput()}componentDidUpdate(c){this.checkInput()}render(){const{stats:c,allowMultiple:i,defaultStat:l,placeholder:f,className:d,menuPlacement:h,width:p,inputId:m,filterOptions:a}=this.props,v=s.AS.selectOptions(c,a);return o.createElement(r.l6,{value:v.current,className:d,isClearable:!l,isMulti:i,width:p,isSearchable:!0,options:v.options,placeholder:f,onChange:this.onSelectionChange,menuPlacement:h,inputId:m})}}g.defaultProps={allowMultiple:!1}},15292:(Q,A,e)=>{"use strict";e.d(A,{K:()=>i,d:()=>c});var t=e(32196),n=e(2543),o=e.n(n),s=e(96540),r=e(95344),g=e(40845),u=e(16797);const c=s.forwardRef(({value:f,checked:d,onChange:h,id:p,label:m,disabled:a,invalid:v=!1,...E},D)=>{d&&(0,r.l)("Switch","checked prop","value");const b=(0,g.of)(l),C=(0,s.useRef)(p||(0,n.uniqueId)("switch-"));return s.createElement("div",{className:(0,t.cx)(b.switch,v&&b.invalid)},s.createElement("input",{type:"checkbox",disabled:a,checked:f,onChange:y=>{!a&&h?.(y)},id:C.current,...E,ref:D}),s.createElement("label",{htmlFor:C.current,"aria-label":m??"Toggle switch"}))});c.displayName="Switch";const i=s.forwardRef(({transparent:f,className:d,showLabel:h,label:p,value:m,id:a,invalid:v,...E},D)=>{const b=(0,g.of)(l,f);return s.createElement("div",{className:(0,t.cx)(b.inlineContainer,d,E.disabled&&b.disabled,v&&b.invalid)},h&&s.createElement("label",{htmlFor:a,className:(0,t.cx)(b.inlineLabel,m&&b.inlineLabelEnabled,"inline-switch-label")},p),s.createElement(c,{...E,id:a,label:p,ref:D,value:m}))});i.displayName="Switch";const l=(f,d)=>({switch:(0,t.css)({width:"32px",height:"16px",position:"relative",lineHeight:1,input:{opacity:0,left:"-100vw",zIndex:-1e3,position:"absolute","&:checked + label":{background:f.colors.primary.main,borderColor:f.colors.primary.main,"&:hover":{background:f.colors.primary.shade},"&::after":{transform:"translate3d(18px, -50%, 0)",background:f.colors.primary.contrastText}},"&:disabled + label":{background:f.colors.action.disabledBackground,borderColor:f.colors.border.weak,cursor:"not-allowed","&:hover":{background:f.colors.action.disabledBackground}},"&:disabled:checked + label":{"&::after":{background:f.colors.text.disabled}},"&:focus + label, &:focus-visible + label":(0,u.getFocusStyles)(f),"&:focus:not(:focus-visible) + label":(0,u.getMouseFocusStyles)(f)},label:{width:"100%",height:"100%",cursor:"pointer",borderRadius:f.shape.radius.pill,background:f.components.input.background,border:`1px solid ${f.components.input.borderColor}`,transition:"all 0.3s ease","&:hover":{borderColor:f.components.input.borderHover},"&::after":{position:"absolute",display:"block",content:'""',width:"12px",height:"12px",borderRadius:f.shape.radius.circle,background:f.colors.text.secondary,boxShadow:f.shadows.z1,top:"50%",transform:"translate3d(2px, -50%, 0)",transition:"transform 0.2s cubic-bezier(0.19, 1, 0.22, 1)","@media (forced-colors: active)":{border:"1px solid transparent"}}}}),inlineContainer:(0,t.css)({padding:f.spacing(0,1),height:f.spacing(f.components.height.md),display:"inline-flex",alignItems:"center",background:d?"transparent":f.components.input.background,border:`1px solid ${d?"transparent":f.components.input.borderColor}`,borderRadius:f.shape.radius.default,"&:hover":{border:`1px solid ${d?"transparent":f.components.input.borderHover}`,".inline-switch-label":{color:f.colors.text.primary}}}),disabled:(0,t.css)({backgroundColor:"rgba(204, 204, 220, 0.04)",color:"rgba(204, 204, 220, 0.6)",border:"1px solid rgba(204, 204, 220, 0.04)"}),inlineLabel:(0,t.css)({cursor:"pointer",paddingRight:f.spacing(1),color:f.colors.text.secondary,whiteSpace:"nowrap"}),inlineLabelEnabled:(0,t.css)({color:f.colors.text.primary}),invalid:(0,t.css)({"input + label, input:checked + label, input:hover + label":{border:`1px solid ${f.colors.error.border}`}})})},60734:(Q,A,e)=>{"use strict";e.d(A,{q:()=>i});var t=e(32196),n=e(96540),o=e(29158),s=e(63021),r=e(40675),g=e(40980),u=e(40845),c=e(40276);function i({tabs:f,defaultTab:d,closeIconTooltip:h,onClose:p}){const[m,a]=(0,n.useState)(f.some(C=>C.value===d)?d:f[0].value),v=(0,u.of)(l),E=(0,u.$j)(),D=C=>{a(C.value)},b=`calc(100% - (${E.components.menuTabs.height}px + ${E.spacing(1)}))`;return n.createElement("div",{className:v.container},n.createElement(s.U,{className:v.tabs},f.map(C=>n.createElement(r.o,{key:C.value,label:C.label,active:C.value===m,onChangeTab:()=>D(C),icon:C.icon})),n.createElement(o.K,{className:v.close,onClick:p,name:"times",tooltip:h??"Close"})),n.createElement(c.E,{autoHeightMin:b,autoHeightMax:b},n.createElement(g.J,{className:v.tabContent},f.find(C=>C.value===m)?.content)))}const l=f=>({container:(0,t.css)({height:"100%"}),tabContent:(0,t.css)({padding:f.spacing(2),backgroundColor:f.colors.background.primary,height:"100%"}),close:(0,t.css)({position:"absolute",right:"16px",top:"5px",cursor:"pointer",fontSize:f.typography.size.lg}),tabs:(0,t.css)({paddingTop:f.spacing(1),borderColor:f.colors.border.weak,ul:{marginLeft:f.spacing(2)}})})},92015:(Q,A,e)=>{"use strict";e.d(A,{u:()=>u,d:()=>i});var t=e(96540),n=e(75059),o=e(13544),s=e(32196);const r=l=>{const f=(0,s.css)({width:"100%",listStyle:"none"}),d=(0,s.css)({width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between"});return l.value&&!Array.isArray(l.value)?t.createElement("span",null,l.value):l.value&&Array.isArray(l.value)&&l.value.length>0?t.createElement("ul",{className:f},l.value.map((h,p)=>{const m=Object.keys(h)[0];return t.createElement("li",{className:d,key:p},t.createElement("span",null,m),t.createElement("span",null,h[m]))})):g},g=()=>t.createElement("span",null,"\xA0");function u(l){const{totalColumnsWidth:f,footerGroups:d,isPaginationVisible:h,tableStyles:p}=l,m=o.Tp.components.Panels.Visualization.Table;return t.createElement("div",{style:{position:h?"relative":"absolute",width:f?`${f}px`:"100%",bottom:"0px"}},d.map(a=>{const{key:v,...E}=a.getFooterGroupProps();return t.createElement("div",{className:p.tfoot,...E,key:v,"data-testid":m.footer},a.headers.map(D=>c(D,p)))}))}function c(l,f){const d=l.getHeaderProps();return d?(d.style=d.style??{},d.style.position="absolute",d.style.justifyContent=l.justifyContent,t.createElement("div",{className:f.headerCell,...d},l.render("Footer"))):null}function i(l,f,d){if(f===void 0)return g;if(d){if(f[l]===void 0)return g;const h=n.AS.get(n.gy.count).name;return r({value:[{[h]:String(f[l])}]})}return r({value:f[l]})}},30355:(Q,A,e)=>{"use strict";e.d(A,{a:()=>d,t:()=>f});var t=e(96540),n=e(58563),o=e(14236),s=e(11261),r=e(52622),g=e(40845),u=e(29413),c=e(9286),i=e(5926),l=e(77659);const f={type:r.ob.Sparkline,drawStyle:r.GR.Line,lineInterpolation:r.dx.Smooth,lineWidth:1,fillOpacity:17,gradientMode:r.on.Hue,pointSize:2,barAlignment:r.Nj.Center,showPoints:r.yL.Never,hideValue:!1},d=m=>{const{field:a,innerWidth:v,tableStyles:E,cell:D,cellProps:b,timeRange:C}=m,y=h(D.value),M=(0,g.$j)();if(!y)return t.createElement("div",{...b,className:E.cellContainer},a.config.noValue||"no data");y.x&&!y.x.config.interval&&y.x.values.length>1&&(y.x.config.interval=y.x.values[1]-y.x.values[0]),y.y.values=y.y.values.map(L=>Number.isFinite(L)?L:null);const T=(0,n.AP)(y.y);y.y.config.min=T.min,y.y.config.max=T.max,y.y.state={range:T},y.timeRange=C;const I=p(a),x={color:a.config.color,custom:{...f,...I}},S=a.config.custom?.cellOptions?.hideValue;let O=0,P=null;if(!S){const L=(0,o.LI)(D.value)?D.value.value:null,U=a.display(L),R=(0,l.zi)(a,U,D.row.index);O=(0,u.kD)(`${R.prefix??""}${R.text}${R.suffix??""}`,16).width+M.spacing.gridSize,P=t.createElement(c.i,{style:{width:`${O-M.spacing.gridSize}px`,textAlign:"right",marginRight:M.spacing(1)},value:U})}return t.createElement("div",{...b,className:E.cellContainer},P,t.createElement("div",null,t.createElement(i.O,{width:v-O,height:E.cellHeightInner,sparkline:y,config:x,theme:E.theme})))};function h(m){if(Array.isArray(m))return{y:{name:"test",type:s.PU.number,values:m,config:{}}};if((0,o.ci)(m)){const a=m.fields.find(E=>E.type===s.PU.time),v=m.fields.find(E=>E.type===s.PU.number);if(a&&v)return{x:a,y:v}}}function p(m){let a=(0,l.bk)(m);if(a.type===r.ob.Auto&&(a={...a,type:r.ob.Sparkline}),a.type===r.ob.Sparkline)return a;throw new Error(`Expected options type ${r.ob.Sparkline} but got ${a.type}`)}},77093:(Q,A,e)=>{"use strict";e.d(A,{X:()=>Re});var t=e(96540),n=e(32885),o=e(75059),s=e(11261),r=e(19845),g=e(13544),u=e(52622),c=e(40845),i=e(40276),l=e(19384),f=e(92015),d=e(4025),h=e(14578),p=e(32196),m=e(13840),a=e(8866),v=e(66864),E=e(60029),D=e(29158),b=e(55852),C=e(91793),y=e(83195),M=e(67647),T=e(9261),I=e(10880);const x=28,S=x*5,O={Contains:{label:"Contains",value:"Contains",description:"Contains"},"=":{label:"=",value:"=",description:"Equals"},"!=":{label:"!=",value:"!=",description:"Not equals"},">":{label:">",value:">",description:"Greater"},">=":{label:">=",value:">=",description:"Greater or Equal"},"<":{label:"<",value:"<",description:"Less"},"<=":{label:"<=",value:"<=",description:"Less or Equal"},Expression:{label:"Expression",value:"Expression",description:'Bool Expression (Char $ represents the column value in the expression, e.g. "$ >= 10 && $ <= 12")'}},P=Object.values(O),L=O.Contains,U=O.Expression,R=me=>{if(me=me.trim().replace(/\\/g,""),/^(\d{4}-\d{2}-\d{2}|\d{4}\/\d{2}\/\d{2})/.test(me)){const Le=new Date(me);if(!isNaN(Le.getTime())){const We=(0,y.j_)("dateTimeAsIso");return(0,y.cN)(We(Le.getTime()))}}const Me=parseFloat(me);if(!isNaN(Me))return Me;const ye=me.toLowerCase();return ye==="true"||ye==="false"?ye==="true":me},B=({options:me,values:Me,caseSensitive:ye,showOperators:Le,onChange:We})=>{const[Be,Ye]=(0,t.useState)(L),[at,st]=(0,t.useState)(""),Ke=(0,t.useMemo)(()=>new RegExp(at,ye?void 0:"i"),[at,ye]),Xe=(0,t.useMemo)(()=>me.filter(ze=>{if(!Le||!at||Be.value===L.value)return ze.label===void 0?!1:Ke.test(ze.label);if(Be.value===U.value){if(ze.value===void 0)return!1;try{const Ve=at.replace(/\\/g,""),Ne=new Function("$",`'use strict'; return ${Ve};`),ot=R(ze.value);return Ne(ot)}catch{}return!1}else{if(ze.value===void 0)return!1;const Ve=R(ze.value),Ne=R(at);switch(Be.value){case"=":return Ve===Ne;case"!=":return Ve!==Ne;case">":return Ve>Ne;case">=":return Ve>=Ne;case"<":return VeXe.filter(ze=>Me.includes(ze)),[Xe,Me]),Ge=(0,t.useMemo)(()=>Xe.length===He.length,[Xe,He]),xe=(0,t.useMemo)(()=>He.length>0&&Xe.length>He.length,[Xe,He]),$e=(0,t.useMemo)(()=>He.length?`${He.length} selected`:"Select all",[He]),be=(0,t.useMemo)(()=>Xe.length!==He.length?"Add all displayed values to the filter":"Remove all displayed values from the filter",[Xe,He]),Z=(0,c.of)(H),de=(0,c.$j)().spacing.gridSize,ve=(0,t.useMemo)(()=>Math.min(Xe.length*x,S)+de,[de,Xe.length]),Ue=(0,t.useCallback)(ze=>Ve=>{const Ne=Ve.currentTarget.checked?Me.concat(ze):Me.filter(ot=>ot.value!==ze.value);We(Ne)},[We,Me]),_e=(0,t.useCallback)(()=>{if(Xe.length===He.length){const ze=Me.filter(Ve=>!Xe.includes(Ve));We(ze)}else{const ze=[...new Set([...Me,...Xe])];We(ze)}},[We,Me,Xe,He]);return t.createElement(v.gW,{spacing:"md"},!Le&&t.createElement(M.Z,{placeholder:"Filter values",onChange:st,value:at}),Le&&t.createElement(v.Gy,null,t.createElement(T.f,{variant:"canvas",options:P,onChange:Ye,value:Be,tooltip:Be.description}),t.createElement(M.Z,{placeholder:"Filter values",onChange:st,value:at})),!Xe.length&&t.createElement(E.J,null,"No values"),Xe.length&&t.createElement(C.Y1,{height:ve,itemCount:Xe.length,itemSize:x,width:"100%",className:Z.filterList},({index:ze,style:Ve})=>{const Ne=Xe[ze],{value:ot,label:nt}=Ne,pt=Me.find(mt=>mt.value===ot)!==void 0;return t.createElement("div",{className:Z.filterListRow,style:Ve,title:nt},t.createElement(I.S,{value:pt,label:nt,onChange:Ue(Ne)}))}),Xe.length&&t.createElement(v.gW,{spacing:"xs"},t.createElement("div",{className:(0,p.cx)(Z.selectDivider)}),t.createElement("div",{className:(0,p.cx)(Z.filterListRow)},t.createElement(I.S,{value:Ge,indeterminate:xe,label:$e,description:be,onChange:_e}))))},H=me=>({filterList:(0,p.css)({label:"filterList"}),filterListRow:(0,p.css)({label:"filterListRow",cursor:"pointer",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",padding:me.spacing(.5),":hover":{backgroundColor:me.colors.action.hover}}),selectDivider:(0,p.css)({label:"selectDivider",width:"100%",borderTop:`1px solid ${me.colors.border.medium}`,padding:me.spacing(.5,2)})});var w=e(77659);const N=({column:{preFilteredRows:me,filterValue:Me,setFilter:ye},onClose:Le,field:We})=>{const Be=(0,c.$j)(),Ye=(0,t.useMemo)(()=>(0,w.MY)(me,We),[me,We]),at=(0,t.useMemo)(()=>(0,w.Yz)(Ye),[Ye]),st=(0,t.useMemo)(()=>(0,w.Sj)(at,Me),[at,Me]),[Ke,Xe]=(0,t.useState)(st),[He,Ge]=(0,t.useState)(!1),xe=(0,t.useCallback)(de=>Le(),[Le]),$e=(0,t.useCallback)(de=>{const ve=Ke.length?Ke:void 0;ye(ve),Le()},[ye,Ke,Le]),be=(0,t.useCallback)(de=>{ye(void 0),Le()},[ye,Le]),Z=(0,t.useMemo)(()=>Me!==void 0,[Me]),ae=(0,c.of)(V);return t.createElement(a.N,{onClick:xe,useCapture:!0},t.createElement("div",{className:(0,p.cx)(ae.filterContainer),onClick:G},t.createElement(v.gW,{spacing:"lg"},t.createElement(v.gW,{spacing:"xs"},t.createElement(v.Gy,{justify:"space-between",align:"center"},t.createElement(E.J,{className:ae.label},"Filter by values:"),t.createElement(D.K,{name:"text-fields",tooltip:"Match case",style:{color:He?Be.colors.text.link:Be.colors.text.disabled},onClick:()=>{Ge(de=>!de)}})),t.createElement("div",{className:(0,p.cx)(ae.listDivider)}),t.createElement(B,{onChange:Xe,values:Ke,options:at,caseSensitive:He,showOperators:!0})),t.createElement(v.Gy,{spacing:"lg"},t.createElement(v.Gy,null,t.createElement(b.$n,{size:"sm",onClick:$e},"Ok"),t.createElement(b.$n,{size:"sm",variant:"secondary",onClick:xe},"Cancel")),Z&&t.createElement(v.Gy,null,t.createElement(b.$n,{fill:"text",size:"sm",onClick:be},"Clear filter"))))))},V=me=>({filterContainer:(0,p.css)({label:"filterContainer",width:"100%",minWidth:"250px",height:"100%",maxHeight:"400px",backgroundColor:me.colors.background.primary,border:`1px solid ${me.colors.border.weak}`,padding:me.spacing(2),margin:me.spacing(1,0),boxShadow:me.shadows.z3,borderRadius:me.shape.radius.default}),listDivider:(0,p.css)({label:"listDivider",width:"100%",borderTop:`1px solid ${me.colors.border.medium}`,padding:me.spacing(.5,2)}),label:(0,p.css)({marginBottom:0})}),G=me=>{me.stopPropagation()},_=({column:me,field:Me,tableStyles:ye})=>{const Le=(0,t.useRef)(null),[We,Be]=(0,t.useState)(!1),Ye=(0,c.of)(K),at=(0,t.useMemo)(()=>!!me.filterValue,[me.filterValue]),st=(0,t.useCallback)(()=>Be(!0),[Be]),Ke=(0,t.useCallback)(()=>Be(!1),[Be]);return!Me||!Me.config.custom?.filterable?null:t.createElement("button",{className:(0,p.cx)(ye.headerFilter,at?Ye.filterIconEnabled:Ye.filterIconDisabled),ref:Le,type:"button",onClick:st},t.createElement(h.I,{name:"filter"}),We&&Le.current&&t.createElement(m.A,{content:t.createElement(N,{column:me,tableStyles:ye,field:Me,onClose:Ke}),placement:"bottom-start",referenceElement:Le.current,show:!0}))},K=me=>({filterIconEnabled:(0,p.css)({label:"filterIconEnabled",color:me.colors.primary.text}),filterIconDisabled:(0,p.css)({label:"filterIconDisabled",color:me.colors.text.disabled})}),j=me=>{const{headerGroups:Me,showTypeIcons:ye,tableStyles:Le}=me,We=g.Tp.components.Panels.Visualization.Table;return t.createElement("div",{role:"rowgroup",className:Le.headerRow},Me.map(Be=>{const{key:Ye,...at}=Be.getHeaderGroupProps();return t.createElement("div",{className:Le.thead,...at,key:Ye,"aria-label":We.header,role:"row"},Be.headers.map((st,Ke)=>k(st,Le,ye)))}))};function k(me,Me,ye){const Le=me.getHeaderProps(),We=me.field??null;return me.canResize&&(Le.style.userSelect=me.isResizing?"none":"auto"),Le.style.position="absolute",Le.style.justifyContent=me.justifyContent,t.createElement("div",{className:Me.headerCell,...Le,role:"columnheader"},me.canSort&&t.createElement(t.Fragment,null,t.createElement("button",{...me.getSortByToggleProps(),className:Me.headerCellLabel},ye&&t.createElement(h.I,{name:(0,d.SS)(We),title:We?.type,size:"sm",className:Me.typeIcon}),t.createElement("div",null,me.render("Header")),me.isSorted&&(me.isSortedDesc?t.createElement(h.I,{size:"lg",name:"arrow-down",className:Me.sortIcon}):t.createElement(h.I,{name:"arrow-up",size:"lg",className:Me.sortIcon}))),me.canFilter&&t.createElement(_,{column:me,tableStyles:Me,field:We})),!me.canSort&&me.render("Header"),!me.canSort&&me.canFilter&&t.createElement(_,{column:me,tableStyles:Me,field:We}),me.canResize&&t.createElement("div",{...me.getResizerProps(),className:Me.resizeHandle}))}var Y=e(64423),ee=e(56978),re=e(69129),J=e(79041);function ne({tableStyles:me,nestedData:Me,rowIndex:ye,width:Le,cellHeight:We}){const Be=Me.values,Ye=[],at=(0,c.$j)(),st=(0,c.of)(q);let Ke=me.rowHeight+at.spacing.gridSize;return Be[ye].forEach((Xe,He)=>{const Ge=!!Xe.meta?.custom?.noHeader,xe=me.rowHeight*(Xe.length+(Ge?0:1)),$e={height:xe,paddingLeft:w.jV,position:"absolute",top:Ke};Ke+=xe+at.spacing.gridSize,Ye.push(t.createElement("div",{style:$e,key:`subTable_${ye}_${He}`},t.createElement(Re,{data:Xe,width:Le-w.jV,height:me.rowHeight*(Xe.length+1),noHeader:Ge,cellHeight:We})))}),t.createElement("div",{className:st.subTables},Ye)}const q=me=>({subTables:(0,p.css)({"&:before":{content:'""',position:"absolute",width:"1px",top:me.spacing(5),left:me.spacing(1),bottom:me.spacing(2),background:me.colors.border.medium}})});function te(me,Me,ye){return me.values[Me].reduce((Be,Ye)=>{if(Ye.length){const at=!!Ye.meta?.custom?.noHeader;return Be+ye.rowHeight*(Ye.length+(at?0:1))+8}return Be},ye.rowHeight)??ye.rowHeight}var oe=e(49618);const ue=me=>{const{data:Me,rows:ye,headerHeight:Le,footerPaginationEnabled:We,rowHeight:Be,itemCount:Ye,pageIndex:at,tableState:st,prepareRow:Ke,onCellFilterAdded:Xe,width:He,cellHeight:Ge=u.qM.Sm,timeRange:xe,tableStyles:$e,nestedDataField:be,listHeight:Z,listRef:ae,enableSharedCrosshair:de=!1,initialRowIndex:ve=void 0}=me,[Ue,_e]=(0,t.useState)(ve),ze=(0,c.$j)(),Ve=(0,J.d2)(),Ne=(0,t.useMemo)(()=>{const zt=Me.fields.find(_t=>_t.type===s.PU.time);return zt?(0,w.HY)(zt):0},[Me]),ot=(0,t.useCallback)((zt,_t)=>{if(!Ve||!de||!(0,r.S1)(_t))return;const rt=_t.fields.find(It=>It.type===s.PU.time);Ve.eventBus.publish(new re.b_({point:{time:rt.values[zt]}}))},[de,Ve]),nt=(0,t.useCallback)(()=>{!Ve||!de||Ve.eventBus.publish(new re.ql)},[de,Ve]),pt=(0,t.useCallback)(zt=>{if(zt.payload.point?.time&&zt.payload.rowIndex!==void 0){const _t=Me.fields.find(ft=>ft.type===s.PU.time),rt=_t.values[zt.payload.rowIndex],It=zt.payload.point.time;if((0,w.Iy)(It,rt,Ne)){_e(zt.payload.rowIndex);return}const Dn=_t.values.findIndex(ft=>(0,w.Iy)(It,ft,Ne));if(Dn!==-1){_e(Dn);return}_e(void 0)}},[Me.fields,Ne]);(0,t.useEffect)(()=>{if(!Ve||!de||!(0,r.S1)(Me)||We)return;const zt=new Y.yU;return zt.add(Ve.eventBus.getStream(re.b_).pipe((0,ee.B)(250)).subscribe({next:_t=>{Ve.eventBus!==_t.origin&&pt(_t)}})),zt.add(Ve.eventBus.getStream(re.ql).pipe((0,ee.B)(250)).subscribe({next:_t=>{Ve.eventBus!==_t.origin&&_e(void 0)}})),()=>{zt.unsubscribe()}},[Me,de,We,pt,Ve]);let mt;if(Ue!==void 0){const zt=ye.findIndex(_t=>_t.index===Ue);zt!==-1&&(mt=Le+(zt-1)*Be)}const gt=(0,t.useCallback)(zt=>st.pageIndex*st.pageSize+zt,[st.pageIndex,st.pageSize]),Pt=(0,t.useCallback)(({index:zt,style:_t,rowHighlightIndex:rt})=>{const It=gt(zt),Dn=ye[It];let ft={};Ke(Dn);const yt=st.expanded[Dn.id]?(0,p.css)({"&:hover":{background:"inherit"}}):{};return rt!==void 0&&Dn.index===rt&&(_t={..._t,backgroundColor:ze.components.table.rowHoverBackground},ft={"aria-selected":"true"}),t.createElement("div",{...Dn.getRowProps({style:_t,...ft}),className:(0,p.cx)($e.row,yt),onMouseEnter:()=>ot(zt,Me),onMouseLeave:nt},be&&st.expanded[Dn.id]&&t.createElement(ne,{nestedData:be,tableStyles:$e,rowIndex:zt,width:He,cellHeight:Ge}),Dn.cells.map((jt,cn)=>t.createElement(oe.n,{key:cn,tableStyles:$e,cell:jt,onCellFilterAdded:Xe,columnIndex:cn,columnCount:Dn.cells.length,timeRange:xe,frame:Me})))},[Ge,Me,be,Xe,ot,nt,Ke,gt,ye,st.expanded,$e,ze.components.table.rowHoverBackground,xe,He]),Mt=zt=>{const _t=gt(zt),rt=ye[_t];return st.expanded[rt.id]&&be?te(be,zt,$e):$e.rowHeight},Yt=zt=>{const{scrollTop:_t}=zt.currentTarget;ae.current!==null&&ae.current.scrollTo(_t)};return t.createElement(t.Fragment,null,t.createElement(i.A,{onScroll:Yt,hideHorizontalTrack:!0,scrollTop:mt},t.createElement(C._m,{key:Be+at,height:Z,itemCount:Ye,itemSize:Mt,width:"100%",ref:ae,style:{overflow:void 0}},({index:zt,style:_t})=>Pt({index:zt,style:_t,rowHighlightIndex:Ue}))))};function ie(me,Me){(0,t.useEffect)(()=>{if(me.current&&Me.current){const ye=me.current.querySelector(".track-vertical"),Le=Me.current.firstChild;Le&&ye&&(ye.remove(),Le instanceof HTMLElement&&(Le.querySelector(":scope > .track-vertical")?.remove(),Le.append(ye)))}})}function ge(me,Me,ye,Le){const We=JSON.stringify(Object.keys(me.expanded));(0,t.useEffect)(()=>{let Be=0;Le||(Number.isFinite(me.lastExpandedOrCollapsedIndex)&&(Be=me.lastExpandedOrCollapsedIndex),Be=me.pageIndex===0?Be-1:Be-me.pageIndex-me.pageIndex*me.pageSize),Me.current?.resetAfterIndex(Math.max(Be,0))},[me.lastExpandedOrCollapsedIndex,me.pageSize,me.pageIndex,Me,ye,We,Le])}var he=e(28240);function De({onColumnResize:me,onSortByChange:Me,data:ye}){return(0,t.useCallback)((Le,We)=>{switch(We.type){case"columnDoneResizing":if(me){const Ye=Le.columnResizing.headerIdWidths[0][0],at=parseInt(Ye,10),st=Math.round(Le.columnResizing.columnWidths[Ye]),Ke=ye.fields[at];if(!Ke)return Le;const Xe=(0,he.Ct)(Ke,ye);me(Xe,st)}case"toggleSortBy":if(Me){const Be=[];for(const Ye of Le.sortBy){const at=ye.fields[parseInt(Ye.id,10)];at&&Be.push({displayName:(0,he.Ct)(at,ye),desc:Ye.desc})}Me(Be)}case"toggleRowExpanded":if(We.id)return{...Le,lastExpandedOrCollapsedIndex:parseInt(We.id,10)}}return Le},[ye,me,Me])}function pe(me,Me){const ye={};if(me){ye.sortBy=[];for(const Le of me)for(const We of Me)We.Header===Le.displayName&&ye.sortBy.push({id:We.id,desc:Le.desc})}return ye}var le=e(69770);const Te=150,Ee=36,Re=(0,t.memo)(me=>{const{ariaLabel:Me,data:ye,height:Le,onCellFilterAdded:We,width:Be,columnMinWidth:Ye=Te,noHeader:at,resizable:st=!0,initialSortBy:Ke,footerOptions:Xe,showTypeIcons:He,footerValues:Ge,enablePagination:xe,cellHeight:$e=u.qM.Sm,timeRange:be,enableSharedCrosshair:Z=!1,initialRowIndex:ae=void 0}=me,de=(0,t.useRef)(null),ve=(0,t.useRef)(null),Ue=(0,t.useRef)(null),_e=(0,c.$j)(),ze=(0,le.k)(_e,$e),Ve=at?0:ze.rowHeight,[Ne,ot]=(0,t.useState)(Ge),nt=(0,t.useMemo)(()=>{const Sn=Ee;let Tn=0;if(!Ne)return 0;for(const $n of Ne)Array.isArray($n)&&$n.length>Tn&&(Tn=$n.length);return Tn>1?Sn*Tn:Sn},[Ne]),pt=(0,t.useMemo)(()=>ye.fields.length?Array(ye.length).fill(0):[],[ye]),mt=!!(Xe?.countRows&&Xe.reducer&&Xe.reducer.length&&Xe.reducer[0]===o.gy.count),gt=ye.fields.find(Sn=>Sn.type===s.PU.nestedFrames),Pt=gt!==void 0,Mt=(0,t.useMemo)(()=>(0,w.GH)(ye,Be,Ye,Pt,Ne,mt),[ye,Be,Ye,Ne,Pt,mt]),Yt=(0,t.useRef)(),zt=De({...me,onSortByChange:Sn=>{Yt.current(!1),me.onSortByChange&&me.onSortByChange(Sn)}}),_t=!!ye.meta?.uniqueRowIdFields?.length,rt=(0,t.useMemo)(()=>{const Sn={columns:Mt,data:pt,disableResizing:!st,stateReducer:zt,autoResetPage:!1,initialState:pe(Ke,Mt),autoResetFilters:!1,sortTypes:{number:w.Ok,"alphanumeric-insensitive":w.IM}};return _t&&(Sn.getRowId=(Tn,$n)=>(0,r.t9)(ye,$n),Sn.autoResetExpanded=!1),Sn},[Ke,Mt,pt,st,zt,_t,ye]),{getTableProps:It,headerGroups:Dn,footerGroups:ft,rows:yt,prepareRow:jt,totalColumnsWidth:cn,page:pn,state:on,gotoPage:Xt,setPageSize:fn,pageOptions:An,toggleAllRowsExpanded:hn}=(0,n.useTable)(rt,n.useFilters,n.useSortBy,n.useAbsoluteLayout,n.useResizeColumns,n.useExpanded,n.usePagination),ca=on;Yt.current=hn,(0,t.useEffect)(()=>{Xe||ot(Ge)},[Ge,Xe]),(0,t.useEffect)(()=>{if(!Xe)return;if(!Xe.show){ot(void 0);return}if(mt){const Tn=[];Tn[0]=Dn[0]?.headers[0]?.filteredRows.length.toString()??ye.length.toString(),ot(Tn);return}const Sn=(0,w.Ux)(Dn[0].headers,(0,w.XX)(yt),Xe,_e);ot(Sn)},[Xe,_e,on.filters,ye]);let Rt=Le-(Ve+nt);xe&&(Rt-=ze.cellHeight);const qt=Math.round(Rt/ze.rowHeight)-1;(0,t.useEffect)(()=>{qt<=0||fn(qt)},[qt,fn]),(0,t.useEffect)(()=>{ye.length/qt{Xt(Sn-1)},[Xt]),Cn=xe?pn.length:yt.length;let mn=null;if(xe){const Sn=on.pageIndex*on.pageSize+1;let Tn=Sn+on.pageSize-1;const $n=Be<550;Tn>ye.length&&(Tn=ye.length),mn=t.createElement("div",{className:ze.paginationWrapper},t.createElement(l.d,{currentPage:on.pageIndex+1,numberOfPages:An.length,showSmallVersion:$n,onNavigate:gn}),$n?null:t.createElement("div",{className:ze.paginationSummary},Sn," - ",Tn," of ",ye.length," rows"))}return t.createElement("div",{...It(),className:ze.table,"aria-label":Me,role:"table",ref:ve,style:{width:Be,height:Le}},t.createElement(i.E,{hideVerticalTrack:!0},t.createElement("div",{className:ze.tableContentWrapper(cn)},!at&&t.createElement(j,{headerGroups:Dn,showTypeIcons:He,tableStyles:ze}),Cn>0?t.createElement("div",{"data-testid":g.Tp.components.Panels.Visualization.Table.body,ref:Ue},t.createElement(ue,{data:ye,rows:yt,width:Be,cellHeight:$e,headerHeight:Ve,rowHeight:ze.rowHeight,itemCount:Cn,pageIndex:on.pageIndex,listHeight:Rt,listRef:de,tableState:on,prepareRow:jt,timeRange:be,onCellFilterAdded:We,nestedDataField:gt,tableStyles:ze,footerPaginationEnabled:!!xe,enableSharedCrosshair:Z,initialRowIndex:ae})):t.createElement("div",{style:{height:Le-Ve,width:Be},className:ze.noData},"No data"),Ne&&t.createElement(f.u,{isPaginationVisible:!!xe,footerValues:Ne,footerGroups:ft,totalColumnsWidth:cn,tableStyles:ze}))),mn)});Re.displayName="Table"},49618:(Q,A,e)=>{"use strict";e.d(A,{n:()=>n});var t=e(96540);const n=({cell:o,tableStyles:s,onCellFilterAdded:r,timeRange:g,userProps:u,frame:c})=>{const i=o.getCellProps(),l=o.column.field;if(!l?.display)return null;i.style&&(i.style.minWidth=i.style.width,i.style.justifyContent=o.column.justifyContent);let f=(typeof o.column.width=="number"?o.column.width:24)-s.cellPadding*2;return t.createElement(t.Fragment,null,o.render("Cell",{field:l,tableStyles:s,onCellFilterAdded:r,cellProps:i,innerWidth:f,timeRange:g,userProps:u,frame:c}))}},69770:(Q,A,e)=>{"use strict";e.d(A,{k:()=>n});var t=e(32196);function n(s,r){const g=s.colors.border.weak,u=s.colors.primary.border,c=6,i=o(s,r,c),l=i+2,f=28,d=(h,p,m,a)=>(0,t.css)({label:m?"cellContainerOverflow":"cellContainerNoOverflow",padding:`${c}px`,width:"100%",height:`${l-1}px`,display:"flex",...a?{overflow:"hidden",textOverflow:"ellipsis",userSelect:"text",whiteSpace:"nowrap"}:{},alignItems:"center",borderRight:`1px solid ${g}`,color:h??void 0,background:p??void 0,backgroundClip:"padding-box","&:last-child:not(:only-child)":{borderRight:"none"},"&:hover":{overflow:m?"visible":void 0,width:m?"auto !important":void 0,boxShadow:m?`0 0 2px ${s.colors.primary.main}`:void 0,background:m?p??s.components.table.rowHoverBackground:void 0,zIndex:m?1:void 0,".cellActions":{visibility:"visible",opacity:1,width:"auto"}},a:{color:"inherit"},".cellActions":{display:"flex",position:m?void 0:"absolute",top:m?void 0:0,right:m?void 0:0,margin:m?s.spacing(0,-.5,0,.5):"auto",visibility:"hidden",opacity:0,width:0,alignItems:"center",height:"100%",padding:s.spacing(1,.5,1,.5),background:p?"none":s.colors.emphasize(s.colors.background.primary,.03),svg:{color:h}},".cellActionsLeft":{right:"auto !important",left:0},".cellActionsTransparent":{background:"none"}});return{theme:s,cellHeight:i,buildCellContainerStyle:d,cellPadding:c,cellHeightInner:i-c*2,rowHeight:l,table:(0,t.css)({height:"100%",width:"100%",overflow:"auto",display:"flex",flexDirection:"column"}),thead:(0,t.css)({label:"thead",height:`${f}px`,overflowY:"auto",overflowX:"hidden",position:"relative"}),tfoot:(0,t.css)({label:"tfoot",height:`${f}px`,borderTop:`1px solid ${g}`,overflowY:"auto",overflowX:"hidden",position:"relative"}),headerRow:(0,t.css)({label:"row",borderBottom:`1px solid ${g}`}),headerCell:(0,t.css)({height:"100%",padding:`0 ${c}px`,overflow:"hidden",whiteSpace:"nowrap",display:"flex",alignItems:"center",fontWeight:s.typography.fontWeightMedium,"&:last-child":{borderRight:"none"}}),headerCellLabel:(0,t.css)({border:"none",padding:0,background:"inherit",cursor:"pointer",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontWeight:s.typography.fontWeightMedium,display:"flex",alignItems:"center",marginRight:s.spacing(.5),"&:hover":{textDecoration:"underline",color:s.colors.text.link}}),cellContainerText:d(void 0,void 0,!0,!0),cellContainerTextNoOverflow:d(void 0,void 0,!1,!0),cellContainer:d(void 0,void 0,!0,!1),cellContainerNoOverflow:d(void 0,void 0,!1,!1),cellText:(0,t.css)({overflow:"hidden",textOverflow:"ellipsis",userSelect:"text",whiteSpace:"nowrap"}),sortIcon:(0,t.css)({marginLeft:s.spacing(.5)}),cellLink:(0,t.css)({cursor:"pointer",overflow:"hidden",textOverflow:"ellipsis",userSelect:"text",whiteSpace:"nowrap",color:s.colors.text.link,fontWeight:s.typography.fontWeightMedium,paddingRight:s.spacing(1.5),"&:hover":{textDecoration:"underline",color:s.colors.text.link}}),cellLinkForColoredCell:(0,t.css)({cursor:"pointer",overflow:"hidden",textOverflow:"ellipsis",userSelect:"text",whiteSpace:"nowrap",fontWeight:s.typography.fontWeightMedium,textDecoration:"underline"}),imageCellLink:(0,t.css)({cursor:"pointer",overflow:"hidden",height:"100%"}),headerFilter:(0,t.css)({background:"transparent",border:"none",label:"headerFilter",padding:0}),paginationWrapper:(0,t.css)({display:"flex",height:`${i}px`,justifyContent:"center",alignItems:"center",width:"100%",li:{marginBottom:0}}),paginationSummary:(0,t.css)({color:s.colors.text.secondary,fontSize:s.typography.bodySmall.fontSize,display:"flex",justifyContent:"flex-end",padding:s.spacing(0,1,0,2)}),tableContentWrapper:h=>{const p=h!==void 0?`${h}px`:"100%";return(0,t.css)({label:"tableContentWrapper",width:p,display:"flex",flexDirection:"column"})},row:(0,t.css)({label:"row",borderBottom:`1px solid ${g}`,"&:hover":{backgroundColor:s.components.table.rowHoverBackground},"&:last-child":{borderBottom:0}}),imageCell:(0,t.css)({height:"100%"}),resizeHandle:(0,t.css)({label:"resizeHandle",cursor:"col-resize !important",display:"inline-block",background:u,opacity:0,transition:"opacity 0.2s ease-in-out",width:"8px",height:"100%",position:"absolute",right:"-4px",borderRadius:s.shape.radius.default,top:0,touchAction:"none","&:hover":{opacity:1}}),typeIcon:(0,t.css)({marginRight:s.spacing(1),color:s.colors.text.secondary}),noData:(0,t.css)({alignItems:"center",display:"flex",height:"100%",justifyContent:"center",width:"100%"}),expanderCell:(0,t.css)({display:"flex",flexDirection:"column",justifyContent:"center",height:`${l}px`,cursor:"pointer"})}}function o(s,r,g){const u=s.typography.fontSize,c=s.typography.body.lineHeight;switch(r){case"md":return 42;case"lg":return 48;case"sm":default:return g*2+u*c}}},88407:(Q,A,e)=>{"use strict";e.d(A,{Zi:()=>n,mc:()=>t});const t="=",n="!="},77659:(Q,A,e)=>{"use strict";e.d(A,{jV:()=>ne,HY:()=>st,MY:()=>ie,XX:()=>Me,zi:()=>Ye,bk:()=>Le,GH:()=>te,Sj:()=>pe,Ux:()=>Re,j1:()=>q,Iy:()=>at,o7:()=>We,IM:()=>le,Ok:()=>Te,Yz:()=>he});var t=e(2543),n=e(47078),o=e.n(n),s=e(11261),r=e(28240),g=e(14236),u=e(19845),c=e(83195),i=e(75059),l=e(57875),f=e(52622),d=e(96540),h=e(50082),p=e(58563),m=e(47070),a=e(97696),v=e(59796);const E={mode:h.O.Absolute,steps:[{color:"blue",value:-1/0},{color:"green",value:20}]},D=Ke=>{const{field:Xe,innerWidth:He,tableStyles:Ge,cell:xe,cellProps:$e,row:be}=Ke,Z=Xe.display(xe.value),ae=Le(Xe);let de=(0,p.xg)(Xe,!1);de.thresholds||(de={...de,thresholds:E});let ve=f.eX.Gradient,Ue;ae.type===f.ob.Gauge&&(ve=ae.mode??f.eX.Gradient,Ue=ae.valueDisplayMode!==void 0?ae.valueDisplayMode:f.$l.Text);const _e=()=>(0,t.isFunction)(Xe.getLinks)?Xe.getLinks({valueRowIndex:be.index}):[],ze=!!_e().length,Ve=Ye(Xe,Z,xe.row.index),Ne=ot=>{const{openMenu:nt,targetClassName:pt}=ot;return d.createElement(a.xE,{width:He,height:Ge.cellHeightInner,field:de,display:Xe.display,text:{valueSize:14},value:Z,orientation:m.wV.Horizontal,theme:Ge.theme,alignmentFactors:Ve,onClick:nt,className:pt,itemSpacing:1,lcdCellWidth:8,displayMode:ve,valueDisplayMode:Ue})};return d.createElement("div",{...$e,className:Ge.cellContainer},ze&&d.createElement(v.e,{links:_e,style:{display:"flex",width:"100%"}},ot=>Ne(ot)),!ze&&Ne({}))};var b=e(90914);const C=Ke=>{const{field:Xe,row:He,cellProps:Ge,tableStyles:xe}=Ke,$e=(0,b.k)(Xe,He);return d.createElement("div",{...Ge,className:xe.cellContainerText},$e&&$e.map((be,Z)=>d.createElement("span",{key:Z,className:xe.cellLink,onClick:be.onClick},d.createElement("a",{href:be.href,target:be.target},be.title))))};var y=e(32196),M=e(84140),T=e(40845),I=e(24284),x=e(55852),S=e(29158),O=e(66864),P=e(10534),L=e(37390),U=e(32372);function R({value:Ke,onDismiss:Xe,mode:He}){let Ge=Ke;if((0,t.isString)(Ke)){const $e=Ke.trim();if($e[0]==="{"||$e[0]==="["||He==="code")try{Ke=JSON.parse(Ke),He="code"}catch{He="text"}else He="text"}else Ge=JSON.stringify(Ke,null," ");let xe=Ge;return He==="code"&&(xe=JSON.stringify(Ke,null," ")),d.createElement(L.a,{onDismiss:Xe,isOpen:!0,title:"Inspect value"},He==="code"?d.createElement(U.B,{width:"100%",height:500,language:"json",showLineNumbers:!0,showMiniMap:(xe&&xe.length)>100,value:xe,readOnly:!0}):d.createElement("pre",null,xe),d.createElement(L.a.ButtonRow,null,d.createElement(P.b,{icon:"copy",getText:()=>xe},"Copy to Clipboard")))}var B=e(88407);function H({field:Ke,cell:Xe,previewMode:He,showFilters:Ge,onCellFilterAdded:xe}){const[$e,be]=(0,d.useState)(!1),Z=q(Ke)==="flex-end",ae=!!Ke.config.custom?.inspect,de={size:"sm",tooltipPlacement:"top"},ve=(0,d.useCallback)(_e=>{xe&&xe({key:Ke.name,operator:B.mc,value:Xe.value})},[Xe,Ke,xe]),Ue=(0,d.useCallback)(_e=>{xe&&xe({key:Ke.name,operator:B.Zi,value:Xe.value})},[Xe,Ke,xe]);return d.createElement(d.Fragment,null,d.createElement("div",{className:`cellActions ${Z?"cellActionsLeft":""}`},d.createElement(O.Gy,{spacing:"xs"},ae&&d.createElement(S.K,{name:"eye",tooltip:"Inspect value",onClick:()=>{be(!0)},...de}),Ge&&d.createElement(S.K,{name:"search-plus",onClick:ve,tooltip:"Filter for value",...de}),Ge&&d.createElement(S.K,{name:"search-minus",onClick:Ue,tooltip:"Filter out value",...de}))),$e&&d.createElement(R,{mode:He,value:Xe.value,onDismiss:()=>{be(!1)}}))}const w=Ke=>{const{field:Xe,cell:He,tableStyles:Ge,row:xe,cellProps:$e,frame:be}=Ke,Z=!!Xe.config.custom?.inspect,ae=Xe.display(He.value),de=Ke.onCellFilterAdded&&Xe.config.filterable,ve=de&&He.value!==void 0||Z,Ue=Le(Xe),_e=!!(0,b.k)(Xe,xe)?.length,ze=(0,T.of)(x.Ez),[Ve,Ne]=(0,d.useState)(!1);let ot;const nt=()=>{Ne(!1)},pt=()=>{Ne(!0)};if(Ue.type===f.ob.Custom){const Pt=Ue.cellComponent;ot=d.createElement(Pt,{field:Xe,value:He.value,rowIndex:xe.index,frame:be})}else d.isValidElement(He.value)?ot=He.value:ot=(0,c.cN)(ae);const mt=typeof ot=="string",gt=N(Ge,Ue,ae,Z,mt);if(mt){let Pt=$e.style?.justifyContent;Pt==="flex-end"?$e.style={...$e.style,textAlign:"right"}:Pt==="center"&&($e.style={...$e.style,textAlign:"center"})}return d.createElement("div",{...$e,onMouseEnter:ve?pt:void 0,onMouseLeave:ve?nt:void 0,className:gt},!_e&&(mt?`${ot}`:d.createElement("div",{className:Ge.cellText},ot)),_e&&d.createElement(v.e,{links:()=>(0,b.k)(Xe,xe)||[]},Pt=>Pt.openMenu?d.createElement("button",{className:(0,y.cx)(ze,V(Ge,Ue,Pt.targetClassName)),onClick:Pt.openMenu},ot):d.createElement("div",{className:V(Ge,Ue,Pt.targetClassName)},ot)),Ve&&ve&&d.createElement(H,{...Ke,previewMode:"text",showFilters:de}))};function N(Ke,Xe,He,Ge=!1,xe=!1){const $e=Ke.theme.isDark?1:-.7;let be,Z;if(Xe.type===f.ob.ColorText)be=He.color;else if(Xe.type===f.ob.ColorBackground){const ae=Xe.mode??f.Wq.Gradient;if(ae===f.Wq.Basic)be=(0,I.mZ)(He.color,Ke.theme.isDark),Z=(0,M.A)(He.color).toRgbString();else if(ae===f.Wq.Gradient){const de=(0,M.A)(He.color).darken(10*$e).spin(5);be=(0,I.mZ)(He.color,Ke.theme.isDark),Z=`linear-gradient(120deg, ${de.toRgbString()}, ${He.color})`}}return be!==void 0||Z!==void 0?Ke.buildCellContainerStyle(be,Z,!Ge,xe):xe?Ge?Ke.cellContainerTextNoOverflow:Ke.cellContainerText:Ge?Ke.cellContainerNoOverflow:Ke.cellContainer}function V(Ke,Xe,He){return Xe.type===f.ob.Auto?(0,y.cx)(Ke.cellLink,He):(0,y.cx)(Ke.cellLinkForColoredCell,He)}var G=e(92015),_=e(64136),K=e(27430);function j(Ke){const{cell:Xe,tableStyles:He,cellProps:Ge}=Ke;let xe="";return Xe.value instanceof K.A?xe=new _.A().writeGeometry(Xe.value,{featureProjection:"EPSG:3857",dataProjection:"EPSG:4326"}):Xe.value!=null&&(xe=`${Xe.value}`),d.createElement("div",{...Ge,className:He.cellContainer},d.createElement("div",{className:He.cellText,style:{fontFamily:"monospace"}},xe))}const k=Ke=>{const{field:Xe,cell:He,tableStyles:Ge,row:xe,cellProps:$e}=Ke,be=Xe.display(He.value),Z=!!(0,b.k)(Xe,xe)?.length,ae=(0,T.of)(x.Ez);return d.createElement("div",{...$e,className:Ge.cellContainer},!Z&&d.createElement("img",{src:be.text,className:Ge.imageCell,alt:""}),Z&&d.createElement(v.e,{style:{height:"100%"},links:()=>(0,b.k)(Xe,xe)||[]},de=>{const ve=d.createElement("img",{src:be.text,className:Ge.imageCell,alt:""});return de.openMenu?d.createElement(x.$n,{className:(0,y.cx)(ae),onClick:de.openMenu},ve):ve}))};function Y(Ke){const{cell:Xe,tableStyles:He,cellProps:Ge,field:xe,row:$e}=Ke,be=!!xe.config.custom?.inspect,Z=(0,y.css)({cursor:"pointer",fontFamily:"monospace"});let ae=Xe.value,de=ae;if((0,t.isString)(ae))try{ae=JSON.parse(ae)}catch{}else de=JSON.stringify(ae,null," ");const ve=!!(0,b.k)(xe,$e)?.length,Ue=(0,T.of)(x.Ez);return d.createElement("div",{...Ge,className:be?He.cellContainerNoOverflow:He.cellContainer},d.createElement("div",{className:(0,y.cx)(He.cellText,Z)},!ve&&d.createElement("div",{className:He.cellText},de),ve&&d.createElement(v.e,{links:()=>(0,b.k)(xe,$e)||[]},_e=>_e.openMenu?d.createElement(x.$n,{className:(0,y.cx)(Ue),onClick:_e.openMenu},de):d.createElement(d.Fragment,null,de))),be&&d.createElement(H,{...Ke,previewMode:"code"}))}var ee=e(14578);function re({row:Ke,tableStyles:Xe}){return d.createElement("div",{className:Xe.expanderCell,...Ke.getToggleRowExpandedProps()},d.createElement(ee.I,{"aria-label":Ke.isExpanded?"Collapse row":"Expand row",name:Ke.isExpanded?"angle-down":"angle-right",size:"lg"}))}var J=e(30355);const ne=50;function q(Ke){if(!Ke)return"flex-start";if(Ke.config.custom)switch(Ke.config.custom.align){case"right":return"flex-end";case"left":return"flex-start";case"center":return"center"}return Ke.type===s.PU.number?"flex-end":"flex-start"}function te(Ke,Xe,He,Ge,xe,$e){const be=[];let Z=0;Ge&&(be.push({Header:()=>null,id:"expander",Cell:re,width:ne,minWidth:ne,filter:(de,ve,Ue)=>[],justifyContent:"left",field:Ke.fields[0],sortType:"basic"}),Xe-=ne);for(const[de,ve]of Ke.fields.entries()){const Ue=ve.config.custom||{};if(Ue.hidden||ve.type===s.PU.nestedFrames)continue;Ue.width?Xe-=Ue.width:Z++;const _e=Ve=>{switch(Ve){case s.PU.number:case s.PU.frame:return"number";case s.PU.time:return"basic";default:return"alphanumeric-insensitive"}},ze=oe(Ue.cellOptions?.type,ve);be.push({Cell:ze,id:de.toString(),field:ve,Header:Ue.hideHeader?"":(0,r.Ct)(ve,Ke),accessor:(Ve,Ne)=>ve.values[Ne],sortType:_e(ve.type),width:Ue.width,minWidth:Ue.minWidth??He,filter:o()(ue(ve)),justifyContent:q(ve),Footer:(0,G.d)(de,xe,$e)})}let ae=Xe/Z;for(let de=Z;de>0;de--)for(const ve of be)!ve.width&&ve.minWidth>ae&&(ve.width=ve.minWidth,Xe-=ve.width,Z-=1,ae=Xe/Z);for(const de of be)de.width||(de.width=ae),de.minWidth=50;return be}function oe(Ke,Xe){switch(Ke){case f.ob.Custom:case f.ob.ColorText:case f.ob.ColorBackground:return w;case f.ob.Image:return k;case f.ob.Gauge:return D;case f.ob.Sparkline:return J.a;case f.ob.JSONView:return Y;case f.ob.DataLinks:return C}if(Xe.type===s.PU.geo)return j;if(Xe.type===s.PU.frame){const He=Xe.values[0];return(0,g.ci)(He)&&(0,u.aH)(He)?J.a:Y}return Xe.type===s.PU.other?Y:w}function ue(Ke){return function(Xe,He,Ge){return Xe.length===0||!Ge||!Ke?Xe:Xe.filter(xe=>{if(!xe.values.hasOwnProperty(He))return!1;const $e=ge(xe,Ke);return Ge.find(be=>be.value===$e)!==void 0})}}function ie(Ke,Xe){if(!Xe||Ke.length===0)return{};const He={};for(let Ge=0;GeXe.concat({value:Ke[He],label:He}),[]).sort(De)}function De(Ke,Xe){return Ke.label===void 0&&Xe.label===void 0?0:Ke.label===void 0&&Xe.label!==void 0?-1:Ke.label!==void 0&&Xe.label===void 0?1:Ke.labelXe.label?1:0}function pe(Ke,Xe){return Xe?Ke.filter(He=>Xe.some(Ge=>Ge.value===He.value)):[]}function le(Ke,Xe,He){return String(Ke.values[He]).localeCompare(String(Xe.values[He]),void 0,{sensitivity:"base"})}function Te(Ke,Xe,He){const Ge=Ee(Ke.values[He]),xe=Ee(Xe.values[He]);return Ge===xe?0:Ge>xe?1:-1}function Ee(Ke){return(0,g.LI)(Ke)?Ke.value??Number.NEGATIVE_INFINITY:Ke==null||Ke===""||isNaN(Ke)?Number.NEGATIVE_INFINITY:typeof Ke=="number"?Ke:Number(Ke)}function Re(Ke,Xe,He,Ge){return Be(Ke),Ke.map((xe,$e)=>{if(xe?.field?.type!==s.PU.number)return $e===0&&He.reducer&&He.reducer.length>0?i.AS.get(He.reducer[0]).name:void 0;let be=(0,t.clone)(xe.field);return be.values=Xe[xe.id],be.state=void 0,xe.field=be,He.fields&&He.fields.length>0?He.fields.find(ae=>ae===xe?.field?.name)?me(xe.field,He.reducer,Ge):void 0:me(xe.field,He.reducer||[],Ge)})}function me(Ke,Xe,He){const Ge=Ke.display??(0,l.J)({field:Ke,theme:He}),xe=Xe[0],$e=(0,i.Nw)({field:Ke,reducers:Xe})[xe];return(0,c.cN)(Ge($e))}function Me(Ke){const Xe=[];for(const He in Ke)for(const[Ge,xe]of Object.entries(Ke[He].values))Xe[Ge]===void 0&&(Xe[Ge]=[]),Xe[Ge].push(xe);return Xe}const ye={type:f.ob.Auto};function Le(Ke){return Ke.config.custom?.displayMode?We(Ke.config.custom?.displayMode):Ke.config.custom?.cellOptions?Ke.config.custom.cellOptions:ye}function We(Ke){switch(Ke){case"basic":case"gradient-gauge":case"lcd-gauge":let Xe=f.eX.Basic;return Ke==="gradient-gauge"?Xe=f.eX.Gradient:Ke==="lcd-gauge"&&(Xe=f.eX.Lcd),{type:f.ob.Gauge,mode:Xe};case"color-background":case"color-background-solid":let He=f.Wq.Basic;return Ke==="color-background"&&(He=f.Wq.Gradient),{type:f.ob.ColorBackground,mode:He};default:return{type:Ke}}}function Be(Ke){const Xe=Ke.findIndex((He,Ge)=>He?.id!==String(Ge));Xe===-1||Ke[Xe]?.id==="expander"||(Ke.splice(Xe,0,{id:String(Xe)}),Be(Ke))}function Ye(Ke,Xe,He){let Ge=Ke.state?.alignmentFactors;if(Ge)return Ge.text.lengthGe.text.length&&(Ge.text=Xe.text);return Ke.state?Ke.state.alignmentFactors=Ge:Ke.state={alignmentFactors:Ge},Ge}}function at(Ke,Xe,He){return Math.abs(Math.floor(Ke)-Xe)Xe&&(Xe=xe),xe{"use strict";e.d(A,{b:()=>f});var t=e(32196),n=e(2543),o=e.n(n),s=e(96540),r=e(72436),g=e(40845),u=e(3911),c=e(14578),i=e(21744);class l extends s.PureComponent{constructor(p){super(p),this.readCSV=(0,n.debounce)(()=>{const{config:v}=this.props,{text:E}=this.state;this.setState({data:(0,r.Jh)(E,{config:v})})},150),this.onTextChange=v=>{this.setState({text:v.target.value})};const{text:m,config:a}=p;this.state={text:m,data:(0,r.Jh)(m,{config:a})}}componentDidUpdate(p,m){const{text:a}=this.state;(a!==m.text||this.props.config!==p.config)&&this.readCSV(),this.props.text!==p.text&&this.props.text!==a&&this.setState({text:this.props.text}),this.state.data!==m.data&&this.props.onSeriesParsed(this.state.data,this.state.text)}render(){const{width:p,height:m,theme:a}=this.props,{data:v}=this.state,E=d(a);return s.createElement("div",{className:E.tableInputCsv},s.createElement(i.f,{style:{width:p,height:m},placeholder:"Enter CSV here...",value:this.state.text,onChange:this.onTextChange,className:E.textarea}),v&&s.createElement("footer",{className:E.footer},v.map((D,b)=>s.createElement("span",{key:b},"Rows:",D.length,", Columns:",D.fields.length," \xA0",s.createElement(c.I,{name:"check-circle"})))))}}const f=(0,g.cV)(l);f.displayName="TableInputCSV";const d=(0,u.N)(h=>({tableInputCsv:(0,t.css)({position:"relative"}),textarea:(0,t.css)({height:"100%",width:"100%"}),footer:(0,t.css)({position:"absolute",bottom:"15px",right:"15px",border:"1px solid #222",background:h.colors.success.main,padding:`1px ${h.spacing(.5)}`,fontSize:"80%"})}))},53402:(Q,A,e)=>{"use strict";e.d(A,{p:()=>r});var t=e(32196),n=e(96540),o=e(83195),s=e(40845);const r=({value:u})=>{const c=(0,s.of)(g);return n.createElement("span",{className:c.counter},(0,o.Hg)(u,0).text)},g=u=>({counter:(0,t.css)({label:"counter",marginLeft:u.spacing(1),borderRadius:u.spacing(3),backgroundColor:u.colors.action.hover,padding:u.spacing(.25,1),color:u.colors.text.secondary,fontWeight:u.typography.fontWeightMedium,fontSize:u.typography.size.sm})})},40675:(Q,A,e)=>{"use strict";e.d(A,{o:()=>i});var t=e(32196),n=e(96540),o=e(13544),s=e(40845),r=e(16797),g=e(55852),u=e(14578),c=e(53402);const i=n.forwardRef(({label:f,active:d,icon:h,onChangeTab:p,counter:m,suffix:a,className:v,href:E,...D},b)=>{const C=(0,s.of)(l),y=(0,s.of)(g.my),M=()=>n.createElement(n.Fragment,null,h&&n.createElement(u.I,{name:h}),f,typeof m=="number"&&n.createElement(c.p,{value:m}),a&&n.createElement(a,{className:C.suffix})),I={className:(0,t.cx)(y,C.link,d?C.activeStyle:C.notActive),...D,onClick:p,"aria-label":D["aria-label"]||o.Tp.components.Tab.title(f),role:"tab","aria-selected":d};return E?n.createElement("div",{className:C.item},n.createElement("a",{...I,href:E,ref:b},M())):n.createElement("div",{className:C.item},n.createElement("button",{...I,type:"button",ref:b},M()))});i.displayName="Tab";const l=f=>({item:(0,t.css)({listStyle:"none",position:"relative",display:"flex",whiteSpace:"nowrap",padding:f.spacing(.5)}),link:(0,t.css)({color:f.colors.text.secondary,padding:f.spacing(1,1.5,.5),borderRadius:f.shape.radius.default,display:"block",height:"100%",svg:{marginRight:f.spacing(1)},"&:focus-visible":(0,r.getFocusStyles)(f),"&::before":{display:"block",content:'" "',position:"absolute",left:0,right:0,height:"4px",borderRadius:f.shape.radius.default,bottom:0}}),notActive:(0,t.css)({"a:hover, &:hover, &:focus":{color:f.colors.text.primary,"&::before":{backgroundColor:f.colors.action.hover}}}),activeStyle:(0,t.css)({label:"activeTabStyle",color:f.colors.text.primary,overflow:"hidden","&::before":{backgroundImage:f.colors.gradients.brandHorizontal}}),suffix:(0,t.css)({marginLeft:f.spacing(1)})})},40980:(Q,A,e)=>{"use strict";e.d(A,{J:()=>s});var t=e(32196),n=e(96540),o=e(40845);const s=({children:g,className:u,...c})=>{const i=(0,o.of)(r);return n.createElement("div",{...c,className:(0,t.cx)(i.tabContent,u)},g)},r=g=>({tabContent:(0,t.css)({background:g.colors.background.primary})})},63021:(Q,A,e)=>{"use strict";e.d(A,{U:()=>s});var t=e(32196),n=e(96540),o=e(40845);const s=n.forwardRef(({children:g,className:u,hideBorder:c=!1},i)=>{const l=(0,o.of)(r);return n.createElement("div",{className:(0,t.cx)(l.tabsWrapper,c&&l.noBorder,u),ref:i},n.createElement("div",{className:l.tabs,role:"tablist"},g))}),r=g=>({tabsWrapper:(0,t.css)({borderBottom:`1px solid ${g.colors.border.weak}`,overflowX:"auto"}),noBorder:(0,t.css)({borderBottom:0}),tabs:(0,t.css)({position:"relative",display:"flex",height:`${g.components.menuTabs.height}px`,alignItems:"center"})});s.displayName="TabsBar"},90685:(Q,A,e)=>{"use strict";e.d(A,{s:()=>u});var t=e(32196),n=e(96540),o=e(13544),s=e(40845),r=e(14578),g=e(53402);const u=n.forwardRef(({label:i,active:l,icon:f,counter:d,className:h,suffix:p,onChangeTab:m,href:a,...v},E)=>{const D=(0,s.of)(c),b=()=>n.createElement(n.Fragment,null,f&&n.createElement(r.I,{name:f}),i,typeof d=="number"&&n.createElement(g.p,{value:d}),p&&n.createElement(p,{className:D.suffix})),C=(0,t.cx)(D.link,l&&D.activeStyle);return n.createElement("a",{href:a,className:C,...v,onClick:m,"aria-label":v["aria-label"]||o.Tp.components.Tab.title(i),role:"tab","aria-selected":l,ref:E},b())});u.displayName="Tab";const c=i=>({link:(0,t.css)({padding:"6px 12px",display:"block",height:"100%",cursor:"pointer",position:"relative",color:i.colors.text.primary,svg:{marginRight:i.spacing(1)},"&:hover, &:focus":{textDecoration:"underline"}}),activeStyle:(0,t.css)({label:"activeTabStyle",color:i.colors.text.maxContrast,overflow:"hidden","&::before":{display:"block",content:'" "',position:"absolute",left:0,width:"4px",bottom:"2px",top:"2px",borderRadius:i.shape.radius.default,backgroundImage:"linear-gradient(0deg, #f05a28 30%, #fbca0a 99%)"}}),suffix:(0,t.css)({marginLeft:i.spacing(1)})})},78369:(Q,A,e)=>{"use strict";e.d(A,{v:()=>l});var t=e(32196),n=e(96540),o=e(70255),s=e(40845),r=e(69613),g=e(72129),u=e(14578);const c=(0,n.forwardRef)(({name:h,onClick:p,icon:m,className:a,colorIndex:v,...E},D)=>{const b=(0,s.$j)(),C=d(b,h,v),y=T=>{T.preventDefault(),T.stopPropagation(),p?.(h,T)},M=(0,t.cx)(C.wrapper,a,{[C.hover]:p!==void 0});return p?n.createElement("button",{...E,className:M,onClick:y,ref:D},m&&n.createElement(u.I,{name:m}),h):n.createElement("span",{...E,className:M,ref:D},m&&n.createElement(u.I,{name:m}),h)});c.displayName="Tag";const i=({rootProps:h})=>{const p=(0,s.of)(f);return n.createElement(o.A,{width:60,height:22,containerClassName:p.container,...h})},l=(0,g.j)(c,i),f=()=>({container:(0,t.css)({lineHeight:1})}),d=(h,p,m)=>{let a;return m===void 0?a=(0,r.MC)(p):a=(0,r.yC)(m),{wrapper:(0,t.css)({appearance:"none",borderStyle:"none",fontWeight:h.typography.fontWeightMedium,fontSize:h.typography.size.sm,lineHeight:h.typography.bodySmall.lineHeight,verticalAlign:"baseline",backgroundColor:a.color,color:h.v1.palette.gray98,whiteSpace:"nowrap",textShadow:"none",padding:"3px 6px",borderRadius:h.shape.radius.default}),hover:(0,t.css)({"&:hover":{opacity:.85,cursor:"pointer"}})}}},64149:(Q,A,e)=>{"use strict";e.d(A,{L:()=>c});var t=e(32196),n=e(96540),o=e(40845),s=e(72129),r=e(78369);const g=(0,n.memo)((0,n.forwardRef)(({displayMax:f,tags:d,icon:h,onClick:p,className:m,getAriaLabel:a,getColorIndex:v},E)=>{const D=(0,o.$j)(),b=l(D,!!(f&&f>0)),C=d.length,y=f?d.slice(0,f):d;return n.createElement("ul",{className:(0,t.cx)(b.wrapper,m),"aria-label":"Tags",ref:E},y.map((M,T)=>n.createElement("li",{className:b.li,key:M},n.createElement(r.v,{name:M,icon:h,onClick:p,"aria-label":a?.(M,T),"data-tag-id":T,colorIndex:v?.(M,T)}))),f&&f>0&&C-f>0&&n.createElement("span",{className:b.moreTagsLabel},"+ ",C-f))}));g.displayName="TagList";const u=({rootProps:f})=>{const d=(0,o.of)(i);return n.createElement("div",{className:d.container,...f},n.createElement(r.v.Skeleton,null),n.createElement(r.v.Skeleton,null))},c=(0,s.j)(g,u),i=f=>({container:(0,t.css)({display:"flex",gap:f.spacing(1)})}),l=(f,d)=>({wrapper:(0,t.css)({position:"relative",alignItems:d?"center":"unset",display:"flex",flex:"1 1 auto",flexWrap:"wrap",flexShrink:d?0:1,justifyContent:"flex-end",gap:"6px"}),moreTagsLabel:(0,t.css)({color:f.colors.text.secondary,fontSize:f.typography.size.sm}),li:(0,t.css)({listStyle:"none"})})},79924:(Q,A,e)=>{"use strict";e.d(A,{u:()=>l});var t=e(32196),n=e(96540),o=e(40845),s=e(55852),r=e(10354),g=e(69613),u=e(29158);const c=({name:d,disabled:h,onRemove:p})=>{const{color:m,borderColor:a}=(0,n.useMemo)(()=>(0,g.MC)(d),[d]),v=(0,o.of)(i);return n.createElement("li",{className:v.itemStyle,style:{backgroundColor:m,borderColor:a}},n.createElement("span",{className:v.nameStyle},d),n.createElement(u.K,{name:"times",size:"lg",disabled:h,tooltip:`Remove "${d}" tag`,onClick:()=>p(d),className:v.buttonStyles}))},i=d=>{const h=d.spacing.gridSize*3;return{itemStyle:(0,t.css)({display:"flex",gap:"3px",alignItems:"center",height:`${h}px`,lineHeight:`${h-2}px`,color:"#fff",borderWidth:"1px",borderStyle:"solid",borderRadius:d.shape.radius.default,padding:`0 ${d.spacing(.5)}`,whiteSpace:"nowrap",textShadow:"none",fontWeight:500,fontSize:d.typography.size.sm}),nameStyle:(0,t.css)({maxWidth:"25ch",textOverflow:"ellipsis",overflow:"hidden"}),buttonStyles:(0,t.css)({margin:0,"&:hover::before":{display:"none"}})}},l=({placeholder:d="New tag (enter key to add)",tags:h=[],onChange:p,width:m,className:a,disabled:v,addOnBlur:E,invalid:D,id:b})=>{const[C,y]=(0,n.useState)(""),M=(0,o.of)(f),T=(0,o.$j)(),I=(0,n.useCallback)(L=>{y(L.target.value)},[]),x=L=>{p(h.filter(U=>U!==L))},S=L=>{L?.preventDefault(),h.includes(C)||p(h.concat(C)),y("")},O=()=>{E&&C&&S()},P=L=>{L.key==="Enter"&&C!==""&&S(L)};return n.createElement("div",{className:(0,t.cx)(M.wrapper,a,m?(0,t.css)({width:T.spacing(m)}):"")},n.createElement(r.p,{id:b,disabled:v,placeholder:d,onChange:I,value:C,onKeyDown:P,onBlur:O,invalid:D,suffix:n.createElement(s.$n,{fill:"text",className:M.addButtonStyle,onClick:S,size:"md",disabled:C.length<=0},"Add")}),h?.length>0&&n.createElement("ul",{className:M.tags},h.map(L=>n.createElement(c,{key:L,name:L,onRemove:x,disabled:v}))))},f=d=>({wrapper:(0,t.css)({minHeight:d.spacing(4),display:"flex",flexDirection:"column",gap:d.spacing(1),flexWrap:"wrap"}),tags:(0,t.css)({display:"flex",justifyContent:"flex-start",flexWrap:"wrap",gap:d.spacing(.5)}),addButtonStyle:(0,t.css)({margin:`0 -${d.spacing(1)}`})})},94753:(Q,A,e)=>{"use strict";e.d(A,{E:()=>c});var t=e(32196),n=e(96540),o=e(40845),s=e(65848),r=e(56034);const g=n.forwardRef(({childElement:l,children:f},d)=>{const[h,p]=(0,n.useState)(!1),m=(0,n.useRef)(null);(0,n.useImperativeHandle)(d,()=>m.current);const a=(0,n.useMemo)(()=>new ResizeObserver(E=>{for(const D of E)D.target.clientWidth&&D.target.scrollWidth&&(D.target.scrollWidth>D.target.clientWidth&&p(!0),D.target.scrollWidth<=D.target.clientWidth&&p(!1))}),[]);(0,n.useEffect)(()=>{const{current:E}=m;return E&&a.observe(E),()=>{a.disconnect()}},[p,a]);const v=E=>typeof E=="string"?E:s.renderToStaticMarkup(n.createElement(n.Fragment,null,E)).replace(/(<([^>]+)>)/gi,"");return h?n.createElement(r.m,{ref:m,content:v(f)},l(void 0)):l(m)});g.displayName="TruncatedText";var u=e(71356);const c=n.forwardRef(({element:l="span",variant:f,weight:d,color:h,truncate:p,italic:m,textAlignment:a,children:v,...E},D)=>{const b=(0,o.of)(i,l,f,h,d,p,m,a),C=y=>(0,n.createElement)(l,{...E,style:void 0,className:b,ref:y},v);return!p||l==="span"?C(void 0):n.createElement(g,{childElement:C,children:v,ref:D})});c.displayName="Text";const i=(l,f,d,h,p,m,a,v)=>(0,t.css)([{margin:0,padding:0,...(0,u.d$)(l,f,d)},d&&{...l.typography[d]},h&&{color:(0,u.vT)(h,l)},p&&{fontWeight:(0,u.iV)(p,l)},m&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},a&&{fontStyle:"italic"},v&&{textAlign:v}])},71356:(Q,A,e)=>{"use strict";e.d(A,{d$:()=>o,iV:()=>t,vT:()=>n});const t=(s,r)=>{switch(s){case"bold":return r.typography.fontWeightBold;case"medium":return r.typography.fontWeightMedium;case"light":return r.typography.fontWeightLight;case"regular":case void 0:return r.typography.fontWeightRegular}},n=(s,r)=>{switch(s){case"error":return r.colors.error.text;case"success":return r.colors.success.text;case"info":return r.colors.info.text;case"warning":return r.colors.warning.text;default:return s?r.colors.text[s]:void 0}},o=(s,r,g)=>{if(g)return s.typography[g];switch(r){case"span":return;case"h1":return s.typography.h1;case"h2":return s.typography.h2;case"h3":return s.typography.h3;case"h4":return s.typography.h4;case"h5":return s.typography.h5;case"h6":return s.typography.h6;default:return s.typography.body}}},21744:(Q,A,e)=>{"use strict";e.d(A,{f:()=>r});var t=e(32196),n=e(96540),o=e(40845),s=e(87266);const r=n.forwardRef(({invalid:u,className:c,...i},l)=>{const f=(0,o.of)(g,u);return n.createElement("textarea",{...i,className:(0,t.cx)(f.textarea,c),ref:l})}),g=(u,c=!1)=>({textarea:(0,t.cx)((0,s.Xb)(u),(0,s.gm)(u),(0,t.css)({display:"block",borderRadius:u.shape.radius.default,padding:`${u.spacing.gridSize/4}px ${u.spacing.gridSize}px`,width:"100%",borderColor:c?u.colors.error.border:u.components.input.borderColor}))});r.displayName="TextArea"},60782:(Q,A,e)=>{"use strict";e.d(A,{G:()=>l});var t=e(32196),n=e(95361),o=e(18491),s=e(34743),r=e(36376),g=e(96540),u=e(40845),c=e(18976),i=e(29158);const l=g.memo(({children:d,theme:h="info",placement:p="auto",content:m,title:a,closeButton:v=!0,onClose:E,footer:D,fitContent:b=!1,onOpen:C,show:y})=>{const M=(0,g.useRef)(null),T=(0,u.$j)(),I=(0,u.of)(f),x=I[h],[S,O]=(0,g.useState)(y),P=y??S,L=[(0,n.cY)(8),(0,o.UU)({fallbackAxisSideDirection:"end",crossAxis:!1,boundary:document.body}),(0,o.BN)(),(0,s.UE)({element:M})],{context:U,refs:R,floatingStyles:B}=(0,r.we)({open:P,placement:(0,c.O)(p),onOpenChange:G=>{y===void 0&&O(G),G?C?.():E?.()},middleware:L,whileElementsMounted:o.ll,strategy:"fixed"}),H=(0,r.kp)(U),w=(0,r.s9)(U),{getReferenceProps:N,getFloatingProps:V}=(0,r.bv)([w,H]);return g.createElement(g.Fragment,null,g.cloneElement(d,{ref:R.setReference,tabIndex:0,"aria-expanded":P,...N()}),P&&g.createElement(r.s3,{context:U,modal:!1,closeOnFocusOut:!1},g.createElement("div",{"data-testid":"toggletip-content",className:(0,t.cx)(x.container,{[I.fitContent]:b}),ref:R.setFloating,style:B,...V()},g.createElement(r.ie,{strokeWidth:.3,stroke:T.colors.border.weak,className:x.arrow,ref:M,context:U}),!!a&&g.createElement("div",{className:x.header},a),v&&g.createElement("div",{className:x.headerClose},g.createElement(i.K,{"aria-label":"Close",name:"times","data-testid":"toggletip-header-close",onClick:()=>{O(!1),E?.()}})),g.createElement("div",{className:x.body},(typeof m=="string"||g.isValidElement(m))&&m,typeof m=="function"&&m({})),!!D&&g.createElement("div",{className:x.footer},D))))});l.displayName="Toggletip";const f=d=>{const h=(0,c.f)(d,d.colors.background.primary,d.colors.border.weak,d.components.tooltip.text,{topBottom:2,rightLeft:2}),p=(0,c.f)(d,d.colors.error.main,d.colors.error.main,d.colors.error.contrastText,{topBottom:2,rightLeft:2});return{info:h,error:p,fitContent:(0,t.css)({maxWidth:"fit-content"})}}},27746:(Q,A,e)=>{"use strict";e.d(A,{I:()=>l});var t=e(32196),n=e(96540),o=e(8887),s=e(13544),r=e(40845),g=e(16797),u=e(55852),c=e(14578),i=e(56034);const l=(0,n.forwardRef)(({tooltip:p,icon:m,iconSize:a,className:v,children:E,imgSrc:D,imgAlt:b,fullWidth:C,isOpen:y,narrow:M,variant:T="default",iconOnly:I,"aria-label":x,isHighlighted:S,...O},P)=>{const L=(0,r.of)(h),U=(0,t.cx)({[L.button]:!0,[L.buttonFullWidth]:C,[L.narrow]:M},L[T],v),R=(0,t.cx)({[L.content]:!0,[L.contentWithIcon]:!!m,[L.contentWithRightIcon]:y!==void 0}),B=n.createElement("button",{ref:P,className:U,"aria-label":f(x,p),"aria-expanded":y,...O},d(m,a),D&&n.createElement("img",{className:L.img,src:D,alt:b??""}),E&&!I&&n.createElement("div",{className:R},E),y===!1&&n.createElement(c.I,{name:"angle-down"}),y===!0&&n.createElement(c.I,{name:"angle-up"}),S&&n.createElement("div",{className:L.highlight}));return p?n.createElement(i.m,{ref:P,content:p,placement:"bottom"},B):B});l.displayName="ToolbarButton";function f(p,m){return p||(m?s.Tp.components.PageToolbar.item(m):void 0)}function d(p,m){return p?(0,o.n6)(p)?n.createElement(c.I,{name:p,size:`${m||"lg"}`}):p:null}const h=p=>{const m=(0,u.U_)(p,"primary","solid"),a=(0,u.U_)(p,"destructive","solid"),v=(0,t.css)({color:p.colors.text.primary,background:p.colors.secondary.main,"&:hover":{color:p.colors.text.primary,background:p.colors.secondary.shade,border:`1px solid ${p.colors.border.medium}`}});return{button:(0,t.css)({label:"toolbar-button",position:"relative",display:"flex",alignItems:"center",height:p.spacing(p.components.height.md),padding:p.spacing(0,1),borderRadius:p.shape.radius.default,lineHeight:`${p.components.height.md*p.spacing.gridSize-2}px`,fontWeight:p.typography.fontWeightMedium,border:`1px solid ${p.colors.secondary.border}`,whiteSpace:"nowrap",transition:p.transitions.create(["background","box-shadow","border-color","color"],{duration:p.transitions.duration.short}),"&:focus, &:focus-visible":{...(0,g.getFocusStyles)(p),zIndex:1},"&:focus:not(:focus-visible)":(0,g.getMouseFocusStyles)(p),"&:hover":{boxShadow:p.shadows.z1},"&[disabled], &:disabled":{cursor:"not-allowed",opacity:p.colors.action.disabledOpacity,background:p.colors.action.disabledBackground,boxShadow:"none","&:hover":{color:p.colors.text.disabled,background:p.colors.action.disabledBackground,boxShadow:"none"}}}),default:(0,t.css)({color:p.colors.text.secondary,background:"transparent",border:"1px solid transparent","&:hover":{color:p.colors.text.primary,background:p.colors.background.secondary}}),canvas:v,active:(0,t.cx)(v,(0,t.css)({"&::before":{display:"block",content:'" "',position:"absolute",left:0,right:0,height:"2px",bottom:0,borderRadius:p.shape.radius.default,backgroundImage:p.colors.gradients.brandHorizontal}})),primary:(0,t.css)(m),destructive:(0,t.css)(a),narrow:(0,t.css)({padding:p.spacing(0,.5)}),img:(0,t.css)({width:"16px",height:"16px",marginRight:p.spacing(1)}),buttonFullWidth:(0,t.css)({flexGrow:1}),content:(0,t.css)({flexGrow:1}),contentWithIcon:(0,t.css)({display:"none",paddingLeft:p.spacing(1),[`@media ${g.mediaUp(p.v1.breakpoints.md)}`]:{display:"block"}}),contentWithRightIcon:(0,t.css)({paddingRight:p.spacing(.5)}),highlight:(0,t.css)({backgroundColor:p.colors.success.main,borderRadius:p.shape.radius.circle,width:"6px",height:"6px",position:"absolute",top:"-3px",right:"-3px",zIndex:1})}}},15068:(Q,A,e)=>{"use strict";e.d(A,{U:()=>i});var t=e(32196),n=e(80279),o=e(7887),s=e(82148),r=e(96540),g=e(40845),u=e(17464),c=e(27746);const i=(0,r.forwardRef)(({alignment:f="left",className:d,children:h,...p},m)=>{const a=r.Children.toArray(h).filter(P=>P!=null),[v,E]=(0,r.useState)(Array(a.length).fill(!1)),D=(0,r.useRef)(null),[b,C]=(0,r.useState)(!1),y=(0,r.useRef)(null),M=(0,r.createRef)(),{overlayProps:T}=(0,s.e)({onClose:()=>C(!1),isDismissable:!0,isOpen:b,shouldCloseOnInteractOutside:P=>{const L=(0,u.gF)();return!y.current?.contains(P)&&!L.contains(P)}},M),{dialogProps:I}=(0,n.s)({},M),x=(0,g.$j)(),S=f==="left"?v.indexOf(!1)-1:v.length,O=l(x,S,f);return(0,r.useLayoutEffect)(()=>{const P=new IntersectionObserver(L=>{L.forEach(U=>{if(U.target instanceof HTMLElement&&U.target.parentNode){const R=Array.prototype.indexOf.call(U.target.parentNode.children,U.target);E(B=>{const H=[...B];return H[R]=U.isIntersecting,H})}})},{threshold:1,root:D.current});return D.current&&Array.from(D.current.children).forEach(L=>{L instanceof HTMLElement&&L!==y.current&&P.observe(L)}),()=>P.disconnect()},[h]),r.createElement("div",{ref:D,className:(0,t.cx)(O.container,d),...p},a.map((P,L)=>r.createElement("div",{key:L,style:{order:L,visibility:v[L]?"visible":"hidden"},className:O.childWrapper},P)),v.includes(!1)&&r.createElement("div",{ref:y,className:O.overflowButton},r.createElement(c.I,{variant:b?"active":"default",tooltip:"Show more items",onClick:()=>C(!b),icon:"ellipsis-v",iconOnly:!0,narrow:!0}),b&&r.createElement(o.n1,{contain:!0,autoFocus:!0},r.createElement("div",{className:O.overflowItems,ref:M,...T,...I},a.map((P,L)=>!v[L]&&P)))))});i.displayName="ToolbarButtonRow";const l=(f,d,h)=>({overflowButton:(0,t.css)({order:d}),overflowItems:(0,t.css)({alignItems:"center",backgroundColor:f.colors.background.primary,borderRadius:f.shape.radius.default,boxShadow:f.shadows.z2,display:"flex",flexWrap:"wrap",gap:f.spacing(1),marginTop:f.spacing(1),maxWidth:"80vw",padding:f.spacing(.5,1),position:"absolute",right:0,top:"100%",width:"max-content",zIndex:f.zIndex.dropdown}),container:(0,t.css)({alignItems:"center",display:"flex",gap:f.spacing(1),justifyContent:h==="left"?"flex-start":"flex-end",minWidth:0,position:"relative"}),childWrapper:(0,t.css)({alignItems:"center",display:"flex",gap:f.spacing(1)})})},13840:(Q,A,e)=>{"use strict";e.d(A,{A:()=>c});var t=e(96540),n=e(16802),o=e(69703),s=e(22669),r=e(17464);const g={transitionProperty:"opacity",transitionDuration:"200ms",transitionTimingFunction:"linear",opacity:0},u={exited:{opacity:0},entering:{opacity:0},entered:{opacity:1,transitionDelay:"0s"},exiting:{opacity:0,transitionDelay:"500ms"}};class c extends t.PureComponent{render(){const{content:l,show:f,placement:d,className:h,wrapperClassName:p,renderArrow:m,referenceElement:a,...v}=this.props;return t.createElement(n.mS,null,t.createElement(s.Ay,{in:f,timeout:100,mountOnEnter:!0,unmountOnExit:!0},E=>t.createElement(r.ZL,null,t.createElement(o.N,{placement:d,referenceElement:a,modifiers:[{name:"preventOverflow",enabled:!0,options:{rootBoundary:"viewport"}},{name:"eventListeners",options:{scroll:!0,resize:!0}}]},({ref:D,style:b,placement:C,arrowProps:y,update:M})=>t.createElement("div",{ref:D,style:{...b,...g,...u[E]},"data-placement":C,className:`${p}`,...v},t.createElement("div",{className:h},typeof l=="string"&&l,t.isValidElement(l)&&t.cloneElement(l),typeof l=="function"&&l({updatePopperPosition:M}),m&&m({arrowProps:y,placement:C})))))))}}},95868:(Q,A,e)=>{"use strict";e.d(A,{I:()=>n});var t=e(96540);class n extends t.Component{constructor(){super(...arguments),this.hideTimeout=null,this.state={show:!1},this.showPopper=()=>{this.hideTimeout&&clearTimeout(this.hideTimeout),this.setState({show:!0})},this.hidePopper=()=>{this.hideTimeout=setTimeout(()=>{this.setState({show:!1})},this.props.hideAfter)}}render(){const{children:s,content:r,placement:g="auto"}=this.props,{show:u}=this.state;return s(this.showPopper,this.hidePopper,{show:u,placement:g,content:r})}}},56034:(Q,A,e)=>{"use strict";e.d(A,{m:()=>l});var t=e(95361),n=e(18491),o=e(34743),s=e(36376),r=e(96540),g=e(13544),u=e(40845),c=e(18976),i=e(17464);const l=r.forwardRef(({children:d,theme:h,interactive:p,show:m,placement:a,content:v},E)=>{const D=(0,r.useRef)(null),[b,C]=(0,r.useState)(m),y=m??b,M=[(0,t.cY)(8),(0,n.UU)({fallbackAxisSideDirection:"end",crossAxis:!1,boundary:document.body}),(0,n.BN)(),(0,o.UE)({element:D})],{context:T,refs:I,floatingStyles:x}=(0,s.we)({open:y,placement:(0,c.O)(a),onOpenChange:C,middleware:M,whileElementsMounted:n.ll}),S=(0,r.useId)(),O=(0,s.Mk)(T,{delay:{close:p?100:0},move:!1}),P=(0,s.iQ)(T),L=(0,s.s9)(T),{getReferenceProps:U,getFloatingProps:R}=(0,s.bv)([L,O,P]),B=typeof v=="function",w=(0,u.of)(f)[h??"info"],N=(0,r.useCallback)(G=>{I.setReference(G),typeof E=="function"?E(G):E&&(E.current=G)},[E,I]),V="aria-label"in d.props&&d.props["aria-label"]===v;return r.createElement(r.Fragment,null,r.cloneElement(d,{ref:N,tabIndex:0,"aria-describedby":!V&&y?S:void 0,...U()}),y&&r.createElement(i.ZL,null,r.createElement("div",{ref:I.setFloating,style:x,...R()},r.createElement(s.ie,{className:w.arrow,ref:D,context:T}),r.createElement("div",{"data-testid":g.Tp.components.Tooltip.container,id:S,role:"tooltip",className:w.container},typeof v=="string"&&v,r.isValidElement(v)&&r.cloneElement(v),B&&v({})))))});l.displayName="Tooltip";const f=d=>{const h=(0,c.f)(d,d.components.tooltip.background,d.components.tooltip.background,d.components.tooltip.text,{topBottom:.5,rightLeft:1}),p=(0,c.f)(d,d.colors.error.main,d.colors.error.main,d.colors.error.contrastText,{topBottom:.5,rightLeft:1});return{info:h,["info-alt"]:h,error:p}}},5313:(Q,A,e)=>{"use strict";e.d(A,{z:()=>o});var t=e(96540);function n(s,r){const g=[];return s.forEach(u=>{g.push(u.start,u.end+1)}),g[0]!==0&&g.unshift(0),g[g.length-1]!==r&&g.push(r),g}const o=s=>{let{highlightParts:r,text:g,highlightClassName:u}=s;if(!r?.length)return null;let c=[],i=n(r,g.length),l=r[0].start===0;for(let f=1;f{"use strict";e.d(A,{p:()=>r});var t=e(96540),n=e(83195),o=e(3988);function s(g){return`Custom unit: ${g}`}class r extends t.PureComponent{constructor(){super(...arguments),this.onChange=u=>{this.props.onChange(u.value)}}render(){const{value:u,width:c}=this.props;let i;const f=(0,n.Ke)().map(d=>{const h=d.submenu.map(p=>{const m={label:p.text,value:p.value};return p.value===u&&(i=m),m});return{label:d.text,value:d.text,items:h}});return u&&!i&&(i={value:u,label:u}),t.createElement(o.v,{width:c,initialValue:i&&i.label,allowCustomValue:!0,changeOnSelect:!1,formatCreateLabel:s,options:f,placeholder:"Choose",onSelect:this.props.onChange})}}},12942:(Q,A,e)=>{"use strict";e.d(A,{e:()=>r});var t=e(32196),n=e(96540),o=e(40845),s=e(16795);const r=({src:u,alt:c,width:i,height:l})=>{const f=(0,o.of)(g,i,l);return n.createElement("img",{className:f.image,src:u,alt:c})},g=(u,c=3,i=3)=>({image:(0,t.css)([(0,s.Y)(u,c,l=>({width:u.spacing(l)})),(0,s.Y)(u,i,l=>({height:u.spacing(l)})),{borderRadius:u.shape.radius.circle}])})},99635:(Q,A,e)=>{"use strict";e.d(A,{n:()=>c});var t=e(32196),n=e(96540),o=e(47232),s=e(40845),r=e(56034);const g=f=>{const h=(0,o.KQ)(f).diff((0,o.KQ)(),"hours",!1);return`Active last ${(Math.floor(-h/24)+1)*24}h`},u=f=>{if(!f)return"";const[d,h]=f.split(" ");return`${d?.[0]??""}${h?.[0]??""}`.toUpperCase()},c=({userView:f,className:d,children:h,onClick:p,showTooltip:m=!0})=>{const{user:a,lastActiveAt:v}=f,E=(0,o.KQ)(v).diff((0,o.KQ)(),"minutes",!0)>=-15,D=(0,s.$j)(),b=(0,n.useMemo)(()=>l(D,E),[D,E]),C=n.createElement("button",{type:"button",onClick:p,className:(0,t.cx)(b.container,p&&b.pointer,d),"aria-label":`${a.name} icon`},h?n.createElement("div",{className:(0,t.cx)(b.content,b.textContent)},h):a.avatarUrl?n.createElement("img",{className:b.content,src:a.avatarUrl,alt:`${a.name} avatar`}):n.createElement("div",{className:(0,t.cx)(b.content,b.textContent)},u(a.name)));if(m){const y=n.createElement("div",{className:b.tooltipContainer},n.createElement("div",{className:b.tooltipName},a.name),n.createElement("div",{className:b.tooltipDate},E?n.createElement("div",{className:b.dotContainer},n.createElement("span",null,"Active last 15m"),n.createElement("span",{className:b.dot})):g(v)));return n.createElement(r.m,{content:y},C)}else return C},i=f=>`0 0 0 1px ${f}`,l=(f,d)=>{const h=d?f.colors.primary.main:f.colors.border.medium,p=d?f.colors.primary.text:f.colors.border.strong;return{container:(0,t.css)({padding:0,width:"30px",height:"30px",background:"none",border:"none",borderRadius:f.shape.radius.circle,"& > *":{borderRadius:f.shape.radius.circle}}),content:(0,t.css)({lineHeight:"24px",maxWidth:"100%",border:`3px ${f.colors.background.primary} solid`,boxShadow:i(h),backgroundClip:"padding-box","&:hover":{boxShadow:i(p)}}),textContent:(0,t.css)({background:f.colors.background.primary,padding:0,color:f.colors.text.secondary,textAlign:"center",fontSize:f.typography.size.sm,"&:focus":{boxShadow:i(h)}}),tooltipContainer:(0,t.css)({textAlign:"center",padding:f.spacing(0,1)}),tooltipName:(0,t.css)({fontWeight:f.typography.fontWeightBold}),tooltipDate:(0,t.css)({fontWeight:f.typography.fontWeightRegular}),dotContainer:(0,t.css)({display:"flex",alignItems:"center"}),dot:(0,t.css)({height:"6px",width:"6px",backgroundColor:f.colors.primary.main,borderRadius:f.shape.radius.circle,display:"inline-block",marginLeft:f.spacing(1)}),pointer:(0,t.css)({cursor:"pointer"})}}},51986:(Q,A,e)=>{"use strict";e.d(A,{i:()=>g});var t=e(96540),n=e(13544),o=e(40845),s=e(55852),r=e(88323);function g({"aria-label":u,label:c,icon:i,options:l,onChange:f,variant:d,minWidth:h=16,size:p="sm",isFullWidth:m=!0,menuPlacement:a,fill:v,buttonCss:E}){const[D,b]=(0,t.useState)(!1),C=(0,o.$j)();return t.createElement(t.Fragment,null,!D&&t.createElement(s.$n,{size:p||"sm",className:E,icon:i||"plus",onClick:()=>b(!0),variant:d,fill:v,fullWidth:m,"data-testid":n.Tp.components.ValuePicker.button(u??c)},c),D&&t.createElement("span",{style:{minWidth:C.spacing(h),flexGrow:m?1:void 0}},t.createElement(r.l6,{placeholder:c,options:l,"aria-label":n.Tp.components.ValuePicker.select(u??c),isOpen:!0,onCloseMenu:()=>b(!1),autoFocus:!0,onChange:y=>{b(!1),f(y)},menuPlacement:a})))}},67266:(Q,A,e)=>{"use strict";e.d(A,{KU:()=>u});var t=e(32196),n=e(96540),o=e(49185),s=e(40845),r=e(16797),g=e(40276);const u=({width:l,height:f,legend:d,children:h})=>{const p=(0,s.$j)(),m=(0,s.of)(c),a={display:"flex",width:`${l}px`,height:`${f}px`},[v,E]=(0,o.A)();if(!d)return n.createElement(n.Fragment,null,n.createElement("div",{style:a,className:m.viz},h(l,f)));let{placement:D,maxHeight:b="35%",maxWidth:C="60%"}=d.props;document.body.clientWidth({viz:(0,t.css)({flexGrow:2,borderRadius:l.shape.radius.default,"&:focus-visible":(0,r.getFocusStyles)(l)})}),i=({children:l})=>n.createElement(n.Fragment,null,l);u.Legend=i},94536:(Q,A,e)=>{"use strict";e.d(A,{p:()=>r});var t=e(32196),n=e(96540),o=e(8066),s=e(40845);const r=n.memo(n.forwardRef(({color:u,className:c,gradient:i,...l},f)=>{const d=(0,s.$j)(),h=(0,s.of)(g);let p;if(i){const a=o.uf.get(i).getColors?.(d);a?.length?p=`linear-gradient(90deg, ${a.join(", ")})`:p=d.visualization.getColorByName("")}else p=u;const m={background:p,width:"14px",height:"4px",borderRadius:d.shape.radius.pill,display:"inline-block",marginRight:"8px"};return n.createElement("div",{"data-testid":"series-icon",ref:f,className:(0,t.cx)(c,h.forcedColors),style:m,...l})})),g=()=>({forcedColors:(0,t.css)({"@media (forced-colors: active)":{forcedColorAdjust:"none"}})});r.displayName="SeriesIcon"},55726:(Q,A,e)=>{"use strict";e.d(A,{t:()=>I});var t=e(96540),n=e(69129),o=e(52622),s=e(79041),r=e(88895),g=e(32196),u=e(40845),c=e(1551),i=e(33552),l=e(34375);const f=({items:x,itemRenderer:S,onLabelMouseOver:O,onLabelMouseOut:P,onLabelClick:L,placement:U,className:R,readonly:B})=>{const H=(0,u.of)(d);S||(S=N=>t.createElement(l.M,{item:N,onLabelClick:L,onLabelMouseOver:O,onLabelMouseOut:P,readonly:B}));const w=N=>`${N.getItemKey?N.getItemKey():N.label}`;switch(U){case"right":{const N=(V,G)=>t.createElement("span",{className:H.itemRight},S(V,G));return t.createElement("div",{className:(0,g.cx)(H.rightWrapper,R)},t.createElement(i.B,{items:x,renderItem:N,getItemKey:w}))}case"bottom":default:{const N=x.filter(_=>_.yAxis===1),V=x.filter(_=>_.yAxis!==1),G=(_,K)=>t.createElement("span",{className:H.itemBottom},S(_,K));return t.createElement("div",{className:(0,g.cx)(H.bottomWrapper,R)},N.length>0&&t.createElement("div",{className:H.section},t.createElement(c.c,{items:N,renderItem:G,getItemKey:w})),V.length>0&&t.createElement("div",{className:(0,g.cx)(H.section,H.sectionRight)},t.createElement(c.c,{items:V,renderItem:G,getItemKey:w})))}}};f.displayName="VizLegendList";const d=x=>{const S=(0,g.css)({paddingRight:"10px",display:"flex",fontSize:x.typography.bodySmall.fontSize,whiteSpace:"nowrap"});return{itemBottom:S,itemRight:(0,g.cx)(S,(0,g.css)({marginBottom:x.spacing(.5)})),rightWrapper:(0,g.css)({paddingLeft:x.spacing(.5)}),bottomWrapper:(0,g.css)({display:"flex",flexWrap:"wrap",justifyContent:"space-between",width:"100%",paddingLeft:x.spacing(.5),gap:"15px 25px"}),section:(0,g.css)({display:"flex"}),sectionRight:(0,g.css)({justifyContent:"flex-end",flexGrow:1,flexBasis:"50%"})}};var h=e(14578),p=e(83195),m=e(16797),a=e(94134);const v=({item:x,onLabelClick:S,onLabelMouseOver:O,onLabelMouseOut:P,className:L,readonly:U})=>{const R=(0,u.of)(E),B=(0,t.useCallback)(N=>{O&&O(x,N)},[x,O]),H=(0,t.useCallback)(N=>{P&&P(x,N)},[x,P]),w=(0,t.useCallback)(N=>{S&&S(x,N)},[x,S]);return t.createElement("tr",{className:(0,g.cx)(R.row,L)},t.createElement("td",null,t.createElement("span",{className:R.itemWrapper},t.createElement(a.R,{color:x.color,seriesName:x.label,readonly:U}),t.createElement("button",{disabled:U,type:"button",title:x.label,onBlur:H,onFocus:B,onMouseOver:B,onMouseOut:H,onClick:U?void 0:w,className:(0,g.cx)(R.label,x.disabled&&R.labelDisabled)},x.label," ",x.yAxis===2&&t.createElement("span",{className:R.yAxisLabel},"(right y-axis)")))),x.getDisplayValues&&x.getDisplayValues().map((N,V)=>t.createElement("td",{className:R.value,key:`${N.title}-${V}`},(0,p.cN)(N))))};v.displayName="LegendTableItem";const E=x=>{const S=m.hoverColor(x.colors.background.primary,x);return{row:(0,g.css)({label:"LegendRow",fontSize:x.v1.typography.size.sm,borderBottom:`1px solid ${x.colors.border.weak}`,td:{padding:x.spacing(.25,1),whiteSpace:"nowrap"},"&:hover":{background:S}}),label:(0,g.css)({label:"LegendLabel",whiteSpace:"nowrap",background:"none",border:"none",fontSize:"inherit",padding:0,maxWidth:"600px",textOverflow:"ellipsis",overflow:"hidden"}),labelDisabled:(0,g.css)({label:"LegendLabelDisabled",color:x.colors.text.disabled}),itemWrapper:(0,g.css)({display:"flex",whiteSpace:"nowrap",alignItems:"center"}),value:(0,g.css)({textAlign:"right"}),yAxisLabel:(0,g.css)({color:x.colors.text.secondary})}},D="Name",b=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}).compare,C=({items:x,sortBy:S,sortDesc:O,itemRenderer:P,className:L,onToggleSort:U,onLabelClick:R,onLabelMouseOver:B,onLabelMouseOut:H,readonly:w,isSortable:N})=>{const V=(0,u.of)(y),G={};N&&(G[D]="");for(const _ of x)if(_.getDisplayValues)for(const K of _.getDisplayValues())G[K.title??"?"]=K.description??"";if(S!=null){let _=new Map;x.forEach(j=>{if(S!==D&&j.getDisplayValues){const k=j.getDisplayValues().find(ee=>ee.title===S),Y=k==null||Number.isNaN(k.numeric)?-1/0:k.numeric;_.set(j,Y)}});let K=O?-1:1;S===D?x.sort((j,k)=>K*b(j.label,k.label)):x.sort((j,k)=>{const Y=_.get(j)??0,ee=_.get(k)??0;return K*(Y-ee)})}return P||(P=(_,K)=>t.createElement(v,{key:`${_.label}-${K}`,item:_,onLabelClick:R,onLabelMouseOver:B,onLabelMouseOut:H,readonly:w})),t.createElement("table",{className:(0,g.cx)(V.table,L)},t.createElement("thead",null,t.createElement("tr",null,!N&&t.createElement("th",null),Object.keys(G).map(_=>t.createElement("th",{title:G[_],key:_,className:(0,g.cx)(V.header,U&&V.headerSortable,N&&V.nameHeader,{[V.withIcon]:S===_}),onClick:()=>{U&&U(_)}},_,S===_&&t.createElement(h.I,{size:"xs",name:O?"angle-down":"angle-up"}))))),t.createElement("tbody",null,x.map(P)))},y=x=>({table:(0,g.css)({width:"100%","th:first-child":{width:"100%",borderBottom:`1px solid ${x.colors.border.weak}`}}),header:(0,g.css)({color:x.colors.primary.text,fontWeight:x.typography.fontWeightMedium,borderBottom:`1px solid ${x.colors.border.weak}`,padding:x.spacing(.25,1,.25,1),fontSize:x.typography.bodySmall.fontSize,textAlign:"right",whiteSpace:"nowrap"}),nameHeader:(0,g.css)({textAlign:"left",paddingLeft:"30px"}),withIcon:(0,g.css)({paddingRight:"4px"}),headerSortable:(0,g.css)({cursor:"pointer"})});var M=e(29995);function T(x){return x.ctrlKey||x.metaKey||x.shiftKey?r.B.AppendToSelection:r.B.ToggleSelection}function I({items:x,displayMode:S,sortBy:O,seriesVisibilityChangeBehavior:P=M.K.Isolate,sortDesc:L,onLabelClick:U,onToggleSort:R,placement:B,className:H,itemRenderer:w,readonly:N,isSortable:V}){const{eventBus:G,onToggleSeriesVisibility:_,onToggleLegendSort:K}=(0,s.d2)(),j=(0,t.useCallback)((ee,re)=>{G?.publish({type:n.b_.type,payload:{raw:re,x:0,y:0,dataId:ee.label}})},[G]),k=(0,t.useCallback)((ee,re)=>{G?.publish({type:n.ql.type,payload:{raw:re,x:0,y:0,dataId:ee.label}})},[G]),Y=(0,t.useCallback)((ee,re)=>{U&&U(ee,re),_&&_(ee.label,P===M.K.Hide?r.B.AppendToSelection:T(re))},[_,U,P]);switch(S){case o.lm.Table:return t.createElement(C,{className:H,items:x,placement:B,sortBy:O,sortDesc:L,onLabelClick:Y,onToggleSort:R||K,onLabelMouseOver:j,onLabelMouseOut:k,itemRenderer:w,readonly:N,isSortable:V});case o.lm.List:return t.createElement(f,{className:H,items:x,placement:B,onLabelMouseOver:j,onLabelMouseOut:k,onLabelClick:Y,itemRenderer:w,readonly:N});default:return null}}I.displayName="VizLegend"},34375:(Q,A,e)=>{"use strict";e.d(A,{M:()=>f});var t=e(32196),n=e(96540),o=e(13544),s=e(40845),r=e(94134),g=e(2543),u=e(83195),c=e(1551);const i=({stats:h})=>{const p=(0,s.of)(l);return h.length===0?null:n.createElement(c.c,{className:p.list,items:h,renderItem:m=>n.createElement("div",{className:p.item,title:m.description},m.title&&`${(0,g.capitalize)(m.title)}:`," ",(0,u.cN)(m))})},l=()=>({list:(0,t.css)({flexGrow:1,textAlign:"right"}),item:(0,t.css)({marginLeft:"8px"})});i.displayName="VizLegendStatsList";const f=({item:h,onLabelClick:p,onLabelMouseOver:m,onLabelMouseOut:a,className:v,readonly:E})=>{const D=(0,s.of)(d),b=(0,n.useCallback)(M=>{m&&m(h,M)},[h,m]),C=(0,n.useCallback)(M=>{a&&a(h,M)},[h,a]),y=(0,n.useCallback)(M=>{p&&p(h,M)},[h,p]);return n.createElement("div",{className:(0,t.cx)(D.itemWrapper,h.disabled&&D.itemDisabled,v),"data-testid":o.Tp.components.VizLegend.seriesName(h.label)},n.createElement(r.R,{seriesName:h.label,color:h.color,gradient:h.gradient,readonly:E}),n.createElement("button",{disabled:E,type:"button",onBlur:C,onFocus:b,onMouseOver:b,onMouseOut:C,onClick:y,className:D.label},h.label),h.getDisplayValues&&n.createElement(i,{stats:h.getDisplayValues()}))};f.displayName="VizLegendListItem";const d=h=>({label:(0,t.css)({label:"LegendLabel",whiteSpace:"nowrap",background:"none",border:"none",fontSize:"inherit",padding:0,userSelect:"text"}),itemDisabled:(0,t.css)({label:"LegendLabelDisabled",color:h.colors.text.disabled}),itemWrapper:(0,t.css)({label:"LegendItemWrapper",display:"flex",whiteSpace:"nowrap",alignItems:"center",flexGrow:1}),value:(0,t.css)({textAlign:"right"}),yAxisLabel:(0,t.css)({color:h.v1.palette.gray2})})},94134:(Q,A,e)=>{"use strict";e.d(A,{R:()=>r});var t=e(96540),n=e(83598),o=e(79041),s=e(94536);const r=t.memo(({seriesName:g,color:u,gradient:c,readonly:i})=>{const{onSeriesColorChange:l}=(0,o.d2)(),f=(0,t.useCallback)(d=>l(g,d),[g,l]);return g&&l&&u&&!i?t.createElement(n.Dp,{color:u,onChange:f,enableNamedColors:!0},({ref:d,showColorPicker:h,hideColorPicker:p})=>t.createElement(s.p,{color:u,className:"pointer",ref:d,onClick:h,onMouseLeave:p})):t.createElement(s.p,{color:u,gradient:c})});r.displayName="VizLegendSeriesIcon"},29995:(Q,A,e)=>{"use strict";e.d(A,{K:()=>t});var t=(n=>(n[n.Isolate=0]="Isolate",n[n.Hide=1]="Hide",n))(t||{})},12509:(Q,A,e)=>{"use strict";e.d(A,{S:()=>g});var t=e(2543),n=e(96540),o=e(47070);const s=(c,i,l,f)=>{const d=r(c,i,f),h=r(i,c,f),p=Math.max(d,h);let m=Math.floor(c/p),a=Math.ceil(f/m);m=Math.ceil(f/a);const v=m-(m*a-f),E=c/v-l+l/v;return{width:c/m-l+l/m,height:i/a-l+l/a,widthOnLastRow:E,xCount:m,yCount:a}};function r(c,i,l){const f=Math.ceil(Math.sqrt(l*c/i));return Math.floor(f*i/c)*ff?o.wV.Vertical:o.wV.Horizontal:i}renderGrid(){const{renderValue:i,height:l,width:f,itemSpacing:d,getAlignmentFactors:h,orientation:p}=this.props,{values:m}=this.state,a=s(f,l,d,m.length),v=h?h(m,a.width,a.height):{};let E=0,D=0,b=[];for(let C=0;Cn.createElement("div",{key:S,style:u(b,S,D.length)},i({value:x,width:M,height:y,alignmentFactors:I,orientation:T,count:D.length}))))}}g.defaultProps={itemSpacing:8};function u(c,i,l){return i===l-1?{...c,marginRight:0,marginBottom:0}:c}},3139:(Q,A,e)=>{"use strict";e.d(A,{g:()=>g,o:()=>u});var t=e(32196),n=e(96540),o=e(40845),s=e(94536);const r=c=>({icon:(0,t.css)({marginRight:c.spacing(1),verticalAlign:"middle"}),seriesTable:(0,t.css)({display:"table"}),seriesTableRow:(0,t.css)({display:"table-row",fontSize:c.typography.bodySmall.fontSize}),seriesTableCell:(0,t.css)({display:"table-cell"}),label:(0,t.css)({wordBreak:"break-all"}),value:(0,t.css)({paddingLeft:c.spacing(2),textAlign:"right"}),activeSeries:(0,t.css)({fontWeight:c.typography.fontWeightBold,color:c.colors.text.maxContrast}),timestamp:(0,t.css)({fontWeight:c.typography.fontWeightBold,fontSize:c.typography.bodySmall.fontSize})}),g=({color:c,label:i,value:l,isActive:f})=>{const d=(0,o.of)(r);return n.createElement("div",{"data-testid":"SeriesTableRow",className:(0,t.cx)(d.seriesTableRow,f&&d.activeSeries)},c&&n.createElement("div",{className:d.seriesTableCell},n.createElement(s.p,{color:c,className:d.icon})),i&&n.createElement("div",{className:(0,t.cx)(d.seriesTableCell,d.label)},i),l&&n.createElement("div",{className:(0,t.cx)(d.seriesTableCell,d.value)},l))},u=({timestamp:c,series:i})=>{const l=(0,o.of)(r);return n.createElement(n.Fragment,null,c&&n.createElement("div",{className:l.timestamp,"aria-label":"Timestamp"},c),i.map((f,d)=>n.createElement(g,{isActive:f.isActive,label:f.label,color:f.color,value:f.value,key:`${f.label}-${d}`})))}},75128:(Q,A,e)=>{"use strict";e.d(A,{n:()=>g});var t=e(32196),n=e(96540),o=e(40845),s=e(17464),r=e(69503);const g=({content:c,position:i,offset:l})=>{const f=(0,o.of)(u);return i?n.createElement(s.ZL,{className:f.portal},n.createElement(r.o,{position:i,offset:l||{x:0,y:0}},c)):null};g.displayName="VizTooltip";const u=()=>({portal:(0,t.css)({position:"absolute",top:0,left:0,pointerEvents:"none",width:"100%",height:"100%"})})},69503:(Q,A,e)=>{"use strict";e.d(A,{o:()=>u});var t=e(32196),n=e(96540),o=e(52908),s=e(40845),r=e(16797),g=e(10875);const u=({position:{x:i,y:l},offset:{x:f,y:d},children:h,allowPointerEvents:p=!1,className:m,...a})=>{const v=(0,n.useRef)(null),[E,D]=(0,n.useState)({width:0,height:0}),{width:b,height:C}=(0,o.A)(),[y,M]=(0,n.useState)({x:i+f,y:l+d}),T=(0,n.useMemo)(()=>new ResizeObserver(x=>{for(let S of x){const O=Math.floor(S.contentRect.width+16),P=Math.floor(S.contentRect.height+2*8);(E.width!==O||E.height!==P)&&D({width:Math.min(O,b),height:Math.min(P,C)})}}),[E,b,C]);(0,n.useLayoutEffect)(()=>(v.current&&T.observe(v.current),()=>{T.disconnect()}),[T]),(0,n.useLayoutEffect)(()=>{if(v&&v.current){const{x,y:S}=(0,g.Ju)(i,l,E.width,E.height,f,d,b,C);M({x,y:S})}},[b,C,i,f,l,d,E]);const I=(0,s.of)(c);return n.createElement("div",{ref:v,style:{position:"fixed",left:0,pointerEvents:p?"auto":"none",top:0,transform:`translate(${y.x}px, ${y.y}px)`,transition:"transform ease-out 0.1s"},"aria-live":"polite","aria-atomic":"true",...a,className:(0,t.cx)(I.wrapper,m)},h)};u.displayName="VizTooltipContainer";const c=i=>({wrapper:(0,t.css)((0,r.getTooltipContainerStyles)(i))})},11389:(Q,A,e)=>{"use strict";e.d(A,{o:()=>r});var t=e(32196),n=e(96540),o=e(40845),s=e(13471);const r=({contentLabelValue:u,customContent:c,isPinned:i,scrollable:l=!1})=>{const f=(0,o.of)(g),d=l?{maxHeight:400,overflowY:"auto"}:{};return n.createElement("div",{className:f.wrapper,style:d},n.createElement("div",null,u.map((h,p)=>{const{label:m,value:a,color:v,colorIndicator:E,colorPlacement:D,isActive:b}=h;return n.createElement(s.B,{key:p,label:m,value:a,color:v,colorIndicator:E,colorPlacement:D,isActive:b,justify:"space-between",isPinned:i})})),c?.map((h,p)=>n.createElement("div",{key:p,className:f.customContentPadding},h)))},g=u=>({wrapper:(0,t.css)({display:"flex",flexDirection:"column",flex:1,gap:4,borderTop:`1px solid ${u.colors.border.medium}`,padding:u.spacing(1)}),customContentPadding:(0,t.css)({padding:`${u.spacing(1)} 0`})})},58749:(Q,A,e)=>{"use strict";e.d(A,{S:()=>c});var t=e(32196),n=e(96540),o=e(66864),s=e(14689),r=e(55852),g=e(40845);const u="add-annotation-button",c=({dataLinks:l,annotate:f})=>{const d=(0,g.of)(i),h=()=>{const p={variant:"secondary"};return n.createElement(o.Gy,null,l.map((m,a)=>n.createElement(s.R,{key:a,link:m,buttonProps:p})))};return n.createElement("div",{className:d.wrapper},l.length>0&&n.createElement("div",{className:d.dataLinks},h()),f&&n.createElement("div",{className:d.addAnnotations},n.createElement(r.$n,{icon:"comment-alt",variant:"secondary",size:"sm",id:u,onClick:f},"Add annotation")))},i=l=>({wrapper:(0,t.css)({display:"flex",flexDirection:"column",flex:1,padding:l.spacing(0)}),dataLinks:(0,t.css)({overflowX:"auto",overflowY:"hidden",whiteSpace:"nowrap",maskImage:"linear-gradient(90deg, rgba(0, 0, 0, 1) 80%, transparent)",borderTop:`1px solid ${l.colors.border.medium}`,padding:l.spacing(1)}),addAnnotations:(0,t.css)({borderTop:`1px solid ${l.colors.border.medium}`,padding:l.spacing(1)})})},92663:(Q,A,e)=>{"use strict";e.d(A,{A:()=>u});var t=e(32196),n=e(96540),o=e(40845),s=e(13471);const r=({headerLabel:i,isPinned:l})=>{const{label:f,value:d,color:h,colorIndicator:p}=i;return n.createElement(s.B,{label:f,value:d,color:h,colorIndicator:p,marginRight:"22px",isPinned:l})},g=({keyValuePairs:i,isPinned:l})=>n.createElement(n.Fragment,null,i?.map((f,d)=>n.createElement(s.B,{key:d,label:f.label,value:f.value,color:f.color,colorIndicator:f.colorIndicator,justify:"space-between",isPinned:l}))),u=({headerLabel:i,keyValuePairs:l,customValueDisplay:f,isPinned:d})=>{const h=(0,o.of)(c);return n.createElement("div",{className:h.wrapper},n.createElement(r,{headerLabel:i,isPinned:d}),f||n.createElement(g,{keyValuePairs:l,isPinned:d}))},c=i=>({wrapper:(0,t.css)({display:"flex",flexDirection:"column",flex:1,padding:i.spacing(1)})})},13471:(Q,A,e)=>{"use strict";e.d(A,{B:()=>m});var t=e(32196),n=e(96540),o=e(40845),s=e(32982),r=e(56034),g=e(24293),u=e(79871),c=e(10875),i=(v=>(v[v.Leading=0]="Leading",v[v.Trailing=1]="Trailing",v))(i||{});const l=({color:v=g.F,colorIndicator:E=u.Ev,position:D=0})=>{const b=(0,o.of)(f);return n.createElement("span",{style:{backgroundColor:v},className:(0,t.cx)(D===0?b.leading:b.trailing,(0,c.L$)(E,b))})},f=v=>({leading:(0,t.css)({marginRight:v.spacing(.5)}),trailing:(0,t.css)({marginLeft:v.spacing(.5)}),series:(0,t.css)({width:"14px",height:"4px",borderRadius:v.shape.radius.pill,minWidth:"14px"}),value:(0,t.css)({width:"12px",height:"12px",borderRadius:v.shape.radius.default,fontWeight:500,minWidth:"12px"}),hexagon:(0,t.css)({}),pie_1_4:(0,t.css)({}),pie_2_4:(0,t.css)({}),pie_3_4:(0,t.css)({}),marker_sm:(0,t.css)({width:"4px",height:"4px",borderRadius:v.shape.radius.circle,minWidth:"4px"}),marker_md:(0,t.css)({width:"8px",height:"8px",borderRadius:v.shape.radius.circle,minWidth:"8px"}),marker_lg:(0,t.css)({width:"12px",height:"12px",borderRadius:v.shape.radius.circle,minWidth:"12px"})});var d=(v=>(v.label="label",v.value="value",v))(d||{});const h="Copied to clipboard",p=2*1e3,m=({label:v,value:E,color:D,colorIndicator:b,colorPlacement:C=u.lJ.first,justify:y="flex-start",isActive:M=!1,marginRight:T="0px",isPinned:I})=>{const x=(0,o.of)(a,y,T),[S,O]=(0,n.useState)(!1),[P,L]=(0,n.useState)(!1),[U,R]=(0,n.useState)(null),[B,H]=(0,n.useState)(!1),w=(0,n.useRef)(null),N=(0,n.useRef)(null);(0,n.useEffect)(()=>{let Y;return B&&(Y=setTimeout(()=>{H(!1)},p)),()=>{window.clearTimeout(Y)}},[B]);const V=async(Y,ee)=>{if(!(navigator?.clipboard&&window.isSecureContext)){G(Y,ee);return}try{await navigator.clipboard.writeText(Y),R({[`${ee}`]:Y}),H(!0)}catch{R(null)}},G=(Y,ee)=>{const re=document.createElement("textarea");w.current?.appendChild(re),re.value=Y,re.focus(),re.select();try{document.execCommand("copy")&&(R({[`${ee}`]:Y}),H(!0))}catch(J){console.error("Unable to copy to clipboard",J)}re.remove()},_=Y=>{Y.currentTarget.offsetWidthO(!1),j=Y=>{Y.currentTarget.offsetWidthL(!1);return n.createElement("div",{className:x.contentWrapper},(D||v)&&n.createElement("div",{className:x.valueWrapper},D&&C===u.lJ.first&&n.createElement(l,{color:D,colorIndicator:b}),I?n.createElement(n.Fragment,null,n.createElement(r.m,{content:v,interactive:!1,show:S},n.createElement(n.Fragment,null,B&&U?.label&&n.createElement(s.r,{placement:"top",referenceElement:w.current},h),n.createElement("div",{className:(0,t.cx)(x.label,M&&x.activeSeries,navigator?.clipboard&&x.copy),onMouseEnter:_,onMouseLeave:K,onClick:()=>V(v,"label"),ref:w},v)))):n.createElement("div",{className:(0,t.cx)(x.label,M&&x.activeSeries)},v)),n.createElement("div",{className:x.valueWrapper},D&&C===u.lJ.leading&&n.createElement(l,{color:D,colorIndicator:b,position:i.Leading}),I?n.createElement(r.m,{content:E?E.toString():"",interactive:!1,show:P},n.createElement(n.Fragment,null,B&&U?.value&&n.createElement(s.r,{placement:"top",referenceElement:N.current},h),n.createElement("div",{className:(0,t.cx)(x.value,M,navigator?.clipboard&&x.copy),onMouseEnter:j,onMouseLeave:k,onClick:()=>V(E?E.toString():"","value"),ref:N},E))):n.createElement("div",{className:(0,t.cx)(x.value,M)},E),D&&C===u.lJ.trailing&&n.createElement(l,{color:D,colorIndicator:b,position:i.Trailing})))},a=(v,E,D)=>({contentWrapper:(0,t.css)({display:"flex",alignItems:"center",justifyContent:E,flexWrap:"wrap",marginRight:D}),label:(0,t.css)({color:v.colors.text.secondary,fontWeight:400,textOverflow:"ellipsis",overflow:"hidden",marginRight:v.spacing(2)}),value:(0,t.css)({fontWeight:500,textOverflow:"ellipsis",overflow:"hidden"}),valueWrapper:(0,t.css)({display:"flex",alignItems:"center",minWidth:0}),activeSeries:(0,t.css)({fontWeight:v.typography.fontWeightBold,color:v.colors.text.maxContrast}),copy:(0,t.css)({cursor:"pointer"})})},79871:(Q,A,e)=>{"use strict";e.d(A,{Ev:()=>o,fX:()=>t,lJ:()=>n});var t=(s=>(s.series="series",s.value="value",s.hexagon="hexagon",s.pie_1_4="pie_1_4",s.pie_2_4="pie_2_4",s.pie_3_4="pie_3_4",s.marker_sm="marker_sm",s.marker_md="marker_md",s.marker_lg="marker_lg",s))(t||{}),n=(s=>(s.hidden="hidden",s.first="first",s.leading="leading",s.trailing="trailing",s))(n||{});const o="series"},10875:(Q,A,e)=>{"use strict";e.d(A,{Ju:()=>g,L$:()=>u,cp:()=>f});var t=e(11261),n=e(83195),o=e(24293),s=e(52622),r=e(79871);const g=(d=0,h=0,p=0,m=0,a=0,v=0,E=0,D=0)=>{let b=d,C=h;const y=Math.max(d+a+p-(E-a),0),M=Math.abs(Math.min(d-a-p-a,0)),T=y>0,I=M>0,x=Math.max(h+v+m-(D-v),0),S=Math.abs(Math.min(h-v-m-v,0)),O=x>0,P=S>0;return T&&I?b=y>M?a:E-a-p:T?b=d-a-p:b=d+a,O&&P?C=x>S?v:D-v-m:O?C=h-v-m:C=h+v,{x:b,y:C}},u=(d,h)=>{switch(d){case r.fX.value:return h.value;case r.fX.series:return h.series;case r.fX.hexagon:return h.hexagon;case r.fX.pie_1_4:return h.pie_1_4;case r.fX.pie_2_4:return h.pie_2_4;case r.fX.pie_3_4:return h.pie_3_4;case r.fX.marker_sm:return h.marker_sm;case r.fX.marker_md:return h.marker_md;case r.fX.marker_lg:return h.marker_lg;default:return h.value}},c=(d,h)=>d.numeric-h.numeric,i=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}),l=(d,h)=>i.compare(`${d.value}`,`${h.value}`),f=(d,h,p,m,a,v,E=D=>!0)=>{let D=[],b=!1;for(let C=0;C1){const C=b?c:l,y=v===s.xB.Descending?-1:1;D.sort((M,T)=>y*C(M,T))}return D}},94333:(Q,A,e)=>{"use strict";e.r(A),e.d(A,{Alert:()=>Ve.F,AlertingSettings:()=>qt.i,AsyncMultiSelect:()=>br.Iv,AsyncSelect:()=>br.DW,AsyncVirtualizedSelect:()=>br.gZ,AutoSaveField:()=>Y.p,AutoSizeInput:()=>ro.D,Avatar:()=>kn.e,Badge:()=>Ar.E,BarGauge:()=>He.xE,BarGaugeDisplayMode:()=>Ys.eX,BigValue:()=>st.yV,BigValueColorMode:()=>st.yp,BigValueGraphMode:()=>st.$p,BigValueJustifyMode:()=>st.F8,BigValueTextMode:()=>st.SV,Box:()=>as.a,BrowserLabel:()=>xs.J,Button:()=>Va.$n,ButtonCascader:()=>C.H,ButtonGroup:()=>ts.e,ButtonSelect:()=>sn.f,CallToActionCard:()=>Yt.c,Card:()=>bo.Z,CardContainer:()=>Ot.Q,Cascader:()=>b.v,CertificationKey:()=>mn.K,Checkbox:()=>oo.S,ClickOutsideWrapper:()=>Pt.N,ClipboardButton:()=>D.b,CodeEditor:()=>oe.B,CodeEditorSuggestionItemKind:()=>ie.q,CollapsableSection:()=>nt.M,Collapse:()=>ot.S,ColorPicker:()=>I.sk,ColorPickerInput:()=>x.i,ConfirmButton:()=>l.Z,ConfirmModal:()=>q.u,Container:()=>Zr.mc,ContextMenu:()=>zt.t,ControlledCollapse:()=>ot.a,Counter:()=>Ye.p,CustomHeadersSettings:()=>Rt.P,CustomScrollbar:()=>v.E,DataLinkButton:()=>pt.R,DataLinkInput:()=>yt.l,DataLinksContextMenu:()=>jt.e,DataLinksInlineEditor:()=>ft.e,DataSourceHttpSettings:()=>ca.t,DatePicker:()=>V.l,DatePickerWithInput:()=>G.l,DateTimePicker:()=>_.K,DeleteButton:()=>f.e,Divider:()=>ma.c,Drawer:()=>Xn._,Dropdown:()=>Zt.m,EmptySearchResult:()=>O.Z,ErrorBoundary:()=>An.tH,ErrorBoundaryAlert:()=>An.Xw,ErrorWithStack:()=>hn.D,EventsCanvas:()=>ds.a,FIXED_UNIT:()=>kr.s,FadeTransition:()=>Tn.A,FeatureBadge:()=>on.y,FeatureInfoBox:()=>on.e,Field:()=>Zs.D,FieldArray:()=>Ir.E,FieldLinkList:()=>mt.n,FieldSet:()=>is.n,FieldValidationMessage:()=>Ls.P,FileDropzone:()=>ur.gH,FileDropzoneDefaultChildren:()=>ur.wI,FileListItem:()=>ur.IB,FileUpload:()=>io.e,FilterInput:()=>Za.Z,FilterPill:()=>ne.m,Form:()=>Oa.l,FormattedValueDisplay:()=>$t.i,FullWidthButtonContainer:()=>gt.V,Gauge:()=>Xe._,Graph:()=>qa.T,GraphContextMenu:()=>Wr.H,GraphContextMenuHeader:()=>Wr.i,GraphNG:()=>To.o,GraphSeriesToggler:()=>Ne.M,GraphWithLegend:()=>Qs.I,Grid:()=>lr.x,HorizontalGroup:()=>Zr.Gy,Icon:()=>c.I,IconButton:()=>i.K,InfoBox:()=>pn.w,InlineField:()=>ks.I,InlineFieldRow:()=>Cr.C,InlineFormLabel:()=>ua.I,InlineLabel:()=>qs.c,InlineSegmentGroup:()=>Pr.e,InlineSwitch:()=>St.K,InlineToast:()=>y.r,Input:()=>Ss.p,InputControl:()=>Jn.e,InteractiveTable:()=>j.j,JSONFormatter:()=>Xt.B,JsonExplorer:()=>fn.O,KeyboardPlugin:()=>Vs.Z7,Label:()=>cr.J,LayoutItemContext:()=>Ia.N,LegacyForms:()=>ko,LegacyInputStatus:()=>n.O,Legend:()=>os.s,Link:()=>Ps.N,LinkButton:()=>Va.z9,List:()=>K.B,LoadingBar:()=>T.G,LoadingPlaceholder:()=>M._,Marker:()=>ds.pH,Menu:()=>_t.W,MenuGroup:()=>rt.r,MenuItem:()=>It.D,Modal:()=>he.a,ModalHeader:()=>De.r,ModalRoot:()=>Te.EO,ModalTabContent:()=>le.O,ModalTabsHeader:()=>pe.J,ModalsContext:()=>Te.wE,ModalsController:()=>Te.$s,ModalsProvider:()=>Te.YO,MultiSelect:()=>br.KF,PageToolbar:()=>Ee.d,Pagination:()=>ee.d,PanelChrome:()=>Z.NR,PanelChromeLoadingIndicator:()=>ae.I,PanelContainer:()=>lo._,PanelContextProvider:()=>de.XF,PanelContextRoot:()=>de.e4,PlotLegend:()=>ws.$,PluginSignatureBadge:()=>vn.B,Popover:()=>p.A,PopoverController:()=>h.I,Portal:()=>a.ZL,PortalContainer:()=>a.qB,QueryField:()=>te.X,RadioButtonGroup:()=>zo.z,RadioButtonList:()=>$s.a,RangeSlider:()=>ba.F,ReactMonacoEditor:()=>ue.m,RefreshPicker:()=>U.cC,RelativeTimeRangePicker:()=>Co.N,RenderUserContentAsHTML:()=>at.I,ScaleDistribution:()=>Ys.L4,SecretInput:()=>bs.L,SecretTextArea:()=>Yn.l,SecureSocksProxySettings:()=>gn.Y,Segment:()=>Mn.Y,SegmentAsync:()=>Ln.s,SegmentInput:()=>na.o,SegmentSection:()=>ia.L,SegmentSelect:()=>pa.a,Select:()=>br.l6,SelectContainer:()=>br.KA,SeriesColorPicker:()=>I.Dp,SeriesColorPickerPopover:()=>S.o,SeriesColorPickerPopoverWithTheme:()=>S.t,SeriesIcon:()=>cn.p,SeriesTable:()=>$e.o,SeriesTableRow:()=>$e.g,SeriesVisibilityChangeBehavior:()=>Ue.K,SeriesVisibilityChangeMode:()=>ha.B,SetInterval:()=>Re.u,SlideOutTransition:()=>$n.n,Slider:()=>Da.A,Space:()=>Is.$,Sparkline:()=>Ke.O,Spinner:()=>Sn.y,Splitter:()=>za.O,Stack:()=>ar.B,StatsPicker:()=>L.S,Switch:()=>St.d,TLSAuthSettings:()=>Cn.j,Tab:()=>Le.o,TabContent:()=>Be.J,TabbedContainer:()=>E.q,Table:()=>me.X,TableInputCSV:()=>Me.b,TabsBar:()=>ye.U,Tag:()=>re.v,TagList:()=>J.L,TagsInput:()=>k.u,Text:()=>Cs.E,TextArea:()=>vo.f,TextLink:()=>ir.Y,TimeOfDayPicker:()=>H.R,TimePickerTooltip:()=>R.xS,TimeRangeInput:()=>Fr.b,TimeRangeLabel:()=>B.f,TimeRangePicker:()=>R.$6,TimeSeries:()=>Mo.Z,TimeZonePicker:()=>w.U,Toggletip:()=>m.G,ToolbarButton:()=>Ds.I,ToolbarButtonRow:()=>Ms.U,Tooltip:()=>d.m,TooltipPlugin:()=>Vs.Tk,TooltipPlugin2:()=>Vs.xl,UPLOT_AXIS_FONT_SIZE:()=>vs.pi,UPlotChart:()=>zr.Z,UPlotConfigBuilder:()=>sr.e,UnitPicker:()=>P.p,UserIcon:()=>wn.n,ValuePicker:()=>Ns.i,VerticalGroup:()=>Zr.gW,VerticalTab:()=>We.s,VirtualizedSelect:()=>br.ip,VizLayout:()=>ve.KU,VizLegend:()=>_e.t,VizLegendListItem:()=>ze.M,VizRepeater:()=>be.S,VizTooltip:()=>Ge.n,VizTooltipContainer:()=>xe.o,WeekStartPicker:()=>N.l,WithContextMenu:()=>Dn.n,XYCanvas:()=>ds._X,ZoomPlugin:()=>Vs.jn,buildScaleKey:()=>ti.My,clearButtonStyles:()=>Va.my,convertOldAngularValueMapping:()=>Mt.I1,defaultIntervals:()=>U.cb,fieldMatchersUI:()=>cs.g,getCardStyles:()=>bo.H,getDragStyles:()=>Qa.l,getInputStyles:()=>Ss.n,getPortalContainer:()=>a.gF,getSelectStyles:()=>so.J,graphFieldOptions:()=>Ha.t,graphTickFormatter:()=>co.Yn,graphTimeFormat:()=>co.Jc,preparePlotFrame:()=>ti.mY,resetSelectStyles:()=>Lo.A,sharedInputStyle:()=>sa.Xb,sharedSingleStatMigrationHandler:()=>Mt._$,sharedSingleStatPanelChangedHandler:()=>Mt.gl,useGraphNGContext:()=>vi.I,usePanelContext:()=>de.d2,variableSuggestionToCodeEditorSuggestion:()=>ge.O,withErrorBoundary:()=>An.Xc});var t=e(90090),n=e(91634),o=e(24169),s=e(11206),r=e(99091),g=e(74716),u=e(56286),c=e(14578),i=e(29158),l=e(82702),f=e(91605),d=e(56034),h=e(95868),p=e(13840),m=e(60782),a=e(17464),v=e(40276),E=e(60734),D=e(10534),b=e(3988),C=e(32012),y=e(32982),M=e(39558),T=e(57514),I=e(83598),x=e(99128),S=e(70104),O=e(41670),P=e(2056),L=e(42734),U=e(11134),R=e(15666),B=e(3799),H=e(66070),w=e(20333),N=e(15648),V=e(56181),G=e(98239),_=e(63383),K=e(33552),j=e(28389),k=e(79924),Y=e(28270),ee=e(19384),re=e(78369),J=e(64149),ne=e(92174),q=e(96374),te=e(20084),oe=e(32372),ue=e(85828),ie=e(19716),ge=e(99544),he=e(37390),De=e(29473),pe=e(25897),le=e(95246),Te=e(71678),Ee=e(95247),Re=e(67570),me=e(77093),Me=e(14746),ye=e(63021),Le=e(40675),We=e(90685),Be=e(40980),Ye=e(53402),at=e(44522),st=e(37494),Ke=e(5926),Xe=e(95164),He=e(97696),Ge=e(75128),xe=e(69503),$e=e(3139),be=e(12509),Z=e(91052),ae=e(89963),de=e(79041),ve=e(67266),Ue=e(29995),_e=e(55726),ze=e(34375),Ve=e(42418),Ne=e(84656),ot=e(82762),nt=e(57418),pt=e(14689),mt=e(79961),gt=e(61458),Pt=e(8866),Mt=e(37713),Yt=e(76442),zt=e(28122),_t=e(38138),rt=e(59093),It=e(64539),Dn=e(51686),ft=e(64919),yt=e(64078),jt=e(59796),cn=e(94536),pn=e(37166),on=e(86460),Xt=e(24022),fn=e(44533),An=e(66602),hn=e(52446),ca=e(91409),Rt=e(11184),qt=e(19849),gn=e(17081),Cn=e(95180),mn=e(28623),Sn=e(62930),Tn=e(31511),$n=e(72960),Mn=e(38401),Ln=e(83684),na=e(57752),pa=e(13102),ia=e(64765),Xn=e(87978),Da=e(77014),ba=e(47097),Oa=e(51253),sa=e(87266),Jn=e(16504),Va=e(55852),ts=e(19727),Ds=e(27746),Ms=e(15068),Ns=e(51986),cs=e(84349),Ps=e(50720),ir=e(72109),Cs=e(94753),as=e(90613),ar=e(67061),lr=e(71259),Is=e(68402),cr=e(60029),Zs=e(88575),os=e(17408),is=e(84167),Ls=e(72093),ks=e(14186),Pr=e(63056),qs=e(76892),Cr=e(39268),Ir=e(95984),Lo=e(23731),br=e(88323),so=e(88824),hs=e(62883),Nr=e.n(hs),wr={};for(const Ho in hs)["default","Icon","IconButton","ConfirmButton","DeleteButton","Tooltip","PopoverController","Popover","Toggletip","Portal","getPortalContainer","PortalContainer","CustomScrollbar","TabbedContainer","ClipboardButton","Cascader","ButtonCascader","InlineToast","LoadingPlaceholder","LoadingBar","ColorPicker","SeriesColorPicker","ColorPickerInput","SeriesColorPickerPopover","SeriesColorPickerPopoverWithTheme","EmptySearchResult","UnitPicker","StatsPicker","RefreshPicker","defaultIntervals","TimeRangePicker","TimePickerTooltip","TimeRangeLabel","TimeOfDayPicker","TimeZonePicker","WeekStartPicker","DatePicker","DatePickerWithInput","DateTimePicker","List","InteractiveTable","TagsInput","AutoSaveField","Pagination","Tag","TagList","FilterPill","ConfirmModal","QueryField","CodeEditor","ReactMonacoEditor","CodeEditorSuggestionItemKind","variableSuggestionToCodeEditorSuggestion","Modal","ModalHeader","ModalTabsHeader","ModalTabContent","ModalsProvider","ModalRoot","ModalsController","ModalsContext","PageToolbar","SetInterval","Table","TableInputCSV","TabsBar","Tab","VerticalTab","TabContent","Counter","RenderUserContentAsHTML","BigValue","BigValueColorMode","BigValueGraphMode","BigValueJustifyMode","BigValueTextMode","Sparkline","Gauge","BarGauge","VizTooltip","VizTooltipContainer","SeriesTable","SeriesTableRow","VizRepeater","PanelChrome","PanelChromeLoadingIndicator","PanelContextProvider","PanelContextRoot","usePanelContext","VizLayout","SeriesVisibilityChangeBehavior","VizLegend","VizLegendListItem","Alert","GraphSeriesToggler","Collapse","ControlledCollapse","CollapsableSection","DataLinkButton","FieldLinkList","FullWidthButtonContainer","ClickOutsideWrapper","CallToActionCard","ContextMenu","Menu","MenuGroup","MenuItem","WithContextMenu","DataLinksInlineEditor","DataLinkInput","DataLinksContextMenu","SeriesIcon","InfoBox","FeatureBadge","FeatureInfoBox","JSONFormatter","JsonExplorer","ErrorBoundary","ErrorBoundaryAlert","withErrorBoundary","ErrorWithStack","DataSourceHttpSettings","CustomHeadersSettings","AlertingSettings","SecureSocksProxySettings","TLSAuthSettings","CertificationKey","Spinner","FadeTransition","SlideOutTransition","Segment","SegmentAsync","SegmentInput","SegmentSelect","SegmentSection","Drawer","Slider","RangeSlider","Form","sharedInputStyle","InputControl","Button","LinkButton","ButtonGroup","clearButtonStyles","ToolbarButton","ToolbarButtonRow","ValuePicker","fieldMatchersUI","Link","TextLink","Text","Box","Stack","Grid","Space","Label","Field","Legend","FieldSet","FieldValidationMessage","InlineField","InlineSegmentGroup","InlineLabel","InlineFieldRow","FieldArray","resetSelectStyles","getSelectStyles","HorizontalGroup","VerticalGroup","Container","Badge","RadioButtonGroup","RadioButtonList","Input","getInputStyles","AutoSizeInput","FilterInput","Switch","InlineSwitch","Checkbox","TextArea","FileUpload","TimeRangeInput","RelativeTimeRangePicker","Card","getCardStyles","CardContainer","FormattedValueDisplay","ButtonSelect","Dropdown","PluginSignatureBadge","UserIcon","Avatar","InlineFormLabel","Divider","getDragStyles","Splitter","LayoutItemContext","LegacyForms","LegacyInputStatus","ScaleDistribution","BarGaugeDisplayMode","UPlotConfigBuilder","UPLOT_AXIS_FONT_SIZE","UPlotChart","PlotLegend","FIXED_UNIT","BrowserLabel","PanelContainer","Graph","GraphWithLegend","GraphContextMenu","GraphContextMenuHeader","graphTimeFormat","graphTickFormatter","GraphNG","TimeSeries","useGraphNGContext","preparePlotFrame","buildScaleKey","convertOldAngularValueMapping","sharedSingleStatMigrationHandler","sharedSingleStatPanelChangedHandler","AsyncMultiSelect","AsyncSelect","AsyncVirtualizedSelect","MultiSelect","Select","SelectContainer","VirtualizedSelect"].indexOf(Ho)<0&&(wr[Ho]=()=>hs[Ho]);e.d(A,wr);var Zr=e(66864),Ar=e(39938),zo=e(94354),$s=e(5173),Ss=e(10354),ro=e(51440),Za=e(67647),bs=e(49718),Yn=e(7968),St=e(15292),oo=e(10880),vo=e(21744),io=e(73546),ur=e(92887),Fr=e(54230),Co=e(3759),bo=e(10860),Ot=e(81507),$t=e(9286),sn=e(9261),Zt=e(83122),vn=e(98624),wn=e(99635),kn=e(12942),ua=e(38894),ma=e(25994),Qa=e(69144),za=e(34722),Ia=e(18348),Ha=e(52198),Ys=e(52622),sr=e(51336),vs=e(30501),zr=e(81297),ws=e(24182),ds=e(96747),Vs=e(66737),kr=e(52811),ha=e(88895),xs=e(54438),lo=e(52494),qa=e(48747),Qs=e(5484),Wr=e(33083),co=e(65036),To=e(99755),Mo=e(18262),vi=e(16998),ti=e(65575);const ko={SecretFormField:u.L,FormField:t.z,Select:r.l6,AsyncSelect:r.DW,IndicatorsContainer:o.s,NoOptionsMessage:s.l,Input:n.p,Switch:g.d}},31511:(Q,A,e)=>{"use strict";e.d(A,{A:()=>r});var t=e(32196),n=e(96540),o=e(86634),s=e(40845);function r(u){const{visible:c,children:i,duration:l=250}=u,f=(0,s.of)(g,l);return n.createElement(o.A,{in:c,mountOnEnter:!0,unmountOnExit:!0,timeout:l,classNames:f},i)}const g=(u,c)=>({enter:(0,t.css)({label:"enter",opacity:0}),enterActive:(0,t.css)({label:"enterActive",opacity:1,transition:`opacity ${c}ms ease-out`}),exit:(0,t.css)({label:"exit",opacity:1}),exitActive:(0,t.css)({label:"exitActive",opacity:0,transition:`opacity ${c}ms ease-out`})})},72960:(Q,A,e)=>{"use strict";e.d(A,{n:()=>r});var t=e(32196),n=e(96540),o=e(86634),s=e(40845);function r(u){const{visible:c,children:i,duration:l=250,horizontal:f,size:d}=u,h=(0,s.of)(g,l,f?"width":"height",d);return n.createElement(o.A,{in:c,mountOnEnter:!0,unmountOnExit:!0,timeout:l,classNames:h},i)}const g=(u,c,i,l)=>({enter:(0,t.css)({label:"enter",[`${i}`]:0,opacity:0}),enterActive:(0,t.css)({label:"enterActive",[`${i}`]:`${l}px`,opacity:1,transition:`opacity ${c}ms ease-out, ${i} ${c}ms ease-out`}),exit:(0,t.css)({label:"exit",[`${i}`]:`${l}px`,opacity:1}),exitActive:(0,t.css)({label:"exitActive",opacity:0,[`${i}`]:0,transition:`opacity ${c}ms ease-out, ${i} ${c}ms ease-out`})})},81297:(Q,A,e)=>{"use strict";e.d(A,{Z:()=>u});var t=e(96540),n=e(36613),o=e(16895);function s(c,i){return i.width===c.width&&i.height===c.height}function r(c,i){return i.data===c.data}function g(c,i){return i.config===c.config}class u extends t.Component{constructor(i){super(i),this.plotContainer=(0,t.createRef)(),this.plotCanvasBBox=(0,t.createRef)(),this.state={plot:null}}reinitPlot(){let{width:i,height:l,plotRef:f}=this.props;if(this.state.plot?.destroy(),i===0&&l===0)return;this.props.config.addHook("setSize",p=>{p.over});const d={width:Math.floor(this.props.width),height:Math.floor(this.props.height),...this.props.config.getConfig()};(0,o.uY)("UPlot",!1,"Reinitializing plot",d);const h=new n.A(d,this.props.data,this.plotContainer.current);f&&f(h),this.setState({plot:h})}componentDidMount(){this.reinitPlot()}componentWillUnmount(){this.state.plot?.destroy()}componentDidUpdate(i){let{plot:l}=this.state;s(i,this.props)?g(i,this.props)?r(i,this.props)||l?.setData(this.props.data):this.reinitPlot():l?.setSize({width:Math.floor(this.props.width),height:Math.floor(this.props.height)})}render(){return t.createElement("div",{style:{position:"relative"}},t.createElement("div",{ref:this.plotContainer,"data-testid":"uplot-main-div"}),this.props.children)}}},24182:(Q,A,e)=>{"use strict";e.d(A,{$:()=>d,t:()=>f});var t=e(96540),n=e(28240),o=e(8066),s=e(75059),r=e(57875),g=e(52622),u=e(40845),c=e(67266),i=e(55726);const l=h=>h==null?"-":h.toFixed(1);function f(h,p){return h.getSeries().some(m=>{const a=m.props.dataFrameFieldIndex;if(!a)return!1;const v=p[a.frameIndex]?.fields[a.fieldIndex];return!(!v||v.config.custom?.hideFrom?.legend)})}const d=t.memo(({data:h,config:p,placement:m,calcs:a,displayMode:v,...E})=>{const D=(0,u.$j)(),b=p.getSeries().map(C=>{const y=C.props,M=y.dataFrameFieldIndex,T=p.getAxisPlacement(C.props.scaleKey);if(!M)return;const I=h[M.frameIndex]?.fields[M.fieldIndex];if(!I||I.config.custom?.hideFrom?.legend)return;const x=(0,n.Ct)(I,h[M.frameIndex],h),O=(0,o.lz)(I,D).color;return{disabled:!(y.show??!0),fieldIndex:M,color:O,label:x,yAxis:T===g.vM.Left||T===g.vM.Bottom?1:2,getDisplayValues:()=>{if(!a?.length)return[];const P=I.display??l;let L=null;const U=(0,s.Nw)({field:I,reducers:a});return a.map(R=>{const B=s.AS.get(R);let H=P;return B.id===s.gy.diffperc&&(H=(0,r.J)({field:{...I,config:{...I.config,unit:"percentunit"}},theme:D})),(B.id===s.gy.count||B.id===s.gy.changeCount||B.id===s.gy.distinctCount)&&(L||(L=(0,r.J)({field:{...I,config:{...I.config,unit:"none"}},theme:D})),H=L),{...H(U[R]),title:B.name,description:B.description}})},getItemKey:()=>`${x}-${M.frameIndex}-${M.fieldIndex}`}}).filter(C=>C!==void 0);return t.createElement(c.KU.Legend,{placement:m,...E},t.createElement(i.t,{placement:m,items:b,displayMode:v,sortBy:E.sortBy,sortDesc:E.sortDesc,isSortable:!0}))});d.displayName="PlotLegend"},52198:(Q,A,e)=>{"use strict";e.d(A,{t:()=>n});var t=e(52622);const n={drawStyle:[{label:"Lines",value:t.GR.Line},{label:"Bars",value:t.GR.Bars},{label:"Points",value:t.GR.Points}],lineInterpolation:[{description:"Linear",value:t.dx.Linear,icon:"gf-interpolation-linear"},{description:"Smooth",value:t.dx.Smooth,icon:"gf-interpolation-smooth"},{description:"Step before",value:t.dx.StepBefore,icon:"gf-interpolation-step-before"},{description:"Step after",value:t.dx.StepAfter,icon:"gf-interpolation-step-after"}],barAlignment:[{description:"Before",value:t.Nj.Before,icon:"gf-bar-alignment-before"},{description:"Center",value:t.Nj.Center,icon:"gf-bar-alignment-center"},{description:"After",value:t.Nj.After,icon:"gf-bar-alignment-after"}],showPoints:[{label:"Auto",value:t.yL.Auto,description:"Show points when the density is low"},{label:"Always",value:t.yL.Always},{label:"Never",value:t.yL.Never}],axisPlacement:[{label:"Auto",value:t.vM.Auto,description:"First field on the left, everything else on the right"},{label:"Left",value:t.vM.Left},{label:"Right",value:t.vM.Right},{label:"Hidden",value:t.vM.Hidden}],fillGradient:[{label:"None",value:t.on.None},{label:"Opacity",value:t.on.Opacity,description:"Enable fill opacity gradient"},{label:"Hue",value:t.on.Hue,description:"Small color hue gradient"},{label:"Scheme",value:t.on.Scheme,description:"Use color scheme to define gradient"}],stacking:[{label:"Off",value:t.gs.None},{label:"Normal",value:t.gs.Normal},{label:"100%",value:t.gs.Percent}],thresholdsDisplayModes:[{label:"Off",value:t.Ly.Off},{label:"As lines",value:t.Ly.Line},{label:"As lines (dashed)",value:t.Ly.Dashed},{label:"As filled regions",value:t.Ly.Area},{label:"As filled regions and lines",value:t.Ly.LineAndArea},{label:"As filled regions and lines (dashed)",value:t.Ly.DashedAndArea}]}},30501:(Q,A,e)=>{"use strict";e.d(A,{fU:()=>h,pi:()=>i,zH:()=>f});var t=e(83195),n=e(97706),o=e(42994),s=e(72724),r=e(52622),g=e(29413),u=e(52811),c=e(93060);const i=12,l=8;class f extends u.R{merge(a){this.props.size=(0,c.Y)("max",this.props.size,a.size),this.props.label||(this.props.label=a.label),this.props.placement===r.vM.Auto&&(this.props.placement=a.placement)}calculateSpace(a,v,E,D,b){const C=a.axes[v],y=a.scales[C.scale];if(C.side!==2||!y)return 30;const M=40;if(y.time){const T=b/M,I=(D-E)/T,x=h(a,[E],v,M,I);return(0,g.kD)(x[0],i).width+18}return M}calculateAxisSize(a,v,E){const D=a.axes[E];let b=D.ticks.size;if(D.side===2)b+=D.gap+i;else if(v?.length){let C=v.reduce((M,T)=>Math.max(M,(0,g.kD)(T,i).width),0);const y=Math.min(a.width*.4,C);b+=D.gap+D.labelGap+y}return Math.ceil(b)}getConfig(){let{scaleKey:a,label:v,show:E=!0,placement:D=r.vM.Auto,grid:b={show:!0},ticks:C,space:y,filter:M,gap:T=5,formatValue:I,splits:x,values:S,incrs:O,isTime:P,timeZone:L,theme:U,tickLabelRotation:R,size:B,color:H,border:w,decimals:N,distr:V=r.L4.Linear}=this.props;const G=`${i}px ${U.typography.fontFamily}`,_=U.isDark?"rgba(240, 250, 255, 0.09)":"rgba(0, 10, 23, 0.09)";(0,t.j9)(a)&&(x=[0,1]),N===0&&V===r.L4.Linear&&(M=(j,k)=>k.map(Y=>Number.isInteger(Y)?Y:null));let K={scale:a,show:E,stroke:H??U.colors.text.primary,side:p(D),font:G,size:B??((j,k,Y)=>this.calculateAxisSize(j,k,Y)),rotate:R,gap:T,labelGap:0,grid:{show:b.show,stroke:_,width:1/devicePixelRatio},ticks:Object.assign({show:!0,stroke:w?.show?H??U.colors.text.primary:_,width:1/devicePixelRatio,size:4},C),splits:x,values:S,space:y??((j,k,Y,ee,re)=>this.calculateSpace(j,k,Y,ee,re)),filter:M,incrs:O};return w?.show&&(K.border={stroke:H??U.colors.text.primary,width:1/devicePixelRatio,...w}),v!=null&&v.length>0&&(K.label=v,K.labelSize=i+l,K.labelFont=G,K.labelGap=l),S?K.values=S:P?K.values=h:I&&(K.values=(j,k,Y,ee,re)=>{let J=(0,n.E)((0,n.h)(re,6));return k.map(ne=>I(ne,J>0?J:void 0))}),K.timeZone=L,K}}const d={second:1e3,minute:60*1e3,hour:60*60*1e3,day:24*60*60*1e3,month:28*24*60*60*1e3,year:365*24*60*60*1e3};function h(m,a,v,E,D){const b=m.axes[v].timeZone,C=m.scales.x,y=(C?.max??0)-(C?.min??0),M=Math.round(d.year/d.day)*d.day,T=Math.round(D/d.day)*d.day;let I=o.WC.interval.year;return Dx==null?"":(0,s.LE)(x,{format:I,timeZone:b}))}function p(m){switch(m){case r.vM.Top:return 0;case r.vM.Right:return 1;case r.vM.Bottom:return 2;case r.vM.Left:}return 3}},51336:(Q,A,e)=>{"use strict";e.d(A,{e:()=>b});var t=e(2543),n=e(36613),o=e(43127),s=e(91410),r=e(52622),g=e(16895),u=e(30501),c=e(93060),i=e(24293),l=e(23596),f=e(52811),d=e(74863);class h extends f.R{getConfig(){const{facets:y,drawStyle:M,pathBuilder:T,pointsBuilder:I,pointsFilter:x,lineInterpolation:S,lineWidth:O,lineStyle:P,barAlignment:L,barWidthFactor:U,barMaxWidth:R,showPoints:B,pointSize:H,scaleKey:w,pxAlign:N,spanNulls:V,show:G=!0}=this.props;let _={},K=this.getLineColor();_.stroke=K,_.width=O,P&&P.fill!=="solid"&&(P.fill==="dot"&&(_.cap="round"),_.dash=P.dash??[10,10]),T!=null?_.paths=T:M===r.GR.Points?_.paths=()=>null:M!=null&&(_.paths=(Y,ee,re,J)=>m(M,S,L,U,R)(Y,ee,re,J));const j=typeof K=="string"?K:(Y,ee)=>Y.series[ee]._stroke,k={points:{stroke:j,fill:j,size:!H||H"",pxAlign:N,show:G,fill:this.getFill(),..._,...k}}getLineColor(){const{lineColor:y,gradientMode:M,colorMode:T,thresholds:I,theme:x,hardMin:S,hardMax:O,softMin:P,softMax:L,dynamicSeriesColor:U}=this.props;return M===r.on.None&&U?(R,B)=>U(B)??y??i.F:M===r.on.Scheme&&T?.id!==i.Y.Fixed?(0,d.pl)(1,x,T,I,S,O,P,L):M===r.on.Hue?(0,d.B5)(y??i.F,1,x):y??i.F}getFill(){const{lineColor:y,fillColor:M,gradientMode:T,fillOpacity:I,colorMode:x,thresholds:S,theme:O,hardMin:P,hardMax:L,softMin:U,softMax:R,dynamicSeriesColor:B}=this.props;if(M)return M;const H=T??r.on.None,w=(I??0)/100;if(H===r.on.None&&B&&w>0)return(N,V)=>{let G=N.series[V]._stroke;return l.alpha(G??"",w)};switch(H){case r.on.Opacity:return(0,d.WO)(M??y,w);case r.on.Hue:return(0,d.B5)(M??y,w,O);case r.on.Scheme:if(x?.id!==i.Y.Fixed)return(0,d.pl)(w,O,x,S,P,L,U,R);default:if(w>0)return l.alpha(y??"",w)}}}let p;function m(C,y,M=r.Nj.Center,T=.6,I=200){const x=n.A.paths;if(p||(p={linear:x.linear(),smooth:x.spline(),stepBefore:x.stepped({align:-1}),stepAfter:x.stepped({align:1})}),C===r.GR.Bars){let S=`bars|${M}|${T}|${I}`;return p[S]||(p[S]=x.bars({size:[T,I],align:M})),p[S]}else if(C===r.GR.Line){if(y===r.dx.StepBefore)return p.stepBefore;if(y===r.dx.StepAfter)return p.stepAfter;if(y===r.dx.Smooth)return p.smooth}return p.linear}var a=e(84140),v=e(50082);function E(C){const y=C.config.mode===r.Ly.Dashed||C.config.mode===r.Ly.DashedAndArea?[10,10]:null;function M(B,H,w,N){let V=B.ctx,G=0;for(let _=0;_=_&&_>0?j=(0,a.A)(N.visualization.getColorByName(w[_-1].color)):j=(0,a.A)(N.visualization.getColorByName(K.color)),j.getAlpha()===1&&j.setAlpha(.7);let k=Math.round(B.bbox.left),Y=Math.round(B.valToPos(K.value,H,!0)),ee=Math.round(B.bbox.left+B.bbox.width),re=Math.round(B.valToPos(K.value,H,!0));V.beginPath(),V.moveTo(k,Y),V.lineTo(ee,re),V.strokeStyle=j.toString(),V.stroke()}}function T(B,H,w,N){let V=B.ctx,G=(0,d.Z8)(B,H,w.map(_=>{let K=(0,a.A)(N.visualization.getColorByName(_.color));return K.getAlpha()===1&&K.setAlpha(.15),[_.value,K.toString()]}),!0);V.fillStyle=G,V.fillRect(B.bbox.left,B.bbox.top,B.bbox.width,B.bbox.height)}const{scaleKey:I,thresholds:x,theme:S,config:O,hardMin:P,hardMax:L,softMin:U,softMax:R}=C;return B=>{const H=B.ctx,{min:w,max:N}=B.scales.x,{min:V,max:G}=B.scales[I];if(w==null||N==null||V==null||G==null)return;let{steps:_,mode:K}=x;if(K===v.O.Percentage){let[j,k]=(0,d.EJ)(B,I,P,L,U,R),Y=k-j;_=_.map(ee=>({...ee,value:j+Y*(ee.value/100)}))}switch(H.save(),O.mode){case r.Ly.Line:case r.Ly.Dashed:M(B,I,_,S);break;case r.Ly.Area:T(B,I,_,S);break;case r.Ly.LineAndArea:case r.Ly.DashedAndArea:T(B,I,_,S),M(B,I,_,S)}H.restore()}}const D={drag:{setScale:!1},points:{size:(C,y)=>C.series[y].points.size*2,width:(C,y,M)=>M/4},focus:{prox:30}};class b{constructor(y=o.lE){this.series=[],this.axes={},this.scales=[],this.bands=[],this.stackingGroups=[],this.hasLeftAxis=!1,this.hooks={},this.tz=void 0,this.sync=!1,this.mode=1,this.frames=void 0,this.thresholds={},this.tooltipInterpolator=void 0,this.padding=void 0,this.prepData=void 0,this.scaleKeys=["",""],this.tzDate=M=>{let T=new Date(M);return this.tz?n.A.tzDate(T,this.tz):T},this.tz=(0,s.QZ)(y,Date.now())?.ianaName}addHook(y,M){(0,g.uY)("UPlotConfigBuilder",!1,"addHook",y),this.hooks[y]||(this.hooks[y]=[]),this.hooks[y].push(M)}addThresholds(y){this.thresholds[y.scaleKey]||(this.thresholds[y.scaleKey]=y,this.addHook("drawClear",E(y)))}addAxis(y){y.placement=y.placement??r.vM.Auto,y.grid=y.grid??{};let M=y.scaleKey;if(M==="x"&&(M+=y.timeZone??""),this.axes[M]){this.axes[M].merge(y);return}y.placement===r.vM.Auto&&(y.placement=this.hasLeftAxis?r.vM.Right:r.vM.Left),y.placement===r.vM.Left&&(this.hasLeftAxis=!0),y.placement===r.vM.Hidden&&(y.grid.show=!1,y.size=0),this.axes[M]=new u.zH(y)}getAxisPlacement(y){return this.axes[y]?.props.placement??r.vM.Left}setCursor(y){this.cursor=(0,t.merge)({},this.cursor,y)}setMode(y){this.mode=y}setSelect(y){this.select=y}addSeries(y){this.series.push(new h(y))}getSeries(){return this.series}addScale(y){const M=this.scales.find(T=>T.props.scaleKey===y.scaleKey);if(M){M.merge(y);return}this.scales.push(new c.G(y))}addBand(y){this.bands.push(y)}setStackingGroups(y){this.stackingGroups=y}getStackingGroups(){return this.stackingGroups}setTooltipInterpolator(y){this.tooltipInterpolator=y}getTooltipInterpolator(){return this.tooltipInterpolator}setPrepData(y){this.prepData=M=>(this.frames=M,y(M,this.getStackingGroups()))}setSync(){this.sync=!0}hasSync(){return this.sync}setPadding(y){this.padding=y}getConfig(){if(this.cachedConfig)return this.cachedConfig;const y={...g.NN,mode:this.mode,series:[this.mode===2?null:{value:()=>""}]};y.axes=this.ensureNonOverlappingAxes(Object.values(this.axes)).map(T=>T.getConfig()),y.series=[...y.series,...this.series.map(T=>T.getConfig())],y.scales=this.scales.reduce((T,I)=>({...T,...I.getConfig()}),{}),y.hooks=this.hooks,y.select=this.select;const M=(T="")=>(I,x)=>{let S=I.series[x].points._stroke;if(typeof S!="string"){let O=this.frames[0].fields[x];S=O.display(O.values[I.cursor.idxs[x]]).color}return S+T};return y.cursor=(0,t.merge)({},D,{points:{stroke:M("80"),fill:M()}},this.cursor),y.tzDate=this.tzDate,Array.isArray(this.padding)&&(y.padding=this.padding),this.stackingGroups.forEach(T=>{(0,g.Tz)(T).forEach(I=>{this.addBand(I)})}),this.bands.length&&(y.bands=this.bands),this.cachedConfig=y,y}ensureNonOverlappingAxes(y){const M=y.find(x=>x.props.scaleKey==="x"),T=y.filter(x=>x.props.grid?.show===void 0),I=T.findIndex(x=>x.props.placement===r.vM.Left||x.props.placement===r.vM.Right||x.props.placement===r.vM.Bottom&&x!==M);for(let x=0;x{"use strict";e.d(A,{G:()=>g,Y:()=>u});var t=e(36613),n=e(77678),o=e(83195),s=e(52622),r=e(52811);class g extends r.R{merge(i){this.props.min=u("min",this.props.min,i.min),this.props.max=u("max",this.props.max,i.max)}getConfig(){let{isTime:i,scaleKey:l,min:f,max:d,softMin:h,softMax:p,range:m,direction:a,orientation:v,centeredZero:E,decimals:D}=this.props;const b=this.props.distribution,C=i?{}:{distr:b===s.L4.Symlog?4:b===s.L4.Log?3:b===s.L4.Ordinal?2:1,log:b===s.L4.Log||b===s.L4.Symlog?this.props.log??2:void 0,asinh:b===s.L4.Symlog?this.props.linearThreshold??1:void 0};if(b===s.L4.Log){let L=this.props.log,U=L===2?Math.log2:Math.log10;f!=null&&(f<=0?f=null:f=L**Math.floor(U(f))),d!=null&&(d<=0?d=null:d=L**Math.ceil(U(d))),h!=null&&(h<=0?h=null:h=L**Math.floor(U(h))),p!=null&&(p<=0?p=null:p=L**Math.ceil(U(p)))}let y=h==null?3:1,M=p==null?3:1;const T={min:{pad:.1,hard:f??-1/0,soft:h||0,mode:y},max:{pad:.1,hard:d??1/0,soft:p||0,mode:M}};let I=h==null&&f!=null,x=p==null&&d!=null,S=I&&x;const O=(L,U,R,B)=>{const H=L.scales[B];let w=[U,R];if(B==="x"&&!i&&b===s.L4.Linear||!S&&U==null&&R==null)return w;let N=H.log??10;if(H.distr===1||H.distr===2||H.distr===4){if(E){let V=Math.abs(U),G=Math.abs(R),_=Math.max(V,G);_===0&&(_=80),U=-_,R=_}H.distr===4?w=t.A.rangeAsinh(U,R,N,!0):w=t.A.rangeNum(I?f:U,x?d:R,T)}else H.distr===3&&(w=t.A.rangeLog(f??U,d??R,N,!0));if(D===0)if(H.distr===1||H.distr===2)w[0]=(0,n.rs)(w[0],1),w[1]=(0,n.Uh)(w[1],1);else if(H.distr===3){let V=H.log===2?Math.log2:Math.log10;if(w[0]<=1)w[0]=1;else{let _=Math.floor(V(w[0]));w[0]=N**_}let G=Math.ceil(V(w[1]));w[1]=N**G,w[0]===w[1]&&(w[1]*=N)}else H.distr===4&&(w[0]=(0,n.rs)(w[0],1),w[1]=(0,n.Uh)(w[1],1));return(H.distr===1||H.distr===4)&&(I&&(w[0]=f),x&&(w[1]=d)),w[0]>=w[1]&&(w[0]=H.distr===3?1:0,w[1]=100),w};let P=!i&&!S;return(0,o.j9)(l)&&(P=!1,m=[0,1]),{[l]:{time:i,auto:P,range:m??O,dir:a,ori:v,...C}}}}function u(c,i,l){const f=i!=null,d=l!=null;return f?d?c==="min"?il?i:l:i:l}},74863:(Q,A,e)=>{"use strict";e.d(A,{B5:()=>i,EJ:()=>h,WO:()=>c,Z8:()=>f,pl:()=>m});var t=e(84140),n=e(23596),o=e(24293),s=e(50082),r=e(52622),g=e(29413);function u(a,v,E){let D=0,b=0,C=0,y=0;return a===3?(b=v.top,y=v.top+v.height):a===2?(D=v.left+v.width,C=v.left):a===1?(b=v.top+v.height,y=v.top):a===0&&(D=v.left,C=v.left+v.width),E.createLinearGradient(D,b,C,y)}function c(a,v){return(E,D)=>{const b=(0,g.Yc)(),C=u(E.scales.x.ori===r.Lt.Horizontal?3:2,E.bbox,b);return C.addColorStop(0,n.alpha(a,v)),C.addColorStop(1,n.alpha(a,0)),C}}function i(a,v,E){return(D,b)=>{const C=(0,g.Yc)(),y=u(D.scales.x.ori===r.Lt.Horizontal?3:2,D.bbox,C),M=(0,t.A)(a).spin(-25).darken(5),T=(0,t.A)(a).saturate(20).spin(20).brighten(10);return E.isDark?(y.addColorStop(0,T.lighten(10).setAlpha(v).toString()),y.addColorStop(1,M.darken(10).setAlpha(v).toString())):(y.addColorStop(0,T.lighten(10).setAlpha(v).toString()),y.addColorStop(1,M.setAlpha(v).toString())),y}}var l=(a=>(a[a.Right=0]="Right",a[a.Up=1]="Up",a[a.Left=2]="Left",a[a.Down=3]="Down",a))(l||{});function f(a,v,E,D=!1){let b=a.scales[v],C=null,y=null;for(let w=0;w=b.max)break}if(C===y)return E[C][1];let M=E[C][0],T=E[y][0];M===-1/0&&(M=b.min),T===1/0&&(T=b.max);let I=Math.round(a.valToPos(M,v,!0)),x=Math.round(a.valToPos(T,v,!0)),S=I-x;if(S===0)return E[y][1];let O,P,L,U;a.scales.x.ori===r.Lt.Horizontal?(O=L=0,P=I,U=x):(P=U=0,O=I,L=x);let B=(0,g.Yc)().createLinearGradient(O,P,L,U),H;for(let w=C;w<=y;w++){let N=E[w],V=w===C?I:w===y?x:Math.round(a.valToPos(N[0],v,!0)),G=(I-V)/S;D&&w>C&&B.addColorStop(G,H),B.addColorStop(G,H=N[1])}return B}function d(a,v){let E=a.scales[v],D=1/0,b=-1/0;return a.series.forEach((C,y)=>{if(C.show&&C.scale===v)if(C.min==null){let M=a.data[y];for(let T=0;T{let x=T.series[I].scale,S="";if(E.id===o.Y.Thresholds)if(D.mode===s.O.Absolute){const O=D.steps.map(P=>[P.value,p(P.color)?"#0000":n.alpha(v.visualization.getColorByName(P.color),a)]);S=f(T,x,O,!0)}else{const[O,P]=h(T,x,b,C,y,M),L=P-O,U=D.steps.map(R=>[O+L*(R.value/100),n.alpha(v.visualization.getColorByName(R.color),a)]);S=f(T,x,U,!0)}else if(E.getColors){const O=E.getColors(v),[P,L]=h(T,x,b,C,y,M),U=L-P,R=O.map((B,H)=>[P+U*(H/(O.length-1)),n.alpha(v.visualization.getColorByName(B),a)]);S=f(T,x,R,!1)}return S}}},78226:(Q,A,e)=>{"use strict";e.d(A,{a:()=>r});var t=e(96540),n=e(1604),o=e(6967),s=e(97620);function r({id:g,events:u,renderEventMarker:c,mapEventToXYCoords:i,config:l}){const f=(0,t.useRef)(),[d,h]=(0,t.useState)(0),p=(0,n.A)();(0,t.useLayoutEffect)(()=>{l.addHook("init",a=>{f.current=a}),l.addHook("draw",()=>{p()&&h(a=>a+1)})},[l,h]);const m=(0,t.useMemo)(()=>{const a=[];if(!f.current||u.length===0)return a;for(let v=0;v{"use strict";e.d(A,{p:()=>n});var t=e(96540);const n=({x:o,y:s,children:r})=>t.createElement("div",{style:{position:"absolute",top:`${s}px`,left:`${o}px`}},r)},97620:(Q,A,e)=>{"use strict";e.d(A,{_:()=>o});var t=e(32196),n=e(96540);const o=({children:s,left:r,top:g})=>{const u=(0,n.useMemo)(()=>(0,t.css)({position:"absolute",overflow:"visible",left:`${r}px`,top:`${g}px`}),[r,g]);return n.createElement("div",{className:u},s)}},96747:(Q,A,e)=>{"use strict";e.d(A,{_X:()=>o._,a:()=>t.a,pH:()=>n.p});var t=e(78226),n=e(6967),o=e(97620)},55129:(Q,A,e)=>{"use strict";e.d(A,{M:()=>o});var t=e(52622),n=e(52811);function o(r,g){const u="na",c=`${r.min!==void 0?r.min:u}-${r.max!==void 0?r.max:u}`,i=`${r.custom?.axisSoftMin!==void 0?r.custom.axisSoftMin:u}-${r.custom?.axisSoftMax!==void 0?r.custom.axisSoftMax:u}`,l=`${r.custom?.axisPlacement!==void 0?r.custom?.axisPlacement:t.vM.Auto}`,f=r.unit??n.s,d=r.custom?.scaleDistribution?s(r.custom.scaleDistribution):t.L4.Linear,h=r.custom?.axisLabel?r.custom.axisLabel:u;return`${f}/${c}/${i}/${l}/${d}/${h}/${g}`}function s(r){return r.type===t.L4.Log?`${r.type}${r.log}`:r.type}},23117:(Q,A,e)=>{"use strict";e.d(A,{Z:()=>c});var t=e(2543),n=e.n(t),o=e(96540);const s=.1,r=2,g=new Set(["ArrowRight","ArrowLeft","ArrowUp","ArrowDown","Shift"," "]),u=i=>{let l=i.root.closest("[tabindex]"),f=new Set,d=null,h=null;if(!l)return;const p=(C,y)=>{const{cursor:M}=i;if(M.left===void 0||M.top===void 0)return;const{width:T,height:I}=i.over.style,[x,S]=[Math.floor(parseFloat(T)),Math.floor(parseFloat(I))];i.setCursor({left:(0,t.clamp)(M.left+C,0,x),top:(0,t.clamp)(M.top+y,0,S)})},m=C=>{if(f.size===0||!i){h=null;return}const T=(C-(h??C))*s;let I=0,x=0;f.has("ArrowUp")&&(x-=T),f.has("ArrowDown")&&(x+=T),f.has("ArrowLeft")&&(I-=T),f.has("ArrowRight")&&(I+=T),f.has("Shift")&&(I*=r,x*=r),p(I,x);const{cursor:S}=i;if(f.has(" ")&&S){const O=Number(i.over.style.height.slice(0,-2));i.setSelect({left:S.left{if(C.key==="Tab"){i.setCursor({left:-5,top:-5});return}if(!g.has(C.key))return;if(C.preventDefault(),C.stopPropagation(),!f.has(C.key)){const M=f.size===0;f.add(C.key),d=C.key===" "&&d===null?i.cursor.left:d,M&&window.requestAnimationFrame(m)}},v=C=>{g.has(C.key)&&(f.delete(C.key),C.key===" "&&(C.preventDefault(),C.stopPropagation(),i.setSelect(i.select),d=null))},E=()=>{if(!l?.matches(":focus-visible"))return;const C=parseFloat(i.over.style.width),y=parseFloat(i.over.style.height);i.setCursor({left:C/2,top:y/2})},D=()=>{h=null,d=null,f.clear(),i.setSelect({left:0,top:0,width:0,height:0},!1)};l.addEventListener("keydown",a),l.addEventListener("keyup",v),l.addEventListener("focus",E),l.addEventListener("blur",D);const b=()=>{l?.removeEventListener("keydown",a),l?.removeEventListener("keyup",v),l?.removeEventListener("focus",E),l?.removeEventListener("blur",D),l=null};(i.hooks.destroy??=[]).push(b)},c=({config:i})=>((0,o.useLayoutEffect)(()=>i.addHook("init",u),[i]),null)},16615:(Q,A,e)=>{"use strict";e.d(A,{T:()=>E,n:()=>b});var t=e(32196),n=e(96540),o=e(1604),s=e(94624),r=e(57875),g=e(24293),u=e(28240),c=e(83195),i=e(11261),l=e(14588),f=e(52622),d=e(40845),h=e(17464),p=e(3139),m=e(69503),a=e(16895);const v=10,E=({mode:y=f.$N.Single,sortOrder:M=f.xB.None,sync:T,timeZone:I,config:x,renderTooltip:S,...O})=>{const P=(0,n.useRef)(),L=(0,d.$j)(),[U,R]=(0,n.useState)(null),[B,H]=(0,n.useState)(null),[w,N]=(0,n.useState)([]),[V,G]=(0,n.useState)(null),[_,K]=(0,n.useState)(!1),j=(0,o.A)();let k=null;const Y="TooltipPlugin",ee=(0,d.of)(C);if((0,n.useEffect)(()=>{(0,a.uY)(Y,!0,`Focused series: ${U}, focused point: ${B}`)},[B,U]),(0,n.useLayoutEffect)(()=>{let te;const oe=()=>{j()&&(K(!0),P.current?.root.classList.add("plot-active"))},ue=()=>{j()&&(G(null),K(!1),P.current?.root.classList.remove("plot-active"))};x.addHook("syncRect",(ge,he)=>te=he),x.addHook("init",ge=>{P.current=ge,ge.over.addEventListener("mouseenter",oe),ge.over.addEventListener("mouseleave",ue),k=ge.root.closest("[tabindex]"),k&&(k.addEventListener("focus",oe),k.addEventListener("blur",ue)),T&&T()===s.y.Crosshair&&ge.root.classList.add("shared-crosshair")});const ie=x.getTooltipInterpolator();return ie?x.addHook("setCursor",ge=>{ie(R,H,he=>{if(he){G(null);return}if(!te)return;const{x:De,y:pe}=b(ge,te);De!==void 0&&pe!==void 0&&G({x:De,y:pe})},ge)}):(x.addHook("setLegend",ge=>{j()&&(H(ge.legend.idx),N(ge.legend.idxs.slice()))}),x.addHook("setCursor",ge=>{if(!te||!j())return;const{x:he,y:De}=b(ge,te);G(he!==void 0&&De!==void 0?{x:he,y:De}:null)}),x.addHook("setSeries",(ge,he)=>{j()&&R(he)})),()=>{G(null),P.current&&(P.current.over.removeEventListener("mouseleave",ue),P.current.over.removeEventListener("mouseenter",oe),k&&(k.removeEventListener("focus",oe),k.removeEventListener("blur",ue)))}},[x,G,K,H,N]),B===null||!_&&T&&T()===s.y.Crosshair)return null;let re=O.data.fields[0];if(!re)return null;const J=re.display||(0,r.J)({field:re,timeZone:I,theme:L});let ne=null,q=J(re.values[B]).text;if(S)ne=S(O.data,U,B);else{if(y===f.$N.Single&&U!==null){const te=O.data.fields[U];if(!te)return null;const oe=w?.[U]??B;q=J(re.values[oe]).text;const ie=(te.display||(0,r.J)({field:te,timeZone:I,theme:L}))(te.values[oe]);ne=n.createElement(p.o,{series:[{color:ie.color||g.F,label:(0,u.Ct)(te,O.data,O.frames),value:ie?(0,c.cN)(ie):null}],timestamp:q})}if(y===f.$N.Multi){let te=[];const oe=O.data,ue=oe.fields,ie=[];for(let ge=0;ge{const le=ge.indexOf(De),Te=ge.indexOf(pe);return he(ie[le],ie[Te])})}ne=n.createElement(p.o,{series:te,timestamp:q})}}return n.createElement(h.ZL,{className:_?ee.tooltipWrapper:void 0},ne&&V&&n.createElement(m.o,{position:{x:V.x,y:V.y},offset:{x:v,y:v}},ne))};function D({left:y,top:M},T){return y===void 0||M===void 0?!1:y<0||y>T.width||M<0||M>T.height}function b(y,M){let T,I;const x=y.cursor.left||0,S=y.cursor.top||0;if(D(y.cursor,M)){const O=y.posToIdx(x);if(S<0||S>M.height){let P=(0,a.sw)(y,O);P&&(I=M.top+P,x>=0&&x<=M.width&&(T=M.left+y.valToPos(y.data[0][y.posToIdx(x)],y.series[0].scale)))}}else T=M.left+x,I=M.top+S;return{x:T,y:I}}const C=y=>({tooltipWrapper:(0,t.css)({"z-index":y.zIndex.portal+1+" !important"})})},77455:(Q,A,e)=>{"use strict";e.d(A,{b3:()=>d,xl:()=>v});var t=e(32196),n=e(96540),o=e(40961),s=e(40845),r=e(18348),g=e(29158);const u=({onClick:D,"aria-label":b,style:C})=>{const y=(0,s.of)(c);return n.createElement(g.K,{"aria-label":b??"Close",className:y,name:"times",onClick:D,style:C})},c=D=>(0,t.css)({position:"absolute",margin:"0px",right:D.spacing(1),top:D.spacing(1.25)}),i=void 0,l=void 0,f=10;var d=(D=>(D[D.xOne=0]="xOne",D[D.xAll=1]="xAll",D[D.xyOne=2]="xyOne",D))(d||{});function h(D,b){return{...D,...b,style:{...D.style,...b.style}}}const p={style:{transform:"",pointerEvents:"none"},isHovering:!1,isPinned:!1,contents:null,plot:null,dismiss:()=>{}},m=5,a=D=>D!=null&&!D.ctrlKey&&!D.metaKey,v=({config:D,hoverMode:b,render:C,clientZoom:y=!1,queryZoom:M,maxWidth:T,maxHeight:I})=>{const x=(0,n.useRef)(null),[{plot:S,isHovering:O,isPinned:P,contents:L,style:U,dismiss:R},B]=(0,n.useReducer)(h,p),{boostZIndex:H}=(0,n.useContext)(r.N);(0,n.useEffect)(()=>P?H():void 0,[P]);const w=(0,n.useRef)();T=P?i:T??i,I??=l;const N=(0,s.of)(E,T,I),V=(0,n.useRef)(C);return V.current=C,(0,n.useLayoutEffect)(()=>{w.current={width:0,height:0,observer:new ResizeObserver(Ee=>{let Re=w.current;for(const me of Ee)me.borderBoxSize?.length>0?(Re.width=me.borderBoxSize[0].inlineSize,Re.height=me.borderBoxSize[0].blockSize):(Re.width=me.contentRect.width,Re.height=me.contentRect.height)})};let G=!1,_=!1,K=S,j=O,k=!1,Y=P,ee=U;const re=()=>{j=ue!=null||b===1&&k};let J=0,ne=0,q={lft:0,top:0,rgt:screen.width,btm:screen.height},te=null,oe=S?.cursor.idxs.slice(),ue=null,ie=!1,ge=!1,he=!1;const De=(Ee=!1)=>{ge||(j?queueMicrotask(le):setTimeout(le,100),ge=!0),Ee&&(he=!0)},pe=Ee=>{x.current.contains(Ee.target)||Te()},le=()=>{ge=!1,he&&(ee={pointerEvents:Y?"all":"none"},K.cursor._lock=Y,Y?(document.addEventListener("mousedown",pe,!0),document.addEventListener("keydown",pe,!0)):(document.removeEventListener("mousedown",pe,!0),document.removeEventListener("keydown",pe,!0)),he=!1);let Ee={style:ee,isPinned:Y,isHovering:j,contents:j||te!=null?V.current(K,oe,ue,Y,Te,te,ie):null,dismiss:Te};B(Ee),te=null,ie=!1},Te=()=>{let Ee=Y;Y=!1,j=!1,K.setCursor({left:-10,top:-10}),De(Ee)};D.addHook("init",Ee=>{B({plot:K=Ee}),y&&Ee.over.addEventListener("mousedown",Me=>{if(a(Me)&&Me.button===0&&Me.shiftKey){_=!0,Ee.cursor.drag.x=!1,Ee.cursor.drag.y=!0;let ye=Le=>{Ee.cursor.drag.x=!0,Ee.cursor.drag.y=!1,document.removeEventListener("mouseup",ye,!0)};document.addEventListener("mouseup",ye,!0)}},!0),Ee.over.addEventListener("click",Me=>{if(Me.target===Ee.over)if(Me.ctrlKey||Me.metaKey){let ye=Ee.posToVal(Ee.cursor.left,"x");te={from:ye,to:ye},De(!1)}else j&&ue!=null&&!Y&&setTimeout(()=>{Y=!0,De(!0)},0)});const Re="pageContent",me=16;Ee.over.addEventListener("mouseenter",()=>{let Me=document.documentElement,ye=Me.clientWidth-me,Le=Me.clientHeight-me,We=0,Be=0,Ye=ye,at=Le,st=Ee.root;for(;st!=null&&st.id!==Re;){let Ke=getComputedStyle(st),Xe=Ke.getPropertyValue("overflow-x"),He=Ke.getPropertyValue("overflow-y");if(Xe!=="visible"||He!=="visible"){let Ge=st.getBoundingClientRect();We=Math.max(Ge.x,We),Be=Math.max(Ge.y,Be),Ye=Math.min(We+Ge.width,Ye),at=Math.min(Be+Ge.height,at);break}st=st.parentElement}q.lft=We,q.top=Be,q.rgt=Ye,q.btm=at},{capture:!0})}),D.addHook("setSelect",Ee=>{if(y||M!=null)if(a(Ee.cursor.event)){if(y&&_){if(Ee.select.height>=m){for(let Re in Ee.scales)if(Re!=="x"){const me=Ee.posToVal(Ee.select.top,Re),Me=Ee.posToVal(Ee.select.top+Ee.select.height,Re);Ee.setScale(Re,{min:Me,max:me})}G=!0}_=!1}else if(M!=null&&Ee.select.width>=m){const Re=Ee.posToVal(Ee.select.left,"x"),me=Ee.posToVal(Ee.select.left+Ee.select.width,"x");M({from:Re,to:me}),G=!1}}else te={from:Ee.posToVal(Ee.select.left,"x"),to:Ee.posToVal(Ee.select.left+Ee.select.width,"x")},De(!0);Ee.setSelect({left:0,width:0,top:0,height:0},!1)}),(y||M!=null)&&D.setCursor({bind:{dblclick:Ee=>()=>{if(!a(Ee.cursor.event))return null;if(y&&G){for(let Re in Ee.scales)Re!=="x"&&Ee.setScale(Re,{min:null,max:null});G=!1}else if(M!=null){let Re=Ee.scales.x;const me=Re.min,Me=Re.max,ye=(Me-me)/2;M({from:me-ye,to:Me+ye})}return null}}}),D.addHook("setData",Ee=>{G=!1,_=!1}),D.addHook("setSeries",(Ee,Re)=>{ue=Re,re(),De()}),D.addHook("setLegend",Ee=>{oe=K?.cursor.idxs.slice(),k=oe.some((Re,me)=>me>0&&Re!=null),re(),De()}),D.addHook("setCursor",Ee=>{let{left:Re=-10,top:me=-10,event:Me}=Ee.cursor;if(Re>=0||me>=0){ie=Me==null;let ye="";if(ie)ye=`translateX(${Re}px) translateY(${Ee.rect.height/2}px) translateY(-50%)`;else{let{width:Le,height:We}=w.current;Le+=f,We+=f;let Be=Ee.rect.left+Re,Ye=Ee.rect.top+me;ne!==0?Ye+Weq.btm&&Ye-We>=0&&(ne=-We),J!==0?Be+Leq.rgt&&Be-Le>=0&&(J=-Le);const at=Re+(J===0?f:-f),st=me+(ne===0?f:-f);ye=`translateX(${at}px) ${J===0?"":"translateX(-100%)"} translateY(${st}px) ${ne===0?"":"translateY(-100%)"}`}j&&(x.current!=null?x.current.style.transform=ye:(ee.transform=ye,De()))}})},[D]),(0,n.useLayoutEffect)(()=>{const G=w.current;if(x.current!=null){G.observer.observe(x.current);const{width:_,height:K}=x.current.getBoundingClientRect();G.width=_,G.height=K;let j=S.cursor.event;if(j!=null){const k=j.type!=="mousemove";k&&(j=new MouseEvent("mousemove",{view:window,bubbles:!0,cancelable:!0,clientX:j.clientX,clientY:j.clientY,screenX:j.screenX,screenY:j.screenY})),!(k?!1:performance.now()-j.timeStamp>16)&&S.over.dispatchEvent(j)}else S.setCursor({left:S.cursor.left,top:S.cursor.top},!0)}else G.width=0,G.height=0},[O]),S&&O?(0,o.createPortal)(n.createElement("div",{className:(0,t.cx)(N.tooltipWrapper,P&&N.pinned),style:U,ref:x},P&&n.createElement(u,{onClick:R}),L),S.over):null},E=(D,b,C)=>({tooltipWrapper:(0,t.css)({top:0,left:0,zIndex:D.zIndex.tooltip,whiteSpace:"pre",borderRadius:D.shape.radius.default,position:"absolute",background:D.colors.background.primary,border:`1px solid ${D.colors.border.weak}`,boxShadow:D.shadows.z2,userSelect:"text",maxWidth:b??"none",maxHeight:C??"none",overflowY:"auto"}),pinned:(0,t.css)({boxShadow:D.shadows.z3})})},10175:(Q,A,e)=>{"use strict";e.d(A,{j:()=>s});var t=e(96540);const n=5,o=r=>r!=null&&!r.ctrlKey&&!r.metaKey,s=({onZoom:r,config:g,withZoomY:u=!1})=>((0,t.useLayoutEffect)(()=>{let c=!1,i=!1;u&&g.addHook("init",l=>{l.over.addEventListener("mousedown",f=>{if(o(f)&&f.button===0&&f.shiftKey){i=!0,l.cursor.drag.x=!1,l.cursor.drag.y=!0;let d=h=>{l.cursor.drag.x=!0,l.cursor.drag.y=!1,document.removeEventListener("mouseup",d,!0)};document.addEventListener("mouseup",d,!0)}},!0)}),g.addHook("setSelect",l=>{if(o(l.cursor.event)){if(u&&i){if(l.select.height>=n){for(let f in l.scales)if(f!=="x"){const d=l.posToVal(l.select.top,f),h=l.posToVal(l.select.top+l.select.height,f);l.setScale(f,{min:h,max:d})}c=!0}i=!1}else if(l.select.width>=n){const f=l.posToVal(l.select.left,"x"),d=l.posToVal(l.select.left+l.select.width,"x");r({from:f,to:d}),c=!1}}l.setSelect({left:0,width:0,top:0,height:0},!1)}),g.setCursor({bind:{dblclick:l=>()=>{if(!o(l.cursor.event))return null;if(u&&c){for(let f in l.scales)f!=="x"&&l.setScale(f,{min:null,max:null});c=!1}else{let f=l.scales.x;const d=f.min,h=f.max,p=(h-d)/2;r({from:d-p,to:h+p})}return null}}})},[g]),null)},66737:(Q,A,e)=>{"use strict";e.d(A,{Tk:()=>n.T,Z7:()=>s.Z,jn:()=>t.j,xl:()=>o.xl});var t=e(10175),n=e(16615),o=e(77455),s=e(23117)},52811:(Q,A,e)=>{"use strict";e.d(A,{R:()=>n,s:()=>t});const t="__fixed";class n{constructor(s){this.props=s}}},16895:(Q,A,e)=>{"use strict";e.d(A,{NN:()=>l,Tz:()=>d,bq:()=>p,ro:()=>h,sw:()=>m,uY:()=>D});var t=e(11261),n=e(50311),o=e(52622),s=e(40621),r=e(91040),g=e(55129);const u=/\b(YYYY|YY|MMMM|MMM|MM|M|DD|D|WWWW|WWW|HH|H|h|AA|aa|a|mm|m|ss|s|fff)\b/g;function c(b){return b.replace(u,C=>`{${C}}`)}const i=(b,C,y)=>{let M=C%2?y[0]||y[2]:y[1]||y[3];return y[C]||!M?0:8},l={ms:1,focus:{alpha:1},cursor:{focus:{prox:30}},legend:{show:!1},padding:[i,i,i,i],series:[],hooks:{}};var f=(b=>(b[b.Pos=1]="Pos",b[b.Neg=-1]="Neg",b))(f||{});function d(b){let C=[],{series:y,dir:M}=b,T=y.length-1,I=y.slice().reverse();return I.forEach((x,S)=>{if(S!==T){let O=I[S+1];C.push({series:[x,O],dir:-1*M})}}),C}function h(b){let C=new Map;return b.fields.forEach(({config:y,values:M,type:T},I)=>{if(I===0)return;let{custom:x}=y;if(x==null||x.hideFrom?.viz)return;let{stacking:S}=x;if(S==null)return;let{mode:O,group:P}=S;if(O===o.gs.None)return;let L=x.transform,U=a(L,M),R=x.drawStyle,B=R===o.GR.Bars?x.barAlignment:R===o.GR.Line?x.lineInterpolation:null,H=`${U}|${O}|${P}|${(0,g.M)(y,T)}|${R}|${B}`,w=C.get(H);w==null&&(w={series:[],dir:U},C.set(H,w)),w.series.push(I)}),[...C.values()]}function p(b,C,y){let M=Array(b.fields.length),T=C.length,I=b.length,x=T>0?Array(I).fill(0):[],S=T>0?Array(I).fill(!1):[],O=Array.from({length:T},()=>x.slice()),P=Array.from({length:T},()=>S.slice());if(C.forEach((L,U)=>{let R=P[U];L.series.forEach(B=>{let H=b.fields[B];if(H.config.custom?.hideFrom?.viz)return;let w=H.values;for(let N=0;N{let R=L.values;if(U===0){L.type===t.PU.time?M[U]=(0,n.ks)(L).values:M[U]=R;return}let{custom:B}=L.config;if(!B||B.hideFrom?.viz){M[U]=R;return}if(B.transform===o.NU.Constant){let w=R.findIndex(V=>V!=null),N=R[w];R=Array(R.length).fill(void 0),R[w]=N}else if(R=R.slice(),B.transform===o.NU.NegativeY)for(let w=0;w_.series.indexOf(U)>-1),N=O[w],V=P[w],G=M[U]=Array(I);for(let _=0;_{let B=C.findIndex(H=>H.series.indexOf(R)>-1);return B!==-1?O[B]:U});y({totals:L})}return b.fields.forEach((L,U)=>{if(U===0||L.config.custom?.hideFrom?.viz)return;if(L.config.custom?.stacking?.mode===o.gs.Percent){let B=C.findIndex(V=>V.series.indexOf(U)>-1),H=O[B],w=C[B],N=M[U];for(let V=0;VI&&(I=b.data[S][C],M=S),x==null?x=P:P=M&&b[T]==null;)T--;let I=0,x=0;if(T>=M){const S=Math.max(1,Math.floor((T-M+1)/C));for(let O=M;O<=T;O+=S){const P=b[O];P!=null&&typeof P=="number"&&(P<0||Object.is(P,-0)?I++:P>0&&x++)}if(I>x)return!0}return!1}const E=(0,r.h)("uPlot"),D=E.logger;(0,s.h)("graphng",void 0,E)},48747:(Q,A,e)=>{"use strict";e.d(A,{T:()=>a});var t=e(34796),n=e.n(t),o=e(2543),s=e(96540),r=e(61443),g=e(52622),u=e(75128),c=e(33083),i=e(3139),l=e(65036);const f=({dimensions:E,activeDimensions:D,pos:b,timeZone:C})=>{let y=null;if(D.xAxis===null)return null;D.yAxis&&(y=D.yAxis[0]);const M=D.xAxis[1]?(0,r.WK)(E.xAxis,D.xAxis[0],D.xAxis[1]):b.x,T=(0,l.DU)(E.yAxis.columns,E.xAxis.columns,M,C),I=T.time,x=T.results.map((S,O)=>({color:S.color,label:S.label,value:S.value,isActive:y===O}));return s.createElement(i.o,{series:x,timestamp:I})};f.displayName="MultiModeGraphTooltip";var d=e(83195),h=e(28240);const p=({dimensions:E,activeDimensions:D,timeZone:b})=>{if(D.yAxis===null||D.yAxis[1]===void 0||D.xAxis===null||D.xAxis[1]===void 0)return null;const C=(0,r.WK)(E.xAxis,D.xAxis[0],D.xAxis[1]),y=(0,r.P4)(E.xAxis,D.xAxis[0]),M=y.display?(0,d.cN)(y.display(C)):C,T=(0,r.P4)(E.yAxis,D.yAxis[0]),I=(0,r.WK)(E.yAxis,D.yAxis[0],D.yAxis[1]),x=T.display,S=x(I);return s.createElement(i.o,{series:[{color:S.color,label:(0,h.Ct)(T),value:(0,d.cN)(S)}],timestamp:M})};p.displayName="SingleModeGraphTooltip";const m=({mode:E=g.$N.Single,dimensions:D,activeDimensions:b,pos:C,timeZone:y})=>!b||!b.xAxis?null:E==="single"?s.createElement(p,{dimensions:D,activeDimensions:b,timeZone:y}):s.createElement(f,{dimensions:D,activeDimensions:b,pos:C,timeZone:y});m.displayName="GraphTooltip";class a extends s.PureComponent{constructor(){super(...arguments),this.state={isTooltipVisible:!1,isContextVisible:!1},this.element=null,this.$element=null,this.onPlotSelected=(D,b)=>{const{onHorizontalRegionSelected:C}=this.props;C&&C(b.xaxis.from,b.xaxis.to)},this.onPlotHover=(D,b,C)=>{this.setState({isTooltipVisible:!0,activeItem:C,pos:b})},this.onPlotClick=(D,b,C)=>{this.setState({isContextVisible:!0,isTooltipVisible:!1,contextItem:C,contextPos:b})},this.renderTooltip=()=>{const{children:D,series:b,timeZone:C}=this.props,{pos:y,activeItem:M,isTooltipVisible:T}=this.state;let I;if(!T||!y||b.length===0||(s.Children.forEach(D,H=>{if(I)return;(H&&H.type&&(H.type.displayName||H.type.name))===u.n.displayName&&(I=H)}),!I))return null;const x=I.props,S=x.mode||"single";if(!M&&S==="single")return null;const O=x.tooltipComponent||m,P=M?M.series.seriesIndex:0,L=M?M.dataIndex:void 0,U={xAxis:[P,L],yAxis:M?[M.series.seriesIndex,M.dataIndex]:null},R={dimensions:{xAxis:(0,r.r4)("xAxis",b.map(H=>H.timeField)),yAxis:(0,r.r4)("yAxis",b.map(H=>H.valueField))},activeDimensions:U,pos:y,mode:x.mode||g.$N.Single,timeZone:C},B=s.createElement(O,{...R});return s.cloneElement(I,{content:B,position:{x:y.pageX,y:y.pageY},offset:{x:10,y:10}})},this.renderContextMenu=()=>{const{series:D}=this.props,{contextPos:b,contextItem:C,isContextVisible:y}=this.state;if(!y||!b||!C||D.length===0)return null;const M=C?C.series.seriesIndex:0,T=C?C.dataIndex:void 0,I={xAxis:[M,T],yAxis:C?[C.series.seriesIndex,C.dataIndex]:null},x={xAxis:(0,r.r4)("xAxis",D.map(L=>L.timeField)),yAxis:(0,r.r4)("yAxis",D.map(L=>L.valueField))},S=()=>this.setState({isContextVisible:!1}),O=()=>({datapoint:C.datapoint,dataIndex:C.dataIndex,series:C.series,seriesIndex:C.series.seriesIndex,pageX:b.pageX,pageY:b.pageY}),P={x:b.pageX,y:b.pageY,onClose:S,getContextMenuSource:O,timeZone:this.props.timeZone,dimensions:x,contextDimensions:I};return s.createElement(c.H,{...P})},this.getBarWidth=()=>{const{series:D}=this.props;return Math.min(...D.map(b=>b.timeStep))}}componentDidUpdate(D,b){D!==this.props&&this.draw()}componentDidMount(){this.draw(),this.element&&(this.$element=n()(this.element),this.$element.bind("plotselected",this.onPlotSelected),this.$element.bind("plothover",this.onPlotHover),this.$element.bind("plotclick",this.onPlotClick))}componentWillUnmount(){this.$element&&this.$element.unbind("plotselected",this.onPlotSelected)}getYAxes(D){return D.length===0?[{show:!0,min:-1,max:1}]:(0,o.uniqBy)(D.map(b=>{const C=b.yAxis?b.yAxis.index:1,y=b.yAxis&&b.yAxis.min&&!isNaN(b.yAxis.min)?b.yAxis.min:null,M=b.yAxis&&b.yAxis.tickDecimals&&!isNaN(b.yAxis.tickDecimals)?b.yAxis.tickDecimals:null;return{show:!0,index:C,position:C===1?"left":"right",min:y,tickDecimals:M}}),b=>b.index)}draw(){if(this.element===null)return;const{width:D,series:b,timeRange:C,showLines:y,showBars:M,showPoints:T,isStacked:I,lineWidth:x,timeZone:S,onHorizontalRegionSelected:O}=this.props;if(!D)return;const P=D/100,L=C.from.valueOf(),U=C.to.valueOf(),R=this.getYAxes(b),B={legend:{show:!1},series:{stack:I,lines:{show:y,lineWidth:x,zero:!1},points:{show:T,fill:1,fillColor:!1,radius:2},bars:{show:M,fill:1,barWidth:M?this.getBarWidth()/1.5:1,zero:!1,lineWidth:x},shadowSize:0},xaxis:{timezone:S,show:!0,mode:"time",min:L,max:U,label:"Datetime",ticks:P,timeformat:(0,l.Jc)(P,L,U),tickFormatter:l.Yn},yaxes:R,grid:{minBorderMargin:0,markings:[],backgroundColor:null,borderWidth:0,hoverable:!0,clickable:!0,color:"#a1a1a1",margin:{left:0,right:0},labelMarginX:0,mouseActiveRadius:30},selection:{mode:O?"x":null,color:"#666"},crosshair:{mode:"x"}};try{n().plot(this.element,b.filter(H=>H.isVisible),B)}catch(H){throw console.error("Graph rendering error",H,B,b),new Error("Error rendering panel")}}render(){const{ariaLabel:D,height:b,width:C,series:y}=this.props,M=y.length===0,T=this.renderTooltip(),I=this.renderContextMenu();return s.createElement("div",{className:"graph-panel","aria-label":D},s.createElement("div",{className:"graph-panel__chart",ref:x=>this.element=x,style:{height:b,width:C},onMouseLeave:()=>{this.setState({isTooltipVisible:!1})}}),M&&s.createElement("div",{className:"datapoints-warning"},"No data"),T,I)}}a.defaultProps={showLines:!0,showPoints:!1,showBars:!1,isStacked:!1,lineWidth:1};const v=null},33083:(Q,A,e)=>{"use strict";e.d(A,{H:()=>d,i:()=>h});var t=e(32196),n=e(96540),o=e(61443),s=e(72724),r=e(28122),g=e(9286),u=e(66864),c=e(59093),i=e(64539),l=e(94536),f=e(40845);const d=({getContextMenuSource:m,timeZone:a,itemsGroup:v,dimensions:E,contextDimensions:D,...b})=>{const C=m(),y=v?v.map(I=>({...I,items:I.items?.filter(x=>x.label)})):[],M=()=>{if(!C)return null;let I;if(E?.yAxis&&D?.yAxis?.[1]){const S=(0,o.WK)(E.yAxis,D.yAxis[0],D.yAxis[1]),O=C.series.valueField.display;I=O(S)}const x=(0,s.LE)(C.datapoint[0],{defaultWithMS:C.series.hasMsResolution,timeZone:a});return n.createElement(h,{timestamp:x,seriesColor:C.series.color,displayName:C.series.alias||C.series.label,displayValue:I})},T=()=>y?.map((I,x)=>n.createElement(c.r,{key:`${I.label}${x}`,label:I.label},(I.items||[]).map(S=>n.createElement(i.D,{key:`${S.label}`,url:S.url,label:S.label,target:S.target,icon:S.icon,active:S.active,onClick:S.onClick}))));return n.createElement(r.t,{...b,renderMenuItems:T,renderHeader:M})},h=({timestamp:m,seriesColor:a,displayName:v,displayValue:E})=>{const D=(0,f.of)(p);return n.createElement("div",{className:D.wrapper},n.createElement("strong",null,m),n.createElement(u.Gy,null,n.createElement("div",null,n.createElement(l.p,{color:a}),n.createElement("span",{className:D.displayName},v)),E&&n.createElement(g.i,{value:E})))};function p(m){return{wrapper:(0,t.css)({padding:m.spacing(.5,1),fontSize:m.typography.size.sm,zIndex:m.zIndex.tooltip}),displayName:(0,t.css)({whiteSpace:"nowrap",paddingLeft:m.spacing(.5)})}}},84656:(Q,A,e)=>{"use strict";e.d(A,{M:()=>s});var t=e(2543),n=e.n(t),o=e(96540);class s extends o.Component{constructor(g){super(g),this.onSeriesToggle=this.onSeriesToggle.bind(this),this.state={hiddenSeries:[],toggledSeries:g.series}}componentDidUpdate(g){const{series:u}=this.props;(0,t.isEqual)(g.series,u)||this.setState({hiddenSeries:[],toggledSeries:u})}onSeriesToggle(g,u){const{series:c,onHiddenSeriesChanged:i}=this.props,{hiddenSeries:l}=this.state;if(u.ctrlKey||u.metaKey||u.shiftKey){const p=l.indexOf(g)>-1?l.filter(a=>a!==g):l.concat([g]),m=c.map(a=>({...a,isVisible:p.indexOf(a.label)===-1}));this.setState({hiddenSeries:p,toggledSeries:m},()=>i?i(p):void 0);return}const f=c.map(p=>p.label),d=l.length+1===f.length?[]:(0,t.difference)(f,[g]),h=c.map(p=>({...p,isVisible:d.indexOf(p.label)===-1}));this.setState({hiddenSeries:d,toggledSeries:h},()=>i?i(d):void 0)}render(){const{children:g}=this.props,{toggledSeries:u}=this.state;return g({onSeriesToggle:this.onSeriesToggle,toggledSeries:u})}}},5484:(Q,A,e)=>{"use strict";e.d(A,{I:()=>c});var t=e(32196),n=e(96540),o=e(40276),s=e(55726),r=e(40845),g=e(48747);const u=(l,f=!1,d=!1)=>{const h=l.reduce((m,a)=>m+(a[1]||0),0)===0,p=!l.reduce((m,a)=>m&&a[1]!==null,!0);return f&&p||d&&h},c=l=>{const{series:f,timeRange:d,width:h,height:p,showBars:m,showLines:a,showPoints:v,sortLegendBy:E,sortLegendDesc:D,legendDisplayMode:b,legendVisibility:C,placement:y,onSeriesToggle:M,onToggleSort:T,hideEmpty:I,hideZero:x,isStacked:S,lineWidth:O,onHorizontalRegionSelected:P,timeZone:L,children:U,ariaLabel:R}=l,{graphContainer:B,wrapper:H,legendContainer:w}=(0,r.of)(i,l.placement),N=f.reduce((V,G)=>u(G.data,I,x)?V:V.concat([{label:G.label,color:G.color||"",disabled:!G.isVisible,yAxis:G.yAxis.index,getDisplayValues:()=>G.info||[]}]),[]);return n.createElement("div",{className:H,"aria-label":R},n.createElement("div",{className:B},n.createElement(g.T,{series:f,timeRange:d,timeZone:L,showLines:a,showPoints:v,showBars:m,width:h,height:p,isStacked:S,lineWidth:O,onHorizontalRegionSelected:P},U)),C&&n.createElement("div",{className:w},n.createElement(o.E,{hideHorizontalTrack:!0},n.createElement(s.t,{items:N,displayMode:b,placement:y,sortBy:E,sortDesc:D,onLabelClick:(V,G)=>{M&&M(V.label,G)},onToggleSort:T}))))},i=(l,f)=>({wrapper:(0,t.css)({display:"flex",flexDirection:f==="bottom"?"column":"row"}),graphContainer:(0,t.css)({minHeight:"65%",flexGrow:1}),legendContainer:(0,t.css)({padding:"10px 0",maxHeight:f==="bottom"?"35%":"none"})})},65036:(Q,A,e)=>{"use strict";e.d(A,{DU:()=>g,Jc:()=>c,Yn:()=>u});var t=e(83195),n=e(28240),o=e(72724),s=e(42994);const r=(i,l)=>{let f=0,d=i.values.length-1,h;for(;;){if(f>d)return Math.max(d,0);h=Math.floor((f+d)/2);const p=i.values[h];if(p===l)return h;p&&p{let h,p,m,a,v;const E=[];let D,b;for(h=0;h=0&&(aD)&&(D=a,b=C.display?(0,t.cN)(C.display(v)):v);const y=p.display(p.values[m]);E.push({value:(0,t.cN)(y),datapointIndex:m,seriesIndex:h,color:y.color,label:(0,n.Ct)(p),time:C.display?(0,t.cN)(C.display(v)):v})}return{results:E,time:b}},u=(i,l)=>(0,o.LE)(i,{format:l?.options?.timeformat,timeZone:l?.options?.timezone}),c=(i,l,f)=>{if(l&&f&&i){const d=f-l,h=d/i/1e3,p=86400010,m=31536e6;return h<=10?s.WC.interval.millisecond:h<=45?s.WC.interval.second:d<=p?s.WC.interval.minute:h<=8e4?s.WC.interval.hour:d<=m?s.WC.interval.day:h<=31536e3?s.WC.interval.month:s.WC.interval.year}return s.WC.interval.minute}},99755:(Q,A,e)=>{"use strict";e.d(A,{o:()=>m});var t=e(96540),n=e(64423),o=e(99165),s=e(85200),r=e(1173),g=e(11261),u=e(69129),c=e(26272),i=e(79041),l=e(67266),f=e(81297),d=e(16895),h=e(65575);function p(a,v,E=[]){for(const D of E)if(typeof D=="function"){if(!D(a,v))return!1}else if(v[D]!==a[D])return!1;return!0}class m extends t.Component{constructor(v){super(v),this.panelContext={},this.subscription=new n.yU,this.getTimeRange=()=>this.props.timeRange;let E=this.prepState(v);E.alignedData=E.config.prepData([E.alignedFrame]),this.state=E,this.plotInstance=t.createRef()}prepState(v,E=!0){let D=null;const{frames:b,fields:C,preparePlotFrame:y}=v,T=(y||h.mY)(b,C||{x:s.sJ.get(r.Ct.firstTimeField).get({}),y:s.sJ.get(r.Ct.byTypes).get(new Set([g.PU.number,g.PU.enum]))},v.timeRange);if((0,d.uY)("GraphNG",!1,"data aligned",T),T){let I=this.state?.config;E&&(I=v.prepConfig(T,this.props.frames,this.getTimeRange),(0,d.uY)("GraphNG",!1,"config prepared",I)),D={alignedFrame:T,config:I},(0,d.uY)("GraphNG",!1,"data prepared",D.alignedData)}return D}handleCursorUpdate(v){const E=v.payload?.point?.time,D=this.plotInstance.current;if(D&&E){const b=D.valToPos(E,"x");let C;if(b&&(C=(0,d.sw)(D,D.posToIdx(b))),!C||!b)return;D.setCursor({left:b,top:C})}}componentDidMount(){this.panelContext=this.context;const{eventBus:v}=this.panelContext;this.subscription.add(v.getStream(u.b_).pipe((0,o.c)(50)).subscribe({next:E=>{v!==E.origin&&this.handleCursorUpdate(E)}})),this.subscription.add(v.getStream(c.kb).pipe((0,o.c)(50)).subscribe({next:E=>this.handleCursorUpdate(E)})),this.subscription.add(v.getStream(u.ql).pipe((0,o.c)(50)).subscribe({next:()=>{const E=this.plotInstance?.current;E&&!E.cursor._lock&&E.setCursor({left:-10,top:-10})}}))}componentDidUpdate(v){const{frames:E,structureRev:D,timeZone:b,propsToDiff:C}=this.props,y=!p(v,this.props,C);if(E!==v.frames||y||b!==v.timeZone){let M=this.prepState(this.props,!1);M&&((this.state.config===void 0||b!==v.timeZone||D!==v.structureRev||!D||y)&&(M.config=this.props.prepConfig(M.alignedFrame,this.props.frames,this.getTimeRange),(0,d.uY)("GraphNG",!1,"config recreated",M.config)),M.alignedData=M.config.prepData([M.alignedFrame]),this.setState(M))}}componentWillUnmount(){this.subscription.unsubscribe()}render(){const{width:v,height:E,children:D,renderLegend:b}=this.props,{config:C,alignedFrame:y,alignedData:M}=this.state;return C?t.createElement(l.KU,{width:v,height:E,legend:b(C)},(T,I)=>t.createElement(f.Z,{config:C,data:M,width:T,height:I,plotRef:x=>this.plotInstance.current=x},D?D(C,y):null)):null}}m.contextType=i.e4},16998:(Q,A,e)=>{"use strict";e.d(A,{I:()=>o});var t=e(96540);const n=t.createContext({}),o=()=>{const{data:s,dimFields:r,mapSeriesIndexToDataFrameFieldIndex:g}=(0,t.useContext)(n),u=(0,t.useCallback)(()=>{const c=r.x;let i=null;for(let l=0;l{"use strict";e.d(A,{My:()=>h,wX:()=>l,mY:()=>d});var t=e(11261),n=e(73060),o=e(52622),s=e(52811);const r={threshold:(m,a,v)=>m+v,midpoint:(m,a,v)=>(m+a)/2,plusone:(m,a,v)=>m+1};function g(m){if(m.frame.length===0)return m.frame;let a=!0,{frame:v,refFieldName:E,refFieldPseudoMax:D,refFieldPseudoMin:b,insertMode:C}=m;C||(C=r.threshold);const y=l(v,E);if(y==null)return v;y.state={...y.state,nullThresholdApplied:!0};const M=v.fields.map(I=>I.config.custom?.insertNulls||y.config.interval||null),T=new Set(M);if(T.delete(null),T.size===0)return v;if(T.size===1){const I=T.values().next().value;if(I<=0)return v;const x=y.values,S=v.fields.map(P=>P.values),O=u(x,S,I,b,D,C,a);return O===S?v:{...v,length:O[0].length,fields:v.fields.map((P,L)=>({...P,values:O[L]}))}}return v}function u(m,a,v,E=null,D=null,b,C){const y=m.length,M=[];if(E!=null&&Ev&&(M.push(b(T,O,v)),T+=v,!!C););M.push(O),T=O}if(D!=null&&D>T)for(;T+va!=null?v.name===a:v.type===t.PU.time)}function f(m,a){const v=l(m,a);let E=v?.values;for(let D=0;DE?.state?.nullThresholdApplied?y:g({frame:y,refFieldName:E.name,refFieldPseudoMin:v?.from.valueOf(),refFieldPseudoMax:v?.to.valueOf()}));let D=0;m.forEach(y=>{y.fields.forEach(M=>{i(M)&&(M.config.custom={...M.config.custom,spanNulls:-1},D++)})});let b=1/0;D>1&&m.forEach(y=>{if(!y.fields.some(i))return;const M=E.values;for(let T=0;T0&&(b=Math.min(b,M[T]-M[T-1]))});let C=(0,n.Fd)({frames:m,joinBy:a.x,keep:a.y,keepOriginIndices:!0});return C?(C=f(C,E.name),b!==1/0&&(C.fields.forEach((y,M)=>{let T=y.values;if(M===0){let I=T[T.length-1];T.push(I+b,I+2*b)}else i(y)?T.push(null,null):T.push(void 0,void 0)}),C.length+=2),C):null}function h(m,a){const v="na",E=`${m.min!==void 0?m.min:v}-${m.max!==void 0?m.max:v}`,D=`${m.custom?.axisSoftMin!==void 0?m.custom.axisSoftMin:v}-${m.custom?.axisSoftMax!==void 0?m.custom.axisSoftMax:v}`,b=`${m.custom?.axisPlacement!==void 0?m.custom?.axisPlacement:o.vM.Auto}`,C=m.unit??s.s,y=m.custom?.scaleDistribution?p(m.custom.scaleDistribution):o.L4.Linear,M=m.custom?.axisLabel?m.custom.axisLabel:v;return`${C}/${E}/${D}/${b}/${y}/${M}/${a}`}function p(m){return m.type===o.L4.Log?`${m.type}${m.log}`:m.type}},18262:(Q,A,e)=>{"use strict";e.d(A,{Z:()=>P});var t=e(96540),n=e(79041),o=e(24182),s=e(40845),r=e(99755),g=e(2543),u=e(36613),c=e(11261),i=e(83195),l=e(57875),f=e(8066),d=e(24293),h=e(28240),p=e(94624),m=e(69129),a=e(52622),v=e(51336),E=e(74863),D=e(16895),b=e(65575);const C=new Set(["bytes","bits","kbytes","mbytes","gbytes","tbytes","pbytes","binBps","binbps","KiBs","Kibits","MiBs","Mibits","GiBs","Gibits","TiBs","Tibits","PiBs","Pibits"]),y=Array(53);for(let L=0;LL==null?"-":L.toFixed(U),T={drawStyle:a.GR.Line,showPoints:a.yL.Auto,axisPlacement:a.vM.Auto},I=({frame:L,theme:U,timeZones:R,getTimeRange:B,eventBus:H,sync:w,allFrames:N,renderers:V,tweakScale:G=j=>j,tweakAxis:_=j=>j,eventsScope:K="__global_"})=>{const j=new v.e(R[0]);let k;j.setPrepData(he=>(k=he[0],(0,D.bq)(he[0],j.getStackingGroups())));const Y=L.fields[0];if(!Y)return j;const ee="x";let re="_x",J="";const ne=Y.config.custom?.axisPlacement!==a.vM.Hidden?a.vM.Bottom:a.vM.Hidden,q=Y.config.custom?.axisPlacement!==a.vM.Hidden;if(Y.type===c.PU.time){re="time",j.addScale({scaleKey:ee,orientation:a.Lt.Horizontal,direction:a.ON.Right,isTime:!0,range:()=>{const De=B();return[De.from.valueOf(),De.to.valueOf()]}});const he=R.length>1?(De,pe)=>pe.map((le,Te)=>Te<2?null:le):void 0;for(let De=0;De1&&j.addHook("drawAxes",De=>{De.ctx.save(),De.ctx.fillStyle=U.colors.text.primary,De.ctx.textAlign="left",De.ctx.textBaseline="bottom";let pe=0;De.axes.forEach(le=>{if(le.side===2){let Te=le._pos+le._size;De.ctx.fillText(R[pe],De.bbox.left,Te*u.A.pxRatio),pe++}}),De.ctx.restore()})}else Y.config.unit&&(re=Y.config.unit),j.addScale({scaleKey:ee,orientation:a.Lt.Horizontal,direction:a.ON.Right,range:(he,De,pe)=>[Y.config.min??De,Y.config.max??pe]}),j.addAxis({scaleKey:ee,placement:ne,show:q,label:Y.config.custom?.axisLabel,theme:U,grid:{show:Y.config.custom?.axisGridShow},formatValue:(he,De)=>(0,i.cN)(Y.display(he,De))});let te=V?.flatMap(he=>Object.values(he.fieldMap).filter(De=>he.indicesOnly.indexOf(De)===-1))??[],oe;for(let he=1;he(Ke=Ke<0?-1:0,Xe=Xe>0?1:0,[Ke,Xe]):De.type===c.PU.enum?(st,Ke,Xe)=>[-1,De.config.type.enum.text.length]:void 0,decimals:De.config.decimals},De)),J||(J=Ee),le.axisPlacement!==a.vM.Hidden){let st;le.axisColorMode===a.Y$.Series&&(Re.isByValue&&De.config.custom?.gradientMode===a.on.Scheme&&Re.id===d.Y.Thresholds?st=(0,E.pl)(1,U,Re,De.config.thresholds):st=Me);const Ke={border:{show:le.axisBorderShow||!1,width:1/devicePixelRatio,stroke:st||U.colors.text.primary},ticks:{show:le.axisBorderShow||!1,stroke:st||U.colors.text.primary},color:st||U.colors.text.primary};let Xe,He,Ge;if(C.has(pe.unit))Xe=y;else if(De.type===c.PU.enum){let xe=De.config.type.enum.text;Ge=xe.map(($e,be)=>be),He=xe}j.addAxis(_({scaleKey:Ee,label:le.axisLabel,size:le.axisWidth,placement:le.axisPlacement??a.vM.Auto,formatValue:(xe,$e)=>(0,i.cN)(Te(xe,$e)),theme:U,grid:{show:le.axisGridShow},decimals:De.config.decimals,distr:le.scaleDistribution?.type,splits:Ge,values:He,incrs:Xe,...Ke},De))}const ye=le.drawStyle===a.GR.Points?a.yL.Always:le.showPoints;let Le=()=>null;le.spanNulls!==!0&&(Le=(st,Ke,Xe,He)=>{let Ge=[],xe=st.series[Ke];if(!Xe&&He&&He.length){const[$e,be]=xe.idxs,Z=st.data[0],ae=st.data[Ke],de=Math.round(st.valToPos(Z[$e],"x",!0)),ve=Math.round(st.valToPos(Z[be],"x",!0));He[0][0]===de&&Ge.push($e);for(let Ue=0;Ue=0)Be=()=>null,Ye=()=>{};else if(le.transform===a.NU.Constant){const He=u.A.paths.linear();Be=(Ge,xe)=>{const $e=Ge._data,be=B();let Z=[be.from.valueOf(),be.to.valueOf()],ae=$e[xe].find(Ue=>Ue!=null),de=[ae,ae],ve=$e.slice();return ve[0]=Z,ve[xe]=de,He({...Ge,_data:ve},xe,0,1)}}if(le.fillBelowTo){const He=L.fields.find(be=>le.fillBelowTo===be.name||le.fillBelowTo===be.config?.displayNameFromDS||le.fillBelowTo===(0,h.Ct)(be,L,N)),Ge=He?(0,h.Ct)(He,L,N):le.fillBelowTo,xe=oe.get(Xe),$e=oe.get(Ge);(0,g.isNumber)($e)&&(0,g.isNumber)(xe)?(j.addBand({series:[xe,$e],fill:void 0}),We||(We=35)):We=0}}let at;Re.id===d.Y.Thresholds&&(at=st=>(0,f.lz)(k.fields[st],U).color),j.addSeries({pathBuilder:Be,pointsBuilder:Ye,scaleKey:Ee,showPoints:ye,pointsFilter:Le,colorMode:Re,fillOpacity:We,theme:U,dynamicSeriesColor:at,drawStyle:le.drawStyle,lineColor:le.lineColor??Me,lineWidth:le.lineWidth,lineInterpolation:le.lineInterpolation,lineStyle:le.lineStyle,barAlignment:le.barAlignment,barWidthFactor:le.barWidthFactor,barMaxWidth:le.barMaxWidth,pointSize:le.pointSize,spanNulls:le.spanNulls||!1,show:!le.hideFrom?.viz,gradientMode:le.gradientMode,thresholds:pe.thresholds,hardMin:De.config.min,hardMax:De.config.max,softMin:le.axisSoftMin,softMax:le.axisSoftMax,dataFrameFieldIndex:De.state?.origin}),le.thresholdsStyle&&pe.thresholds&&(le.thresholdsStyle.mode??a.Ly.Off)!==a.Ly.Off&&j.addThresholds({config:le.thresholdsStyle,thresholds:pe.thresholds,scaleKey:Ee,theme:U,hardMin:De.config.min,hardMax:De.config.max,softMin:le.axisSoftMin,softMax:le.axisSoftMax})}let ue=(0,D.ro)(L);j.setStackingGroups(ue),V?.forEach(he=>{oe||(oe=x(L,N));let De={};for(let pe in he.fieldMap){let le=he.fieldMap[pe];De[pe]=oe.get(le)}he.init(j,De)}),j.scaleKeys=[ee,J];const ie=15;let ge={dataIdx:(he,De,pe,le)=>{let Te=he.data[De];if(Te[pe]==null){let Ee=null,Re=null,me;for(me=pe;Ee==null&&me-- >0;)Te[me]!=null&&(Ee=me);for(me=pe;Re==null&&me++w&&w()===p.y.Off?!1:(he.rowIndex=Me,Te<0&&Ee<0?(he.point[re]=null,he.point[J]=null,H.publish(new m.ql)):(he.point[re]=le.posToVal(Te,ee),he.point[J]=le.posToVal(Ee,J),he.point.panelRelY=Ee>0?Ee/me:1,H.publish(De),De.payload.down=void 0),!0)},scales:[ee,J]}}return j.setSync(),j.setCursor(ge),j};function x(L,U){const R=new Map;return L.fields.forEach((B,H)=>{const w=B.state?.origin;if(w){const N=U[w.frameIndex]?.fields[w.fieldIndex];N&&R.set((0,h.Ct)(N,U[w.frameIndex],U),H)}}),R}const S=["legend","options","theme"];class O extends t.Component{constructor(){super(...arguments),this.prepConfig=(U,R,B)=>{const{eventBus:H,eventsScope:w,sync:N}=this.context,{theme:V,timeZone:G,renderers:_,tweakAxis:K,tweakScale:j}=this.props;return I({frame:U,theme:V,timeZones:Array.isArray(G)?G:[G],getTimeRange:B,eventBus:H,sync:N,allFrames:R,renderers:_,tweakScale:j,tweakAxis:K,eventsScope:w})},this.renderLegend=U=>{const{legend:R,frames:B}=this.props;return!U||R&&!R.showLegend||!(0,o.t)(U,B)?null:t.createElement(o.$,{data:B,config:U,...R})}}render(){return t.createElement(r.o,{...this.props,prepConfig:this.prepConfig,propsToDiff:S,renderLegend:this.renderLegend})}}O.contextType=n.e4;const P=(0,s.cV)(O);P.displayName="TimeSeries"},8984:(Q,A,e)=>{"use strict";e.r(A),e.d(A,{ALERTING_COLOR:()=>s.xj,AxisPlacement:()=>c.vM,BarAlignment:()=>c.Nj,BarValueVisibility:()=>c.TC,BracesPlugin:()=>u.e1,ClearPlugin:()=>u.vJ,ClipboardPlugin:()=>u.sW,DEFAULT_ANNOTATION_COLOR:()=>s.Mk,DOMUtil:()=>s.bk,DrawStyle:()=>c.yg,EventsWithValidation:()=>s.Pw,GlobalStyles:()=>r.kH,GraphGradientMode:()=>c.on,GraphThresholdsStyleMode:()=>c.Ly,IndentationPlugin:()=>u.TA,LegendDisplayMode:()=>c.lm,LineInterpolation:()=>c.dx,NO_DATA_COLOR:()=>s.nO,NewlinePlugin:()=>u.Om,NodeGraphDataFrameFieldNames:()=>s.uc,OK_COLOR:()=>s.Xw,PENDING_COLOR:()=>s.ct,PointVisibility:()=>c.nT,REGION_FILL_ALPHA:()=>s.UJ,ReactUtils:()=>s.zt,RunnerPlugin:()=>u.Ul,SCHEMA:()=>s.yx,ScaleDirection:()=>c.ON,ScaleOrientation:()=>c.Lt,SearchFunctionType:()=>s.Tt,SelectionShortcutsPlugin:()=>u.l9,SlatePrism:()=>u.De,StackingMode:()=>c.gs,SuggestionsPlugin:()=>u.Pz,TableCellDisplayMode:()=>c.ob,ThemeContext:()=>r.Dx,TooltipDisplayMode:()=>c.$N,ansicolor:()=>s.DB,attachDebugger:()=>s.hF,calculateFontSize:()=>s.Vr,colors:()=>s.Tj,commonOptionsBuilder:()=>g.j,createLogger:()=>s.h,fuzzyMatch:()=>s.It,getCanvasContext:()=>s.Yc,getCellLinks:()=>s.kl,getScrollbarWidth:()=>s.XJ,getTagColor:()=>s.yC,getTagColorIndexFromName:()=>s.JF,getTagColorsFromName:()=>s.MC,getTextColorForAlphaBackground:()=>s.mZ,getTextColorForBackground:()=>s.sg,getTheme:()=>r.O4,hasValidationEvent:()=>s.K,isCompactUrl:()=>s.Fr,linkModelToContextMenuItems:()=>s.Jl,makeFragment:()=>s.dF,makeValue:()=>s.mO,measureText:()=>s.kD,mockTheme:()=>r.mG,mockThemeContext:()=>r.fq,regexValidation:()=>s.RP,sortedColors:()=>s.Ih,styleMixins:()=>r.YF,stylesFactory:()=>r.N3,useForceUpdate:()=>s.CH,useStyles:()=>r.IS,useStyles2:()=>r.of,useTheme:()=>r.DP,useTheme2:()=>r.$j,validate:()=>s.tf,withTheme:()=>r.SL,withTheme2:()=>r.cV});var t=e(94333),o={};for(const i in t)i!=="default"&&(o[i]=()=>t[i]);e.d(A,o);var n=e(80186),o={};for(const i in n)["default","Icon","IconButton","ConfirmButton","DeleteButton","Tooltip","PopoverController","Popover","Toggletip","Portal","getPortalContainer","PortalContainer","CustomScrollbar","TabbedContainer","ClipboardButton","Cascader","ButtonCascader","InlineToast","LoadingPlaceholder","LoadingBar","ColorPicker","SeriesColorPicker","ColorPickerInput","SeriesColorPickerPopover","SeriesColorPickerPopoverWithTheme","EmptySearchResult","UnitPicker","StatsPicker","RefreshPicker","defaultIntervals","TimeRangePicker","TimePickerTooltip","TimeRangeLabel","TimeOfDayPicker","TimeZonePicker","WeekStartPicker","DatePicker","DatePickerWithInput","DateTimePicker","List","InteractiveTable","TagsInput","AutoSaveField","Pagination","Tag","TagList","FilterPill","ConfirmModal","QueryField","CodeEditor","ReactMonacoEditor","CodeEditorSuggestionItemKind","variableSuggestionToCodeEditorSuggestion","Modal","ModalHeader","ModalTabsHeader","ModalTabContent","ModalsProvider","ModalRoot","ModalsController","ModalsContext","PageToolbar","SetInterval","Table","TableInputCSV","TabsBar","Tab","VerticalTab","TabContent","Counter","RenderUserContentAsHTML","BigValue","BigValueColorMode","BigValueGraphMode","BigValueJustifyMode","BigValueTextMode","Sparkline","Gauge","BarGauge","VizTooltip","VizTooltipContainer","SeriesTable","SeriesTableRow","VizRepeater","PanelChrome","PanelChromeLoadingIndicator","PanelContextProvider","PanelContextRoot","usePanelContext","VizLayout","SeriesVisibilityChangeBehavior","VizLegend","VizLegendListItem","Alert","GraphSeriesToggler","Collapse","ControlledCollapse","CollapsableSection","DataLinkButton","FieldLinkList","FullWidthButtonContainer","ClickOutsideWrapper","CallToActionCard","ContextMenu","Menu","MenuGroup","MenuItem","WithContextMenu","DataLinksInlineEditor","DataLinkInput","DataLinksContextMenu","SeriesIcon","InfoBox","FeatureBadge","FeatureInfoBox","JSONFormatter","JsonExplorer","ErrorBoundary","ErrorBoundaryAlert","withErrorBoundary","ErrorWithStack","DataSourceHttpSettings","CustomHeadersSettings","AlertingSettings","SecureSocksProxySettings","TLSAuthSettings","CertificationKey","Spinner","FadeTransition","SlideOutTransition","Segment","SegmentAsync","SegmentInput","SegmentSelect","SegmentSection","Drawer","Slider","RangeSlider","Form","sharedInputStyle","InputControl","Button","LinkButton","ButtonGroup","clearButtonStyles","ToolbarButton","ToolbarButtonRow","ValuePicker","fieldMatchersUI","Link","TextLink","Text","Box","Stack","Grid","Space","Label","Field","Legend","FieldSet","FieldValidationMessage","InlineField","InlineSegmentGroup","InlineLabel","InlineFieldRow","FieldArray","resetSelectStyles","getSelectStyles","HorizontalGroup","VerticalGroup","Container","Badge","RadioButtonGroup","RadioButtonList","Input","getInputStyles","AutoSizeInput","FilterInput","Switch","InlineSwitch","Checkbox","TextArea","FileUpload","TimeRangeInput","RelativeTimeRangePicker","Card","getCardStyles","CardContainer","FormattedValueDisplay","ButtonSelect","Dropdown","PluginSignatureBadge","UserIcon","Avatar","InlineFormLabel","Divider","getDragStyles","Splitter","LayoutItemContext","LegacyForms","LegacyInputStatus","ScaleDistribution","BarGaugeDisplayMode","UPlotConfigBuilder","UPLOT_AXIS_FONT_SIZE","UPlotChart","PlotLegend","FIXED_UNIT","BrowserLabel","PanelContainer","Graph","GraphWithLegend","GraphContextMenu","GraphContextMenuHeader","graphTimeFormat","graphTickFormatter","GraphNG","TimeSeries","useGraphNGContext","preparePlotFrame","buildScaleKey","convertOldAngularValueMapping","sharedSingleStatMigrationHandler","sharedSingleStatPanelChangedHandler","AsyncMultiSelect","AsyncSelect","AsyncVirtualizedSelect","MultiSelect","Select","SelectContainer","VirtualizedSelect","SecretInput","SecretTextArea","FileDropzone","FileDropzoneDefaultChildren","FileListItem","graphFieldOptions","EventsCanvas","Marker","XYCanvas","KeyboardPlugin","TooltipPlugin","TooltipPlugin2","ZoomPlugin","SeriesVisibilityChangeMode"].indexOf(i)<0&&(o[i]=()=>n[i]);e.d(A,o);var s=e(99598),r=e(7918),g=e(42482),u=e(82175),c=e(49149)},38248:(Q,A,e)=>{"use strict";e.d(A,{W:()=>h,r:()=>l});var t=e(96540),n=e(11261),o=e(27310),s=e(52622),r=e(88575),g=e(94354),u=e(10354),c=e(88323),i=e(52198);function l(p,m,a){const v=["Axis"];p.addRadio({path:"axisPlacement",name:"Placement",category:v,defaultValue:i.t.axisPlacement[0].value,settings:{options:i.t.axisPlacement}}).addTextInput({path:"axisLabel",name:"Label",category:v,defaultValue:"",settings:{placeholder:"Optional text",expandTemplateVars:!0},showIf:E=>E.axisPlacement!==s.vM.Hidden,shouldApply:E=>E.type!==n.PU.time&&E.type!==n.PU.string}).addNumberInput({path:"axisWidth",name:"Width",category:v,settings:{placeholder:"Auto"},showIf:E=>E.axisPlacement!==s.vM.Hidden}).addRadio({path:"axisGridShow",name:"Show grid lines",category:v,defaultValue:void 0,settings:{options:[{value:void 0,label:"Auto"},{value:!0,label:"On"},{value:!1,label:"Off"}]},showIf:E=>E.axisPlacement!==s.vM.Hidden}).addRadio({path:"axisColorMode",name:"Color",category:v,defaultValue:s.Y$.Text,settings:{options:[{value:s.Y$.Text,label:"Text"},{value:s.Y$.Series,label:"Series"}]},showIf:E=>E.axisPlacement!==s.vM.Hidden}).addBooleanSwitch({path:"axisBorderShow",name:"Show border",category:v,defaultValue:!1,showIf:E=>E.axisPlacement!==s.vM.Hidden}),p.addCustomEditor({id:"scaleDistribution",path:"scaleDistribution",name:"Scale",category:v,editor:h,override:h,defaultValue:{type:s.L4.Linear},shouldApply:E=>E.type===n.PU.number,process:o.hS}).addBooleanSwitch({path:"axisCenteredZero",name:"Centered zero",category:v,defaultValue:!1,showIf:E=>E.scaleDistribution?.type!==s.L4.Log}).addNumberInput({path:"axisSoftMin",name:"Soft min",defaultValue:m.axisSoftMin,category:v,settings:{placeholder:"See: Standard options > Min"}}).addNumberInput({path:"axisSoftMax",name:"Soft max",defaultValue:m.axisSoftMax,category:v,settings:{placeholder:"See: Standard options > Max"}})}const f=[{label:"Linear",value:s.L4.Linear},{label:"Logarithmic",value:s.L4.Log},{label:"Symlog",value:s.L4.Symlog}],d=[{label:"2",value:2},{label:"10",value:10}],h=({value:p,onChange:m})=>{const a=p?.type??s.L4.Linear,v=p?.log??2;return t.createElement(t.Fragment,null,t.createElement("div",{style:{marginBottom:16}},t.createElement(g.z,{value:a,options:f,onChange:E=>{m({...p,type:E,log:E===s.L4.Linear?void 0:v})}})),(a===s.L4.Log||a===s.L4.Symlog)&&t.createElement(r.D,{label:"Log base"},t.createElement(c.l6,{options:d,value:v,onChange:E=>{m({...p,log:E.value})}})),a===s.L4.Symlog&&t.createElement(r.D,{label:"Linear threshold"},t.createElement(u.p,{placeholder:"1",value:p?.linearThreshold,onChange:E=>{m({...p,linearThreshold:Number(E.currentTarget.value)})}})))}},11404:(Q,A,e)=>{"use strict";e.d(A,{e:()=>u});var t=e(2543),n=e.n(t),o=e(96540),s=e(92174),r=e(66864);const g=({value:c,onChange:i})=>{const l=(0,o.useCallback)(f=>{i({...c,[f]:!c[f]})},[c,i]);return o.createElement(r.Gy,{spacing:"xs"},Object.keys(c).map(f=>{const d=f;return o.createElement(s.m,{icon:c[d]?"eye-slash":"eye",onClick:()=>l(d),key:d,label:(0,t.startCase)(d),selected:c[d]})}))};function u(c){c.addCustomEditor({id:"hideFrom",name:"Hide in area",category:["Series"],path:"hideFrom",defaultValue:{tooltip:!1,viz:!1,legend:!1},editor:g,override:g,shouldApply:()=>!0,hideFromDefaults:!0,process:i=>i})}},22680:(Q,A,e)=>{"use strict";e.d(A,{H:()=>o});var t=e(69550),n=e(52622);function o(s,r=!0){s.addBooleanSwitch({path:"legend.showLegend",name:"Visibility",category:["Legend"],description:"",defaultValue:!0}).addRadio({path:"legend.displayMode",name:"Mode",category:["Legend"],description:"",defaultValue:n.lm.List,settings:{options:[{value:n.lm.List,label:"List"},{value:n.lm.Table,label:"Table"}]},showIf:g=>g.legend.showLegend}).addRadio({path:"legend.placement",name:"Placement",category:["Legend"],description:"",defaultValue:"bottom",settings:{options:[{value:"bottom",label:"Bottom"},{value:"right",label:"Right"}]},showIf:g=>g.legend.showLegend}).addNumberInput({path:"legend.width",name:"Width",category:["Legend"],settings:{placeholder:"Auto"},showIf:g=>g.legend.showLegend&&g.legend.placement==="right"}),r&&s.addCustomEditor({id:"legend.calcs",path:"legend.calcs",name:"Values",category:["Legend"],description:"Select values or calculations to show in legend",editor:t.D.get("stats-picker").editor,defaultValue:[],settings:{allowMultiple:!0},showIf:g=>g.legend.showLegend!==!1})}},56675:(Q,A,e)=>{"use strict";e.d(A,{I:()=>f,m:()=>l});var t=e(96540),n=e(27310),o=e(11261),s=e(52622),r=e(94354),g=e(29158),u=e(10354),c=e(66864),i=e(52198);const l=({value:d,context:h,onChange:p,item:m})=>t.createElement(c.Gy,null,t.createElement(r.z,{value:d?.mode||s.gs.None,options:m.settings?.options??[],onChange:a=>{p({...d,mode:a})}}),h.isOverride&&d?.mode&&d?.mode!==s.gs.None&&t.createElement(u.p,{type:"text",placeholder:"Group",suffix:t.createElement(g.K,{name:"question-circle",tooltip:"Name of the stacking group",tooltipPlacement:"top"}),defaultValue:d?.group,onChange:a=>{p({...d,group:a.currentTarget.value.trim()})}}));function f(d,h,p=["Graph styles"]){d.addCustomEditor({id:"stacking",path:"stacking",name:"Stack series",category:p,defaultValue:h,editor:l,override:l,settings:{options:i.t.stacking},process:n.hS,shouldApply:m=>m.type===o.PU.number})}},71242:(Q,A,e)=>{"use strict";e.d(A,{I:()=>t});function t(n,o=!0){o&&n.addNumberInput({path:"text.titleSize",category:["Text size"],name:"Title",settings:{placeholder:"Auto",integer:!1,min:1,max:200},defaultValue:void 0}),n.addNumberInput({path:"text.valueSize",category:["Text size"],name:"Value",settings:{placeholder:"Auto",integer:!1,min:1,max:200},defaultValue:void 0})}},89654:(Q,A,e)=>{"use strict";e.d(A,{D:()=>n});var t=e(52622);function n(o,s=!1,r=!1,g){const u=["Tooltip"],c=s?[{value:t.$N.Single,label:"Single"},{value:t.$N.None,label:"Hidden"}]:[{value:t.$N.Single,label:"Single"},{value:t.$N.Multi,label:"All"},{value:t.$N.None,label:"Hidden"}],i=[{value:t.xB.None,label:"None"},{value:t.xB.Ascending,label:"Ascending"},{value:t.xB.Descending,label:"Descending"}];o.addRadio({path:"tooltip.mode",name:"Tooltip mode",category:u,defaultValue:g?.tooltip?.mode??t.$N.Single,settings:{options:c}}).addRadio({path:"tooltip.sort",name:"Values sort order",category:u,defaultValue:g?.tooltip?.sort??t.xB.None,showIf:l=>l.tooltip?.mode===t.$N.Multi,settings:{options:i}}),r&&o.addNumberInput({path:"tooltip.hoverProximity",name:"Hover proximity",description:"How close the cursor must be to a point to trigger the tooltip, in pixels",category:u,settings:{integer:!0}}),o.addNumberInput({path:"tooltip.maxWidth",name:"Max width",category:u,settings:{integer:!0},showIf:l=>l.tooltip?.mode!==t.$N.None}).addNumberInput({path:"tooltip.maxHeight",name:"Max height",category:u,settings:{integer:!0},showIf:l=>l.tooltip?.mode!==t.$N.None})}},42482:(Q,A,e)=>{"use strict";e.d(A,{j:()=>t});var t={};e.r(t),e.d(t,{ScaleDistributionEditor:()=>n.W,StackingEditor:()=>u.m,addAxisConfig:()=>n.r,addHideFrom:()=>o.e,addLegendOptions:()=>s.H,addStackingConfig:()=>u.I,addTextSizeOptions:()=>g.I,addTooltipOptions:()=>r.D});var n=e(38248),o=e(11404),s=e(22680),r=e(89654),g=e(71242),u=e(56675)},49149:(Q,A,e)=>{"use strict";e.d(A,{$N:()=>t.$N,Lt:()=>t.Lt,Ly:()=>t.Ly,Nj:()=>t.Nj,ON:()=>t.ON,TC:()=>t.yL,dx:()=>t.dx,gs:()=>t.gs,lm:()=>t.lm,nT:()=>t.yL,ob:()=>t.ob,on:()=>t.on,vM:()=>t.vM,yg:()=>t.GR});var t=e(52622)},3547:(Q,A,e)=>{"use strict";e.d(A,{e:()=>s});var t=e(62938);const n={"[":"]","{":"}","(":")"},o="brace_match";function s(){return{onKeyDown(r,g,u){const{value:c}=g;switch(r.key){case"(":case"{":case"[":{const{start:{offset:i,key:l},end:{offset:f,key:d},focus:{offset:h}}=c.selection,p=c.focusText.text;if(c.selection.isExpanded)return r.preventDefault(),g.insertTextByKey(l,i,r.key).insertTextByKey(d,f+1,n[r.key]).moveEndBackward(1),!0;if(h===p.length||p[h]===" "||Object.values(n).includes(p[h])){r.preventDefault();const m=n[r.key],a={key:`${o}-${(0,t.A)()}`,type:`${o}-${m}`,anchor:{key:l,offset:i,object:"point"},focus:{key:d,offset:f+1,object:"point"},object:"annotation"};return g.insertText(r.key).insertText(m).addAnnotation(a).moveBackward(1),!0}break}case")":case"}":case"]":{const i=c.anchorText.text,l=c.selection.anchor.offset,f=i[l],d=r.key,h=`${o}-${d}`,p=c.annotations.find(m=>m?.type===h&&m.anchor.key===c.anchorText.key);if(p&&f===d&&!c.selection.isExpanded)return r.preventDefault(),g.moveFocusForward(1).removeAnnotation(p).moveAnchorForward(1),!0;break}case"Backspace":{const i=c.anchorText.text,l=c.selection.anchor.offset,f=i[l-1],d=i[l];if(n[f]&&n[f]===d)return r.preventDefault(),g.deleteBackward(1).deleteForward(1).focus(),!0}default:break}return u()}}}},74738:(Q,A,e)=>{"use strict";e.d(A,{v:()=>t});function t(){return{onKeyDown(n,o,s){const r=o.value;if(r.selection.isExpanded)return s();if(n.key==="k"&&n.ctrlKey){n.preventDefault();const g=r.anchorText.text,u=r.selection.anchor.offset,i=g.length-u;return o.deleteForward(i),!0}return s()}}}},99453:(Q,A,e)=>{"use strict";e.d(A,{s:()=>o});const t=(s,r,g)=>{if(!s.length)return;const u=s.slice(0,-1).join("").length+s.length-1;return s.join(`
`).slice(r,u+g)},n=s=>s?.replace(/[\uFEFF]/g,"");function o(){const s={onCopy(r,g,u){r.preventDefault();const{document:c,selection:i}=g.value,{start:{offset:l},end:{offset:f}}=i,d=c.getLeafBlocksAtRange(i).toArray().map(p=>p.text),h=n(t(d,l,f));return h&&r.clipboardData&&r.clipboardData.setData("Text",h),!0},onPaste(r,g,u){if(r.preventDefault(),r.clipboardData){const i=n(r.clipboardData.getData("Text"))?.split(`
`);if(i&&i.length){g.insertText(i[0]);for(const l of i.slice(1))g.splitBlock().insertText(l)}}return!0}};return{...s,onCut(r,g,u){return s.onCopy(r,g,u),g.deleteAtRange(g.value.selection),!0}}}},1020:(Q,A,e)=>{"use strict";e.d(A,{T:()=>l});var t=e(57746),n=e(82611),o=e(75226);const s=(0,t.Sn)("mod+["),r=(0,t.Sn)("shift+tab"),g=(0,t.Sn)("mod+]"),u=" ",c=(f,d,h)=>{const{startBlock:p,endBlock:m,selection:{start:{offset:a,key:v},end:{offset:E,key:D}}}=d.value;if(o.A.serialize(d.value)==="")return;f.preventDefault();const b=p.getFirstText();b&&a===0&&v===b.key&&E===b.text.length&&D===b.key||!p.equals(m)?i(d,"right"):d.insertText(u)},i=(f,d)=>{const h=f.value.selection,p=f.value.document.getLeafBlocksAtRange(h).toArray();if(d==="left")for(const m of p){const a=m.text.length-m.text.trimLeft().length,v=m.getFirstText().key,E={anchor:{key:v,offset:a,path:[]},focus:{key:v,offset:a,path:[]}};f.deleteBackwardAtRange(n.Q6.create(E),Math.min(u.length,a))}else{const{startText:m}=f.value,a=m.text.slice(0,h.start.offset),v=/^\s*$/.test(a);for(const E of p)f.insertTextByKey(E.getFirstText().key,0,u);v&&f.moveStartBackward(u.length)}};function l(){return{onKeyDown(f,d,h){if(s(f)||r(f))f.preventDefault(),i(d,"left");else if(g(f))f.preventDefault(),i(d,"right");else if(f.key==="Tab")c(f,d,h);else return h();return!0}}}},82175:(Q,A,e)=>{"use strict";e.d(A,{De:()=>c.D,Om:()=>r.O,Pz:()=>i.Pz,TA:()=>s.T,Ul:()=>g.U,e1:()=>t.e,l9:()=>u.l,sW:()=>o.s,vJ:()=>n.v});var t=e(3547),n=e(74738),o=e(99453),s=e(1020),r=e(88295),g=e(4269),u=e(31589),c=e(41781),i=e(80903)},88295:(Q,A,e)=>{"use strict";e.d(A,{O:()=>n});function t(o){let s=o.length-o.trimLeft().length;if(s){let r=o[0];for(;--s;)r+=o[0];return r}return""}function n(){return{onKeyDown(o,s,r){const g=s.value;if(g.selection.isExpanded)return r();if(o.key==="Enter"){o.preventDefault();const{startBlock:u}=g,c=u.text,i=t(c);return s.splitBlock().insertText(i).focus()}return r()}}}},4269:(Q,A,e)=>{"use strict";e.d(A,{U:()=>t});function t({handler:n}){return{onKeyDown(o,s,r){return n&&o.key==="Enter"&&(o.shiftKey||o.ctrlKey)?(o.preventDefault(),n(o),s):r()}}}},31589:(Q,A,e)=>{"use strict";e.d(A,{l:()=>o});var t=e(57746);const n=(0,t.Sn)("mod+l");function o(){return{onKeyDown(s,r,g){if(n(s)){s.preventDefault();const{focusBlock:u,document:c}=r.value;r.moveAnchorToStartOfBlock(),c.getNextBlock(u.key)?r.moveFocusToStartOfNextBlock():r.moveFocusToEndOfText()}else return g();return!0}}}},84694:(Q,A,e)=>{"use strict";e.d(A,{A:()=>n});const n="prism-token"},41781:(Q,A,e)=>{"use strict";e.d(A,{D:()=>d,R:()=>a});var t=e(28848),n=e.n(t),o=e(82611),s=e(84694),r=e(49568),g=e(96540);function u(v){return v.object==="block"&&v.type==="code_block"}function c(v){return"javascript"}function i(v,E,D){const{decoration:b}=v;if(b.type!==s.A)return D();const C=b.data.get("className");return g.createElement("span",{className:C},v.children)}class l extends(0,r.Record)({onlyIn:u,getSyntax:c,renderDecoration:i}){constructor(E){super(E)}}const f=l;function d(v={},E=n().languages){const D=new f(v);return{decorateNode:(b,C,y)=>{if(!D.onlyIn(b))return y();const M=o.eB.create(b),T=D.getSyntax(M),I=E[T];if(!I)return[];const S=M.getTexts().map(U=>U&&U.getText()).join(`
`),O=n().tokenize(S,I),P=a(O),L=C.value.data.set("tokens",P);return C.setData(L),h(D,O,M)},renderDecoration:(b,C,y)=>D.renderDecoration({children:b.children,decoration:b.decoration},C,y)}}function h(v,E,D){const b=D.getTexts(),C=[];let y=0,M=0;return b.forEach(T=>{M=y+T.getText().length;let I=0;function x(S,O){if(typeof S=="string"){if(O){const P=p({text:T,textStart:y,textEnd:M,start:I,end:I+S.length,className:`prism-token token ${O}`,block:D});P&&C.push(P)}I+=S.length}else if(O=`${O} ${S.type}`,S.alias&&(O+=" "+S.alias),typeof S.content=="string"){const P=p({text:T,textStart:y,textEnd:M,start:I,end:I+S.content.length,className:`prism-token token ${O}`,block:D});P&&C.push(P),I+=S.content.length}else for(let P=0;P=D||C<=E?null:(b=Math.max(b,E),C=Math.min(C,D),b-=E,C-=E,M.createDecoration({object:"decoration",anchor:{key:v.key,offset:b,object:"point"},focus:{key:v.key,offset:C,object:"point"},type:s.A,data:{className:y}}))}function m(v){return typeof v=="string"?[{content:v,types:[],aliases:[]}]:Array.isArray(v)?v.flatMap(E=>m(E)):v instanceof n().Token?m(v.content).flatMap(E=>{let D=[];return typeof v.alias=="string"?D=[v.alias]:D=v.alias??[],{content:E.content,types:[v.type,...E.types],aliases:[...D,...E.aliases]}}):[]}function a(v){const E=m(v);if(!E.length)return[];const D=E[0];D.prev=null,D.next=E.length>=2?E[1]:null,D.offsets={start:0,end:D.content.length};for(let C=1;C=2?E[E.length-2]:null,b.next=null,b.offsets={start:E.length>=2?E[E.length-2].offsets.end:0,end:E.length>=2?E[E.length-2].offsets.end+b.content.length:b.content.length},E}},80903:(Q,A,e)=>{"use strict";e.d(A,{Pz:()=>U});var t=e(2543),n=e(96540),o=e(40961),s=e(91793),r=e(60578),g=e(50774),u=e(49579);const c=H=>H.reduce((w,{items:N,label:V})=>(w.push({label:V,kind:g.I.GroupTitle}),N.reduce((G,_)=>(G.push(_),G),w)),[]),i=H=>H.reduce((w,N)=>w.length{const V=(0,u.A)(N,{font:H.typography.fontFamilyMonospace,fontSize:H.typography.bodySmall.fontSize,fontWeight:"normal"}),G=d(V.width,H),_=f(V.height,H),K=h(_,w);return{listWidth:G,listHeight:K,itemHeight:_}},f=(H,w)=>{const N=w.spacing.gridSize*2;return H+N},d=(H,w)=>{const N=w.spacing.gridSize*3,V=800;return Math.min(Math.max(H+N,200),V)},h=(H,w)=>{const N=Math.min(w.length,10),V=100,G=N*H;return Math.max(G,V)};var p=e(32196),m=e(36663),a=e(40845);const v=(H,w,N)=>({typeaheadItem:(0,p.css)({label:"type-ahead-item",zIndex:11,padding:H.spacing(1,1,1,2),border:H.colors.border.medium,overflowY:"scroll",overflowX:"hidden",outline:"none",background:H.colors.background.secondary,color:H.colors.text.secondary,boxShadow:`0 0 20px ${H.v1.colors.dropdownShadow}`,visibility:N===!0?"visible":"hidden",width:"250px",minHeight:`${w+parseInt(H.spacing(.25),10)}px`,position:"relative",wordBreak:"break-word"})}),E=({item:H,height:w})=>{const N=H&&!!H.documentation,V=H?H.label:"",G=(0,m.G)(H?.documentation),_=(0,a.$j)(),K=v(_,w,N);return n.createElement("div",{className:(0,p.cx)([K.typeaheadItem])},n.createElement("b",null,V),n.createElement("hr",null),n.createElement("div",{dangerouslySetInnerHTML:{__html:G}}))};var D=e(23257),b=e.n(D),C=e(5313);const y=H=>({typeaheadItem:(0,p.css)({border:"none",background:"none",textAlign:"left",label:"type-ahead-item",height:"auto",fontFamily:H.typography.fontFamilyMonospace,padding:H.spacing(1,1,1,2),fontSize:H.typography.bodySmall.fontSize,textOverflow:"ellipsis",overflow:"hidden",zIndex:11,display:"block",whiteSpace:"nowrap",cursor:"pointer",transition:"color 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), border-color 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), background 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), padding 0.15s cubic-bezier(0.645, 0.045, 0.355, 1)"}),typeaheadItemSelected:(0,p.css)({label:"type-ahead-item-selected",backgroundColor:H.colors.background.secondary}),typeaheadItemMatch:(0,p.css)({label:"type-ahead-item-match",color:H.v1.palette.yellow,borderBottom:`1px solid ${H.v1.palette.yellow}`,padding:"inherit",background:"inherit"}),typeaheadItemGroupTitle:(0,p.css)({label:"type-ahead-item-group-title",color:H.colors.text.secondary,fontSize:H.typography.bodySmall.fontSize,lineHeight:H.typography.body.lineHeight,padding:H.spacing(1)})}),M=H=>{const w=(0,a.of)(y),{isSelected:N,item:V,prefix:G,style:_,onMouseEnter:K,onMouseLeave:j,onClickItem:k}=H,Y=N?(0,p.cx)([w.typeaheadItem,w.typeaheadItemSelected]):(0,p.cx)([w.typeaheadItem]),ee=(0,p.cx)([w.typeaheadItemMatch]),re=(0,p.cx)([w.typeaheadItemGroupTitle]),J=V.label||"";return V.kind===g.I.GroupTitle?n.createElement("li",{className:re,style:_},n.createElement("span",null,J)):n.createElement("li",{role:"none"},n.createElement("button",{role:"menuitem",className:Y,style:_,onMouseDown:k,onMouseEnter:K,onMouseLeave:j,type:"button"},V.highlightParts!==void 0?n.createElement(C.z,{text:J,highlightClassName:ee,highlightParts:V.highlightParts}):n.createElement(b(),{textToHighlight:J,searchWords:[G??""],autoEscape:!0,highlightClassName:ee})))},T=(H,w)=>H-w*Math.floor(H/w);class I extends n.PureComponent{constructor(){super(...arguments),this.listRef=(0,n.createRef)(),this.state={hoveredItem:null,typeaheadIndex:null,allItems:[],listWidth:-1,listHeight:-1,itemHeight:-1},this.componentDidMount=()=>{this.props.menuRef&&this.props.menuRef(this),document.addEventListener("selectionchange",this.handleSelectionChange);const w=c(this.props.groupedItems),N=i(w),{listWidth:V,listHeight:G,itemHeight:_}=l(this.context,w,N);this.setState({listWidth:V,listHeight:G,itemHeight:_,allItems:w})},this.componentWillUnmount=()=>{document.removeEventListener("selectionchange",this.handleSelectionChange)},this.handleSelectionChange=()=>{this.forceUpdate()},this.componentDidUpdate=(w,N)=>{if(this.state.typeaheadIndex!==null&&N.typeaheadIndex!==this.state.typeaheadIndex&&this.listRef&&this.listRef.current){if(this.state.typeaheadIndex===1){this.listRef.current.scrollToItem(0);return}this.listRef.current.scrollToItem(this.state.typeaheadIndex)}if((0,t.isEqual)(w.groupedItems,this.props.groupedItems)===!1){const V=c(this.props.groupedItems),G=i(V),{listWidth:_,listHeight:K,itemHeight:j}=l(this.context,V,G);this.setState({listWidth:_,listHeight:K,itemHeight:j,allItems:V,typeaheadIndex:null})}},this.onMouseEnter=w=>{this.setState({hoveredItem:w})},this.onMouseLeave=()=>{this.setState({hoveredItem:null})},this.moveMenuIndex=w=>{const N=this.state.allItems.length;if(N){const V=this.state.typeaheadIndex||0;let G=T(V+w,N);this.state.allItems[G].kind===g.I.GroupTitle&&(G=T(G+w,N)),this.setState({typeaheadIndex:G});return}},this.insertSuggestion=()=>{this.props.onSelectSuggestion&&this.state.typeaheadIndex!==null&&this.props.onSelectSuggestion(this.state.allItems[this.state.typeaheadIndex])}}get menuPosition(){if(!window.getSelection)return"";const w=window.getSelection(),N=w&&w.anchorNode;if(N&&N.parentElement){const V=N.parentElement.getBoundingClientRect(),G=window.scrollX,_=window.scrollY;return`position: absolute; display: flex; top: ${V.top+_+V.height+6}px; left: ${V.left+G-2}px`}return""}render(){const{prefix:w,isOpen:N=!1,origin:V}=this.props,{allItems:G,listWidth:_,listHeight:K,itemHeight:j,hoveredItem:k,typeaheadIndex:Y}=this.state,ee=k||Y,re=G[k||Y||0];return n.createElement(x,{origin:V,isOpen:N,style:this.menuPosition},n.createElement("ul",{role:"menu",className:"typeahead","data-testid":"typeahead"},n.createElement(s.Y1,{ref:this.listRef,itemCount:G.length,itemSize:j,itemKey:J=>{const ne=G&&G[J];return ne?`${J}-${ne.label}`:`${J}`},width:_,height:K},({index:J,style:ne})=>{const q=G&&G[J];return q?n.createElement(M,{onClickItem:()=>this.props.onSelectSuggestion?this.props.onSelectSuggestion(q):{},isSelected:Y===null?!1:G[Y]===q,item:q,prefix:w,style:ne,onMouseEnter:()=>this.onMouseEnter(J),onMouseLeave:this.onMouseLeave}):null})),ee&&n.createElement(E,{height:K,item:re}))}}I.contextType=r.D;class x extends n.PureComponent{constructor(w){super(w);const{index:N=0,origin:V="query",style:G}=w;this.node=document.createElement("div"),this.node.setAttribute("style",G),this.node.classList.add("slate-typeahead",`slate-typeahead-${V}-${N}`),document.body.appendChild(this.node)}componentWillUnmount(){document.body.removeChild(this.node)}render(){return this.props.isOpen?(this.node.setAttribute("style",this.props.style),this.node.classList.add("slate-typeahead--open"),o.createPortal(this.props.children,this.node)):(this.node.classList.remove("slate-typeahead--open"),null)}}var S=e(72307),O=e(75071),P=e(84694);const L=250;function U({onTypeahead:H,cleanText:w,onWillApplySuggestion:N,portalOrigin:V}){let G,_={groupedItems:[],typeaheadPrefix:"",typeaheadContext:"",typeaheadText:""};const K=(0,t.debounce)(R,L),j=k=>{_={..._,...k}};return{onBlur:(k,Y,ee)=>(_={..._,groupedItems:[]},ee()),onClick:(k,Y,ee)=>(_={..._,groupedItems:[]},ee()),onKeyDown:(k,Y,ee)=>{const J=_.groupedItems.length;switch(k.key){case"Escape":{if(J)return k.preventDefault(),_={..._,groupedItems:[]},Y.insertText("");break}case"ArrowDown":case"ArrowUp":if(J){k.preventDefault(),G.moveMenuIndex(k.key==="ArrowDown"?1:-1);return}break;case"Enter":{if(!(k.shiftKey||k.ctrlKey)&&J)return k.preventDefault(),G.insertSuggestion();break}case"Tab":{if(J)return k.preventDefault(),G.insertSuggestion();break}default:{k.key.length===1&&K(Y,j,H,w);break}}return ee()},commands:{selectSuggestion:(k,Y)=>{const ee=_.groupedItems;if(!ee||!ee.length)return k;const re=k.applyTypeahead(Y);return K(k,j,H,w),re},applyTypeahead:(k,Y)=>{let ee=Y.insertText||Y.label;const re=Y.kind==="function",J=Y.move||0,ne=J>0?J:0,q=J<0?-J:0,{typeaheadPrefix:te,typeaheadText:oe,typeaheadContext:ue}=_;N&&(ee=N(ee,{groupedItems:_.groupedItems,typeaheadContext:ue,typeaheadPrefix:te,typeaheadText:oe}));const{forward:ie,backward:ge}=B(ee,te,oe,re,Y.deleteBackwards,w);if(ee.match(/\n/)){const he=(0,S.dF)(ee);return k.deleteBackward(ge).deleteForward(ie).insertFragment(he).focus(),k}return _={..._,groupedItems:[]},k.snapshotSelection().deleteBackward(ge).deleteForward(ie).insertText(ee).moveForward(ne).moveBackward(q).focus(),k}},renderEditor(k,Y,ee){if(Y.value.selection.isExpanded)return ee();const re=ee();return n.createElement(n.Fragment,null,re,n.createElement(I,{menuRef:J=>G=J,origin:V,prefix:_.typeaheadPrefix,isOpen:!!_.groupedItems.length,groupedItems:_.groupedItems,onSelectSuggestion:Y.selectSuggestion}))}}}const R=async(H,w,N,V)=>{if(!N)return;const{value:G}=H,{selection:_}=G,K=G.document.getClosestBlock(G.focusBlock.key),j=G.selection.start.offset-1,k=K&&K.getDecorations(H),Y=k?k.filter(ge=>ge.start.offset<=j&&ge.end.offset>j&&ge.type===P.A).toArray():[],ee=k&&k.filter(ge=>ge.end.offset<=j&&ge.type===P.A&&ge.data.get("className").includes("label-key")).last(),re=ee&&G.focusText.text.slice(ee.start.offset,ee.end.offset),J=Y.map(ge=>ge.data.get("className")).join(" ").split(" ").filter(ge=>ge.length);let ne=G.focusText.text,q=ne.slice(0,_.focus.offset);Y.length&&(ne=G.focusText.text.slice(Y[0].start.offset,Y[0].end.offset),q=G.focusText.text.slice(Y[0].start.offset,_.focus.offset));const te=q.match(/(?:!?=~?"?|")(.*)/);te?q=te[1]:V&&(q=V(q));const{suggestions:oe,context:ue}=await N({prefix:q,text:ne,value:G,wrapperClasses:J,labelKey:re||void 0,editor:H}),ie=oe.map(ge=>{if(!ge.items)return ge;const he=ge.searchFunctionType||(ge.prefixMatch?O.T.Prefix:O.T.Word),De=O.H[he];let pe={...ge};return q&&(ge.skipFilter||(pe.items=pe.items.filter(le=>(le.filterText||le.label).length>=q.length),pe.items=De(pe.items,q)),pe.items=pe.items.filter(le=>!(le.insertText===q||(le.filterText??le.label)===q))),ge.skipSort||(pe.items=(0,t.sortBy)(pe.items,le=>le.sortText===void 0?le.sortValue!==void 0?le.sortValue:le.label:le.sortText||le.label)),pe}).filter(ge=>ge.items&&ge.items.length);w({groupedItems:ie,typeaheadPrefix:q,typeaheadContext:ue,typeaheadText:ne}),H.blur().focus()};function B(H,w,N,V,G,_){const K=G||w.length,j=_?_(N):N,k=N.indexOf(w),Y=k>-1?j.length-k-w.length:j.length-w.length;return{forward:!!(w&&Y>0||H===N)&&!V?Y+k:0,backward:K}}},93218:(Q,A,e)=>{"use strict";e.d(A,{k:()=>m});var t=e(94659),n=e(96540),o=e(40845);function s(a){return(0,t.css)({".panel-options-group":{borderBottom:`1px solid ${a.colors.border.weak}`},".panel-options-group__header":{padding:a.spacing(1,2,1,1),position:"relative",display:"flex",alignItems:"center",cursor:"pointer",fontWeight:500,color:a.colors.text.primary,"&:hover":{background:a.colors.emphasize(a.colors.background.primary,.03)}},".panel-options-group__icon":{color:a.colors.text.secondary,marginRight:a.spacing(1),padding:a.spacing(0,.9,0,.6)},".panel-options-group__title":{position:"relative"},".panel-options-group__body":{padding:a.spacing(1,2,1,4)}})}function r(a){return(0,t.css)({".card-section":{marginBottom:a.spacing(4)},".card-list":{display:"flex",flexDirection:"row",flexWrap:"wrap",listStyleType:"none"},".card-item":{display:"block",height:"100%",background:a.colors.background.secondary,boxShadow:"none",padding:a.spacing(2),borderRadius:"4px","&:hover":{background:a.colors.emphasize(a.colors.background.secondary,.03)},".label-tag":{marginLeft:a.spacing(1),fontSize:"11px",padding:"2px 6px"}},".card-item-body":{display:"flex",overflow:"hidden"},".card-item-details":{overflow:"hidden"},".card-item-header":{marginBottom:a.spacing(2)},".card-item-type":{color:a.colors.text.secondary,textTransform:"uppercase",fontSize:a.typography.size.sm,fontWeight:a.typography.fontWeightMedium},".card-item-badge":{margin:"6px 0"},".card-item-notice":{fontSize:a.typography.size.sm},".card-item-name":{color:a.colors.text.primary,overflow:"hidden",textOverflow:"ellipsis",width:"100%"},".card-item-label":{marginLeft:a.spacing(1)},".card-item-sub-name":{color:a.colors.text.secondary,overflow:"hidden",textOverflow:"ellipsis",width:"100%"},".card-item-sub-name--header":{color:a.colors.text.secondary,textTransform:"uppercase",marginBottom:a.spacing(2),fontSize:a.typography.size.sm,fontWeight:"bold"},".card-list-layout-grid":{".card-item-type":{display:"inline-block"},".card-item-notice":{fontSize:a.typography.size.sm,display:"inline-block",marginLeft:a.spacing(2)},".card-item-header-action":{float:"right"},".card-item-wrapper":{width:"100%",padding:a.spacing(0,2,2,0)},".card-item-wrapper--clickable":{cursor:"pointer"},".card-item-figure":{margin:a.spacing(0,2,2,0),height:"80px",img:{width:"80px"}},".card-item-name":{fontSize:a.typography.h3.fontSize},[a.breakpoints.up("md")]:{".card-item-wrapper":{width:"50%"}},[a.breakpoints.up("lg")]:{".card-item-wrapper":{width:"33.333333%"}},"&.card-list-layout-grid--max-2-col":{[a.breakpoints.up("lg")]:{".card-item-wrapper":{width:"50%"}}}},".card-list-layout-list":{".card-item-wrapper":{padding:0,width:"100%",marginBottom:a.spacing(1)},".card-item-wrapper--clickable":{cursor:"pointer"},".card-item":{borderRadius:"2px"},".card-item-header":{float:"right",textAlign:"right"},".card-item-figure":{margin:a.spacing(0,2,0,0),img:{width:"48px"}},".card-item-name":{fontSize:a.typography.h4.fontSize},".card-item-sub-name":{fontSize:a.typography.size.sm},".layout-selector":{marginRight:0}}})}var g=e(16797);function u(a){return(0,t.css)({html:{MsOverflowStyle:"scrollbar",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",height:"100%",fontSize:`${a.typography.htmlFontSize}px`,fontFamily:a.typography.fontFamily,lineHeight:a.typography.body.lineHeight,fontKerning:"normal"},":root":{colorScheme:a.colors.mode},body:{height:"100%",width:"100%",position:"absolute",color:a.colors.text.primary,backgroundColor:a.colors.background.canvas,...c(a.typography.body)},"h1, .h1":c(a.typography.h1),"h2, .h2":c(a.typography.h2),"h3, .h3":c(a.typography.h3),"h4, .h4":c(a.typography.h4),"h5, .h5":c(a.typography.h5),"h6, .h6":c(a.typography.h6),p:{margin:a.spacing(0,0,2)},button:{letterSpacing:a.typography.body.letterSpacing,"&:focus-visible":(0,g.getFocusStyles)(a),"&:focus":{outline:"none"}},small:{fontSize:a.typography.bodySmall.fontSize},"b, strong":{fontWeight:a.typography.fontWeightMedium},em:{fontStyle:"italic",color:a.colors.text.primary},cite:{fontStyle:"normal"},".muted":{color:a.colors.text.secondary},"a.muted:hover, a.muted:focus":{color:a.colors.text.primary},".text-warning":{color:a.colors.warning.text,"&:hover, &:focus":{color:a.colors.emphasize(a.colors.warning.text,.15)}},".text-error":{color:a.colors.error.text,"&:hover, &:focus":{color:a.colors.emphasize(a.colors.error.text,.15)}},".text-success":{color:"$success-text-color","&:hover, &:focus":{color:a.colors.emphasize(a.colors.success.text,.15)}},a:{cursor:"pointer",color:a.colors.text.primary,textDecoration:"none","&:focus":{outline:"none"},"&:focus-visible":(0,g.getFocusStyles)(a),"&:[disabled]":{cursor:"default",pointerEvents:"none !important"}},".text-link":{textDecoration:"underline"},".text-left":{textAlign:"left"},".text-right":{textAlign:"right"},".text-center":{textAlign:"center"},".highlight-search-match":{background:a.components.textHighlight.background,color:a.components.textHighlight.text,padding:0}})}function c(a){return{margin:0,fontSize:a.fontSize,lineHeight:a.lineHeight,fontWeight:a.fontWeight,letterSpacing:a.letterSpacing,fontFamily:a.fontFamily,marginBottom:"0.45em"}}function i(a){return(0,t.css)({"iframe.intercom-borderless-frame":{colorScheme:a.colors.mode}})}function l(a){return(0,t.css)({"input, button, select, textarea":{fontFamily:a.typography.body.fontFamily,fontSize:a.typography.body.fontSize,fontWeight:a.typography.body.fontWeight,lineHeight:a.typography.body.lineHeight},"input, select":{backgroundColor:a.components.input.background,color:a.components.input.text,border:"none",boxShadow:"none"},textarea:{height:"auto"},"input[type='file'], input[type='image'], input[type='submit'], input[type='reset'], input[type='button'], input[type='radio'], input[type='checkbox']":{width:"auto"}})}function f(a){return(0,t.css)({})}function d(a){const v=a.breakpoints.values.xxl+a.spacing.gridSize*2+a.components.sidemenu.width;return(0,t.css)({".grafana-app":{display:"flex",alignItems:"stretch",position:"absolute",width:"100%",height:"100%",top:0,left:0},".main-view":{position:"relative",display:"flex",flexDirection:"column",flexGrow:1,height:"100%",flex:"1 1 0",minWidth:0},".page-scrollbar-content":{display:"flex",minHeight:"100%",flexDirection:"column",width:"100%",height:"100%"},".page-container":{flexGrow:1,flexBasis:"100%",paddingLeft:a.spacing(2),paddingRight:a.spacing(2),[a.breakpoints.up("sm")]:{margin:a.spacing(0,1)},[a.breakpoints.up("md")]:{margin:a.spacing(0,2)},[`@media (min-width: ${v}px)`]:{maxWidth:`${a.breakpoints.values.xxl}px`,marginLeft:"auto",marginRight:"auto",width:"100%"}},".page-full":{marginLeft:a.spacing(2),paddingLeft:a.spacing(2),paddingRight:a.spacing(2)},".page-body":{padding:a.spacing(1),background:a.components.panel.background,border:`1px solid ${a.components.panel.borderColor}`,marginBottom:"32px",[a.breakpoints.up("md")]:{padding:a.spacing(2)},[a.breakpoints.up("lg")]:{padding:a.spacing(3)}},".page-heading":{fontSize:a.typography.h4.fontSize,marginTop:0,marginBottom:a.spacing(2)},".page-action-bar":{marginBottom:a.spacing(2),display:"flex",alignItems:"flex-start",gap:a.spacing(2)},".page-action-bar--narrow":{marginBottom:0},".page-action-bar__spacer":{width:a.spacing(2),flexGrow:1},".page-sub-heading":{marginBottom:a.spacing(2)},".page-sub-heading-icon":{marginLeft:a.spacing(1),marginTop:a.spacing(.5)},".page-hidden":{display:"none"}})}var h=e(72129);const p=a=>(0,t.css)({".react-loading-skeleton":h.Q});function m(){const a=(0,o.$j)();return n.createElement(t.Global,{styles:[u(a),i(a),l(a),d(a),r(a),s(a),f(a),p(a)]})}},40845:(Q,A,e)=>{"use strict";e.d(A,{$j:()=>h,DP:()=>d,IS:()=>p,SL:()=>l,cV:()=>f,fq:()=>a,of:()=>m});var t=e(4146),n=e.n(t),o=e(47078),s=e.n(o),r=e(96540),g=e(60578),u=e(3911);let c=null;const i=new WeakMap,l=v=>{const E=D=>{const b=c||g.D;return r.createElement(b.Consumer,null,C=>r.createElement(v,{...D,theme:C.v1}))};return E.displayName=`WithTheme(${v.displayName})`,n()(E,v),E},f=v=>{const E=D=>{const b=c||g.D;return r.createElement(b.Consumer,null,C=>r.createElement(v,{...D,theme:C}))};return E.displayName=`WithTheme(${v.displayName})`,n()(E,v),E};function d(){return(0,r.useContext)(c||g.D).v1}function h(){return(0,r.useContext)(c||g.D)}function p(v){const E=d();let D=i.get(v);return D||(D=(0,u.N)(v),i.set(v,D)),D(E)}function m(v,...E){const D=h();let b=i.get(v);return b||(b=s()(v,{maxSize:10}),i.set(v,b)),b(D,...E)}const a=v=>(c=r.createContext(v),()=>{c=null})},7918:(Q,A,e)=>{"use strict";e.d(A,{kH:()=>c.k,Dx:()=>t.D,O4:()=>r,mG:()=>g,fq:()=>n.fq,YF:()=>i,N3:()=>u.N,IS:()=>n.IS,of:()=>n.of,DP:()=>n.DP,$j:()=>n.$j,SL:()=>n.SL,cV:()=>n.cV});var t=e(60578),n=e(40845),o=e(47696);let s;const r=(l="dark")=>s?s(l):(0,o.a)({colors:{mode:l}}).v1,g=l=>(s=l,()=>{s=null});var u=e(3911),c=e(93218),i=e(16797)},16797:(Q,A,e)=>{"use strict";e.r(A),e.d(A,{cardChrome:()=>n,focusCss:()=>c,getFocusStyles:()=>l,getMouseFocusStyles:()=>i,getTooltipContainerStyles:()=>f,hoverColor:()=>o,listItem:()=>s,listItemSelected:()=>r,mediaUp:()=>g});var t=e(84140);function n(d){return`
background: ${d.colors.background.secondary};
&:hover {
background: ${o(d.colors.background.secondary,d)};
}
box-shadow: ${d.components.panel.boxShadow};
border-radius: ${d.shape.radius.default};
`}function o(d,h){return h.isDark?(0,t.A)(d).brighten(2).toString():(0,t.A)(d).darken(2).toString()}function s(d){return`
background: ${d.colors.background.secondary};
&:hover {
background: ${o(d.colors.background.secondary,d)};
}
box-shadow: ${d.components.panel.boxShadow};
border-radius: ${d.shape.radius.default};
`}function r(d){return`
background: ${o(d.colors.background.secondary,d)};
color: ${d.colors.text.maxContrast};
`}function g(d){return`only screen and (min-width: ${d})`}const u=d=>d.hasOwnProperty("v1"),c=d=>{const h=u(d),p=h?d.colors.background.canvas:d.colors.bodyBg,m=h?d.colors.primary.main:d.colors.formFocusOutline;return`
outline: 2px dotted transparent;
outline-offset: 2px;
box-shadow: 0 0 0 2px ${p}, 0 0 0px 4px ${m};
transition-property: outline, outline-offset, box-shadow;
transition-duration: 0.2s;
transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);`};function i(d){return{outline:"none",boxShadow:"none"}}function l(d){return{outline:"2px dotted transparent",outlineOffset:"2px",boxShadow:`0 0 0 2px ${d.colors.background.canvas}, 0 0 0px 4px ${d.colors.primary.main}`,transitionTimingFunction:"cubic-bezier(0.19, 1, 0.22, 1)",transitionDuration:"0.2s",transitionProperty:"outline, outline-offset, box-shadow"}}const f=d=>({overflow:"hidden",background:d.colors.background.secondary,boxShadow:d.shadows.z2,maxWidth:"800px",padding:d.spacing(1),borderRadius:d.shape.radius.default,zIndex:d.zIndex.tooltip})},3911:(Q,A,e)=>{"use strict";e.d(A,{N:()=>o});var t=e(47078),n=e.n(t);function o(s){return n()(s)}},50774:(Q,A,e)=>{"use strict";e.d(A,{I:()=>t});var t=(n=>(n.GroupTitle="GroupTitle",n))(t||{})},29621:()=>{"use strict"},4025:(Q,A,e)=>{"use strict";e.d(A,{GO:()=>s,SS:()=>r,Uo:()=>t.Uo,lV:()=>g,rJ:()=>o});var t=e(8887),n=e(11261);const o=u=>["xs","sm","md","lg","xl","xxl","xxxl"].includes(u),s=()=>Object.keys(t.az);function r(u){return g(u?.type)}function g(u){if(u)switch(u){case n.PU.time:return"clock-nine";case n.PU.string:return"font";case n.PU.number:return"calculator-alt";case n.PU.boolean:return"toggle-on";case n.PU.trace:return"info-circle";case n.PU.enum:return"list-ol";case n.PU.geo:return"map-marker";case n.PU.other:return"brackets-curly"}return"question-circle"}},80186:(Q,A,e)=>{"use strict";e.r(A),e.d(A,{CompletionItemKind:()=>r.I,getAvailableIcons:()=>c.GO,getFieldTypeIcon:()=>c.SS,getFieldTypeIconName:()=>c.lV,isIconSize:()=>c.rJ,toIconName:()=>c.Uo});var t=e(64611),n=e.n(t),m={};for(const a in t)a!=="default"&&(m[a]=()=>t[a]);e.d(A,m);var o=e(11866),s=e.n(o),m={};for(const a in o)a!=="default"&&(m[a]=()=>o[a]);e.d(A,m);var r=e(50774),g=e(29621),u=e.n(g),m={};for(const a in g)["default","CompletionItemKind"].indexOf(a)<0&&(m[a]=()=>g[a]);e.d(A,m);var c=e(4025),i=e(19932),l=e.n(i),m={};for(const a in i)["default","CompletionItemKind","getAvailableIcons","getFieldTypeIcon","getFieldTypeIconName","isIconSize","toIconName"].indexOf(a)<0&&(m[a]=()=>i[a]);e.d(A,m);var f=e(72389),d=e.n(f),m={};for(const a in f)["default","CompletionItemKind","getAvailableIcons","getFieldTypeIcon","getFieldTypeIconName","isIconSize","toIconName"].indexOf(a)<0&&(m[a]=()=>f[a]);e.d(A,m);var h=e(65484),p=e.n(h),m={};for(const a in h)["default","CompletionItemKind","getAvailableIcons","getFieldTypeIcon","getFieldTypeIconName","isIconSize","toIconName"].indexOf(a)<0&&(m[a]=()=>h[a]);e.d(A,m)},11866:()=>{"use strict"},65484:()=>{"use strict"},19932:()=>{"use strict"},72389:()=>{"use strict"},64611:()=>{"use strict"},40321:(Q,A,e)=>{"use strict";e.d(A,{Q:()=>t});const t=(n,o)=>{n.key==="Tab"||n.altKey||n.ctrlKey||n.metaKey||(n.stopPropagation(),n.key==="Escape"&&o())}},24284:(Q,A,e)=>{"use strict";e.d(A,{Ih:()=>v,Mk:()=>r,Tj:()=>f,UJ:()=>l,Xw:()=>g,ct:()=>i,mZ:()=>a,nO:()=>c,sg:()=>m,xj:()=>u});var t=e(2543),n=e.n(t),o=e(84140);const s=4,r="rgba(0, 211, 255, 1)",g="rgba(11, 237, 50, 1)",u="rgba(237, 46, 24, 1)",c="rgba(150, 150, 150, 1)",i="rgba(247, 149, 32, 1)",l=.09,f=["#7EB26D","#EAB839","#6ED0E0","#EF843C","#E24D42","#1F78C1","#BA43A9","#705DA0","#508642","#CCA300","#447EBC","#C15C17","#890F02","#0A437C","#6D1F62","#584477","#B7DBAB","#F4D598","#70DBED","#F9BA8F","#F29191","#82B5D8","#E5A8E2","#AEA2E0","#629E51","#E5AC0E","#64B0C8","#E0752D","#BF1B00","#0A50A1","#962D82","#614D93","#9AC48A","#F2C96D","#65C5DB","#F9934E","#EA6460","#5195CE","#D683CE","#806EB7","#3F6833","#967302","#2F575E","#99440A","#58140C","#052B51","#511749","#3F2B5B","#E0F9D7","#FCEACA","#CFFAFF","#F9E2D2","#FCE2DE","#BADFF4","#F9D9F9","#DEDAF7"];function d(E){const D=(0,t.map)(E,h),b=(0,t.sortBy)(D,["h"]),C=(0,t.chunk)(b,s),y=(0,t.map)(C,T=>(0,t.sortBy)(T,"l")),M=(0,t.flattenDeep)((0,t.zip)(...y));return(0,t.map)(M,p)}function h(E){return(0,o.A)(E).toHsl()}function p(E){return(0,o.A)(E).toHexString()}function m(E){return(0,o.A)(E).getBrightness()>180?"rgb(32, 34, 38)":"rgb(247, 248, 250)"}function a(E,D){const b=(0,o.A)(E),C=b.getBrightness();return b.getAlpha()<.3?D?"rgb(247, 248, 250)":"rgb(32, 34, 38)":C>180?"rgb(32, 34, 38)":"rgb(247, 248, 250)"}let v=d(f)},14555:(Q,A,e)=>{"use strict";e.d(A,{F:()=>n,J:()=>t});const t=o=>o().map(s=>({label:s.title,ariaLabel:s.title,url:s.href,target:s.target,icon:`${s.target==="_blank"?"external-link-alt":"link"}`,onClick:s.onClick})),n=o=>/\/explore\?.*&(left|right)=\[(.*\,){2,}(.*){1}\]/.test(o)},40621:(Q,A,e)=>{"use strict";e.d(A,{h:()=>t});function t(n,o,s){}},53550:(Q,A,e)=>{"use strict";e.d(A,{i:()=>t});function t(n){const s=n.lastIndexOf("."),r=n.substring(s),g=n.substring(0,s);return g.length<16?n:`${g.substring(0,16)}...${r}`}},9830:(Q,A,e)=>{"use strict";e.d(A,{I:()=>o});var t=e(2543),n=e.n(t);function o(s,r){let g=0,u=s.indexOf(r);r=r.replace(/\s/g,"");const c=[];if(u!==-1)return{distance:0,found:!0,ranges:[{start:u,end:u+r.length-1}]};for(const i of r){const l=s.indexOf(i,u);if(l===-1)return{distance:1/0,ranges:[],found:!1};if(u!==-1&&(g+=l-u),u=l+1,c.length===0)c.push({start:l,end:l});else{const f=(0,t.last)(c);l===f.end+1?f.end++:c.push({start:l,end:l})}}return{distance:g,ranges:c,found:!0}}},76412:(Q,A,e)=>{"use strict";e.d(A,{t:()=>c,x:()=>g});var t=e(72635),n=e(96540),o=e(65414),s=e(52822);function r(){typeof t.default.options.resources!="object"&&t.default.use(o.r9).init({resources:{},returnEmptyString:!1,lng:"en-US"})}const g=i=>(r(),n.createElement(s.x,{...i})),u=t.default.t,c=(i,l,f)=>(r(),u(i,l,f))},99598:(Q,A,e)=>{"use strict";e.d(A,{xj:()=>r.xj,Mk:()=>r.Mk,bk:()=>t,Pw:()=>g.Pw,nO:()=>r.nO,uc:()=>E,Xw:()=>r.Xw,ct:()=>r.ct,UJ:()=>r.UJ,zt:()=>s,yx:()=>u.yx,Tt:()=>p.T,DB:()=>m.DB,hF:()=>v.h,Vr:()=>d.Vr,Tj:()=>r.Tj,h:()=>a.h,It:()=>D.I,Yc:()=>d.Yc,kl:()=>f.k,XJ:()=>l.X,yC:()=>i.yC,JF:()=>i.JF,MC:()=>i.MC,mZ:()=>r.mZ,sg:()=>r.sg,K:()=>g.K,Fr:()=>c.F,Jl:()=>c.J,dF:()=>u.dF,mO:()=>u.mO,kD:()=>d.kD,RP:()=>g.RP,Ih:()=>r.Ih,CH:()=>h.C,tf:()=>g.tf});var t={};e.r(t),e.d(t,{getNextCharacter:()=>o,getPreviousCousin:()=>n}),typeof window<"u"&&"Element"in window&&!Element.prototype.closest&&(Element.prototype.closest=function(b){const C=(this.document||this.ownerDocument).querySelectorAll(b);let y=this,M;do{for(M=C.length;--M>=0&&C.item(M)!==y;);y=y.parentElement}while(M<0&&y);return y});function n(b,C){let y=b.parentElement.previousSibling,M;for(;y;){if(M=y.querySelector(C),M)return M;y=y.previousSibling}}function o(b){const C=(b||window).getSelection();if(!C||!C.anchorNode)return null;const y=C.getRangeAt(0),M=C.anchorNode.textContent,T=y.startOffset;return M.slice(T,T+1)}var s=e(67892),r=e(24284),g=e(29734),u=e(72307),c=e(14555),i=e(69613),l=e(5260),f=e(90914),d=e(29413),h=e(69731),p=e(75071),m=e(88838),a=e(91040),v=e(40621),E=(b=>(b.id="id",b.title="title",b.subTitle="subTitle",b.mainStat="mainStat",b.secondaryStat="secondaryStat",b.source="source",b.target="target",b.detail="detail__",b.arc="arc__",b.color="color",b))(E||{}),D=e(9830)},91040:(Q,A,e)=>{"use strict";e.d(A,{h:()=>s});var t=e(2543),n=e.n(t);const o=(0,t.throttle)((...r)=>{console.log(...r)},500),s=r=>{let g=!1;return typeof window<"u"&&(g=window.localStorage.getItem("grafana.debug")==="true"),{logger:(u,c=!1,...i)=>{},enable:()=>g=!0,disable:()=>g=!1,isEnabled:()=>g}}},29413:(Q,A,e)=>{"use strict";e.d(A,{Vr:()=>u,Yc:()=>r,kD:()=>g});let t;const n=new Map,o=500;let s="";function r(){return t||(t=document.createElement("canvas").getContext("2d")),t}function g(c,i,l=400){const f=`${l} ${i}px 'Inter'`,d=c+f,h=n.get(d);if(h)return h;const p=r();s!==f&&(p.font=s=f);const m=p.measureText(c);return n.size===o&&n.clear(),n.set(d,m),m}function u(c,i,l,f,d,h){const p=g(c,14,h),m=i/(p.width+2)*14,a=l/f,v=Math.min(a,m);return Math.min(v,d??v)}},67892:(Q,A,e)=>{"use strict";e.r(A),e.d(A,{getChildId:()=>n,renderOrCallToRender:()=>o});var t=e(96540);function n(s){let r;const g=t.Children.only(s);return"id"in g?.props?r=g.props.id:"inputId"in g.props&&(r=g?.props.inputId),typeof r=="string"?r:void 0}function o(s,r){if(t.isValidElement(s)||typeof s=="string"||typeof s=="number")return s;if(typeof s=="function"&&r)return s(r);throw new Error(`${s} is not a React element nor a function that returns React element`)}},5260:(Q,A,e)=>{"use strict";e.d(A,{X:()=>n});let t=null;function n(){if(t!==null)return t;if(typeof document<"u"){const o=document.createElement("div"),s={width:"100px",height:"100px",position:"absolute",top:"-9999px",overflow:"scroll",MsOverflowStyle:"scrollbar"};Object.keys(s).map(r=>{o.style[r]=s[r]}),document.body.appendChild(o),t=o.offsetWidth-o.clientWidth,document.body.removeChild(o)}else t=0;return t||0}},75071:(Q,A,e)=>{"use strict";e.d(A,{H:()=>g,T:()=>n});var t=e(9830),n=(u=>(u.Word="Word",u.Prefix="Prefix",u.Fuzzy="Fuzzy",u))(n||{});const g={Word:(u,c)=>u.filter(i=>(i.filterText||i.label).includes(c)),Prefix:(u,c)=>u.filter(i=>(i.filterText||i.label).startsWith(c)),Fuzzy:(u,c)=>(c=c.toLowerCase(),u.filter(i=>{const{distance:l,ranges:f,found:d}=(0,t.I)(i.label.toLowerCase(),c);return d?(i.sortValue=l,i.highlightParts=f,!0):!1}))}},72129:(Q,A,e)=>{"use strict";e.d(A,{Q:()=>s,j:()=>r});var t=e(32196),n=e(96540);const s={animationName:(0,t.keyframes)({"0%":{opacity:0},"100%":{opacity:1}}),animationDelay:"100ms",animationTimingFunction:"ease-in",animationDuration:"100ms",animationFillMode:"backwards"},r=(g,u)=>Object.assign(g,{Skeleton:i=>n.createElement(u,{...i,rootProps:{style:s}})})},72307:(Q,A,e)=>{"use strict";e.d(A,{dF:()=>o,mO:()=>s,yx:()=>n});var t=e(82611);const n={document:{nodes:[{match:[{type:"paragraph"},{type:"code_block"},{type:"code_line"}]}]},inlines:{}},o=(r,g)=>{const u=r.split(`
`).map(i=>t.eB.create({type:"code_line",nodes:[t.EY.create(i)]})),c=t.eB.create({data:{syntax:g},type:"code_block",nodes:u});return t.yo.create({nodes:[c]})},s=(r,g)=>{const u=o(r,g);return t.WT.create({document:u})}},90914:(Q,A,e)=>{"use strict";e.d(A,{k:()=>t});const t=(n,o)=>{let s;if(n.getLinks&&(s=n.getLinks({valueRowIndex:o.index})),!!s){for(let r=0;r{u.ctrlKey||u.metaKey||u.shiftKey||(u.preventDefault(),g(u,{field:n,rowIndex:o.index}))}}return s}}},69613:(Q,A,e)=>{"use strict";e.d(A,{JF:()=>o,MC:()=>s,yC:()=>r});const t=["#D32D20","#1E72B8","#B240A2","#705DA0","#466803","#497A3C","#3D71AA","#B15415","#890F02","#6E6E6E","#0A437C","#6D1F62","#584477","#4C7A3F","#2F4F4F","#BF1B00","#7662B1","#8A2EB8","#517A00","#000000","#3F6833","#2F575E","#99440A","#AE561A","#0E4AB4","#58140C","#052B51","#511749","#3F2B5B"],n=["#FF7368","#459EE7","#E069CF","#9683C6","#6C8E29","#76AC68","#6AA4E2","#E7823D","#AF3528","#9B9B9B","#3069A2","#934588","#7E6A9D","#88C477","#557575","#E54126","#A694DD","#B054DE","#8FC426","#262626","#658E59","#557D84","#BF6A30","#FF9B53","#3470DA","#7E3A32","#2B5177","#773D6F","#655181"];function o(c=""){const i=g(c.toLowerCase());return Math.abs(i%t.length)}function s(c=""){const i=o(c);return r(i)}function r(c){return{color:t[c],borderColor:n[c]}}function g(c){let i=5381;for(let l=0;l{"use strict";e.d(A,{O:()=>o,f:()=>s});var t=e(32196),n=e(23596);function o(r){switch(r){case"auto":return"bottom";case"auto-start":return"bottom-start";case"auto-end":return"bottom-end";default:return r??"bottom"}}function s(r,g,u,c,i){return{arrow:(0,t.css)({fill:g}),container:(0,t.css)({backgroundColor:g,borderRadius:r.shape.radius.default,border:`1px solid ${u}`,boxShadow:r.shadows.z2,color:c,fontSize:r.typography.bodySmall.fontSize,padding:r.spacing(i.topBottom,i.rightLeft),transition:"opacity 0.3s",zIndex:r.zIndex.tooltip,maxWidth:"400px",overflowWrap:"break-word","&[data-popper-interactive='false']":{pointerEvents:"none"},code:{border:"none",display:"inline",background:n.darken(g,.1),color:c,whiteSpace:"normal"},pre:{background:n.darken(g,.1),color:c},a:{color:c,textDecoration:"underline"},"a:hover":{textDecoration:"none"}}),headerClose:(0,t.css)({color:r.colors.text.secondary,position:"absolute",right:r.spacing(1),top:r.spacing(1.5),backgroundColor:"transparent",border:0}),header:(0,t.css)({paddingTop:r.spacing(1),paddingBottom:r.spacing(2)}),body:(0,t.css)({paddingTop:r.spacing(1),paddingBottom:r.spacing(1)}),footer:(0,t.css)({paddingTop:r.spacing(2),paddingBottom:r.spacing(1)})}}},69731:(Q,A,e)=>{"use strict";e.d(A,{C:()=>n});var t=e(96540);function n(){const[o,s]=(0,t.useState)(0);return()=>s(r=>r+1)}},29734:(Q,A,e)=>{"use strict";e.d(A,{K:()=>o,Pw:()=>t,RP:()=>s,tf:()=>n});var t=(r=>(r.onBlur="onBlur",r.onFocus="onFocus",r.onChange="onChange",r))(t||{});const n=(r,g)=>{const u=g.reduce((c,i)=>i.rule(r)?c:c.concat(i.errorMessage),[]);return u.length>0?u:null},o=(r,g)=>g&&g[r],s=(r,g)=>({rule:u=>!!u.match(r),errorMessage:g||"Value is not valid"})},91950:(Q,A,e)=>{"use strict";e.d(A,{A:()=>o,f:()=>r});var t=e(2543),n=e.n(t);class o{constructor(u){if(this.columns=[],this.columnMap={},this.rows=[],this.type="table",u){if(u.columns)for(const c of u.columns)this.addColumn(c);if(u.rows)for(const c of u.rows)this.addRow(c)}}sort(u){u.col===null||u.col===void 0||this.columns.length<=u.col||(this.rows.sort((c,i)=>(c=c[u.col],i=i[u.col],+(c==null)-+(i==null)||+(c>i)||-(c!!a.columns),l={},f=i.slice().reduce((a,v)=>(v.columns.forEach(E=>{const{text:D}=E;l[D]===void 0&&(l[D]=a.length,a.push(E))}),a),[]),d=i.map(a=>a.columns.map(v=>l[v.text])),h=i.reduce((a,v,E)=>{const D=d[E];return v.rows.forEach(b=>{const C=[];D.forEach((y,M)=>{C[y]=b[M]}),a.push(C)}),a},[]),p={},m=h.reduce((a,v,E)=>{if(!p[E]){let D=E+1;for(;Ds(f,v,C),D);if(b>-1){const C=h[b];for(let y=0;y{"use strict";e.d(A,{N:()=>n});var t=e(30038);const n=(0,t.VP)("core/cleanUpState")},82467:(Q,A,e)=>{"use strict";e.d(A,{Do:()=>t.Do,Vz:()=>n.Vz,YA:()=>n.YA,dx:()=>t.dx});var t=e(16001),n=e(28215)},28138:(Q,A,e)=>{"use strict";e.d(A,{A:()=>o,l:()=>n});var t=e(18226);const n=new t.o,o=n},5108:(Q,A,e)=>{"use strict";e.d(A,{x:()=>H});var t=e(32196),n=e(2543),o=e(96540),s=e(40845),r=e(68402),g=e(90613),u=e(94753),c=e(55852),i=e(9025),l=e(44836),f=e(27677),d=e(43907),h=e(67061),p=e(88323),m=e(25469),a=e(17172);class v extends o.Component{constructor(Y){super(Y),this.state={isLoading:!1},this.search=this.search.bind(this),this.debouncedSearch=(0,n.debounce)(this.search,300,{leading:!0,trailing:!0})}search(Y){return this.setState({isLoading:!0}),(0,n.isNil)(Y)&&(Y=""),(0,a.AI)().get("/api/serviceaccounts/search").then(ee=>ee.serviceAccounts.map(re=>({id:re.id,value:re.id,label:re.login,imgUrl:re.avatarUrl,login:re.login}))).finally(()=>{this.setState({isLoading:!1})})}render(){const{className:Y,onSelected:ee,inputId:re}=this.props,{isLoading:J}=this.state;return o.createElement("div",{className:"service-account-picker","data-testid":"serviceAccountPicker"},o.createElement(p.DW,{isClearable:!0,className:Y,inputId:re,isLoading:J,defaultOptions:!0,loadOptions:this.debouncedSearch,onChange:ee,placeholder:"Start typing to search for service accounts",noOptionsMessage:"No service accounts found","aria-label":"Service Account picker"}))}}class E extends o.Component{constructor(Y){super(Y),this.state={isLoading:!1},this.search=this.search.bind(this),this.debouncedSearch=(0,n.debounce)(this.search,300,{leading:!0,trailing:!0})}componentDidMount(){const{teamId:Y}=this.props;Y&&(0,a.AI)().get(`/api/teams/${Y}`).then(ee=>{this.setState({value:{value:ee,label:ee.name,imgUrl:ee.avatarUrl}})})}search(Y){return this.setState({isLoading:!0}),(0,n.isNil)(Y)&&(Y=""),(0,a.AI)().get(`/api/teams/search?perpage=100&page=1&query=${Y}`).then(ee=>{const re=ee.teams.map(J=>({value:J,label:J.name,imgUrl:J.avatarUrl}));return this.setState({isLoading:!1}),re})}render(){const{onSelected:Y,className:ee}=this.props,{isLoading:re,value:J}=this.state;return o.createElement("div",{className:"user-picker","data-testid":"teamPicker"},o.createElement(p.DW,{isLoading:re,defaultOptions:!0,loadOptions:this.debouncedSearch,value:J,onChange:Y,className:ee,placeholder:"Select a team",noOptionsMessage:"No teams found","aria-label":"Team picker"}))}}class D extends o.Component{constructor(Y){super(Y),this.state={isLoading:!1},this.search=this.search.bind(this),this.debouncedSearch=(0,n.debounce)(this.search,300,{leading:!0,trailing:!0})}search(Y){return this.setState({isLoading:!0}),(0,n.isNil)(Y)&&(Y=""),(0,a.AI)().get(`/api/org/users/lookup?query=${Y}&limit=100`).then(ee=>ee.map(re=>({id:re.userId,value:re.userId,label:re.login,imgUrl:re.avatarUrl,login:re.login}))).finally(()=>{this.setState({isLoading:!1})})}render(){const{className:Y,onSelected:ee,inputId:re}=this.props,{isLoading:J}=this.state;return o.createElement("div",{className:"user-picker","data-testid":"userPicker"},o.createElement(p.DW,{isClearable:!0,className:Y,inputId:re,isLoading:J,defaultOptions:!0,loadOptions:this.debouncedSearch,onChange:ee,placeholder:"Start typing to search for user",noOptionsMessage:"No users found","aria-label":"User picker"}))}}var b=e(24897),C=(k=>(k.None="None",k.Team="Team",k.User="User",k.ServiceAccount="ServiceAccount",k.BuiltInRole="builtInRole",k))(C||{});const y=({title:k=(0,l.t)("access-control.add-permission.title","Add permission for"),permissions:Y,assignments:ee,onAdd:re,onCancel:J})=>{const[ne,q]=(0,o.useState)(C.None),[te,oe]=(0,o.useState)(0),[ue,ie]=(0,o.useState)(0),[ge,he]=(0,o.useState)(""),[De,pe]=(0,o.useState)(""),le=(0,o.useMemo)(()=>{const Ee=[];return ee.users&&Ee.push({value:C.User,label:(0,l.t)("access-control.add-permission.user-label","User")}),ee.serviceAccounts&&Ee.push({value:C.ServiceAccount,label:(0,l.t)("access-control.add-permission.serviceaccount-label","Service Account")}),ee.teams&&Ee.push({value:C.Team,label:(0,l.t)("access-control.add-permission.team-label","Team")}),ee.builtInRoles&&Ee.push({value:C.BuiltInRole,label:(0,l.t)("access-control.add-permission.role-label","Role")}),Ee},[ee]);(0,o.useEffect)(()=>{Y.length>0&&pe(Y[0])},[Y]);const Te=()=>ne===C.Team&&te>0||ne===C.User&&ue>0||ne===C.ServiceAccount&&ue>0||C.BuiltInRole&&b.XT.hasOwnProperty(ge);return o.createElement("div",{className:"cta-form","aria-label":"Permissions slider"},o.createElement(m.J,{onClick:J}),o.createElement("h5",null,k),o.createElement("form",{name:"addPermission",onSubmit:Ee=>{Ee.preventDefault(),re({userId:ue,teamId:te,builtInRole:ge,permission:De,target:ne})}},o.createElement(h.B,{gap:1,direction:"row"},o.createElement(p.l6,{"aria-label":"Role to add new permission to",value:ne,options:le,onChange:Ee=>q(Ee.value),disabled:le.length===0,width:"auto"}),ne===C.User&&o.createElement(D,{onSelected:Ee=>ie(Ee?.value||0)}),ne===C.ServiceAccount&&o.createElement(v,{onSelected:Ee=>ie(Ee?.value||0)}),ne===C.Team&&o.createElement(E,{onSelected:Ee=>oe(Ee.value?.id||0)}),ne===C.BuiltInRole&&o.createElement(p.l6,{"aria-label":"Built-in role picker",options:Object.values(b.XT).filter(Ee=>Ee!==b.XT.None).map(Ee=>({value:Ee,label:Ee})),onChange:Ee=>he(Ee.value||""),width:"auto"}),o.createElement(p.l6,{"aria-label":"Permission Level",width:"auto",value:Y.find(Ee=>Ee===De),options:Y.map(Ee=>({label:Ee,value:Ee})),onChange:Ee=>pe(Ee.value||"")}),o.createElement(c.$n,{type:"submit",disabled:!Te()},o.createElement(l.x6,{i18nKey:"access-control.add-permissions.save"},"Save")))))};var M=e(56034),T=e(14578);const I=({item:k,permissionLevels:Y,canSet:ee,onRemove:re,onChange:J})=>{const ne=(0,s.of)(L);return o.createElement("tr",null,o.createElement("td",null,x(k)),o.createElement("td",null,O(k)),o.createElement("td",null,k.isInherited&&o.createElement("em",{className:"muted no-wrap"},"Inherited from folder")),o.createElement("td",null,o.createElement(p.l6,{disabled:!ee||!k.isManaged,onChange:q=>J(k,q.value),value:Y.find(q=>q===k.permission),options:Y.map(q=>({value:q,label:q}))})),o.createElement("td",null,k.warning?o.createElement(M.m,{content:o.createElement(o.Fragment,null,o.createElement(g.a,{marginBottom:1},k.warning),P(k))},o.createElement(T.I,{name:"exclamation-triangle",className:ne.warning})):o.createElement(M.m,{content:P(k)},o.createElement(T.I,{name:"info-circle"}))),o.createElement("td",null,k.isManaged?o.createElement(c.$n,{size:"sm",icon:"times",variant:"destructive",disabled:!ee,onClick:()=>re(k),"aria-label":`Remove permission for ${S(k)}`}):o.createElement(M.m,{content:k.isInherited?"Inherited Permission":"Provisioned Permission"},o.createElement(c.$n,{size:"sm",icon:"lock"}))))},x=k=>k.teamId?o.createElement("img",{className:"filter-table__avatar",src:k.teamAvatarUrl,alt:`Avatar for team ${k.teamId}`}):k.userId?o.createElement("img",{className:"filter-table__avatar",src:k.userAvatarUrl,alt:`Avatar for user ${k.userId}`}):o.createElement(T.I,{size:"xl",name:"shield"}),S=k=>k.userId?k.userLogin:k.teamId?k.team:k.builtInRole,O=k=>k.userId?o.createElement("span",{key:"name"},k.userLogin," "):k.teamId?o.createElement("span",{key:"name"},k.team," "):k.builtInRole?o.createElement("span",{key:"name"},k.builtInRole," "):o.createElement("span",{key:"name"}),P=k=>`Actions: ${[...new Set(k.actions)].sort().join(" ")}`,L=k=>({warning:(0,t.css)({color:k.colors.warning.main})}),U=({title:k,items:Y,compareKey:ee,permissionLevels:re,canSet:J,onRemove:ne,onChange:q})=>{const te=(0,o.useMemo)(()=>{const oe={};for(let ue of Y){const ie=ue[ee];if(!oe[ie]){oe[ie]=ue;continue}if(ue.actions.length>oe[ie].actions.length){oe[ie]=ue;continue}ue.actions.length===oe[ie].actions.length&&!ue.isInherited&&(oe[ie]=ue)}return Object.keys(oe).map(ue=>oe[ue])},[Y,ee]);return te.length===0?null:o.createElement("div",null,o.createElement("table",{className:"filter-table gf-form-group"},o.createElement("thead",null,o.createElement("tr",null,o.createElement("th",{style:{width:"1%"}}),o.createElement("th",null,k),o.createElement("th",{style:{width:"1%"}}),o.createElement("th",{style:{width:"40%"}},o.createElement(l.x6,{i18nKey:"access-control.permission-list.permission"},"Permission")),o.createElement("th",{style:{width:"1%"}}),o.createElement("th",{style:{width:"1%"}}))),o.createElement("tbody",null,te.map((oe,ue)=>o.createElement(I,{item:oe,onRemove:ne,onChange:q,canSet:J,key:`${ue}-${oe.userId}`,permissionLevels:re})))))},R="",B={permissions:[],assignments:{teams:!1,users:!1,serviceAccounts:!1,builtInRoles:!1}},H=({title:k=(0,l.t)("access-control.permissions.title","Permissions"),buttonLabel:Y=(0,l.t)("access-control.permissions.add-label","Add a permission"),emptyLabel:ee=(0,l.t)("access-control.permissions.no-permissions","There are no permissions"),resource:re,resourceId:J,canSetPermissions:ne,addPermissionTitle:q,getWarnings:te})=>{const oe=(0,s.of)(j),[ue,ie]=(0,o.useState)(!1),[ge,he]=(0,o.useState)([]),[De,pe]=(0,o.useState)(B),le=(0,o.useCallback)(async()=>{let st=await N(re,J);te&&(st=te(st)),he(st)},[re,J,te]);(0,o.useEffect)(()=>{w(re).then(st=>(pe(st),le()))},[re,J,le]);const Te=st=>{let Ke=null;st.target===C.User||st.target===C.ServiceAccount?Ke=V(re,J,st.userId,st.permission):st.target===C.Team?Ke=G(re,J,st.teamId,st.permission):st.target===C.BuiltInRole&&(Ke=_(re,J,st.builtInRole,st.permission)),Ke!==null&&Ke.then(le)},Ee=st=>{let Ke=null;st.userId?Ke=V(re,J,st.userId,R):st.teamId?Ke=G(re,J,st.teamId,R):st.isServiceAccount&&st.userId?Ke=V(re,J,st.userId,R):st.builtInRole&&(Ke=_(re,J,st.builtInRole,R)),Ke!==null&&Ke.then(le)},Re=(st,Ke)=>{st.permission!==Ke&&(st.userId?Te({permission:Ke,userId:st.userId,target:C.User}):st.isServiceAccount?Te({permission:Ke,userId:st.userId,target:C.User}):st.teamId?Te({permission:Ke,teamId:st.teamId,target:C.Team}):st.builtInRole&&Te({permission:Ke,builtInRole:st.builtInRole,target:C.BuiltInRole}))},me=(0,o.useMemo)(()=>(0,n.sortBy)(ge.filter(st=>st.teamId),["team","isManaged"]),[ge]),Me=(0,o.useMemo)(()=>(0,n.sortBy)(ge.filter(st=>st.userId&&!st.isServiceAccount),["userLogin","isManaged"]),[ge]),ye=(0,o.useMemo)(()=>(0,n.sortBy)(ge.filter(st=>st.userId&&st.isServiceAccount),["userLogin","isManaged"]),[ge]),Le=(0,o.useMemo)(()=>(0,n.sortBy)(ge.filter(st=>st.builtInRole),["builtInRole","isManaged"]),[ge]),We=(0,l.t)("access-control.permissions.role","Role"),Be=(0,l.t)("access-control.permissions.user","User"),Ye=(0,l.t)("access-control.permissions.serviceaccount","Service Account"),at=(0,l.t)("access-control.permissions.team","Team");return o.createElement("div",null,ne&&re==="folders"&&o.createElement(o.Fragment,null,o.createElement(l.x6,{i18nKey:"access-control.permissions.permissions-change-warning"},"This will change permissions for this folder and all its descendants. In total, this will affect:"),o.createElement(d.x,{selectedItems:{folder:{[J]:!0},dashboard:{},panel:{},$all:!1}}),o.createElement(r.$,{v:2})),ge.length===0&&o.createElement(g.a,null,o.createElement(u.E,null,ee)),o.createElement(U,{title:We,items:Le,compareKey:"builtInRole",permissionLevels:De.permissions,onChange:Re,onRemove:Ee,canSet:ne}),o.createElement(U,{title:Be,items:Me,compareKey:"userLogin",permissionLevels:De.permissions,onChange:Re,onRemove:Ee,canSet:ne}),o.createElement(U,{title:Ye,items:ye,compareKey:"userLogin",permissionLevels:De.permissions,onChange:Re,onRemove:Ee,canSet:ne}),o.createElement(U,{title:at,items:me,compareKey:"team",permissionLevels:De.permissions,onChange:Re,onRemove:Ee,canSet:ne}),ne&&o.createElement(o.Fragment,null,o.createElement(c.$n,{className:oe.addPermissionButton,variant:"primary",key:"add-permission",onClick:()=>ie(!0),icon:"plus"},Y),o.createElement(i.a,{in:ue},o.createElement(y,{title:q,onAdd:Te,permissions:De.permissions,assignments:De.assignments,onCancel:()=>ie(!1)}))))},w=async k=>{try{return await(0,f.AI)().get(`/api/access-control/${k}/description`)}catch(Y){return console.error("failed to load resource description: ",Y),B}},N=(k,Y)=>(0,f.AI)().get(`/api/access-control/${k}/${Y}`),V=(k,Y,ee,re)=>K(k,Y,"users",ee,re),G=(k,Y,ee,re)=>K(k,Y,"teams",ee,re),_=(k,Y,ee,re)=>K(k,Y,"builtInRoles",ee,re),K=(k,Y,ee,re,J)=>(0,f.AI)().post(`/api/access-control/${k}/${Y}/${ee}/${re}`,{permission:J}),j=k=>({breakdown:(0,t.css)({...k.typography.bodySmall,color:k.colors.text.secondary,marginBottom:k.spacing(2)}),addPermissionButton:(0,t.css)({marginBottom:k.spacing(2)})})},9025:(Q,A,e)=>{"use strict";e.d(A,{a:()=>g});var t=e(96540),n=e(22669);const o="200px",s=200,r={transition:`max-height ${s}ms ease-in-out`,overflow:"hidden"},g=({children:u,in:c,maxHeight:i=o,style:l=r})=>{const f={exited:{maxHeight:0},entering:{maxHeight:i},entered:{maxHeight:"unset",overflow:"visible"},exiting:{maxHeight:0}};return t.createElement(n.Ay,{in:c,timeout:s},d=>t.createElement("div",{style:{...l,...f[d]}},u))}},75269:(Q,A,e)=>{"use strict";e.d(A,{H:()=>o});var t=e(96540),n=e(76888);const o=t.memo(({actions:s})=>{const{chrome:r}=(0,n.Il)();return(0,t.useLayoutEffect)(()=>{r.update({actions:s})}),null});o.displayName="TopNavUpdate"},10804:(Q,A,e)=>{"use strict";e.d(A,{K:()=>s});var t=e(32196),n=e(96540),o=e(40845);function s({className:g,leftActionsSeparator:u}){const c=(0,o.of)(r);return u?n.createElement("div",{className:(0,t.cx)(g,c.leftActionsSeparator)}):n.createElement("div",{className:(0,t.cx)(g,c.line)})}const r=g=>({leftActionsSeparator:(0,t.css)({display:"flex",flexGrow:1}),line:(0,t.css)({width:1,backgroundColor:g.colors.border.medium,height:24})})},57571:(Q,A,e)=>{"use strict";e.d(A,{l:()=>t});const t=40},19361:(Q,A,e)=>{"use strict";e.d(A,{M:()=>i});var t=e(32196),n=e(96540),o=e(23596),s=e(40845);const r=({className:l,logo:f})=>n.createElement("img",{className:l,src:`${f||"public/img/grafana_icon.svg"}`,alt:"Grafana"}),g=({className:l,children:f})=>{const d=(0,s.$j)(),h=(0,t.css)({"&:before":{content:'""',position:"fixed",left:0,right:0,bottom:0,top:0,background:`url(public/img/g8_login_${d.isDark?"dark":"light"}.svg)`,backgroundPosition:"top center",backgroundSize:"auto",backgroundRepeat:"no-repeat",opacity:0,transition:"opacity 3s ease-in-out",[d.breakpoints.up("md")]:{backgroundPosition:"center",backgroundSize:"cover"}}});return n.createElement("div",{className:(0,t.cx)(h,l)},f)},u=({className:l})=>n.createElement("img",{className:l,src:"public/img/grafana_icon.svg",alt:"Grafana"}),c=()=>{const l=(0,s.$j)();return(0,t.css)({background:o.alpha(l.colors.background.primary,.7),backgroundSize:"cover"})};class i{}i.LoginLogo=r,i.LoginBackground=g,i.MenuLogo=u,i.LoginBoxBackground=c,i.AppTitle="Grafana",i.LoginTitle="Welcome to Grafana",i.HideEdition=!1,i.GetLoginSubTitle=()=>null},3984:(Q,A,e)=>{"use strict";e.d(A,{Z:()=>t});function t(n,o,s){const r=[];let g=!1,u;function c(i,l=!1){if(g)return;const f=i.url?.split("?")??["",""];let d=f[0];const h=new URLSearchParams(f[1]);if(h.has("editview")&&(d+=`?editview=${h.get("editview")}`),s&&d===s.url){r.unshift({text:s.text,href:i.url??""}),g=!0;return}const p=d.length>0&&u===d;u=d,!i.hideFromBreadcrumbs&&!(l&&p)&&r.unshift({text:i.text,href:i.url??""}),i.parentItem&&c(i.parentItem)}return o&&c(o),c(n,!0),r}},25469:(Q,A,e)=>{"use strict";e.d(A,{J:()=>r});var t=e(32196),n=e(96540),o=e(40845),s=e(29158);const r=({onClick:u,"aria-label":c,style:i})=>{const l=(0,o.of)(g);return n.createElement(s.K,{"aria-label":c??"Close",className:l,name:"times",onClick:u,style:i,tooltip:"Close"})},g=u=>(0,t.css)({position:"absolute",right:u.spacing(.5),top:u.spacing(1)})},27921:(Q,A,e)=>{"use strict";e.d(A,{A:()=>n});var t=e(96540);const n=o=>t.lazy(o)},7521:(Q,A,e)=>{"use strict";e.d(A,{A:()=>l});var t=e(32196),n=e(96540),o=e(13544),s=e(14578),r=e(55852),g=e(76442);const u=(0,t.css)({textAlign:"center"}),c=(0,t.css)({maxWidth:"700px",margin:"0 auto"}),l=({title:f,buttonIcon:d,buttonLink:h,buttonTitle:p,buttonDisabled:m,onClick:a,proTip:v,proTipLink:E,proTipLinkTitle:D,proTipTarget:b,infoBox:C,infoBoxTitle:y})=>{const M=()=>n.createElement(n.Fragment,null,v?n.createElement("span",{key:"proTipFooter"},n.createElement(s.I,{name:"rocket"}),n.createElement(n.Fragment,null," ProTip: ",v," "),E&&n.createElement("a",{href:E,target:b,className:"text-link"},D)):"",C?n.createElement("div",{key:"infoBoxHtml",className:`grafana-info-box ${c}`},y&&n.createElement("h5",null,y),n.createElement("div",{dangerouslySetInnerHTML:C})):""),T=M()?"":(0,t.css)({marginBottom:"20px"}),I=h?r.z9:r.$n,x=n.createElement(I,{size:"lg",onClick:a,href:h,icon:d,className:T,"data-testid":o.Tp.components.CallToActionCard.buttonV2(p),disabled:m},p);return n.createElement(g.c,{className:u,message:f,footer:M(),callToActionElement:x})}},38645:(Q,A,e)=>{"use strict";e.d(A,{Dd:()=>r,wi:()=>i});var t=e(96540),n=e(32264),o=e(14578),s=e(44836);let r=()=>[{target:"_blank",id:"documentation",text:(0,s.t)("nav.help/documentation","Documentation"),icon:"document-info",url:"https://grafana.com/docs/grafana/latest/?utm_source=grafana_footer"},{target:"_blank",id:"support",text:(0,s.t)("nav.help/support","Support"),icon:"question-circle",url:"https://grafana.com/products/enterprise/?utm_source=grafana_footer"},{target:"_blank",id:"community",text:(0,s.t)("nav.help/community","Community"),icon:"comments-alt",url:"https://community.grafana.com/?utm_source=grafana_footer"}];function g(f){return{hasReleaseNotes:!0,isBeta:f.includes("-beta")}}function u(f){const{buildInfo:d,licenseInfo:h}=n.$,p=[],m=h.stateInfo?` (${h.stateInfo})`:"";if(f||p.push({target:"_blank",id:"license",text:`${d.edition}${m}`,url:h.licenseUrl}),d.hideVersion)return p;const{hasReleaseNotes:a}=g(d.version);return p.push({target:"_blank",id:"version",text:`v${d.version} (${d.commit})`,url:a?"https://github.com/grafana/grafana/blob/main/CHANGELOG.md":void 0}),d.hasUpdate&&p.push({target:"_blank",id:"updateVersion",text:"New version available!",icon:"download-alt",url:"https://grafana.com/grafana/download?utm_source=grafana_footer"}),p}function c(f){r=f}const i=t.memo(({customLinks:f,hideEdition:d})=>{const h=(f||r()).concat(u(d));return t.createElement("footer",{className:"footer"},t.createElement("div",{className:"text-center"},t.createElement("ul",null,h.map(p=>t.createElement("li",{key:p.text},t.createElement(l,{item:p}))))))});i.displayName="Footer";function l({item:f}){const d=f.url?t.createElement("a",{href:f.url,target:f.target,rel:"noopener noreferrer",id:f.id},f.text):f.text;return t.createElement(t.Fragment,null,f.icon&&t.createElement(o.I,{name:f.icon})," ",d)}},53153:(Q,A,e)=>{"use strict";e.d(A,{S:()=>d});var t=e(96540),n=e(49785),o=e(13544),s=e(40845),r=e(42418),g=e(88575),u=e(66864),c=e(55852),i=e(56034),l=e(4691),f=e(78361);const d=({onSubmit:h,onSkip:p,showDefaultPasswordWarning:m})=>{const a=(0,s.of)(l.$),{handleSubmit:v,register:E,getValues:D,formState:{errors:b}}=(0,n.mN)({defaultValues:{newPassword:"",confirmNew:""}}),C=y=>{h(y.newPassword)};return t.createElement("form",{onSubmit:v(C)},m&&t.createElement(r.F,{severity:"info",title:"Continuing to use the default password exposes you to security risks."}),t.createElement(g.D,{label:"New password",invalid:!!b.newPassword,error:b?.newPassword?.message},t.createElement(f.s,{...E("newPassword",{required:"New Password is required"}),id:"new-password",autoFocus:!0,autoComplete:"new-password"})),t.createElement(g.D,{label:"Confirm new password",invalid:!!b.confirmNew,error:b?.confirmNew?.message},t.createElement(f.s,{...E("confirmNew",{required:"Confirmed Password is required",validate:y=>y===D().newPassword||"Passwords must match!"}),id:"confirm-new-password",autoComplete:"new-password"})),t.createElement(u.gW,null,t.createElement(c.$n,{type:"submit",className:a.submitButton},"Submit"),p&&t.createElement(i.m,{content:"If you skip you will be prompted to change password next time you log in.",placement:"bottom"},t.createElement(c.$n,{fill:"text",onClick:p,type:"button","data-testid":o.Tp.pages.Login.skip},"Skip"))))}},30249:(Q,A,e)=>{"use strict";e.d(A,{o:()=>m});var t=e(96540),n=e(64423),o=e(99165),s=e(85200),r=e(1173),g=e(11261),u=e(69129),c=e(26272),i=e(67266),l=e(79041),f=e(81297),d=e(16895),h=e(40458);function p(a,v,E=[]){for(const D of E)if(typeof D=="function"){if(!D(a,v))return!1}else if(v[D]!==a[D])return!1;return!0}class m extends t.Component{constructor(v){super(v),this.panelContext={},this.subscription=new n.yU,this.getTimeRange=()=>this.props.timeRange;let E=this.prepState(v);E.alignedData=E.config.prepData([E.alignedFrame]),this.state=E,this.plotInstance=t.createRef()}prepState(v,E=!0){let D=null;const{frames:b,fields:C,preparePlotFrame:y}=v,T=(y||h.m)(b,C||{x:s.sJ.get(r.Ct.firstTimeField).get({}),y:s.sJ.get(r.Ct.byTypes).get(new Set([g.PU.number,g.PU.enum]))},v.timeRange);if((0,d.uY)("GraphNG",!1,"data aligned",T),T){let I=this.state?.config;E&&(I=v.prepConfig(T,this.props.frames,this.getTimeRange),(0,d.uY)("GraphNG",!1,"config prepared",I)),D={alignedFrame:T,config:I},(0,d.uY)("GraphNG",!1,"data prepared",D.alignedData)}return D}handleCursorUpdate(v){if(v.tags?.has("uplot"))return;const E=v.payload?.point?.time,D=this.plotInstance.current;if(D&&E){const b=D.valToPos(E,"x");let C;if(b&&(C=(0,d.sw)(D,D.posToIdx(b))),!C||!b)return;D.setCursor({left:b,top:C})}}componentDidMount(){this.panelContext=this.context;const{eventBus:v}=this.panelContext;this.subscription.add(v.getStream(u.b_).pipe((0,o.c)(50)).subscribe({next:E=>{v!==E.origin&&this.handleCursorUpdate(E)}})),this.subscription.add(v.getStream(c.kb).pipe((0,o.c)(50)).subscribe({next:E=>this.handleCursorUpdate(E)})),this.subscription.add(v.getStream(u.ql).pipe((0,o.c)(50)).subscribe({next:()=>{const E=this.plotInstance?.current;E&&!E.cursor._lock&&E.setCursor({left:-10,top:-10})}}))}componentDidUpdate(v){const{frames:E,structureRev:D,timeZone:b,propsToDiff:C}=this.props,y=!p(v,this.props,C);if(E!==v.frames||y||b!==v.timeZone){let M=this.prepState(this.props,!1);M&&((this.state.config===void 0||b!==v.timeZone||D!==v.structureRev||!D||y)&&(M.config=this.props.prepConfig(M.alignedFrame,this.props.frames,this.getTimeRange),(0,d.uY)("GraphNG",!1,"config recreated",M.config)),M.alignedData=M.config.prepData([M.alignedFrame]),this.setState(M))}}componentWillUnmount(){this.subscription.unsubscribe()}render(){const{width:v,height:E,children:D,renderLegend:b}=this.props,{config:C,alignedFrame:y,alignedData:M}=this.state;return C?t.createElement(i.KU,{width:v,height:E,legend:b(C)},(T,I)=>t.createElement(f.Z,{config:C,data:M,width:T,height:I,plotRef:x=>this.plotInstance.current=x},D?D(C,y):null)):null}}m.contextType=l.e4},40458:(Q,A,e)=>{"use strict";e.d(A,{m:()=>i});var t=e(11261),n=e(73060),o=e(46294);function s(l,f,d){let h,p;for(let m=0;mf!=null?d.name===f:d.type===t.PU.time)}function c(l,f){const d=u(l,f);let h=d?.values;for(let p=0;ph?.state?.nullThresholdApplied?v:(0,o.M)({frame:v,refFieldName:h.name,refFieldPseudoMin:d?.from.valueOf(),refFieldPseudoMax:d?.to.valueOf()}));let p=0;l.forEach(v=>{v.fields.forEach(E=>{g(E)&&(E.config.custom={...E.config.custom,spanNulls:-1},p++)})});let m=1/0;p>1&&l.forEach(v=>{if(!v.fields.some(g))return;const E=h.values;for(let D=0;D0&&(m=Math.min(m,E[D]-E[D-1]))});let a=(0,n.Fd)({frames:l,joinBy:f.x,keep:f.y,keepOriginIndices:!0});return a?(a=c(a,h.name),m!==1/0&&(a.fields.forEach((v,E)=>{let D=v.values;if(E===0){let b=D[D.length-1];D.push(b+m,b+2*m)}else g(v)?D.push(null,null):D.push(void 0,void 0)}),a.length+=2),a):null}},18759:(Q,A,e)=>{"use strict";e.d(A,{T:()=>r});var t=e(32196),n=e(96540),o=e(40845),s=e(16795);function r({children:u,spacing:c,level:i}){const l=(0,o.of)(g,c,i);return n.createElement("span",{className:(0,t.css)(l.indentor)},u)}const g=(u,c,i)=>({indentor:(0,t.css)((0,s.Y)(u,c,l=>({paddingLeft:u.spacing(l*i)})))})},54391:(Q,A,e)=>{"use strict";e.d(A,{R:()=>u});var t=e(32196),n=e(96540),o=e(40845),s=e(14578),r=e(10354),g=e(72093);const u=({name:i,onChange:l,verifyLayerNameUniqueness:f,overrideStyles:d})=>{const h=(0,o.of)(c),[p,m]=(0,n.useState)(!1),[a,v]=(0,n.useState)(null),E=T=>{m(!0)},D=T=>{if(m(!1),a){v(null);return}i!==T&&l(T)},b=T=>{const I=T.currentTarget.value.trim();if(I.length===0){v("An empty layer name is not allowed");return}if(f&&!f(I)&&I!==i){v("Layer name already exists");return}a&&v(null)},C=T=>{D(T.currentTarget.value.trim())},y=T=>{T.key==="Enter"&&D(T.currentTarget.value)},M=T=>{T.target.select()};return n.createElement(n.Fragment,null,n.createElement("div",{className:h.wrapper},!p&&n.createElement("button",{className:h.layerNameWrapper,title:"Edit layer name",onClick:E,"data-testid":"layer-name-div"},n.createElement("span",{className:d?"":h.layerName},i),n.createElement(s.I,{name:"pen",className:h.layerEditIcon,size:"sm"})),p&&n.createElement(n.Fragment,null,n.createElement(r.p,{type:"text",defaultValue:i,onBlur:C,autoFocus:!0,onKeyDown:y,onFocus:M,invalid:a!==null,onChange:b,className:h.layerNameInput,"data-testid":"layer-name-input"}),a&&n.createElement(g.P,{horizontal:!0},a))))},c=i=>({wrapper:(0,t.css)({label:"Wrapper",display:"flex",alignItems:"center",marginLeft:i.spacing(.5)}),layerNameWrapper:(0,t.css)({display:"flex",cursor:"pointer",border:"1px solid transparent",borderRadius:i.shape.radius.default,alignItems:"center",padding:`0 0 0 ${i.spacing(.5)}`,margin:0,background:"transparent","&:hover":{background:i.colors.action.hover,border:`1px dashed ${i.colors.border.strong}`},"&:focus":{border:`2px solid ${i.colors.primary.border}`},"&:hover, &:focus":{".query-name-edit-icon":{visibility:"visible"}}}),layerName:(0,t.css)({fontWeight:i.typography.fontWeightMedium,color:i.colors.primary.text,cursor:"pointer",overflow:"hidden",marginLeft:i.spacing(.5)}),layerEditIcon:(0,t.cx)((0,t.css)({marginLeft:i.spacing(2),visibility:"hidden"}),"query-name-edit-icon"),layerNameInput:(0,t.css)({maxWidth:"300px",margin:"-4px 0"})})},61680:(Q,A,e)=>{"use strict";e.d(A,{b:()=>o});var t=e(96540),n=e(33390);const o=s=>{const{children:r,storageKey:g,defaultValue:u}=s,[c,i]=(0,t.useState)({value:n.A.getObject(s.storageKey,s.defaultValue)});(0,t.useEffect)(()=>{const d=h=>{h.key===g&&i({value:n.A.getObject(s.storageKey,s.defaultValue)})};return window.addEventListener("storage",d),()=>{window.removeEventListener("storage",d)}});const l=d=>{try{n.A.setObject(g,d)}catch(h){console.error(h)}i({value:d})},f=()=>{try{n.A.delete(g)}catch(d){console.log(d)}i({value:u})};return t.createElement(t.Fragment,null,r(c.value,l,f))}},87570:(Q,A,e)=>{"use strict";e.d(A,{A:()=>u});var t=e(96540),n=e(17172),o=e(2913),s=e(44836);const r=()=>!!o.Ay.oauth&&Object.keys(o.Ay.oauth).length>0;class g extends t.PureComponent{constructor(l){super(l),this.changePassword=f=>{const d={newPassword:f,confirmNew:f,oldPassword:"admin"};if(this.props.resetCode){const h={code:this.props.resetCode,newPassword:f,confirmPassword:f};(0,n.AI)().post("/api/user/password/reset",h).then(()=>{this.toGrafana()})}else(0,n.AI)().put("/api/user/password",d).then(()=>{this.toGrafana()}).catch(h=>console.error(h))},this.login=f=>{this.setState({loginErrorMessage:void 0,isLoggingIn:!0}),(0,n.AI)().post("/login",f,{showErrorAlert:!1}).then(d=>{if(this.result=d,f.password!=="admin"||o.Ay.ldapEnabled||o.Ay.authProxyEnabled){this.toGrafana();return}else this.changeView(f.password==="admin")}).catch(d=>{const h=(0,n.NF)(d)?c(d):void 0;this.setState({isLoggingIn:!1,loginErrorMessage:h||(0,s.t)("login.error.unknown","Unknown error occurred")})})},this.changeView=f=>{this.setState({isChangingPassword:!0,showDefaultPasswordWarning:f})},this.toGrafana=()=>{this.result?.redirectUrl?o.Ay.appSubUrl!==""&&!this.result.redirectUrl.startsWith(o.Ay.appSubUrl)?window.location.assign(o.Ay.appSubUrl+this.result.redirectUrl):window.location.assign(this.result.redirectUrl):window.location.assign(o.Ay.appSubUrl+"/")},this.state={isLoggingIn:!1,isChangingPassword:!1,showDefaultPasswordWarning:!1,loginErrorMessage:o.Ay.loginError}}render(){const{children:l}=this.props,{isLoggingIn:f,isChangingPassword:d,showDefaultPasswordWarning:h,loginErrorMessage:p}=this.state,{login:m,toGrafana:a,changePassword:v}=this,{loginHint:E,passwordHint:D,disableLoginForm:b,disableUserSignUp:C}=o.Ay;return t.createElement(t.Fragment,null,l({isOauthEnabled:r(),loginHint:E,passwordHint:D,disableLoginForm:b,disableUserSignUp:C,login:m,isLoggingIn:f,changePassword:v,skipPasswordChange:a,isChangingPassword:d,showDefaultPasswordWarning:h,loginErrorMessage:p}))}}const u=g;function c(i){switch(i.data?.messageId){case"password-auth.empty":case"password-auth.failed":case"password-auth.invalid":return(0,s.t)("login.error.invalid-user-or-password","Invalid username or password");case"login-attempt.blocked":return(0,s.t)("login.error.blocked","You have exceeded the number of login attempts for this user. Please try again later.");default:return i.data?.message}}},4691:(Q,A,e)=>{"use strict";e.d(A,{$:()=>d,Q:()=>f});var t=e(32196),n=e(96540),o=e(49785),s=e(13544),r=e(40845),g=e(88575),u=e(10354),c=e(55852),i=e(44836),l=e(78361);const f=({children:h,onSubmit:p,isLoggingIn:m,passwordHint:a,loginHint:v})=>{const E=(0,r.of)(d),D=(0,n.useId)(),b=(0,n.useId)(),{handleSubmit:C,register:y,formState:{errors:M}}=(0,o.mN)({mode:"onChange"});return n.createElement("div",{className:E.wrapper},n.createElement("form",{onSubmit:C(p)},n.createElement(g.D,{label:(0,i.t)("login.form.username-label","Email or username"),invalid:!!M.user,error:M.user?.message},n.createElement(u.p,{...y("user",{required:(0,i.t)("login.form.username-required","Email or username is required")}),id:D,autoFocus:!0,autoCapitalize:"none",placeholder:v,"data-testid":s.Tp.pages.Login.username})),n.createElement(g.D,{label:(0,i.t)("login.form.password-label","Password"),invalid:!!M.password,error:M.password?.message},n.createElement(l.s,{...y("password",{required:(0,i.t)("login.form.password-required","Password is required")}),id:b,autoComplete:"current-password",placeholder:a})),n.createElement(c.$n,{type:"submit","data-testid":s.Tp.pages.Login.submit,className:E.submitButton,disabled:m},m?(0,i.t)("login.form.submit-loading-label","Logging in..."):(0,i.t)("login.form.submit-label","Log in")),h))},d=h=>({wrapper:(0,t.css)({width:"100%",paddingBottom:h.spacing(2)}),submitButton:(0,t.css)({justifyContent:"center",width:"100%"})})},20851:(Q,A,e)=>{"use strict";e.d(A,{GU:()=>u,YO:()=>i,qm:()=>g});var t=e(32196),n=e(96540),o=e(40845),s=e(19361),r=e(38645);const g=({children:l,enterAnimation:f=!0})=>{const d=(0,o.of)(i);return n.createElement("div",{className:(0,t.cx)(d.loginInnerBox,f&&d.enterAnimation)},l)},u=({children:l,branding:f,isChangingPassword:d})=>{const h=(0,o.of)(i),[p,m]=(0,n.useState)(!1),a=f?.loginSubtitle??s.M.GetLoginSubTitle(),v=f?.loginTitle??s.M.LoginTitle,E=f?.loginBoxBackground||s.M.LoginBoxBackground(),D=f?.loginLogo,b=f?.hideEdition??s.M.HideEdition;return(0,n.useEffect)(()=>m(!0),[]),n.createElement(s.M.LoginBackground,{className:(0,t.cx)(h.container,p&&h.loginAnim,f?.loginBackground)},n.createElement("div",{className:h.loginMain},n.createElement("div",{className:(0,t.cx)(h.loginContent,E,"login-content-box")},n.createElement("div",{className:h.loginLogoWrapper},n.createElement(s.M.LoginLogo,{className:h.loginLogo,logo:D}),n.createElement("div",{className:h.titleWrapper},d?n.createElement("h1",{className:h.mainTitle},"Update your password"):n.createElement(n.Fragment,null,n.createElement("h1",{className:h.mainTitle},v),a&&n.createElement("h3",{className:h.subTitle},a)))),n.createElement("div",{className:h.loginOuterBox},l))),f?.hideFooter?n.createElement(n.Fragment,null):n.createElement(r.wi,{hideEdition:b,customLinks:f?.footerLinks}))},c=(0,t.keyframes)`
from{
opacity: 0;
transform: translate(-60px, 0px);
}
to{
opacity: 1;
transform: translate(0px, 0px);
}`,i=l=>({loginMain:(0,t.css)({flexGrow:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minWidth:"100%"}),container:(0,t.css)({minHeight:"100%",backgroundPosition:"center",backgroundRepeat:"no-repeat",minWidth:"100%",marginLeft:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"}),loginAnim:(0,t.css)({["&:before"]:{opacity:1},[".login-content-box"]:{opacity:1}}),submitButton:(0,t.css)({justifyContent:"center",width:"100%"}),loginLogo:(0,t.css)({width:"100%",maxWidth:60,marginBottom:l.spacing(2),[l.breakpoints.up("sm")]:{maxWidth:100}}),loginLogoWrapper:(0,t.css)({display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",padding:l.spacing(3)}),titleWrapper:(0,t.css)({textAlign:"center"}),mainTitle:(0,t.css)({fontSize:22,[l.breakpoints.up("sm")]:{fontSize:32}}),subTitle:(0,t.css)({fontSize:l.typography.size.md,color:l.colors.text.secondary}),loginContent:(0,t.css)({maxWidth:478,width:"calc(100% - 2rem)",display:"flex",alignItems:"stretch",flexDirection:"column",position:"relative",justifyContent:"flex-start",zIndex:1,minHeight:320,borderRadius:l.shape.radius.default,padding:l.spacing(2,0),opacity:0,transition:"opacity 0.5s ease-in-out",[l.breakpoints.up("sm")]:{minHeight:l.spacing(40),justifyContent:"center"}}),loginOuterBox:(0,t.css)({display:"flex",overflowY:"hidden",alignItems:"center",justifyContent:"center"}),loginInnerBox:(0,t.css)({padding:l.spacing(0,2,2,2),display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flexGrow:1,maxWidth:415,width:"100%",transform:"translate(0px, 0px)",transition:"0.25s ease"}),enterAnimation:(0,t.css)({animation:`${c} ease-out 0.2s`})})},60188:(Q,A,e)=>{"use strict";e.d(A,{Q:()=>g});var t=e(2543),n=e.n(t),o=e(96540),s=e(10354),r=e(88575);class g extends o.PureComponent{constructor(){super(...arguments),this.state={text:"",inputCorrected:!1},this.inputRef=o.createRef(),this.updateValue=()=>{const c=this.inputRef.current?.value;let i=!1,l="";const f=this.props.min,d=this.props.max;let h=c!==""?Number(c):void 0;h&&!Number.isNaN(h)&&(f!=null&&hd?(l=d.toString(),i=!0):l=c??"",this.setState({text:l,inputCorrected:i})),i&&this.updateValueDebounced(),!Number.isNaN(h)&&h!==this.props.value&&this.props.onChange(h)},this.updateValueDebounced=(0,t.debounce)(this.updateValue,500),this.onChange=c=>{this.setState({text:c.currentTarget.value}),this.updateValueDebounced()},this.onKeyPress=c=>{c.key==="Enter"&&this.updateValue()}}componentDidMount(){this.setState({text:isNaN(this.props.value)?"":`${this.props.value}`})}componentDidUpdate(c){if(this.props.value!==c.value){const i=isNaN(this.props.value)?"":`${this.props.value}`;i!==this.state.text&&this.setState({text:i})}}renderInput(){return o.createElement(s.p,{type:"number",ref:this.inputRef,min:this.props.min,max:this.props.max,step:this.props.step,autoFocus:this.props.autoFocus,value:this.state.text,onChange:this.onChange,onBlur:this.updateValue,onKeyPress:this.onKeyPress,placeholder:this.props.placeholder,disabled:this.props.fieldDisabled,width:this.props.width,suffix:this.props.suffix})}render(){const{inputCorrected:c}=this.state;if(c){let i="",{min:l,max:f}=this.props;return f==null?l!=null&&(i=`< ${l}`):l!=null?i=`${l} < > ${f}`:i=`> ${f}`,o.createElement(r.D,{invalid:c,error:`Out of range ${i}`,validationMessageHorizontalOverflow:!0,style:{direction:"rtl"}},this.renderInput())}return this.renderInput()}}},77268:(Q,A,e)=>{"use strict";e.d(A,{a:()=>u});var t=e(32196),n=e(96540),o=e(40845),s=e(83598),r=e(29158),g=e(83876);const u=({value:i,settings:l,onChange:f,details:d})=>{const h=(0,o.$j)(),p=(0,o.of)(c);return n.createElement(s.sk,{color:i??"",onChange:f,enableNamedColors:l?.enableNamedColors!==!1},({ref:m,showColorPicker:a,hideColorPicker:v})=>n.createElement("div",{className:p.spot},n.createElement("div",{className:p.colorPicker},n.createElement(g.q,{ref:m,onClick:a,onMouseLeave:v,color:i?h.visualization.getColorByName(i):h.components.input.borderColor})),d&&n.createElement(n.Fragment,null,i?n.createElement("span",{className:p.colorText,onClick:a},i):n.createElement("span",{className:p.placeholderText,onClick:a},l?.placeholder??"Select color"),l?.isClearable&&i&&n.createElement(r.K,{name:"times",onClick:()=>f(void 0),tooltip:"Clear settings"}))))},c=i=>({spot:(0,t.css)({cursor:"pointer",color:i.colors.text.primary,background:i.components.input.background,padding:"3px",height:i.v1.spacing.formInputHeight,border:`1px solid ${i.components.input.borderColor}`,display:"flex",flexDirection:"row",alignItems:"center",alignContent:"flex-end","&:hover":{border:`1px solid ${i.components.input.borderHover}`}}),colorPicker:(0,t.css)({padding:`0 ${i.spacing(1)}`}),colorText:(0,t.css)({flexGrow:2}),placeholderText:(0,t.css)({flexGrow:2,color:i.colors.text.secondary})})},72626:(Q,A,e)=>{"use strict";e.d(A,{w:()=>o});var t=e(96540),n=e(60188);const o=({value:s,onChange:r,item:g})=>{const{settings:u}=g,c=(0,t.useCallback)(i=>{r(u?.integer&&i!==void 0?Math.floor(i):i)},[r,u?.integer]);return t.createElement(n.Q,{value:s,min:u?.min,max:u?.max,step:u?.step,placeholder:u?.placeholder,onChange:c})}},33919:(Q,A,e)=>{"use strict";e.d(A,{H:()=>xe,u:()=>$e});var t=e(96540),n=e(69550),o=e(27310),s=e(11261),r=e(50082),g=e(15292),u=e(94354),c=e(20333),i=e(76218),l=e(32196),f=e(2543),d=e(47737),h=e(60578),p=e(24284),m=e(10354),a=e(83598),v=e(29158),E=e(55852),D=e(60029),b=e(3911);const C=[{value:r.O.Absolute,label:"Absolute",description:"Pick thresholds based on the absolute values"},{value:r.O.Percentage,label:"Percentage",description:"Pick threshold based on the percent between min/max"}];class y extends t.PureComponent{constructor(Z){super(Z),this.onAddThreshold=()=>{const{steps:de}=this.state;let ve=0;de.length>1&&(ve=de[de.length-1].value+10);let Ue=p.Tj.filter(Ve=>!de.some(Ne=>Ne.color===Ve))[1];Ue||(Ue="#CCCCCC");const _e={value:ve,color:Ue,key:M++},ze=[...de,_e];(0,d.RU)(ze),this.setState({steps:ze},()=>{this.latestThresholdInputRef.current&&this.latestThresholdInputRef.current.focus(),this.onChange()})},this.onRemoveThreshold=de=>{const{steps:ve}=this.state;ve.length&&de.key!==ve[0].key&&this.setState({steps:ve.filter(Ue=>Ue.key!==de.key)},this.onChange)},this.onChangeThresholdValue=(de,ve)=>{const Ue=de.target.value.replace(/,/g,"."),_e=parseFloat(Ue),ze=isNaN(_e)?"":_e,Ve=this.state.steps.map(Ne=>(Ne.key===ve.key&&(Ne={...Ne,value:ze}),Ne));Ve.length&&(Ve[0].value=-1/0),(0,d.RU)(Ve),this.setState({steps:Ve})},this.onChangeThresholdColor=(de,ve)=>{const{steps:Ue}=this.state,_e=Ue.map(ze=>(ze.key===de.key&&(ze={...ze,color:ve}),ze));this.setState({steps:_e},this.onChange)},this.onBlur=()=>{const de=[...this.state.steps];(0,d.RU)(de),this.setState({steps:de},this.onChange)},this.onChange=()=>{this.props.onChange(I(this.props.thresholds,this.state.steps))},this.onModeChanged=de=>{this.props.onChange({...this.props.thresholds,mode:de})};const ae=T(Z.thresholds.steps);ae[0].value=-1/0,this.state={steps:ae},this.latestThresholdInputRef=t.createRef()}renderInput(Z,ae,de){const ve=this.props.thresholds.mode===r.O.Percentage,Ue=`Threshold ${de+1}`;return isFinite(Z.value)?t.createElement(m.p,{type:"number",step:"0.0001",key:ve.toString(),onChange:_e=>this.onChangeThresholdValue(_e,Z),value:Z.value,"aria-label":Ue,ref:de===0?this.latestThresholdInputRef:null,onBlur:this.onBlur,prefix:t.createElement("div",{className:ae.inputPrefix},t.createElement("div",{className:ae.colorPicker},t.createElement(a.sk,{color:Z.color,onChange:_e=>this.onChangeThresholdColor(Z,_e),enableNamedColors:!0})),ve&&t.createElement("div",{className:ae.percentIcon},"%")),suffix:t.createElement(v.K,{className:ae.trashIcon,name:"trash-alt",onClick:()=>this.onRemoveThreshold(Z),tooltip:`Remove ${Ue}`})}):t.createElement(m.p,{type:"text",value:"Base","aria-label":Ue,disabled:!0,prefix:t.createElement("div",{className:ae.colorPicker},t.createElement(a.sk,{color:Z.color,onChange:_e=>this.onChangeThresholdColor(Z,_e),enableNamedColors:!0}))})}render(){const{thresholds:Z}=this.props,{steps:ae}=this.state;return t.createElement(h.D.Consumer,null,de=>{const ve=x(de);return t.createElement("div",{className:ve.wrapper},t.createElement(E.$n,{size:"sm",icon:"plus",onClick:()=>this.onAddThreshold(),variant:"secondary",className:ve.addButton,fullWidth:!0},"Add threshold"),t.createElement("div",{className:ve.thresholds},ae.slice(0).reverse().map((Ue,_e)=>t.createElement("div",{className:ve.item,key:`${Ue.key}`},this.renderInput(Ue,ve,_e)))),t.createElement("div",null,t.createElement(D.J,{description:"Percentage means thresholds relative to min & max"},"Thresholds mode"),t.createElement(u.z,{options:C,onChange:this.onModeChanged,value:Z.mode})))})}}let M=100;function T(be){return(!be||be.length===0)&&(be=[{value:-1/0,color:"green"}]),be.filter((Z,ae)=>(0,f.isNumber)(Z.value)||ae===0).map(Z=>({color:Z.color,value:Z.value===null?-1/0:Z.value,key:M++}))}function I(be,Z){return{mode:be.mode??r.O.Absolute,steps:Z.map(de=>{const{key:ve,...Ue}=de;return Ue})}}const x=(0,b.N)(be=>({wrapper:(0,l.css)`
display: flex;
flex-direction: column;
`,thresholds:(0,l.css)`
display: flex;
flex-direction: column;
margin-bottom: ${be.spacing(2)};
`,item:(0,l.css)`
margin-bottom: ${be.spacing(1)};
&:last-child {
margin-bottom: 0;
}
`,colorPicker:(0,l.css)`
padding: 0 ${be.spacing(1)};
`,addButton:(0,l.css)`
margin-bottom: ${be.spacing(1)};
`,percentIcon:(0,l.css)`
font-size: ${be.typography.bodySmall.fontSize};
color: ${be.colors.text.secondary};
`,inputPrefix:(0,l.css)`
display: flex;
align-items: center;
`,trashIcon:(0,l.css)`
color: ${be.colors.text.secondary};
cursor: pointer;
margin-right: 0;
&:hover {
color: ${be.colors.text};
}
`}));class S extends t.PureComponent{constructor(Z){super(Z)}render(){const{onChange:Z}=this.props;let ae=this.props.value;return ae||(ae={mode:r.O.Percentage,steps:[]}),t.createElement(y,{thresholds:ae,onChange:Z})}}var O=e(25019),P=e(40845),L=e(66864),U=e(14578),R=e(37390),B=e(80744),H=e(25148),w=e(75494),N=e(51986),V=e(88323);function G({mapping:be,index:Z,onChange:ae,onRemove:de,onDuplicate:ve,showIconPicker:Ue}){const{key:_e,result:ze,id:Ve}=be,Ne=(0,P.of)(_),ot=(0,t.useRef)(null),nt=(0,t.useCallback)(ft=>{const yt={...be,result:{...be.result}};ft(yt),ae(Z,yt)},[be,Z,ae]);(0,t.useEffect)(()=>{ot.current&&be.isNew&&(ot.current.focus(),nt(ft=>{ft.isNew=!1}))},[be,ot,nt]);const pt=ft=>{nt(yt=>{yt.result.color=ft})},mt=()=>{nt(ft=>{ft.result.color=void 0})},gt=ft=>{nt(yt=>{yt.result.icon=ft})},Pt=()=>{nt(ft=>{ft.result.icon=void 0})},Mt=ft=>{nt(yt=>{yt.key=ft.currentTarget.value})},Yt=ft=>{nt(yt=>{yt.result.text=ft.currentTarget.value})},zt=ft=>{nt(yt=>{yt.from=parseFloat(ft.currentTarget.value)})},_t=ft=>{nt(yt=>{yt.to=parseFloat(ft.currentTarget.value)})},rt=ft=>{nt(yt=>{yt.pattern=ft.currentTarget.value})},It=ft=>{nt(yt=>{yt.specialMatch=ft.value})},Dn=[{label:"Null",value:O.W.Null,description:"Matches null and undefined values"},{label:"NaN",value:O.W.NaN,description:"Matches against Number.NaN (not a number)"},{label:"Null + NaN",value:O.W.NullAndNaN,description:"Matches null, undefined and NaN"},{label:"True",value:O.W.True,description:"Boolean true values"},{label:"False",value:O.W.False,description:"Boolean false values"},{label:"Empty",value:O.W.Empty,description:"Empty string"}];return t.createElement(w.sx,{key:Ve,draggableId:Ve,index:Z},ft=>t.createElement("tr",{className:Ne.dragRow,ref:ft.innerRef,...ft.draggableProps},t.createElement("td",null,t.createElement("div",{className:Ne.dragHandle,...ft.dragHandleProps},t.createElement(U.I,{name:"draggabledots",size:"lg"}))),t.createElement("td",{className:Ne.typeColumn},be.type),t.createElement("td",null,be.type===O.d.ValueToText&&t.createElement(m.p,{ref:ot,type:"text",value:_e??"",onChange:Mt,placeholder:"Exact value to match"}),be.type===O.d.RangeToText&&t.createElement("div",{className:Ne.rangeInputWrapper},t.createElement(m.p,{type:"number",value:be.from??"",placeholder:"Range start",onChange:zt,prefix:"From"}),t.createElement(m.p,{type:"number",value:be.to??"",placeholder:"Range end",onChange:_t,prefix:"To"})),be.type===O.d.RegexToText&&t.createElement(m.p,{type:"text",value:be.pattern??"",placeholder:"Regular expression",onChange:rt}),be.type===O.d.SpecialValue&&t.createElement(V.l6,{value:Dn.find(yt=>yt.value===be.specialMatch),options:Dn,onChange:It})),t.createElement("td",null,t.createElement(m.p,{type:"text",value:ze.text??"",onChange:Yt,placeholder:"Optional display text"})),t.createElement("td",{className:Ne.textAlignCenter},ze.color&&t.createElement(L.Gy,{spacing:"sm",justify:"center"},t.createElement(a.sk,{color:ze.color,onChange:pt,enableNamedColors:!0}),t.createElement(v.K,{name:"times",onClick:mt,tooltip:"Remove color",tooltipPlacement:"top"})),!ze.color&&t.createElement(a.sk,{color:"gray",onChange:pt,enableNamedColors:!0},yt=>t.createElement(E.$n,{variant:"primary",fill:"text",onClick:yt.showColorPicker,ref:yt.ref,size:"sm"},"Set color"))),Ue&&t.createElement("td",{className:Ne.textAlignCenter},t.createElement(L.Gy,{spacing:"sm",justify:"center"},t.createElement(H.n,{onChange:gt,onClear:Pt,value:ze.icon,size:B.Iy.SMALL,folderName:B.Iu.Icon,mediaType:B.zu.Icon,color:ze.color}),ze.icon&&t.createElement(v.K,{name:"times",onClick:Pt,tooltip:"Remove icon",tooltipPlacement:"top"}))),t.createElement("td",{className:Ne.textAlignCenter},t.createElement(L.Gy,{spacing:"sm"},t.createElement(v.K,{name:"copy",onClick:()=>ve(Z),"data-testid":"duplicate-value-mapping","aria-label":"Duplicate value mapping",tooltip:"Duplicate"}),t.createElement(v.K,{name:"trash-alt",onClick:()=>de(Z),"data-testid":"remove-value-mapping","aria-label":"Delete value mapping",tooltip:"Delete"})))))}const _=be=>({dragRow:(0,l.css)({position:"relative"}),dragHandle:(0,l.css)({cursor:"grab","&:focus-visible&:after":{bottom:0,content:'""',left:0,position:"absolute",right:0,top:0,outline:`2px solid ${be.colors.primary.main}`,outlineOffset:"-2px"}}),rangeInputWrapper:(0,l.css)({display:"flex","> div:first-child":{marginRight:be.spacing(2)}}),regexInputWrapper:(0,l.css)({display:"flex","> div:first-child":{marginRight:be.spacing(2)}}),typeColumn:(0,l.css)({textTransform:"capitalize",textAlign:"center",width:"1%"}),textAlignCenter:(0,l.css)({textAlign:"center"})});function K({value:be,onChange:Z,onClose:ae,showIconPicker:de}){const ve=(0,P.of)(j),[Ue,_e]=(0,t.useState)([]);(0,t.useEffect)(()=>{_e(J(be))},[be]);const ze=gt=>{if(!be||!gt.destination)return;const Pt=[...Ue],Mt=Pt[gt.source.index];Pt.splice(gt.source.index,1),Pt.splice(gt.destination.index,0,Mt),_e(Pt)},Ve=(gt,Pt)=>{const Mt=[...Ue];Mt.splice(gt,1,Pt),_e(Mt)},Ne=gt=>{const Pt=[...Ue];Pt.splice(gt,1),_e(Pt)},ot=[{label:"Value",value:O.d.ValueToText,description:"Match a specific text value"},{label:"Range",value:O.d.RangeToText,description:"Match a numerical range of values"},{label:"Regex",value:O.d.RegexToText,description:"Match a regular expression with replacement"},{label:"Special",value:O.d.SpecialValue,description:"Match on null, NaN, boolean and empty values"}],nt=gt=>{_e([...Ue,Y({type:gt.value,result:{},isNew:!0})])},pt=gt=>{const Pt=ee(Ue[gt]),Mt=[...Ue];Mt.splice(gt,0,{...Pt});for(let Yt=gt;Yt{Z(re(Ue)),ae()};return(0,t.useEffect)(()=>{be?.length||nt({value:O.d.ValueToText})},[]),t.createElement(t.Fragment,null,t.createElement("div",{className:ve.tableWrap},t.createElement("table",{className:ve.editTable},t.createElement("thead",null,t.createElement("tr",null,t.createElement("th",{style:{width:"1%"}}),t.createElement("th",{style:{width:"40%",textAlign:"left"},colSpan:2},"Condition"),t.createElement("th",{style:{textAlign:"left"}},"Display text"),t.createElement("th",{style:{width:"10%"}},"Color"),de&&t.createElement("th",{style:{width:"10%"}},"Icon"),t.createElement("th",{style:{width:"1%"}}))),t.createElement(w.JY,{onDragEnd:ze},t.createElement(w.gL,{droppableId:"sortable-field-mappings",direction:"vertical"},gt=>t.createElement("tbody",{ref:gt.innerRef,...gt.droppableProps},Ue.map((Pt,Mt)=>t.createElement(G,{key:Pt.id,mapping:Pt,index:Mt,onChange:Ve,onRemove:Ne,onDuplicate:pt,showIconPicker:de})),gt.placeholder))))),t.createElement(R.a.ButtonRow,{leftItems:t.createElement(N.i,{label:"Add a new mapping",variant:"secondary",size:"md",icon:"plus",menuPlacement:"auto",minWidth:40,options:ot,onChange:nt})},t.createElement(E.$n,{variant:"secondary",fill:"outline",onClick:ae},"Cancel"),t.createElement(E.$n,{variant:"primary",onClick:mt},"Update")))}const j=be=>({tableWrap:(0,l.css)`
max-height: calc(80vh - 170px);
min-height: 40px;
overflow: auto;
`,editTable:(0,l.css)({width:"100%",marginBottom:be.spacing(2),"thead th":{textAlign:"center"},"tbody tr:hover":{background:be.colors.action.hover}," th, td":{padding:be.spacing(1)}})});function k(){return(0,f.uniqueId)("mapping-")}function Y(be){return{type:O.d.ValueToText,result:{},id:k(),...be}}function ee(be){return{...Y(be),id:k()}}function re(be){const Z=[],ae={type:O.d.ValueToText,options:{}};return be.forEach((de,ve)=>{const Ue={...de.result,index:ve};switch((!Ue.text||Ue.text.trim().length===0)&&(Ue.text=void 0),de.type){case O.d.ValueToText:de.key!=null&&(ae.options[de.key]=Ue);break;case O.d.RangeToText:de.from!=null&&de.to!=null&&Z.push({type:de.type,options:{from:de.from,to:de.to,result:Ue}});break;case O.d.RegexToText:de.pattern!=null&&Z.push({type:de.type,options:{pattern:de.pattern,result:Ue}});break;case O.d.SpecialValue:Z.push({type:de.type,options:{match:de.specialMatch,result:Ue}})}}),Object.keys(ae.options).length>0&&Z.unshift(ae),Z}function J(be){const Z=[];if(be)for(const ae of be)switch(ae.type){case O.d.ValueToText:for(const de of Object.keys(ae.options))Z.push(Y({type:ae.type,result:ae.options[de],key:de}));break;case O.d.RangeToText:Z.push(Y({type:ae.type,result:ae.options.result,from:ae.options.from??0,to:ae.options.to??0}));break;case O.d.RegexToText:Z.push(Y({type:ae.type,result:ae.options.result,pattern:ae.options.pattern}));break;case O.d.SpecialValue:Z.push(Y({type:ae.type,result:ae.options.result,specialMatch:ae.options.match??O.W.Null}))}return Z.sort((ae,de)=>(ae.result.index??0)>(de.result.index??0)?1:-1),Z}const ne=t.memo(be=>{const{value:Z,onChange:ae,item:de}=be,ve=(0,P.of)(q),Ue=de.settings?.icon,[_e,ze]=(0,t.useState)(!1),Ve=(0,t.useCallback)(()=>{ze(!1)},[ze]),Ne=(0,t.useMemo)(()=>J(Z),[Z]),ot=(0,t.useCallback)((pt,mt)=>{Ne[mt].result.color=pt,ae(re(Ne))},[Ne,ae]),nt=(0,t.useCallback)((pt,mt)=>{Ne[mt].result.icon=pt,ae(re(Ne))},[Ne,ae]);return t.createElement(L.gW,null,t.createElement("table",{className:ve.compactTable},t.createElement("tbody",null,Ne.map((pt,mt)=>t.createElement("tr",{key:mt.toString()},t.createElement("td",null,pt.type===O.d.ValueToText&&pt.key,pt.type===O.d.RangeToText&&t.createElement("span",null,"[",pt.from," - ",pt.to,"]"),pt.type===O.d.RegexToText&&pt.pattern,pt.type===O.d.SpecialValue&&pt.specialMatch),t.createElement("td",null,t.createElement(U.I,{name:"arrow-right"})),t.createElement("td",null,pt.result.text),pt.result.color&&t.createElement("td",null,t.createElement(a.sk,{color:pt.result.color,onChange:gt=>ot(gt,mt),enableNamedColors:!0})),Ue&&pt.result.icon&&t.createElement("td",{"data-testid":"iconPicker"},t.createElement(H.n,{onChange:gt=>nt(gt,mt),value:pt.result.icon,size:B.Iy.SMALL,folderName:B.Iu.Icon,mediaType:B.zu.Icon,color:pt.result.color})))))),t.createElement(E.$n,{variant:"secondary",size:"sm",fullWidth:!0,onClick:()=>ze(!0)},Ne.length>0&&t.createElement("span",null,"Edit value mappings"),Ne.length===0&&t.createElement("span",null,"Add value mappings")),t.createElement(R.a,{isOpen:_e,title:"Value mappings",onDismiss:Ve,className:ve.modal,closeOnBackdropClick:!1},t.createElement(K,{value:Z,onChange:ae,onClose:Ve,showIconPicker:Ue})))});ne.displayName="ValueMappingsEditor";const q=be=>({modal:(0,l.css)({width:"980px"}),compactTable:(0,l.css)({width:"100%","tbody td":{padding:be.spacing(.5)}})});var te=e(59429);const oe=({value:be,onChange:Z,item:ae})=>{const{placeholder:de,isClearable:ve}=ae?.settings??{},Ue=(0,t.useCallback)(_e=>{Z(_e?.value?.uid)},[Z]);return t.createElement(te.b,{isClearable:ve,defaultOptions:!0,onChange:Ue,placeholder:de,value:be})};var ue=e(77268),ie=e(8066),ge=e(24293),he=e(88575);const De=({value:be,onChange:Z,item:ae,id:de})=>{const ve=(0,P.$j)(),Ue=(0,P.of)(le),_e=(0,ie.Hs)(be?.mode),Ve=(ae.settings?.byValueSupport?ie.uf.list():ie.uf.list().filter(mt=>!mt.isByValue)).filter(mt=>!mt.excludeFromPicker).map(mt=>{let gt=mt.isByValue?" (by value)":"";return{value:mt.id,label:`${mt.name}${gt}`,description:mt.description,isContinuous:mt.isContinuous,isByValue:mt.isByValue,component(){return t.createElement(pe,{mode:mt,theme:ve})}}}),Ne=mt=>{Z({...be,mode:mt.value})},ot=mt=>{Z({...be,mode:pt,fixedColor:mt})},nt=mt=>{Z({...be,mode:pt,seriesBy:mt})},pt=be?.mode??ge.Y.Thresholds;if(pt===ge.Y.Fixed||pt===ge.Y.Shades)return t.createElement("div",{className:Ue.group},t.createElement(V.l6,{minMenuHeight:200,options:Ve,value:pt,onChange:Ne,className:Ue.select,inputId:de}),t.createElement(ue.a,{value:be?.fixedColor,onChange:ot}));if(ae.settings?.bySeriesSupport&&_e.isByValue){const mt=[{label:"Last",value:"last"},{label:"Min",value:"min"},{label:"Max",value:"max"}];return t.createElement(t.Fragment,null,t.createElement("div",{style:{marginBottom:ve.spacing(2)}},t.createElement(V.l6,{minMenuHeight:200,options:Ve,value:pt,onChange:Ne,inputId:de})),t.createElement(he.D,{label:"Color series by"},t.createElement(u.z,{value:be?.seriesBy??"last",options:mt,onChange:nt})))}return t.createElement(V.l6,{minMenuHeight:200,options:Ve,value:pt,onChange:Ne,inputId:de})},pe=({mode:be,theme:Z})=>{if(!be.getColors)return null;const ae=be.getColors(Z).map(Z.visualization.getColorByName),de={height:"8px",width:"100%",margin:"2px 0",borderRadius:"3px",opacity:1};if(be.isContinuous)de.background=`linear-gradient(90deg, ${ae.join(",")})`;else{let ve="",Ue="";for(let _e=0;_e({group:(0,l.css)({display:"flex"}),select:(0,l.css)({marginRight:be.spacing(1),flexGrow:1})});var Te=e(91890),Ee=e(64919);const Re=({value:be,onChange:Z,context:ae})=>t.createElement(Ee.e,{links:be,onChange:Z,data:ae.data,getSuggestions:()=>ae.getSuggestions?ae.getSuggestions(Te.uP.Values):[]});class me extends t.PureComponent{constructor(){super(...arguments),this.state={isLoading:!0,options:[]},this.updateOptions=async()=>{const{item:Z}=this.props,{settings:ae}=Z;let de=Z.settings?.options||[];ae?.getOptions&&(de=await ae.getOptions(this.props.context)),this.state.options!==de&&this.setState({isLoading:!1,options:de})}}componentDidMount(){this.updateOptions()}componentDidUpdate(Z){const ae=Z.item?.settings,de=this.props.item?.settings;if(ae!==de)this.updateOptions();else if(de?.getOptions){const ve=Z.context?.data,Ue=this.props.context?.data;ve!==Ue&&this.updateOptions()}}render(){const{options:Z,isLoading:ae}=this.state,{value:de,onChange:ve,item:Ue}=this.props,{settings:_e}=Ue;return t.createElement(V.KF,{isLoading:ae,value:de,defaultValue:de,allowCustomValue:_e?.allowCustomValue,onChange:ze=>{ve(ze.map(Ve=>Ve.value).flatMap(Ve=>Ve!==void 0?[Ve]:[]))},options:Z})}}var Me=e(72626);class ye extends t.PureComponent{constructor(){super(...arguments),this.state={isLoading:!0,options:[]},this.updateOptions=async()=>{const{item:Z}=this.props,{settings:ae}=Z;let de=Z.settings?.options||[];ae?.getOptions&&(de=await ae.getOptions(this.props.context)),this.state.options!==de&&this.setState({isLoading:!1,options:de})}}componentDidMount(){this.updateOptions()}componentDidUpdate(Z){const ae=Z.item?.settings,de=this.props.item?.settings;if(ae!==de)this.updateOptions();else if(de?.getOptions){const ve=Z.context?.data,Ue=this.props.context?.data;ve!==Ue&&this.updateOptions()}}render(){const{options:Z,isLoading:ae}=this.state,{value:de,onChange:ve,item:Ue}=this.props,{settings:_e}=Ue;let ze=Z.find(Ve=>Ve.value===de);return!ze&&de&&(ze={label:`${de}`,value:de}),t.createElement(V.l6,{isLoading:ae,value:ze,defaultValue:de,allowCustomValue:_e?.allowCustomValue,isClearable:_e?.isClearable,onChange:Ve=>ve(Ve?.value),options:Z})}}var Le=e(57602),We=e(42734);const Be=({value:be,onChange:Z,item:ae,id:de})=>t.createElement(We.S,{stats:be,onChange:Z,allowMultiple:!!ae.settings?.allowMultiple,defaultStat:ae.settings?.defaultStat,inputId:de});var Ye=e(29286),at=e(32264);class st extends t.PureComponent{constructor(){super(...arguments),this.state={showAdd:!1},this.onRemoveString=Z=>{const{value:ae,onChange:de}=this.props,ve=[...ae];ve.splice(Z,1),de(ve)},this.onValueChange=(Z,ae)=>{if("key"in Z&&Z.key!=="Enter")return;const{value:de,onChange:ve}=this.props,Ue=Z.currentTarget.value.trim();if(ae<0){Ue&&(Z.currentTarget.value="",ve([...de,Ue])),this.setState({showAdd:!1});return}if(!Ue)return this.onRemoveString(ae);const _e=[...de];_e[ae]=Ue,ve(_e)}}render(){const{value:Z,item:ae}=this.props,{showAdd:de}=this.state,ve=Ke(at.$.theme2),Ue=ae.settings?.placeholder||"Add text";return t.createElement("div",null,Z.map((_e,ze)=>t.createElement(m.p,{className:ve.textInput,key:`${ze}/${_e}`,defaultValue:_e||"",onBlur:Ve=>this.onValueChange(Ve,ze),onKeyDown:Ve=>this.onValueChange(Ve,ze),suffix:t.createElement(U.I,{className:ve.trashIcon,name:"trash-alt",onClick:()=>this.onRemoveString(ze)})})),de?t.createElement(m.p,{autoFocus:!0,className:ve.textInput,placeholder:Ue,defaultValue:"",onBlur:_e=>this.onValueChange(_e,-1),onKeyDown:_e=>this.onValueChange(_e,-1),suffix:t.createElement(U.I,{name:"plus-circle"})}):t.createElement(E.$n,{icon:"plus",size:"sm",variant:"secondary",onClick:()=>this.setState({showAdd:!0})},Ue))}}const Ke=(0,b.N)(be=>({textInput:(0,l.css)({marginBottom:"5px","&:hover":{border:`1px solid ${be.components.input.borderHover}`}}),trashIcon:(0,l.css)({color:be.colors.text.secondary,cursor:"pointer","&:hover":{color:be.colors.text.primary}})}));var Xe=e(2056);function He({value:be,onChange:Z,item:ae}){const de=(0,P.of)(Ge);return ae?.settings?.isClearable&&be!=null?t.createElement("div",{className:de.wrapper},t.createElement("span",{className:de.first},t.createElement(Xe.p,{value:be,onChange:Z})),t.createElement(v.K,{name:"times",onClick:()=>Z(void 0),tooltip:"Clear unit selection"})):t.createElement(Xe.p,{value:be,onChange:Z})}const Ge=be=>({wrapper:(0,l.css)({width:"100%",display:"flex",flexDirection:"row",alignItems:"center"}),first:(0,l.css)({marginRight:be.spacing(1),flexGrow:2})}),xe=()=>{const be={id:"number",name:"Number",description:"Allows numeric values input",editor:Me.w},Z={id:"slider",name:"Slider",description:"Allows numeric values input",editor:Le.G},ae={id:"text",name:"Text",description:"Allows string values input",editor:Ye.g},de={id:"strings",name:"String array",description:"An array of strings",editor:st},ve={id:"boolean",name:"Boolean",description:"Allows boolean values input",editor(zt){const{id:_t,...rt}=zt;return t.createElement(g.d,{...rt,onChange:It=>zt.onChange(It.currentTarget.checked)})}},Ue={id:"select",name:"Select",description:"Allows option selection",editor:ye},_e={id:"multi-select",name:"Multi select",description:"Allows for multiple option selection",editor:me},ze={id:"radio",name:"Radio",description:"Allows option selection",editor(zt){return t.createElement(u.z,{...zt,options:zt.item.settings?.options})}},Ve={id:"unit",name:"Unit",description:"Allows unit input",editor:He},Ne={id:"color",name:"Color",description:"Allows color selection",editor(zt){return t.createElement(ue.a,{value:zt.value,onChange:zt.onChange,settings:zt.item.settings,details:!0})}},ot={id:"fieldColor",name:"Field Color",description:"Field color selection",editor:De},nt={id:"links",name:"Links",description:"Allows defining data links",editor:Re},pt={id:"stats-picker",name:"Stats Picker",editor:Be,description:""},mt={id:"timezone",name:"Time zone",description:"Time zone selection",editor:c.U},gt={id:"field-name",name:"Field name",description:"Allows selecting a field name from a data frame",editor:i.O};return[ae,be,Z,ve,ze,Ue,Ve,nt,pt,de,mt,ot,Ne,_e,gt,{id:"dashboard-uid",name:"Dashboard",description:"Select dashboard",editor:oe},{id:"mappings",name:"Mappings",description:"Allows defining value mappings",editor:ne},{id:"thresholds",name:"Thresholds",description:"Allows defining thresholds",editor:S}]},$e=()=>{const be=["Standard options"],Z={id:"displayName",path:"displayName",name:"Display name",description:"Change the field or series name",editor:n.D.get("text").editor,override:n.D.get("text").editor,process:o.AM,settings:{placeholder:"none",expandTemplateVars:!0},shouldApply:()=>!0,category:be},ae={id:"unit",path:"unit",name:"Unit",description:"",editor:n.D.get("unit").editor,override:n.D.get("unit").editor,process:o.OU,settings:{placeholder:"none"},shouldApply:()=>!0,category:be},de={id:"fieldMinMax",path:"fieldMinMax",name:"Field min/max",description:"Calculate min max per field",editor:n.D.get("boolean").editor,override:n.D.get("boolean").editor,process:o.FM,shouldApply:mt=>mt.type===s.PU.number,showIf:mt=>mt.min===void 0||mt.max===void 0,category:be},ve={id:"min",path:"min",name:"Min",description:"Leave empty to calculate based on all values",editor:n.D.get("number").editor,override:n.D.get("number").editor,process:o.m0,settings:{placeholder:"auto"},shouldApply:mt=>mt.type===s.PU.number,category:be},Ue={id:"max",path:"max",name:"Max",description:"Leave empty to calculate based on all values",editor:n.D.get("number").editor,override:n.D.get("number").editor,process:o.m0,settings:{placeholder:"auto"},shouldApply:mt=>mt.type===s.PU.number,category:be},_e={id:"decimals",path:"decimals",name:"Decimals",editor:n.D.get("number").editor,override:n.D.get("number").editor,process:o.m0,settings:{placeholder:"auto",min:0,max:15,integer:!0},shouldApply:mt=>mt.type===s.PU.number,category:be},ze={id:"noValue",path:"noValue",name:"No value",description:"What to show when there is no value",editor:n.D.get("text").editor,override:n.D.get("text").editor,process:o.OU,settings:{placeholder:"-"},shouldApply:()=>!0,category:be},Ve={id:"links",path:"links",name:"Data links",editor:n.D.get("links").editor,override:n.D.get("links").editor,process:o.Ch,settings:{placeholder:"-"},shouldApply:()=>!0,category:["Data links"],getItemsCount:mt=>mt?mt.length:0},Ne={id:"color",path:"color",name:"Color scheme",editor:n.D.get("fieldColor").editor,override:n.D.get("fieldColor").editor,process:o.hS,shouldApply:()=>!0,settings:{byValueSupport:!0,preferThresholdsMode:!0},category:be},ot={id:"mappings",path:"mappings",name:"Value mappings",description:"Modify the display text based on input value",editor:n.D.get("mappings").editor,override:n.D.get("mappings").editor,process:o.xT,settings:{},defaultValue:[],shouldApply:mt=>mt.type!==s.PU.time,category:["Value mappings"],getItemsCount:mt=>mt?mt.length:0},nt={id:"thresholds",path:"thresholds",name:"Thresholds",editor:n.D.get("thresholds").editor,override:n.D.get("thresholds").editor,process:o.N7,settings:{},defaultValue:{mode:r.O.Absolute,steps:[{value:-1/0,color:"green"},{value:80,color:"red"}]},shouldApply:()=>!0,category:["Thresholds"],getItemsCount:mt=>mt?mt.steps.length:0},pt={id:"filterable",path:"filterable",name:"Ad-hoc filterable",hideFromDefaults:!0,editor:n.D.get("boolean").editor,override:n.D.get("boolean").editor,process:o.FM,shouldApply:()=>!0,settings:{},category:be};return[ae,ve,Ue,de,_e,Z,Ne,ze,Ve,ot,nt,pt]}},57602:(Q,A,e)=>{"use strict";e.d(A,{G:()=>c});var t=e(32196),n=e(94659),o=e(9821),s=e(96540),r=e(40845),g=e(24849),u=e(60188);const c=({value:f,onChange:d,item:h})=>{const p=(0,s.useRef)(null),{settings:m}=h,a=m?.min||0,v=m?.max||100,E=m?.step,D=m?.marks||{[a]:a,[v]:v},b=m?.included,C=m?.ariaLabelForHandle,y=75,M=!0,T=(0,r.$j)(),[I,x]=(0,s.useState)(f??a),[S,O]=(0,s.useState)(y);(0,s.useEffect)(()=>{f!=null&&f!==I&&x(f)},[f,I]),(0,s.useEffect)(()=>{const H=getComputedStyle(p.current),w=H.getPropertyValue("font-weight")||"normal",N=H.getPropertyValue("font-size")||"16px",V=H.getPropertyValue("font-family")||"Arial",G="0",_=4,K=8,j=Math.max((v+(E||0)).toString().length,(v-(E||0)).toString().length)+_,k=G.repeat(j),Y=i(k,`${w} ${N} ${V}`);Y&&O(Y+K*2)},[v,E]);const P=(0,s.useCallback)(H=>{const w=typeof H=="number"?H:H[0];x(w),d&&d(w)},[x,d]),L=(0,s.useCallback)(H=>{let w=H;(Number.isNaN(w)||!w)&&(w=0),x(w),d&&d(w)},[d]),U=(0,g.$)(T,M,!!D),R=l(T,S),B=M?[]:[U.sliderInputVertical];return s.createElement("div",{className:(0,t.cx)(U.container,U.slider)},s.createElement(n.Global,{styles:U.slider}),s.createElement("div",{className:(0,t.cx)(U.sliderInput,...B)},s.createElement(o.A,{min:a,max:v,step:E,defaultValue:f,value:I,onChange:P,vertical:!M,reverse:!1,ariaLabelForHandle:C,marks:D,included:b}),s.createElement("span",{className:R.numberInputWrapper,ref:p},s.createElement(u.Q,{value:I,onChange:L,max:v,min:a,step:E}))))};function i(f,d){const p=document.createElement("canvas").getContext("2d");return p?(p.font=d,p.measureText(f).width):null}const l=(f,d)=>({numberInputWrapper:(0,t.css)({marginLeft:f.spacing(3),maxHeight:"32px",maxWidth:d,minWidth:d,overflow:"visible",width:"100%"})})},29286:(Q,A,e)=>{"use strict";e.d(A,{g:()=>s});var t=e(96540),n=e(21744),o=e(10354);const s=({value:r,onChange:g,item:u,suffix:c})=>{const i=u.settings?.useTextarea?n.f:o.p,l=(0,t.useCallback)(f=>{let d=r??"";"key"in f?f.key==="Enter"&&!u.settings?.useTextarea&&(d=f.currentTarget.value.trim()):d=f.currentTarget.value.trim(),d!==r&&g(d===""?void 0:d)},[r,u.settings?.useTextarea,g]);return t.createElement(i,{placeholder:u.settings?.placeholder,defaultValue:r||"",rows:u.settings?.useTextarea&&u.settings.rows||5,onBlur:l,onKeyDown:l,suffix:c})}},36830:(Q,A,e)=>{"use strict";e.d(A,{Y:()=>L});var t=e(32196),n=e(96540),o=e(64388),s=e(40845),r=e(40276),g=e(76888),u=e(39419);const c=({isLoading:R,children:B,className:H})=>{let w=H?n.createElement("div",{className:H},B):B;return n.createElement(n.Fragment,null,R?n.createElement(u.A,null):w)};var i=e(13773),l=e(17172),f=e(94753),d=e(29158),h=e(88575),p=e(10354);const m=({value:R,onEdit:B})=>{const H=(0,s.of)(a),[w,N]=(0,n.useState)(R),[V,G]=(0,n.useState)(!1),[_,K]=(0,n.useState)(!1),[j,k]=(0,n.useState)();(0,n.useEffect)(()=>{N(R)},[R]);const Y=(0,n.useCallback)(async ee=>{const re=ee.currentTarget.value;if(!re)k("Please enter a title");else if(re===R)k(void 0),G(!1);else{K(!0);try{await B(re),k(void 0),G(!1)}catch(J){(0,l.NF)(J)?k(J.data.message):J instanceof Error&&k(J.message)}K(!1)}},[B,R]);return V?n.createElement("div",{className:H.inputContainer},n.createElement(h.D,{className:H.field,loading:_,invalid:!!j,error:j},n.createElement(p.p,{className:H.input,defaultValue:w,onKeyDown:ee=>{ee.key==="Enter"&&Y(ee)},autoFocus:!0,onBlur:Y,onChange:ee=>N(ee.currentTarget.value),onFocus:()=>G(!0)}))):n.createElement("div",{className:H.textContainer},n.createElement("div",{className:H.textWrapper},n.createElement(f.E,{element:"h1",truncate:!0},w),n.createElement(d.K,{name:"pen",size:"lg",tooltip:"Edit title",onClick:()=>G(!0)})))};m.displayName="EditableTitle";const a=R=>({textContainer:(0,t.css)({minWidth:0}),field:(0,t.css)({flex:1,left:`calc(-${R.spacing(1)} - 1px)`,position:"relative",marginBottom:0}),input:(0,t.css)({input:{...R.typography.h1}}),inputContainer:(0,t.css)({display:"flex",flex:1}),textWrapper:(0,t.css)({alignItems:"center",display:"flex",gap:R.spacing(1)})});function v({navItem:R,renderTitle:B,actions:H,info:w,subTitle:N,onEditTitle:V}){const G=(0,s.of)(E),_=N??R.subTitle,K=V?n.createElement(m,{value:R.text,onEdit:V}):n.createElement("div",{className:G.title},R.img&&n.createElement("img",{className:G.img,src:R.img,alt:`logo for ${R.text}`}),B?B(R.text):n.createElement("h1",null,R.text));return n.createElement("div",{className:G.pageHeader},n.createElement("div",{className:G.topRow},n.createElement("div",{className:G.titleInfoContainer},K,w&&n.createElement(i.Q,{info:w})),n.createElement("div",{className:G.actions},H)),_&&n.createElement("div",{className:G.subTitle},_))}const E=R=>({topRow:(0,t.css)({alignItems:"flex-start",display:"flex",flexDirection:"row",flexWrap:"wrap",gap:R.spacing(1,3)}),title:(0,t.css)({display:"flex",flexDirection:"row",maxWidth:"100%",h1:{display:"flex",marginBottom:0}}),actions:(0,t.css)({display:"flex",flexDirection:"row",gap:R.spacing(1)}),titleInfoContainer:(0,t.css)({display:"flex",label:"title-info-container",flex:1,flexWrap:"wrap",gap:R.spacing(1,4),justifyContent:"space-between",maxWidth:"100%",minWidth:"200px"}),pageHeader:(0,t.css)({label:"page-header",display:"flex",flexDirection:"column",gap:R.spacing(1),marginBottom:R.spacing(2)}),subTitle:(0,t.css)({position:"relative",color:R.colors.text.secondary}),img:(0,t.css)({width:"32px",height:"32px",marginRight:R.spacing(2)})});var D=e(63021),b=e(8984),C=e(40675);function y({navItem:R}){const B=(0,s.of)(M);return n.createElement("div",{className:B.tabsWrapper},n.createElement(D.U,null,R.children.map((H,w)=>{const N=H.icon?(0,b.toIconName)(H.icon):void 0;return!H.hideFromTabs&&n.createElement(C.o,{label:H.text,active:H.active,key:`${H.url}-${w}`,icon:N,counter:H.tabCounter,href:H.url,suffix:H.tabSuffix,onChangeTab:H.onClick})})))}const M=R=>({tabsWrapper:(0,t.css)({paddingBottom:R.spacing(3)})});var T=e(77109),I=e(28215),x=e(80348),S=e(19361),O=e(3984);function P(R,B){const H=(0,x.useSelector)(w=>w.navIndex)?.[I.Id];(0,n.useEffect)(()=>{const w=(R?.node!==R?.main?R?.node:R?.main)??{text:"Grafana"},N=(0,O.Z)(w,B,H).map(V=>V.text).reverse();N[N.length-1]=S.M.AppTitle,document.title=N.join(" - ")},[H,R,B])}const L=({navId:R,navModel:B,pageNav:H,renderTitle:w,onEditTitle:N,actions:V,subTitle:G,children:_,className:K,info:j,layout:k=o.k.Standard,scrollTop:Y,scrollRef:ee,...re})=>{const J=(0,s.of)(U),ne=(0,T.i)(R,B),{chrome:q}=(0,g.Il)();P(ne,H);const te=H??ne?.node;return(0,n.useLayoutEffect)(()=>{ne&&q.update({sectionNav:ne,pageNav:H,layout:k})},[ne,H,q,k]),n.createElement("div",{className:(0,t.cx)(J.wrapper,K),...re},k===o.k.Standard&&n.createElement(r.E,{autoHeightMin:"100%",scrollTop:Y,scrollRefCallback:ee},n.createElement("div",{className:J.pageInner},te&&n.createElement(v,{actions:V,onEditTitle:N,navItem:te,renderTitle:w,info:j,subTitle:G}),H&&H.children&&n.createElement(y,{navItem:H}),n.createElement("div",{className:J.pageContent},_))),k===o.k.Canvas&&n.createElement(r.E,{autoHeightMin:"100%",scrollTop:Y,scrollRefCallback:ee},n.createElement("div",{className:J.canvasContent},_)),k===o.k.Custom&&_)};L.Contents=c;const U=R=>({wrapper:(0,t.css)({label:"page-wrapper",height:"100%",display:"flex",flex:"1 1 0",flexDirection:"column",minHeight:0}),pageContent:(0,t.css)({label:"page-content",flexGrow:1}),pageInner:(0,t.css)({label:"page-inner",padding:R.spacing(2),borderBottom:"none",background:R.colors.background.primary,display:"flex",flexDirection:"column",flexGrow:1,margin:R.spacing(0,0,0,0),[R.breakpoints.up("md")]:{padding:R.spacing(4)}}),canvasContent:(0,t.css)({label:"canvas-content",display:"flex",flexDirection:"column",padding:R.spacing(2),flexBasis:"100%",flexGrow:1})})},77109:(Q,A,e)=>{"use strict";e.d(A,{i:()=>r});var t=e(1081),n=e(17422),o=e(99140),s=e(80348);function r(u,c){if(c)return c;if(u&&o.M_)return(0,s.useSelector)((0,t.Mz)(g,i=>(0,n.tc)(i,u??"home")))}function g(u){return u.navIndex}},13773:(Q,A,e)=>{"use strict";e.d(A,{Q:()=>s});var t=e(32196),n=e(96540),o=e(40845);function s({info:g}){const u=(0,o.of)(r);return n.createElement("div",{className:u.container},g.map((c,i)=>n.createElement(n.Fragment,{key:i},n.createElement("div",{className:u.infoItem},n.createElement("div",{className:u.label},c.label),c.value),i+1({container:(0,t.css)({display:"flex",flexDirection:"row",gap:g.spacing(1.5),overflow:"auto"}),infoItem:(0,t.css)({...g.typography.bodySmall,display:"flex",flexDirection:"column",gap:g.spacing(.5)}),label:(0,t.css)({color:g.colors.text.secondary}),separator:(0,t.css)({borderLeft:`1px solid ${g.colors.border.weak}`})})},39419:(Q,A,e)=>{"use strict";e.d(A,{A:()=>s});var t=e(96540),n=e(39558);const s=({pageName:r=""})=>{const g=`Loading ${r}...`;return t.createElement("div",{className:"page-loader-wrapper"},t.createElement(n._,{text:g}))}},7392:(Q,A,e)=>{"use strict";e.d(A,{L:()=>s});var t=e(32196),n=e(96540),o=e(40845);function s({entity:g="Page"}){const u=(0,o.of)(r),c=(0,o.$j)();return n.createElement("div",{className:u.container},n.createElement("h1",null,g," not found"),n.createElement("div",{className:u.subtitle},"We're looking but can't seem to find this ",g.toLowerCase(),". Try returning"," ",n.createElement("a",{href:"/",className:"external-link"},"home")," ","or seeking help on the"," ",n.createElement("a",{href:"https://community.grafana.com",target:"_blank",rel:"noreferrer",className:"external-link"},"community site.")),n.createElement("div",{className:u.grot},n.createElement("img",{src:`public/img/grot-404-${c.isDark?"dark":"light"}.svg`,width:"100%",alt:"grot"})))}function r(g){return{container:(0,t.css)({display:"flex",flexDirection:"column",padding:g.spacing(8,2,2,2),h1:{textAlign:"center"}}),subtitle:(0,t.css)({color:g.colors.text.secondary,fontSize:g.typography.h5.fontSize,padding:g.spacing(2,0),textAlign:"center"}),grot:(0,t.css)({maxWidth:"450px",paddingTop:g.spacing(8),margin:"0 auto"})}}},78361:(Q,A,e)=>{"use strict";e.d(A,{s:()=>r});var t=e(96540),n=e(13544),o=e(10354),s=e(29158);const r=t.forwardRef((g,u)=>{const[c,i]=(0,t.useState)(!1);return t.createElement(o.p,{...g,type:c?"text":"password","data-testid":n.Tp.pages.Login.password,ref:u,suffix:t.createElement(s.K,{name:c?"eye-slash":"eye","aria-controls":g.id,role:"switch","aria-checked":c,onClick:()=>{i(!c)},tooltip:c?"Hide password":"Show password"})})});r.displayName="PasswordField"},22214:(Q,A,e)=>{"use strict";e.d(A,{j:()=>r});var t=e(32196),n=e(96540),o=e(36663),s=e(40845);const r=n.memo(n.forwardRef(({className:c,children:i,markdown:l,styleOverrides:f,onRemove:d,...h},p)=>{const m=(0,s.of)(a=>u(a,f?.borderTop));return n.createElement("div",{className:(0,t.cx)(m.wrapper,c),...h,ref:p},l&&g(l),i)}));function g(c){const i=(0,o.G)(c);return n.createElement("div",{className:"markdown-html",dangerouslySetInnerHTML:{__html:i}})}r.displayName="OperationRowHelp";const u=(c,i)=>{const l=c.shape.radius.default,f=c.colors.background.secondary;return{wrapper:(0,t.css)`
padding: ${c.spacing(2)};
border: 2px solid ${f};
border-top: ${i?i+f:"none"};
border-radius: 0 0 ${l} ${l};
position: relative;
top: -4px;
`}}},10343:(Q,A,e)=>{"use strict";e.d(A,{A:()=>c,q:()=>u});var t=e(32196),n=e(96540),o=e(13544),s=e(40845),r=e(29158);function g(l){const f=(0,s.of)(i);return n.createElement("div",{className:(0,t.cx)(f.icon,"active"in l&&l.active&&f.active)},n.createElement(r.K,{name:l.icon,tooltip:l.title,className:f.icon,disabled:!!l.disabled,onClick:l.onClick,type:"button","data-testid":l.dataTestId??o.Tp.components.QueryEditorRow.actionButton(l.title),..."active"in l&&{"aria-pressed":l.active}}))}function u(l){return n.createElement(g,{...l})}const c=l=>n.createElement(g,{...l}),i=l=>({icon:(0,t.css)({display:"flex",position:"relative",color:l.colors.text.secondary}),active:(0,t.css)({"&:before":{display:"block",content:'" "',position:"absolute",left:-1,right:2,height:3,borderRadius:l.shape.radius.default,bottom:-8,backgroundImage:l.colors.gradients.brandHorizontal}})})},7788:(Q,A,e)=>{"use strict";e.d(A,{u:()=>p});var t=e(32196),n=e(96540),o=e(75494),s=e(22589),r=e(14110),g=e(40845),u=e(67892),c=e(29158),i=e(67061),l=e(14578),f=e(44836);const d=({actionsElement:a,disabled:v,draggable:E,collapsable:D=!0,dragHandleProps:b,headerElement:C,isContentVisible:y,onRowToggle:M,reportDragMousePosition:T,title:I,id:x,expanderMessages:S})=>{const O=(0,g.of)(h);let P=y?(0,f.t)("query-operation.header.collapse-row","Collapse query row"):(0,f.t)("query-operation.header.expand-row","Expand query row");S!==void 0&&y?P=S.close:S!==void 0&&(P=S?.open);const L=(0,f.t)("query-operation.header.drag-and-drop","Drag and drop to reorder");return n.createElement("div",{className:O.header},n.createElement("div",{className:O.column},D&&n.createElement(c.K,{name:y?"angle-down":"angle-right",tooltip:P,className:O.collapseIcon,onClick:M,"aria-expanded":y,"aria-controls":x}),I&&n.createElement("div",{className:O.titleWrapper,onClick:M,"aria-label":"Query operation row title"},n.createElement("div",{className:(0,t.cx)(O.title,v&&O.disabled)},I)),C),n.createElement(i.B,{gap:1,alignItems:"center"},a,E&&n.createElement("div",{onMouseMove:T,...b},n.createElement(l.I,{title:L,name:"draggabledots",size:"lg",className:O.dragIcon}))))},h=a=>({header:(0,t.css)`
label: Header;
padding: ${a.spacing(.5,.5)};
border-radius: ${a.shape.radius.default};
background: ${a.colors.background.secondary};
min-height: ${a.spacing(4)};
display: grid;
grid-template-columns: minmax(100px, max-content) min-content;
align-items: center;
justify-content: space-between;
white-space: nowrap;
&:focus {
outline: none;
}
`,column:(0,t.css)`
label: Column;
display: flex;
align-items: center;
`,dragIcon:(0,t.css)`
cursor: grab;
color: ${a.colors.text.disabled};
margin: ${a.spacing(0,.5)};
&:hover {
color: ${a.colors.text};
}
`,collapseIcon:(0,t.css)`
margin-left: ${a.spacing(.5)};
color: ${a.colors.text.disabled};
}
`,titleWrapper:(0,t.css)`
display: flex;
align-items: center;
flex-grow: 1;
cursor: pointer;
overflow: hidden;
margin-right: ${a.spacing(.5)};
`,title:(0,t.css)`
font-weight: ${a.typography.fontWeightBold};
color: ${a.colors.text.link};
margin-left: ${a.spacing(.5)};
overflow: hidden;
text-overflow: ellipsis;
`,disabled:(0,t.css)`
color: ${a.colors.text.disabled};
`});d.displayName="QueryOperationRowHeader";function p({children:a,actions:v,title:E,headerElement:D,onClose:b,onOpen:C,isOpen:y,disabled:M,draggable:T,collapsable:I,index:x,id:S,expanderMessages:O}){const[P,L]=(0,n.useState)(y!==void 0?y:!0),U=(0,g.of)(m),R=(0,n.useCallback)(()=>{L(!P)},[P,L]);(0,n.useEffect)(()=>{typeof y=="boolean"&&L(y)},[y]);const B=(0,n.useCallback)(V=>{if(V.defaultPrevented){const G=V.currentTarget.getBoundingClientRect(),_=V.clientX-G.left,K=V.clientY-G.top;(0,r.rR)("query_row_reorder_drag_position",{x:_/G.width,y:K/G.height,width:G.width,height:G.height})}},[]);(0,s.A)(()=>{P?C&&C():b&&b()},[P]);const H={isOpen:P,onOpen:()=>{L(!0)},onClose:()=>{L(!1)}},w=v&&u.renderOrCallToRender(v,H),N=D&&u.renderOrCallToRender(D,H);return T?n.createElement(o.sx,{draggableId:S,index:x},V=>n.createElement(n.Fragment,null,n.createElement("div",{ref:V.innerRef,className:U.wrapper,...V.draggableProps},n.createElement("div",null,n.createElement(d,{id:S,actionsElement:w,disabled:M,draggable:!0,collapsable:I,dragHandleProps:V.dragHandleProps,headerElement:N,isContentVisible:P,onRowToggle:R,reportDragMousePosition:B,title:E,expanderMessages:O})),P&&n.createElement("div",{className:U.content},a)))):n.createElement("div",{className:U.wrapper},n.createElement(d,{id:S,actionsElement:w,disabled:M,draggable:!1,collapsable:I,headerElement:N,isContentVisible:P,onRowToggle:R,reportDragMousePosition:B,title:E,expanderMessages:O}),P&&n.createElement("div",{className:U.content},a))}const m=a=>({wrapper:(0,t.css)`
margin-bottom: ${a.spacing(2)};
`,content:(0,t.css)`
margin-top: ${a.spacing(.5)};
margin-left: ${a.spacing(3)};
`});p.displayName="QueryOperationRow"},37425:(Q,A,e)=>{"use strict";e.d(A,{n:()=>De});var t=e(96540),n=e(40845),o=e(8866),s=e(17464),r=e(32196),g=e(62930),u=e(14578),c=e(56034),i=e(10354),l=e(87266),f=e(16797),d=e(88824);const h=(0,t.forwardRef)(({children:pe,iconName:le},Te)=>{const Ee=(0,n.of)(p);return t.createElement("div",{className:Ee.container,ref:Te},le&&t.createElement(u.I,{name:le,size:"xs"}),pe)});h.displayName="ValueContainer";const p=pe=>{const{prefix:le}=(0,i.n)({theme:pe}),{multiValueContainer:Te}=(0,d.J)(pe);return{container:(0,r.cx)(le,Te,(0,r.css)`
position: relative;
padding: ${pe.spacing(.5,1,.5,1)};
svg {
margin-right: ${pe.spacing(.5)};
}
`)}},m=360,a=300,v=320,E=360,D=320,b=360,C=E+b,y=pe=>pe.stopPropagation(),M=({appliedRoles:pe,basicRole:le,disabled:Te,isFocused:Ee,query:Re,showBasicRole:me,width:Me,isLoading:ye,onOpen:Le,onClose:We,onQueryChange:Be,...Ye})=>{const at=(0,n.of)(I,!1,!!Ee,!!Te,!1,Me),st=(0,t.useRef)(null);(0,t.useEffect)(()=>{Ee&&st.current?.focus()});const Ke=He=>{const Ge=He.target?.value;Be(Ge)},Xe=me&&le!=="None";return Ee?t.createElement("div",{className:at.wrapper},Xe&&t.createElement(h,null,le),pe.map(He=>t.createElement(h,{key:He.uid},He.group+":"+(He.displayName||He.name))),!Te&&t.createElement("input",{...Ye,className:at.input,ref:st,onMouseDown:y,onChange:Ke,"data-testid":"role-picker-input",placeholder:Ee?"Select role":"",value:Re}),t.createElement("div",{className:at.suffix},t.createElement(u.I,{name:"angle-up",className:at.dropdownIndicator,onMouseDown:We}))):t.createElement("div",{className:(0,r.cx)(at.wrapper,at.selectedRoles),onMouseDown:Le},Xe&&t.createElement(h,null,le),t.createElement(T,{appliedRoles:pe,numberOfRoles:pe.length,showBuiltInRole:Xe}),ye&&t.createElement("div",{className:at.spinner},t.createElement(g.y,{size:16,inline:!0})))};M.displayName="RolePickerInput";const T=({showBuiltInRole:pe,numberOfRoles:le,appliedRoles:Te})=>{const Ee=(0,n.of)(Re=>x(Re));return t.createElement(t.Fragment,null,le?t.createElement(c.m,{content:t.createElement("div",{className:Ee.tooltip},Te?.map(Re=>t.createElement("p",{key:Re.uid},Re.group+":"+(Re.displayName||Re.name))))},t.createElement(h,null,`${pe?"+":""}${le} role${le>1?"s":""}`)):!pe&&t.createElement(h,null,"No roles assigned"))},I=(pe,le,Te,Ee,Re,me)=>{const Me=(0,i.n)({theme:pe,invalid:le});return{wrapper:(0,r.cx)(Me.wrapper,(0,l.Xb)(pe,le),Te&&(0,r.css)`
${f.focusCss(pe.v1)}
`,Ee&&Me.inputDisabled,(0,r.css)({minWidth:me||m+"px",width:me,minHeight:"32px",height:"auto",flexDirection:"row",paddingRight:pe.spacing(1),maxWidth:"100%",alignItems:"center",display:"flex",flexWrap:"wrap",justifyContent:"flex-start",position:"relative",boxSizing:"border-box",cursor:"default"}),Re&&(0,r.css)`
padding-left: 0;
`),input:(0,r.cx)((0,l.Xb)(pe,le),(0,r.css)`
max-width: 120px;
border: none;
cursor: ${Te?"default":"pointer"};
`),suffix:Me.suffix,dropdownIndicator:(0,r.css)`
cursor: pointer;
`,selectedRoles:(0,r.css)`
display: flex;
align-items: center;
cursor: ${Ee?"not-allowed":"pointer"};
`,tooltip:(0,r.css)`
p {
margin-bottom: ${pe.spacing(.5)};
}
`,spinner:(0,r.css)({display:"flex",flexGrow:1,justifyContent:"flex-end"})}},x=pe=>({tooltip:(0,r.css)`
p {
margin-bottom: ${pe.spacing(.5)};
}
`});var S=e(72109),O=e(40276),P=e(66864),L=e(55852),U=e(5173),R=e(80348);const B=pe=>({hideScrollBar:(0,r.css)({".scrollbar-view":{"&::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none"}}),menuWrapper:(0,r.css)({display:"flex",maxHeight:"650px",position:"absolute",zIndex:pe.zIndex.dropdown,overflow:"hidden",minWidth:"auto"}),menu:(0,r.css)({minWidth:`${v}px`,maxWidth:`${E}px`,"& > div":{paddingTop:pe.spacing(1)}}),menuLeft:(0,r.css)({flexDirection:"row-reverse"}),subMenu:(0,r.css)({height:"100%",minWidth:`${D}px`,maxWidth:`${b}px`,display:"flex",flexDirection:"column",borderLeft:`1px solid ${pe.components.input.borderColor}`,"& > div":{paddingTop:pe.spacing(1)}}),subMenuLeft:(0,r.css)({borderRight:`1px solid ${pe.components.input.borderColor}`,borderLeft:"unset"}),groupHeader:(0,r.css)({padding:pe.spacing(0,4.5),display:"flex",alignItems:"center",color:pe.colors.text.primary,fontWeight:pe.typography.fontWeightBold}),container:(0,r.css)({padding:pe.spacing(1),border:`1px ${pe.colors.border.weak} solid`,borderRadius:pe.shape.radius.default,backgroundColor:pe.colors.background.primary,zIndex:pe.zIndex.modal}),menuSection:(0,r.css)({marginBottom:pe.spacing(2)}),menuOptionCheckbox:(0,r.css)({display:"flex",margin:pe.spacing(0,1,0,.25)}),menuButtonRow:(0,r.css)({backgroundColor:pe.colors.background.primary,padding:pe.spacing(1)}),menuOptionBody:(0,r.css)({fontWeight:pe.typography.fontWeightRegular,padding:pe.spacing(0,1.5,0,0)}),menuOptionDisabled:(0,r.css)({color:pe.colors.text.disabled,cursor:"not-allowed"}),menuOptionExpand:(0,r.css)({position:"absolute",right:pe.spacing(1.25),color:pe.colors.text.disabled,"&:after":{content:'">"'}}),menuOptionInfoSign:(0,r.css)({color:pe.colors.text.disabled}),basicRoleSelector:(0,r.css)({margin:pe.spacing(1,1.25,1,1.5)}),subMenuPortal:(0,r.css)({height:"100%","> div":{height:"100%"}}),subMenuButtonRow:(0,r.css)({backgroundColor:pe.colors.background.primary,padding:pe.spacing(1)}),checkboxPartiallyChecked:(0,r.css)({input:{"&:checked + span":{"&:after":{borderWidth:"0 3px 0px 0",transform:"rotate(90deg)"}}}}),loadingSpinner:(0,r.css)({marginLeft:pe.spacing(1)})}),H=Object.values(R.OrgRole).map(pe=>({label:pe===R.OrgRole.None?"No basic role":pe,value:pe})),w=({value:pe,onChange:le,disabled:Te,disabledMesssage:Ee,tooltipMessage:Re})=>{const me=(0,n.of)(B),Me=(0,n.$j)();return t.createElement(t.Fragment,null,t.createElement("div",{className:me.groupHeader},t.createElement("span",{style:{marginRight:Me.spacing(1)}},"Basic roles"),Te&&Ee&&t.createElement(c.m,{placement:"right-end",interactive:!0,content:t.createElement("div",null,Ee)},t.createElement(u.I,{name:"question-circle"})),!Te&&Re&&t.createElement(c.m,{placement:"right-end",interactive:!0,content:Re},t.createElement(u.I,{name:"info-circle",size:"xs"}))),t.createElement(U.a,{name:"Basic Role Selector",className:me.basicRoleSelector,options:H,value:pe,onChange:le,disabled:Te}))};var N=e(10880);const V=(0,t.memo)(t.forwardRef(({name:pe,value:le,isFocused:Te,isSelected:Ee,partiallySelected:Re,disabled:me,onChange:Me,onClick:ye,onOpenSubMenu:Le,onCloseSubMenu:We,children:Be,root:Ye},at)=>{const st=(0,n.$j)(),Ke=(0,d.J)(st),Xe=(0,n.of)(B),He=(0,r.cx)(Ke.option,Te&&Ke.optionFocused,me&&Xe.menuOptionDisabled),Ge=Z=>{me||le&&Me(le)},xe=Z=>{ye&&ye(le)},$e=()=>{Le&&Le(le)},be=()=>{We&&We()};return t.createElement("div",{onMouseEnter:$e,onMouseLeave:be},t.createElement("div",{ref:at,className:He,"aria-label":"Role picker option",onClick:xe},t.createElement(N.S,{value:Ee,className:(0,r.cx)(Xe.menuOptionCheckbox,{[Xe.checkboxPartiallyChecked]:Re}),onChange:Ge,disabled:me}),t.createElement("div",{className:(0,r.cx)(Ke.optionBody,Xe.menuOptionBody)},t.createElement("span",null,pe),t.createElement("span",{className:Xe.menuOptionExpand})),Ye&&Be&&t.createElement(s.ZL,{className:Xe.subMenuPortal,root:Ye},Be)))}));V.displayName="RoleMenuGroupOption";const G=t.forwardRef(({data:pe,isFocused:le,isSelected:Te,disabled:Ee,onChange:Re,hideDescription:me},Me)=>{const ye=(0,n.$j)(),Le=(0,d.J)(ye),We=(0,n.of)(B),Be=(0,r.cx)(Le.option,le&&Le.optionFocused,Ee&&We.menuOptionDisabled),Ye=at=>{Ee||(at.preventDefault(),at.stopPropagation(),Re(pe))};return t.createElement("div",{ref:Me,className:Be,"aria-label":"Role picker option",onClick:Ye},t.createElement(N.S,{value:Te,className:We.menuOptionCheckbox,onChange:Ye,disabled:Ee}),t.createElement("div",{className:(0,r.cx)(Le.optionBody,We.menuOptionBody)},t.createElement("span",null,pe.displayName||pe.name),!me&&pe.description&&t.createElement("div",{className:Le.optionDescription},pe.description)),pe.description&&t.createElement(c.m,{content:pe.description},t.createElement(u.I,{name:"info-circle",className:We.menuOptionInfoSign})))});G.displayName="RoleMenuOption";var _=e(3246);const K=({options:pe,selectedOptions:le,disabledOptions:Te,onSelect:Ee,onClear:Re,showOnLeft:me})=>{const Me=(0,n.$j)(),ye=(0,d.J)(Me),Le=(0,n.of)(B),We=async()=>{Re&&Re()};return t.createElement("div",{className:(0,r.cx)(Le.subMenu,{[Le.subMenuLeft]:me}),"aria-label":"Role picker submenu"},t.createElement(O.E,{autoHide:!1,autoHeightMax:`${a}px`,hideHorizontalTrack:!0},t.createElement("div",{className:ye.optionBody},pe.map((Be,Ye)=>t.createElement(G,{data:Be,key:Ye,isSelected:!!(Be.uid&&(le.find(at=>at.uid===Be.uid)||Te?.find(at=>at.uid===Be.uid))),disabled:!!(Be.uid&&Te?.find(at=>at.uid===Be.uid))||(0,_.W)(Be),onChange:Ee,hideDescription:!0})))),t.createElement("div",{className:Le.subMenuButtonRow},t.createElement(P.Gy,{justify:"flex-end"},t.createElement(L.$n,{size:"sm",fill:"text",onClick:We},"Clear"))))},j=t.forwardRef(({roles:pe,renderedName:le,showGroups:Te,optionGroups:Ee,onGroupChange:Re,groupSelected:me,groupPartiallySelected:Me,subMenuNode:ye,selectedOptions:Le,onRoleChange:We,onClearSubMenu:Be,showOnLeftSubMenu:Ye},at)=>{const[st,Ke]=(0,t.useState)(!1),[Xe,He]=(0,t.useState)(""),Ge=(0,n.$j)(),xe=(0,d.J)(Ge),$e=(0,n.of)(B),be=(0,t.useCallback)(ae=>{He(ae),Ke(!0)},[]),Z=(0,t.useCallback)(()=>{Ke(!1),He("")},[]);return t.createElement("div",null,pe.length>0&&t.createElement("div",{className:$e.menuSection},t.createElement("div",{className:$e.groupHeader},le),t.createElement("div",{className:xe.optionBody}),Te&&Ee?.length?Ee.map(ae=>t.createElement(V,{key:ae.value,name:ae.name,value:ae.value,isSelected:me(ae.value)||Me(ae.value),partiallySelected:Me(ae.value),disabled:ae.options?.every(_.W),onChange:Re,onOpenSubMenu:be,onCloseSubMenu:Z,root:ye,isFocused:st&&Xe===ae.value},st&&Xe===ae.value&&t.createElement(K,{options:ae.options,selectedOptions:Le,onSelect:We,onClear:()=>Be(Xe),showOnLeft:Ye}))):pe.map(ae=>t.createElement(G,{data:ae,key:ae.uid,isSelected:!!(ae.uid&&Le.find(de=>de.uid===ae.uid)),disabled:(0,_.W)(ae),onChange:We,hideDescription:!0}))))});j.displayName="RoleMenuGroupsSection";var k=(pe=>(pe.fixed="fixed",pe.custom="custom",pe.plugin="plugin",pe))(k||{});const Y={ldap:"LDAP",current:"Current org"},ee=t.createElement(t.Fragment,null,'You can now select the "No basic role" option and add permissions to your custom needs. You can find more information in\xA0',t.createElement(S.Y,{href:"https://grafana.com/docs/grafana/latest/administration/roles-and-permissions/#organization-roles",variant:"bodySmall",external:!0},"our documentation"),"."),re=({basicRole:pe,options:le,appliedRoles:Te,showGroups:Ee,basicRoleDisabled:Re,disabledMessage:me,showBasicRole:Me,onSelect:ye,onBasicRoleSelect:Le,onUpdate:We,updateDisabled:Be,offset:Ye,menuLeft:at,apply:st})=>{const[Ke,Xe]=(0,t.useState)(Te),[He,Ge]=(0,t.useState)(pe),[xe,$e]=(0,t.useState)({}),be=(0,t.useRef)(null),Z=(0,n.$j)(),ae=(0,d.J)(Z),de=(0,n.of)(B);(0,t.useEffect)(()=>{ye(Ke)},[Ke,ye]),(0,t.useEffect)(()=>{Le&&He&&Le(He)},[He,Le]),(0,t.useEffect)(()=>{const mt=le.filter(J).sort(ge),gt=le.filter(ne).sort(ge),Pt=le.filter(q).sort(ge),Mt={fixed:te(gt).sort((Yt,zt)=>Yt.name.localeCompare(zt.name)),custom:te(mt).sort((Yt,zt)=>Yt.name.localeCompare(zt.name)),plugin:te(Pt).sort((Yt,zt)=>Yt.name.localeCompare(zt.name))};$e({fixed:{groupType:"fixed",optionGroup:Mt.fixed,renderedName:"Fixed roles",roles:gt},custom:{groupType:"custom",optionGroup:Mt.custom,renderedName:"Custom roles",roles:mt},plugin:{groupType:"plugin",optionGroup:Mt.plugin,renderedName:"Plugin roles",roles:Pt}})},[le]);const ve=mt=>{const gt=[];for(const Pt of Ke)oe(Pt)===mt&>.push(Pt);return gt},Ue=(mt,gt)=>{const Pt=ve(gt),Mt=xe[mt]?.optionGroup.find(Yt=>Yt.value===gt);return Pt.length>0&&Pt.length>=Mt.options.length},_e=(mt,gt)=>{const Pt=ve(gt),Mt=xe[mt]?.optionGroup.find(Yt=>Yt.value===gt);return Pt.length>0&&Pt.length{Ke.find(gt=>gt.uid===mt.uid)?Xe(Ke.filter(gt=>gt.uid!==mt.uid)):Xe([...Ke,mt])},Ve=(mt,gt)=>{const Pt=xe[mt]?.optionGroup.find(Mt=>Mt.value===gt);if(Pt)if(Ue(mt,gt)||_e(mt,gt))Xe(Ke.filter(Mt=>!Pt.options.find(Yt=>Mt.uid===Yt.uid)));else{const Mt=Pt.options.filter(zt=>zt.delegatable),Yt=Ke.filter(zt=>!Pt.options.find(_t=>zt.uid===_t.uid));Xe([...Yt,...Mt])}},Ne=mt=>{Ge(mt)},ot=async()=>{Xe([])},nt=mt=>{const gt=Ke.filter(Pt=>oe(Pt)!==mt);Xe(gt)},pt=()=>{We(Ke,He)};return t.createElement("div",{className:(0,r.cx)(ae.menu,de.menuWrapper,{[de.menuLeft]:at},(0,r.css)({top:`${Ye.vertical}px`,left:at?"unset":`${Ye.horizontal}px`,right:at?`${Ye.horizontal}px`:"unset"}))},t.createElement("div",{className:de.menu,"aria-label":"Role picker menu"},t.createElement(O.E,{autoHide:!1,autoHeightMax:`${a}px`,hideHorizontalTrack:!0,hideVerticalTrack:!0,className:(0,r.cx)(de.hideScrollBar)},Me&&t.createElement("div",{className:de.menuSection},t.createElement(w,{value:He,onChange:Ne,disabled:Re,disabledMesssage:me,tooltipMessage:ee})),Object.entries(xe).map(([mt,gt])=>t.createElement(j,{key:mt,roles:gt.roles,renderedName:gt.renderedName,showGroups:Ee,optionGroups:gt.optionGroup,groupSelected:Pt=>Ue(gt.groupType,Pt),groupPartiallySelected:Pt=>_e(gt.groupType,Pt),onGroupChange:Pt=>Ve(gt.groupType,Pt),subMenuNode:be?.current,selectedOptions:Ke,onRoleChange:ze,onClearSubMenu:nt,showOnLeftSubMenu:at}))),t.createElement("div",{className:de.menuButtonRow},t.createElement(P.Gy,{justify:"flex-end"},t.createElement(L.$n,{size:"sm",fill:"text",onClick:ot,disabled:Be},"Clear all"),t.createElement(L.$n,{size:"sm",onClick:pt,disabled:Be},st?"Apply":"Update")))),t.createElement("div",{ref:be}))},J=pe=>!pe.name?.startsWith("fixed:")&&!pe.name.startsWith("plugins:"),ne=pe=>pe.name?.startsWith("fixed:"),q=pe=>pe.name?.startsWith("plugins:"),te=pe=>{const le={};return pe.forEach(Ee=>{const Re=oe(Ee),me=ue(Ee);le[Re]||(le[Re]={name:me,roles:[]}),le[Re].roles.push(Ee)}),Object.entries(le).map(([Ee,Re])=>({name:Y[Ee]||he(Re.name),value:Ee,options:Re.roles.sort(ge)}))},oe=pe=>{const le=ie(pe),Te=ue(pe);return`${le}:${Te}`},ue=pe=>pe.group||"Other",ie=pe=>{const le=pe.name.indexOf(":");return le<0?"unknown":pe.name.substring(0,le)},ge=(pe,le)=>pe.name.localeCompare(le.name),he=pe=>pe.slice(0,1).toUpperCase()+pe.slice(1),De=({basicRole:pe,appliedRoles:le,roleOptions:Te,disabled:Ee,isLoading:Re,basicRoleDisabled:me,basicRoleDisabledMessage:Me,showBasicRole:ye,onRolesChange:Le,onBasicRoleChange:We,canUpdateRoles:Be=!0,apply:Ye=!1,maxWidth:at=m,width:st})=>{const[Ke,Xe]=(0,t.useState)(!1),[He,Ge]=(0,t.useState)(le),[xe,$e]=(0,t.useState)(pe),[be,Z]=(0,t.useState)(""),[ae,de]=(0,t.useState)({vertical:0,horizontal:0}),[ve,Ue]=(0,t.useState)(!1),_e=(0,t.useRef)(null),ze=(0,n.$j)(),Ve=typeof st=="number"?ze.spacing(st):st;(0,t.useEffect)(()=>{$e(pe),Ge(le)},[le,pe,We]);const Ne=(0,t.useCallback)(()=>{const{horizontal:_t,vertical:rt,menuToLeft:It}=ot();_t&&rt&&(de({horizontal:_t,vertical:rt}),Ue(It))},[]);(0,t.useEffect)(()=>{Ke&&Ne()},[Ke,He,Ne]);const ot=()=>{const _t=_e?.current?.getBoundingClientRect();if(!_t)return{};const{bottom:rt,top:It,left:Dn,right:ft}=_t;let yt=Dn,jt=rt+10,cn=!1;return window.innerHeight-rtwindow.innerWidth&&(yt=window.innerWidth-ft,cn=!0),{horizontal:yt,vertical:jt,menuToLeft:cn}},nt=(0,t.useCallback)(_t=>{Ee||(_t.preventDefault(),_t.stopPropagation(),Ne(),Xe(!0))},[Ee,Ne]),pt=(0,t.useCallback)(()=>{Xe(!1),Z(""),Ge(le),$e(pe)},[le,pe]),mt=()=>Ke&&pt(),gt=_t=>{Z(_t||"")},Pt=_t=>{Ge(_t)},Mt=_t=>{$e(_t)},Yt=(_t,rt)=>{We&&rt&&rt!==pe&&We(rt),Be&&Le(_t),Z(""),Xe(!1)},zt=()=>{const _t=Te.map(rt=>({...rt,delegatable:Be&&rt.delegatable}));return be&&be.trim()!==""?_t.filter(rt=>rt.name?.toLowerCase().includes(be.toLowerCase())):_t};return t.createElement("div",{"data-testid":"role-picker",style:{position:"relative",maxWidth:Ve||at,width:Ve},ref:_e},t.createElement(o.N,{onClick:mt,useCapture:!1},t.createElement(M,{basicRole:xe,appliedRoles:He,query:be,onQueryChange:gt,onOpen:nt,onClose:pt,isFocused:Ke,disabled:Ee,showBasicRole:ye,width:Ve,isLoading:Re}),Ke&&t.createElement(s.ZL,null,t.createElement("div",{onClick:_t=>_t.stopPropagation()},t.createElement(re,{options:zt(),basicRole:xe,appliedRoles:le,onBasicRoleSelect:Mt,onSelect:Pt,onUpdate:Yt,showGroups:be.length===0||be.trim()==="",basicRoleDisabled:me,disabledMessage:Me,showBasicRole:ye,updateDisabled:me&&!Be,apply:Ye,offset:ae,menuLeft:ve})))))}},89062:(Q,A,e)=>{"use strict";e.d(A,{y:()=>u});var t=e(96540),n=e(41053),o=e(10096),s=e(80348),r=e(37425),g=e(85927);const u=({basicRole:c,roles:i,userId:l,orgId:f,onBasicRoleChange:d,roleOptions:h,disabled:p,basicRoleDisabled:m,basicRoleDisabledMessage:a,apply:v=!1,onApplyRoles:E,pendingRoles:D,maxWidth:b,width:C,isLoading:y})=>{const[{loading:M,value:T=i||[]},I]=(0,n.A)(async()=>{try{if(i)return i;if(v&&D?.length)return D;if(o.TP.hasPermission(s.AccessControlAction.ActionUserRolesList))return await(0,g.Xh)(l,f)}catch{console.error("Error loading options")}return[]},[f,l,D,i]);(0,t.useEffect)(()=>{f&&I()},[I,f]);const x=async O=>{v?E&&E(O,l,f):(await(0,g.eA)(O,l,f),await I())},S=o.TP.hasPermission(s.AccessControlAction.ActionUserRolesAdd)&&o.TP.hasPermission(s.AccessControlAction.ActionUserRolesRemove);return t.createElement(r.n,{appliedRoles:T,basicRole:c,onRolesChange:x,onBasicRoleChange:d,roleOptions:h,isLoading:M||y,disabled:p,basicRoleDisabled:m,basicRoleDisabledMessage:a,showBasicRole:!0,apply:v,canUpdateRoles:S,maxWidth:b,width:C})}},85927:(Q,A,e)=>{"use strict";e.d(A,{G3:()=>u,RL:()=>o,Xh:()=>s,eA:()=>r,xN:()=>g});var t=e(17172),n=e(3246);const o=async c=>{let i="/api/access-control/roles?delegatable=true";c&&(i+=`&targetOrgId=${c}`);const l=await(0,t.AI)().get(i);return!l||!l.length?[]:l.map(n.c)},s=async(c,i)=>{let l=`/api/access-control/users/${c}/roles`;i&&(l+=`?targetOrgId=${i}`);try{const f=await(0,t.AI)().get(l);return!f||!f.length?[]:f.map(n.c)}catch(f){return(0,t.NF)(f)&&(f.isHandled=!0),[]}},r=(c,i,l)=>{let f=`/api/access-control/users/${i}/roles`;l&&(f+=`?targetOrgId=${l}`);const d=c.flatMap(h=>h.uid);return(0,t.AI)().put(f,{orgId:l,roleUids:d})},g=async(c,i)=>{let l=`/api/access-control/teams/${c}/roles`;i&&(l+=`?targetOrgId=${i}`);try{const f=await(0,t.AI)().get(l);return!f||!f.length?[]:f.map(n.c)}catch(f){return(0,t.NF)(f)&&(f.isHandled=!0),[]}},u=(c,i,l)=>{let f=`/api/access-control/teams/${i}/roles`;l&&(f+=`?targetOrgId=${l}`);const d=c.flatMap(h=>h.uid);return(0,t.AI)().put(f,{orgId:l,roleUids:d})}},3246:(Q,A,e)=>{"use strict";e.d(A,{W:()=>t,c:()=>n});const t=o=>o.delegatable!==void 0&&!o.delegatable,n=o=>{const s="fixed:";if(!o.displayName&&o.name.startsWith(s)){let r="";r=o.name.replace(s,"").replace(/:/g," "),o.displayName=r}return o}},47694:(Q,A,e)=>{"use strict";e.d(A,{y:()=>l});var t=e(96540),n=e(8867),o=e(40672),s=e(62938);const r=2,g=5,u=p=>{const m=p.match(new RegExp('