@odigos/ui-kit 0.0.260 → 0.0.262

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.
Files changed (50) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/lib/chunks/{connections-scope-BLrBW0hm.js → connections-scope-7HTW_FyZ.js} +1 -1
  3. package/lib/chunks/{index-D-8Yak_c.js → index-raAGXSYj.js} +12 -12
  4. package/lib/chunks/odigos-context-nQT2LWDb.js +18 -0
  5. package/lib/chunks/source-instrument-form-context-BDrkrejS.js +1 -0
  6. package/lib/chunks/ui-components-p39Q_a1_.js +1703 -0
  7. package/lib/chunks/use-odigos-api-CPlk79JW.js +5 -0
  8. package/lib/components/_v2/input-table/card-table.d.ts +10 -0
  9. package/lib/components/_v2/input-table/dynamic-field/index.d.ts +1 -0
  10. package/lib/components/_v2/input-table/index.d.ts +2 -0
  11. package/lib/components/_v2/input-table/types.d.ts +13 -1
  12. package/lib/components/v2.js +1 -1
  13. package/lib/components.js +1 -1
  14. package/lib/constants/actions/index.d.ts +5 -1
  15. package/lib/constants/instrumentation-rules/index.d.ts +2 -1
  16. package/lib/constants/sampling/index.d.ts +4 -0
  17. package/lib/constants.js +1 -1
  18. package/lib/containers/_v2/_drawers/edit-source-drawer/sampling/index.d.ts +1 -1
  19. package/lib/containers/_v2/_forms/add-action-form/custom-fields/index.d.ts +3 -1
  20. package/lib/containers/_v2/_forms/add-action-form/dynamic-fields/index.d.ts +21 -0
  21. package/lib/containers/_v2/_forms/add-rule-form/custom-fields/index.d.ts +2 -1
  22. package/lib/containers/v2.js +155 -143
  23. package/lib/containers.js +1 -1
  24. package/lib/contexts/action-form-context.d.ts +1 -1
  25. package/lib/contexts/odigos-api/capabilities.d.ts +2 -0
  26. package/lib/contexts/odigos-api/hooks/use-actions-api.d.ts +12 -1
  27. package/lib/contexts/odigos-api/hooks/use-instrumentation-rules-api.d.ts +13 -1
  28. package/lib/contexts/odigos-api/types.d.ts +3 -1
  29. package/lib/contexts/odigos-api.js +1 -1
  30. package/lib/contexts/rule-form-context.d.ts +1 -1
  31. package/lib/contexts.js +1 -1
  32. package/lib/functions.js +1 -1
  33. package/lib/hooks/useActionFormData.d.ts +1 -1
  34. package/lib/hooks/useInstrumentationRuleFormData.d.ts +1 -1
  35. package/lib/hooks.js +1 -1
  36. package/lib/icons.js +1 -1
  37. package/lib/snippets/v2.js +1 -1
  38. package/lib/snippets.js +1 -1
  39. package/lib/store.js +1 -1
  40. package/lib/theme.js +1 -1
  41. package/lib/types/actions/index.d.ts +40 -4
  42. package/lib/types/common/index.d.ts +3 -1
  43. package/lib/types/instrumentation-rules/index.d.ts +22 -3
  44. package/lib/types.js +1 -1
  45. package/lib/visuals.js +1 -1
  46. package/package.json +1 -1
  47. package/lib/chunks/helpers-45znEVHP.js +0 -19
  48. package/lib/chunks/source-instrument-form-context-D7wjfWpw.js +0 -1
  49. package/lib/chunks/ui-components-CrXELmQx.js +0 -1692
  50. package/lib/chunks/use-odigos-api-CgkEC7if.js +0 -5
@@ -1,1692 +0,0 @@
1
- import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import o,{css as r,useTheme as i,keyframes as a,ThemeProvider as s}from"styled-components";import{VSquareIcon as l,XSquareIcon as c,ActionIcon as d,RenameAttributeIcon as u,PiiMaskingIcon as p,DeleteAttributeIcon as h,AddClusterInfoIcon as g,K8sLogo as m,ImageErrorIcon as f,KafkaLogo as y,RedisLogo as b,PostgresLogo as $,NginxLogo as v,MysqlLogo as x,ElixirLogo as S,SwiftLogo as w,RustLogo as E,RubyLogo as C,PhpLogo as T,CPlusPlusLogo as A,CSharpLogo as I,DotnetLogo as k,PythonLogo as N,NodejsLogo as D,GoLogo as O,JavaLogo as R,PyroscopeLogo as _,AwsXrayLogo as L,VictoriaMetricsLogo as P,UptraceLogo as F,TraceloopLogo as M,TingyunLogo as z,TempoLogo as U,TelemetryHubLogo as B,SumoLogicLogo as j,SplunkLogo as W,SignozLogo as H,SeqLogo as G,AwsS3Logo as X,QuickwitLogo as K,GigapipeLogo as V,QrynLogo as J,PrometheusLogo as Y,OpenTelemetryLogo as q,OracleLogo as Q,OpsVerseLogo as Z,OpenObserveLogo as ee,OneUptimeLogo as te,OdigosLogo as ne,ObserveLogo as oe,NewRelicLogo as re,MiddlewareLogo as ie,LumigoLogo as ae,LokiLogo as se,LogzioLogo as le,LightstepLogo as ce,Last9Logo as de,KloudmateLogo as ue,JaegerLogo as pe,InstanaLogo as he,HyperDxLogo as ge,HoneycombLogo as me,GroundcoverLogo as fe,GreptimeLogo as ye,GrafanaLogo as be,GoogleCloudPlatformLogo as $e,ElasticSearchLogo as ve,ElasticApmLogo as xe,DynatraceLogo as Se,DatadogLogo as we,Dash0Logo as Ee,CoralogixLogo as Ce,AwsCloudwatchLogo as Te,ClickhouseLogo as Ae,ChronosphereLogo as Ie,ChecklyLogo as ke,CauselyLogo as Ne,BonreeLogo as De,BetterStackLogo as Oe,AzureMonitorLogo as Re,AzureBlobLogo as _e,AxiomLogo as Le,AppDynamicsLogo as Pe,AlibabaCloudLogo as Fe,AlaudaLogo as Me,SamplingIcon as ze,InstrumentationRuleIcon as Ue,DestinationIcon as Be,SourceIcon as je,NamespacesIcon as We,PayloadCollectionIcon as He,HeadersCollectionIcon as Ge,CustomInstrumentationIcon as Xe,CodeAttributesIcon as Ke,TracesIcon as Ve,MetricsIcon as Je,LogsIcon as Ye,VmLogo as qe,DotsHorizontalIcon as Qe,QuestionCircleIcon as Ze,ExclamationTriangleIcon as et,ExclamationCircleIcon as tt,ISquareIcon as nt,AwsLogo as ot,AwsSecretsManagerLogo as rt,AwsStepFunctionsLogo as it,AwsEventBridgeLogo as at,AwsBedrockLogo as st,AwsApiGatewayLogo as lt,AwsEc2Logo as ct,AwsKinesisLogo as dt,AwsLambdaLogo as ut,AwsSnsLogo as pt,AwsSqsLogo as ht,AwsDynamoDbLogo as gt,AwsStsLogo as mt,OpenTelemetryLogoStripped as ft,VIcon as yt,CopyIcon as bt,ListIcon as $t,CodeIcon as vt,XIcon as xt,EyeClosedIcon as St,EyeOpenIcon as wt,SearchIcon as Et,MinusIcon as Ct,ChevronUpIcon as Tt,ChevronDownIcon as At,ArrowIcon as It,DotsVerticalIcon as kt,PlusIcon as Nt,TrashIcon as Dt,DotIcon as Ot,FilterIcon as Rt}from"../icons.js";import{create as _t}from"zustand";import{forwardRef as Lt,Fragment as Pt,useState as Ft,useEffect as Mt,useMemo as zt,useCallback as Ut,useRef as Bt,useLayoutEffect as jt,createElement as Wt}from"react";import Ht from"javascript-time-ago";import Gt from"javascript-time-ago/locale/en";import{Highlight as Xt,themes as Kt}from"prism-react-renderer";import{s as Vt}from"./vendor-BFqT13Me.js";import{persist as Jt,createJSONStorage as Yt}from"zustand/middleware";import{ErrorBoundary as qt}from"react-error-boundary";import Qt,{createPortal as Zt}from"react-dom";import{VList as en}from"virtua";const tn=e=>e?e.replace(/([a-z0-9])([A-Z])/g,"$1 $2"):"";var nn,on,rn;!function(e){e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.P="p",e.Span="span"}(nn||(nn={})),function(e){e.XXXS="xxxs",e.XXS="xxs",e.XS="xs",e.S="s",e.M="m",e.L="l",e.XL="xl",e.XXL="xxl",e.XXXL="xxxl"}(on||(on={})),function(e){e.Primary="primary",e.Secondary="secondary",e.Tertiary="tertiary",e.Disable="disable",e.Error="error",e.Mandatory="mandatory",e.Link="link",e.Success="success"}(rn||(rn={}));const an=new Set(Object.values(rn)),sn=(e,t)=>{if("string"!=typeof(n=t)||!an.has(n))return t;var n;switch(t){case rn.Primary:return e.v2.colors.white[500];case rn.Secondary:return e.v2.colors.silver[200];case rn.Tertiary:return e.v2.colors.black[500];case rn.Disable:return e.v2.colors.grey[400];case rn.Error:return e.v2.colors.red[500];case rn.Mandatory:return e.v2.colors.red[600];case rn.Link:return e.v2.colors.purple[400];case rn.Success:return e.v2.colors.green[400];default:return}},ln=o.p`
2
- margin: 0;
3
- color: ${({$color:e,theme:t})=>sn(t,e)||t.v2.colors.grey[50]};
4
- font-family: ${({theme:e})=>e.font_family.primary};
5
- font-size: ${({theme:e,$size:t})=>e.v2.text.size[t]}px;
6
- font-weight: ${({$weight:e})=>e};
7
- text-align: ${({$align:e})=>e};
8
- text-transform: ${({$transform:e})=>e};
9
- line-height: ${({theme:e,$lineHeight:t,$size:n})=>t||`${e.v2.text.size[n]+2}px`};
10
- opacity: ${({$opacity:e})=>e};
11
-
12
- ${({$nowrap:e})=>e?r`
13
- text-wrap: nowrap;
14
- white-space: nowrap;
15
- overflow: hidden;
16
- text-overflow: ellipsis;
17
- `:r`
18
- flex: 0 1 auto;
19
- min-width: 0;
20
- overflow-wrap: anywhere;
21
- `}
22
-
23
- ${({$maxLines:e})=>!!e&&e>0&&r`
24
- display: -webkit-box;
25
- -webkit-box-orient: vertical;
26
- -webkit-line-clamp: ${e};
27
- line-clamp: ${e};
28
- overflow: hidden;
29
- `}
30
-
31
- ${({$underline:e})=>e&&r`
32
- text-decoration: underline;
33
- `}
34
-
35
- ${({$withClick:e})=>e&&r`
36
- cursor: pointer;
37
- &:hover {
38
- text-decoration: underline;
39
- }
40
- `}
41
- `,cn=Lt(({children:n,variant:o=nn.P,color:r,size:i=on.S,weight:a=400,opacity:s=1,align:l="left",lineHeight:c,transform:d,nowrap:u,underline:p,onClick:h,disabled:g,maxLines:m,...f},y)=>{const b=n?.toString().split("\n")||[];return e(ln,{ref:y,as:o,$color:r,$size:i,$weight:a,$opacity:s,$align:l,$lineHeight:c,$transform:d,$nowrap:u,$underline:p,$maxLines:m,$withClick:!!h&&!g,onClick:g?void 0:h,...f,children:b.map((n,o)=>t(Pt,{children:[n,o!==b.length-1&&e("br",{})]},`typography-${o}-${n}`))})});var dn,un,pn,hn,gn,mn,fn,yn,bn,$n,vn,xn,Sn,wn,En,Cn,Tn,An,In,kn,Nn,Dn,On,Rn,_n,Ln,Pn,Fn,Mn,zn,Un,Bn,jn,Wn,Hn,Gn,Xn,Kn,Vn,Jn,Yn;cn.displayName="Typography",function(e){e.K8sAttributes="K8sAttributesResolver",e.AddClusterInfo="AddClusterInfo",e.DeleteAttributes="DeleteAttribute",e.RenameAttributes="RenameAttribute",e.PiiMasking="PiiMasking",e.URLTemplatization="URLTemplatization",e.ExtractAttribute="ExtractAttribute"}(dn||(dn={})),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.UrlTemplatizationRulesGroups="urlTemplatizationRulesGroups",e.ExtractAttribute="extractAttribute"}(un||(un={})),function(e){e.Pod="pod",e.Namespace="namespace",e.Node="node"}(pn||(pn={})),function(e){e.EXISTS="exists",e.EQUALS="equals",e.NOT_EQUALS="not_equals",e.CONTAINS="contains",e.NOT_CONTAINS="not_contains",e.REGEX="regex"}(hn||(hn={})),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"}(gn||(gn={})),function(e){e.EXISTS="exists",e.EQUALS="equals"}(mn||(mn={})),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"}(fn||(fn={})),function(e){e.JSON="json",e.SQL="sql",e.ResourcePath="resource_path"}(yn||(yn={})),function(e){e.Horizontal="horizontal",e.Vertical="vertical"}(bn||(bn={})),function(e){e.Ascending="ascending",e.Descending="descending"}($n||($n={})),function(e){e.Community="community",e.Onprem="onprem"}(vn||(vn={})),function(e){e.K8s="k8s",e.Vm="vm"}(xn||(xn={})),function(e){e.Cli="odigos-cli",e.Helm="helm",e.Operator="odigos-operator"}(Sn||(Sn={})),function(e){e.New="NEW",e.AppsSelected="APPS_SELECTED",e.Finished="FINISHED"}(wn||(wn={})),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"}(En||(En={})),function(e){e.Create="Create",e.Read="Read",e.Update="Update",e.Delete="Delete"}(Cn||(Cn={})),function(e){e.Namespace="Namespace",e.Source="Source",e.Destination="Destination",e.Action="Action",e.InstrumentationRule="InstrumentationRule",e.SamplingRule="SamplingRule"}(Tn||(Tn={})),function(e){e.DataStream="DataStream"}(An||(An={})),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",e.Time="time"}(In||(In={})),function(e){e.Text="text",e.Password="password",e.Number="number",e.Decimal="decimal"}(kn||(kn={})),function(e){e.Warning="warning",e.Error="error",e.Success="success",e.Info="info",e.Default="default",e.Loading="loading",e.Disabled="disabled",e.Unknown="unknown"}(Nn||(Nn={})),function(e){e.INSTRUMENTED="Instrumented",e.INSTRUMENTING="Instrumenting",e.UNINSTRUMENTED="Uninstrumented",e.NOT_INSTRUMENTED="Not Instrumented"}(Dn||(Dn={})),function(e){e.MarkedForInstrumentation="MarkedForInstrumentation",e.RuntimeDetection="RuntimeDetection",e.AgentEnabled="AgentEnabled",e.AgentInjected="AgentInjected",e.WorkloadRollout="WorkloadRollout",e.ProcessesHealthStatus="ProcessesHealthStatus",e.ExpectingTelemetry="ExpectingTelemetry",e.WorkloadOdigosHealth="WorkloadOdigosHealth"}(On||(On={})),function(e){e.TriggeredSuccessfully="RolloutTriggeredSuccessfully",e.RolloutFinished="RolloutFinished",e.PreviousRolloutOngoing="PreviousRolloutOngoing",e.Disabled="Disabled",e.NotRequired="NotRequired",e.WaitingForRestart="WaitingForRestart",e.WorkloadNotSupporting="WorkloadNotSupporting",e.WaitingInQueue="WaitingInQueue",e.FailedToPatch="FailedToPatch"}(Rn||(Rn={})),function(e){e.SuccessfullyInjected="SuccessfullyInjected",e.NoAgentInjected="NoAgentInjected",e.SomePodsAgentNotInjectedRolloutNeeded="SomePodsAgentNotInjectedRolloutNeeded",e.AgentInjectedAndDataSent="AgentInjectedAndDataSent"}(_n||(_n={})),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"}(Ln||(Ln={})),function(e){e.Alauda="alauda",e.AlibabaCloud="alibabacloud",e.AppDynamics="appdynamics",e.Axiom="axiom",e.AzureBlob="azureblob",e.AzureMonitor="azuremonitor",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.GoogleCloudOTLP="googlecloudotlp",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.Signalfx="signalfx",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",e.Pyroscope="pyroscope"}(Pn||(Pn={})),function(e){e.Deployment="Deployment",e.DaemonSet="DaemonSet",e.StatefulSet="StatefulSet",e.CronJob="CronJob",e.Pod="Pod",e.StaticPod="StaticPod",e.Rollout="Rollout",e.ConfigMap="ConfigMap",e.DeploymentConfig="DeploymentConfig",e.InstrumentationConfig="InstrumentationConfig"}(Fn||(Fn={})),function(e){e.GolangCommunity="golang-community",e.NodejsCommunity="nodejs-community",e.PythonCommunity="python-community",e.JavaCommunity="java-community",e.DotNetCommunity="dotnet-community",e.RubyCommunity="ruby-community",e.PhpCommunity="php-community",e.GolangEnterprise="golang-enterprise",e.NodejsEnterprise="nodejs-enterprise",e.PythonEnterprise="python-enterprise",e.JavaEnterprise="java-enterprise",e.JavaEbpfInstrumentations="java-ebpf-instrumentations",e.OpentelemetryEbpfInstrumentation="opentelemetry-ebpf-instrumentation",e.DotNetLegacy="dotnet-legacy",e.DotNetEnterprise="dotnet-enterprise",e.RubyEnterprise="ruby-enterprise",e.CPlusPlusEnterprise="cplusplus-enterprise",e.MySqlEnterprise="mysql-enterprise"}(Mn||(Mn={})),function(e){e.Error="Error",e.Failure="Failure",e.Notice="Notice",e.Pending="Pending",e.Waiting="Waiting",e.Unsupported="Unsupported",e.Disabled="Disabled",e.Success="Success",e.Irrelevant="Irrelevant",e.Unknown="Unknown"}(zn||(zn={})),function(e){e.CodeAttributes="CodeAttributes",e.HeadersCollection="HeadersCollection",e.PayloadCollection="PayloadCollection",e.CustomInstrumentation="CustomInstrumentation",e.UnknownType="UnknownType"}(Un||(Un={})),function(e){e.Column="column",e.FilePath="filePath",e.Function="function",e.LineNumber="lineNumber",e.Namespace="namespace",e.StackTrace="stacktrace"}(Bn||(Bn={})),function(e){e.HeaderKeys="headerKeys"}(jn||(jn={})),function(e){e.Java="java",e.Golang="golang"}(Wn||(Wn={}));class qn{className;methodName;constructor(e,t){this.className=e,this.methodName=t}Verify(){return!!this.className&&!!this.methodName}toString(){return this.Verify()?`${this.className}.${this.methodName}`:"[Faulty Java Probe]"}}class Qn{packageName;functionName;receiverName;receiverMethodName;constructor(e,t,n,o){this.packageName=e,this.functionName=t||"",this.receiverName=n||"",this.receiverMethodName=o||""}Verify(){return!!this.packageName&&(this.functionName?!(this.receiverMethodName||this.receiverName):!(!this.receiverMethodName||!this.receiverName))}toString(){return this.Verify()?this.functionName?`${this.packageName}.${this.functionName}`:this.receiverName&&this.receiverMethodName?`${this.packageName}.(${this.receiverName}).${this.receiverMethodName}`:"":"[Faulty Golang Probe]"}}!function(e){e.HttpRequest="httpRequest",e.HttpResponse="httpResponse",e.DbQuery="dbQuery",e.Messaging="messaging"}(Hn||(Hn={})),function(e){e.Healthy="Healthy",e.Updating="Updating",e.Degraded="Degraded",e.Failed="Failed",e.Down="Down",e.Unknown="Unknown"}(Gn||(Gn={})),function(e){e.Pending="Pending",e.Running="Running",e.Succeeded="Succeeded",e.Failed="Failed",e.Unknown="Unknown"}(Xn||(Xn={})),function(e){e.ContainerCreating="ContainerCreating",e.CrashLoopBackOff="CrashLoopBackOff",e.CreateContainerError="CreateContainerError",e.CreateContainerConfigError="CreateContainerConfigError",e.ErrImagePull="ErrImagePull",e.ErrImageNeverPull="ErrImageNeverPull",e.ImagePullBackOff="ImagePullBackOff",e.InvalidImageName="InvalidImageName",e.RegistryUnavailable="RegistryUnavailable",e.NetworkNotReady="NetworkNotReady",e.Running="Running",e.Completed="Completed",e.Error="Error",e.OOMKilled="OOMKilled",e.ContainerCannotRun="ContainerCannotRun",e.DeadlineExceeded="DeadlineExceeded",e.StartError="StartError"}(Kn||(Kn={})),function(e){e.Running="Running",e.Waiting="Waiting",e.Terminated="Terminated"}(Vn||(Vn={})),function(e){e.Logs="LOGS",e.Metrics="METRICS",e.Traces="TRACES",e.Profiles="PROFILES"}(Jn||(Jn={})),function(e){e.Logs="logs",e.Metrics="metrics",e.Traces="traces",e.Profiles="profiles"}(Yn||(Yn={}));const Zn={[Jn.Logs]:Yn.Logs,[Jn.Metrics]:Yn.Metrics,[Jn.Traces]:Yn.Traces,[Jn.Profiles]:Yn.Profiles},eo={[Yn.Logs]:Jn.Logs,[Yn.Metrics]:Jn.Metrics,[Yn.Traces]:Jn.Traces,[Yn.Profiles]:Jn.Profiles};var to;!function(e){e.SampledSpansOnly="sampled_spans_only",e.AllSpans="all_spans"}(to||(to={}));const no="https://docs.odigos.io",oo="default",ro="this-cluster",io="This Cluster",ao={SELECTED_DATA_STREAM:"SELECTED_DATA_STREAM",SELECTED_DATA_STREAM_WITH_PROXY:e=>`SELECTED_DATA_STREAM_${e}`,OVERVIEW_FILTERS:"OVERVIEW_FILTERS",DARK_MODE:"DARK_MODE"},so={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)'},lo={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",RENAME_STREAM:e=>`Rename "${e}"`,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}".`,DATA_STREAM_MERGE_WARNING:(e,t)=>e?`A Data Stream named "${t}" already exists. Saving will merge "${e}" into "${t}" - both streams will share the same configuration going forward.`:`A Data Stream named "${t}" already exists. Saving will merge into "${t}" - the new stream will share the existing configuration going forward.`,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.",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",SOURCES_SETUP:"Sources setup",DESTINATIONS_SETUP:"Destinations setup",SUMMARY:"Summary",REVIEW_SETUP:"Review your setup and confirm your choices.",NO_SOURCES_SELECTED:"No sources selected",ADD_SOURCE_PROMPT:"Add at least one source to start collecting data",NO_DESTINATIONS_SELECTED:"No destinations selected",ADD_DESTINATION_PROMPT:"Add destination so your data has somewhere to go",GET_STARTED_WITH:"Get started with",GET_STARTED_DESCRIPTION:"First, select the sources you want Odigos to monitor. Next, choose where your data should be sent by configuring destinations.",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",OVERVIEW:"Overview",LIBRARIES:"Libraries",STANDARD_LIBRARY:"Standard Library",STANDARD:"Standard",PEER_SOURCES:"Peer Sources",PROFILING:"Profiling",INBOUND:"Inbound",OUTBOUND:"Outbound",INBOUND_DESCRIPTION:e=>`Services that send requests to ${e}`,OUTBOUND_DESCRIPTION:e=>`Services that ${e} sends requests to`,NO_INBOUND_CONNECTIONS_DESCRIPTION:"No services are currently sending requests to this source.",NO_OUTBOUND_CONNECTIONS_DESCRIPTION:"This source hasn't sent requests to other services yet.",NO_INBOUND_CONNECTIONS:"No inbound connections",NO_OUTBOUND_CONNECTIONS:"No outbound connections",COULD_NOT_FETCH_PEER_SOURCES:"Could not fetch peer sources",VIRTUAL:"Virtual",VIRTUAL_TOOLTIP:"This service is not instrumented/injected with Odigos, but we can still see it in the service map because it is connected to other services.",NO_RESULTS:"No results",NO_RESULTS_FOR_FILTER:e=>`No results matched the filter '${e}'`,POD:"Pod",PODS:"Pods",PODS_HEALTHY:"Pods are healthy",PODS_NOT_HEALTHY:"Pods are not healthy",NO_RUNNING_PODS:"No running pods",NO_RUNNING_PODS_SUBTITLE:"Check if you have any running pods and try again",AGENT_INJECTED:"Agent injected",INJECTIONS_AS_EXPECTED:"Injections as expected",AGENT_NOT_INJECTED:"Agent not injected",KUBERNETES_HEALTHY:"Kubernetes healthy",ODIGOS_HEALTHY:"Odigos healthy",HEALTHY:"Healthy",UNHEALTHY:"Unhealthy",NOT_HEALTHY:"Not Healthy",NODE:"Node",AGE:"Age",RUNNING_TIME:"Running Time",RUNNING_TIME_TOOLTIP:"Time elapsed since the container was last started and entered the Running state",NOT_RUNNING:"Not Running",RESTARTS:"Restarts",LATEST_REVISION:"Latest Revision",OLD_REVISION:"Old Revision",READY:"Ready",NOT_READY:"Not Ready",STARTED:"Started",NOT_STARTED:"Not Started",CRASHLOOP:"Crashloop",NO_CRASHLOOP:"No Crashloop",CRASHLOOP_BACKOFF:"Crashloop backoff",CANNOT_POOL_IMAGE:"Cannot pool image",DEVICE_NAME:"Device Name",INSTRUMENTED:"Instrumented",UNINSTRUMENTED:"Uninstrumented",INSTRUMENTED_WITH_DISTRO:e=>`Instrumented | ${e}`,DEBUG_COMMANDS:"Debug Commands",YAML:"YAML",YAML_FILES:"YAML Files",GET_POD_YAML:"Get Pod YAML",GET_POD_LOGS:"Get Pod Logs",DESCRIBE_POD:"Describe Pod",CONTAINER:"Container",CONTAINERS:"Containers",DETECTED_CONTAINERS:"Detected Containers",DETECTED_CONTAINERS_DESCRIPTION:"The system automatically instruments the containers it detects with a supported programming language.",NO_CONTAINERS_DETECTED:"No containers detected",DETECTED_PROCESSES:"Detected Processes",DETECTED_PROCESSES_DESCRIPTION:"The system automatically instruments the processes it detects with a supported programming language.",NO_PROCESSES_DETECTED:"No processes detected",CONTAINER_NAME:"Container Name",PROCESS:"Process",PROCESSES:"Processes",PROCESS_FALLBACK_NAME:"process",OPEN_IN_POD_TAB:"Open in 'Pod' tab",OPEN_IN_SAMPLING_PAGE:"Open in 'Sampling' page",ALL_CONTAINERS_HEALTHY:e=>`All ${e} containers are healthy`,ALL_PROCESSES_HEALTHY:e=>`All ${e} processes are healthy`,PID:e=>`#${e}`,IDENTIFYING_ATTRIBUTES:"Identifying Attributes",INSTRUMENTATION_LIBRARIES:"Instrumentation Libraries",FILTERED_COUNT_TOOLTIP:"Represents filtered amount, out of total amount",SEARCH_NAMESPACES:"Search Namespaces",SEARCH_SOURCES:"Search Sources",SELECT_ALL:"Select all",UNSELECT_ALL:"Unselect 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",NO_DATA_INSTRUMENTATION_RULES:"To configure how telemetry is collected",NO_DATA_SOURCES:"To start collecting telemetry from a Kubernetes workload",NO_DATA_ACTIONS:"To process telemetry before export",NO_DATA_DESTINATIONS:"To send telemetry to an observability backend",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:"Instrument entire namespace",FUTURE_APPS_DESCRIPTION:"When enabled, all applications in the namespace and new applications will be instrumented automatically and included in the current data stream using a Namespace Source.",OVERIDE:"Override",OVERIDDEN:"Overridden",OVERRIDE_RUNTIME_DETAILS:"Override Runtime Details",OVERRIDE_RUNTIME_DETAILS_SUBTITLE:"Use when multiple languages exist in the same container or when Odigos is unable to detect the application language",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.",OVERRIDE_OTEL_DISTRO_NAME:"Override OpenTelemetry distro name",OVERRIDE_OTEL_DISTRO_NAME_SUBTITLE:"Use to set a specific Odigos OpenTelemetry distribution",OVERRIDE_OTEL_DISTRO_NAME_WARNING:"This is an advanced configuration. If the selected OpenTelemetry distro name is incorrect, data collection may be incomplete or may not occur at all.",OVERRIDE_OTEL_DISTRO_NAME_SAVE_TOOLTIP:"Use the provided OpenTelemetry distro name to instrument this container",OVERRIDE_OTEL_DISTRO_NAME_DELETE_TOOLTIP:"Remove manual override of OpenTelemetry distro name, and use Odigos automatic detection OpenTelemetry distro name for instrumentation",OVERRIDE_RUNTIME_DETAILS_SAVE_TOOLTIP:"Use the provided runtime details to instrument this container",OVERRIDE_RUNTIME_DETAILS_DELETE_TOOLTIP:"Remove manual override of runtime details, and use Odigos automatic detection runtime details for instrumentation",OTEL_DISTRO_NAME:"OpenTelemetry distro name",WAITING_FOR_RUNTIME_DETECTION:"Waiting for runtime detection...",DETECTING_RUNTIME_INFO:"Detecting runtime info",NO_AVAILABLE_AGENT:"No available agent",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?",JAVA_CUSTOM_PROBES:"Java Custom Probes",GOLANG_CUSTOM_PROBES:"Golang Custom Probes",ROLLOUT:"Rollout",ROLLOUT_RESTART:"Rollout Restart",ROLLOUT_RESTART_WORKLOADS_DESCRIPTION:"Are you sure you want to rollout restart these workloads?",ROLLOUT_NOT_REQUIRED:"Rollout Not Required",ROLLOUT_NOT_REQUIRED_MESSAGE:"This source is instrumented with eBPF and does not require a restart.",ROLLOUT_FAILED:"Rollout Failed",ROLLOUT_PREVIOUS_ONGOING:"Previous Rollout Ongoing",ROLLOUT_PREVIOUS_ONGOING_MESSAGE:"A previous rollout is ongoing. Please wait for it to finish before triggering a new one.",ROLLOUT_AUTO_DISABLED:"Auto Rollout Disabled",ROLLOUT_AUTO_DISABLED_MESSAGE:"Trigger a manual rollout to inject the agent.",ROLLOUT_FINISHED:"Rollout Finished",ROLLOUT_FINISHED_MESSAGE:"All pods have been updated and are healthy.",ROLLBACK:"Rollback",ROLLBACK_OCCURRED:"Rollback Occurred",ROLLBACK_OCCURRED_MESSAGE:"Odigos detected a crash and rolled back instrumentation to protect your workload.",ROLLBACK_SUCCESS:"Rollback Success",ROLLBACK_RECOVER:"Recover",FETCHING_NAMESPACES:"Fetching namespaces",FETCHING_NAMESPACES_SUBTITLE:"Please wait while we fetch the namespaces",ADD_SOURCES_DESCRIPTION:"Choose which sources to monitor in your pipeline.",CREATING_SOURCES:"Creating Sources...",CREATING_SOURCES_SUBTITLE:"This may take a few moments while sources are being created.",SELECT_NAMESPACE:"Select namespace from the list",SELECT_NAMESPACE_SUBTITLE:"Add namespace so you can select workloads from it.",CREATING_ACTION:"Creating action",CREATING_ACTION_SUBTITLE:"Please wait while we create the action",ADD_ACTION_DESCRIPTION:"Select an action to modify telemetry data before it's sent to destinations. Choose an action type and configure its details.",CREATING_INSTRUMENTATION_RULE:"Creating instrumentation rule",CREATING_INSTRUMENTATION_RULE_SUBTITLE:"Please wait while we create the instrumentation rule",ADD_INSTRUMENTATION_RULE_DESCRIPTION:"Define how telemetry is recorded from your application. Choose a rule type and configure the details.",CREATING_DESTINATION:"Creating destination",CREATING_DESTINATION_SUBTITLE:"Please wait while we create the destination",ADD_DESTINATION_DRAWER_DESCRIPTION:"Add backend destination you want to connect with Odigos.",THROUGHPUT_LAST_10_SECONDS:"Throughput (last 10 seconds)",DELETE_POD_TO_RESTART:"Delete Pod to Restart",DEBUG:"Debug",SAMPLING:"Sampling",HEAD_SAMPLING:"Head Sampling",TAIL_SAMPLING:"Tail Sampling",NOISY_OPERATIONS:"Noisy Operations",HIGHLY_RELEVANT_OPERATIONS:"Highly Relevant Operations",COST_REDUCTION_OPERATIONS:"Cost Reduction Operations"},co={GET_STARTED:"Get started",ADD:"Add",ADD_NEW:"Add New",NEW:"New",SELECT:"Select",CREATE:"Create",UPDATE:"Update",EDIT:"Edit",DELETE:"Delete",RESTART:"Restart",RESTART_POD:"Restart pod",REFRESH:"Refresh",CANCEL:"Cancel",DONE:"Done",SAVE:"Save",BACK:"Back",CONFIRM:"Confirm",NEXT:"Next",TEST:"Test",TEST_CONNECTION:"Test Connection",INSTRUMENT:"Instrument",UNINSTRUMENT:"Uninstrument"},uo=(e,t)=>e===Nn.Success?lo.HEALTHY:e===Nn.Error?lo.NOT_HEALTHY:tn(t),po=e=>{if(!e)return null;switch(e){case zn.Irrelevant:return null;case zn.Failure:case zn.Error:return Nn.Error;case zn.Notice:return Nn.Warning;case zn.Pending:case zn.Waiting:return Nn.Loading;case zn.Unsupported:case zn.Disabled:return Nn.Disabled;case zn.Success:return Nn.Success;case zn.Unknown:default:return Nn.Info}},ho=(e,t,n="reason",o)=>{const r=po(e?.status);return r?{key:`desired-status-${e?.name}`,status:r,leftIcon:t||(r===Nn.Success?l:c),label:o||("reason"===n?tn(e?.reasonEnum):uo(r,e?.reasonEnum)),tooltip:e?.message,textSize:on.XXXS,invertColors:!0,useSecondaryTone:!0}:null},go=e=>e.charAt(0).toUpperCase()+e.slice(1),mo=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,r])=>{try{const i=JSON.parse(r);Array.isArray(i)?e[o]=JSON.stringify(t(i)):e[o]="object"==typeof i&&null!==i?JSON.stringify(n(i)):r}catch(i){"object"==typeof r&&null!==r?Array.isArray(r)?e[o]=JSON.stringify(t(r)):e[o]=JSON.stringify(n(r)):e[o]=r}return e},{})};var fo;!function(e){e.SIGNALS="SIGNALS"}(fo||(fo={}));const yo=(e,t,n)=>{if(!e||!e.length)return!0;if(1===e.length)return"true"==e[0];const[o,r,i]=e;if(o===fo.SIGNALS)switch(r){case"INCLUDES":return t?.includes(i);case"EXCLUDES":return!t?.includes(i);default:return!0}const a=n.find(e=>e.name===o||e.key===o);if(!a)return!1;const s=null==a.value?"":String(a.value);switch(r){case"===":case"==":return s===i;case"!==":case"!=":return s!==i;case">":return Number(s)>Number(i);case"<":return Number(s)<Number(i);case">=":return Number(s)>=Number(i);case"<=":return Number(s)<=Number(i);default:return!0}},bo=e=>JSON.parse(JSON.stringify(e)),$o=(e,t)=>t.split(".").reduce((e,t)=>e?.[t],e),vo=(e,t,n)=>{const o=t.split(".");let r=e;for(let e=0;e<o.length-1;e++)o[e]in r&&"object"==typeof r[o[e]]||(r[o[e]]={}),r=r[o[e]];r[o[o.length-1]]=n},xo=(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},So=(e,t)=>{let n=[...e];return t.monitors?.length&&(n=n.filter(e=>!!t.monitors?.find(t=>e.exportedSignals[t.id]))),n},wo=(e,t)=>t?e.filter(e=>e.dataStreamNames.includes(t)||!e.dataStreamNames.length):[],Eo=(e,t)=>{let n=e;if(t.namespaces?.length){const e=new Set(t.namespaces.map(({id:e})=>e));n=n.filter(({id:t})=>e.has(t.namespace))}if(t.kinds?.length){const e=new Set(t.kinds.map(({id:e})=>e));n=n.filter(({id:t})=>e.has(t.kind))}if(t.languages?.length){const e=new Set(t.languages.map(({id:e})=>e));n=n.filter(({runtimeInfo:t,containers:n})=>t?.detectedLanguages?.some(t=>e.has(t))||n?.some(t=>{const n=t.overrides?.runtimeInfo?.language??t.runtimeInfo?.language;return!!n&&e.has(n)}))}if(t.podsAgentInjectionStatus?.length){const e=new Set(t.podsAgentInjectionStatus.map(({id:e})=>e));n=n.filter(({podsAgentInjectionStatus:t})=>e.has(t?.reasonEnum??"")||e.has(t?.message??""))}return t.onlyErrors&&(n=n.filter(e=>po(e.workloadOdigosHealthStatus?.status)===Nn.Error)),n},Co=(e,t)=>t?e.filter(e=>e.dataStreamNames?.includes(t)||t===oo&&!e.dataStreamNames?.length):[],To=(e,t="",n={})=>{for(const o in e)if(e.hasOwnProperty(o)){const r=e[o],i=t?`${t}.${o}`:o;null===r||"object"!=typeof r||Array.isArray(r)?Array.isArray(r)?r.forEach((e,t)=>{const o=`${i}[${t}]`;null!==e&&"object"==typeof e?To(e,o,n):n[o]=e}):n[i]=r:To(r,i,n)}return n},Ao=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]}`},Io=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`}},ko=()=>{const e=crypto.getRandomValues(new Uint8Array(16));let t=0;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,n=>{const o=e[t%16];t++;return("1"===n?o:"0"===n?63&o|128:15&o|64).toString(16)})},No=e=>({[dn.K8sAttributes]:m,[dn.AddClusterInfo]:g,[dn.DeleteAttributes]:h,[dn.PiiMasking]:p,[dn.RenameAttributes]:u,[dn.ExtractAttribute]:d,[dn.URLTemplatization]:d}[e]||f),Do=e=>{if(!e)return Oo([]);if(Array.isArray(e))return Oo(e);const t=Object.values(e).reduce((e,t)=>{if(null!=t){const n=po(t.status);n&&e.push({status:n,type:t.name??"",reason:t.reasonEnum??null,message:t.message??null})}return e},[]);return Oo(t)},Oo=e=>{const t=e?.filter(({status:e})=>e===Nn.Error),n=e?.filter(({status:e})=>e===Nn.Warning),o=e?.filter(({status:e})=>e===Nn.Disabled),r=e?.filter(({status:e})=>e===Nn.Loading),i=t.length>0,a=n.length>0,s=o.length>0;return{errors:t,hasErrors:i,warnings:n,hasWarnings:a,disableds:o,hasDisableds:s,loadings:r,hasLoadings:r.length>0,priorotizedStatus:i?Nn.Error:a?Nn.Warning:s?Nn.Info:void 0}},Ro=e=>{const t=e?.reduce((e,t)=>t.agentEnabled?.agentEnabled?e+1:e,0);return`${t}/${e?.length||0} instrumented`},_o=e=>({[En.Java]:R,[En.Go]:O,[En.JavaScript]:D,[En.Python]:N,[En.DotNet]:k,[En.CSharp]:I,[En.CPlusPlus]:A,[En.Php]:T,[En.Ruby]:C,[En.Rust]:E,[En.Swift]:w,[En.Elixir]:S,[En.MySql]:x,[En.Nginx]:v,[En.Postgres]:$,[En.Redis]:b,[En.Kafka]:y,[En.Ignored]:f,[En.Unknown]:f,[En.Processing]:f,[En.NoContainers]:f,[En.NoRunningPods]:f}[e]||f),Lo=e=>e?e.overrides?.runtimeInfo?.language??e.runtimeInfo?.language??En.Unknown:En.Unknown,Po=e=>e?e.overrides?.runtimeInfo?.runtimeVersion??e.runtimeInfo?.runtimeVersion??null:null,Fo=e=>e?.map(e=>_o(Lo(e)))||[],Mo=e=>e?.map(e=>_o(e))||[],zo=e=>e.runtimeInfo?.detectedLanguages?.length?Mo(e.runtimeInfo?.detectedLanguages):Fo(e.containers),Uo=(e,t)=>{const n={[Pn.Alauda]:Me,[Pn.AlibabaCloud]:Fe,[Pn.AppDynamics]:Pe,[Pn.Axiom]:Le,[Pn.AzureBlob]:_e,[Pn.AzureMonitor]:Re,[Pn.BetterStack]:Oe,[Pn.Bonree]:De,[Pn.Causely]:Ne,[Pn.Checkly]:ke,[Pn.Chronosphere]:Ie,[Pn.ClickHouse]:Ae,[Pn.CloudWatch]:Te,[Pn.Coralogix]:Ce,[Pn.Dash0]:Ee,[Pn.Datadog]:we,[Pn.Dynamic]:q,[Pn.Dynatrace]:Se,[Pn.ElasticApm]:xe,[Pn.ElasticSearch]:ve,[Pn.GoogleCloud]:$e,[Pn.GoogleCloudOTLP]:$e,[Pn.GrafanaCloudLoki]:be,[Pn.GrafanaCloudPrometheus]:be,[Pn.GrafanaCloudTempo]:be,[Pn.Greptime]:ye,[Pn.Groundcover]:fe,[Pn.Honeycomb]:me,[Pn.HyperDX]:ge,[Pn.Instana]:he,[Pn.Jaeger]:pe,[Pn.Kafka]:y,[Pn.Kloudmate]:ue,[Pn.Last9]:de,[Pn.Lightstep]:ce,[Pn.LogzIo]:le,[Pn.Loki]:se,[Pn.Lumigo]:ae,[Pn.Middleware]:ie,[Pn.NewRelic]:re,[Pn.Observe]:oe,[Pn.Odigos]:ne,[Pn.OneUptime]:te,[Pn.OpenObserve]:ee,[Pn.Opsverse]:Z,[Pn.Oracle]:Q,[Pn.OTLP]:q,[Pn.OTLPHttp]:q,[Pn.Prometheus]:Y,[Pn.Qryn]:J,[Pn.QrynOss]:V,[Pn.Quickwit]:K,[Pn.S3]:X,[Pn.Seq]:G,[Pn.Signalfx]:W,[Pn.Signoz]:H,[Pn.Splunk]:W,[Pn.SplunkSapm]:W,[Pn.SplunkOtlp]:W,[Pn.SumoLogic]:j,[Pn.TelemetryHub]:B,[Pn.Tempo]:U,[Pn.Tingyun]:z,[Pn.Traceloop]:M,[Pn.Uptrace]:F,[Pn.VictoriaMetrics]:P,[Pn.VictoriaMetricsCloud]:P,[Pn.XRay]:L,[Pn.Pyroscope]:_}[e];return n&&!t?{icon:n}:{iconSrc:`https://d15jtxgb40qetw.cloudfront.net/${e}.svg`}},Bo=e=>({[Tn.Namespace]:We,[Tn.Source]:je,[Tn.Destination]:Be,[Tn.Action]:d,[Tn.InstrumentationRule]:Ue,[Tn.SamplingRule]:ze}[e]),jo=e=>"ruleId"in e&&e.ruleId?e.ruleId:"id"in e&&"string"==typeof e.id&&e.id||"id"in e&&"object"==typeof e.id&&e.id.namespace&&e.id.kind&&e.id.name?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,Wo=e=>e?"string"==typeof e?e:`${e.namespace}/${e.kind}/${e.name}`:"",Ho=e=>Wo(jo(e)),Go=(e,t,n)=>{const{extended:o,prioritizeDisplayName:r}=n||{};let i="",a="";switch(t){case Tn.InstrumentationRule:const t=e;i=t.type,a=t.ruleName;break;case Tn.Source:const n=e;i=n.id.name,a=n.serviceName||"";break;case Tn.Action:const o=e;i=o.type,a=o.name||"";break;case Tn.Destination:const r=e;i=r.destinationType.displayName,a=r.name;break;case Tn.Namespace:const s=e;i=s.name,a=s.name}return o?i+(a&&a!==i?` (${a})`:""):r&&a||i},Xo=(e,t)=>{if(t===Tn.Source){const t={namespace:"",name:"",kind:""};return e.split("&").forEach(e=>{const[n,o]=e.split("=");t[n]=o}),t}return e},Ko=e=>({[Un.CodeAttributes]:Ke,[Un.CustomInstrumentation]:Xe,[Un.HeadersCollection]:Ge,[Un.PayloadCollection]:He,[Un.UnknownType]:f}[e]||f),Vo=e=>e.overrides?.runtimeInfo?.language??e.runtimeInfo?.language??En.Unknown,Jo=e=>{const{numberOfInstances:t,containers:n}=e;if(!n)return t&&t>0?En.Processing:En.NoRunningPods;const o=n?.filter(e=>Vo(e)!==En.Ignored);if(!o.length)return En.NoContainers;const r=o.find(e=>Vo(e)!==En.Unknown);return r?Vo(r):En.Unknown},Yo=(e,t,n)=>(t===Tn.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},qo=e=>({[Jn.Logs]:Ye,[Jn.Metrics]:Je,[Jn.Traces]:Ve,[Jn.Profiles]:ne}[e]),Qo=(e,t)=>Object.values(on).reduce((n,o)=>Math.abs(t[o]-e)<Math.abs(t[n]-e)?o:n),Zo=e=>{if(!e)return ne;return{[xn.K8s]:m,[xn.Vm]:qe}[e]},er=e=>{if(!e)return"Unknown";return{[xn.K8s]:"Kubernetes Cluster",[xn.Vm]:"Virtual Machine"}[e]},tr=(e,t,n)=>{const o=e[t];return o?o.flatMap(e=>{const o=e[n],r=[];return void 0!==o&&(Array.isArray(o)?r.push(...o):r.push(o)),r.push(...tr(e,t,n)),r}):[]},nr=(e,t)=>{if(t===Tn.Source){let t="";return Object.entries(e).forEach(([e,n])=>{t+=`${e}=${n}&`}),t.slice(0,-1),t}return e},or=(e,t,n)=>{switch(n=n??"500",t){case Nn.Default:return e.v2.colors.purple[n];case Nn.Info:return e.v2.colors.blue[n];case Nn.Error:return e.v2.colors.red[n];case Nn.Warning:return e.v2.colors.yellow[n];case Nn.Success:return e.v2.colors.green[n];case Nn.Loading:case Nn.Disabled:case Nn.Unknown:return e.v2.colors.silver[n];default:return e.v2.colors.white[500]}},rr=e=>{switch(e){case Gn.Updating:case Xn.Pending:case Kn.ContainerCreating:case Vn.Waiting:return Nn.Info;case Gn.Healthy:case Xn.Succeeded:case Xn.Running:case Kn.Running:case Vn.Running:return Nn.Success;case Gn.Degraded:return Nn.Warning;case Gn.Failed:case Xn.Failed:case Kn.Error:case Kn.CrashLoopBackOff:case Kn.CreateContainerError:case Kn.CreateContainerConfigError:case Kn.ErrImagePull:case Kn.ErrImageNeverPull:case Kn.ImagePullBackOff:case Kn.InvalidImageName:case Kn.RegistryUnavailable:case Kn.NetworkNotReady:case Kn.OOMKilled:case Kn.ContainerCannotRun:case Vn.Terminated:case Kn.DeadlineExceeded:case Kn.StartError:return Nn.Error;case Gn.Down:case Kn.Completed:return Nn.Disabled;case Gn.Unknown:case Xn.Unknown:default:return Nn.Unknown}},ir=o.div`
42
- border-radius: 100%;
43
- background-color: ${({theme:e})=>e.v2.colors.silver[700]};
44
- position: relative;
45
- `,ar=o.div`
46
- width: 80px;
47
- height: 80px;
48
- border-radius: 100%;
49
- border: 4px solid ${({theme:e})=>e.v2.colors.green[300]};
50
- border-right-color: transparent;
51
- border-left-color: transparent;
52
- border-bottom-color: transparent;
53
- animation: spin 1s linear infinite;
54
- @keyframes spin {
55
- to {
56
- transform: rotate(360deg);
57
- }
58
- }
59
- `,sr=o(cn)`
60
- position: absolute;
61
- top: 50%;
62
- left: 50%;
63
- transform: translate(-50%, -50%);
64
- `,lr=({percentage:n})=>t(ir,{children:[e(ar,{}),"number"==typeof n?e(sr,{size:on.M,weight:500,nowrap:!0,children:`${n}%`}):null]}),cr={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function dr(e){if("number"==typeof e)return{value:e,unit:"px"};let t;const n=(e.match(/^[0-9.]*/)||"").toString();t=n.includes(".")?parseFloat(n):parseInt(n,10);const o=(e.match(/[^0-9]*$/)||"").toString();return cr[o]?{value:t,unit:o}:{value:t,unit:"px"}}function ur(e){const t=dr(e);return`${t.value}${t.unit}`}const pr=((e,t,n)=>{const o=`react-spinners-${e}-${n}`;if("undefined"==typeof window||!window.document)return o;const r=document.createElement("style");document.head.appendChild(r);const i=r.sheet,a=`\n @keyframes ${o} {\n ${t}\n }\n `;return i&&i.insertRule(a,0),o})("SpinnerOld","50% {opacity: 0.3} 100% {opacity: 1}","fade"),hr=({loading:n=!0,color:o,scale:r=1,speedMultiplier:a=1,cssOverride:s={},style:l={},...c})=>{const d=i(),u=o||d.text.secondary;if(!n)return null;const{value:p}=dr(2),h=p+4.2,g=h/2+h/5.5,m=4*h*r,f={position:"relative",width:`${m}px`,height:`${m}px`,scale:r,...l,...s},y=(e,t)=>({position:"absolute",width:ur(1.5),height:ur(4),borderRadius:ur(2),backgroundColor:u,transition:"2s",animationFillMode:"both",animation:`${pr} ${1.2/a}s ${.12*e}s infinite ease-in-out`,transform:`translate(-50%, -50%) rotate(${t}deg)`});return t("span",{style:f,...c,children:[e("span",{style:{...y(1,0),top:`calc(50% + ${h}px)`,left:"50%"}}),e("span",{style:{...y(2,-45),top:`calc(50% + ${g}px)`,left:`calc(50% + ${g}px)`}}),e("span",{style:{...y(3,90),top:"50%",left:`calc(50% + ${h}px)`}}),e("span",{style:{...y(4,45),top:`calc(50% + ${-1*g}px)`,left:`calc(50% + ${g}px)`}}),e("span",{style:{...y(5,0),top:`calc(50% + ${-1*h}px)`,left:"50%"}}),e("span",{style:{...y(6,-45),top:`calc(50% + ${-1*g}px)`,left:`calc(50% + ${-1*g}px)`}}),e("span",{style:{...y(7,90),top:"50%",left:`calc(50% + ${-1*h}px)`}}),e("span",{style:{...y(8,45),top:`calc(50% + ${g}px)`,left:`calc(50% + ${-1*g}px)`}})]})},gr=o.div`
65
- width: ${({$size:e})=>e}px;
66
- height: ${({$size:e})=>e}px;
67
- border-radius: 100%;
68
- background: ${({$color:e})=>e};
69
- display: flex;
70
- align-items: center;
71
- justify-content: center;
72
- `,mr=({scale:t,icon:n})=>{const o=i();return e(gr,{$size:45*t,$color:"rgba(80, 246, 232, 0.10)",children:e(gr,{$size:43*t,$color:"rgba(80, 246, 232, 0.20)",children:e(gr,{$size:39*t,$color:"rgba(80, 246, 232, 0.40)",children:e(gr,{$size:33*t,$color:"rgba(80, 246, 232, 0.60)",children:e(gr,{$size:23*t,$color:"#50F6E8",children:e(n,{size:16*t,fill:o.v2.colors.black[500]})})})})})})},fr=434,yr=635,br=o.div`
73
- width: ${434}px;
74
- height: ${635}px;
75
- display: flex;
76
- flex-direction: column;
77
- align-items: center;
78
- justify-content: center;
79
- padding: 16px;
80
- background: linear-gradient(180deg, #0b0517 2.82%, #190d31 100%);
81
- position: relative;
82
- `,$r=o.div`
83
- position: absolute;
84
- top: 50%;
85
- left: 50%;
86
- transform: translate(-50%, -50%);
87
- `,vr=()=>t(br,{children:[e($r,{children:t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"464",height:"464",viewBox:"0 0 464 464",fill:"none",children:[e("path",{opacity:"0.1",d:"M231.567 463.134C359.458 463.134 463.134 359.458 463.134 231.567C463.134 103.676 359.458 0 231.567 0C103.676 0 0 103.676 0 231.567C0 359.458 103.676 463.134 231.567 463.134Z",fill:"url(#paint0_radial_164_65835)"}),e("defs",{children:t("radialGradient",{id:"paint0_radial_164_65835",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(201.232 229.641) scale(231.217)",children:[e("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),e("stop",{offset:"0.41",stopColor:"#7C3BFF",stopOpacity:"0.11"}),e("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.13"}),e("stop",{offset:"0.67",stopColor:"#7C3BFF",stopOpacity:"0.18"}),e("stop",{offset:"0.75",stopColor:"#7C3BFF",stopOpacity:"0.25"}),e("stop",{offset:"0.83",stopColor:"#7C3BFF",stopOpacity:"0.33"}),e("stop",{offset:"0.89",stopColor:"#7C3BFF",stopOpacity:"0.44"}),e("stop",{offset:"0.95",stopColor:"#7C3BFF",stopOpacity:"0.56"}),e("stop",{offset:"1",stopColor:"#7C3BFF",stopOpacity:"0.7"})]})})]})}),e($r,{children:t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"432",height:"432",viewBox:"0 0 432 432",fill:"none",children:[e("path",{opacity:"0.3",d:"M215.921 431.841C335.17 431.841 431.841 335.17 431.841 215.921C431.841 96.6709 335.17 0 215.921 0C96.6709 0 0 96.6709 0 215.921C0 335.17 96.6709 431.841 215.921 431.841Z",fill:"url(#paint0_radial_164_65836)"}),e("defs",{children:t("radialGradient",{id:"paint0_radial_164_65836",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(204.229 214.376) scale(216.276)",children:[e("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),e("stop",{offset:"0.38",stopColor:"#7C3BFF",stopOpacity:"0.11"}),e("stop",{offset:"0.52",stopColor:"#7C3BFF",stopOpacity:"0.13"}),e("stop",{offset:"0.62",stopColor:"#7C3BFF",stopOpacity:"0.18"}),e("stop",{offset:"0.69",stopColor:"#7C3BFF",stopOpacity:"0.25"}),e("stop",{offset:"0.76",stopColor:"#7C3BFF",stopOpacity:"0.33"}),e("stop",{offset:"0.82",stopColor:"#7C3BFF",stopOpacity:"0.44"}),e("stop",{offset:"0.88",stopColor:"#7C3BFF",stopOpacity:"0.57"}),e("stop",{offset:"0.93",stopColor:"#7C3BFF",stopOpacity:"0.72"}),e("stop",{offset:"0.97",stopColor:"#7C3BFF",stopOpacity:"0.88"}),e("stop",{offset:"1",stopColor:"#7C3BFF"})]})})]})}),e($r,{children:t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"374",height:"374",viewBox:"0 0 374 374",fill:"none",children:[e("path",{opacity:"0.5",d:"M186.963 373.927C290.22 373.927 373.927 290.22 373.927 186.963C373.927 83.7063 290.22 0 186.963 0C83.7063 0 0 83.7063 0 186.963C0 290.22 83.7063 373.927 186.963 373.927Z",fill:"url(#paint0_radial_164_65837)"}),e("defs",{children:t("radialGradient",{id:"paint0_radial_164_65837",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(166.792 184.246) scale(186.963)",children:[e("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),e("stop",{offset:"0.31",stopColor:"#7C3BFF",stopOpacity:"0.11"}),e("stop",{offset:"0.45",stopColor:"#7C3BFF",stopOpacity:"0.14"}),e("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.19"}),e("stop",{offset:"0.65",stopColor:"#7C3BFF",stopOpacity:"0.26"}),e("stop",{offset:"0.73",stopColor:"#7C3BFF",stopOpacity:"0.35"}),e("stop",{offset:"0.8",stopColor:"#7C3BFF",stopOpacity:"0.46"}),e("stop",{offset:"0.86",stopColor:"#7C3BFF",stopOpacity:"0.6"}),e("stop",{offset:"0.92",stopColor:"#7C3BFF",stopOpacity:"0.76"}),e("stop",{offset:"0.98",stopColor:"#7C3BFF",stopOpacity:"0.93"}),e("stop",{offset:"1",stopColor:"#7C3BFF"})]})})]})}),e($r,{children:t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"257",height:"257",viewBox:"0 0 257 257",fill:"none",children:[e("path",{opacity:"0.7",d:"M128.193 256.387C198.992 256.387 256.387 198.992 256.387 128.193C256.387 57.3941 198.992 0 128.193 0C57.3941 0 0 57.3941 0 128.193C0 198.992 57.3941 256.387 128.193 256.387Z",fill:"url(#paint0_radial_164_65838)"}),e("defs",{children:t("radialGradient",{id:"paint0_radial_164_65838",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(113.263 126.219) scale(128.08)",children:[e("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),e("stop",{offset:"0.31",stopColor:"#7C3BFF",stopOpacity:"0.11"}),e("stop",{offset:"0.45",stopColor:"#7C3BFF",stopOpacity:"0.14"}),e("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.19"}),e("stop",{offset:"0.65",stopColor:"#7C3BFF",stopOpacity:"0.26"}),e("stop",{offset:"0.73",stopColor:"#7C3BFF",stopOpacity:"0.35"}),e("stop",{offset:"0.8",stopColor:"#7C3BFF",stopOpacity:"0.46"}),e("stop",{offset:"0.86",stopColor:"#7C3BFF",stopOpacity:"0.6"}),e("stop",{offset:"0.92",stopColor:"#7C3BFF",stopOpacity:"0.76"}),e("stop",{offset:"0.98",stopColor:"#7C3BFF",stopOpacity:"0.93"}),e("stop",{offset:"1",stopColor:"#7C3BFF"})]})})]})}),e($r,{children:e(ne,{size:112})})]}),xr=o.div`
88
- width: ${({$size:e})=>e}px;
89
- height: ${({$size:e})=>e}px;
90
- border-radius: 100%;
91
- background: ${({$color:e})=>e};
92
- display: flex;
93
- align-items: center;
94
- justify-content: center;
95
- `,Sr=({scale:t=1,icon:n})=>{const o=i();return e(xr,{$size:73*t,$color:"rgba(106, 42, 255, 0.10)",children:e(xr,{$size:71*t,$color:"rgba(106, 42, 255, 0.20)",children:e(xr,{$size:65*t,$color:"rgba(106, 42, 255, 0.40)",children:e(xr,{$size:56*t,$color:"rgba(106, 42, 255, 0.60)",children:e(xr,{$size:39*t,$color:o.v2.colors.purple[500],children:e(n,{size:32*t,fill:o.v2.colors.white[500]})})})})})})},wr=o.div`
96
- flex: 1;
97
- align-self: stretch;
98
- min-height: 0;
99
- display: flex;
100
- flex-direction: column;
101
- gap: ${({$gap:e=24})=>e}px;
102
- overflow-y: auto;
103
- overflow-x: auto;
104
- padding: 12px;
105
- `,Er=o.div`
106
- position: relative;
107
-
108
- // inherit all the properties of the parent (PageContent)
109
- flex: inherit;
110
- align-self: inherit;
111
- min-height: inherit;
112
- display: inherit;
113
- flex-direction: inherit;
114
- gap: inherit;
115
- `,Cr=o.div`
116
- padding: ${({$padding:e})=>e||"12px"};
117
- `,Tr=o.div`
118
- display: flex;
119
- flex-direction: row;
120
- flex-wrap: ${({$wrap:e="unset"})=>e};
121
- align-items: ${({$alignItems:e="center"})=>e};
122
- justify-content: ${({$justifyContent:e="unset"})=>e};
123
- gap: ${({$gap:e=2})=>e}px;
124
- width: ${({$width:e})=>e||"unset"};
125
- height: ${({$height:e})=>e||"unset"};
126
- margin: ${({$margin:e="unset"})=>e};
127
- padding: ${({$padding:e="unset"})=>e};
128
- ${({$fullHeight:e})=>e?"\n flex: 1;\n min-height: 0;\n ":""}
129
- `,Ar=o.div`
130
- display: flex;
131
- flex-direction: column;
132
- flex-wrap: ${({$wrap:e="unset"})=>e};
133
- align-items: ${({$alignItems:e="unset"})=>e};
134
- justify-content: ${({$justifyContent:e="unset"})=>e};
135
- gap: ${({$gap:e=2})=>e}px;
136
- width: ${({$width:e})=>e||"unset"};
137
- height: ${({$height:e})=>e||"unset"};
138
- margin: ${({$margin:e="unset"})=>e};
139
- padding: ${({$padding:e="unset"})=>e};
140
- ${({$fullHeight:e})=>e?"\n flex: 1;\n min-height: 0;\n ":""}
141
- `,Ir=o(Ar)`
142
- width: ${({$width:e})=>e||"100%"};
143
- height: ${({$height:e})=>e||"unset"};
144
- padding: ${({$padding:e})=>e||"unset"};
145
- align-items: center;
146
- justify-content: center;
147
- `,kr=o.div`
148
- display: flex;
149
- flex-direction: column;
150
- padding: 12px;
151
- overflow-y: scroll;
152
- `,Nr=o.div`
153
- position: ${({$relativeToParent:e})=>e?"absolute":"fixed"};
154
- top: 0;
155
- left: 0;
156
- right: 0;
157
- bottom: 0;
158
- // Sits at the modal/drawer layer; rendered before the surface in JSX so the surface
159
- // visually stacks above it via DOM order while sharing the same z-index level.
160
- z-index: ${({theme:e})=>e.v2.zIndex.modal};
161
- background: rgba(0, 0, 0, 0.6);
162
- backdrop-filter: blur(2px);
163
- `,Dr=o.div`
164
- width: 800px;
165
- min-height: ${({$minHeight:e})=>e||"unset"};
166
- height: ${({$isNotModal:e})=>e?"fit-content":"calc(100vh - 350px)"};
167
- margin: ${({$isNotModal:e})=>e?"64px 0 0 0":"64px 7vw 32px 7vw"};
168
- padding: 0 2px;
169
- overflow-y: scroll;
170
- `,Or=o(Ar)`
171
- max-width: ${({$maxWidth:e})=>e||"unset"};
172
- width: 100%;
173
- `,Rr=o(Tr)`
174
- gap: 16px;
175
- padding: 16px;
176
- `,_r=o.div`
177
- width: 100%;
178
- max-height: ${({$maxHeight:e})=>e||"unset"};
179
- overflow-y: auto;
180
- `,Lr=a`
181
- 0% {
182
- background-position: 0% 50%;
183
- }
184
- 100% {
185
- background-position: 100% 50%;
186
- }
187
- `,Pr=o(cn)`
188
- background: ${({$titleColor:e,$gradientColor:t})=>`linear-gradient(45deg, ${e} 0%, ${e} 40%, ${t} 50%, ${e} 60%, ${e} 100%)`};
189
- background-size: 250% 100%; /* Expand background to allow movement */
190
- background-clip: text;
191
- color: transparent;
192
- animation: ${Lr} 1s reverse linear infinite;
193
- `,Fr=e=>{const t=Math.max(0,Date.now()-e),n=Math.floor(t/1e3),o=Math.floor(n/60),r=n%60;return`${String(o).padStart(2,"0")}:${String(r).padStart(2,"0")}`},Mr=({icon:n,title:o,titleColor:r,titleSize:a=on.S,subTitle:s,subTitleColor:l,subTitleSize:c=on.XXXS,startedAt:d,withGradient:u,gradientColor:p,withSpinner:h,withSpinnerOld:g,scaleSpinnerOld:m=1,percentage:f,withVisual:y,visualIcon:b=Qe})=>{const $=i(),[v,x]=Ft(()=>d?Fr(d):"");Mt(()=>{if(!d)return;x(Fr(d));const e=setInterval(()=>x(Fr(d)),1e3);return()=>clearInterval(e)},[d]);const S=r||$.v2.colors.white[500],w=l||$.v2.colors.silver[200],E=p||$.v2.colors.black[500];return t(Ar,{$gap:16,$alignItems:"center",children:[y?e(mr,{scale:1.7,icon:b}):h?e(lr,{percentage:f}):g?e(hr,{scale:m}):null,(o||s||d||n)&&t(Ar,{$gap:8,$alignItems:"center",children:[t(Tr,{$gap:4,children:[n&&e(n,{}),u?e(Pr,{align:"center",size:a,$titleColor:S,$gradientColor:E,children:o}):e(cn,{align:"center",size:a,color:S,children:o})]}),s?e(cn,{align:"center",size:c,color:w,children:s}):null,v?e(cn,{align:"center",size:c,color:S,children:v}):null]})]})},zr=(e,t)=>({[Nn.Default]:n=>ne({fill:or(t,e,"300"),...n}),[Nn.Info]:n=>nt({fill:or(t,e,"400"),...n}),[Nn.Error]:n=>tt({fill:or(t,e,"500"),...n}),[Nn.Warning]:n=>et({fill:or(t,e,"500"),...n}),[Nn.Success]:n=>l({fill:or(t,e,"500"),...n}),[Nn.Loading]:e=>Mr({withSpinnerOld:!0,...e}),[Nn.Disabled]:n=>c({fill:or(t,e,"400"),...n}),[Nn.Unknown]:n=>Ze({fill:or(t,e,"300"),...n})}[e]),Ur=e=>{switch(e){case zn.Success:return Nn.Success;case zn.Error:case zn.Failure:return Nn.Error;case zn.Notice:return Nn.Warning;case zn.Unsupported:case zn.Unknown:return Nn.Info;case zn.Irrelevant:case zn.Disabled:return Nn.Disabled;case zn.Waiting:return Nn.Loading;case zn.Pending:default:return Nn.Default}},Br=(e,t)=>{const n=t.find(([t,n])=>e>=t&&(null===n||e<=n));return n?.[2]||null},jr={redis:b,mysql:x,postgresql:$,postgres:$,kafka:y,elasticsearch:ve,clickhouse:Ae,oracle:Q,aws:ot},Wr={sts:mt,dynamodb:gt,s3:X,sqs:ht,sns:pt,lambda:ut,kinesis:dt,ec2:ct,apigateway:lt,apigatewayv2:lt,bedrock:st,bedrockruntime:st,eventbridge:at,sfn:it,stepfunctions:it,secretsmanager:rt,cloudwatch:Te},Hr=e=>{const t=e.attributes,n=t["db.system"];if(n){const e=jr[n.toLowerCase()];if(e)return e}const o=t["messaging.system"];if(o){const e=jr[o.toLowerCase()];if(e)return e}const r=t["rpc.system"];if(r?.toLowerCase().includes("aws")){const e=t["rpc.service"]?.toLowerCase();if(e){const t=Wr[e];if(t)return t}return ot}const i=e.serviceName.toLowerCase();for(const[e,t]of Object.entries(jr))if(i.includes(e))return t;return Be},Gr=e=>{if(!e)return{namespace:"",name:"",kind:""};if("id"in e&&"object"==typeof e.id)return{namespace:e.id.namespace,name:e.id.name,kind:e.id.kind};const{namespace:t,name:n,kind:o}=e;return{namespace:t,name:n,kind:o}};function Xr(e,t){if(!e)return t;if("object"==typeof e)return e;try{return JSON.parse(e)}catch(e){return t}}const Kr=(e,t)=>{const n=[],o=JSON.parse(JSON.stringify(e));for(const e of o){const o=Xr(t.fields,{}),r=e.items.findIndex(e=>e.type===t.destinationType.type);-1!==r&&n.push(...e.items[r].fields.map(e=>({...e,initialValue:o[e.name]})))}return n},Vr=(e,t)=>{const n=e=>e?.some(({healthy:e})=>e.status!==Nn.Success);return e?.length?e.some(({instrumentationInstances:e})=>n(e)):n(t)??!1};function Jr(e){if(!e||0===e.length)return null;const t=[],n=[],o=[];for(const r of e){if(!r)continue;const e=r.workloadName??"",i=r.workloadKind??"",a=r.workloadNamespace??"",s=r.workloadLanguage??"";e||i?t.push({namespace:a,kind:i,name:e}):a&&n.push(a),s&&o.push(s)}return 0===t.length&&0===n.length&&0===o.length?null:{sources:t,namespaces:n,languages:o}}function Yr(e){if(!e)return null;const t=[];for(const n of e.sources??[])t.push({workloadName:n.name||null,workloadKind:n.kind||null,workloadNamespace:n.namespace||null});for(const n of e.namespaces??[])t.push({workloadNamespace:n});for(const n of e.languages??[])t.push({workloadLanguage:n});return t.length?t:null}function qr(e){const{sourcesScopes:t,...n}=e;return{...n,sourceScopes:Jr(t??null)}}function Qr(e){const{sourceScopes:t,...n}=e;return{...n,sourcesScopes:Yr(t??null)}}const Zr=e=>Array.isArray(e)?!e?.length:"object"==typeof e?!Object.keys(e||{}).length:[void 0,null,""].includes(e),ei=e=>{if(!e)return!1;if(e.length>63)return!1;return/^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$/.test(e)},ti=(e,t=0)=>{const n=(new Date).getTime();return new Date(e).getTime()-n<=t},ni=e=>{const t=String(e).trim().toLowerCase();return["true","false","1","0"].includes(t)},oi=(e,t=0)=>(new Date).getTime()-new Date(e).getTime()>=t,ri=/^(\d+\.)?(\d+\.)?(\*|\d+)$/,ii=e=>ri.test(e),ai=e=>e?.map(({status:e,type:t,reason:n,message:o})=>({status:e?.toLowerCase(),type:tn(t),reason:n?tn(n):"",message:o}))||[],si=(e,t)=>{const n=Xr(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}))},li=e=>e?Object.keys(e).filter(t=>e[t]).map(e=>eo[e]):[],ci=e=>e?Object.keys(e).filter(t=>e[t].supported).map(e=>eo[e]):[],di=e=>{let t=e.replace(/[^\d.]/g,"");const n=t.indexOf(".");return-1!==n&&(t=t.slice(0,n+1)+t.slice(n+1).replace(/\./g,"")),t},ui=e=>e.replace(/[^\d]/g,""),pi=e=>{const t=String(e).trim().toLowerCase();return"true"===t||"1"===t},hi=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},gi=e=>{const t=e.fields.reduce((e,{key:t,value:n})=>{const o=(e=>{if(null!=e){if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e)return String(e);try{return JSON.stringify(e)}catch{return}}})(n);return void 0!==o&&e.push({key:t,value:o}),e},[]);return{...e,fields:t}},mi=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=>mi(e)))}else if("object"==typeof o&&null!==o){const e=mi(o);Object.keys(e).length>0&&(t[n]=e)}else[void 0,null,""].includes(o)||(t[n]=o)}),t},fi=(e,t=2)=>JSON.stringify(e||{},null,t),yi=async(e=1e3)=>new Promise(t=>setTimeout(t,e)),bi=e=>Object.entries(e).reduce((e,[t,n])=>(e[t]="string"==typeof n?n:JSON.stringify(n),e),{}),$i=e=>{let t=e.toString().replace("v","").split("-")[0];t=t.match(/[\d.]+/)?.[0]||"";const n=t.split(".");return 1e4*parseInt(n[0]||"0",10)+parseInt(n[1]||"0",10)},vi=o.div`
194
- /* Portal: viewport coords (usePopup positionMode viewport). Non-portal: offset-parent coords, absolute. */
195
- position: ${({$asPortal:e})=>e?"fixed":"absolute"};
196
- ${({$top:e})=>void 0!==e&&`top: ${e}px;`}
197
- ${({$bottom:e})=>void 0!==e&&`bottom: ${e}px;`}
198
- ${({$left:e})=>void 0!==e&&`left: ${e}px;`}
199
- ${({$right:e})=>void 0!==e&&`right: ${e}px;`}
200
- z-index: 9999;
201
-
202
- background-color: ${({theme:e})=>e.colors.info};
203
- border: 1px solid ${({theme:e})=>e.colors.border};
204
- border-radius: ${({$borderRadius:e})=>void 0!==e?e:"24px"};
205
- max-width: ${({$maxWidth:e})=>void 0!==e?e:"unset"};
206
- width: ${({$width:e})=>void 0!==e?e:"unset"};
207
-
208
- ${({$asPortal:e,$withPointerEvents:t})=>e&&!t&&"pointer-events: none;"}
209
- `,xi=o.div`
210
- padding: ${({$padding:e})=>void 0!==e?e:"12px"};
211
- border-bottom: 1px solid ${({theme:e})=>e.colors.border};
212
- `,Si=o.div`
213
- padding: ${({$padding:e})=>void 0!==e?e:"12px"};
214
- `,wi=o.div`
215
- padding: ${({$padding:e})=>void 0!==e?e:"12px"};
216
- border-top: 1px solid ${({theme:e})=>e.colors.border};
217
- `,Ei=Lt(({isOpen:n,asPortal:o,...r},i)=>{const a=zt(()=>{const{children:n,top:a,bottom:s,left:l,right:c,borderRadius:d,padding:u,maxWidth:p,width:h,header:g,footer:m,withPointerEvents:f,...y}=r;return t(vi,{ref:i,$top:a,$bottom:s,$left:l,$right:c,$borderRadius:d,$padding:u,$maxWidth:p,$width:h,$asPortal:o,$withPointerEvents:f,...y,children:[g&&e(xi,{$padding:u,children:g}),e(Si,{$padding:u,children:n}),m&&e(wi,{$padding:u,children:m})]})},[i,r,o]);return n?o?Qt.createPortal(a,document.body):a:null});Ei.displayName=Ei.name;const Ci=[{type:dn.K8sAttributes,icon:No(dn.K8sAttributes),label:"Kubernetes Attributes",description:"Add dynamic k8s resource attributes to your data.",allowedSignals:[Jn.Traces,Jn.Metrics,Jn.Logs,Jn.Profiles],docsEndpoint:"/pipeline/actions/attributes/k8sattributes",docsDescription:"This action adds kubernetes related resource attributes to spans, metrics data points and log records."},{type:dn.AddClusterInfo,icon:No(dn.AddClusterInfo),label:"Add Cluster Info",description:"Add static cluster-scoped attributes to your data.",allowedSignals:[Jn.Traces,Jn.Metrics,Jn.Logs,Jn.Profiles],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:dn.DeleteAttributes,icon:No(dn.DeleteAttributes),label:"Delete Attribute",description:"Delete attributes from logs, metrics, and traces.",allowedSignals:[Jn.Traces,Jn.Metrics,Jn.Logs,Jn.Profiles],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:dn.RenameAttributes,icon:No(dn.RenameAttributes),label:"Rename Attribute",description:"Rename attributes in logs, metrics, and traces.",allowedSignals:[Jn.Traces,Jn.Metrics,Jn.Logs,Jn.Profiles],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:dn.PiiMasking,icon:No(dn.PiiMasking),label:"PII Masking",description:"Mask PII data in your traces.",allowedSignals:[Jn.Traces],docsEndpoint:"/pipeline/actions/attributes/piimasking",docsDescription:"This action processes a list of PII categories to be masked from the traces."},{type:dn.URLTemplatization,icon:No(dn.URLTemplatization),label:"URL Templatization",description:"Replace dynamic URL path segments with named placeholders to reduce span cardinality.",allowedSignals:[Jn.Traces],docsEndpoint:"/pipeline/actions/attributes/urltemplatization",docsDescription:"Normalizes HTTP URL paths by replacing dynamic segments (IDs, UUIDs, dates) with named placeholders (e.g. /user/1234 → /user/{id}). Reduces cardinality of http.route and span names, improving usability in telemetry backends.",minVersion:$i("v1.21.0")},{type:dn.ExtractAttribute,icon:No(dn.ExtractAttribute),label:"Extract Attribute",description:"Extract values from existing attributes and save them as new attributes using JSON, SQL, resource-path, or custom regex extraction.",allowedSignals:[Jn.Traces],docsEndpoint:"/pipeline/actions/attributes/extractattribute",docsDescription:"Extracts a value from an existing span attribute into a new attribute on the same span. The value can be located by combining a lookup key with a pre-set data format (JSON, SQL, or resource path), or by supplying a custom regular expression that uses a single capture group.",minVersion:$i("v1.29.0")}];var Ti;!function(e){e.ALL="all",e.UNSAVED="unsaved",e.EXISTS="exists",e.DETECTED="detected",e.SELF_HOSTED="self-hosted",e.MANAGED="managed"}(Ti||(Ti={}));const Ai={[Ti.ALL]:{TITLE:"All",DESCRIPTION:"All destinations"},[Ti.UNSAVED]:{TITLE:"Selected",DESCRIPTION:"These are destinations that you have not yet saved."},[Ti.EXISTS]:{TITLE:"Already configured",DESCRIPTION:"These are destinations that you have already configured in other data-streams and can reuse them."},[Ti.DETECTED]:{TITLE:"Suggested",DESCRIPTION:"Odigos found these destinations in your cluster and pre-filled their details. Review and enable them to start sending data."},[Ti.SELF_HOSTED]:{TITLE:"Self hosted",DESCRIPTION:"Full control and customization for advanced application monitoring."},[Ti.MANAGED]:{TITLE:"Managed",DESCRIPTION:"Effortless monitoring with scalable performance management."}},Ii=[{type:Un.CodeAttributes,icon:Ko(Un.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:[En.Go,En.Python,En.JavaScript]},{type:Un.CustomInstrumentation,icon:Ko(Un.CustomInstrumentation),label:"Custom Instrumentation",description:"Define custom instrumentation for specific class and methods (i.e. for Java) or explicit symbol (i.e. for Golang).",docsEndpoint:"/pipeline/rules/custominstrumentation",docsDescription:'The "Custom Instrumentation" rule can be used to instrument a specific symbol (i.e. for Golang), or a class and method combination (i.e. for Java) for detailed tracing.',supportedLanguages:[En.Go,En.Java]},{type:Un.HeadersCollection,icon:Ko(Un.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:[En.Go,En.Java,En.JavaScript]},{type:Un.PayloadCollection,icon:Ko(Un.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:[En.Go,En.JavaScript]}],ki={TITLE:"Regex Testing",REGEX_LABEL:"Regex",REGEX_EMPTY_HINT:"No regex to test - fill in the regex field on the row first.",TEST_STRING_LABEL:"Test string",TEST_STRING_PLACEHOLDER:"Paste a span attribute payload to test the regex against...",TEST_STRING_HELP:'The regex runs verbatim against this string. Paste the actual attribute value the processor will see - if your sample came from a log dump with JSON-escaped quotes (\\"), click Unescape first.',RESULT_LABEL:"Result",RESULT_CAPTURE_HINT:"This is the value that will be written to the new span attribute.",RESULT_EMPTY_REGEX:"Enter a regex to test.",RESULT_EMPTY_INPUT:"Enter a test string to see the result.",RESULT_NO_MATCH:"No match found.",RESULT_INVALID_REGEX_FALLBACK:"Invalid regex pattern.",UNESCAPE_LABEL:"Unescape",UNESCAPE_TOOLTIP:'Convert escape sequences (\\", \\n, \\t, \\\\) into their literal characters. Useful when pasting log output that JSON-escapes attribute values.'},Ni={SEGMENT_PRESET_LABEL:"Preset extract",SEGMENT_PRESET_TOOLTIP:"Extract a value from an existing attribute using a pre-set pattern (JSON, SQL, or Resource path).",SEGMENT_REGEX_LABEL:"Custom Regex",SEGMENT_REGEX_TOOLTIP:"Extract a value using your own regular expression with a single capture group.",PRESET_ROW_TITLE:e=>`Data format ${e+1}`,REGEX_ROW_TITLE:e=>`Custom Regex ${e+1}`,TEST_REGEX_LABEL:"Test Regex",REGEX_LABEL:"Regex",REGEX_PLACEHOLDER:"e.g. (?:^|[\\s,{(\"'])[\"']?study_id[\"']?\\s*[:=]\\s*[\"']?([^\"'\\s,;)}]+)",REGEX_HELP:"A regex with a single capture group; the captured value becomes the new attribute.",TARGET_LABEL:"New span attribute name",TARGET_PLACEHOLDER:"e.g. customerId",TARGET_HELP:"The name of the new extracted attribute."},Di={[yn.JSON]:{label:"JSON",keyLabel:"JSON key",placeholder:"e.g. customer_id",helpMessage:"Type the JSON key containing the value to extract."},[yn.SQL]:{label:"SQL",keyLabel:"SQL key",placeholder:"e.g. invoice_id",helpMessage:"Type the SQL key containing the value to extract."},[yn.ResourcePath]:{label:"Resource path",keyLabel:"Resource path key",placeholder:"e.g. tenants",helpMessage:"Type the resource name containing the value to extract."}},Oi="Cancel",Ri="Save",_i="Edit rule",Li="Edit auto rule",Pi="Create rule",Fi="Delete rule",Mi="Save",zi="Create your first rule",Ui="No Rules Exist",Bi="No Results",ji=e=>`No rules match the search term "${e}"`,Wi="Rule name",Hi="Rule type",Gi="Select the type of condition that makes a trace highly relevant.",Xi="Rule Enabled",Ki="Rule Disabled",Vi="Enabled",Ji="Disabled",Yi="Note",qi="HTTP route",Qi="Method",Zi="Keep Percentage",ea="Keep traces with duration larger than",ta="Keep traces with errors",na="Keep at least this percentage of matching traces. A higher rate from another matching rule may apply instead.",oa="Keep at most this percentage of matching traces. A lower rate from another matching rule may apply instead.",ra="Custom percentage",ia="Disabled rule",aa="Sample",sa="Keep all",la="Drop all",ca="Operation type",da="HTTP route prefix",ua="Templated path",pa="Templated path prefix",ha="Kafka topic",ga="Custom duration (ms)",ma="No preview available",fa="Server address",ya="Drop at most this percentage of matching traces",ba="Unnamed rule",$a="Sampling Preview",va="Source Scope",xa="Unknown source",Sa="Operation",wa="Duration",Ea="Errors",Ca="Keep Percentage",Ta="Define which sources this rule applies to. You can target specific services, namespaces, or apply the rule to the entire cluster.",Aa="Define which operations this rule applies to. You can target specific endpoints or requests, or apply the rule to all operations in the selected services.",Ia="Define a duration threshold for this rule. Traces with a duration longer than the specified value will be considered important and retained.",ka="Retain traces with errors from the selected services and operations.",Na="Use Keep All to retain every matching trace, or Sample when keeping everything is too expensive. 100% means keep all",Da="Use Drop All to discard every matching trace, or Sample to keep some examples. 0% means drop all.",Oa={highlyRelevant:Na,noisy:Da,costReduction:void 0},Ra="Type rule name",_a="Add note here...",La="Type here",Pa="Search source name",Fa="e.g. collector.my.vendor.com",Ma="Optional notes (not used by the system). Add any context or details for this sampling rule.",za="Rule will apply to all sources in the cluster",Ua="If multiple source scopes are set, they must all match simultaneously.",Ba="All sources",ja="-",Wa="All",Ha="Sources",Ga="Namespaces",Xa="Languages",Ka="any of",Va="AND",Ja="All operations",Ya="HTTP server endpoint",qa="HTTP client endpoint",Qa="Kafka consumer",Za="Kafka producer",es="Sampling Rules",ts='Control how traces are categorized based on "Importance" and potential value, for fine grain control of what is kept and what is dropped.',ns="Refresh",os="Create rule",rs="Sampling docs",is="75vw",as="Delete rule?",ss="Are you sure you want to delete this sampling rule?",ls="Delete",cs="Cancel",ds="Kubernetes Health Probes",us="Keep All Error Traces",ps="Drop Traces Cluster-Wide",hs="A rule with the same matching conditions already exists.",gs="Create 'Noisy Operation Kubernetes Health Probes' rule",ms="Edit 'Noisy Operation Kubernetes Health Probes' rule",fs="Automatically detect and sample health probe traces across the cluster.",ys="Create 'Highly Relevant Operations' rule",bs="Edit 'Highly Relevant Operations' rule",$s="Automatically keep all error traces across the entire cluster.",vs="Create 'Cost Reduction' rule",xs="Edit 'Cost Reduction' rule",Ss="Automatically drop a percentage of traces across the entire cluster.",ws="Skip setup",Es="Start setup",Cs="Next",Ts="Go to Sampling",As="Read more",Is="Welcome to Sampling",ks="Cut costs without losing what matters",Ns="Odigos sampling works in three stages:",Ds="Filter noisy traffic",Os="Remove non-actionable traces like health checks.",Rs="Guarantee highly relevance operations",_s="Keep traces with errors, high latency, or mission-critical endpoints/services.",Ls="Reduce cost",Ps="Sample routine traffic using percentages.",Fs="Sampling does not drop individual spans - it keeps or drops the entire trace.",Ms="Filter noisy operations",zs="Cut traces with little or no observability value (health-checks, metric scarping, etc)",Us="Odigos filters these efficiently, dropping them early with almost no resource cost.\n\nSampling happens at request start, so only root span attributes available at that moment can be used. Later insights about the trace (errors, latency) - aren’t available.",Bs="Preset Rules",js="Kubernetes Health Probes",Ws="Automatically ignore health checks",Hs="You can review, adjust, and add additional custom rules later.",Gs="Choose your sampling strategy",Xs="Pick the approach that best fits your balance of cost vs data-completeness",Ks="Keep List",Vs="Budget Friendly",Js="Define which traces must be kept, while all others are sampled by default to minimize cost.",Ys="Cost-oriented - keeps only what you explicitly select.",qs="Best for very large clusters with high volumes of traces and high costs.",Qs="Higher risk of missing important traces without ongoing review.",Zs="Drop List",el="Safe Choice",tl="Define which traces must be aggressively dropped, while all others are kept by default.",nl="Preserves most data unless explicitly filtered.",ol="Safer by default - gaps in rules or system changes increase cost rather than risk losing important traces.",rl="Advanced",il="Maximum Flexibility",al="Full control over all sampling rules and categories.\n\nBest for advanced users who want complete flexibility.",sl="'Keep List' profile",ll="Protect important traces",cl="Start by setting the default sampling rate for all traces.\nThen define rules to exclude highly relevant traces so they are guaranteed to be kept\n\nCommon use-cases include:",dl="Traces with errors",ul="Slow requests (duration above threshold)",pl="Mission-Critical endpoints or services",hl="Services under test or evaluation",gl="New deployments",ml="You can review, adjust, and add rules once onboarding is complete.",fl="Common Rules",yl="Preset Rules",bl="Error collection - entire cluster",$l="Keep all traces with errors",vl="Ambient sampling percentage",xl="'Drop List' profile",Sl="Reduce high-volume traffic",wl="Start by keeping all traces by default. Then define rules to drop high-volume or low-value traces to reduce overall volume and cost.\n\nIn many systems, a small number of endpoints generate most of the trace volume.\nTargeting these high-volume sources can significantly reduce overall data.",El="Advanced Configuration",Cl="Configure sampling rules",Tl="Advanced mode allows you to configure all sampling categories:",Al="Noise Filtering - remove non-actionable traces",Il="Highly Relevance - guarantee important traces are kept",kl='Cost Control - drop traces for "Normal" operations',Nl="Rules can target:",Dl="Services",Ol="HTTP Endpoints",Rl="DB Operations",_l="Errors",Ll="Latency and more...",Pl="Sampling configured successfully!",Fl="Your sampling configuration is ready.\nYou can add and adjust rules anytime in Sampling Rules space.",Ml="Odigos will now:",zl="Filter noisy operations",Ul="Guarantee important traces",Bl="Reduce cost using controlled sampling",jl="Recommended",Wl={noisy:"Rules that reduce noise from high-volume, low-value operations using Head Sampling.",highlyRelevant:"Add a rule to identify highly relevant operations. Traces with errors, long duration, or from critical endpoints and key workflows will be retained so important transactions are always available for analysis.",costReduction:"Rules that optimize costs by sampling less critical data using Tail Sampling."},Hl={noisy:gs,highlyRelevant:ys,costReduction:vs},Gl={noisy:ms,highlyRelevant:bs,costReduction:xs},Xl={noisy:"Noisy Operation",highlyRelevant:"Highly Relevant",costReduction:"Cost Reduction"},Kl=[{id:Jn.Logs,value:"Logs"},{id:Jn.Metrics,value:"Metrics"},{id:Jn.Traces,value:"Traces"},{id:Jn.Profiles,value:"Profiles"}],Vl={PID:"process.pid",VPID:"process.vpid"},Jl={[En.Go]:"Go",[En.Java]:"Java",[En.JavaScript]:"Node.js",[En.Python]:"Python",[En.DotNet]:".NET",[En.CSharp]:"C#",[En.CPlusPlus]:"C++",[En.Php]:"PHP",[En.Ruby]:"Ruby",[En.Rust]:"Rust",[En.Swift]:"Swift",[En.Elixir]:"Elixir",[En.MySql]:"MySQL",[En.Nginx]:"Nginx",[En.Postgres]:"PostgreSQL",[En.Redis]:"Redis",[En.Kafka]:"Kafka",[En.Ignored]:"Ignored",[En.Unknown]:"Unknown",[En.Processing]:"Processing",[En.NoContainers]:"No Containers",[En.NoRunningPods]:"No Running Pods"},Yl=[{id:En.Go,label:Jl[En.Go],icon:_o(En.Go)},{id:En.Java,label:Jl[En.Java],icon:_o(En.Java)},{id:En.JavaScript,label:Jl[En.JavaScript],icon:_o(En.JavaScript)},{id:En.Python,label:Jl[En.Python],icon:_o(En.Python)},{id:En.Php,label:Jl[En.Php],icon:_o(En.Php)},{id:En.Ruby,label:Jl[En.Ruby],icon:_o(En.Ruby)},{id:En.Rust,label:Jl[En.Rust],icon:_o(En.Rust)},{id:En.DotNet,label:Jl[En.DotNet],icon:_o(En.DotNet)},{id:En.CSharp,label:Jl[En.CSharp],icon:_o(En.CSharp)},{id:En.CPlusPlus,label:Jl[En.CPlusPlus],icon:_o(En.CPlusPlus)},{id:En.Swift,label:Jl[En.Swift],icon:_o(En.Swift)},{id:En.Elixir,label:Jl[En.Elixir],icon:_o(En.Elixir)}],ql={id:Mn.OpentelemetryEbpfInstrumentation,label:Mn.OpentelemetryEbpfInstrumentation,icon:ft},Ql={[En.Go]:{community:[{id:Mn.GolangCommunity,label:Mn.GolangCommunity,icon:_o(En.Go)},ql],enterprise:[{id:Mn.GolangEnterprise,label:Mn.GolangEnterprise,icon:_o(En.Go)}]},[En.JavaScript]:{community:[{id:Mn.NodejsCommunity,label:Mn.NodejsCommunity,icon:_o(En.JavaScript)},ql],enterprise:[{id:Mn.NodejsEnterprise,label:Mn.NodejsEnterprise,icon:_o(En.JavaScript)}]},[En.Python]:{community:[{id:Mn.PythonCommunity,label:Mn.PythonCommunity,icon:_o(En.Python)},ql],enterprise:[{id:Mn.PythonEnterprise,label:Mn.PythonEnterprise,icon:_o(En.Python)}]},[En.Java]:{community:[{id:Mn.JavaCommunity,label:Mn.JavaCommunity,icon:_o(En.Java)},ql],enterprise:[{id:Mn.JavaEnterprise,label:Mn.JavaEnterprise,icon:_o(En.Java)},{id:Mn.JavaEbpfInstrumentations,label:Mn.JavaEbpfInstrumentations,icon:_o(En.Java)}]},[En.DotNet]:{community:[{id:Mn.DotNetCommunity,label:Mn.DotNetCommunity,icon:_o(En.DotNet)},ql],enterprise:[{id:Mn.DotNetEnterprise,label:Mn.DotNetEnterprise,icon:_o(En.DotNet)}]},[En.Ruby]:{community:[{id:Mn.RubyCommunity,label:Mn.RubyCommunity,icon:_o(En.Ruby)},ql],enterprise:[{id:Mn.RubyEnterprise,label:Mn.RubyEnterprise,icon:_o(En.Ruby)}]},[En.Php]:{community:[{id:Mn.PhpCommunity,label:Mn.PhpCommunity,icon:_o(En.Php)},ql],enterprise:[]},[En.CSharp]:{community:[],enterprise:[{id:Mn.CPlusPlusEnterprise,label:Mn.CPlusPlusEnterprise,icon:_o(En.CSharp)}]},[En.MySql]:{community:[],enterprise:[{id:Mn.MySqlEnterprise,label:Mn.MySqlEnterprise,icon:_o(En.MySql)}]},[En.CPlusPlus]:{community:[ql],enterprise:[]},[En.Rust]:{community:[ql],enterprise:[]},[En.Swift]:{community:[ql],enterprise:[]},[En.Elixir]:{community:[ql],enterprise:[]},[En.Nginx]:{community:[ql],enterprise:[]},[En.Postgres]:{community:[ql],enterprise:[]},[En.Redis]:{community:[ql],enterprise:[]},[En.Kafka]:{community:[ql],enterprise:[]},[En.Ignored]:{community:[],enterprise:[]},[En.Unknown]:{community:[ql],enterprise:[]},[En.Processing]:{community:[],enterprise:[]},[En.NoContainers]:{community:[],enterprise:[]},[En.NoRunningPods]:{community:[],enterprise:[]}},Zl=6048e5,ec=_t()(Jt(e=>({darkMode:!0,setDarkMode:t=>e({darkMode:t})}),{name:ao.DARK_MODE,storage:"undefined"!=typeof window?Yt(()=>localStorage):void 0})),tc={dataStreamsLoading:!1,dataStreams:[],selectedStreamName:oo},nc=_t(e=>({...tc,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(tc)})),oc=_t(e=>({drawerType:null,drawerEntityId:null,pendingViewSamplingRule:null,setDrawerType:t=>e({drawerType:t}),setDrawerEntityId:t=>e({drawerEntityId:t}),setPendingViewSamplingRule:t=>e({pendingViewSamplingRule:t})})),rc=()=>({searchText:"",statuses:[],platformTypes:[],namespaces:[],kinds:[],monitors:[],languages:[],podsAgentInjectionStatus:[],onlyErrors:!1}),ic=_t(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}),podsAgentInjectionStatus:[],setPodsAgentInjectionStatus:t=>e({podsAgentInjectionStatus:t}),onlyErrors:!1,setOnlyErrors:t=>e({onlyErrors:t}),setAll:t=>e(t),clearAll:()=>e({searchText:"",statuses:[],platformTypes:[],namespaces:[],kinds:[],monitors:[],languages:[],podsAgentInjectionStatus:[],onlyErrors:!1}),getEmptyState:rc})),ac=_t(e=>({currentModal:"",setCurrentModal:t=>e({currentModal:t})})),sc=_t((e,t)=>({notifications:[],addNotification:n=>{const o=new Date,r=`${o.getTime().toString()}${n.target?`#${n.target}`:""}`,{notifications:i}=t();i.some(e=>e.type===n.type&&e.title===n.title&&e.message===n.message&&!e.dismissed)||e(e=>({notifications:[{...n,id:r,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)}))}}));var lc;!function(e){e.Instrumenting="instrumenting",e.Uninstrumenting="uninstrumenting",e.BulkInstrumenting="bulk-instrumenting",e.BulkUninstrumenting="bulk-uninstrumenting",e.DownloadingDiagnose="downloading-diagnose"}(lc||(lc={}));const cc=(e,t)=>({...t?.[e]||{total:0,current:0,percentage:0}}),dc=e=>(e.total<e.current&&(e.total=e.current+1),e.percentage=Math.round(e.current/e.total*100),e),uc=_t((e,t)=>({progress:{},setProgress:(n,o)=>{const r=t(),i=cc();return"number"==typeof o.total&&(i.total=o.total),"number"==typeof o.current&&(i.current=o.current),Array.isArray(o.list)&&(i.list=o.list),e({progress:{...r.progress,[n]:dc(i)}})},addProgress:(n,o,r)=>{const i=t(),a=cc(n,i.progress);return a.current+=o,r&&(a.list=a.list?.map(e=>e.label===r.label?{...e,status:r.status}:e)),e({progress:{...i.progress,[n]:dc(a)}})},resetProgress:t=>e({progress:{[t]:void 0}})})),pc=_t(e=>({selectedSources:{},setSelectedSources:t=>e({selectedSources:t}),resetSelectedState:()=>e(()=>({selectedSources:{},selectedConnection:null}))})),hc={configuredSources:{},configuredFutureApps:{},configuredDestinations:[],configuredDestinationsUpdateOnly:[]},gc=(e,t)=>e.destinationType.type!==t.destinationType.type,mc=_t(e=>({...hc,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=>gc(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=>gc(e,t))})),clearStore:()=>e(()=>({...hc}))})),fc=e=>{function t(){return void 0===e?{}:bo(e)}const[n,o]=Ft(t()),[r,i]=Ft({}),[a,s]=Ft(t()),l=Ut((e,t)=>{const n={};if(!t||"object"!=typeof t)return e?{...e}:n;for(const[o,r]of Object.entries(e)){const e=o;if(Array.isArray(r)){const o=t[e];Array.isArray(o)&&r.length===o.length&&r.every((e,t)=>"object"==typeof e&&null!==e?0===Object.keys(l(e,o[t])).length:e===o[t])||(n[e]=t[e])}else if("object"==typeof r&&null!==r)if(null==t[e]||"object"!=typeof t[e])n[e]=t[e];else{const o=l(r,t[e]);Object.keys(o).length>0&&(n[e]=o)}else r!==t[e]&&(n[e]=t[e])}for(const o of Object.keys(t))o in e||(n[o]=t[o]);return n},[]),c=(e,t)=>0===Object.keys(l(e,t)).length,d=zt(()=>!c(a,n),[a,n]);Mt(()=>{const r=t();void 0!==e&&"{}"===JSON.stringify(n)&&"{}"!==JSON.stringify(r)&&(o(r),s(r))},[e,n]);const u=Ut((e,t)=>$o("formData"===e?n:r,t.toString()),[n,r]);return{formData:n,formErrors:r,getFormDiff:l,areFormValuesEqual:c,isFormDirty:d,handleFormChange:(e,t,n)=>{if(e){const n=e.toString(),r=n.split(".");1===r.length?o(n=>({...n,[e]:t})):o(e=>{const n=bo(e);let o=n;for(let e=0;e<r.length-1;e++){const t=r[e];o[t]&&"object"==typeof o[t]||(o[t]={}),o=o[t]}return o[r[r.length-1]]=t,n}),i(e=>{const t=n,o=r[r.length-1],i=void 0!==e[t],a=o!==t&&void 0!==e[o];if(!i&&!a)return e;const s={...e};return i&&delete s[t],a&&delete s[o],s})}else n&&o({...n})},handleErrorChange:(e,t,n)=>{if(e){const n=e.toString().split(".");1===n.length?i(n=>({...n,[e]:t})):i(e=>{const o=bo(e);let r=o;for(let e=0;e<n.length-1;e++){const t=n[e];r[t]&&"object"==typeof r[t]||(r[t]={}),r=r[t]}return r[n[n.length-1]]=t,o})}else n&&i({...n})},resetFormData:e=>{const n=e||t();o(n),s(n),i({})},getNestedValue:u}},yc={type:"",name:"",notes:"",signals:[],disabled:!1,fields:{clusterAttributes:null,overwriteExistingValues:null,renames:null,attributeNamesToDelete:null,piiCategories:null,urlTemplatizationRulesGroups:null,extractAttribute:null}},bc=()=>{const{addNotification:e}=sc(),{formData:t,formErrors:n,handleFormChange:o,handleErrorChange:r,resetFormData:i}=fc(yc),a=e=>e&&Array.isArray(e)?e.map(e=>!e.fromSources?.length&&e.from?{...e,fromSources:[e.from]}:e):e;return{formData:t,formErrors:n,handleFormChange:o,resetFormData:i,validateForm:n=>{const o={};let i=!0;if(Object.entries(t).forEach(([e,t])=>{switch(e){case"type":case"signals":Zr(t)&&(o[e]=so.FIELD_IS_REQUIRED)}}),t.type===dn.URLTemplatization){const e=t.fields?.urlTemplatizationRulesGroups;if(e)for(const t of e)if(t.templatizationRules?.some(e=>!e.template?.trim())){o.fields=so.FIELD_IS_REQUIRED;break}}return i=!Object.values(o).length,!i&&n?.withAlert&&e({type:Nn.Warning,title:n.alertTitle,message:so.REQUIRED_FIELDS,hideFromHistory:!0}),r(void 0,void 0,o),i},loadFormWithDrawerItem:({type:e,signals:t,name:n,notes:r,disabled:i,fields:s})=>{const l={...bo(yc),type:e,signals:t,name:n,notes:r,disabled:i};Object.entries(s).forEach(([e,t])=>{if(t)switch(e){case un.LabelsAttributes:case un.AnnotationsAttributes:l.fields||(l.fields={}),l.fields[e]=a(t);break;case un.CollectContainerAttributes:case un.CollectReplicaSetAttributes:case un.CollectWorkloadId:case un.CollectClusterId:case un.ClusterAttributes:case un.OverwriteExistingValues:case un.AttributeNamesToDelete:case un.Renames:case un.PiiCategories:case un.ExtractAttribute:case un.UrlTemplatizationRulesGroups:l.fields||(l.fields={}),l.fields[e]=t}}),o(void 0,void 0,l)}}},$c=e=>{Mt(()=>{if(e){const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])},vc=()=>{const{setDrawerType:e,setDrawerEntityId:t}=oc();return{onClickNode:(n,o)=>{const{data:{id:r,type:i}}=o;switch(i){case Tn.Source:case Tn.Destination:case Tn.Action:case Tn.InstrumentationRule:e(i),t(r)}}}},xc=()=>{const{setDrawerType:e,setDrawerEntityId:t}=oc(),{markAsDismissed:n,markAsSeen:o}=sc();return{onClickNotification:(r,i)=>{const{id:a,crdType:s,target:l}=r,{dismissToast:c}=i||{};if(s&&l)switch(s){case Tn.InstrumentationRule:e(Tn.InstrumentationRule),t(Xo(l,Tn.InstrumentationRule));break;case Tn.Source:case"InstrumentationConfig":case"InstrumentationInstance":e(Tn.Source),t(Xo(l,Tn.Source));break;case Tn.Action:e(Tn.Action),t(Xo(l,Tn.Action));break;case Tn.Destination:case"Destination":e(Tn.Destination),t(Xo(l,Tn.Destination))}o(a),c&&n(a)}}},Sc=()=>{const e=Bt(null),[t,n]=Ft(0),[o,r]=Ft(0);return Mt(()=>{const t=()=>{if(e.current){const{width:t,height:o}=e.current.getBoundingClientRect();n(t),r(o)}};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),{containerRef:e,containerWidth:t,containerHeight:o}};var wc;!function(e){e[e.XS=16]="XS",e[e.S=18]="S",e[e.M=24]="M",e[e.L=32]="L"}(wc||(wc={}));const Ec=o.div`
218
- width: ${({$size:e})=>1.5*e}px;
219
- height: ${({$size:e})=>1.5*e}px;
220
- display: flex;
221
- align-items: center;
222
- justify-content: center;
223
- border-radius: 100%;
224
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
225
- &:hover {
226
- background: ${({theme:e})=>e.v2.colors.silver[900]};
227
- }
228
- `,Cc=({"data-id":t,icon:n,size:o=wc.S,onClick:r,disabled:i})=>e(Ec,{"data-id":t,$size:o,$disabled:i,onClick:e=>{r&&!i&&(e.stopPropagation(),r(e))},children:e(n,{size:o})}),Tc=({onDone:t}={})=>{const[n,o]=Ft(!1),[r,i]=Ft(-1),a=Ut(async(e,r)=>{if(!n){if(o(!0),void 0!==r&&i(r),navigator?.clipboard&&navigator.clipboard.writeText)try{await navigator.clipboard.writeText(e)}catch(e){}else{const t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select();try{document.execCommand("copy")}catch(e){}document.body.removeChild(t)}t?.(),setTimeout(()=>{o(!1),i(-1)},1e3)}},[n,t]);return{CopyButton:Ut(({value:t,size:o})=>e(Cc,{icon:n?yt:bt,size:o,onClick:()=>a(t)}),[n]),isCopied:n,copiedIndex:r,clickCopy:a}},Ac=e=>{const{addNotification:t}=sc(),{formData:n,handleFormChange:o,formErrors:r,handleErrorChange:i,resetFormData:a}=fc(e);return{formData:n,formErrors:r,handleFormChange:o,resetFormData:a,validateForm:e=>{const o={};let r=!0;return n.name?ei(n.name)?o.name=void 0:(r=!1,o.name=so.ILLEGAL_K8S_LABEL):(r=!1,o.name=so.FIELD_IS_REQUIRED),!r&&e?.withAlert&&t({type:Nn.Warning,title:e.alertTitle,message:so.REQUIRED_FIELDS,hideFromHistory:!0}),i(void 0,void 0,o),r},loadFormWithDrawerItem:({name:t})=>{const n={...bo(e),name:t};o(void 0,void 0,n)}}},Ic={type:"",name:"",exportedSignals:{logs:!1,metrics:!1,traces:!1,profiles:!1},fields:[],disabled:!1},kc=e=>{const{supportedSignals:t,preLoadedFields:n}=e||{},{addNotification:o}=sc(),{formData:r,formErrors:i,handleFormChange:a,handleErrorChange:s,resetFormData:l}=fc(Ic),[c,d]=Ft([]),[u,p]=Ft([]);Mt(()=>{var e;p(c?(e=c,e.filter(e=>!!e).map(e=>{const{name:t,componentType:n,componentProperties:o,displayName:r,initialValue:i,renderCondition:a}=e;if(n===In.Dropdown){const e=Xr(o,{}),s=Array.isArray(e.values)?e.values.map(e=>({id:e,label:e})):Object.entries(e.values).map(([e,t])=>({id:e,label:t}));return{name:t,componentType:n,title:r,value:i,placeholder:e.placeholder||"Select an option",options:s,renderCondition:a,...e}}return{name:t,componentType:n,title:r,value:i,renderCondition:a,...Xr(o,{})}})).map(e=>{if(n){const t="string"==typeof n?Xr(n,{}):n;if(e.name in t)return{...e,value:t[e.name]}}return e}):[])},[c,n]),Mt(()=>{if(u){const e=u.map(e=>({key:e.name,value:e.value}));a("fields",e)}},[u]),Mt(()=>{if(t&&0===li(r.exportedSignals).length){const{logs:e,metrics:n,traces:o}=t;a("exportedSignals",{logs:e.supported,metrics:n.supported,traces:o.supported})}},[t,r.exportedSignals]);return{formData:r,formErrors:i,handleFormChange:a,resetFormData:l,validateForm:e=>{const t={};let n=!0;return u.forEach(({name:e,value:o,required:r})=>{r&&!o&&(n=!1,t[e]=so.FIELD_IS_REQUIRED)}),!n&&e?.withAlert&&o({type:Nn.Warning,title:e.alertTitle,message:so.REQUIRED_FIELDS,hideFromHistory:!0}),s(void 0,void 0,t),n},loadFormWithDrawerItem:({destinationType:{type:e},name:t,disabled:n,exportedSignals:o,fields:r})=>{const i={...bo(Ic),type:e,name:t,disabled:n,exportedSignals:o,fields:Object.entries(Xr(r,{})).map(([e,t])=>({key:e,value:t}))};return a(void 0,void 0,i),i},yamlFields:c,setYamlFields:d,dynamicFields:u,setDynamicFields:p}},Nc={ruleName:"",notes:"",disabled:!1,workloads:null,sourceScopes:null,instrumentationLibraries:null,payloadCollection:{[Hn.HttpRequest]:null,[Hn.HttpResponse]:null,[Hn.DbQuery]:null,[Hn.Messaging]:null},codeAttributes:{[Bn.Column]:null,[Bn.FilePath]:null,[Bn.Function]:null,[Bn.LineNumber]:null,[Bn.Namespace]:null,[Bn.StackTrace]:null},headersCollection:null,customInstrumentations:{[Wn.Java]:null,[Wn.Golang]:null}},Dc=()=>{const{formData:e,formErrors:t,handleFormChange:n,handleErrorChange:o,resetFormData:r}=fc(Nc);return{formData:e,formErrors:t,handleFormChange:n,resetFormData:r,validateForm:()=>(o(void 0,void 0,{}),!0),loadFormWithDrawerItem:({ruleName:e,notes:t,disabled:o,sourceScopes:r,payloadCollection:i,codeAttributes:a,headersCollection:s,customInstrumentations:l})=>{const c={...bo(Nc),ruleName:e,notes:t,disabled:o,sourceScopes:r??null};i&&(c.payloadCollection={[Hn.HttpRequest]:i[Hn.HttpRequest]?{}:null,[Hn.HttpResponse]:i[Hn.HttpResponse]?{}:null,[Hn.DbQuery]:i[Hn.DbQuery]?{}:null,[Hn.Messaging]:i[Hn.Messaging]?{}:null}),a&&(c.codeAttributes={[Bn.Column]:a[Bn.Column]||null,[Bn.FilePath]:a[Bn.FilePath]||null,[Bn.Function]:a[Bn.Function]||null,[Bn.LineNumber]:a[Bn.LineNumber]||null,[Bn.Namespace]:a[Bn.Namespace]||null,[Bn.StackTrace]:a[Bn.StackTrace]||null}),s&&(c.headersCollection=s),l&&(c.customInstrumentations={[Wn.Java]:l[Wn.Java]||null,[Wn.Golang]:l[Wn.Golang]||null}),n(void 0,void 0,c)}}},Oc=({active:e,key:t,withAltKey:n,withCtrlKey:o,withShiftKey:r,withMetaKey:i},a)=>(Mt(()=>{const s=s=>{e&&t===s.key&&(!n||n&&s.altKey)&&(!o||o&&s.ctrlKey)&&(!r||r&&s.shiftKey)&&(!i||i&&s.metaKey)&&(s.preventDefault(),s.stopPropagation(),a(s))};return window.addEventListener("keydown",s),()=>{window.removeEventListener("keydown",s)}},[t,e,n,o,r,i,a]),null),Rc="data-ignore-outside-click",_c=(e,t)=>{const n=Bt(t);n.current=t,Mt(()=>{const t=t=>{const o=t.target;e.current&&!e.current.contains(o)&&((e=>{let t=e;for(;t;){if(t instanceof Element&&t.hasAttribute(Rc))return!0;t=t.parentNode}return!1})(o)||n.current())};return document.addEventListener("mousedown",t),document.addEventListener("touchstart",t),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("touchstart",t)}},[e])},Lc=(e,{axis:t="horizontal",deps:n=[]}={})=>{const[o,r]=Ft(!1),i=e=>{const n="vertical"===t?e.scrollHeight>e.clientHeight+1:e.scrollWidth>e.clientWidth+1;r(n)};return jt(()=>{const t=e.current;if(!t)return;i(t);const n=new ResizeObserver(()=>i(t));return n.observe(t),()=>n.disconnect()},[t,...n]),Mt(()=>{if("undefined"==typeof document||!document.fonts?.ready)return;let t=!1;return document.fonts.ready.then(()=>{const n=e.current;!t&&n&&i(n)}),()=>{t=!0}},[t,...n]),o},Pc=(e,{behavior:t="smooth",block:n="center",inline:o,delayMs:r=50}={})=>{const i=Bt(null);return Mt(()=>{if(!e)return;const a=window.setTimeout(()=>{i.current?.scrollIntoView({behavior:t,block:n,inline:o})},r);return()=>window.clearTimeout(a)},[e,t,n,o,r]),i},Fc=({sectionNames:e,threshold:t=.4})=>{const[n,o]=Ft(e[0]||""),[r,i]=Ft(null),a=Bt({}),s=Bt(!1),l=Bt(!1),c=Ut((e,t)=>{a.current[e]=t},[]),d=Ut(e=>{i(e)},[]),u=Ut(e=>{l.current=!0,o(e)},[]);return Mt(()=>{if(!l.current)return;l.current=!1;const e=a.current[n];if(!e)return;s.current=!0,e.scrollIntoView({behavior:"smooth",block:"start"});const t=setTimeout(()=>{s.current=!1},600);return()=>clearTimeout(t)},[n]),Mt(()=>{const n=a.current,i=e.map(e=>n[e]).filter(Boolean);if(!i.length)return;const l=new IntersectionObserver(e=>{if(!s.current)for(const t of e)if(t.isIntersecting){const e=t.target.getAttribute("data-section-name");e&&o(e);break}},{threshold:t,root:r});return i.forEach(e=>l.observe(e)),()=>l.disconnect()},[e,t,r]),{selectedSection:n,setSelectedSection:u,setSectionRef:c,setScrollContainerRef:d}},Mc=({defaultClientHeight:e=0,defaultClientwidth:t=0,onClickOutside:n,positionMode:o="local"}={})=>{const r=Bt(null),[i,a]=Ft(!1),[s,l]=Ft({top:0,left:0}),[c,d]=Ft({edge:"top",align:"left"});_c(r,()=>{i&&(a(!1),n?.())});return{popupRef:r,popupOpen:i,setPopupOpen:a,popupPosition:s,arrowPlacement:c,handlePosition:(n,i)=>{if("local"===o)return void l({top:i,left:n});const{innerWidth:a,innerHeight:s}=window,c=r.current?.clientWidth||t,u=r.current?.clientHeight||e,p=n/a,h=p<1/3?"left":p>2/3?"right":"center";d({edge:i<s/2?"top":"bottom",align:h});let g=i,m=n;if(g>=s/2&&(g+=-u),"center"===h){m=n-c/2;const e=8;m=Math.max(e,Math.min(m,a-c-e))}else m>=a/2&&(m=n-c);l({top:g,left:m})}}},zc=()=>({getItemSS:(e,t)=>{const n=sessionStorage.getItem(e);return n?Xr(n,t):t},setItemSS:(e,t)=>{sessionStorage.setItem(e,JSON.stringify(t))},removeItemSS:e=>{sessionStorage.removeItem(e)}}),Uc={otelServiceName:"",currentStreamName:""},Bc=()=>{const{formData:e,formErrors:t,handleFormChange:n,handleErrorChange:o,resetFormData:r}=fc(Uc);return{formData:e,formErrors:t,handleFormChange:n,resetFormData:r,validateForm:()=>(o(void 0,void 0,{}),!0),loadFormWithDrawerItem:({serviceName:e,id:t})=>{const o={...bo(Uc),otelServiceName:e||t.name||""};n(void 0,void 0,o)}}};try{Ht.addDefaultLocale(Gt)}catch(e){}const jc=new Ht(Gt.locale),Wc=[{ms:31536e6,long:["year","years"],short:"y"},{ms:2592e6,long:["month","months"],short:"mo"},{ms:864e5,long:["day","days"],short:"d"},{ms:36e5,long:["hour","hours"],short:"h"},{ms:6e4,long:["minute","minutes"],short:"m"},{ms:1e3,long:["second","seconds"],short:"s"}],Hc=e=>"string"==typeof e?new Date(e.replace("t","T").replace("z","Z")):new Date(e),Gc=()=>{const[e,t]=Ft(0);Mt(()=>{const e=setInterval(()=>{t(e=>(e+1)%Number.MAX_SAFE_INTEGER)},1e3);return()=>clearInterval(e)},[]);return{formatTimeAgo:Ut(e=>{try{return jc.format(Hc(e))}catch(e){return"-"}},[e]),formatDurationAgo:Ut((e,{units:t=2,style:n="long",suffix:o=!0}={})=>{try{const r=Hc(e);let i=Math.max(0,Date.now()-r.getTime());if(i<1e3)return"short"===n?"0s":o?"just now":"0 seconds";const a=[];for(const e of Wc){if(a.length===t)break;const o=Math.floor(i/e.ms);if(!(o<=0&&0===a.length)){if(o<=0)break;i-=o*e.ms,a.push("short"===n?`${o}${e.short}`:`${o} ${1===o?e.long[0]:e.long[1]}`)}}const s="short"===n?a.join(""):a.join(" ");return o&&"long"===n?`${s} ago`:s}catch(e){return"-"}},[e])}},Xc=o.div`
229
- color: ${({$color:e,theme:t})=>e||t.text.secondary};
230
- font-size: ${({$size:e})=>void 0!==e?e:16}px;
231
- font-weight: ${({$weight:e})=>void 0!==e?e:300};
232
- text-align: ${({$align:e})=>e||"left"};
233
- opacity: ${({$opacity:e})=>void 0!==e?e:1};
234
- text-decoration: ${({$decoration:e})=>e||"none"};
235
- text-transform: ${({$transform:e,$family:t})=>e||("secondary"===t?"uppercase":"none")};
236
- font-family: ${({theme:e,$family:t="primary"})=>e.font_family[t]};
237
- white-space: ${({$nowrap:e})=>e?"nowrap":"unset"};
238
- text-wrap: ${({$nowrap:e})=>e?"nowrap":"unset"};
239
- `,Kc=e=>{const t=e.match(/<a[^>]*href="([^"]*)"[^>]*>(.*?)<\/a>/g);return t?.map(e=>{const[t,n,o]=e.split('"');return{original:e,href:n,label:o.replace("</a>","").replace(">","")}})},Vc=e=>{const t=e.match(/<strong[^>]*>(.*?)<\/strong>/g);return t?.map(e=>{const t=e.replace(/<strong[^>]*>/,"").replace(/<\/strong>/,"");return{original:e,label:t}})},Jc=(n,o)=>{const r=Kc(n);r?.forEach((e,t)=>{n=n.replace(e.original,`LINK-${t}###`)});const i=Vc(n);i?.forEach((e,t)=>{n=n.replace(e.original,`STRONG-${t}###`)});return n.split(" ").map(n=>{if(n.includes("LINK-")){const[i,a]=n.split("###"),s=r?.[parseInt(i.replace("LINK-",""))];return t(Pt,{children:[e("a",{href:s?.href,target:"_blank",rel:"noreferrer",style:{color:o.colors.majestic_blue_soft},children:s?.label}),a?`${a} `:" "]},n)}if(n.includes("STRONG-")){const[o,r]=n.split("###"),a=i?.[parseInt(o.replace("STRONG-",""))];return t(Pt,{children:[e("strong",{style:{fontWeight:600},children:a?.label}),r?`${r} `:" "]},n)}return n+" "})},Yc=({children:n,color:o,size:r,weight:a,align:s,family:l,opacity:c,decoration:d,transform:u,nowrap:p,...h})=>{const g=i(),m=zt(()=>(n?["string","number"].includes(typeof n)?n.toString():Array.isArray(n)?n.map(e=>"object"==typeof e&&Object.hasOwn(e,"props")?e.props.children:e).filter(e=>e&&["string","number"].includes(typeof e)).join(" "):"":"").split("\n"),[n]);return e(Xc,{$color:o,$size:r,$weight:a,$align:s,$family:l,$opacity:c,$decoration:d,$transform:u,$nowrap:p,...h,children:m.length?m.map((n,o)=>t(Pt,{children:[Jc(n,g),o!==m.length-1?e("br",{}):null]},`text-${o}-${n}`)):n})},qc=o.div`
240
- width: ${({$fullWidth:e})=>e?"100%":"fit-content"};
241
- position: relative;
242
- display: flex;
243
- align-items: center;
244
- gap: 4px;
245
-
246
- /* Only signal "this is hoverable" when there's actually a tooltip to show. Important for callers (e.g. truncation-aware wrappers) that always mount the Tooltip with "keepAlive" and toggle "text" based on overflow — we don't want every wrapped element to show a help cursor when no tooltip would actually appear. */
247
- cursor: ${({$hasText:e})=>e?"help":"inherit"};
248
- ${({$ellipsis:e})=>e&&r`
249
- overflow: hidden;
250
- text-overflow: ellipsis;
251
- white-space: nowrap;
252
- `}
253
- `,Qc=o.div`
254
- display: flex;
255
- flex-direction: column;
256
- align-items: flex-start;
257
- gap: 8px;
258
- width: 100%;
259
- `,Zc=o.div`
260
- display: flex;
261
- width: 100%;
262
- flex-shrink: 0;
263
- box-sizing: border-box;
264
- line-height: 0;
265
-
266
- ${({$align:e})=>"left"===e&&"\n justify-content: flex-start;\n padding-left: 20px;\n padding-right: 10px;\n "}
267
- ${({$align:e})=>"right"===e&&"\n justify-content: flex-end;\n padding-left: 10px;\n padding-right: 20px;\n "}
268
- ${({$align:e})=>"center"===e&&"\n justify-content: center;\n align-items: center;\n min-height: 8px;\n "}
269
- `,ed=o.div`
270
- width: 0;
271
- height: 0;
272
- border-style: solid;
273
- border-left: 6.5px solid transparent;
274
- border-right: 6.5px solid transparent;
275
- flex-shrink: 0;
276
-
277
- ${({$pointsUp:e,theme:t})=>e?`\n border-bottom: 8px solid ${t.v2.colors.black[500]};\n border-top-width: 0;\n `:`\n border-top: 8px solid ${t.v2.colors.black[500]};\n border-bottom-width: 0;\n `}
278
- `,td=o.div`
279
- display: flex;
280
- flex-direction: column;
281
- align-items: stretch;
282
- min-width: 0;
283
- `,nd=o.div`
284
- background-color: ${({theme:e})=>e.v2.colors.black[500]};
285
- border-radius: 4px;
286
- padding: 8px;
287
- box-sizing: border-box;
288
- min-width: 0;
289
- `,od=({withIcon:o,titleIcon:r,title:a,text:s,timestamp:l,children:c,fullWidth:d=!1,keepAlive:u=!1,ellipsis:p=!1})=>{const h=i(),{popupRef:g,popupOpen:m,setPopupOpen:f,popupPosition:y,arrowPlacement:b,handlePosition:$}=Mc({positionMode:"viewport",defaultClientHeight:48,defaultClientwidth:Math.min(7.5*(s?.length||0),300)}),v=zt(()=>!!Kc(s||"")?.length,[s]),x=e=>{const{type:t,clientX:n,clientY:o}=e;v?$(y.left||n,y.top||o):$(n,o),f("mouseleave"!==t)};return s||u?t(qc,{$fullWidth:d,$ellipsis:p,$hasText:!!s,onMouseEnter:x,onMouseMove:x,onMouseLeave:x,children:[c,o&&e(Ze,{fill:h.v2.colors.white[500]}),e(Ei,{ref:g,isOpen:m&&!!s,top:y.top,left:y.left,asPortal:!0,withPointerEvents:v,onMouseEnter:v?x:void 0,style:{backgroundColor:"transparent",border:"none"},maxWidth:"270px",borderRadius:"0",padding:"0",children:t(td,{children:["top"===b.edge&&e(Zc,{$align:b.align,children:e(ed,{$pointsUp:!0})}),e(nd,{children:t(Qc,{children:[(!!r||!!a)&&t(Tr,{$gap:4,style:{alignItems:"center"},children:[r&&e(r,{size:16},"icon"),a&&e(cn,{size:on.XS,children:a},"title")]}),!!s&&e(cn,{size:on.XXXS,children:s}),!!l&&e(cn,{size:on.XXXS,color:rn.Secondary,children:new Date(l).toLocaleString()})]})}),"bottom"===b.edge&&e(Zc,{$align:b.align,children:e(ed,{$pointsUp:!1})})]})})]}):e(n,{children:c})},rd=o(Tr)`
290
- gap: 0;
291
- `,id=o.button`
292
- padding: 4px 8px;
293
- background-color: ${({theme:e,$selected:t})=>t?e.colors.dropdown_bg_2:"transparent"};
294
- border-radius: ${({$position:e})=>"left"===e?"32px 0px 0px 32px":"right"===e?"0px 32px 32px 0px":"0"};
295
- border: 1px solid ${({theme:e})=>e.colors.border};
296
- display: flex;
297
- align-items: center;
298
- justify-content: center;
299
- cursor: pointer;
300
- &:hover {
301
- border: 1px solid ${({theme:e})=>e.colors.secondary};
302
- }
303
- `,ad=({isPrettyMode:n,setIsPrettyMode:o})=>t(rd,{children:[e(id,{$position:"left",$selected:n,onClick:()=>o(!0),children:e($t,{})}),e(id,{$position:"right",$selected:!n,onClick:()=>o(!1),children:e(vt,{})})]}),sd=o.table`
304
- border-collapse: collapse;
305
- font-family: ${({theme:e})=>e.font_family.primary};
306
- `,ld=o.tbody``,cd=o.tr`
307
- td:first-child {
308
- padding-left: 0 !important;
309
- }
310
- td:last-child {
311
- padding-right: 0 !important;
312
- }
313
- `,dd=o.td`
314
- vertical-align: top;
315
- padding: 4px 6px;
316
- `,ud=o(Yc)`
317
- white-space: nowrap;
318
- `,pd=o.span`
319
- white-space: ${({$noWrap:e})=>e?"nowrap":"pre-wrap"};
320
- overflow-wrap: break-word;
321
- word-break: break-word;
322
- word-wrap: break-word;
323
- /* Fallback for older browsers */
324
- -ms-word-break: break-all;
325
- font-size: 12px;
326
- `,hd=({language:t,code:n,theme:o,flatten:r,pretty:a})=>{const{darkMode:s}=i(),l=o?Kt[o]:s?Kt.palenight:Kt.vsLight;let c="";if("json"===t){const e=Xr(n,{}),t=mi(e);c=fi(r?To(t):t)}else c=n;return a&&"json"===t?e(gd,{darkMode:s,str:c}):e(Xt,{theme:l||(s?Kt.palenight:Kt.vsLight),language:t,code:c,children:({getLineProps:t,getTokenProps:n,tokens:o})=>e("pre",{children:o.map((o,r)=>e("div",{...t({line:o}),children:o.map((t,o)=>e(pd,{...n({token:t})},`line-${r}-token-${o}`))},`line-${r}`))})})},gd=({darkMode:n,str:o})=>{const r=i(),a=(n,o)=>{const i=new Array(n).fill(n=>t(cd,{...n,children:[e(dd,{}),e(dd,{})]}));return e(Pt,{children:i.map((t,n)=>e(t,{style:0===n?{borderBottom:`1px solid ${r.colors.border}`}:{}},`empty-row-${o}-${n}`))})};return e(Xt,{theme:n?Kt.palenight:Kt.vsLight,language:"json",code:o,children:({getLineProps:n,getTokenProps:o,tokens:i})=>e(sd,{children:e(ld,{children:i.map((i,s)=>{const l=(e=>{const t=["punctuation","plain","operator"];return e.filter(e=>!t.includes(e.types[0])).map(({types:e,content:t})=>{const n=[...e],o=["property","string"].includes(n[0])?t.replace(/"/g,""):t;return"string"===n[0]&&(["true","false"].includes(o.split("@")[0])&&(n[0]="boolean"),o.split("@")[0].match(/^[0-9]+$/)&&(n[0]="number")),{types:n,content:o}})})(i),c=n({line:l});return 1===l.length&&"property"===l[0].types[0]?t(Pt,{children:[a(2,s),t(cd,{...c,children:[e(dd,{children:e(ud,{children:l[0].content})}),e(dd,{})]})]},`line-${s}`):2===l.length?e(cd,{...c,children:l.map((n,i)=>{const{text:a,components:l}=((t,n)=>{const[o,...r]=t.split("@");return{text:o,components:r?.map((t,o)=>{if(!t.includes("="))return null;const[r,i]=t.split("=");switch(r){case"tooltip":return e(od,{withIcon:!0,text:i},`${r}-${i}-${o}`);case"status":if("none"===i)return e("div",{style:{width:16,height:16}},`${r}-${i}-${o}`);let t=zr(i,n);return t||(t=zr(Nn.Warning,n)),e(t,{},`${r}-${i}-${o}`);default:return null}})?.filter(e=>!!e)||[]}})(n.content,r),c=0===i;return e(dd,{children:t(Tr,{children:[e(Tr,{children:l}),e(pd,{$noWrap:c,...o({token:n}),children:a})]})},`line-${s}-token-${i}`)})},`line-${s}`):(l.length,null)})})})})},md={v2:{text:{size:{xxxs:10,xxs:12,xs:14,s:16,m:20,l:24,xl:32,xxl:40,xxxl:48}},colors:{black:{500:"#151618"},white:{500:"#FFFFFF"},purple:{100:"#E1D4FF",200:"#C3AAFF",300:"#A57FFF",400:"#8855FF",500:"#6A2AFF",600:"#5925D0",700:"#4822A2",800:"#371E73",900:"#271A45"},green:{100:"#DCFDFA",200:"#B9FBF6",300:"#96FAF1",400:"#73F8ED",500:"#50F6E8",600:"#44C9BE",700:"#399D94",800:"#2D6F6A",900:"#224340"},grey:{25:"#F6F6F6",50:"#ECECED",100:"#DADADB",150:"#B8B8B8",200:"#B4B5B7",300:"#8F9093",400:"#696B6F",500:"#44464B",600:"#3A3C40",700:"#313236",800:"#282A2E",900:"#1B1B1C"},silver:{25:"#F6F6F7",50:"#EDEDEE",100:"#DADCDE",200:"#B6B8BD",300:"#91959C",400:"#6D717B",500:"#484E5A",600:"#3E424C",700:"#34383F",750:"#2C2F36",800:"#26292F",900:"#1F2125",1e3:"#1B1C1D"},red:{100:"#FFE5E7",200:"#FFCBD0",300:"#FFB0B8",400:"#FF96A1",500:"#FF7C89",600:"#D06772",700:"#A2535B",800:"#733F44",900:"#452B2D",1e3:"#2E2022"},blue:{100:"#EBF0FA",200:"#D6E1F4",300:"#ADC3EA",400:"#84A4DF",500:"#5C86D5",600:"#3368CA",700:"#2D57A6",800:"#274782",900:"#21375E",1e3:"#1C273A"},yellow:{100:"#FFFBF1",200:"#FFF7E2",300:"#FFEFC6",400:"#FFE7A9",500:"#FFDF8D",600:"#FFD770",700:"#D0B05E",800:"#A28A4C",900:"#73633A",1e3:"#453D28"},beige:{600:"#EEC990"},pink:{500:"#FF7CC8",600:"#FF7CA9"},orange:{600:"#F29142"}},zIndex:{base:1,island:100,drawer:1e3,modal:1e3,dropdown:1100,popover:1100,tooltip:1200}},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"}},fd={v2:md.v2,darkMode:!0,colors:{...md.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:md.font_family},yd={v2:md.v2,darkMode:!1,colors:{...md.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:md.font_family},bd=e=>e?fd:yd;var $d=Object.freeze({__proto__:null,baseTheme:md,darkModeTheme:fd,getTheme:bd,lightModeTheme:yd});Vt('@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");*,:after,:before{box-sizing:border-box}*{-ms-overflow-style:none;scrollbar-width:none}::-webkit-scrollbar{display:none}*{animation-duration:.3s;animation-fill-mode:forwards;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 vd=({children:t})=>{const{darkMode:n}=ec();return e(s,{theme:bd(n),children:t})},xd={100:"FF","099":"FC","098":"FA","097":"F7","096":"F5","095":"F2","094":"F0","093":"ED","092":"EB","091":"E8","090":"E6","089":"E3","088":"E0","087":"DE","086":"DB","085":"D9","084":"D6","083":"D4","082":"D1","081":"CF","080":"CC","079":"C9","078":"C7","077":"C4","076":"C2","075":"BF","074":"BD","073":"BA","072":"B8","071":"B5","070":"B3","069":"B0","068":"AD","067":"AB","066":"A8","065":"A6","064":"A3","063":"A1","062":"9E","061":"9C","060":"99","059":"96","058":"94","057":"91","056":"8F","055":"8C","054":"8A","053":"87","052":"85","051":"82","050":"80","049":"7D","048":"7A","047":"78","046":"75","045":"73","044":"70","043":"6E","042":"6B","041":"69","040":"66","039":"63","038":"61","037":"5E","036":"5C","035":"59","034":"57","033":"54","032":"52","031":"4F","030":"4D","029":"4A","028":"47","027":"45","026":"42","025":"40","024":"3D","023":"3B","022":"38","021":"36","020":"33","019":"30","018":"2E","017":"2B","016":"29","015":"26","014":"24","013":"21","012":"1F","011":"1C","010":"1A","009":"17","008":"14","007":"12","006":"0F","005":"0D","004":"0A","003":"08","002":"05","001":"03","000":"00"};var Sd=Object.freeze({__proto__:null,hex:xd});const wd={in:{left:a`
327
- from { transform: translateX(-100%); }
328
- to { transform: translateX(0); }
329
- `,right:a`
330
- from { transform: translateX(100%); }
331
- to { transform: translateX(0); }
332
- `,top:a`
333
- from { transform: translateY(-100%); }
334
- to { transform: translateY(0); }
335
- `,bottom:a`
336
- from { transform: translateY(100%); }
337
- to { transform: translateY(0); }
338
- `,center:a`
339
- from { transform: translate(-50%, 100%); }
340
- to { transform: translate(-50%, -50%); }
341
- `},out:{left:a`
342
- from { transform: translateX(0); }
343
- to { transform: translateX(-100%); }
344
- `,right:a`
345
- from { transform: translateX(0); }
346
- to { transform: translateX(100%); }
347
- `,top:a`
348
- from { transform: translateY(0); }
349
- to { transform: translateY(-100%); }
350
- `,bottom:a`
351
- from { transform: translateY(0); }
352
- to { transform: translateY(100%); }
353
- `,center:a`
354
- from { transform: translate(-50%, -50%); }
355
- to { transform: translate(-50%, 100%); }
356
- `}},Ed={in:a`
357
- from {
358
- width: 0%;
359
- }
360
- to {
361
- width: 100%;
362
- }
363
- `,out:a`
364
- from {
365
- width: 100%;
366
- }
367
- to {
368
- width: 0%;
369
- }
370
- `},Cd=a`
371
- 0% {
372
- transform: scale(1);
373
- opacity: 1;
374
- }
375
- 75%, 100% {
376
- transform: scale(2);
377
- opacity: 0;
378
- }
379
- `,Td=a`
380
- 0% {
381
- background-position: -500px 0;
382
- }
383
- 100% {
384
- background-position: 500px 0;
385
- }
386
- `,Ad={in:a`
387
- from {
388
- opacity: 0;
389
- }
390
- to {
391
- opacity: 1;
392
- }
393
- `,out:a`
394
- from {
395
- opacity: 1;
396
- }
397
- to {
398
- opacity: 0;
399
- }
400
- `};var Id=Object.freeze({__proto__:null,fade:Ad,ping:Cd,progress:Ed,shimmer:Td,slide:wd});const kd=o.div`
401
- width: ${({$orientation:e,$thickness:t,$length:n})=>"vertical"===e?`${t}px`:n||"100%"};
402
- height: ${({$orientation:e,$thickness:t,$length:n})=>"horizontal"===e?`${t}px`:n||"100%"};
403
- margin: ${({$orientation:e,$margin:t})=>t||("horizontal"===e?"8px 0":"0 8px")};
404
- background-color: ${({$type:e,theme:t})=>(e?or(t,e):t.v2.colors.grey[400])+xd["050"]};
405
- opacity: ${({$opacity:e})=>e||1};
406
- `,Nd=({orientation:t="horizontal",type:n,thickness:o=1,length:r,margin:i,opacity:a})=>e(kd,{$orientation:t,$type:n,$thickness:o,$length:r,$margin:i,$opacity:a}),Dd={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function Od(e){if("number"==typeof e)return{value:e,unit:"px"};let t;const n=(e.match(/^[0-9.]*/)||"").toString();t=n.includes(".")?parseFloat(n):parseInt(n,10);const o=(e.match(/[^0-9]*$/)||"").toString();return Dd[o]?{value:t,unit:o}:{value:t,unit:"px"}}function Rd(e){const t=Od(e);return`${t.value}${t.unit}`}const _d=((e,t,n)=>{const o=`react-spinners-${e}-${n}`;if("undefined"==typeof window||!window.document)return o;const r=document.createElement("style");document.head.appendChild(r);const i=r.sheet,a=`\n @keyframes ${o} {\n ${t}\n }\n `;return i&&i.insertRule(a,0),o})("FadeLoader","50% {opacity: 0.3} 100% {opacity: 1}","fade"),Ld=({loading:n=!0,color:o,scale:r=1,speedMultiplier:a=1,cssOverride:s={},style:l={},...c})=>{const d=i(),u=o||d.text.secondary;if(!n)return null;const{value:p}=Od(2),h=p+4.2,g=h/2+h/5.5,m=4*h*r,f={position:"relative",width:`${m}px`,height:`${m}px`,scale:r,...l,...s},y=(e,t)=>({position:"absolute",width:Rd(1.5),height:Rd(4),borderRadius:Rd(2),backgroundColor:u,transition:"2s",animationFillMode:"both",animation:`${_d} ${1.2/a}s ${.12*e}s infinite ease-in-out`,transform:`translate(-50%, -50%) rotate(${t}deg)`});return t("span",{style:f,...c,children:[e("span",{style:{...y(1,0),top:`calc(50% + ${h}px)`,left:"50%"}}),e("span",{style:{...y(2,-45),top:`calc(50% + ${g}px)`,left:`calc(50% + ${g}px)`}}),e("span",{style:{...y(3,90),top:"50%",left:`calc(50% + ${h}px)`}}),e("span",{style:{...y(4,45),top:`calc(50% + ${-1*g}px)`,left:`calc(50% + ${g}px)`}}),e("span",{style:{...y(5,0),top:`calc(50% + ${-1*h}px)`,left:"50%"}}),e("span",{style:{...y(6,-45),top:`calc(50% + ${-1*g}px)`,left:`calc(50% + ${-1*g}px)`}}),e("span",{style:{...y(7,90),top:"50%",left:`calc(50% + ${-1*h}px)`}}),e("span",{style:{...y(8,45),top:`calc(50% + ${g}px)`,left:`calc(50% + ${-1*g}px)`}})]})},Pd=a`
407
- 0% {
408
- background-position: 0% 50%;
409
- }
410
- 100% {
411
- background-position: 100% 50%;
412
- }
413
- `,Fd=o(Yc)`
414
- background: ${({$textColor:e,$stripColor:t})=>`linear-gradient(45deg, ${e} 0%, ${e} 40%, ${t} 50%, ${e} 60%, ${e} 100%)`};
415
- background-size: 250% 100%; /* Expand background to allow movement */
416
- background-clip: text;
417
- color: transparent;
418
- animation: ${Pd} 1s reverse linear infinite;
419
- `,Md=({children:t="Loading...",textColor:n,stripColor:o,...r})=>{const a=i(),s=n||a.v2.colors.white[500],l=o||a.v2.colors.black[500];return e(Fd,{$textColor:s,$stripColor:l,...r,children:t})};var zd,Ud;!function(e){e.Primary="primary",e.Secondary="secondary",e.Text="text"}(zd||(zd={})),function(e){e.S="small",e.M="medium",e.L="large"}(Ud||(Ud={}));const Bd=o.button`
420
- display: flex;
421
- align-items: center;
422
- justify-content: center;
423
- gap: 8px;
424
- ${({$fullWidth:e})=>e&&r`
425
- width: 100%;
426
- `}
427
- border: none;
428
- border-radius: 6px;
429
- ${({$size:e,$hasLabel:t})=>e===Ud.S?r`
430
- height: 32px;
431
- ${t?r`
432
- padding: 8px 16px;
433
- `:r`
434
- width: 32px;
435
- `}
436
- `:e===Ud.M?r`
437
- height: 38px;
438
- ${t?r`
439
- padding: 8px 18px;
440
- `:r`
441
- width: 38px;
442
- `}
443
- `:r`
444
- height: 44px;
445
- ${t?r`
446
- padding: 8px 22px;
447
- `:r`
448
- width: 44px;
449
- `}
450
- `}
451
-
452
- cursor: pointer;
453
- &:disabled {
454
- background-color: ${({theme:e})=>e.v2.colors.silver[800]};
455
- cursor: not-allowed;
456
- }
457
- &:enabled {
458
- ${({$withShadow:e})=>e?r`
459
- box-shadow: 0 0 11px 0 rgba(0, 0, 0, 0.32);
460
- `:""}
461
- ${({$variant:e})=>e===zd.Primary?r`
462
- background-color: ${({theme:e})=>e.v2.colors.purple[500]};
463
- &:hover {
464
- background-color: ${({theme:e})=>e.v2.colors.purple[600]};
465
- }
466
- &:active {
467
- background-color: ${({theme:e})=>e.v2.colors.purple[700]};
468
- }
469
- `:e===zd.Secondary?r`
470
- background-color: ${({theme:e})=>e.v2.colors.silver[750]};
471
- &:hover {
472
- background-color: ${({theme:e})=>e.v2.colors.silver[600]};
473
- }
474
- &:active {
475
- background-color: ${({theme:e})=>e.v2.colors.silver[500]};
476
- }
477
- `:e===zd.Text?r`
478
- background-color: transparent;
479
- &:hover {
480
- background-color: ${({theme:e})=>e.v2.colors.silver[800]};
481
- }
482
- &:active {
483
- background-color: ${({theme:e})=>e.v2.colors.silver[900]};
484
- }
485
- `:""}
486
- }
487
- `,jd=Lt(({"data-id":o,label:r,tooltip:a,hideTooltipIcon:s,leftIcon:l,rightIcon:c,variant:d=zd.Primary,size:u=Ud.M,iconSize:p,loading:h,fullWidth:g,withShadow:m,textColor:f,disabled:y,onClick:b,...$},v)=>{const x=i(),S=p||(u===Ud.L?18:16),w=u===Ud.L?on.S:on.XS,E=f||(y?x.v2.colors.grey[400]:x.v2.colors.white[500]),[C,T]=Ft(!1),A=Ut(async e=>{e.stopPropagation(),T(!0),await(b?.(e)),T(!1)},[b]);return e(Bd,{ref:v,"data-id":o,$variant:d,$size:u,$fullWidth:g,$withShadow:m,$hasLabel:!!r,disabled:y,onClick:h||C?void 0:A,...$,children:e(od,{text:a,withIcon:!s,children:h||C?r?e(Md,{size:x.v2.text.size[w],textColor:E}):e(Ld,{}):t(n,{children:[l&&e(Ir,{$width:"fit-content",children:e(l,{size:S,fill:E})}),r?e(cn,{size:w,weight:500,color:E,nowrap:!0,children:r}):null,c&&e(Ir,{$width:"fit-content",children:e(c,{size:S,fill:E})})]})})})});jd.displayName=jd.name;const Wd=({error:n})=>{const o=i(),r={container:{display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",color:o.text.error,fontFamily:o.font_family.primary},errorMessage:{padding:10,borderRadius:5,whiteSpace:"pre-wrap",background:o.colors.error},errorStack:{whiteSpace:"pre-wrap",fontSize:"12px"},errorStackWrapper:{textAlign:"left",marginTop:10},infoText:{marginTop:100,color:o.text.secondary,fontSize:"14px"}};return t("div",{style:r.container,children:[e("h2",{children:"Something went wrong!"}),e("pre",{style:r.errorMessage,children:n?.message||"Unknown Error"}),t("details",{style:r.errorStackWrapper,children:[e("summary",{children:"Stack Trace"}),e("pre",{style:r.errorStack,children:n?.stack||"Unknown Stack"})]}),e("p",{style:r.infoText,children:"Try refreshing the page or contact support"}),e(jd,{variant:zd.Secondary,onClick:()=>window.location.reload(),label:"Reload Page"})]})},Hd=({children:t})=>e(qt,{FallbackComponent:({error:t,...n})=>e(vd,{children:e(Wd,{...n,error:t})}),children:t}),Gd=o.button`
488
- position: relative;
489
- width: ${({$size:e})=>e}px;
490
- height: ${({$size:e})=>e}px;
491
- border: ${({theme:e,$withBorder:t})=>t?`1px solid ${e.colors.border}`:"none"};
492
- border-radius: 100%;
493
- background-color: ${({$backgroundColor:e})=>e||"transparent"};
494
- display: flex;
495
- align-items: center;
496
- justify-content: center;
497
- cursor: pointer;
498
- &:hover {
499
- background-color: ${({theme:e,$backgroundColor:t})=>t?t+xd["070"]:e.colors.dropdown_bg_2};
500
- }
501
- `,Xd=o.div`
502
- position: absolute;
503
- top: ${({$size:e})=>e/5}px;
504
- right: ${({$size:e})=>e/5}px;
505
- width: 6px;
506
- height: 6px;
507
- border-radius: 100%;
508
- background-color: ${({theme:e,$color:t})=>t||e.colors.secondary};
509
-
510
- &::after {
511
- content: '';
512
- position: absolute;
513
- inset: 0;
514
- border-radius: 100%;
515
- background-color: ${({theme:e,$color:t})=>t||e.colors.secondary};
516
- animation: ${Cd} 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
517
- }
518
- `,Kd=({children:n,onClick:o,tooltip:r,size:i=36,withPing:a,pingColor:s,withBorder:l,backgroundColor:c,...d})=>e(od,{text:r,children:t(Gd,{$size:i,$withBorder:l,$backgroundColor:c,onClick:o,...d,children:[a&&e(Xd,{$size:i,$color:s}),n]})}),Vd=({src:t="",alt:n="",size:o=16})=>{const[r,i]=Ft(!1);return t&&!r?e("img",{src:t,alt:n,width:o,height:o,onError:()=>i(!0)}):e(f,{size:o})},Jd=o.div`
519
- display: flex;
520
- align-items: center;
521
- justify-content: center;
522
- width: ${({$size:e})=>e}px;
523
- height: ${({$size:e})=>e}px;
524
- border-radius: 8px;
525
- background: ${({$status:e,theme:t})=>{const n=e?or(t,e):t.v2.colors.grey[500];return`linear-gradient(180deg, ${n} 0%, ${n+xd["030"]} 100%)`}};
526
- `,Yd=({icon:t,src:n="",alt:o="",status:r,size:i=36})=>e(Jd,{$status:r,$size:i,children:n?e(Vd,{src:n,alt:o,size:i-12}):e(t||f,{size:i-12})}),qd=o.div`
527
- position: relative;
528
- display: flex;
529
- flex-wrap: wrap;
530
- align-items: center;
531
- justify-content: center;
532
- width: ${({$size:e})=>e}px;
533
- height: ${({$size:e})=>e}px;
534
- `,Qd=o.div`
535
- position: absolute;
536
- top: ${({$top:e})=>e}px;
537
- left: ${({$left:e})=>e}px;
538
- z-index: ${({$zIndex:e})=>e};
539
- display: flex;
540
- align-items: center;
541
- justify-content: center;
542
- width: ${({$size:e})=>e}px;
543
- height: ${({$size:e})=>e}px;
544
- border-radius: 100%;
545
- border: 1px solid ${({theme:e,$status:t})=>(t?or(e,t):e.v2.colors.grey[400])+xd["030"]};
546
- background: ${({$status:e,theme:t})=>{const n=e?or(t,e):t.v2.colors.grey[500];return`linear-gradient(180deg, ${n} 0%, ${n+xd["030"]} 100%)`}};
547
- `,Zd=({icons:n=[],iconSrcs:o=[],status:r,size:a=36,id:s})=>{const l=i(),c=1===n.length||1===o.length?a-12:a/2.7;if(o.length>0)return e(Zd,{icons:o.map(t=>()=>e(Vd,{src:t,size:c})),status:r,size:a,id:s});if(1===n.length)return e(Yd,{icon:n[0],status:r,size:a});const d=e=>n.length<=2?.5*c:0===e||1===e?0:1.15*c,u=e=>0===e?0:1===e?1.15*c:1.15*c*.5;return e(qd,{$status:r,$size:a,children:n.map((o,i)=>i>2?null:e(Qd,{$status:r,$size:1.5*c,$top:d(i),$left:u(i),$zIndex:i+1,children:2===i&&n.length>3?t(Yc,{family:"secondary",color:l.text.dark_grey,size:.8*c,children:["+",n.length-2]}):e(o,{size:c})},`icon-${s}-${i}`))})},eu=o.div`
548
- position: relative;
549
- &.animated {
550
- overflow: hidden;
551
- padding-bottom: 1px;
552
- border-radius: 32px;
553
- animation: ${({$isLeaving:e})=>e?wd.out.bottom:wd.in.bottom} ${({$duration:e})=>e/10}ms forwards;
554
- }
555
- `,tu=o.div`
556
- position: absolute;
557
- bottom: -1px;
558
- left: 0;
559
- z-index: -1;
560
- width: 100%;
561
- height: 100%;
562
- border-radius: 32px;
563
- background-color: ${({$type:e,theme:t})=>or(t,e)};
564
- animation: ${Ed.out} ${({$duration:e})=>""+(e-e/10)}ms forwards;
565
- `,nu=o.div`
566
- display: flex;
567
- align-items: center;
568
- flex: 1;
569
- gap: 8px;
570
- padding: 0 12px;
571
- border-radius: 32px;
572
- background-color: ${({$type:e,theme:t})=>or(t,e)};
573
- `,ou=o.div`
574
- display: flex;
575
- align-items: center;
576
- margin: 0 auto 0 0;
577
- padding: 8px 0;
578
- max-width: ${({$withAction:e,$overrideMaxWidth:t})=>t||(e?"400px":"500px")};
579
- min-height: 12px;
580
- `,ru=o(Yc)`
581
- font-size: 14px;
582
- color: ${({$type:e,theme:t})=>or(t,e)};
583
- `,iu=o(Yc)`
584
- color: ${({$type:e,theme:t})=>or(t,e)};
585
- font-size: 12px;
586
- `,au=o(Tr)``,su=o(Yc)`
587
- text-transform: uppercase;
588
- text-decoration: underline;
589
- font-size: 12px;
590
- font-family: ${({theme:e})=>e.font_family.secondary};
591
- white-space: nowrap;
592
- cursor: pointer;
593
- &:hover {
594
- transform: scale(1.1);
595
- transition: transform 0.3s;
596
- }
597
- `,lu=({type:n,icon:o,title:r,message:a,action:s,onClose:l,duration:c=5e3,overrideMaxWidth:d,style:u})=>{const p=i(),[h,g]=Ft(!1),m=Bt(null),f=Bt(null),y=e=>{l&&(g(!0),l({asSeen:e?.asSeen}))};Mt(()=>(m.current=setTimeout(()=>y({asSeen:!1}),c),()=>{m.current&&clearTimeout(m.current)}),[c]);const b=o||zr(n,p);return t(eu,{className:l?"animated":"",$duration:c,$isLeaving:h,onMouseEnter:()=>{m.current&&clearTimeout(m.current),f.current&&(f.current.style.animationPlayState="paused")},onMouseLeave:()=>{if(f.current){const e=f.current.offsetWidth/f.current.parentElement.offsetWidth*c;m.current=setTimeout(()=>y({asSeen:!1}),e),f.current.style.animationPlayState="running"}},children:[t(nu,{"data-id":"toast",$type:n,style:u,children:[e(b,{fill:or(p,n)}),t(ou,{$withAction:!!s,$overrideMaxWidth:d,children:[r&&e(ru,{$type:n,children:r}),r&&a&&e(Nd,{orientation:"vertical",type:n}),a&&e(iu,{$type:n,children:a})]}),(!!s||!!l)&&t(au,{children:[s&&e(su,{"data-id":"toast-action",onClick:s.onClick,children:s.label}),l&&e(Kd,{"data-id":"toast-close",onClick:()=>y({asSeen:!0}),children:e(xt,{size:12})})]})]}),l&&e(tu,{ref:f,$duration:c,$type:n})]})},cu=o(Yc)`
598
- max-width: ${({$maxWidth:e})=>e?`${e}px`:"unset"};
599
- white-space: nowrap;
600
- overflow-x: auto;
601
-
602
- &::after {
603
- // This is to prevent the "browser default tooltip" from appearing when the title is too long
604
- content: '';
605
- display: block;
606
- }
607
- `,du=({maxWidth:n,text:o,textSize:r=16,textColor:i})=>{const[a,s]=Ft(!1),l=Bt(null);return Mt(()=>{if(l.current){const{clientWidth:e}=l.current;s(e<1.05*(n-r)&&e>.95*(n-r))}},[n,r,o]),t(Tr,{$gap:0,children:[o&&e(od,{text:a?o:void 0,children:e(cu,{ref:l,$maxWidth:n-r,size:r,color:i,children:o})}),a&&e(cu,{$maxWidth:r,size:r,color:i,children:"..."})]})},uu=o.div`
608
- width: 100%;
609
- height: 100%;
610
-
611
- * {
612
- animation: none !important;
613
- transition: none !important;
614
- }
615
- `,pu=({width:t="100%",height:n="100%",gap:o=0,elements:r,noAnimation:i=!1,onTopIndexChange:a,scrollToIndex:s,scrollSignal:l})=>{const c=Bt(null),d=zt(()=>o?r.map((t,n)=>e("div",{style:{paddingBottom:o},children:t},`scroll-y-item-${n}`)):r,[r,o]),u=Ut(e=>{if(!a||!c.current)return;const t=c.current.findItemIndex(e);a(t)},[a]);Mt(()=>{null==s||s<0||!c.current||c.current.scrollToIndex(s,{align:"center"})},[s,l]);const p=e(en,{ref:c,style:{width:t,height:n},onScroll:a?u:void 0,children:d});return i?e(uu,{children:p}):p},hu=o.div`
616
- display: flex;
617
- flex-direction: column;
618
- gap: 16px;
619
- ${({$maxWidth:e})=>e&&`max-width: ${e};`}
620
- `,gu=o.div`
621
- display: flex;
622
- align-items: center;
623
- gap: 16px;
624
- `,mu=o.div`
625
- width: 50px;
626
- height: 50px;
627
- border-radius: 8px;
628
- background: ${({theme:e})=>`linear-gradient(90deg, ${e.v2.colors.grey[600]} 25%, ${e.v2.colors.grey[600]} 50%, ${e.v2.colors.silver[500]} 75%)`};
629
- background-size: 200% 100%;
630
- animation: ${Td} 10s infinite linear;
631
- `,fu=o(Ar)`
632
- flex: 1;
633
- gap: 12px;
634
- `,yu=o.div`
635
- width: ${({$width:e})=>e};
636
- height: 16px;
637
- background: ${({theme:e})=>`linear-gradient(90deg, ${e.v2.colors.grey[600]} 25%, ${e.v2.colors.grey[600]} 50%, ${e.v2.colors.silver[500]} 75%)`};
638
- background-size: 200% 100%;
639
- animation: ${Td} 1.5s infinite linear;
640
- border-radius: 4px;
641
- `,bu=({size:n=5,maxWidth:o})=>e(hu,{$maxWidth:o,children:[...Array(n)].map((n,o)=>t(gu,{children:[e(mu,{}),t(fu,{children:[e(yu,{$width:"80%"}),e(yu,{$width:"100%"})]})]},o))}),$u=o.div`
642
- display: flex;
643
- align-items: center;
644
- justify-content: center;
645
- gap: 4px;
646
- min-width: ${({$minWidth:e})=>e};
647
- width: ${({$fullWidth:e})=>e?"100%":"fit-content"};
648
- padding: ${({$hasLabel:e})=>e?"4px 8px":"4px"};
649
- border-radius: 100px;
650
- background-color: ${({$backgroundColor:e})=>e};
651
- `,vu=({label:n,leftIcon:o,rightIcon:r,tooltip:a,status:s=Nn.Unknown,useSecondaryTone:l=!1,invertColors:c=!1,textSize:d,textColor:u,backgroundColor:p,minWidth:h="unset",fullWidth:g=!1})=>{const m=i(),f=n?.toString(),y=Nn.Loading===s,b=s?[Nn.Disabled,Nn.Loading].includes(s)?or(m,s,c?"400":"700"):[Nn.Unknown].includes(s)?or(m,s,"600"):or(m,s,c?l?"500":"300":l?"700":"500"):m.v2.colors.grey[200],$=u||(c&&![Nn.Unknown].includes(s)?b:[Nn.Disabled,Nn.Loading].includes(s)?m.v2.colors.grey[400]:[Nn.Error,Nn.Warning,Nn.Success].includes(s)?m.v2.colors.black[500]:m.v2.colors.white[500]),v=p||(c&&![Nn.Unknown].includes(s)?[Nn.Disabled,Nn.Loading].includes(s)?m.v2.colors.grey[700]:m.v2.colors.silver[700]:b);return e(od,{text:a,fullWidth:g,children:t($u,{$backgroundColor:v,$minWidth:h,$fullWidth:g,$hasLabel:!!f,children:[!y||f&&o?o?e(o,{fill:$,size:d?m.v2.text.size[d]+2:14}):null:e(Mr,{withSpinnerOld:!0,scaleSpinnerOld:.5}),f?y?e(Mr,{withGradient:!0,title:f,titleSize:d||on.XXS}):e(cn,{color:$,size:d||on.XXS,nowrap:!0,children:f}):null,r&&e(r,{fill:$,size:d?m.v2.text.size[d]+2:14})]})})},xu=o.span`
652
- font-family: ${({theme:e})=>e.font_family.primary};
653
- font-size: ${({$smallAndDark:e})=>e?"12px":"14px"};
654
- font-weight: 400;
655
- color: ${({theme:e,$smallAndDark:t})=>t?e.v2.colors.grey[400]:e.v2.colors.silver[200]};
656
- `,Su=o.span`
657
- font-family: ${({theme:e})=>e.font_family.primary};
658
- font-size: 14px;
659
- font-weight: 400;
660
- color: ${({theme:e})=>e.v2.colors.red[500]};
661
- `,wu=({label:n,tooltip:o,required:r,badge:i,width:a,smallAndDark:s})=>n||o||r?t(Tr,{$width:a,$justifyContent:"space-between",children:[n&&e(xu,{$smallAndDark:s,children:n}),t(Tr,{$gap:4,children:[i&&e(vu,{...i,textSize:on.XXXS}),r&&e(Su,{children:"*"}),o&&e(od,{text:o,withIcon:!0})]})]}):null,Eu=({errorMessage:n,warnMessage:o,helpMessage:r})=>{const a=i(),s=n?a.v2.colors.red[500]:o?a.v2.colors.yellow[500]:a.v2.colors.silver[200],l=e(nt,{size:12,fill:s});return n||o||r?t(Tr,{$alignItems:"center",children:[l&&e(Ar,{children:l}),e(cn,{size:on.XXXS,weight:400,color:s,children:n||o||r})]}):null},Cu=o.div`
662
- padding: ${({$small:e})=>e?"4px":"6px 12px"};
663
-
664
- display: flex;
665
- align-self: stretch;
666
- align-items: center;
667
- gap: 8px;
668
- border-radius: 6px;
669
- cursor: ${({$clickable:e})=>e?"pointer":"inherit"};
670
-
671
- border: 1px solid ${({theme:e,$disabled:t,$error:n})=>t?e.v2.colors.grey[600]:n?e.v2.colors.red[500]:e.v2.colors.silver[500]};
672
- background: ${({theme:e,$disabled:t})=>t?e.v2.colors.grey[800]:e.v2.colors.black[500]};
673
- ${({$disabled:e,$error:t})=>!e&&!t&&r`
674
- &:hover,
675
- &:active,
676
- &:focus-within {
677
- border: 1px solid ${({theme:e})=>e.v2.colors.silver[300]};
678
- }
679
- `}
680
- `,Tu=o.input`
681
- max-width: ${({$maxWidth:e})=>e||"unset"};
682
- width: ${({$width:e})=>e||"unset"};
683
-
684
- flex: 1;
685
- font-family: ${({theme:e})=>e.font_family.primary};
686
- font-size: ${({$small:e})=>e?"12px":"14px"};
687
- font-weight: 400;
688
-
689
- cursor: text;
690
- color: ${({theme:e})=>e.v2.colors.white[500]};
691
- &::placeholder {
692
- color: ${({theme:e})=>e.v2.colors.silver[600]};
693
- }
694
-
695
- &:disabled {
696
- cursor: not-allowed;
697
- color: ${({theme:e})=>e.v2.colors.grey[400]};
698
- &::placeholder {
699
- color: ${({theme:e})=>e.v2.colors.grey[400]};
700
- }
701
- }
702
-
703
- overflow: hidden;
704
- text-overflow: ellipsis;
705
- white-space: nowrap;
706
-
707
- &:read-only {
708
- cursor: pointer;
709
- pointer-events: none;
710
- user-select: none;
711
- }
712
- `,Au=o.div`
713
- display: flex;
714
- align-items: center;
715
- justify-content: center;
716
- cursor: pointer;
717
- `,Iu=({label:n,required:o,tooltip:r,badge:a,leftIcon:s,rightIcon:l,hasError:c,errorMessage:d,warnMessage:u,helpMessage:p,type:h=kn.Text,name:g,value:m,onChange:f,disabled:y,maxWidth:b,width:$,small:v=!1,onClick:x,...S})=>{const w=i(),E=h===kn.Password,[C,T]=Ft(!1),[A,I]=Ft(null),k=c||!!d||!!A,N=m?w.v2.colors.white[500]:y?w.v2.colors.grey[400]:w.v2.colors.silver[200],D=v?14:18,O=Bt(null),R=Lc(O,{deps:[m]}),_=S.readOnly&&R&&null!=m&&""!==m?String(m):"";return t(Ar,{$width:$,$gap:6,children:[e(wu,{label:n,tooltip:r,required:o,badge:a}),e(Cu,{$small:v,$disabled:y,$error:k,$clickable:!!x&&!y,onClick:y?void 0:x,children:t(od,{text:_,fullWidth:!0,keepAlive:!0,children:[s?e(s,{size:D,fill:N}):null,e(Tu,{"data-id":g,type:C||h===kn.Number||h===kn.Decimal?kn.Text:h,name:g,value:m,onChange:e=>{e.stopPropagation();const t=e.target.value;if(h===kn.Number||h===kn.Decimal){const n=h===kn.Number?ui(t):di(t),o=null!=S.min?Number(S.min):void 0,r=null!=S.max?Number(S.max):void 0,i=h===kn.Decimal&&n.endsWith(".");let a=n,s=!1;if(n&&!i){const e=parseFloat(n);isNaN(e)||(null!=r&&e>r?(a=String(r),s=!0):null!=o&&e<o&&(a=String(o),s=!0))}if(e.target.value=a,t&&t!==n)I("Please enter a valid number");else if(s){I(`Value must be ${null!=o&&null!=r?`between ${o} and ${r}`:null!=r?`at most ${r}`:`at least ${o}`}`)}else I(null)}f?.(e)},onKeyDown:e=>{["Enter"].includes(e.key)||e.stopPropagation()},disabled:y,$maxWidth:b,$width:$,$small:v,...S,ref:O}),E?e(Au,{onClick:()=>T(e=>!e),children:e(C?St:wt,{size:D,fill:N})}):l?e(l,{size:D,fill:N}):null]})}),e(Eu,{errorMessage:A||d,warnMessage:u,helpMessage:p})]})};var ku,Nu;!function(e){e.S="s",e.L="l"}(ku||(ku={})),function(e){e.Filled="filled",e.Underline="underline"}(Nu||(Nu={}));const Du=o.div`
718
- display: flex;
719
- align-items: center;
720
- gap: 2px;
721
- padding: 3px;
722
- border-radius: 8px;
723
- border: 1px solid ${({theme:e})=>e.v2.colors.grey[500]};
724
- background-color: ${({theme:e})=>e.v2.colors.silver[700]};
725
- width: ${({$fullWidth:e})=>e?"100%":"fit-content"};
726
- `,Ou=o.button`
727
- flex: 1;
728
- display: flex;
729
- align-items: center;
730
- justify-content: center;
731
- gap: 8px;
732
- padding: ${({$size:e})=>e===ku.S?"4px 8px":"8px 16px"};
733
- border-radius: 6px;
734
- border: 1px solid ${({$isSelected:e,$selectedBorderColor:t})=>e&&t?t:"transparent"};
735
- box-shadow: ${({$isSelected:e})=>e?"0 0 11px 0 rgba(0, 0, 0, 0.32)":"none"};
736
-
737
- ${({$disabled:e,$isSelected:t,$selectedBgColor:n,theme:o})=>e?r`
738
- cursor: not-allowed;
739
- background-color: ${t?(n||o.v2.colors.black[500])+xd["040"]:"transparent"};
740
- `:r`
741
- cursor: pointer;
742
- background-color: ${t?n||o.v2.colors.black[500]:"transparent"};
743
- &:hover {
744
- background-color: ${t?n||o.v2.colors.black[500]:o.v2.colors.silver[800]};
745
- }
746
- `}
747
- `,Ru=o.div`
748
- display: flex;
749
- align-items: stretch;
750
- width: ${({$fullWidth:e})=>e?"100%":"fit-content"};
751
- `,_u=o.button`
752
- display: flex;
753
- height: 34px;
754
- padding: 8px 12px 8px 16px;
755
- justify-content: center;
756
- align-items: center;
757
- gap: 8px;
758
- border: none;
759
- border-bottom: 2px solid ${({theme:e,$isSelected:t})=>t?e.v2.colors.white[500]:"transparent"};
760
- border-radius: ${({$isSelected:e})=>e?"6px 6px 0 0":"0"};
761
- background-color: ${({theme:e,$isSelected:t})=>t?e.v2.colors.silver[1e3]:"transparent"};
762
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
763
- transition:
764
- border-color 0.2s,
765
- background-color 0.2s,
766
- border-radius 0.2s;
767
- &:hover {
768
- border-bottom-color: ${({theme:e,$isSelected:t})=>t?e.v2.colors.white[500]:e.v2.colors.grey[500]};
769
- }
770
- `,Lu=({"data-id":o,size:r=ku.S,variant:a=Nu.Filled,options:s=[],selected:l,setSelected:c,disabled:d,fullWidth:u=!1})=>{const p=i(),h=a===Nu.Underline,g=h?_u:Ou;return e(h?Ru:Du,{"data-id":o,$fullWidth:u,children:s.map(({value:o,label:i,icon:a,badge:s,tooltip:u,selectedBgColor:m,selectedBorderColor:f,disabled:y},b)=>{const $=l===o,v=y||d,x=v?p.v2.colors.grey[400]:h||$?p.v2.colors.white[500]:p.v2.colors.grey[300],S=r===ku.S?on.XXS:on.XS,w=$?500:400,E=t(n,{children:[a&&e(a,{fill:x}),i&&e(cn,{size:S,weight:w,color:x,nowrap:!0,children:i}),s&&e(vu,{...s})]});return e(g,{onClick:()=>!v&&c(o),$disabled:v,$isSelected:$,$size:r,...!h&&{$selectedBgColor:m,$selectedBorderColor:f},children:u?e(od,{text:u,withIcon:!0,children:E}):E},`segment-${b}-${i}-${o}`)})})},Pu=o.div`
771
- box-sizing: border-box !important;
772
- width: ${({$width:e})=>e??"fit-content"};
773
- padding: ${({$withSegment:e})=>e?"2px 2px 2px 12px":"6px 12px"};
774
- display: flex;
775
- align-self: stretch;
776
- align-items: center;
777
- gap: 8px;
778
- overflow: hidden;
779
- border-radius: 6px;
780
-
781
- border: none;
782
- border-radius: 6px;
783
- background: ${({$isHovered:e,$isActive:t,$idleBackgroundColor:n,$emphasizeBackgroundColor:o,theme:r})=>{const i=n??r.v2.colors.silver[800],a=o??r.v2.colors.silver[700];return e||t?a:i}};
784
- `,Fu=o.input`
785
- min-width: 0;
786
- flex: 1;
787
- font-family: ${({theme:e})=>e.font_family.primary};
788
- font-size: 14px;
789
- font-weight: 400;
790
- line-height: 20px;
791
-
792
- cursor: text;
793
- color: ${({$textColor:e})=>e};
794
- &::placeholder {
795
- color: ${({$textColor:e})=>e};
796
- }
797
-
798
- overflow: hidden;
799
- text-overflow: ellipsis;
800
- white-space: nowrap;
801
- `,Mu=({"data-id":n,value:o,onChange:r,onFocus:a,onBlur:s,placeholder:l,width:c,segment:d,idleBackgroundColor:u,emphasizeBackgroundColor:p})=>{const h=i(),[g,m]=Ft(!1),[f,y]=Ft(!1),[b,$]=Ft(!1),v=g?h.v2.colors.white[500]:h.v2.colors.silver[200],x=!!d?.options?.length,S=zt(()=>{if(x)return d?.options.find(e=>e.value===d.selected)?.label},[x,d?.options,d?.selected]),w=zt(()=>l||(x&&S?`Search by ${S.toLowerCase()}`:"Search..."),[l,x,S]);return t(Pu,{$width:c,$withSegment:x,onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),$isHovered:f&&!b,$isActive:g,$idleBackgroundColor:u,$emphasizeBackgroundColor:p,children:[e(Et,{size:18,fill:v}),e(Fu,{"data-id":n??"search",name:"search",type:"text",placeholder:w,value:o,onChange:e=>{e.stopPropagation(),r(e.target.value)},onFocus:()=>{m(!0),a?.()},onBlur:()=>{m(!1),s?.()},$textColor:v}),x&&e("div",{style:{flexShrink:0},onMouseEnter:()=>$(!0),onMouseLeave:()=>$(!1),children:e(Lu,{"data-id":d["data-id"],options:d.options,selected:d.selected,setSelected:d.setSelected})})]})},zu=o.div`
802
- display: flex;
803
- align-items: center;
804
- justify-content: center;
805
- width: fit-content;
806
- height: fit-content;
807
- padding: 8px;
808
- border-radius: 100%;
809
- background-color: ${({theme:e})=>e.v2.colors.silver[700]};
810
- `,Uu=({icon:n=xt,hideIcon:o=!1,title:r="No data",subTitle:a,button:s})=>{const l=i().v2.colors.silver[200];return t(Ar,{$gap:12,$alignItems:"center",children:[!o&&e(zu,{children:e(n,{size:32,fill:l})}),t(Ar,{$gap:4,$alignItems:"center",children:[e(cn,{size:on.S,align:"center",children:r}),a&&e(cn,{size:on.XXS,align:"center",color:l,children:a})]}),s&&e(jd,{variant:zd.Secondary,...s})]})};var Bu;!function(e){e.S="small",e.L="large"}(Bu||(Bu={}));const ju=o.div`
811
- width: fit-content;
812
- display: flex;
813
- align-items: center;
814
- gap: 8px;
815
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
816
- `,Wu=o.div`
817
- width: ${({$size:e})=>e===Bu.S?"16px":"20px"};
818
- height: ${({$size:e})=>e===Bu.S?"16px":"20px"};
819
- display: flex;
820
- align-items: center;
821
- justify-content: center;
822
- border-radius: 4px;
823
- border: 1px solid ${({$borderColor:e})=>e};
824
- background-color: ${({$backgroundColor:e})=>e};
825
- `,Hu=({name:n,label:o,tooltip:r,badge:a,size:s=Bu.L,disabled:l,partiallyChecked:c,value:d,onChange:u,errorMessage:p,warnMessage:h,helpMessage:g})=>{const m=i(),[f,y]=Ft(!1),b=c||d,$=s===Bu.S?12:16,v=l?m.v2.colors.grey[400]:m.v2.colors.white[500],x=b?"transparent":l?m.v2.colors.grey[700]:f?m.v2.colors.silver[400]:m.v2.colors.silver[600],S=l?m.v2.colors.grey[600]:b?m.v2.colors.purple[500]:m.v2.colors.silver[900];return t(Ar,{$gap:4,children:[t(Tr,{$justifyContent:"space-between",children:[t(ju,{"data-id":n||"checkbox"+(o?`-${o}`:""),onClick:e=>{e.stopPropagation(),l||u(!!c||!d)},$disabled:l,onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),children:[e(Wu,{$size:s,$borderColor:x,$backgroundColor:S,children:c?e(Ct,{size:$,fill:v}):d?e(yt,{size:$,fill:v}):null}),o&&e(cn,{size:s===Bu.S?on.XXS:on.XS,nowrap:!0,children:o})]}),e(wu,{tooltip:r,badge:a})]}),e(Eu,{errorMessage:p,warnMessage:h,helpMessage:g})]})},Gu=o.div`
826
- display: flex;
827
- flex-direction: ${({$direction:e})=>e===bn.Horizontal?"row":"column"};
828
- gap: ${({$direction:e})=>e===bn.Horizontal?16:8}px;
829
- `,Xu=({direction:n=bn.Vertical,title:o,size:r,disabled:i,withSelectAll:a,options:s,values:l,setValues:c})=>{const d=r===Bu.S?on.XXS:on.XS,u=zt(()=>s.every(e=>l[e.id]),[s,l]),p=zt(()=>s.some(e=>l[e.id])&&s.some(e=>!l[e.id]),[s,l]),h=(e,t)=>{c(n=>{const o={...n};return e?o[e]=t:s.forEach(e=>o[e.id]=t),o})};return t(Gu,{$direction:n,children:[o&&a?e(Hu,{label:o,partiallyChecked:p,value:u,onChange:e=>h("",e),size:r}):o&&!a?e(cn,{size:d,children:o}):null,s.map(t=>e(Hu,{...t,value:l[t.id],onChange:e=>h(t.id,e),disabled:i,size:r},`${o}-checkbox-${t.id}`))]})};var Ku,Vu;!function(e){e.Left="left",e.Right="right"}(Ku||(Ku={})),function(e){e.Top="top",e.Bottom="bottom"}(Vu||(Vu={}));const Ju=o.div`
830
- position: relative;
831
- display: flex;
832
- flex-direction: column;
833
- gap: 4px;
834
- `,Yu=o.div`
835
- position: fixed;
836
- ${({$coords:e})=>null!=e.top?`top: ${e.top}px;`:""}
837
- ${({$coords:e})=>null!=e.bottom?`bottom: ${e.bottom}px;`:""}
838
- ${({$coords:e})=>null!=e.left?`left: ${e.left}px;`:""}
839
- ${({$coords:e})=>null!=e.right?`right: ${e.right}px;`:""}
840
- ${({$coords:e})=>null!=e.width?`width: ${e.width-16}px;`:""}
841
- z-index: ${({theme:e})=>e.v2.zIndex.dropdown};
842
-
843
- display: flex;
844
- flex-direction: column;
845
- gap: 0;
846
-
847
- min-width: 120px;
848
- padding: 8px;
849
- border-radius: 6px;
850
- background-color: ${({theme:e})=>e.v2.colors.silver[900]};
851
- box-shadow: 0 0 24px 0 rgba(0, 0, 0, 0.3);
852
- `,qu=o.div`
853
- display: flex;
854
- flex-direction: column;
855
- gap: 0;
856
-
857
- width: 100%;
858
- max-height: ${({$maxHeight:e})=>e||"230px"};
859
- overflow-y: auto;
860
- `,Qu=o.div`
861
- display: flex;
862
- align-items: center;
863
- gap: 8px;
864
- width: 100%;
865
- padding: 8px;
866
- border-radius: 6px;
867
- cursor: pointer;
868
- ${({$selected:e})=>e?r`
869
- background-color: ${({theme:e})=>e.v2.colors.silver[500]};
870
- `:r`
871
- background-color: transparent;
872
- &:hover {
873
- background-color: ${({theme:e})=>e.v2.colors.grey[700]};
874
- }
875
- `}
876
- `,Zu=o.div`
877
- display: flex;
878
- align-items: center;
879
- gap: 8px;
880
- flex: 1;
881
- min-width: 0;
882
- `,ep=o.div`
883
- flex: 0 1 auto;
884
- min-width: 0;
885
- overflow: hidden;
886
- text-overflow: ellipsis;
887
- white-space: nowrap;
888
- `,tp=o.span`
889
- flex-shrink: 0;
890
- width: 88px;
891
- display: inline-flex;
892
- justify-content: center;
893
- padding: 1px 6px;
894
- border-radius: 4px;
895
- background-color: ${({theme:e})=>e.v2.colors.silver[700]};
896
- border: 1px solid ${({theme:e})=>e.v2.colors.silver[600]};
897
- `,np=o.div`
898
- flex-shrink: 0;
899
- display: inline-flex;
900
- align-items: center;
901
- gap: 4px;
902
- `,op=({defaultOpen:n,open:o,onOpenChange:r,alignX:a,alignY:s,items:l,selectedIds:c,setSelectedIds:d,label:u,withMultiSelect:p,withSearch:h,fullWidth:g,maxHeight:m,buttonProps:f,iconButtonProps:y,isLoading:b,emptyMessage:$,children:v})=>{const x=i(),S=void 0!==o,w=!!f||!!y||!!v,[E,C]=Ft(n??!w),T=S?o:E,A=Ut(e=>{S||C(e),r?.(e)},[S,r]),[I,k]=Ft({x:a||Ku.Left,y:s||Vu.Bottom}),N=Bt(null);_c(N,()=>A(!1));const[D,O]=Ft({}),R=Ut((e,t)=>{const n=N.current?.getBoundingClientRect();if(!n)return;const o=w?8:0;O({top:t===Vu.Bottom?w?n.bottom+o:n.top:void 0,bottom:t===Vu.Top?w?window.innerHeight-n.top+o:window.innerHeight-n.bottom:void 0,left:e===Ku.Left?n.left:void 0,right:e===Ku.Right?window.innerWidth-n.right:void 0,width:g?n.width:void 0})},[w,g]),_=e=>{const t=!T;if(A(t),!t)return;const n={x:a||(e.clientX>window.innerWidth/2?Ku.Right:Ku.Left),y:s||(e.clientY>window.innerHeight/2?Vu.Top:Vu.Bottom)};k(n),R(n.x,n.y)};jt(()=>{T&&R(I.x,I.y)},[T,I.x,I.y,R]);const L=e=>{d(p?c.includes(e)?c.filter(t=>t!==e):[...c,e]:[e]),w&&!p&&A(!1)},[P,F]=Ft(""),M=zt(()=>P?l.filter(e=>e?.label?.toLowerCase().includes(P.toLowerCase())):l,[l.length,P]);return t(Ju,{ref:N,children:[u&&e(wu,{label:u}),f&&e(jd,{...f,fullWidth:g,rightIcon:T?Tt:At,onClick:_}),y&&e(jd,{variant:zd.Text,size:Ud.S,...y,onClick:_}),"function"==typeof v?v({ChevronIcon:T?Tt:At,handleClick:_}):v,T&&Zt(t(Yu,{$coords:D,"data-ignore-outside-click":"true",children:[h&&e(Mu,{value:P,onChange:F,width:"100%"}),b?e(Mr,{withSpinner:!0,title:"Loading...",titleSize:on.XS}):M.length?e(qu,{$maxHeight:m,children:M.map(n=>{if(!n)return null;const{id:o,label:r,icon:i,withCheckbox:a,badge:s,secondaryLabel:l}=n,d=c.includes(o);return t(Qu,{"data-id":`option-${o}`,$selected:d&&!a,onClick:()=>L(o),title:l?`${r} — ${l}`:r,children:[a&&e(Hu,{value:d,onChange:()=>L(o)}),i&&e(i,{size:14,fill:n.color||x.v2.colors.white[500]}),s&&e(tp,{children:e(cn,{size:on.XXS,nowrap:!0,color:rn.Secondary,children:s})}),t(Zu,{children:[e(ep,{children:e(cn,{size:on.XS,nowrap:!0,color:n.color||rn.Primary,children:r})}),l&&t(np,{children:[e(We,{size:12,fill:x.v2.colors.silver[200]}),e(cn,{size:on.XS,nowrap:!0,color:rn.Secondary,children:l})]})]})]},o)})}):e(Cr,{$padding:"6px 0",children:e(Uu,{hideIcon:!0,title:"No results",subTitle:$})}),p&&!!M.length&&e(jd,{label:"Done",onClick:()=>A(!1)})]}),document.body)]})},rp=t=>{const{"data-id":n,options:o,placeholder:r="Search...",isLoading:i}=t,a=!0===t.multiple,[s,l]=Ft(""),[c,d]=Ft(!1),u=zt(()=>a?t.value:t.value?[t.value]:[],[a,t.value]),p=zt(()=>{if(a){const e=u.length;return e?1===e?o.find(e=>e.id===u[0])?.label??"":`${e} selected`:""}return t.value?o.find(e=>e.id===t.value)?.label??"":""},[a,t,o,u]),h=c?s:p,g=zt(()=>{const e=a?o.map(e=>({...e,withCheckbox:!0})):o;if(!s)return e;const t=s.toLowerCase();return e.filter(e=>[e.label,e.badge,e.secondaryLabel].some(e=>e?.toLowerCase().includes(t)))},[a,o,s]),m=Ut(()=>{l(""),d(!0)},[]),f=Ut(e=>{l(e.target.value),c||d(!0),a||e.target.value||!t.value||t.onSelect(null)},[c,a,t]),y=Ut(e=>{d(e),e||l("")},[]),b=Ut(e=>{if(a)return void t.onSelect(e);const n=o.find(t=>t.id===e[0]);n&&(t.onSelect(n),l(""),d(!1))},[a,t,o]),$=c&&(i||g.length>0||s.length>0);return e(op,{open:$,onOpenChange:y,items:g,selectedIds:u,setSelectedIds:b,withMultiSelect:a,isLoading:i,emptyMessage:`No results matched the filter '${s}'`,fullWidth:!0,alignY:Vu.Bottom,children:e(Iu,{name:n,leftIcon:Et,placeholder:r,value:h,onChange:f,onFocus:m})})},ip=o.button`
903
- width: 100%;
904
- padding: 0;
905
- padding-right: 12px;
906
- display: flex;
907
- align-items: center;
908
- justify-content: flex-start;
909
- gap: 12px;
910
- border-radius: 8px;
911
- border: none;
912
- ${({$hovered:e})=>e?r`
913
- background-color: ${({theme:e})=>e.v2.colors.silver[750]};
914
- `:r`
915
- background-color: ${({theme:e})=>e.v2.colors.silver[800]};
916
- `}
917
- overflow: hidden;
918
- cursor: pointer;
919
- &:disabled {
920
- cursor: not-allowed;
921
- opacity: 0.5;
922
- }
923
- `,ap=o.div`
924
- width: ${({$hasIcon:e})=>e?"56px":"0"};
925
- height: 56px;
926
- display: flex;
927
- align-items: center;
928
- justify-content: center;
929
- ${({$hovered:e})=>e?r`
930
- background-color: ${({theme:e})=>e.v2.colors.silver[600]};
931
- `:r`
932
- background-color: ${({theme:e})=>e.v2.colors.silver[700]};
933
- `}
934
- `,sp=o.div`
935
- width: ${({$hasIcon:e})=>e?"calc(100% - 56px)":"100%"};
936
- display: flex;
937
- justify-content: space-between;
938
- align-items: center;
939
- gap: 8px;
940
- `,lp=({label:n,icon:o,loading:r,disabled:i,onClick:a})=>{const[s,l]=Ft(!1);return t(ip,{$hovered:s,type:"button",disabled:i||r,onClick:a,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[e(ap,{$hovered:s,$hasIcon:!!o,children:o&&e(o,{size:36})}),t(sp,{$hasIcon:!!o,children:[r?e(Md,{size:16}):e(cn,{variant:nn.Span,align:"center",children:n}),e(It,{rotate:90,size:24})]})]})},cp=({buttons:t})=>e(Ar,{$gap:12,children:t.map((t,n)=>e(lp,{...t},`${t.label}-${n}`))});var dp;!function(e){e.Button="button",e.ButtonDropData="button-drop-data"}(dp||(dp={}));const up=({onAnyClick:t,actions:n})=>e(Tr,{$gap:8,$alignItems:"center",children:n?.map(n=>{if(!n)return null;switch(n.type){case dp.Button:return e(jd,{...n.buttonProps,onClick:e=>{n.buttonProps?.onClick?.(e),t?.()}},n.id);case dp.ButtonDropData:return e(op,{...n.dropDataProps,items:n.dropDataProps?.items??[],withMultiSelect:!1,selectedIds:[],setSelectedIds:e=>{n.buttonProps?.onClick?.(e[0]),t?.()},buttonProps:n.buttonProps},n.id);default:return null}})}),pp=({children:t,fullText:n,fullWidth:o=!0,...r})=>{const i=Bt(null),a=!!r.maxLines&&r.maxLines>0,s=Lc(i,{axis:a?"vertical":"horizontal",deps:[t]})?n??(null==t?"":String(t)):"";return e(od,{text:s,fullWidth:o,ellipsis:!a,keepAlive:!0,children:e(cn,{ref:i,...r,children:t})})},hp=o.div`
941
- display: flex;
942
- align-items: center;
943
- justify-content: center;
944
- padding: 8px;
945
- border-radius: 8px;
946
- background-color: ${({theme:e})=>e.v2.colors.white[500]+xd["004"]};
947
- `,gp=({icon:n,iconWithWrapper:o=!1,title:r,titleSize:i=on.S,titleColor:a=rn.Primary,titleWrap:s=!1,subTitle:l,subTitleSize:c=on.XXS,subTitleColor:d=rn.Secondary,subTitleWrap:u=!1,tooltip:p,withCopy:h,badge:g,gap:m,children:f})=>{const{CopyButton:y}=Tc();return t(Tr,{$gap:l?8:6,$alignItems:"center",children:[n&&(o||l?e(hp,{children:e(n,{size:24})}):e(n,{size:24})),r||g||l?t(Ar,{children:[r||g?t(Tr,{$gap:6,$alignItems:"center",children:[r&&e(cn,{size:i,color:a,nowrap:!s,children:r}),h&&r&&e(y,{value:r,size:wc.XS}),p&&e(od,{text:p,withIcon:!0}),g&&e(vu,{...g})]}):null,l&&e(cn,{size:c,color:d,nowrap:!u,children:l})]}):null,e(Tr,{$gap:m,$margin:`0 0 0 ${m??0}px`,$alignItems:"center",children:f})]})},mp=o.section`
948
- display: flex;
949
- flex-direction: column;
950
- gap: ${({$moreSpacing:e})=>e?"16px":"12px"};
951
- width: ${({$width:e="100%"})=>e};
952
- align-self: ${({$fullHeight:e})=>e?"stretch":"auto"};
953
- ${({$fullHeight:e})=>e?"\n flex: 1;\n min-height: 0;\n ":""}
954
- padding: ${({$moreSpacing:e})=>e?"16px":"12px"};
955
- border-radius: ${({$moreSpacing:e})=>e?"16px":"12px"};
956
- background-color: ${({theme:e,$bgTint:t})=>e.v2.colors.silver[t]};
957
- `,fp=o(Tr)`
958
- cursor: ${({$clickable:e})=>e?"pointer":"default"};
959
- user-select: ${({$clickable:e})=>e?"none":"auto"};
960
- `,yp=o.div`
961
- display: flex;
962
- align-items: flex-end;
963
- flex-wrap: wrap;
964
- width: 100%;
965
- `,bp=o.div`
966
- width: ${({$cellsPerRow:e})=>e?`calc(${100/e}% - 16px)`:"unset"};
967
- margin: 8px;
968
- display: flex;
969
- flex-direction: column;
970
- gap: 4px;
971
- min-width: 0;
972
- `,$p=({item:n,cellsPerRow:o})=>{const{CopyButton:r}=Tc(),{spacer:i,title:a,titleTooltip:s,label:l,labelTooltip:c,withCopy:d,badge:u}=n;return i?e("div",{style:{flex:1}}):t(bp,{$cellsPerRow:o,children:[!!a&&e(od,{text:s,children:e(pp,{size:on.XXXS,color:rn.Secondary,nowrap:!0,children:a})}),t(Tr,{$gap:4,children:[u&&e(vu,{...u}),l&&e(od,{text:c,children:e(pp,{size:on.XS,nowrap:!0,children:l})}),d&&e(r,{value:l||u?.label?.toString()||"",size:wc.XS})]})]})},vp=({bgTint:n="900",width:o,fullHeight:r=!1,moreSpacing:i=!1,richTitle:a,withCollapse:s,collapseIsDefaultOpen:l,badges:c=[],actions:d=[],dropDataActions:u=[],renderOnRightSide:p,cellsPerRow:h,items:g,children:m})=>{const[f,y]=Ft(l||!1),b=()=>y(e=>!e),$=!s||s&&f,v=!!d.length,x=!!u.length,S=!!c.length;return t(mp,{$width:o,$bgTint:n,$fullHeight:r,$moreSpacing:i,children:[(a||s)&&t(fp,{$gap:16,$justifyContent:"space-between",$clickable:!!s,onClick:e=>{s&&e.target.closest("section")&&b()},children:[a?e(gp,{...a}):e("div",{}),t(Tr,{$gap:12,children:[p,v&&$&&e(up,{actions:d}),S&&e(Tr,{$gap:8,children:c.map((e,t)=>Wt(vu,{...e,key:e.key||`${e.label}-${t}`}))}),(x||s)&&t(Tr,{$gap:2,children:[x&&e(op,{iconButtonProps:{"data-id":"drawer-actions",leftIcon:kt},items:u,selectedIds:[],setSelectedIds:e=>u?.find(t=>t?.id===e[0])?.onClick?.()}),s&&e(jd,{variant:zd.Text,size:Ud.S,leftIcon:f?Tt:At,onClick:b})]})]})]}),$&&g?e(yp,{children:g.map(t=>e($p,{item:t,cellsPerRow:h&&h<=g.length?h:void 0},t.id))}):null,$&&m]})};var xp;!function(e){e.S="small",e.M="medium"}(xp||(xp={}));const Sp=o.div`
973
- display: flex;
974
- flex-direction: column;
975
- gap: ${({$gap:e})=>e}px;
976
- width: 100%;
977
- align-self: ${({$fullHeight:e})=>e?"stretch":"auto"};
978
- ${({$fullHeight:e})=>e?"\n flex: 1;\n min-height: 0;\n ":""}
979
- padding: ${({$padding:e})=>e}px;
980
- border-radius: 16px;
981
- background-color: ${({theme:e,$backgroundColor:t})=>t??e.v2.colors.silver[1e3]};
982
- `,wp=Lt(({id:n,size:o=xp.M,fullHeight:r=!1,richTitle:i,customTitle:a,search:s,customSearch:l,filters:c,actions:d,children:u,backgroundColor:p,padding:h},g)=>{const m=o===xp.S?4:16,f="number"==typeof h?h:o===xp.S?12:16,y=a??(i?e(gp,{...i}):null),b=l??(s?e(Mu,{...s}):null),$=!!y||!!b,v=!!d&&d.length>0;return t(Sp,{ref:g,id:n,"data-section-name":n,$padding:f,$gap:m,$fullHeight:r,$backgroundColor:p,children:[$||v?t(Tr,{$gap:m,$justifyContent:"space-between",children:[$?t(Tr,{$gap:m,$alignItems:"center",children:[y,b,c]}):null,v&&e(up,{actions:d??[]})]}):null,u]})});wp.displayName="SectionCard";const Ep=o.div`
983
- flex: 1;
984
- align-self: stretch;
985
- display: flex;
986
- align-items: center;
987
- gap: 8px;
988
- padding: 16px;
989
- border-radius: 12px;
990
- background-color: ${({theme:e,$status:t})=>or(e,t,t===Nn.Unknown?"750":"500")};
991
- `,Cp=o.div`
992
- display: flex;
993
- align-items: center;
994
- justify-content: center;
995
- width: fit-content;
996
- height: fit-content;
997
- padding: 8px;
998
- border-radius: 12px;
999
- background-color: ${({theme:e,$status:t})=>t===Nn.Unknown?or(e,t,"800"):or(e,t,"900")+xd["015"]};
1000
- `,Tp=({status:n,icon:o,title:r,description:a})=>{const s=i(),l=o??zr(n,s),c=[Nn.Default,Nn.Info,Nn.Disabled,Nn.Unknown].includes(n)?s.v2.colors.white[500]:s.v2.colors.black[500];return t(Ep,{$status:n,children:[e(Cp,{$status:n,children:e(l,{size:32,fill:c})}),t(Ar,{$gap:2,$justifyContent:"center",children:[e(cn,{size:on.M,weight:500,color:c,nowrap:!0,children:r}),e(cn,{size:on.XXS,weight:300,color:c,nowrap:!0,children:a})]})]})},Ap=o.div`
1001
- flex: 0.5;
1002
- display: flex;
1003
- flex-direction: column;
1004
- gap: 12px;
1005
- padding: 12px;
1006
- border-radius: 12px;
1007
- background-color: ${({theme:e})=>e.v2.colors.silver[800]};
1008
- `,Ip=["-","N/A","undefined","null","undefined/undefined","null/null"],kp=({title:n,cells:o})=>{const r=i();return t(Ap,{children:[e(cn,{size:on.XXS,color:r.v2.colors.grey[150],children:n}),e(Tr,{$gap:32,children:o.map((o,r)=>t(Ar,{$gap:2,children:[!o.isLoading||o.value&&!Ip.includes(o.value)?e(cn,{size:o.label?on.M:on.L,children:o.value}):e(Ld,{scale:.9}),o.label&&e(cn,{size:on.XXS,children:o.label})]},`${n}-${r}-${o.label}-${o.value}`))})]})};var Np;!function(e){e.CurrentOfMax="currentOfMax",e.GoodAgainstBad="goodAgainstBad"}(Np||(Np={}));const Dp=o.div`
1009
- display: flex;
1010
- align-items: flex-end;
1011
- justify-content: space-between;
1012
- gap: 24px;
1013
- width: fit-content;
1014
- `,Op=o.div`
1015
- position: relative;
1016
- display: flex;
1017
- flex-direction: column;
1018
- align-items: center;
1019
- width: ${({$width:e})=>e??150}px;
1020
- flex-shrink: 0;
1021
- `,Rp=o.svg`
1022
- display: block;
1023
- width: 100%;
1024
- height: auto;
1025
- overflow: visible;
1026
- `,_p=o(Ar)`
1027
- position: absolute;
1028
- left: 0;
1029
- right: 0;
1030
- bottom: 4px;
1031
- align-items: center;
1032
- gap: 2px;
1033
- pointer-events: none;
1034
- `,Lp=o.span`
1035
- display: inline-block;
1036
- flex-shrink: 0;
1037
- width: 9px;
1038
- height: 9px;
1039
- border-radius: 50%;
1040
- background-color: ${({$color:e})=>e};
1041
- `,Pp=e=>{if(null==e||""===e)return{number:0,prefix:"",suffix:""};if("number"==typeof e)return{number:e,prefix:"",suffix:""};const t=e.match(/^(\D*)(-?\d*\.?\d+)(.*)$/);return t?{number:parseFloat(t[2]),prefix:t[1]??"",suffix:(t[3]??"").trim()}:{number:0,prefix:"",suffix:""}},Fp=10,Mp=(e,t,n,o)=>{const r=o*Math.PI/180;return{x:e+n*Math.cos(r),y:t-n*Math.sin(r)}},zp=(e,t,n,o,r)=>{const i=Mp(e,t,n,o),a=Mp(e,t,n,r),s=o>r?1:0,l=Math.abs(o-r)>180?1:0;return`M ${i.x} ${i.y} A ${n} ${n} 0 ${l} ${s} ${a.x} ${a.y}`},Up=({variant:n=Np.CurrentOfMax,gaugeWidth:o,title:r,min:a=0,max:s,current:l,primaryLabel:c,primaryColor:d,secondaryLabel:u,secondaryColor:p})=>{const{number:h}=Pp(a),{number:g}=Pp(s),{number:m,prefix:f,suffix:y}=Pp(l),b=i(),$=((e,t,n)=>Math.min(Math.max(e,t),n))((m-h)/Math.max(g-h,1),0,1),v=180-180*$,x=$>0?zp(60,60,55,180,v):null,S=$<1?zp(60,60,55,v,0):null,w=Mp(60,60,55,180),E=Mp(60,60,55,0),C=d??(n===Np.GoodAgainstBad?b.v2.colors.green[500]:b.v2.colors.purple[400]),T=p??(n===Np.GoodAgainstBad?b.v2.colors.red[500]:b.v2.colors.silver[500]),[A,I]=Ft(null),k=e=>`${f}${e}${y}`,N=n===Np.GoodAgainstBad?Math.max(g-m,0):g,D="primary"===A?c:"secondary"===A?u:"",O="primary"===A?k(m):"secondary"===A?k(N):"",R=()=>I("primary"),_=()=>I("secondary"),L=()=>I(null);return t(Dp,{children:[t(Op,{$width:o,children:[e(od,{keepAlive:!0,fullWidth:!0,title:D,text:O,children:t(Rp,{viewBox:"0 0 120 65",role:"img","aria-label":`${r}: ${m} of ${g}`,children:[x&&e("path",{d:x,fill:"none",stroke:C,strokeWidth:Fp,strokeLinecap:1===$?"round":"butt",onMouseEnter:R,onMouseLeave:L}),S&&e("path",{d:S,fill:"none",stroke:T,strokeWidth:Fp,strokeLinecap:0===$?"round":"butt",onMouseEnter:_,onMouseLeave:L}),$>0&&e("circle",{cx:w.x,cy:w.y,r:5,fill:C,onMouseEnter:R,onMouseLeave:L}),$<1&&e("circle",{cx:E.x,cy:E.y,r:5,fill:T,onMouseEnter:_,onMouseLeave:L})]})}),r&&t(_p,{children:[e(cn,{size:on.XXXS,color:b.v2.colors.grey[150],align:"center",children:r}),e(cn,{size:on.L,weight:500,align:"center",children:`${f}${m}${y}`})]})]}),t(Ar,{$gap:7,children:[t(Tr,{$gap:8,$alignItems:"center",children:[e(Lp,{$color:C}),e(cn,{size:on.XXXS,color:b.v2.colors.grey[150],nowrap:!0,children:c})]}),t(Tr,{$gap:8,$alignItems:"center",children:[e(Lp,{$color:T}),e(cn,{size:on.XXXS,color:b.v2.colors.grey[150],nowrap:!0,children:u})]})]})]})},Bp=o(Tr)`
1042
- width: 100%;
1043
- padding: 8px 12px;
1044
- border-radius: 6px;
1045
- background-color: ${({theme:e,$bgTint:t})=>e.v2.colors.silver[t||"800"]};
1046
- display: flex;
1047
- align-items: center;
1048
- justify-content: space-between;
1049
- gap: 12px;
1050
- `,jp=o.div`
1051
- position: relative;
1052
- width: ${({$hideCopy:e})=>e?"100%":"calc(100% - 24px - 12px)"};
1053
- display: flex;
1054
- align-items: center;
1055
- gap: 4px;
1056
- `,Wp=o.pre`
1057
- flex: 1;
1058
- margin: 0;
1059
- padding: 0;
1060
- font-size: 12px;
1061
- color: #5ffb98; // TODO: add to theme
1062
- overflow-x: auto;
1063
- `,Hp=o.span`
1064
- flex-shrink: 0;
1065
- font-size: 14px;
1066
- color: #5ffb98; // TODO: add to theme
1067
- `,Gp=({bgTint:n,label:o,value:r,hideCopy:i=!1,onDone:a})=>{const{CopyButton:s}=Tc({onDone:a}),l=Bt(null),[c,d]=Ft(!1);return Mt(()=>{const e=()=>{if(l.current){const{scrollWidth:e,clientWidth:t}=l.current;d(e>t)}};e();const t=new ResizeObserver(e);return l.current&&t.observe(l.current),()=>{t.disconnect()}},[r]),t(Ar,{$gap:4,children:[o&&e(cn,{size:on.XXXS,color:rn.Secondary,children:o}),t(Bp,{$bgTint:n,children:[t(jp,{$hideCopy:i,children:[e(Wp,{ref:l,children:r.toLowerCase()}),c&&e(Hp,{children:"..."})]}),!i&&e(s,{value:r.toLowerCase(),size:wc.XS})]})]})},Xp=o.div`
1068
- display: flex;
1069
- align-items: center;
1070
- gap: 8px;
1071
- padding: ${({$hideBackground:e,$slim:t})=>e?"0":t?"8px":"16px"};
1072
- width: ${({$width:e})=>e||"auto"};
1073
- border-radius: ${({$isExtended:e})=>e?"12px 12px 0 0":"12px"};
1074
- background-color: ${({$hideBackground:e,$backgroundColor:t})=>e?"transparent":t};
1075
-
1076
- ${({$withHover:e,$hideBackground:t,$hoverBackgroundColor:n})=>e&&r`
1077
- cursor: pointer;
1078
- transition: background 0.2s;
1079
- &:hover {
1080
- background-color: ${t?"transparent":n};
1081
- }
1082
- `}
1083
- `,Kp=o.div`
1084
- display: flex;
1085
- align-items: center;
1086
- justify-content: center;
1087
- flex-shrink: 0;
1088
- width: ${({$slim:e})=>e?"32px":"42px"};
1089
- height: ${({$slim:e})=>e?"32px":"42px"};
1090
- border-radius: 11px;
1091
- background-color: ${({$backgroundColor:e,$slim:t})=>t?"transparent":e};
1092
- ${({$withClick:e})=>e&&r`
1093
- cursor: pointer;
1094
- & * {
1095
- cursor: pointer;
1096
- }
1097
- &:hover {
1098
- transform: scale(1.2);
1099
- }
1100
- `}
1101
- `,Vp=o(Ar)`
1102
- flex: 1;
1103
- min-width: 0;
1104
- `,Jp=o.div`
1105
- display: flex;
1106
- align-items: center;
1107
- justify-content: center;
1108
- flex-shrink: 0;
1109
- width: 24px;
1110
- height: 24px;
1111
- `,Yp=({status:n,title:o,subTitle:r,badgeLabel:a,loading:s,action:l,isExtended:c=!1,toggleExtended:d,invertColors:u=!1,hideIcon:p=!1,hideBackground:h=!1,width:g,slim:m=!1})=>{const f=i(),y=zr(n,f),b=d?c?Tt:At:void 0,$=n===Nn.Unknown,v=n===Nn.Disabled,x=n===Nn.Loading||s,S=[Nn.Error,Nn.Warning,Nn.Success].includes(n),w=or(f,n,v?u?"400":"700":$?"600":u?"300":"500"),E=v?f.v2.colors.grey[400]:u?f.v2.colors.white[500]:S?f.v2.colors.black[500]:f.v2.colors.white[500],C=u&&!$?w:E,T=!u||$||v?"rgba(0, 0, 0, 0.13)":or(f,n,"800"),A=v?f.v2.colors.grey[900]:u||$?f.v2.colors.silver[800]:w,I=v?f.v2.colors.grey[800]:u||$?f.v2.colors.silver[700]:or(f,n,"600");return t(Xp,{$width:g,$withHover:!!d,$isExtended:c,$hideBackground:h,$backgroundColor:A,$hoverBackgroundColor:I,$slim:m,onClick:d,children:[!p&&e(Kp,{$backgroundColor:T,$slim:m,children:x?e(Mr,{withSpinnerOld:!0,scaleSpinnerOld:1.2}):e(y,{size:32,fill:C})}),t(Vp,{$gap:4,$justifyContent:"center",children:[t(Tr,{$gap:10,$alignItems:"center",children:[e(cn,{size:m?on.XS:on.S,weight:500,color:C,children:o}),a&&e(vu,{label:a,backgroundColor:f.v2.colors.silver[600],textColor:f.v2.colors.white[500],textSize:on.XXXS})]}),r&&e(cn,{size:on.XXXS,color:E,children:r})]}),l&&e(Kp,{"data-id":l["data-id"],$backgroundColor:f.v2.colors.silver[750],$slim:m,$withClick:!!l.onClick,onClick:l.onClick,children:e(od,{text:l.tooltip,children:e(l.icon,{size:32,fill:E})})}),b&&e(Jp,{children:e(b,{size:24,fill:E})})]})},qp=o.div`
1112
- display: flex;
1113
- flex-direction: column;
1114
- width: 100%;
1115
- border-radius: 12px;
1116
- overflow: hidden;
1117
- `,Qp=o.div`
1118
- display: flex;
1119
- flex-direction: column;
1120
- gap: 8px;
1121
- padding: 8px 12px 16px 12px;
1122
- background-color: ${({theme:e})=>e.v2.colors.silver[900]};
1123
- `,Zp=o.div`
1124
- display: flex;
1125
- align-items: center;
1126
- gap: 8px;
1127
- `,eh=o.div`
1128
- display: flex;
1129
- align-items: center;
1130
- justify-content: center;
1131
- flex-shrink: 0;
1132
- width: 18px;
1133
- height: 18px;
1134
- `,th=({conditions:n,title:o,subTitle:r})=>{const a=i(),[s,l]=Ft(!1),c=Ut(()=>l(e=>!e),[]),d=zt(()=>ai(n),[n]),{errors:u,hasErrors:p,warnings:h,hasWarnings:g,hasDisableds:m,hasLoadings:f}=zt(()=>Do(d),[d]);Mt(()=>{l(p||g||m)},[p,g,m]);const y=zt(()=>(!d.length||f)&&!p&&!g&&!m,[d.length,f,p,g,m]),b=zt(()=>p?Nn.Error:g?Nn.Warning:m?Nn.Info:Nn.Success,[p,g,m]),$=zt(()=>o||(1===d.length?tn(d[0].reason||d[0].type):void 0)||(({hasErrors:e,hasWarnings:t,hasDisableds:n,loading:o})=>{const r="Something isn't right";return e?"Something Failed":t||n?r:o?"Loading...":"Everything Successful"})({hasErrors:p,hasWarnings:g,hasDisableds:m,loading:y}),[o,d,p,g,m,y]),v=zt(()=>r||1===d.length&&d[0].message||void 0,[r,d]),x=zt(()=>`${p?u.length:g?h.length:d.length}/${d.length}`,[p,u.length,g,h.length,d.length]);return t(qp,{children:[e(Yp,{status:b,invertColors:!0,title:$,subTitle:v,badgeLabel:x,loading:y,isExtended:s,toggleExtended:c}),s&&e(Qp,{children:d.map(({status:n,type:o,reason:r,message:i},s)=>{const l=n===Nn.Loading,c=n===Nn.Disabled?Nn.Info:n,d=l?null:zr(c,a),u=n===Nn.Error?or(a,Nn.Error,"500"):n===Nn.Warning?or(a,Nn.Warning,"500"):a.v2.colors.white[500],p=[o,i||r].filter(Boolean).join(" - ");return t(Zp,{children:[e(eh,{children:l||!d?e(Mr,{withSpinnerOld:!0,scaleSpinnerOld:.8}):e(d,{size:18})}),e(cn,{size:on.XXXS,color:u,lineHeight:"16px",children:p})]},`condition-${s}`)})})]})};var nh,oh,rh;!function(e){e.Default="default",e.SuccessError="successError"}(nh||(nh={})),function(e){e.S="small",e.L="large"}(oh||(oh={})),function(e){e.Left="left",e.Right="right"}(rh||(rh={}));const ih=o.div`
1135
- display: flex;
1136
- align-items: center;
1137
- gap: ${({$gap:e})=>e}px;
1138
- `,ah=o.div`
1139
- position: relative;
1140
- display: flex;
1141
- align-items: center;
1142
- justify-content: space-between;
1143
- box-sizing: content-box;
1144
-
1145
- width: ${({$size:e})=>2*e+2}px;
1146
- height: ${({$size:e})=>e}px;
1147
- padding: ${4}px;
1148
- border-radius: ${({$size:e})=>2*e}px;
1149
- background-color: ${({$disabled:e,$onBgColor:t,$offBgColor:n,$variant:o,$value:r,theme:i})=>{if(e)return i.v2.colors.grey[800];if(t&&r)return t;if(n&&!r)return n;switch(o){case nh.SuccessError:return r?i.v2.colors.green[500]:i.v2.colors.red[500];case nh.Default:default:return r?i.v2.colors.purple[500]:i.v2.colors.grey[400]}}};
1150
-
1151
- border: 1px solid ${({$disabled:e,theme:t})=>e?t.v2.colors.grey[600]:"transparent"};
1152
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
1153
- `,sh=o.div`
1154
- position: absolute;
1155
- top: 50%;
1156
- left: ${({$value:e,$size:t})=>e?`calc(100% - ${t}px - 4px)`:"4px"};
1157
- transform: translateY(-50%);
1158
- width: ${({$size:e})=>e}px;
1159
- height: ${({$size:e})=>e}px;
1160
- border-radius: 100%;
1161
- background-color: ${({$color:e})=>e};
1162
- box-shadow: ${({$disabled:e})=>e?"0 0 40px 0 rgba(0, 0, 0, 0.07)":"0 0 10px 0 rgba(0, 0, 0, 0.50)"};
1163
- `,lh=({variant:o=nh.Default,size:r=oh.L,name:a,label:s,labelAlign:l=rh.Right,labelColor:c,tooltip:d,badge:u,value:p,onChange:h,disabled:g,withIcon:m,onIcon:f=yt,offIcon:y=xt,onBgColor:b,offBgColor:$,errorMessage:v,warnMessage:x,helpMessage:S})=>{const w=i(),E=g?w.v2.colors.grey[400]:w.v2.colors.white[500],C=r===oh.S?10:16,T=c||w.v2.colors.silver[200],A=r===oh.S?on.XXXS:on.XS,I=r===oh.S?8:12;return t(Ar,{$gap:4,children:[t(Tr,{$justifyContent:"space-between",children:[t(ih,{"data-id":a||"toggle"+(s?`-${s}`:""),"data-toggle-value":p?"true":"false",$gap:I,children:[s&&l===rh.Left&&e(cn,{color:T,size:A,nowrap:!0,children:s}),t(ah,{$onBgColor:b,$offBgColor:$,$variant:o,$size:C,$value:p,$disabled:g,onClick:e=>{e.stopPropagation(),g||h(!p)},children:[e(sh,{$color:E,$size:C,$value:p,$disabled:g}),m&&t(n,{children:[e(f,{size:C,fill:E}),e(y,{size:C,fill:E})]})]}),s&&l===rh.Right&&e(cn,{color:T,size:A,nowrap:!0,children:s})]}),e(wu,{tooltip:d,badge:u})]}),e(Eu,{errorMessage:v,warnMessage:x,helpMessage:S})]})},ch=o.div`
1164
- display: flex;
1165
- flex-direction: ${({$direction:e})=>e===bn.Horizontal?"row":"column"};
1166
- gap: ${({$direction:e})=>e===bn.Horizontal?16:8}px;
1167
- `,dh=({direction:n=bn.Vertical,title:o,size:r,disabled:i,options:a,values:s,setValues:l})=>{const c=r===oh.S?on.XS:on.S;return t(ch,{$direction:n,children:[o&&e(cn,{size:c,children:o}),a.map(t=>e(lh,{...t,labelAlign:rh.Right,value:s[t.id],onChange:e=>{return n=t.id,o=e,void l(e=>{const t={...e};return n?t[n]=o:a.forEach(e=>t[e.id]=o),t});var n,o},disabled:i,size:r},`${o}-toggle-${t.id}`))]})},uh=o.div`
1168
- display: flex;
1169
- align-items: center;
1170
- justify-content: space-between;
1171
- width: 100%;
1172
- overflow: hidden;
1173
- `,ph=o.div`
1174
- display: flex;
1175
- align-items: center;
1176
- gap: 16px;
1177
- padding: 6px 0;
1178
- min-width: 0;
1179
- flex: 1;
1180
- overflow: hidden;
1181
- `,hh=o.div`
1182
- display: flex;
1183
- align-items: center;
1184
- justify-content: center;
1185
- flex: 0 0 36px;
1186
- width: 36px;
1187
- height: 36px;
1188
- border-radius: 8px;
1189
- background: ${({theme:e})=>e.v2.colors.silver[800]};
1190
- `,gh=o.img`
1191
- width: 24px;
1192
- height: 24px;
1193
- `,mh=o.div`
1194
- display: flex;
1195
- align-items: center;
1196
- gap: 16px;
1197
- flex-shrink: 0;
1198
- `,fh=({icon:n,iconSrc:o,title:r,titleBadges:i,subTitle:a,toggleProps:s,actions:l,onClose:c,onCloseDisabled:d})=>t(uh,{children:[t(ph,{children:[n?e(hh,{children:e(n,{size:24})}):o?e(hh,{children:e(gh,{src:o,alt:r||"icon"})}):null,(r||i?.length||a)&&t(Ar,{$gap:6,children:[(r||i?.length)&&t(Tr,{$gap:16,children:[r&&e(cn,{size:on.S,weight:500,children:r}),i?.length&&e(Tr,{$gap:4,children:i?.map((t,n)=>e(vu,{...t},`${t.label}-${n}`))})]}),a&&e(cn,{size:on.XXS,children:a})]})]}),t(mh,{children:[s&&e(lh,{...s}),l?.length?e(op,{iconButtonProps:{"data-id":"drawer-actions",leftIcon:kt},items:l,selectedIds:l?.filter(e=>e?.active)?.map(e=>e?.id)??[],setSelectedIds:e=>l?.find(t=>t?.id===e[0])?.onClick?.()}):null,c&&e(Cc,{"data-id":"drawer-close",icon:xt,size:wc.M,onClick:c,disabled:d})]})]}),yh=o.div`
1199
- position: relative;
1200
- &.animated {
1201
- overflow: hidden;
1202
- padding-bottom: 1px;
1203
- border-radius: 8px;
1204
- animation: ${({$isLeaving:e})=>e?wd.out.bottom:wd.in.bottom} ${({$duration:e})=>e/10}ms forwards;
1205
- }
1206
- `,bh=o.div`
1207
- position: absolute;
1208
- bottom: -1px;
1209
- left: 0;
1210
- z-index: -1;
1211
- width: 100%;
1212
- height: 100%;
1213
- border-radius: 8px;
1214
- background-color: ${({theme:e,$status:t})=>or(e,t,t===Nn.Default?"300":t===Nn.Info?"400":"500")};
1215
- animation: ${Ed.out} ${({$duration:e})=>""+(e-e/10)}ms forwards;
1216
- `,$h=o.div`
1217
- display: flex;
1218
- align-items: center;
1219
- gap: 10px;
1220
- ${({$fullWidth:e})=>e&&r`
1221
- width: 100%;
1222
- `}
1223
- padding: 4px 12px 4px 4px;
1224
- border-radius: 8px;
1225
- background-color: ${({theme:e,$status:t})=>or(e,t,[Nn.Info,Nn.Warning].includes(t)?"1000":"900")};
1226
- `,vh=o.div`
1227
- width: ${({$smallIcon:e})=>e?"24px":"32px"};
1228
- height: ${({$smallIcon:e})=>e?"24px":"32px"};
1229
- display: flex;
1230
- align-items: center;
1231
- justify-content: center;
1232
- border-radius: 6px;
1233
- background-color: ${({theme:e,$status:t})=>or(e,t,[Nn.Info].includes(t)?"900":"800")};
1234
- `,xh=o.div`
1235
- margin-left: auto;
1236
- display: flex;
1237
- align-items: center;
1238
- gap: 4px;
1239
- `,Sh=o.div`
1240
- margin-right: 8px;
1241
- cursor: pointer;
1242
- &:hover {
1243
- transform: scale(1.2);
1244
- }
1245
- `,wh=({status:n,message:o,action:r,fullWidth:a,smallIcon:s,onClose:l,duration:c=5e3,zIndex:d})=>{const u=i(),p=zr(n,u),h=or(u,n,n===Nn.Default?"300":n===Nn.Info?"400":"500"),[g,m]=Ft(!1),f=Bt(null),y=Bt(null),b=c/10,$=c-b,v=e=>{l&&(f.current&&clearTimeout(f.current),m(!0),setTimeout(()=>l({asSeen:e?.asSeen}),b))};Mt(()=>{if(l)return f.current=setTimeout(()=>v({asSeen:!1}),$),()=>{f.current&&clearTimeout(f.current)}},[c]);return t(yh,{className:l?"animated":"",$duration:c,$isLeaving:g,onMouseEnter:()=>{l&&(f.current&&clearTimeout(f.current),y.current&&(y.current.style.animationPlayState="paused"))},onMouseLeave:()=>{if(l&&y.current){const e=y.current.offsetWidth/y.current.parentElement.offsetWidth*$;f.current=setTimeout(()=>v({asSeen:!1}),e),y.current.style.animationPlayState="running"}},style:{zIndex:d},children:[t($h,{$status:n,$fullWidth:a,children:[e("div",{children:e(vh,{$status:n,$smallIcon:s,children:e(p,{size:s?18:24})})}),e(cn,{color:h,size:on.XXXS,weight:400,children:o}),(r||l)&&t(xh,{children:[r&&e(Sh,{"data-id":r["data-id"],onClick:r.onClick,children:e(cn,{color:h,size:on.XXS,weight:500,underline:!0,nowrap:!0,children:r.label})}),l&&e(Cc,{"data-id":"note-close",icon:xt,size:wc.XS,onClick:()=>v({asSeen:!0})})]})]}),l&&e(bh,{ref:y,$status:n,$duration:c})]})},Eh=o.div`
1246
- display: flex;
1247
- align-items: center;
1248
- gap: 8px;
1249
- padding: 4px 12px;
1250
- `,Ch=o.div`
1251
- flex: 1;
1252
- `,Th=o.div`
1253
- width: 150px;
1254
- `,Ah=({note:n,actions:o,children:r})=>r?e(Eh,{children:r}):t(Eh,{children:[n&&e(wh,{...n}),e(Ch,{}),o?.map((t,n)=>e(Th,{children:e(jd,{fullWidth:!0,...t})},t["data-id"]||`drawer-footer-button-${n}`))]}),Ih=o.div`
1255
- position: fixed;
1256
- top: 0;
1257
- bottom: 0;
1258
- ${({$position:e})=>e}: 0;
1259
- z-index: ${({theme:e})=>e.v2.zIndex.drawer};
1260
-
1261
- display: flex;
1262
- flex-direction: column;
1263
- gap: 12px;
1264
-
1265
- width: ${({$width:e})=>e};
1266
- min-width: ${({$minWidth:e})=>e||"unset"};
1267
- padding: 12px;
1268
- border-radius: ${({$position:e})=>"left"===e?"0 20px 20px 0":"20px 0 0 20px"};
1269
- background: ${({theme:e})=>e.v2.colors.black[500]};
1270
- box-shadow: 0 0 34px 0 rgba(0, 0, 0, 0.7);
1271
- overflow: hidden;
1272
-
1273
- ${({$disableAnimation:e,$position:t})=>!e&&r`
1274
- animation-name: ${wd.in[t]};
1275
- `}
1276
- `,kh=o.div`
1277
- display: flex;
1278
- flex-direction: column;
1279
- gap: 12px;
1280
-
1281
- height: calc(100% - ${56}px);
1282
- overflow-y: auto;
1283
- `,Nh=({isOpen:o,hideOverlay:r=!1,disableAnimation:i=!1,position:a="right",width:s="600px",minWidth:l,header:c,footer:d,children:u})=>($c(o),o?Zt(t(n,{children:[!r&&e(Nr,{onClick:c?.onCloseDisabled?void 0:c?.onClose}),t(Ih,{"data-id":"drawer",$position:a,$width:s,$minWidth:l,$disableAnimation:i,children:[c&&e(fh,{...c}),e(kh,{children:u}),d&&e(Ah,{...d})]})]}),document.body):null),Dh=({options:t,values:n,setValues:o,withMultiSelect:r,withSearch:i,...a})=>{const s=zt(()=>t.filter(e=>n.includes(e.id)),[t,n]),l=zt(()=>s.map(e=>e.label).join(", "),[s]);return e(op,{withMultiSelect:r,withSearch:i,fullWidth:!0,alignX:Ku.Left,items:t,selectedIds:n,setSelectedIds:o,children:({ChevronIcon:t,handleClick:n})=>e(Iu,{placeholder:"Select options...",width:"100%",...a,rightIcon:t,leftIcon:1===s.length?s[0].icon:void 0,value:l,onChange:()=>{},onClick:n,readOnly:!0,tabIndex:-1})})},Oh=o.header`
1284
- position: relative;
1285
- width: 100%;
1286
- padding: 12px 18px;
1287
- background-color: ${({theme:e})=>e.v2.colors.black[500]};
1288
- display: flex;
1289
- align-items: center;
1290
- justify-content: space-between;
1291
- `,Rh=o(Tr)`
1292
- position: absolute;
1293
- left: 50%;
1294
- transform: translateX(-50%);
1295
- gap: 16px;
1296
- `,_h=({left:n=[],center:o=[],right:r=[]})=>t(Oh,{children:[e(Tr,{$gap:16,children:n}),e(Rh,{children:o}),e(Tr,{$gap:16,children:r})]}),Lh=o.div`
1297
- display: flex;
1298
- align-items: center;
1299
- gap: 2px;
1300
- width: fit-content;
1301
- padding: 4px;
1302
- border-radius: 8px;
1303
- background-color: ${({theme:e})=>e.v2.colors.silver[600]};
1304
- box-shadow: 0 3px 8px 0 rgba(0, 0, 0, 0.25);
1305
-
1306
- position: absolute;
1307
- right: ${({$right:e,$left:t})=>e||(t?"unset":"12px")};
1308
- left: ${({$left:e})=>e||"unset"};
1309
- top: 50%;
1310
- transform: translateY(-50%);
1311
- `,Ph=({isOpen:t,actions:n,positionRight:o,positionLeft:r})=>t?e(Lh,{$right:o,$left:r,children:n.map(t=>{if(!t)return null;const{tooltip:n,...o}=t;return e(od,{text:n||"",children:e(jd,{...o,variant:zd.Secondary,size:Ud.S})},o.id)})}):null,Fh=o.div`
1312
- display: flex;
1313
- align-items: center;
1314
- justify-content: center;
1315
- width: ${({$size:e,$padding:t})=>e+t}px;
1316
- height: ${({$size:e,$padding:t})=>e+t}px;
1317
- aspect-ratio: 1 / 1;
1318
- border-radius: 8px;
1319
- background-color: ${({theme:e,$noBackground:t,$status:n})=>t?"transparent":n?or(e,n,n===Nn.Warning?"1000":"900"):e.v2.colors.silver[800]};
1320
- `,Mh=({icons:n,icon:o,iconSrc:r,status:a,size:s=28,padding:l=4})=>{const c=i(),d=s/2.7,u=s/1.3,p=Qo(d,c.v2.text.size);if(n&&n.length>1){const o=n.slice(0,3),r=n.length-o.length,i=o.slice(0,2),c=o.slice(2),u=c.length>0,h=Math.round(s/16);return e("div",{style:{width:"fit-content"},children:e(Fh,{$size:s,$padding:l,$status:a,children:t(Ar,{$gap:h,$alignItems:"center",$justifyContent:"center",children:[e(Tr,{$gap:h,$alignItems:"center",$justifyContent:"center",children:i.map((t,n)=>e(t,{size:d},`top-${n}`))}),u&&t(Tr,{$gap:h,$alignItems:"center",$justifyContent:"center",children:[c.map((t,n)=>e(t,{size:d},`bottom-${n}`)),r>0&&e(cn,{size:p,weight:500,children:`+${r}`})]})]})})})}const h=n?.[0]||o;return e("div",{style:{width:"fit-content"},children:e(Fh,{$size:s,$padding:l,$status:a,children:h?e(h,{size:u}):e("img",{src:r,alt:"",width:u,height:u})})})},zh=o.div`
1321
- width: 100%;
1322
- background: ${({theme:e})=>e.v2.colors.silver[800]};
1323
- border-radius: 8px;
1324
- padding: 4px 8px;
1325
- `,Uh=({values:n,setValues:o,name:r,label:a,tooltip:s,badge:l,required:c,errorMessage:d,warnMessage:u,helpMessage:p,placeholder:h,disabled:g})=>{const m=i(),f=n.length<=1,y=g,b=g||f&&y,$=n.length?n:[""];return e(zh,{children:t(Ar,{"data-id":r,$gap:6,children:[e(wu,{label:a,tooltip:s,required:c,badge:l}),e(Ar,{$gap:8,children:$.map((r,i)=>{const a=i===$.length-1;return t(Tr,{$gap:8,$alignItems:"center",children:[e(Iu,{width:"100%",autoFocus:Zr(r)&&!f&&a,value:r,onChange:e=>((e,t)=>{const r=[...n||[]];r[t]=e,o(r)})(e.target.value,i),disabled:g,placeholder:h,hasError:!!d}),a&&e(jd,{leftIcon:Nt,variant:zd.Secondary,size:Ud.S,disabled:y,onClick:()=>(()=>{const e=n.length?bo(n):[bo("")];e.push(""),o(e)})()}),e(jd,{leftIcon:b?Dt:()=>e(Dt,{fill:m.v2.colors.red[500]}),variant:zd.Secondary,size:Ud.S,disabled:b,onClick:()=>(e=>{const t=[...n||[]].filter((t,n)=>n!==e);t.length||t.push(""),o(t)})(i)})]},`input-list-${i}`)})}),e(Eu,{errorMessage:d,warnMessage:u,helpMessage:p})]})})},Bh=({col:t,colIdx:n,row:o,rowIdx:r,rowsLength:i,handleChange:a,errorMessage:s,disabled:l,hideLabel:c})=>{const{keyName:d,componentType:u,inputType:p,label:h,placeholder:g,options:m,renderCondition:f,helpMessage:y,min:b,max:$}=t,v=o[d];if(f&&!f(o))return null;const x=c?void 0:h||void 0,S=g;switch(u){case In.Dropdown:case"multi-dropdown":{const t="multi-dropdown"===u,n=Array.isArray(v)?v:null!=v&&""!==v?[String(v)]:[],o=m?.filter(e=>n.includes(e.id)).map(e=>e.id)||[];return e(Dh,{name:d,label:x,placeholder:S,options:m||[],withMultiSelect:t,withSearch:t,values:o,setValues:e=>a(d,t?e:e[0]??"",r),disabled:l,hasError:!!s},d)}default:const t=i>1&&0===r&&0===n&&Zr(v);return e(Iu,{name:d,label:x,placeholder:S,autoFocus:t,type:p,min:b,max:$,value:v,onChange:({target:{value:e}})=>a(d,e,r),disabled:l,hasError:!!s,helpMessage:y})}},jh=o.div`
1326
- width: 100%;
1327
- background: ${({theme:e})=>e.v2.colors.silver[800]};
1328
- border-radius: 8px;
1329
- padding: 4px 8px;
1330
- `,Wh=o.table`
1331
- width: 100%;
1332
- border-collapse: separate;
1333
- border-spacing: 0 8px;
1334
- `,Hh=o.td`
1335
- padding: 0 8px 0 0;
1336
- vertical-align: top;
1337
- `,Gh=o.td`
1338
- width: 72px;
1339
- vertical-align: top;
1340
- padding-top: ${({$topOffset:e})=>e}px;
1341
- `,Xh=({columns:n,values:o,setValues:r,name:a,label:s,tooltip:l,badge:c,required:d,disabled:u,errorMessage:p,warnMessage:h,helpMessage:g,limitFieldsPerRow:m})=>{const f=i(),y=zt(()=>{const e={};return n.forEach(({keyName:t})=>e[t]=""),e},[n]),b=(e,t,n)=>{const i=o.length?bo(o):[bo(y)];i[n][e]=t,r(i)},$=zt(()=>{if(m){const e=[];for(let t=0;;t+=m){const o=n.slice(t,t+m);if(!o.length)break;e.push(o)}return e}return[n]},[m,n]),v=zt(()=>$.map(e=>e.some(e=>!!e.label)),[$]),x=o.length?o:[y];return e(jh,{children:t(Ar,{"data-id":a,$gap:0,children:[e(wu,{label:s,tooltip:l,required:d,badge:c}),e(Wh,{children:e("tbody",{children:x.map((n,i)=>{const a=i===x.length-1;return t(Pt,{children:[m&&i>0?e("tr",{children:e(Hh,{colSpan:$.length})}):null,$.map((s,l)=>{const c=v[l],d=c?22:0;return t("tr",{children:[s.map((o,r)=>o.renderCondition&&!o.renderCondition(n)?null:e(Hh,{children:t(Ar,{$gap:6,children:[c&&(o.label?e(wu,{label:o.label,tooltip:o.tooltip}):e(wu,{label:"\\u00A0"})),e(Bh,{col:o,colIdx:r,row:n,rowIdx:i,rowsLength:x.length,handleChange:b,disabled:u,errorMessage:p,hideLabel:c})]})},`input-table-row-${i}-col-${l}-${r}`)),0===l&&e(Gh,{$topOffset:d,children:t(Tr,{$gap:8,$justifyContent:"flex-end",children:[a&&e(jd,{leftIcon:Nt,variant:zd.Secondary,size:Ud.S,disabled:u,onClick:()=>(()=>{const e=o.length?bo(o):[bo(y)];e.push(bo(y)),r(e)})()}),e(jd,{leftIcon:u?Dt:()=>e(Dt,{fill:f.v2.colors.red[500]}),variant:zd.Secondary,size:Ud.S,disabled:u,onClick:()=>(e=>{const t=o.filter((t,n)=>n!==e);t.length||t.push(bo(y)),r(t)})(i)})]})})]},`input-table-matrix-${i}-${l}`)})]},`input-table-row-${i}`)})})}),e(Eu,{errorMessage:p,warnMessage:h,helpMessage:g})]})})},Kh=o.div`
1342
- display: flex;
1343
- align-items: center;
1344
- justify-content: space-between;
1345
- gap: 32px;
1346
-
1347
- padding: 18px 16px;
1348
- border-radius: 18px;
1349
- background-color: ${({theme:e})=>e.v2.colors.black[500]+xd["095"]};
1350
- box-shadow: 0 4px 16.7px 0 rgba(0, 0, 0, 0.83);
1351
-
1352
- position: fixed;
1353
- bottom: 0;
1354
- left: 50%;
1355
- z-index: ${({theme:e})=>e.v2.zIndex.island};
1356
- animation-name: ${wd.in.center};
1357
- `,Vh=({isOpen:n,onClose:o,richTitle:r,actions:i})=>n?t(Kh,{children:[e(gp,{...r}),e(up,{onAnyClick:o,actions:i})]}):null,Jh=o.div`
1358
- position: ${({$relativeToParent:e})=>e?"absolute":"fixed"};
1359
- top: 50%;
1360
- left: 50%;
1361
- transform: translate(-50%, -50%);
1362
- z-index: ${({theme:e})=>e.v2.zIndex.modal};
1363
- width: fit-content;
1364
- border-radius: 20px;
1365
- background: ${({theme:e})=>e.v2.colors.black[500]};
1366
- box-shadow: 0 0 34px 0 rgba(0, 0, 0, 0.7);
1367
- overflow: hidden;
1368
-
1369
- /* Promote to its own composited layer and isolate paint/layout so descendant
1370
- re-renders during the slide animation can't trigger reflows of the rest of
1371
- the page. Without this, the global \`* { transition: all 300ms }\` rule plus
1372
- a heavy modal body (forms, etc.) make the close visibly stutter. */
1373
- will-change: transform;
1374
- contain: layout paint;
1375
-
1376
- animation-name: ${({$closing:e})=>e?wd.out.center:wd.in.center};
1377
- /* Snappier close: shorter duration with an ease-in curve. The slide-in keeps
1378
- the global 300ms default which pairs with the fade-in for a soft entrance. */
1379
- animation-duration: ${({$closing:e})=>e?"180ms":"300ms"};
1380
- animation-timing-function: ${({$closing:e})=>e?"cubic-bezier(0.4, 0, 1, 1)":"cubic-bezier(0, 0, 0.2, 1)"};
1381
-
1382
- /* Block hover/click work on form children mid-close so their transitions
1383
- don't compete with the slide-out. */
1384
- ${({$closing:e})=>e&&"pointer-events: none;"}
1385
- `,Yh=o(Nr)`
1386
- will-change: opacity;
1387
- animation-name: ${({$closing:e})=>e?Ad.out:Ad.in};
1388
- animation-duration: ${({$closing:e})=>e?"180ms":"300ms"};
1389
-
1390
- /* The blurred backdrop is the most expensive thing on screen during the close
1391
- — animating opacity on a backdrop-filtered element forces a full GPU
1392
- recomposite per frame. Drop the blur while closing; visually identical
1393
- because the overlay is fading to 0. */
1394
- ${({$closing:e})=>e&&"backdrop-filter: none; pointer-events: none;"}
1395
- `,qh=o.div`
1396
- position: relative;
1397
- `,Qh=o.div`
1398
- position: absolute;
1399
- top: 16px;
1400
- left: 16px;
1401
- `,Zh=({isOpen:o,hideOverlay:r=!1,relativeToParent:i=!1,onBack:a,onClose:s,onCloseEnd:l,children:c})=>{const[d,u]=Ft(o),[p,h]=Ft(!1);if(Mt(()=>{o?(u(!0),h(!1)):d&&h(!0)},[o]),$c(d),!d)return null;const g=t(n,{children:[!r&&e(Yh,{$relativeToParent:i,$closing:p,onClick:p?void 0:s}),e(Jh,{"data-id":"modal",$relativeToParent:i,$closing:p,onAnimationEnd:e=>{e.target===e.currentTarget&&p&&(u(!1),h(!1),l?.())},children:t(qh,{children:[a&&e(Qh,{children:e(Cc,{icon:t=>e(It,{rotate:-90,...t}),size:wc.L,onClick:a})}),c]})})]});return i?g:Zt(g,document.body)},eg=o.div`
1402
- position: relative;
1403
- width: ${64}px;
1404
- height: ${({$height:e})=>e};
1405
- flex-shrink: 0;
1406
- `,tg=o.aside`
1407
- position: absolute;
1408
- top: 0;
1409
- left: 0;
1410
- bottom: 0;
1411
- display: flex;
1412
- flex-direction: column;
1413
- gap: 8px;
1414
- width: ${({$expanded:e})=>e?"220px":"64px"};
1415
- padding: 16px ${12}px;
1416
- box-sizing: border-box;
1417
- background-color: ${({theme:e})=>e.v2.colors.black[500]};
1418
- overflow-x: hidden;
1419
- overflow-y: auto;
1420
- z-index: 10;
1421
- transition:
1422
- width 200ms ease,
1423
- padding 200ms ease;
1424
- `,ng=o.button`
1425
- display: flex;
1426
- align-items: center;
1427
- width: 100%;
1428
- min-width: 0;
1429
- height: ${40}px;
1430
- padding: 0;
1431
- margin: 0;
1432
- border: none;
1433
- border-radius: 6px;
1434
- box-sizing: border-box;
1435
- cursor: pointer;
1436
- font: inherit;
1437
- background-color: ${({theme:e,$selected:t})=>t?e.v2.colors.purple[500]:"transparent"};
1438
- &:hover {
1439
- background-color: ${({theme:e,$selected:t})=>t?e.v2.colors.purple[600]:e.v2.colors.silver[800]};
1440
- }
1441
- &:active {
1442
- background-color: ${({theme:e,$selected:t})=>t?e.v2.colors.purple[700]:e.v2.colors.silver[900]};
1443
- }
1444
- `,og=o.div`
1445
- width: ${40}px;
1446
- height: ${40}px;
1447
- display: flex;
1448
- align-items: center;
1449
- justify-content: center;
1450
- flex-shrink: 0;
1451
- `,rg=o.div`
1452
- flex: 1 1 0;
1453
- min-width: 0;
1454
- overflow: hidden;
1455
- padding-right: 12px;
1456
- pointer-events: none;
1457
- `,ig=({height:n,icons:o})=>{const r=i(),[a,s]=Ft(!1);return e(eg,{$height:n,children:e(tg,{$expanded:a,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),children:o.map(({id:n,label:o,selected:i,icon:s,onClick:l})=>t(ng,{$selected:i,onClick:l,"aria-label":o,title:a?void 0:o,children:[e(og,{children:e(s,{size:24,fill:r.v2.colors.white[500]})}),a&&e(rg,{children:e(cn,{size:on.S,weight:500,color:rn.Primary,nowrap:!0,children:o})})]},n))})})};var ag;!function(e){e.S="small",e.L="large"}(ag||(ag={}));const sg=o.div`
1458
- width: fit-content;
1459
- display: flex;
1460
- align-items: center;
1461
- gap: 8px;
1462
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
1463
- `,lg=o.div`
1464
- width: ${({$size:e})=>e===ag.S?"16px":"20px"};
1465
- height: ${({$size:e})=>e===ag.S?"16px":"20px"};
1466
- display: flex;
1467
- align-items: center;
1468
- justify-content: center;
1469
- border-radius: 100%;
1470
- border: 1px solid ${({$borderColor:e})=>e};
1471
- background-color: ${({$backgroundColor:e})=>e};
1472
- `,cg=({"data-id":n,label:o,value:r,onChange:a,disabled:s,size:l=ag.L})=>{const c=i(),[d,u]=Ft(!1),p=r,h=l===ag.S?6:8,g=s?c.v2.colors.grey[400]:c.v2.colors.white[500],m=p?"transparent":s?c.v2.colors.grey[700]:d?c.v2.colors.silver[400]:c.v2.colors.silver[600],f=s?c.v2.colors.grey[600]:p?c.v2.colors.purple[500]:c.v2.colors.silver[900];return t(sg,{"data-id":n??"radio"+(o?`-${o}`:""),onClick:e=>{e.stopPropagation(),s||a(!r)},$disabled:s,onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),children:[e(lg,{$size:l,$borderColor:m,$backgroundColor:f,children:r?e(Ot,{size:h,fill:g}):null}),o&&e(cn,{size:l===ag.S?on.XXS:on.XS,children:o})]})},dg=o.div`
1473
- display: flex;
1474
- flex-direction: ${({$flexDirection:e})=>e};
1475
- gap: ${({$gap:e})=>e}px;
1476
- `,ug=({label:n,direction:o,disabled:r,size:i,options:a,values:s,setValues:l})=>t(dg,{$flexDirection:o===bn.Horizontal?"row":"column",$gap:o===bn.Horizontal?16:8,children:[n&&e(cn,{children:n}),a.map(t=>e(cg,{...t,value:s[t.id],onChange:e=>{return n=t.id,o=e,void l(e=>{const t={...e};return Object.keys(t).forEach(e=>t[e]=!1),t[n]=o,t});var n,o},disabled:r,size:i},`${n}-radio-${t.id}`))]}),pg=({currentStep:n,data:o,gap:r=12})=>e(Ar,{$gap:r,children:o.map(o=>{const r=o.step<n,i=o.step===n;return t(Tr,{$gap:8,children:[r||o.forceDoneBadge?e(vu,{status:Nn.Success,label:"",leftIcon:yt}):e(vu,{status:Nn.Default,label:o.step.toString()}),e(cn,{size:i?on.M:on.XS,weight:i?500:400,opacity:i?1:.7,children:o.label})]},`stepper-item-${o.step}`)})});var hg;!function(e){e.Data="data",e.Pretty="pretty"}(hg||(hg={}));const gg=o.div`
1477
- ${({$maxHeight:e})=>e?`\n height: ${e};\n flex: 0 0 auto;\n `:"\n flex: 1;\n min-height: 0;\n height: 100%;\n "}
1478
- width: 100%;
1479
- display: flex;
1480
- flex-direction: column;
1481
- overflow: hidden;
1482
- `,mg=o.div`
1483
- width: 100%;
1484
- flex: 1;
1485
- display: flex;
1486
- flex-direction: column;
1487
- `,fg=o.div`
1488
- flex-shrink: 0;
1489
- position: relative;
1490
- z-index: 2;
1491
- `,yg=o.div`
1492
- position: relative;
1493
- display: flex;
1494
- width: 100%;
1495
- `,bg=o.div`
1496
- position: relative;
1497
- min-width: ${({$minWidth:e})=>e?`${e}px`:"auto"};
1498
- flex: ${({$flex:e,$autoWidth:t,$resolvedWidth:n})=>null!=n?`0 0 ${n}px`:e??(t?"0 0 auto":1)};
1499
-
1500
- /* See the matching rule on Td below for the full explanation. The header
1501
- * needs the same flex-grow override so its column shares any empty row
1502
- * width even when the caller wrote 'flex: 0 0 Xpx'. */
1503
- ${({$autoWidth:e,$resolvedWidth:t})=>!e&&null==t&&r`
1504
- flex-grow: 1;
1505
- `}
1506
-
1507
- padding: 18px 24px;
1508
- border: none;
1509
- border-radius: ${({$isFirst:e,$isLast:t})=>e?"4px 0 0 0":t?"0 4px 0 0":"0"};
1510
- box-sizing: border-box;
1511
-
1512
- ${({$variant:e,$backgroundColor:t})=>{if(t)return r`
1513
- background-color: ${t};
1514
- `;switch(e){case hg.Data:return r`
1515
- background-color: ${({theme:e})=>e.v2.colors.silver[750]};
1516
- `;case hg.Pretty:return r`
1517
- background-color: transparent;
1518
- `;default:return""}}}
1519
- `,$g=o.div`
1520
- position: absolute;
1521
- top: 50%;
1522
- right: 0;
1523
- transform: translateY(-50%);
1524
- width: 1px;
1525
- height: 18px;
1526
- background: ${({theme:e})=>e.v2.colors.silver[500]};
1527
- `,vg=o.div`
1528
- min-width: ${({$minWidth:e})=>e?`${e}px`:"auto"};
1529
- flex: ${({$flex:e,$autoWidth:t,$resolvedWidth:n})=>null!=n?`0 0 ${n}px`:e??(t?"0 0 auto":1)};
1530
-
1531
- /* Always let text columns grow into empty row space, even when the caller
1532
- * wrote an explicit flex value with grow=0 (e.g. 'flex: 0 0 160px'). The
1533
- * 'flex' shorthand above sets all three flex sub-properties from the
1534
- * caller's value; this longhand 'flex-grow: 1' is declared after it so it
1535
- * wins and the column still consumes any leftover width.
1536
- *
1537
- * Without this, a column pinned with 'flex: 0 0 160px' stays at 160px even
1538
- * when the row has hundreds of pixels of empty space — and the text inside
1539
- * gets ellipsised (or in extreme cases clipped without indication) when it
1540
- * could comfortably fit a few more pixels. Combined with the cell's
1541
- * 'overflow: hidden', a column that's STILL too narrow after consuming all
1542
- * available space then truncates cleanly via TruncatableTypography's
1543
- * ellipsis + tooltip.
1544
- *
1545
- * Component (auto-width) columns and JS-measured columns
1546
- * ('resolvedColumnWidths') keep their exact pixel width — they're already
1547
- * sized to fit their content and shouldn't steal leftover space from text
1548
- * columns. The withCheckboxes column passes 'flex' via an inline style,
1549
- * which takes precedence over class styles, so it stays pinned too. */
1550
- ${({$autoWidth:e,$resolvedWidth:t})=>!e&&null==t&&r`
1551
- flex-grow: 1;
1552
- `}
1553
-
1554
- overflow: ${({$autoWidth:e})=>e?"visible":"hidden"};
1555
- display: flex;
1556
- align-items: center;
1557
-
1558
- padding: 18px 24px;
1559
- cursor: ${({$withClick:e})=>e?"pointer":"default"};
1560
- box-sizing: border-box;
1561
-
1562
- ${({$variant:e,$selected:t,$highlighted:n,$hovered:o,$isLastRow:i,$isFirstCell:a,$isLastCell:s})=>{switch(e){case hg.Data:return r`
1563
- border-bottom: ${({theme:e})=>i?"none":`1px solid ${e.v2.colors.silver[500]}`};
1564
- border-radius: ${i?a?"0 0 0 4px":s?"0 0 4px 0":"0":"0"};
1565
- background-color: ${({theme:e})=>t?e.v2.colors.blue[1e3]:n||o?e.v2.colors.silver[700]:e.v2.colors.silver[800]};
1566
- `;case hg.Pretty:return r`
1567
- border: none;
1568
- border-radius: ${a?"12px 0 0 12px":s?"0 12px 12px 0":"0"};
1569
- background-color: ${({theme:e})=>t?e.v2.colors.blue[1e3]:n||o?e.v2.colors.silver[700]:e.v2.colors.silver[900]};
1570
- `;default:return""}}}
1571
- `,xg=o.div`
1572
- position: absolute;
1573
- top: 0;
1574
- left: 0;
1575
- visibility: hidden;
1576
- pointer-events: none;
1577
- height: 0;
1578
- overflow: hidden;
1579
- white-space: nowrap;
1580
- `,Sg=o.div`
1581
- display: inline-flex;
1582
- align-items: center;
1583
- padding: 18px 24px;
1584
- box-sizing: border-box;
1585
- white-space: nowrap;
1586
- `,wg=o.div`
1587
- display: inline-flex;
1588
- align-items: center;
1589
- gap: 4px;
1590
- white-space: nowrap;
1591
- `,Eg=o.div`
1592
- width: 100%;
1593
- height: 100%;
1594
- display: flex;
1595
- align-items: center;
1596
- justify-content: ${({$textAlign:e})=>"right"===e?"flex-end":"left"===e?"flex-start":"center"===e?"center":"unset"};
1597
- gap: 4px;
1598
- text-align: ${({$textAlign:e})=>e||"left"};
1599
- `,Cg=({variant:n,columns:o,rows:r,autoWidthColumnKeys:i,resolvedColumnWidths:a,getRowActions:s,rowActionsPushRightPosition:l,rowActionsPushLeftPosition:c,withCheckboxes:d,activeRowId:u,scrollToIndex:p,scrollSignal:h})=>{const[g,m]=Ft(null),f=zt(()=>r.map((p,h)=>{const{cells:f,onClick:y,isSelected:b=!1,onSelect:$,onDeselect:v,hideCheckbox:x,checkboxDisabled:S,checkboxTooltip:w}=p,E=g===h,C=null!=u&&p.id===u,T=s(p),A=(e,t)=>({$isLastRow:h===r.length-1,$isFirstCell:e,$isLastCell:t,$selected:b,$highlighted:C,$withClick:!!y,onClick:()=>y?.(),$hovered:!!y&&E,onMouseEnter:()=>m(h),onMouseLeave:()=>m(null)});return t(yg,{children:[d&&e(vg,{$variant:n,style:{flex:"0 0 68px"},...A(!0,!1),children:!x&&(w?e(od,{text:w,children:e(Hu,{value:b,disabled:S,onChange:()=>b?v?.():$?.()})}):e(Hu,{value:b,disabled:S,onChange:()=>b?v?.():$?.()}))},"checkbox-column"),o.map(({key:r,withTooltip:s,textAlign:u,flex:p,minWidth:g},m)=>{const y=f.find(e=>e.key===r),b=0===m&&!d,$=m===o.length-1,v=T.length&&(l&&$||c&&b||!l&&!c&&$),x="right"===u?"flex-end":"center"===u?"center":"flex-start",S=y?.component?e(y.component,{}):s?e(cn,{size:on.XS,align:u,nowrap:!0,children:y?.rawValue||"-"}):e(pp,{size:on.XS,align:u,nowrap:!0,fullWidth:!1,children:y?.rawValue||"-"}),w=e(Tr,{$width:"100%",$justifyContent:x,children:S});return t(vg,{$variant:n,$flex:p,$minWidth:g,$autoWidth:i.has(r),$resolvedWidth:a[r],...A(b,$),children:[s?e(od,{text:y?.rawValue?.toString()||"",ellipsis:!0,children:w}):w,v?e(Ph,{isOpen:E,actions:T,positionRight:l,positionLeft:c}):null]},`row-${h}-cell-${m}`)})]},`row-${h}`)}),[r,g,u,s,l,c,d,o,i,a]);return e(pu,{gap:n===hg.Pretty?8:0,elements:f,scrollToIndex:p,scrollSignal:h})},Tg=({columnKey:t,sortDirection:n,sortByKey:o,onSort:r})=>{const a=i(),s=o===t?a.v2.colors.white[500]:a.v2.colors.grey[400],l=n===$n.Ascending?0:180;return e(jd,{variant:zd.Text,size:Ud.S,leftIcon:()=>e(It,{fill:s,rotate:l}),onClick:()=>r(t)})},Ag=({columnKey:t,filters:n,onFilter:o,rowsUnfiltered:r,filterOverride:a})=>{const s=i(),l=n[t]?.length?s.v2.colors.white[500]:s.v2.colors.grey[400],c=zt(()=>{if(a)return a.options.map(({id:e,label:t})=>({id:e,label:t,withCheckbox:!0}));return Array.from(new Set(r.map(e=>e.cells.find(e=>e.key===t)?.rawValue?.toString()).filter(e=>!!e))).sort((e,t)=>e.localeCompare(t)).map(e=>({id:e,label:e,withCheckbox:!0}))},[r,t,a]);return e(op,{items:c,withMultiSelect:!0,selectedIds:n[t]?.map(e=>e.toString())??[],setSelectedIds:e=>o(t,e),defaultOpen:!1,iconButtonProps:{leftIcon:t=>e(Rt,{fill:l,...t})}})},Ig=({variant:n,backgroundColor:o,columns:r,rowsUnfiltered:i,autoWidthColumnKeys:a,resolvedColumnWidths:s,sortDirection:l,sortByKey:c,onSort:d,filters:u,onFilter:p,withCheckboxes:h,partiallySelected:g,allSelected:m,onSelectAll:f})=>t(yg,{children:[h&&e(bg,{$variant:n,$backgroundColor:o,$isFirst:!0,$isLast:!1,style:{flex:"0 0 68px",display:"flex",alignItems:"center"},children:e(Hu,{partiallyChecked:g&&!m,value:m||!1,onChange:f})},"checkbox-column"),r.map(({key:g,label:m,withTooltip:f,tooltip:y,noSort:b,noFilter:$,filterOverride:v,flex:x,minWidth:S,textAlign:w},E)=>{const C=0===E&&!h,T=E===r.length-1,A=!(!y&&!f),I=A?e(cn,{size:on.XS,align:w,nowrap:!0,children:m}):e(pp,{size:on.XS,align:w,nowrap:!0,fullWidth:!1,children:m});return t(bg,{$variant:n,$backgroundColor:o,$flex:x,$minWidth:S,$isFirst:C,$isLast:T,$autoWidth:a.has(g),$resolvedWidth:s[g],children:[t(Eg,{$textAlign:w,children:[A?e(od,{text:y||m,children:I}):I,!b&&e(Tg,{columnKey:g,sortDirection:l,sortByKey:c,onSort:d}),!$&&e(Ag,{columnKey:g,filters:u,onFilter:p,rowsUnfiltered:i,filterOverride:v})]}),!T&&n===hg.Data&&e($g,{})]},`column-${g}`)})]}),kg=()=>{},Ng={},Dg=[],Og=({variant:n,maxHeight:o,headerBackgroundColor:r,hideHeader:i=!1,isLoading:a,noDataProps:s,columns:l,rows:c,getRowActions:d,rowActionsPushRightPosition:u,rowActionsPushLeftPosition:p,withCheckboxes:h,filters:g,onFiltersChange:m,activeRowId:f,scrollSignal:y})=>{const[b,$]=Ft($n.Ascending),[v,x]=Ft(""),[S,w]=Ft({}),E=g??S,C=Ut(e=>{x(e),$(e=>e===$n.Ascending?$n.Descending:$n.Ascending)},[]),T=Ut((e,t)=>{const n={...E,[e]:t};m&&m(n),void 0===g&&w(n)},[E,m,g]),A=zt(()=>{const e=(e,t)=>{const n=e.cells.find(e=>e.key===t);return n&&(n.rawValue?.toString()||n.component?.({})?.props?.children?.toString())||""};return(v?[...c].sort((t,n)=>{const o=e(t,v),r=e(n,v);return(b===$n.Ascending?1:-1)*((e,t)=>"string"==typeof e&&"string"==typeof t?e.localeCompare(t):"number"==typeof e&&"number"==typeof t?e-t:"boolean"==typeof e&&"boolean"==typeof t?e===t?0:e?1:-1:String(e).localeCompare(String(t)))(o,r)}):c).filter(t=>{for(const[n,o]of Object.entries(E)){if(!o.length)continue;const r=l.find(e=>e.key===n)?.filterOverride;if(r){if(!r.filterRow(t,o))return!1}else if(!o.includes(e(t,n)))return!1}return!0})},[c,v,b,E,l]),I=zt(()=>null==f?-1:A.findIndex(e=>e.id===f),[A,f]),{partiallySelected:k,allSelected:N}=zt(()=>{const e=A.filter(e=>!e.hideCheckbox&&!e.checkboxDisabled);return{partiallySelected:e.length>0&&e.some(e=>e.isSelected),allSelected:e.length>0&&e.every(e=>e.isSelected)}},[A]),D=zt(()=>{const e=new Set;for(const t of l)null!=t.flex&&e.add(t.key);const t=new Set;for(const n of c)for(const o of n.cells)o.component&&!e.has(o.key)&&t.add(o.key);return t},[c,l]),O=Bt(null),[R,_]=Ft({}),L=zt(()=>0===D.size?[]:l.filter(e=>D.has(e.key)).map(n=>{const o=[t(wg,{children:[e(cn,{size:on.XS,align:n.textAlign,children:n.label}),!n.noSort&&e(Tg,{columnKey:n.key,sortDirection:$n.Ascending,sortByKey:"",onSort:kg}),!n.noFilter&&e(Ag,{columnKey:n.key,filters:Ng,onFilter:kg,rowsUnfiltered:Dg,filterOverride:n.filterOverride})]},`mw-${n.key}-header`)];return c.forEach((t,r)=>{const i=t.cells.find(e=>e.key===n.key);i&&o.push(i.component?e(i.component,{},`mw-${n.key}-${r}`):e(cn,{size:on.XS,children:i.rawValue||"-"},`mw-${n.key}-${r}`))}),{key:n.key,nodes:o}}),[l,c,D]);return jt(()=>{if(!O.current||0===D.size)return void _(e=>0===Object.keys(e).length?e:{});const e={};O.current.querySelectorAll("[data-mw-key]").forEach(t=>{const n=t.dataset.mwKey;if(!n)return;const o=Math.ceil(t.getBoundingClientRect().width);(!e[n]||o>e[n])&&(e[n]=o)}),_(t=>Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(n=>t[n]===e[n])?t:e)},[L,D]),t(gg,{$maxHeight:o,children:[L.length>0&&e(xg,{ref:O,"aria-hidden":!0,children:L.flatMap(({key:t,nodes:n})=>n.map((n,o)=>e(Sg,{"data-mw-key":t,children:n},`mw-${t}-${o}`)))}),t(mg,{$variant:n,children:[!i&&e(fg,{children:e(Ig,{variant:n,backgroundColor:r,columns:l,rowsUnfiltered:c,autoWidthColumnKeys:D,resolvedColumnWidths:R,sortDirection:b,sortByKey:v,onSort:C,filters:E,onFilter:T,withCheckboxes:h,partiallySelected:k,allSelected:N,onSelectAll:e=>{e?A.forEach(e=>!e.hideCheckbox&&!e.checkboxDisabled&&e.onSelect?.()):A.forEach(e=>!e.hideCheckbox&&!e.checkboxDisabled&&e.onDeselect?.())}})}),A.length?e(Cg,{variant:n,columns:l,rows:A,autoWidthColumnKeys:D,resolvedColumnWidths:R,getRowActions:d||(()=>[]),rowActionsPushRightPosition:u,rowActionsPushLeftPosition:p,withCheckboxes:h,activeRowId:f,scrollToIndex:I,scrollSignal:y}):e(Ir,{$height:o,$fullHeight:!o,children:a?e(Mr,{withSpinner:!0}):e(Uu,{...s})})]})]})};var Rg;!function(e){e.Default="default",e.Purple="purple",e.Yellow="yellow",e.Blue="blue",e.Pink="pink",e.Green="green",e.Loader="loader"}(Rg||(Rg={}));const _g=(e,t,n)=>{switch(t){case Rg.Purple:return e.v2.colors.purple[n?"300":"900"];case Rg.Yellow:return e.v2.colors.yellow[n?"300":"1000"];case Rg.Blue:return e.v2.colors.blue[n?"300":"1000"];case Rg.Pink:return e.v2.colors.red[n?"300":"1000"];case Rg.Green:return e.v2.colors.green[n?"300":"900"];case Rg.Loader:return e.v2.colors.grey[n?"600":"800"];default:return e.v2.colors.grey[n?"300":"500"]}},Lg=o.div`
1600
- display: flex;
1601
- align-items: center;
1602
- justify-content: center;
1603
- gap: 8px;
1604
- padding: 4px 8px;
1605
- border-radius: 6px;
1606
- border: 1px solid transparent;
1607
-
1608
- ${({$flex:e})=>e?r`
1609
- flex: ${e};
1610
- `:r`
1611
- width: fit-content;
1612
- `}
1613
-
1614
- ${({$disabled:e,$variant:t,$withClick:n})=>e?r`
1615
- background-color: ${({theme:e})=>e.v2.colors.grey[800]};
1616
- cursor: not-allowed;
1617
- `:r`
1618
- background-color: ${({theme:e})=>_g(e,t)};
1619
- ${n&&r`
1620
- cursor: pointer;
1621
- &:hover,
1622
- &:active {
1623
- border: 1px solid ${({theme:e})=>_g(e,t,!0)};
1624
- }
1625
- `}
1626
- `}
1627
- `,Pg=({variant:n=Rg.Default,label:o,leftIcon:r,rightIcon:a,onClick:s,disabled:l,flex:c})=>{const d=i(),u=l?d.v2.colors.grey[400]:n===Rg.Default?d.v2.colors.white[500]:_g(d,n,!0),p=n===Rg.Loader;return t(Lg,{$variant:n,$disabled:l,$withClick:!!s,onClick:()=>!l&&s?.(),$flex:c,children:[r&&e(r,{fill:u,size:16}),p?e(Mr,{withGradient:!0,title:o,titleSize:on.XXS}):e(cn,{color:u,size:on.XXS,nowrap:!0,children:o}),a&&e(a,{fill:u,size:16})]})},Fg=o.div`
1628
- padding: 6px 12px;
1629
-
1630
- display: flex;
1631
- align-self: stretch;
1632
- align-items: flex-start;
1633
- gap: 8px;
1634
- border-radius: 6px;
1635
-
1636
- border: 1px solid ${({theme:e,$disabled:t,$error:n})=>t?e.v2.colors.grey[600]:n?e.v2.colors.red[500]:e.v2.colors.silver[500]};
1637
- background: ${({theme:e,$disabled:t})=>t?e.v2.colors.grey[800]:e.v2.colors.black[500]};
1638
- ${({$disabled:e,$error:t})=>!e&&!t&&r`
1639
- &:hover,
1640
- &:active,
1641
- &:focus-within {
1642
- border: 1px solid ${({theme:e})=>e.v2.colors.silver[300]};
1643
- }
1644
- `}
1645
- `,Mg=o.textarea`
1646
- max-width: ${({$maxWidth:e})=>e||"unset"};
1647
- min-height: ${({$minHeight:e})=>e||"50px"};
1648
- flex: 1;
1649
- font-family: ${({theme:e})=>e.font_family.primary};
1650
- font-size: 14px;
1651
- font-weight: 400;
1652
- resize: none;
1653
-
1654
- background: transparent;
1655
- border: none;
1656
- outline: none;
1657
- cursor: text;
1658
- color: ${({theme:e})=>e.v2.colors.white[500]};
1659
- &::placeholder {
1660
- color: ${({theme:e})=>e.v2.colors.silver[600]};
1661
- }
1662
-
1663
- &:disabled {
1664
- cursor: not-allowed;
1665
- color: ${({theme:e})=>e.v2.colors.grey[400]};
1666
- &::placeholder {
1667
- color: ${({theme:e})=>e.v2.colors.grey[400]};
1668
- }
1669
- }
1670
- `,zg=({label:n,required:o,tooltip:r,badge:i,errorMessage:a,warnMessage:s,helpMessage:l,name:c,value:d,onChange:u,disabled:p,maxWidth:h,minHeight:g,...m})=>{const f=Bt(null),y=()=>{f.current&&(f.current.style.height="auto",f.current.style.height=`${f.current.scrollHeight}px`)};return t(Ar,{$gap:6,children:[e(wu,{label:n,tooltip:r,required:o,badge:i}),e(Fg,{$disabled:p,$error:!!a,children:e(Mg,{ref:f,"data-id":c,name:c,value:d,onChange:e=>{e.stopPropagation(),y(),u?.(e)},onKeyDown:e=>{e.stopPropagation()},onFocus:y,onBlur:y,disabled:p,$maxWidth:h,$minHeight:g,...m})}),e(Eu,{errorMessage:a,warnMessage:s,helpMessage:l})]})},Ug=[{id:"ms",label:"milliseconds"},{id:"s",label:"seconds"},{id:"m",label:"minutes"},{id:"h",label:"hours"}],Bg=o.div`
1671
- flex: 1;
1672
- min-width: 0;
1673
- `,jg=o.div`
1674
- flex: 0 0 auto;
1675
- min-width: 140px;
1676
- `,Wg=({name:n,label:o,tooltip:r,badge:i,placeholder:a,required:s,disabled:l,value:c,setValue:d,units:u=Ug,defaultUnit:p,errorMessage:h,warnMessage:g,helpMessage:m,hasError:f,width:y})=>{const b=zt(()=>p&&u.some(e=>e.id===p)?p:u[0]?.id||"s",[p,u]),{num:$,unit:v}=zt(()=>((e,t,n)=>{if(null==e||""===e)return{num:"",unit:n};const o=[...t.map(e=>e.id)].sort((e,t)=>t.length-e.length),r=new RegExp(`^\\s*(\\d+)\\s*(${o.join("|")})\\s*$`,"i"),i=String(e).match(r);if(i)return{num:i[1],unit:i[2].toLowerCase()};const a=String(e).match(/^\s*(\d+)\s*$/);return a?{num:a[1],unit:n}:{num:"",unit:n}})(c,u,b),[c,u,b]),x=(e,t)=>{d(""!==e?`${e}${t}`:"")};return t(Ar,{$width:y,$gap:6,children:[e(wu,{label:o,tooltip:r,required:s,badge:i}),t(Tr,{$gap:8,$alignItems:"center",children:[e(Bg,{children:e(Iu,{name:n,placeholder:a,disabled:l,hasError:f||!!h,inputMode:"numeric",value:$,onChange:e=>x(ui(e.target.value),v)})}),e(jg,{children:e(Dh,{name:`${n}-unit`,disabled:l,hasError:f||!!h,withSearch:!1,options:u,values:[v],setValues:e=>x($,e[0]||v)})})]}),e(Eu,{errorMessage:h,warnMessage:g,helpMessage:m})]})},Hg=o.div`
1677
- min-width: 500px;
1678
- `,Gg=o.div`
1679
- display: flex;
1680
- flex-direction: column;
1681
- align-items: center;
1682
- gap: 16px;
1683
- padding: 24px;
1684
- width: 100%;
1685
- `,Xg=o.div`
1686
- display: flex;
1687
- justify-content: center;
1688
- gap: 16px;
1689
- padding: 16px 24px;
1690
- width: 100%;
1691
- background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
1692
- `,Kg=({visual:n,title:o,description:r,isOpen:i,onClose:a,denyButton:s,approveButton:l,children:c,...d})=>e(Zh,{isOpen:i,onClose:a,...d,children:t(Hg,{children:[t(Gg,{children:[n&&e(n,{}),e(cn,{size:on.M,weight:500,color:rn.Primary,children:o}),e(Ar,{$alignItems:"center",$gap:4,children:r.split("\n").map(t=>e(cn,{size:on.XS,weight:400,color:rn.Secondary,children:t},t))}),c]}),(s||l)&&t(Xg,{children:[s&&e(jd,{"data-id":"deny",...s}),l&&e(jd,{"data-id":"approve",...l})]})]})});export{uc as $,Ci as A,jd as B,Wn as C,Ti as D,Tn as E,so as F,Qn as G,jn as H,Ii as I,qn as J,Fn as K,zd as L,Lu as M,Uu as N,rn as O,xn as P,pu as Q,vu as R,Jn as S,vn as T,Mu as U,Hu as V,sc as W,xc as X,wh as Y,nr as Z,Cn as _,Ei as a,wo as a$,mc as a0,lc as a1,Xo as a2,jo as a3,Qr as a4,qr as a5,Ar as a6,wu as a7,Eu as a8,Xh as a9,ya as aA,Ca as aB,ps as aC,Da as aD,ds as aE,Vi as aF,Ji as aG,wp as aH,ra as aI,xd as aJ,Ir as aK,Dh as aL,Cc as aM,wc as aN,Mr as aO,Ai as aP,Uo as aQ,oh as aR,nn as aS,io as aT,ro as aU,co as aV,Cr as aW,vp as aX,th as aY,No as aZ,si as a_,pn as aa,lh as ab,rh as ac,Uh as ad,Nh as ae,ki as af,Ni as ag,yn as ah,cg as ai,Di as aj,ag as ak,Iu as al,Nd as am,pp as an,ku as ao,no as ap,zg as aq,yo as ar,gi as as,Bn as at,od as au,Hn as av,Jl as aw,_o as ax,Kg as ay,us as az,cn as b,Ws as b$,Kr as b0,tn as b1,Pg as b2,Ko as b3,Gc as b4,Pc as b5,ho as b6,zn as b7,Yp as b8,po as b9,Wl as bA,Gl as bB,ba as bC,Pi as bD,Hl as bE,$s as bF,bs as bG,Ss as bH,xs as bI,fs as bJ,ms as bK,Ri as bL,is as bM,Oc as bN,ti as bO,op as bP,Vu as bQ,Ku as bR,ko as bS,ac as bT,Zh as bU,jl as bV,Cs as bW,Ms as bX,zs as bY,Us as bZ,Bs as b_,Vl as ba,Lo as bb,Rg as bc,Gp as bd,dp as be,oc as bf,Gr as bg,bu as bh,Ao as bi,Tc as bj,Ur as bk,_c as bl,Ql as bm,Yl as bn,ii as bo,Po as bp,Nu as bq,En as br,Og as bs,hg as bt,Vh as bu,Fo as bv,Oi as bw,Mi as bx,_i as by,Fi as bz,on as c,pl as c$,js as c0,Hs as c1,Sr as c2,Pl as c3,Fl as c4,Ml as c5,zl as c6,Ul as c7,Bl as c8,Ts as c9,al as cA,rl as cB,As as cC,Al as cD,Il as cE,kl as cF,Tl as cG,Dl as cH,Ol as cI,Rl as cJ,_l as cK,Ll as cL,Nl as cM,El as cN,Cl as cO,ml as cP,xl as cQ,Sl as cR,wl as cS,yl as cT,$l as cU,bl as cV,sl as cW,ll as cX,cl as cY,dl as cZ,ul as c_,Is as ca,ks as cb,Ns as cc,Os as cd,Ds as ce,_s as cf,Rs as cg,Ps as ch,Ls as ci,Fs as cj,ws as ck,Es as cl,Gs as cm,Xs as cn,Qs as co,Ys as cp,qs as cq,Vs as cr,Js as cs,Ks as ct,nl as cu,ol as cv,el as cw,tl as cx,Zs as cy,il as cz,fc as d,La as d$,hl as d0,gl as d1,fl as d2,vl as d3,wr as d4,pg as d5,ic as d6,Co as d7,ao as d8,Kl as d9,Ui as dA,ji as dB,hs as dC,rs as dD,ns as dE,os as dF,ts as dG,es as dH,ls as dI,cs as dJ,ss as dK,as as dL,Fc as dM,Wg as dN,kn as dO,Li as dP,ma as dQ,Ea as dR,ta as dS,wa as dT,ea as dU,Ia as dV,ga as dW,Sa as dX,Aa as dY,Fa as dZ,fa as d_,zc as da,Bu as db,pc as dc,Ho as dd,Go as de,Wo as df,Bo as dg,Sc as dh,Eo as di,So as dj,xo as dk,vc as dl,oo as dm,gp as dn,up as dp,rr as dq,Gn as dr,Tp as ds,Up as dt,kp as du,Er as dv,ia as dw,Wa as dx,Bi as dy,zi as dz,bo as e,$n as e$,ua as e0,qi as e1,pa as e2,da as e3,Qi as e4,ha as e5,Ya as e6,ca as e7,ja as e8,qa as e9,rp as eA,Pa as eB,Ka as eC,Va as eD,va as eE,mr as eF,hd as eG,_n as eH,mn as eI,On as eJ,Pn as eK,Sn as eL,wn as eM,Dn as eN,fn as eO,to as eP,bn as eQ,gn as eR,Mn as eS,An as eT,Vn as eU,Kn as eV,Xn as eW,Ln as eX,eo as eY,Zn as eZ,Yn as e_,Ja as ea,Qa as eb,Za as ec,Oa as ed,Zi as ee,na as ef,oa as eg,aa as eh,la as ei,sa as ej,Wi as ek,Hi as el,Yi as em,Ra as en,_a as eo,Ma as ep,Xl as eq,Gi as er,$a as es,za as et,Ha as eu,xa as ev,Ga as ew,Xa as ex,Ua as ey,Ta as ez,un as f,Zd as f$,hn as f0,Rn as f1,yr as f2,fr as f3,vr as f4,go as f5,mo as f6,di as f7,To as f8,Io as f9,bi as fA,Ba as fB,vs as fC,ys as fD,gs as fE,ka as fF,Na as fG,Ki as fH,Xi as fI,ql as fJ,Zl as fK,ec as fL,Rc as fM,bc as fN,$c as fO,Ac as fP,kc as fQ,Dc as fR,Lc as fS,Bc as fT,vd as fU,Id as fV,Sd as fW,$d as fX,Hd as fY,Ld as fZ,Kd as f_,Ro as fa,$o as fb,Mo as fc,uo as fd,Jo as fe,Yo as ff,qo as fg,Qo as fh,Zo as fi,er as fj,tr as fk,or as fl,Br as fm,Vr as fn,Jr as fo,Yr as fp,ni as fq,oi as fr,ai as fs,ui as ft,pi as fu,hi as fv,mi as fw,fi as fx,vo as fy,yi as fz,dn as g,Yd as g0,Vd as g1,Md as g2,Dr as g3,lu as g4,Nr as g5,du as g6,Or as g7,Rr as g8,_r as g9,Yc as ga,ad as gb,kr as gc,Kc as gd,Vc as ge,Jc as gf,lp as gg,cp as gh,Xu as gi,Ug as gj,Np as gk,_h as gl,Ph as gm,ig as gn,ug as go,xp as gp,dh as gq,nh as gr,sn as gs,nc as h,Zr as i,ei as j,li as k,In as l,ci as m,Un as n,Nn as o,lo as p,Hr as q,zo as r,Xr as s,$i as t,Mc as u,Do as v,Mh as w,zr as x,Tr as y,Ud as z};