@odigos/ui-kit 0.0.182 → 0.0.184

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 (79) hide show
  1. package/CHANGELOG.md +0 -94
  2. package/README.md +12 -16
  3. package/lib/chunks/ui-components-32cc0a29.js +2286 -0
  4. package/lib/chunks/vendor-0965fadc.js +1 -0
  5. package/lib/components/_v2/drop-data/index.d.ts +7 -9
  6. package/lib/components/_v2/input/index.d.ts +1 -3
  7. package/lib/components/_v2/loader/index.d.ts +1 -3
  8. package/lib/components/_v2/segment/index.d.ts +2 -1
  9. package/lib/components/_v2/table/styled.d.ts +18 -29
  10. package/lib/components/_v2/table/types.d.ts +0 -2
  11. package/lib/components/selection-button/index.d.ts +1 -1
  12. package/lib/components/styled.d.ts +50 -46
  13. package/lib/components/tab-list/index.d.ts +3 -4
  14. package/lib/components/text/index.d.ts +1 -1
  15. package/lib/components/v2.js +1 -1
  16. package/lib/components.js +1 -1
  17. package/lib/constants/sources/index.d.ts +1 -5
  18. package/lib/constants.js +1 -1
  19. package/lib/containers/_v2/central-connections/config-drawer/index.d.ts +8 -6
  20. package/lib/containers/_v2/central-connections/index.d.ts +6 -5
  21. package/lib/containers/_v2/central-connections/source-drawer/index.d.ts +1 -1
  22. package/lib/containers/_v2/central-connections/source-drawer/styled.d.ts +15 -15
  23. package/lib/containers/_v2/index.d.ts +0 -1
  24. package/lib/containers/_v2/pipeline-collectors/pods-info/index.d.ts +1 -1
  25. package/lib/containers/data-flow/column/frame.d.ts +1 -0
  26. package/lib/containers/data-flow/column/index.d.ts +1 -0
  27. package/lib/containers/data-flow-actions-menu/search/search-results/builder.d.ts +1 -1
  28. package/lib/containers/data-flow-actions-menu/styled.d.ts +5 -9
  29. package/lib/containers/instrumentation-rule-modal/index.d.ts +1 -0
  30. package/lib/containers/source-drawer/describe/index.d.ts +1 -1
  31. package/lib/containers/source-drawer/odigos-health/index.d.ts +2 -1
  32. package/lib/containers/v2.js +20 -27
  33. package/lib/containers.js +125 -123
  34. package/lib/contexts/odigos-context.d.ts +9 -11
  35. package/lib/contexts.js +1 -1
  36. package/lib/functions.js +1 -1
  37. package/lib/hooks/index.d.ts +1 -0
  38. package/lib/hooks/useActionFormData.d.ts +1 -1
  39. package/lib/hooks/useConnection.d.ts +3 -0
  40. package/lib/hooks.js +1 -1
  41. package/lib/icons/auth/index.d.ts +0 -1
  42. package/lib/icons/common/index.d.ts +0 -1
  43. package/lib/icons.js +1 -1
  44. package/lib/mock-data/sources/index.d.ts +19 -2
  45. package/lib/snippets/_v2/yaml-section-card/index.d.ts +0 -2
  46. package/lib/snippets/add-button/index.d.ts +1 -1
  47. package/lib/snippets/source-container/index.d.ts +1 -1
  48. package/lib/snippets/source-container/override-runtime.d.ts +1 -2
  49. package/lib/snippets.js +1 -1
  50. package/lib/store.js +1 -1
  51. package/lib/theme/animations/index.d.ts +22 -28
  52. package/lib/theme/index.d.ts +12 -3
  53. package/lib/theme.js +1 -1
  54. package/lib/types/common/index.d.ts +1 -1
  55. package/lib/types/enum/index.d.ts +1 -23
  56. package/lib/types/index.d.ts +0 -1
  57. package/lib/types/instrumentation-instances/index.d.ts +0 -1
  58. package/lib/types/pipeline-collectors/index.d.ts +0 -9
  59. package/lib/types/sources/index.d.ts +2 -4
  60. package/lib/types.js +1 -1
  61. package/lib/visuals/index.d.ts +2 -1
  62. package/lib/visuals/visual-star/index.d.ts +2 -0
  63. package/lib/visuals/visual-success/index.d.ts +2 -0
  64. package/lib/visuals.js +1 -1
  65. package/package.json +24 -25
  66. package/lib/chunks/ui-components-DPfN8yF_.js +0 -2296
  67. package/lib/chunks/vendor-ex1Kb_ap.js +0 -1
  68. package/lib/containers/_v2/system-drawer/describe/index.d.ts +0 -10
  69. package/lib/containers/_v2/system-drawer/diagnose/index.d.ts +0 -6
  70. package/lib/containers/_v2/system-drawer/index.d.ts +0 -11
  71. package/lib/containers/_v2/system-drawer/tokens/index.d.ts +0 -7
  72. package/lib/containers/_v2/system-drawer/tokens/token-actions.d.ts +0 -12
  73. package/lib/containers/_v2/system-drawer/tokens/token-expires-at.d.ts +0 -6
  74. package/lib/containers/_v2/system-drawer/tokens/token-input.d.ts +0 -8
  75. package/lib/icons/auth/okta-icon/index.d.ts +0 -2
  76. package/lib/icons/common/diagnose-icon/index.d.ts +0 -2
  77. package/lib/types/diagnose/index.d.ts +0 -6
  78. package/lib/visuals/visual-green-rings/index.d.ts +0 -7
  79. /package/lib/theme/{palettes → palletes}/index.d.ts +0 -0
@@ -1,2296 +0,0 @@
1
- import{SamplerIcon as e,PiiMaskingIcon as t,RenameAttributeIcon as i,DeleteAttributeIcon as n,AddClusterInfoIcon as o,K8sLogo as r,ImageErrorIcon as a,KafkaLogo as s,RedisLogo as l,PostgresLogo as c,NginxLogo as d,MysqlLogo as p,ElixirLogo as u,SwiftLogo as h,RustLogo as m,RubyLogo as g,PhpLogo as $,CPlusPlusLogo as f,CSharpLogo as x,DotnetLogo as b,PythonLogo as y,NodejsLogo as w,GoLogo as v,JavaLogo as k,AwsXrayLogo as C,VictoriaMetricsLogo as E,UptraceLogo as S,TraceloopLogo as A,TingyunLogo as D,TempoLogo as T,TelemetryHubLogo as z,SumoLogicLogo as F,SplunkLogo as O,SignozLogo as I,SeqLogo as N,AwsS3Logo as _,QuickwitLogo as B,GigapipeLogo as R,QrynLogo as L,PrometheusLogo as M,OpenTelemetryLogo as P,OracleLogo as j,OpsVerseLogo as U,OpenObserveLogo as W,OneUptimeLogo as V,OdigosLogo as H,ObserveLogo as q,NewRelicLogo as G,MiddlewareLogo as K,LumigoLogo as Y,LokiLogo as J,LogzioLogo as X,LightstepLogo as Z,Last9Logo as Q,KloudmateLogo as ee,JaegerLogo as te,InstanaLogo as ie,HyperDxLogo as ne,HoneycombLogo as oe,GroundcoverLogo as re,GreptimeLogo as ae,GrafanaLogo as se,GoogleCloudPlatformLogo as le,ElasticSearchLogo as ce,ElasticApmLogo as de,DynatraceLogo as pe,DatadogLogo as ue,Dash0Logo as he,CoralogixLogo as me,AwsCloudwatchLogo as ge,ClickhouseLogo as $e,ChronosphereLogo as fe,ChecklyLogo as xe,CauselyLogo as be,BonreeLogo as ye,BetterStackLogo as we,AzureMonitorLogo as ve,AzureBlobLogo as ke,AxiomLogo as Ce,AppDynamicsLogo as Ee,AlibabaCloudLogo as Se,AlaudaLogo as Ae,InstrumentationRuleIcon as De,ActionIcon as Te,DestinationIcon as ze,SourceIcon as Fe,NamespacesIcon as Oe,PayloadCollectionIcon as Ie,HeadersCollectionIcon as Ne,CustomInstrumentationIcon as _e,CodeAttributesIcon as Be,TracesIcon as Re,MetricsIcon as Le,LogsIcon as Me,VmLogo as Pe,QuestionCircleIcon as je,XSquareIcon as Ue,VSquareIcon as We,ExclamationTriangleIcon as Ve,ExclamationCircleIcon as He,ISquareIcon as qe,VIcon as Ge,CopyIcon as Ke,XIcon as Ye,MinusIcon as Je,ListIcon as Xe,CodeIcon as Ze,ExtendArrowIcon as Qe,PlusIcon as et,EditIcon as tt,NoDataIcon as it,EyeClosedIcon as nt,EyeOpenIcon as ot,SearchIcon as rt,TrashIcon as at,EditedIcon as st,SortArrowsIcon as lt,NotebookIcon as ct,ArrowIcon as dt,ChevronUpIcon as pt,ChevronDownIcon as ut,DotsVerticalIcon as ht,YamlIcon as mt,DotsHorizontalIcon as gt,DotIcon as $t,FilterIcon as ft}from"../icons.js";import{create as xt}from"zustand";import{Fragment as bt,useMemo as yt,useState as wt,useEffect as vt,useRef as kt,useCallback as Ct,forwardRef as Et,memo as St,useContext as At,createContext as Dt}from"react";import Tt from"javascript-time-ago";import{j as zt,p as Ft,c as Ot,s as It,u as Nt,e as _t}from"./vendor-ex1Kb_ap.js";import Bt,{css as Rt,useTheme as Lt,keyframes as Mt,ThemeProvider as Pt}from"styled-components";import{Handle as jt,Position as Ut,ReactFlow as Wt,Controls as Vt}from"@xyflow/react";import Ht,{createPortal as qt}from"react-dom";import{ErrorBoundary as Gt}from"react-error-boundary";import Kt from"lottie-react";import{Highlight as Yt,themes as Jt}from"prism-react-renderer";const Xt=e=>e.charAt(0).toUpperCase()+e.slice(1),Zt=e=>{const t=e=>e.filter(e=>"object"==typeof e&&null!==e?""!==e.key&&""!==e.value:""!==e),i=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>""!==e&&""!==t).map(([e,n])=>Array.isArray(n)?[e,t(n)]:"object"==typeof n&&null!==n?[e,i(n)]:[e,n]));return Object.entries(e).reduce((e,[n,o])=>{try{const r=JSON.parse(o);Array.isArray(r)?e[n]=JSON.stringify(t(r)):e[n]="object"==typeof r&&null!==r?JSON.stringify(i(r)):o}catch(r){"object"==typeof o&&null!==o?Array.isArray(o)?e[n]=JSON.stringify(t(o)):e[n]=JSON.stringify(i(o)):e[n]=o}return e},{})};var Qt;!function(e){e.SIGNALS="SIGNALS"}(Qt||(Qt={}));const ei=(e,t,i)=>{if(!e||!e.length)return!0;if(1===e.length)return"true"==e[0];const[n,o,r]=e;if(n===Qt.SIGNALS)switch(o){case"INCLUDES":return t?.includes(r);case"EXCLUDES":return!t?.includes(r);default:return!0}const a=i.find(e=>e.name===n);if(!a)return!0;switch(o){case"===":case"==":return a.value===r;case"!==":case"!=":return a.value!==r;case">":return Number(a.value)>Number(r);case"<":return Number(a.value)<Number(r);case">=":return Number(a.value)>=Number(r);case"<=":return Number(a.value)<=Number(r);default:return!0}},ti=e=>JSON.parse(JSON.stringify(e)),ii=(e,t)=>{let i=[...e];return t.monitors?.length&&(i=i.filter(e=>!!t.monitors?.find(t=>e.signals?.find(e=>e.toLowerCase()===t.id)))),i},ni=(e,t)=>{let i=[...e];return t.monitors?.length&&(i=i.filter(e=>!!t.monitors?.find(t=>e.exportedSignals[t.id]))),i},oi=(e,t)=>t?e.filter(e=>e.dataStreamNames.includes(t)||!e.dataStreamNames.length):[];var ri,ai,si,li,ci,di,pi,ui,hi,mi,gi,$i,fi,xi,bi,yi,wi,vi,ki,Ci,Ei,Si,Ai,Di,Ti,zi,Fi,Oi,Ii,Ni,_i,Bi,Ri,Li,Mi,Pi,ji,Ui,Wi,Vi,Hi;!function(e){e.Attributes="attributes",e.Samplers="samplers"}(ri||(ri={})),function(e){e.K8sAttributes="K8sAttributesResolver",e.AddClusterInfo="AddClusterInfo",e.DeleteAttributes="DeleteAttribute",e.RenameAttributes="RenameAttribute",e.PiiMasking="PiiMasking",e.ErrorSampler="ErrorSampler",e.ProbabilisticSampler="ProbabilisticSampler",e.LatencySampler="LatencySampler",e.ServiceNameSampler="ServiceNameSampler",e.SpanAttributeSampler="SpanAttributeSampler"}(ai||(ai={})),function(e){e.CollectContainerAttributes="collectContainerAttributes",e.CollectReplicaSetAttributes="collectReplicaSetAttributes",e.CollectWorkloadId="collectWorkloadId",e.CollectClusterId="collectClusterId",e.LabelsAttributes="labelsAttributes",e.AnnotationsAttributes="annotationsAttributes",e.ClusterAttributes="clusterAttributes",e.OverwriteExistingValues="overwriteExistingValues",e.AttributeNamesToDelete="attributeNamesToDelete",e.Renames="renames",e.PiiCategories="piiCategories",e.FallbackSamplingRatio="fallbackSamplingRatio",e.SamplingPercentage="samplingPercentage",e.EndpointsFilters="endpointsFilters",e.ServicesNameFilters="servicesNameFilters",e.AttributeFilters="attributeFilters"}(si||(si={})),function(e){e.Pod="pod",e.Namespace="namespace",e.Node="node"}(li||(li={})),function(e){e.EXISTS="exists",e.EQUALS="equals",e.NOT_EQUALS="not_equals",e.CONTAINS="contains",e.NOT_CONTAINS="not_contains",e.REGEX="regex"}(ci||(ci={})),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"}(di||(di={})),function(e){e.EXISTS="exists",e.EQUALS="equals"}(pi||(pi={})),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"}(ui||(ui={})),function(e){e.Horizontal="horizontal",e.Vertical="vertical"}(hi||(hi={})),function(e){e.Ascending="ascending",e.Descending="descending"}(mi||(mi={})),function(e){e.Community="community",e.Cloud="cloud",e.Onprem="onprem"}(gi||(gi={})),function(e){e.K8s="k8s",e.Vm="vm"}($i||($i={})),function(e){e.Cli="odigos-cli",e.Helm="helm",e.Operator="odigos-operator"}(fi||(fi={})),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"}(xi||(xi={})),function(e){e.Create="Create",e.Read="Read",e.Update="Update",e.Delete="Delete"}(bi||(bi={})),function(e){e.Namespace="Namespace",e.Source="Source",e.Destination="Destination",e.Action="Action",e.InstrumentationRule="InstrumentationRule"}(yi||(yi={})),function(e){e.DataStream="DataStream"}(wi||(wi={})),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"}(vi||(vi={})),function(e){e.Text="text",e.Password="password",e.Number="number"}(ki||(ki={})),function(e){e.Warning="warning",e.Error="error",e.Success="success",e.Info="info",e.Default="default"}(Ci||(Ci={})),function(e){e.INSTRUMENTED="Instrumented",e.INSTRUMENTING="Instrumenting",e.UNINSTRUMENTED="Uninstrumented",e.NOT_INSTRUMENTED="Not Instrumented"}(Ei||(Ei={})),function(e){e.Loading="loading",e.Disabled="disabled"}(Si||(Si={})),function(e){e.Disabled="disabled",e.Unknown="unknown"}(Ai||(Ai={})),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"}(Di||(Di={})),function(e){e.Header="header",e.Add="add",e.Base="base",e.Edged="edged",e.Frame="frame",e.Scroll="scroll",e.Skeleton="skeleton",e.MapItem="map-item",e.NoData="no-data",e.OdiLogo="odilogo"}(Ti||(Ti={})),function(e){e.Labeled="labeled"}(zi||(zi={})),function(e){e.AddRule="addRule",e.AddSource="addSource",e.AddAction="addAction",e.AddDestination="addDestination"}(Fi||(Fi={})),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"}(Oi||(Oi={})),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"}(Ii||(Ii={})),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.DotNetLegacy="dotnet-legacy",e.DotNetEnterprise="dotnet-enterprise",e.RubyEnterprise="ruby-enterprise",e.PhpEnterprise="php-enterprise",e.CPlusPlusEnterprise="cplusplus-enterprise",e.MySqlEnterprise="mysql-enterprise"}(Ni||(Ni={})),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"}(_i||(_i={})),function(e){e.CodeAttributes="CodeAttributes",e.HeadersCollection="HeadersCollection",e.PayloadCollection="PayloadCollection",e.CustomInstrumentation="CustomInstrumentation",e.UnknownType="UnknownType"}(Bi||(Bi={})),function(e){e.Column="column",e.FilePath="filePath",e.Function="function",e.LineNumber="lineNumber",e.Namespace="namespace",e.StackTrace="stacktrace"}(Ri||(Ri={})),function(e){e.HeaderKeys="headerKeys"}(Li||(Li={})),function(e){e.Java="java",e.Golang="golang"}(Mi||(Mi={}));class qi{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 Gi{packageName;functionName;receiverName;receiverMethodName;constructor(e,t,i,n){this.packageName=e,this.functionName=t||"",this.receiverName=i||"",this.receiverMethodName=n||""}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"}(Pi||(Pi={})),function(e){e.Healthy="Healthy",e.Updating="Updating",e.Degraded="Degraded",e.Failed="Failed",e.Down="Down",e.Unknown="Unknown"}(ji||(ji={})),function(e){e.Pending="Pending",e.Running="Running",e.Succeeded="Succeeded",e.Failed="Failed",e.Unknown="Unknown"}(Ui||(Ui={})),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"}(Wi||(Wi={})),function(e){e.Running="Running",e.Waiting="Waiting",e.Terminated="Terminated"}(Vi||(Vi={})),function(e){e.Logs="logs",e.Metrics="metrics",e.Traces="traces"}(Hi||(Hi={}));const Ki=(e,t)=>{let i=[...e];return t.namespaces?.length&&(i=i.filter(({namespace:e})=>!!t.namespaces?.find(({id:t})=>t===e))),t.kinds?.length&&(i=i.filter(({kind:e})=>!!t.kinds?.find(({id:t})=>t===e))),t.languages?.length&&(i=i.filter(({containers:e})=>!!t.languages?.find(({id:t})=>!!e?.find(({language:e})=>t===e)))),t.conditions?.length&&(i=i.filter(({conditions:e})=>!!t.conditions?.find(({id:t})=>!!e?.find(({type:e,reason:i})=>t===`${e}#${i}`)))),t.podsAgentInjectionStatus?.length&&(i=i.filter(({podsAgentInjectionStatus:e})=>!!t.podsAgentInjectionStatus?.find(({id:t})=>t===e?.reasonEnum||t===e?.message))),t.onlyErrors&&(i=i.filter(e=>!!e.conditions?.find(e=>e.status===Ci.Error))),t.errors?.length&&(i=i.filter(e=>!!t.errors?.find(t=>!!e.conditions?.find(e=>e.message===t.id)))),i},Yi="default",Ji={SELECTED_DATA_STREAM:"SELECTED_DATA_STREAM",SELECTED_DATA_STREAM_WITH_PROXY:e=>`SELECTED_DATA_STREAM_${e}`,OVERVIEW_FILTERS:"OVERVIEW_FILTERS",DARK_MODE:"DARK_MODE"},Xi={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)'},Zi={NAMESPACE:"Namespace",NAME:"Name",KIND:"Kind",CONNECTION:"Connection",CONNECTIONS:"Connections",DATA_STREAM:"Data Stream",DATA_STREAMS:"Data Streams",STREAM_NAME:"Data Stream Name",NAME_YOUR_STREAM:"Name your Data Stream",NAME_YOUR_STREAM_PLACEHOLDER:"e.g. Highest priority",STREAM_DESCRIPTION:"Provide a clear and descriptive name for your pipeline to ensure its purpose is easily understood by you and your team.",STREAM_CONFIRM:"Confirm your new Data Stream",DATA_STREAM_EXISTS_WARNING:(e,t)=>`A Data Stream with this name already exists, you can still rename the current "${e}", but it will merge into the existing "${t}".`,ACTION:"Action",ACTIONS:"Actions",ADD_ACTION:"Add Action",ACTION_DETAILS:"Action Details",INSTRUMENTATION_RULE:"Instrumentation Rule",INSTRUMENTATION_RULES:"Instrumentation Rules",ADD_INSTRUMENTATION_RULE:"Add Instrumentation Rule",INSTRUMENTATION_RULE_DETAILS:"Instrumentation Rule Details",DESTINATION:"Destination",DESTINATIONS:"Destinations",ADD_DESTINATION:"Add Destination",ADD_DESTINATIONS:"Add Destinations",ADD_DESTINATION_DESCRIPTION:"Add a destination to send your telemetry data to. You can add multiple destinations.",DESTINATION_DETAILS:"Destination Details",SELECTED_DESTINATIONS:"Selected Destinations",SOURCE:"Source",SOURCES:"Sources",ADD_SOURCE:"Add Source",SOURCE_DETAILS:"Source Details",SELECT_SOURCES:"Select Sources",SELECTED_SOURCES:"Selected Sources",SELECT_SOURCES_DESCRIPTION:"Choose which sources to monitor in your pipeline.",NO_SOURCES:"No sources",NO_SOURCES_GO_BACK:"No sources selected. Please go back to select sources.",PLEASE_ADD_SOURCE:"Please add a source",NO_SOURCES_NAMESPACE:"No sources available in this namespace",TRY_SEARCH_OR_OTHER_NAMESPACE:"Try searching again or select another namespace.",PLEASE_MAKE_SURE_UNIGNORED_NAMESPACES:"Please make sure your cluster has unignored namespaces",INSTALLATION:"Installation",SUMMARY:"Summary",TYPE:"Type",NOTES:"Notes",STATUS:"Status",READONLY:"Readonly",LANGUAGE:"Language",VERSION:"Version",RUNTIME_VERSION:"Runtime Version",VERSION_PLACEHOLDER:"1.0.0",MONITORS:"Monitors",SIGNALS_FOR_PROCESSING:"Signals for Processing",MANAGED_BY_PROFILE:"Managed by Profile",TIER:"Tier",ENTERPRISE:"Enterprise",ENTERPRISE_TIER:"Enterprise Tier",COMMUNITY:"Community",COMMUNITY_TIER:"Community Tier",API_TOKEN:"API Token",API_TOKENS:"API Tokens",DESCRIBE_ODIGOS:"Describe Odigos",DESCRIBE_SOURCE:"Describe Source",DETECTED_CONTAINERS:"Detected Containers",DETECTED_CONTAINERS_DESCRIPTION:"The system automatically instruments the containers it detects with a supported programming language.",DETECTED_PROCESSES:"Detected Processes",DETECTED_PROCESSES_DESCRIPTION:"The system automatically instruments the processes it detects with a supported programming language.",CONTAINER_NAME:"Container Name",FILTERED_COUNT_TOOLTIP:"Represents filtered amount, out of total amount",SEARCH_NAMESPACES:"Search Namespaces",SEARCH_SOURCES:"Search Sources",SELECT_ALL:"Select All",ONLY_SELECTED:"Only selected",ONLY_RUNNING_INSTANCES:"Only running instances",TO_COLLECT_OTEL_DATA:"To collect OpenTelemetry data",TO_MONITOR_OTEL_DATA:"To monitor OpenTelemetry data",TO_MODIFY_OTEL_DATA:"To modify OpenTelemetry data",QUICK_BACK_TO_SUMMARY:"When you finish editing you can quickly go back to the summary.",GO_TO_SUMMARY:"Go to summary",FUTURE_APPS_TITLE:"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_WARNING:"This is an advanced configuration. If the selected programming language is incorrect, data collection may be incomplete or may not occur at all.",ACTIVE:"Active",INACTIVE:"Inactive",ENABLED:"Enabled",DISABLED:"Disabled",NO_TRACES_FOUND:"No traces found",ARE_SERVICES_INSTRUMENTED_AND_PRODUCING_TRAFFIC:"Are your services instrumented & producing traffic?",JAVA_CUSTOM_PROBES:"Java Custom Probes",GOLANG_CUSTOM_PROBES:"Golang Custom Probes"},Qi={ADD:"Add",ADD_NEW:"Add New",NEW:"New",SELECT:"Select",CREATE:"Create",UPDATE:"Update",EDIT:"Edit",DELETE:"Delete",CANCEL:"Cancel",DONE:"Done",SAVE:"Save",BACK:"Back",NEXT:"Next",TEST:"Test",TEST_CONNECTION:"Test Connection",INSTRUMENT:"Instrument",UNINSTRUMENT:"Uninstrument"},en=(e,t)=>t?e.filter(e=>e.dataStreamNames.includes(t)||t===Yi&&!e.dataStreamNames.length):[],tn=(e,t="",i={})=>{for(const n in e)if(e.hasOwnProperty(n)){const o=e[n],r=t?`${t}.${n}`:n;null===o||"object"!=typeof o||Array.isArray(o)?Array.isArray(o)?o.forEach((e,t)=>{const n=`${r}[${t}]`;null!==e&&"object"==typeof e?tn(e,n,i):i[n]=e}):i[r]=o:tn(o,r,i)}return i},nn=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]}`},on=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`}},rn=()=>{const e=crypto.getRandomValues(new Uint8Array(16));let t=0;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,i=>{const n=e[t%16];return t++,("1"===i?n:"0"===i?63&n|128:15&n|64).toString(16)})},an=s=>{const l=s?.toLowerCase(),c=l?.includes(ri.Samplers),d=l===ri.Attributes;return c?e:d?t:{[ai.K8sAttributes]:r,[ai.AddClusterInfo]:o,[ai.DeleteAttributes]:n,[ai.PiiMasking]:t,[ai.RenameAttributes]:i,[ai.ErrorSampler]:e,[ai.ProbabilisticSampler]:e,[ai.LatencySampler]:e,[ai.ServiceNameSampler]:e,[ai.SpanAttributeSampler]:e}[s]||a},sn=e=>{const t=e?.filter(({status:e})=>e===Ci.Error),i=e?.filter(({status:e})=>e===Ci.Warning),n=e?.filter(({status:e})=>e===Si.Disabled),o=e?.filter(({status:e})=>e===Si.Loading),r=t.length>0,a=i.length>0,s=n.length>0;return{errors:t,hasErrors:r,warnings:i,hasWarnings:a,disableds:n,hasDisableds:s,loadings:o,hasLoadings:o.length>0,priorotizedStatus:r?Ci.Error:a?Ci.Warning:s?Ci.Info:void 0}},ln=e=>{const t=e?.reduce((e,t)=>t.instrumented?e+1:e,0);return`${t}/${e?.length||0} instrumented`},cn=e=>({[xi.Java]:k,[xi.Go]:v,[xi.JavaScript]:w,[xi.Python]:y,[xi.DotNet]:b,[xi.CSharp]:x,[xi.CPlusPlus]:f,[xi.Php]:$,[xi.Ruby]:g,[xi.Rust]:m,[xi.Swift]:h,[xi.Elixir]:u,[xi.MySql]:p,[xi.Nginx]:d,[xi.Postgres]:c,[xi.Redis]:l,[xi.Kafka]:s,[xi.Ignored]:a,[xi.Unknown]:a,[xi.Processing]:a,[xi.NoContainers]:a,[xi.NoRunningPods]:a}[e]||a),dn=e=>e?.map(({language:e})=>cn(e))||[],pn=(e,t)=>{const i={[Oi.Alauda]:Ae,[Oi.AlibabaCloud]:Se,[Oi.AppDynamics]:Ee,[Oi.Axiom]:Ce,[Oi.AzureBlob]:ke,[Oi.AzureMonitor]:ve,[Oi.BetterStack]:we,[Oi.Bonree]:ye,[Oi.Causely]:be,[Oi.Checkly]:xe,[Oi.Chronosphere]:fe,[Oi.ClickHouse]:$e,[Oi.CloudWatch]:ge,[Oi.Coralogix]:me,[Oi.Dash0]:he,[Oi.Datadog]:ue,[Oi.Dynamic]:P,[Oi.Dynatrace]:pe,[Oi.ElasticApm]:de,[Oi.ElasticSearch]:ce,[Oi.GoogleCloud]:le,[Oi.GoogleCloudOTLP]:le,[Oi.GrafanaCloudLoki]:se,[Oi.GrafanaCloudPrometheus]:se,[Oi.GrafanaCloudTempo]:se,[Oi.Greptime]:ae,[Oi.Groundcover]:re,[Oi.Honeycomb]:oe,[Oi.HyperDX]:ne,[Oi.Instana]:ie,[Oi.Jaeger]:te,[Oi.Kafka]:s,[Oi.Kloudmate]:ee,[Oi.Last9]:Q,[Oi.Lightstep]:Z,[Oi.LogzIo]:X,[Oi.Loki]:J,[Oi.Lumigo]:Y,[Oi.Middleware]:K,[Oi.NewRelic]:G,[Oi.Observe]:q,[Oi.Odigos]:H,[Oi.OneUptime]:V,[Oi.OpenObserve]:W,[Oi.Opsverse]:U,[Oi.Oracle]:j,[Oi.OTLP]:P,[Oi.OTLPHttp]:P,[Oi.Prometheus]:M,[Oi.Qryn]:L,[Oi.QrynOss]:R,[Oi.Quickwit]:B,[Oi.S3]:_,[Oi.Seq]:N,[Oi.Signalfx]:O,[Oi.Signoz]:I,[Oi.Splunk]:O,[Oi.SplunkSapm]:O,[Oi.SplunkOtlp]:O,[Oi.SumoLogic]:F,[Oi.TelemetryHub]:z,[Oi.Tempo]:T,[Oi.Tingyun]:D,[Oi.Traceloop]:A,[Oi.Uptrace]:S,[Oi.VictoriaMetrics]:E,[Oi.VictoriaMetricsCloud]:E,[Oi.XRay]:C}[e];return i&&!t?{icon:i}:{iconSrc:`https://d15jtxgb40qetw.cloudfront.net/${e}.svg`}},un=e=>({[yi.Namespace]:Oe,[yi.Source]:Fe,[yi.Destination]:ze,[yi.Action]:Te,[yi.InstrumentationRule]:De}[e]),hn=e=>"ruleId"in e&&e.ruleId?e.ruleId:"id"in e&&e.id?e.id:"namespace"in e&&e.namespace&&"kind"in e&&e.kind&&"name"in e&&e.name?{namespace:e.namespace,name:e.name,kind:e.kind}:"name"in e&&e.name?e.name:void 0,mn=(e,t,i)=>{const{extended:n,prioritizeDisplayName:o}=i||{};let r="",a="";switch(t){case yi.InstrumentationRule:const t=e;r=t.type,a=t.ruleName;break;case yi.Source:const i=e;r=i.name,a=i.otelServiceName;break;case yi.Action:const n=e;r=n.type,a=n.name;break;case yi.Destination:const o=e;r=o.destinationType.displayName,a=o.name;break;case yi.Namespace:const s=e;r=s.name,a=s.name}return n?r+(a&&a!==r?` (${a})`:""):o&&a||r},gn=(e,t)=>{if(t===yi.Source){const t={namespace:"",name:"",kind:""};return e.split("&").forEach(e=>{const[i,n]=e.split("=");t[i]=n}),t}return e},$n=e=>({[Bi.CodeAttributes]:Be,[Bi.CustomInstrumentation]:_e,[Bi.HeadersCollection]:Ne,[Bi.PayloadCollection]:Ie,[Bi.UnknownType]:a}[e]||a),fn=e=>{const{numberOfInstances:t,containers:i}=e;if(!i)return t&&t>0?xi.Processing:xi.NoRunningPods;const n=i?.filter(e=>e.language!==xi.Ignored);if(!n.length)return xi.NoContainers;const o=n.find(e=>e.language!==xi.Unknown);return o?o.language:xi.Unknown},xn=(e,t,i)=>(t===yi.Source?e?.sources.find(e=>e.kind===i.kind&&e.name===i.name&&e.namespace===i.namespace):e?.destinations.find(e=>e.id===i))||{throughput:0},bn=e=>({[Hi.Logs]:Me,[Hi.Metrics]:Le,[Hi.Traces]:Re}[e]),yn=e=>e?{[$i.K8s]:r,[$i.Vm]:Pe}[e]:H,wn=e=>e?{[$i.K8s]:"Kubernetes Cluster",[$i.Vm]:"Virtual Machine"}[e]:"Unknown",vn=(e,t,i)=>{const n=e[t];return n?n.flatMap(e=>{const n=e[i],o=[];return void 0!==n&&(Array.isArray(n)?o.push(...n):o.push(n)),o.push(...vn(e,t,i)),o}):[]},kn=(e,t)=>{if(t===yi.Source){let t="";return Object.entries(e).forEach(([e,i])=>{t+=`${e}=${i}&`}),t.slice(0,-1),t}return e},Cn=(e,t,i)=>{switch(t){case Ci.Default:return e.v2.colors.purple[i];case Ci.Info:return e.v2.colors.blue[i];case Ci.Error:return e.v2.colors.red[i];case Ci.Warning:return e.v2.colors.yellow[i];case Ci.Success:return e.v2.colors.green[i];case Ai.Disabled:case Ai.Unknown:return e.v2.colors.silver[i];default:return e.v2.colors.white[500]}},En=e=>{switch(e){case ji.Updating:case Ui.Pending:case Wi.ContainerCreating:case Vi.Waiting:return Ci.Info;case ji.Healthy:case Ui.Succeeded:case Ui.Running:case Wi.Running:case Vi.Running:return Ci.Success;case ji.Degraded:return Ci.Warning;case ji.Failed:case Ui.Failed:case Wi.Error:case Wi.CrashLoopBackOff:case Wi.CreateContainerError:case Wi.CreateContainerConfigError:case Wi.ErrImagePull:case Wi.ErrImageNeverPull:case Wi.ImagePullBackOff:case Wi.InvalidImageName:case Wi.RegistryUnavailable:case Wi.NetworkNotReady:case Wi.OOMKilled:case Wi.ContainerCannotRun:case Vi.Terminated:case Wi.DeadlineExceeded:case Wi.StartError:return Ci.Error;case ji.Down:case Wi.Completed:return Ai.Disabled;case ji.Unknown:case Ui.Unknown:default:return Ai.Unknown}},Sn=(e,t)=>({[Ci.Default]:i=>H({fill:Cn(t,e,"300"),...i}),[Ci.Info]:i=>qe({fill:Cn(t,e,"400"),...i}),[Ci.Error]:i=>He({fill:Cn(t,e,"500"),...i}),[Ci.Warning]:i=>Ve({fill:Cn(t,e,"500"),...i}),[Ci.Success]:i=>We({fill:Cn(t,e,"500"),...i}),[Ai.Disabled]:i=>Ue({fill:Cn(t,e,"400"),...i}),[Ai.Unknown]:i=>je({fill:Cn(t,e,"300"),...i})}[e]),An=e=>{switch(e){case _i.Success:return Ci.Success;case _i.Error:case _i.Failure:return Ci.Error;case _i.Notice:return Ci.Warning;case _i.Unsupported:case _i.Unknown:return Ci.Info;case _i.Irrelevant:case _i.Disabled:return Si.Disabled;case _i.Waiting:return Si.Loading;case _i.Pending:default:return Ci.Default}},Dn=(e,t)=>{const i=t.find(([t,i])=>e>=t&&(null===i||e<=i));return i?.[2]||null},Tn=({namespace:e,name:t,kind:i})=>({namespace:e,name:t,kind:i});function zn(e,t){if(!e)return t;if("object"==typeof e)return e;try{return JSON.parse(e)}catch(e){return t}}const Fn=(e,t)=>{const i=[],n=JSON.parse(JSON.stringify(e));for(const e of n){const n=zn(t.fields,{}),o=e.items.findIndex(e=>e.type===t.destinationType.type);-1!==o&&i.push(...e.items[o].fields.map(e=>({...e,initialValue:n[e.name]})))}return i},On=(e,t)=>{const i=e=>e?.some(({healthy:e})=>e.status!==Ci.Success);return e?.length?e.some(({instrumentationInstances:e})=>i(e)):i(t)??!1},In=e=>Array.isArray(e)?!e?.length:"object"==typeof e?!Object.keys(e||{}).length:[void 0,null,""].includes(e),Nn=e=>!!e&&(!(e.length>63)&&/^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$/.test(e)),_n=(e,t=0)=>{const i=(new Date).getTime();return new Date(e).getTime()-i<=t},Bn=e=>{const t=String(e).trim().toLowerCase();return["true","false","1","0"].includes(t)},Rn=(e,t=0)=>(new Date).getTime()-new Date(e).getTime()>=t,Ln=/^(\d+\.)?(\d+\.)?(\*|\d+)$/,Mn=e=>Ln.test(e),Pn=e=>e?e.replace(/([a-z0-9])([A-Z])/g,"$1 $2"):"",jn=e=>e?.map(({status:e,type:t,reason:i,message:n,lastTransitionTime:o})=>({status:e,type:Pn(t),reason:i?Pn(i):"",message:n,lastTransitionTime:o}))||[],Un=(e,t)=>{const i=zn(e.fields,{});return t.length?t.map(e=>({key:e.name,name:e.displayName||e.name,value:i[e.name]??null})).filter(e=>null!==e.value):Object.entries(i).map(([e,t])=>({key:e,name:e,value:t}))},Wn=e=>e?Object.keys(e).filter(t=>e[t]):[],Vn=e=>e.replace(/[^\d]/g,""),Hn=e=>{const t=String(e).trim().toLowerCase();return"true"===t||"1"===t},qn=e=>{let t="";try{const i=JSON.parse(e);t=Array.isArray(i)?i.map(e=>"object"==typeof e&&null!==e?`${e.key}: ${e.value}`:e).join(", "):"object"==typeof i&&null!==i?Object.entries(i).map(([e,t])=>`${e}: ${t}`).join(", "):e}catch(i){t=e}return t},Gn=e=>{if("object"!=typeof e)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach(i=>{const n=e[i];if(Array.isArray(n)){const e=n.filter(e=>null!=e&&""!==e);e.length>0&&(t[i]=e.map(e=>Gn(e)))}else if("object"==typeof n&&null!==n){const e=Gn(n);Object.keys(e).length>0&&(t[i]=e)}else[void 0,null,""].includes(n)||(t[i]=n)}),t},Kn=(e,t=2)=>JSON.stringify(e||{},null,t),Yn=async(e=1e3)=>new Promise(t=>setTimeout(t,e)),Jn=e=>Object.entries(e).reduce((e,[t,i])=>(e[t]="string"==typeof i?i:JSON.stringify(i),e),{}),Xn=e=>{let t=e.toString().replace("v","").split("-")[0];t=t.match(/[\d.]+/)?.[0]||"";const i=t.split(".");return 1e4*parseInt(i[0]||"0",10)+parseInt(i[1]||"0",10)};var Zn,Qn;!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"}(Zn||(Zn={})),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"}(Qn||(Qn={}));const eo=Bt.p`
2
- margin: 0;
3
- color: ${({$color:e,theme:t})=>e||t.v2.colors.white[500]};
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:i})=>t||`${e.v2.text.size[i]+2}px`};
10
-
11
- ${({$nowrap:e})=>e&&Rt`
12
- text-wrap: nowrap;
13
- white-space: nowrap;
14
- overflow: hidden;
15
- text-overflow: ellipsis;
16
- `}
17
-
18
- ${({$underline:e})=>e&&Rt`
19
- text-decoration: underline;
20
- `}
21
- `,to=({children:e,variant:t=Zn.P,color:i,size:n=Qn.S,weight:o=400,align:r="left",lineHeight:a,transform:s,nowrap:l,underline:c,...d})=>{const p=e?.toString().split("\n")||[];return zt.jsx(eo,{as:t,$color:i,$size:n,$weight:o,$align:r,$lineHeight:a,$transform:s,$nowrap:l,$underline:c,...d,children:p.map((e,t)=>zt.jsxs(bt,{children:[e,t!==p.length-1&&zt.jsx("br",{})]},`typography-${t}-${e}`))})},io=Bt.div`
22
- display: flex;
23
- align-items: center;
24
- justify-content: center;
25
- gap: 4px;
26
- min-width: ${({$minWidth:e})=>e};
27
- width: fit-content;
28
- padding: 4px 8px;
29
- border-radius: 100px;
30
- background-color: ${({$backgroundColor:e})=>e};
31
- `,no=({label:e,leftIcon:t,rightIcon:i,status:n=Ai.Unknown,useSecondaryTone:o=!1,invertColors:r=!1,textSize:a,textColor:s,backgroundColor:l,minWidth:c="unset"})=>{const d=Lt(),p=n?[Ai.Disabled].includes(n)?Cn(d,n,r?"400":"700"):[Ai.Unknown].includes(n)?Cn(d,n,"600"):Cn(d,n,r?o?"400":"300":o?"700":"500"):d.v2.colors.grey[200],u=s||(r&&![Ai.Unknown].includes(n)?p:[Ai.Disabled].includes(n)?d.v2.colors.grey[400]:[Ci.Error,Ci.Warning,Ci.Success].includes(n)?d.v2.colors.black[500]:d.v2.colors.white[500]),h=l||(r&&![Ai.Unknown].includes(n)?[Ai.Disabled].includes(n)?d.v2.colors.grey[700]:d.v2.colors.silver[600]:p);return zt.jsxs(io,{$backgroundColor:h,$minWidth:c,children:[t&&zt.jsx(t,{fill:u,size:14}),zt.jsx(to,{color:u,size:a||Qn.XXS,nowrap:!0,children:e}),i&&zt.jsx(i,{fill:u,size:14})]})},oo=Bt.div`
32
- color: ${({$color:e,theme:t})=>e||t.text.secondary};
33
- font-size: ${({$size:e})=>void 0!==e?e:16}px;
34
- font-weight: ${({$weight:e})=>void 0!==e?e:300};
35
- text-align: ${({$align:e})=>e||"left"};
36
- opacity: ${({$opacity:e})=>void 0!==e?e:1};
37
- text-decoration: ${({$decoration:e})=>e||"none"};
38
- text-transform: ${({$transform:e,$family:t})=>e||("secondary"===t?"uppercase":"none")};
39
- font-family: ${({theme:e,$family:t="primary"})=>e.font_family[t]};
40
- white-space: ${({$nowrap:e})=>e?"nowrap":"unset"};
41
- text-wrap: ${({$nowrap:e})=>e?"nowrap":"unset"};
42
- `,ro=e=>{const t=e.match(/<a[^>]*href="([^"]*)"[^>]*>(.*?)<\/a>/g);return t?.map(e=>{const[t,i,n]=e.split('"');return{original:e,href:i,label:n.replace("</a>","").replace(">","")}})},ao=e=>{const t=e.match(/<strong[^>]*>(.*?)<\/strong>/g);return t?.map(e=>{const t=e.replace(/<strong[^>]*>/,"").replace(/<\/strong>/,"");return{original:e,label:t}})},so=(e,t)=>{const i=ro(e);i?.forEach((t,i)=>{e=e.replace(t.original,`LINK-${i}###`)});const n=ao(e);return n?.forEach((t,i)=>{e=e.replace(t.original,`STRONG-${i}###`)}),e.split(" ").map(e=>{if(e.includes("LINK-")){const[n,o]=e.split("###"),r=i?.[parseInt(n.replace("LINK-",""))];return zt.jsxs(bt,{children:[zt.jsx("a",{href:r?.href,target:"_blank",rel:"noreferrer",style:{color:t.colors.majestic_blue_soft},children:r?.label}),o?`${o} `:" "]},e)}if(e.includes("STRONG-")){const[t,i]=e.split("###"),o=n?.[parseInt(t.replace("STRONG-",""))];return zt.jsxs(bt,{children:[zt.jsx("strong",{style:{fontWeight:600},children:o?.label}),i?`${i} `:" "]},e)}return e+" "})},lo=({children:e,color:t,size:i,weight:n,align:o,family:r,opacity:a,decoration:s,transform:l,nowrap:c,...d})=>{const p=Lt(),u=yt(()=>(e?["string","number"].includes(typeof e)?e.toString():Array.isArray(e)?e.map(e=>"object"==typeof e&&Object.hasOwn(e,"props")?e.props.children:e).filter(e=>e&&["string","number"].includes(typeof e)).join(" "):"":"").split("\n"),[e]);return zt.jsx(oo,{$color:t,$size:i,$weight:n,$align:o,$family:r,$opacity:a,$decoration:s,$transform:l,$nowrap:c,...d,children:u.length?u.map((e,t)=>zt.jsxs(bt,{children:[so(e,p),t!==u.length-1?zt.jsx("br",{}):null]},`text-${t}-${e}`)):e})},co=Bt.div`
43
- padding: 4px 0 0 0;
44
- `,po=Bt(lo)`
45
- font-size: 12px;
46
- color: ${({theme:e})=>e.text.error};
47
- `,uo=({children:e})=>zt.jsx(co,{children:zt.jsx(po,{children:e})}),ho=Bt.div`
48
- position: relative;
49
- width: 100%;
50
- `,mo=Bt.div`
51
- width: calc(100% - 16px);
52
- display: flex;
53
- align-items: center;
54
- height: 36px;
55
- gap: 8px;
56
- padding-left: 12px;
57
- transition: border-color 0.3s;
58
- border-radius: 32px;
59
- border: 1px solid ${({theme:e,$hasError:t})=>t?e.text.error:e.colors.border};
60
-
61
- &:hover {
62
- border-color: ${({theme:e,$hasError:t})=>t?e.text.error_secondary:e.colors.secondary};
63
- }
64
- &:focus-within {
65
- border-color: ${({theme:e,$hasError:t})=>t?e.text.error_secondary:e.colors.secondary};
66
- }
67
- `,go=Bt.input`
68
- flex: 1;
69
- border: none;
70
- outline: none;
71
- background: none;
72
- color: ${({theme:e})=>e.text.secondary};
73
- font-size: 14px;
74
- font-family: ${({theme:e})=>e.font_family.primary};
75
- font-weight: 300;
76
- &::placeholder {
77
- color: ${({theme:e})=>e.text.secondary};
78
- font-family: ${({theme:e})=>e.font_family.primary};
79
- opacity: 0.4;
80
- font-size: 14px;
81
- font-weight: 300;
82
- line-height: 22px;
83
- }
84
-
85
- &:disabled {
86
- cursor: not-allowed;
87
- }
88
- `,$o=Bt.ul`
89
- position: absolute;
90
- max-height: 500px;
91
- top: 32px;
92
- border-radius: 24px;
93
- width: calc(100% - 32px);
94
- overflow-y: auto;
95
- background-color: ${({theme:e})=>e.colors.dropdown_bg};
96
- border: 1px solid ${({theme:e})=>e.colors.border};
97
- z-index: 9999;
98
- padding: 12px;
99
- `,fo=Bt.li`
100
- width: calc(100% - 24px);
101
- padding: 8px 12px;
102
- cursor: ${({$isList:e})=>e?"default":"pointer"};
103
- border-radius: 24px;
104
- gap: 8px;
105
- display: flex;
106
- align-items: ${({$isList:e})=>e?"flex-start":"center"};
107
- background: transparent;
108
- &:hover {
109
- background: ${({theme:e,$isList:t})=>!t&&e.colors.dropdown_bg_2};
110
- }
111
- `,xo=Bt.div`
112
- width: 100%;
113
- `,bo=Bt.div`
114
- display: flex;
115
- width: 100%;
116
- `,yo=Bt.div`
117
- width: 1px;
118
- height: 52px;
119
- background-color: ${({theme:e})=>e.colors.dropdown_bg_2};
120
- position: absolute;
121
- left: 33px;
122
- `,wo=Bt.div`
123
- display: flex;
124
- flex-direction: column;
125
- gap: 4px;
126
- `,vo=Bt(lo)`
127
- flex: 1;
128
- font-size: 14px;
129
- `,ko=Bt(lo)`
130
- color: ${({theme:e})=>e.text.grey};
131
- font-size: 10px;
132
- line-height: 150%;
133
- `,Co=Bt.ul`
134
- padding-left: 0px;
135
- margin: 4px 0 0 0;
136
- list-style: none;
137
- width: 100%;
138
- `,Eo=(e,t)=>t?e.reduce((e,i)=>{if(i.items){const n=Eo(i.items,t);n.length&&e.push({...i,items:n})}else i.label.toLowerCase().includes(t.toLowerCase())&&e.push(i);return e},[]):e,So=({placeholder:e="Type to search...",options:t,selectedOption:i,onOptionSelect:n,defaultText:o,onTextChange:r,style:a,disabled:s,errorMessage:l,...c})=>{const[d,p]=wt(i?.label||o||""),[u,h]=wt(Eo(t,d)),[m,g]=wt(!1);wt(-1),vt(()=>h(Eo(t,d)),[t]);const $=i?.icon,f=e=>{e&&(p(e.label),r?.(e.label)),g(!e),n?.(e)};return zt.jsxs(ho,{style:a,children:[zt.jsxs(mo,{$hasError:!!l,children:[$&&zt.jsx($,{}),zt.jsx(go,{type:"text",value:d,placeholder:e,onChange:e=>{e.stopPropagation();const i=e.target.value,n=Eo(t,i),o=1===n.length&&n[0].label===i?n[0]:void 0;p(i),r?.(i),h(n),f(o)},onKeyDown:e=>{["Enter"].includes(e.key)||e.stopPropagation()},disabled:s,onBlur:()=>!s&&g(!1),onFocus:()=>!s&&g(!0),...c})]}),m&&u.length?zt.jsx($o,{children:u.map(e=>zt.jsx(Ao,{option:e,onClick:f},e.type||e.label))}):null,l&&zt.jsx(uo,{children:l})]})},Ao=({option:e,renderIcon:t=!0,onClick:i})=>{const n=!!e.items&&e.items.length>0,o=e.icon;return zt.jsxs(fo,{"data-id":`option-${e.type||e.label}`,$isList:n,onMouseDown:()=>n?null:i(e),children:[o&&t&&zt.jsx(o,{}),zt.jsxs(xo,{children:[zt.jsxs(wo,{children:[zt.jsx(vo,{children:e.label}),zt.jsx(ko,{children:e.description})]}),n&&zt.jsx(Co,{children:e.items?.map(e=>zt.jsxs(bo,{children:[zt.jsx(yo,{}),zt.jsx(Ao,{option:e,renderIcon:!1,onClick:i})]},e.type||e.label))})]})]})},Do={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 To=Object.freeze({__proto__:null,hex:Do});const zo={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:"#8854FF",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:{600:"#F576A2"},orange:{600:"#F29142"}}},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"}},Fo={v2:zo.v2,darkMode:!0,colors:{...zo.colors,primary:"#111111",secondary:"#F9F9F9",border:"#525252",dark_grey:"#151515",translucent_bg:"#1A1A1A",dropdown_bg:"#242424",dropdown_bg_2:"#333333",warning:"#472300",error:"#431919",success:"#172013",info:"#242424",default:"#181944"},text:{white:"#FFFFFF",primary:"#111111",secondary:"#F9F9F9",grey:"#B8B8B8",dark_grey:"#8F8F8F",darker_grey:"#7A7A7A",light_grey:"#CCD0D2",dark_button:"#0A1824",warning:"#E9CF35",warning_secondary:"#FFA349",error:"#EF7676",error_secondary:"#DB5151",success:"#81AF65",success_secondary:"#51DB51",info:"#B8B8B8",info_secondary:"#CCDDDD",default:"#AABEF7",default_secondary:"#8CBEFF"},font_family:zo.font_family},Oo={v2:zo.v2,darkMode:!1,colors:{...zo.colors,primary:"#EEEEEE",secondary:"#060606",border:"#ADADAD",dark_grey:"#EAEAEA",translucent_bg:"#E5E5E5",dropdown_bg:"#DBDBDB",dropdown_bg_2:"#CCCCCC",warning:"#F6F092",error:"#FACECE",success:"#C8DEB8",info:"#E0E0E0",default:"#CAD9FB"},text:{white:"#FFFFFF",primary:"#EEEEEE",secondary:"#060606",grey:"#474747",dark_grey:"#707070",darker_grey:"#858585",light_grey:"#332F2D",dark_button:"#F5E7DB",warning:"#A56F12",warning_secondary:"#CA9416",error:"#B63A3A",error_secondary:"#DB5151",success:"#4E763A",success_secondary:"#67964C",info:"#525252",info_secondary:"#7A7A7A",default:"#444AD9",default_secondary:"#6C7AE8"},font_family:zo.font_family},Io=e=>e?Fo:Oo;var No=Object.freeze({__proto__:null,baseTheme:zo,darkModeTheme:Fo,getTheme:Io,lightModeTheme:Oo});const _o={in:{left:Mt`
139
- from { transform: translateX(-100%); }
140
- to { transform: translateX(0); }
141
- `,right:Mt`
142
- from { transform: translateX(100%); }
143
- to { transform: translateX(0); }
144
- `,top:Mt`
145
- from { transform: translateY(-100%); }
146
- to { transform: translateY(0); }
147
- `,bottom:Mt`
148
- from { transform: translateY(100%); }
149
- to { transform: translateY(0); }
150
- `,center:Mt`
151
- from { transform: translate(-50%, 100%); }
152
- to { transform: translate(-50%, -50%); }
153
- `},out:{left:Mt`
154
- from { transform: translateX(0); }
155
- to { transform: translateX(-100%); }
156
- `,right:Mt`
157
- from { transform: translateX(0); }
158
- to { transform: translateX(100%); }
159
- `,top:Mt`
160
- from { transform: translateY(0); }
161
- to { transform: translateY(-100%); }
162
- `,bottom:Mt`
163
- from { transform: translateY(0); }
164
- to { transform: translateY(100%); }
165
- `,center:Mt`
166
- from { transform: translate(-50%, -50%); }
167
- to { transform: translate(-50%, 100%); }
168
- `}},Bo={in:Mt`
169
- from {
170
- width: 0%;
171
- }
172
- to {
173
- width: 100%;
174
- }
175
- `,out:Mt`
176
- from {
177
- width: 100%;
178
- }
179
- to {
180
- width: 0%;
181
- }
182
- `},Ro=Mt`
183
- 0% {
184
- transform: scale(1);
185
- opacity: 1;
186
- }
187
- 75%, 100% {
188
- transform: scale(2);
189
- opacity: 0;
190
- }
191
- `,Lo=Mt`
192
- 0% {
193
- background-position: -500px 0;
194
- }
195
- 100% {
196
- background-position: 500px 0;
197
- }
198
- `,Mo={in:Mt`
199
- from {
200
- opacity: 0;
201
- }
202
- to {
203
- opacity: 1;
204
- }
205
- `,out:Mt`
206
- from {
207
- opacity: 1;
208
- }
209
- to {
210
- opacity: 0;
211
- }
212
- `};var Po=Object.freeze({__proto__:null,fade:Mo,ping:Ro,progress:Bo,shimmer:Lo,slide:_o});const jo=xt(e=>({activeNodeType:null,activeNodeId:null,setActiveNodeType:t=>e({activeNodeType:t}),setActiveNodeId:t=>e({activeNodeId:t})})),Uo=[{label:"Attributes",icon:an(ri.Attributes),items:[{type:ai.K8sAttributes,icon:an(ai.K8sAttributes),label:"Kubernetes Attributes",description:"Add dynamic k8s resource attributes to your data.",allowedSignals:[Hi.Traces,Hi.Metrics,Hi.Logs],docsEndpoint:"/pipeline/actions/attributes/k8sattributes",docsDescription:"This action adds kubernetes related resource attributes to spans, metrics data points and log records."},{type:ai.AddClusterInfo,icon:an(ai.AddClusterInfo),label:"Add Cluster Info",description:"Add static cluster-scoped attributes to your data.",allowedSignals:[Hi.Traces,Hi.Metrics,Hi.Logs],docsEndpoint:"/pipeline/actions/attributes/addclusterinfo",docsDescription:"This action adds static resource attributes to spans, metrics data points and log records. It is useful to add cluster-wide attributes to all telemetry signals."},{type:ai.DeleteAttributes,icon:an(ai.DeleteAttributes),label:"Delete Attribute",description:"Delete attributes from logs, metrics, and traces.",allowedSignals:[Hi.Traces,Hi.Metrics,Hi.Logs],docsEndpoint:"/pipeline/actions/attributes/deleteattribute",docsDescription:"This action will delete the specified attributes from all telemetry signals that are specified in the signals field, regardless of the source, or any other condition."},{type:ai.RenameAttributes,icon:an(ai.RenameAttributes),label:"Rename Attribute",description:"Rename attributes in logs, metrics, and traces.",allowedSignals:[Hi.Traces,Hi.Metrics,Hi.Logs],docsEndpoint:"/pipeline/actions/attributes/renameattribute",docsDescription:"This action will rename the specified attributes from all telemetry signals that are specified in the signals field, regardless of the source, or any other condition."},{type:ai.PiiMasking,icon:an(ai.PiiMasking),label:"PII Masking",description:"Mask PII data in your traces.",allowedSignals:[Hi.Traces],docsEndpoint:"/pipeline/actions/attributes/piimasking",docsDescription:"This action processes a list of PII categories to be masked from the traces."}]},{label:"Samplers",icon:an(ri.Samplers),items:[{type:ai.ErrorSampler,icon:an(ri.Samplers),label:"Error Sampler",description:"Sample errors based on percentage.",allowedSignals:[Hi.Traces],docsEndpoint:"/pipeline/actions/sampling/errorsampler",docsDescription:"This action is a Global Action that supports error sampling by filtering out non-error traces."},{type:ai.LatencySampler,icon:an(ri.Samplers),label:"Latency Sampler",description:"Add latency to your traces.",allowedSignals:[Hi.Traces],docsEndpoint:"/pipeline/actions/sampling/latencysampler",docsDescription:"This action is an Endpoint Action that samples traces based on their duration for a specific service and endpoint (HTTP route) filter."},{type:ai.ProbabilisticSampler,icon:an(ri.Samplers),label:"Probabilistic Sampler",description:"Sample traces based on percentage.",allowedSignals:[Hi.Traces],docsEndpoint:"/pipeline/actions/sampling/probabilisticsampler",docsDescription:"This action supports probabilistic sampling based on a configured sampling percentage applied to the TraceID."},{type:ai.ServiceNameSampler,icon:an(ri.Samplers),label:"Service Name Sampler",description:"Sample traces based on the presence of specified services within a trace.",allowedSignals:[Hi.Traces],docsEndpoint:"/pipeline/actions/sampling/servicenamesampler",docsDescription:"This action supports service name sampling based on the presence of specified services within a trace."},{type:ai.SpanAttributeSampler,icon:an(ri.Samplers),label:"Span Attributes Sampler",description:"Sample traces based on the presence or value of specific attributes within a trace.",allowedSignals:[Hi.Traces],docsEndpoint:"/pipeline/actions/sampling/spanattributesampler",docsDescription:"This action supports service name sampling based on the presence or value of specific attributes within a trace."}]}],Wo={DETECTED:{TITLE:"Detected by Odigos",DESCRIPTION:"Odigos found these destinations in your cluster and pre-filled their details. Review and enable them to start sending data."},EXISTS:{TITLE:"Already configured",DESCRIPTION:"These are destinations that you have already configured in other data-streams and can reuse them."},MANAGED:{TITLE:"Managed",DESCRIPTION:"Effortless monitoring with scalable performance management."},SELF_HOSTED:{TITLE:"Self-hosted",DESCRIPTION:"Full control and customization for advanced application monitoring."}},Vo=[{type:Bi.CodeAttributes,icon:$n(Bi.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:[xi.Go,xi.Python]},{type:Bi.CustomInstrumentation,icon:$n(Bi.CustomInstrumentation),label:"Custom Instrumentation",description:"Define custom instrumentation for specific class and methods(i.e for Java) or explicit symbol(i.e. 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:[xi.Go,xi.Java]},{type:Bi.HeadersCollection,icon:$n(Bi.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:[xi.Go,xi.Java,xi.JavaScript]},{type:Bi.PayloadCollection,icon:$n(Bi.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:[xi.Go]}],Ho=[{id:Hi.Logs,value:"Logs"},{id:Hi.Metrics,value:"Metrics"},{id:Hi.Traces,value:"Traces"}],qo={[xi.Go]:"Go",[xi.Java]:"Java",[xi.JavaScript]:"Node.js",[xi.Python]:"Python",[xi.DotNet]:".NET",[xi.CSharp]:"C#",[xi.CPlusPlus]:"C++",[xi.Php]:"PHP",[xi.Ruby]:"Ruby",[xi.Rust]:"Rust",[xi.Swift]:"Swift",[xi.Elixir]:"Elixir",[xi.MySql]:"MySQL",[xi.Nginx]:"Nginx",[xi.Postgres]:"PostgreSQL",[xi.Redis]:"Redis",[xi.Kafka]:"Kafka",[xi.Ignored]:"Ignored",[xi.Unknown]:"Unknown",[xi.Processing]:"Processing",[xi.NoContainers]:"No Containers",[xi.NoRunningPods]:"No Running Pods"},Go=[{id:xi.Go,value:qo[xi.Go],icon:cn(xi.Go)},{id:xi.Java,value:qo[xi.Java],icon:cn(xi.Java)},{id:xi.JavaScript,value:qo[xi.JavaScript],icon:cn(xi.JavaScript)},{id:xi.Python,value:qo[xi.Python],icon:cn(xi.Python)},{id:xi.Php,value:qo[xi.Php],icon:cn(xi.Php)},{id:xi.Ruby,value:qo[xi.Ruby],icon:cn(xi.Ruby)},{id:xi.Rust,value:qo[xi.Rust],icon:cn(xi.Rust)},{id:xi.DotNet,value:qo[xi.DotNet],icon:cn(xi.DotNet)},{id:xi.CSharp,value:qo[xi.CSharp],icon:cn(xi.CSharp)},{id:xi.CPlusPlus,value:qo[xi.CPlusPlus],icon:cn(xi.CPlusPlus)},{id:xi.Swift,value:qo[xi.Swift],icon:cn(xi.Swift)},{id:xi.Elixir,value:qo[xi.Elixir],icon:cn(xi.Elixir)}],Ko={[xi.Go]:{community:[{id:Ni.GolangCommunity,value:Ni.GolangCommunity,icon:cn(xi.Go)}],enterprise:[{id:Ni.GolangEnterprise,value:Ni.GolangEnterprise,icon:cn(xi.Go)}]},[xi.JavaScript]:{community:[{id:Ni.NodejsCommunity,value:Ni.NodejsCommunity,icon:cn(xi.JavaScript)}],enterprise:[{id:Ni.NodejsEnterprise,value:Ni.NodejsEnterprise,icon:cn(xi.JavaScript)}]},[xi.Python]:{community:[{id:Ni.PythonCommunity,value:Ni.PythonCommunity,icon:cn(xi.Python)}],enterprise:[{id:Ni.PythonEnterprise,value:Ni.PythonEnterprise,icon:cn(xi.Python)}]},[xi.Java]:{community:[{id:Ni.JavaCommunity,value:Ni.JavaCommunity,icon:cn(xi.Java)}],enterprise:[{id:Ni.JavaEnterprise,value:Ni.JavaEnterprise,icon:cn(xi.Java)},{id:Ni.JavaEbpfInstrumentations,value:Ni.JavaEbpfInstrumentations,icon:cn(xi.Java)}]},[xi.DotNet]:{community:[{id:Ni.DotNetCommunity,value:Ni.DotNetCommunity,icon:cn(xi.DotNet)}],enterprise:[{id:Ni.DotNetEnterprise,value:Ni.DotNetEnterprise,icon:cn(xi.DotNet)}]},[xi.Ruby]:{community:[{id:Ni.RubyCommunity,value:Ni.RubyCommunity,icon:cn(xi.Ruby)}],enterprise:[{id:Ni.RubyEnterprise,value:Ni.RubyEnterprise,icon:cn(xi.Ruby)}]},[xi.Php]:{community:[{id:Ni.PhpCommunity,value:Ni.PhpCommunity,icon:cn(xi.Php)}],enterprise:[{id:Ni.PhpEnterprise,value:Ni.PhpEnterprise,icon:cn(xi.Php)}]},[xi.CSharp]:{community:[],enterprise:[{id:Ni.CPlusPlusEnterprise,value:Ni.CPlusPlusEnterprise,icon:cn(xi.CSharp)}]},[xi.MySql]:{community:[],enterprise:[{id:Ni.MySqlEnterprise,value:Ni.MySqlEnterprise,icon:cn(xi.MySql)}]},[xi.CPlusPlus]:{community:[],enterprise:[]},[xi.Rust]:{community:[],enterprise:[]},[xi.Swift]:{community:[],enterprise:[]},[xi.Elixir]:{community:[],enterprise:[]},[xi.Nginx]:{community:[],enterprise:[]},[xi.Postgres]:{community:[],enterprise:[]},[xi.Redis]:{community:[],enterprise:[]},[xi.Kafka]:{community:[],enterprise:[]},[xi.Ignored]:{community:[],enterprise:[]},[xi.Unknown]:{community:[],enterprise:[]},[xi.Processing]:{community:[],enterprise:[]},[xi.NoContainers]:{community:[],enterprise:[]},[xi.NoRunningPods]:{community:[],enterprise:[]}},Yo=6048e5,Jo=xt()(Ft(e=>({darkMode:!0,setDarkMode:t=>e({darkMode:t})}),{name:Ji.DARK_MODE,storage:"undefined"!=typeof window?Ot(()=>localStorage):void 0})),Xo={dataStreamsLoading:!1,dataStreams:[],selectedStreamName:""},Zo=xt(e=>({...Xo,setDataStreamsLoading:t=>e({dataStreamsLoading:t}),setDataStreams:t=>e({dataStreams:t}),addDataStreams:t=>e(e=>{const i=[...e.dataStreams,...t].map(e=>[e.name,e]);return{dataStreams:Array.from(new Map(i).values())}}),removeDataStreams:t=>e(e=>({dataStreams:e.dataStreams.filter(e=>!t.find(t=>t.name===e.name))})),setSelectedStreamName:t=>e({selectedStreamName:t}),resetDataStreamStore:()=>e(Xo)})),Qo=xt(e=>({drawerType:null,drawerEntityId:null,setDrawerType:t=>e({drawerType:t}),setDrawerEntityId:t=>e({drawerEntityId:t})})),er=xt(e=>({namespacesLoading:!1,namespaces:[],sourcesLoading:!1,sources:[],destinationsLoading:!1,destinations:[],actionsLoading:!1,actions:[],instrumentationRulesLoading:!1,instrumentationRules:[],setEntitiesLoading:(t,i)=>{const n=t===yi.Namespace?"namespacesLoading":t===yi.Source?"sourcesLoading":t===yi.Destination?"destinationsLoading":t===yi.Action?"actionsLoading":t===yi.InstrumentationRule?"instrumentationRulesLoading":"NONE";"NONE"!==n&&e({[n]:i})},setEntities:(t,i)=>{const n=t===yi.Namespace?"namespaces":t===yi.Source?"sources":t===yi.Destination?"destinations":t===yi.Action?"actions":t===yi.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==n&&e({[n]:i})},addEntities:(t,i)=>{const n=t===yi.Namespace?"namespaces":t===yi.Source?"sources":t===yi.Destination?"destinations":t===yi.Action?"actions":t===yi.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==n&&e(e=>{const t=[...e[n]];return i.forEach(e=>{const i=t.findIndex(t=>JSON.stringify(hn(t))===JSON.stringify(hn(e)));-1!==i?t[i]={...t[i],...e}:t.push(e)}),{[n]:t}})},removeEntities:(t,i)=>{const n=t===yi.Namespace?"namespaces":t===yi.Source?"sources":t===yi.Destination?"destinations":t===yi.Action?"actions":t===yi.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==n&&e(e=>{const o=[...e[n]];return i.forEach(e=>{const i=o.findIndex(i=>t===yi.Source?JSON.stringify(hn(i))===JSON.stringify(hn(e)):hn(i)===e);-1!==i&&o.splice(i,1)}),{[n]:o}})},resetEntityStore:()=>{e({namespacesLoading:!1,namespaces:[],sourcesLoading:!1,sources:[],destinationsLoading:!1,destinations:[],actionsLoading:!1,actions:[],instrumentationRulesLoading:!1,instrumentationRules:[]})}})),tr=()=>({searchText:"",statuses:[],platformTypes:[],namespaces:[],kinds:[],monitors:[],languages:[],conditions:[],podsAgentInjectionStatus:[],errors:[],onlyErrors:!1}),ir=xt(e=>({searchText:"",setSearchText:t=>e({searchText:t}),statuses:[],setStatuses:t=>e({statuses:t}),platformTypes:[],setPlatformTypes:t=>e({platformTypes:t}),namespaces:[],setNamespaces:t=>e({namespaces:t}),kinds:[],setKinds:t=>e({kinds:t}),monitors:[],setMonitors:t=>e({monitors:t}),languages:[],setLanguages:t=>e({languages:t}),conditions:[],setConditions:t=>e({conditions:t}),podsAgentInjectionStatus:[],setPodsAgentInjectionStatus:t=>e({podsAgentInjectionStatus:t}),errors:[],setErrors:t=>e({errors:t}),onlyErrors:!1,setOnlyErrors:t=>e({onlyErrors:t}),setAll:t=>e(t),clearAll:()=>e({searchText:"",statuses:[],platformTypes:[],namespaces:[],kinds:[],monitors:[],languages:[],conditions:[],podsAgentInjectionStatus:[],errors:[],onlyErrors:!1}),getEmptyState:tr})),nr=xt(e=>({currentModal:"",setCurrentModal:t=>e({currentModal:t})})),or=xt((e,t)=>({notifications:[],addNotification:i=>{const n=new Date,o=`${n.getTime().toString()}${i.target?`#${i.target}`:""}`,{notifications:r}=t();r.some(e=>e.type===i.type&&e.title===i.title&&e.message===i.message&&!e.dismissed)||e(e=>({notifications:[{...i,id:o,time:n.toISOString(),dismissed:!1,seen:!1},...e.notifications]}))},markAsDismissed:t=>{e(e=>{const i=e.notifications.findIndex(e=>e.id===t);return-1!==i&&(e.notifications[i].dismissed=!0),{notifications:e.notifications}})},markAsSeen:t=>{e(e=>{const i=e.notifications.findIndex(e=>e.id===t);return-1!==i&&(e.notifications[i].seen=!0),{notifications:e.notifications}})},removeNotification:t=>{e(e=>{const i=e.notifications.findIndex(e=>e.id===t);return-1!==i&&e.notifications.splice(i,1),{notifications:e.notifications}})},removeNotifications:t=>{t&&e(e=>({notifications:e.notifications.filter(e=>e.id.split("#")[1]!==t)}))}}));var rr;!function(e){e.Instrumenting="instrumenting",e.Uninstrumenting="uninstrumenting",e.BulkInstrumenting="bulk-instrumenting",e.BulkUninstrumenting="bulk-uninstrumenting"}(rr||(rr={}));const ar=(e,t)=>({...t?.[e]||{total:0,current:0,percentage:0}}),sr=e=>(e.total<e.current&&(e.total=e.current+1),e.percentage=Math.round(e.current/e.total*100),e),lr=xt((e,t)=>({progress:{},setProgress:(i,n)=>{const o=t(),r=ar();return"number"==typeof n.total&&(r.total=n.total),"number"==typeof n.current&&(r.current=n.current),e({progress:{...o.progress,[i]:sr(r)}})},addProgress:(i,n)=>{const o=t(),r=ar(i,o.progress);return r.current+=n,e({progress:{...o.progress,[i]:sr(r)}})},resetProgress:t=>e({progress:{[t]:void 0}})})),cr=xt(e=>({selectedSources:{},setSelectedSources:t=>e({selectedSources:t}),resetSelectedState:()=>e(()=>({selectedSources:{},selectedConnection:null}))})),dr={fetchedAllNamespaces:!1,availableSources:{},configuredSources:{},configuredFutureApps:{},configuredDestinations:[],configuredDestinationsUpdateOnly:[]},pr=(e,t)=>e.destinationType.type!==t.destinationType.type,ur=xt(e=>({...dr,setFetchedAllNamespaces:t=>e({fetchedAllNamespaces:t}),setAvailableSources:t=>e({availableSources:t}),setConfiguredSources:t=>e({configuredSources:t}),setConfiguredFutureApps:t=>e({configuredFutureApps:t}),setConfiguredDestinations:t=>e({configuredDestinations:t}),addConfiguredDestination:t=>e(e=>({configuredDestinations:[...e.configuredDestinations,t]})),removeConfiguredDestination:t=>e(e=>({configuredDestinations:e.configuredDestinations.filter(e=>pr(e,t))})),setConfiguredDestinationsUpdateOnly:t=>e({configuredDestinationsUpdateOnly:t}),addConfiguredDestinationUpdateOnly:t=>e(e=>{const i=[...e.configuredDestinationsUpdateOnly,t].map(e=>[e.id,e]);return{configuredDestinationsUpdateOnly:Array.from(new Map(i).values())}}),removeConfiguredDestinationUpdateOnly:t=>e(e=>({configuredDestinationsUpdateOnly:e.configuredDestinationsUpdateOnly.filter(e=>pr(e,t))})),clearStore:()=>e(()=>({...dr}))}));It('@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=Kode+Mono:wght@100;200;300;400;500;600;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap");*{-ms-overflow-style:none;scrollbar-width:none}::-webkit-scrollbar{display:none}*{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 hr=({children:e})=>{const{darkMode:t}=Jo();return zt.jsx(Pt,{theme:Io(t),children:e})},mr=Bt.span`
213
- display: flex;
214
- align-items: center;
215
- justify-content: center;
216
-
217
- min-height: 16px;
218
- min-width: 16px;
219
- width: fit-content;
220
- padding: 4px;
221
- gap: 2px;
222
-
223
- border-radius: 50px;
224
- border: 1px solid ${({theme:e,$filled:t,$status:i})=>i?e.text[i]+(t?"":Do["050"]):t?"transparent":e.colors.border};
225
- background-color: ${({theme:e,$filled:t,$status:i})=>t?i?e.colors[i]:e.colors.majestic_blue:"transparent"};
226
- color: ${({theme:e,$filled:t,$status:i})=>t&&i?e.text.secondary:t?e.text.white:i?e.text[i]:e.text.grey};
227
- font-family: ${({theme:e})=>e.font_family.secondary};
228
- font-size: 12px;
229
- white-space: nowrap;
230
-
231
- ${({theme:e,$filled:t,$status:i,$clickable:n})=>n&&`&:hover {\n cursor: pointer;\n background-color: ${i?e.colors[i]+Do["020"]:t?e.colors.majestic_blue_soft:e.colors.secondary+Do["020"]};\n }`}
232
- `,gr=({label:e,filled:t,status:i,withIcon:n,onClick:o})=>{const r=Lt(),a=i&&n?Sn(i,r):null;return zt.jsxs(mr,{$filled:t,$status:i,$clickable:!!o,onClick:o,children:[!!a&&zt.jsx(a,{}),e]})},$r=Bt.div`
233
- height: fit-content;
234
- border: 2px solid transparent;
235
- padding: 2px;
236
- border-radius: 32px;
237
- background-color: transparent;
238
- transition: border-color 0.3s ease;
239
- &:focus-within {
240
- border-color: ${({theme:e})=>e.colors.secondary};
241
- }
242
- `,fr={primary:Rt`
243
- border: 1px solid ${({theme:e})=>e.text.secondary+Do["024"]};
244
- background: ${({theme:e})=>e.colors.secondary};
245
- color: ${({theme:e})=>e.colors.primary};
246
- &:hover {
247
- background: ${({theme:e})=>e.colors.secondary+Do["080"]};
248
- }
249
- &:active {
250
- background: ${({theme:e})=>e.text.secondary+Do["060"]};
251
- }
252
- `,secondary:Rt`
253
- border: 1px solid ${({theme:e})=>e.colors.border};
254
- background: ${({theme:e})=>e.colors.primary};
255
- color: ${({theme:e})=>e.colors.secondary};
256
- &:hover {
257
- border: 1px solid ${({theme:e})=>e.text.darker_grey};
258
- background: ${({theme:e})=>e.colors.secondary+Do["010"]};
259
- }
260
- &:active {
261
- border: 1px solid ${({theme:e})=>e.text.dark_grey};
262
- background: ${({theme:e})=>e.colors.secondary+Do["015"]};
263
- }
264
- `,tertiary:Rt`
265
- border-color: transparent;
266
- background: transparent;
267
- &:hover {
268
- background: ${({theme:e})=>e.colors.dropdown_bg_2+Do["040"]};
269
- }
270
- &:active {
271
- background: ${({theme:e})=>e.colors.dropdown_bg_2};
272
- }
273
- `,danger:Rt`
274
- border-color: transparent;
275
- background: ${({theme:e})=>e.text.error};
276
- &:hover {
277
- background: ${({theme:e})=>e.text.error+Do["090"]};
278
- }
279
- &:active {
280
- background: ${({theme:e})=>e.text.error+Do["080"]};
281
- }
282
- `,warning:Rt`
283
- border-color: transparent;
284
- background: ${({theme:e})=>e.text.warning};
285
- &:hover {
286
- background: ${({theme:e})=>e.text.warning+Do["090"]};
287
- }
288
- &:active {
289
- background: ${({theme:e})=>e.text.warning+Do["080"]};
290
- }
291
- `},xr=Bt.button`
292
- height: 36px;
293
- border-radius: 32px;
294
- cursor: pointer;
295
- display: flex;
296
- align-items: center;
297
- justify-content: center;
298
- gap: 8px;
299
- padding: 0 12px;
300
- font-family: ${({theme:e})=>e.font_family.secondary};
301
- text-transform: uppercase;
302
- text-decoration: underline;
303
- font-weight: 600;
304
- outline: none;
305
- ${({$variant:e})=>e&&fr[e]}
306
- ${({disabled:e,$variant:t})=>e&&Rt`
307
- opacity: 0.5;
308
- cursor: not-allowed;
309
-
310
- ${"primary"===t?Rt`
311
- color: ${({theme:e})=>e.colors.secondary};
312
- background: ${({theme:e})=>e.text.secondary+Do["010"]};
313
- &:hover {
314
- background: ${({theme:e})=>e.text.secondary+Do["015"]};
315
- }
316
- `:""}
317
- `}
318
- `,br=({children:e,variant:t="primary",onClick:i,...n})=>{const o=kt(null);return zt.jsx($r,{$variant:t,children:zt.jsx(xr,{ref:o,$variant:t,onClick:e=>{i&&i(e),o.current?.blur()},...n,children:e})})},yr=e=>{function t(){return void 0===e?{}:ti(e)}const[i,n]=wt(t()),[o,r]=wt({}),a=(e,t)=>Object.entries(e).every(([e,i])=>Array.isArray(i)?i.length===t[e].length&&i.every((i,n)=>a(i,t[e][n])):"object"==typeof i&&null!==i?a(i,t[e]):i===t[e]),s=yt(()=>void 0!==e&&!a(e,i),[e,i]);return vt(()=>{void 0!==e&&"{}"===JSON.stringify(i)&&n(t())},[e,i]),{formData:i,formErrors:o,areFormValuesEqual:a,isFormDirty:s,handleFormChange:(e,t,i)=>{if(e){const i=e.toString().split(".");1===i.length?n(i=>({...i,[e]:t})):n(e=>{const n=ti(e);let o=n;for(let e=0;e<i.length-1;e++){const t=i[e];o[t]&&"object"==typeof o[t]||(o[t]={}),o=o[t]}return o[i[i.length-1]]=t,n})}else i&&n({...i})},handleErrorChange:(e,t,i)=>{e?r(i=>({...i,[e]:t})):i&&r({...i})},resetFormData:e=>{n(e||t()),r({})}}},wr={type:"",name:"",notes:"",signals:[],disabled:!1,fields:{clusterAttributes:null,overwriteExistingValues:null,renames:null,attributeNamesToDelete:null,piiCategories:null,fallbackSamplingRatio:null,samplingPercentage:null,endpointsFilters:null,servicesNameFilters:null,attributeFilters:null}},vr=()=>{const{addNotification:e}=or(),{formData:t,formErrors:i,handleFormChange:n,handleErrorChange:o,resetFormData:r}=yr(wr);return{formData:t,formErrors:i,handleFormChange:n,resetFormData:r,validateForm:i=>{const n={};let r=!0;return Object.entries(t).forEach(([e,t])=>{switch(e){case"type":case"signals":In(t)&&(n[e]=Xi.FIELD_IS_REQUIRED)}}),r=!Object.values(n).length,!r&&i?.withAlert&&e({type:Ci.Warning,title:i.alertTitle,message:Xi.REQUIRED_FIELDS,hideFromHistory:!0}),o(void 0,void 0,n),r},loadFormWithDrawerItem:({type:e,signals:t,fields:i})=>{const o={...ti(wr),type:e,signals:t};Object.entries(i).forEach(([e,t])=>{if(t)switch(e){case"actionName":o.name=t;break;case"type":case"notes":case"disabled":o[e]=t;break;case si.LabelsAttributes:case si.AnnotationsAttributes:o.fields||(o.fields={}),o.fields[e]=(i=t)&&Array.isArray(i)?i.map(e=>!e.fromSources?.length&&e.from?{...e,fromSources:[e.from]}:e):i;break;case si.CollectContainerAttributes:case si.CollectReplicaSetAttributes:case si.CollectWorkloadId:case si.CollectClusterId:case si.ClusterAttributes:case si.OverwriteExistingValues:case si.AttributeNamesToDelete:case si.Renames:case si.PiiCategories:case si.FallbackSamplingRatio:case si.SamplingPercentage:case si.EndpointsFilters:case si.ServicesNameFilters:case si.AttributeFilters:o.fields||(o.fields={}),o.fields[e]=t}var i}),n(void 0,void 0,o)}}},kr=e=>{vt(()=>{if(e){const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])},Cr=()=>{const{setCurrentModal:e}=nr(),{setDrawerType:t,setDrawerEntityId:i}=Qo(),{setActiveNodeType:n,setActiveNodeId:o,activeNodeId:r}=jo();return{onClickNode:(a,s)=>{const{id:l,type:c,data:{id:d,type:p}}=s;switch(r===l?(n(null),o(null)):(n(c),o(l)),p){case yi.Source:case yi.Destination:case yi.Action:case yi.InstrumentationRule:t(p),i(d);break;case Fi.AddSource:e(yi.Source);break;case Fi.AddDestination:e(yi.Destination);break;case Fi.AddAction:e(yi.Action);break;case Fi.AddRule:e(yi.InstrumentationRule)}}}},Er=()=>{const{setDrawerType:e,setDrawerEntityId:t}=Qo(),{markAsDismissed:i,markAsSeen:n}=or();return{onClickNotification:(o,r)=>{const{id:a,crdType:s,target:l}=o,{dismissToast:c}=r||{};if(s&&l)switch(s){case yi.InstrumentationRule:e(yi.InstrumentationRule),t(gn(l,yi.InstrumentationRule));break;case yi.Source:case"InstrumentationConfig":case"InstrumentationInstance":e(yi.Source),t(gn(l,yi.Source));break;case yi.Action:e(yi.Action),t(gn(l,yi.Action));break;case yi.Destination:case"Destination":e(yi.Destination),t(gn(l,yi.Destination))}n(a),c&&i(a)}}},Sr=()=>{const e=kt(null),[t,i]=wt(0),[n,o]=wt(0);return vt(()=>{const t=()=>{if(e.current){const{width:t,height:n}=e.current.getBoundingClientRect();i(t),o(n)}};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),{containerRef:e,containerWidth:t,containerHeight:n}};var Ar;!function(e){e[e.XS=16]="XS",e[e.S=18]="S",e[e.M=24]="M",e[e.L=32]="L"}(Ar||(Ar={}));const Dr=Bt.div`
319
- width: ${({$size:e})=>1.5*e}px;
320
- height: ${({$size:e})=>1.5*e}px;
321
- display: flex;
322
- align-items: center;
323
- justify-content: center;
324
- border-radius: 100%;
325
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
326
- &:hover {
327
- background: ${({theme:e})=>e.v2.colors.silver[800]};
328
- }
329
- `,Tr=({icon:e,size:t=Ar.S,onClick:i,disabled:n})=>zt.jsx(Dr,{$size:t,$disabled:n,onClick:e=>{i&&!n&&(e.stopPropagation(),i(e))},children:zt.jsx(e,{size:t})}),zr=({onDone:e}={})=>{const[t,i]=wt(!1),[n,o]=wt(-1),r=Ct(async(n,r)=>{if(!t){if(i(!0),void 0!==r&&o(r),navigator?.clipboard&&navigator.clipboard.writeText)try{await navigator.clipboard.writeText(n)}catch(e){}else{const e=document.createElement("textarea");e.value=n,document.body.appendChild(e),e.select();try{document.execCommand("copy")}catch(e){}document.body.removeChild(e)}e?.(),setTimeout(()=>{i(!1),o(-1)},1e3)}},[t,e]);return{CopyButton:Ct(({value:e,size:i})=>{const n=t?Ge:Ke;return zt.jsx(Tr,{icon:n,size:i,onClick:()=>r(e)})},[t]),isCopied:t,copiedIndex:n,clickCopy:r}},Fr=e=>{const{addNotification:t}=or(),{formData:i,handleFormChange:n,formErrors:o,handleErrorChange:r,resetFormData:a}=yr(e);return{formData:i,formErrors:o,handleFormChange:n,resetFormData:a,validateForm:e=>{const n={};let o=!0;return i.name?Nn(i.name)?n.name=void 0:(o=!1,n.name=Xi.ILLEGAL_K8S_LABEL):(o=!1,n.name=Xi.FIELD_IS_REQUIRED),!o&&e?.withAlert&&t({type:Ci.Warning,title:e.alertTitle,message:Xi.REQUIRED_FIELDS,hideFromHistory:!0}),r(void 0,void 0,n),o},loadFormWithDrawerItem:({name:t})=>{const i={...ti(e),name:t};n(void 0,void 0,i)}}},Or={type:"",name:"",exportedSignals:{logs:!1,metrics:!1,traces:!1},fields:[],disabled:!1},Ir=e=>{const{supportedSignals:t,preLoadedFields:i}=e||{},{addNotification:n}=or(),{formData:o,formErrors:r,handleFormChange:a,handleErrorChange:s,resetFormData:l}=yr(Or),[c,d]=wt([]),[p,u]=wt([]);return vt(()=>{var e;u(c?(e=c,e.filter(e=>!!e).map(e=>{const{name:t,componentType:i,componentProperties:n,displayName:o,initialValue:r,renderCondition:a}=e;if(i===vi.Dropdown){const e=zn(n,{}),s=Array.isArray(e.values)?e.values.map(e=>({id:e,value:e})):Object.entries(e.values).map(([e,t])=>({id:e,value:t}));return{name:t,componentType:i,title:o,value:r,placeholder:e.placeholder||"Select an option",options:s,renderCondition:a,...e}}return{name:t,componentType:i,title:o,value:r,renderCondition:a,...zn(n,{})}})).map(e=>{if(i){const t="string"==typeof i?zn(i,{}):i;if(e.name in t)return{...e,value:t[e.name]}}return e}):[])},[c,i]),vt(()=>{if(p){const e=p.map(e=>({key:e.name,value:e.value}));a("fields",e)}},[p]),vt(()=>{if(t&&0===Wn(o.exportedSignals).length){const{logs:e,metrics:i,traces:n}=t;a("exportedSignals",{logs:e.supported,metrics:i.supported,traces:n.supported})}},[t,o.exportedSignals]),{formData:o,formErrors:r,handleFormChange:a,resetFormData:l,validateForm:e=>{const t={};let i=!0;return p.forEach(({name:e,value:n,required:o})=>{o&&!n&&(i=!1,t[e]=Xi.FIELD_IS_REQUIRED)}),!i&&e?.withAlert&&n({type:Ci.Warning,title:e.alertTitle,message:Xi.REQUIRED_FIELDS,hideFromHistory:!0}),s(void 0,void 0,t),i},loadFormWithDrawerItem:({destinationType:{type:e},name:t,disabled:i,exportedSignals:n,fields:o})=>{const r={...ti(Or),type:e,name:t,disabled:i,exportedSignals:n,fields:Object.entries(zn(o,{})).map(([e,t])=>({key:e,value:t}))};return a(void 0,void 0,r),r},yamlFields:c,setYamlFields:d,dynamicFields:p,setDynamicFields:u}},Nr=({items:e,rowHeight:t})=>{const i=kt(null),n=Nt({enabled:e.length>0,horizontal:!1,count:e.length,getScrollElement:()=>i.current,estimateSize:()=>t,overscan:Math.ceil(.05*e.length)});return{overflowRef:i,listHeight:n.getTotalSize(),listItems:n.getVirtualItems()}},_r={ruleName:"",notes:"",disabled:!1,workloads:null,instrumentationLibraries:null,payloadCollection:{[Pi.HttpRequest]:null,[Pi.HttpResponse]:null,[Pi.DbQuery]:null,[Pi.Messaging]:null},codeAttributes:{[Ri.Column]:null,[Ri.FilePath]:null,[Ri.Function]:null,[Ri.LineNumber]:null,[Ri.Namespace]:null,[Ri.StackTrace]:null},headersCollection:null,customInstrumentations:{[Mi.Java]:null,[Mi.Golang]:null}},Br=()=>{const{formData:e,formErrors:t,handleFormChange:i,handleErrorChange:n,resetFormData:o}=yr(_r);return{formData:e,formErrors:t,handleFormChange:i,resetFormData:o,validateForm:()=>(n(void 0,void 0,{}),!0),loadFormWithDrawerItem:({ruleName:e,notes:t,disabled:n,payloadCollection:o,codeAttributes:r,headersCollection:a,customInstrumentations:s})=>{const l={...ti(_r),ruleName:e,notes:t,disabled:n};o&&(l.payloadCollection={[Pi.HttpRequest]:o[Pi.HttpRequest]?{}:null,[Pi.HttpResponse]:o[Pi.HttpResponse]?{}:null,[Pi.DbQuery]:o[Pi.DbQuery]?{}:null,[Pi.Messaging]:o[Pi.Messaging]?{}:null}),r&&(l.codeAttributes={[Ri.Column]:r[Ri.Column]||null,[Ri.FilePath]:r[Ri.FilePath]||null,[Ri.Function]:r[Ri.Function]||null,[Ri.LineNumber]:r[Ri.LineNumber]||null,[Ri.Namespace]:r[Ri.Namespace]||null,[Ri.StackTrace]:r[Ri.StackTrace]||null}),a&&(l.headersCollection=a),s&&(l.customInstrumentations={[Mi.Java]:s[Mi.Java]||null,[Mi.Golang]:s[Mi.Golang]||null}),i(void 0,void 0,l)}}},Rr=({active:e,key:t,withAltKey:i,withCtrlKey:n,withShiftKey:o,withMetaKey:r},a)=>(vt(()=>{const s=s=>{e&&t===s.key&&(!i||i&&s.altKey)&&(!n||n&&s.ctrlKey)&&(!o||o&&s.shiftKey)&&(!r||r&&s.metaKey)&&(s.preventDefault(),s.stopPropagation(),a(s))};return window.addEventListener("keydown",s),()=>{window.removeEventListener("keydown",s)}},[t,e,i,n,o,r,a]),null),Lr=(e,t)=>{vt(()=>{const i=i=>{e.current&&!e.current.contains(i.target)&&t()};return document.addEventListener("mousedown",i),document.addEventListener("touchstart",i),()=>{document.removeEventListener("mousedown",i),document.removeEventListener("touchstart",i)}},[e,t])},Mr=({defaultClientHeight:e=0,defaultClientwidth:t=0,onClickOutside:i}={})=>{const n=kt(null),[o,r]=wt(!1),[a,s]=wt({top:0,left:0});return Lr(n,()=>{o&&(r(!1),i?.())}),{popupRef:n,popupOpen:o,setPopupOpen:r,popupPosition:a,handlePosition:(i,o)=>{const{innerWidth:r,innerHeight:a}=window;let l=o,c=i;l>=a/2&&(l+=-(n.current?.clientHeight||e)),c>=r/2&&(c+=-(n.current?.clientWidth||t)),s({top:l,left:c})}}},Pr=()=>({getItemSS:(e,t)=>{const i=sessionStorage.getItem(e);return i?zn(i,t):t},setItemSS:(e,t)=>{sessionStorage.setItem(e,JSON.stringify(t))},removeItemSS:e=>{sessionStorage.removeItem(e)}}),jr={otelServiceName:"",currentStreamName:""},Ur=()=>{const{formData:e,formErrors:t,handleFormChange:i,handleErrorChange:n,resetFormData:o}=yr(jr);return{formData:e,formErrors:t,handleFormChange:i,resetFormData:o,validateForm:()=>(n(void 0,void 0,{}),!0),loadFormWithDrawerItem:({otelServiceName:e,name:t})=>{const n={...ti(jr),otelServiceName:e||t||""};i(void 0,void 0,n)}}},Wr=(e,t,i)=>{const n="boolean"==typeof i,o=!!e.dataStreamNames?.length||!!e.currentStreamName?.length,r=o&&e.dataStreamNames?.includes(t)||e.currentStreamName===t,a=(n?i:e.selected&&(!o||r))||!1;return{namespace:e.namespace,name:e.name,kind:e.kind,selected:a,numberOfInstances:e.numberOfInstances}},Vr=(e,t,i)=>({...Wr(e,t,i),currentStreamName:t}),Hr=(e,t,i)=>{const n="boolean"==typeof i,o=e.dataStreamNames?.includes(t),r=(n?i:e.selected)||!1;return{namespace:e.name,selected:!(!o&&!n)&&r,currentStreamName:t}},qr=e=>{const{fetchSingleNamespace:t}=e||{},{namespaces:i}=er(),{selectedStreamName:n}=Zo(),o=kt(!1),{configuredSources:r,configuredFutureApps:a,availableSources:s,setAvailableSources:l,setFetchedAllNamespaces:c}=ur(),[d,p]=wt(s),[u,h]=wt(""),[m,g]=wt(!1),[$,f]=wt([]),[x,b]=wt(""),[y,w]=wt(a),[v,k]=wt(((e,t,i)=>{const n={};return Object.entries(e).forEach(([e,t])=>{n[e]=t.map(e=>Vr(e,i))}),Object.entries(t).forEach(([e,t])=>{t.forEach(t=>{const o=n[e].findIndex(e=>e.name===t.name&&e.kind===t.kind),r=Vr(t,i);-1!==o?n[e][o]=r:n[e].push(r)})}),n})(s,r,n)),C=async(e,i)=>{if(t){if(h(e.name),$.includes(e.name))k(t=>({...t,[e.name]:t[e.name].map(e=>({...e,selected:"boolean"==typeof i?i:e.selected,currentStreamName:n}))}));else{const{data:o}=await t({namespaceName:e.name}),{name:r,sources:a=[]}=o?.computePlatform?.k8sActualNamespace||{};if(!r)return;const s=a.map(e=>Wr(e,n));f(e=>[...e,r]),l({...ur.getState().availableSources,[r]:s}),p(e=>({...e,[r]:s})),k(e=>({...e,[r]:"boolean"!=typeof i&&e[r]?.length?e[r]:a.map(e=>Vr(e,n,i))}))}h("")}};vt(()=>(o.current=!0,i?.length&&!ur.getState().fetchedAllNamespaces&&(p(e=>{const t={...e};return i.forEach(({name:e})=>t[e]=t[e]||[]),t}),k(e=>{const t={...e};return i.forEach(({name:e})=>t[e]=t[e]||[]),t}),w(e=>{const t={...e};return i.forEach(e=>t[e.name]=t[e.name]||Hr(e,n)),t}),(async()=>{for await(const e of i)o.current&&await C(e)})(),o.current&&c(!0)),()=>{o.current=!1}),[i,n]);const[E,S]=wt(""),[A,D]=wt(yi.Source),[T,z]=wt(!1),[F,O]=wt(!1),I=yt(()=>{const e=(e,t)=>!E||A!==t||A===t&&e.toLowerCase().includes(E),t={};return Object.entries(v).filter(([t])=>e(t,yi.Namespace)).forEach(([i,n])=>{const o=n.filter(t=>e(t.name,yi.Source)&&(!T||t.selected)&&(e=>!F||(e.numberOfInstances||0)>0)(t));(!E||E&&(A===yi.Namespace||A===yi.Source&&o.length))&&(t[i]=o)}),t},[v,E,A,T,F]);return{fetchingNamespace:u,fetchedNamespaces:$,availableSources:d,filteredNamespacesAndSources:I,getApiSourcesPayload:()=>{const e={};return Object.entries(v).forEach(([t,i])=>{i.forEach(i=>{const n=d[t]?.find(e=>e.name===i.name&&e.kind===i.kind);n?.selected!==i.selected&&(e[t]||(e[t]=[]),e[t].push(i))})}),e},getApiFutureAppsPayload:()=>{const e={};return Object.entries(y).forEach(([t,o])=>{const r=i?.find(e=>e.name===t);(o.selected&&!r?.dataStreamNames?.includes(n)||!o.selected&&r?.dataStreamNames?.includes(n))&&(e[t]=o)}),e},selectedNamespace:x,onSelectNamespace:(e,t)=>{const n=i.find(t=>t.name===e);if(n){const i="boolean"==typeof t;b(t=>t!==e||i?e:""),C(n,t),i&&g(!1)}},selectedAllNamespaces:m,onSelectAllNamespaces:e=>{g(e),i.forEach(t=>C(t,e))},selectedSources:v,onSelectSource:(e,t)=>{const i=t||x;if(!i)return;const o=[...v[i]||[]],r=o.findIndex(({name:t,kind:i})=>t===e.name&&i===e.kind);if(-1!==r){const e={...o[r],selected:!o[r].selected,currentStreamName:n};o[r]=e}else o.push({...e,selected:!0,currentStreamName:n});k(e=>({...e,[i]:o})),g(!1)},selectedFutureApps:y,onSelectFutureApps:(e,t)=>{const o=t||x;if(!o)return;const r=i.find(e=>e.name===t);r&&w(t=>({...t,[o]:Hr(r,n,e)}))},searchText:E,setSearchText:S,searchBy:A,setSearchBy:D,showSelectedOnly:T,setShowSelectedOnly:z,showRunningOnly:F,setShowRunningOnly:O}};try{Tt.addDefaultLocale(_t)}catch(e){}const Gr=()=>{const e=kt(new Tt(_t.locale));return{formatTimeAgo:Ct(t=>{try{return"string"==typeof t&&(t=t.replace("t","T").replace("z","Z")),e.current.format(new Date(t))}catch(e){return"-"}},[])}},Kr=Bt.div`
330
- flex: 1;
331
- align-self: stretch;
332
- display: flex;
333
- flex-direction: column;
334
- gap: 24px;
335
- padding: 24px 24px 0 24px;
336
- overflow-x: scroll;
337
- `,Yr=Bt.div`
338
- position: relative;
339
-
340
- // inherit all the properties of the parent (PageContent)
341
- flex: inherit;
342
- align-self: inherit;
343
- display: inherit;
344
- flex-direction: inherit;
345
- gap: inherit;
346
- overflow-x: inherit;
347
- `,Jr=Bt.div`
348
- display: flex;
349
- flex-direction: row;
350
- flex-wrap: ${({$wrap:e="unset"})=>e};
351
- align-items: ${({$alignItems:e="center"})=>e};
352
- justify-content: ${({$justifyContent:e="unset"})=>e};
353
- gap: ${({$gap:e=2})=>e}px;
354
- width: ${({$width:e})=>e||"unset"};
355
- height: ${({$height:e})=>e||"unset"};
356
- padding: ${({$padding:e="unset"})=>e};
357
- `,Xr=Bt.div`
358
- display: flex;
359
- flex-direction: column;
360
- flex-wrap: ${({$wrap:e="unset"})=>e};
361
- align-items: ${({$alignItems:e="unset"})=>e};
362
- justify-content: ${({$justifyContent:e="unset"})=>e};
363
- gap: ${({$gap:e=2})=>e}px;
364
- width: ${({$width:e})=>e||"unset"};
365
- height: ${({$height:e})=>e||"unset"};
366
- padding: ${({$padding:e="unset"})=>e};
367
- `,Zr=Bt(Xr)`
368
- width: ${({$width:e})=>e||"100%"};
369
- height: ${({$height:e})=>e||"unset"};
370
- align-items: center;
371
- justify-content: center;
372
- `,Qr=Bt.div`
373
- display: flex;
374
- flex-direction: column;
375
- padding: 12px;
376
- overflow-y: scroll;
377
- `,ea=Bt.div`
378
- position: ${({$relativeToParent:e})=>e?"absolute":"fixed"};
379
- top: 0;
380
- left: 0;
381
- right: 0;
382
- bottom: 0;
383
- z-index: 1000;
384
- background: rgba(0, 0, 0, 0.6);
385
- backdrop-filter: blur(2px);
386
- `,ta=Bt.div`
387
- width: 800px;
388
- min-height: ${({$minHeight:e})=>e||"unset"};
389
- height: ${({$isNotModal:e})=>e?"fit-content":"calc(100vh - 350px)"};
390
- margin: ${({$isNotModal:e})=>e?"64px 0 0 0":"64px 7vw 32px 7vw"};
391
- padding: 0 2px;
392
- overflow-y: scroll;
393
- `,ia=Bt(Xr)`
394
- max-width: ${({$maxWidth:e})=>e||"unset"};
395
- width: 100%;
396
- `,na=Bt(Jr)`
397
- gap: 16px;
398
- padding: 16px;
399
- `,oa=Bt.div`
400
- width: 100%;
401
- max-height: ${({$maxHeight:e})=>e||"unset"};
402
- overflow-y: auto;
403
- `,ra=Bt.div`
404
- position: fixed;
405
- top: 50%;
406
- left: 50%;
407
- transform: translate(-50%, -50%);
408
- z-index: 1000;
409
- width: fit-content;
410
- background: ${({theme:e})=>e.colors.translucent_bg};
411
- border: ${({theme:e})=>`1px solid ${e.colors.border}`};
412
- border-radius: 40px;
413
- box-shadow: ${({theme:e})=>{const t=e.colors.primary+Do["010"];return`0px 1px 1px 0px ${t}, 0px 2px 2px 0px ${t}, 0px 5px 5px 0px ${t}, 0px 10px 10px 0px ${t}, 0px 0px 8px 0px ${t}`}};
414
- animation-name: ${_o.in.center};
415
- `,aa=Bt.div`
416
- display: flex;
417
- justify-content: space-between;
418
- align-items: center;
419
- height: 80px;
420
- border-bottom: 1px solid ${({theme:e})=>e.colors.border};
421
- padding: 0 24px;
422
- `,sa=Bt.div`
423
- cursor: pointer;
424
- display: flex;
425
- align-items: center;
426
- gap: 8px;
427
- `,la=Bt.div`
428
- display: flex;
429
- align-items: center;
430
- gap: 8px;
431
- `,ca=Bt(Zr)`
432
- min-width: 350px;
433
- min-height: 150px;
434
- `,da=Bt.div`
435
- position: absolute;
436
- left: 50%;
437
- transform: translateX(-50%);
438
- display: flex;
439
- align-items: center;
440
- justify-content: center;
441
- width: 100%;
442
- pointer-events: none;
443
- `,pa=Bt(lo)`
444
- text-transform: uppercase;
445
- font-family: ${({theme:e})=>e.font_family.secondary};
446
- pointer-events: auto;
447
- `,ua=Bt(lo)`
448
- text-transform: uppercase;
449
- font-weight: 500;
450
- font-size: 14px;
451
- font-family: ${({theme:e})=>e.font_family.secondary};
452
- text-decoration: underline;
453
- cursor: pointer;
454
- `,ha=({isOpen:e,noOverlay:t,header:i,actionComponent:n,onClose:o,children:r,closeOnEscape:a=!0})=>(Rr({key:"Escape",active:e&&a},()=>o()),kr(e),e?Ht.createPortal(zt.jsxs(zt.Fragment,{children:[zt.jsx(ea,{hidden:!e,onClick:o,style:{opacity:t?0:1}}),zt.jsxs(ra,{"data-id":"modal"+(i?`-${i.title.replaceAll(" ","-")}`:""),children:[i&&zt.jsxs(aa,{children:[zt.jsxs(sa,{onClick:o,children:[zt.jsx(Ye,{}),zt.jsx(ua,{children:"Cancel"})]}),zt.jsx(da,{children:zt.jsx(pa,{children:i.title})}),zt.jsx(la,{children:n})]}),zt.jsx(ca,{children:r})]})]}),document.body):null),ma=Bt.div`
455
- width: ${({$orientation:e,$thickness:t,$length:i})=>"vertical"===e?`${t}px`:i||"100%"};
456
- height: ${({$orientation:e,$thickness:t,$length:i})=>"horizontal"===e?`${t}px`:i||"100%"};
457
- margin: ${({$orientation:e,$margin:t})=>t||("horizontal"===e?"8px 0":"0 8px")};
458
- background-color: ${({$type:e,theme:t})=>(e?t.text[e]:t.colors.border)+Do["050"]};
459
- opacity: ${({$opacity:e})=>e||1};
460
- `,ga=({orientation:e="horizontal",type:t,thickness:i=1,length:n,margin:o,opacity:r})=>zt.jsx(ma,{$orientation:e,$type:t,$thickness:i,$length:n,$margin:o,$opacity:r}),$a=Bt.div`
461
- position: absolute;
462
- ${({$top:e})=>void 0!==e&&`top: ${e}px;`}
463
- ${({$bottom:e})=>void 0!==e&&`bottom: ${e}px;`}
464
- ${({$left:e})=>void 0!==e&&`left: ${e}px;`}
465
- ${({$right:e})=>void 0!==e&&`right: ${e}px;`}
466
- z-index: 9999;
467
-
468
- background-color: ${({theme:e})=>e.colors.info};
469
- border: 1px solid ${({theme:e})=>e.colors.border};
470
- border-radius: ${({$borderRadius:e})=>void 0!==e?e:"24px"};
471
- max-width: ${({$maxWidth:e})=>void 0!==e?e:"unset"};
472
- width: ${({$width:e})=>void 0!==e?e:"unset"};
473
-
474
- ${({$asPortal:e,$withPointerEvents:t})=>e&&!t&&"pointer-events: none;"}
475
- `,fa=Bt.div`
476
- padding: ${({$padding:e})=>void 0!==e?e:"12px"};
477
- border-bottom: 1px solid ${({theme:e})=>e.colors.border};
478
- `,xa=Bt.div`
479
- padding: ${({$padding:e})=>void 0!==e?e:"12px"};
480
- `,ba=Bt.div`
481
- padding: ${({$padding:e})=>void 0!==e?e:"12px"};
482
- border-top: 1px solid ${({theme:e})=>e.colors.border};
483
- `,ya=Et(({isOpen:e,asPortal:t,...i},n)=>{const o=yt(()=>{const{children:e,top:o,bottom:r,left:a,right:s,borderRadius:l,padding:c,maxWidth:d,width:p,header:u,footer:h,withPointerEvents:m,...g}=i;return zt.jsxs($a,{ref:n,$top:o,$bottom:r,$left:a,$right:s,$borderRadius:l,$padding:c,$maxWidth:d,$width:p,$asPortal:t,$withPointerEvents:m,...g,children:[u&&zt.jsx(fa,{$padding:c,children:u}),zt.jsx(xa,{$padding:c,children:e}),h&&zt.jsx(ba,{$padding:c,children:h})]})},[n,i,t]);return e?t?Ht.createPortal(o,document.body):o:null});ya.displayName=ya.name;const wa=Bt.div`
484
- position: relative;
485
- display: flex;
486
- align-items: center;
487
- gap: 4px;
488
- // cursor: help;
489
- `,va=Bt(lo)`
490
- word-break: break-word;
491
- white-space: pre-wrap;
492
- `,ka=({withIcon:e,titleIcon:t,title:i,text:n,timestamp:o,children:r})=>{const a=Lt(),{popupRef:s,popupOpen:l,setPopupOpen:c,popupPosition:d,handlePosition:p}=Mr({defaultClientHeight:40,defaultClientwidth:Math.min(7.5*(n?.length||0),300)}),u=yt(()=>!!ro(n||"")?.length,[n]),h=e=>{const{type:t,clientX:i,clientY:n}=e;u?p(d.left||i,d.top||n):p(i,n),c("mouseleave"!==t)};return n?zt.jsxs(wa,{onMouseEnter:h,onMouseMove:h,onMouseLeave:h,children:[r,e&&zt.jsx(je,{fill:a.v2.colors.silver[200]}),zt.jsxs(ya,{ref:s,isOpen:l,top:d.top,left:d.left,asPortal:!0,withPointerEvents:u,onMouseEnter:u?h:void 0,maxWidth:"270px",borderRadius:"16px",padding:"8px 12px",children:[(!!t||!!i)&&zt.jsxs(Jr,{style:{marginBottom:"4px"},$gap:4,children:[t&&zt.jsx(t,{size:12,fill:a.text.secondary},"icon"),i&&zt.jsx(lo,{size:12,color:a.text.secondary,children:i},"title")]}),zt.jsx(va,{size:12,color:a.text.info,children:n}),!!o&&zt.jsx(lo,{size:10,color:a.text.darker_grey,family:"secondary",style:{marginTop:"8px"},children:new Date(o).toLocaleString()})]})]}):zt.jsx(zt.Fragment,{children:r})},Ca=Bt.button`
493
- position: relative;
494
- width: ${({$size:e})=>e}px;
495
- height: ${({$size:e})=>e}px;
496
- border: ${({theme:e,$withBorder:t})=>t?`1px solid ${e.colors.border}`:"none"};
497
- border-radius: 100%;
498
- background-color: ${({$backgroundColor:e})=>e||"transparent"};
499
- display: flex;
500
- align-items: center;
501
- justify-content: center;
502
- cursor: pointer;
503
- &:hover {
504
- background-color: ${({theme:e,$backgroundColor:t})=>t?t+Do["070"]:e.colors.dropdown_bg_2};
505
- }
506
- `,Ea=Bt.div`
507
- position: absolute;
508
- top: ${({$size:e})=>e/5}px;
509
- right: ${({$size:e})=>e/5}px;
510
- width: 6px;
511
- height: 6px;
512
- border-radius: 100%;
513
- background-color: ${({theme:e,$color:t})=>t||e.colors.secondary};
514
-
515
- &::after {
516
- content: '';
517
- position: absolute;
518
- inset: 0;
519
- border-radius: 100%;
520
- background-color: ${({theme:e,$color:t})=>t||e.colors.secondary};
521
- animation: ${Ro} 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
522
- }
523
- `,Sa=({children:e,onClick:t,tooltip:i,size:n=36,withPing:o,pingColor:r,withBorder:a,backgroundColor:s,...l})=>zt.jsx(ka,{text:i,children:zt.jsxs(Ca,{$size:n,$withBorder:a,$backgroundColor:s,onClick:t,...l,children:[o&&zt.jsx(Ea,{$size:n,$color:r}),e]})}),Aa=Bt.div`
524
- position: relative;
525
- &.animated {
526
- overflow: hidden;
527
- padding-bottom: 1px;
528
- border-radius: 32px;
529
- animation: ${({$isLeaving:e})=>e?_o.out.bottom:_o.in.bottom} ${({$duration:e})=>e/10}ms forwards;
530
- }
531
- `,Da=Bt.div`
532
- position: absolute;
533
- bottom: -1px;
534
- left: 0;
535
- z-index: -1;
536
- width: 100%;
537
- height: 100%;
538
- border-radius: 32px;
539
- background-color: ${({$type:e,theme:t})=>t.text[e]};
540
- animation: ${Bo.out} ${({$duration:e})=>""+(e-e/10)}ms forwards;
541
- `,Ta=Bt.div`
542
- display: flex;
543
- align-items: center;
544
- flex: 1;
545
- gap: 8px;
546
- padding: 0 12px;
547
- border-radius: 32px;
548
- background-color: ${({$type:e,theme:t})=>t.colors[e]};
549
- `,za=Bt.div`
550
- display: flex;
551
- align-items: center;
552
- margin: 0 auto 0 0;
553
- padding: 8px 0;
554
- max-width: ${({$withAction:e,$overrideMaxWidth:t})=>t||(e?"400px":"500px")};
555
- min-height: 12px;
556
- `,Fa=Bt(lo)`
557
- font-size: 14px;
558
- color: ${({$type:e,theme:t})=>t.text[e]};
559
- `,Oa=Bt(lo)`
560
- color: ${({$type:e,theme:t})=>t.text[e]};
561
- font-size: 12px;
562
- `,Ia=Bt(Jr)``,Na=Bt(lo)`
563
- text-transform: uppercase;
564
- text-decoration: underline;
565
- font-size: 12px;
566
- font-family: ${({theme:e})=>e.font_family.secondary};
567
- white-space: nowrap;
568
- cursor: pointer;
569
- &:hover {
570
- transform: scale(1.1);
571
- transition: transform 0.3s;
572
- }
573
- `,_a=({type:e,icon:t,title:i,message:n,action:o,onClose:r,duration:a=5e3,overrideMaxWidth:s,style:l})=>{const c=Lt(),[d,p]=wt(!1),u=kt(null),h=kt(null),m=e=>{r&&(p(!0),r({asSeen:e?.asSeen}))};vt(()=>(u.current=setTimeout(()=>m({asSeen:!1}),a),()=>{u.current&&clearTimeout(u.current)}),[a]);const g=t||Sn(e,c);return zt.jsxs(Aa,{className:r?"animated":"",$duration:a,$isLeaving:d,onMouseEnter:()=>{u.current&&clearTimeout(u.current),h.current&&(h.current.style.animationPlayState="paused")},onMouseLeave:()=>{if(h.current){const e=h.current.offsetWidth/h.current.parentElement.offsetWidth*a;u.current=setTimeout(()=>m({asSeen:!1}),e),h.current.style.animationPlayState="running"}},children:[zt.jsxs(Ta,{"data-id":"toast",$type:e,style:l,children:[zt.jsx(g,{fill:c.text[e]}),zt.jsxs(za,{$withAction:!!o,$overrideMaxWidth:s,children:[i&&zt.jsx(Fa,{$type:e,children:i}),i&&n&&zt.jsx(ga,{orientation:"vertical",type:e}),n&&zt.jsx(Oa,{$type:e,children:n})]}),(!!o||!!r)&&zt.jsxs(Ia,{children:[o&&zt.jsx(Na,{"data-id":"toast-action",onClick:o.onClick,children:o.label}),r&&zt.jsx(Sa,{"data-id":"toast-close",onClick:()=>m({asSeen:!0}),children:zt.jsx(Ye,{size:12})})]})]}),r&&zt.jsx(Da,{ref:h,$duration:a,$type:e})]})},Ba=Bt.div`
574
- padding: 24px 32px;
575
- `,Ra=Bt.div`
576
- padding: ${({$withNote:e})=>e?"12px 0px":"12px 0px 32px 0"};
577
- `,La=Bt(lo)`
578
- font-size: 20px;
579
- line-height: 28px;
580
- `,Ma=Bt(lo)`
581
- color: ${({theme:e})=>e.text.grey};
582
- width: 416px;
583
- font-style: normal;
584
- font-weight: 300;
585
- line-height: 24px;
586
- `,Pa=Bt.div`
587
- display: flex;
588
- justify-content: space-between;
589
- gap: 12px;
590
- `,ja=Bt(br)`
591
- width: 250px;
592
- `,Ua=Bt.div`
593
- margin-bottom: 12px;
594
- `,Wa=({isOpen:e,noOverlay:t,title:i="",description:n="",note:o,approveButton:r,denyButton:a,closeOnEscape:s=!0})=>{Rr({key:"Enter",active:e&&s},()=>r.onClick());const l=()=>a.onClick();return zt.jsx(ha,{isOpen:e,noOverlay:t,onClose:l,children:zt.jsxs(Ba,{children:[zt.jsx(La,{children:i}),zt.jsx(Ra,{$withNote:!!o,children:zt.jsx(Ma,{children:n})}),!!o&&zt.jsx(Ua,{children:zt.jsx(_a,{type:o.type,title:o.title,message:o.message})}),zt.jsxs(Pa,{children:[zt.jsx(ja,{"data-id":"approve",variant:r.variant||"primary",onClick:()=>r.onClick(),children:r.text}),zt.jsx(ja,{"data-id":"deny",variant:a.variant||"secondary",onClick:l,children:a.text})]})]})})},Va=({isOpen:e,noOverlay:t,name:i,onApprove:n,onDeny:o})=>zt.jsx(Wa,{isOpen:e,noOverlay:t,title:"Cancel"+(i?` ${i}`:""),description:"Are you sure you want to cancel?",approveButton:{text:"Confirm",variant:Ci.Warning,onClick:n},denyButton:{text:"Go Back",onClick:o}}),Ha=Bt.div`
595
- display: flex;
596
- align-items: center;
597
- gap: 8px;
598
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
599
- opacity: ${({$disabled:e})=>e?.6:1};
600
- `,qa=Bt.div`
601
- width: 18px;
602
- height: 18px;
603
- border-radius: 6px;
604
- border: 1px dashed ${({$isChecked:e,$isPartiallyChecked:t,theme:i})=>e||t?"transparent":i.colors.secondary};
605
- display: flex;
606
- align-items: center;
607
- justify-content: center;
608
- background-color: ${({$isChecked:e,$isPartiallyChecked:t,theme:i})=>e?i.colors.majestic_blue:t?i.colors.majestic_blue_soft:i.colors.secondary+Do["020"]};
609
- pointer-events: ${({$disabled:e})=>e?"none":"auto"};
610
- transition: border 0.3s;
611
- &:hover {
612
- border: 1px solid ${({theme:e})=>e.colors.secondary};
613
- }
614
- `,Ga=({title:e,titleColor:t,tooltip:i,value:n=!1,partiallyChecked:o=!1,onChange:r,disabled:a,style:s,errorMessage:l,allowPropagation:c=!1})=>{const d=Lt(),[p,u]=wt(n);return vt(()=>u(n),[n]),zt.jsxs(Xr,{children:[zt.jsxs(Ha,{"data-id":"checkbox"+(e?`-${e}`:""),$disabled:a,onClick:e=>{a||(c||e.stopPropagation(),r?r(!!o||!p):u(e=>!!o||!e))},style:s,children:[zt.jsx(qa,{$isChecked:p,$isPartiallyChecked:o,$disabled:a,children:o?zt.jsx(Je,{fill:d.text.white}):p?zt.jsx(Ge,{fill:d.text.white}):null}),e&&zt.jsx(ka,{text:i,withIcon:!0,children:zt.jsx(lo,{size:12,color:t||d.text.grey,style:{maxWidth:"90%"},children:e})})]}),!!l&&zt.jsx(uo,{children:l})]})},Ka=Bt(Jr)`
615
- gap: 0;
616
- `,Ya=Bt.button`
617
- padding: 4px 8px;
618
- background-color: ${({theme:e,$selected:t})=>t?e.colors.dropdown_bg_2:"transparent"};
619
- border-radius: ${({$position:e})=>"left"===e?"32px 0px 0px 32px":"right"===e?"0px 32px 32px 0px":"0"};
620
- border: 1px solid ${({theme:e})=>e.colors.border};
621
- display: flex;
622
- align-items: center;
623
- justify-content: center;
624
- cursor: pointer;
625
- &:hover {
626
- border: 1px solid ${({theme:e})=>e.colors.secondary};
627
- }
628
- `,Ja=({isPrettyMode:e,setIsPrettyMode:t})=>zt.jsxs(Ka,{children:[zt.jsx(Ya,{$position:"left",$selected:e,onClick:()=>t(!0),children:zt.jsx(Xe,{})}),zt.jsx(Ya,{$position:"right",$selected:!e,onClick:()=>t(!1),children:zt.jsx(Ze,{})})]}),Xa=Bt.table`
629
- border-collapse: collapse;
630
- font-family: ${({theme:e})=>e.font_family.primary};
631
- `,Za=Bt.tbody``,Qa=Bt.tr`
632
- td:first-child {
633
- padding-left: 0 !important;
634
- }
635
- td:last-child {
636
- padding-right: 0 !important;
637
- }
638
- `,es=Bt.td`
639
- vertical-align: top;
640
- padding: 4px 6px;
641
- `,ts=Bt(lo)`
642
- white-space: nowrap;
643
- `,is=Bt.span`
644
- white-space: ${({$noWrap:e})=>e?"nowrap":"pre-wrap"};
645
- overflow-wrap: break-word;
646
- word-break: break-word;
647
- word-wrap: break-word;
648
- /* Fallback for older browsers */
649
- -ms-word-break: break-all;
650
- font-size: 12px;
651
- `,ns=({language:e,code:t,theme:i,flatten:n,pretty:o})=>{const{darkMode:r}=Lt(),a=i?Jt[i]:r?Jt.palenight:Jt.vsLight;let s="";if("json"===e){const e=zn(t,{}),i=Gn(e);s=Kn(n?tn(i):i)}else s=t;return o&&"json"===e?zt.jsx(os,{darkMode:r,str:s}):zt.jsx(Yt,{theme:a||(r?Jt.palenight:Jt.vsLight),language:e,code:s,children:({getLineProps:e,getTokenProps:t,tokens:i})=>zt.jsx("pre",{children:i.map((i,n)=>zt.jsx("div",{...e({line:i}),children:i.map((e,i)=>zt.jsx(is,{...t({token:e})},`line-${n}-token-${i}`))},`line-${n}`))})})},os=({darkMode:e,str:t})=>{const i=Lt(),n=(e,t)=>{const n=new Array(e).fill(e=>zt.jsxs(Qa,{...e,children:[zt.jsx(es,{}),zt.jsx(es,{})]}));return zt.jsx(bt,{children:n.map((e,n)=>zt.jsx(e,{style:0===n?{borderBottom:`1px solid ${i.colors.border}`}:{}},`empty-row-${t}-${n}`))})};return zt.jsx(Yt,{theme:e?Jt.palenight:Jt.vsLight,language:"json",code:t,children:({getLineProps:e,getTokenProps:t,tokens:o})=>zt.jsx(Xa,{children:zt.jsx(Za,{children:o.map((o,r)=>{const a=(e=>{const t=["punctuation","plain","operator"];return e.filter(e=>!t.includes(e.types[0])).map(({types:e,content:t})=>{const i=[...e],n=["property","string"].includes(i[0])?t.replace(/"/g,""):t;return"string"===i[0]&&(["true","false"].includes(n.split("@")[0])&&(i[0]="boolean"),n.split("@")[0].match(/^[0-9]+$/)&&(i[0]="number")),{types:i,content:n}})})(o),s=e({line:a});return 1===a.length&&"property"===a[0].types[0]?zt.jsxs(bt,{children:[n(2,r),zt.jsxs(Qa,{...s,children:[zt.jsx(es,{children:zt.jsx(ts,{children:a[0].content})}),zt.jsx(es,{})]})]},`line-${r}`):2===a.length?zt.jsx(Qa,{...s,children:a.map((e,n)=>{const{text:o,components:a}=((e,t)=>{const[i,...n]=e.split("@");return{text:i,components:n?.map((e,i)=>{if(!e.includes("="))return null;const[n,o]=e.split("=");switch(n){case"tooltip":return zt.jsx(ka,{withIcon:!0,text:o},`${n}-${o}-${i}`);case"status":if("none"===o)return zt.jsx("div",{style:{width:16,height:16}},`${n}-${o}-${i}`);let e=Sn(o,t);return e||(e=Sn(Ci.Warning,t)),zt.jsx(e,{},`${n}-${o}-${i}`);default:return null}})?.filter(e=>!!e)||[]}})(e.content,i),s=0===n;return zt.jsx(es,{children:zt.jsxs(Jr,{children:[zt.jsx(Jr,{children:a}),zt.jsx(is,{$noWrap:s,...t({token:e}),children:o})]})},`line-${r}-token-${n}`)})},`line-${r}`):(a.length,null)})})})})},rs={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 as(e){if("number"==typeof e)return{value:e,unit:"px"};let t;const i=(e.match(/^[0-9.]*/)||"").toString();t=i.includes(".")?parseFloat(i):parseInt(i,10);const n=(e.match(/[^0-9]*$/)||"").toString();return rs[n]?{value:t,unit:n}:{value:t,unit:"px"}}function ss(e){const t=as(e);return`${t.value}${t.unit}`}const ls=(()=>{const e="react-spinners-FadeLoader-fade";if("undefined"==typeof window||!window.document)return e;const t=document.createElement("style");document.head.appendChild(t);const i=t.sheet,n=`\n @keyframes ${e} {\n 50% {opacity: 0.3} 100% {opacity: 1}\n }\n `;return i&&i.insertRule(n,0),e})(),cs=({loading:e=!0,color:t,scale:i=1,speedMultiplier:n=1,cssOverride:o={},style:r={},...a})=>{const s=Lt(),l=t||s.text.secondary;if(!e)return null;const{value:c}=as(2),d=c+4.2,p=d/2+d/5.5,u=4*d*i,h={position:"relative",width:`${u}px`,height:`${u}px`,scale:i,...r,...o},m=(e,t)=>({position:"absolute",width:ss(1.5),height:ss(4),borderRadius:ss(2),backgroundColor:l,transition:"2s",animationFillMode:"both",animation:`${ls} ${1.2/n}s ${.12*e}s infinite ease-in-out`,transform:`translate(-50%, -50%) rotate(${t}deg)`});return zt.jsxs("span",{style:h,...a,children:[zt.jsx("span",{style:{...m(1,0),top:`calc(50% + ${d}px)`,left:"50%"}}),zt.jsx("span",{style:{...m(2,-45),top:`calc(50% + ${p}px)`,left:`calc(50% + ${p}px)`}}),zt.jsx("span",{style:{...m(3,90),top:"50%",left:`calc(50% + ${d}px)`}}),zt.jsx("span",{style:{...m(4,45),top:`calc(50% + ${-1*p}px)`,left:`calc(50% + ${p}px)`}}),zt.jsx("span",{style:{...m(5,0),top:`calc(50% + ${-1*d}px)`,left:"50%"}}),zt.jsx("span",{style:{...m(6,-45),top:`calc(50% + ${-1*p}px)`,left:`calc(50% + ${-1*p}px)`}}),zt.jsx("span",{style:{...m(7,90),top:"50%",left:`calc(50% + ${-1*d}px)`}}),zt.jsx("span",{style:{...m(8,45),top:`calc(50% + ${p}px)`,left:`calc(50% + ${-1*p}px)`}})]})},ds=Bt.div`
652
- margin: ${({$align:e})=>"right"===e?"auto 6px auto auto":"left"===e?"auto auto auto 6px":"auto"};
653
- display: flex;
654
- align-items: center;
655
- justify-content: center;
656
- `,ps=({extend:e,size:t=14,align:i="center"})=>zt.jsx(ds,{$align:i,children:zt.jsx(Qe,{size:t,rotate:e?180:0})}),us=Bt.div`
657
- border-radius: 24px;
658
- background-color: ${({theme:e,$status:t})=>t===Ci.Error?e.text.error+Do["010"]:t===Ci.Warning?e.text.warning+Do["010"]:e.colors.secondary+Do["005"]};
659
- &:hover {
660
- background-color: ${({theme:e,$status:t})=>t===Ci.Error?e.text.error+Do["020"]:t===Ci.Warning?e.text.warning+Do["020"]:e.colors.secondary+Do["010"]};
661
- }
662
- cursor: pointer;
663
- transition: background 0.3s;
664
- `,hs=Bt.div`
665
- display: flex;
666
- align-items: center;
667
- gap: 12px;
668
- padding: 12px 18px;
669
- `,ms=Bt.div`
670
- display: flex;
671
- flex-direction: column;
672
- gap: 8px;
673
- padding: 6px 18px 12px 18px;
674
- `,gs=Bt.div`
675
- display: flex;
676
- align-items: center;
677
- gap: 12px;
678
- `,$s=Bt(lo)`
679
- white-space: nowrap;
680
- `,fs=Bt(Xr)`
681
- width: 16px;
682
- `,xs=({conditions:e,headerLabelError:t="Something Failed",headerLabelWarning:i="Something isn't right",headerLabelSuccess:n="Everything Successful"})=>{const o=Lt(),[r,a]=wt(!1),s=yt(()=>jn(e),[e]),{errors:l,hasErrors:c,warnings:d,hasWarnings:p,hasDisableds:u,hasLoadings:h}=yt(()=>sn(s),[s]);vt(()=>{a(c||p||u||h)},[c,p,u,h]);const m=(!s.length||h)&&!c&&!p&&!u,g=c?Ci.Error:p?Ci.Warning:u?Ci.Info:Ci.Success,$=Sn(g,o),f=c?t:p||u?i:m?"Loading...":n,x=c?o.text.error:p?o.text.warning:o.text.info,b=`(${c?l.length:p?d.length:s.length}/${s.length})`,y=c?o.text.error_secondary:p?o.text.warning_secondary:o.text.info_secondary,w=Ct(()=>a(e=>!e),[]);return zt.jsxs(us,{onClick:w,$status:g,children:[zt.jsxs(hs,{children:[m?zt.jsx(cs,{}):zt.jsx($,{}),zt.jsx(lo,{color:x,size:14,children:f}),zt.jsx(lo,{color:y,size:12,family:"secondary",children:b}),zt.jsx(ps,{extend:r,align:"right"})]}),r&&zt.jsx(ms,{children:s.map(({status:e,type:t,reason:i,message:n,lastTransitionTime:r},a)=>{const s=e===Si.Loading?()=>zt.jsx(cs,{scale:.8}):e===Si.Disabled?Sn(Ci.Info,o):Sn(e,o),l=e===Si.Disabled?o.text.info:e===Ci.Error?o.text.error:e===Ci.Warning?o.text.warning:o.text.info,c=e===Si.Disabled?o.text.info_secondary:e===Ci.Error?o.text.error_secondary:e===Ci.Warning?o.text.warning_secondary:o.text.info_secondary;return zt.jsxs(gs,{children:[zt.jsx(fs,{children:zt.jsx(s,{})}),zt.jsxs(Jr,{$gap:12,style:{width:"100%",justifyContent:"space-between"},children:[zt.jsxs(lo,{color:l,size:12,children:[zt.jsx($s,{color:c,size:12,weight:700,children:t}),n||i]}),zt.jsx($s,{color:l,size:12,children:new Date(r).toLocaleString()})]})]},`condition-${a}`)})})]})},bs=Bt.div`
683
- display: flex;
684
- align-items: center;
685
- gap: ${({$size:e})=>e/3}px;
686
- padding: ${({$size:e,$withBorder:t,$withBackground:i})=>t||i?`${e/(t?3:2)}px ${e/(t?1.5:1)}px`:"0"};
687
- width: ${({$width:e})=>e||"fit-content"};
688
- border-radius: 360px;
689
- border: ${({$withBorder:e,$status:t,theme:i})=>e?`1px solid ${i.text[t]+Do["050"]}`:"none"};
690
- background: ${({$withBackground:e,$status:t,theme:i})=>e?`linear-gradient(90deg, transparent 0%, ${i.text[t]+Do["030"]} 100%)`:"transparent"};
691
- `,ys=Bt.div`
692
- display: flex;
693
- align-items: center;
694
- `,ws=Bt.div`
695
- display: flex;
696
- align-items: center;
697
- `,vs=({title:e,subtitle:t,status:i=Ci.Default,forceIcon:n,withIcon:o,withBorder:r,withBackground:a,width:s,size:l=12,family:c="secondary",nowrap:d=!1})=>{const p=Lt(),u=[Si.Loading,Si.Disabled].includes(i)?Ci.Info:i,h=n?()=>zt.jsx(n,{size:l+2,fill:p.text[u]}):i===Si.Loading?()=>zt.jsx(cs,{scale:.8}):()=>Sn(u,p)?.({size:l+2});return zt.jsxs(bs,{$status:u,$width:s,$size:l,$withIcon:o,$withBorder:r,$withBackground:a,children:[o&&zt.jsx(ys,{children:zt.jsx(h,{})}),(!!e||!!t)&&zt.jsxs(ws,{children:[!!e&&zt.jsx(lo,{size:l,family:c,color:p.text[u],nowrap:d,children:e}),!!e&&!!t&&zt.jsx(ga,{orientation:"vertical",length:l-2+"px",type:u}),!!t&&zt.jsx(lo,{size:l-2,family:c,color:p.text[`${u}_secondary`],nowrap:d,children:t})]})]})},ks=({label:e,onClick:t,variant:i="tertiary",textProps:n,...o})=>{const r=Lt();return zt.jsxs(br,{onClick:t,variant:i,...o,children:[zt.jsx(et,{fill:"primary"===i?r.text.primary:r.text.info}),zt.jsx(lo,{size:14,family:"secondary",decoration:"underline",color:"primary"===i?r.text.primary:void 0,...n,children:e||Qi.ADD})]})},Cs=Bt(Jr)`
698
- width: 100%;
699
- border-radius: 8px;
700
- background-color: ${({theme:e})=>e.colors.secondary+Do["010"]};
701
- pre {
702
- color: ${({theme:e})=>e.text.default};
703
- font-size: 12px;
704
- overflow-x: auto;
705
- width: 100%;
706
- padding-left: 12px;
707
- }
708
- `,Es=({value:e,callbackCopyDone:t})=>{const{clickCopy:i,isCopied:n}=zr();return zt.jsxs(Cs,{children:[zt.jsx("pre",{children:e}),zt.jsx(Sa,{onClick:n=>{n.stopPropagation(),i(e),t?.()},tooltip:n?"Copied!":"Copy",children:n?zt.jsx(Ge,{}):zt.jsx(Ke,{})})]})},Ss=({label:e,onClick:t,variant:i="tertiary",...n})=>{const o=Lt();return zt.jsxs(br,{onClick:t,variant:i,...n,children:[zt.jsx(tt,{fill:"primary"===i?o.text.primary:o.text.info}),zt.jsx(lo,{size:14,family:"secondary",decoration:"underline",color:"primary"===i?o.text.primary:void 0,children:e||Qi.EDIT})]})},As=({onClick:e})=>zt.jsx(_a,{type:Ci.Default,icon:qe,message:Zi.QUICK_BACK_TO_SUMMARY,action:{label:Zi.GO_TO_SUMMARY,onClick:e}}),Ds=Bt(lo)`
709
- max-width: ${({$maxWidth:e})=>e?`${e}px`:"unset"};
710
- white-space: nowrap;
711
- overflow-x: auto;
712
-
713
- &::after {
714
- // This is to prevent the "browser default tooltip" from appearing when the title is too long
715
- content: '';
716
- display: block;
717
- }
718
- `,Ts=({maxWidth:e,text:t,textSize:i=16,textColor:n})=>{const[o,r]=wt(!1),a=kt(null);return vt(()=>{if(a.current){const{clientWidth:t}=a.current;r(t<1.05*(e-i)&&t>.95*(e-i))}},[e,i,t]),zt.jsxs(Jr,{$gap:0,children:[t&&zt.jsx(ka,{text:o?t:void 0,children:zt.jsx(Ds,{ref:a,$maxWidth:e-i,size:i,color:n,children:t})}),o&&zt.jsx(Ds,{$maxWidth:i,size:i,color:n,children:"..."})]})},zs=({src:e="",alt:t="",size:i=16})=>{const[n,o]=wt(!1);return e&&!n?zt.jsx("img",{src:e,alt:t,width:i,height:i,onError:()=>o(!0)}):zt.jsx(a,{size:i})},Fs=Bt.div`
719
- display: flex;
720
- align-items: center;
721
- justify-content: center;
722
- width: ${({$size:e})=>e}px;
723
- height: ${({$size:e})=>e}px;
724
- border-radius: 8px;
725
- background: ${({$status:e,theme:t})=>{const i=t.colors[e||"dropdown_bg_2"];return`linear-gradient(180deg, ${i} 0%, ${i+Do["030"]} 100%)`}};
726
- `,Os=({icon:e,src:t="",alt:i="",status:n,size:o=36})=>zt.jsx(Fs,{$status:n,$size:o,children:t?zt.jsx(zs,{src:t,alt:i,size:o-12}):e?zt.jsx(e,{size:o-12}):zt.jsx(a,{size:o-12})}),Is=Bt.div`
727
- position: relative;
728
- display: flex;
729
- flex-wrap: wrap;
730
- align-items: center;
731
- justify-content: center;
732
- width: ${({$size:e})=>e}px;
733
- height: ${({$size:e})=>e}px;
734
- `,Ns=Bt.div`
735
- position: absolute;
736
- top: ${({$top:e})=>e}px;
737
- left: ${({$left:e})=>e}px;
738
- z-index: ${({$zIndex:e})=>e};
739
- display: flex;
740
- align-items: center;
741
- justify-content: center;
742
- width: ${({$size:e})=>e}px;
743
- height: ${({$size:e})=>e}px;
744
- border-radius: 100%;
745
- border: 1px solid ${({theme:e,$status:t})=>(t?e.text[t]:e.colors.border)+Do["030"]};
746
- background: ${({$status:e,theme:t})=>{const i=t.colors[e||"dropdown_bg_2"];return`linear-gradient(180deg, ${i} 0%, ${i+Do["030"]} 100%)`}};
747
- `,_s=({icons:e=[],iconSrcs:t=[],status:i,size:n=36,id:o})=>{const r=Lt(),a=1===e.length||1===t.length?n-12:n/2.7;if(t.length>0)return zt.jsx(_s,{icons:t.map(e=>()=>zt.jsx(zs,{src:e,size:a})),status:i,size:n,id:o});if(1===e.length)return zt.jsx(Os,{icon:e[0],status:i,size:n});const s=t=>e.length<=2?.5*a:0===t||1===t?0:1.15*a,l=e=>0===e?0:1===e?1.15*a:1.15*a*.5;return zt.jsx(Is,{$status:i,$size:n,children:e.map((t,n)=>n>2?null:zt.jsx(Ns,{$status:i,$size:1.5*a,$top:s(n),$left:l(n),$zIndex:n+1,children:2===n&&e.length>3?zt.jsxs(lo,{family:"secondary",color:r.text.dark_grey,size:.8*a,children:["+",e.length-2]}):zt.jsx(t,{size:a})},`icon-${o}-${n}`))})},Bs=Ho.map(({id:e})=>e),Rs=({monitors:e=Bs,withTooltips:t,withLabels:i,size:n=12,color:o})=>{const r=Lt(),a=o||r.text.grey;return zt.jsx(Jr,{$gap:i?n:n/2,children:e.filter(e=>!!e).map(e=>{const o=e.toLowerCase(),r=Xt(o),s=bn(o);return s?zt.jsx(ka,{text:t?r:"",children:zt.jsxs(Jr,{$gap:n/3,children:[zt.jsx(s,{size:i?n+2:n,fill:a}),i&&zt.jsx(lo,{size:n,color:a,children:r})]})},o):null})})},Ls=Bt.div`
748
- visibility: hidden;
749
- `,Ms=Bt.div`
750
- display: flex;
751
- flex-direction: column;
752
- align-self: stretch;
753
- padding: 16px;
754
- width: calc(100% - 32px);
755
- border-radius: 16px;
756
- background-color: ${({theme:e,$status:t,$bgColor:i})=>i||(t?e.text[t]+Do["010"]:e.colors.secondary+Do["005"])};
757
- opacity: ${({$faded:e})=>e?.5:1};
758
-
759
- ${({theme:e,$status:t,$bgColorHover:i,$withClick:n})=>n?Rt`
760
- &:hover {
761
- cursor: pointer;
762
- background-color: ${i||(t?e.text[t]+Do["020"]:e.colors.secondary+Do["010"])};
763
- ${Ls} {
764
- visibility: visible;
765
- }
766
- }
767
- `:`\n &:hover {\n ${Ls} {\n visibility: visible;\n }\n }\n `}
768
- `,Ps=Bt.div`
769
- display: flex;
770
- align-items: center;
771
- gap: 8px;
772
- margin-left: auto;
773
- `,js=Bt(lo)`
774
- margin-right: 16px;
775
- `,Us=Bt(lo)`
776
- font-size: 10px;
777
- color: ${({theme:e})=>e.text.grey};
778
- `,Ws=({title:e,subTitle:t,hoverText:i,onClick:n,renderActions:o,iconProps:{icon:r,icons:a,iconSrc:s,iconSrcs:l}={},visualProps:{status:c,faded:d,bgColor:p,bgColorHover:u,monitors:h,monitorsWithLabels:m,componentsUnderTitles:g}={},checkboxProps:{withCheckbox:$,isCheckboxDisabled:f,isChecked:x,isLoading:b,onCheckboxChange:y}={},extendableProps:{withExtend:w,isExtended:v,renderExtended:k}={},...C})=>{const E=Lt(),[S,A]=wt(v||!1),[D,T]=wt(0),z=kt(null),F=kt(null),O=kt(null);return vt(()=>{if(z.current){const e=z.current.clientWidth,t=F.current?.clientWidth||0;T(e-(($?125:85)+t))}},[$]),zt.jsxs(Ms,{ref:z,$status:c,$faded:d,$bgColor:p,$bgColorHover:u,$withClick:!!n,onClick:n,...C,children:[zt.jsxs(Jr,{$gap:8,children:[zt.jsxs(Jr,{$gap:16,children:[b?zt.jsx(cs,{}):$?zt.jsx(Ga,{value:x,onChange:y,disabled:f}):null,a?.length||l?.length?zt.jsx(_s,{icons:a,iconSrcs:l,status:c,id:`${e}-${t}`}):r||s?zt.jsx(Os,{icon:r,src:s,status:c}):null]}),zt.jsxs(Xr,{$gap:4,children:[e&&zt.jsx(Ts,{maxWidth:D,text:e,textSize:14}),zt.jsxs(Jr,{$gap:4,children:[t&&zt.jsx(Ts,{maxWidth:D-(O.current?.clientWidth||0),text:t,textSize:10,textColor:E.text.grey}),h&&h.length>0&&zt.jsxs(Jr,{$gap:4,ref:O,children:[t&&zt.jsx(Us,{children:"•"}),zt.jsx(Rs,{monitors:h,withLabels:m,size:10})]})]}),g&&g.length>0?zt.jsx(Jr,{$gap:4,children:g?.map((e,t)=>zt.jsx(bt,{children:e},`componentsUnderTitles-${t}`))}):null]}),zt.jsxs(Ps,{ref:F,children:[!!i&&zt.jsx(Ls,{children:zt.jsx(js,{size:14,family:"secondary",children:i})}),o&&o(),w&&zt.jsxs(bt,{children:[zt.jsx(ga,{orientation:"vertical",length:"16px",margin:"0 2px"}),zt.jsx(Sa,{onClick:()=>A(e=>!e),children:zt.jsx(ps,{extend:S})})]})]})]}),S&&k&&zt.jsxs(Xr,{children:[zt.jsx(ga,{margin:"16px 0"}),k()]})]})},Vs=Bt(Jr)`
779
- width: 100%;
780
- justify-content: space-between;
781
- `,Hs=Bt(lo)`
782
- font-size: 12px;
783
- color: ${({theme:e})=>e.text.grey};
784
- `,qs=Bt(lo)`
785
- font-size: 10px;
786
- color: ${({theme:e})=>e.text.darker_grey};
787
- `,Gs=Bt.div`
788
- display: flex;
789
- align-items: center;
790
- gap: 8px;
791
- margin-left: auto;
792
- `,Ks=Bt(lo)`
793
- font-size: 12px;
794
- text-align: right;
795
- `,Ys=({title:e,subTitle:t,tooltip:i,value:n})=>zt.jsxs(Vs,{children:[zt.jsx(Xr,{$gap:4,children:zt.jsxs(ka,{text:i||"",children:[e&&zt.jsx(Hs,{children:e},"title"),t&&zt.jsx(qs,{children:t},"subtitle")]})}),zt.jsx(Gs,{children:n?.status?zt.jsx(vs,{status:"transitioning"===n.status?Si.Loading:n.status,title:n.text||n.status,withBorder:!0,withIcon:!0}):zt.jsx(Ks,{children:n?.text||"-"})})]}),Js=Bt(Xr)`
796
- width: 100%;
797
- `,Xs=({containerName:e,actualDevices:t,started:i,ready:n,instrumentationInstances:o})=>{const r=yt(()=>{const e=[];return i?.name&&e.push(zt.jsx(vs,{status:Bn(i.value)?Hn(i.value)?Ci.Success:Ci.Error:Ci.Default,title:i.name,withIcon:!0,withBorder:!0,size:8},"started")),n?.name&&e.push(zt.jsx(vs,{status:Bn(n.value)?Hn(n.value)?Ci.Success:Ci.Error:Ci.Default,title:n.name,withIcon:!0,withBorder:!0,size:8},"ready")),e},[i?.name,i?.value,n?.name,n?.value]);return zt.jsx(Ws,{title:e.value,subTitle:o.length?`${o.length} Instrumented Processes`:void 0,visualProps:{componentsUnderTitles:r},renderActions:()=>zt.jsx(vs,{status:Ci.Info,title:"Instrumentation Device",subtitle:t.value&&"[]"!==t.value?t.value:"none",withBorder:!0}),extendableProps:{isExtended:!!o.length,renderExtended:()=>zt.jsx(Js,{$gap:24,children:o.map((e,t)=>zt.jsxs(Js,{$gap:8,children:[zt.jsx(Ys,{title:`Instrumented Process #${t+1}`,subTitle:e.message?.value||"",value:{status:e.healthy.status,text:e.healthy.status===Ci.Success?"healthy":"unhealthy"}}),e.identifyingAttributes?.map(({name:e,value:t})=>zt.jsx(Ys,{title:e,subTitle:"",value:{text:t,status:void 0}},`describe-${e}-${t}`))]},`process-${t}`))})}})},Zs=({title:e="Data not found",subTitle:t})=>{const i=Lt().v2.colors.grey[400];return zt.jsxs(Zr,{children:[zt.jsxs(Jr,{$gap:8,children:[zt.jsx(it,{fill:i}),zt.jsx(to,{size:Qn.XS,color:i,align:"center",children:e})]}),t&&zt.jsx(to,{size:Qn.XXS,color:i,align:"center",children:t})]})},Qs=Bt(Xr)`
798
- max-width: 300px;
799
- padding: 12px;
800
- border-radius: 12px;
801
- background-color: ${({theme:e})=>e.colors.dropdown_bg};
802
- justify-content: center;
803
- `,el=St(({id:e,data:t})=>{const{title:i,subTitle:n}=t;return zt.jsx(Qs,{"data-id":e,children:zt.jsx(Zs,{title:i,subTitle:n})})});el.displayName=el.name;const tl=Bt.div`
804
- padding: 6px;
805
- border-radius: 12px;
806
- background-color: ${({theme:e})=>e.colors.dropdown_bg};
807
- cursor: pointer;
808
- `,il=Bt.div`
809
- position: relative;
810
- `,nl=Bt(Jr)`
811
- position: absolute;
812
- bottom: -24px;
813
- left: 50%;
814
- transform: translateX(-50%);
815
- gap: 4px;
816
- `,ol=Bt.div`
817
- position: absolute;
818
- bottom: 100%;
819
- left: 100%;
820
- width: 300px;
821
- padding: 12px;
822
- border-radius: 16px;
823
- border: 1px solid ${({theme:e})=>e.colors.border};
824
- background-color: ${({theme:e})=>e.colors.dropdown_bg};
825
- `,rl=({title:e,value:t})=>{const i=Lt();return zt.jsxs(Jr,{$justifyContent:"space-between",children:[zt.jsx(lo,{size:12,color:i.text.info,children:e}),zt.jsx(lo,{size:12,family:"secondary",children:t})]})},al=St(({id:e,data:t})=>{const{id:i,status:n,title:o,icons:r,serviceMapEntry:a}=t,{activeNodeType:s,activeNodeId:l}=jo(),c=Lt(),d=n===Ci.Error?Sn(n,c):null;return zt.jsxs(zt.Fragment,{children:[zt.jsx(jt,{type:"source",position:Ut.Bottom,style:{visibility:"hidden"}}),zt.jsx(jt,{type:"target",position:Ut.Top,style:{visibility:"hidden"}}),zt.jsxs(il,{"data-id":e,children:[zt.jsx(tl,{children:zt.jsx(_s,{id:i,icons:r,status:n})}),zt.jsxs(nl,{children:[d&&zt.jsx(d,{}),zt.jsx(Ts,{maxWidth:100,text:o})]}),s===Ti.MapItem&&l===e&&zt.jsxs(ol,{children:[zt.jsxs(Jr,{$gap:12,children:[zt.jsx(_s,{id:i,icons:r,status:n}),zt.jsx(lo,{size:20,children:o})]}),a&&a.services.length>0?a.services.map(({serviceName:e,requests:t,dateTime:n})=>zt.jsxs("div",{children:[zt.jsx(ga,{}),zt.jsx(rl,{title:"Connected Service",value:e}),zt.jsx(rl,{title:"Outgoing Requests",value:t}),zt.jsx(rl,{title:"Last Requested At",value:new Date(n).toLocaleString()})]},`from-${i}-to-${e}`)):zt.jsxs(zt.Fragment,{children:[zt.jsx(ga,{}),zt.jsx(Zs,{title:"No outgoing connections",subTitle:" "})]})]})]})]})});al.displayName=al.name;const sl=Bt.div`
826
- height: calc(100vh - 160px);
827
- .react-flow__attribution {
828
- visibility: hidden;
829
- }
830
- `,ll=Bt.div`
831
- button {
832
- padding: 8px;
833
- margin: 8px;
834
- border-radius: 8px;
835
- border: 1px solid ${({theme:e})=>e.colors.border} !important;
836
- background-color: ${({theme:e})=>e.colors.dropdown_bg};
837
- path {
838
- fill: ${({theme:e})=>e.text.secondary};
839
- }
840
- &:hover {
841
- background-color: ${({theme:e})=>e.colors.dropdown_bg_2};
842
- }
843
- }
844
- `,cl={[Ti.MapItem]:al,[Ti.NoData]:el},dl=({nodes:e,edges:t,onNodesChange:i,onEdgesChange:n,fitView:o=!1,zoomOnScroll:r=!1})=>{const{onClickNode:a}=Cr(),{setActiveNodeType:s,setActiveNodeId:l}=jo();return zt.jsx(sl,{children:zt.jsx(Wt,{fitView:o,zoomOnScroll:r,nodes:e,nodeTypes:cl,edges:t,onNodeClick:a,onNodesChange:e=>{setTimeout(()=>i(e),0)},onEdgesChange:e=>{setTimeout(()=>n(e),0)},onBlur:()=>{s(null),l(null)},onlyRenderVisibleElements:!0,children:zt.jsx(ll,{children:zt.jsx(Vt,{position:"bottom-right",orientation:"horizontal",showInteractive:!1,showZoom:!0,showFitView:!0,fitViewOptions:{duration:300,padding:.02,includeHiddenNodes:!0}})})})})},pl=Dt({platformType:$i.K8s,tier:gi.Community,version:"v0.0.0"}),ul=({children:e,platformType:t,tier:i,version:n})=>{const o=yt(()=>({platformType:t,tier:i,version:n}),[t,i,n]);return zt.jsx(pl.Provider,{value:o,children:e})},hl=(e,t)=>!t||Xn(e)>=Xn(t),ml=e=>{const t=At(pl),i=hl(t.version,e),n=t.platformType===$i.Vm;return{...t,isVersionSupported:i,isVm:n}},gl=Bt.div`
845
- display: flex;
846
-
847
- align-items: center;
848
- gap: 6px;
849
- margin-bottom: 4px;
850
- `,$l=Bt(lo)`
851
- font-size: 14px;
852
- opacity: 0.8;
853
- line-height: 22px;
854
- overflow: hidden;
855
- white-space: nowrap;
856
- text-overflow: ellipsis;
857
- color: ${({$status:e,theme:t})=>e?t.text[e]:t.text.secondary};
858
- `,fl=Bt(lo)`
859
- font-size: 12px;
860
- color: ${({theme:e})=>e.text.darker_grey};
861
- opacity: 0.8;
862
- `,xl=({title:e,required:t,tooltip:i,style:n,status:o})=>e?zt.jsx(gl,{style:n,children:zt.jsxs(ka,{text:i,withIcon:!0,children:[zt.jsx($l,{$status:o,children:e}),!t&&zt.jsx(fl,{children:"(optional)"})]})}):null,bl=Bt.div`
863
- display: flex;
864
- flex-direction: column;
865
- position: relative;
866
- width: 100%;
867
- `,yl=Bt.div`
868
- width: 100%;
869
- display: flex;
870
- align-items: center;
871
- height: 36px;
872
- gap: 12px;
873
- transition: border-color 0.3s;
874
- border-radius: 32px;
875
- border: 1px solid ${({theme:e})=>e.colors.border};
876
- ${({$disabled:e})=>e&&Rt`
877
- cursor: not-allowed;
878
- opacity: 0.6;
879
- `}
880
- ${({$isActive:e,$hasError:t,$status:i})=>e?Rt`
881
- border-color: ${({theme:e})=>e.colors.secondary};
882
- `:t?Rt`
883
- border-color: ${({theme:e})=>e.text.error};
884
- `:i?Rt`
885
- border-color: ${({theme:e})=>e.text[i]};
886
- `:""}
887
- &:hover {
888
- border-color: ${({theme:e})=>e.colors.secondary};
889
- }
890
- &:focus-within {
891
- border-color: ${({theme:e})=>e.colors.secondary};
892
- }
893
- `,wl=Bt.input`
894
- padding-left: ${({$hasIcon:e})=>e?"0":"16px"};
895
- flex: 1;
896
- min-width: 150px;
897
- width: 100%;
898
- border: none;
899
- outline: none;
900
- background: none;
901
- color: ${({theme:e})=>e.text.secondary};
902
- font-size: 14px;
903
- font-family: ${({theme:e})=>e.font_family.primary};
904
- font-weight: 300;
905
- &::placeholder {
906
- color: ${({theme:e})=>e.text.secondary};
907
- font-family: ${({theme:e})=>e.font_family.primary};
908
- opacity: 0.4;
909
- font-size: 14px;
910
- font-weight: 300;
911
- line-height: 22px; /* 157.143% */
912
- }
913
- &:disabled {
914
- cursor: not-allowed;
915
- opacity: 0.6;
916
- }
917
- &::-webkit-inner-spin-button,
918
- &::-webkit-outer-spin-button {
919
- -webkit-appearance: none;
920
- margin: 0;
921
- }
922
- `,vl=Bt.div`
923
- display: flex;
924
- align-items: center;
925
- margin-left: 12px;
926
- `,kl=Bt(vl)`
927
- cursor: pointer;
928
- `,Cl=Bt.button`
929
- background-color: ${({theme:e})=>e.colors.primary};
930
- border: none;
931
- color: ${({theme:e})=>e.text.secondary};
932
- padding: 8px 16px;
933
- border-radius: 20px;
934
- cursor: pointer;
935
- margin-left: 8px;
936
- &:hover {
937
- background-color: ${({theme:e})=>e.colors.secondary};
938
- }
939
- &:disabled {
940
- background-color: ${({theme:e})=>e.colors.border};
941
- cursor: not-allowed;
942
- }
943
- `,El=({icon:e,buttonLabel:t,onButtonClick:i,hasError:n,errorMessage:o,title:r,tooltip:a,required:s,value:l,onChange:c,type:d=ki.Text,name:p,status:u,...h})=>{const m=Lt(),g=d===ki.Password,[$,f]=wt(!1);return zt.jsxs(bl,{children:[zt.jsx(xl,{title:r,required:s,tooltip:a,status:u}),zt.jsxs(yl,{$disabled:h.disabled,$hasError:n||!!o,$isActive:!!h.autoFocus,$status:u,children:[g?zt.jsx(kl,{onClick:()=>f(e=>!e),children:$?zt.jsx(nt,{size:14,fill:m.text.grey}):zt.jsx(ot,{size:14,fill:m.text.grey})}):e?zt.jsx(vl,{children:zt.jsx(e,{size:14,fill:m.text.grey})}):null,zt.jsx(wl,{"data-id":p,type:$||d===ki.Number?ki.Text:d,$hasIcon:!!e||g,name:p,value:l,onChange:e=>{e.stopPropagation(),d===ki.Number&&(e.target.value=Vn(e.target.value)),c?.(e)},onKeyDown:e=>{["Enter"].includes(e.key)||e.stopPropagation()},...h}),t&&i&&zt.jsx(Cl,{onClick:i,disabled:h.disabled,children:t})]}),!!o&&zt.jsx(uo,{children:o})]})},Sl=Bt.div`
944
- display: flex;
945
- flex-direction: column;
946
- min-width: 120px;
947
- width: 100%;
948
- opacity: ${({$disabled:e})=>e?.5:1};
949
- `,Al=Bt.div`
950
- position: relative;
951
- `,Dl=Bt.div`
952
- display: flex;
953
- align-items: center;
954
- justify-content: space-between;
955
- height: 36px;
956
- padding: ${({$isMulti:e,$hasSelections:t})=>e&&t?"0 16px 0 6px":"0 16px"};
957
- border-radius: 32px;
958
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
959
-
960
- ${({$isOpen:e,$isMulti:t,theme:i})=>e&&!t?Rt`
961
- border: 1px solid ${i.text.grey};
962
- background: ${i.colors.dropdown_bg_2};
963
- `:Rt`
964
- border: 1px solid ${i.colors.border};
965
- background: transparent;
966
- `};
967
-
968
- ${({$hasError:e,$status:t})=>e?Rt`
969
- border-color: ${({theme:e})=>e.text.error};
970
- `:t?Rt`
971
- border-color: ${({theme:e})=>e.text[t]};
972
- `:""}
973
-
974
- &:hover {
975
- border-color: ${({$isMulti:e,$hasSelections:t,$disabled:i,theme:n})=>i?"auto":e&&t?n.colors.border:n.colors.secondary};
976
- }
977
- `,Tl=Bt.div`
978
- display: flex;
979
- align-items: center;
980
- gap: 4px;
981
- `,zl=({options:e,value:t,onSelect:i,onDeselect:n,title:o,tooltip:r,placeholder:a,disabled:s=!1,isMulti:l=!1,showSearch:c=!1,required:d=!1,errorMessage:p,hasError:u=!1,status:h})=>{const[m,g]=wt(!1),[$,f]=wt(!1),x=kt(null);Lr(x,()=>g(!1));const b=()=>{(()=>{if(x.current){const e=x.current.getBoundingClientRect().bottom+300>window.innerHeight;f(e)}})(),g(e=>!e)},y=Array.isArray(t)?t.length:0;return zt.jsxs(Sl,{$disabled:s,children:[zt.jsx(xl,{title:o,required:d,tooltip:r,status:h}),zt.jsxs(Al,{ref:x,children:[zt.jsxs(Dl,{$isOpen:m,$isMulti:l,$hasSelections:!!Array.isArray(t)&&!!t.length,$hasError:!!p||u,$status:h,$disabled:s,onClick:()=>!s&&b(),children:[zt.jsx(Nl,{value:t,placeholder:a,onDeselect:n}),zt.jsxs(Tl,{children:[l&&zt.jsx(gr,{label:y,filled:!!y}),zt.jsx(ps,{extend:m})]})]}),m&&zt.jsx(Rl,{openUpwards:$,options:e,value:t,onSelect:e=>{i?.(e),l||b()},onDeselect:e=>{n?.(e),l||b()},isMulti:l,showSearch:c})]}),!!p&&zt.jsx(uo,{children:p})]})},Fl=Bt(Tl)`
982
- max-width: calc(100% - 50px);
983
- overflow-x: auto;
984
- `,Ol=Bt(lo)`
985
- display: flex;
986
- align-items: center;
987
- gap: 2px;
988
- padding: 4px 12px;
989
- background: ${({theme:e})=>e.colors.dropdown_bg_2};
990
- border-radius: 360px;
991
- white-space: nowrap;
992
- text-overflow: ellipsis;
993
- img {
994
- &:hover {
995
- transform: scale(2);
996
- transition: transform 0.3s;
997
- }
998
- }
999
- `,Il=Bt(lo)``,Nl=({value:e,placeholder:t,onDeselect:i})=>{const n=Lt();return Array.isArray(e)?e.length?zt.jsx(Fl,{children:e.map(e=>zt.jsxs(Ol,{size:14,children:[e.value,zt.jsx(ga,{orientation:"vertical",length:"10px",margin:"0 4px"}),zt.jsx(Ye,{size:12,onClick:t=>{t.stopPropagation(),i?.(e)}})]},`multi-label-${e.id}`))}):zt.jsx(Il,{size:14,color:n.text.darker_grey,children:t}):zt.jsx(Il,{size:14,color:e?.value?void 0:n.text.darker_grey,children:e?.value||t})},_l=Bt.div`
1000
- position: absolute;
1001
- ${({$openUpwards:e})=>e?"bottom":"top"}: calc(100% + 8px);
1002
- left: 0;
1003
- z-index: 1;
1004
- display: flex;
1005
- flex-direction: column;
1006
- overflow-y: auto;
1007
- width: calc(100% - 16px);
1008
- max-height: 200px;
1009
- gap: 8px;
1010
- padding: 8px;
1011
- background-color: ${({theme:e})=>e.colors.dropdown_bg_2};
1012
- border: 1px solid ${({theme:e})=>e.colors.border};
1013
- border-radius: 24px;
1014
- `,Bl=Bt.div`
1015
- display: flex;
1016
- flex-direction: column;
1017
- align-items: center;
1018
- `,Rl=({openUpwards:e,options:t,value:i,onSelect:n,onDeselect:o,isMulti:r,showSearch:a})=>{const[s,l]=wt(""),c=t.filter(e=>e.value?.toLowerCase().includes(s?.toLowerCase()));return zt.jsxs(_l,{$openUpwards:e,children:[a&&zt.jsxs(Bl,{children:[zt.jsx(El,{placeholder:"Search...",icon:rt,value:s,onChange:e=>l(e.target.value)}),zt.jsx(ga,{thickness:1,margin:"8px 0 0 0"})]}),0===c.length?zt.jsx(Zs,{subTitle:a&&s?void 0:" "}):c.map((e,t)=>zt.jsx(Ml,{option:e,value:i,isMulti:r,onSelect:n,onDeselect:o},`dropdown-option-${e.id||t}`))]})},Ll=Bt.div`
1019
- padding: 8px 12px;
1020
- cursor: pointer;
1021
- display: flex;
1022
- justify-content: space-between;
1023
- align-items: center;
1024
- border-radius: 32px;
1025
- &:hover,
1026
- &.selected {
1027
- background: ${({theme:e})=>e.colors.majestic_blue+Do["024"]};
1028
- }
1029
- `,Ml=({option:e,value:t,isMulti:i,onSelect:n,onDeselect:o})=>{const r=Lt(),a=Array.isArray(t)?!!t?.find(t=>t.id===e.id):t?.id===e.id,s=t=>t?n?.(e):o?.(e);return i?zt.jsx(Ll,{className:a?"selected":"",onClick:()=>s(!a),children:zt.jsx(Ga,{title:e.value||"",titleColor:r.text.secondary,value:a,onChange:s,style:{width:"100%"}})}):zt.jsxs(Ll,{className:a?"selected":"",onClick:()=>a?o?.(e):n?.(e),children:[zt.jsxs(Jr,{$gap:8,children:[e.icon&&zt.jsx(e.icon,{}),zt.jsx(lo,{size:14,children:e.value})]}),a&&zt.jsx(Ge,{})]})},Pl=Bt(Xr)`
1030
- gap: 12px;
1031
- `,jl=Bt(Jr)`
1032
- width: 100%;
1033
- gap: 12px;
1034
- align-items: flex-end;
1035
- `,Ul=({clientX:e=0,flipX:t,clientY:i=0,flipY:n,isOpen:o,onClose:r,onSave:a,withDelete:s,onDelete:l,title:c,titleTooltip:d,warning:p,children:u})=>{const h=Lt(),{popupRef:m,popupPosition:g,handlePosition:$}=Mr({onClickOutside:r});return Rr({key:"Enter",active:o},a),vt(()=>$(e,i),[e,i]),0===g.top&&0!==i||0===g.left&&0!==e?null:zt.jsx(ya,{ref:m,isOpen:o,top:n?void 0:g.top,bottom:n?g.top:void 0,left:t?void 0:g.left,right:t?g.left:void 0,padding:"24px",children:zt.jsxs(Pl,{children:[zt.jsx(ka,{text:d,withIcon:!0,children:zt.jsx(lo,{size:14,children:c})}),zt.jsxs(jl,{children:[u,zt.jsxs(Jr,{$gap:6,children:[zt.jsx(Sa,{withBorder:!0,onClick:r,tooltip:"Cancel",children:zt.jsx(Ye,{})}),zt.jsx(Sa,{withBorder:!0,backgroundColor:h.colors.secondary,onClick:a,tooltip:"Save",children:zt.jsx(Ge,{fill:h.text.primary})}),s&&zt.jsx(Sa,{onClick:l,tooltip:"Undo",children:zt.jsx(at,{})})]})]}),p&&zt.jsx(_a,{type:Ci.Warning,message:p})]})})},Wl=Bt.div`
1036
- position: relative;
1037
- `,Vl=({defaultLanguage:e=xi.Unknown,defaultVersion:t="",defaultOtelDistroName:i=null,handleSave:n})=>{const{tier:o}=ml(),{addNotification:r}=or(),{formData:a,handleFormChange:s,resetFormData:l}=yr({language:e,version:t,otelDistroName:i}),[c,d]=wt(!1),p=()=>{d(!1),l()},u=yt(()=>{if(!a.language)return[];const e=Ko[a.language].community,t=o===gi.Onprem?Ko[a.language].enterprise:[];return e.concat(t)},[a.language,o]);return zt.jsxs(Wl,{children:[zt.jsx(Sa,{tooltip:Zi.OVERRIDE_RUNTIME_DETAILS,size:32,onClick:()=>{d(!0)},children:zt.jsx(tt,{})}),zt.jsx(Ul,{flipX:!0,clientX:36,isOpen:c,onClose:p,onSave:async()=>{!a.version||Mn(a.version)?(await n({...a}),p()):r({type:Ci.Warning,message:Xi.INVALID_VERSION,hideFromHistory:!0})},withDelete:!0,onDelete:async()=>{await n({language:null,version:"",otelDistroName:null}),p()},title:Zi.OVERRIDE_RUNTIME_DETAILS,warning:Zi.OVERRIDE_RUNTIME_WARNING,children:zt.jsxs(Xr,{$gap:12,children:[zt.jsxs(Jr,{$gap:12,children:[zt.jsx(zl,{title:Zi.LANGUAGE,options:Go,value:Go.find(e=>e.id===a.language),onSelect:e=>{s("language",e.id),s("version",""),s("otelDistroName",null)},required:!0}),zt.jsx(El,{title:Zi.RUNTIME_VERSION,placeholder:Zi.VERSION_PLACEHOLDER,value:a.version,onChange:e=>s("version",e.target.value),required:!1})]}),a.language&&zt.jsx(zl,{title:"Otel Distro Name",options:u,value:u.find(e=>e.id===a.otelDistroName),onSelect:e=>s("otelDistroName",e.id),required:!1})]})})]})},Hl=Bt(Jr)`
1038
- width: 100%;
1039
- justify-content: center;
1040
- `,ql=({containerName:e,language:t,runtimeVersion:i,overriden:n,instrumented:o,instrumentationMessage:r,otelDistroName:a,callbackRuntimeOverride:s})=>{const l=Lt(),c=o?Ci.Success:r?Ci.Info:Ci.Warning,d=o?Ei.INSTRUMENTED:r?Ei.NOT_INSTRUMENTED:Ei.INSTRUMENTING;return zt.jsx(Ws,{title:e,subTitle:`${t?qo[t]:"no runtime info"}`+(i?` • Runtime Version: ${i}`:""),iconProps:{icon:cn(t)},extendableProps:{isExtended:!!r,renderExtended:()=>zt.jsx(Hl,{children:zt.jsx(lo,{size:12,family:"secondary",color:l.text.info,children:Pn(r)})})},renderActions:()=>zt.jsxs(zt.Fragment,{children:[zt.jsx(vs,{status:c,title:d,subtitle:a||void 0,withIcon:!0,withBorder:!0}),n&&zt.jsx(vs,{status:Ci.Default,forceIcon:st,title:Zi.OVERIDDEN,withIcon:!0,withBorder:!0}),s&&zt.jsx(Vl,{defaultLanguage:t,defaultVersion:i,defaultOtelDistroName:a,handleSave:t=>s({...t,containerName:e})})]})})},Gl=Bt.tr`
1041
- cursor: ${({$withHover:e})=>e?"pointer":"default"};
1042
- opacity: ${({$faded:e})=>e?.5:1};
1043
- `,Kl=Bt.td`
1044
- position: relative;
1045
- width: fit-content;
1046
- padding: 16px 8px 16px ${({$isFirst:e})=>e?"16px":"8px"};
1047
- color: ${({theme:e})=>e.text.secondary};
1048
- font-family: ${({theme:e})=>e.font_family.primary};
1049
- font-size: 14px;
1050
- white-space: nowrap;
1051
- `,Yl=Bt(lo)`
1052
- font-size: 14px;
1053
- color: ${({$color:e,theme:t})=>e??t.text.secondary};
1054
- line-height: 16px;
1055
-
1056
- overflow: hidden;
1057
- overflow-wrap: break-word;
1058
- white-space: wrap;
1059
- text-wrap: wrap;
1060
- text-overflow: ellipsis;
1061
- display: -webkit-box;
1062
- -webkit-line-clamp: 2;
1063
- -webkit-box-orient: vertical;
1064
- `,Jl=Bt.div`
1065
- position: absolute;
1066
- top: 0;
1067
- left: 0;
1068
- z-index: -1;
1069
- width: ${({$width:e})=>e}px;
1070
- height: ${({$height:e})=>e}px;
1071
- border-radius: 16px;
1072
- background-color: ${({theme:e,$hovered:t,$status:i})=>t?i?e.text[i]+Do["020"]:e.colors.majestic_blue+Do["030"]:i?e.text[i]+Do["010"]:e.colors.secondary+Do["005"]};
1073
- `,Xl=({index:e,columns:t,cells:i,onClick:n,status:o,faded:r})=>{const{containerRef:a,containerHeight:s,containerWidth:l}=Sr(),[c,d]=wt(!1);return zt.jsx(Gl,{ref:a,onMouseEnter:()=>!!n&&d(!0),onMouseLeave:()=>!!n&&d(!1),onClick:()=>!!n&&n(),$withHover:!!n,$faded:r,children:t.map(({key:t},n)=>{const r=i.find(({columnKey:e})=>e===t);if(!r)return null;const{value:a,textColor:d,withTooltip:p,icon:u,component:h}=r;return zt.jsxs(Kl,{$isFirst:0===n,children:[u?zt.jsx(Os,{icon:u}):h?zt.jsx(h,{}):zt.jsx(ka,{text:p&&a?String(a):"",children:zt.jsx(Yl,{$color:d,children:In(a)?"-":a})}),0===n&&zt.jsx(Jl,{$height:s,$width:l,$top:s*e,$hovered:c,$status:o})]},`table-row-${t}-${a}-${e}-${n}`)})})},Zl=Bt.div`
1074
- width: 100%;
1075
- `,Ql=Bt.table`
1076
- position: relative;
1077
- z-index: 0;
1078
- width: 100%;
1079
- border-collapse: separate;
1080
- border-spacing: 0 12px;
1081
- `,ec=Bt.thead`
1082
- // only supported with "border-collapse: collapse;"
1083
- // border-top: 1px solid ${({theme:e})=>e.colors.dropdown_bg_2};
1084
- // border-bottom: 1px solid ${({theme:e})=>e.colors.dropdown_bg_2};
1085
- `,tc=Bt.th`
1086
- // only required with "border-collapse: separate;"
1087
- border-top: 1px solid ${({theme:e})=>e.colors.dropdown_bg_2};
1088
- border-bottom: 1px solid ${({theme:e})=>e.colors.dropdown_bg_2};
1089
-
1090
- padding: 8px;
1091
- `,ic=Bt(Jr)`
1092
- cursor: pointer;
1093
- &:hover {
1094
- * {
1095
- color: ${({theme:e})=>e.text.secondary};
1096
- }
1097
- }
1098
- `,nc=Bt(lo)`
1099
- color: ${({theme:e})=>e.text.darker_grey};
1100
- font-family: ${({theme:e})=>e.font_family.secondary};
1101
- text-transform: uppercase;
1102
- font-size: 12px;
1103
- font-weight: 500;
1104
- text-wrap: nowrap;
1105
- `,oc=Bt.tbody``,rc=({columns:e,rows:t})=>{const[i,n]=wt(mi.Ascending),[o,r]=wt("name"),a=Ct(e=>{o===e?n(e=>e===mi.Ascending?mi.Descending:mi.Ascending):(r(e),n(mi.Ascending))},[o]),s=yt(()=>{const n=(e,t)=>e.cells.find(({columnKey:e})=>e===t)?.value??null;return(o?[...t].sort((e,t)=>{const r=n(e,o),a=n(t,o);return(i===mi.Ascending?1:-1)*((e,t)=>"number"==typeof e&&"number"==typeof t?e-t:"string"==typeof e&&"string"==typeof t?e.localeCompare(t):"boolean"==typeof e&&"boolean"==typeof t?e===t?0:e?1:-1:String(e).localeCompare(String(t)))(r,a)}):t).map(({status:t,faded:i,cells:n,onClick:o},r)=>zt.jsx(Xl,{index:r,columns:e,cells:n,onClick:o,status:t,faded:i},`row-${r}`))},[e,t,o,i]);return zt.jsx(Zl,{children:zt.jsxs(Ql,{children:[zt.jsx(ec,{children:zt.jsx("tr",{children:e.map(({key:e,title:t,sortable:i})=>zt.jsx(tc,{children:i?zt.jsxs(ic,{onClick:()=>a(e),children:[zt.jsx(lt,{}),zt.jsx(nc,{children:t})]}):zt.jsx(nc,{children:t})},`column-${e}`))})}),zt.jsx(oc,{children:s})]})})};var ac;!function(e){e.Code="code",e.Table="table",e.Badge="badge",e.Loader="loader",e.Divider="divider",e.Monitors="monitors",e.CopyText="copy-text",e.ActiveStatus="active-status"}(ac||(ac={}));const sc=Bt.div`
1106
- display: flex;
1107
- flex-wrap: wrap;
1108
- gap: 16px 32px;
1109
- width: 100%;
1110
- `,lc=Bt.div`
1111
- display: flex;
1112
- flex-direction: column;
1113
- gap: 2px;
1114
- width: ${({$width:e})=>e};
1115
- `,cc=Bt(lo)`
1116
- color: ${({theme:e})=>e.text.grey};
1117
- font-size: 10px;
1118
- line-height: 16px;
1119
- `,dc=Bt(lo)`
1120
- font-size: 12px;
1121
- white-space: pre-wrap;
1122
- `,pc=({data:e})=>zt.jsx(sc,{children:e?.map(({type:e,title:t,titleIcon:i,tooltip:n,value:o},r)=>zt.jsxs(lc,{$width:e&&[ac.Code,ac.Table].includes(e)?"inherit":e&&[ac.Loader,ac.Divider,ac.CopyText].includes(e)?"100%":"unset",children:[zt.jsx(ka,{text:n,withIcon:!0,children:zt.jsxs(Jr,{$alignItems:"center",$gap:4,children:[i&&zt.jsx(i,{size:14}),!!t&&zt.jsx(cc,{transform:"capitalize",children:t})]})}),zt.jsx(uc,{type:e,value:o})]},`data-field-${t||(o?JSON.stringify(o):r)}`))}),uc=({type:e,value:t})=>{const i=Lt();switch(e){case ac.Divider:return zt.jsx(ga,{length:"100%",margin:"0"});case ac.Loader:return zt.jsx(Zr,{children:zt.jsx(cs,{scale:1.2})});case ac.Monitors:return zt.jsx(Rs,{monitors:t?.split(", ")||[],withLabels:!0,color:i.colors.secondary});case ac.Badge:{const{label:e,filled:i,...n}=zn(t,{label:"-",filled:!1});return zt.jsx(gr,{label:e,filled:i,...n})}case ac.Code:{const{language:e,code:i,...n}=zn(t,{language:"",code:""});return zt.jsx(ns,{language:e,code:i,...n})}case ac.Table:{const{columns:e,rows:i,...n}=zn(t,{columns:[],rows:[{status:void 0,cells:[]}]});return zt.jsx(rc,{columns:e,rows:i,...n})}case ac.ActiveStatus:return zt.jsx(vs,{status:"true"==t?Ci.Success:Ci.Error,title:"true"==t?Zi.ENABLED:Zi.DISABLED,size:10,withIcon:!0,withBorder:!0});case ac.CopyText:{const e="string"==typeof t?t:JSON.stringify(t);return zt.jsx(Es,{value:e})}default:return zt.jsx(dc,{children:qn("string"==typeof t?t||"-":"")})}},hc=Bt.div`
1123
- display: flex;
1124
- flex-direction: column;
1125
- align-items: flex-start;
1126
- align-self: stretch;
1127
- gap: 16px;
1128
- padding: 24px;
1129
- border-radius: 24px;
1130
- border: 1px solid ${({theme:e})=>e.colors.border};
1131
- background-color: ${({theme:e,$hovered:t})=>t?e.colors.secondary+Do["010"]:"transparent"};
1132
- transition: background-color 0.3s;
1133
- `,mc=Bt.div`
1134
- width: 100%;
1135
- display: flex;
1136
- flex-direction: column;
1137
- gap: 4px;
1138
- cursor: ${({$clickable:e})=>e?"pointer":"default"};
1139
- `,gc=Bt(lo)`
1140
- width: 100%;
1141
- display: flex;
1142
- align-items: center;
1143
- gap: 8px;
1144
- font-size: 16px;
1145
- `,$c=Bt(lo)`
1146
- font-size: 12px;
1147
- color: ${({theme:e})=>e.text.grey};
1148
- `,fc=Bt(Jr)`
1149
- margin-left: auto;
1150
- gap: 8px;
1151
- `,xc=({title:e="Details",titleBadge:t,titleIcon:i,description:n,action:o,withExtend:r,initialExtended:a=!1,data:s,children:l})=>{const[c,d]=wt(a),[p,u]=wt(!1);return zt.jsxs(hc,{$hovered:p,children:[e||i||n||o?zt.jsxs(mc,{$clickable:r||!1,onClick:()=>r&&d(e=>!e),onMouseEnter:()=>r&&u(!0),onMouseLeave:()=>r&&u(!1),children:[zt.jsxs(Jr,{children:[zt.jsxs(Jr,{$alignItems:"center",$gap:8,children:[i&&zt.jsx(Jr,{$alignItems:"center",children:zt.jsx(i,{size:20})}),!!e&&zt.jsx(gc,{transform:"capitalize",children:e}),t===Si.Loading?zt.jsx(cs,{}):void 0!==t&&zt.jsx(gr,{label:t})]}),(!!o||r)&&zt.jsxs(fc,{children:["function"==typeof o?zt.jsx(o,{hovered:p}):o,r&&zt.jsx(ps,{extend:c})]})]}),!!n&&zt.jsx($c,{children:n})]}):null,(!r||r&&c)&&(l||zt.jsx(pc,{data:s}))]})},bc=Bt.div`
1152
- visibility: hidden;
1153
- `,yc=Bt(Jr)`
1154
- align-self: stretch;
1155
- width: calc(100% - 32px);
1156
- padding: 16px;
1157
- border-radius: 16px;
1158
- background-color: ${({theme:e})=>e.colors.secondary+Do["005"]};
1159
- ${({theme:e,$withClick:t})=>t?Rt`
1160
- &:hover {
1161
- cursor: pointer;
1162
- background-color: ${e.colors.secondary+Do["010"]};
1163
- ${bc} {
1164
- visibility: visible;
1165
- }
1166
- }
1167
- `:`\n &:hover {\n ${bc} {\n visibility: visible;\n }\n }\n `}
1168
- `,wc=Bt(Jr)`
1169
- margin-left: auto;
1170
- gap: 8px;
1171
- `,vc=Bt(lo)`
1172
- font-size: 10px;
1173
- color: ${({theme:e})=>e.text.grey};
1174
- `,kc=({title:e,subTitle:t,icons:i,iconSrcs:n,onClick:o,renderActions:r})=>{const a=Lt(),[s,l]=wt(0),c=kt(null),d=kt(null);return vt(()=>{if(c.current){const e=c.current.clientWidth,t=d.current?.clientWidth||0;l(e-(85+t))}},[]),zt.jsxs(yc,{ref:c,$gap:8,$withClick:!!o,onClick:o,children:[zt.jsx(_s,{id:`${e}-${t}`,icons:i,iconSrcs:n}),e&&zt.jsx(Ts,{maxWidth:s/2,text:e,textSize:14}),e&&t&&zt.jsx(vc,{children:"•"}),t&&zt.jsx(Ts,{maxWidth:s/2,text:t,textSize:10,textColor:a.text.grey}),zt.jsx(wc,{ref:d,children:r&&zt.jsxs(zt.Fragment,{children:[zt.jsx(ga,{orientation:"vertical",length:"24px",margin:"0"}),r()]})})]})},Cc=({isOpen:e,noOverlay:t,name:i,type:n,isLastItem:o,onApprove:r,onDeny:a})=>{const s=n===yi.Source?"uninstrument":"delete";return zt.jsx(Wa,{isOpen:e,noOverlay:t,title:`${s.charAt(0).toUpperCase()+s.substring(1)}${i?` ${i}`:""}`,description:`Are you sure you want to ${s}?`,note:o?{type:Ci.Warning,title:`You're about to ${s} the last ${n||i}`,message:""}:void 0,approveButton:{text:"Confirm",variant:"danger",onClick:r},denyButton:{text:"Go Back",onClick:a}})},Ec=Bt(br)`
1175
- display: flex;
1176
- align-items: center;
1177
- justify-content: center;
1178
- font-size: 14px;
1179
- gap: 6px;
1180
- min-width: 100px;
1181
- `,Sc=({endpoint:e="/",variant:t="secondary"})=>zt.jsxs(Ec,{variant:t,onClick:()=>window.open(`https://docs.odigos.io${e}`,"_blank","noopener noreferrer"),children:[zt.jsx(ct,{size:18}),"Docs"]}),Ac=Bt(Jr)`
1182
- border-bottom: ${({$hideBorder:e,theme:t})=>e?"none":`1px solid ${t.colors.border}`};
1183
- `,Dc=Bt.div`
1184
- display: flex;
1185
- align-items: center;
1186
- border-bottom: 2px solid ${({theme:e,$selected:t})=>t?e.colors.majestic_blue:"transparent"};
1187
- cursor: pointer;
1188
- `,Tc=Bt(lo)`
1189
- padding: 12px;
1190
- font-size: 14px;
1191
- color: ${({theme:e,$selected:t})=>t?e.text.secondary:e.text.grey};
1192
- `,zc=({tabs:e,hideBorder:t=!1})=>e?.length?zt.jsx(Ac,{$hideBorder:t,children:e.map(({label:e,icon:t,onClick:i,selected:n})=>zt.jsxs(Dc,{onClick:i,$selected:n,children:[zt.jsx(Tc,{$selected:n,children:e}),t&&zt.jsx(t,{})]},`tab-${e}`))}):null,Fc=Bt.section`
1193
- padding: 0px 32px;
1194
- border-bottom: 1px solid ${({theme:e})=>e.colors.border};
1195
- `,Oc=Bt.div`
1196
- height: 76px;
1197
- display: flex;
1198
- justify-content: space-between;
1199
- flex-shrink: 0;
1200
- align-self: stretch;
1201
- `,Ic=Bt.div`
1202
- display: flex;
1203
- align-items: center;
1204
- gap: ${({$gap:e})=>e||16}px;
1205
- `,Nc=Bt(lo)`
1206
- font-size: 18px;
1207
- line-height: 26px;
1208
- max-width: ${({$maxWidth:e})=>e};
1209
- overflow: hidden;
1210
- white-space: nowrap;
1211
- text-overflow: ellipsis;
1212
- `,_c=Bt(br)`
1213
- gap: 8px;
1214
- `,Bc=Bt(br)``,Rc=({onClose:e,width:t,icons:i,iconSrcs:n,title:o,titleTooltip:r,replaceTitleWith:a,actions:s,actionButtons:l=[],tabs:c})=>zt.jsxs(Fc,{children:[zt.jsxs(Oc,{children:[zt.jsxs(Ic,{children:[i?.length||n?.length?zt.jsx(_s,{icons:i,iconSrcs:n,id:`drawer-header-${o}`}):null,("function"==typeof a?zt.jsx(a,{}):a||null)||zt.jsx(ka,{text:r||o,withIcon:!!r,children:o&&zt.jsx(Nc,{$maxWidth:`calc(${t} ${s||l.length?"/ 5":"- 192px"})`,children:o})})]}),zt.jsxs(Ic,{$gap:2,children:[s,l.map((e,t)=>zt.jsx(_c,{...e},`header-action-button-${t}`)),zt.jsx(Bc,{"data-id":"drawer-close",variant:"secondary",onClick:e,children:zt.jsx(Ye,{size:12})})]})]}),zt.jsx(zc,{tabs:c,hideBorder:!0})]}),Lc=Bt.div`
1215
- display: flex;
1216
- justify-content: space-between;
1217
- gap: 8px;
1218
- padding: 24px 18px 24px 32px;
1219
- border-top: 1px solid ${({theme:e})=>e.colors.border};
1220
- background-color: ${({theme:e})=>e.colors.translucent_bg};
1221
- transform: translateY(100%);
1222
- animation-name: ${_o.in.bottom};
1223
- `,Mc=Bt(Jr)`
1224
- margin-right: auto;
1225
- `,Pc=Bt(Jr)`
1226
- margin: 0 auto;
1227
- `,jc=Bt(Jr)`
1228
- margin-left: auto;
1229
- `,Uc=Bt(br)`
1230
- min-width: 140px;
1231
- font-size: 14px;
1232
- `,Wc=({isOpen:e,leftButtons:t=[],centerButtons:i=[],rightButtons:n=[]})=>e?zt.jsxs(Lc,{children:[zt.jsx(Mc,{children:t.map((e,t)=>zt.jsx(Uc,{...e},`footer-left-button-${t}`))}),zt.jsx(Pc,{children:i.map((e,t)=>zt.jsx(Uc,{...e},`footer-center-button-${t}`))}),zt.jsx(jc,{children:n.map((e,t)=>zt.jsx(Uc,{...e},`footer-right-button-${t}`))})]}):null,Vc=Bt.div`
1233
- position: fixed;
1234
- top: 0;
1235
- bottom: 0;
1236
- ${({$position:e})=>e}: 0;
1237
- z-index: 1000;
1238
- width: ${({$width:e})=>e};
1239
- background: ${({theme:e})=>e.colors.translucent_bg};
1240
- box-shadow: 0 2px 10px ${({theme:e})=>e.colors.primary+Do["010"]};
1241
- overflow-y: auto;
1242
- animation-name: ${({$position:e})=>_o.in[e]};
1243
- `,Hc=Bt.div`
1244
- display: flex;
1245
- flex-direction: column;
1246
- height: 100%;
1247
- `,qc=Bt.div`
1248
- flex-grow: 1;
1249
- padding: 24px 32px;
1250
- overflow-y: auto;
1251
- `,Gc=({isOpen:e,onClose:t,closeOnEscape:i=!0,position:n="right",width:o="300px",children:r,header:a,footer:s})=>(Rr({key:"Escape",active:e&&i},()=>t()),kr(e),e?Ht.createPortal(zt.jsxs(zt.Fragment,{children:[zt.jsx(ea,{hidden:!e,onClick:t}),zt.jsx(Vc,{"data-id":"drawer",$position:n,$width:o,children:zt.jsxs(Hc,{children:[zt.jsx(Rc,{onClose:t,width:o,...a}),zt.jsx(qc,{children:r}),zt.jsx(Wc,{...s})]})})]}),document.body):null),Kc=({error:e})=>{const t=Lt(),i={container:{display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",color:t.text.error,fontFamily:t.font_family.primary},errorMessage:{padding:10,borderRadius:5,whiteSpace:"pre-wrap",background:t.colors.error},errorStack:{whiteSpace:"pre-wrap",fontSize:"12px"},errorStackWrapper:{textAlign:"left",marginTop:10},infoText:{marginTop:100,color:t.text.secondary,fontSize:"14px"}};return zt.jsxs("div",{style:i.container,children:[zt.jsx("h2",{children:"Something went wrong!"}),zt.jsx("pre",{style:i.errorMessage,children:e?.message||"Unknown Error"}),zt.jsxs("details",{style:i.errorStackWrapper,children:[zt.jsx("summary",{children:"Stack Trace"}),zt.jsx("pre",{style:i.errorStack,children:e?.stack||"Unknown Stack"})]}),zt.jsx("p",{style:i.infoText,children:"Try refreshing the page or contact support"}),zt.jsx(br,{variant:"secondary",onClick:()=>window.location.reload(),style:{fontSize:"1rem"},children:"Reload"})]})},Yc=({children:e})=>zt.jsx(Gt,{FallbackComponent:({error:e,...t})=>zt.jsx(hr,{children:zt.jsx(Kc,{...t,error:e})}),children:e}),Jc=Bt(Jr)`
1252
- position: relative;
1253
- width: calc(100% - 24px);
1254
- padding: 12px;
1255
- background-color: ${({theme:e})=>e.colors.dark_grey};
1256
- border-bottom: 1px solid ${({theme:e})=>e.colors.border+Do["050"]};
1257
- `,Xc=Bt(Jr)`
1258
- margin-right: auto;
1259
- margin-left: 32px;
1260
- gap: 12px;
1261
- `,Zc=Bt(Jr)`
1262
- margin-left: auto;
1263
- margin-right: 32px;
1264
- gap: 12px;
1265
- `,Qc=Bt(Jr)`
1266
- position: absolute;
1267
- left: 50%;
1268
- transform: translateX(-50%);
1269
- gap: 12px;
1270
- `,ed=({left:e=[],center:t=[],right:i=[]})=>zt.jsxs(Jc,{children:[zt.jsx(Xc,{children:e.map((e,t)=>e&&zt.jsx(bt,{children:e},t))}),zt.jsx(Qc,{children:t.map((e,t)=>e&&zt.jsx(bt,{children:e},t))}),zt.jsx(Zc,{children:i.map((e,t)=>e&&zt.jsx(bt,{children:e},t))})]}),td=Bt(lo)`
1271
- color: ${({theme:e})=>e.text.grey};
1272
- `,id=({icon:e,title:t,badge:i,badgeTooltip:n,loading:o})=>zt.jsxs(Jr,{$gap:6,children:[e&&zt.jsx(e,{}),zt.jsx(td,{size:14,children:t}),void 0!==i&&zt.jsx(ka,{text:n,children:zt.jsx(gr,{label:i})}),o&&zt.jsx(cs,{})]}),nd=Bt.div`
1273
- width: fit-content;
1274
- height: fit-content;
1275
- padding: 4px;
1276
- gap: 4px;
1277
- border-radius: 32px;
1278
- border: 1px solid ${({theme:e})=>e.colors.border+Do["070"]};
1279
-
1280
- display: flex;
1281
- flex-direction: ${({$orientation:e,$flip:t})=>("horizontal"===e?"row":"column")+(t?"-reverse":"")};
1282
- align-items: center;
1283
- justify-content: center;
1284
- `,od=Bt.div`
1285
- width: 32px;
1286
- height: 32px;
1287
-
1288
- border-radius: 100%;
1289
- background-color: ${({theme:e,$selected:t})=>t?e.colors.majestic_blue+Do["070"]:e.colors.secondary+Do["012"]};
1290
- transition: background-color 0.3s;
1291
-
1292
- display: flex;
1293
- align-items: center;
1294
- justify-content: center;
1295
-
1296
- cursor: pointer;
1297
- `,rd=({orientation:e="vertical",flip:t,mainIcons:i,subIcons:n})=>zt.jsxs(nd,{$orientation:e,$flip:t,children:[i.map(({icon:e,selected:t,onClick:i,tooltip:n},o)=>zt.jsx(ka,{text:n,children:zt.jsx(od,{$selected:t,onClick:i,children:zt.jsx(e,{size:20})})},`main-nav-icon-${o}`)),!!i.length&&!!n.length&&zt.jsx(ga,{orientation:"vertical"===e?"horizontal":"vertical",margin:"0",length:"20px"}),n.map(({icon:e,selected:t,onClick:i,tooltip:n},o)=>zt.jsx(ka,{text:n,children:zt.jsx(od,{$selected:t,onClick:i,children:zt.jsx(e,{size:20})})},`sub-nav-icon-${o}`))]}),ad=Bt.div`
1298
- display: flex;
1299
- flex-direction: column;
1300
- width: 100%;
1301
- `,sd=Bt.div`
1302
- display: flex;
1303
- flex-direction: column;
1304
- gap: 8px;
1305
- `,ld=Bt.div`
1306
- display: flex;
1307
- align-items: center;
1308
- gap: 16px;
1309
- `,cd=Bt(Sa)`
1310
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
1311
- opacity: ${({$disabled:e})=>e?.5:1};
1312
- `,dd=({initialValues:e=[],value:t,onChange:i,title:n,tooltip:o,required:r,errorMessage:a})=>{const[s,l]=wt(t||e);vt(()=>{s.length||l([""])},[]);const c=s.filter(e=>!!e.trim()),d=kt(JSON.stringify(c));vt(()=>{const e=JSON.stringify(c);d.current!==e&&(d.current=e,i&&i(c))},[c]);const p=(e,t)=>{l(i=>{const n=[...i];return n[t]=e,n})},u=s.length<=1,h=s.some(e=>""===e.trim()),m=u&&h;return zt.jsxs(ad,{children:[zt.jsx(xl,{title:n,required:r,tooltip:o}),zt.jsx(sd,{children:s.map((e,t)=>{const i=t===s.length-1;return zt.jsxs(ld,{children:[zt.jsx(El,{value:e,onChange:e=>p(e.target.value,t),hasError:!!a,autoFocus:In(e)&&!u&&i}),t===s.length-1&&zt.jsx(cd,{withBorder:!0,size:30,$disabled:h,onClick:h?void 0:()=>{l(e=>{const t=[...e];return t.push(""),t})},children:zt.jsx(et,{})}),zt.jsx(cd,{size:30,$disabled:m,onClick:m?void 0:()=>(e=>{u?p("",e):l(t=>t.filter((t,i)=>i!==e))})(t),children:zt.jsx(at,{})})]},`input-list-${t}`)})}),!!a&&zt.jsx(uo,{children:a})]})},pd=({col:e,colIdx:t,row:i,rowIdx:n,rowsLength:o,maxWidth:r,handleChange:a,errorMessage:s,limitFieldsPerRow:l})=>{const{keyName:c,title:d,tooltip:p,placeholder:u,required:h,type:m,componentType:g,options:$,renderCondition:f}=e,x=i[c];return f&&!f(i)?null:zt.jsx("td",{style:{maxWidth:r,padding:"4px 6px 4px 0"},children:(()=>{switch(g){case vi.Dropdown:const e=$?.find(e=>e.id===x);return zt.jsx(zl,{title:l?d:void 0,tooltip:l?p:void 0,placeholder:u,required:h,options:$||[],value:e,onSelect:e=>a(c,e.id,n),onDeselect:()=>a(c,"",n),hasError:!!s&&(!h||h&&In(x))});case"multi-dropdown":const i=Array.isArray(x)&&$?.filter(e=>x.includes(e.id))||[];return zt.jsx(zl,{title:l?d:void 0,tooltip:l?p:void 0,placeholder:u,required:h,options:$||[],value:i,isMulti:!0,onSelect:e=>{const t=[...Array.isArray(x)?x:[],e.id];a(c,t,n)},onDeselect:e=>{const t=(Array.isArray(x)?x:[]).filter(t=>t!==e.id);a(c,t,n)},hasError:!!s&&(!h||h&&In(x))});default:const g=o>1&&n===o-1&&0===t&&In(x);return zt.jsx(El,{title:l?d:void 0,tooltip:l?p:void 0,placeholder:u,type:m,required:h,autoFocus:g,value:x,onChange:({target:{value:e}})=>a(c,e,n),style:{maxWidth:r,paddingLeft:10},hasError:!!s&&(!h||h&&In(x))})}})()},`input-table-${n}-${c}`)},ud=Bt.div`
1313
- display: flex;
1314
- flex-direction: column;
1315
- width: 100%;
1316
- `,hd=Bt.button`
1317
- margin-top: ${({$marginTop:e})=>e};
1318
- background: none;
1319
- border: none;
1320
- cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
1321
- opacity: ${({disabled:e})=>e?.5:1};
1322
- `,md=({columns:e,initialValues:t=[],value:i,onChange:n,errorMessage:o,limitFieldsPerRow:r,title:a=""})=>{const[s,l]=wt({}),[c,d]=wt(i||t),p=yt(()=>new Map(e.map(e=>[e.keyName,e])),[e]);vt(()=>{if(!c.length){const t={};e.forEach(({keyName:e})=>t[e]=""),l(t),d([t])}},[]);const u=c.filter(e=>{for(const[t,i]of Object.entries(e)){const n=p.get(t);if((!n?.renderCondition||n.renderCondition(e))&&n?.required&&In(i))return!1}return!0}),h=kt(JSON.stringify(u)),m=u.length!==c.length,g=`${Math.floor(640/((r||e.length)+.4))}px`;vt(()=>{const e=JSON.stringify(u);h.current!==e&&(h.current=e,n&&n(u))},[u]);const $=(e,t,i)=>{d(n=>{const o=ti(n);return o[i][e]=t,o})},f=yt(()=>{if(r){const t=[];for(let i=0;;i+=r){const n=e.slice(i,i+r);if(!n.length)break;t.push(n)}return t}return[e]},[r,e]);return zt.jsxs(ud,{children:[zt.jsx(xl,{title:a}),zt.jsxs("table",{style:{borderCollapse:"collapse"},children:[!r&&zt.jsx("thead",{children:zt.jsxs("tr",{children:[e.map(({title:e,tooltip:t,required:i})=>zt.jsx("th",{style:{maxWidth:g},children:zt.jsx(xl,{title:e,required:i,tooltip:t})},`input-table-head-${e}`)),zt.jsx("th",{})]})}),zt.jsx("tbody",{children:c.map((t,i)=>zt.jsxs(bt,{children:[r&&i>0?zt.jsx("tr",{children:zt.jsx("td",{colSpan:f.length,children:zt.jsx(ga,{})})}):null,f.map((n,a)=>zt.jsxs("tr",{children:[n.map((e,n)=>zt.jsx(pd,{col:e,colIdx:n,row:t,rowIdx:i,rowsLength:c.length,maxWidth:g,limitFieldsPerRow:r,errorMessage:o,handleChange:$},`input-table-row-${i}-col-${n}`)),0===a&&zt.jsx("td",{children:zt.jsx(hd,{$marginTop:r?"24px":"0",onClick:()=>{return t=i,void(c.length>1?d(e=>e.filter((e,i)=>i!==t)):e.forEach(({keyName:e,type:i})=>$(e,i===ki.Number?"0":"",t)));var t},children:zt.jsx(at,{})})})]},`input-table-matrix-${i}-${a}`))]},`input-table-row-${i}`))})]}),!!o&&zt.jsx(uo,{children:o}),zt.jsx(ks,{onClick:()=>{d(e=>{const t=ti(e);return t.push(ti(s)),t})},disabled:m})]})},gd=Bt.div`
1323
- display: flex;
1324
- flex-direction: column;
1325
- width: 100%;
1326
- `,$d=Bt.div`
1327
- display: flex;
1328
- flex-direction: column;
1329
- gap: 8px;
1330
- `,fd=Bt.div`
1331
- display: flex;
1332
- align-items: center;
1333
- gap: 8px;
1334
- `,xd=Bt.div`
1335
- width: 100%;
1336
- max-width: ${({$maxWidth:e})=>e?`${e}px`:"unset"};
1337
- `,bd=Bt(Sa)`
1338
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
1339
- opacity: ${({$disabled:e})=>e?.5:1};
1340
- `,yd={key:"",value:""},wd=({initialKeyValuePairs:e=[],value:t,onChange:i,title:n,tooltip:o,disabled:r,required:a,errorMessage:s,keyPlaceholder:l="Key",valuePlaceholder:c="Value",inputMaxWidth:d=300})=>{const[p,u]=wt(t||e);vt(()=>{p.length||u([{...yd}])},[]);const h=p.filter(({key:e,value:t})=>!In(e.trim())&&!In(t.trim())),m=kt(JSON.stringify(h));vt(()=>{const e=JSON.stringify(h);m.current!==e&&(m.current=e,i&&i(h))},[h]);const g=(e,t,i)=>{u(n=>{const o=[...n];return o[i][e]=t,o})},$=p.length<=1,f=r||p.some(({key:e,value:t})=>""===e.trim()||""===t.trim()),x=r||$&&f;return zt.jsxs(gd,{children:[zt.jsx(xl,{title:n,required:a,tooltip:o}),zt.jsx($d,{children:p.map(({key:e,value:t},i)=>zt.jsxs(fd,{children:[zt.jsx(xd,{$maxWidth:d,children:zt.jsx(El,{placeholder:l,disabled:r,value:e,onChange:e=>g("key",e.target.value,i),hasError:!!s&&(!a||a&&!e),autoFocus:In(t)&&!$&&i===p.length-1})}),zt.jsx(xd,{$maxWidth:i===p.length-1?d-38:d,children:zt.jsx(El,{placeholder:c,disabled:r,value:t,onChange:e=>g("value",e.target.value,i),hasError:!!s&&(!a||a&&In(t)),autoFocus:!1})}),i===p.length-1&&zt.jsx(bd,{withBorder:!0,size:30,$disabled:f,onClick:f?void 0:()=>{u(e=>{const t=[...e];return t.push({...yd}),t})},children:zt.jsx(et,{})}),zt.jsx(bd,{size:30,$disabled:x,onClick:x?void 0:()=>(e=>{$?(g("key","",e),g("value","",e)):u(t=>t.filter((t,i)=>i!==e))})(i),children:zt.jsx(at,{})})]},`key-value-input-list-${i}`))}),!!s&&zt.jsx(uo,{children:s})]})},vd=Mt`
1341
- 0% {
1342
- background-position: 0% 50%;
1343
- }
1344
- 100% {
1345
- background-position: 100% 50%;
1346
- }
1347
- `,kd=Bt(lo)`
1348
- background: ${({$textColor:e,$stripColor:t})=>`linear-gradient(45deg, ${e} 0%, ${e} 40%, ${t} 50%, ${e} 60%, ${e} 100%)`};
1349
- background-size: 250% 100%; /* Expand background to allow movement */
1350
- background-clip: text;
1351
- color: transparent;
1352
- animation: ${vd} 1s reverse linear infinite;
1353
- `,Cd=({children:e="Loading...",textColor:t,stripColor:i,...n})=>{const o=Lt(),r=t||o.v2.colors.white[500],a=i||o.v2.colors.black[500];return zt.jsx(kd,{$textColor:r,$stripColor:a,...n,children:e})},Ed=Bt.div`
1354
- display: flex;
1355
- flex-direction: ${({$isVertical:e})=>e?"column":"row"};
1356
- gap: ${({$isVertical:e})=>e?"12px":"24px"};
1357
- ${({$hasError:e})=>e&&Rt`
1358
- border: 1px solid ${({theme:e})=>e.text.error};
1359
- border-radius: 32px;
1360
- padding: 8px;
1361
- `}
1362
- `,Sd=(e,t)=>!t?.length||!!t?.find(t=>t===e),Ad=({isVertical:e,title:t="Monitors",required:i,errorMessage:n,allowedSignals:o,selectedSignals:r,setSelectedSignals:a})=>{const[s,l]=wt(1===r.length),c=kt(JSON.stringify(r));return vt(()=>{const e=r;e.length||Ho.forEach(({id:t})=>{Sd(t,o)&&e.push(t)});const t=JSON.stringify(e);return c.current!==t&&(c.current=t,a(e),l(1===e.length)),()=>{c.current=""}},[o]),zt.jsxs("div",{children:[t&&zt.jsx(xl,{title:t,required:i}),zt.jsx(Ed,{$isVertical:e,$hasError:!!n,children:Ho.map(e=>{const t=Sd(e.id,o),i=((e,t)=>!!t?.find(t=>t===e))(e.id,r);return t?zt.jsx(Ga,{title:e.value,disabled:!t||s&&i,value:i,onChange:t=>((e,t)=>{const i=e,n=t?[...r,i]:r.filter(e=>e!==i);a(n),l(1===n.length)})(e.id,t)},e.id):null})}),!!n&&zt.jsx(uo,{children:n})]})},Dd=Bt.div`
1363
- display: flex;
1364
- gap: 8px;
1365
- align-items: center;
1366
- `,Td=Bt(br)`
1367
- display: flex;
1368
- align-items: center;
1369
- justify-content: center;
1370
- gap: 8px;
1371
- min-width: 90px;
1372
- `,zd=({buttons:e})=>{const t=Lt(),i=({button:t,index:i})=>e.length>1&&0===i&&(t.icon||t.iconSrc),n=({button:e,rotate:i})=>e.icon?zt.jsx(e.icon,{size:14,rotate:i,fill:t.text[e.variant||"secondary"]}):e.iconSrc?zt.jsx("img",{src:e.iconSrc,alt:e.label,width:8,height:12}):null;return zt.jsx(Dd,{children:e.map((e,t)=>zt.jsx(ka,{text:e.tooltip||"",children:zt.jsxs(Td,{variant:e.variant||"secondary",onClick:e.onClick,disabled:e.disabled,children:[i({button:e,index:t})&&n({button:e,rotate:0}),e.label,!i({button:e,index:t})&&n({button:e,rotate:180})]},t)},t))})},Fd=Bt.div`
1373
- height: ${({$height:e})=>e}px;
1374
- width: 100%;
1375
- overflow: auto;
1376
- `,Od=Bt.div`
1377
- height: ${({$height:e})=>e}px;
1378
- width: 100%;
1379
- position: relative;
1380
- `,Id=Bt.div`
1381
- height: ${({$height:e})=>e}px;
1382
- width: 100%;
1383
- position: absolute;
1384
- top: 0;
1385
- left: 0;
1386
- transform: translateY(${({$yOffset:e})=>e}px);
1387
- `,Nd=({containerHeight:e,elementHeight:t,elements:i})=>{const{overflowRef:n,listHeight:o,listItems:r}=Nr({items:i,rowHeight:t});return zt.jsx(Fd,{ref:n,$height:e,children:zt.jsx(Od,{$height:o,children:r.map(({key:e,index:t,size:n,start:o})=>{const r=t>i.length-1,a=i[t];return zt.jsx(Id,{$height:n,$yOffset:o,children:r?zt.jsx(Zr,{children:zt.jsx(Cd,{})}):a},e)})})})},_d=Bt.div`
1388
- display: flex;
1389
- justify-content: space-between;
1390
- align-items: center;
1391
- gap: 16px;
1392
- `,Bd=Bt.div`
1393
- display: flex;
1394
- flex-direction: column;
1395
- gap: 4px;
1396
- `,Rd=Bt.div`
1397
- display: flex;
1398
- align-items: center;
1399
- gap: 8px;
1400
- `,Ld=Bt(lo)``,Md=Bt(lo)``,Pd=({title:e,description:t,badgeLabel:i,icon:n,actionButton:o,size:r="medium"})=>{const a="small"===r?16:"medium"===r?20:24,s="small"===r?12:"medium"===r?14:16;return zt.jsxs(_d,{children:[zt.jsxs(Bd,{children:[zt.jsxs(Rd,{children:[n&&zt.jsx(n,{size:a}),zt.jsx(Ld,{weight:300,size:a,children:e}),void 0!==i&&zt.jsx(gr,{label:i,filled:!!i})]}),zt.jsx(Md,{weight:200,opacity:.8,size:s,children:t})]}),o&&zt.jsx("div",{children:o})]})},jd=Bt.div`
1401
- position: relative;
1402
- gap: 0;
1403
- z-index: 0;
1404
- display: grid;
1405
- grid-template-columns: repeat(${({$count:e})=>e}, 1fr);
1406
- `,Ud=Bt.button`
1407
- flex: 1;
1408
- display: flex;
1409
- align-items: center;
1410
- justify-content: center;
1411
- gap: 4px;
1412
- padding: 6px 12px;
1413
- background-color: transparent;
1414
- border-radius: ${({$isFirstItem:e,$isLastItem:t})=>e?"32px 0px 0px 32px":t?"0px 32px 32px 0px":"0"};
1415
- border: 1px solid ${({theme:e})=>e.colors.border};
1416
- cursor: pointer;
1417
- &:hover {
1418
- border: 1px solid ${({theme:e})=>e.colors.secondary};
1419
- }
1420
- `,Wd=Bt.div`
1421
- position: absolute;
1422
- top: ${({$y:e})=>e}px;
1423
- left: ${({$x:e})=>e}px;
1424
- z-index: -1;
1425
- width: ${({$width:e})=>e}px;
1426
- height: ${({$height:e})=>e}px;
1427
- background-color: ${({theme:e,$bgColor:t})=>t||e.colors.dropdown_bg_2};
1428
- border-radius: ${({$isFirstItem:e,$isLastItem:t})=>e?"32px 0px 0px 32px":t?"0px 32px 32px 0px":"0"};
1429
- transition: all 0.3s;
1430
- `,Vd=({options:e=[],selected:t,setSelected:i})=>{const n=e.findIndex(e=>e.value===t),[o,r]=wt(e[n]?.selectedBgColor||""),[a,s]=wt({width:0,height:0}),[l,c]=wt({x:0,y:0}),d=kt(null);return vt(()=>{d.current&&(s({width:d.current.offsetWidth,height:d.current.offsetHeight}),c({x:d.current.offsetWidth*n,y:0}))},[t,n]),zt.jsxs(jd,{$count:e.length,children:[e.map(({icon:n,label:o,value:a,selectedBgColor:s,selectedTextColor:l},c)=>{const p=t===a;return zt.jsxs(Ud,{ref:p?d:void 0,$isFirstItem:0===c,$isLastItem:c===e.length-1,onClick:()=>{i(a),r(s||"")},children:[n&&zt.jsx(n,{}),o&&zt.jsx(lo,{size:12,family:"secondary",decoration:"underline",color:p?l:void 0,children:o})]},`segment-${o||c}-${a}`)}),zt.jsx(Wd,{$bgColor:o,$width:a.width,$height:a.height,$x:l.x,$y:l.y,$isFirstItem:0===n,$isLastItem:n===e.length-1})]})},Hd=Bt(br)`
1431
- gap: 8px;
1432
- text-transform: none;
1433
- text-decoration: none;
1434
- border: ${({theme:e,$withBorder:t})=>`1px solid ${t?e.colors.border:"transparent"}`};
1435
- &.not-selected {
1436
- background-color: ${({theme:e,$color:t})=>t||e.colors.dropdown_bg_2+Do["060"]};
1437
- &:hover {
1438
- background-color: ${({theme:e,$hoverColor:t})=>t||e.colors.dropdown_bg_2};
1439
- }
1440
- }
1441
- &.selected {
1442
- background-color: ${({theme:e})=>e.colors.majestic_blue+Do["030"]};
1443
- }
1444
- `,qd=Bt(lo)`
1445
- white-space: nowrap;
1446
- overflow: hidden;
1447
- text-overflow: ellipsis;
1448
- font-size: 14px;
1449
- `,Gd=({label:e,onClick:t,icon:i,iconSrc:n,badgeLabel:o,badgeFilled:r,isSelected:a,withBorder:s,color:l,hoverColor:c,style:d})=>{const p=Lt();return zt.jsxs(Hd,{onClick:t,className:a?"selected":"not-selected",$withBorder:s,$color:l,$hoverColor:c,style:d,children:[i&&zt.jsx("div",{children:zt.jsx(i,{fill:p.text.info})}),n&&zt.jsx("div",{children:zt.jsx("img",{src:n,alt:"",width:16,height:16})}),zt.jsx(qd,{children:e}),a&&zt.jsx("div",{children:zt.jsx(Ge,{fill:p.colors.majestic_blue_soft})}),void 0!==o&&zt.jsx(gr,{label:o,filled:r||a})]})},Kd=Bt.div`
1450
- display: flex;
1451
- flex-direction: column;
1452
- gap: 16px;
1453
- ${({$maxWidth:e})=>e&&`max-width: ${e};`}
1454
- `,Yd=Bt.div`
1455
- display: flex;
1456
- align-items: center;
1457
- gap: 16px;
1458
- `,Jd=Bt.div`
1459
- width: 50px;
1460
- height: 50px;
1461
- border-radius: 8px;
1462
- background: ${({theme:e})=>`linear-gradient(90deg, ${e.colors.dropdown_bg_2} 25%, ${e.colors.dropdown_bg_2} 50%, ${e.colors.border} 75%)`};
1463
- background-size: 200% 100%;
1464
- animation: ${Lo} 10s infinite linear;
1465
- `,Xd=Bt(Xr)`
1466
- flex: 1;
1467
- gap: 12px;
1468
- `,Zd=Bt.div`
1469
- width: ${({$width:e})=>e};
1470
- height: 16px;
1471
- background: ${({theme:e})=>`linear-gradient(90deg, ${e.colors.dropdown_bg_2} 25%, ${e.colors.dropdown_bg_2} 50%, ${e.colors.border} 75%)`};
1472
- background-size: 200% 100%;
1473
- animation: ${Lo} 1.5s infinite linear;
1474
- border-radius: 4px;
1475
- `,Qd=({size:e=5,maxWidth:t})=>zt.jsx(Kd,{$maxWidth:t,children:[...Array(e)].map((e,t)=>zt.jsxs(Yd,{children:[zt.jsx(Jd,{}),zt.jsxs(Xd,{children:[zt.jsx(Zd,{$width:"80%"}),zt.jsx(Zd,{$width:"100%"})]})]},t))});var ep;!function(e){e.Active="active",e.Disabled="disabled",e.Finished="finish"}(ep||(ep={}));const tp=Bt.div`
1476
- display: flex;
1477
- flex-direction: column;
1478
- gap: 32px;
1479
- `,ip=Bt.div`
1480
- display: flex;
1481
- gap: 16px;
1482
- padding: 8px;
1483
- opacity: ${({$state:e})=>e===ep.Active?1:e===ep.Disabled?.5:.8};
1484
- transition: all 0.3s;
1485
- `,np=Bt(Jr)`
1486
- justify-content: center;
1487
- width: 24px;
1488
- height: 24px;
1489
- border-radius: 32px;
1490
- border: ${({theme:e,$state:t})=>t===ep.Disabled?`1px dashed ${e.text.dark_grey}`:`1px solid ${e.colors.secondary}`};
1491
- opacity: ${({$state:e})=>e===ep.Finished?.8:1};
1492
- `,op=Bt(Xr)`
1493
- justify-content: center;
1494
- gap: 8px;
1495
- `,rp=Bt(lo)``,ap=Bt(lo)``,sp=({data:e,currentStep:t=0})=>{const[i,n]=wt([]);return vt(()=>{n(e.map((e,i)=>i<t-1?{...e,state:ep.Finished,subtitle:e.subtitle||Ci.Success}:i===t-1?{...e,state:ep.Active,subtitle:""}:{...e,state:ep.Disabled,subtitle:""}))},[t,e]),zt.jsx(tp,{children:i.map((e,t)=>zt.jsxs(ip,{$state:e.state,children:[zt.jsx(np,{$state:e.state,children:[ep.Active,ep.Disabled].includes(e.state)?zt.jsx(lo,{size:12,children:e.stepNumber}):e.state===ep.Finished?zt.jsx(Ge,{size:20}):null}),zt.jsxs(op,{children:[zt.jsx(rp,{family:"secondary",children:e.title}),e.subtitle&&zt.jsx(ap,{size:10,weight:300,children:e.subtitle})]})]},t))})},lp=Bt(Jr)`
1496
- width: fit-content;
1497
- gap: 6px;
1498
- padding: 6px 12px;
1499
- border-radius: 360px;
1500
- background-color: ${({$type:e,theme:t})=>t.colors[e]};
1501
- `,cp=Bt(lo)`
1502
- color: ${({$type:e,theme:t})=>t.text[e]};
1503
- `,dp=({type:e=Ci.Info,icon:t,title:i,size:n,family:o,children:r,...a})=>zt.jsxs(lp,{$type:e,children:[t&&zt.jsx(t,{}),zt.jsx(cp,{$type:e,size:n||12,family:o||"secondary",...a,children:r||i})]}),pp=Bt.div`
1504
- display: flex;
1505
- flex-direction: column;
1506
- position: relative;
1507
- width: 100%;
1508
- `,up=Bt.div`
1509
- width: 100%;
1510
- display: flex;
1511
- align-items: center;
1512
- gap: 12px;
1513
- transition: border-color 0.3s;
1514
- border-radius: 24px;
1515
- border: 1px solid ${({theme:e})=>e.colors.border};
1516
- ${({$disabled:e})=>e&&Rt`
1517
- background-color: ${({theme:e})=>e.colors.border};
1518
- cursor: not-allowed;
1519
- opacity: 0.6;
1520
- `}
1521
-
1522
- ${({$hasError:e})=>e&&Rt`
1523
- border-color: ${({theme:e})=>e.text.error};
1524
- `}
1525
-
1526
- ${({$isActive:e})=>e&&Rt`
1527
- border-color: ${({theme:e})=>e.colors.secondary};
1528
- `}
1529
-
1530
- &:hover {
1531
- border-color: ${({theme:e})=>e.colors.secondary};
1532
- }
1533
- &:focus-within {
1534
- border-color: ${({theme:e})=>e.colors.secondary};
1535
- }
1536
- `,hp=Bt.textarea`
1537
- flex: 1;
1538
- border: none;
1539
- outline: none;
1540
- background: none;
1541
- color: ${({theme:e})=>e.text.secondary};
1542
- font-size: 14px;
1543
- padding: 12px 20px 0;
1544
- font-family: ${({theme:e})=>e.font_family.primary};
1545
- font-weight: 300;
1546
- line-height: 22px;
1547
- &::placeholder {
1548
- color: ${({theme:e})=>e.text.secondary};
1549
- font-family: ${({theme:e})=>e.font_family.primary};
1550
- opacity: 0.4;
1551
- font-size: 14px;
1552
- font-weight: 300;
1553
- line-height: 22px; /* 157.143% */
1554
- }
1555
-
1556
- &:disabled {
1557
- background-color: ${({theme:e})=>e.colors.border};
1558
- cursor: not-allowed;
1559
- }
1560
- `,mp=({errorMessage:e,title:t,tooltip:i,required:n,onChange:o,name:r,...a})=>{const s=kt(null),l=e=>{s.current&&(s.current.style.height="auto",e&&(s.current.style.height=`${s.current.scrollHeight}px`))};return zt.jsxs(pp,{children:[zt.jsx(xl,{title:t,required:n,tooltip:i}),zt.jsx(up,{$disabled:a.disabled,$hasError:!!e,$isActive:!!a.autoFocus,children:zt.jsx(hp,{ref:s,"data-id":r,name:r,onFocus:()=>l(!0),onBlur:()=>l(!1),onChange:e=>{e.stopPropagation(),l(!0),o?.(e)},onKeyDown:e=>{e.stopPropagation()},...a})}),!!e&&zt.jsx(uo,{children:e})]})},gp=Bt.div`
1561
- display: flex;
1562
- align-items: center;
1563
- gap: 12px;
1564
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
1565
- opacity: ${({$disabled:e})=>e?.6:1};
1566
- `,$p=Bt.div`
1567
- width: 24px;
1568
- height: 12px;
1569
- border: 1px ${({$isActive:e,theme:t})=>e?`solid ${t.colors.majestic_blue}`:`dashed ${t.text.grey}`};
1570
- border-radius: 20px;
1571
- display: flex;
1572
- align-items: center;
1573
- padding: 2px;
1574
- background-color: transparent;
1575
- pointer-events: ${({$disabled:e})=>e?"none":"auto"};
1576
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
1577
- opacity: ${({$isActive:e})=>e?1:.5};
1578
- transition: border-color 0.3s, opacity 0.3s;
1579
- &::before {
1580
- content: '';
1581
- width: 12px;
1582
- height: 12px;
1583
- border-radius: 50%;
1584
- background-color: ${({$isActive:e,theme:t})=>e?t.colors.majestic_blue:t.colors.secondary};
1585
- transform: ${({$isActive:e})=>e?"translateX(12px)":"translateX(0)"};
1586
- transition: background-color 0.3s, transform 0.3s;
1587
- }
1588
- `,fp=({title:e,tooltip:t,initialValue:i=!1,onChange:n,disabled:o,allowPropagation:r=!1,flipHorizontally:a})=>{const[s,l]=wt(i);return vt(()=>l(i),[i]),zt.jsxs(gp,{$disabled:o,onClick:e=>{o||(r||e.stopPropagation(),n?n(!s):l(e=>!e))},children:[!a&&zt.jsx($p,{$disabled:o,$isActive:s}),(e||t)&&zt.jsx(ka,{text:t,withIcon:!0,children:e&&zt.jsx(lo,{size:14,children:e})}),a&&zt.jsx($p,{$disabled:o,$isActive:s})]})};var xp={v:"5.12.1",fr:60,ip:0,op:80,w:220,h:620,nm:"Odigos - Trace Loader",ddd:0,assets:[{id:"comp_0",nm:"moving lines-5",fr:60,layers:[{ddd:0,ind:1,ty:4,nm:"moving lines-5",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[6.097,.571,0],ix:2,l:2},a:{a:0,k:[-.046,-149.04,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[-.055,-173.88],[.095,546.629]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"st",c:{a:0,k:[.976470588235,.976470588235,.976470588235,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:6,ix:5},lc:1,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[85.714,85.714],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Vector",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.757],y:[.459]},o:{x:[.441],y:[0]},t:2.4,s:[0]},{i:{x:[.574],y:[.569]},o:{x:[.451],y:[.436]},t:18.172,s:[23.624]},{i:{x:[.571],y:[1]},o:{x:[.173],y:[.635]},t:36.174,s:[85.889]},{t:51,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[.757],y:[.582]},o:{x:[.441],y:[0]},t:0,s:[0]},{i:{x:[.574],y:[.569]},o:{x:[.451],y:[.436]},t:12.174,s:[23.624]},{i:{x:[.571],y:[1]},o:{x:[.173],y:[.635]},t:30.174,s:[85.889]},{t:45,s:[100]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1}],ip:0,op:51,st:-26,ct:1,bm:0}]},{id:"comp_1",nm:"moving lines-4",fr:60,layers:[{ddd:0,ind:1,ty:4,nm:"moving lines-4",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[5.475,.571,0],ix:2,l:2},a:{a:0,k:[.144,-156.04,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[.167,-182.047],[.314,547.797]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"st",c:{a:0,k:[.976470588235,.976470588235,.976470588235,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:6,ix:5},lc:1,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[85.714,85.714],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Vector",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.757],y:[.459]},o:{x:[.441],y:[0]},t:17.9,s:[0]},{i:{x:[.574],y:[.569]},o:{x:[.451],y:[.436]},t:38.055,s:[23.624]},{i:{x:[.571],y:[1]},o:{x:[.173],y:[.635]},t:61.053,s:[85.889]},{t:80,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[.757],y:[.582]},o:{x:[.441],y:[0]},t:0,s:[0]},{i:{x:[.574],y:[.569]},o:{x:[.451],y:[.436]},t:15.553,s:[23.624]},{i:{x:[.571],y:[1]},o:{x:[.173],y:[.635]},t:38.555,s:[85.889]},{t:57.5,s:[100]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1}],ip:0,op:80,st:-26,ct:1,bm:0}]},{id:"comp_2",nm:"moving lines-3",fr:60,layers:[{ddd:0,ind:1,ty:4,nm:"moving lines-3",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[5.841,.571,0],ix:2,l:2},a:{a:0,k:[.324,-150.04,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[.382,-175.047],[-.051,538.464]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"st",c:{a:0,k:[.976470588235,.976470588235,.976470588235,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:6,ix:5},lc:1,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[85.714,85.714],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Vector",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.757],y:[.459]},o:{x:[.441],y:[0]},t:6,s:[0]},{i:{x:[.574],y:[.569]},o:{x:[.451],y:[.436]},t:23.525,s:[23.624]},{i:{x:[.571],y:[1]},o:{x:[.173],y:[.635]},t:43.525,s:[85.889]},{t:60,s:[100]}],ix:1},e:{a:1,k:[{i:{x:[.757],y:[.582]},o:{x:[.441],y:[0]},t:0,s:[0]},{i:{x:[.574],y:[.569]},o:{x:[.451],y:[.436]},t:13.525,s:[23.624]},{i:{x:[.571],y:[1]},o:{x:[.173],y:[.635]},t:33.525,s:[85.889]},{t:50,s:[100]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1}],ip:0,op:60,st:-26,ct:1,bm:0}]}],layers:[{ddd:0,ind:1,ty:0,nm:"moving lines-5",refId:"comp_0",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[213,1,0],ix:2,l:2},a:{a:0,k:[6,0,0],ix:1,l:2},s:{a:0,k:[100,99.4,100],ix:6,l:2}},ao:0,w:12,h:619,ip:-22,op:29,st:-22,ct:1,bm:0},{ddd:0,ind:2,ty:0,nm:"moving lines-5",refId:"comp_0",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[213,1,0],ix:2,l:2},a:{a:0,k:[6,0,0],ix:1,l:2},s:{a:0,k:[100,99.4,100],ix:6,l:2}},ao:0,w:12,h:619,ip:56,op:107,st:56,ct:1,bm:0},{ddd:0,ind:3,ty:0,nm:"moving lines-5",refId:"comp_0",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[213,1,0],ix:2,l:2},a:{a:0,k:[6,0,0],ix:1,l:2},s:{a:0,k:[100,99.4,100],ix:6,l:2}},ao:0,w:12,h:619,ip:22,op:73,st:22,ct:1,bm:0},{ddd:0,ind:4,ty:0,nm:"moving lines-4",refId:"comp_1",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[110.5,1,0],ix:2,l:2},a:{a:0,k:[5.5,0,0],ix:1,l:2},s:{a:0,k:[100,98.2,100],ix:6,l:2}},ao:0,w:11,h:627,ip:-65,op:15,st:-65,ct:1,bm:0},{ddd:0,ind:5,ty:0,nm:"moving lines-4",refId:"comp_1",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[110.5,1,0],ix:2,l:2},a:{a:0,k:[5.5,0,0],ix:1,l:2},s:{a:0,k:[100,98.2,100],ix:6,l:2}},ao:0,w:11,h:627,ip:14,op:94,st:14,ct:1,bm:0},{ddd:0,ind:6,ty:0,nm:"moving lines-3",refId:"comp_2",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[7,1,0],ix:2,l:2},a:{a:0,k:[5.5,0,0],ix:1,l:2},s:{a:0,k:[100,100.4,100],ix:6,l:2}},ao:0,w:11,h:613,ip:2,op:62,st:2,ct:1,bm:0},{ddd:0,ind:7,ty:0,nm:"moving lines-3",refId:"comp_2",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[7,1,0],ix:2,l:2},a:{a:0,k:[5.5,0,0],ix:1,l:2},s:{a:0,k:[100,100.4,100],ix:6,l:2}},ao:0,w:11,h:613,ip:-36,op:20,st:-40,ct:1,bm:0},{ddd:0,ind:8,ty:0,nm:"moving lines-3",refId:"comp_2",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[7,1,0],ix:2,l:2},a:{a:0,k:[5.5,0,0],ix:1,l:2},s:{a:0,k:[100,100.4,100],ix:6,l:2}},ao:0,w:11,h:613,ip:39,op:99,st:39,ct:1,bm:0},{ddd:0,ind:9,ty:4,nm:"Vector :M",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[110,309.736,0],ix:2,l:2},a:{a:0,k:[308.5,313.236,0],ix:1,l:2},s:{a:0,k:[100,100,100],ix:6,l:2}},ao:0,shapes:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[205.677,618.844],[205.677,4.807]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ind:1,ty:"sh",ix:2,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[411.428,618.822],[411.333,4.99]],c:!1},ix:2},nm:"Path 6",mn:"ADBE Vector Shape - Group",hd:!1},{ind:2,ty:"sh",ix:3,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[308.5,618.796],[308.5,5.145]],c:!1},ix:2},nm:"Path 7",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"st",c:{a:0,k:[.975244164467,.975244164467,.975244164467,.639999985695],ix:3},o:{a:0,k:64,ix:4},w:{a:0,k:1,ix:5},lc:1,lj:1,ml:4,bm:0,nm:"Stroke 7",mn:"ADBE Vector Graphic - Stroke",hd:!1}],ip:0,op:684,st:0,ct:1,bm:0}],markers:[],props:{}};const bp=Bt.div`
1589
- width: ${({$width:e})=>e}px;
1590
- height: ${({$height:e})=>e}px;
1591
- position: relative;
1592
- `,yp=({width:e=620})=>{const{darkMode:t}=Lt(),i=e/(620/220),n=e;return zt.jsx(bp,{$width:n,$height:i,children:zt.jsx(Kt,{autoplay:!0,loop:!0,animationData:xp,style:{width:i,height:n,transform:"rotate(-90deg)",position:"absolute",top:-(i-i/10),left:i-i/10,filter:t?"invert(0)":"invert(1)"}})})};var wp,vp;!function(e){e.Primary="primary",e.Secondary="secondary",e.Text="text"}(wp||(wp={})),function(e){e.S="small",e.M="medium",e.L="large"}(vp||(vp={}));const kp=Bt.button`
1593
- display: flex;
1594
- align-items: center;
1595
- justify-content: center;
1596
- gap: 8px;
1597
- ${({$fullWidth:e})=>e&&Rt`
1598
- width: 100%;
1599
- `}
1600
- border: none;
1601
- border-radius: 6px;
1602
- ${({$size:e,$hasLabel:t})=>e===vp.S?Rt`
1603
- height: 32px;
1604
- ${t?Rt`
1605
- padding: 8px 16px;
1606
- `:Rt`
1607
- width: 32px;
1608
- `}
1609
- `:e===vp.M?Rt`
1610
- height: 38px;
1611
- ${t?Rt`
1612
- padding: 8px 18px;
1613
- `:Rt`
1614
- width: 38px;
1615
- `}
1616
- `:Rt`
1617
- height: 44px;
1618
- ${t?Rt`
1619
- padding: 8px 22px;
1620
- `:Rt`
1621
- width: 44px;
1622
- `}
1623
- `}
1624
-
1625
- cursor: pointer;
1626
- &:disabled {
1627
- background-color: ${({theme:e})=>e.v2.colors.silver[800]};
1628
- cursor: not-allowed;
1629
- }
1630
- &:enabled {
1631
- ${({$withShadow:e})=>e?Rt`
1632
- box-shadow: 0 0 11px 0 rgba(0, 0, 0, 0.32);
1633
- `:""}
1634
- ${({$variant:e})=>e===wp.Primary?Rt`
1635
- background-color: ${({theme:e})=>e.v2.colors.purple[500]};
1636
- &:hover {
1637
- background-color: ${({theme:e})=>e.v2.colors.purple[600]};
1638
- }
1639
- &:active {
1640
- background-color: ${({theme:e})=>e.v2.colors.purple[700]};
1641
- }
1642
- `:e===wp.Secondary?Rt`
1643
- background-color: ${({theme:e})=>e.v2.colors.silver[750]};
1644
- &:hover {
1645
- background-color: ${({theme:e})=>e.v2.colors.silver[600]};
1646
- }
1647
- &:active {
1648
- background-color: ${({theme:e})=>e.v2.colors.silver[500]};
1649
- }
1650
- `:e===wp.Text?Rt`
1651
- background-color: transparent;
1652
- &:hover {
1653
- background-color: ${({theme:e})=>e.v2.colors.silver[800]};
1654
- }
1655
- &:active {
1656
- background-color: ${({theme:e})=>e.v2.colors.silver[900]};
1657
- }
1658
- `:""}
1659
- }
1660
- `,Cp=Et(({label:e,leftIcon:t,rightIcon:i,variant:n=wp.Primary,size:o=vp.M,iconSize:r,loading:a,fullWidth:s,withShadow:l,disabled:c,onClick:d,...p},u)=>{const h=Lt(),m=r||(o===vp.L?18:16),g=o===vp.L?Qn.S:Qn.XS,$=c?h.v2.colors.grey[400]:h.v2.colors.white[500];return zt.jsx(kp,{ref:u,$variant:n,$size:o,$fullWidth:s,$withShadow:l,$hasLabel:!!e,disabled:c,onClick:a?void 0:e=>{e.stopPropagation(),d?.(e)},...p,children:a?e?zt.jsx(Cd,{size:h.v2.text.size[g],textColor:$}):zt.jsx(cs,{}):zt.jsxs(zt.Fragment,{children:[t&&zt.jsx(t,{size:m,fill:$}),e?zt.jsx(to,{size:g,weight:500,color:$,nowrap:!0,children:e}):null,i&&zt.jsx(i,{size:m,fill:$})]})})});Cp.displayName=Cp.name;const Ep=Bt.button`
1661
- width: 100%;
1662
- padding: 0;
1663
- padding-right: 12px;
1664
- display: flex;
1665
- align-items: center;
1666
- justify-content: flex-start;
1667
- gap: 12px;
1668
- border-radius: 8px;
1669
- border: none;
1670
- ${({$hovered:e})=>e?Rt`
1671
- background-color: ${({theme:e})=>e.v2.colors.silver[750]};
1672
- `:Rt`
1673
- background-color: ${({theme:e})=>e.v2.colors.silver[800]};
1674
- `}
1675
- overflow: hidden;
1676
- cursor: pointer;
1677
- &:disabled {
1678
- cursor: not-allowed;
1679
- }
1680
- `,Sp=Bt.div`
1681
- width: ${({$hasIcon:e})=>e?"56px":"0"};
1682
- height: 56px;
1683
- display: flex;
1684
- align-items: center;
1685
- justify-content: center;
1686
- ${({$hovered:e})=>e?Rt`
1687
- background-color: ${({theme:e})=>e.v2.colors.silver[600]};
1688
- `:Rt`
1689
- background-color: ${({theme:e})=>e.v2.colors.silver[700]};
1690
- `}
1691
- `,Ap=Bt.div`
1692
- width: ${({$hasIcon:e})=>e?"calc(100% - 56px)":"100%"};
1693
- display: flex;
1694
- justify-content: space-between;
1695
- align-items: center;
1696
- gap: 8px;
1697
- `,Dp=({label:e,icon:t,loading:i,onClick:n})=>{const[o,r]=wt(!1);return zt.jsxs(Ep,{$hovered:o,type:"button",disabled:i,onClick:n,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:[zt.jsx(Sp,{$hovered:o,$hasIcon:!!t,children:t&&zt.jsx(t,{size:36})}),zt.jsxs(Ap,{$hasIcon:!!t,children:[i?zt.jsx(Cd,{size:16}):zt.jsx(to,{variant:Zn.Span,align:"center",children:e}),zt.jsx(dt,{rotate:90,size:24})]})]})},Tp=({buttons:e})=>zt.jsx(Xr,{$gap:12,children:e.map(e=>zt.jsx(Dp,{...e},e.label))}),zp=Bt.div`
1698
- display: flex;
1699
- align-items: center;
1700
- flex-wrap: wrap;
1701
- width: calc(100% - 24px);
1702
- padding: 4px 12px;
1703
- border-radius: 12px;
1704
- background-color: ${({theme:e})=>e.v2.colors.silver[800]};
1705
- `,Fp=Bt.div`
1706
- width: calc(${({$cellsPerRow:e})=>100/e+"%"} - 16px);
1707
- margin: 8px;
1708
- display: flex;
1709
- flex-direction: column;
1710
- gap: 4px;
1711
- `,Op=({cellsPerRow:e,items:t})=>{const i=Lt(),{CopyButton:n}=zr();return zt.jsx(zp,{children:t.map(({id:o,title:r,label:a,withCopy:s,badge:l})=>zt.jsxs(Fp,{$cellsPerRow:e||t.length,children:[zt.jsx(to,{size:Qn.XXXS,color:i.v2.colors.silver[200],nowrap:!0,children:r}),zt.jsxs(Jr,{$gap:4,children:[l&&zt.jsx(no,{...l}),a&&zt.jsx(to,{size:Qn.XS,nowrap:!0,children:a}),s&&zt.jsx(n,{value:a||l?.label?.toString()||"",size:Ar.XS})]})]},o))})};var Ip;!function(e){e.S="s",e.L="l"}(Ip||(Ip={}));const Np=Bt.div`
1712
- position: relative;
1713
- z-index: 0;
1714
- display: flex;
1715
- align-items: center;
1716
- gap: 2px;
1717
- padding: 3px;
1718
- border-radius: 8px;
1719
- border: 1px solid ${({theme:e})=>e.v2.colors.grey[500]};
1720
- background-color: ${({theme:e})=>e.v2.colors.silver[700]};
1721
- `,_p=Bt.button`
1722
- flex: 1;
1723
- display: flex;
1724
- align-items: center;
1725
- justify-content: center;
1726
- gap: 8px;
1727
- padding: ${({$size:e})=>e===Ip.S?"4px 8px":"8px 16px"};
1728
- border-radius: 6px;
1729
- border: none;
1730
- background-color: ${({theme:e,$isSelected:t})=>t?e.v2.colors.black[500]:"transparent"};
1731
- box-shadow: ${({$isSelected:e})=>e?"0 0 11px 0 rgba(0, 0, 0, 0.32)":"none"};
1732
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
1733
- &:hover {
1734
- background-color: ${({theme:e,$isSelected:t})=>t?e.v2.colors.black[500]:e.v2.colors.silver[800]};
1735
- }
1736
- `,Bp=({size:e=Ip.L,options:t=[],selected:i,setSelected:n,disabled:o})=>{const r=Lt(),a=o?r.v2.colors.grey[400]:r.v2.colors.white[500],s=e===Ip.S?Qn.XXS:Qn.XS,l=e===Ip.S?400:500;return zt.jsx(Np,{$count:t.length,children:t.map(({value:t,label:r,icon:c},d)=>{const p=i===t;return zt.jsxs(_p,{onClick:()=>!o&&n(t),$isSelected:p,$disabled:o,$size:e,children:[c&&zt.jsx(c,{fill:a}),r&&zt.jsx(to,{size:s,weight:l,color:a,nowrap:!0,children:r})]},`segment-${r||d}-${t}`)})})},Rp=Bt.div`
1737
- width: ${({$width:e})=>e?`calc(${e} - 24px)`:"fit-content"};
1738
- padding: 6px 12px;
1739
- display: flex;
1740
- align-self: stretch;
1741
- align-items: center;
1742
- gap: 8px;
1743
- border-radius: 6px;
1744
-
1745
- border: none;
1746
- border-radius: 6px;
1747
- background: ${({$isHovered:e,$isActive:t,theme:i})=>e||t?i.v2.colors.silver[700]:i.v2.colors.silver[800]};
1748
- `,Lp=Bt.input`
1749
- flex: 1;
1750
- font-family: ${({theme:e})=>e.font_family.primary};
1751
- font-size: 14px;
1752
- font-weight: 400;
1753
- line-height: 20px;
1754
-
1755
- cursor: text;
1756
- color: ${({$textColor:e})=>e};
1757
- &::placeholder {
1758
- color: ${({$textColor:e})=>e};
1759
- }
1760
-
1761
- overflow: hidden;
1762
- text-overflow: ellipsis;
1763
- white-space: nowrap;
1764
- `,Mp=({value:e,onChange:t,placeholder:i,width:n,segment:o})=>{const r=Lt(),[a,s]=wt(!1),[l,c]=wt(!1),[d,p]=wt(!1),u=a?r.v2.colors.white[500]:r.v2.colors.silver[200],h=!!o?.options?.length,m=yt(()=>{if(h)return o?.options.find(e=>e.value===o.selected)?.label},[h,o?.options,o?.selected]),g=yt(()=>i||(h&&m?`Search by ${m.toLowerCase()}`:"Search..."),[i,h,m]);return zt.jsxs(Rp,{$width:n,onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),$isHovered:l&&!d,$isActive:a,children:[zt.jsx(rt,{size:18,fill:u}),zt.jsx(Lp,{"data-id":"search",name:"search",type:"text",placeholder:g,value:e,onChange:e=>{e.stopPropagation(),t(e.target.value)},onFocus:()=>s(!0),onBlur:()=>s(!1),$textColor:u}),h&&zt.jsx("div",{onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:zt.jsx(Bp,{options:o.options,selected:o.selected,setSelected:o.setSelected,size:Ip.S})})]})};var Pp;!function(e){e.S="small",e.L="large"}(Pp||(Pp={}));const jp=Bt.div`
1765
- width: fit-content;
1766
- display: flex;
1767
- align-items: center;
1768
- gap: 8px;
1769
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
1770
- `,Up=Bt.div`
1771
- width: ${({$size:e})=>e===Pp.S?"16px":"20px"};
1772
- height: ${({$size:e})=>e===Pp.S?"16px":"20px"};
1773
- display: flex;
1774
- align-items: center;
1775
- justify-content: center;
1776
- border-radius: 4px;
1777
- border: 1px solid ${({$borderColor:e})=>e};
1778
- background-color: ${({$backgroundColor:e})=>e};
1779
- `,Wp=({label:e,size:t=Pp.L,disabled:i,partiallyChecked:n,value:o,onChange:r})=>{const a=Lt(),[s,l]=wt(!1),c=n||o,d=t===Pp.S?12:16,p=i?a.v2.colors.grey[400]:a.v2.colors.white[500],u=c?"transparent":i?a.v2.colors.grey[700]:s?a.v2.colors.silver[400]:a.v2.colors.silver[600],h=i?a.v2.colors.grey[600]:c?a.v2.colors.purple[500]:a.v2.colors.silver[900];return zt.jsxs(jp,{"data-id":"checkbox"+(e?`-${e}`:""),onClick:e=>{e.stopPropagation(),i||r(!!n||!o)},$disabled:i,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[zt.jsx(Up,{$size:t,$borderColor:u,$backgroundColor:h,children:n?zt.jsx(Je,{size:d,fill:p}):o?zt.jsx(Ge,{size:d,fill:p}):null}),e&&zt.jsx(to,{size:t===Pp.S?Qn.XXS:Qn.XS,nowrap:!0,children:e})]})},Vp=Bt.div`
1780
- display: flex;
1781
- flex-direction: ${({$direction:e})=>e===hi.Horizontal?"row":"column"};
1782
- gap: ${({$direction:e})=>e===hi.Horizontal?16:8}px;
1783
- `,Hp=({direction:e=hi.Vertical,title:t,size:i,disabled:n,withSelectAll:o,options:r,values:a,setValues:s})=>{const l=i===Pp.S?Qn.XXS:Qn.XS,c=yt(()=>r.every(e=>a[e.id]),[r,a]),d=yt(()=>r.some(e=>a[e.id])&&r.some(e=>!a[e.id]),[r,a]),p=(e,t)=>{s(i=>{const n={...i};return e?n[e]=t:r.forEach(e=>n[e.id]=t),n})};return zt.jsxs(Vp,{$direction:e,children:[t&&o?zt.jsx(Wp,{label:t,partiallyChecked:d,value:c,onChange:e=>p("",e),size:i}):t&&!o?zt.jsx(to,{size:l,children:t}):null,r.map(e=>zt.jsx(Wp,{...e,value:a[e.id],onChange:t=>p(e.id,t),disabled:n,size:i},`${t}-checkbox-${e.id}`))]})};var qp,Gp;!function(e){e.Left="left",e.Right="right"}(qp||(qp={})),function(e){e.Top="top",e.Bottom="bottom"}(Gp||(Gp={}));const Kp=Bt.div`
1784
- position: relative;
1785
- `,Yp=Bt.div`
1786
- display: flex;
1787
- flex-direction: column;
1788
- gap: 0;
1789
-
1790
- min-width: 120px;
1791
- width: ${({$fullWidth:e})=>e?"calc(100% - 16px)":"fit-content"};
1792
- padding: 8px;
1793
- border-radius: 6px;
1794
- background-color: ${({theme:e})=>e.v2.colors.silver[900]};
1795
- box-shadow: 0 0 24px 0 rgba(0, 0, 0, 0.3);
1796
-
1797
- position: absolute;
1798
- ${({$alignX:e})=>`${e}: 0;`}
1799
- ${({$alignY:e,$withButton:t})=>`${e===Gp.Bottom?"top":"bottom"}: ${t?"calc(100% + 8px)":"0"};`}
1800
- `,Jp=Bt.div`
1801
- display: flex;
1802
- flex-direction: column;
1803
- gap: 0;
1804
-
1805
- width: 100%;
1806
- max-height: ${({$maxHeight:e})=>e||"230px"};
1807
- overflow-y: auto;
1808
- `,Xp=Bt.div`
1809
- display: flex;
1810
- align-items: center;
1811
- gap: 8px;
1812
- width: calc(100% - 16px);
1813
- padding: 8px;
1814
- border-radius: 6px;
1815
- cursor: pointer;
1816
- ${({$selected:e})=>e?Rt`
1817
- background-color: ${({theme:e})=>e.v2.colors.silver[500]};
1818
- `:Rt`
1819
- background-color: transparent;
1820
- &:hover {
1821
- background-color: ${({theme:e})=>e.v2.colors.grey[700]};
1822
- }
1823
- `}
1824
- `,Zp=({defaultOpen:e,alignX:t,alignY:i,items:n,selectedIds:o,setSelectedIds:r,withMultiSelect:a,withSearch:s,fullWidth:l,maxHeight:c,buttonProps:d,iconButtonProps:p})=>{const u=Lt(),h=!!d||!!p,[m,g]=wt(e??!h),[$,f]=wt({x:t||qp.Left,y:i||Gp.Bottom}),x=e=>{g(e=>!e),f({x:t||(e.clientX>window.innerWidth/2?qp.Right:qp.Left),y:i||(e.clientY>window.innerHeight/2?Gp.Top:Gp.Bottom)})},b=e=>{r(a?o.includes(e)?o.filter(t=>t!==e):[...o,e]:[e]),h&&!a&&g(!1)},y=kt(null);Lr(y,()=>g(!1));const[w,v]=wt(""),k=yt(()=>w?n.filter(e=>e?.label?.toLowerCase().includes(w.toLowerCase())):n,[n.length,w]);return zt.jsxs(Kp,{ref:y,children:[d&&zt.jsx(Cp,{...d,fullWidth:l,rightIcon:m?pt:ut,onClick:x}),p&&zt.jsx(Tr,{...p,onClick:x}),m&&zt.jsxs(Yp,{$alignX:$.x,$alignY:$.y,$fullWidth:l,$withButton:h,children:[s&&zt.jsx(Mp,{value:w,onChange:v,width:"100%"}),zt.jsx(Jp,{$maxHeight:c,children:k.map(e=>{if(!e)return null;const{id:t,label:i,icon:n,withCheckbox:r}=e,a=o.includes(t);return zt.jsxs(Xp,{$selected:a,onClick:()=>b(t),children:[r&&zt.jsx(Wp,{value:a,onChange:()=>b(t)}),n&&zt.jsx(n,{size:14,fill:u.v2.colors.white[500]}),zt.jsx(to,{size:Qn.XS,nowrap:!0,children:i})]},t)})}),a&&zt.jsx(Cp,{label:"Done",onClick:()=>g(!1)})]})]})};var Qp;!function(e){e.Button="button",e.ButtonDropData="button-drop-data"}(Qp||(Qp={}));const eu=({onAnyClick:e,actions:t})=>zt.jsx(Jr,{$gap:8,$alignItems:"center",children:t?.map(t=>{if(!t)return null;switch(t.type){case Qp.Button:return zt.jsx(Cp,{...t.buttonProps,onClick:i=>{t.buttonProps?.onClick?.(i),e?.()}},t.id);case Qp.ButtonDropData:return zt.jsx(Zp,{...t.dropDataProps,items:t.dropDataProps?.items??[],withMultiSelect:!1,selectedIds:[],setSelectedIds:i=>{t.buttonProps?.onClick?.(i[0]),e?.()},buttonProps:t.buttonProps},t.id);default:return null}})}),tu=({icon:e,title:t,withCopy:i,badge:n,children:o})=>{const{CopyButton:r}=zr();return zt.jsxs(Jr,{$gap:6,$alignItems:"center",children:[zt.jsx(e,{size:24}),zt.jsx(to,{nowrap:!0,children:t}),i&&zt.jsx(r,{value:t,size:Ar.XS}),n&&zt.jsx(no,{...n}),o]})};var iu;!function(e){e.S="small",e.M="medium"}(iu||(iu={}));const nu=Bt.div`
1825
- display: flex;
1826
- flex-direction: column;
1827
- gap: ${({$gap:e})=>e}px;
1828
- width: ${({$padding:e})=>`calc(100% - ${2*e}px)`};
1829
- padding: ${({$padding:e})=>e}px;
1830
- border-radius: 16px;
1831
- background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
1832
- `,ou=({size:e=iu.M,richTitle:t,search:i,actions:n,children:o})=>{const r=e===iu.S?4:16,a=e===iu.S?12:16;return zt.jsxs(nu,{$padding:a,$gap:r,children:[zt.jsxs(Jr,{$gap:r,$justifyContent:"space-between",children:[zt.jsx(tu,{...t,children:i&&zt.jsx(Mp,{...i})}),zt.jsx(eu,{actions:n??[]})]}),o]})},ru=Bt.div`
1833
- flex: 1;
1834
- align-self: stretch;
1835
- display: flex;
1836
- align-items: center;
1837
- gap: 8px;
1838
- padding: 16px;
1839
- border-radius: 12px;
1840
- background-color: ${({theme:e,$status:t})=>Cn(e,t,t===Ai.Unknown?"750":"500")};
1841
- `,au=Bt.div`
1842
- display: flex;
1843
- align-items: center;
1844
- justify-content: center;
1845
- width: fit-content;
1846
- height: fit-content;
1847
- padding: 8px;
1848
- border-radius: 12px;
1849
- background-color: ${({theme:e,$status:t})=>t===Ai.Unknown?Cn(e,t,"800"):Cn(e,t,"900")+Do["015"]};
1850
- `,su=({status:e,icon:t,title:i,description:n})=>{const o=Lt(),r=t??Sn(e,o),a=[Ci.Default,Ci.Info,Ai.Disabled,Ai.Unknown].includes(e)?o.v2.colors.white[500]:o.v2.colors.black[500];return zt.jsxs(ru,{$status:e,children:[zt.jsx(au,{$status:e,children:zt.jsx(r,{size:32,fill:a})}),zt.jsxs(Xr,{$gap:2,$justifyContent:"center",children:[zt.jsx(to,{size:Qn.M,weight:500,color:a,nowrap:!0,children:i}),zt.jsx(to,{size:Qn.XXS,weight:300,color:a,nowrap:!0,children:n})]})]})},lu=Bt.div`
1851
- flex: 1;
1852
- align-self: stretch;
1853
- display: flex;
1854
- flex-direction: column;
1855
- gap: 12px;
1856
- padding: 12px;
1857
- border-radius: 12px;
1858
- background-color: ${({theme:e})=>e.v2.colors.silver[800]};
1859
- `,cu=["-","N/A"],du=({title:e,cells:t})=>{const i=Lt();return zt.jsxs(lu,{children:[zt.jsx(to,{size:Qn.XXS,color:i.v2.colors.grey[150],children:e}),zt.jsx(Jr,{$gap:32,children:t.map(t=>zt.jsxs(Xr,{$gap:2,children:[!t.isLoading||t.value&&!cu.includes(t.value)?zt.jsx(to,{size:t.label?Qn.M:Qn.L,children:t.value}):zt.jsx(cs,{scale:.9}),t.label&&zt.jsx(to,{size:Qn.XXS,children:t.label})]},`${e}-${t.label}-${t.value}`))})]})},pu=Bt(Jr)`
1860
- width: calc(100% - 20px);
1861
- padding: 10px;
1862
- border-radius: 6px;
1863
- background-color: ${({theme:e})=>e.v2.colors.grey[800]};
1864
- display: flex;
1865
- align-items: center;
1866
- justify-content: space-between;
1867
- gap: 12px;
1868
- `,uu=Bt.div`
1869
- position: relative;
1870
- width: ${({$hideCopy:e})=>e?"100%":"calc(100% - 24px - 12px)"};
1871
- display: flex;
1872
- align-items: center;
1873
- gap: 4px;
1874
- `,hu=Bt.pre`
1875
- flex: 1;
1876
- margin: 0;
1877
- padding: 0;
1878
- font-size: 14px;
1879
- color: #5ffb98; // TODO: add to theme
1880
- overflow-x: auto;
1881
- `,mu=Bt.span`
1882
- flex-shrink: 0;
1883
- font-size: 14px;
1884
- color: #5ffb98; // TODO: add to theme
1885
- `,gu=({value:e,hideCopy:t=!1,onDone:i})=>{const{CopyButton:n}=zr({onDone:i}),o=kt(null),[r,a]=wt(!1);return vt(()=>{const e=()=>{if(o.current){const{scrollWidth:e,clientWidth:t}=o.current;a(e>t)}};e();const t=new ResizeObserver(e);return o.current&&t.observe(o.current),()=>{t.disconnect()}},[e]),zt.jsxs(pu,{children:[zt.jsxs(uu,{$hideCopy:t,children:[zt.jsx(hu,{ref:o,children:e}),r&&zt.jsx(mu,{children:"..."})]}),!t&&zt.jsx(n,{value:e,size:Ar.XS})]})},$u=Bt.div`
1886
- display: flex;
1887
- align-items: center;
1888
- justify-content: space-between;
1889
- width: calc(100%);
1890
- `,fu=Bt.div`
1891
- display: flex;
1892
- align-items: center;
1893
- gap: 16px;
1894
- `,xu=Bt.div`
1895
- display: flex;
1896
- align-items: center;
1897
- justify-content: center;
1898
- width: 36px;
1899
- height: 36px;
1900
- border-radius: 8px;
1901
- background: ${({theme:e})=>e.v2.colors.silver[800]};
1902
- `,bu=Bt.div`
1903
- display: flex;
1904
- align-items: center;
1905
- gap: 12px;
1906
- `,yu=({icon:e,title:t,actions:i,onClose:n,onCloseDisabled:o})=>zt.jsxs($u,{children:[zt.jsxs(fu,{children:[zt.jsx(xu,{children:zt.jsx(e,{size:24})}),zt.jsx(to,{size:Qn.S,children:t})]}),zt.jsxs(bu,{children:[i?.length?zt.jsx(Tr,{icon:ht,size:Ar.M,onClick:()=>alert("todo")}):null,zt.jsx(Tr,{icon:Ye,size:Ar.M,onClick:n,disabled:o})]})]}),wu=Bt.div`
1907
- position: fixed;
1908
- top: 0;
1909
- bottom: 0;
1910
- ${({$position:e})=>e}: 0;
1911
- z-index: 1000;
1912
-
1913
- display: flex;
1914
- flex-direction: column;
1915
- gap: 12px;
1916
-
1917
- width: calc(${({$width:e})=>e} - 32px);
1918
- padding: 12px;
1919
- border-radius: ${({$position:e})=>"left"===e?"0 20px 20px 0":"20px 0 0 20px"};
1920
- background: ${({theme:e})=>e.v2.colors.black[500]};
1921
- box-shadow: 0 0 34px 0 rgba(0, 0, 0, 0.7);
1922
- overflow: hidden;
1923
-
1924
- animation-name: ${({$position:e})=>_o.in[e]};
1925
- `,vu=Bt.div`
1926
- display: flex;
1927
- flex-direction: column;
1928
- gap: 12px;
1929
-
1930
- height: calc(100% - ${56}px);
1931
- overflow-y: auto;
1932
- `,ku=({isOpen:e,hideOverlay:t=!1,position:i="right",width:n="600px",header:o,children:r})=>(kr(e),e?qt(zt.jsxs(zt.Fragment,{children:[!t&&zt.jsx(ea,{onClick:o.onCloseDisabled?void 0:o.onClose}),zt.jsxs(wu,{$position:i,$width:n,children:[zt.jsx(yu,{...o}),zt.jsx(vu,{children:r})]})]}),document.body):null),Cu=Bt.header`
1933
- position: relative;
1934
- width: calc(100% - 36px);
1935
- padding: 12px 18px;
1936
- background-color: ${({theme:e})=>e.v2.colors.black[500]};
1937
- display: flex;
1938
- align-items: center;
1939
- justify-content: space-between;
1940
- `,Eu=Bt(Jr)`
1941
- position: absolute;
1942
- left: 50%;
1943
- transform: translateX(-50%);
1944
- gap: 16px;
1945
- `,Su=({left:e=[],center:t=[],right:i=[]})=>zt.jsxs(Cu,{children:[zt.jsx(Jr,{$gap:16,children:e}),zt.jsx(Eu,{children:t}),zt.jsx(Jr,{$gap:16,children:i})]}),Au=Bt.div`
1946
- display: flex;
1947
- align-items: center;
1948
- gap: 2px;
1949
- width: fit-content;
1950
- padding: 4px;
1951
- border-radius: 8px;
1952
- background-color: ${({theme:e})=>e.v2.colors.silver[600]};
1953
- box-shadow: 0 3px 8px 0 rgba(0, 0, 0, 0.25);
1954
-
1955
- position: absolute;
1956
- right: ${({$right:e})=>e||"12px"};
1957
- top: 50%;
1958
- transform: translateY(-50%);
1959
- `,Du=({isOpen:e,actions:t,positionRight:i})=>e?zt.jsx(Au,{$right:i,children:t.map(e=>e?zt.jsx(ka,{text:e.tooltip||"",children:zt.jsx(Cp,{...e,variant:wp.Secondary,size:vp.S,label:e.label})},e.id):null)}):null,Tu=Bt.span`
1960
- font-family: ${({theme:e})=>e.font_family.primary};
1961
- font-size: 14px;
1962
- font-weight: 400;
1963
- color: ${({theme:e})=>e.text.error};
1964
- `,zu=Bt.span`
1965
- font-family: ${({theme:e})=>e.font_family.primary};
1966
- font-size: 14px;
1967
- font-weight: 400;
1968
- color: ${({theme:e})=>e.v2.colors.silver[200]};
1969
- `,Fu=Bt.div`
1970
- padding: ${({$small:e})=>e?"4px":"12px"};
1971
-
1972
- display: flex;
1973
- align-self: stretch;
1974
- align-items: center;
1975
- gap: 8px;
1976
- border-radius: 6px;
1977
-
1978
- border: 1px solid ${({theme:e,$disabled:t,$error:i})=>t?e.v2.colors.grey[600]:i?e.v2.colors.red[500]:e.v2.colors.silver[500]};
1979
- background: ${({theme:e,$disabled:t})=>t?e.v2.colors.grey[800]:e.v2.colors.black[500]};
1980
- ${({$disabled:e,$error:t})=>!e&&!t&&Rt`
1981
- &:hover,
1982
- &:active,
1983
- &:focus-within {
1984
- border: 1px solid ${({theme:e})=>e.v2.colors.silver[300]};
1985
- }
1986
- `}
1987
- `,Ou=Bt.input`
1988
- flex: 1;
1989
- font-family: ${({theme:e})=>e.font_family.primary};
1990
- font-size: ${({$small:e})=>e?"12px":"14px"};
1991
- font-weight: 400;
1992
-
1993
- line-height: ${({$small:e})=>e?"unset":"22px"};
1994
- max-width: ${({$maxWidth:e})=>e||"unset"};
1995
-
1996
- cursor: text;
1997
- color: ${({theme:e})=>e.v2.colors.white[500]};
1998
- &::placeholder {
1999
- color: ${({theme:e})=>e.v2.colors.silver[200]};
2000
- }
2001
-
2002
- &:disabled {
2003
- cursor: not-allowed;
2004
- color: ${({theme:e})=>e.v2.colors.grey[400]};
2005
- &::placeholder {
2006
- color: ${({theme:e})=>e.v2.colors.grey[400]};
2007
- }
2008
- }
2009
-
2010
- overflow: hidden;
2011
- text-overflow: ellipsis;
2012
- white-space: nowrap;
2013
- `,Iu=Bt.div`
2014
- display: flex;
2015
- align-items: center;
2016
- justify-content: center;
2017
- cursor: pointer;
2018
- `,Nu=({label:e,required:t,tooltip:i,leftIcon:n,rightIcon:o,errorMessage:r,helpMessage:a,type:s=ki.Text,name:l,value:c,onChange:d,disabled:p,maxWidth:u,small:h=!1,...m})=>{const g=Lt(),$=s===ki.Password,[f,x]=wt(!1),b=c?g.v2.colors.white[500]:p?g.v2.colors.grey[400]:g.v2.colors.silver[200],y=h?14:18;return zt.jsxs(Xr,{$gap:6,children:[(e||i||t)&&zt.jsxs(Jr,{$justifyContent:"space-between",children:[e&&zt.jsx(zu,{children:e}),zt.jsxs(Jr,{$gap:10,children:[i&&zt.jsx(ka,{text:i,withIcon:!0}),t&&zt.jsx(Tu,{children:"*"})]})]}),zt.jsxs(Fu,{$small:h,$disabled:p,$error:!!r,children:[n?zt.jsx(n,{size:y,fill:b}):null,zt.jsx(Ou,{"data-id":l,type:f||s===ki.Number?ki.Text:s,name:l,value:c,onChange:e=>{e.stopPropagation(),s===ki.Number&&(e.target.value=Vn(e.target.value)),d?.(e)},onKeyDown:e=>{["Enter"].includes(e.key)||e.stopPropagation()},disabled:p,$maxWidth:u,$small:h,...m}),$?zt.jsx(Iu,{onClick:()=>x(e=>!e),children:f?zt.jsx(nt,{size:y,fill:b}):zt.jsx(ot,{size:y,fill:b})}):o?zt.jsx(o,{size:y,fill:b}):null]}),r?zt.jsxs(Jr,{$gap:4,children:[zt.jsx(qe,{size:12,fill:g.v2.colors.red[500]}),zt.jsx(to,{size:Qn.XXS,weight:400,color:g.v2.colors.red[500],children:r})]}):a?zt.jsxs(Jr,{$gap:4,children:[zt.jsx(qe,{size:12,fill:g.v2.colors.silver[200]}),zt.jsx(to,{size:Qn.XXS,weight:400,color:g.v2.colors.silver[200],children:a})]}):null]})},_u=Bt.div`
2019
- position: ${({$relativeToParent:e})=>e?"absolute":"fixed"};
2020
- top: 50%;
2021
- left: 50%;
2022
- transform: translate(-50%, -50%);
2023
- z-index: 1000;
2024
- width: fit-content;
2025
- border-radius: 20px;
2026
- background: ${({theme:e})=>e.v2.colors.black[500]};
2027
- box-shadow: 0 0 34px 0 rgba(0, 0, 0, 0.7);
2028
- overflow: hidden;
2029
-
2030
- animation-name: ${_o.in.center};
2031
- `,Bu=Bt.div`
2032
- position: relative;
2033
- `,Ru=Bt.div`
2034
- position: absolute;
2035
- top: 16px;
2036
- left: 16px;
2037
- `,Lu=({isOpen:e,hideOverlay:t=!1,relativeToParent:i=!1,onBack:n,onClose:o,children:r})=>{if(kr(e),!e)return null;const a=zt.jsxs(zt.Fragment,{children:[!t&&zt.jsx(ea,{$relativeToParent:i,onClick:o}),zt.jsx(_u,{$relativeToParent:i,children:zt.jsxs(Bu,{children:[n&&zt.jsx(Ru,{children:zt.jsx(Tr,{icon:e=>zt.jsx(dt,{rotate:-90,...e}),size:Ar.L,onClick:n})}),r]})})]});return i?a:qt(a,document.body)},Mu=Bt.div`
2038
- min-width: 530px;
2039
- `,Pu=Bt.div`
2040
- display: flex;
2041
- flex-direction: column;
2042
- align-items: center;
2043
- gap: 16px;
2044
- padding: 24px;
2045
- `,ju=Bt.div`
2046
- display: flex;
2047
- justify-content: center;
2048
- gap: 16px;
2049
- padding: 16px 24px;
2050
- background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
2051
- `,Uu=({visual:e,title:t,description:i,isOpen:n,onClose:o,onDeny:r,denyLabel:a="Deny",onApprove:s,approveLabel:l="Approve",...c})=>{const d=Lt();return zt.jsx(Lu,{isOpen:n,onClose:o,...c,children:zt.jsxs(Mu,{children:[zt.jsxs(Pu,{children:[e&&zt.jsx(e,{}),zt.jsx(to,{size:Qn.M,weight:500,color:d.v2.colors.white[500],children:t}),zt.jsx(Xr,{$alignItems:"center",$gap:4,children:i.split("\n").map(e=>zt.jsx(to,{size:Qn.XS,weight:400,color:d.v2.colors.silver[200],children:e},e))})]}),(r||s)&&zt.jsxs(ju,{children:[zt.jsx(Cp,{variant:wp.Secondary,label:a,onClick:()=>{r?.(),o()}}),s&&zt.jsx(Cp,{variant:wp.Primary,label:l,onClick:()=>{s(),o()}})]})]})})},Wu=({isOpen:e,onClose:t,onDeny:i,onApprove:n})=>zt.jsx(Uu,{title:"Discard changes?",description:"You have unsaved changes.\nIf you cancel now, your changes won't be saved.",isOpen:e,onClose:t,onDeny:i,denyLabel:"Keep editing",onApprove:n,approveLabel:"Discard changes"}),Vu=({isOpen:e,onClose:t,onDeny:i,onApprove:n,action:o="delete",target:r})=>{const a=o.charAt(0).toUpperCase()+o.substring(1),s=r?.endsWith("s")?"these":"this";return zt.jsx(Uu,{title:`${a}${r?` ${r}`:""}?`,description:`Are you sure you want to ${o}${r?` ${s} ${r}`:""}?`,isOpen:e,onClose:t,onDeny:i,denyLabel:"Go back",onApprove:n,approveLabel:a})},Hu=Bt.div`
2052
- width: ${({$size:e})=>e}px;
2053
- height: ${({$size:e})=>e}px;
2054
- border-radius: 100%;
2055
- background: ${({$color:e})=>e};
2056
- display: flex;
2057
- align-items: center;
2058
- justify-content: center;
2059
- `,qu=({scale:e,icon:t})=>{const i=Lt();return zt.jsx(Hu,{$size:45*e,$color:"rgba(80, 246, 232, 0.10)",children:zt.jsx(Hu,{$size:43*e,$color:"rgba(80, 246, 232, 0.20)",children:zt.jsx(Hu,{$size:39*e,$color:"rgba(80, 246, 232, 0.40)",children:zt.jsx(Hu,{$size:33*e,$color:"rgba(80, 246, 232, 0.60)",children:zt.jsx(Hu,{$size:23*e,$color:"#50F6E8",children:zt.jsx(t,{size:16*e,fill:i.v2.colors.black[500]})})})})})})},Gu=434,Ku=635,Yu=Bt.div`
2060
- width: ${434}px;
2061
- height: ${635}px;
2062
- display: flex;
2063
- flex-direction: column;
2064
- align-items: center;
2065
- justify-content: center;
2066
- padding: 16px;
2067
- background: linear-gradient(180deg, #0b0517 2.82%, #190d31 100%);
2068
- position: relative;
2069
- `,Ju=Bt.div`
2070
- position: absolute;
2071
- top: 50%;
2072
- left: 50%;
2073
- transform: translate(-50%, -50%);
2074
- `,Xu=()=>zt.jsxs(Yu,{children:[zt.jsx(Ju,{children:zt.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"464",height:"464",viewBox:"0 0 464 464",fill:"none",children:[zt.jsx("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)"}),zt.jsx("defs",{children:zt.jsxs("radialGradient",{id:"paint0_radial_164_65835",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(201.232 229.641) scale(231.217)",children:[zt.jsx("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),zt.jsx("stop",{offset:"0.41",stopColor:"#7C3BFF",stopOpacity:"0.11"}),zt.jsx("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.13"}),zt.jsx("stop",{offset:"0.67",stopColor:"#7C3BFF",stopOpacity:"0.18"}),zt.jsx("stop",{offset:"0.75",stopColor:"#7C3BFF",stopOpacity:"0.25"}),zt.jsx("stop",{offset:"0.83",stopColor:"#7C3BFF",stopOpacity:"0.33"}),zt.jsx("stop",{offset:"0.89",stopColor:"#7C3BFF",stopOpacity:"0.44"}),zt.jsx("stop",{offset:"0.95",stopColor:"#7C3BFF",stopOpacity:"0.56"}),zt.jsx("stop",{offset:"1",stopColor:"#7C3BFF",stopOpacity:"0.7"})]})})]})}),zt.jsx(Ju,{children:zt.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"432",height:"432",viewBox:"0 0 432 432",fill:"none",children:[zt.jsx("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)"}),zt.jsx("defs",{children:zt.jsxs("radialGradient",{id:"paint0_radial_164_65836",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(204.229 214.376) scale(216.276)",children:[zt.jsx("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),zt.jsx("stop",{offset:"0.38",stopColor:"#7C3BFF",stopOpacity:"0.11"}),zt.jsx("stop",{offset:"0.52",stopColor:"#7C3BFF",stopOpacity:"0.13"}),zt.jsx("stop",{offset:"0.62",stopColor:"#7C3BFF",stopOpacity:"0.18"}),zt.jsx("stop",{offset:"0.69",stopColor:"#7C3BFF",stopOpacity:"0.25"}),zt.jsx("stop",{offset:"0.76",stopColor:"#7C3BFF",stopOpacity:"0.33"}),zt.jsx("stop",{offset:"0.82",stopColor:"#7C3BFF",stopOpacity:"0.44"}),zt.jsx("stop",{offset:"0.88",stopColor:"#7C3BFF",stopOpacity:"0.57"}),zt.jsx("stop",{offset:"0.93",stopColor:"#7C3BFF",stopOpacity:"0.72"}),zt.jsx("stop",{offset:"0.97",stopColor:"#7C3BFF",stopOpacity:"0.88"}),zt.jsx("stop",{offset:"1",stopColor:"#7C3BFF"})]})})]})}),zt.jsx(Ju,{children:zt.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"374",height:"374",viewBox:"0 0 374 374",fill:"none",children:[zt.jsx("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)"}),zt.jsx("defs",{children:zt.jsxs("radialGradient",{id:"paint0_radial_164_65837",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(166.792 184.246) scale(186.963)",children:[zt.jsx("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),zt.jsx("stop",{offset:"0.31",stopColor:"#7C3BFF",stopOpacity:"0.11"}),zt.jsx("stop",{offset:"0.45",stopColor:"#7C3BFF",stopOpacity:"0.14"}),zt.jsx("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.19"}),zt.jsx("stop",{offset:"0.65",stopColor:"#7C3BFF",stopOpacity:"0.26"}),zt.jsx("stop",{offset:"0.73",stopColor:"#7C3BFF",stopOpacity:"0.35"}),zt.jsx("stop",{offset:"0.8",stopColor:"#7C3BFF",stopOpacity:"0.46"}),zt.jsx("stop",{offset:"0.86",stopColor:"#7C3BFF",stopOpacity:"0.6"}),zt.jsx("stop",{offset:"0.92",stopColor:"#7C3BFF",stopOpacity:"0.76"}),zt.jsx("stop",{offset:"0.98",stopColor:"#7C3BFF",stopOpacity:"0.93"}),zt.jsx("stop",{offset:"1",stopColor:"#7C3BFF"})]})})]})}),zt.jsx(Ju,{children:zt.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"257",height:"257",viewBox:"0 0 257 257",fill:"none",children:[zt.jsx("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)"}),zt.jsx("defs",{children:zt.jsxs("radialGradient",{id:"paint0_radial_164_65838",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(113.263 126.219) scale(128.08)",children:[zt.jsx("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),zt.jsx("stop",{offset:"0.31",stopColor:"#7C3BFF",stopOpacity:"0.11"}),zt.jsx("stop",{offset:"0.45",stopColor:"#7C3BFF",stopOpacity:"0.14"}),zt.jsx("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.19"}),zt.jsx("stop",{offset:"0.65",stopColor:"#7C3BFF",stopOpacity:"0.26"}),zt.jsx("stop",{offset:"0.73",stopColor:"#7C3BFF",stopOpacity:"0.35"}),zt.jsx("stop",{offset:"0.8",stopColor:"#7C3BFF",stopOpacity:"0.46"}),zt.jsx("stop",{offset:"0.86",stopColor:"#7C3BFF",stopOpacity:"0.6"}),zt.jsx("stop",{offset:"0.92",stopColor:"#7C3BFF",stopOpacity:"0.76"}),zt.jsx("stop",{offset:"0.98",stopColor:"#7C3BFF",stopOpacity:"0.93"}),zt.jsx("stop",{offset:"1",stopColor:"#7C3BFF"})]})})]})}),zt.jsx(Ju,{children:zt.jsx(H,{size:112})})]}),Zu=({minSupportedVersion:e,currentVersion:t})=>zt.jsx(Uu,{isOpen:!0,onClose:()=>{},relativeToParent:!0,visual:()=>zt.jsx(qu,{scale:2.4,icon:()=>zt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"21",viewBox:"0 0 22 21",fill:"none",children:zt.jsx("path",{fill:"#151618",d:"M9.4844 0.730003C9.99694 -0.243259 11.4076 -0.24341 11.92 0.730003L11.9685 0.831353L14.3039 6.22012L20.153 6.77755C21.3553 6.89211 21.841 8.38683 20.9358 9.18621L16.5314 13.0731L17.8091 18.8079C18.0716 19.9868 16.8005 20.9109 15.7605 20.2969L10.7017 17.3093L5.64282 20.2969C4.60289 20.9104 3.33173 19.9866 3.59427 18.8079L4.87192 13.0741L0.468608 9.18621C-0.43662 8.38693 0.0482932 6.8924 1.25029 6.77755L7.09837 6.22012L9.43588 0.831353L9.4844 0.730003ZM8.55284 7.02876C8.35287 7.48992 7.9179 7.80589 7.41751 7.85357L2.03952 8.36571L6.09027 11.941C6.46691 12.2737 6.63296 12.7852 6.5237 13.2758L5.34956 18.5459L10.0008 15.8009L10.1669 15.7179C10.5087 15.574 10.8945 15.5741 11.2364 15.7179L11.4036 15.8009L16.0538 18.5459L14.8807 13.2758C14.7714 12.7851 14.9374 12.2737 15.3141 11.941L19.3627 8.36571L13.9858 7.85357C13.4855 7.80587 13.0505 7.4899 12.8505 7.02876L10.7017 2.07342L8.55284 7.02876Z"})})}),title:"Upgrade Required",description:`To use this feature, please upgrade to Odigos v${e} or later.\nCurrent version: ${t}.`}),Qu=Bt.div`
2075
- padding: 0 12px;
2076
- `,eh=({title:e="YAML",yaml:t,defaultOpen:i})=>{const{clickCopy:n,isCopied:o}=zr(),[r,a]=wt(i??!1),s=yt(()=>t?[{id:rn(),type:Qp.Button,buttonProps:{variant:wp.Secondary,size:vp.S,leftIcon:o?Ge:Ke,onClick:()=>n(t||""),disabled:o}},{id:rn(),type:Qp.Button,buttonProps:{variant:wp.Secondary,size:vp.S,leftIcon:r?pt:ut,onClick:()=>a(e=>!e)}}]:[],[t,o,r]);return zt.jsx(ou,{richTitle:{icon:mt,title:e},actions:s,children:r&&zt.jsx(Qu,{children:t?zt.jsx(ns,{code:t,language:"yaml",theme:"duotoneDark"}):zt.jsx(Zr,{children:zt.jsx(Zs,{title:"YAML not found",subTitle:"The YAML for this resource is not available"})})})})},th=Bt.div`
2077
- display: flex;
2078
- align-items: center;
2079
- justify-content: space-between;
2080
- gap: 32px;
2081
-
2082
- padding: 18px 16px;
2083
- border-radius: 18px;
2084
- background-color: ${({theme:e})=>e.v2.colors.black[500]+Do["095"]};
2085
- box-shadow: 0 4px 16.7px 0 rgba(0, 0, 0, 0.83);
2086
-
2087
- position: fixed;
2088
- bottom: 0;
2089
- left: 50%;
2090
- animation-name: ${_o.in.center};
2091
- `,ih=({isOpen:e,onClose:t,richTitle:i,actions:n})=>e?zt.jsxs(th,{children:[zt.jsx(tu,{...i}),zt.jsx(eu,{onAnyClick:t,actions:n})]}):null,nh=Bt.div`
2092
- border-radius: 100%;
2093
- background-color: ${({theme:e})=>e.v2.colors.silver[700]};
2094
- position: relative;
2095
- `,oh=Bt.div`
2096
- width: 80px;
2097
- height: 80px;
2098
- border-radius: 100%;
2099
- border: 4px solid ${({theme:e})=>e.v2.colors.green[300]};
2100
- border-right-color: transparent;
2101
- border-left-color: transparent;
2102
- border-bottom-color: transparent;
2103
- animation: spin 1s linear infinite;
2104
- @keyframes spin {
2105
- to {
2106
- transform: rotate(360deg);
2107
- }
2108
- }
2109
- `,rh=Bt(to)`
2110
- position: absolute;
2111
- top: 50%;
2112
- left: 50%;
2113
- transform: translate(-50%, -50%);
2114
- `,ah=({percentage:e})=>zt.jsxs(nh,{children:[zt.jsx(oh,{}),"number"==typeof e?zt.jsx(rh,{size:Qn.M,weight:500,children:`${e}%`}):null]}),sh={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 lh(e){if("number"==typeof e)return{value:e,unit:"px"};let t;const i=(e.match(/^[0-9.]*/)||"").toString();t=i.includes(".")?parseFloat(i):parseInt(i,10);const n=(e.match(/[^0-9]*$/)||"").toString();return sh[n]?{value:t,unit:n}:{value:t,unit:"px"}}function ch(e){const t=lh(e);return`${t.value}${t.unit}`}const dh=(()=>{const e="react-spinners-SpinnerOld-fade";if("undefined"==typeof window||!window.document)return e;const t=document.createElement("style");document.head.appendChild(t);const i=t.sheet,n=`\n @keyframes ${e} {\n 50% {opacity: 0.3} 100% {opacity: 1}\n }\n `;return i&&i.insertRule(n,0),e})(),ph=({loading:e=!0,color:t,scale:i=1,speedMultiplier:n=1,cssOverride:o={},style:r={},...a})=>{const s=Lt(),l=t||s.text.secondary;if(!e)return null;const{value:c}=lh(2),d=c+4.2,p=d/2+d/5.5,u=4*d*i,h={position:"relative",width:`${u}px`,height:`${u}px`,scale:i,...r,...o},m=(e,t)=>({position:"absolute",width:ch(1.5),height:ch(4),borderRadius:ch(2),backgroundColor:l,transition:"2s",animationFillMode:"both",animation:`${dh} ${1.2/n}s ${.12*e}s infinite ease-in-out`,transform:`translate(-50%, -50%) rotate(${t}deg)`});return zt.jsxs("span",{style:h,...a,children:[zt.jsx("span",{style:{...m(1,0),top:`calc(50% + ${d}px)`,left:"50%"}}),zt.jsx("span",{style:{...m(2,-45),top:`calc(50% + ${p}px)`,left:`calc(50% + ${p}px)`}}),zt.jsx("span",{style:{...m(3,90),top:"50%",left:`calc(50% + ${d}px)`}}),zt.jsx("span",{style:{...m(4,45),top:`calc(50% + ${-1*p}px)`,left:`calc(50% + ${p}px)`}}),zt.jsx("span",{style:{...m(5,0),top:`calc(50% + ${-1*d}px)`,left:"50%"}}),zt.jsx("span",{style:{...m(6,-45),top:`calc(50% + ${-1*p}px)`,left:`calc(50% + ${-1*p}px)`}}),zt.jsx("span",{style:{...m(7,90),top:"50%",left:`calc(50% + ${-1*d}px)`}}),zt.jsx("span",{style:{...m(8,45),top:`calc(50% + ${p}px)`,left:`calc(50% + ${-1*p}px)`}})]})},uh=Mt`
2115
- 0% {
2116
- background-position: 0% 50%;
2117
- }
2118
- 100% {
2119
- background-position: 100% 50%;
2120
- }
2121
- `,hh=Bt(to)`
2122
- background: ${({$titleColor:e,$gradientColor:t})=>`linear-gradient(45deg, ${e} 0%, ${e} 40%, ${t} 50%, ${e} 60%, ${e} 100%)`};
2123
- background-size: 250% 100%; /* Expand background to allow movement */
2124
- background-clip: text;
2125
- color: transparent;
2126
- animation: ${uh} 1s reverse linear infinite;
2127
- `,mh=e=>{const t=Math.max(0,Date.now()-e),i=Math.floor(t/1e3),n=Math.floor(i/60),o=i%60;return`${String(n).padStart(2,"0")}:${String(o).padStart(2,"0")}`},gh=({icon:e,title:t,titleColor:i,titleSize:n=Qn.S,subTitle:o,subTitleColor:r,subTitleSize:a=Qn.XXXS,startedAt:s,withGradient:l,gradientColor:c,withSpinner:d,percentage:p,withVisual:u,visualIcon:h=gt})=>{const m=Lt(),[g,$]=wt(()=>s?mh(s):"");vt(()=>{if(!s)return;$(mh(s));const e=setInterval(()=>$(mh(s)),1e3);return()=>clearInterval(e)},[s]);const f=i||m.v2.colors.white[500],x=r||m.v2.colors.silver[200],b=c||m.v2.colors.black[500];return zt.jsxs(Xr,{$gap:16,$alignItems:"center",children:[!u&&d?"number"==typeof p?zt.jsx(ah,{percentage:p}):zt.jsx(ph,{scale:t||o?2:1}):null,u&&!d?zt.jsx(qu,{scale:1.7,icon:h}):null,(t||o||s||e)&&zt.jsxs(Xr,{$gap:8,$alignItems:"center",children:[zt.jsxs(Jr,{$gap:4,children:[e&&zt.jsx(e,{}),l?zt.jsx(hh,{align:"center",size:n,$titleColor:f,$gradientColor:b,children:t}):zt.jsx(to,{align:"center",size:n,color:f,children:t})]}),o?zt.jsx(to,{align:"center",size:a,color:x,children:o}):null,g?zt.jsx(to,{align:"center",size:a,color:f,children:g}):null]})]})},$h=Bt.aside`
2128
- display: flex;
2129
- flex-direction: column;
2130
- gap: 8px;
2131
- height: ${({$height:e})=>e};
2132
- width: fit-content;
2133
- padding: 16px 12px;
2134
- background-color: ${({theme:e})=>e.v2.colors.black[500]};
2135
- overflow-y: auto;
2136
- `,fh=({height:e,icons:t})=>zt.jsx($h,{$height:e,children:t.map(({id:e,selected:t,icon:i,onClick:n})=>zt.jsx(Cp,{label:"",leftIcon:i,iconSize:24,onClick:n,variant:t?wp.Primary:wp.Text},e))}),xh=Bt.div`
2137
- display: flex;
2138
- align-items: center;
2139
- gap: 10px;
2140
- ${({$fullWidth:e})=>e&&Rt`
2141
- width: calc(100% - 16px);
2142
- `}
2143
- padding: 4px 12px 4px 4px;
2144
- border-radius: 8px;
2145
- background-color: ${({theme:e,$status:t})=>Cn(e,t,[Ci.Info].includes(t)?"1000":"900")};
2146
- `,bh=Bt.div`
2147
- width: 32px;
2148
- height: 32px;
2149
- display: flex;
2150
- align-items: center;
2151
- justify-content: center;
2152
- border-radius: 6px;
2153
- background-color: ${({theme:e,$status:t})=>Cn(e,t,[Ci.Info].includes(t)?"900":"800")};
2154
- `,yh=Bt.div`
2155
- margin-left: auto;
2156
- margin-right: 8px;
2157
- cursor: pointer;
2158
- &:hover {
2159
- transform: scale(1.2);
2160
- }
2161
- `,wh=({status:e,message:t,action:i,fullWidth:n})=>{const o=Lt(),r=Sn(e,o),a=Cn(o,e,e===Ci.Default?"300":e===Ci.Info?"400":"500");return zt.jsxs(xh,{$status:e,$fullWidth:n,children:[zt.jsx("div",{children:zt.jsx(bh,{$status:e,children:zt.jsx(r,{size:24})})}),zt.jsx(to,{color:a,size:Qn.XXXS,weight:400,children:t}),i&&zt.jsx(yh,{onClick:i.onClick,children:zt.jsx(to,{color:a,size:Qn.XXS,weight:500,underline:!0,children:i.label})})]})};var vh;!function(e){e.S="small",e.L="large"}(vh||(vh={}));const kh=Bt.div`
2162
- width: fit-content;
2163
- display: flex;
2164
- align-items: center;
2165
- gap: 8px;
2166
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
2167
- `,Ch=Bt.div`
2168
- width: ${({$size:e})=>e===vh.S?"16px":"20px"};
2169
- height: ${({$size:e})=>e===vh.S?"16px":"20px"};
2170
- display: flex;
2171
- align-items: center;
2172
- justify-content: center;
2173
- border-radius: 100%;
2174
- border: 1px solid ${({$borderColor:e})=>e};
2175
- background-color: ${({$backgroundColor:e})=>e};
2176
- `,Eh=({label:e,value:t,onChange:i,disabled:n,size:o=vh.L})=>{const r=Lt(),[a,s]=wt(!1),l=t,c=o===vh.S?6:8,d=n?r.v2.colors.grey[400]:r.v2.colors.white[500],p=l?"transparent":n?r.v2.colors.grey[700]:a?r.v2.colors.silver[400]:r.v2.colors.silver[600],u=n?r.v2.colors.grey[600]:l?r.v2.colors.purple[500]:r.v2.colors.silver[900];return zt.jsxs(kh,{"data-id":"radio"+(e?`-${e}`:""),onClick:e=>{e.stopPropagation(),n||i(!t)},$disabled:n,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),children:[zt.jsx(Ch,{$size:o,$borderColor:p,$backgroundColor:u,children:t?zt.jsx($t,{size:c,fill:d}):null}),e&&zt.jsx(to,{size:o===vh.S?Qn.XXS:Qn.XS,children:e})]})},Sh=Bt.div`
2177
- display: flex;
2178
- flex-direction: ${({$flexDirection:e})=>e};
2179
- gap: ${({$gap:e})=>e}px;
2180
- `,Ah=({label:e,direction:t,disabled:i,size:n,options:o,values:r,setValues:a})=>zt.jsxs(Sh,{$flexDirection:t===hi.Horizontal?"row":"column",$gap:t===hi.Horizontal?16:8,children:[e&&zt.jsx(to,{children:e}),o.map(t=>zt.jsx(Eh,{...t,value:r[t.id],onChange:e=>{return i=t.id,n=e,void a(e=>{const t={...e};return Object.keys(t).forEach(e=>t[e]=!1),t[i]=n,t});var i,n},disabled:i,size:n},`${e}-radio-${t.id}`))]});var Dh;!function(e){e.Data="data",e.Pretty="pretty"}(Dh||(Dh={}));const Th=Bt.div`
2181
- height: ${({$maxHeight:e})=>e};
2182
- width: 100%;
2183
- overflow: auto;
2184
- `,zh=Bt.table`
2185
- width: 100%;
2186
-
2187
- ${({$variant:e})=>{switch(e){case Dh.Data:return Rt`
2188
- border-collapse: collapse;
2189
- `;case Dh.Pretty:return Rt`
2190
- border-collapse: separate;
2191
- border-spacing: 0 8px;
2192
- `;default:return""}}}
2193
- `,Fh=Bt.thead`
2194
- position: sticky;
2195
- top: 0;
2196
- z-index: 1;
2197
- `,Oh=Bt.th`
2198
- position: relative;
2199
- min-width: ${({$minWidth:e})=>e||"auto"};
2200
- padding: 18px 24px;
2201
- border: none;
2202
- border-radius: ${({$isFirst:e,$isLast:t})=>e?"4px 0 0 0":t?"0 4px 0 0":"0"};
2203
-
2204
- ${({$variant:e,$backgroundColor:t})=>{if(t)return Rt`
2205
- background-color: ${t};
2206
- `;switch(e){case Dh.Data:return Rt`
2207
- background-color: ${({theme:e})=>e.v2.colors.silver[750]};
2208
- `;case Dh.Pretty:return Rt`
2209
- background-color: transparent;
2210
- `;default:return""}}}
2211
- `,Ih=Bt.div`
2212
- position: absolute;
2213
- top: 50%;
2214
- right: 0;
2215
- transform: translateY(-50%);
2216
- width: 1px;
2217
- height: 18px;
2218
- background: ${({theme:e})=>e.v2.colors.silver[500]};
2219
- `,Nh=Bt.tbody``,_h=Bt.td`
2220
- position: relative;
2221
- padding: 18px 24px;
2222
- cursor: ${({$withClick:e})=>e?"pointer":"default"};
2223
-
2224
- ${({$variant:e,$selected:t,$hovered:i,$isLastRow:n,$isFirstCell:o,$isLastCell:r})=>{switch(e){case Dh.Data:return Rt`
2225
- border: ${({theme:e})=>n?"none":`1px solid ${e.v2.colors.silver[500]}`};
2226
- border-left: none;
2227
- border-right: none;
2228
- border-radius: ${n?o?"0 0 0 4px":r?"0 0 4px 0":"0":"0"};
2229
- background-color: ${({theme:e})=>t?e.v2.colors.blue[1e3]:i?e.v2.colors.silver[700]:e.v2.colors.silver[800]};
2230
- `;case Dh.Pretty:return Rt`
2231
- border: none;
2232
- border-radius: ${o?"12px 0 0 12px":r?"0 12px 12px 0":"0"};
2233
- background-color: ${({theme:e})=>t?e.v2.colors.blue[1e3]:i?e.v2.colors.silver[700]:e.v2.colors.silver[900]};
2234
- `;default:return""}}}
2235
- `,Bh=Bt.div`
2236
- width: 100%;
2237
- display: flex;
2238
- align-items: center;
2239
- justify-content: ${({$textAlign:e})=>"right"===e?"flex-end":"left"===e?"flex-start":"center"===e?"center":"unset"};
2240
- gap: 4px;
2241
- text-align: ${({$textAlign:e})=>e||"left"};
2242
- `,Rh=({variant:e,columns:t,rows:i,getRowActions:n,rowActionsPushRightPosition:o,withCheckboxes:r})=>{const[a,s]=wt(null);return zt.jsx(zt.Fragment,{children:i.map((l,c)=>{const{cells:d,onClick:p,isSelected:u=!1,onSelect:h,onDeselect:m,hideCheckbox:g}=l,$=a===c,f=n(l),x=(e,t)=>({$isLastRow:c===i.length-1,$isFirstCell:e,$isLastCell:t,$selected:u,$withClick:!!p,onClick:()=>p?.(),$hovered:!!p&&$,onMouseEnter:()=>s(c),onMouseLeave:()=>s(null)});return zt.jsxs("tr",{children:[r&&zt.jsx(_h,{$variant:e,...x(!0,!1),children:!g&&zt.jsx(Wp,{value:u,onChange:()=>u?m?.():h?.()})},"checkbox-column"),t.map(({key:i,textAlign:n},a)=>{const s=d.find(e=>e.key===i),l=0===a&&!r,p=a===t.length-1;return zt.jsxs(_h,{$variant:e,...x(l,p),children:[s?.component?zt.jsx(Jr,{$justifyContent:"right"===n?"flex-end":"flex-start",children:zt.jsx(s.component,{})}):zt.jsx(to,{size:Qn.XS,align:n,children:s?.rawValue||"-"}),f.length?zt.jsx(Du,{isOpen:$&&p,actions:f,positionRight:o}):null]},`row-${c}-cell-${a}`)})]},`row-${c}`)})})},Lh=({columnKey:e,sortDirection:t,sortByKey:i,onSort:n})=>{const o=Lt(),r=i===e?o.v2.colors.white[500]:o.v2.colors.grey[400],a=t===mi.Ascending?0:180;return zt.jsx(Tr,{icon:e=>zt.jsx(dt,{fill:r,rotate:a,...e}),onClick:()=>n(e)})},Mh=({columnKey:e,filters:t,onFilter:i,rowsUnfiltered:n})=>{const o=Lt(),r=t[e]?.length?o.v2.colors.white[500]:o.v2.colors.grey[400],a=yt(()=>Array.from(new Set(n.map(t=>t.cells.find(t=>t.key===e)?.rawValue?.toString()).filter(e=>!!e))).sort((e,t)=>e.localeCompare(t)).map(e=>({id:e,label:e,withCheckbox:!0})),[n,e]);return zt.jsx(Zp,{items:a,withMultiSelect:!0,selectedIds:t[e]?.map(e=>e.toString())??[],setSelectedIds:t=>i(e,t),defaultOpen:!1,iconButtonProps:{icon:e=>zt.jsx(ft,{fill:r,...e})}})},Ph=({variant:e,backgroundColor:t,columns:i,rowsUnfiltered:n,sortDirection:o,sortByKey:r,onSort:a,filters:s,onFilter:l,withCheckboxes:c,partiallySelected:d,allSelected:p,onSelectAll:u})=>zt.jsxs("tr",{children:[c&&zt.jsx(Oh,{$variant:e,$backgroundColor:t,$minWidth:24,$isFirst:!0,$isLast:!1,children:zt.jsx(Wp,{partiallyChecked:d&&!p,value:p||!1,onChange:u})},"checkbox-column"),i.map(({key:d,label:p,noSort:u,noFilter:h,minWidth:m,textAlign:g},$)=>{const f=0===$&&!c,x=$===i.length-1;return zt.jsxs(Oh,{$variant:e,$backgroundColor:t,$minWidth:m,$isFirst:f,$isLast:x,children:[zt.jsxs(Bh,{$textAlign:g,children:[zt.jsx(to,{size:Qn.XS,align:g,children:p}),!u&&zt.jsx(Lh,{columnKey:d,sortDirection:o,sortByKey:r,onSort:a}),!h&&zt.jsx(Mh,{columnKey:d,filters:s,onFilter:l,rowsUnfiltered:n})]}),!x&&e===Dh.Data&&zt.jsx(Ih,{})]},`column-${d}`)})]}),jh=({variant:e,maxHeight:t="unset",headerBackgroundColor:i,isLoading:n,columns:o,rows:r,getRowActions:a,rowActionsPushRightPosition:s,withCheckboxes:l})=>{const[c,d]=wt(mi.Ascending),[p,u]=wt(""),[h,m]=wt({}),g=Ct(e=>{u(e),d(e=>e===mi.Ascending?mi.Descending:mi.Ascending)},[]),$=Ct((e,t)=>{m(i=>({...i,[e]:t}))},[]),f=yt(()=>{const e=(e,t)=>{const i=e.cells.find(e=>e.key===t);return i&&(i.rawValue?.toString()||i.component?.({})?.props?.children?.toString())||""};return(p?[...r].sort((t,i)=>{const n=e(t,p),o=e(i,p);return(c===mi.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)))(n,o)}):r).filter(t=>{for(const[i,n]of Object.entries(h))if(n.length&&!n.includes(e(t,i)))return!1;return!0})},[r,p,c,h]),{partiallySelected:x,allSelected:b}=yt(()=>{const e=f.filter(e=>!e.hideCheckbox);return{partiallySelected:e.length>0&&e.some(e=>e.isSelected),allSelected:e.length>0&&e.every(e=>e.isSelected)}},[f]);return zt.jsxs(Th,{$maxHeight:t,children:[zt.jsxs(zh,{$variant:e,children:[zt.jsx(Fh,{children:zt.jsx(Ph,{variant:e,backgroundColor:i,columns:o,rowsUnfiltered:r,sortDirection:c,sortByKey:p,onSort:g,filters:h,onFilter:$,withCheckboxes:l,partiallySelected:x,allSelected:b,onSelectAll:e=>{e?f.forEach(e=>!e.hideCheckbox&&e.onSelect?.()):f.forEach(e=>!e.hideCheckbox&&e.onDeselect?.())}})}),zt.jsx(Nh,{children:zt.jsx(Rh,{variant:e,columns:o,rows:f,getRowActions:a||(()=>[]),rowActionsPushRightPosition:s,withCheckboxes:l})})]}),!f.length&&zt.jsx(Zr,{style:{marginTop:"0.5rem"},children:n?zt.jsx(cs,{scale:1.2}):zt.jsx(Zs,{})})]})},Uh=Bt.div`
2243
- display: flex;
2244
- align-items: center;
2245
- justify-content: center;
2246
- gap: 8px;
2247
- width: fit-content;
2248
- padding: 8px;
2249
- border-radius: 4px;
2250
- ${({$disabled:e,$withClick:t})=>e?Rt`
2251
- cursor: not-allowed;
2252
- background-color: ${({theme:e})=>e.v2.colors.grey[800]};
2253
- `:t?Rt`
2254
- cursor: pointer;
2255
- background-color: ${({theme:e})=>e.v2.colors.silver[300]};
2256
- &:hover {
2257
- background-color: ${({theme:e})=>e.v2.colors.silver[400]};
2258
- }
2259
- &:active {
2260
- background-color: ${({theme:e})=>e.v2.colors.silver[500]};
2261
- }
2262
- `:Rt`
2263
- background-color: ${({theme:e})=>e.v2.colors.silver[300]};
2264
- `}
2265
- `,Wh=({label:e,leftIcon:t,rightIcon:i,onClick:n,disabled:o})=>{const r=Lt(),a=o?r.v2.colors.grey[400]:r.v2.colors.white[500];return zt.jsxs(Uh,{$disabled:o,$withClick:!!n,onClick:()=>!o&&n?.(),children:[t&&zt.jsx(t,{fill:a,size:16}),zt.jsx(to,{color:a,size:Qn.XS,nowrap:!0,children:e}),i&&zt.jsx(i,{fill:a,size:16})]})};var Vh,Hh,qh;!function(e){e.Default="default",e.SuccessError="successError"}(Vh||(Vh={})),function(e){e.S="small",e.L="large"}(Hh||(Hh={})),function(e){e.Left="left",e.Right="right"}(qh||(qh={}));const Gh=Bt.div`
2266
- display: flex;
2267
- align-items: center;
2268
- gap: ${({$gap:e})=>e}px;
2269
- `,Kh=Bt.div`
2270
- position: relative;
2271
- display: flex;
2272
- align-items: center;
2273
- justify-content: space-between;
2274
-
2275
- width: ${({$size:e})=>2*e+2}px;
2276
- height: ${({$size:e})=>e}px;
2277
- padding: ${4}px;
2278
- border-radius: ${({$size:e})=>2*e}px;
2279
- background-color: ${({$disabled:e,$onBgColor:t,$offBgColor:i,$variant:n,$value:o,theme:r})=>{if(e)return r.v2.colors.grey[800];if(t&&o)return t;if(i&&!o)return i;switch(n){case Vh.SuccessError:return o?r.v2.colors.green[500]:r.v2.colors.red[500];case Vh.Default:default:return o?r.v2.colors.purple[500]:r.v2.colors.grey[400]}}};
2280
-
2281
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
2282
- `,Yh=Bt.div`
2283
- position: absolute;
2284
- top: 50%;
2285
- left: ${({$value:e,$size:t})=>e?`calc(100% - ${t}px - 4px)`:"4px"};
2286
- transform: translateY(-50%);
2287
- width: ${({$size:e})=>e}px;
2288
- height: ${({$size:e})=>e}px;
2289
- border-radius: 100%;
2290
- background-color: ${({$color:e})=>e};
2291
- 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)"};
2292
- `,Jh=({variant:e=Vh.Default,size:t=Hh.L,label:i,labelAlign:n=qh.Left,tooltip:o,value:r,onChange:a,disabled:s,withIcon:l,onIcon:c=Ge,offIcon:d=Ye,onBgColor:p,offBgColor:u})=>{const h=Lt(),m=s?h.v2.colors.grey[400]:h.v2.colors.white[500],g=t===Hh.S?10:16,$=t===Hh.S?Qn.XXXS:Qn.XS,f=t===Hh.S?8:12;return zt.jsxs(Gh,{$gap:f,children:[i&&n===qh.Left&&zt.jsx(to,{size:$,nowrap:!0,children:i}),zt.jsxs(Kh,{$onBgColor:p,$offBgColor:u,$variant:e,$size:g,$value:r,$disabled:s,onClick:e=>{e.stopPropagation(),s||a(!r)},children:[zt.jsx(Yh,{$color:m,$size:g,$value:r,$disabled:s}),l&&zt.jsxs(zt.Fragment,{children:[zt.jsx(c,{size:g,fill:m}),zt.jsx(d,{size:g,fill:m})]})]}),i&&n===qh.Right&&zt.jsx(to,{size:$,nowrap:!0,children:i}),o&&zt.jsx(ka,{text:o,withIcon:!0})]})},Xh=Bt.div`
2293
- display: flex;
2294
- flex-direction: ${({$direction:e})=>e===hi.Horizontal?"row":"column"};
2295
- gap: ${({$direction:e})=>e===hi.Horizontal?16:8}px;
2296
- `,Zh=({direction:e=hi.Vertical,title:t,size:i,disabled:n,options:o,values:r,setValues:a})=>{const s=i===Hh.S?Qn.XS:Qn.S;return zt.jsxs(Xh,{$direction:e,children:[t&&zt.jsx(to,{size:s,children:t}),o.map(e=>zt.jsx(Jh,{...e,labelAlign:qh.Right,value:r[e.id],onChange:t=>{return i=e.id,n=t,void a(e=>{const t={...e};return i?t[i]=n:o.forEach(e=>t[e.id]=n),t});var i,n},disabled:n,size:i},`${t}-toggle-${e.id}`))]})};export{ml as $,Qp as A,no as B,Wp as C,Yi as D,yi as E,Xr as F,Dh as G,Vu as H,ih as I,En as J,Op as K,gh as L,Tr as M,Zs as N,Ai as O,rr as P,gu as Q,tu as R,Ci as S,to as T,Mo as U,Bp as V,eu as W,su as X,eh as Y,du as Z,ji as _,Jr as a,na as a$,Yr as a0,Zu as a1,Nu as a2,zr as a3,_n as a4,er as a5,Zp as a6,Gp as a7,Zi as a8,ac as a9,Va as aA,vr as aB,hn as aC,Uo as aD,xs as aE,xc as aF,an as aG,bi as aH,nr as aI,ha as aJ,ta as aK,_a as aL,Xi as aM,So as aN,ga as aO,zd as aP,sn as aQ,vs as aR,Si as aS,jn as aT,Sn as aU,ir as aV,ii as aW,Os as aX,mn as aY,Rs as aZ,ia as a_,ai as aa,li as ab,si as ac,xl as ad,Ga as ae,uo as af,El as ag,ki as ah,In as ai,md as aj,fp as ak,wd as al,dd as am,vi as an,Vd as ao,Do as ap,Pd as aq,Sc as ar,Ad as as,mp as at,lo as au,Qo as av,Rr as aw,Qi as ax,Gc as ay,Cc as az,Qn as b,Br as b$,id as b0,un as b1,oa as b2,rc as b3,yp as b4,gr as b5,Yn as b6,br as b7,cr as b8,Ws as b9,ur as bA,Sa as bB,ps as bC,ks as bD,As as bE,wi as bF,Un as bG,ei as bH,zn as bI,Hi as bJ,Ir as bK,Fn as bL,Xt as bM,Wo as bN,sp as bO,pc as bP,xn as bQ,Li as bR,qi as bS,Mi as bT,Gi as bU,Ri as bV,Pi as bW,Bi as bX,dp as bY,cn as bZ,or as b_,Wn as ba,nn as bb,Nd as bc,$n as bd,pn as be,dn as bf,_i as bg,Qd as bh,Sr as bi,en as bj,oi as bk,Ki as bl,ni as bm,Cr as bn,Mr as bo,ya as bp,Qr as bq,Gd as br,Lr as bs,Pn as bt,zl as bu,qo as bv,Ho as bw,Ji as bx,Pr as by,Fr as bz,ka as c,Vn as c$,Vo as c0,gi as c1,_o as c2,Tn as c3,Er as c4,Ti as c5,dl as c6,Cd as c7,Ss as c8,rd as c9,zi as cA,fi as cB,Ei as cC,ui as cD,hi as cE,di as cF,Ni as cG,$i as cH,Vi as cI,Wi as cJ,Ui as cK,Di as cL,mi as cM,ci as cN,Zt as cO,tn as cP,gn as cQ,fn as cR,bn as cS,yn as cT,wn as cU,kn as cV,Cn as cW,Dn as cX,Nn as cY,Rn as cZ,Mn as c_,An as ca,On as cb,Es as cc,Ys as cd,Xs as ce,Du as cf,Bn as cg,Hn as ch,Ur as ci,Ii as cj,xi as ck,ql as cl,qr as cm,_s as cn,ln as co,Ar as cp,Ul as cq,Jo as cr,on as cs,Ja as ct,vn as cu,Ts as cv,ri as cw,Fi as cx,pi as cy,Oi as cz,Jh as d,qn as d0,Gn as d1,Kn as d2,Jn as d3,Xn as d4,Go as d5,Ko as d6,Yo as d7,jo as d8,hr as d9,Dp as dA,Tp as dB,Hp as dC,Pp as dD,Su as dE,Lu as dF,fh as dG,Eh as dH,Ah as dI,vh as dJ,iu as dK,Ip as dL,Wh as dM,qh as dN,Zh as dO,Vh as dP,Uu as dQ,Po as da,To as db,No as dc,kr as dd,Nr as de,ul as df,al as dg,el as dh,ns as di,kc as dj,Wc as dk,Rc as dl,Yc as dm,ed as dn,zs as dp,ea as dq,zc as dr,Wa as ds,ro as dt,ao as du,so as dv,Ku as dw,Gu as dx,qu as dy,Xu as dz,Hh as e,Zn as f,lr as g,ti as h,ku as i,Zr as j,Mp as k,wh as l,Cp as m,wp as n,Wu as o,hl as p,yr as q,cs as r,Gr as s,rn as t,Zo as u,vp as v,qp as w,Kr as x,ou as y,jh as z};