@odigos/ui-kit 0.0.102 → 0.0.103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.103](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.102...ui-kit-v0.0.103) (2025-09-08)
4
+
5
+
6
+ ### Features
7
+
8
+ * update action types/interfaces ([#385](https://github.com/odigos-io/ui-kit/issues/385)) ([5d536bb](https://github.com/odigos-io/ui-kit/commit/5d536bb407009b2246d0e6db3ee35d5218ed9eb1))
9
+
3
10
  ## [0.0.102](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.101...ui-kit-v0.0.102) (2025-09-04)
4
11
 
5
12
 
@@ -1,4 +1,4 @@
1
- import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as n,K8sLogo as o,AddClusterInfoIcon as i,DeleteAttributeIcon as a,RenameAttributeIcon as r,CodeAttributesIcon as s,CustomInstrumentationIcon as l,HeadersCollectionIcon as d,PayloadCollectionIcon as c,JavaLogo as p,GoLogo as u,NodejsLogo as m,PythonLogo as h,DotnetLogo as g,CSharpLogo as x,CPlusPlusLogo as f,PhpLogo as $,RubyLogo as y,RustLogo as b,SwiftLogo as w,ElixirLogo as k,MysqlLogo as v,NginxLogo as E,PostgresLogo as S,RedisLogo as C,KafkaLogo as T,AlaudaLogo as A,AlibabaCloudLogo as D,AppDynamicsLogo as N,AxiomLogo as I,BlobStorageLogo as O,BetterStackLogo as _,BonreeLogo as z,CauselyLogo as R,ChecklyLogo as F,ChronosphereLogo as L,ClickhouseLogo as P,AwsCloudwatchLogo as M,CoralogixLogo as B,Dash0Logo as j,DatadogLogo as U,OpenTelemetryLogo as W,DynatraceLogo as V,ElasticApmLogo as H,ElasticSearchLogo as q,GoogleCloudPlatformLogo as Y,GrafanaLogo as G,GreptimeLogo as J,GroundcoverLogo as K,HoneycombLogo as X,HyperDxLogo as Q,InstanaLogo as Z,JaegerLogo as ee,KloudmateLogo as te,Last9Logo as ne,LightstepLogo as oe,LogzioLogo as ie,LokiLogo as ae,LumigoLogo as re,MiddlewareLogo as se,NewRelicLogo as le,ObserveLogo as de,OdigosLogo as ce,OneUptimeLogo as pe,OpenObserveLogo as ue,OpsVerseLogo as me,OracleLogo as he,PrometheusLogo as ge,QrynLogo as xe,GigapipeLogo as fe,QuickwitLogo as $e,AwsS3Logo as ye,SeqLogo as be,SignozLogo as we,SplunkLogo as ke,SumoLogicLogo as ve,TelemetryHubLogo as Ee,TempoLogo as Se,TingyunLogo as Ce,TraceloopLogo as Te,UptraceLogo as Ae,VictoriaMetricsLogo as De,AwsXrayLogo as Ne,NamespacesIcon as Ie,SourcesIcon as Oe,DestinationsIcon as _e,ActionsIcon as ze,RulesIcon as Re,LogsIcon as Fe,MetricsIcon as Le,TracesIcon as Pe,VmLogo as Me,CheckCircledIcon as Be,ErrorTriangleIcon as je,WarningTriangleIcon as Ue,InfoIcon as We,MinusIcon as Ve,CheckIcon as He,ListIcon as qe,CodeIcon as Ye,ExtendArrowIcon as Ge,PlusIcon as Je,CopyIcon as Ke,EditIcon as Xe,EditedIcon as Qe,SortArrowsIcon as Ze,NotebookIcon as et,XIcon as tt,EyeClosedIcon as nt,EyeOpenIcon as ot,NoDataIcon as it,CrossIcon as at,SearchIcon as rt,TrashIcon as st}from"../icons.js";import{create as lt}from"zustand";import dt,{Fragment as ct,useMemo as pt,useState as ut,useEffect as mt,useRef as ht,forwardRef as gt,useCallback as xt,memo as ft}from"react";import $t from"javascript-time-ago";import{p as yt,c as bt,s as wt,e as kt}from"./vendor-1dea551d.js";import vt,{ThemeProvider as Et,keyframes as St,useTheme as Ct,css as Tt}from"styled-components";import{Handle as At,Position as Dt,getSmoothStepPath as Nt,BaseEdge as It,EdgeLabelRenderer as Ot,ReactFlow as _t,Controls as zt}from"@xyflow/react";import Rt from"react-dom";import{Highlight as Ft,themes as Lt}from"prism-react-renderer";import{ErrorBoundary as Pt}from"react-error-boundary";import Mt from"lottie-react";const Bt=lt(e=>({activeNodeType:null,activeNodeId:null,setActiveNodeType:t=>e({activeNodeType:t}),setActiveNodeId:t=>e({activeNodeId:t})}));var jt,Ut,Wt,Vt,Ht,qt,Yt,Gt,Jt,Kt,Xt,Qt,Zt,en,tn,nn,on,an,rn,sn,ln,dn,cn,pn,un,mn,hn,gn,xn,fn,$n,yn,bn,wn,kn;!function(e){e.Pod="pod",e.Namespace="namespace"}(jt||(jt={})),function(e){e.Attributes="attributes",e.Samplers="samplers"}(Ut||(Ut={})),function(e){e.K8sAttributes="K8sAttributesResolver",e.AddClusterInfo="AddClusterInfo",e.DeleteAttributes="DeleteAttribute",e.RenameAttributes="RenameAttribute",e.PiiMasking="PiiMasking",e.ErrorSampler="ErrorSampler",e.ProbabilisticSampler="ProbabilisticSampler",e.LatencySampler="LatencySampler",e.ServiceNameSampler="ServiceNameSampler",e.SpanAttributeSampler="SpanAttributeSampler"}(Wt||(Wt={})),function(e){e.CollectContainerAttributes="collectContainerAttributes",e.CollectReplicaSetAttributes="collectReplicaSetAttributes",e.CollectWorkloadId="collectWorkloadId",e.CollectClusterId="collectClusterId",e.LabelsAttributes="labelsAttributes",e.AnnotationsAttributes="annotationsAttributes",e.ClusterAttributes="clusterAttributes",e.OverwriteExistingValues="overwriteExistingValues",e.AttributeNamesToDelete="attributeNamesToDelete",e.Renames="renames",e.PiiCategories="piiCategories",e.FallbackSamplingRatio="fallbackSamplingRatio",e.SamplingPercentage="samplingPercentage",e.EndpointsFilters="endpointsFilters",e.ServicesNameFilters="servicesNameFilters",e.AttributeFilters="attributeFilters"}(Vt||(Vt={})),function(e){e.EXISTS="exists",e.EQUALS="equals",e.NOT_EQUALS="not_equals",e.CONTAINS="contains",e.NOT_CONTAINS="not_contains",e.REGEX="regex"}(Ht||(Ht={})),function(e){e.EXISTS="exists",e.EQUALS="equals",e.NOT_EQUALS="not_equals",e.GREATER_THAN="greater_than",e.LESS_THAN="less_than",e.GREATER_THAN_OR_EQUAL="greater_than_or_equal",e.LESS_THAN_OR_EQUAL="less_than_or_equal"}(qt||(qt={})),function(e){e.EXISTS="exists",e.EQUALS="equals"}(Yt||(Yt={})),function(e){e.EXISTS="exists",e.EQUALS="equals",e.NOT_EQUALS="not_equals",e.IS_VALID_JSON="is_valid_json",e.IS_INVALID_JSON="is_invalid_json",e.JSONPATH_EXISTS="jsonpath_exists",e.KEY_EQUALS="key_equals",e.KEY_NOT_EQUALS="key_not_equals"}(Gt||(Gt={})),function(e){e.Community="community",e.Cloud="cloud",e.Onprem="onprem"}(Jt||(Jt={})),function(e){e.K8s="k8s",e.Vm="vm"}(Kt||(Kt={})),function(e){e.Cli="odigos-cli",e.Helm="helm",e.Operator="odigos-operator"}(Xt||(Xt={})),function(e){e.Go="go",e.JavaScript="javascript",e.Python="python",e.Java="java",e.DotNet="dotnet",e.CSharp="csharp",e.CPlusPlus="cplusplus",e.Php="php",e.Ruby="ruby",e.Rust="rust",e.Swift="swift",e.Elixir="elixir",e.MySql="mysql",e.Nginx="nginx",e.Postgres="postgres",e.Redis="redis",e.Kafka="kafka",e.Ignored="ignored",e.Unknown="unknown",e.Processing="processing",e.NoContainers="no containers",e.NoRunningPods="no running pods"}(Qt||(Qt={})),function(e){e.Create="Create",e.Read="Read",e.Update="Update",e.Delete="Delete"}(Zt||(Zt={})),function(e){e.Namespace="Namespace",e.Source="Source",e.Destination="Destination",e.Action="Action",e.InstrumentationRule="InstrumentationRule"}(en||(en={})),function(e){e.DataStream="DataStream"}(tn||(tn={})),function(e){e.Input="input",e.MultiInput="multiInput",e.MultiTabledInput="multiTabledInput",e.KeyValuePair="keyValuePairs",e.TextArea="textarea",e.Dropdown="dropdown",e.Checkbox="checkbox",e.Toggle="toggle"}(nn||(nn={})),function(e){e.Text="text",e.Password="password",e.Number="number"}(on||(on={})),function(e){e.Warning="warning",e.Error="error",e.Success="success",e.Info="info",e.Default="default"}(an||(an={})),function(e){e.INSTRUMENTED="Instrumented",e.INSTRUMENTING="Instrumenting",e.UNINSTRUMENTED="Uninstrumented",e.NOT_INSTRUMENTED="Not Instrumented"}(rn||(rn={})),function(e){e.Loading="loading",e.Disabled="disabled"}(sn||(sn={})),function(e){e.Ascending="asc",e.Descending="desc"}(ln||(ln={})),function(e){e.CodeAttributes="code-attributes",e.FullPayloadCollection="full-payload-collection",e.DbPayloadCollection="db-payload-collection",e.QueryOperationDetector="query-operation-detector",e.AllowConcurrentAgents="allow_concurrent_agents",e.JavaEbpfInstrumentations="java-ebpf-instrumentations",e.JavaNativeInstrumentations="java-native-instrumentations",e.SizeS="size_s",e.SizeM="size_m",e.SizeL="size_l"}(dn||(dn={})),function(e){e.VirtualDevice="VirtualDevice",e.HostPath="HostPath",e.InitContainer="InitContainer"}(cn||(cn={})),function(e){e.Loader="loader",e.PodManifest="pod-manifest",e.LoaderFallbackToPodManifest="loader-fallback-to-pod-manifest"}(pn||(pn={})),function(e){e.Header="header",e.Add="add",e.Base="base",e.Edged="edged",e.Frame="frame",e.Scroll="scroll",e.Skeleton="skeleton",e.MapItem="map-item",e.NoData="no-data"}(un||(un={})),function(e){e.Labeled="labeled"}(mn||(mn={})),function(e){e.AddRule="addRule",e.AddSource="addSource",e.AddAction="addAction",e.AddDestination="addDestination"}(hn||(hn={})),function(e){e.Alauda="alauda",e.AlibabaCloud="alibabacloud",e.AppDynamics="appdynamics",e.Axiom="axiom",e.AzureBlob="azureblob",e.BetterStack="betterstack",e.Bonree="bonree",e.Causely="causely",e.Checkly="checkly",e.Chronosphere="chronosphere",e.ClickHouse="clickhouse",e.CloudWatch="cloudwatch",e.Coralogix="coralogix",e.Dash0="dash0",e.Datadog="datadog",e.Dynamic="dynamic",e.Dynatrace="dynatrace",e.ElasticApm="elasticapm",e.ElasticSearch="elasticsearch",e.GoogleCloud="googlecloud",e.GrafanaCloudLoki="grafanacloudloki",e.GrafanaCloudPrometheus="grafanacloudprometheus",e.GrafanaCloudTempo="grafanacloudtempo",e.Greptime="greptime",e.Groundcover="groundcover",e.Honeycomb="honeycomb",e.HyperDX="hyperdx",e.Instana="instana",e.Jaeger="jaeger",e.Kafka="kafka",e.Kloudmate="kloudmate",e.Last9="last9",e.Lightstep="lightstep",e.LogzIo="logzio",e.Loki="loki",e.Lumigo="lumigo",e.Middleware="middleware",e.NewRelic="newrelic",e.Observe="observe",e.Odigos="odigos",e.OneUptime="oneuptime",e.OpenObserve="openobserve",e.Opsverse="opsverse",e.Oracle="oracle",e.OTLP="otlp",e.OTLPHttp="otlphttp",e.Prometheus="prometheus",e.Qryn="qryn",e.QrynOss="qryn-oss",e.Quickwit="quickwit",e.S3="s3",e.Seq="seq",e.Signoz="signoz",e.Splunk="splunk",e.SplunkSapm="splunksapm",e.SplunkOtlp="splunkotlp",e.SumoLogic="sumologic",e.TelemetryHub="telemetryhub",e.Tempo="tempo",e.Tingyun="tingyun",e.Traceloop="traceloop",e.Uptrace="uptrace",e.VictoriaMetrics="victoriametrics",e.VictoriaMetricsCloud="victoriametricscloud",e.XRay="xray"}(gn||(gn={})),function(e){e.CodeAttributes="CodeAttributes",e.HeadersCollection="HeadersCollection",e.PayloadCollection="PayloadCollection",e.CustomInstrumentation="CustomInstrumentation",e.UnknownType="UnknownType"}(xn||(xn={})),function(e){e.Column="column",e.FilePath="filePath",e.Function="function",e.LineNumber="lineNumber",e.Namespace="namespace",e.StackTrace="stacktrace"}(fn||(fn={})),function(e){e.HeaderKeys="headerKeys"}($n||($n={})),function(e){e.Probes="probes"}(yn||(yn={})),function(e){e.HttpRequest="httpRequest",e.HttpResponse="httpResponse",e.DbQuery="dbQuery",e.Messaging="messaging"}(bn||(bn={})),function(e){e.Logs="logs",e.Metrics="metrics",e.Traces="traces"}(wn||(wn={})),function(e){e.Deployment="Deployment",e.DaemonSet="DaemonSet",e.StatefulSet="StatefulSet",e.CronJob="CronJob"}(kn||(kn={}));const vn=s=>{const l=s?.toLowerCase(),d=l?.includes(Ut.Samplers),c=l===Ut.Attributes;return d?e:c?t:{[Wt.K8sAttributes]:o,[Wt.AddClusterInfo]:i,[Wt.DeleteAttributes]:a,[Wt.PiiMasking]:t,[Wt.RenameAttributes]:r,[Wt.ErrorSampler]:e,[Wt.ProbabilisticSampler]:e,[Wt.LatencySampler]:e,[Wt.ServiceNameSampler]:e,[Wt.SpanAttributeSampler]:e}[s]||n},En=[{label:"Attributes",icon:vn(Ut.Attributes),items:[{type:Wt.K8sAttributes,icon:vn(Wt.K8sAttributes),label:"Kubernetes Attributes",description:"Add dynamic k8s resource attributes to your data.",allowedSignals:[wn.Traces,wn.Metrics,wn.Logs],docsEndpoint:"/pipeline/actions/attributes/k8sattributes",docsDescription:"This action adds kubernetes related resource attributes to spans, metrics data points and log records."},{type:Wt.AddClusterInfo,icon:vn(Wt.AddClusterInfo),label:"Add Cluster Info",description:"Add static cluster-scoped attributes to your data.",allowedSignals:[wn.Traces,wn.Metrics,wn.Logs],docsEndpoint:"/pipeline/actions/attributes/addclusterinfo",docsDescription:"This action adds static resource attributes to spans, metrics data points and log records. It is useful to add cluster-wide attributes to all telemetry signals."},{type:Wt.DeleteAttributes,icon:vn(Wt.DeleteAttributes),label:"Delete Attribute",description:"Delete attributes from logs, metrics, and traces.",allowedSignals:[wn.Traces,wn.Metrics,wn.Logs],docsEndpoint:"/pipeline/actions/attributes/deleteattribute",docsDescription:"This action will delete the specified attributes from all telemetry signals that are specified in the signals field, regardless of the source, or any other condition."},{type:Wt.RenameAttributes,icon:vn(Wt.RenameAttributes),label:"Rename Attribute",description:"Rename attributes in logs, metrics, and traces.",allowedSignals:[wn.Traces,wn.Metrics,wn.Logs],docsEndpoint:"/pipeline/actions/attributes/renameattribute",docsDescription:"This action will rename the specified attributes from all telemetry signals that are specified in the signals field, regardless of the source, or any other condition."},{type:Wt.PiiMasking,icon:vn(Wt.PiiMasking),label:"PII Masking",description:"Mask PII data in your traces.",allowedSignals:[wn.Traces],docsEndpoint:"/pipeline/actions/attributes/piimasking",docsDescription:"This action processes a list of PII categories to be masked from the traces."}]},{label:"Samplers",icon:vn(Ut.Samplers),items:[{type:Wt.ErrorSampler,icon:vn(Ut.Samplers),label:"Error Sampler",description:"Sample errors based on percentage.",allowedSignals:[wn.Traces],docsEndpoint:"/pipeline/actions/sampling/errorsampler",docsDescription:"This action is a Global Action that supports error sampling by filtering out non-error traces."},{type:Wt.LatencySampler,icon:vn(Ut.Samplers),label:"Latency Sampler",description:"Add latency to your traces.",allowedSignals:[wn.Traces],docsEndpoint:"/pipeline/actions/sampling/latencysampler",docsDescription:"This action is an Endpoint Action that samples traces based on their duration for a specific service and endpoint (HTTP route) filter."},{type:Wt.ProbabilisticSampler,icon:vn(Ut.Samplers),label:"Probabilistic Sampler",description:"Sample traces based on percentage.",allowedSignals:[wn.Traces],docsEndpoint:"/pipeline/actions/sampling/probabilisticsampler",docsDescription:"This action supports probabilistic sampling based on a configured sampling percentage applied to the TraceID."},{type:Wt.ServiceNameSampler,icon:vn(Ut.Samplers),label:"Service Name Sampler",description:"Sample traces based on the presence of specified services within a trace.",allowedSignals:[wn.Traces],docsEndpoint:"/pipeline/actions/sampling/servicenamesampler",docsDescription:"This action supports service name sampling based on the presence of specified services within a trace."},{type:Wt.SpanAttributeSampler,icon:vn(Ut.Samplers),label:"Span Attributes Sampler",description:"Sample traces based on the presence or value of specific attributes within a trace.",allowedSignals:[wn.Traces],docsEndpoint:"/pipeline/actions/sampling/spanattributesampler",docsDescription:"This action supports service name sampling based on the presence or value of specific attributes within a trace."}]}],Sn={DETECTED:{TITLE:"Detected by Odigos",DESCRIPTION:"Odigos found these destinations in your cluster and pre-filled their details. Review and enable them to start sending data."},EXISTS:{TITLE:"Already configured",DESCRIPTION:"These are destinations that you have already configured in other data-streams and can reuse them."},MANAGED:{TITLE:"Managed",DESCRIPTION:"Effortless monitoring with scalable performance management."},SELF_HOSTED:{TITLE:"Self-hosted",DESCRIPTION:"Full control and customization for advanced application monitoring."}},Cn=e=>({[xn.CodeAttributes]:s,[xn.CustomInstrumentation]:l,[xn.HeadersCollection]:d,[xn.PayloadCollection]:c,[xn.UnknownType]:n}[e]||n),Tn=[{type:xn.CodeAttributes,icon:Cn(xn.CodeAttributes),label:"Code Attributes",description:"Collect code attributes containing payload data to traces.",docsEndpoint:"/pipeline/rules/codeattributes",docsDescription:'The "Code Attributes" Rule can be used to add code attributes containing payload data to traces.',supportedLanguages:[Qt.Go,Qt.Python]},{type:xn.CustomInstrumentation,icon:Cn(xn.CustomInstrumentation),label:"Custom Instrumentation",description:"Define custom instrumentation for specific class and method combinations.",docsEndpoint:"/pipeline/rules/custominstrumentation",docsDescription:'The "Custom Instrumentation" Rule can be used to instrument specific class and method combinations for detailed tracing.',supportedLanguages:[Qt.Java]},{type:xn.HeadersCollection,icon:Cn(xn.HeadersCollection),label:"Headers Collection",description:"Collect span attributes containing HTTP Headers data to traces.",docsEndpoint:"/pipeline/rules/headerscollection",docsDescription:'The "Headers Collection" Rule can be used to add span attributes containing HTTP Headers data to traces.',supportedLanguages:[Qt.Go,Qt.Java]},{type:xn.PayloadCollection,icon:Cn(xn.PayloadCollection),label:"Payload Collection",description:"Collect span attributes containing payload data to traces.",docsEndpoint:"/pipeline/rules/payloadcollection",docsDescription:'The "Payload Collection" Rule can be used to add span attributes containing payload data to traces.',supportedLanguages:[Qt.Go]}],An=[{id:wn.Logs,value:"Logs"},{id:wn.Metrics,value:"Metrics"},{id:wn.Traces,value:"Traces"}],Dn=e=>e.charAt(0).toUpperCase()+e.slice(1),Nn=e=>{const t=e=>e.filter(e=>"object"==typeof e&&null!==e?""!==e.key&&""!==e.value:""!==e),n=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>""!==e&&""!==t).map(([e,o])=>Array.isArray(o)?[e,t(o)]:"object"==typeof o&&null!==o?[e,n(o)]:[e,o]));return Object.entries(e).reduce((e,[o,i])=>{try{const a=JSON.parse(i);Array.isArray(a)?e[o]=JSON.stringify(t(a)):e[o]="object"==typeof a&&null!==a?JSON.stringify(n(a)):i}catch(a){"object"==typeof i&&null!==i?Array.isArray(i)?e[o]=JSON.stringify(t(i)):e[o]=JSON.stringify(n(i)):e[o]=i}return e},{})};var In;!function(e){e.SIGNALS="SIGNALS"}(In||(In={}));const On=(e,t,n)=>{if(!e||!e.length)return!0;if(1===e.length)return"true"==e[0];const[o,i,a]=e;if(o===In.SIGNALS)switch(i){case"INCLUDES":return t?.includes(a);case"EXCLUDES":return!t?.includes(a);default:return!0}const r=n.find(e=>e.name===o);if(!r)return!0;switch(i){case"===":case"==":return r.value===a;case"!==":case"!=":return r.value!==a;case">":return Number(r.value)>Number(a);case"<":return Number(r.value)<Number(a);case">=":return Number(r.value)>=Number(a);case"<=":return Number(r.value)<=Number(a);default:return!0}},_n=e=>JSON.parse(JSON.stringify(e)),zn=(e,t)=>{let n=[...e];return t.monitors?.length&&(n=n.filter(e=>!!t.monitors?.find(t=>e.spec.signals.find(e=>e.toLowerCase()===t.id)))),n},Rn=(e,t)=>{let n=[...e];return t.monitors?.length&&(n=n.filter(e=>!!t.monitors?.find(t=>e.exportedSignals[t.id]))),n},Fn=(e,t)=>t?e.filter(e=>e.dataStreamNames.includes(t)||!e.dataStreamNames.length):[],Ln=(e,t)=>{let n=[...e];return t.namespaces?.length&&(n=n.filter(({namespace:e})=>!!t.namespaces?.find(({id:t})=>t===e))),t.kinds?.length&&(n=n.filter(({kind:e})=>!!t.kinds?.find(({id:t})=>t===e))),t.languages?.length&&(n=n.filter(({containers:e})=>!!t.languages?.find(({id:t})=>!!e?.find(({language:e})=>t===e)))),t.conditions?.length&&(n=n.filter(({conditions:e})=>!!t.conditions?.find(({id:t})=>!!e?.find(({type:e,reason:n})=>t===`${e}#${n}`)))),t.onlyErrors&&(n=n.filter(e=>!!e.conditions?.find(e=>e.status===an.Error))),t.errors?.length&&(n=n.filter(e=>!!t.errors?.find(t=>!!e.conditions?.find(e=>e.message===t.id)))),n},Pn=(e,t)=>t?e.filter(e=>e.dataStreamNames.includes(t)||t===Io&&!e.dataStreamNames.length):[],Mn=(e,t="",n={})=>{for(const o in e)if(e.hasOwnProperty(o)){const i=e[o],a=t?`${t}.${o}`:o;null===i||"object"!=typeof i||Array.isArray(i)?Array.isArray(i)?i.forEach((e,t)=>{const o=`${a}[${t}]`;null!==e&&"object"==typeof e?Mn(e,o,n):n[o]=e}):n[a]=i:Mn(i,a,n)}return n},Bn=e=>{if(!e)return"0 KB/s";const t=Math.floor(Math.log(e)/Math.log(1024));return`${(e/Math.pow(1024,t)).toFixed(0===t?0:1)} ${["Bytes/s","KB/s","MB/s","GB/s","TB/s"][t]}`},jn=e=>{if(!e)return"0 ns";if(e<1e3)return`${e.toFixed(0)} ns`;if(e<1e6){const t=e/1e3;return`${t.toFixed(t<10?2:0)} μs`}if(e<1e9){const t=e/1e6;return`${t.toFixed(t<10?2:0)} ms`}if(e<6e10){const t=e/1e9;return`${t.toFixed(t<10?2:0)} s`}if(e<36e11){const t=e/6e10;return`${t.toFixed(t<10?2:0)} m`}if(e<864e11){const t=e/36e11;return`${t.toFixed(t<10?2:0)} h`}{const t=e/864e11;return`${t.toFixed(t<10?2:0)} d`}},Un=e=>{const t=e?.filter(({status:e})=>e===an.Error),n=e?.filter(({status:e})=>e===an.Warning),o=e?.filter(({status:e})=>e===sn.Disabled),i=e?.filter(({status:e})=>e===sn.Loading),a=t.length>0,r=n.length>0,s=o.length>0;return{errors:t,hasErrors:a,warnings:n,hasWarnings:r,disableds:o,hasDisableds:s,loadings:i,hasLoadings:i.length>0,priorotizedStatus:a?an.Error:r?an.Warning:s?an.Info:void 0}},Wn=e=>{const t=e?.reduce((e,t)=>t.instrumented?e+1:e,0);return`${t}/${e?.length||0} instrumented`},Vn=e=>({[Qt.Java]:p,[Qt.Go]:u,[Qt.JavaScript]:m,[Qt.Python]:h,[Qt.DotNet]:g,[Qt.CSharp]:x,[Qt.CPlusPlus]:f,[Qt.Php]:$,[Qt.Ruby]:y,[Qt.Rust]:b,[Qt.Swift]:w,[Qt.Elixir]:k,[Qt.MySql]:v,[Qt.Nginx]:E,[Qt.Postgres]:S,[Qt.Redis]:C,[Qt.Kafka]:T,[Qt.Ignored]:n,[Qt.Unknown]:n,[Qt.Processing]:n,[Qt.NoContainers]:n,[Qt.NoRunningPods]:n}[e]||n),Hn=e=>e?.map(({language:e})=>Vn(e))||[],qn=(e,t)=>{const n={[gn.Alauda]:A,[gn.AlibabaCloud]:D,[gn.AppDynamics]:N,[gn.Axiom]:I,[gn.AzureBlob]:O,[gn.BetterStack]:_,[gn.Bonree]:z,[gn.Causely]:R,[gn.Checkly]:F,[gn.Chronosphere]:L,[gn.ClickHouse]:P,[gn.CloudWatch]:M,[gn.Coralogix]:B,[gn.Dash0]:j,[gn.Datadog]:U,[gn.Dynamic]:W,[gn.Dynatrace]:V,[gn.ElasticApm]:H,[gn.ElasticSearch]:q,[gn.GoogleCloud]:Y,[gn.GrafanaCloudLoki]:G,[gn.GrafanaCloudPrometheus]:G,[gn.GrafanaCloudTempo]:G,[gn.Greptime]:J,[gn.Groundcover]:K,[gn.Honeycomb]:X,[gn.HyperDX]:Q,[gn.Instana]:Z,[gn.Jaeger]:ee,[gn.Kafka]:T,[gn.Kloudmate]:te,[gn.Last9]:ne,[gn.Lightstep]:oe,[gn.LogzIo]:ie,[gn.Loki]:ae,[gn.Lumigo]:re,[gn.Middleware]:se,[gn.NewRelic]:le,[gn.Observe]:de,[gn.Odigos]:ce,[gn.OneUptime]:pe,[gn.OpenObserve]:ue,[gn.Opsverse]:me,[gn.Oracle]:he,[gn.OTLP]:W,[gn.OTLPHttp]:W,[gn.Prometheus]:ge,[gn.Qryn]:xe,[gn.QrynOss]:fe,[gn.Quickwit]:$e,[gn.S3]:ye,[gn.Seq]:be,[gn.Signoz]:we,[gn.Splunk]:ke,[gn.SplunkSapm]:ke,[gn.SplunkOtlp]:ke,[gn.SumoLogic]:ve,[gn.TelemetryHub]:Ee,[gn.Tempo]:Se,[gn.Tingyun]:Ce,[gn.Traceloop]:Te,[gn.Uptrace]:Ae,[gn.VictoriaMetrics]:De,[gn.VictoriaMetricsCloud]:De,[gn.XRay]:Ne}[e];return n&&!t?{icon:n}:{iconSrc:`https://d15jtxgb40qetw.cloudfront.net/${e}.svg`}},Yn=e=>({[en.Namespace]:Ie,[en.Source]:Oe,[en.Destination]:_e,[en.Action]:ze,[en.InstrumentationRule]:Re}[e]),Gn=e=>"ruleId"in e&&e.ruleId?e.ruleId:"id"in e&&e.id?e.id:"namespace"in e&&e.namespace&&"kind"in e&&e.kind&&"name"in e&&e.name?{namespace:e.namespace,name:e.name,kind:e.kind}:"name"in e&&e.name?e.name:void 0,Jn=(e,t,n)=>{const{extended:o,prioritizeDisplayName:i}=n||{};let a="",r="";switch(t){case en.InstrumentationRule:const t=e;a=t.type,r=t.ruleName;break;case en.Source:const n=e;a=n.name,r=n.otelServiceName;break;case en.Action:const o=e;a=o.type,r=o.spec.actionName;break;case en.Destination:const i=e;a=i.destinationType.displayName,r=i.name;break;case en.Namespace:const s=e;a=s.name,r=s.name}return o?a+(r&&r!==a?` (${r})`:""):i&&r||a},Kn=(e,t)=>{if(t===en.Source){const t={namespace:"",name:"",kind:""};return e.split("&").forEach(e=>{const[n,o]=e.split("=");t[n]=o}),t}return e},Xn=e=>{const{numberOfInstances:t,containers:n}=e;if(!n)return t&&t>0?Qt.Processing:Qt.NoRunningPods;const o=n?.filter(e=>e.language!==Qt.Ignored);if(!o.length)return Qt.NoContainers;const i=o.find(e=>e.language!==Qt.Unknown);return i?i.language:Qt.Unknown},Qn=(e,t,n)=>(t===en.Source?e?.sources.find(e=>e.kind===n.kind&&e.name===n.name&&e.namespace===n.namespace):e?.destinations.find(e=>e.id===n))||{throughput:0},Zn=e=>({[wn.Logs]:Fe,[wn.Metrics]:Le,[wn.Traces]:Pe}[e]),eo=e=>e?{[Kt.K8s]:o,[Kt.Vm]:Me}[e]:ce,to=e=>e?{[Kt.K8s]:"Kubernetes Cluster",[Kt.Vm]:"Virtual Machine"}[e]:"Unknown",no=(e,t,n)=>{const o=e[t];return o?o.flatMap(e=>{const o=e[n],i=[];return void 0!==o&&(Array.isArray(o)?i.push(...o):i.push(o)),i.push(...no(e,t,n)),i}):[]},oo=(e,t)=>{if(t===en.Source){let t="";return Object.entries(e).forEach(([e,n])=>{t+=`${e}=${n}&`}),t.slice(0,-1),t}return e},io=(e,t)=>({[an.Success]:n=>Be({fill:t.text[e],...n}),[an.Error]:n=>je({fill:t.text[e],...n}),[an.Warning]:n=>Ue({fill:t.text[e],...n}),[an.Info]:n=>We({fill:t.text[e],...n}),[an.Default]:n=>ce({fill:t.text[e],...n})}[e]),ao=(e,t)=>{const n=t.find(([t,n])=>e>=t&&(null===n||e<=n));return n?.[2]||null},ro=({namespace:e,name:t,kind:n})=>({namespace:e,name:t,kind:n});function so(e,t){if(!e)return t;if("object"==typeof e)return e;try{return JSON.parse(e)}catch(e){return t}}const lo=(e,t)=>{const n=[],o=JSON.parse(JSON.stringify(e));for(const e of o){const o=so(t.fields,{}),i=e.items.findIndex(e=>e.type===t.destinationType.type);-1!==i&&n.push(...e.items[i].fields.map(e=>({...e,initialValue:o[e.name]})))}return n},co=(e,t)=>{const n=e=>e?.some(({healthy:e})=>e.status!==an.Success);return e?.length?e.some(({instrumentationInstances:e})=>n(e)):n(t)??!1},po=e=>Array.isArray(e)?!e?.length:"object"==typeof e?!Object.keys(e||{}).length:[void 0,null,""].includes(e),uo=e=>!!e&&(!(e.length>63)&&/^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$/.test(e)),mo=(e,t=0)=>{const n=(new Date).getTime();return new Date(e).getTime()-n<=t},ho=e=>{const t=String(e).trim().toLowerCase();return["true","false","1","0"].includes(t)},go=(e,t=0)=>(new Date).getTime()-new Date(e).getTime()>=t,xo=/^(\d+\.)?(\d+\.)?(\*|\d+)$/,fo=e=>xo.test(e),$o=e=>e?e.replace(/([a-z0-9])([A-Z])/g,"$1 $2"):"",yo=e=>e?.map(({status:e,type:t,reason:n,message:o,lastTransitionTime:i})=>({status:e,type:$o(t),reason:n?$o(n):"",message:o,lastTransitionTime:i}))||[],bo=(e,t)=>{const n=so(e.fields,{});return t.length?t.map(e=>({key:e.name,name:e.displayName||e.name,value:n[e.name]??null})).filter(e=>null!==e.value):Object.entries(n).map(([e,t])=>({key:e,name:e,value:t}))},wo=e=>e?Object.keys(e).filter(t=>e[t]):[],ko=e=>e.replace(/[^\d]/g,""),vo=e=>{const t=String(e).trim().toLowerCase();return"true"===t||"1"===t},Eo=e=>{let t="";try{const n=JSON.parse(e);t=Array.isArray(n)?n.map(e=>"object"==typeof e&&null!==e?`${e.key}: ${e.value}`:e).join(", "):"object"==typeof n&&null!==n?Object.entries(n).map(([e,t])=>`${e}: ${t}`).join(", "):e}catch(n){t=e}return t},So=e=>{if("object"!=typeof e)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach(n=>{const o=e[n];if(Array.isArray(o)){const e=o.filter(e=>null!=e&&""!==e);e.length>0&&(t[n]=e.map(e=>So(e)))}else if("object"==typeof o&&null!==o){const e=So(o);Object.keys(e).length>0&&(t[n]=e)}else[void 0,null,""].includes(o)||(t[n]=o)}),t},Co=(e,t=2)=>JSON.stringify(e||{},null,t),To=async(e=1e3)=>new Promise(t=>setTimeout(t,e)),Ao=e=>Object.entries(e).reduce((e,[t,n])=>(e[t]="string"==typeof n?n:JSON.stringify(n),e),{}),Do={[Qt.Go]:"Go",[Qt.Java]:"Java",[Qt.JavaScript]:"Node.js",[Qt.Python]:"Python",[Qt.DotNet]:".NET",[Qt.CSharp]:"C#",[Qt.CPlusPlus]:"C++",[Qt.Php]:"PHP",[Qt.Ruby]:"Ruby",[Qt.Rust]:"Rust",[Qt.Swift]:"Swift",[Qt.Elixir]:"Elixir",[Qt.MySql]:"MySQL",[Qt.Nginx]:"Nginx",[Qt.Postgres]:"PostgreSQL",[Qt.Redis]:"Redis",[Qt.Kafka]:"Kafka",[Qt.Ignored]:"Ignored",[Qt.Unknown]:"Unknown",[Qt.Processing]:"Processing",[Qt.NoContainers]:"No Containers",[Qt.NoRunningPods]:"No Running Pods"},No=[{id:Qt.Go,value:Do[Qt.Go],icon:Vn(Qt.Go)},{id:Qt.Java,value:Do[Qt.Java],icon:Vn(Qt.Java)},{id:Qt.JavaScript,value:Do[Qt.JavaScript],icon:Vn(Qt.JavaScript)},{id:Qt.Python,value:Do[Qt.Python],icon:Vn(Qt.Python)},{id:Qt.Php,value:Do[Qt.Php],icon:Vn(Qt.Php)},{id:Qt.Ruby,value:Do[Qt.Ruby],icon:Vn(Qt.Ruby)},{id:Qt.Rust,value:Do[Qt.Rust],icon:Vn(Qt.Rust)},{id:Qt.DotNet,value:Do[Qt.DotNet],icon:Vn(Qt.DotNet)},{id:Qt.CSharp,value:Do[Qt.CSharp],icon:Vn(Qt.CSharp)},{id:Qt.CPlusPlus,value:Do[Qt.CPlusPlus],icon:Vn(Qt.CPlusPlus)},{id:Qt.Swift,value:Do[Qt.Swift],icon:Vn(Qt.Swift)},{id:Qt.Elixir,value:Do[Qt.Elixir],icon:Vn(Qt.Elixir)}],Io="default",Oo={SELECTED_DATA_STREAM:"SELECTED_DATA_STREAM",SELECTED_DATA_STREAM_WITH_PROXY:e=>`SELECTED_DATA_STREAM_${e}`,OVERVIEW_FILTERS:"OVERVIEW_FILTERS",DARK_MODE:"DARK_MODE"},_o={REQUIRED_FIELDS:"Required fields are missing",FIELD_IS_REQUIRED:"This field is required",FORBIDDEN:"Forbidden",ENTERPRISE_ONLY:(e="This")=>`${e} is an Enterprise feature. Please upgrade your plan.`,DEFINED_FOR_ALL_STREAMS:e=>`${e} are defined for all Data Streams.`,CANNOT_EDIT_RULE:"Cannot edit a system-managed instrumentation rule",CANNOT_DELETE_RULE:"Cannot delete a system-managed instrumentation rule",LATENCY_HTTP_ROUTE:'HTTP route must start with a forward slash "/"',READONLY_WARNING:"You're not allowed to create/update/delete in readonly mode",ILLEGAL_K8S_LABEL:'Must be 63 characters or less, must consist of alphanumeric characters, "-", "_", or ".", and must start & end with an alphanumeric character (e.g., my-name, 123.abc).',INVALID_VERSION:'Invalid version format, must be in the format of "major.minor.patch" (e.g. 1.0.0)'},zo={NAMESPACE:"Namespace",NAME:"Name",KIND:"Kind",CONNECTION:"Connection",CONNECTIONS:"Connections",DATA_STREAM:"Data Stream",DATA_STREAMS:"Data Streams",STREAM_NAME:"Data Stream Name",NAME_YOUR_STREAM:"Name your Data Stream",NAME_YOUR_STREAM_PLACEHOLDER:"e.g. Highest priority",STREAM_DESCRIPTION:"Provide a clear and descriptive name for your pipeline to ensure its purpose is easily understood by you and your team.",STREAM_CONFIRM:"Confirm your new Data Stream",DATA_STREAM_EXISTS_WARNING:(e,t)=>`A Data Stream with this name already exists, you can still rename the current "${e}", but it will merge into the existing "${t}".`,ACTION:"Action",ACTIONS:"Actions",ADD_ACTION:"Add Action",ACTION_DETAILS:"Action Details",INSTRUMENTATION_RULE:"Instrumentation Rule",INSTRUMENTATION_RULES:"Instrumentation Rules",ADD_INSTRUMENTATION_RULE:"Add Instrumentation Rule",INSTRUMENTATION_RULE_DETAILS:"Instrumentation Rule Details",DESTINATION:"Destination",DESTINATIONS:"Destinations",ADD_DESTINATION:"Add Destination",ADD_DESTINATIONS:"Add Destinations",ADD_DESTINATION_DESCRIPTION:"Add a destination to send your telemetry data to. You can add multiple destinations.",DESTINATION_DETAILS:"Destination Details",SELECTED_DESTINATIONS:"Selected Destinations",SOURCE:"Source",SOURCES:"Sources",ADD_SOURCE:"Add Source",SOURCE_DETAILS:"Source Details",SELECT_SOURCES:"Select Sources",SELECTED_SOURCES:"Selected Sources",SELECT_SOURCES_DESCRIPTION:"Choose which sources to monitor in your pipeline by searching by source name or namespace.",NO_SOURCES:"No sources",NO_SOURCES_GO_BACK:"No sources selected. Please go back to select sources.",PLEASE_ADD_SOURCE:"Please add a source",NO_SOURCES_NAMESPACE:"No sources available in this namespace",TRY_SEARCH_OR_OTHER_NAMESPACE:"Try searching again or select another namespace.",PLEASE_MAKE_SURE_UNIGNORED_NAMESPACES:"Please make sure your cluster has unignored namespaces",INSTALLATION:"Installation",SUMMARY:"Summary",TYPE:"Type",NOTES:"Notes",STATUS:"Status",READONLY:"Readonly",LANGUAGE:"Language",VERSION:"Version",RUNTIME_VERSION:"Runtime Version",VERSION_PLACEHOLDER:"1.0.0",MONITORS:"Monitors",SIGNALS_FOR_PROCESSING:"Signals for Processing",MANAGED_BY_PROFILE:"Managed by Profile",TIER:"Tier",ENTERPRISE:"Enterprise",ENTERPRISE_TIER:"Enterprise Tier",COMMUNITY:"Community",COMMUNITY_TIER:"Community Tier",API_TOKEN:"API Token",API_TOKENS:"API Tokens",DESCRIBE_ODIGOS:"Describe Odigos",DESCRIBE_SOURCE:"Describe Source",DETECTED_CONTAINERS:"Detected Containers",DETECTED_CONTAINERS_DESCRIPTION:"The system automatically instruments the containers it detects with a supported programming language.",CONTAINER_NAME:"Container Name",FILTERED_COUNT_TOOLTIP:"Represents filtered amount, out of total amount",SEARCH_NAMESPACES:"Search Namespaces",SEARCH_SOURCES:"Search Sources",SELECT_ALL:"Select All",ONLY_SELECTED:"Only selected",ONLY_RUNNING_INSTANCES:"Only running instances",TO_COLLECT_OTEL_DATA:"To collect OpenTelemetry data",TO_MONITOR_OTEL_DATA:"To monitor OpenTelemetry data",TO_MODIFY_OTEL_DATA:"To modify OpenTelemetry data",QUICK_BACK_TO_SUMMARY:"When you finish editing you can quickly go back to the summary.",GO_TO_SUMMARY:"Go to summary",FUTURE_APPS_TITLE:"Auto-instrument new apps",FUTURE_APPS_DESCRIPTION:"When enabled, new applications will be instrumented automatically and included in the current data stream.",OVERIDE:"Override",OVERIDDEN:"Overridden",OVERRIDE_RUNTIME_DETAILS:"Override Runtime Details",OVERRIDE_RUNTIME_WARNING:"This is an advanced configuration. If the selected programming language is incorrect, data collection may be incomplete or may not occur at all.",ACTIVE:"Active",INACTIVE:"Inactive",ENABLED:"Enabled",DISABLED:"Disabled",NO_TRACES_FOUND:"No traces found",ARE_SERVICES_INSTRUMENTED_AND_PRODUCING_TRAFFIC:"Are your services instrumented & producing traffic?"},Ro={ADD:"Add",ADD_NEW:"Add New",NEW:"New",SELECT:"Select",CREATE:"Create",UPDATE:"Update",EDIT:"Edit",DELETE:"Delete",CANCEL:"Cancel",DONE:"Done",SAVE:"Save",BACK:"Back",NEXT:"Next",TEST:"Test",TEST_CONNECTION:"Test Connection",INSTRUMENT:"Instrument",UNINSTRUMENT:"Uninstrument"},Fo=6048e5,Lo=lt()(yt(e=>({darkMode:!0,setDarkMode:t=>e({darkMode:t})}),{name:Oo.DARK_MODE,storage:"undefined"!=typeof window?bt(()=>localStorage):void 0})),Po={dataStreamsLoading:!1,dataStreams:[],selectedStreamName:""},Mo=lt(e=>({...Po,setDataStreamsLoading:t=>e({dataStreamsLoading:t}),setDataStreams:t=>e({dataStreams:t}),addDataStreams:t=>e(e=>{const n=[...e.dataStreams,...t].map(e=>[e.name,e]);return{dataStreams:Array.from(new Map(n).values())}}),removeDataStreams:t=>e(e=>({dataStreams:e.dataStreams.filter(e=>!t.find(t=>t.name===e.name))})),setSelectedStreamName:t=>e({selectedStreamName:t}),resetDataStreamStore:()=>e(Po)})),Bo=lt(e=>({drawerType:null,drawerEntityId:null,setDrawerType:t=>e({drawerType:t}),setDrawerEntityId:t=>e({drawerEntityId:t})})),jo=lt(e=>({namespacesLoading:!1,namespaces:[],sourcesLoading:!1,sources:[],destinationsLoading:!1,destinations:[],actionsLoading:!1,actions:[],instrumentationRulesLoading:!1,instrumentationRules:[],setEntitiesLoading:(t,n)=>{const o=t===en.Namespace?"namespacesLoading":t===en.Source?"sourcesLoading":t===en.Destination?"destinationsLoading":t===en.Action?"actionsLoading":t===en.InstrumentationRule?"instrumentationRulesLoading":"NONE";"NONE"!==o&&e({[o]:n})},setEntities:(t,n)=>{const o=t===en.Namespace?"namespaces":t===en.Source?"sources":t===en.Destination?"destinations":t===en.Action?"actions":t===en.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==o&&e({[o]:n})},addEntities:(t,n)=>{const o=t===en.Namespace?"namespaces":t===en.Source?"sources":t===en.Destination?"destinations":t===en.Action?"actions":t===en.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==o&&e(e=>{const t=[...e[o]];return n.forEach(e=>{const n=t.findIndex(t=>JSON.stringify(Gn(t))===JSON.stringify(Gn(e)));-1!==n?t[n]={...t[n],...e}:t.push(e)}),{[o]:t}})},removeEntities:(t,n)=>{const o=t===en.Namespace?"namespaces":t===en.Source?"sources":t===en.Destination?"destinations":t===en.Action?"actions":t===en.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==o&&e(e=>{const i=[...e[o]];return n.forEach(e=>{const n=i.findIndex(n=>t===en.Source?JSON.stringify(Gn(n))===JSON.stringify(Gn(e)):Gn(n)===e);-1!==n&&i.splice(n,1)}),{[o]:i}})},resetEntityStore:()=>{e({namespacesLoading:!1,namespaces:[],sourcesLoading:!1,sources:[],destinationsLoading:!1,destinations:[],actionsLoading:!1,actions:[],instrumentationRulesLoading:!1,instrumentationRules:[]})}})),Uo=()=>({searchText:"",statuses:[],platformTypes:[],namespaces:[],kinds:[],monitors:[],languages:[],conditions:[],errors:[],onlyErrors:!1}),Wo=lt(e=>({searchText:"",setSearchText:t=>e({searchText:t}),statuses:[],setStatuses:t=>e({statuses:t}),platformTypes:[],setPlatformTypes:t=>e({platformTypes:t}),namespaces:[],setNamespaces:t=>e({namespaces:t}),kinds:[],setKinds:t=>e({kinds:t}),monitors:[],setMonitors:t=>e({monitors:t}),languages:[],setLanguages:t=>e({languages:t}),conditions:[],setConditions:t=>e({conditions:t}),errors:[],setErrors:t=>e({errors:t}),onlyErrors:!1,setOnlyErrors:t=>e({onlyErrors:t}),setAll:t=>e(t),clearAll:()=>e({searchText:"",statuses:[],platformTypes:[],namespaces:[],kinds:[],monitors:[],languages:[],conditions:[],errors:[],onlyErrors:!1}),getEmptyState:Uo})),Vo=lt(e=>({isAwaitingInstrumentation:!1,sourcesToCreate:0,sourcesCreated:0,sourcesToDelete:0,sourcesDeleted:0,setInstrumentAwait:t=>e({isAwaitingInstrumentation:t}),setInstrumentCount:(t,n)=>e({[t]:n})})),Ho=lt(e=>({currentModal:"",setCurrentModal:t=>e({currentModal:t})})),qo=lt((e,t)=>({notifications:[],addNotification:n=>{const o=new Date,i=`${o.getTime().toString()}${n.target?`#${n.target}`:""}`,{notifications:a}=t();a.some(e=>e.type===n.type&&e.title===n.title&&e.message===n.message&&!e.dismissed)||e(e=>({notifications:[{...n,id:i,time:o.toISOString(),dismissed:!1,seen:!1},...e.notifications]}))},markAsDismissed:t=>{e(e=>{const n=e.notifications.findIndex(e=>e.id===t);return-1!==n&&(e.notifications[n].dismissed=!0),{notifications:e.notifications}})},markAsSeen:t=>{e(e=>{const n=e.notifications.findIndex(e=>e.id===t);return-1!==n&&(e.notifications[n].seen=!0),{notifications:e.notifications}})},removeNotification:t=>{e(e=>{const n=e.notifications.findIndex(e=>e.id===t);return-1!==n&&e.notifications.splice(n,1),{notifications:e.notifications}})},removeNotifications:t=>{t&&e(e=>({notifications:e.notifications.filter(e=>e.id.split("#")[1]!==t)}))}})),Yo=(e,t)=>{const n=e.entityType===t.entityType,o="string"==typeof e.entityId&&"string"==typeof t.entityId?e.entityId===t.entityId:"object"==typeof e.entityId&&"object"==typeof t.entityId?e.entityId.namespace===t.entityId.namespace&&e.entityId.name===t.entityId.name&&e.entityId.kind===t.entityId.kind:!e.entityId&&!t.entityId;return n&&o},Go=lt((e,t)=>({pendingItems:[],setPendingItems:t=>e({pendingItems:t}),addPendingItems:t=>e(e=>({pendingItems:e.pendingItems.concat(t.filter(t=>!e.pendingItems.some(e=>Yo(e,t))))})),removePendingItems:t=>e(e=>({pendingItems:e.pendingItems.filter(e=>!t.find(t=>Yo(e,t)))})),isThisPending:e=>{const{pendingItems:n}=t();let o=!1;for(let t=0;t<n.length;t++){const i=n[t];if(i.entityType===e.entityType&&(!e.entityId||(i.entityType===en.Source?i.entityId&&e.entityId&&i.entityId.namespace===e.entityId.namespace&&i.entityId.name===e.entityId.name&&i.entityId.kind===e.entityId.kind:i.entityId===e.entityId))){o=!0;break}}return o}})),Jo=lt(e=>({selectedSources:{},setSelectedSources:t=>e({selectedSources:t}),resetSelectedState:()=>e(()=>({selectedSources:{}}))})),Ko={availableSources:{},configuredSources:{},configuredFutureApps:{},configuredDestinations:[],configuredDestinationsUpdateOnly:[]},Xo=(e,t)=>e.destinationType.type!==t.destinationType.type,Qo=lt(e=>({...Ko,setAvailableSources:t=>e({availableSources:t}),setConfiguredSources:t=>e({configuredSources:t}),setConfiguredFutureApps:t=>e({configuredFutureApps:t}),setConfiguredDestinations:t=>e({configuredDestinations:t}),addConfiguredDestination:t=>e(e=>({configuredDestinations:[...e.configuredDestinations,t]})),removeConfiguredDestination:t=>e(e=>({configuredDestinations:e.configuredDestinations.filter(e=>Xo(e,t))})),setConfiguredDestinationsUpdateOnly:t=>e({configuredDestinationsUpdateOnly:t}),addConfiguredDestinationUpdateOnly:t=>e(e=>{const n=[...e.configuredDestinationsUpdateOnly,t].map(e=>[e.id,e]);return{configuredDestinationsUpdateOnly:Array.from(new Map(n).values())}}),removeConfiguredDestinationUpdateOnly:t=>e(e=>({configuredDestinationsUpdateOnly:e.configuredDestinationsUpdateOnly.filter(e=>Xo(e,t))})),resetState:()=>e(()=>({...Ko}))})),Zo={colors:{majestic_blue:"#444AD9",majestic_blue_soft:"#6C7AE8",orange_og:"#FE9239",orange_soft:"#FFB160",dark_red:"#802828",darker_red:"#611F1F",darkest_red:"#281515",darkest_red_hover:"#351515",dark_green:"#2D4323"},text:{},font_family:{primary:"Inter, sans-serif",secondary:"Kode Mono, sans-serif",code:"IBM Plex Mono, monospace"}},ei={darkMode:!0,colors:{...Zo.colors,primary:"#111111",secondary:"#F9F9F9",border:"#525252",dark_grey:"#151515",translucent_bg:"#1A1A1A",dropdown_bg:"#242424",dropdown_bg_2:"#333333",warning:"#472300",error:"#431919",success:"#172013",info:"#242424",default:"#181944"},text:{white:"#FFFFFF",primary:"#111111",secondary:"#F9F9F9",grey:"#B8B8B8",dark_grey:"#8F8F8F",darker_grey:"#7A7A7A",light_grey:"#CCD0D2",dark_button:"#0A1824",warning:"#E9CF35",warning_secondary:"#FFA349",error:"#EF7676",error_secondary:"#DB5151",success:"#81AF65",success_secondary:"#51DB51",info:"#B8B8B8",info_secondary:"#CCDDDD",default:"#AABEF7",default_secondary:"#8CBEFF"},font_family:Zo.font_family},ti={darkMode:!1,colors:{...Zo.colors,primary:"#EEEEEE",secondary:"#060606",border:"#ADADAD",dark_grey:"#EAEAEA",translucent_bg:"#E5E5E5",dropdown_bg:"#DBDBDB",dropdown_bg_2:"#CCCCCC",warning:"#F6F092",error:"#FACECE",success:"#C8DEB8",info:"#E0E0E0",default:"#CAD9FB"},text:{white:"#FFFFFF",primary:"#EEEEEE",secondary:"#060606",grey:"#474747",dark_grey:"#707070",darker_grey:"#858585",light_grey:"#332F2D",dark_button:"#F5E7DB",warning:"#A56F12",warning_secondary:"#CA9416",error:"#B63A3A",error_secondary:"#DB5151",success:"#4E763A",success_secondary:"#67964C",info:"#525252",info_secondary:"#7A7A7A",default:"#444AD9",default_secondary:"#6C7AE8"},font_family:Zo.font_family},ni=e=>e?ei:ti;wt('@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=Kode+Mono:wght@100;200;300;400;500;600;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap");*{-ms-overflow-style:none;scrollbar-width:none}::-webkit-scrollbar{display:none}svg{transition:all .3s}input{all:unset}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{-webkit-transition:all 50000s ease-in-out 0s;transition:all 50000s ease-in-out 0s}');const oi={in:{left:St`
1
+ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as n,K8sLogo as o,AddClusterInfoIcon as i,DeleteAttributeIcon as a,RenameAttributeIcon as r,CodeAttributesIcon as s,CustomInstrumentationIcon as l,HeadersCollectionIcon as d,PayloadCollectionIcon as c,JavaLogo as p,GoLogo as u,NodejsLogo as m,PythonLogo as h,DotnetLogo as g,CSharpLogo as x,CPlusPlusLogo as f,PhpLogo as $,RubyLogo as y,RustLogo as b,SwiftLogo as w,ElixirLogo as k,MysqlLogo as v,NginxLogo as E,PostgresLogo as S,RedisLogo as C,KafkaLogo as T,AlaudaLogo as A,AlibabaCloudLogo as D,AppDynamicsLogo as N,AxiomLogo as I,BlobStorageLogo as O,BetterStackLogo as _,BonreeLogo as z,CauselyLogo as R,ChecklyLogo as F,ChronosphereLogo as L,ClickhouseLogo as P,AwsCloudwatchLogo as M,CoralogixLogo as B,Dash0Logo as j,DatadogLogo as U,OpenTelemetryLogo as W,DynatraceLogo as V,ElasticApmLogo as H,ElasticSearchLogo as q,GoogleCloudPlatformLogo as Y,GrafanaLogo as G,GreptimeLogo as J,GroundcoverLogo as K,HoneycombLogo as X,HyperDxLogo as Q,InstanaLogo as Z,JaegerLogo as ee,KloudmateLogo as te,Last9Logo as ne,LightstepLogo as oe,LogzioLogo as ie,LokiLogo as ae,LumigoLogo as re,MiddlewareLogo as se,NewRelicLogo as le,ObserveLogo as de,OdigosLogo as ce,OneUptimeLogo as pe,OpenObserveLogo as ue,OpsVerseLogo as me,OracleLogo as he,PrometheusLogo as ge,QrynLogo as xe,GigapipeLogo as fe,QuickwitLogo as $e,AwsS3Logo as ye,SeqLogo as be,SignozLogo as we,SplunkLogo as ke,SumoLogicLogo as ve,TelemetryHubLogo as Ee,TempoLogo as Se,TingyunLogo as Ce,TraceloopLogo as Te,UptraceLogo as Ae,VictoriaMetricsLogo as De,AwsXrayLogo as Ne,NamespacesIcon as Ie,SourcesIcon as Oe,DestinationsIcon as _e,ActionsIcon as ze,RulesIcon as Re,LogsIcon as Fe,MetricsIcon as Le,TracesIcon as Pe,VmLogo as Me,CheckCircledIcon as Be,ErrorTriangleIcon as je,WarningTriangleIcon as Ue,InfoIcon as We,MinusIcon as Ve,CheckIcon as He,ListIcon as qe,CodeIcon as Ye,ExtendArrowIcon as Ge,PlusIcon as Je,CopyIcon as Ke,EditIcon as Xe,EditedIcon as Qe,SortArrowsIcon as Ze,NotebookIcon as et,XIcon as tt,EyeClosedIcon as nt,EyeOpenIcon as ot,NoDataIcon as it,CrossIcon as at,SearchIcon as rt,TrashIcon as st}from"../icons.js";import{create as lt}from"zustand";import dt,{Fragment as ct,useMemo as pt,useState as ut,useEffect as mt,useRef as ht,forwardRef as gt,useCallback as xt,memo as ft}from"react";import $t from"javascript-time-ago";import{p as yt,c as bt,s as wt,e as kt}from"./vendor-1dea551d.js";import vt,{ThemeProvider as Et,keyframes as St,useTheme as Ct,css as Tt}from"styled-components";import{Handle as At,Position as Dt,getSmoothStepPath as Nt,BaseEdge as It,EdgeLabelRenderer as Ot,ReactFlow as _t,Controls as zt}from"@xyflow/react";import Rt from"react-dom";import{Highlight as Ft,themes as Lt}from"prism-react-renderer";import{ErrorBoundary as Pt}from"react-error-boundary";import Mt from"lottie-react";const Bt=lt(e=>({activeNodeType:null,activeNodeId:null,setActiveNodeType:t=>e({activeNodeType:t}),setActiveNodeId:t=>e({activeNodeId:t})}));var jt,Ut,Wt,Vt,Ht,qt,Yt,Gt,Jt,Kt,Xt,Qt,Zt,en,tn,nn,on,an,rn,sn,ln,dn,cn,pn,un,mn,hn,gn,xn,fn,$n,yn,bn,wn,kn;!function(e){e.Attributes="attributes",e.Samplers="samplers"}(jt||(jt={})),function(e){e.K8sAttributes="K8sAttributesResolver",e.AddClusterInfo="AddClusterInfo",e.DeleteAttributes="DeleteAttribute",e.RenameAttributes="RenameAttribute",e.PiiMasking="PiiMasking",e.ErrorSampler="ErrorSampler",e.ProbabilisticSampler="ProbabilisticSampler",e.LatencySampler="LatencySampler",e.ServiceNameSampler="ServiceNameSampler",e.SpanAttributeSampler="SpanAttributeSampler"}(Ut||(Ut={})),function(e){e.CollectContainerAttributes="collectContainerAttributes",e.CollectReplicaSetAttributes="collectReplicaSetAttributes",e.CollectWorkloadId="collectWorkloadId",e.CollectClusterId="collectClusterId",e.LabelsAttributes="labelsAttributes",e.AnnotationsAttributes="annotationsAttributes",e.ClusterAttributes="clusterAttributes",e.OverwriteExistingValues="overwriteExistingValues",e.AttributeNamesToDelete="attributeNamesToDelete",e.Renames="renames",e.PiiCategories="piiCategories",e.FallbackSamplingRatio="fallbackSamplingRatio",e.SamplingPercentage="samplingPercentage",e.EndpointsFilters="endpointsFilters",e.ServicesNameFilters="servicesNameFilters",e.AttributeFilters="attributeFilters"}(Wt||(Wt={})),function(e){e.Pod="pod",e.Namespace="namespace"}(Vt||(Vt={})),function(e){e.EXISTS="exists",e.EQUALS="equals",e.NOT_EQUALS="not_equals",e.CONTAINS="contains",e.NOT_CONTAINS="not_contains",e.REGEX="regex"}(Ht||(Ht={})),function(e){e.EXISTS="exists",e.EQUALS="equals",e.NOT_EQUALS="not_equals",e.GREATER_THAN="greater_than",e.LESS_THAN="less_than",e.GREATER_THAN_OR_EQUAL="greater_than_or_equal",e.LESS_THAN_OR_EQUAL="less_than_or_equal"}(qt||(qt={})),function(e){e.EXISTS="exists",e.EQUALS="equals"}(Yt||(Yt={})),function(e){e.EXISTS="exists",e.EQUALS="equals",e.NOT_EQUALS="not_equals",e.IS_VALID_JSON="is_valid_json",e.IS_INVALID_JSON="is_invalid_json",e.JSONPATH_EXISTS="jsonpath_exists",e.KEY_EQUALS="key_equals",e.KEY_NOT_EQUALS="key_not_equals"}(Gt||(Gt={})),function(e){e.Community="community",e.Cloud="cloud",e.Onprem="onprem"}(Jt||(Jt={})),function(e){e.K8s="k8s",e.Vm="vm"}(Kt||(Kt={})),function(e){e.Cli="odigos-cli",e.Helm="helm",e.Operator="odigos-operator"}(Xt||(Xt={})),function(e){e.Go="go",e.JavaScript="javascript",e.Python="python",e.Java="java",e.DotNet="dotnet",e.CSharp="csharp",e.CPlusPlus="cplusplus",e.Php="php",e.Ruby="ruby",e.Rust="rust",e.Swift="swift",e.Elixir="elixir",e.MySql="mysql",e.Nginx="nginx",e.Postgres="postgres",e.Redis="redis",e.Kafka="kafka",e.Ignored="ignored",e.Unknown="unknown",e.Processing="processing",e.NoContainers="no containers",e.NoRunningPods="no running pods"}(Qt||(Qt={})),function(e){e.Create="Create",e.Read="Read",e.Update="Update",e.Delete="Delete"}(Zt||(Zt={})),function(e){e.Namespace="Namespace",e.Source="Source",e.Destination="Destination",e.Action="Action",e.InstrumentationRule="InstrumentationRule"}(en||(en={})),function(e){e.DataStream="DataStream"}(tn||(tn={})),function(e){e.Input="input",e.MultiInput="multiInput",e.MultiTabledInput="multiTabledInput",e.KeyValuePair="keyValuePairs",e.TextArea="textarea",e.Dropdown="dropdown",e.Checkbox="checkbox",e.Toggle="toggle"}(nn||(nn={})),function(e){e.Text="text",e.Password="password",e.Number="number"}(on||(on={})),function(e){e.Warning="warning",e.Error="error",e.Success="success",e.Info="info",e.Default="default"}(an||(an={})),function(e){e.INSTRUMENTED="Instrumented",e.INSTRUMENTING="Instrumenting",e.UNINSTRUMENTED="Uninstrumented",e.NOT_INSTRUMENTED="Not Instrumented"}(rn||(rn={})),function(e){e.Loading="loading",e.Disabled="disabled"}(sn||(sn={})),function(e){e.Ascending="asc",e.Descending="desc"}(ln||(ln={})),function(e){e.CodeAttributes="code-attributes",e.FullPayloadCollection="full-payload-collection",e.DbPayloadCollection="db-payload-collection",e.QueryOperationDetector="query-operation-detector",e.AllowConcurrentAgents="allow_concurrent_agents",e.JavaEbpfInstrumentations="java-ebpf-instrumentations",e.JavaNativeInstrumentations="java-native-instrumentations",e.SizeS="size_s",e.SizeM="size_m",e.SizeL="size_l"}(dn||(dn={})),function(e){e.VirtualDevice="VirtualDevice",e.HostPath="HostPath",e.InitContainer="InitContainer"}(cn||(cn={})),function(e){e.Loader="loader",e.PodManifest="pod-manifest",e.LoaderFallbackToPodManifest="loader-fallback-to-pod-manifest"}(pn||(pn={})),function(e){e.Header="header",e.Add="add",e.Base="base",e.Edged="edged",e.Frame="frame",e.Scroll="scroll",e.Skeleton="skeleton",e.MapItem="map-item",e.NoData="no-data"}(un||(un={})),function(e){e.Labeled="labeled"}(mn||(mn={})),function(e){e.AddRule="addRule",e.AddSource="addSource",e.AddAction="addAction",e.AddDestination="addDestination"}(hn||(hn={})),function(e){e.Alauda="alauda",e.AlibabaCloud="alibabacloud",e.AppDynamics="appdynamics",e.Axiom="axiom",e.AzureBlob="azureblob",e.BetterStack="betterstack",e.Bonree="bonree",e.Causely="causely",e.Checkly="checkly",e.Chronosphere="chronosphere",e.ClickHouse="clickhouse",e.CloudWatch="cloudwatch",e.Coralogix="coralogix",e.Dash0="dash0",e.Datadog="datadog",e.Dynamic="dynamic",e.Dynatrace="dynatrace",e.ElasticApm="elasticapm",e.ElasticSearch="elasticsearch",e.GoogleCloud="googlecloud",e.GrafanaCloudLoki="grafanacloudloki",e.GrafanaCloudPrometheus="grafanacloudprometheus",e.GrafanaCloudTempo="grafanacloudtempo",e.Greptime="greptime",e.Groundcover="groundcover",e.Honeycomb="honeycomb",e.HyperDX="hyperdx",e.Instana="instana",e.Jaeger="jaeger",e.Kafka="kafka",e.Kloudmate="kloudmate",e.Last9="last9",e.Lightstep="lightstep",e.LogzIo="logzio",e.Loki="loki",e.Lumigo="lumigo",e.Middleware="middleware",e.NewRelic="newrelic",e.Observe="observe",e.Odigos="odigos",e.OneUptime="oneuptime",e.OpenObserve="openobserve",e.Opsverse="opsverse",e.Oracle="oracle",e.OTLP="otlp",e.OTLPHttp="otlphttp",e.Prometheus="prometheus",e.Qryn="qryn",e.QrynOss="qryn-oss",e.Quickwit="quickwit",e.S3="s3",e.Seq="seq",e.Signoz="signoz",e.Splunk="splunk",e.SplunkSapm="splunksapm",e.SplunkOtlp="splunkotlp",e.SumoLogic="sumologic",e.TelemetryHub="telemetryhub",e.Tempo="tempo",e.Tingyun="tingyun",e.Traceloop="traceloop",e.Uptrace="uptrace",e.VictoriaMetrics="victoriametrics",e.VictoriaMetricsCloud="victoriametricscloud",e.XRay="xray"}(gn||(gn={})),function(e){e.CodeAttributes="CodeAttributes",e.HeadersCollection="HeadersCollection",e.PayloadCollection="PayloadCollection",e.CustomInstrumentation="CustomInstrumentation",e.UnknownType="UnknownType"}(xn||(xn={})),function(e){e.Column="column",e.FilePath="filePath",e.Function="function",e.LineNumber="lineNumber",e.Namespace="namespace",e.StackTrace="stacktrace"}(fn||(fn={})),function(e){e.HeaderKeys="headerKeys"}($n||($n={})),function(e){e.Probes="probes"}(yn||(yn={})),function(e){e.HttpRequest="httpRequest",e.HttpResponse="httpResponse",e.DbQuery="dbQuery",e.Messaging="messaging"}(bn||(bn={})),function(e){e.Logs="logs",e.Metrics="metrics",e.Traces="traces"}(wn||(wn={})),function(e){e.Deployment="Deployment",e.DaemonSet="DaemonSet",e.StatefulSet="StatefulSet",e.CronJob="CronJob"}(kn||(kn={}));const vn=s=>{const l=s?.toLowerCase(),d=l?.includes(jt.Samplers),c=l===jt.Attributes;return d?e:c?t:{[Ut.K8sAttributes]:o,[Ut.AddClusterInfo]:i,[Ut.DeleteAttributes]:a,[Ut.PiiMasking]:t,[Ut.RenameAttributes]:r,[Ut.ErrorSampler]:e,[Ut.ProbabilisticSampler]:e,[Ut.LatencySampler]:e,[Ut.ServiceNameSampler]:e,[Ut.SpanAttributeSampler]:e}[s]||n},En=[{label:"Attributes",icon:vn(jt.Attributes),items:[{type:Ut.K8sAttributes,icon:vn(Ut.K8sAttributes),label:"Kubernetes Attributes",description:"Add dynamic k8s resource attributes to your data.",allowedSignals:[wn.Traces,wn.Metrics,wn.Logs],docsEndpoint:"/pipeline/actions/attributes/k8sattributes",docsDescription:"This action adds kubernetes related resource attributes to spans, metrics data points and log records."},{type:Ut.AddClusterInfo,icon:vn(Ut.AddClusterInfo),label:"Add Cluster Info",description:"Add static cluster-scoped attributes to your data.",allowedSignals:[wn.Traces,wn.Metrics,wn.Logs],docsEndpoint:"/pipeline/actions/attributes/addclusterinfo",docsDescription:"This action adds static resource attributes to spans, metrics data points and log records. It is useful to add cluster-wide attributes to all telemetry signals."},{type:Ut.DeleteAttributes,icon:vn(Ut.DeleteAttributes),label:"Delete Attribute",description:"Delete attributes from logs, metrics, and traces.",allowedSignals:[wn.Traces,wn.Metrics,wn.Logs],docsEndpoint:"/pipeline/actions/attributes/deleteattribute",docsDescription:"This action will delete the specified attributes from all telemetry signals that are specified in the signals field, regardless of the source, or any other condition."},{type:Ut.RenameAttributes,icon:vn(Ut.RenameAttributes),label:"Rename Attribute",description:"Rename attributes in logs, metrics, and traces.",allowedSignals:[wn.Traces,wn.Metrics,wn.Logs],docsEndpoint:"/pipeline/actions/attributes/renameattribute",docsDescription:"This action will rename the specified attributes from all telemetry signals that are specified in the signals field, regardless of the source, or any other condition."},{type:Ut.PiiMasking,icon:vn(Ut.PiiMasking),label:"PII Masking",description:"Mask PII data in your traces.",allowedSignals:[wn.Traces],docsEndpoint:"/pipeline/actions/attributes/piimasking",docsDescription:"This action processes a list of PII categories to be masked from the traces."}]},{label:"Samplers",icon:vn(jt.Samplers),items:[{type:Ut.ErrorSampler,icon:vn(jt.Samplers),label:"Error Sampler",description:"Sample errors based on percentage.",allowedSignals:[wn.Traces],docsEndpoint:"/pipeline/actions/sampling/errorsampler",docsDescription:"This action is a Global Action that supports error sampling by filtering out non-error traces."},{type:Ut.LatencySampler,icon:vn(jt.Samplers),label:"Latency Sampler",description:"Add latency to your traces.",allowedSignals:[wn.Traces],docsEndpoint:"/pipeline/actions/sampling/latencysampler",docsDescription:"This action is an Endpoint Action that samples traces based on their duration for a specific service and endpoint (HTTP route) filter."},{type:Ut.ProbabilisticSampler,icon:vn(jt.Samplers),label:"Probabilistic Sampler",description:"Sample traces based on percentage.",allowedSignals:[wn.Traces],docsEndpoint:"/pipeline/actions/sampling/probabilisticsampler",docsDescription:"This action supports probabilistic sampling based on a configured sampling percentage applied to the TraceID."},{type:Ut.ServiceNameSampler,icon:vn(jt.Samplers),label:"Service Name Sampler",description:"Sample traces based on the presence of specified services within a trace.",allowedSignals:[wn.Traces],docsEndpoint:"/pipeline/actions/sampling/servicenamesampler",docsDescription:"This action supports service name sampling based on the presence of specified services within a trace."},{type:Ut.SpanAttributeSampler,icon:vn(jt.Samplers),label:"Span Attributes Sampler",description:"Sample traces based on the presence or value of specific attributes within a trace.",allowedSignals:[wn.Traces],docsEndpoint:"/pipeline/actions/sampling/spanattributesampler",docsDescription:"This action supports service name sampling based on the presence or value of specific attributes within a trace."}]}],Sn={DETECTED:{TITLE:"Detected by Odigos",DESCRIPTION:"Odigos found these destinations in your cluster and pre-filled their details. Review and enable them to start sending data."},EXISTS:{TITLE:"Already configured",DESCRIPTION:"These are destinations that you have already configured in other data-streams and can reuse them."},MANAGED:{TITLE:"Managed",DESCRIPTION:"Effortless monitoring with scalable performance management."},SELF_HOSTED:{TITLE:"Self-hosted",DESCRIPTION:"Full control and customization for advanced application monitoring."}},Cn=e=>({[xn.CodeAttributes]:s,[xn.CustomInstrumentation]:l,[xn.HeadersCollection]:d,[xn.PayloadCollection]:c,[xn.UnknownType]:n}[e]||n),Tn=[{type:xn.CodeAttributes,icon:Cn(xn.CodeAttributes),label:"Code Attributes",description:"Collect code attributes containing payload data to traces.",docsEndpoint:"/pipeline/rules/codeattributes",docsDescription:'The "Code Attributes" Rule can be used to add code attributes containing payload data to traces.',supportedLanguages:[Qt.Go,Qt.Python]},{type:xn.CustomInstrumentation,icon:Cn(xn.CustomInstrumentation),label:"Custom Instrumentation",description:"Define custom instrumentation for specific class and method combinations.",docsEndpoint:"/pipeline/rules/custominstrumentation",docsDescription:'The "Custom Instrumentation" Rule can be used to instrument specific class and method combinations for detailed tracing.',supportedLanguages:[Qt.Java]},{type:xn.HeadersCollection,icon:Cn(xn.HeadersCollection),label:"Headers Collection",description:"Collect span attributes containing HTTP Headers data to traces.",docsEndpoint:"/pipeline/rules/headerscollection",docsDescription:'The "Headers Collection" Rule can be used to add span attributes containing HTTP Headers data to traces.',supportedLanguages:[Qt.Go,Qt.Java]},{type:xn.PayloadCollection,icon:Cn(xn.PayloadCollection),label:"Payload Collection",description:"Collect span attributes containing payload data to traces.",docsEndpoint:"/pipeline/rules/payloadcollection",docsDescription:'The "Payload Collection" Rule can be used to add span attributes containing payload data to traces.',supportedLanguages:[Qt.Go]}],An=[{id:wn.Logs,value:"Logs"},{id:wn.Metrics,value:"Metrics"},{id:wn.Traces,value:"Traces"}],Dn=e=>e.charAt(0).toUpperCase()+e.slice(1),Nn=e=>{const t=e=>e.filter(e=>"object"==typeof e&&null!==e?""!==e.key&&""!==e.value:""!==e),n=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>""!==e&&""!==t).map(([e,o])=>Array.isArray(o)?[e,t(o)]:"object"==typeof o&&null!==o?[e,n(o)]:[e,o]));return Object.entries(e).reduce((e,[o,i])=>{try{const a=JSON.parse(i);Array.isArray(a)?e[o]=JSON.stringify(t(a)):e[o]="object"==typeof a&&null!==a?JSON.stringify(n(a)):i}catch(a){"object"==typeof i&&null!==i?Array.isArray(i)?e[o]=JSON.stringify(t(i)):e[o]=JSON.stringify(n(i)):e[o]=i}return e},{})};var In;!function(e){e.SIGNALS="SIGNALS"}(In||(In={}));const On=(e,t,n)=>{if(!e||!e.length)return!0;if(1===e.length)return"true"==e[0];const[o,i,a]=e;if(o===In.SIGNALS)switch(i){case"INCLUDES":return t?.includes(a);case"EXCLUDES":return!t?.includes(a);default:return!0}const r=n.find(e=>e.name===o);if(!r)return!0;switch(i){case"===":case"==":return r.value===a;case"!==":case"!=":return r.value!==a;case">":return Number(r.value)>Number(a);case"<":return Number(r.value)<Number(a);case">=":return Number(r.value)>=Number(a);case"<=":return Number(r.value)<=Number(a);default:return!0}},_n=e=>JSON.parse(JSON.stringify(e)),zn=(e,t)=>{let n=[...e];return t.monitors?.length&&(n=n.filter(e=>!!t.monitors?.find(t=>e.signals?.find(e=>e.toLowerCase()===t.id)))),n},Rn=(e,t)=>{let n=[...e];return t.monitors?.length&&(n=n.filter(e=>!!t.monitors?.find(t=>e.exportedSignals[t.id]))),n},Fn=(e,t)=>t?e.filter(e=>e.dataStreamNames.includes(t)||!e.dataStreamNames.length):[],Ln=(e,t)=>{let n=[...e];return t.namespaces?.length&&(n=n.filter(({namespace:e})=>!!t.namespaces?.find(({id:t})=>t===e))),t.kinds?.length&&(n=n.filter(({kind:e})=>!!t.kinds?.find(({id:t})=>t===e))),t.languages?.length&&(n=n.filter(({containers:e})=>!!t.languages?.find(({id:t})=>!!e?.find(({language:e})=>t===e)))),t.conditions?.length&&(n=n.filter(({conditions:e})=>!!t.conditions?.find(({id:t})=>!!e?.find(({type:e,reason:n})=>t===`${e}#${n}`)))),t.onlyErrors&&(n=n.filter(e=>!!e.conditions?.find(e=>e.status===an.Error))),t.errors?.length&&(n=n.filter(e=>!!t.errors?.find(t=>!!e.conditions?.find(e=>e.message===t.id)))),n},Pn=(e,t)=>t?e.filter(e=>e.dataStreamNames.includes(t)||t===Io&&!e.dataStreamNames.length):[],Mn=(e,t="",n={})=>{for(const o in e)if(e.hasOwnProperty(o)){const i=e[o],a=t?`${t}.${o}`:o;null===i||"object"!=typeof i||Array.isArray(i)?Array.isArray(i)?i.forEach((e,t)=>{const o=`${a}[${t}]`;null!==e&&"object"==typeof e?Mn(e,o,n):n[o]=e}):n[a]=i:Mn(i,a,n)}return n},Bn=e=>{if(!e)return"0 KB/s";const t=Math.floor(Math.log(e)/Math.log(1024));return`${(e/Math.pow(1024,t)).toFixed(0===t?0:1)} ${["Bytes/s","KB/s","MB/s","GB/s","TB/s"][t]}`},jn=e=>{if(!e)return"0 ns";if(e<1e3)return`${e.toFixed(0)} ns`;if(e<1e6){const t=e/1e3;return`${t.toFixed(t<10?2:0)} μs`}if(e<1e9){const t=e/1e6;return`${t.toFixed(t<10?2:0)} ms`}if(e<6e10){const t=e/1e9;return`${t.toFixed(t<10?2:0)} s`}if(e<36e11){const t=e/6e10;return`${t.toFixed(t<10?2:0)} m`}if(e<864e11){const t=e/36e11;return`${t.toFixed(t<10?2:0)} h`}{const t=e/864e11;return`${t.toFixed(t<10?2:0)} d`}},Un=e=>{const t=e?.filter(({status:e})=>e===an.Error),n=e?.filter(({status:e})=>e===an.Warning),o=e?.filter(({status:e})=>e===sn.Disabled),i=e?.filter(({status:e})=>e===sn.Loading),a=t.length>0,r=n.length>0,s=o.length>0;return{errors:t,hasErrors:a,warnings:n,hasWarnings:r,disableds:o,hasDisableds:s,loadings:i,hasLoadings:i.length>0,priorotizedStatus:a?an.Error:r?an.Warning:s?an.Info:void 0}},Wn=e=>{const t=e?.reduce((e,t)=>t.instrumented?e+1:e,0);return`${t}/${e?.length||0} instrumented`},Vn=e=>({[Qt.Java]:p,[Qt.Go]:u,[Qt.JavaScript]:m,[Qt.Python]:h,[Qt.DotNet]:g,[Qt.CSharp]:x,[Qt.CPlusPlus]:f,[Qt.Php]:$,[Qt.Ruby]:y,[Qt.Rust]:b,[Qt.Swift]:w,[Qt.Elixir]:k,[Qt.MySql]:v,[Qt.Nginx]:E,[Qt.Postgres]:S,[Qt.Redis]:C,[Qt.Kafka]:T,[Qt.Ignored]:n,[Qt.Unknown]:n,[Qt.Processing]:n,[Qt.NoContainers]:n,[Qt.NoRunningPods]:n}[e]||n),Hn=e=>e?.map(({language:e})=>Vn(e))||[],qn=(e,t)=>{const n={[gn.Alauda]:A,[gn.AlibabaCloud]:D,[gn.AppDynamics]:N,[gn.Axiom]:I,[gn.AzureBlob]:O,[gn.BetterStack]:_,[gn.Bonree]:z,[gn.Causely]:R,[gn.Checkly]:F,[gn.Chronosphere]:L,[gn.ClickHouse]:P,[gn.CloudWatch]:M,[gn.Coralogix]:B,[gn.Dash0]:j,[gn.Datadog]:U,[gn.Dynamic]:W,[gn.Dynatrace]:V,[gn.ElasticApm]:H,[gn.ElasticSearch]:q,[gn.GoogleCloud]:Y,[gn.GrafanaCloudLoki]:G,[gn.GrafanaCloudPrometheus]:G,[gn.GrafanaCloudTempo]:G,[gn.Greptime]:J,[gn.Groundcover]:K,[gn.Honeycomb]:X,[gn.HyperDX]:Q,[gn.Instana]:Z,[gn.Jaeger]:ee,[gn.Kafka]:T,[gn.Kloudmate]:te,[gn.Last9]:ne,[gn.Lightstep]:oe,[gn.LogzIo]:ie,[gn.Loki]:ae,[gn.Lumigo]:re,[gn.Middleware]:se,[gn.NewRelic]:le,[gn.Observe]:de,[gn.Odigos]:ce,[gn.OneUptime]:pe,[gn.OpenObserve]:ue,[gn.Opsverse]:me,[gn.Oracle]:he,[gn.OTLP]:W,[gn.OTLPHttp]:W,[gn.Prometheus]:ge,[gn.Qryn]:xe,[gn.QrynOss]:fe,[gn.Quickwit]:$e,[gn.S3]:ye,[gn.Seq]:be,[gn.Signoz]:we,[gn.Splunk]:ke,[gn.SplunkSapm]:ke,[gn.SplunkOtlp]:ke,[gn.SumoLogic]:ve,[gn.TelemetryHub]:Ee,[gn.Tempo]:Se,[gn.Tingyun]:Ce,[gn.Traceloop]:Te,[gn.Uptrace]:Ae,[gn.VictoriaMetrics]:De,[gn.VictoriaMetricsCloud]:De,[gn.XRay]:Ne}[e];return n&&!t?{icon:n}:{iconSrc:`https://d15jtxgb40qetw.cloudfront.net/${e}.svg`}},Yn=e=>({[en.Namespace]:Ie,[en.Source]:Oe,[en.Destination]:_e,[en.Action]:ze,[en.InstrumentationRule]:Re}[e]),Gn=e=>"ruleId"in e&&e.ruleId?e.ruleId:"id"in e&&e.id?e.id:"namespace"in e&&e.namespace&&"kind"in e&&e.kind&&"name"in e&&e.name?{namespace:e.namespace,name:e.name,kind:e.kind}:"name"in e&&e.name?e.name:void 0,Jn=(e,t,n)=>{const{extended:o,prioritizeDisplayName:i}=n||{};let a="",r="";switch(t){case en.InstrumentationRule:const t=e;a=t.type,r=t.ruleName;break;case en.Source:const n=e;a=n.name,r=n.otelServiceName;break;case en.Action:const o=e;a=o.type,r=o.name;break;case en.Destination:const i=e;a=i.destinationType.displayName,r=i.name;break;case en.Namespace:const s=e;a=s.name,r=s.name}return o?a+(r&&r!==a?` (${r})`:""):i&&r||a},Kn=(e,t)=>{if(t===en.Source){const t={namespace:"",name:"",kind:""};return e.split("&").forEach(e=>{const[n,o]=e.split("=");t[n]=o}),t}return e},Xn=e=>{const{numberOfInstances:t,containers:n}=e;if(!n)return t&&t>0?Qt.Processing:Qt.NoRunningPods;const o=n?.filter(e=>e.language!==Qt.Ignored);if(!o.length)return Qt.NoContainers;const i=o.find(e=>e.language!==Qt.Unknown);return i?i.language:Qt.Unknown},Qn=(e,t,n)=>(t===en.Source?e?.sources.find(e=>e.kind===n.kind&&e.name===n.name&&e.namespace===n.namespace):e?.destinations.find(e=>e.id===n))||{throughput:0},Zn=e=>({[wn.Logs]:Fe,[wn.Metrics]:Le,[wn.Traces]:Pe}[e]),eo=e=>e?{[Kt.K8s]:o,[Kt.Vm]:Me}[e]:ce,to=e=>e?{[Kt.K8s]:"Kubernetes Cluster",[Kt.Vm]:"Virtual Machine"}[e]:"Unknown",no=(e,t,n)=>{const o=e[t];return o?o.flatMap(e=>{const o=e[n],i=[];return void 0!==o&&(Array.isArray(o)?i.push(...o):i.push(o)),i.push(...no(e,t,n)),i}):[]},oo=(e,t)=>{if(t===en.Source){let t="";return Object.entries(e).forEach(([e,n])=>{t+=`${e}=${n}&`}),t.slice(0,-1),t}return e},io=(e,t)=>({[an.Success]:n=>Be({fill:t.text[e],...n}),[an.Error]:n=>je({fill:t.text[e],...n}),[an.Warning]:n=>Ue({fill:t.text[e],...n}),[an.Info]:n=>We({fill:t.text[e],...n}),[an.Default]:n=>ce({fill:t.text[e],...n})}[e]),ao=(e,t)=>{const n=t.find(([t,n])=>e>=t&&(null===n||e<=n));return n?.[2]||null},ro=({namespace:e,name:t,kind:n})=>({namespace:e,name:t,kind:n});function so(e,t){if(!e)return t;if("object"==typeof e)return e;try{return JSON.parse(e)}catch(e){return t}}const lo=(e,t)=>{const n=[],o=JSON.parse(JSON.stringify(e));for(const e of o){const o=so(t.fields,{}),i=e.items.findIndex(e=>e.type===t.destinationType.type);-1!==i&&n.push(...e.items[i].fields.map(e=>({...e,initialValue:o[e.name]})))}return n},co=(e,t)=>{const n=e=>e?.some(({healthy:e})=>e.status!==an.Success);return e?.length?e.some(({instrumentationInstances:e})=>n(e)):n(t)??!1},po=e=>Array.isArray(e)?!e?.length:"object"==typeof e?!Object.keys(e||{}).length:[void 0,null,""].includes(e),uo=e=>!!e&&(!(e.length>63)&&/^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$/.test(e)),mo=(e,t=0)=>{const n=(new Date).getTime();return new Date(e).getTime()-n<=t},ho=e=>{const t=String(e).trim().toLowerCase();return["true","false","1","0"].includes(t)},go=(e,t=0)=>(new Date).getTime()-new Date(e).getTime()>=t,xo=/^(\d+\.)?(\d+\.)?(\*|\d+)$/,fo=e=>xo.test(e),$o=e=>e?e.replace(/([a-z0-9])([A-Z])/g,"$1 $2"):"",yo=e=>e?.map(({status:e,type:t,reason:n,message:o,lastTransitionTime:i})=>({status:e,type:$o(t),reason:n?$o(n):"",message:o,lastTransitionTime:i}))||[],bo=(e,t)=>{const n=so(e.fields,{});return t.length?t.map(e=>({key:e.name,name:e.displayName||e.name,value:n[e.name]??null})).filter(e=>null!==e.value):Object.entries(n).map(([e,t])=>({key:e,name:e,value:t}))},wo=e=>e?Object.keys(e).filter(t=>e[t]):[],ko=e=>e.replace(/[^\d]/g,""),vo=e=>{const t=String(e).trim().toLowerCase();return"true"===t||"1"===t},Eo=e=>{let t="";try{const n=JSON.parse(e);t=Array.isArray(n)?n.map(e=>"object"==typeof e&&null!==e?`${e.key}: ${e.value}`:e).join(", "):"object"==typeof n&&null!==n?Object.entries(n).map(([e,t])=>`${e}: ${t}`).join(", "):e}catch(n){t=e}return t},So=e=>{if("object"!=typeof e)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach(n=>{const o=e[n];if(Array.isArray(o)){const e=o.filter(e=>null!=e&&""!==e);e.length>0&&(t[n]=e.map(e=>So(e)))}else if("object"==typeof o&&null!==o){const e=So(o);Object.keys(e).length>0&&(t[n]=e)}else[void 0,null,""].includes(o)||(t[n]=o)}),t},Co=(e,t=2)=>JSON.stringify(e||{},null,t),To=async(e=1e3)=>new Promise(t=>setTimeout(t,e)),Ao=e=>Object.entries(e).reduce((e,[t,n])=>(e[t]="string"==typeof n?n:JSON.stringify(n),e),{}),Do={[Qt.Go]:"Go",[Qt.Java]:"Java",[Qt.JavaScript]:"Node.js",[Qt.Python]:"Python",[Qt.DotNet]:".NET",[Qt.CSharp]:"C#",[Qt.CPlusPlus]:"C++",[Qt.Php]:"PHP",[Qt.Ruby]:"Ruby",[Qt.Rust]:"Rust",[Qt.Swift]:"Swift",[Qt.Elixir]:"Elixir",[Qt.MySql]:"MySQL",[Qt.Nginx]:"Nginx",[Qt.Postgres]:"PostgreSQL",[Qt.Redis]:"Redis",[Qt.Kafka]:"Kafka",[Qt.Ignored]:"Ignored",[Qt.Unknown]:"Unknown",[Qt.Processing]:"Processing",[Qt.NoContainers]:"No Containers",[Qt.NoRunningPods]:"No Running Pods"},No=[{id:Qt.Go,value:Do[Qt.Go],icon:Vn(Qt.Go)},{id:Qt.Java,value:Do[Qt.Java],icon:Vn(Qt.Java)},{id:Qt.JavaScript,value:Do[Qt.JavaScript],icon:Vn(Qt.JavaScript)},{id:Qt.Python,value:Do[Qt.Python],icon:Vn(Qt.Python)},{id:Qt.Php,value:Do[Qt.Php],icon:Vn(Qt.Php)},{id:Qt.Ruby,value:Do[Qt.Ruby],icon:Vn(Qt.Ruby)},{id:Qt.Rust,value:Do[Qt.Rust],icon:Vn(Qt.Rust)},{id:Qt.DotNet,value:Do[Qt.DotNet],icon:Vn(Qt.DotNet)},{id:Qt.CSharp,value:Do[Qt.CSharp],icon:Vn(Qt.CSharp)},{id:Qt.CPlusPlus,value:Do[Qt.CPlusPlus],icon:Vn(Qt.CPlusPlus)},{id:Qt.Swift,value:Do[Qt.Swift],icon:Vn(Qt.Swift)},{id:Qt.Elixir,value:Do[Qt.Elixir],icon:Vn(Qt.Elixir)}],Io="default",Oo={SELECTED_DATA_STREAM:"SELECTED_DATA_STREAM",SELECTED_DATA_STREAM_WITH_PROXY:e=>`SELECTED_DATA_STREAM_${e}`,OVERVIEW_FILTERS:"OVERVIEW_FILTERS",DARK_MODE:"DARK_MODE"},_o={REQUIRED_FIELDS:"Required fields are missing",FIELD_IS_REQUIRED:"This field is required",FORBIDDEN:"Forbidden",ENTERPRISE_ONLY:(e="This")=>`${e} is an Enterprise feature. Please upgrade your plan.`,DEFINED_FOR_ALL_STREAMS:e=>`${e} are defined for all Data Streams.`,CANNOT_EDIT_RULE:"Cannot edit a system-managed instrumentation rule",CANNOT_DELETE_RULE:"Cannot delete a system-managed instrumentation rule",LATENCY_HTTP_ROUTE:'HTTP route must start with a forward slash "/"',READONLY_WARNING:"You're not allowed to create/update/delete in readonly mode",ILLEGAL_K8S_LABEL:'Must be 63 characters or less, must consist of alphanumeric characters, "-", "_", or ".", and must start & end with an alphanumeric character (e.g., my-name, 123.abc).',INVALID_VERSION:'Invalid version format, must be in the format of "major.minor.patch" (e.g. 1.0.0)'},zo={NAMESPACE:"Namespace",NAME:"Name",KIND:"Kind",CONNECTION:"Connection",CONNECTIONS:"Connections",DATA_STREAM:"Data Stream",DATA_STREAMS:"Data Streams",STREAM_NAME:"Data Stream Name",NAME_YOUR_STREAM:"Name your Data Stream",NAME_YOUR_STREAM_PLACEHOLDER:"e.g. Highest priority",STREAM_DESCRIPTION:"Provide a clear and descriptive name for your pipeline to ensure its purpose is easily understood by you and your team.",STREAM_CONFIRM:"Confirm your new Data Stream",DATA_STREAM_EXISTS_WARNING:(e,t)=>`A Data Stream with this name already exists, you can still rename the current "${e}", but it will merge into the existing "${t}".`,ACTION:"Action",ACTIONS:"Actions",ADD_ACTION:"Add Action",ACTION_DETAILS:"Action Details",INSTRUMENTATION_RULE:"Instrumentation Rule",INSTRUMENTATION_RULES:"Instrumentation Rules",ADD_INSTRUMENTATION_RULE:"Add Instrumentation Rule",INSTRUMENTATION_RULE_DETAILS:"Instrumentation Rule Details",DESTINATION:"Destination",DESTINATIONS:"Destinations",ADD_DESTINATION:"Add Destination",ADD_DESTINATIONS:"Add Destinations",ADD_DESTINATION_DESCRIPTION:"Add a destination to send your telemetry data to. You can add multiple destinations.",DESTINATION_DETAILS:"Destination Details",SELECTED_DESTINATIONS:"Selected Destinations",SOURCE:"Source",SOURCES:"Sources",ADD_SOURCE:"Add Source",SOURCE_DETAILS:"Source Details",SELECT_SOURCES:"Select Sources",SELECTED_SOURCES:"Selected Sources",SELECT_SOURCES_DESCRIPTION:"Choose which sources to monitor in your pipeline by searching by source name or namespace.",NO_SOURCES:"No sources",NO_SOURCES_GO_BACK:"No sources selected. Please go back to select sources.",PLEASE_ADD_SOURCE:"Please add a source",NO_SOURCES_NAMESPACE:"No sources available in this namespace",TRY_SEARCH_OR_OTHER_NAMESPACE:"Try searching again or select another namespace.",PLEASE_MAKE_SURE_UNIGNORED_NAMESPACES:"Please make sure your cluster has unignored namespaces",INSTALLATION:"Installation",SUMMARY:"Summary",TYPE:"Type",NOTES:"Notes",STATUS:"Status",READONLY:"Readonly",LANGUAGE:"Language",VERSION:"Version",RUNTIME_VERSION:"Runtime Version",VERSION_PLACEHOLDER:"1.0.0",MONITORS:"Monitors",SIGNALS_FOR_PROCESSING:"Signals for Processing",MANAGED_BY_PROFILE:"Managed by Profile",TIER:"Tier",ENTERPRISE:"Enterprise",ENTERPRISE_TIER:"Enterprise Tier",COMMUNITY:"Community",COMMUNITY_TIER:"Community Tier",API_TOKEN:"API Token",API_TOKENS:"API Tokens",DESCRIBE_ODIGOS:"Describe Odigos",DESCRIBE_SOURCE:"Describe Source",DETECTED_CONTAINERS:"Detected Containers",DETECTED_CONTAINERS_DESCRIPTION:"The system automatically instruments the containers it detects with a supported programming language.",CONTAINER_NAME:"Container Name",FILTERED_COUNT_TOOLTIP:"Represents filtered amount, out of total amount",SEARCH_NAMESPACES:"Search Namespaces",SEARCH_SOURCES:"Search Sources",SELECT_ALL:"Select All",ONLY_SELECTED:"Only selected",ONLY_RUNNING_INSTANCES:"Only running instances",TO_COLLECT_OTEL_DATA:"To collect OpenTelemetry data",TO_MONITOR_OTEL_DATA:"To monitor OpenTelemetry data",TO_MODIFY_OTEL_DATA:"To modify OpenTelemetry data",QUICK_BACK_TO_SUMMARY:"When you finish editing you can quickly go back to the summary.",GO_TO_SUMMARY:"Go to summary",FUTURE_APPS_TITLE:"Auto-instrument new apps",FUTURE_APPS_DESCRIPTION:"When enabled, new applications will be instrumented automatically and included in the current data stream.",OVERIDE:"Override",OVERIDDEN:"Overridden",OVERRIDE_RUNTIME_DETAILS:"Override Runtime Details",OVERRIDE_RUNTIME_WARNING:"This is an advanced configuration. If the selected programming language is incorrect, data collection may be incomplete or may not occur at all.",ACTIVE:"Active",INACTIVE:"Inactive",ENABLED:"Enabled",DISABLED:"Disabled",NO_TRACES_FOUND:"No traces found",ARE_SERVICES_INSTRUMENTED_AND_PRODUCING_TRAFFIC:"Are your services instrumented & producing traffic?"},Ro={ADD:"Add",ADD_NEW:"Add New",NEW:"New",SELECT:"Select",CREATE:"Create",UPDATE:"Update",EDIT:"Edit",DELETE:"Delete",CANCEL:"Cancel",DONE:"Done",SAVE:"Save",BACK:"Back",NEXT:"Next",TEST:"Test",TEST_CONNECTION:"Test Connection",INSTRUMENT:"Instrument",UNINSTRUMENT:"Uninstrument"},Fo=6048e5,Lo=lt()(yt(e=>({darkMode:!0,setDarkMode:t=>e({darkMode:t})}),{name:Oo.DARK_MODE,storage:"undefined"!=typeof window?bt(()=>localStorage):void 0})),Po={dataStreamsLoading:!1,dataStreams:[],selectedStreamName:""},Mo=lt(e=>({...Po,setDataStreamsLoading:t=>e({dataStreamsLoading:t}),setDataStreams:t=>e({dataStreams:t}),addDataStreams:t=>e(e=>{const n=[...e.dataStreams,...t].map(e=>[e.name,e]);return{dataStreams:Array.from(new Map(n).values())}}),removeDataStreams:t=>e(e=>({dataStreams:e.dataStreams.filter(e=>!t.find(t=>t.name===e.name))})),setSelectedStreamName:t=>e({selectedStreamName:t}),resetDataStreamStore:()=>e(Po)})),Bo=lt(e=>({drawerType:null,drawerEntityId:null,setDrawerType:t=>e({drawerType:t}),setDrawerEntityId:t=>e({drawerEntityId:t})})),jo=lt(e=>({namespacesLoading:!1,namespaces:[],sourcesLoading:!1,sources:[],destinationsLoading:!1,destinations:[],actionsLoading:!1,actions:[],instrumentationRulesLoading:!1,instrumentationRules:[],setEntitiesLoading:(t,n)=>{const o=t===en.Namespace?"namespacesLoading":t===en.Source?"sourcesLoading":t===en.Destination?"destinationsLoading":t===en.Action?"actionsLoading":t===en.InstrumentationRule?"instrumentationRulesLoading":"NONE";"NONE"!==o&&e({[o]:n})},setEntities:(t,n)=>{const o=t===en.Namespace?"namespaces":t===en.Source?"sources":t===en.Destination?"destinations":t===en.Action?"actions":t===en.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==o&&e({[o]:n})},addEntities:(t,n)=>{const o=t===en.Namespace?"namespaces":t===en.Source?"sources":t===en.Destination?"destinations":t===en.Action?"actions":t===en.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==o&&e(e=>{const t=[...e[o]];return n.forEach(e=>{const n=t.findIndex(t=>JSON.stringify(Gn(t))===JSON.stringify(Gn(e)));-1!==n?t[n]={...t[n],...e}:t.push(e)}),{[o]:t}})},removeEntities:(t,n)=>{const o=t===en.Namespace?"namespaces":t===en.Source?"sources":t===en.Destination?"destinations":t===en.Action?"actions":t===en.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==o&&e(e=>{const i=[...e[o]];return n.forEach(e=>{const n=i.findIndex(n=>t===en.Source?JSON.stringify(Gn(n))===JSON.stringify(Gn(e)):Gn(n)===e);-1!==n&&i.splice(n,1)}),{[o]:i}})},resetEntityStore:()=>{e({namespacesLoading:!1,namespaces:[],sourcesLoading:!1,sources:[],destinationsLoading:!1,destinations:[],actionsLoading:!1,actions:[],instrumentationRulesLoading:!1,instrumentationRules:[]})}})),Uo=()=>({searchText:"",statuses:[],platformTypes:[],namespaces:[],kinds:[],monitors:[],languages:[],conditions:[],errors:[],onlyErrors:!1}),Wo=lt(e=>({searchText:"",setSearchText:t=>e({searchText:t}),statuses:[],setStatuses:t=>e({statuses:t}),platformTypes:[],setPlatformTypes:t=>e({platformTypes:t}),namespaces:[],setNamespaces:t=>e({namespaces:t}),kinds:[],setKinds:t=>e({kinds:t}),monitors:[],setMonitors:t=>e({monitors:t}),languages:[],setLanguages:t=>e({languages:t}),conditions:[],setConditions:t=>e({conditions:t}),errors:[],setErrors:t=>e({errors:t}),onlyErrors:!1,setOnlyErrors:t=>e({onlyErrors:t}),setAll:t=>e(t),clearAll:()=>e({searchText:"",statuses:[],platformTypes:[],namespaces:[],kinds:[],monitors:[],languages:[],conditions:[],errors:[],onlyErrors:!1}),getEmptyState:Uo})),Vo=lt(e=>({isAwaitingInstrumentation:!1,sourcesToCreate:0,sourcesCreated:0,sourcesToDelete:0,sourcesDeleted:0,setInstrumentAwait:t=>e({isAwaitingInstrumentation:t}),setInstrumentCount:(t,n)=>e({[t]:n})})),Ho=lt(e=>({currentModal:"",setCurrentModal:t=>e({currentModal:t})})),qo=lt((e,t)=>({notifications:[],addNotification:n=>{const o=new Date,i=`${o.getTime().toString()}${n.target?`#${n.target}`:""}`,{notifications:a}=t();a.some(e=>e.type===n.type&&e.title===n.title&&e.message===n.message&&!e.dismissed)||e(e=>({notifications:[{...n,id:i,time:o.toISOString(),dismissed:!1,seen:!1},...e.notifications]}))},markAsDismissed:t=>{e(e=>{const n=e.notifications.findIndex(e=>e.id===t);return-1!==n&&(e.notifications[n].dismissed=!0),{notifications:e.notifications}})},markAsSeen:t=>{e(e=>{const n=e.notifications.findIndex(e=>e.id===t);return-1!==n&&(e.notifications[n].seen=!0),{notifications:e.notifications}})},removeNotification:t=>{e(e=>{const n=e.notifications.findIndex(e=>e.id===t);return-1!==n&&e.notifications.splice(n,1),{notifications:e.notifications}})},removeNotifications:t=>{t&&e(e=>({notifications:e.notifications.filter(e=>e.id.split("#")[1]!==t)}))}})),Yo=(e,t)=>{const n=e.entityType===t.entityType,o="string"==typeof e.entityId&&"string"==typeof t.entityId?e.entityId===t.entityId:"object"==typeof e.entityId&&"object"==typeof t.entityId?e.entityId.namespace===t.entityId.namespace&&e.entityId.name===t.entityId.name&&e.entityId.kind===t.entityId.kind:!e.entityId&&!t.entityId;return n&&o},Go=lt((e,t)=>({pendingItems:[],setPendingItems:t=>e({pendingItems:t}),addPendingItems:t=>e(e=>({pendingItems:e.pendingItems.concat(t.filter(t=>!e.pendingItems.some(e=>Yo(e,t))))})),removePendingItems:t=>e(e=>({pendingItems:e.pendingItems.filter(e=>!t.find(t=>Yo(e,t)))})),isThisPending:e=>{const{pendingItems:n}=t();let o=!1;for(let t=0;t<n.length;t++){const i=n[t];if(i.entityType===e.entityType&&(!e.entityId||(i.entityType===en.Source?i.entityId&&e.entityId&&i.entityId.namespace===e.entityId.namespace&&i.entityId.name===e.entityId.name&&i.entityId.kind===e.entityId.kind:i.entityId===e.entityId))){o=!0;break}}return o}})),Jo=lt(e=>({selectedSources:{},setSelectedSources:t=>e({selectedSources:t}),resetSelectedState:()=>e(()=>({selectedSources:{}}))})),Ko={availableSources:{},configuredSources:{},configuredFutureApps:{},configuredDestinations:[],configuredDestinationsUpdateOnly:[]},Xo=(e,t)=>e.destinationType.type!==t.destinationType.type,Qo=lt(e=>({...Ko,setAvailableSources:t=>e({availableSources:t}),setConfiguredSources:t=>e({configuredSources:t}),setConfiguredFutureApps:t=>e({configuredFutureApps:t}),setConfiguredDestinations:t=>e({configuredDestinations:t}),addConfiguredDestination:t=>e(e=>({configuredDestinations:[...e.configuredDestinations,t]})),removeConfiguredDestination:t=>e(e=>({configuredDestinations:e.configuredDestinations.filter(e=>Xo(e,t))})),setConfiguredDestinationsUpdateOnly:t=>e({configuredDestinationsUpdateOnly:t}),addConfiguredDestinationUpdateOnly:t=>e(e=>{const n=[...e.configuredDestinationsUpdateOnly,t].map(e=>[e.id,e]);return{configuredDestinationsUpdateOnly:Array.from(new Map(n).values())}}),removeConfiguredDestinationUpdateOnly:t=>e(e=>({configuredDestinationsUpdateOnly:e.configuredDestinationsUpdateOnly.filter(e=>Xo(e,t))})),resetState:()=>e(()=>({...Ko}))})),Zo={colors:{majestic_blue:"#444AD9",majestic_blue_soft:"#6C7AE8",orange_og:"#FE9239",orange_soft:"#FFB160",dark_red:"#802828",darker_red:"#611F1F",darkest_red:"#281515",darkest_red_hover:"#351515",dark_green:"#2D4323"},text:{},font_family:{primary:"Inter, sans-serif",secondary:"Kode Mono, sans-serif",code:"IBM Plex Mono, monospace"}},ei={darkMode:!0,colors:{...Zo.colors,primary:"#111111",secondary:"#F9F9F9",border:"#525252",dark_grey:"#151515",translucent_bg:"#1A1A1A",dropdown_bg:"#242424",dropdown_bg_2:"#333333",warning:"#472300",error:"#431919",success:"#172013",info:"#242424",default:"#181944"},text:{white:"#FFFFFF",primary:"#111111",secondary:"#F9F9F9",grey:"#B8B8B8",dark_grey:"#8F8F8F",darker_grey:"#7A7A7A",light_grey:"#CCD0D2",dark_button:"#0A1824",warning:"#E9CF35",warning_secondary:"#FFA349",error:"#EF7676",error_secondary:"#DB5151",success:"#81AF65",success_secondary:"#51DB51",info:"#B8B8B8",info_secondary:"#CCDDDD",default:"#AABEF7",default_secondary:"#8CBEFF"},font_family:Zo.font_family},ti={darkMode:!1,colors:{...Zo.colors,primary:"#EEEEEE",secondary:"#060606",border:"#ADADAD",dark_grey:"#EAEAEA",translucent_bg:"#E5E5E5",dropdown_bg:"#DBDBDB",dropdown_bg_2:"#CCCCCC",warning:"#F6F092",error:"#FACECE",success:"#C8DEB8",info:"#E0E0E0",default:"#CAD9FB"},text:{white:"#FFFFFF",primary:"#EEEEEE",secondary:"#060606",grey:"#474747",dark_grey:"#707070",darker_grey:"#858585",light_grey:"#332F2D",dark_button:"#F5E7DB",warning:"#A56F12",warning_secondary:"#CA9416",error:"#B63A3A",error_secondary:"#DB5151",success:"#4E763A",success_secondary:"#67964C",info:"#525252",info_secondary:"#7A7A7A",default:"#444AD9",default_secondary:"#6C7AE8"},font_family:Zo.font_family},ni=e=>e?ei:ti;wt('@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=Kode+Mono:wght@100;200;300;400;500;600;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap");*{-ms-overflow-style:none;scrollbar-width:none}::-webkit-scrollbar{display:none}svg{transition:all .3s}input{all:unset}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{-webkit-transition:all 50000s ease-in-out 0s;transition:all 50000s ease-in-out 0s}');const oi={in:{left:St`
2
2
  from { transform: translateX(-100%); }
3
3
  to { transform: translateX(0); }
4
4
  `,right:St`
@@ -284,7 +284,7 @@ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as n,K8sLogo as o,Add
284
284
  `,ji=vt.div`
285
285
  padding: ${({$padding:e})=>void 0!==e?e:"12px"};
286
286
  border-top: 1px solid ${({theme:e})=>e.colors.border};
287
- `,Ui=gt(({isOpen:e,asPortal:t,...n},o)=>{const i=pt(()=>{const{children:e,top:i,bottom:a,left:r,right:s,borderRadius:l,padding:d,maxWidth:c,width:p,header:u,footer:m,withPointerEvents:h,...g}=n;return dt.createElement(Pi,{ref:o,$top:i,$bottom:a,$left:r,$right:s,$borderRadius:l,$padding:d,$maxWidth:c,$width:p,$asPortal:t,$withPointerEvents:h,...g},u&&dt.createElement(Mi,{$padding:d},u),dt.createElement(Bi,{$padding:d},e),m&&dt.createElement(ji,{$padding:d},m))},[o,n,t]);return e?t?Rt.createPortal(i,document.body):i:null});Ui.displayName=Ui.name;const Wi=e=>{function t(){return void 0===e?{}:JSON.parse(JSON.stringify(e))}const[n,o]=ut(t()),[i,a]=ut({}),r=pt(()=>void 0!==e&&JSON.stringify(n)!==JSON.stringify(e),[e,n]);return mt(()=>{void 0!==e&&"{}"===JSON.stringify(n)&&o(t())},[e,n]),{formData:n,formErrors:i,isFormDirty:r,handleFormChange:(e,t,n)=>{if(e){const n=e.toString().split(".");1===n.length?o(n=>({...n,[e]:t})):o(e=>{const o=_n(e);let i=o;for(let e=0;e<n.length-1;e++){const t=n[e];i[t]&&"object"==typeof i[t]||(i[t]={}),i=i[t]}return i[n[n.length-1]]=t,o})}else n&&o({...n})},handleErrorChange:(e,t,n)=>{e?a(n=>({...n,[e]:t})):n&&a({...n})},resetFormData:()=>{o(t()),a({})}}},Vi={type:"",name:"",notes:"",signals:[],disabled:!1,clusterAttributes:null,overwriteExistingValues:!1,renames:null,attributeNamesToDelete:null,piiCategories:null,fallbackSamplingRatio:null,samplingPercentage:null,endpointsFilters:null,servicesNameFilters:null,attributeFilters:null},Hi=()=>{const{addNotification:e}=qo(),{formData:t,formErrors:n,handleFormChange:o,handleErrorChange:i,resetFormData:a}=Wi(Vi);return{formData:t,formErrors:n,handleFormChange:o,resetFormData:a,validateForm:n=>{const o={};let a=!0;return Object.entries(t).forEach(([e,n])=>{switch(e){case"type":case"signals":po(n)&&(o[e]=_o.FIELD_IS_REQUIRED);break;case Vt.ClusterAttributes:t.type===Wt.AddClusterInfo&&po(n)&&(o[e]=_o.FIELD_IS_REQUIRED);break;case Vt.Renames:t.type===Wt.RenameAttributes&&po(n)&&(o[e]=_o.FIELD_IS_REQUIRED);break;case Vt.AttributeNamesToDelete:t.type===Wt.DeleteAttributes&&po(n)&&(o[e]=_o.FIELD_IS_REQUIRED);break;case Vt.PiiCategories:t.type===Wt.PiiMasking&&po(n)&&(o[e]=_o.FIELD_IS_REQUIRED);break;case Vt.FallbackSamplingRatio:t.type===Wt.ErrorSampler&&po(n)&&(o[e]=_o.FIELD_IS_REQUIRED);break;case Vt.SamplingPercentage:t.type===Wt.ProbabilisticSampler&&po(n)&&(o[e]=_o.FIELD_IS_REQUIRED);break;case Vt.EndpointsFilters:t.type===Wt.LatencySampler&&(po(n)&&(o[e]=_o.FIELD_IS_REQUIRED),n?.forEach(t=>{"/"!==t.httpRoute.charAt(0)&&(o[e]=_o.LATENCY_HTTP_ROUTE)}));break;case Vt.ServicesNameFilters:t.type===Wt.ServiceNameSampler&&(po(n)&&(o[e]=_o.FIELD_IS_REQUIRED),n?.forEach(t=>{po(t)&&(o[e]=_o.FIELD_IS_REQUIRED)}));break;case Vt.AttributeFilters:t.type===Wt.SpanAttributeSampler&&po(n)&&(o[e]=_o.FIELD_IS_REQUIRED)}}),a=!Object.values(o).length,!a&&n?.withAlert&&e({type:an.Warning,title:n.alertTitle,message:_o.REQUIRED_FIELDS,hideFromHistory:!0}),i(void 0,void 0,o),a},loadFormWithDrawerItem:({type:e,spec:t})=>{const n={...Vi,type:e};Object.entries(t).forEach(([e,t])=>{if(t)switch(e){case"actionName":n.name=t;break;case"type":case"notes":case"signals":case"disabled":case Vt.CollectContainerAttributes:case Vt.CollectReplicaSetAttributes:case Vt.CollectWorkloadId:case Vt.CollectClusterId:case Vt.LabelsAttributes:case Vt.AnnotationsAttributes:case Vt.ClusterAttributes:case Vt.OverwriteExistingValues:case Vt.AttributeNamesToDelete:case Vt.Renames:case Vt.PiiCategories:case Vt.FallbackSamplingRatio:case Vt.SamplingPercentage:case Vt.EndpointsFilters:case Vt.ServicesNameFilters:case Vt.AttributeFilters:n[e]=t}}),o(void 0,void 0,n)}}},qi=()=>{const{setCurrentModal:e}=Ho(),{setDrawerType:t,setDrawerEntityId:n}=Bo(),{setActiveNodeType:o,setActiveNodeId:i,activeNodeId:a}=Bt();return{onClickNode:(r,s)=>{const{id:l,type:d,data:{id:c,type:p}}=s;switch(a===l?(o(null),i(null)):(o(d),i(l)),p){case en.Source:case en.Destination:case en.Action:case en.InstrumentationRule:t(p),n(c);break;case hn.AddSource:e(en.Source);break;case hn.AddDestination:e(en.Destination);break;case hn.AddAction:e(en.Action);break;case hn.AddRule:e(en.InstrumentationRule)}}}},Yi=()=>{const{setDrawerType:e,setDrawerEntityId:t}=Bo(),{markAsDismissed:n,markAsSeen:o}=qo();return{onClickNotification:(i,a)=>{const{id:r,crdType:s,target:l}=i,{dismissToast:d}=a||{};if(s&&l)switch(s){case en.InstrumentationRule:e(en.InstrumentationRule),t(Kn(l,en.InstrumentationRule));break;case en.Source:case"InstrumentationConfig":case"InstrumentationInstance":e(en.Source),t(Kn(l,en.Source));break;case en.Action:e(en.Action),t(Kn(l,en.Action));break;case en.Destination:case"Destination":e(en.Destination),t(Kn(l,en.Destination))}o(r),d&&n(r)}}},Gi=()=>{const e=ht(null),[t,n]=ut(0),[o,i]=ut(0);return mt(()=>{const t=()=>{if(e.current){const{width:t,height:o}=e.current.getBoundingClientRect();n(t),i(o)}};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),{containerRef:e,containerWidth:t,containerHeight:o}},Ji=()=>{const[e,t]=ut(!1),[n,o]=ut(-1);return{isCopied:e,copiedIndex:n,clickCopy:async(n,i)=>{if(!e){if(t(!0),void 0!==i&&o(i),navigator?.clipboard&&navigator.clipboard.writeText)try{await navigator.clipboard.writeText(n)}catch(e){}else{const e=document.createElement("textarea");e.value=n,document.body.appendChild(e),e.select();try{document.execCommand("copy")}catch(e){}document.body.removeChild(e)}setTimeout(()=>{t(!1),o(-1)},1e3)}}}},Ki=e=>{const{addNotification:t}=qo(),{formData:n,handleFormChange:o,formErrors:i,handleErrorChange:a,resetFormData:r}=Wi(e);return{formData:n,formErrors:i,handleFormChange:o,resetFormData:r,validateForm:e=>{const o={};let i=!0;return n.name?uo(n.name)?o.name=void 0:(i=!1,o.name=_o.ILLEGAL_K8S_LABEL):(i=!1,o.name=_o.FIELD_IS_REQUIRED),!i&&e?.withAlert&&t({type:an.Warning,title:e.alertTitle,message:_o.REQUIRED_FIELDS,hideFromHistory:!0}),a(void 0,void 0,o),i},loadFormWithDrawerItem:({name:t})=>{const n={...e,name:t};o(void 0,void 0,n)}}},Xi={type:"",name:"",exportedSignals:{logs:!1,metrics:!1,traces:!1},fields:[],disabled:!1},Qi=e=>{const{supportedSignals:t,preLoadedFields:n}=e||{},{addNotification:o}=qo(),{formData:i,formErrors:a,handleFormChange:r,handleErrorChange:s,resetFormData:l}=Wi(Xi),[d,c]=ut([]),[p,u]=ut([]);return mt(()=>{var e;u(d?(e=d,e.filter(e=>!!e).map(e=>{const{name:t,componentType:n,componentProperties:o,displayName:i,initialValue:a,renderCondition:r}=e;if(n===nn.Dropdown){const e=so(o,{}),s=Array.isArray(e.values)?e.values.map(e=>({id:e,value:e})):Object.entries(e.values).map(([e,t])=>({id:e,value:t}));return{name:t,componentType:n,title:i,value:a,placeholder:e.placeholder||"Select an option",options:s,renderCondition:r,...e}}return{name:t,componentType:n,title:i,value:a,renderCondition:r,...so(o,{})}})).map(e=>{if(n){const t="string"==typeof n?so(n,{}):n;if(e.name in t)return{...e,value:t[e.name]}}return e}):[])},[d,n]),mt(()=>{if(p){const e=p.map(e=>({key:e.name,value:e.value}));r("fields",e)}},[p]),mt(()=>{if(t&&0===wo(i.exportedSignals).length){const{logs:e,metrics:n,traces:o}=t;r("exportedSignals",{logs:e.supported,metrics:n.supported,traces:o.supported})}},[t,i]),{formData:i,formErrors:a,handleFormChange:r,resetFormData:l,validateForm:e=>{const t={};let n=!0;return p.forEach(({name:e,value:o,required:i})=>{i&&!o&&(n=!1,t[e]=_o.FIELD_IS_REQUIRED)}),!n&&e?.withAlert&&o({type:an.Warning,title:e.alertTitle,message:_o.REQUIRED_FIELDS,hideFromHistory:!0}),s(void 0,void 0,t),n},loadFormWithDrawerItem:({destinationType:{type:e},name:t,disabled:n,exportedSignals:o,fields:i})=>{const a={...Xi,type:e,name:t,disabled:n,exportedSignals:o,fields:Object.entries(so(i,{})).map(([e,t])=>({key:e,value:t}))};return r(void 0,void 0,a),a},yamlFields:d,setYamlFields:c,dynamicFields:p,setDynamicFields:u}},Zi={ruleName:"",notes:"",disabled:!1,workloads:null,instrumentationLibraries:null,payloadCollection:{[bn.HttpRequest]:null,[bn.HttpResponse]:null,[bn.DbQuery]:null,[bn.Messaging]:null},codeAttributes:{[fn.Column]:null,[fn.FilePath]:null,[fn.Function]:null,[fn.LineNumber]:null,[fn.Namespace]:null,[fn.StackTrace]:null},headersCollection:null,customInstrumentations:{[yn.Probes]:null}},ea=()=>{const{formData:e,formErrors:t,handleFormChange:n,handleErrorChange:o,resetFormData:i}=Wi(Zi);return{formData:e,formErrors:t,handleFormChange:n,resetFormData:i,validateForm:()=>(o(void 0,void 0,{}),!0),loadFormWithDrawerItem:({ruleName:e,notes:t,disabled:o,payloadCollection:i,codeAttributes:a,headersCollection:r,customInstrumentations:s})=>{const l={...Zi,ruleName:e,notes:t,disabled:o};i&&(l.payloadCollection={[bn.HttpRequest]:i[bn.HttpRequest]?{}:null,[bn.HttpResponse]:i[bn.HttpResponse]?{}:null,[bn.DbQuery]:i[bn.DbQuery]?{}:null,[bn.Messaging]:i[bn.Messaging]?{}:null}),a&&(l.codeAttributes={[fn.Column]:a[fn.Column]||null,[fn.FilePath]:a[fn.FilePath]||null,[fn.Function]:a[fn.Function]||null,[fn.LineNumber]:a[fn.LineNumber]||null,[fn.Namespace]:a[fn.Namespace]||null,[fn.StackTrace]:a[fn.StackTrace]||null}),r&&(l.headersCollection=r),s&&(l.customInstrumentations={[yn.Probes]:s[yn.Probes]||null}),n(void 0,void 0,l)}}},ta=({active:e,key:t,withAltKey:n,withCtrlKey:o,withShiftKey:i,withMetaKey:a},r)=>(mt(()=>{const s=s=>{e&&t===s.key&&(!n||n&&s.altKey)&&(!o||o&&s.ctrlKey)&&(!i||i&&s.shiftKey)&&(!a||a&&s.metaKey)&&(s.preventDefault(),s.stopPropagation(),r(s))};return window.addEventListener("keydown",s),()=>{window.removeEventListener("keydown",s)}},[t,e,n,o,i,a,r]),null),na=(e,t)=>{mt(()=>{const n=n=>{e.current&&!e.current.contains(n.target)&&t()};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}},[e,t])},oa=({defaultClientHeight:e=0,defaultClientwidth:t=0,onClickOutside:n}={})=>{const o=ht(null),[i,a]=ut(!1),[r,s]=ut({top:0,left:0});return na(o,()=>{i&&(a(!1),n?.())}),{popupRef:o,popupOpen:i,setPopupOpen:a,popupPosition:r,handlePosition:(n,i)=>{const{innerWidth:a,innerHeight:r}=window;let l=i,d=n;l>=r/2&&(l+=-(o.current?.clientHeight||e)),d>=a/2&&(d+=-(o.current?.clientWidth||t)),s({top:l,left:d})}}},ia=()=>({getItemSS:(e,t)=>{const n=sessionStorage.getItem(e);return n?so(n,t):t},setItemSS:(e,t)=>{sessionStorage.setItem(e,JSON.stringify(t))},removeItemSS:e=>{sessionStorage.removeItem(e)}}),aa={otelServiceName:"",currentStreamName:""},ra=()=>{const{formData:e,formErrors:t,handleFormChange:n,handleErrorChange:o,resetFormData:i}=Wi(aa);return{formData:e,formErrors:t,handleFormChange:n,resetFormData:i,validateForm:()=>(o(void 0,void 0,{}),!0),loadFormWithDrawerItem:({otelServiceName:e,name:t})=>{const o={...aa,otelServiceName:e||t||""};n(void 0,void 0,o)}}},sa=(e,t,n)=>{const o="boolean"==typeof n,i=e.dataStreamNames?.includes(t)||e.currentStreamName===t,a=(o?n:e.selected)||!1;return{namespace:e.namespace,name:e.name,kind:e.kind,selected:!(!i&&!o)&&a,numberOfInstances:e.numberOfInstances}},la=(e,t,n)=>({...sa(e,t,n),currentStreamName:t}),da=(e,t,n)=>{const o="boolean"==typeof n,i=e.dataStreamNames?.includes(t),a=(o?n:e.selected)||!1;return{namespace:e.name,selected:!(!i&&!o)&&a,currentStreamName:t}},ca=e=>{const{fetchSingleNamespace:t}=e||{},{namespaces:n}=jo(),{selectedStreamName:o}=Mo(),i=ht(!1),{configuredSources:a,configuredFutureApps:r,availableSources:s}=Qo(),[l,d]=ut(s),[c,p]=ut(!1),[u,m]=ut(!1),[h,g]=ut([]),[x,f]=ut(""),[$,y]=ut(r),[b,w]=ut(((e,t,n)=>{const o={};return Object.entries(e).forEach(([e,t])=>{o[e]=t.map(e=>la(e,n))}),Object.entries(t).forEach(([e,t])=>{t.forEach(t=>{const i=o[e].findIndex(e=>e.name===t.name&&e.kind===t.kind),a=la(t,n);-1!==i?o[e][i]=a:o[e].push(a)})}),o})(s,a,o)),k=async(e,n)=>{if(t)if(h.includes(e.name))w(t=>({...t,[e.name]:t[e.name].map(e=>({...e,selected:"boolean"==typeof n?n:e.selected,currentStreamName:o}))}));else{const{data:i}=await t({variables:{namespaceName:e.name}}),{name:a,sources:r=[]}=i?.computePlatform?.k8sActualNamespace||{};if(!a)return;g(e=>[...e,a]),d(e=>({...e,[a]:r.map(e=>sa(e,o))})),w(e=>({...e,[a]:"boolean"!=typeof n&&e[a]?.length?e[a]:r.map(e=>la(e,o,n))}))}};mt(()=>(i.current=!0,n?.length&&(d(e=>{const t={...e};return n.forEach(({name:e})=>t[e]=t[e]||[]),t}),w(e=>{const t={...e};return n.forEach(({name:e})=>t[e]=t[e]||[]),t}),y(e=>{const t={...e};return n.forEach(e=>t[e.name]=t[e.name]||da(e,o)),t}),(async()=>{p(!0);for await(const e of n)i.current&&await k(e);p(!1)})()),()=>{i.current=!1}),[n,o]);const[v,E]=ut(""),[S,C]=ut(en.Source),[T,A]=ut(!1),[D,N]=ut(!1),I=pt(()=>{const e=(e,t)=>!v||S!==t||S===t&&e.toLowerCase().includes(v),t={};return Object.entries(b).filter(([t])=>e(t,en.Namespace)).forEach(([n,o])=>{const i=o.filter(t=>e(t.name,en.Source)&&(!T||t.selected)&&(e=>!D||(e.numberOfInstances||0)>0)(t));i.length&&(t[n]=i)}),t},[b,v,S,T,D]);return{isFetchingEachNamespace:c,fetchedNamespaces:h,availableSources:l,filteredNamespacesAndSources:I,getApiSourcesPayload:()=>{const e={};return Object.entries(b).forEach(([t,n])=>{n.forEach(n=>{const o=l[t]?.find(e=>e.name===n.name&&e.kind===n.kind);o?.selected!==n.selected&&(e[t]||(e[t]=[]),e[t].push(n))})}),e},getApiFutureAppsPayload:()=>{const e={};return Object.entries($).forEach(([t,i])=>{const a=n?.find(e=>e.name===t);(i.selected&&!a?.dataStreamNames?.includes(o)||!i.selected&&a?.dataStreamNames?.includes(o))&&(e[t]=i)}),e},selectedNamespace:x,onSelectNamespace:(e,t)=>{const o=n.find(t=>t.name===e);if(o){const n="boolean"==typeof t;f(t=>t!==e||n?e:""),k(o,t),n&&m(!1)}},selectedAllNamespaces:u,onSelectAllNamespaces:e=>{m(e),n.forEach(t=>k(t,e))},selectedSources:b,onSelectSource:(e,t)=>{const n=t||x;if(!n)return;const i=[...b[n]||[]],a=i.findIndex(({name:t,kind:n})=>t===e.name&&n===e.kind);if(-1!==a){const e={...i[a],selected:!i[a].selected,currentStreamName:o};i[a]=e}else i.push({...e,selected:!0,currentStreamName:o});w(e=>({...e,[n]:i})),m(!1)},selectedFutureApps:$,onSelectFutureApps:(e,t)=>{const i=t||x;if(!i)return;const a=n.find(e=>e.name===t);a&&y(t=>({...t,[i]:da(a,o,e)}))},searchText:v,setSearchText:E,searchBy:S,setSearchBy:C,showSelectedOnly:T,setShowSelectedOnly:A,showRunningOnly:D,setShowRunningOnly:N}};$t.addDefaultLocale(kt);const pa=()=>new $t("en-US"),ua=({container:e,animateIn:t,animateOut:n,duration:o=300})=>{const i=vt(e)`
287
+ `,Ui=gt(({isOpen:e,asPortal:t,...n},o)=>{const i=pt(()=>{const{children:e,top:i,bottom:a,left:r,right:s,borderRadius:l,padding:d,maxWidth:c,width:p,header:u,footer:m,withPointerEvents:h,...g}=n;return dt.createElement(Pi,{ref:o,$top:i,$bottom:a,$left:r,$right:s,$borderRadius:l,$padding:d,$maxWidth:c,$width:p,$asPortal:t,$withPointerEvents:h,...g},u&&dt.createElement(Mi,{$padding:d},u),dt.createElement(Bi,{$padding:d},e),m&&dt.createElement(ji,{$padding:d},m))},[o,n,t]);return e?t?Rt.createPortal(i,document.body):i:null});Ui.displayName=Ui.name;const Wi=e=>{function t(){return void 0===e?{}:JSON.parse(JSON.stringify(e))}const[n,o]=ut(t()),[i,a]=ut({}),r=pt(()=>void 0!==e&&JSON.stringify(n)!==JSON.stringify(e),[e,n]);return mt(()=>{void 0!==e&&"{}"===JSON.stringify(n)&&o(t())},[e,n]),{formData:n,formErrors:i,isFormDirty:r,handleFormChange:(e,t,n)=>{if(e){const n=e.toString().split(".");1===n.length?o(n=>({...n,[e]:t})):o(e=>{const o=_n(e);let i=o;for(let e=0;e<n.length-1;e++){const t=n[e];i[t]&&"object"==typeof i[t]||(i[t]={}),i=i[t]}return i[n[n.length-1]]=t,o})}else n&&o({...n})},handleErrorChange:(e,t,n)=>{e?a(n=>({...n,[e]:t})):n&&a({...n})},resetFormData:()=>{o(t()),a({})}}},Vi={type:"",name:"",notes:"",signals:[],disabled:!1,fields:{clusterAttributes:null,overwriteExistingValues:!1,renames:null,attributeNamesToDelete:null,piiCategories:null,fallbackSamplingRatio:null,samplingPercentage:null,endpointsFilters:null,servicesNameFilters:null,attributeFilters:null}},Hi=()=>{const{addNotification:e}=qo(),{formData:t,formErrors:n,handleFormChange:o,handleErrorChange:i,resetFormData:a}=Wi(Vi);return{formData:t,formErrors:n,handleFormChange:o,resetFormData:a,validateForm:n=>{const o={};let a=!0;return Object.entries(t).forEach(([e,n])=>{switch(e){case"type":case"signals":po(n)&&(o[e]=_o.FIELD_IS_REQUIRED);break;case"fields":switch(t.type){case Ut.K8sAttributes:case Ut.AddClusterInfo:case Ut.RenameAttributes:case Ut.DeleteAttributes:case Ut.PiiMasking:case Ut.ErrorSampler:case Ut.ProbabilisticSampler:po(n)&&(o[e]=_o.FIELD_IS_REQUIRED);break;case Ut.LatencySampler:po(n)&&(o[e]=_o.FIELD_IS_REQUIRED),n?.forEach(t=>{"/"!==t.httpRoute.charAt(0)&&(o[e]=_o.LATENCY_HTTP_ROUTE)});break;case Ut.ServiceNameSampler:po(n)&&(o[e]=_o.FIELD_IS_REQUIRED),n?.forEach(t=>{po(t)&&(o[e]=_o.FIELD_IS_REQUIRED)});break;case Ut.SpanAttributeSampler:po(n)&&(o[e]=_o.FIELD_IS_REQUIRED)}}}),a=!Object.values(o).length,!a&&n?.withAlert&&e({type:an.Warning,title:n.alertTitle,message:_o.REQUIRED_FIELDS,hideFromHistory:!0}),i(void 0,void 0,o),a},loadFormWithDrawerItem:({type:e,fields:t})=>{const n={...Vi,type:e};Object.entries(t).forEach(([e,t])=>{if(t)switch(e){case"actionName":n.name=t;break;case"type":case"notes":case"signals":case"disabled":n[e]=t;break;case Wt.CollectContainerAttributes:case Wt.CollectReplicaSetAttributes:case Wt.CollectWorkloadId:case Wt.CollectClusterId:case Wt.LabelsAttributes:case Wt.AnnotationsAttributes:case Wt.ClusterAttributes:case Wt.OverwriteExistingValues:case Wt.AttributeNamesToDelete:case Wt.Renames:case Wt.PiiCategories:case Wt.FallbackSamplingRatio:case Wt.SamplingPercentage:case Wt.EndpointsFilters:case Wt.ServicesNameFilters:case Wt.AttributeFilters:n.fields[e]=t}}),o(void 0,void 0,n)}}},qi=()=>{const{setCurrentModal:e}=Ho(),{setDrawerType:t,setDrawerEntityId:n}=Bo(),{setActiveNodeType:o,setActiveNodeId:i,activeNodeId:a}=Bt();return{onClickNode:(r,s)=>{const{id:l,type:d,data:{id:c,type:p}}=s;switch(a===l?(o(null),i(null)):(o(d),i(l)),p){case en.Source:case en.Destination:case en.Action:case en.InstrumentationRule:t(p),n(c);break;case hn.AddSource:e(en.Source);break;case hn.AddDestination:e(en.Destination);break;case hn.AddAction:e(en.Action);break;case hn.AddRule:e(en.InstrumentationRule)}}}},Yi=()=>{const{setDrawerType:e,setDrawerEntityId:t}=Bo(),{markAsDismissed:n,markAsSeen:o}=qo();return{onClickNotification:(i,a)=>{const{id:r,crdType:s,target:l}=i,{dismissToast:d}=a||{};if(s&&l)switch(s){case en.InstrumentationRule:e(en.InstrumentationRule),t(Kn(l,en.InstrumentationRule));break;case en.Source:case"InstrumentationConfig":case"InstrumentationInstance":e(en.Source),t(Kn(l,en.Source));break;case en.Action:e(en.Action),t(Kn(l,en.Action));break;case en.Destination:case"Destination":e(en.Destination),t(Kn(l,en.Destination))}o(r),d&&n(r)}}},Gi=()=>{const e=ht(null),[t,n]=ut(0),[o,i]=ut(0);return mt(()=>{const t=()=>{if(e.current){const{width:t,height:o}=e.current.getBoundingClientRect();n(t),i(o)}};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),{containerRef:e,containerWidth:t,containerHeight:o}},Ji=()=>{const[e,t]=ut(!1),[n,o]=ut(-1);return{isCopied:e,copiedIndex:n,clickCopy:async(n,i)=>{if(!e){if(t(!0),void 0!==i&&o(i),navigator?.clipboard&&navigator.clipboard.writeText)try{await navigator.clipboard.writeText(n)}catch(e){}else{const e=document.createElement("textarea");e.value=n,document.body.appendChild(e),e.select();try{document.execCommand("copy")}catch(e){}document.body.removeChild(e)}setTimeout(()=>{t(!1),o(-1)},1e3)}}}},Ki=e=>{const{addNotification:t}=qo(),{formData:n,handleFormChange:o,formErrors:i,handleErrorChange:a,resetFormData:r}=Wi(e);return{formData:n,formErrors:i,handleFormChange:o,resetFormData:r,validateForm:e=>{const o={};let i=!0;return n.name?uo(n.name)?o.name=void 0:(i=!1,o.name=_o.ILLEGAL_K8S_LABEL):(i=!1,o.name=_o.FIELD_IS_REQUIRED),!i&&e?.withAlert&&t({type:an.Warning,title:e.alertTitle,message:_o.REQUIRED_FIELDS,hideFromHistory:!0}),a(void 0,void 0,o),i},loadFormWithDrawerItem:({name:t})=>{const n={...e,name:t};o(void 0,void 0,n)}}},Xi={type:"",name:"",exportedSignals:{logs:!1,metrics:!1,traces:!1},fields:[],disabled:!1},Qi=e=>{const{supportedSignals:t,preLoadedFields:n}=e||{},{addNotification:o}=qo(),{formData:i,formErrors:a,handleFormChange:r,handleErrorChange:s,resetFormData:l}=Wi(Xi),[d,c]=ut([]),[p,u]=ut([]);return mt(()=>{var e;u(d?(e=d,e.filter(e=>!!e).map(e=>{const{name:t,componentType:n,componentProperties:o,displayName:i,initialValue:a,renderCondition:r}=e;if(n===nn.Dropdown){const e=so(o,{}),s=Array.isArray(e.values)?e.values.map(e=>({id:e,value:e})):Object.entries(e.values).map(([e,t])=>({id:e,value:t}));return{name:t,componentType:n,title:i,value:a,placeholder:e.placeholder||"Select an option",options:s,renderCondition:r,...e}}return{name:t,componentType:n,title:i,value:a,renderCondition:r,...so(o,{})}})).map(e=>{if(n){const t="string"==typeof n?so(n,{}):n;if(e.name in t)return{...e,value:t[e.name]}}return e}):[])},[d,n]),mt(()=>{if(p){const e=p.map(e=>({key:e.name,value:e.value}));r("fields",e)}},[p]),mt(()=>{if(t&&0===wo(i.exportedSignals).length){const{logs:e,metrics:n,traces:o}=t;r("exportedSignals",{logs:e.supported,metrics:n.supported,traces:o.supported})}},[t,i]),{formData:i,formErrors:a,handleFormChange:r,resetFormData:l,validateForm:e=>{const t={};let n=!0;return p.forEach(({name:e,value:o,required:i})=>{i&&!o&&(n=!1,t[e]=_o.FIELD_IS_REQUIRED)}),!n&&e?.withAlert&&o({type:an.Warning,title:e.alertTitle,message:_o.REQUIRED_FIELDS,hideFromHistory:!0}),s(void 0,void 0,t),n},loadFormWithDrawerItem:({destinationType:{type:e},name:t,disabled:n,exportedSignals:o,fields:i})=>{const a={...Xi,type:e,name:t,disabled:n,exportedSignals:o,fields:Object.entries(so(i,{})).map(([e,t])=>({key:e,value:t}))};return r(void 0,void 0,a),a},yamlFields:d,setYamlFields:c,dynamicFields:p,setDynamicFields:u}},Zi={ruleName:"",notes:"",disabled:!1,workloads:null,instrumentationLibraries:null,payloadCollection:{[bn.HttpRequest]:null,[bn.HttpResponse]:null,[bn.DbQuery]:null,[bn.Messaging]:null},codeAttributes:{[fn.Column]:null,[fn.FilePath]:null,[fn.Function]:null,[fn.LineNumber]:null,[fn.Namespace]:null,[fn.StackTrace]:null},headersCollection:null,customInstrumentations:{[yn.Probes]:null}},ea=()=>{const{formData:e,formErrors:t,handleFormChange:n,handleErrorChange:o,resetFormData:i}=Wi(Zi);return{formData:e,formErrors:t,handleFormChange:n,resetFormData:i,validateForm:()=>(o(void 0,void 0,{}),!0),loadFormWithDrawerItem:({ruleName:e,notes:t,disabled:o,payloadCollection:i,codeAttributes:a,headersCollection:r,customInstrumentations:s})=>{const l={...Zi,ruleName:e,notes:t,disabled:o};i&&(l.payloadCollection={[bn.HttpRequest]:i[bn.HttpRequest]?{}:null,[bn.HttpResponse]:i[bn.HttpResponse]?{}:null,[bn.DbQuery]:i[bn.DbQuery]?{}:null,[bn.Messaging]:i[bn.Messaging]?{}:null}),a&&(l.codeAttributes={[fn.Column]:a[fn.Column]||null,[fn.FilePath]:a[fn.FilePath]||null,[fn.Function]:a[fn.Function]||null,[fn.LineNumber]:a[fn.LineNumber]||null,[fn.Namespace]:a[fn.Namespace]||null,[fn.StackTrace]:a[fn.StackTrace]||null}),r&&(l.headersCollection=r),s&&(l.customInstrumentations={[yn.Probes]:s[yn.Probes]||null}),n(void 0,void 0,l)}}},ta=({active:e,key:t,withAltKey:n,withCtrlKey:o,withShiftKey:i,withMetaKey:a},r)=>(mt(()=>{const s=s=>{e&&t===s.key&&(!n||n&&s.altKey)&&(!o||o&&s.ctrlKey)&&(!i||i&&s.shiftKey)&&(!a||a&&s.metaKey)&&(s.preventDefault(),s.stopPropagation(),r(s))};return window.addEventListener("keydown",s),()=>{window.removeEventListener("keydown",s)}},[t,e,n,o,i,a,r]),null),na=(e,t)=>{mt(()=>{const n=n=>{e.current&&!e.current.contains(n.target)&&t()};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}},[e,t])},oa=({defaultClientHeight:e=0,defaultClientwidth:t=0,onClickOutside:n}={})=>{const o=ht(null),[i,a]=ut(!1),[r,s]=ut({top:0,left:0});return na(o,()=>{i&&(a(!1),n?.())}),{popupRef:o,popupOpen:i,setPopupOpen:a,popupPosition:r,handlePosition:(n,i)=>{const{innerWidth:a,innerHeight:r}=window;let l=i,d=n;l>=r/2&&(l+=-(o.current?.clientHeight||e)),d>=a/2&&(d+=-(o.current?.clientWidth||t)),s({top:l,left:d})}}},ia=()=>({getItemSS:(e,t)=>{const n=sessionStorage.getItem(e);return n?so(n,t):t},setItemSS:(e,t)=>{sessionStorage.setItem(e,JSON.stringify(t))},removeItemSS:e=>{sessionStorage.removeItem(e)}}),aa={otelServiceName:"",currentStreamName:""},ra=()=>{const{formData:e,formErrors:t,handleFormChange:n,handleErrorChange:o,resetFormData:i}=Wi(aa);return{formData:e,formErrors:t,handleFormChange:n,resetFormData:i,validateForm:()=>(o(void 0,void 0,{}),!0),loadFormWithDrawerItem:({otelServiceName:e,name:t})=>{const o={...aa,otelServiceName:e||t||""};n(void 0,void 0,o)}}},sa=(e,t,n)=>{const o="boolean"==typeof n,i=e.dataStreamNames?.includes(t)||e.currentStreamName===t,a=(o?n:e.selected)||!1;return{namespace:e.namespace,name:e.name,kind:e.kind,selected:!(!i&&!o)&&a,numberOfInstances:e.numberOfInstances}},la=(e,t,n)=>({...sa(e,t,n),currentStreamName:t}),da=(e,t,n)=>{const o="boolean"==typeof n,i=e.dataStreamNames?.includes(t),a=(o?n:e.selected)||!1;return{namespace:e.name,selected:!(!i&&!o)&&a,currentStreamName:t}},ca=e=>{const{fetchSingleNamespace:t}=e||{},{namespaces:n}=jo(),{selectedStreamName:o}=Mo(),i=ht(!1),{configuredSources:a,configuredFutureApps:r,availableSources:s}=Qo(),[l,d]=ut(s),[c,p]=ut(!1),[u,m]=ut(!1),[h,g]=ut([]),[x,f]=ut(""),[$,y]=ut(r),[b,w]=ut(((e,t,n)=>{const o={};return Object.entries(e).forEach(([e,t])=>{o[e]=t.map(e=>la(e,n))}),Object.entries(t).forEach(([e,t])=>{t.forEach(t=>{const i=o[e].findIndex(e=>e.name===t.name&&e.kind===t.kind),a=la(t,n);-1!==i?o[e][i]=a:o[e].push(a)})}),o})(s,a,o)),k=async(e,n)=>{if(t)if(h.includes(e.name))w(t=>({...t,[e.name]:t[e.name].map(e=>({...e,selected:"boolean"==typeof n?n:e.selected,currentStreamName:o}))}));else{const{data:i}=await t({variables:{namespaceName:e.name}}),{name:a,sources:r=[]}=i?.computePlatform?.k8sActualNamespace||{};if(!a)return;g(e=>[...e,a]),d(e=>({...e,[a]:r.map(e=>sa(e,o))})),w(e=>({...e,[a]:"boolean"!=typeof n&&e[a]?.length?e[a]:r.map(e=>la(e,o,n))}))}};mt(()=>(i.current=!0,n?.length&&(d(e=>{const t={...e};return n.forEach(({name:e})=>t[e]=t[e]||[]),t}),w(e=>{const t={...e};return n.forEach(({name:e})=>t[e]=t[e]||[]),t}),y(e=>{const t={...e};return n.forEach(e=>t[e.name]=t[e.name]||da(e,o)),t}),(async()=>{p(!0);for await(const e of n)i.current&&await k(e);p(!1)})()),()=>{i.current=!1}),[n,o]);const[v,E]=ut(""),[S,C]=ut(en.Source),[T,A]=ut(!1),[D,N]=ut(!1),I=pt(()=>{const e=(e,t)=>!v||S!==t||S===t&&e.toLowerCase().includes(v),t={};return Object.entries(b).filter(([t])=>e(t,en.Namespace)).forEach(([n,o])=>{const i=o.filter(t=>e(t.name,en.Source)&&(!T||t.selected)&&(e=>!D||(e.numberOfInstances||0)>0)(t));i.length&&(t[n]=i)}),t},[b,v,S,T,D]);return{isFetchingEachNamespace:c,fetchedNamespaces:h,availableSources:l,filteredNamespacesAndSources:I,getApiSourcesPayload:()=>{const e={};return Object.entries(b).forEach(([t,n])=>{n.forEach(n=>{const o=l[t]?.find(e=>e.name===n.name&&e.kind===n.kind);o?.selected!==n.selected&&(e[t]||(e[t]=[]),e[t].push(n))})}),e},getApiFutureAppsPayload:()=>{const e={};return Object.entries($).forEach(([t,i])=>{const a=n?.find(e=>e.name===t);(i.selected&&!a?.dataStreamNames?.includes(o)||!i.selected&&a?.dataStreamNames?.includes(o))&&(e[t]=i)}),e},selectedNamespace:x,onSelectNamespace:(e,t)=>{const o=n.find(t=>t.name===e);if(o){const n="boolean"==typeof t;f(t=>t!==e||n?e:""),k(o,t),n&&m(!1)}},selectedAllNamespaces:u,onSelectAllNamespaces:e=>{m(e),n.forEach(t=>k(t,e))},selectedSources:b,onSelectSource:(e,t)=>{const n=t||x;if(!n)return;const i=[...b[n]||[]],a=i.findIndex(({name:t,kind:n})=>t===e.name&&n===e.kind);if(-1!==a){const e={...i[a],selected:!i[a].selected,currentStreamName:o};i[a]=e}else i.push({...e,selected:!0,currentStreamName:o});w(e=>({...e,[n]:i})),m(!1)},selectedFutureApps:$,onSelectFutureApps:(e,t)=>{const i=t||x;if(!i)return;const a=n.find(e=>e.name===t);a&&y(t=>({...t,[i]:da(a,o,e)}))},searchText:v,setSearchText:E,searchBy:S,setSearchBy:C,showSelectedOnly:T,setShowSelectedOnly:A,showRunningOnly:D,setShowRunningOnly:N}};$t.addDefaultLocale(kt);const pa=()=>new $t("en-US"),ua=({container:e,animateIn:t,animateOut:n,duration:o=300})=>{const i=vt(e)`
288
288
  animation-name: ${({$isEntering:e,$isLeaving:o})=>e?t:o?n:"none"};
289
289
  animation-duration: ${o}ms;
290
290
  animation-fill-mode: forwards;
@@ -1601,4 +1601,4 @@ import{SamplerIcon as e,PiiMaskingIcon as t,ImageErrorIcon as n,K8sLogo as o,Add
1601
1601
  width: 250px;
1602
1602
  `,Qc=vt.div`
1603
1603
  margin-bottom: 12px;
1604
- `,Zc=({isOpen:e,noOverlay:t,title:n="",description:o="",note:i,approveButton:a,denyButton:r,closeOnEscape:s=!0})=>{ta({key:"Enter",active:e&&s},()=>a.onClick());const l=()=>r.onClick();return dt.createElement(Yd,{isOpen:e,noOverlay:t,onClose:l},dt.createElement(qc,null,dt.createElement(Gc,null,n),dt.createElement(Yc,{$withNote:!!i},dt.createElement(Jc,null,o)),!!i&&dt.createElement(Qc,null,dt.createElement(lc,{type:i.type,title:i.title,message:i.message})),dt.createElement(Kc,null,dt.createElement(Xc,{"data-id":"approve",variant:a.variant||"primary",onClick:()=>a.onClick()},a.text),dt.createElement(Xc,{"data-id":"deny",variant:r.variant||"secondary",onClick:l},r.text))))};export{Ea as $,Wt as A,Ro as B,Ta as C,zo as D,en as E,Bl as F,Qa as G,ll as H,Yl as I,Zt as J,jt as K,ha as L,Kd as M,Ho as N,Yd as O,Zd as P,$a as Q,lc as R,wc as S,si as T,_o as U,Di as V,er as W,Un as X,ar as Y,ma as Z,yo as _,Ks as a,Qo as a$,sn as a0,io as a1,Wo as a2,zn as a3,$r as a4,Jn as a5,vr as a6,ya as a7,ba as a8,ns as a9,qi as aA,oa as aB,Ui as aC,Ec as aD,xa as aE,Gn as aF,na as aG,$o as aH,od as aI,Do as aJ,An as aK,Fi as aL,Oo as aM,ia as aN,Ki as aO,Io as aP,dr as aQ,Ha as aR,rr as aS,mr as aT,bo as aU,On as aV,so as aW,Wa as aX,wn as aY,Qi as aZ,lo as a_,Yn as aa,wa as ab,Js as ac,ga as ad,Ql as ae,Hc as af,Oi as ag,To as ah,un as ai,Bn as aj,mn as ak,Pr as al,hn as am,Cn as an,Hn as ao,ao as ap,wo as aq,qn as ar,Mo as as,Vo as at,Gi as au,Pn as av,Ln as aw,Fn as ax,Rn as ay,Os as az,gi as b,Xn as b$,Dn as b0,Dr as b1,Sn as b2,_n as b3,Oc as b4,tl as b5,Qn as b6,$n as b7,yn as b8,fn as b9,mo as bA,Ji as bB,Wi as bC,pc as bD,cn as bE,pn as bF,dn as bG,Xt as bH,Lo as bI,jn as bJ,Na as bK,no as bL,gr as bM,Ut as bN,Ht as bO,qt as bP,Yt as bQ,Gt as bR,Jt as bS,Kt as bT,tn as bU,rn as bV,ln as bW,gn as bX,Nn as bY,Mn as bZ,Kn as b_,bn as ba,xn as bb,Rc as bc,Vn as bd,ea as be,Tn as bf,ua as bg,Jo as bh,ro as bi,pa as bj,Yi as bk,ur as bl,kd as bm,co as bn,pr as bo,Rr as bp,Lr as bq,ho as br,vo as bs,ra as bt,Fs as bu,kn as bv,Qt as bw,ca as bx,wr as by,Wn as bz,Vt as c,Zn as c0,eo as c1,to as c2,oo as c3,uo as c4,go as c5,fo as c6,ko as c7,Eo as c8,So as c9,pi as cA,Zc as cB,fa as cC,Co as ca,Ao as cb,No as cc,Fo as cd,Bt as ce,Wr as cf,Hr as cg,Yr as ch,Jr as ci,ls as cj,ys as ck,ps as cl,es as cm,Ts as cn,ms as co,La as cp,ml as cq,Cl as cr,Ol as cs,hd as ct,yd as cu,xr as cv,Ss as cw,yl as cx,di as cy,ci as cz,on as d,Id as e,Uc as f,Pd as g,Td as h,po as i,nn as j,ui as k,fc as l,xl as m,Mc as n,qo as o,Bo as p,ta as q,Fl as r,hl as s,Li as t,Go as u,an as v,jo as w,Hi as x,En as y,vn as z};
1604
+ `,Zc=({isOpen:e,noOverlay:t,title:n="",description:o="",note:i,approveButton:a,denyButton:r,closeOnEscape:s=!0})=>{ta({key:"Enter",active:e&&s},()=>a.onClick());const l=()=>r.onClick();return dt.createElement(Yd,{isOpen:e,noOverlay:t,onClose:l},dt.createElement(qc,null,dt.createElement(Gc,null,n),dt.createElement(Yc,{$withNote:!!i},dt.createElement(Jc,null,o)),!!i&&dt.createElement(Qc,null,dt.createElement(lc,{type:i.type,title:i.title,message:i.message})),dt.createElement(Kc,null,dt.createElement(Xc,{"data-id":"approve",variant:a.variant||"primary",onClick:()=>a.onClick()},a.text),dt.createElement(Xc,{"data-id":"deny",variant:r.variant||"secondary",onClick:l},r.text))))};export{Ea as $,Ut as A,Ro as B,Ta as C,zo as D,en as E,Bl as F,Qa as G,ll as H,Yl as I,Zt as J,Vt as K,ha as L,Kd as M,Ho as N,Yd as O,Zd as P,$a as Q,lc as R,wc as S,si as T,_o as U,Di as V,er as W,Un as X,ar as Y,ma as Z,yo as _,Ks as a,Qo as a$,sn as a0,io as a1,Wo as a2,zn as a3,$r as a4,Jn as a5,vr as a6,ya as a7,ba as a8,ns as a9,qi as aA,oa as aB,Ui as aC,Ec as aD,xa as aE,Gn as aF,na as aG,$o as aH,od as aI,Do as aJ,An as aK,Fi as aL,Oo as aM,ia as aN,Ki as aO,Io as aP,dr as aQ,Ha as aR,rr as aS,mr as aT,bo as aU,On as aV,so as aW,Wa as aX,wn as aY,Qi as aZ,lo as a_,Yn as aa,wa as ab,Js as ac,ga as ad,Ql as ae,Hc as af,Oi as ag,To as ah,un as ai,Bn as aj,mn as ak,Pr as al,hn as am,Cn as an,Hn as ao,ao as ap,wo as aq,qn as ar,Mo as as,Vo as at,Gi as au,Pn as av,Ln as aw,Fn as ax,Rn as ay,Os as az,gi as b,Xn as b$,Dn as b0,Dr as b1,Sn as b2,_n as b3,Oc as b4,tl as b5,Qn as b6,$n as b7,yn as b8,fn as b9,mo as bA,Ji as bB,Wi as bC,pc as bD,cn as bE,pn as bF,dn as bG,Xt as bH,Lo as bI,jn as bJ,Na as bK,no as bL,gr as bM,jt as bN,Ht as bO,qt as bP,Yt as bQ,Gt as bR,Jt as bS,Kt as bT,tn as bU,rn as bV,ln as bW,gn as bX,Nn as bY,Mn as bZ,Kn as b_,bn as ba,xn as bb,Rc as bc,Vn as bd,ea as be,Tn as bf,ua as bg,Jo as bh,ro as bi,pa as bj,Yi as bk,ur as bl,kd as bm,co as bn,pr as bo,Rr as bp,Lr as bq,ho as br,vo as bs,ra as bt,Fs as bu,kn as bv,Qt as bw,ca as bx,wr as by,Wn as bz,Wt as c,Zn as c0,eo as c1,to as c2,oo as c3,uo as c4,go as c5,fo as c6,ko as c7,Eo as c8,So as c9,pi as cA,Zc as cB,fa as cC,Co as ca,Ao as cb,No as cc,Fo as cd,Bt as ce,Wr as cf,Hr as cg,Yr as ch,Jr as ci,ls as cj,ys as ck,ps as cl,es as cm,Ts as cn,ms as co,La as cp,ml as cq,Cl as cr,Ol as cs,hd as ct,yd as cu,xr as cv,Ss as cw,yl as cx,di as cy,ci as cz,on as d,Id as e,Uc as f,Pd as g,Td as h,po as i,nn as j,ui as k,fc as l,xl as m,Mc as n,qo as o,Bo as p,ta as q,Fl as r,hl as s,Li as t,Go as u,an as v,jo as w,Hi as x,En as y,vn as z};
package/lib/components.js CHANGED
@@ -1 +1 @@
1
- export{V as AutocompleteInput,ag as Badge,aL as Button,t as CancelWarning,ad as CenterThis,C as Checkbox,cp as Code,G as ConditionDetails,H as DataCard,a as DataCardFieldTypes,b5 as DataCardFields,cq as DataFinger,b1 as DataTab,s as DeleteWarning,bp as DescribeRow,W as Divider,m as DocsButton,r as Drawer,cs as DrawerFooter,cr as DrawerHeader,aI as Dropdown,ct as ErrorBoundary,aR as ExtendArrow,aX as FadeLoader,b as FieldError,F as FieldLabel,L as FlexColumn,Z as FlexRow,cu as Header,aQ as IconButton,by as IconGroup,a9 as IconTitleBadge,a4 as IconWrapped,bm as IconsNav,cv as ImageControlled,I as Input,h as InputList,e as InputTable,ac as InteractiveTable,g as KeyValueInputsList,O as Modal,Q as ModalBody,M as MonitorsCheckboxes,a6 as MonitorsIcons,P as NavigationButtons,ae as NoDataFound,R as NotificationNote,cC as Overlay,aC as Popup,bD as PopupForm,bM as ScrollX,l as SectionTitle,S as Segment,aD as SelectionButton,cw as SkeletonLoader,Y as Status,b4 as Stepper,cx as TabList,a7 as TableContainer,a8 as TableTitleWrap,ab as TableWrap,bc as Tag,k as Text,n as TextArea,f as Toggle,bK as ToggleCodeComponent,$ as Tooltip,af as TraceLoader,aE as VerticalScroll,cB as WarningModal,cy as getLinksFromText,cz as getStrongsFromText,cA as renderText}from"./chunks/ui-components-8a8d1358.js";import"./icons.js";import"react";import"zustand";import"javascript-time-ago";import"./chunks/vendor-1dea551d.js";import"styled-components";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";
1
+ export{V as AutocompleteInput,ag as Badge,aL as Button,t as CancelWarning,ad as CenterThis,C as Checkbox,cp as Code,G as ConditionDetails,H as DataCard,a as DataCardFieldTypes,b5 as DataCardFields,cq as DataFinger,b1 as DataTab,s as DeleteWarning,bp as DescribeRow,W as Divider,m as DocsButton,r as Drawer,cs as DrawerFooter,cr as DrawerHeader,aI as Dropdown,ct as ErrorBoundary,aR as ExtendArrow,aX as FadeLoader,b as FieldError,F as FieldLabel,L as FlexColumn,Z as FlexRow,cu as Header,aQ as IconButton,by as IconGroup,a9 as IconTitleBadge,a4 as IconWrapped,bm as IconsNav,cv as ImageControlled,I as Input,h as InputList,e as InputTable,ac as InteractiveTable,g as KeyValueInputsList,O as Modal,Q as ModalBody,M as MonitorsCheckboxes,a6 as MonitorsIcons,P as NavigationButtons,ae as NoDataFound,R as NotificationNote,cC as Overlay,aC as Popup,bD as PopupForm,bM as ScrollX,l as SectionTitle,S as Segment,aD as SelectionButton,cw as SkeletonLoader,Y as Status,b4 as Stepper,cx as TabList,a7 as TableContainer,a8 as TableTitleWrap,ab as TableWrap,bc as Tag,k as Text,n as TextArea,f as Toggle,bK as ToggleCodeComponent,$ as Tooltip,af as TraceLoader,aE as VerticalScroll,cB as WarningModal,cy as getLinksFromText,cz as getStrongsFromText,cA as renderText}from"./chunks/ui-components-71ed0e2b.js";import"./icons.js";import"react";import"zustand";import"javascript-time-ago";import"./chunks/vendor-1dea551d.js";import"styled-components";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";
package/lib/constants.js CHANGED
@@ -1 +1 @@
1
- export{y as ACTION_OPTIONS,B as BUTTON_TEXTS,aP as DEFAULT_DATA_STREAM_NAME,b2 as DESTINATION_CATEGORIES,aJ as DISPLAY_LANGUAGES,D as DISPLAY_TITLES,U as FORM_ALERTS,bf as INSTRUMENTATION_RULE_OPTIONS,cc as LANGUAGE_OPTIONS,aK as MONITORS_OPTIONS,aM as STORAGE_KEYS,cd as TOKEN_ABOUT_TO_EXPIRE}from"./chunks/ui-components-8a8d1358.js";import"./icons.js";import"react";import"zustand";import"javascript-time-ago";import"./chunks/vendor-1dea551d.js";import"styled-components";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";
1
+ export{y as ACTION_OPTIONS,B as BUTTON_TEXTS,aP as DEFAULT_DATA_STREAM_NAME,b2 as DESTINATION_CATEGORIES,aJ as DISPLAY_LANGUAGES,D as DISPLAY_TITLES,U as FORM_ALERTS,bf as INSTRUMENTATION_RULE_OPTIONS,cc as LANGUAGE_OPTIONS,aK as MONITORS_OPTIONS,aM as STORAGE_KEYS,cd as TOKEN_ABOUT_TO_EXPIRE}from"./chunks/ui-components-71ed0e2b.js";import"./icons.js";import"react";import"zustand";import"javascript-time-ago";import"./chunks/vendor-1dea551d.js";import"styled-components";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";
@@ -1,5 +1,5 @@
1
1
  import { type FC } from 'react';
2
2
  import { type ActionFormData, type CustomFieldProps } from '@/types';
3
- type AddClusterInfoProps = CustomFieldProps<ActionFormData>;
3
+ type AddClusterInfoProps = CustomFieldProps<ActionFormData['fields']>;
4
4
  declare const AddClusterInfo: FC<AddClusterInfoProps>;
5
5
  export { AddClusterInfo, type AddClusterInfoProps };
@@ -1,5 +1,5 @@
1
1
  import { type FC } from 'react';
2
2
  import { type ActionFormData, type CustomFieldProps } from '@/types';
3
- type DeleteAttributesProps = CustomFieldProps<ActionFormData>;
3
+ type DeleteAttributesProps = CustomFieldProps<ActionFormData['fields']>;
4
4
  declare const DeleteAttributes: FC<DeleteAttributesProps>;
5
5
  export { DeleteAttributes, type DeleteAttributesProps };
@@ -1,5 +1,5 @@
1
1
  import { type FC } from 'react';
2
2
  import { type ActionFormData, type CustomFieldProps } from '@/types';
3
- type ErrorSamplerProps = CustomFieldProps<ActionFormData>;
3
+ type ErrorSamplerProps = CustomFieldProps<ActionFormData['fields']>;
4
4
  declare const ErrorSampler: FC<ErrorSamplerProps>;
5
5
  export { ErrorSampler, type ErrorSamplerProps };
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { ActionType, type ActionFormData, type CustomFieldProps } from '@/types';
3
- interface CustomFieldsProps extends CustomFieldProps<ActionFormData> {
3
+ interface CustomFieldsProps extends CustomFieldProps<ActionFormData['fields']> {
4
4
  actionType?: ActionType;
5
5
  }
6
6
  declare const CustomFields: React.FC<CustomFieldsProps>;
@@ -1,5 +1,5 @@
1
1
  import { type FC } from 'react';
2
2
  import { type ActionFormData, type CustomFieldProps } from '@/types';
3
- type K8sAttributesProps = CustomFieldProps<ActionFormData>;
3
+ type K8sAttributesProps = CustomFieldProps<ActionFormData['fields']>;
4
4
  declare const K8sAttributes: FC<K8sAttributesProps>;
5
5
  export { K8sAttributes, type K8sAttributesProps };
@@ -1,5 +1,5 @@
1
1
  import { type FC } from 'react';
2
2
  import { type ActionFormData, type CustomFieldProps } from '@/types';
3
- type LatencySamplerProps = CustomFieldProps<ActionFormData>;
3
+ type LatencySamplerProps = CustomFieldProps<ActionFormData['fields']>;
4
4
  declare const LatencySampler: FC<LatencySamplerProps>;
5
5
  export { LatencySampler, type LatencySamplerProps };
@@ -1,5 +1,5 @@
1
1
  import { type FC } from 'react';
2
2
  import { type ActionFormData, type CustomFieldProps } from '@/types';
3
- type PiiMaskingProps = CustomFieldProps<ActionFormData>;
3
+ type PiiMaskingProps = CustomFieldProps<ActionFormData['fields']>;
4
4
  declare const PiiMasking: FC<PiiMaskingProps>;
5
5
  export { PiiMasking, type PiiMaskingProps };
@@ -1,5 +1,5 @@
1
1
  import { type FC } from 'react';
2
2
  import { type ActionFormData, type CustomFieldProps } from '@/types';
3
- type ProbabilisticSamplerProps = CustomFieldProps<ActionFormData>;
3
+ type ProbabilisticSamplerProps = CustomFieldProps<ActionFormData['fields']>;
4
4
  declare const ProbabilisticSampler: FC<ProbabilisticSamplerProps>;
5
5
  export { ProbabilisticSampler, type ProbabilisticSamplerProps };
@@ -1,5 +1,5 @@
1
1
  import { type FC } from 'react';
2
2
  import { type ActionFormData, type CustomFieldProps } from '@/types';
3
- type RenameAttributesProps = CustomFieldProps<ActionFormData>;
3
+ type RenameAttributesProps = CustomFieldProps<ActionFormData['fields']>;
4
4
  declare const RenameAttributes: FC<RenameAttributesProps>;
5
5
  export { RenameAttributes, type RenameAttributesProps };
@@ -1,5 +1,5 @@
1
1
  import { type FC } from 'react';
2
2
  import { type ActionFormData, type CustomFieldProps } from '@/types';
3
- type ServiceNameSamplerProps = CustomFieldProps<ActionFormData>;
3
+ type ServiceNameSamplerProps = CustomFieldProps<ActionFormData['fields']>;
4
4
  declare const ServiceNameSampler: FC<ServiceNameSamplerProps>;
5
5
  export { ServiceNameSampler, type ServiceNameSamplerProps };
@@ -1,5 +1,5 @@
1
1
  import { type FC } from 'react';
2
2
  import { type ActionFormData, type CustomFieldProps } from '@/types';
3
- type SpanAttributeSamplerProps = CustomFieldProps<ActionFormData>;
3
+ type SpanAttributeSamplerProps = CustomFieldProps<ActionFormData['fields']>;
4
4
  declare const SpanAttributeSampler: FC<SpanAttributeSamplerProps>;
5
5
  export { SpanAttributeSampler, type SpanAttributeSamplerProps };
package/lib/containers.js CHANGED
@@ -1,4 +1,4 @@
1
- import e,{useState as t,useEffect as o,forwardRef as i,useRef as n,useImperativeHandle as a,useMemo as l,Fragment as r,useCallback as s,Children as c}from"react";import d,{css as u}from"styled-components";import{D as p,a as m,A as h,K as g,F as y,C as v,b,c as f,I as x,d as C,i as $,e as S,f as k,g as w,h as D,j as N,k as T,T as I,S as E,l as O,m as M,M as A,n as F,u as R,o as L,p as q,q as P,B as K,r as H,s as z,t as W,E as B,v as j,w as V,x as U,y as _,z as G,G as J,H as Y,J as X,L as Q,N as Z,O as ee,P as te,Q as oe,R as ie,U as ne,V as ae,W as le,X as re,Y as se,Z as ce,_ as de,$ as ue,a0 as pe,a1 as me,a2 as he,a3 as ge,a4 as ye,a5 as ve,a6 as be,a7 as fe,a8 as xe,a9 as Ce,aa as $e,ab as Se,ac as ke,ad as we,ae as De,af as Ne,ag as Te,ah as Ie,ai as Ee,aj as Oe,ak as Me,al as Ae,am as Fe,an as Re,ao as Le,ap as qe,aq as Pe,ar as Ke,as as He,at as ze,au as We,av as Be,aw as je,ax as Ve,ay as Ue,az as _e,aA as Ge,aB as Je,aC as Ye,aD as Xe,aE as Qe,aF as Ze,aG as et,aH as tt,aI as ot,aJ as it,aK as nt,aL as at,aM as lt,aN as rt,aO as st,aP as ct,aQ as dt,aR as ut,aS as pt,aT as mt,aU as ht,aV as gt,aW as yt,aX as vt,aY as bt,aZ as ft,a_ as xt,a$ as Ct,b0 as $t,b1 as St,b2 as kt,b3 as wt,b4 as Dt,b5 as Nt,b6 as Tt,b7 as It,b8 as Et,b9 as Ot,ba as Mt,bb as At,bc as Ft,bd as Rt,be as Lt,bf as qt,bg as Pt,bh as Kt,bi as Ht,bj as zt,bk as Wt,bl as Bt,bm as jt,bn as Vt,bo as Ut,bp as _t,bq as Gt,br as Jt,bs as Yt,bt as Xt,bu as Qt,bv as Zt,bw as eo,bx as to,by as oo,bz as io,bA as no,bB as ao,bC as lo,bD as ro,bE as so,bF as co,bG as uo,bH as po,bI as mo,bJ as ho,bK as go,bL as yo,bM as vo}from"./chunks/ui-components-8a8d1358.js";import{CheckCircledIcon as bo,CrossCircledIcon as fo,EditIcon as xo,TrashIcon as Co,OdigosLogoText as $o,SearchIcon as So,FilterIcon as ko,DataStreamsIcon as wo,CheckIcon as Do,OdigosLogo as No,ArrowIcon as To,PlusIcon as Io,RefreshLeftArrowIcon as Eo,NotificationIcon as Oo,UserIcon as Mo,ImageErrorIcon as Ao,OverviewIcon as Fo,RulesIcon as Ro,SourcesIcon as Lo,ActionsIcon as qo,DestinationsIcon as Po,SlackLogo as Ko,CopyIcon as Ho,KeyIcon as zo,TerminalIcon as Wo,GearIcon as Bo,WarningTriangleIcon as jo,TraceViewIcon as Vo,ErrorTriangleIcon as Uo}from"./icons.js";import{useNodesState as _o,useEdgesState as Go,applyNodeChanges as Jo,MarkerType as Yo}from"@xyflow/react";import"zustand";import"javascript-time-ago";import"./chunks/vendor-1dea551d.js";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";const Xo=e=>{const{type:t,spec:{actionName:o,notes:i,signals:n,disabled:a,collectContainerAttributes:l,collectReplicaSetAttributes:r,collectWorkloadId:s,collectClusterId:c,labelsAttributes:d,annotationsAttributes:u,clusterAttributes:y,overwriteExistingValues:v,attributeNamesToDelete:b,renames:f,piiCategories:x,fallbackSamplingRatio:C,samplingPercentage:$,endpointsFilters:S,servicesNameFilters:k,attributeFilters:w}}=e,D=[{title:p.TYPE,value:t},{type:m.ActiveStatus,title:p.STATUS,value:String(!a)},{type:m.Monitors,title:p.SIGNALS_FOR_PROCESSING,value:n.map(e=>e.toLowerCase()).join(", ")},{title:p.NAME,value:o},{title:p.NOTES,value:i},{type:m.Divider}];if(t===h.K8sAttributes&&(D.push({title:"Collect Container Attributes",value:String(l)}),D.push({title:"Collect ReplicaSet Attributes",value:String(r)}),D.push({title:"Collect Workload ID",value:String(s)}),D.push({title:"Collect Cluster ID",value:String(c)}),d?.length&&D.push({type:m.Divider}),d?.forEach(({labelKey:e,attributeKey:t,from:o},i)=>{let n="";n+=`Label Key: ${e}\n`,n+=`Attribute Key: ${t}\n`,n+=`From: ${o||g.Pod}\n`,D.push({title:"Label"+(d.length>1?` #${i+1}`:""),value:n})}),u?.length&&D.push({type:m.Divider}),u?.forEach(({annotationKey:e,attributeKey:t,from:o},i)=>{let n="";n+=`Annotation Key: ${e}\n`,n+=`Attribute Key: ${t}\n`,n+=`From: ${o||g.Pod}\n`,D.push({title:"Annotation"+(u.length>1?` #${i+1}`:""),value:n})})),t===h.AddClusterInfo){D.push({title:"Overwrite Existing Values",value:String(v||!1)});let e="";y?.forEach(({attributeName:t,attributeStringValue:o},i)=>{e+=`${t}: ${o}`,i<y.length-1&&(e+=", ")}),D.push({title:"Attributes",value:e})}if(t===h.DeleteAttributes){let e="";b?.forEach((t,o)=>{e+=t,o<b.length-1&&(e+=", ")}),D.push({title:"Attributes",value:e})}if(t===h.RenameAttributes){let e="";const t=Object.entries(f||{});t.forEach(([o,i],n)=>{e+=`${o}: ${i}`,n<t.length-1&&(e+=", ")}),D.push({title:"Attributes",value:e})}if(t===h.PiiMasking){let e="";x?.forEach((t,o)=>{e+=t,o<x.length-1&&(e+=", ")}),D.push({title:"Categories",value:e})}return t===h.ErrorSampler&&D.push({title:"Sampling Ratio",value:String(C)}),t===h.ProbabilisticSampler&&D.push({title:"Sampling Percentage",value:String($)}),t===h.LatencySampler&&S?.forEach(({serviceName:e,httpRoute:t,minimumLatencyThreshold:o,fallbackSamplingRatio:i},n)=>{let a="";a+=`Service Name: ${e}\n`,a+=`HTTP Route: ${t}\n`,a+=`Min. Latency: ${o}\n`,a+=`Fallback Sampling Ratio: ${i}`,D.push({title:"Endpoint"+(S.length>1?` #${n+1}`:""),value:a})}),t===h.ServiceNameSampler&&k?.forEach(({serviceName:e,samplingRatio:t,fallbackSamplingRatio:o},i)=>{let n="";n+=`Service Name: ${e}\n`,n+=`Sampling Ratio: ${t}\n`,n+=`Fallback Sampling Ratio: ${o}`,D.push({title:"Filter"+(k.length>1?` #${i+1}`:""),value:n})}),t===h.SpanAttributeSampler&&w?.forEach(({serviceName:e,attributeKey:t,fallbackSamplingRatio:o,condition:i},n)=>{let a="";a+=`Service Name: ${e}\n`,a+=`Attribute Key: ${t}\n`,a+=`Fallback Sampling Ratio: ${o}\n`;const l=Object.keys(i)[0];a+=`Condition: ${l}\n`,a+=`Operation: ${i[l]?.operation}\n`,a+=`Expected Value: ${i[l]?.expectedValue}`,"jsonCondition"===l&&(a+=`\nJSON Path: ${i[l].jsonPath}`),D.push({title:"Filter"+(w.length>1?` #${n+1}`:""),value:a})}),D},Qo=f.PiiCategories,Zo=d.div`
1
+ import e,{useState as t,useEffect as o,forwardRef as i,useRef as n,useImperativeHandle as a,useMemo as l,Fragment as r,useCallback as s,Children as c}from"react";import d,{css as u}from"styled-components";import{D as p,a as m,A as h,K as g,F as y,C as v,b,c as f,I as x,d as C,i as $,e as S,f as k,g as w,h as D,j as N,k as T,T as I,S as E,l as O,m as M,M as A,n as F,u as R,o as L,p as q,q as P,B as K,r as H,s as z,t as W,E as B,v as j,w as V,x as U,y as _,z as G,G as J,H as Y,J as X,L as Q,N as Z,O as ee,P as te,Q as oe,R as ie,U as ne,V as ae,W as le,X as re,Y as se,Z as ce,_ as de,$ as ue,a0 as pe,a1 as me,a2 as he,a3 as ge,a4 as ye,a5 as ve,a6 as be,a7 as fe,a8 as xe,a9 as Ce,aa as $e,ab as Se,ac as ke,ad as we,ae as De,af as Ne,ag as Te,ah as Ie,ai as Ee,aj as Oe,ak as Me,al as Ae,am as Fe,an as Re,ao as Le,ap as qe,aq as Pe,ar as Ke,as as He,at as ze,au as We,av as Be,aw as je,ax as Ve,ay as Ue,az as _e,aA as Ge,aB as Je,aC as Ye,aD as Xe,aE as Qe,aF as Ze,aG as et,aH as tt,aI as ot,aJ as it,aK as nt,aL as at,aM as lt,aN as rt,aO as st,aP as ct,aQ as dt,aR as ut,aS as pt,aT as mt,aU as ht,aV as gt,aW as yt,aX as vt,aY as bt,aZ as ft,a_ as xt,a$ as Ct,b0 as $t,b1 as St,b2 as kt,b3 as wt,b4 as Dt,b5 as Nt,b6 as Tt,b7 as It,b8 as Et,b9 as Ot,ba as Mt,bb as At,bc as Ft,bd as Rt,be as Lt,bf as qt,bg as Pt,bh as Kt,bi as Ht,bj as zt,bk as Wt,bl as Bt,bm as jt,bn as Vt,bo as Ut,bp as _t,bq as Gt,br as Jt,bs as Yt,bt as Xt,bu as Qt,bv as Zt,bw as eo,bx as to,by as oo,bz as io,bA as no,bB as ao,bC as lo,bD as ro,bE as so,bF as co,bG as uo,bH as po,bI as mo,bJ as ho,bK as go,bL as yo,bM as vo}from"./chunks/ui-components-71ed0e2b.js";import{CheckCircledIcon as bo,CrossCircledIcon as fo,EditIcon as xo,TrashIcon as Co,OdigosLogoText as $o,SearchIcon as So,FilterIcon as ko,DataStreamsIcon as wo,CheckIcon as Do,OdigosLogo as No,ArrowIcon as To,PlusIcon as Io,RefreshLeftArrowIcon as Eo,NotificationIcon as Oo,UserIcon as Mo,ImageErrorIcon as Ao,OverviewIcon as Fo,RulesIcon as Ro,SourcesIcon as Lo,ActionsIcon as qo,DestinationsIcon as Po,SlackLogo as Ko,CopyIcon as Ho,KeyIcon as zo,TerminalIcon as Wo,GearIcon as Bo,WarningTriangleIcon as jo,TraceViewIcon as Vo,ErrorTriangleIcon as Uo}from"./icons.js";import{useNodesState as _o,useEdgesState as Go,applyNodeChanges as Jo,MarkerType as Yo}from"@xyflow/react";import"zustand";import"javascript-time-ago";import"./chunks/vendor-1dea551d.js";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";const Xo=e=>{const{type:t,name:o,notes:i,signals:n,disabled:a,fields:{collectContainerAttributes:l,collectReplicaSetAttributes:r,collectWorkloadId:s,collectClusterId:c,labelsAttributes:d,annotationsAttributes:u,clusterAttributes:y,overwriteExistingValues:v,attributeNamesToDelete:b,renames:f,piiCategories:x,fallbackSamplingRatio:C,samplingPercentage:$,endpointsFilters:S,servicesNameFilters:k,attributeFilters:w}}=e,D=[{title:p.TYPE,value:t},{type:m.ActiveStatus,title:p.STATUS,value:String(!a)},{type:m.Monitors,title:p.SIGNALS_FOR_PROCESSING,value:n?.map(e=>e.toLowerCase()).join(", ")||""},{title:p.NAME,value:o||""},{title:p.NOTES,value:i||""},{type:m.Divider}];if(t===h.K8sAttributes&&(D.push({title:"Collect Container Attributes",value:String(l)}),D.push({title:"Collect ReplicaSet Attributes",value:String(r)}),D.push({title:"Collect Workload ID",value:String(s)}),D.push({title:"Collect Cluster ID",value:String(c)}),d?.length&&D.push({type:m.Divider}),d?.forEach(({labelKey:e,attributeKey:t,from:o},i)=>{let n="";n+=`Label Key: ${e}\n`,n+=`Attribute Key: ${t}\n`,n+=`From: ${o||g.Pod}\n`,D.push({title:"Label"+(d.length>1?` #${i+1}`:""),value:n})}),u?.length&&D.push({type:m.Divider}),u?.forEach(({annotationKey:e,attributeKey:t,from:o},i)=>{let n="";n+=`Annotation Key: ${e}\n`,n+=`Attribute Key: ${t}\n`,n+=`From: ${o||g.Pod}\n`,D.push({title:"Annotation"+(u.length>1?` #${i+1}`:""),value:n})})),t===h.AddClusterInfo){D.push({title:"Overwrite Existing Values",value:String(v||!1)});let e="";y?.forEach(({attributeName:t,attributeStringValue:o},i)=>{e+=`${t}: ${o}`,i<y.length-1&&(e+=", ")}),D.push({title:"Attributes",value:e})}if(t===h.DeleteAttributes){let e="";b?.forEach((t,o)=>{e+=t,o<b.length-1&&(e+=", ")}),D.push({title:"Attributes",value:e})}if(t===h.RenameAttributes){let e="";const t=Object.entries(f||{});t.forEach(([o,i],n)=>{e+=`${o}: ${i}`,n<t.length-1&&(e+=", ")}),D.push({title:"Attributes",value:e})}if(t===h.PiiMasking){let e="";x?.forEach((t,o)=>{e+=t,o<x.length-1&&(e+=", ")}),D.push({title:"Categories",value:e})}return t===h.ErrorSampler&&D.push({title:"Sampling Ratio",value:String(C)}),t===h.ProbabilisticSampler&&D.push({title:"Sampling Percentage",value:String($)}),t===h.LatencySampler&&S?.forEach(({serviceName:e,httpRoute:t,minimumLatencyThreshold:o,fallbackSamplingRatio:i},n)=>{let a="";a+=`Service Name: ${e}\n`,a+=`HTTP Route: ${t}\n`,a+=`Min. Latency: ${o}\n`,a+=`Fallback Sampling Ratio: ${i}`,D.push({title:"Endpoint"+(S.length>1?` #${n+1}`:""),value:a})}),t===h.ServiceNameSampler&&k?.forEach(({serviceName:e,samplingRatio:t,fallbackSamplingRatio:o},i)=>{let n="";n+=`Service Name: ${e}\n`,n+=`Sampling Ratio: ${t}\n`,n+=`Fallback Sampling Ratio: ${o}`,D.push({title:"Filter"+(k.length>1?` #${i+1}`:""),value:n})}),t===h.SpanAttributeSampler&&w?.forEach(({serviceName:e,attributeKey:t,fallbackSamplingRatio:o,condition:i},n)=>{let a="";a+=`Service Name: ${e}\n`,a+=`Attribute Key: ${t}\n`,a+=`Fallback Sampling Ratio: ${o}\n`;const l=Object.keys(i)[0];a+=`Condition: ${l}\n`,a+=`Operation: ${i[l]?.operation}\n`,a+=`Expected Value: ${i[l]?.expectedValue}`,"jsonCondition"===l&&(a+=`\nJSON Path: ${i[l].jsonPath}`),D.push({title:"Filter"+(w.length>1?` #${n+1}`:""),value:a})}),D},Qo=f.PiiCategories,Zo=d.div`
2
2
  display: flex;
3
3
  flex-direction: row;
4
4
  gap: 32px;
@@ -14,7 +14,7 @@ import e,{useState as t,useEffect as o,forwardRef as i,useRef as n,useImperative
14
14
  padding: 4px;
15
15
  `,vi=d(T)`
16
16
  margin-bottom: 12px;
17
- `,bi=({isUpdate:t,action:o,formData:i,formErrors:n,handleFormChange:a})=>{const l=I.useTheme();return e.createElement(yi,null,t&&e.createElement("div",null,e.createElement(vi,null,"Status"),e.createElement(E,{options:[{icon:bo,label:p.ENABLED,value:!1,selectedBgColor:l.text.success+I.opacity.hex["050"]},{icon:fo,label:p.DISABLED,value:!0,selectedBgColor:l.text.error+I.opacity.hex["050"]}],selected:i.disabled,setSelected:e=>a("disabled",e)})),!t&&e.createElement(O,{title:"",description:o.docsDescription,actionButton:e.createElement(M,{endpoint:o.docsEndpoint})}),e.createElement(A,{title:"Signals for Processing",required:!0,allowedSignals:o.allowedSignals,selectedSignals:i.signals,setSelectedSignals:e=>a("signals",e),errorMessage:n.signals}),!t&&e.createElement(x,{title:"Action name",placeholder:"Use a name that describes the action",value:i.name,onChange:({target:{value:e}})=>a("name",e),errorMessage:n.name}),e.createElement(gi,{actionType:o.type,value:i,setValue:(e,t)=>a(e,t),formErrors:n}),e.createElement(F,{title:"Notes",value:i.notes,onChange:({target:{value:e}})=>a("notes",e),errorMessage:n.notes}))},fi=i(({children:o,width:i=640,title:r,titleTooltip:s,hideEditTitleFromEdit:c,icons:d,iconSrcs:u,isEdit:p=!1,isFormDirty:m=!1,isLastItem:h=!1,onClose:g,onEdit:y,onSave:v,onDelete:b,onCancel:f,tabs:x,headerActionButtons:C},$)=>{const S=I.useTheme(),{isThisPending:k}=R(),{addNotification:w}=L(),{drawerType:D,drawerEntityId:N,setDrawerType:E,setDrawerEntityId:O}=q();P({key:"Enter",active:p},()=>Z());const[M,A]=t(!1),[F,V]=t(!1),U=n(null),_=D===B.Source,G=()=>{A(!1),V(!1)},J=()=>{G(),y&&y(!1),E(null),O(null),g?.()};a($,()=>({closeDrawer:J}));const Y=()=>{U.current?.clearTitle(),f&&f(),G()},X=()=>{const e=U.current?.isTitleDirty();m||e?V(!0):Y()},Q=()=>{A(!0)},Z=()=>{v&&v(U.current?.getTitle()||"")},ee=l(()=>!!D&&k({entityType:D,entityId:N}),[D,N]),te=e=>{w({type:j.Warning,title:"Pending",message:`Cannot click ${e}, ${D} is pending`,hideFromHistory:!0})},oe=C||[];return y&&!p&&oe.push({"data-id":"drawer-edit",variant:"tertiary",onClick:ee?()=>te("edit"):()=>y(!0),children:e.createElement(e.Fragment,null,e.createElement(xo,null),e.createElement(T,{size:14,family:"secondary",decoration:"underline"},"Edit"))}),b&&!p&&oe.push({"data-id":"drawer-delete",variant:"tertiary",onClick:ee?()=>te(_?"uninstrument":"delete"):Q,children:e.createElement(e.Fragment,null,e.createElement(Co,null),e.createElement(T,{color:S.text.error,size:14,family:"secondary",decoration:"underline"},_?K.UNINSTRUMENT:K.DELETE))}),e.createElement(e.Fragment,null,e.createElement(H,{isOpen:!0,onClose:p?X:J,closeOnEscape:!M&&!F,width:`${i+64}px`,header:{icons:d,iconSrcs:u,title:r,titleTooltip:s,replaceTitleWith:!c&&p?e.createElement(xi,{ref:U,title:r}):void 0,actionButtons:oe,tabs:x},footer:{isOpen:p,leftButtons:[{"data-id":"drawer-save",variant:"primary",onClick:Z,children:K.SAVE},{"data-id":"drawer-cancel",variant:"secondary",onClick:X,children:K.CANCEL}],rightButtons:b?[{"data-id":"drawer-delete",variant:"tertiary",onClick:Q,children:e.createElement(e.Fragment,null,e.createElement(Co,null),e.createElement(T,{size:14,color:S.text.error,family:"secondary",decoration:"underline"},K.DELETE))}]:[]}},o),e.createElement(z,{isOpen:M,noOverlay:!0,name:`${D}${r?` (${r})`:""}`,type:D,isLastItem:h,onApprove:()=>{b&&b(),G()},onDeny:G}),e.createElement(W,{isOpen:F,noOverlay:!0,name:"edit mode",onApprove:Y,onDeny:G}))}),xi=i(({title:i},n)=>{const[l,r]=t(i);return o(()=>{r(i)},[i]),a(n,()=>({getTitle:()=>l||i,isTitleDirty:()=>l!==i,clearTitle:()=>r(i)})),e.createElement(x,{"data-id":"title",value:l,onChange:e=>r(e.target.value)})});xi.displayName=xi.name,fi.displayName=fi.name;const Ci=d.div`
17
+ `,bi=({isUpdate:t,action:o,formData:i,formErrors:n,handleFormChange:a})=>{const l=I.useTheme();return e.createElement(yi,null,t&&e.createElement("div",null,e.createElement(vi,null,"Status"),e.createElement(E,{options:[{icon:bo,label:p.ENABLED,value:!1,selectedBgColor:l.text.success+I.opacity.hex["050"]},{icon:fo,label:p.DISABLED,value:!0,selectedBgColor:l.text.error+I.opacity.hex["050"]}],selected:i.disabled,setSelected:e=>a("disabled",e)})),!t&&e.createElement(O,{title:"",description:o.docsDescription,actionButton:e.createElement(M,{endpoint:o.docsEndpoint})}),e.createElement(A,{title:"Signals for Processing",required:!0,allowedSignals:o.allowedSignals,selectedSignals:i.signals||[],setSelectedSignals:e=>a("signals",e),errorMessage:n.signals}),!t&&e.createElement(x,{title:"Action name",placeholder:"Use a name that describes the action",value:i.name||"",onChange:({target:{value:e}})=>a("name",e),errorMessage:n.name}),e.createElement(gi,{actionType:o.type,value:i.fields,setValue:(e,t)=>a(`fields.${e}`,t),formErrors:n}),e.createElement(F,{title:"Notes",value:i.notes||"",onChange:({target:{value:e}})=>a("notes",e),errorMessage:n.notes}))},fi=i(({children:o,width:i=640,title:r,titleTooltip:s,hideEditTitleFromEdit:c,icons:d,iconSrcs:u,isEdit:p=!1,isFormDirty:m=!1,isLastItem:h=!1,onClose:g,onEdit:y,onSave:v,onDelete:b,onCancel:f,tabs:x,headerActionButtons:C},$)=>{const S=I.useTheme(),{isThisPending:k}=R(),{addNotification:w}=L(),{drawerType:D,drawerEntityId:N,setDrawerType:E,setDrawerEntityId:O}=q();P({key:"Enter",active:p},()=>Z());const[M,A]=t(!1),[F,V]=t(!1),U=n(null),_=D===B.Source,G=()=>{A(!1),V(!1)},J=()=>{G(),y&&y(!1),E(null),O(null),g?.()};a($,()=>({closeDrawer:J}));const Y=()=>{U.current?.clearTitle(),f&&f(),G()},X=()=>{const e=U.current?.isTitleDirty();m||e?V(!0):Y()},Q=()=>{A(!0)},Z=()=>{v&&v(U.current?.getTitle()||"")},ee=l(()=>!!D&&k({entityType:D,entityId:N}),[D,N]),te=e=>{w({type:j.Warning,title:"Pending",message:`Cannot click ${e}, ${D} is pending`,hideFromHistory:!0})},oe=C||[];return y&&!p&&oe.push({"data-id":"drawer-edit",variant:"tertiary",onClick:ee?()=>te("edit"):()=>y(!0),children:e.createElement(e.Fragment,null,e.createElement(xo,null),e.createElement(T,{size:14,family:"secondary",decoration:"underline"},"Edit"))}),b&&!p&&oe.push({"data-id":"drawer-delete",variant:"tertiary",onClick:ee?()=>te(_?"uninstrument":"delete"):Q,children:e.createElement(e.Fragment,null,e.createElement(Co,null),e.createElement(T,{color:S.text.error,size:14,family:"secondary",decoration:"underline"},_?K.UNINSTRUMENT:K.DELETE))}),e.createElement(e.Fragment,null,e.createElement(H,{isOpen:!0,onClose:p?X:J,closeOnEscape:!M&&!F,width:`${i+64}px`,header:{icons:d,iconSrcs:u,title:r,titleTooltip:s,replaceTitleWith:!c&&p?e.createElement(xi,{ref:U,title:r}):void 0,actionButtons:oe,tabs:x},footer:{isOpen:p,leftButtons:[{"data-id":"drawer-save",variant:"primary",onClick:Z,children:K.SAVE},{"data-id":"drawer-cancel",variant:"secondary",onClick:X,children:K.CANCEL}],rightButtons:b?[{"data-id":"drawer-delete",variant:"tertiary",onClick:Q,children:e.createElement(e.Fragment,null,e.createElement(Co,null),e.createElement(T,{size:14,color:S.text.error,family:"secondary",decoration:"underline"},K.DELETE))}]:[]}},o),e.createElement(z,{isOpen:M,noOverlay:!0,name:`${D}${r?` (${r})`:""}`,type:D,isLastItem:h,onApprove:()=>{b&&b(),G()},onDeny:G}),e.createElement(W,{isOpen:F,noOverlay:!0,name:"edit mode",onApprove:Y,onDeny:G}))}),xi=i(({title:i},n)=>{const[l,r]=t(i);return o(()=>{r(i)},[i]),a(n,()=>({getTitle:()=>l||i,isTitleDirty:()=>l!==i,clearTitle:()=>r(i)})),e.createElement(x,{"data-id":"title",value:l,onChange:e=>r(e.target.value)})});xi.displayName=xi.name,fi.displayName=fi.name;const Ci=d.div`
18
18
  width: 100%;
19
19
  height: 100%;
20
20
  max-height: calc(100vh - 220px);
@@ -24,10 +24,10 @@ import e,{useState as t,useEffect as o,forwardRef as i,useRef as n,useImperative
24
24
  display: flex;
25
25
  flex-direction: column;
26
26
  gap: 12px;
27
- `,Si=({updateAction:o,deleteAction:i})=>{const{actions:a}=V(),{drawerType:r,drawerEntityId:s}=q(),c=n(null),d=r!==B.Action,[u,m]=t(!1),[h,g]=t(!1),{formData:y,formErrors:v,handleFormChange:b,resetFormData:f,validateForm:x,loadFormWithDrawerItem:C}=U(),$=l(()=>{if(d)return null;const e=a?.find(e=>e.id===s);return e&&C(e),e},[d,s,a]);if(!$)return null;const S=_.find(({type:e})=>e===$.type)||_.find(({label:e})=>"Attributes"===e)?.items?.find(({type:e})=>e===$.type)||_.find(({label:e})=>"Samplers"===e)?.items?.find(({type:e})=>e===$.type);return e.createElement(fi,{ref:c,title:$.spec.actionName||$.type,icons:[G($.type)],isEdit:u,isFormDirty:h,onEdit:e=>{m("boolean"!=typeof e||e)},onSave:e=>{if(x({withAlert:!0,alertTitle:X.Update})){const t=e!==$.type?e:"";b("name",t),o(s,{...y,name:t}),m(!1),g(!1)}},onDelete:()=>{i(s,$.type),m(!1),g(!1),f(),c.current?.closeDrawer()},onCancel:()=>{m(!1),g(!1),C($)}},u&&S?e.createElement(Ci,null,e.createElement(bi,{isUpdate:!0,action:S,formData:y,formErrors:v,handleFormChange:(...e)=>{g(!0),b(...e)}})):e.createElement($i,null,e.createElement(J,{conditions:$.conditions||[]}),e.createElement(Y,{title:p.ACTION_DETAILS,data:$?Xo($):[]})))},ki=d(Q)`
27
+ `,Si=({updateAction:o,deleteAction:i})=>{const{actions:a}=V(),{drawerType:r,drawerEntityId:s}=q(),c=n(null),d=r!==B.Action,[u,m]=t(!1),[h,g]=t(!1),{formData:y,formErrors:v,handleFormChange:b,resetFormData:f,validateForm:x,loadFormWithDrawerItem:C}=U(),$=l(()=>{if(d)return null;const e=a?.find(e=>e.id===s);return e&&C(e),e},[d,s,a]);if(!$)return null;const S=_.find(({type:e})=>e===$.type)||_.find(({label:e})=>"Attributes"===e)?.items?.find(({type:e})=>e===$.type)||_.find(({label:e})=>"Samplers"===e)?.items?.find(({type:e})=>e===$.type);return e.createElement(fi,{ref:c,title:$.name||$.type,icons:[G($.type)],isEdit:u,isFormDirty:h,onEdit:e=>{m("boolean"!=typeof e||e)},onSave:e=>{if(x({withAlert:!0,alertTitle:X.Update})){const t=e!==$.type?e:"";b("name",t),o(s,{...y,name:t}),m(!1),g(!1)}},onDelete:()=>{i(s,$.type),m(!1),g(!1),f(),c.current?.closeDrawer()},onCancel:()=>{m(!1),g(!1),C($)}},u&&S?e.createElement(Ci,null,e.createElement(bi,{isUpdate:!0,action:S,formData:y,formErrors:v,handleFormChange:(...e)=>{g(!0),b(...e)}})):e.createElement($i,null,e.createElement(J,{conditions:$.conditions||[]}),e.createElement(Y,{title:p.ACTION_DETAILS,data:$?Xo($):[]})))},ki=d(Q)`
28
28
  margin-top: 24px;
29
29
  gap: 12px;
30
- `,wi=({createAction:o})=>{const{currentModal:i,setCurrentModal:n}=Z(),a=i===B.Action,{formData:l,formErrors:r,handleFormChange:s,resetFormData:c,validateForm:d}=U(),[u,m]=t(void 0),h=()=>{c(),m(void 0),n("")},g=()=>{if(!d({withAlert:!0,alertTitle:X.Create}))return null;o(l),h()};return P({key:"Enter",active:a},()=>g()),e.createElement(ee,{isOpen:a,onClose:h,header:{title:"Add Action"},actionComponent:e.createElement(te,{buttons:[{variant:"primary",label:"DONE",onClick:g,disabled:!u}]})},e.createElement(oe,null,e.createElement(O,{title:"Select Action",description:"Select an action to modify telemetry data before it`s sent to destinations. Choose an action type and configure its details."}),e.createElement(ki,null,e.createElement(ie,{type:j.Warning,message:ne.DEFINED_FOR_ALL_STREAMS(p.ACTIONS)}),e.createElement(ae,{options:_,selectedOption:u,onOptionSelect:e=>{return t=e,c(),s("type",t?.type||""),void m(t);var t},autoFocus:!u?.type})),u?.type?e.createElement("div",null,e.createElement(le,{margin:"16px 0"}),e.createElement(bi,{action:u,formData:l,formErrors:r,handleFormChange:s})):null))},Di=e=>{const{type:t,spec:{collectContainerAttributes:o,collectReplicaSetAttributes:i,collectWorkloadId:n,collectClusterId:a,labelsAttributes:l,annotationsAttributes:r,clusterAttributes:s,overwriteExistingValues:c,attributeNamesToDelete:d,renames:u,piiCategories:p,fallbackSamplingRatio:m,samplingPercentage:y,endpointsFilters:v,attributeFilters:b,servicesNameFilters:f}}=e;let x="";if(t===h.K8sAttributes&&(o&&(x+="Container Attributes, "),i&&(x+="ReplicaSet Attributes, "),n&&(x+="Workload ID, "),a&&(x+="Cluster ID, "),l?.forEach(({labelKey:e,attributeKey:t,from:o},i)=>{x+=`Label: ${e} ${t} ${o||g.Pod} `,i===l.length-1&&(x+=", ")}),r?.forEach(({annotationKey:e,attributeKey:t,from:o},i)=>{x+=`Annotation: ${e} ${t} ${o||g.Pod} `,i===r.length-1&&(x+=", ")})),t===h.AddClusterInfo&&(x+=`Overwrite Existing: ${c}\n`,s?.forEach(({attributeName:e,attributeStringValue:t},o)=>{x+=`${e}: ${t}`,o<s.length-1&&(x+=", ")})),t===h.DeleteAttributes&&d?.forEach((e,t)=>{x+=e,t<d.length-1&&(x+=", ")}),t===h.RenameAttributes){const e=Object.entries(u||{});e.forEach(([t,o],i)=>{x+=`${t}: ${o}`,i<e.length-1&&(x+=", ")})}return t===h.PiiMasking&&p?.forEach((e,t)=>{x+=e,t<p.length-1&&(x+=", ")}),t===h.ErrorSampler&&(x+=String(m)),t===h.ProbabilisticSampler&&(x+=String(y),x+="%"),t===h.LatencySampler&&v?.forEach(({serviceName:e,httpRoute:t,minimumLatencyThreshold:o,fallbackSamplingRatio:i},n)=>{x+=`Endpoint${v.length>1?` #${n+1}`:""}=${e}${t}\n`,x+=` Latency=${o}`,x+=` Sampling=${i}`,n<v.length-1&&(x+=", ")}),t===h.ServiceNameSampler&&f?.forEach(({serviceName:e,samplingRatio:t,fallbackSamplingRatio:o})=>{x+=`Service Name: ${e}, `,x+=`Sampling Ratio: ${t}, `,x+=`Fallback Sampling Ratio: ${o}\n`}),t===h.SpanAttributeSampler&&b?.forEach(({serviceName:e,attributeKey:t,fallbackSamplingRatio:o})=>{x+=`Service Name: ${e}, `,x+=`Attribute Key: ${t}, `,x+=`Fallback Sampling Ratio: ${o}\n`}),x},Ni=({conditions:t,id:o})=>{const{errors:i,warnings:n,disableds:a,hasLoadings:r}=l(()=>re(t),[t]),s=i.length>0?i:n.length>0?n:a.length>0?a:[];if(s.length>0)return e.createElement("div",{style:{lineHeight:1}},e.createElement(Ti,{conditions:s,id:o}));const c=r?pe.Loading:j.Success;return e.createElement("div",{style:{lineHeight:1}},e.createElement(se,{status:c,title:c,withBorder:!0,withIcon:!0}))},Ti=({conditions:t,id:o})=>{const i=I.useTheme();return e.createElement(ce,null,de(t).map(({status:t,type:n,reason:a,message:l,lastTransitionTime:r},s)=>{"loading"!==t&&"disabled"!==t||(t=j.Info);const c=me(t,i);return e.createElement(ue,{key:`condition-${o}-${t}-${n}-${s}`,titleIcon:c,title:n,text:l||a||"",timestamp:r},e.createElement(se,{status:t,title:a||n,withBorder:!0,withIcon:!0}))}))},Ii=({instrumentationRules:e,sources:t,actions:o,destinations:i,searchText:n,selectedCategory:a})=>{const l=n?e.filter(e=>e.type?.toLowerCase().includes(n)||e.ruleName?.toLowerCase().includes(n)):e,r=n?t.filter(e=>e.name?.toLowerCase().includes(n)||e.otelServiceName?.toLowerCase().includes(n)||e.namespace?.toLowerCase().includes(n)):t,s=n?o.filter(e=>e.type?.toLowerCase().includes(n)||e.spec.actionName?.toLowerCase().includes(n)):o,c=n?i.filter(e=>e.destinationType.displayName?.toLowerCase().includes(n)||e.name?.toLowerCase().includes(n)):i,d=[{category:B.Source,label:"Sources",count:r.length,entities:[]},{category:B.Action,label:"Actions",count:s.length,entities:[]},{category:B.Destination,label:"Destinations",count:c.length,entities:[]},{category:B.InstrumentationRule,label:"Instrumentation Rules",count:l.length,entities:[]}];d.unshift({category:"all",label:"All",count:l.length+r.length+s.length+c.length,entities:[]});const u=d.filter(({count:e,category:t})=>!!e&&"all"!==t&&["all",t].includes(a)).map(e=>({...e,entities:e.category===B.InstrumentationRule?l:e.category===B.Source?r:e.category===B.Action?s:e.category===B.Destination?c:[]}));return{categories:d,searchResults:u}},Ei=[{key:"icon",title:""},{key:"name",title:p.NAME,sortable:!0},{key:"signals",title:p.MONITORS},{key:"active-status",title:p.STATUS},{key:"conditions",title:"Conditions"},{key:"type",title:p.TYPE,sortable:!0},{key:"spec",title:"Spec",sortable:!0},{key:"notes",title:p.NOTES,sortable:!0}],Oi=({maxHeight:t,maxWidth:o})=>{const i=I.useTheme(),n=he(),{actions:a,actionsLoading:r}=V(),{setDrawerType:s,setDrawerEntityId:c}=q(),d=l(()=>Ii({instrumentationRules:[],sources:[],actions:ge(a,n),destinations:[],searchText:n.searchText,selectedCategory:B.Action}).searchResults.find(({category:e})=>e===B.Action)?.entities||[],[a,n]),u=l(()=>d.map(t=>{const{hasErrors:o,hasWarnings:n,hasDisableds:a}=re(t.conditions||[]);return{status:o?j.Error:n?j.Warning:void 0,faded:a,onClick:()=>{s(B.Action),c(t.id)},cells:[{columnKey:"icon",component:()=>e.createElement(ye,{icon:G(t.type)})},{columnKey:"name",value:ve(t,B.Action,{prioritizeDisplayName:!0})},{columnKey:"type",value:t.type,textColor:i.text.info},{columnKey:"notes",value:t.spec.notes,textColor:i.text.info,withTooltip:!0},{columnKey:"spec",value:Di(t),textColor:i.text.info,withTooltip:!0},{columnKey:"signals",component:()=>e.createElement(be,{withLabels:!0,monitors:t.spec.signals})},{columnKey:"conditions",component:()=>e.createElement(Ni,{conditions:t.conditions||[],id:t.id})},{columnKey:"active-status",component:()=>e.createElement("div",{style:{lineHeight:1}},e.createElement(se,{status:t.spec.disabled?j.Error:j.Success,title:t.spec.disabled?p.DISABLED:p.ENABLED,withIcon:!0,withBorder:!0}))}]}}),[d]),{badge:m,badgeTooltip:h}=l(()=>d.length!==a.length?{badge:`${d.length}/${a.length}`,badgeTooltip:p.FILTERED_COUNT_TOOLTIP}:{badge:a.length,badgeTooltip:void 0},[d,a]);return e.createElement(fe,{$maxWidth:o},e.createElement(xe,null,e.createElement(Ce,{icon:$e(B.Action),title:p.ACTIONS,badge:m,badgeTooltip:h,loading:r})),e.createElement(Se,{$maxHeight:t},e.createElement(ke,{columns:Ei,rows:u})),!d.length&&e.createElement(we,{style:{marginTop:"2rem"}},e.createElement(De,null)))},Mi=d(Q)`
30
+ `,wi=({createAction:o})=>{const{currentModal:i,setCurrentModal:n}=Z(),a=i===B.Action,{formData:l,formErrors:r,handleFormChange:s,resetFormData:c,validateForm:d}=U(),[u,m]=t(void 0),h=()=>{c(),m(void 0),n("")},g=()=>{if(!d({withAlert:!0,alertTitle:X.Create}))return null;o(l),h()};return P({key:"Enter",active:a},()=>g()),e.createElement(ee,{isOpen:a,onClose:h,header:{title:"Add Action"},actionComponent:e.createElement(te,{buttons:[{variant:"primary",label:"DONE",onClick:g,disabled:!u}]})},e.createElement(oe,null,e.createElement(O,{title:"Select Action",description:"Select an action to modify telemetry data before it`s sent to destinations. Choose an action type and configure its details."}),e.createElement(ki,null,e.createElement(ie,{type:j.Warning,message:ne.DEFINED_FOR_ALL_STREAMS(p.ACTIONS)}),e.createElement(ae,{options:_,selectedOption:u,onOptionSelect:e=>{return t=e,c(),s("type",t?.type||""),void m(t);var t},autoFocus:!u?.type})),u?.type?e.createElement("div",null,e.createElement(le,{margin:"16px 0"}),e.createElement(bi,{action:u,formData:l,formErrors:r,handleFormChange:s})):null))},Di=e=>{const{type:t,fields:{collectContainerAttributes:o,collectReplicaSetAttributes:i,collectWorkloadId:n,collectClusterId:a,labelsAttributes:l,annotationsAttributes:r,clusterAttributes:s,overwriteExistingValues:c,attributeNamesToDelete:d,renames:u,piiCategories:p,fallbackSamplingRatio:m,samplingPercentage:y,endpointsFilters:v,attributeFilters:b,servicesNameFilters:f}}=e;let x="";if(t===h.K8sAttributes&&(o&&(x+="Container Attributes, "),i&&(x+="ReplicaSet Attributes, "),n&&(x+="Workload ID, "),a&&(x+="Cluster ID, "),l?.forEach(({labelKey:e,attributeKey:t,from:o},i)=>{x+=`Label: ${e} ${t} ${o||g.Pod} `,i===l.length-1&&(x+=", ")}),r?.forEach(({annotationKey:e,attributeKey:t,from:o},i)=>{x+=`Annotation: ${e} ${t} ${o||g.Pod} `,i===r.length-1&&(x+=", ")})),t===h.AddClusterInfo&&(x+=`Overwrite Existing: ${c}\n`,s?.forEach(({attributeName:e,attributeStringValue:t},o)=>{x+=`${e}: ${t}`,o<s.length-1&&(x+=", ")})),t===h.DeleteAttributes&&d?.forEach((e,t)=>{x+=e,t<d.length-1&&(x+=", ")}),t===h.RenameAttributes){const e=Object.entries(u||{});e.forEach(([t,o],i)=>{x+=`${t}: ${o}`,i<e.length-1&&(x+=", ")})}return t===h.PiiMasking&&p?.forEach((e,t)=>{x+=e,t<p.length-1&&(x+=", ")}),t===h.ErrorSampler&&(x+=String(m)),t===h.ProbabilisticSampler&&(x+=String(y),x+="%"),t===h.LatencySampler&&v?.forEach(({serviceName:e,httpRoute:t,minimumLatencyThreshold:o,fallbackSamplingRatio:i},n)=>{x+=`Endpoint${v.length>1?` #${n+1}`:""}=${e}${t}\n`,x+=` Latency=${o}`,x+=` Sampling=${i}`,n<v.length-1&&(x+=", ")}),t===h.ServiceNameSampler&&f?.forEach(({serviceName:e,samplingRatio:t,fallbackSamplingRatio:o})=>{x+=`Service Name: ${e}, `,x+=`Sampling Ratio: ${t}, `,x+=`Fallback Sampling Ratio: ${o}\n`}),t===h.SpanAttributeSampler&&b?.forEach(({serviceName:e,attributeKey:t,fallbackSamplingRatio:o})=>{x+=`Service Name: ${e}, `,x+=`Attribute Key: ${t}, `,x+=`Fallback Sampling Ratio: ${o}\n`}),x},Ni=({conditions:t,id:o})=>{const{errors:i,warnings:n,disableds:a,hasLoadings:r}=l(()=>re(t),[t]),s=i.length>0?i:n.length>0?n:a.length>0?a:[];if(s.length>0)return e.createElement("div",{style:{lineHeight:1}},e.createElement(Ti,{conditions:s,id:o}));const c=r?pe.Loading:j.Success;return e.createElement("div",{style:{lineHeight:1}},e.createElement(se,{status:c,title:c,withBorder:!0,withIcon:!0}))},Ti=({conditions:t,id:o})=>{const i=I.useTheme();return e.createElement(ce,null,de(t).map(({status:t,type:n,reason:a,message:l,lastTransitionTime:r},s)=>{"loading"!==t&&"disabled"!==t||(t=j.Info);const c=me(t,i);return e.createElement(ue,{key:`condition-${o}-${t}-${n}-${s}`,titleIcon:c,title:n,text:l||a||"",timestamp:r},e.createElement(se,{status:t,title:a||n,withBorder:!0,withIcon:!0}))}))},Ii=({instrumentationRules:e,sources:t,actions:o,destinations:i,searchText:n,selectedCategory:a})=>{const l=n?e.filter(e=>e.type?.toLowerCase().includes(n)||e.ruleName?.toLowerCase().includes(n)):e,r=n?t.filter(e=>e.name?.toLowerCase().includes(n)||e.otelServiceName?.toLowerCase().includes(n)||e.namespace?.toLowerCase().includes(n)):t,s=n?o.filter(e=>e.type?.toLowerCase().includes(n)||e.name?.toLowerCase().includes(n)):o,c=n?i.filter(e=>e.destinationType.displayName?.toLowerCase().includes(n)||e.name?.toLowerCase().includes(n)):i,d=[{category:B.Source,label:"Sources",count:r.length,entities:[]},{category:B.Action,label:"Actions",count:s.length,entities:[]},{category:B.Destination,label:"Destinations",count:c.length,entities:[]},{category:B.InstrumentationRule,label:"Instrumentation Rules",count:l.length,entities:[]}];d.unshift({category:"all",label:"All",count:l.length+r.length+s.length+c.length,entities:[]});const u=d.filter(({count:e,category:t})=>!!e&&"all"!==t&&["all",t].includes(a)).map(e=>({...e,entities:e.category===B.InstrumentationRule?l:e.category===B.Source?r:e.category===B.Action?s:e.category===B.Destination?c:[]}));return{categories:d,searchResults:u}},Ei=[{key:"icon",title:""},{key:"name",title:p.NAME,sortable:!0},{key:"signals",title:p.MONITORS},{key:"active-status",title:p.STATUS},{key:"conditions",title:"Conditions"},{key:"type",title:p.TYPE,sortable:!0},{key:"spec",title:"Spec",sortable:!0},{key:"notes",title:p.NOTES,sortable:!0}],Oi=({maxHeight:t,maxWidth:o})=>{const i=I.useTheme(),n=he(),{actions:a,actionsLoading:r}=V(),{setDrawerType:s,setDrawerEntityId:c}=q(),d=l(()=>Ii({instrumentationRules:[],sources:[],actions:ge(a,n),destinations:[],searchText:n.searchText,selectedCategory:B.Action}).searchResults.find(({category:e})=>e===B.Action)?.entities||[],[a,n]),u=l(()=>d.map(t=>{const{hasErrors:o,hasWarnings:n,hasDisableds:a}=re(t.conditions||[]);return{status:o?j.Error:n?j.Warning:void 0,faded:a,onClick:()=>{s(B.Action),c(t.id)},cells:[{columnKey:"icon",component:()=>e.createElement(ye,{icon:G(t.type)})},{columnKey:"name",value:ve(t,B.Action,{prioritizeDisplayName:!0})},{columnKey:"type",value:t.type,textColor:i.text.info},{columnKey:"notes",value:t.notes,textColor:i.text.info,withTooltip:!0},{columnKey:"spec",value:Di(t),textColor:i.text.info,withTooltip:!0},{columnKey:"signals",component:()=>e.createElement(be,{withLabels:!0,monitors:t.signals||[]})},{columnKey:"conditions",component:()=>e.createElement(Ni,{conditions:t.conditions||[],id:t.id})},{columnKey:"active-status",component:()=>e.createElement("div",{style:{lineHeight:1}},e.createElement(se,{status:t.disabled?j.Error:j.Success,title:t.disabled?p.DISABLED:p.ENABLED,withIcon:!0,withBorder:!0}))}]}}),[d]),{badge:m,badgeTooltip:h}=l(()=>d.length!==a.length?{badge:`${d.length}/${a.length}`,badgeTooltip:p.FILTERED_COUNT_TOOLTIP}:{badge:a.length,badgeTooltip:void 0},[d,a]);return e.createElement(fe,{$maxWidth:o},e.createElement(xe,null,e.createElement(Ce,{icon:$e(B.Action),title:p.ACTIONS,badge:m,badgeTooltip:h,loading:r})),e.createElement(Se,{$maxHeight:t},e.createElement(ke,{columns:Ei,rows:u})),!d.length&&e.createElement(we,{style:{marginTop:"2rem"}},e.createElement(De,null)))},Mi=d(Q)`
31
31
  // width: 100vw;
32
32
  // height: 100vh;
33
33
  gap: 64px;
@@ -45,7 +45,7 @@ import e,{useState as t,useEffect as o,forwardRef as i,useRef as n,useImperative
45
45
  text-align: center;
46
46
  line-height: 26px;
47
47
  color: ${({theme:e})=>e.text.info};
48
- `,Li=()=>{const[i,n]=t(0);return o(()=>{(async()=>{for(let e=0;e<=100;e+=5)await Ie(500),n(e)})()},[]),e.createElement(Mi,null,e.createElement($o,{size:100}),e.createElement(Ne,{width:400}),e.createElement(Ai,null,e.createElement(ce,{$gap:16},e.createElement(Fi,null,"Preparing your workspace..."),e.createElement(Te,{label:`${i}%`})),e.createElement(Ri,null,"It can take up to a few minutes. Grab a cup of coffee, look out a window, and enjoy your free moment!")))},{nodeHeight:qi,framePadding:Pi}=Ae,Ki=(e,t)=>{const{theme:o,label:i,isMultiTarget:n,isError:a,animated:l}=t||{},[r,s]=e.split("-to-");return{id:e,type:i?Me.Labeled:"default",source:r,target:s,animated:l,data:{label:i,isMultiTarget:n,isError:a},style:{stroke:a?o?.colors.dark_red:o?.colors.border}}},{nodeWidth:Hi,nodeHeight:zi,framePadding:Wi}=Ae,Bi=e=>({nodeWidth:Hi,nodeHeight:zi,id:e.ruleId,type:B.InstrumentationRule,status:void 0,title:ve(e,B.InstrumentationRule,{prioritizeDisplayName:!0}),subTitle:e.type,icon:Re(e.type),isActive:!e.disabled,raw:e}),{nodeWidth:ji,nodeHeight:Vi,framePadding:Ui}=Ae,_i=e=>{const{hasDisableds:t,priorotizedStatus:o}=re(e.conditions||[]);return{nodeWidth:ji,nodeHeight:Vi,id:e.id,type:B.Action,status:o,faded:t,title:ve(e,B.Action,{prioritizeDisplayName:!0}),subTitle:e.type,icon:G(e.type),monitors:e.spec.signals,isActive:!e.spec.disabled,raw:e}},{nodeWidth:Gi,nodeHeight:Ji,framePadding:Yi}=Ae,Xi=e=>{const{priorotizedStatus:t,hasDisableds:o}=re(e.conditions||[]);return{nodeWidth:Gi,nodeHeight:Ji,id:{namespace:e.namespace,name:e.name,kind:e.kind},type:B.Source,status:t,faded:o,title:ve(e,B.Source,{extended:!0}),subTitle:`${e.namespace} • ${e.kind}`,icons:Le(e.containers),raw:e}},{nodeWidth:Qi,nodeHeight:Zi}=Ae,{nodeWidth:en,nodeHeight:tn,framePadding:on}=Ae,nn=e=>{const{hasDisableds:t,priorotizedStatus:o}=re(e.conditions||[]),{icon:i,iconSrc:n}=Ke(e.destinationType.type);return{nodeWidth:en,nodeHeight:tn,id:e.id,type:B.Destination,status:o,faded:t,title:ve(e,B.Destination,{prioritizeDisplayName:!0}),subTitle:e.destinationType.displayName,icon:i,iconSrc:n,monitors:Pe(e.exportedSignals),isActive:!e.disabled,raw:e}},an=d.div`
48
+ `,Li=()=>{const[i,n]=t(0);return o(()=>{(async()=>{for(let e=0;e<=100;e+=5)await Ie(500),n(e)})()},[]),e.createElement(Mi,null,e.createElement($o,{size:100}),e.createElement(Ne,{width:400}),e.createElement(Ai,null,e.createElement(ce,{$gap:16},e.createElement(Fi,null,"Preparing your workspace..."),e.createElement(Te,{label:`${i}%`})),e.createElement(Ri,null,"It can take up to a few minutes. Grab a cup of coffee, look out a window, and enjoy your free moment!")))},{nodeHeight:qi,framePadding:Pi}=Ae,Ki=(e,t)=>{const{theme:o,label:i,isMultiTarget:n,isError:a,animated:l}=t||{},[r,s]=e.split("-to-");return{id:e,type:i?Me.Labeled:"default",source:r,target:s,animated:l,data:{label:i,isMultiTarget:n,isError:a},style:{stroke:a?o?.colors.dark_red:o?.colors.border}}},{nodeWidth:Hi,nodeHeight:zi,framePadding:Wi}=Ae,Bi=e=>({nodeWidth:Hi,nodeHeight:zi,id:e.ruleId,type:B.InstrumentationRule,status:void 0,title:ve(e,B.InstrumentationRule,{prioritizeDisplayName:!0}),subTitle:e.type,icon:Re(e.type),isActive:!e.disabled,raw:e}),{nodeWidth:ji,nodeHeight:Vi,framePadding:Ui}=Ae,_i=e=>{const{hasDisableds:t,priorotizedStatus:o}=re(e.conditions||[]);return{nodeWidth:ji,nodeHeight:Vi,id:e.id,type:B.Action,status:o,faded:t,title:ve(e,B.Action,{prioritizeDisplayName:!0}),subTitle:e.type,icon:G(e.type),monitors:e.signals,isActive:!e.disabled,raw:e}},{nodeWidth:Gi,nodeHeight:Ji,framePadding:Yi}=Ae,Xi=e=>{const{priorotizedStatus:t,hasDisableds:o}=re(e.conditions||[]);return{nodeWidth:Gi,nodeHeight:Ji,id:{namespace:e.namespace,name:e.name,kind:e.kind},type:B.Source,status:t,faded:o,title:ve(e,B.Source,{extended:!0}),subTitle:`${e.namespace} • ${e.kind}`,icons:Le(e.containers),raw:e}},{nodeWidth:Qi,nodeHeight:Zi}=Ae,{nodeWidth:en,nodeHeight:tn,framePadding:on}=Ae,nn=e=>{const{hasDisableds:t,priorotizedStatus:o}=re(e.conditions||[]),{icon:i,iconSrc:n}=Ke(e.destinationType.type);return{nodeWidth:en,nodeHeight:tn,id:e.id,type:B.Destination,status:o,faded:t,title:ve(e,B.Destination,{prioritizeDisplayName:!0}),subTitle:e.destinationType.displayName,icon:i,iconSrc:n,monitors:Pe(e.exportedSignals),isActive:!e.disabled,raw:e}},an=d.div`
49
49
  width: 100%;
50
50
  height: ${({$heightToRemove:e})=>`calc(100vh - ${e}px)`};
51
51
  position: relative;