@odigos/ui-kit 0.0.236 → 0.0.238

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 (152) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/lib/chunks/index-CCaTS6aq.js +145 -0
  3. package/lib/chunks/{index-CmhFl_vY.js → index-ChkHWnzu.js} +4 -4
  4. package/lib/chunks/{index-zIhroDGj.js → index-D6SlbWIi.js} +1 -1
  5. package/lib/chunks/ui-components-rpRyPe3l.js +2235 -0
  6. package/lib/components/data-card/data-card-fields/index.d.ts +0 -1
  7. package/lib/components/index.d.ts +0 -20
  8. package/lib/components/v2.js +1 -1
  9. package/lib/components.js +1 -1
  10. package/lib/constants/sampling/index.d.ts +5 -6
  11. package/lib/constants.js +1 -1
  12. package/lib/containers/_v2/overview/search/builder.d.ts +1 -1
  13. package/lib/containers/_v2/sampling-rules/converters.d.ts +2 -0
  14. package/lib/containers/index.d.ts +0 -32
  15. package/lib/containers/v2.js +96 -96
  16. package/lib/containers.js +19 -556
  17. package/lib/contexts.js +1 -1
  18. package/lib/functions/decimals-only/index.d.ts +1 -0
  19. package/lib/functions/index.d.ts +1 -0
  20. package/lib/functions.js +1 -1
  21. package/lib/hooks/useActionFormData.d.ts +1 -1
  22. package/lib/hooks.js +1 -1
  23. package/lib/snippets/_v2/sampling-rule-form-sections/percentage.d.ts +1 -1
  24. package/lib/snippets/_v2/sampling-rule-form-sections/preset-with-custom-input.d.ts +5 -2
  25. package/lib/snippets/index.d.ts +0 -2
  26. package/lib/snippets/v2.js +1 -1
  27. package/lib/snippets.js +1 -1
  28. package/lib/store.js +1 -1
  29. package/lib/theme.js +1 -1
  30. package/lib/types/common/index.d.ts +2 -1
  31. package/lib/types.js +1 -1
  32. package/lib/visuals.js +1 -1
  33. package/package.json +1 -1
  34. package/lib/chunks/index-Cm0_bD--.js +0 -145
  35. package/lib/chunks/ui-components-DHsbbgZi.js +0 -2708
  36. package/lib/components/auto-complete-input/index.d.ts +0 -22
  37. package/lib/components/data-finger/index.d.ts +0 -12
  38. package/lib/components/docs-button/index.d.ts +0 -8
  39. package/lib/components/header/index.d.ts +0 -8
  40. package/lib/components/icon-title-badge/index.d.ts +0 -11
  41. package/lib/components/icons-nav/index.d.ts +0 -17
  42. package/lib/components/input-list/index.d.ts +0 -13
  43. package/lib/components/input-table/index.d.ts +0 -13
  44. package/lib/components/input-table/map-columns-to-fields/index.d.ts +0 -15
  45. package/lib/components/input-table/types.d.ts +0 -15
  46. package/lib/components/interactive-table/index.d.ts +0 -27
  47. package/lib/components/interactive-table/table-row.d.ts +0 -13
  48. package/lib/components/key-value-input-list/index.d.ts +0 -20
  49. package/lib/components/monitors-checkboxes/index.d.ts +0 -13
  50. package/lib/components/navigation-buttons/index.d.ts +0 -16
  51. package/lib/components/section-title/index.d.ts +0 -12
  52. package/lib/components/segment/index.d.ts +0 -17
  53. package/lib/components/selection-button/index.d.ts +0 -17
  54. package/lib/components/stepper/index.d.ts +0 -11
  55. package/lib/components/tag/index.d.ts +0 -9
  56. package/lib/components/textarea/index.d.ts +0 -8
  57. package/lib/components/toggle/index.d.ts +0 -12
  58. package/lib/components/trace-loader/index.d.ts +0 -6
  59. package/lib/containers/action-drawer/build-card.d.ts +0 -3
  60. package/lib/containers/action-drawer/index.d.ts +0 -8
  61. package/lib/containers/action-form/custom-fields/add-cluster-info.d.ts +0 -5
  62. package/lib/containers/action-form/custom-fields/delete-attributes.d.ts +0 -5
  63. package/lib/containers/action-form/custom-fields/error-sampler.d.ts +0 -5
  64. package/lib/containers/action-form/custom-fields/index.d.ts +0 -7
  65. package/lib/containers/action-form/custom-fields/k8s-attributes.d.ts +0 -5
  66. package/lib/containers/action-form/custom-fields/latency-sampler.d.ts +0 -5
  67. package/lib/containers/action-form/custom-fields/pii-masking.d.ts +0 -5
  68. package/lib/containers/action-form/custom-fields/probabilistic-sampler.d.ts +0 -5
  69. package/lib/containers/action-form/custom-fields/rename-attributes.d.ts +0 -5
  70. package/lib/containers/action-form/custom-fields/service-name-sampler.d.ts +0 -5
  71. package/lib/containers/action-form/custom-fields/span-attribute-sampler.d.ts +0 -5
  72. package/lib/containers/action-form/custom-fields/url-templatization.d.ts +0 -5
  73. package/lib/containers/action-form/index.d.ts +0 -11
  74. package/lib/containers/action-modal/index.d.ts +0 -7
  75. package/lib/containers/action-table/build-spec-cell.d.ts +0 -3
  76. package/lib/containers/action-table/index.d.ts +0 -7
  77. package/lib/containers/await-pipeline/index.d.ts +0 -4
  78. package/lib/containers/data-flow/column/add.d.ts +0 -8
  79. package/lib/containers/data-flow/column/base.d.ts +0 -21
  80. package/lib/containers/data-flow/column/frame.d.ts +0 -10
  81. package/lib/containers/data-flow/column/head.d.ts +0 -15
  82. package/lib/containers/data-flow/column/index.d.ts +0 -13
  83. package/lib/containers/data-flow/column/namespace-divider.d.ts +0 -7
  84. package/lib/containers/data-flow/column/source-visual-state.d.ts +0 -9
  85. package/lib/containers/data-flow/index.d.ts +0 -12
  86. package/lib/containers/data-flow-actions-menu/add-entity/index.d.ts +0 -4
  87. package/lib/containers/data-flow-actions-menu/data-stream-select/index.d.ts +0 -9
  88. package/lib/containers/data-flow-actions-menu/filters/index.d.ts +0 -4
  89. package/lib/containers/data-flow-actions-menu/index.d.ts +0 -9
  90. package/lib/containers/data-flow-actions-menu/search/index.d.ts +0 -6
  91. package/lib/containers/data-flow-actions-menu/search/search-results/builder.d.ts +0 -25
  92. package/lib/containers/data-flow-actions-menu/search/search-results/index.d.ts +0 -6
  93. package/lib/containers/data-flow-actions-menu/styled.d.ts +0 -10
  94. package/lib/containers/data-stream-drawer/index.d.ts +0 -10
  95. package/lib/containers/data-stream-form/index.d.ts +0 -11
  96. package/lib/containers/data-stream-modal/index.d.ts +0 -7
  97. package/lib/containers/data-stream-selection-form/index.d.ts +0 -13
  98. package/lib/containers/destination-drawer/build-card.d.ts +0 -3
  99. package/lib/containers/destination-drawer/index.d.ts +0 -10
  100. package/lib/containers/destination-form/dynamic-fields/index.d.ts +0 -10
  101. package/lib/containers/destination-form/index.d.ts +0 -15
  102. package/lib/containers/destination-form/test-connection/index.d.ts +0 -12
  103. package/lib/containers/destination-modal/choose-destination/destinations-list/index.d.ts +0 -10
  104. package/lib/containers/destination-modal/choose-destination/index.d.ts +0 -11
  105. package/lib/containers/destination-modal/index.d.ts +0 -13
  106. package/lib/containers/destination-selection-form/destination-list/index.d.ts +0 -8
  107. package/lib/containers/destination-selection-form/index.d.ts +0 -12
  108. package/lib/containers/destination-table/index.d.ts +0 -9
  109. package/lib/containers/dropdowns/condition-dropdown/index.d.ts +0 -15
  110. package/lib/containers/dropdowns/error-dropdown/index.d.ts +0 -16
  111. package/lib/containers/dropdowns/index.d.ts +0 -7
  112. package/lib/containers/dropdowns/kind-dropdown/index.d.ts +0 -15
  113. package/lib/containers/dropdowns/language-dropdown/index.d.ts +0 -15
  114. package/lib/containers/dropdowns/monitor-dropdown/index.d.ts +0 -13
  115. package/lib/containers/dropdowns/namespace-dropdown/index.d.ts +0 -15
  116. package/lib/containers/dropdowns/pods-agent-injection-status-dropdown/index.d.ts +0 -16
  117. package/lib/containers/instrumentation-rule-drawer/build-card.d.ts +0 -3
  118. package/lib/containers/instrumentation-rule-drawer/index.d.ts +0 -8
  119. package/lib/containers/instrumentation-rule-form/custom-fields/code-attributes.d.ts +0 -5
  120. package/lib/containers/instrumentation-rule-form/custom-fields/custom-instrumentation.d.ts +0 -5
  121. package/lib/containers/instrumentation-rule-form/custom-fields/headers-collection.d.ts +0 -5
  122. package/lib/containers/instrumentation-rule-form/custom-fields/index.d.ts +0 -7
  123. package/lib/containers/instrumentation-rule-form/custom-fields/payload-collection.d.ts +0 -5
  124. package/lib/containers/instrumentation-rule-form/index.d.ts +0 -11
  125. package/lib/containers/instrumentation-rule-modal/index.d.ts +0 -7
  126. package/lib/containers/instrumentation-rule-table/build-spec-cell.d.ts +0 -3
  127. package/lib/containers/instrumentation-rule-table/index.d.ts +0 -7
  128. package/lib/containers/multi-source-control/index.d.ts +0 -10
  129. package/lib/containers/setup-summary/index.d.ts +0 -10
  130. package/lib/containers/side-nav/index.d.ts +0 -16
  131. package/lib/containers/slack-invite/index.d.ts +0 -4
  132. package/lib/containers/source-modal/index.d.ts +0 -8
  133. package/lib/containers/source-selection-form/index.d.ts +0 -16
  134. package/lib/containers/source-selection-form/source-list/index.d.ts +0 -8
  135. package/lib/containers/source-table/index.d.ts +0 -9
  136. package/lib/containers/system-overview/describe/index.d.ts +0 -11
  137. package/lib/containers/system-overview/index.d.ts +0 -7
  138. package/lib/containers/system-overview/tokens/expires-at.d.ts +0 -6
  139. package/lib/containers/system-overview/tokens/index.d.ts +0 -8
  140. package/lib/containers/system-overview/tokens/token-actions.d.ts +0 -7
  141. package/lib/containers/table-cell-conditions/index.d.ts +0 -8
  142. package/lib/containers/toggle-dark-mode/index.d.ts +0 -2
  143. package/lib/containers/trace-view/build-spans.d.ts +0 -2
  144. package/lib/containers/trace-view/index.d.ts +0 -9
  145. package/lib/containers/trace-view/span/index.d.ts +0 -38
  146. package/lib/containers/trace-view/span-drawer/build-details-card.d.ts +0 -3
  147. package/lib/containers/trace-view/span-drawer/build-logs-card.d.ts +0 -3
  148. package/lib/containers/trace-view/span-drawer/build-process-card.d.ts +0 -3
  149. package/lib/containers/trace-view/span-drawer/build-tags-card.d.ts +0 -3
  150. package/lib/containers/trace-view/span-drawer/index.d.ts +0 -9
  151. package/lib/snippets/edit-button/index.d.ts +0 -7
  152. package/lib/snippets/note-back-to-summary/index.d.ts +0 -6
@@ -0,0 +1,2235 @@
1
+ import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import r,{css as o,useTheme as i,keyframes as a,ThemeProvider as s}from"styled-components";import{SamplerIcon as l,PiiMaskingIcon as c,ActionIcon as d,RenameAttributeIcon as u,DeleteAttributeIcon as p,AddClusterInfoIcon as h,K8sLogo as m,ImageErrorIcon as g,KafkaLogo as f,RedisLogo as y,PostgresLogo as b,NginxLogo as v,MysqlLogo as x,ElixirLogo as $,SwiftLogo as w,RustLogo as S,RubyLogo as C,PhpLogo as E,CPlusPlusLogo as k,CSharpLogo as A,DotnetLogo as D,PythonLogo as T,NodejsLogo as I,GoLogo as N,JavaLogo as R,PyroscopeLogo as O,AwsXrayLogo as P,VictoriaMetricsLogo as F,UptraceLogo as _,TraceloopLogo as L,TingyunLogo as M,TempoLogo as z,TelemetryHubLogo as B,SumoLogicLogo as U,SplunkLogo as j,SignozLogo as W,SeqLogo as H,AwsS3Logo as X,QuickwitLogo as G,GigapipeLogo as K,QrynLogo as V,PrometheusLogo as J,OpenTelemetryLogo as q,OracleLogo as Y,OpsVerseLogo as Q,OpenObserveLogo as Z,OneUptimeLogo as ee,OdigosLogo as te,ObserveLogo as ne,NewRelicLogo as re,MiddlewareLogo as oe,LumigoLogo as ie,LokiLogo as ae,LogzioLogo as se,LightstepLogo as le,Last9Logo as ce,KloudmateLogo as de,JaegerLogo as ue,InstanaLogo as pe,HyperDxLogo as he,HoneycombLogo as me,GroundcoverLogo as ge,GreptimeLogo as fe,GrafanaLogo as ye,GoogleCloudPlatformLogo as be,ElasticSearchLogo as ve,ElasticApmLogo as xe,DynatraceLogo as $e,DatadogLogo as we,Dash0Logo as Se,CoralogixLogo as Ce,AwsCloudwatchLogo as Ee,ClickhouseLogo as ke,ChronosphereLogo as Ae,ChecklyLogo as De,CauselyLogo as Te,BonreeLogo as Ie,BetterStackLogo as Ne,AzureMonitorLogo as Re,AzureBlobLogo as Oe,AxiomLogo as Pe,AppDynamicsLogo as Fe,AlibabaCloudLogo as _e,AlaudaLogo as Le,SamplingIcon as Me,InstrumentationRuleIcon as ze,DestinationIcon as Be,SourceIcon as Ue,NamespacesIcon as je,PayloadCollectionIcon as We,HeadersCollectionIcon as He,CustomInstrumentationIcon as Xe,CodeAttributesIcon as Ge,TracesIcon as Ke,MetricsIcon as Ve,LogsIcon as Je,VmLogo as qe,DotsHorizontalIcon as Ye,QuestionCircleIcon as Qe,XSquareIcon as Ze,VSquareIcon as et,ExclamationTriangleIcon as tt,ExclamationCircleIcon as nt,ISquareIcon as rt,AwsLogo as ot,AwsSecretsManagerLogo as it,AwsStepFunctionsLogo as at,AwsEventBridgeLogo as st,AwsBedrockLogo as lt,AwsApiGatewayLogo as ct,AwsEc2Logo as dt,AwsKinesisLogo as ut,AwsLambdaLogo as pt,AwsSnsLogo as ht,AwsSqsLogo as mt,AwsDynamoDbLogo as gt,AwsStsLogo as ft,VIcon as yt,CopyIcon as bt,XIcon as vt,MinusIcon as xt,ListIcon as $t,CodeIcon as wt,ExtendArrowIcon as St,PlusIcon as Ct,NoDataIcon as Et,RefreshIcon as kt,EyeClosedIcon as At,EyeOpenIcon as Dt,SearchIcon as Tt,TrashIcon as It,EditIcon as Nt,EditedIcon as Rt,ChevronUpIcon as Ot,ChevronDownIcon as Pt,ArrowIcon as Ft,DotsVerticalIcon as _t,DotIcon as Lt,FilterIcon as Mt}from"../icons.js";import{create as zt}from"zustand";import{forwardRef as Bt,Fragment as Ut,useState as jt,useEffect as Wt,useRef as Ht,useMemo as Xt,useCallback as Gt,useContext as Kt,createContext as Vt,memo as Jt,useLayoutEffect as qt,createElement as Yt}from"react";import Qt from"javascript-time-ago";import{p as Zt,c as en,s as tn,l as nn}from"./vendor-C150cdxb.js";import{Handle as rn,Position as on,ReactFlowProvider as an,ReactFlow as sn,Controls as ln,ControlButton as cn,useReactFlow as dn}from"@xyflow/react";import un,{createPortal as pn}from"react-dom";import{Highlight as hn,themes as mn}from"prism-react-renderer";import{ErrorBoundary as gn}from"react-error-boundary";import{VList as fn}from"virtua";const yn=e=>e.charAt(0).toUpperCase()+e.slice(1),bn=e=>{const t=e=>e.filter(e=>"object"==typeof e&&null!==e?""!==e.key&&""!==e.value:""!==e),n=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>""!==e&&""!==t).map(([e,r])=>Array.isArray(r)?[e,t(r)]:"object"==typeof r&&null!==r?[e,n(r)]:[e,r]));return Object.entries(e).reduce((e,[r,o])=>{try{const i=JSON.parse(o);Array.isArray(i)?e[r]=JSON.stringify(t(i)):e[r]="object"==typeof i&&null!==i?JSON.stringify(n(i)):o}catch(i){"object"==typeof o&&null!==o?Array.isArray(o)?e[r]=JSON.stringify(t(o)):e[r]=JSON.stringify(n(o)):e[r]=o}return e},{})};var vn;!function(e){e.SIGNALS="SIGNALS"}(vn||(vn={}));const xn=(e,t,n)=>{if(!e||!e.length)return!0;if(1===e.length)return"true"==e[0];const[r,o,i]=e;if(r===vn.SIGNALS)switch(o){case"INCLUDES":return t?.includes(i);case"EXCLUDES":return!t?.includes(i);default:return!0}const a=n.find(e=>e.name===r||e.key===r);if(!a)return!1;const s=null==a.value?"":String(a.value);switch(o){case"===":case"==":return s===i;case"!==":case"!=":return s!==i;case">":return Number(s)>Number(i);case"<":return Number(s)<Number(i);case">=":return Number(s)>=Number(i);case"<=":return Number(s)<=Number(i);default:return!0}},$n=e=>JSON.parse(JSON.stringify(e)),wn=(e,t)=>t.split(".").reduce((e,t)=>e?.[t],e),Sn=(e,t,n)=>{const r=t.split(".");let o=e;for(let e=0;e<r.length-1;e++)r[e]in o&&"object"==typeof o[r[e]]||(o[r[e]]={}),o=o[r[e]];o[r[r.length-1]]=n},Cn=(e,t)=>{let n=[...e];return t.monitors?.length&&(n=n.filter(e=>!!t.monitors?.find(t=>e.signals?.find(e=>e.toLowerCase()===t.id)))),n},En=(e,t)=>{let n=[...e];return t.monitors?.length&&(n=n.filter(e=>!!t.monitors?.find(t=>e.exportedSignals[t.id]))),n},kn=(e,t)=>t?e.filter(e=>e.dataStreamNames.includes(t)||!e.dataStreamNames.length):[];var An,Dn,Tn,In,Nn,Rn,On,Pn,Fn,_n,Ln,Mn,zn,Bn,Un,jn,Wn,Hn,Xn,Gn,Kn,Vn,Jn,qn,Yn,Qn,Zn,er,tr,nr,rr,or,ir,ar,sr,lr,cr,dr,ur,pr,hr,mr;!function(e){e.Attributes="attributes",e.Samplers="samplers"}(An||(An={})),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",e.URLTemplatization="URLTemplatization"}(Dn||(Dn={})),function(e){e.CollectContainerAttributes="collectContainerAttributes",e.CollectReplicaSetAttributes="collectReplicaSetAttributes",e.CollectWorkloadId="collectWorkloadId",e.CollectClusterId="collectClusterId",e.LabelsAttributes="labelsAttributes",e.AnnotationsAttributes="annotationsAttributes",e.ClusterAttributes="clusterAttributes",e.OverwriteExistingValues="overwriteExistingValues",e.AttributeNamesToDelete="attributeNamesToDelete",e.Renames="renames",e.PiiCategories="piiCategories",e.FallbackSamplingRatio="fallbackSamplingRatio",e.SamplingPercentage="samplingPercentage",e.EndpointsFilters="endpointsFilters",e.ServicesNameFilters="servicesNameFilters",e.AttributeFilters="attributeFilters",e.UrlTemplatizationRulesGroups="urlTemplatizationRulesGroups"}(Tn||(Tn={})),function(e){e.Pod="pod",e.Namespace="namespace",e.Node="node"}(In||(In={})),function(e){e.EXISTS="exists",e.EQUALS="equals",e.NOT_EQUALS="not_equals",e.CONTAINS="contains",e.NOT_CONTAINS="not_contains",e.REGEX="regex"}(Nn||(Nn={})),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"}(Rn||(Rn={})),function(e){e.EXISTS="exists",e.EQUALS="equals"}(On||(On={})),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"}(Pn||(Pn={})),function(e){e.Horizontal="horizontal",e.Vertical="vertical"}(Fn||(Fn={})),function(e){e.Ascending="ascending",e.Descending="descending"}(_n||(_n={})),function(e){e.Community="community",e.Onprem="onprem"}(Ln||(Ln={})),function(e){e.K8s="k8s",e.Vm="vm"}(Mn||(Mn={})),function(e){e.Cli="odigos-cli",e.Helm="helm",e.Operator="odigos-operator"}(zn||(zn={})),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"}(Bn||(Bn={})),function(e){e.Create="Create",e.Read="Read",e.Update="Update",e.Delete="Delete"}(Un||(Un={})),function(e){e.Namespace="Namespace",e.Source="Source",e.Destination="Destination",e.Action="Action",e.InstrumentationRule="InstrumentationRule",e.SamplingRule="SamplingRule"}(jn||(jn={})),function(e){e.DataStream="DataStream"}(Wn||(Wn={})),function(e){e.Input="input",e.MultiInput="multiInput",e.MultiTabledInput="multiTabledInput",e.KeyValuePair="keyValuePairs",e.TextArea="textarea",e.Dropdown="dropdown",e.Checkbox="checkbox",e.Toggle="toggle",e.Time="time"}(Hn||(Hn={})),function(e){e.Text="text",e.Password="password",e.Number="number",e.Decimal="decimal"}(Xn||(Xn={})),function(e){e.Warning="warning",e.Error="error",e.Success="success",e.Info="info",e.Default="default"}(Gn||(Gn={})),function(e){e.INSTRUMENTED="Instrumented",e.INSTRUMENTING="Instrumenting",e.UNINSTRUMENTED="Uninstrumented",e.NOT_INSTRUMENTED="Not Instrumented"}(Kn||(Kn={})),function(e){e.Loading="loading",e.Disabled="disabled"}(Vn||(Vn={})),function(e){e.Disabled="disabled",e.Unknown="unknown"}(Jn||(Jn={})),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"}(qn||(qn={})),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"}(Yn||(Yn={})),function(e){e.Labeled="labeled"}(Qn||(Qn={})),function(e){e.AddRule="addRule",e.AddSource="addSource",e.AddAction="addAction",e.AddDestination="addDestination"}(Zn||(Zn={})),function(e){e.Alauda="alauda",e.AlibabaCloud="alibabacloud",e.AppDynamics="appdynamics",e.Axiom="axiom",e.AzureBlob="azureblob",e.AzureMonitor="azuremonitor",e.BetterStack="betterstack",e.Bonree="bonree",e.Causely="causely",e.Checkly="checkly",e.Chronosphere="chronosphere",e.ClickHouse="clickhouse",e.CloudWatch="cloudwatch",e.Coralogix="coralogix",e.Dash0="dash0",e.Datadog="datadog",e.Dynamic="dynamic",e.Dynatrace="dynatrace",e.ElasticApm="elasticapm",e.ElasticSearch="elasticsearch",e.GoogleCloud="googlecloud",e.GoogleCloudOTLP="googlecloudotlp",e.GrafanaCloudLoki="grafanacloudloki",e.GrafanaCloudPrometheus="grafanacloudprometheus",e.GrafanaCloudTempo="grafanacloudtempo",e.Greptime="greptime",e.Groundcover="groundcover",e.Honeycomb="honeycomb",e.HyperDX="hyperdx",e.Instana="instana",e.Jaeger="jaeger",e.Kafka="kafka",e.Kloudmate="kloudmate",e.Last9="last9",e.Lightstep="lightstep",e.LogzIo="logzio",e.Loki="loki",e.Lumigo="lumigo",e.Middleware="middleware",e.NewRelic="newrelic",e.Observe="observe",e.Odigos="odigos",e.OneUptime="oneuptime",e.OpenObserve="openobserve",e.Opsverse="opsverse",e.Oracle="oracle",e.OTLP="otlp",e.OTLPHttp="otlphttp",e.Prometheus="prometheus",e.Qryn="qryn",e.QrynOss="qryn-oss",e.Quickwit="quickwit",e.S3="s3",e.Seq="seq",e.Signalfx="signalfx",e.Signoz="signoz",e.Splunk="splunk",e.SplunkSapm="splunksapm",e.SplunkOtlp="splunkotlp",e.SumoLogic="sumologic",e.TelemetryHub="telemetryhub",e.Tempo="tempo",e.Tingyun="tingyun",e.Traceloop="traceloop",e.Uptrace="uptrace",e.VictoriaMetrics="victoriametrics",e.VictoriaMetricsCloud="victoriametricscloud",e.XRay="xray",e.Pyroscope="pyroscope"}(er||(er={})),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"}(tr||(tr={})),function(e){e.GolangCommunity="golang-community",e.NodejsCommunity="nodejs-community",e.PythonCommunity="python-community",e.JavaCommunity="java-community",e.DotNetCommunity="dotnet-community",e.RubyCommunity="ruby-community",e.PhpCommunity="php-community",e.GolangEnterprise="golang-enterprise",e.NodejsEnterprise="nodejs-enterprise",e.PythonEnterprise="python-enterprise",e.JavaEnterprise="java-enterprise",e.JavaEbpfInstrumentations="java-ebpf-instrumentations",e.OpentelemetryEbpfInstrumentation="opentelemetry-ebpf-instrumentation",e.DotNetLegacy="dotnet-legacy",e.DotNetEnterprise="dotnet-enterprise",e.RubyEnterprise="ruby-enterprise",e.CPlusPlusEnterprise="cplusplus-enterprise",e.MySqlEnterprise="mysql-enterprise"}(nr||(nr={})),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"}(rr||(rr={})),function(e){e.CodeAttributes="CodeAttributes",e.HeadersCollection="HeadersCollection",e.PayloadCollection="PayloadCollection",e.CustomInstrumentation="CustomInstrumentation",e.UnknownType="UnknownType"}(or||(or={})),function(e){e.Column="column",e.FilePath="filePath",e.Function="function",e.LineNumber="lineNumber",e.Namespace="namespace",e.StackTrace="stacktrace"}(ir||(ir={})),function(e){e.HeaderKeys="headerKeys"}(ar||(ar={})),function(e){e.Java="java",e.Golang="golang"}(sr||(sr={}));class gr{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 fr{packageName;functionName;receiverName;receiverMethodName;constructor(e,t,n,r){this.packageName=e,this.functionName=t||"",this.receiverName=n||"",this.receiverMethodName=r||""}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"}(lr||(lr={})),function(e){e.Healthy="Healthy",e.Updating="Updating",e.Degraded="Degraded",e.Failed="Failed",e.Down="Down",e.Unknown="Unknown"}(cr||(cr={})),function(e){e.Pending="Pending",e.Running="Running",e.Succeeded="Succeeded",e.Failed="Failed",e.Unknown="Unknown"}(dr||(dr={})),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"}(ur||(ur={})),function(e){e.Running="Running",e.Waiting="Waiting",e.Terminated="Terminated"}(pr||(pr={})),function(e){e.Logs="LOGS",e.Metrics="METRICS",e.Traces="TRACES",e.Profiles="PROFILES"}(hr||(hr={})),function(e){e.Logs="logs",e.Metrics="metrics",e.Traces="traces",e.Profiles="profiles"}(mr||(mr={}));const yr={[hr.Logs]:mr.Logs,[hr.Metrics]:mr.Metrics,[hr.Traces]:mr.Traces,[hr.Profiles]:mr.Profiles},br={[mr.Logs]:hr.Logs,[mr.Metrics]:hr.Metrics,[mr.Traces]:hr.Traces,[mr.Profiles]:hr.Profiles},vr=(e,t)=>{let n=e;if(t.namespaces?.length){const e=new Set(t.namespaces.map(({id:e})=>e));n=n.filter(({namespace:t})=>e.has(t))}if(t.kinds?.length){const e=new Set(t.kinds.map(({id:e})=>e));n=n.filter(({kind:t})=>e.has(t))}if(t.languages?.length){const e=new Set(t.languages.map(({id:e})=>e));n=n.filter(({detectedLanguages:t,containers:n})=>t?.some(t=>e.has(t))||n?.some(t=>{const n=t.overrides?.runtimeInfo?.language??t.runtimeInfo?.language;return!!n&&e.has(n)}))}if(t.conditions?.length){const e=new Set(t.conditions.map(({id:e})=>e));n=n.filter(({conditions:t})=>t?.some(({type:t,reason:n})=>e.has(`${t}#${n}`)))}if(t.podsAgentInjectionStatus?.length){const e=new Set(t.podsAgentInjectionStatus.map(({id:e})=>e));n=n.filter(({podsAgentInjectionStatus:t})=>e.has(t?.reasonEnum)||e.has(t?.message))}if(t.onlyErrors&&(n=n.filter(e=>e.conditions?.some(e=>e.status===Gn.Error))),t.errors?.length){const e=new Set(t.errors.map(({id:e})=>e));n=n.filter(t=>t.conditions?.some(t=>e.has(t.message)))}return n},xr="https://docs.odigos.io",$r="default",wr="this-cluster",Sr="This Cluster",Cr={SELECTED_DATA_STREAM:"SELECTED_DATA_STREAM",SELECTED_DATA_STREAM_WITH_PROXY:e=>`SELECTED_DATA_STREAM_${e}`,OVERVIEW_FILTERS:"OVERVIEW_FILTERS",DARK_MODE:"DARK_MODE"},Er={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)'},kr={NAMESPACE:"Namespace",NAME:"Name",KIND:"Kind",CONNECTION:"Connection",CONNECTIONS:"Connections",DATA_STREAM:"Data Stream",DATA_STREAMS:"Data Streams",STREAM_NAME:"Data Stream name",NAME_YOUR_STREAM:"Name your Data Stream",NAME_YOUR_STREAM_PLACEHOLDER:"e.g. Highest priority",STREAM_DESCRIPTION:"Provide a clear and descriptive name for your pipeline to ensure its purpose is easily understood by you and your team.",STREAM_CONFIRM:"Confirm your new Data Stream",RENAME_STREAM:e=>`Rename "${e}"`,DATA_STREAM_EXISTS_WARNING:(e,t)=>`A Data Stream with this name already exists, you can still rename the current "${e}", but it will merge into the existing "${t}".`,DATA_STREAM_MERGE_WARNING:(e,t)=>e?`A Data Stream named "${t}" already exists. Saving will merge "${e}" into "${t}" - both streams will share the same configuration going forward.`:`A Data Stream named "${t}" already exists. Saving will merge into "${t}" - the new stream will share the existing configuration going forward.`,ACTION:"Action",ACTIONS:"Actions",ADD_ACTION:"Add Action",ACTION_DETAILS:"Action Details",INSTRUMENTATION_RULE:"Instrumentation Rule",INSTRUMENTATION_RULES:"Instrumentation Rules",ADD_INSTRUMENTATION_RULE:"Add Instrumentation Rule",INSTRUMENTATION_RULE_DETAILS:"Instrumentation Rule Details",DESTINATION:"Destination",DESTINATIONS:"Destinations",ADD_DESTINATION:"Add Destination",ADD_DESTINATIONS:"Add Destinations",ADD_DESTINATION_DESCRIPTION:"Add a destination to send your telemetry data to. You can add multiple destinations.",DESTINATION_DETAILS:"Destination Details",SELECTED_DESTINATIONS:"Selected Destinations",SOURCE:"Source",SOURCES:"Sources",ADD_SOURCE:"Add Source",SOURCE_DETAILS:"Source Details",SELECT_SOURCES:"Select Sources",SELECTED_SOURCES:"Selected Sources",SELECT_SOURCES_DESCRIPTION:"Choose which sources to monitor in your pipeline.",NO_SOURCES:"No sources",NO_SOURCES_GO_BACK:"No sources selected. Please go back to select sources.",PLEASE_ADD_SOURCE:"Please add a source",NO_SOURCES_NAMESPACE:"No sources available in this namespace",TRY_SEARCH_OR_OTHER_NAMESPACE:"Try searching again or select another namespace.",PLEASE_MAKE_SURE_UNIGNORED_NAMESPACES:"Please make sure your cluster has unignored namespaces",INSTALLATION:"Installation",SOURCES_SETUP:"Sources setup",DESTINATIONS_SETUP:"Destinations setup",SUMMARY:"Summary",REVIEW_SETUP:"Review your setup and confirm your choices.",NO_SOURCES_SELECTED:"No sources selected",ADD_SOURCE_PROMPT:"Add at least one source to start collecting data",NO_DESTINATIONS_SELECTED:"No destinations selected",ADD_DESTINATION_PROMPT:"Add destination so your data has somewhere to go",GET_STARTED_WITH:"Get started with",GET_STARTED_DESCRIPTION:"First, select the sources you want Odigos to monitor. Next, choose where your data should be sent by configuring destinations.",TYPE:"Type",NOTES:"Notes",STATUS:"Status",READONLY:"Readonly",LANGUAGE:"Language",VERSION:"Version",RUNTIME_VERSION:"Runtime Version",VERSION_PLACEHOLDER:"1.0.0",MONITORS:"Monitors",SIGNALS_FOR_PROCESSING:"Signals for Processing",MANAGED_BY_PROFILE:"Managed by Profile",TIER:"Tier",ENTERPRISE:"Enterprise",ENTERPRISE_TIER:"Enterprise Tier",COMMUNITY:"Community",COMMUNITY_TIER:"Community Tier",API_TOKEN:"API Token",API_TOKENS:"API Tokens",DESCRIBE_ODIGOS:"Describe Odigos",DESCRIBE_SOURCE:"Describe Source",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",NO_DATA_INSTRUMENTATION_RULES:"To configure how telemetry is collected",NO_DATA_SOURCES:"To start collecting telemetry from a Kubernetes workload",NO_DATA_ACTIONS:"To process telemetry before export",NO_DATA_DESTINATIONS:"To send telemetry to an observability backend",QUICK_BACK_TO_SUMMARY:"When you finish editing you can quickly go back to the summary.",GO_TO_SUMMARY:"Go to summary",FUTURE_APPS_TITLE:"Instrument entire namespace",FUTURE_APPS_DESCRIPTION:"When enabled, all applications in the namespace and new applications will be instrumented automatically and included in the current data stream using a Namespace Source.",OVERIDE:"Override",OVERIDDEN:"Overridden",OVERRIDE_RUNTIME_DETAILS:"Override Runtime Details",OVERRIDE_RUNTIME_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",ROLLBACK_OCCURRED_MESSAGE:"Odigos detected a crash and rolled back instrumentation to protect your workload.",ROLLBACK_RECOVER:"Recover",FETCHING_NAMESPACES:"Fetching namespaces",FETCHING_NAMESPACES_SUBTITLE:"Please wait while we fetch the namespaces",ADD_SOURCES_DESCRIPTION:"Choose which sources to monitor in your pipeline.",CREATING_SOURCES:"Creating Sources...",CREATING_SOURCES_SUBTITLE:"This may take a few moments while sources are being created.",SELECT_NAMESPACE:"Select namespace from the list",SELECT_NAMESPACE_SUBTITLE:"Add namespace so you can select workloads from it.",CREATING_ACTION:"Creating action",CREATING_ACTION_SUBTITLE:"Please wait while we create the action",ADD_ACTION_DESCRIPTION:"Select an action to modify telemetry data before it's sent to destinations. Choose an action type and configure its details.",CREATING_INSTRUMENTATION_RULE:"Creating instrumentation rule",CREATING_INSTRUMENTATION_RULE_SUBTITLE:"Please wait while we create the instrumentation rule",ADD_INSTRUMENTATION_RULE_DESCRIPTION:"Define how telemetry is recorded from your application. Choose a rule type and configure the details.",CREATING_DESTINATION:"Creating destination",CREATING_DESTINATION_SUBTITLE:"Please wait while we create the destination",ADD_DESTINATION_DRAWER_DESCRIPTION:"Add backend destination you want to connect with Odigos."},Ar={GET_STARTED:"Get started",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"},Dr=(e,t)=>t?e.filter(e=>e.dataStreamNames.includes(t)||t===$r&&!e.dataStreamNames.length):[],Tr=(e,t="",n={})=>{for(const r in e)if(e.hasOwnProperty(r)){const o=e[r],i=t?`${t}.${r}`:r;null===o||"object"!=typeof o||Array.isArray(o)?Array.isArray(o)?o.forEach((e,t)=>{const r=`${i}[${t}]`;null!==e&&"object"==typeof e?Tr(e,r,n):n[r]=e}):n[i]=o:Tr(o,i,n)}return n},Ir=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]}`},Nr=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`}},Rr=()=>{const e=crypto.getRandomValues(new Uint8Array(16));let t=0;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,n=>{const r=e[t%16];t++;return("1"===n?r:"0"===n?63&r|128:15&r|64).toString(16)})},Or=e=>{const t=e?.toLowerCase(),n=t?.includes(An.Samplers),r=t===An.Attributes;if(n)return l;if(r)return c;return{[Dn.K8sAttributes]:m,[Dn.AddClusterInfo]:h,[Dn.DeleteAttributes]:p,[Dn.PiiMasking]:c,[Dn.RenameAttributes]:u,[Dn.URLTemplatization]:d,[Dn.ErrorSampler]:l,[Dn.ProbabilisticSampler]:l,[Dn.LatencySampler]:l,[Dn.ServiceNameSampler]:l,[Dn.SpanAttributeSampler]:l}[e]||g},Pr=e=>{const t=e?.filter(({status:e})=>e===Gn.Error),n=e?.filter(({status:e})=>e===Gn.Warning),r=e?.filter(({status:e})=>e===Vn.Disabled),o=e?.filter(({status:e})=>e===Vn.Loading),i=t.length>0,a=n.length>0,s=r.length>0;return{errors:t,hasErrors:i,warnings:n,hasWarnings:a,disableds:r,hasDisableds:s,loadings:o,hasLoadings:o.length>0,priorotizedStatus:i?Gn.Error:a?Gn.Warning:s?Gn.Info:void 0}},Fr=e=>{const t=e?.reduce((e,t)=>t.agentEnabled?.agentEnabled?e+1:e,0);return`${t}/${e?.length||0} instrumented`},_r=e=>({[Bn.Java]:R,[Bn.Go]:N,[Bn.JavaScript]:I,[Bn.Python]:T,[Bn.DotNet]:D,[Bn.CSharp]:A,[Bn.CPlusPlus]:k,[Bn.Php]:E,[Bn.Ruby]:C,[Bn.Rust]:S,[Bn.Swift]:w,[Bn.Elixir]:$,[Bn.MySql]:x,[Bn.Nginx]:v,[Bn.Postgres]:b,[Bn.Redis]:y,[Bn.Kafka]:f,[Bn.Ignored]:g,[Bn.Unknown]:g,[Bn.Processing]:g,[Bn.NoContainers]:g,[Bn.NoRunningPods]:g}[e]||g),Lr=e=>e?.map(e=>{return _r((t=e,t.overrides?.runtimeInfo?.language??t.runtimeInfo?.language??"unknown"));var t})||[],Mr=e=>e?.map(e=>_r(e))||[],zr=e=>e.detectedLanguages?.length?Mr(e.detectedLanguages):Lr(e.containers),Br=(e,t)=>{const n={[er.Alauda]:Le,[er.AlibabaCloud]:_e,[er.AppDynamics]:Fe,[er.Axiom]:Pe,[er.AzureBlob]:Oe,[er.AzureMonitor]:Re,[er.BetterStack]:Ne,[er.Bonree]:Ie,[er.Causely]:Te,[er.Checkly]:De,[er.Chronosphere]:Ae,[er.ClickHouse]:ke,[er.CloudWatch]:Ee,[er.Coralogix]:Ce,[er.Dash0]:Se,[er.Datadog]:we,[er.Dynamic]:q,[er.Dynatrace]:$e,[er.ElasticApm]:xe,[er.ElasticSearch]:ve,[er.GoogleCloud]:be,[er.GoogleCloudOTLP]:be,[er.GrafanaCloudLoki]:ye,[er.GrafanaCloudPrometheus]:ye,[er.GrafanaCloudTempo]:ye,[er.Greptime]:fe,[er.Groundcover]:ge,[er.Honeycomb]:me,[er.HyperDX]:he,[er.Instana]:pe,[er.Jaeger]:ue,[er.Kafka]:f,[er.Kloudmate]:de,[er.Last9]:ce,[er.Lightstep]:le,[er.LogzIo]:se,[er.Loki]:ae,[er.Lumigo]:ie,[er.Middleware]:oe,[er.NewRelic]:re,[er.Observe]:ne,[er.Odigos]:te,[er.OneUptime]:ee,[er.OpenObserve]:Z,[er.Opsverse]:Q,[er.Oracle]:Y,[er.OTLP]:q,[er.OTLPHttp]:q,[er.Prometheus]:J,[er.Qryn]:V,[er.QrynOss]:K,[er.Quickwit]:G,[er.S3]:X,[er.Seq]:H,[er.Signalfx]:j,[er.Signoz]:W,[er.Splunk]:j,[er.SplunkSapm]:j,[er.SplunkOtlp]:j,[er.SumoLogic]:U,[er.TelemetryHub]:B,[er.Tempo]:z,[er.Tingyun]:M,[er.Traceloop]:L,[er.Uptrace]:_,[er.VictoriaMetrics]:F,[er.VictoriaMetricsCloud]:F,[er.XRay]:P,[er.Pyroscope]:O}[e];return n&&!t?{icon:n}:{iconSrc:`https://d15jtxgb40qetw.cloudfront.net/${e}.svg`}},Ur=e=>({[jn.Namespace]:je,[jn.Source]:Ue,[jn.Destination]:Be,[jn.Action]:d,[jn.InstrumentationRule]:ze,[jn.SamplingRule]:Me}[e]),jr=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,Wr=e=>e?"string"==typeof e?e:`${e.namespace}/${e.kind}/${e.name}`:"",Hr=e=>Wr(jr(e)),Xr=(e,t,n)=>{const{extended:r,prioritizeDisplayName:o}=n||{};let i="",a="";switch(t){case jn.InstrumentationRule:const t=e;i=t.type,a=t.ruleName;break;case jn.Source:const n=e;i=n.name,a=n.otelServiceName;break;case jn.Action:const r=e;i=r.type,a=r.name;break;case jn.Destination:const o=e;i=o.destinationType.displayName,a=o.name;break;case jn.Namespace:const s=e;i=s.name,a=s.name}return r?i+(a&&a!==i?` (${a})`:""):o&&a||i},Gr=(e,t)=>{if(t===jn.Source){const t={namespace:"",name:"",kind:""};return e.split("&").forEach(e=>{const[n,r]=e.split("=");t[n]=r}),t}return e},Kr=e=>({[or.CodeAttributes]:Ge,[or.CustomInstrumentation]:Xe,[or.HeadersCollection]:He,[or.PayloadCollection]:We,[or.UnknownType]:g}[e]||g),Vr=e=>e.overrides?.runtimeInfo?.language??e.runtimeInfo?.language??Bn.Unknown,Jr=e=>{const{numberOfInstances:t,containers:n}=e;if(!n)return t&&t>0?Bn.Processing:Bn.NoRunningPods;const r=n?.filter(e=>Vr(e)!==Bn.Ignored);if(!r.length)return Bn.NoContainers;const o=r.find(e=>Vr(e)!==Bn.Unknown);return o?Vr(o):Bn.Unknown},qr=(e,t,n)=>(t===jn.Source?e?.sources.find(e=>e.kind===n.kind&&e.name===n.name&&e.namespace===n.namespace):e?.destinations.find(e=>e.id===n))||{throughput:0},Yr=e=>({[hr.Logs]:Je,[hr.Metrics]:Ve,[hr.Traces]:Ke,[hr.Profiles]:te}[e]),Qr=e=>{if(!e)return te;return{[Mn.K8s]:m,[Mn.Vm]:qe}[e]},Zr=e=>{if(!e)return"Unknown";return{[Mn.K8s]:"Kubernetes Cluster",[Mn.Vm]:"Virtual Machine"}[e]},eo=(e,t,n)=>{const r=e[t];return r?r.flatMap(e=>{const r=e[n],o=[];return void 0!==r&&(Array.isArray(r)?o.push(...r):o.push(r)),o.push(...eo(e,t,n)),o}):[]},to=(e,t)=>{if(t===jn.Source){let t="";return Object.entries(e).forEach(([e,n])=>{t+=`${e}=${n}&`}),t.slice(0,-1),t}return e},no=(e,t,n)=>{switch(t){case Gn.Default:return e.v2.colors.purple[n];case Gn.Info:return e.v2.colors.blue[n];case Gn.Error:return e.v2.colors.red[n];case Gn.Warning:return e.v2.colors.yellow[n];case Gn.Success:return e.v2.colors.green[n];case Vn.Loading:case Jn.Disabled:case Jn.Unknown:return e.v2.colors.silver[n];default:return e.v2.colors.white[500]}},ro=e=>{switch(e){case cr.Updating:case dr.Pending:case ur.ContainerCreating:case pr.Waiting:return Gn.Info;case cr.Healthy:case dr.Succeeded:case dr.Running:case ur.Running:case pr.Running:return Gn.Success;case cr.Degraded:return Gn.Warning;case cr.Failed:case dr.Failed:case ur.Error:case ur.CrashLoopBackOff:case ur.CreateContainerError:case ur.CreateContainerConfigError:case ur.ErrImagePull:case ur.ErrImageNeverPull:case ur.ImagePullBackOff:case ur.InvalidImageName:case ur.RegistryUnavailable:case ur.NetworkNotReady:case ur.OOMKilled:case ur.ContainerCannotRun:case pr.Terminated:case ur.DeadlineExceeded:case ur.StartError:return Gn.Error;case cr.Down:case ur.Completed:return Jn.Disabled;case cr.Unknown:case dr.Unknown:default:return Jn.Unknown}};var oo,io,ao;!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"}(oo||(oo={})),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"}(io||(io={})),function(e){e.Primary="primary",e.Secondary="secondary",e.Tertiary="tertiary",e.Disable="disable",e.Error="error",e.Mandatory="mandatory",e.Link="link",e.Success="success"}(ao||(ao={}));const so=new Set(Object.values(ao)),lo=(e,t)=>{if("string"!=typeof(n=t)||!so.has(n))return t;var n;switch(t){case ao.Primary:return e.v2.colors.white[500];case ao.Secondary:return e.v2.colors.silver[200];case ao.Tertiary:return e.v2.colors.black[500];case ao.Disable:return e.v2.colors.grey[400];case ao.Error:return e.v2.colors.red[500];case ao.Mandatory:return e.v2.colors.red[600];case ao.Link:return e.v2.colors.purple[400];case ao.Success:return e.v2.colors.green[400];default:return}},co=r.p`
2
+ margin: 0;
3
+ color: ${({$color:e,theme:t})=>lo(t,e)||t.v2.colors.grey[50]};
4
+ font-family: ${({theme:e})=>e.font_family.primary};
5
+ font-size: ${({theme:e,$size:t})=>e.v2.text.size[t]}px;
6
+ font-weight: ${({$weight:e})=>e};
7
+ text-align: ${({$align:e})=>e};
8
+ text-transform: ${({$transform:e})=>e};
9
+ line-height: ${({theme:e,$lineHeight:t,$size:n})=>t||`${e.v2.text.size[n]+2}px`};
10
+ opacity: ${({$opacity:e})=>e};
11
+
12
+ ${({$nowrap:e})=>e&&o`
13
+ text-wrap: nowrap;
14
+ white-space: nowrap;
15
+ overflow: hidden;
16
+ text-overflow: ellipsis;
17
+ `}
18
+
19
+ ${({$underline:e})=>e&&o`
20
+ text-decoration: underline;
21
+ `}
22
+
23
+ ${({$withClick:e})=>e&&o`
24
+ cursor: pointer;
25
+ &:hover {
26
+ text-decoration: underline;
27
+ }
28
+ `}
29
+ `,uo=Bt(({children:n,variant:r=oo.P,color:o,size:i=io.S,weight:a=400,opacity:s=1,align:l="left",lineHeight:c,transform:d,nowrap:u,underline:p,onClick:h,disabled:m,...g},f)=>{const y=n?.toString().split("\n")||[];return e(co,{ref:f,as:r,$color:o,$size:i,$weight:a,$opacity:s,$align:l,$lineHeight:c,$transform:d,$nowrap:u,$underline:p,$withClick:!!h&&!m,onClick:m?void 0:h,...g,children:y.map((n,r)=>t(Ut,{children:[n,r!==y.length-1&&e("br",{})]},`typography-${r}-${n}`))})});uo.displayName="Typography";const po=r.div`
30
+ border-radius: 100%;
31
+ background-color: ${({theme:e})=>e.v2.colors.silver[700]};
32
+ position: relative;
33
+ `,ho=r.div`
34
+ width: 80px;
35
+ height: 80px;
36
+ border-radius: 100%;
37
+ border: 4px solid ${({theme:e})=>e.v2.colors.green[300]};
38
+ border-right-color: transparent;
39
+ border-left-color: transparent;
40
+ border-bottom-color: transparent;
41
+ animation: spin 1s linear infinite;
42
+ @keyframes spin {
43
+ to {
44
+ transform: rotate(360deg);
45
+ }
46
+ }
47
+ `,mo=r(uo)`
48
+ position: absolute;
49
+ top: 50%;
50
+ left: 50%;
51
+ transform: translate(-50%, -50%);
52
+ `,go=({percentage:n})=>t(po,{children:[e(ho,{}),"number"==typeof n?e(mo,{size:io.M,weight:500,children:`${n}%`}):null]}),fo={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 yo(e){if("number"==typeof e)return{value:e,unit:"px"};let t;const n=(e.match(/^[0-9.]*/)||"").toString();t=n.includes(".")?parseFloat(n):parseInt(n,10);const r=(e.match(/[^0-9]*$/)||"").toString();return fo[r]?{value:t,unit:r}:{value:t,unit:"px"}}function bo(e){const t=yo(e);return`${t.value}${t.unit}`}const vo=((e,t,n)=>{const r=`react-spinners-${e}-${n}`;if("undefined"==typeof window||!window.document)return r;const o=document.createElement("style");document.head.appendChild(o);const i=o.sheet,a=`\n @keyframes ${r} {\n ${t}\n }\n `;return i&&i.insertRule(a,0),r})("SpinnerOld","50% {opacity: 0.3} 100% {opacity: 1}","fade"),xo=({loading:n=!0,color:r,scale:o=1,speedMultiplier:a=1,cssOverride:s={},style:l={},...c})=>{const d=i(),u=r||d.text.secondary;if(!n)return null;const{value:p}=yo(2),h=p+4.2,m=h/2+h/5.5,g=4*h*o,f={position:"relative",width:`${g}px`,height:`${g}px`,scale:o,...l,...s},y=(e,t)=>({position:"absolute",width:bo(1.5),height:bo(4),borderRadius:bo(2),backgroundColor:u,transition:"2s",animationFillMode:"both",animation:`${vo} ${1.2/a}s ${.12*e}s infinite ease-in-out`,transform:`translate(-50%, -50%) rotate(${t}deg)`});return t("span",{style:f,...c,children:[e("span",{style:{...y(1,0),top:`calc(50% + ${h}px)`,left:"50%"}}),e("span",{style:{...y(2,-45),top:`calc(50% + ${m}px)`,left:`calc(50% + ${m}px)`}}),e("span",{style:{...y(3,90),top:"50%",left:`calc(50% + ${h}px)`}}),e("span",{style:{...y(4,45),top:`calc(50% + ${-1*m}px)`,left:`calc(50% + ${m}px)`}}),e("span",{style:{...y(5,0),top:`calc(50% + ${-1*h}px)`,left:"50%"}}),e("span",{style:{...y(6,-45),top:`calc(50% + ${-1*m}px)`,left:`calc(50% + ${-1*m}px)`}}),e("span",{style:{...y(7,90),top:"50%",left:`calc(50% + ${-1*h}px)`}}),e("span",{style:{...y(8,45),top:`calc(50% + ${m}px)`,left:`calc(50% + ${-1*m}px)`}})]})},$o=r.div`
53
+ width: ${({$size:e})=>e}px;
54
+ height: ${({$size:e})=>e}px;
55
+ border-radius: 100%;
56
+ background: ${({$color:e})=>e};
57
+ display: flex;
58
+ align-items: center;
59
+ justify-content: center;
60
+ `,wo=({scale:t,icon:n})=>{const r=i();return e($o,{$size:45*t,$color:"rgba(80, 246, 232, 0.10)",children:e($o,{$size:43*t,$color:"rgba(80, 246, 232, 0.20)",children:e($o,{$size:39*t,$color:"rgba(80, 246, 232, 0.40)",children:e($o,{$size:33*t,$color:"rgba(80, 246, 232, 0.60)",children:e($o,{$size:23*t,$color:"#50F6E8",children:e(n,{size:16*t,fill:r.v2.colors.black[500]})})})})})})},So=434,Co=635,Eo=r.div`
61
+ width: ${434}px;
62
+ height: ${635}px;
63
+ display: flex;
64
+ flex-direction: column;
65
+ align-items: center;
66
+ justify-content: center;
67
+ padding: 16px;
68
+ background: linear-gradient(180deg, #0b0517 2.82%, #190d31 100%);
69
+ position: relative;
70
+ `,ko=r.div`
71
+ position: absolute;
72
+ top: 50%;
73
+ left: 50%;
74
+ transform: translate(-50%, -50%);
75
+ `,Ao=()=>t(Eo,{children:[e(ko,{children:t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"464",height:"464",viewBox:"0 0 464 464",fill:"none",children:[e("path",{opacity:"0.1",d:"M231.567 463.134C359.458 463.134 463.134 359.458 463.134 231.567C463.134 103.676 359.458 0 231.567 0C103.676 0 0 103.676 0 231.567C0 359.458 103.676 463.134 231.567 463.134Z",fill:"url(#paint0_radial_164_65835)"}),e("defs",{children:t("radialGradient",{id:"paint0_radial_164_65835",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(201.232 229.641) scale(231.217)",children:[e("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),e("stop",{offset:"0.41",stopColor:"#7C3BFF",stopOpacity:"0.11"}),e("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.13"}),e("stop",{offset:"0.67",stopColor:"#7C3BFF",stopOpacity:"0.18"}),e("stop",{offset:"0.75",stopColor:"#7C3BFF",stopOpacity:"0.25"}),e("stop",{offset:"0.83",stopColor:"#7C3BFF",stopOpacity:"0.33"}),e("stop",{offset:"0.89",stopColor:"#7C3BFF",stopOpacity:"0.44"}),e("stop",{offset:"0.95",stopColor:"#7C3BFF",stopOpacity:"0.56"}),e("stop",{offset:"1",stopColor:"#7C3BFF",stopOpacity:"0.7"})]})})]})}),e(ko,{children:t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"432",height:"432",viewBox:"0 0 432 432",fill:"none",children:[e("path",{opacity:"0.3",d:"M215.921 431.841C335.17 431.841 431.841 335.17 431.841 215.921C431.841 96.6709 335.17 0 215.921 0C96.6709 0 0 96.6709 0 215.921C0 335.17 96.6709 431.841 215.921 431.841Z",fill:"url(#paint0_radial_164_65836)"}),e("defs",{children:t("radialGradient",{id:"paint0_radial_164_65836",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(204.229 214.376) scale(216.276)",children:[e("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),e("stop",{offset:"0.38",stopColor:"#7C3BFF",stopOpacity:"0.11"}),e("stop",{offset:"0.52",stopColor:"#7C3BFF",stopOpacity:"0.13"}),e("stop",{offset:"0.62",stopColor:"#7C3BFF",stopOpacity:"0.18"}),e("stop",{offset:"0.69",stopColor:"#7C3BFF",stopOpacity:"0.25"}),e("stop",{offset:"0.76",stopColor:"#7C3BFF",stopOpacity:"0.33"}),e("stop",{offset:"0.82",stopColor:"#7C3BFF",stopOpacity:"0.44"}),e("stop",{offset:"0.88",stopColor:"#7C3BFF",stopOpacity:"0.57"}),e("stop",{offset:"0.93",stopColor:"#7C3BFF",stopOpacity:"0.72"}),e("stop",{offset:"0.97",stopColor:"#7C3BFF",stopOpacity:"0.88"}),e("stop",{offset:"1",stopColor:"#7C3BFF"})]})})]})}),e(ko,{children:t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"374",height:"374",viewBox:"0 0 374 374",fill:"none",children:[e("path",{opacity:"0.5",d:"M186.963 373.927C290.22 373.927 373.927 290.22 373.927 186.963C373.927 83.7063 290.22 0 186.963 0C83.7063 0 0 83.7063 0 186.963C0 290.22 83.7063 373.927 186.963 373.927Z",fill:"url(#paint0_radial_164_65837)"}),e("defs",{children:t("radialGradient",{id:"paint0_radial_164_65837",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(166.792 184.246) scale(186.963)",children:[e("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),e("stop",{offset:"0.31",stopColor:"#7C3BFF",stopOpacity:"0.11"}),e("stop",{offset:"0.45",stopColor:"#7C3BFF",stopOpacity:"0.14"}),e("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.19"}),e("stop",{offset:"0.65",stopColor:"#7C3BFF",stopOpacity:"0.26"}),e("stop",{offset:"0.73",stopColor:"#7C3BFF",stopOpacity:"0.35"}),e("stop",{offset:"0.8",stopColor:"#7C3BFF",stopOpacity:"0.46"}),e("stop",{offset:"0.86",stopColor:"#7C3BFF",stopOpacity:"0.6"}),e("stop",{offset:"0.92",stopColor:"#7C3BFF",stopOpacity:"0.76"}),e("stop",{offset:"0.98",stopColor:"#7C3BFF",stopOpacity:"0.93"}),e("stop",{offset:"1",stopColor:"#7C3BFF"})]})})]})}),e(ko,{children:t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"257",height:"257",viewBox:"0 0 257 257",fill:"none",children:[e("path",{opacity:"0.7",d:"M128.193 256.387C198.992 256.387 256.387 198.992 256.387 128.193C256.387 57.3941 198.992 0 128.193 0C57.3941 0 0 57.3941 0 128.193C0 198.992 57.3941 256.387 128.193 256.387Z",fill:"url(#paint0_radial_164_65838)"}),e("defs",{children:t("radialGradient",{id:"paint0_radial_164_65838",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(113.263 126.219) scale(128.08)",children:[e("stop",{stopColor:"#7C3BFF",stopOpacity:"0.1"}),e("stop",{offset:"0.31",stopColor:"#7C3BFF",stopOpacity:"0.11"}),e("stop",{offset:"0.45",stopColor:"#7C3BFF",stopOpacity:"0.14"}),e("stop",{offset:"0.56",stopColor:"#7C3BFF",stopOpacity:"0.19"}),e("stop",{offset:"0.65",stopColor:"#7C3BFF",stopOpacity:"0.26"}),e("stop",{offset:"0.73",stopColor:"#7C3BFF",stopOpacity:"0.35"}),e("stop",{offset:"0.8",stopColor:"#7C3BFF",stopOpacity:"0.46"}),e("stop",{offset:"0.86",stopColor:"#7C3BFF",stopOpacity:"0.6"}),e("stop",{offset:"0.92",stopColor:"#7C3BFF",stopOpacity:"0.76"}),e("stop",{offset:"0.98",stopColor:"#7C3BFF",stopOpacity:"0.93"}),e("stop",{offset:"1",stopColor:"#7C3BFF"})]})})]})}),e(ko,{children:e(te,{size:112})})]}),Do=r.div`
76
+ width: ${({$size:e})=>e}px;
77
+ height: ${({$size:e})=>e}px;
78
+ border-radius: 100%;
79
+ background: ${({$color:e})=>e};
80
+ display: flex;
81
+ align-items: center;
82
+ justify-content: center;
83
+ `,To=({scale:t=1,icon:n})=>{const r=i();return e(Do,{$size:73*t,$color:"rgba(106, 42, 255, 0.10)",children:e(Do,{$size:71*t,$color:"rgba(106, 42, 255, 0.20)",children:e(Do,{$size:65*t,$color:"rgba(106, 42, 255, 0.40)",children:e(Do,{$size:56*t,$color:"rgba(106, 42, 255, 0.60)",children:e(Do,{$size:39*t,$color:r.v2.colors.purple[500],children:e(n,{size:32*t,fill:r.v2.colors.white[500]})})})})})})},Io=r.div`
84
+ flex: 1;
85
+ align-self: stretch;
86
+ display: flex;
87
+ flex-direction: column;
88
+ gap: ${({$gap:e=24})=>e}px;
89
+ overflow-x: scroll;
90
+
91
+ max-height: calc(100vh - 24px - ${({$heightOffset:e})=>e||0}px);
92
+ padding: 24px 24px 0 24px;
93
+ `,No=r.div`
94
+ position: relative;
95
+
96
+ // inherit all the properties of the parent (PageContent)
97
+ flex: inherit;
98
+ align-self: inherit;
99
+ display: inherit;
100
+ flex-direction: inherit;
101
+ gap: inherit;
102
+ overflow-x: inherit;
103
+ `,Ro=r.div`
104
+ padding: ${({$padding:e})=>e||"12px"};
105
+ `,Oo=r.div`
106
+ display: flex;
107
+ flex-direction: row;
108
+ flex-wrap: ${({$wrap:e="unset"})=>e};
109
+ align-items: ${({$alignItems:e="center"})=>e};
110
+ justify-content: ${({$justifyContent:e="unset"})=>e};
111
+ gap: ${({$gap:e=2})=>e}px;
112
+ width: ${({$width:e})=>e||"unset"};
113
+ height: ${({$height:e})=>e||"unset"};
114
+ margin: ${({$margin:e="unset"})=>e};
115
+ padding: ${({$padding:e="unset"})=>e};
116
+ `,Po=r.div`
117
+ display: flex;
118
+ flex-direction: column;
119
+ flex-wrap: ${({$wrap:e="unset"})=>e};
120
+ align-items: ${({$alignItems:e="unset"})=>e};
121
+ justify-content: ${({$justifyContent:e="unset"})=>e};
122
+ gap: ${({$gap:e=2})=>e}px;
123
+ width: ${({$width:e})=>e||"unset"};
124
+ height: ${({$height:e})=>e||"unset"};
125
+ margin: ${({$margin:e="unset"})=>e};
126
+ padding: ${({$padding:e="unset"})=>e};
127
+ `,Fo=r(Po)`
128
+ width: ${({$width:e})=>e||"100%"};
129
+ height: ${({$height:e})=>e||"unset"};
130
+ padding: ${({$padding:e})=>e||"unset"};
131
+ align-items: center;
132
+ justify-content: center;
133
+ `,_o=r.div`
134
+ display: flex;
135
+ flex-direction: column;
136
+ padding: 12px;
137
+ overflow-y: scroll;
138
+ `,Lo=r.div`
139
+ position: ${({$relativeToParent:e})=>e?"absolute":"fixed"};
140
+ top: 0;
141
+ left: 0;
142
+ right: 0;
143
+ bottom: 0;
144
+ // Sits at the modal/drawer layer; rendered before the surface in JSX so the surface
145
+ // visually stacks above it via DOM order while sharing the same z-index level.
146
+ z-index: ${({theme:e})=>e.v2.zIndex.modal};
147
+ background: rgba(0, 0, 0, 0.6);
148
+ backdrop-filter: blur(2px);
149
+ `,Mo=r.div`
150
+ width: 800px;
151
+ min-height: ${({$minHeight:e})=>e||"unset"};
152
+ height: ${({$isNotModal:e})=>e?"fit-content":"calc(100vh - 350px)"};
153
+ margin: ${({$isNotModal:e})=>e?"64px 0 0 0":"64px 7vw 32px 7vw"};
154
+ padding: 0 2px;
155
+ overflow-y: scroll;
156
+ `,zo=r(Po)`
157
+ max-width: ${({$maxWidth:e})=>e||"unset"};
158
+ width: 100%;
159
+ `,Bo=r(Oo)`
160
+ gap: 16px;
161
+ padding: 16px;
162
+ `,Uo=r.div`
163
+ width: 100%;
164
+ max-height: ${({$maxHeight:e})=>e||"unset"};
165
+ overflow-y: auto;
166
+ `,jo=a`
167
+ 0% {
168
+ background-position: 0% 50%;
169
+ }
170
+ 100% {
171
+ background-position: 100% 50%;
172
+ }
173
+ `,Wo=r(uo)`
174
+ background: ${({$titleColor:e,$gradientColor:t})=>`linear-gradient(45deg, ${e} 0%, ${e} 40%, ${t} 50%, ${e} 60%, ${e} 100%)`};
175
+ background-size: 250% 100%; /* Expand background to allow movement */
176
+ background-clip: text;
177
+ color: transparent;
178
+ animation: ${jo} 1s reverse linear infinite;
179
+ `,Ho=e=>{const t=Math.max(0,Date.now()-e),n=Math.floor(t/1e3),r=Math.floor(n/60),o=n%60;return`${String(r).padStart(2,"0")}:${String(o).padStart(2,"0")}`},Xo=({icon:n,title:r,titleColor:o,titleSize:a=io.S,subTitle:s,subTitleColor:l,subTitleSize:c=io.XXXS,startedAt:d,withGradient:u,gradientColor:p,withSpinner:h,withSpinnerOld:m,scaleSpinnerOld:g=1,percentage:f,withVisual:y,visualIcon:b=Ye})=>{const v=i(),[x,$]=jt(()=>d?Ho(d):"");Wt(()=>{if(!d)return;$(Ho(d));const e=setInterval(()=>$(Ho(d)),1e3);return()=>clearInterval(e)},[d]);const w=o||v.v2.colors.white[500],S=l||v.v2.colors.silver[200],C=p||v.v2.colors.black[500];return t(Po,{$gap:16,$alignItems:"center",children:[y?e(wo,{scale:1.7,icon:b}):h?e(go,{percentage:f}):m?e(xo,{scale:g}):null,(r||s||d||n)&&t(Po,{$gap:8,$alignItems:"center",children:[t(Oo,{$gap:4,children:[n&&e(n,{}),u?e(Wo,{align:"center",size:a,$titleColor:w,$gradientColor:C,children:r}):e(uo,{align:"center",size:a,color:w,children:r})]}),s?e(uo,{align:"center",size:c,color:S,children:s}):null,x?e(uo,{align:"center",size:c,color:w,children:x}):null]})]})},Go=(e,t)=>({[Gn.Default]:n=>te({fill:no(t,e,"300"),...n}),[Gn.Info]:n=>rt({fill:no(t,e,"400"),...n}),[Gn.Error]:n=>nt({fill:no(t,e,"500"),...n}),[Gn.Warning]:n=>tt({fill:no(t,e,"500"),...n}),[Gn.Success]:n=>et({fill:no(t,e,"500"),...n}),[Vn.Loading]:e=>Xo({withSpinnerOld:!0,...e}),[Jn.Disabled]:n=>Ze({fill:no(t,e,"400"),...n}),[Jn.Unknown]:n=>Qe({fill:no(t,e,"300"),...n})}[e]),Ko=e=>{switch(e){case rr.Success:return Gn.Success;case rr.Error:case rr.Failure:return Gn.Error;case rr.Notice:return Gn.Warning;case rr.Unsupported:case rr.Unknown:return Gn.Info;case rr.Irrelevant:case rr.Disabled:return Vn.Disabled;case rr.Waiting:return Vn.Loading;case rr.Pending:default:return Gn.Default}},Vo=(e,t)=>{const n=t.find(([t,n])=>e>=t&&(null===n||e<=n));return n?.[2]||null},Jo={redis:y,mysql:x,postgresql:b,postgres:b,kafka:f,elasticsearch:ve,clickhouse:ke,oracle:Y,aws:ot},qo={sts:ft,dynamodb:gt,s3:X,sqs:mt,sns:ht,lambda:pt,kinesis:ut,ec2:dt,apigateway:ct,apigatewayv2:ct,bedrock:lt,bedrockruntime:lt,eventbridge:st,sfn:at,stepfunctions:at,secretsmanager:it,cloudwatch:Ee},Yo=e=>{const t=e.attributes,n=t["db.system"];if(n){const e=Jo[n.toLowerCase()];if(e)return e}const r=t["messaging.system"];if(r){const e=Jo[r.toLowerCase()];if(e)return e}const o=t["rpc.system"];if(o?.toLowerCase().includes("aws")){const e=t["rpc.service"]?.toLowerCase();if(e){const t=qo[e];if(t)return t}return ot}const i=e.serviceName.toLowerCase();for(const[e,t]of Object.entries(Jo))if(i.includes(e))return t;return Be},Qo=({namespace:e,name:t,kind:n})=>({namespace:e,name:t,kind:n});function Zo(e,t){if(!e)return t;if("object"==typeof e)return e;try{return JSON.parse(e)}catch(e){return t}}const ei=(e,t)=>{const n=[],r=JSON.parse(JSON.stringify(e));for(const e of r){const r=Zo(t.fields,{}),o=e.items.findIndex(e=>e.type===t.destinationType.type);-1!==o&&n.push(...e.items[o].fields.map(e=>({...e,initialValue:r[e.name]})))}return n},ti=(e,t)=>{const n=e=>e?.some(({healthy:e})=>e.status!==Gn.Success);return e?.length?e.some(({instrumentationInstances:e})=>n(e)):n(t)??!1},ni=e=>Array.isArray(e)?!e?.length:"object"==typeof e?!Object.keys(e||{}).length:[void 0,null,""].includes(e),ri=e=>{if(!e)return!1;if(e.length>63)return!1;return/^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$/.test(e)},oi=(e,t=0)=>{const n=(new Date).getTime();return new Date(e).getTime()-n<=t},ii=e=>{const t=String(e).trim().toLowerCase();return["true","false","1","0"].includes(t)},ai=(e,t=0)=>(new Date).getTime()-new Date(e).getTime()>=t,si=/^(\d+\.)?(\d+\.)?(\*|\d+)$/,li=e=>si.test(e),ci=e=>e?e.replace(/([a-z0-9])([A-Z])/g,"$1 $2"):"",di=e=>e?.map(({status:e,type:t,reason:n,message:r})=>({status:e?.toLowerCase(),type:ci(t),reason:n?ci(n):"",message:r}))||[],ui=(e,t)=>{const n=Zo(e.fields,{});return t.length?t.map(e=>({key:e.name,name:e.displayName||e.name,value:n[e.name]??null})).filter(e=>null!==e.value):Object.entries(n).map(([e,t])=>({key:e,name:e,value:t}))},pi=e=>e?Object.keys(e).filter(t=>e[t]).map(e=>br[e]):[],hi=e=>e?Object.keys(e).filter(t=>e[t].supported).map(e=>br[e]):[],mi=e=>{let t=e.replace(/[^\d.]/g,"");const n=t.indexOf(".");return-1!==n&&(t=t.slice(0,n+1)+t.slice(n+1).replace(/\./g,"")),t},gi=e=>e.replace(/[^\d]/g,""),fi=e=>{const t=String(e).trim().toLowerCase();return"true"===t||"1"===t},yi=e=>{let t="";try{const n=JSON.parse(e);t=Array.isArray(n)?n.map(e=>"object"==typeof e&&null!==e?`${e.key}: ${e.value}`:e).join(", "):"object"==typeof n&&null!==n?Object.entries(n).map(([e,t])=>`${e}: ${t}`).join(", "):e}catch(n){t=e}return t},bi=e=>{const t=e.fields.reduce((e,{key:t,value:n})=>{const r=(e=>{if(null!=e){if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e)return String(e);try{return JSON.stringify(e)}catch{return}}})(n);return void 0!==r&&e.push({key:t,value:r}),e},[]);return{...e,fields:t}},vi=e=>{if("object"!=typeof e)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach(n=>{const r=e[n];if(Array.isArray(r)){const e=r.filter(e=>null!=e&&""!==e);e.length>0&&(t[n]=e.map(e=>vi(e)))}else if("object"==typeof r&&null!==r){const e=vi(r);Object.keys(e).length>0&&(t[n]=e)}else[void 0,null,""].includes(r)||(t[n]=r)}),t},xi=(e,t=2)=>JSON.stringify(e||{},null,t),$i=async(e=1e3)=>new Promise(t=>setTimeout(t,e)),wi=e=>Object.entries(e).reduce((e,[t,n])=>(e[t]="string"==typeof n?n:JSON.stringify(n),e),{}),Si=e=>{let t=e.toString().replace("v","").split("-")[0];t=t.match(/[\d.]+/)?.[0]||"";const n=t.split(".");return 1e4*parseInt(n[0]||"0",10)+parseInt(n[1]||"0",10)},Ci=zt(e=>({activeNodeType:null,activeNodeId:null,setActiveNodeType:t=>e({activeNodeType:t}),setActiveNodeId:t=>e({activeNodeId:t})})),Ei=[{type:Dn.K8sAttributes,icon:Or(Dn.K8sAttributes),label:"Kubernetes Attributes",description:"Add dynamic k8s resource attributes to your data.",allowedSignals:[hr.Traces,hr.Metrics,hr.Logs,hr.Profiles],docsEndpoint:"/pipeline/actions/attributes/k8sattributes",docsDescription:"This action adds kubernetes related resource attributes to spans, metrics data points and log records."},{type:Dn.AddClusterInfo,icon:Or(Dn.AddClusterInfo),label:"Add Cluster Info",description:"Add static cluster-scoped attributes to your data.",allowedSignals:[hr.Traces,hr.Metrics,hr.Logs,hr.Profiles],docsEndpoint:"/pipeline/actions/attributes/addclusterinfo",docsDescription:"This action adds static resource attributes to spans, metrics data points and log records. It is useful to add cluster-wide attributes to all telemetry signals."},{type:Dn.DeleteAttributes,icon:Or(Dn.DeleteAttributes),label:"Delete Attribute",description:"Delete attributes from logs, metrics, and traces.",allowedSignals:[hr.Traces,hr.Metrics,hr.Logs,hr.Profiles],docsEndpoint:"/pipeline/actions/attributes/deleteattribute",docsDescription:"This action will delete the specified attributes from all telemetry signals that are specified in the signals field, regardless of the source, or any other condition."},{type:Dn.RenameAttributes,icon:Or(Dn.RenameAttributes),label:"Rename Attribute",description:"Rename attributes in logs, metrics, and traces.",allowedSignals:[hr.Traces,hr.Metrics,hr.Logs,hr.Profiles],docsEndpoint:"/pipeline/actions/attributes/renameattribute",docsDescription:"This action will rename the specified attributes from all telemetry signals that are specified in the signals field, regardless of the source, or any other condition."},{type:Dn.PiiMasking,icon:Or(Dn.PiiMasking),label:"PII Masking",description:"Mask PII data in your traces.",allowedSignals:[hr.Traces,hr.Profiles],docsEndpoint:"/pipeline/actions/attributes/piimasking",docsDescription:"This action processes a list of PII categories to be masked from the traces."},{type:Dn.URLTemplatization,icon:Or(Dn.URLTemplatization),label:"URL Templatization",description:"Replace dynamic URL path segments with named placeholders to reduce span cardinality.",allowedSignals:[hr.Traces],docsEndpoint:"/pipeline/actions/attributes/urltemplatization",docsDescription:"Normalizes HTTP URL paths by replacing dynamic segments (IDs, UUIDs, dates) with named placeholders (e.g. /user/1234 → /user/{id}). Reduces cardinality of http.route and span names, improving usability in telemetry backends.",minVersion:Si("v1.21.0")}],ki=[{type:Dn.ErrorSampler,icon:Or(An.Samplers),label:"Error Sampler",description:"Sample errors based on percentage.",allowedSignals:[hr.Traces,hr.Profiles],docsEndpoint:"/pipeline/actions/sampling/errorsampler",docsDescription:"This action is a Global Action that supports error sampling by filtering out non-error traces."},{type:Dn.LatencySampler,icon:Or(An.Samplers),label:"Latency Sampler",description:"Add latency to your traces.",allowedSignals:[hr.Traces,hr.Profiles],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:Dn.ProbabilisticSampler,icon:Or(An.Samplers),label:"Probabilistic Sampler",description:"Sample traces based on percentage.",allowedSignals:[hr.Traces,hr.Profiles],docsEndpoint:"/pipeline/actions/sampling/probabilisticsampler",docsDescription:"This action supports probabilistic sampling based on a configured sampling percentage applied to the TraceID."},{type:Dn.ServiceNameSampler,icon:Or(An.Samplers),label:"Service Name Sampler",description:"Sample traces based on the presence of specified services within a trace.",allowedSignals:[hr.Traces,hr.Profiles],docsEndpoint:"/pipeline/actions/sampling/servicenamesampler",docsDescription:"This action supports service name sampling based on the presence of specified services within a trace."},{type:Dn.SpanAttributeSampler,icon:Or(An.Samplers),label:"Span Attributes Sampler",description:"Sample traces based on the presence or value of specific attributes within a trace.",allowedSignals:[hr.Traces,hr.Profiles],docsEndpoint:"/pipeline/actions/sampling/spanattributesampler",docsDescription:"This action supports service name sampling based on the presence or value of specific attributes within a trace."}],Ai=[{label:"Attributes",icon:Or(An.Attributes),items:Ei},{label:"Samplers",icon:Or(An.Samplers),items:ki}];var Di;!function(e){e.ALL="all",e.UNSAVED="unsaved",e.EXISTS="exists",e.DETECTED="detected",e.SELF_HOSTED="self-hosted",e.MANAGED="managed"}(Di||(Di={}));const Ti={[Di.ALL]:{TITLE:"All",DESCRIPTION:"All destinations"},[Di.UNSAVED]:{TITLE:"Selected",DESCRIPTION:"These are destinations that you have not yet saved."},[Di.EXISTS]:{TITLE:"Already configured",DESCRIPTION:"These are destinations that you have already configured in other data-streams and can reuse them."},[Di.DETECTED]:{TITLE:"Detected by system",DESCRIPTION:"Odigos found these destinations in your cluster and pre-filled their details. Review and enable them to start sending data."},[Di.SELF_HOSTED]:{TITLE:"Self hosted",DESCRIPTION:"Full control and customization for advanced application monitoring."},[Di.MANAGED]:{TITLE:"Managed",DESCRIPTION:"Effortless monitoring with scalable performance management."}},Ii=[{type:or.CodeAttributes,icon:Kr(or.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:[Bn.Go,Bn.Python]},{type:or.CustomInstrumentation,icon:Kr(or.CustomInstrumentation),label:"Custom Instrumentation",description:"Define custom instrumentation for specific class and methods (i.e. for Java) or explicit symbol (i.e. for Golang).",docsEndpoint:"/pipeline/rules/custominstrumentation",docsDescription:'The "Custom Instrumentation" rule can be used to instrument a specific symbol (i.e. for Golang), or a class and method combination (i.e. for Java) for detailed tracing.',supportedLanguages:[Bn.Go,Bn.Java]},{type:or.HeadersCollection,icon:Kr(or.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:[Bn.Go,Bn.Java,Bn.JavaScript]},{type:or.PayloadCollection,icon:Kr(or.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:[Bn.Go,Bn.JavaScript]}],Ni="Cancel",Ri="Save",Oi="Edit rule",Pi="Edit auto rule",Fi="Create rule",_i="Delete rule",Li="Save",Mi="Create your first rule",zi="No Rules Exist",Bi="No Results",Ui=e=>`No rules match the search term "${e}"`,ji="Rule name",Wi="Rule type",Hi="Select the type of condition that makes a trace highly relevant.",Xi="Rule Enabled",Gi="Rule Disabled",Ki="Enabled",Vi="Disabled",Ji="Note",qi="HTTP route",Yi="Method",Qi="Keep Percentage",Zi="Keep traces with duration larger than",ea="Keep traces with errors",ta="Keep at least this percentage of matching traces. A higher rate from another matching rule may apply instead.",na="Keep at most this percentage of matching traces. A lower rate from another matching rule may apply instead.",ra="Custom percentage",oa="Disabled rule",ia="Sample",aa="Keep all",sa="Drop all",la="Operation type",ca="HTTP route prefix",da="Templated path",ua="Templated path prefix",pa="Kafka topic",ha="Custom duration (ms)",ma="No preview available",ga="Server address",fa="Drop at most this percentage of matching traces",ya="Unnamed rule",ba="Sampling Preview",va="Source Scope",xa="Unknown source",$a="Operation",wa="Duration",Sa="Errors",Ca="Keep Percentage",Ea="Define which sources this rule applies to. You can target specific services, namespaces, or apply the rule to the entire cluster.",ka="Define which operations this rule applies to. You can target specific endpoints or requests, or apply the rule to all operations in the selected services.",Aa="Define a duration threshold for this rule. Traces with a duration longer than the specified value will be considered important and retained.",Da="Retain traces with errors from the selected services and operations.",Ta="Use Keep All to retain every matching trace, or Sample when keeping everything is too expensive. 100% means keep all",Ia="Use Drop All to discard every matching trace, or Sample to keep some examples. 0% means drop all.",Na={highlyRelevant:Ta,noisy:Ia,costReduction:void 0},Ra="Type rule name",Oa="Add note here...",Pa="Type here",Fa="Search source name",_a="e.g. collector.my.vendor.com",La="Optional notes (not used by the system). Add any context or details for this sampling rule.",Ma="Rule will apply to all sources in the cluster",za="If multiple source scopes are set, they must all match simultaneously.",Ba="All sources",Ua="-",ja="All",Wa="All operations",Ha="HTTP server endpoint",Xa="HTTP client endpoint",Ga="Kafka consumer",Ka="Kafka producer",Va="Sampling Rules",Ja='Control how traces are categorized based on "Importance" and potential value, for fine grain control of what is kept and what is dropped.',qa="Refresh",Ya="Create rule",Qa="Sampling docs",Za="75vw",es="Delete rule?",ts="Are you sure you want to delete this sampling rule?",ns="Delete",rs="Cancel",os="Kubernetes Health Probes",is="Keep All Error Traces",as="Drop Traces Cluster-Wide",ss="A rule with the same matching conditions already exists.",ls="Create 'Noisy Operation Kubernetes Health Probes' rule",cs="Edit 'Noisy Operation Kubernetes Health Probes' rule",ds="Automatically detect and sample health probe traces across the cluster.",us="Create 'Highly Relevant Operations' rule",ps="Edit 'Highly Relevant Operations' rule",hs="Automatically keep all error traces across the entire cluster.",ms="Create 'Cost Reduction' rule",gs="Edit 'Cost Reduction' rule",fs="Automatically drop a percentage of traces across the entire cluster.",ys="Skip setup",bs="Start setup",vs="Next",xs="Go to Sampling",$s="Read more",ws="Welcome to Sampling",Ss="Cut costs without losing what matters",Cs="Odigos sampling works in three stages:",Es="Filter noisy traffic",ks="Remove non-actionable traces like health checks.",As="Guarantee highly relevance operations",Ds="Keep traces with errors, high latency, or mission-critical endpoints/services.",Ts="Reduce cost",Is="Sample routine traffic using percentages.",Ns="Sampling does not drop individual spans - it keeps or drops the entire trace.",Rs="Filter noisy operations",Os="Cut traces with little or no observability value (health-checks, metric scarping, etc)",Ps="Odigos filters these efficiently, dropping them early with almost no resource cost.\n\nSampling happens at request start, so only root span attributes available at that moment can be used. Later insights about the trace (errors, latency) - aren’t available.",Fs="Preset Rules",_s="Kubernetes Health Probes",Ls="Automatically ignore health checks",Ms="You can review, adjust, and add additional custom rules later.",zs="Choose your sampling strategy",Bs="Pick the approach that best fits your balance of cost vs data-completeness",Us="Keep List",js="Budget Friendly",Ws="Define which traces must be kept, while all others are sampled by default to minimize cost.",Hs="Cost-oriented - keeps only what you explicitly select.",Xs="Best for very large clusters with high volumes of traces and high costs.",Gs="Higher risk of missing important traces without ongoing review.",Ks="Drop List",Vs="Safe Choice",Js="Define which traces must be aggressively dropped, while all others are kept by default.",qs="Preserves most data unless explicitly filtered.",Ys="Safer by default - gaps in rules or system changes increase cost rather than risk losing important traces.",Qs="Advanced",Zs="Maximum Flexibility",el="Full control over all sampling rules and categories.\n\nBest for advanced users who want complete flexibility.",tl="'Keep List' profile",nl="Protect important traces",rl="Start by setting the default sampling rate for all traces.\nThen define rules to exclude highly relevant traces so they are guaranteed to be kept\n\nCommon use-cases include:",ol="Traces with errors",il="Slow requests (duration above threshold)",al="Mission-Critical endpoints or services",sl="Services under test or evaluation",ll="New deployments",cl="You can review, adjust, and add rules once onboarding is complete.",dl="Common Rules",ul="Preset Rules",pl="Error collection - entire cluster",hl="Keep all traces with errors",ml="Ambient sampling percentage",gl="'Drop List' profile",fl="Reduce high-volume traffic",yl="Start by keeping all traces by default. Then define rules to drop high-volume or low-value traces to reduce overall volume and cost.\n\nIn many systems, a small number of endpoints generate most of the trace volume.\nTargeting these high-volume sources can significantly reduce overall data.",bl="Advanced Configuration",vl="Configure sampling rules",xl="Advanced mode allows you to configure all sampling categories:",$l="Noise Filtering - remove non-actionable traces",wl="Highly Relevance - guarantee important traces are kept",Sl='Cost Control - drop traces for "Normal" operations',Cl="Rules can target:",El="Services",kl="HTTP Endpoints",Al="DB Operations",Dl="Errors",Tl="Latency and more...",Il="Sampling configured successfully!",Nl="Your sampling configuration is ready.\nYou can add and adjust rules anytime in Sampling Rules space.",Rl="Odigos will now:",Ol="Filter noisy operations",Pl="Guarantee important traces",Fl="Reduce cost using controlled sampling",_l="Recommended",Ll={noisy:"Rules that reduce noise from high-volume, low-value operations using Head Sampling.",highlyRelevant:"Add a rule to identify highly relevant operations. Traces with errors, long duration, or from critical endpoints and key workflows will be retained so important transactions are always available for analysis.",costReduction:"Rules that optimize costs by sampling less critical data using Tail Sampling."},Ml={noisy:ls,highlyRelevant:us,costReduction:ms},zl={noisy:cs,highlyRelevant:ps,costReduction:gs},Bl={noisy:"Noisy Operation",highlyRelevant:"Highly Relevant",costReduction:"Cost Reduction"},Ul=[{id:hr.Logs,value:"Logs"},{id:hr.Metrics,value:"Metrics"},{id:hr.Traces,value:"Traces"},{id:hr.Profiles,value:"Profiles"}],jl={[Bn.Go]:"Go",[Bn.Java]:"Java",[Bn.JavaScript]:"Node.js",[Bn.Python]:"Python",[Bn.DotNet]:".NET",[Bn.CSharp]:"C#",[Bn.CPlusPlus]:"C++",[Bn.Php]:"PHP",[Bn.Ruby]:"Ruby",[Bn.Rust]:"Rust",[Bn.Swift]:"Swift",[Bn.Elixir]:"Elixir",[Bn.MySql]:"MySQL",[Bn.Nginx]:"Nginx",[Bn.Postgres]:"PostgreSQL",[Bn.Redis]:"Redis",[Bn.Kafka]:"Kafka",[Bn.Ignored]:"Ignored",[Bn.Unknown]:"Unknown",[Bn.Processing]:"Processing",[Bn.NoContainers]:"No Containers",[Bn.NoRunningPods]:"No Running Pods"},Wl=[{id:Bn.Go,value:jl[Bn.Go],icon:_r(Bn.Go)},{id:Bn.Java,value:jl[Bn.Java],icon:_r(Bn.Java)},{id:Bn.JavaScript,value:jl[Bn.JavaScript],icon:_r(Bn.JavaScript)},{id:Bn.Python,value:jl[Bn.Python],icon:_r(Bn.Python)},{id:Bn.Php,value:jl[Bn.Php],icon:_r(Bn.Php)},{id:Bn.Ruby,value:jl[Bn.Ruby],icon:_r(Bn.Ruby)},{id:Bn.Rust,value:jl[Bn.Rust],icon:_r(Bn.Rust)},{id:Bn.DotNet,value:jl[Bn.DotNet],icon:_r(Bn.DotNet)},{id:Bn.CSharp,value:jl[Bn.CSharp],icon:_r(Bn.CSharp)},{id:Bn.CPlusPlus,value:jl[Bn.CPlusPlus],icon:_r(Bn.CPlusPlus)},{id:Bn.Swift,value:jl[Bn.Swift],icon:_r(Bn.Swift)},{id:Bn.Elixir,value:jl[Bn.Elixir],icon:_r(Bn.Elixir)}],Hl={id:nr.OpentelemetryEbpfInstrumentation,value:nr.OpentelemetryEbpfInstrumentation,icon:q},Xl={[Bn.Go]:{community:[{id:nr.GolangCommunity,value:nr.GolangCommunity,icon:_r(Bn.Go)},Hl],enterprise:[{id:nr.GolangEnterprise,value:nr.GolangEnterprise,icon:_r(Bn.Go)}]},[Bn.JavaScript]:{community:[{id:nr.NodejsCommunity,value:nr.NodejsCommunity,icon:_r(Bn.JavaScript)},Hl],enterprise:[{id:nr.NodejsEnterprise,value:nr.NodejsEnterprise,icon:_r(Bn.JavaScript)}]},[Bn.Python]:{community:[{id:nr.PythonCommunity,value:nr.PythonCommunity,icon:_r(Bn.Python)},Hl],enterprise:[{id:nr.PythonEnterprise,value:nr.PythonEnterprise,icon:_r(Bn.Python)}]},[Bn.Java]:{community:[{id:nr.JavaCommunity,value:nr.JavaCommunity,icon:_r(Bn.Java)},Hl],enterprise:[{id:nr.JavaEnterprise,value:nr.JavaEnterprise,icon:_r(Bn.Java)},{id:nr.JavaEbpfInstrumentations,value:nr.JavaEbpfInstrumentations,icon:_r(Bn.Java)}]},[Bn.DotNet]:{community:[{id:nr.DotNetCommunity,value:nr.DotNetCommunity,icon:_r(Bn.DotNet)},Hl],enterprise:[{id:nr.DotNetEnterprise,value:nr.DotNetEnterprise,icon:_r(Bn.DotNet)}]},[Bn.Ruby]:{community:[{id:nr.RubyCommunity,value:nr.RubyCommunity,icon:_r(Bn.Ruby)},Hl],enterprise:[{id:nr.RubyEnterprise,value:nr.RubyEnterprise,icon:_r(Bn.Ruby)}]},[Bn.Php]:{community:[{id:nr.PhpCommunity,value:nr.PhpCommunity,icon:_r(Bn.Php)},Hl],enterprise:[]},[Bn.CSharp]:{community:[],enterprise:[{id:nr.CPlusPlusEnterprise,value:nr.CPlusPlusEnterprise,icon:_r(Bn.CSharp)}]},[Bn.MySql]:{community:[],enterprise:[{id:nr.MySqlEnterprise,value:nr.MySqlEnterprise,icon:_r(Bn.MySql)}]},[Bn.CPlusPlus]:{community:[Hl],enterprise:[]},[Bn.Rust]:{community:[Hl],enterprise:[]},[Bn.Swift]:{community:[Hl],enterprise:[]},[Bn.Elixir]:{community:[Hl],enterprise:[]},[Bn.Nginx]:{community:[Hl],enterprise:[]},[Bn.Postgres]:{community:[Hl],enterprise:[]},[Bn.Redis]:{community:[Hl],enterprise:[]},[Bn.Kafka]:{community:[Hl],enterprise:[]},[Bn.Ignored]:{community:[],enterprise:[]},[Bn.Unknown]:{community:[],enterprise:[]},[Bn.Processing]:{community:[],enterprise:[]},[Bn.NoContainers]:{community:[],enterprise:[]},[Bn.NoRunningPods]:{community:[],enterprise:[]}},Gl=6048e5,Kl=zt()(Zt(e=>({darkMode:!0,setDarkMode:t=>e({darkMode:t})}),{name:Cr.DARK_MODE,storage:"undefined"!=typeof window?en(()=>localStorage):void 0})),Vl={dataStreamsLoading:!1,dataStreams:[],selectedStreamName:$r},Jl=zt(e=>({...Vl,setDataStreamsLoading:t=>e({dataStreamsLoading:t}),setDataStreams:t=>e({dataStreams:t}),addDataStreams:t=>e(e=>{const n=[...e.dataStreams,...t].map(e=>[e.name,e]);return{dataStreams:Array.from(new Map(n).values())}}),removeDataStreams:t=>e(e=>({dataStreams:e.dataStreams.filter(e=>!t.find(t=>t.name===e.name))})),setSelectedStreamName:t=>e({selectedStreamName:t}),resetDataStreamStore:()=>e(Vl)})),ql=zt(e=>({drawerType:null,drawerEntityId:null,setDrawerType:t=>e({drawerType:t}),setDrawerEntityId:t=>e({drawerEntityId:t})})),Yl=zt(e=>({namespacesLoading:!1,namespaces:[],sourcesLoading:!1,sources:[],destinationsLoading:!1,destinations:[],actionsLoading:!1,actions:[],instrumentationRulesLoading:!1,instrumentationRules:[],setEntitiesLoading:(t,n)=>{const r=t===jn.Namespace?"namespacesLoading":t===jn.Source?"sourcesLoading":t===jn.Destination?"destinationsLoading":t===jn.Action?"actionsLoading":t===jn.InstrumentationRule?"instrumentationRulesLoading":"NONE";"NONE"!==r&&e({[r]:n})},setEntities:(t,n)=>{const r=t===jn.Namespace?"namespaces":t===jn.Source?"sources":t===jn.Destination?"destinations":t===jn.Action?"actions":t===jn.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==r&&e({[r]:n})},addEntities:(t,n)=>{const r=t===jn.Namespace?"namespaces":t===jn.Source?"sources":t===jn.Destination?"destinations":t===jn.Action?"actions":t===jn.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==r&&e(e=>{const t=[...e[r]],o=new Map;return t.forEach((e,t)=>{o.set(Hr(e),t)}),n.forEach(e=>{const n=Hr(e),r=o.get(n);void 0!==r?t[r]={...t[r],...e}:(o.set(n,t.length),t.push(e))}),{[r]:t}})},removeEntities:(t,n)=>{const r=t===jn.Namespace?"namespaces":t===jn.Source?"sources":t===jn.Destination?"destinations":t===jn.Action?"actions":t===jn.InstrumentationRule?"instrumentationRules":"NONE";"NONE"!==r&&e(e=>{const t=new Set(n.map(e=>Wr(e))),o=e[r].filter(e=>!t.has(Hr(e)));return{[r]:o}})},resetEntityStore:()=>{e({namespacesLoading:!1,namespaces:[],sourcesLoading:!1,sources:[],destinationsLoading:!1,destinations:[],actionsLoading:!1,actions:[],instrumentationRulesLoading:!1,instrumentationRules:[]})}})),Ql=()=>({searchText:"",statuses:[],platformTypes:[],namespaces:[],kinds:[],monitors:[],languages:[],conditions:[],podsAgentInjectionStatus:[],errors:[],onlyErrors:!1}),Zl=zt(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:Ql})),ec=zt(e=>({currentModal:"",setCurrentModal:t=>e({currentModal:t})})),tc=zt((e,t)=>({notifications:[],addNotification:n=>{const r=new Date,o=`${r.getTime().toString()}${n.target?`#${n.target}`:""}`,{notifications:i}=t();i.some(e=>e.type===n.type&&e.title===n.title&&e.message===n.message&&!e.dismissed)||e(e=>({notifications:[{...n,id:o,time:r.toISOString(),dismissed:!1,seen:!1},...e.notifications]}))},markAsDismissed:t=>{e(e=>{const n=e.notifications.findIndex(e=>e.id===t);return-1!==n&&(e.notifications[n].dismissed=!0),{notifications:e.notifications}})},markAsSeen:t=>{e(e=>{const n=e.notifications.findIndex(e=>e.id===t);return-1!==n&&(e.notifications[n].seen=!0),{notifications:e.notifications}})},removeNotification:t=>{e(e=>{const n=e.notifications.findIndex(e=>e.id===t);return-1!==n&&e.notifications.splice(n,1),{notifications:e.notifications}})},removeNotifications:t=>{t&&e(e=>({notifications:e.notifications.filter(e=>e.id.split("#")[1]!==t)}))}}));var nc;!function(e){e.Instrumenting="instrumenting",e.Uninstrumenting="uninstrumenting",e.BulkInstrumenting="bulk-instrumenting",e.BulkUninstrumenting="bulk-uninstrumenting",e.DownloadingDiagnose="downloading-diagnose"}(nc||(nc={}));const rc=(e,t)=>({...t?.[e]||{total:0,current:0,percentage:0}}),oc=e=>(e.total<e.current&&(e.total=e.current+1),e.percentage=Math.round(e.current/e.total*100),e),ic=zt((e,t)=>({progress:{},setProgress:(n,r)=>{const o=t(),i=rc();return"number"==typeof r.total&&(i.total=r.total),"number"==typeof r.current&&(i.current=r.current),Array.isArray(r.list)&&(i.list=r.list),e({progress:{...o.progress,[n]:oc(i)}})},addProgress:(n,r,o)=>{const i=t(),a=rc(n,i.progress);return a.current+=r,o&&(a.list=a.list?.map(e=>e.label===o.label?{...e,status:o.status}:e)),e({progress:{...i.progress,[n]:oc(a)}})},resetProgress:t=>e({progress:{[t]:void 0}})})),ac=zt(e=>({selectedSources:{},setSelectedSources:t=>e({selectedSources:t}),resetSelectedState:()=>e(()=>({selectedSources:{},selectedConnection:null}))})),sc={configuredSources:{},configuredFutureApps:{},configuredDestinations:[],configuredDestinationsUpdateOnly:[]},lc=(e,t)=>e.destinationType.type!==t.destinationType.type,cc=zt(e=>({...sc,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=>lc(e,t))})),setConfiguredDestinationsUpdateOnly:t=>e({configuredDestinationsUpdateOnly:t}),addConfiguredDestinationUpdateOnly:t=>e(e=>{const n=[...e.configuredDestinationsUpdateOnly,t].map(e=>[e.id,e]);return{configuredDestinationsUpdateOnly:Array.from(new Map(n).values())}}),removeConfiguredDestinationUpdateOnly:t=>e(e=>({configuredDestinationsUpdateOnly:e.configuredDestinationsUpdateOnly.filter(e=>lc(e,t))})),clearStore:()=>e(()=>({...sc}))})),dc={v2:{text:{size:{xxxs:10,xxs:12,xs:14,s:16,m:20,l:24,xl:32,xxl:40,xxxl:48}},colors:{black:{500:"#151618"},white:{500:"#FFFFFF"},purple:{100:"#E1D4FF",200:"#C3AAFF",300:"#A57FFF",400:"#8855FF",500:"#6A2AFF",600:"#5925D0",700:"#4822A2",800:"#371E73",900:"#271A45"},green:{100:"#DCFDFA",200:"#B9FBF6",300:"#96FAF1",400:"#73F8ED",500:"#50F6E8",600:"#44C9BE",700:"#399D94",800:"#2D6F6A",900:"#224340"},grey:{25:"#F6F6F6",50:"#ECECED",100:"#DADADB",150:"#B8B8B8",200:"#B4B5B7",300:"#8F9093",400:"#696B6F",500:"#44464B",600:"#3A3C40",700:"#313236",800:"#282A2E",900:"#1B1B1C"},silver:{25:"#F6F6F7",50:"#EDEDEE",100:"#DADCDE",200:"#B6B8BD",300:"#91959C",400:"#6D717B",500:"#484E5A",600:"#3E424C",700:"#34383F",750:"#2C2F36",800:"#26292F",900:"#1F2125",1e3:"#1B1C1D"},red:{100:"#FFE5E7",200:"#FFCBD0",300:"#FFB0B8",400:"#FF96A1",500:"#FF7C89",600:"#D06772",700:"#A2535B",800:"#733F44",900:"#452B2D",1e3:"#2E2022"},blue:{100:"#EBF0FA",200:"#D6E1F4",300:"#ADC3EA",400:"#84A4DF",500:"#5C86D5",600:"#3368CA",700:"#2D57A6",800:"#274782",900:"#21375E",1e3:"#1C273A"},yellow:{100:"#FFFBF1",200:"#FFF7E2",300:"#FFEFC6",400:"#FFE7A9",500:"#FFDF8D",600:"#FFD770",700:"#D0B05E",800:"#A28A4C",900:"#73633A",1e3:"#453D28"},beige:{600:"#EEC990"},pink:{500:"#FF7CC8",600:"#FF7CA9"},orange:{600:"#F29142"}},zIndex:{base:1,island:100,drawer:1e3,modal:1e3,dropdown:1100,popover:1100,tooltip:1200}},colors:{majestic_blue:"#444AD9",majestic_blue_soft:"#6C7AE8",orange_og:"#FE9239",orange_soft:"#FFB160",dark_red:"#802828",darker_red:"#611F1F",darkest_red:"#281515",darkest_red_hover:"#351515",dark_green:"#2D4323"},text:{},font_family:{primary:"Inter, sans-serif",secondary:"Kode Mono, sans-serif",code:"IBM Plex Mono, monospace"}},uc={v2:dc.v2,darkMode:!0,colors:{...dc.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:dc.font_family},pc={v2:dc.v2,darkMode:!1,colors:{...dc.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:dc.font_family},hc=e=>e?uc:pc;var mc=Object.freeze({__proto__:null,baseTheme:dc,darkModeTheme:uc,getTheme:hc,lightModeTheme:pc});tn('@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 gc=({children:t})=>{const{darkMode:n}=Kl();return e(s,{theme:hc(n),children:t})},fc={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 yc=Object.freeze({__proto__:null,hex:fc});const bc={in:{left:a`
180
+ from { transform: translateX(-100%); }
181
+ to { transform: translateX(0); }
182
+ `,right:a`
183
+ from { transform: translateX(100%); }
184
+ to { transform: translateX(0); }
185
+ `,top:a`
186
+ from { transform: translateY(-100%); }
187
+ to { transform: translateY(0); }
188
+ `,bottom:a`
189
+ from { transform: translateY(100%); }
190
+ to { transform: translateY(0); }
191
+ `,center:a`
192
+ from { transform: translate(-50%, 100%); }
193
+ to { transform: translate(-50%, -50%); }
194
+ `},out:{left:a`
195
+ from { transform: translateX(0); }
196
+ to { transform: translateX(-100%); }
197
+ `,right:a`
198
+ from { transform: translateX(0); }
199
+ to { transform: translateX(100%); }
200
+ `,top:a`
201
+ from { transform: translateY(0); }
202
+ to { transform: translateY(-100%); }
203
+ `,bottom:a`
204
+ from { transform: translateY(0); }
205
+ to { transform: translateY(100%); }
206
+ `,center:a`
207
+ from { transform: translate(-50%, -50%); }
208
+ to { transform: translate(-50%, 100%); }
209
+ `}},vc={in:a`
210
+ from {
211
+ width: 0%;
212
+ }
213
+ to {
214
+ width: 100%;
215
+ }
216
+ `,out:a`
217
+ from {
218
+ width: 100%;
219
+ }
220
+ to {
221
+ width: 0%;
222
+ }
223
+ `},xc=a`
224
+ 0% {
225
+ transform: scale(1);
226
+ opacity: 1;
227
+ }
228
+ 75%, 100% {
229
+ transform: scale(2);
230
+ opacity: 0;
231
+ }
232
+ `,$c=a`
233
+ 0% {
234
+ background-position: -500px 0;
235
+ }
236
+ 100% {
237
+ background-position: 500px 0;
238
+ }
239
+ `,wc={in:a`
240
+ from {
241
+ opacity: 0;
242
+ }
243
+ to {
244
+ opacity: 1;
245
+ }
246
+ `,out:a`
247
+ from {
248
+ opacity: 1;
249
+ }
250
+ to {
251
+ opacity: 0;
252
+ }
253
+ `};var Sc=Object.freeze({__proto__:null,fade:wc,ping:xc,progress:vc,shimmer:$c,slide:bc});const Cc=r.span`
254
+ display: flex;
255
+ align-items: center;
256
+ justify-content: center;
257
+
258
+ min-height: 16px;
259
+ min-width: 16px;
260
+ width: fit-content;
261
+ padding: 4px;
262
+ gap: 2px;
263
+
264
+ border-radius: 50px;
265
+ border: 1px solid ${({theme:e,$filled:t,$status:n})=>n?e.text[n]+(t?"":fc["050"]):t?"transparent":e.colors.border};
266
+ background-color: ${({theme:e,$filled:t,$status:n})=>t?n?e.colors[n]:e.colors.majestic_blue:"transparent"};
267
+ color: ${({theme:e,$filled:t,$status:n})=>t&&n?e.text.secondary:t?e.text.white:n?e.text[n]:e.text.grey};
268
+ font-family: ${({theme:e})=>e.font_family.secondary};
269
+ font-size: 12px;
270
+ white-space: nowrap;
271
+
272
+ ${({theme:e,$filled:t,$status:n,$clickable:r})=>r&&`&:hover {\n cursor: pointer;\n background-color: ${n?e.colors[n]+fc["020"]:t?e.colors.majestic_blue_soft:e.colors.secondary+fc["020"]};\n }`}
273
+ `,Ec=({label:n,filled:r,status:o,withIcon:a,onClick:s})=>{const l=i(),c=o&&a?Go(o,l):null;return t(Cc,{$filled:r,$status:o,$clickable:!!s,onClick:s,children:[!!c&&e(c,{}),n]})},kc=r.div`
274
+ height: fit-content;
275
+ border: 2px solid transparent;
276
+ padding: 2px;
277
+ border-radius: 32px;
278
+ background-color: transparent;
279
+ transition: border-color 0.3s ease;
280
+ &:focus-within {
281
+ border-color: ${({theme:e})=>e.colors.secondary};
282
+ }
283
+ `,Ac={primary:o`
284
+ border: 1px solid ${({theme:e})=>e.text.secondary+fc["024"]};
285
+ background: ${({theme:e})=>e.colors.secondary};
286
+ color: ${({theme:e})=>e.colors.primary};
287
+ &:hover {
288
+ background: ${({theme:e})=>e.colors.secondary+fc["080"]};
289
+ }
290
+ &:active {
291
+ background: ${({theme:e})=>e.text.secondary+fc["060"]};
292
+ }
293
+ `,secondary:o`
294
+ border: 1px solid ${({theme:e})=>e.colors.border};
295
+ background: ${({theme:e})=>e.colors.primary};
296
+ color: ${({theme:e})=>e.colors.secondary};
297
+ &:hover {
298
+ border: 1px solid ${({theme:e})=>e.text.darker_grey};
299
+ background: ${({theme:e})=>e.colors.secondary+fc["010"]};
300
+ }
301
+ &:active {
302
+ border: 1px solid ${({theme:e})=>e.text.dark_grey};
303
+ background: ${({theme:e})=>e.colors.secondary+fc["015"]};
304
+ }
305
+ `,tertiary:o`
306
+ border-color: transparent;
307
+ background: transparent;
308
+ &:hover {
309
+ background: ${({theme:e})=>e.colors.dropdown_bg_2+fc["040"]};
310
+ }
311
+ &:active {
312
+ background: ${({theme:e})=>e.colors.dropdown_bg_2};
313
+ }
314
+ `,danger:o`
315
+ border-color: transparent;
316
+ background: ${({theme:e})=>e.text.error};
317
+ &:hover {
318
+ background: ${({theme:e})=>e.text.error+fc["090"]};
319
+ }
320
+ &:active {
321
+ background: ${({theme:e})=>e.text.error+fc["080"]};
322
+ }
323
+ `,warning:o`
324
+ border-color: transparent;
325
+ background: ${({theme:e})=>e.text.warning};
326
+ &:hover {
327
+ background: ${({theme:e})=>e.text.warning+fc["090"]};
328
+ }
329
+ &:active {
330
+ background: ${({theme:e})=>e.text.warning+fc["080"]};
331
+ }
332
+ `},Dc=r.button`
333
+ height: 36px;
334
+ border-radius: 32px;
335
+ cursor: pointer;
336
+ display: flex;
337
+ align-items: center;
338
+ justify-content: center;
339
+ gap: 8px;
340
+ padding: 0 12px;
341
+ font-family: ${({theme:e})=>e.font_family.secondary};
342
+ text-transform: uppercase;
343
+ text-decoration: underline;
344
+ font-weight: 600;
345
+ outline: none;
346
+ ${({$variant:e})=>e&&Ac[e]}
347
+ ${({disabled:e,$variant:t})=>e&&o`
348
+ opacity: 0.5;
349
+ cursor: not-allowed;
350
+
351
+ ${"primary"===t?o`
352
+ color: ${({theme:e})=>e.colors.secondary};
353
+ background: ${({theme:e})=>e.text.secondary+fc["010"]};
354
+ &:hover {
355
+ background: ${({theme:e})=>e.text.secondary+fc["015"]};
356
+ }
357
+ `:""}
358
+ `}
359
+ `,Tc=({children:t,variant:n="primary",onClick:r,...o})=>{const i=Ht(null);return e(kc,{$variant:n,children:e(Dc,{ref:i,$variant:n,onClick:e=>{r&&r(e),i.current?.blur()},...o,children:t})})},Ic=r.div`
360
+ color: ${({$color:e,theme:t})=>e||t.text.secondary};
361
+ font-size: ${({$size:e})=>void 0!==e?e:16}px;
362
+ font-weight: ${({$weight:e})=>void 0!==e?e:300};
363
+ text-align: ${({$align:e})=>e||"left"};
364
+ opacity: ${({$opacity:e})=>void 0!==e?e:1};
365
+ text-decoration: ${({$decoration:e})=>e||"none"};
366
+ text-transform: ${({$transform:e,$family:t})=>e||("secondary"===t?"uppercase":"none")};
367
+ font-family: ${({theme:e,$family:t="primary"})=>e.font_family[t]};
368
+ white-space: ${({$nowrap:e})=>e?"nowrap":"unset"};
369
+ text-wrap: ${({$nowrap:e})=>e?"nowrap":"unset"};
370
+ `,Nc=e=>{const t=e.match(/<a[^>]*href="([^"]*)"[^>]*>(.*?)<\/a>/g);return t?.map(e=>{const[t,n,r]=e.split('"');return{original:e,href:n,label:r.replace("</a>","").replace(">","")}})},Rc=e=>{const t=e.match(/<strong[^>]*>(.*?)<\/strong>/g);return t?.map(e=>{const t=e.replace(/<strong[^>]*>/,"").replace(/<\/strong>/,"");return{original:e,label:t}})},Oc=(n,r)=>{const o=Nc(n);o?.forEach((e,t)=>{n=n.replace(e.original,`LINK-${t}###`)});const i=Rc(n);i?.forEach((e,t)=>{n=n.replace(e.original,`STRONG-${t}###`)});return n.split(" ").map(n=>{if(n.includes("LINK-")){const[i,a]=n.split("###"),s=o?.[parseInt(i.replace("LINK-",""))];return t(Ut,{children:[e("a",{href:s?.href,target:"_blank",rel:"noreferrer",style:{color:r.colors.majestic_blue_soft},children:s?.label}),a?`${a} `:" "]},n)}if(n.includes("STRONG-")){const[r,o]=n.split("###"),a=i?.[parseInt(r.replace("STRONG-",""))];return t(Ut,{children:[e("strong",{style:{fontWeight:600},children:a?.label}),o?`${o} `:" "]},n)}return n+" "})},Pc=({children:n,color:r,size:o,weight:a,align:s,family:l,opacity:c,decoration:d,transform:u,nowrap:p,...h})=>{const m=i(),g=Xt(()=>(n?["string","number"].includes(typeof n)?n.toString():Array.isArray(n)?n.map(e=>"object"==typeof e&&Object.hasOwn(e,"props")?e.props.children:e).filter(e=>e&&["string","number"].includes(typeof e)).join(" "):"":"").split("\n"),[n]);return e(Ic,{$color:r,$size:o,$weight:a,$align:s,$family:l,$opacity:c,$decoration:d,$transform:u,$nowrap:p,...h,children:g.length?g.map((n,r)=>t(Ut,{children:[Oc(n,m),r!==g.length-1?e("br",{}):null]},`text-${r}-${n}`)):n})},Fc=e=>{function t(){return void 0===e?{}:$n(e)}const[n,r]=jt(t()),[o,i]=jt({}),[a,s]=jt(t()),l=Gt((e,t)=>{const n={};if(!t||"object"!=typeof t)return e?{...e}:n;for(const[r,o]of Object.entries(e)){const e=r;if(Array.isArray(o)){const r=t[e];Array.isArray(r)&&o.length===r.length&&o.every((e,t)=>"object"==typeof e&&null!==e?0===Object.keys(l(e,r[t])).length:e===r[t])||(n[e]=t[e])}else if("object"==typeof o&&null!==o)if(null==t[e]||"object"!=typeof t[e])n[e]=t[e];else{const r=l(o,t[e]);Object.keys(r).length>0&&(n[e]=r)}else o!==t[e]&&(n[e]=t[e])}for(const r of Object.keys(t))r in e||(n[r]=t[r]);return n},[]),c=(e,t)=>0===Object.keys(l(e,t)).length,d=Xt(()=>!c(a,n),[a,n]);Wt(()=>{const o=t();void 0!==e&&"{}"===JSON.stringify(n)&&"{}"!==JSON.stringify(o)&&(r(o),s(o))},[e,n]);const u=Gt((e,t)=>wn("formData"===e?n:o,t.toString()),[n,o]);return{formData:n,formErrors:o,getFormDiff:l,areFormValuesEqual:c,isFormDirty:d,handleFormChange:(e,t,n)=>{if(e){const n=e.toString().split(".");1===n.length?r(n=>({...n,[e]:t})):r(e=>{const r=$n(e);let o=r;for(let e=0;e<n.length-1;e++){const t=n[e];o[t]&&"object"==typeof o[t]||(o[t]={}),o=o[t]}return o[n[n.length-1]]=t,r})}else n&&r({...n})},handleErrorChange:(e,t,n)=>{if(e){const n=e.toString().split(".");1===n.length?i(n=>({...n,[e]:t})):i(e=>{const r=$n(e);let o=r;for(let e=0;e<n.length-1;e++){const t=n[e];o[t]&&"object"==typeof o[t]||(o[t]={}),o=o[t]}return o[n[n.length-1]]=t,r})}else n&&i({...n})},resetFormData:e=>{const n=e||t();r(n),s(n),i({})},getNestedValue:u}},_c={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,urlTemplatizationRulesGroups:null}},Lc=()=>{const{addNotification:e}=tc(),{formData:t,formErrors:n,handleFormChange:r,handleErrorChange:o,resetFormData:i}=Fc(_c),a=e=>e&&Array.isArray(e)?e.map(e=>!e.fromSources?.length&&e.from?{...e,fromSources:[e.from]}:e):e;return{formData:t,formErrors:n,handleFormChange:r,resetFormData:i,validateForm:n=>{const r={};let i=!0;if(Object.entries(t).forEach(([e,t])=>{switch(e){case"type":case"signals":ni(t)&&(r[e]=Er.FIELD_IS_REQUIRED)}}),t.type===Dn.URLTemplatization){const e=t.fields?.urlTemplatizationRulesGroups;if(e)for(const t of e)if(t.templatizationRules?.some(e=>!e.template?.trim())){r.fields=Er.FIELD_IS_REQUIRED;break}}return i=!Object.values(r).length,!i&&n?.withAlert&&e({type:Gn.Warning,title:n.alertTitle,message:Er.REQUIRED_FIELDS,hideFromHistory:!0}),o(void 0,void 0,r),i},loadFormWithDrawerItem:({type:e,signals:t,name:n,notes:o,disabled:i,fields:s})=>{const l={...$n(_c),type:e,signals:t,name:n,notes:o,disabled:i};Object.entries(s).forEach(([e,t])=>{if(t)switch(e){case Tn.LabelsAttributes:case Tn.AnnotationsAttributes:l.fields||(l.fields={}),l.fields[e]=a(t);break;case Tn.CollectContainerAttributes:case Tn.CollectReplicaSetAttributes:case Tn.CollectWorkloadId:case Tn.CollectClusterId:case Tn.ClusterAttributes:case Tn.OverwriteExistingValues:case Tn.AttributeNamesToDelete:case Tn.Renames:case Tn.PiiCategories:case Tn.FallbackSamplingRatio:case Tn.SamplingPercentage:case Tn.EndpointsFilters:case Tn.ServicesNameFilters:case Tn.AttributeFilters:case Tn.UrlTemplatizationRulesGroups:l.fields||(l.fields={}),l.fields[e]=t}}),r(void 0,void 0,l)}}},Mc=e=>{Wt(()=>{if(e){const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])},zc=()=>{const{setCurrentModal:e}=ec(),{setDrawerType:t,setDrawerEntityId:n}=ql(),{setActiveNodeType:r,setActiveNodeId:o,activeNodeId:i}=Ci();return{onClickNode:(a,s)=>{const{id:l,type:c,data:{id:d,type:u}}=s;switch(i===l?(r(null),o(null)):(r(c),o(l)),u){case jn.Source:case jn.Destination:case jn.Action:case jn.InstrumentationRule:t(u),n(d);break;case Zn.AddSource:e(jn.Source);break;case Zn.AddDestination:e(jn.Destination);break;case Zn.AddAction:e(jn.Action);break;case Zn.AddRule:e(jn.InstrumentationRule)}}}},Bc=()=>{const{setDrawerType:e,setDrawerEntityId:t}=ql(),{markAsDismissed:n,markAsSeen:r}=tc();return{onClickNotification:(o,i)=>{const{id:a,crdType:s,target:l}=o,{dismissToast:c}=i||{};if(s&&l)switch(s){case jn.InstrumentationRule:e(jn.InstrumentationRule),t(Gr(l,jn.InstrumentationRule));break;case jn.Source:case"InstrumentationConfig":case"InstrumentationInstance":e(jn.Source),t(Gr(l,jn.Source));break;case jn.Action:e(jn.Action),t(Gr(l,jn.Action));break;case jn.Destination:case"Destination":e(jn.Destination),t(Gr(l,jn.Destination))}r(a),c&&n(a)}}},Uc=()=>{const e=Ht(null),[t,n]=jt(0),[r,o]=jt(0);return Wt(()=>{const t=()=>{if(e.current){const{width:t,height:r}=e.current.getBoundingClientRect();n(t),o(r)}};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),{containerRef:e,containerWidth:t,containerHeight:r}};var jc;!function(e){e[e.XS=16]="XS",e[e.S=18]="S",e[e.M=24]="M",e[e.L=32]="L"}(jc||(jc={}));const Wc=r.div`
371
+ width: ${({$size:e})=>1.5*e}px;
372
+ height: ${({$size:e})=>1.5*e}px;
373
+ display: flex;
374
+ align-items: center;
375
+ justify-content: center;
376
+ border-radius: 100%;
377
+ cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
378
+ &:hover {
379
+ background: ${({theme:e})=>e.v2.colors.silver[900]};
380
+ }
381
+ `,Hc=({"data-id":t,icon:n,size:r=jc.S,onClick:o,disabled:i})=>e(Wc,{"data-id":t,$size:r,$disabled:i,onClick:e=>{o&&!i&&(e.stopPropagation(),o(e))},children:e(n,{size:r})}),Xc=({onDone:t}={})=>{const[n,r]=jt(!1),[o,i]=jt(-1),a=Gt(async(e,o)=>{if(!n){if(r(!0),void 0!==o&&i(o),navigator?.clipboard&&navigator.clipboard.writeText)try{await navigator.clipboard.writeText(e)}catch(e){}else{const t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select();try{document.execCommand("copy")}catch(e){}document.body.removeChild(t)}t?.(),setTimeout(()=>{r(!1),i(-1)},1e3)}},[n,t]);return{CopyButton:Gt(({value:t,size:r})=>e(Hc,{icon:n?yt:bt,size:r,onClick:()=>a(t)}),[n]),isCopied:n,copiedIndex:o,clickCopy:a}},Gc=e=>{const{addNotification:t}=tc(),{formData:n,handleFormChange:r,formErrors:o,handleErrorChange:i,resetFormData:a}=Fc(e);return{formData:n,formErrors:o,handleFormChange:r,resetFormData:a,validateForm:e=>{const r={};let o=!0;return n.name?ri(n.name)?r.name=void 0:(o=!1,r.name=Er.ILLEGAL_K8S_LABEL):(o=!1,r.name=Er.FIELD_IS_REQUIRED),!o&&e?.withAlert&&t({type:Gn.Warning,title:e.alertTitle,message:Er.REQUIRED_FIELDS,hideFromHistory:!0}),i(void 0,void 0,r),o},loadFormWithDrawerItem:({name:t})=>{const n={...$n(e),name:t};r(void 0,void 0,n)}}},Kc={type:"",name:"",exportedSignals:{logs:!1,metrics:!1,traces:!1,profiles:!1},fields:[],disabled:!1},Vc=e=>{const{supportedSignals:t,preLoadedFields:n}=e||{},{addNotification:r}=tc(),{formData:o,formErrors:i,handleFormChange:a,handleErrorChange:s,resetFormData:l}=Fc(Kc),[c,d]=jt([]),[u,p]=jt([]);Wt(()=>{var e;p(c?(e=c,e.filter(e=>!!e).map(e=>{const{name:t,componentType:n,componentProperties:r,displayName:o,initialValue:i,renderCondition:a}=e;if(n===Hn.Dropdown){const e=Zo(r,{}),s=Array.isArray(e.values)?e.values.map(e=>({id:e,value:e})):Object.entries(e.values).map(([e,t])=>({id:e,value:t}));return{name:t,componentType:n,title:o,value:i,placeholder:e.placeholder||"Select an option",options:s,renderCondition:a,...e}}return{name:t,componentType:n,title:o,value:i,renderCondition:a,...Zo(r,{})}})).map(e=>{if(n){const t="string"==typeof n?Zo(n,{}):n;if(e.name in t)return{...e,value:t[e.name]}}return e}):[])},[c,n]),Wt(()=>{if(u){const e=u.map(e=>({key:e.name,value:e.value}));a("fields",e)}},[u]),Wt(()=>{if(t&&0===pi(o.exportedSignals).length){const{logs:e,metrics:n,traces:r}=t;a("exportedSignals",{logs:e.supported,metrics:n.supported,traces:r.supported})}},[t,o.exportedSignals]);return{formData:o,formErrors:i,handleFormChange:a,resetFormData:l,validateForm:e=>{const t={};let n=!0;return u.forEach(({name:e,value:r,required:o})=>{o&&!r&&(n=!1,t[e]=Er.FIELD_IS_REQUIRED)}),!n&&e?.withAlert&&r({type:Gn.Warning,title:e.alertTitle,message:Er.REQUIRED_FIELDS,hideFromHistory:!0}),s(void 0,void 0,t),n},loadFormWithDrawerItem:({destinationType:{type:e},name:t,disabled:n,exportedSignals:r,fields:o})=>{const i={...$n(Kc),type:e,name:t,disabled:n,exportedSignals:r,fields:Object.entries(Zo(o,{})).map(([e,t])=>({key:e,value:t}))};return a(void 0,void 0,i),i},yamlFields:c,setYamlFields:d,dynamicFields:u,setDynamicFields:p}},Jc={ruleName:"",notes:"",disabled:!1,workloads:null,instrumentationLibraries:null,payloadCollection:{[lr.HttpRequest]:null,[lr.HttpResponse]:null,[lr.DbQuery]:null,[lr.Messaging]:null},codeAttributes:{[ir.Column]:null,[ir.FilePath]:null,[ir.Function]:null,[ir.LineNumber]:null,[ir.Namespace]:null,[ir.StackTrace]:null},headersCollection:null,customInstrumentations:{[sr.Java]:null,[sr.Golang]:null}},qc=()=>{const{formData:e,formErrors:t,handleFormChange:n,handleErrorChange:r,resetFormData:o}=Fc(Jc);return{formData:e,formErrors:t,handleFormChange:n,resetFormData:o,validateForm:()=>(r(void 0,void 0,{}),!0),loadFormWithDrawerItem:({ruleName:e,notes:t,disabled:r,payloadCollection:o,codeAttributes:i,headersCollection:a,customInstrumentations:s})=>{const l={...$n(Jc),ruleName:e,notes:t,disabled:r};o&&(l.payloadCollection={[lr.HttpRequest]:o[lr.HttpRequest]?{}:null,[lr.HttpResponse]:o[lr.HttpResponse]?{}:null,[lr.DbQuery]:o[lr.DbQuery]?{}:null,[lr.Messaging]:o[lr.Messaging]?{}:null}),i&&(l.codeAttributes={[ir.Column]:i[ir.Column]||null,[ir.FilePath]:i[ir.FilePath]||null,[ir.Function]:i[ir.Function]||null,[ir.LineNumber]:i[ir.LineNumber]||null,[ir.Namespace]:i[ir.Namespace]||null,[ir.StackTrace]:i[ir.StackTrace]||null}),a&&(l.headersCollection=a),s&&(l.customInstrumentations={[sr.Java]:s[sr.Java]||null,[sr.Golang]:s[sr.Golang]||null}),n(void 0,void 0,l)}}},Yc=({active:e,key:t,withAltKey:n,withCtrlKey:r,withShiftKey:o,withMetaKey:i},a)=>(Wt(()=>{const s=s=>{e&&t===s.key&&(!n||n&&s.altKey)&&(!r||r&&s.ctrlKey)&&(!o||o&&s.shiftKey)&&(!i||i&&s.metaKey)&&(s.preventDefault(),s.stopPropagation(),a(s))};return window.addEventListener("keydown",s),()=>{window.removeEventListener("keydown",s)}},[t,e,n,r,o,i,a]),null),Qc="data-ignore-outside-click",Zc=(e,t)=>{const n=Ht(t);n.current=t,Wt(()=>{const t=t=>{const r=t.target;e.current&&!e.current.contains(r)&&((e=>{let t=e;for(;t;){if(t instanceof Element&&t.hasAttribute(Qc))return!0;t=t.parentNode}return!1})(r)||n.current())};return document.addEventListener("mousedown",t),document.addEventListener("touchstart",t),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("touchstart",t)}},[e])},ed=({sectionNames:e,threshold:t=.4})=>{const[n,r]=jt(e[0]||""),[o,i]=jt(null),a=Ht({}),s=Ht(!1),l=Ht(!1),c=Gt((e,t)=>{a.current[e]=t},[]),d=Gt(e=>{i(e)},[]),u=Gt(e=>{l.current=!0,r(e)},[]);return Wt(()=>{if(!l.current)return;l.current=!1;const e=a.current[n];if(!e)return;s.current=!0,e.scrollIntoView({behavior:"smooth",block:"start"});const t=setTimeout(()=>{s.current=!1},600);return()=>clearTimeout(t)},[n]),Wt(()=>{const n=a.current,i=e.map(e=>n[e]).filter(Boolean);if(!i.length)return;const l=new IntersectionObserver(e=>{if(!s.current)for(const t of e)if(t.isIntersecting){const e=t.target.getAttribute("data-section-name");e&&r(e);break}},{threshold:t,root:o});return i.forEach(e=>l.observe(e)),()=>l.disconnect()},[e,t,o]),{selectedSection:n,setSelectedSection:u,setSectionRef:c,setScrollContainerRef:d}},td=({defaultClientHeight:e=0,defaultClientwidth:t=0,onClickOutside:n,positionMode:r="local"}={})=>{const o=Ht(null),[i,a]=jt(!1),[s,l]=jt({top:0,left:0}),[c,d]=jt({edge:"top",align:"left"});Zc(o,()=>{i&&(a(!1),n?.())});return{popupRef:o,popupOpen:i,setPopupOpen:a,popupPosition:s,arrowPlacement:c,handlePosition:(n,i)=>{if("local"===r)return void l({top:i,left:n});const{innerWidth:a,innerHeight:s}=window,c=o.current?.clientWidth||t,u=o.current?.clientHeight||e,p=n/a,h=p<1/3?"left":p>2/3?"right":"center";d({edge:i<s/2?"top":"bottom",align:h});let m=i,g=n;if(m>=s/2&&(m+=-u),"center"===h){g=n-c/2;const e=8;g=Math.max(e,Math.min(g,a-c-e))}else g>=a/2&&(g=n-c);l({top:m,left:g})}}},nd=()=>({getItemSS:(e,t)=>{const n=sessionStorage.getItem(e);return n?Zo(n,t):t},setItemSS:(e,t)=>{sessionStorage.setItem(e,JSON.stringify(t))},removeItemSS:e=>{sessionStorage.removeItem(e)}}),rd={otelServiceName:"",currentStreamName:""},od=()=>{const{formData:e,formErrors:t,handleFormChange:n,handleErrorChange:r,resetFormData:o}=Fc(rd);return{formData:e,formErrors:t,handleFormChange:n,resetFormData:o,validateForm:()=>(r(void 0,void 0,{}),!0),loadFormWithDrawerItem:({otelServiceName:e,name:t})=>{const r={...$n(rd),otelServiceName:e||t||""};n(void 0,void 0,r)}}},id=Vt({platformType:Mn.K8s,tier:Ln.Community,version:"v0.0.0"}),ad=({children:t,platformType:n,tier:r,version:o})=>{const i=Xt(()=>({platformType:n,tier:r,version:o}),[n,r,o]);return e(id.Provider,{value:i,children:t})},sd=(e,t)=>!t||Si(e)>=Si(t),ld=e=>{const t=Kt(id),n=sd(t.version,e),r=t.platformType===Mn.Vm;return{...t,isVersionSupported:n,isVm:r,isEnterprise:t.tier===Ln.Onprem}},cd=new Set([tr.StaticPod]),dd=e=>{const t=e.workloads.filter(({selected:e})=>e).length,n=e.workloads.length;return{selectedCount:t,isAllSourced:t>0&&t===n,isSomeSourced:t>0&&t<n,isFutureApps:e.selected||!1}},ud=(e,t,n)=>{if(t&&!e.name.toLowerCase().includes(t.toLowerCase()))return!1;if(n.showOnlySelected){const{isAllSourced:t,isSomeSourced:n,isFutureApps:r}=dd(e);return t||n||r}return!0},pd=(e,t,n)=>!(t&&!e.name.toLowerCase().includes(t.toLowerCase()))&&(!n.showOnlySelected||e.selected),hd=(e,t,n)=>{const r=!!e.dataStreamNames?.length||!!e.currentStreamName?.length,o=r&&e.dataStreamNames?.includes(t)||e.currentStreamName===t,i=e.selected&&(!r||o)||!1;return{namespace:e.namespace,name:e.name,kind:e.kind,selected:i,numberOfInstances:e.numberOfInstances}},md=(e,t,n)=>({...hd(e,t),currentStreamName:t}),gd=(e,t,n)=>{const r="boolean"==typeof n,o=e.dataStreamNames?.includes(t),i=(r?n:e.selected)||!1;return{namespace:e.name,selected:!(!o&&!r)&&i,currentStreamName:t}},fd=e=>{const{fetchNamespacesWithWorkloads:t}=e,{tier:n}=ld(),r=e=>n!==Ln.Onprem&&cd.has(e),{selectedStreamName:o}=Jl(),{namespaces:i,addEntities:a}=Yl(),[s,l]=jt(!1),[c,d]=jt({}),[u,p]=jt(!1),[h,m]=jt(""),[g,f]=jt({}),[y,b]=jt({}),[v,x]=jt(""),[$,w]=jt(jn.Source),[S,C]=jt(!1),[E,k]=jt(!1),A=Xt(()=>{const e=(e,t)=>!v||$!==t||$===t&&e.toLowerCase().includes(v),t={};return Object.entries(y).filter(([t])=>e(t,jn.Namespace)).forEach(([n,r])=>{const o=r.filter(t=>{return e(t.name,jn.Source)&&(n=t,!S||n.selected)&&(e=>!E||(e.numberOfInstances||0)>0)(t);var n});(!v||v&&($===jn.Namespace||$===jn.Source&&o.length))&&(t[n]=o)}),t},[y,v,$,S,E]);return Wt(()=>{(async()=>{l(!0);const e=await t();l(!1);const n=e.data;if(!n?.length)return;const r=[...n].sort((e,t)=>e.name.localeCompare(t.name)),i={},s={},c={};for(const e of r){const t=[...e.sources||[]].sort((e,t)=>e.name.localeCompare(t.name));i[e.name]=t.map(e=>hd(e,o)),s[e.name]=t.map(e=>md(e,o)),c[e.name]=gd(e,o)}a(jn.Namespace,n.map(({sources:e,...t})=>t));const{configuredSources:u,configuredFutureApps:p}=cc.getState();Object.entries(u).forEach(([e,t])=>{s[e]&&t.forEach(t=>{const n=s[e].findIndex(e=>e.name===t.name&&e.kind===t.kind);-1!==n&&(s[e][n]={...s[e][n],selected:t.selected,currentStreamName:t.currentStreamName})})}),Object.entries(p).forEach(([e,t])=>{c[e]&&(c[e]=t)}),d(i),b(s),f(c)})()},[o]),{loading:s,availableSources:c,filteredNamespacesAndSources:A,getApiSourcesPayload:()=>{const e={};return Object.entries(y).forEach(([t,n])=>{n.forEach(n=>{const r=c[t]?.find(e=>e.name===n.name&&e.kind===n.kind);r?.selected!==n.selected&&(e[t]||(e[t]=[]),e[t].push(n))})}),e},getApiFutureAppsPayload:()=>{const e={};return Object.entries(g).forEach(([t,n])=>{const r=i?.find(e=>e.name===t);(n.selected&&!r?.dataStreamNames?.includes(o)||!n.selected&&r?.dataStreamNames?.includes(o))&&(e[t]=n)}),e},selectedNamespace:h,onSelectNamespace:(e,t)=>{if(i.find(t=>t.name===e)){const n="boolean"==typeof t;m(t=>t!==e||n?e:""),n&&(b(n=>({...n,[e]:(n[e]||[]).map(e=>t&&r(e.kind)?e:{...e,selected:t,currentStreamName:o})})),p(!1))}},selectedAllNamespaces:u,onSelectAllNamespaces:e=>{p(e),b(t=>{const n={};for(const[i,a]of Object.entries(t))n[i]=a.map(t=>e&&r(t.kind)?t:{...t,selected:e,currentStreamName:o});return n})},selectedSources:y,onSelectSource:(e,t)=>{const n=t||h;if(!n)return;if(r(e.kind))return;const i=[...y[n]||[]],a=i.findIndex(({name:t,kind:n})=>t===e.name&&n===e.kind);if(-1!==a){const e={...i[a],selected:!i[a].selected,currentStreamName:o};i[a]=e}else i.push({...e,selected:!0,currentStreamName:o});b(e=>({...e,[n]:i})),p(!1)},selectedFutureApps:g,onSelectFutureApps:(e,t)=>{const n=t||h;if(!n)return;const r=i.find(e=>e.name===t);r&&f(t=>({...t,[n]:gd(r,o,e)}))},searchText:v,setSearchText:x,searchBy:$,setSearchBy:w,showSelectedOnly:S,setShowSelectedOnly:C,showRunningOnly:E,setShowRunningOnly:k}};try{Qt.addDefaultLocale(nn)}catch(e){}const yd=()=>{const e=Ht(new Qt(nn.locale));return{formatTimeAgo:Gt(t=>{try{return"string"==typeof t&&(t=t.replace("t","T").replace("z","Z")),e.current.format(new Date(t))}catch(e){return"-"}},[])}},bd=r.div`
382
+ position: fixed;
383
+ top: 50%;
384
+ left: 50%;
385
+ transform: translate(-50%, -50%);
386
+ z-index: 1000;
387
+ width: fit-content;
388
+ background: ${({theme:e})=>e.colors.translucent_bg};
389
+ border: ${({theme:e})=>`1px solid ${e.colors.border}`};
390
+ border-radius: 40px;
391
+ box-shadow: ${({theme:e})=>{const t=e.colors.primary+fc["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}`}};
392
+ animation-name: ${bc.in.center};
393
+ `,vd=r.div`
394
+ display: flex;
395
+ justify-content: space-between;
396
+ align-items: center;
397
+ height: 80px;
398
+ border-bottom: 1px solid ${({theme:e})=>e.colors.border};
399
+ padding: 0 24px;
400
+ `,xd=r.div`
401
+ cursor: pointer;
402
+ display: flex;
403
+ align-items: center;
404
+ gap: 8px;
405
+ `,$d=r.div`
406
+ display: flex;
407
+ align-items: center;
408
+ gap: 8px;
409
+ `,wd=r(Fo)`
410
+ min-width: 350px;
411
+ min-height: 150px;
412
+ `,Sd=r.div`
413
+ position: absolute;
414
+ left: 50%;
415
+ transform: translateX(-50%);
416
+ display: flex;
417
+ align-items: center;
418
+ justify-content: center;
419
+ width: 100%;
420
+ pointer-events: none;
421
+ `,Cd=r(Pc)`
422
+ text-transform: uppercase;
423
+ font-family: ${({theme:e})=>e.font_family.secondary};
424
+ pointer-events: auto;
425
+ `,Ed=r(Pc)`
426
+ text-transform: uppercase;
427
+ font-weight: 500;
428
+ font-size: 14px;
429
+ font-family: ${({theme:e})=>e.font_family.secondary};
430
+ text-decoration: underline;
431
+ cursor: pointer;
432
+ `,kd=({isOpen:r,noOverlay:o,header:i,actionComponent:a,onClose:s,children:l,closeOnEscape:c=!0})=>(Yc({key:"Escape",active:r&&c},()=>s()),Mc(r),r?un.createPortal(t(n,{children:[e(Lo,{hidden:!r,onClick:s,style:{opacity:o?0:1}}),t(bd,{"data-id":"modal"+(i?`-${i.title.replaceAll(" ","-")}`:""),children:[i&&t(vd,{children:[t(xd,{onClick:s,children:[e(vt,{}),e(Ed,{children:"Cancel"})]}),e(Sd,{children:e(Cd,{children:i.title})}),e($d,{children:a})]}),e(wd,{children:l})]})]}),document.body):null),Ad=r.div`
433
+ width: ${({$orientation:e,$thickness:t,$length:n})=>"vertical"===e?`${t}px`:n||"100%"};
434
+ height: ${({$orientation:e,$thickness:t,$length:n})=>"horizontal"===e?`${t}px`:n||"100%"};
435
+ margin: ${({$orientation:e,$margin:t})=>t||("horizontal"===e?"8px 0":"0 8px")};
436
+ background-color: ${({$type:e,theme:t})=>(e?t.text[e]:t.colors.border)+fc["050"]};
437
+ opacity: ${({$opacity:e})=>e||1};
438
+ `,Dd=({orientation:t="horizontal",type:n,thickness:r=1,length:o,margin:i,opacity:a})=>e(Ad,{$orientation:t,$type:n,$thickness:r,$length:o,$margin:i,$opacity:a}),Td=r.div`
439
+ /* Portal: viewport coords (usePopup positionMode viewport). Non-portal: offset-parent coords, absolute. */
440
+ position: ${({$asPortal:e})=>e?"fixed":"absolute"};
441
+ ${({$top:e})=>void 0!==e&&`top: ${e}px;`}
442
+ ${({$bottom:e})=>void 0!==e&&`bottom: ${e}px;`}
443
+ ${({$left:e})=>void 0!==e&&`left: ${e}px;`}
444
+ ${({$right:e})=>void 0!==e&&`right: ${e}px;`}
445
+ z-index: 9999;
446
+
447
+ background-color: ${({theme:e})=>e.colors.info};
448
+ border: 1px solid ${({theme:e})=>e.colors.border};
449
+ border-radius: ${({$borderRadius:e})=>void 0!==e?e:"24px"};
450
+ max-width: ${({$maxWidth:e})=>void 0!==e?e:"unset"};
451
+ width: ${({$width:e})=>void 0!==e?e:"unset"};
452
+
453
+ ${({$asPortal:e,$withPointerEvents:t})=>e&&!t&&"pointer-events: none;"}
454
+ `,Id=r.div`
455
+ padding: ${({$padding:e})=>void 0!==e?e:"12px"};
456
+ border-bottom: 1px solid ${({theme:e})=>e.colors.border};
457
+ `,Nd=r.div`
458
+ padding: ${({$padding:e})=>void 0!==e?e:"12px"};
459
+ `,Rd=r.div`
460
+ padding: ${({$padding:e})=>void 0!==e?e:"12px"};
461
+ border-top: 1px solid ${({theme:e})=>e.colors.border};
462
+ `,Od=Bt(({isOpen:n,asPortal:r,...o},i)=>{const a=Xt(()=>{const{children:n,top:a,bottom:s,left:l,right:c,borderRadius:d,padding:u,maxWidth:p,width:h,header:m,footer:g,withPointerEvents:f,...y}=o;return t(Td,{ref:i,$top:a,$bottom:s,$left:l,$right:c,$borderRadius:d,$padding:u,$maxWidth:p,$width:h,$asPortal:r,$withPointerEvents:f,...y,children:[m&&e(Id,{$padding:u,children:m}),e(Nd,{$padding:u,children:n}),g&&e(Rd,{$padding:u,children:g})]})},[i,o,r]);return n?r?un.createPortal(a,document.body):a:null});Od.displayName=Od.name;const Pd=r.div`
463
+ width: ${({$fullWidth:e})=>e?"100%":"fit-content"};
464
+ position: relative;
465
+ display: flex;
466
+ align-items: center;
467
+ gap: 4px;
468
+
469
+ /* Only signal "this is hoverable" when there's actually a tooltip to show. Important for callers (e.g. truncation-aware wrappers) that always mount the Tooltip with "keepAlive" and toggle "text" based on overflow — we don't want every wrapped element to show a help cursor when no tooltip would actually appear. */
470
+ cursor: ${({$hasText:e})=>e?"help":"inherit"};
471
+ ${({$ellipsis:e})=>e&&o`
472
+ overflow: hidden;
473
+ text-overflow: ellipsis;
474
+ white-space: nowrap;
475
+ `}
476
+ `,Fd=r.div`
477
+ display: flex;
478
+ flex-direction: column;
479
+ align-items: flex-start;
480
+ gap: 8px;
481
+ width: 100%;
482
+ `,_d=r.div`
483
+ display: flex;
484
+ width: 100%;
485
+ flex-shrink: 0;
486
+ box-sizing: border-box;
487
+ line-height: 0;
488
+
489
+ ${({$align:e})=>"left"===e&&"\n justify-content: flex-start;\n padding-left: 20px;\n padding-right: 10px;\n "}
490
+ ${({$align:e})=>"right"===e&&"\n justify-content: flex-end;\n padding-left: 10px;\n padding-right: 20px;\n "}
491
+ ${({$align:e})=>"center"===e&&"\n justify-content: center;\n align-items: center;\n min-height: 8px;\n "}
492
+ `,Ld=r.div`
493
+ width: 0;
494
+ height: 0;
495
+ border-style: solid;
496
+ border-left: 6.5px solid transparent;
497
+ border-right: 6.5px solid transparent;
498
+ flex-shrink: 0;
499
+
500
+ ${({$pointsUp:e,theme:t})=>e?`\n border-bottom: 8px solid ${t.v2.colors.black[500]};\n border-top-width: 0;\n `:`\n border-top: 8px solid ${t.v2.colors.black[500]};\n border-bottom-width: 0;\n `}
501
+ `,Md=r.div`
502
+ display: flex;
503
+ flex-direction: column;
504
+ align-items: stretch;
505
+ min-width: 0;
506
+ `,zd=r.div`
507
+ background-color: ${({theme:e})=>e.v2.colors.black[500]};
508
+ border-radius: 4px;
509
+ padding: 8px;
510
+ box-sizing: border-box;
511
+ min-width: 0;
512
+ `,Bd=({withIcon:r,titleIcon:o,title:a,text:s,timestamp:l,children:c,fullWidth:d=!1,keepAlive:u=!1,ellipsis:p=!1})=>{const h=i(),{popupRef:m,popupOpen:g,setPopupOpen:f,popupPosition:y,arrowPlacement:b,handlePosition:v}=td({positionMode:"viewport",defaultClientHeight:48,defaultClientwidth:Math.min(7.5*(s?.length||0),300)}),x=Xt(()=>!!Nc(s||"")?.length,[s]),$=e=>{const{type:t,clientX:n,clientY:r}=e;x?v(y.left||n,y.top||r):v(n,r),f("mouseleave"!==t)};return s||u?t(Pd,{$fullWidth:d,$ellipsis:p,$hasText:!!s,onMouseEnter:$,onMouseMove:$,onMouseLeave:$,children:[c,r&&e(Qe,{fill:h.v2.colors.white[500]}),e(Od,{ref:m,isOpen:g&&!!s,top:y.top,left:y.left,asPortal:!0,withPointerEvents:x,onMouseEnter:x?$:void 0,style:{backgroundColor:"transparent",border:"none"},maxWidth:"270px",borderRadius:"0",padding:"0",children:t(Md,{children:["top"===b.edge&&e(_d,{$align:b.align,children:e(Ld,{$pointsUp:!0})}),e(zd,{children:t(Fd,{children:[(!!o||!!a)&&t(Oo,{$gap:4,style:{alignItems:"center"},children:[o&&e(o,{size:16},"icon"),a&&e(uo,{size:io.XS,children:a},"title")]}),!!s&&e(uo,{size:io.XXXS,children:s}),!!l&&e(uo,{size:io.XXXS,color:ao.Secondary,children:new Date(l).toLocaleString()})]})}),"bottom"===b.edge&&e(_d,{$align:b.align,children:e(Ld,{$pointsUp:!1})})]})})]}):e(n,{children:c})},Ud=r.button`
513
+ position: relative;
514
+ width: ${({$size:e})=>e}px;
515
+ height: ${({$size:e})=>e}px;
516
+ border: ${({theme:e,$withBorder:t})=>t?`1px solid ${e.colors.border}`:"none"};
517
+ border-radius: 100%;
518
+ background-color: ${({$backgroundColor:e})=>e||"transparent"};
519
+ display: flex;
520
+ align-items: center;
521
+ justify-content: center;
522
+ cursor: pointer;
523
+ &:hover {
524
+ background-color: ${({theme:e,$backgroundColor:t})=>t?t+fc["070"]:e.colors.dropdown_bg_2};
525
+ }
526
+ `,jd=r.div`
527
+ position: absolute;
528
+ top: ${({$size:e})=>e/5}px;
529
+ right: ${({$size:e})=>e/5}px;
530
+ width: 6px;
531
+ height: 6px;
532
+ border-radius: 100%;
533
+ background-color: ${({theme:e,$color:t})=>t||e.colors.secondary};
534
+
535
+ &::after {
536
+ content: '';
537
+ position: absolute;
538
+ inset: 0;
539
+ border-radius: 100%;
540
+ background-color: ${({theme:e,$color:t})=>t||e.colors.secondary};
541
+ animation: ${xc} 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
542
+ }
543
+ `,Wd=({children:n,onClick:r,tooltip:o,size:i=36,withPing:a,pingColor:s,withBorder:l,backgroundColor:c,...d})=>e(Bd,{text:o,children:t(Ud,{$size:i,$withBorder:l,$backgroundColor:c,onClick:r,...d,children:[a&&e(jd,{$size:i,$color:s}),n]})}),Hd=r.div`
544
+ position: relative;
545
+ &.animated {
546
+ overflow: hidden;
547
+ padding-bottom: 1px;
548
+ border-radius: 32px;
549
+ animation: ${({$isLeaving:e})=>e?bc.out.bottom:bc.in.bottom} ${({$duration:e})=>e/10}ms forwards;
550
+ }
551
+ `,Xd=r.div`
552
+ position: absolute;
553
+ bottom: -1px;
554
+ left: 0;
555
+ z-index: -1;
556
+ width: 100%;
557
+ height: 100%;
558
+ border-radius: 32px;
559
+ background-color: ${({$type:e,theme:t})=>t.text[e]};
560
+ animation: ${vc.out} ${({$duration:e})=>""+(e-e/10)}ms forwards;
561
+ `,Gd=r.div`
562
+ display: flex;
563
+ align-items: center;
564
+ flex: 1;
565
+ gap: 8px;
566
+ padding: 0 12px;
567
+ border-radius: 32px;
568
+ background-color: ${({$type:e,theme:t})=>t.colors[e]};
569
+ `,Kd=r.div`
570
+ display: flex;
571
+ align-items: center;
572
+ margin: 0 auto 0 0;
573
+ padding: 8px 0;
574
+ max-width: ${({$withAction:e,$overrideMaxWidth:t})=>t||(e?"400px":"500px")};
575
+ min-height: 12px;
576
+ `,Vd=r(Pc)`
577
+ font-size: 14px;
578
+ color: ${({$type:e,theme:t})=>t.text[e]};
579
+ `,Jd=r(Pc)`
580
+ color: ${({$type:e,theme:t})=>t.text[e]};
581
+ font-size: 12px;
582
+ `,qd=r(Oo)``,Yd=r(Pc)`
583
+ text-transform: uppercase;
584
+ text-decoration: underline;
585
+ font-size: 12px;
586
+ font-family: ${({theme:e})=>e.font_family.secondary};
587
+ white-space: nowrap;
588
+ cursor: pointer;
589
+ &:hover {
590
+ transform: scale(1.1);
591
+ transition: transform 0.3s;
592
+ }
593
+ `,Qd=({type:n,icon:r,title:o,message:a,action:s,onClose:l,duration:c=5e3,overrideMaxWidth:d,style:u})=>{const p=i(),[h,m]=jt(!1),g=Ht(null),f=Ht(null),y=e=>{l&&(m(!0),l({asSeen:e?.asSeen}))};Wt(()=>(g.current=setTimeout(()=>y({asSeen:!1}),c),()=>{g.current&&clearTimeout(g.current)}),[c]);const b=r||Go(n,p);return t(Hd,{className:l?"animated":"",$duration:c,$isLeaving:h,onMouseEnter:()=>{g.current&&clearTimeout(g.current),f.current&&(f.current.style.animationPlayState="paused")},onMouseLeave:()=>{if(f.current){const e=f.current.offsetWidth/f.current.parentElement.offsetWidth*c;g.current=setTimeout(()=>y({asSeen:!1}),e),f.current.style.animationPlayState="running"}},children:[t(Gd,{"data-id":"toast",$type:n,style:u,children:[e(b,{fill:p.text[n]}),t(Kd,{$withAction:!!s,$overrideMaxWidth:d,children:[o&&e(Vd,{$type:n,children:o}),o&&a&&e(Dd,{orientation:"vertical",type:n}),a&&e(Jd,{$type:n,children:a})]}),(!!s||!!l)&&t(qd,{children:[s&&e(Yd,{"data-id":"toast-action",onClick:s.onClick,children:s.label}),l&&e(Wd,{"data-id":"toast-close",onClick:()=>y({asSeen:!0}),children:e(vt,{size:12})})]})]}),l&&e(Xd,{ref:f,$duration:c,$type:n})]})},Zd=r.div`
594
+ padding: 24px 32px;
595
+ `,eu=r.div`
596
+ padding: ${({$withNote:e})=>e?"12px 0px":"12px 0px 32px 0"};
597
+ `,tu=r(Pc)`
598
+ font-size: 20px;
599
+ line-height: 28px;
600
+ `,nu=r(Pc)`
601
+ color: ${({theme:e})=>e.text.grey};
602
+ width: 416px;
603
+ font-style: normal;
604
+ font-weight: 300;
605
+ line-height: 24px;
606
+ `,ru=r.div`
607
+ display: flex;
608
+ justify-content: space-between;
609
+ gap: 12px;
610
+ `,ou=r(Tc)`
611
+ width: 250px;
612
+ `,iu=r.div`
613
+ margin-bottom: 12px;
614
+ `,au=({isOpen:n,noOverlay:r,title:o="",description:i="",note:a,approveButton:s,denyButton:l,closeOnEscape:c=!0})=>{Yc({key:"Enter",active:n&&c},()=>s.onClick());const d=()=>l.onClick();return e(kd,{isOpen:n,noOverlay:r,onClose:d,children:t(Zd,{children:[e(tu,{children:o}),e(eu,{$withNote:!!a,children:e(nu,{children:i})}),!!a&&e(iu,{children:e(Qd,{type:a.type,title:a.title,message:a.message})}),t(ru,{children:[e(ou,{"data-id":"approve",variant:s.variant||"primary",onClick:()=>s.onClick(),children:s.text}),e(ou,{"data-id":"deny",variant:l.variant||"secondary",onClick:d,children:l.text})]})]})})},su=({isOpen:t,noOverlay:n,name:r,onApprove:o,onDeny:i})=>e(au,{isOpen:t,noOverlay:n,title:"Cancel"+(r?` ${r}`:""),description:"Are you sure you want to cancel?",approveButton:{text:"Confirm",variant:Gn.Warning,onClick:o},denyButton:{text:"Go Back",onClick:i}}),lu=r.div`
615
+ padding: 4px 0 0 0;
616
+ `,cu=r(Pc)`
617
+ font-size: 12px;
618
+ color: ${({theme:e})=>e.text.error};
619
+ `,du=({children:t})=>e(lu,{children:e(cu,{children:t})}),uu=r.div`
620
+ display: flex;
621
+ align-items: center;
622
+ gap: 8px;
623
+ cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
624
+ opacity: ${({$disabled:e})=>e?.6:1};
625
+ `,pu=r.div`
626
+ width: 18px;
627
+ height: 18px;
628
+ border-radius: 6px;
629
+ border: 1px dashed ${({$isChecked:e,$isPartiallyChecked:t,theme:n})=>e||t?"transparent":n.colors.secondary};
630
+ display: flex;
631
+ align-items: center;
632
+ justify-content: center;
633
+ background-color: ${({$isChecked:e,$isPartiallyChecked:t,theme:n})=>e?n.colors.majestic_blue:t?n.colors.majestic_blue_soft:n.colors.secondary+fc["020"]};
634
+ pointer-events: ${({$disabled:e})=>e?"none":"auto"};
635
+ transition: border 0.3s;
636
+ &:hover {
637
+ border: 1px solid ${({theme:e})=>e.colors.secondary};
638
+ }
639
+ `,hu=({title:n,titleColor:r,tooltip:o,value:a=!1,partiallyChecked:s=!1,onChange:l,disabled:c,style:d,errorMessage:u,allowPropagation:p=!1})=>{const h=i(),[m,g]=jt(a);Wt(()=>g(a),[a]);return t(Po,{children:[t(uu,{"data-id":"checkbox"+(n?`-${n}`:""),$disabled:c,onClick:e=>{c||(p||e.stopPropagation(),l?l(!!s||!m):g(e=>!!s||!e))},style:d,children:[e(pu,{$isChecked:m,$isPartiallyChecked:s,$disabled:c,children:s?e(xt,{fill:h.text.white}):m?e(yt,{fill:h.text.white}):null}),n&&e(Bd,{text:o,withIcon:!0,children:e(Pc,{size:12,color:r||h.text.grey,style:{maxWidth:"90%"},children:n})})]}),!!u&&e(du,{children:u})]})},mu=r(Oo)`
640
+ gap: 0;
641
+ `,gu=r.button`
642
+ padding: 4px 8px;
643
+ background-color: ${({theme:e,$selected:t})=>t?e.colors.dropdown_bg_2:"transparent"};
644
+ border-radius: ${({$position:e})=>"left"===e?"32px 0px 0px 32px":"right"===e?"0px 32px 32px 0px":"0"};
645
+ border: 1px solid ${({theme:e})=>e.colors.border};
646
+ display: flex;
647
+ align-items: center;
648
+ justify-content: center;
649
+ cursor: pointer;
650
+ &:hover {
651
+ border: 1px solid ${({theme:e})=>e.colors.secondary};
652
+ }
653
+ `,fu=({isPrettyMode:n,setIsPrettyMode:r})=>t(mu,{children:[e(gu,{$position:"left",$selected:n,onClick:()=>r(!0),children:e($t,{})}),e(gu,{$position:"right",$selected:!n,onClick:()=>r(!1),children:e(wt,{})})]}),yu=r.table`
654
+ border-collapse: collapse;
655
+ font-family: ${({theme:e})=>e.font_family.primary};
656
+ `,bu=r.tbody``,vu=r.tr`
657
+ td:first-child {
658
+ padding-left: 0 !important;
659
+ }
660
+ td:last-child {
661
+ padding-right: 0 !important;
662
+ }
663
+ `,xu=r.td`
664
+ vertical-align: top;
665
+ padding: 4px 6px;
666
+ `,$u=r(Pc)`
667
+ white-space: nowrap;
668
+ `,wu=r.span`
669
+ white-space: ${({$noWrap:e})=>e?"nowrap":"pre-wrap"};
670
+ overflow-wrap: break-word;
671
+ word-break: break-word;
672
+ word-wrap: break-word;
673
+ /* Fallback for older browsers */
674
+ -ms-word-break: break-all;
675
+ font-size: 12px;
676
+ `,Su=({language:t,code:n,theme:r,flatten:o,pretty:a})=>{const{darkMode:s}=i(),l=r?mn[r]:s?mn.palenight:mn.vsLight;let c="";if("json"===t){const e=Zo(n,{}),t=vi(e);c=xi(o?Tr(t):t)}else c=n;return a&&"json"===t?e(Cu,{darkMode:s,str:c}):e(hn,{theme:l||(s?mn.palenight:mn.vsLight),language:t,code:c,children:({getLineProps:t,getTokenProps:n,tokens:r})=>e("pre",{children:r.map((r,o)=>e("div",{...t({line:r}),children:r.map((t,r)=>e(wu,{...n({token:t})},`line-${o}-token-${r}`))},`line-${o}`))})})},Cu=({darkMode:n,str:r})=>{const o=i(),a=(n,r)=>{const i=new Array(n).fill(n=>t(vu,{...n,children:[e(xu,{}),e(xu,{})]}));return e(Ut,{children:i.map((t,n)=>e(t,{style:0===n?{borderBottom:`1px solid ${o.colors.border}`}:{}},`empty-row-${r}-${n}`))})};return e(hn,{theme:n?mn.palenight:mn.vsLight,language:"json",code:r,children:({getLineProps:n,getTokenProps:r,tokens:i})=>e(yu,{children:e(bu,{children:i.map((i,s)=>{const l=(e=>{const t=["punctuation","plain","operator"];return e.filter(e=>!t.includes(e.types[0])).map(({types:e,content:t})=>{const n=[...e],r=["property","string"].includes(n[0])?t.replace(/"/g,""):t;return"string"===n[0]&&(["true","false"].includes(r.split("@")[0])&&(n[0]="boolean"),r.split("@")[0].match(/^[0-9]+$/)&&(n[0]="number")),{types:n,content:r}})})(i),c=n({line:l});return 1===l.length&&"property"===l[0].types[0]?t(Ut,{children:[a(2,s),t(vu,{...c,children:[e(xu,{children:e($u,{children:l[0].content})}),e(xu,{})]})]},`line-${s}`):2===l.length?e(vu,{...c,children:l.map((n,i)=>{const{text:a,components:l}=((t,n)=>{const[r,...o]=t.split("@");return{text:r,components:o?.map((t,r)=>{if(!t.includes("="))return null;const[o,i]=t.split("=");switch(o){case"tooltip":return e(Bd,{withIcon:!0,text:i},`${o}-${i}-${r}`);case"status":if("none"===i)return e("div",{style:{width:16,height:16}},`${o}-${i}-${r}`);let t=Go(i,n);return t||(t=Go(Gn.Warning,n)),e(t,{},`${o}-${i}-${r}`);default:return null}})?.filter(e=>!!e)||[]}})(n.content,o),c=0===i;return e(xu,{children:t(Oo,{children:[e(Oo,{children:l}),e(wu,{$noWrap:c,...r({token:n}),children:a})]})},`line-${s}-token-${i}`)})},`line-${s}`):(l.length,null)})})})})},Eu={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 ku(e){if("number"==typeof e)return{value:e,unit:"px"};let t;const n=(e.match(/^[0-9.]*/)||"").toString();t=n.includes(".")?parseFloat(n):parseInt(n,10);const r=(e.match(/[^0-9]*$/)||"").toString();return Eu[r]?{value:t,unit:r}:{value:t,unit:"px"}}function Au(e){const t=ku(e);return`${t.value}${t.unit}`}const Du=((e,t,n)=>{const r=`react-spinners-${e}-${n}`;if("undefined"==typeof window||!window.document)return r;const o=document.createElement("style");document.head.appendChild(o);const i=o.sheet,a=`\n @keyframes ${r} {\n ${t}\n }\n `;return i&&i.insertRule(a,0),r})("FadeLoader","50% {opacity: 0.3} 100% {opacity: 1}","fade"),Tu=({loading:n=!0,color:r,scale:o=1,speedMultiplier:a=1,cssOverride:s={},style:l={},...c})=>{const d=i(),u=r||d.text.secondary;if(!n)return null;const{value:p}=ku(2),h=p+4.2,m=h/2+h/5.5,g=4*h*o,f={position:"relative",width:`${g}px`,height:`${g}px`,scale:o,...l,...s},y=(e,t)=>({position:"absolute",width:Au(1.5),height:Au(4),borderRadius:Au(2),backgroundColor:u,transition:"2s",animationFillMode:"both",animation:`${Du} ${1.2/a}s ${.12*e}s infinite ease-in-out`,transform:`translate(-50%, -50%) rotate(${t}deg)`});return t("span",{style:f,...c,children:[e("span",{style:{...y(1,0),top:`calc(50% + ${h}px)`,left:"50%"}}),e("span",{style:{...y(2,-45),top:`calc(50% + ${m}px)`,left:`calc(50% + ${m}px)`}}),e("span",{style:{...y(3,90),top:"50%",left:`calc(50% + ${h}px)`}}),e("span",{style:{...y(4,45),top:`calc(50% + ${-1*m}px)`,left:`calc(50% + ${m}px)`}}),e("span",{style:{...y(5,0),top:`calc(50% + ${-1*h}px)`,left:"50%"}}),e("span",{style:{...y(6,-45),top:`calc(50% + ${-1*m}px)`,left:`calc(50% + ${-1*m}px)`}}),e("span",{style:{...y(7,90),top:"50%",left:`calc(50% + ${-1*h}px)`}}),e("span",{style:{...y(8,45),top:`calc(50% + ${m}px)`,left:`calc(50% + ${-1*m}px)`}})]})},Iu=r.div`
677
+ margin: ${({$align:e})=>"right"===e?"auto 6px auto auto":"left"===e?"auto auto auto 6px":"auto"};
678
+ display: flex;
679
+ align-items: center;
680
+ justify-content: center;
681
+ `,Nu=({extend:t,size:n=14,align:r="center"})=>e(Iu,{$align:r,children:e(St,{size:n,rotate:t?180:0})}),Ru=r.div`
682
+ border-radius: 24px;
683
+ background-color: ${({theme:e,$status:t})=>t===Gn.Error?e.text.error+fc["010"]:t===Gn.Warning?e.text.warning+fc["010"]:e.colors.secondary+fc["005"]};
684
+ &:hover {
685
+ background-color: ${({theme:e,$status:t})=>t===Gn.Error?e.text.error+fc["020"]:t===Gn.Warning?e.text.warning+fc["020"]:e.colors.secondary+fc["010"]};
686
+ }
687
+ cursor: pointer;
688
+ transition: background 0.3s;
689
+ `,Ou=r.div`
690
+ display: flex;
691
+ align-items: center;
692
+ gap: 12px;
693
+ padding: 12px 18px;
694
+ `,Pu=r.div`
695
+ display: flex;
696
+ flex-direction: column;
697
+ gap: 8px;
698
+ padding: 6px 18px 12px 18px;
699
+ `,Fu=r.div`
700
+ display: flex;
701
+ align-items: center;
702
+ gap: 12px;
703
+ `,_u=r(Pc)`
704
+ white-space: nowrap;
705
+ `,Lu=r(Po)`
706
+ width: 16px;
707
+ `,Mu=({conditions:n,headerLabelError:r="Something Failed",headerLabelWarning:o="Something isn't right",headerLabelSuccess:a="Everything Successful"})=>{const s=i(),[l,c]=jt(!1),d=Xt(()=>di(n),[n]),{errors:u,hasErrors:p,warnings:h,hasWarnings:m,hasDisableds:g,hasLoadings:f}=Xt(()=>Pr(d),[d]);Wt(()=>{c(p||m||g)},[p,m,g]);const y=(!d.length||f)&&!p&&!m&&!g,b=p?Gn.Error:m?Gn.Warning:g?Gn.Info:Gn.Success,v=Go(b,s),x=p?r:m||g?o:y?"Loading...":a,$=p?s.text.error:m?s.text.warning:s.text.info,w=`(${p?u.length:m?h.length:d.length}/${d.length})`,S=p?s.text.error_secondary:m?s.text.warning_secondary:s.text.info_secondary,C=Gt(()=>c(e=>!e),[]);return t(Ru,{onClick:C,$status:b,children:[t(Ou,{children:[e(y?Tu:v,{}),e(Pc,{color:$,size:14,children:x}),e(Pc,{color:S,size:12,family:"secondary",children:w}),e(Nu,{extend:l,align:"right"})]}),l&&e(Pu,{children:d.map(({status:n,type:r,reason:o,message:i},a)=>{const l=n===Vn.Loading?()=>e(Tu,{scale:.8}):n===Vn.Disabled?Go(Gn.Info,s):Go(n,s),c=n===Vn.Disabled?s.text.info:n===Gn.Error?s.text.error:n===Gn.Warning?s.text.warning:s.text.info,d=n===Vn.Disabled?s.text.info_secondary:n===Gn.Error?s.text.error_secondary:n===Gn.Warning?s.text.warning_secondary:s.text.info_secondary;return t(Fu,{children:[e(Lu,{children:e(l,{})}),t(Pc,{color:c,size:12,children:[e(_u,{color:d,size:12,weight:700,children:r}),i||o]})]},`condition-${a}`)})})]})},zu=r.div`
708
+ display: flex;
709
+ align-items: center;
710
+ gap: ${({$size:e})=>e/3}px;
711
+ padding: ${({$size:e,$withBorder:t,$withBackground:n})=>t||n?`${e/(t?3:2)}px ${e/(t?1.5:1)}px`:"0"};
712
+ width: ${({$width:e})=>e||"fit-content"};
713
+ border-radius: 360px;
714
+ border: ${({$withBorder:e,$status:t,theme:n})=>e?`1px solid ${n.text[t]+fc["050"]}`:"none"};
715
+ background: ${({$withBackground:e,$status:t,theme:n})=>e?`linear-gradient(90deg, transparent 0%, ${n.text[t]+fc["030"]} 100%)`:"transparent"};
716
+ `,Bu=r.div`
717
+ display: flex;
718
+ align-items: center;
719
+ `,Uu=r.div`
720
+ display: flex;
721
+ align-items: center;
722
+ `,ju=({title:n,subtitle:r,status:o=Gn.Default,forceIcon:a,withIcon:s,withBorder:l,withBackground:c,width:d,size:u=12,family:p="secondary",nowrap:h=!1})=>{const m=i(),g=[Vn.Loading,Vn.Disabled].includes(o)?Gn.Info:o,f=a?()=>e(a,{size:u+2,fill:m.text[g]}):o===Vn.Loading?()=>e(Tu,{scale:.8}):()=>Go(g,m)?.({size:u+2});return t(zu,{$status:g,$width:d,$size:u,$withIcon:s,$withBorder:l,$withBackground:c,children:[s&&e(Bu,{children:e(f,{})}),(!!n||!!r)&&t(Uu,{children:[!!n&&e(Pc,{size:u,family:p,color:m.text[g],nowrap:h,children:n}),!!n&&!!r&&e(Dd,{orientation:"vertical",length:u-2+"px",type:g}),!!r&&e(Pc,{size:u-2,family:p,color:m.text[`${g}_secondary`],nowrap:h,children:r})]})]})},Wu=({label:n,onClick:r,variant:o="tertiary",textProps:a,...s})=>{const l=i();return t(Tc,{onClick:r,variant:o,...s,children:[e(Ct,{fill:"primary"===o?l.text.primary:l.text.info}),e(Pc,{size:14,family:"secondary",decoration:"underline",color:"primary"===o?l.text.primary:void 0,...a,children:n||Ar.ADD})]})},Hu=r(Oo)`
723
+ width: 100%;
724
+ border-radius: 8px;
725
+ background-color: ${({theme:e})=>e.colors.secondary+fc["010"]};
726
+ pre {
727
+ color: ${({theme:e})=>e.text.default};
728
+ font-size: 12px;
729
+ overflow-x: auto;
730
+ width: 100%;
731
+ padding-left: 12px;
732
+ }
733
+ `,Xu=({value:n,callbackCopyDone:r})=>{const{clickCopy:o,isCopied:i}=Xc();return t(Hu,{children:[e("pre",{children:n}),e(Wd,{onClick:e=>{e.stopPropagation(),o(n),r?.()},tooltip:i?"Copied!":"Copy",children:e(i?yt:bt,{})})]})},Gu=r(Pc)`
734
+ max-width: ${({$maxWidth:e})=>e?`${e}px`:"unset"};
735
+ white-space: nowrap;
736
+ overflow-x: auto;
737
+
738
+ &::after {
739
+ // This is to prevent the "browser default tooltip" from appearing when the title is too long
740
+ content: '';
741
+ display: block;
742
+ }
743
+ `,Ku=({maxWidth:n,text:r,textSize:o=16,textColor:i})=>{const[a,s]=jt(!1),l=Ht(null);return Wt(()=>{if(l.current){const{clientWidth:e}=l.current;s(e<1.05*(n-o)&&e>.95*(n-o))}},[n,o,r]),t(Oo,{$gap:0,children:[r&&e(Bd,{text:a?r:void 0,children:e(Gu,{ref:l,$maxWidth:n-o,size:o,color:i,children:r})}),a&&e(Gu,{$maxWidth:o,size:o,color:i,children:"..."})]})},Vu=({src:t="",alt:n="",size:r=16})=>{const[o,i]=jt(!1);return t&&!o?e("img",{src:t,alt:n,width:r,height:r,onError:()=>i(!0)}):e(g,{size:r})},Ju=r.div`
744
+ display: flex;
745
+ align-items: center;
746
+ justify-content: center;
747
+ width: ${({$size:e})=>e}px;
748
+ height: ${({$size:e})=>e}px;
749
+ border-radius: 8px;
750
+ background: ${({$status:e,theme:t})=>{const n=t.colors[e||"dropdown_bg_2"];return`linear-gradient(180deg, ${n} 0%, ${n+fc["030"]} 100%)`}};
751
+ `,qu=({icon:t,src:n="",alt:r="",status:o,size:i=36})=>e(Ju,{$status:o,$size:i,children:n?e(Vu,{src:n,alt:r,size:i-12}):e(t||g,{size:i-12})}),Yu=r.div`
752
+ position: relative;
753
+ display: flex;
754
+ flex-wrap: wrap;
755
+ align-items: center;
756
+ justify-content: center;
757
+ width: ${({$size:e})=>e}px;
758
+ height: ${({$size:e})=>e}px;
759
+ `,Qu=r.div`
760
+ position: absolute;
761
+ top: ${({$top:e})=>e}px;
762
+ left: ${({$left:e})=>e}px;
763
+ z-index: ${({$zIndex:e})=>e};
764
+ display: flex;
765
+ align-items: center;
766
+ justify-content: center;
767
+ width: ${({$size:e})=>e}px;
768
+ height: ${({$size:e})=>e}px;
769
+ border-radius: 100%;
770
+ border: 1px solid ${({theme:e,$status:t})=>(t?e.text[t]:e.colors.border)+fc["030"]};
771
+ background: ${({$status:e,theme:t})=>{const n=t.colors[e||"dropdown_bg_2"];return`linear-gradient(180deg, ${n} 0%, ${n+fc["030"]} 100%)`}};
772
+ `,Zu=({icons:n=[],iconSrcs:r=[],status:o,size:a=36,id:s})=>{const l=i(),c=1===n.length||1===r.length?a-12:a/2.7;if(r.length>0)return e(Zu,{icons:r.map(t=>()=>e(Vu,{src:t,size:c})),status:o,size:a,id:s});if(1===n.length)return e(qu,{icon:n[0],status:o,size:a});const d=e=>n.length<=2?.5*c:0===e||1===e?0:1.15*c,u=e=>0===e?0:1===e?1.15*c:1.15*c*.5;return e(Yu,{$status:o,$size:a,children:n.map((r,i)=>i>2?null:e(Qu,{$status:o,$size:1.5*c,$top:d(i),$left:u(i),$zIndex:i+1,children:2===i&&n.length>3?t(Pc,{family:"secondary",color:l.text.dark_grey,size:.8*c,children:["+",n.length-2]}):e(r,{size:c})},`icon-${s}-${i}`))})},ep=Ul.map(({id:e})=>e),tp=({monitors:n=ep,withTooltips:r,withLabels:o,size:a=12,color:s})=>{const l=i(),c=s||l.text.grey;return e(Oo,{$gap:o?a:a/2,children:n.map(n=>{const i=yn(n.toLowerCase()),s=Yr(n);return s?e(Bd,{text:r?i:"",children:t(Oo,{$gap:a/3,children:[e(s,{size:o?a+2:a,fill:c}),o&&e(Pc,{size:a,color:c,children:i})]})},n):null})})},np=r.div`
773
+ visibility: hidden;
774
+ `,rp=r.div`
775
+ display: flex;
776
+ flex-direction: column;
777
+ align-self: stretch;
778
+ padding: 16px;
779
+ width: calc(100% - 32px);
780
+ border-radius: 16px;
781
+ background-color: ${({theme:e,$status:t,$bgColor:n})=>n||(t?e.text[t]+fc["010"]:e.colors.secondary+fc["005"])};
782
+ opacity: ${({$faded:e})=>e?.5:1};
783
+
784
+ ${({theme:e,$status:t,$bgColorHover:n,$withClick:r})=>r?o`
785
+ &:hover {
786
+ cursor: pointer;
787
+ background-color: ${n||(t?e.text[t]+fc["020"]:e.colors.secondary+fc["010"])};
788
+ ${np} {
789
+ visibility: visible;
790
+ }
791
+ }
792
+ `:`\n &:hover {\n ${np} {\n visibility: visible;\n }\n }\n `}
793
+ `,op=r.div`
794
+ display: flex;
795
+ align-items: center;
796
+ gap: 8px;
797
+ margin-left: auto;
798
+ `,ip=r(Pc)`
799
+ margin-right: 16px;
800
+ `,ap=r(Pc)`
801
+ font-size: 10px;
802
+ color: ${({theme:e})=>e.text.grey};
803
+ `,sp=({title:n,subTitle:r,hoverText:o,onClick:a,renderActions:s,iconProps:{icon:l,icons:c,iconSrc:d,iconSrcs:u}={},visualProps:{status:p,faded:h,bgColor:m,bgColorHover:g,monitors:f,monitorsWithLabels:y,componentsUnderTitles:b}={},checkboxProps:{withCheckbox:v,isCheckboxDisabled:x,isChecked:$,isLoading:w,onCheckboxChange:S}={},extendableProps:{withExtend:C,isExtended:E,renderExtended:k}={},...A})=>{const D=i(),[T,I]=jt(E||!1),[N,R]=jt(0),O=Ht(null),P=Ht(null),F=Ht(null);return Wt(()=>{if(O.current){const e=O.current.clientWidth,t=P.current?.clientWidth||0;R(e-((v?125:85)+t))}},[v]),t(rp,{ref:O,$status:p,$faded:h,$bgColor:m,$bgColorHover:g,$withClick:!!a,onClick:a,...A,children:[t(Oo,{$gap:8,children:[t(Oo,{$gap:16,children:[w?e(Tu,{}):v?e(hu,{value:$,onChange:S,disabled:x}):null,c?.length||u?.length?e(Zu,{icons:c,iconSrcs:u,status:p,id:`${n}-${r}`}):l||d?e(qu,{icon:l,src:d,status:p}):null]}),t(Po,{$gap:4,children:[n&&e(Ku,{maxWidth:N,text:n,textSize:14}),t(Oo,{$gap:4,children:[r&&e(Ku,{maxWidth:N-(F.current?.clientWidth||0),text:r,textSize:10,textColor:D.text.grey}),f&&f.length>0&&t(Oo,{$gap:4,ref:F,children:[r&&e(ap,{children:"•"}),e(tp,{monitors:f,withLabels:y,size:10})]})]}),b&&b.length>0?e(Oo,{$gap:4,children:b?.map((t,n)=>e(Ut,{children:t},`componentsUnderTitles-${n}`))}):null]}),t(op,{ref:P,children:[!!o&&e(np,{children:e(ip,{size:14,family:"secondary",children:o})}),s&&s(),C&&t(Ut,{children:[e(Dd,{orientation:"vertical",length:"16px",margin:"0 2px"}),e(Wd,{onClick:()=>I(e=>!e),children:e(Nu,{extend:T})})]})]})]}),T&&k&&t(Po,{children:[e(Dd,{margin:"16px 0"}),k()]})]})},lp=r(Oo)`
804
+ width: 100%;
805
+ justify-content: space-between;
806
+ `,cp=r(Pc)`
807
+ font-size: 12px;
808
+ color: ${({theme:e})=>e.text.grey};
809
+ `,dp=r(Pc)`
810
+ font-size: 10px;
811
+ color: ${({theme:e})=>e.text.darker_grey};
812
+ `,up=r.div`
813
+ display: flex;
814
+ align-items: center;
815
+ gap: 8px;
816
+ margin-left: auto;
817
+ `,pp=r(Pc)`
818
+ font-size: 12px;
819
+ text-align: right;
820
+ `,hp=({title:n,subTitle:r,tooltip:o,value:i})=>t(lp,{children:[e(Po,{$gap:4,children:t(Bd,{text:o||"",children:[n&&e(cp,{children:n},"title"),r&&e(dp,{children:r},"subtitle")]})}),e(up,{children:i?.status?e(ju,{status:"transitioning"===i.status?Vn.Loading:i.status,title:i.text||i.status,withBorder:!0,withIcon:!0}):e(pp,{children:i?.text||"-"})})]}),mp=r(Po)`
821
+ width: 100%;
822
+ `,gp=({containerName:n,actualDevices:r,started:o,ready:i,instrumentationInstances:a})=>{const s=Xt(()=>{const t=[];return o?.name&&t.push(e(ju,{status:ii(o.value)?fi(o.value)?Gn.Success:Gn.Error:Gn.Default,title:o.name,withIcon:!0,withBorder:!0,size:8},"started")),i?.name&&t.push(e(ju,{status:ii(i.value)?fi(i.value)?Gn.Success:Gn.Error:Gn.Default,title:i.name,withIcon:!0,withBorder:!0,size:8},"ready")),t},[o?.name,o?.value,i?.name,i?.value]);return e(sp,{title:n.value,subTitle:a.length?`${a.length} Instrumented Processes`:void 0,visualProps:{componentsUnderTitles:s},renderActions:()=>e(ju,{status:Gn.Info,title:"Instrumentation Device",subtitle:r.value&&"[]"!==r.value?r.value:"none",withBorder:!0}),extendableProps:{isExtended:!!a.length,renderExtended:()=>e(mp,{$gap:24,children:a.map((n,r)=>t(mp,{$gap:8,children:[e(hp,{title:`Instrumented Process #${r+1}`,subTitle:n.message?.value||"",value:{status:n.healthy.status,text:n.healthy.status===Gn.Success?"healthy":"unhealthy"}}),n.identifyingAttributes?.map(({name:t,value:n})=>e(hp,{title:t,subTitle:"",value:{text:n,status:void 0}},`describe-${t}-${n}`))]},`process-${r}`))})}})},fp=({title:n="Data not found",subTitle:r})=>{const o=i().v2.colors.grey[400];return t(Fo,{children:[t(Oo,{$gap:8,children:[e(Et,{fill:o}),e(uo,{size:io.XS,color:o,align:"center",children:n})]}),r&&e(uo,{size:io.XXS,color:o,align:"center",children:r})]})},yp=r(Po)`
823
+ max-width: 300px;
824
+ padding: 12px;
825
+ border-radius: 12px;
826
+ background-color: ${({theme:e})=>e.colors.dropdown_bg};
827
+ justify-content: center;
828
+ `,bp=Jt(({id:t,data:n})=>{const{title:r,subTitle:o}=n;return e(yp,{"data-id":t,children:e(fp,{title:r,subTitle:o})})});bp.displayName=bp.name;const vp=r.div`
829
+ padding: 6px;
830
+ border-radius: 12px;
831
+ background-color: ${({theme:e})=>e.colors.dropdown_bg};
832
+ cursor: pointer;
833
+ ${({$isVirtual:e,theme:t})=>e&&`\n border: 1px dashed ${t.colors.border};\n opacity: 0.8;\n `}
834
+ `,xp=r.div`
835
+ position: relative;
836
+ `,$p=r.div`
837
+ position: absolute;
838
+ top: 100%;
839
+ margin-top: 4px;
840
+ left: 50%;
841
+ transform: translateX(-50%);
842
+ display: flex;
843
+ flex-direction: column;
844
+ align-items: center;
845
+ gap: 2px;
846
+ width: 140px;
847
+ text-align: center;
848
+ `,wp=Jt(({id:r,data:o})=>{const{id:a,status:s,title:l,icons:c,isVirtual:d}=o,u=i(),p=d||s!==Gn.Error?null:Go(s,u);return t(n,{children:[e(rn,{type:"source",position:on.Right,style:{visibility:"hidden"}}),e(rn,{type:"target",position:on.Left,style:{visibility:"hidden"}}),t(xp,{"data-id":r,children:[e(vp,{$isVirtual:d,children:e(Zu,{id:a,icons:c,status:d?void 0:s})}),t($p,{children:[p&&e(p,{}),e(Pc,{size:12,style:{textAlign:"center",wordBreak:"break-word",lineHeight:"1.3"},children:l})]})]})]})});wp.displayName=wp.name;const Sp={duration:300,padding:.1,includeHiddenNodes:!0},Cp=r.div`
849
+ height: 100%;
850
+ .react-flow__attribution {
851
+ visibility: hidden;
852
+ }
853
+ `,Ep=r.div`
854
+ button {
855
+ padding: 8px;
856
+ margin: 8px;
857
+ border-radius: 8px;
858
+ border: 1px solid ${({theme:e})=>e.colors.border} !important;
859
+ background-color: ${({theme:e})=>e.colors.dropdown_bg};
860
+ path {
861
+ fill: ${({theme:e})=>e.text.secondary};
862
+ }
863
+ &:hover {
864
+ background-color: ${({theme:e})=>e.colors.dropdown_bg_2};
865
+ }
866
+ &:last-child svg {
867
+ transform: scale(1.4);
868
+ }
869
+ }
870
+ `,kp={[Yn.MapItem]:wp,[Yn.NoData]:bp},Ap=({trigger:e})=>{const{fitView:t}=dn(),n=Ht(!0);return Wt(()=>{n.current?n.current=!1:e>0&&requestAnimationFrame(()=>t(Sp))},[e,t]),null},Dp=({nodes:n,edges:r,onNodesChange:o,onEdgesChange:i,fitViewTrigger:a=0,zoomOnScroll:s=!1,onEdgeClick:l,onNodeMouseEnter:c,onNodeMouseLeave:d,onRefresh:u})=>{const{onClickNode:p}=zc(),{setActiveNodeType:h,setActiveNodeId:m}=Ci();return t(sn,{zoomOnScroll:s,nodes:n,nodeTypes:kp,edges:r,onNodeClick:p,onEdgeClick:l,onNodeMouseEnter:c,onNodeMouseLeave:d,onNodesChange:o,onEdgesChange:i,onBlur:()=>{h(null),m(null)},children:[e(Ap,{trigger:a}),e(Ep,{children:e(ln,{position:"bottom-right",orientation:"horizontal",showInteractive:!1,showZoom:!0,showFitView:!0,fitViewOptions:Sp,children:u&&e(cn,{onClick:u,children:e(kt,{size:20})})})})]})},Tp=t=>e(Cp,{children:e(an,{children:e(Dp,{...t})})}),Ip={type:"",disabled:!1,name:"",notes:"",signals:[],fields:{}},Np=Vt(null),Rp="All row fields are required",Op="At least one row is required",Pp=Er.LATENCY_HTTP_ROUTE,Fp=e=>"string"==typeof e?!e.trim():ni(e),_p=(e,t)=>!!e&&t.every(t=>{const n=e[t];return Array.isArray(n)?n.length>0:!Fp(n)}),Lp=({children:t})=>{const[n,r]=jt(null),[o,i]=jt(void 0),a=Fc(Ip),s=Gt(e=>{a.resetFormData(),a.handleErrorChange(void 0,void 0,{}),i(void 0),e?.type&&a.handleFormChange("type",e.type),r(e)},[]),l=Gt(e=>{var t;a.resetFormData((({type:e,name:t,notes:n,disabled:r,signals:o,fields:i})=>({type:e,name:t||"",notes:n||"",disabled:!!r,signals:o??[],fields:i??{}}))(e)),a.handleErrorChange(void 0,void 0,{}),i(void 0),r((t=e.type,Ei.find(e=>e.type===t)??ki.find(e=>e.type===t)??null))},[]),c=Gt(()=>{if(!n)return{errorMessage:"No action type selected",preparedFormData:$n(Ip)};const e=(e=>{const t=$n(e),n=t.fields||{},r=n[Tn.UrlTemplatizationRulesGroups];r?.length&&(n[Tn.UrlTemplatizationRulesGroups]=r.map(e=>({...e,templatizationRules:(e.templatizationRules||[]).filter(e=>!!e.template?.trim())})));const o=n[Tn.AttributeNamesToDelete];o?.length&&(n[Tn.AttributeNamesToDelete]=o.filter(e=>!!e?.trim()));const i=n[Tn.Renames];return i&&(n[Tn.Renames]=Object.fromEntries(Object.entries(i).filter(([e,t])=>!!e?.trim()&&!!t?.trim()))),t.fields=n,t})(a.formData),t={};ni(e.signals)&&(t.signals=Er.FIELD_IS_REQUIRED),n.type&&Object.assign(t,((e,t,n)=>{const r={},o=t.fields||{},i=n.fields||{};switch(e){case Dn.K8sAttributes:{const e=!(o[Tn.CollectContainerAttributes]||o[Tn.CollectReplicaSetAttributes]||o[Tn.CollectWorkloadId]||o[Tn.CollectClusterId]),t=!o[Tn.LabelsAttributes]?.length,n=!o[Tn.AnnotationsAttributes]?.length;e&&t&&n&&(r[Tn.CollectContainerAttributes]="Enable at least one option or add a label/annotation row");const i=o[Tn.LabelsAttributes];i?.some(e=>!_p(e,["labelKey","attributeKey","fromSources"]))&&(r[Tn.LabelsAttributes]=Rp);const a=o[Tn.AnnotationsAttributes];a?.some(e=>!_p(e,["annotationKey","attributeKey","fromSources"]))&&(r[Tn.AnnotationsAttributes]=Rp);break}case Dn.AddClusterInfo:{const e=o[Tn.ClusterAttributes];e?.length?e.some(e=>!_p(e,["attributeName","attributeStringValue"]))&&(r[Tn.ClusterAttributes]=Rp):r[Tn.ClusterAttributes]=Op;break}case Dn.DeleteAttributes:{const e=i[Tn.AttributeNamesToDelete]||[],t=o[Tn.AttributeNamesToDelete]||[];t.length?e.length>t.length&&(r[Tn.AttributeNamesToDelete]=Rp):r[Tn.AttributeNamesToDelete]=e.length?Rp:Op;break}case Dn.RenameAttributes:{const e=Object.entries(i[Tn.Renames]||{}),t=Object.entries(o[Tn.Renames]||{}),n=e.some(([e,t])=>!e?.trim()||!t?.trim());t.length?n&&(r[Tn.Renames]=Rp):r[Tn.Renames]=e.length?Rp:Op;break}case Dn.PiiMasking:{const e=o[Tn.PiiCategories];e?.length||(r[Tn.PiiCategories]="Select at least one attribute to mask");break}case Dn.ErrorSampler:Fp(o[Tn.FallbackSamplingRatio])&&(r[Tn.FallbackSamplingRatio]=Er.FIELD_IS_REQUIRED);break;case Dn.ProbabilisticSampler:Fp(o[Tn.SamplingPercentage])&&(r[Tn.SamplingPercentage]=Er.FIELD_IS_REQUIRED);break;case Dn.LatencySampler:{const e=o[Tn.EndpointsFilters];e?.length?e.some(e=>!_p(e,["serviceName","httpRoute","minimumLatencyThreshold","fallbackSamplingRatio"]))?r[Tn.EndpointsFilters]=Rp:e.some(e=>!!e.httpRoute&&!e.httpRoute.startsWith("/"))&&(r[Tn.EndpointsFilters]=Pp):r[Tn.EndpointsFilters]=Op;break}case Dn.ServiceNameSampler:{const e=o[Tn.ServicesNameFilters];e?.length?e.some(e=>!_p(e,["serviceName","samplingRatio","fallbackSamplingRatio"]))&&(r[Tn.ServicesNameFilters]=Rp):r[Tn.ServicesNameFilters]=Op;break}case Dn.SpanAttributeSampler:{const e=o[Tn.AttributeFilters],t=["stringCondition","numberCondition","booleanCondition","jsonCondition"],n=new Set(["exists","is_valid_json","is_invalid_json","jsonpath_exists"]);e?.length?e.some(e=>{if(!_p(e,["serviceName","attributeKey","fallbackSamplingRatio"]))return!0;const r=e.condition||{},o=t.find(e=>!!r[e]);if(!o)return!0;const i=r[o]||{},a=i.operation;return!a||!(n.has(a)||!Fp(i.expectedValue))})&&(r[Tn.AttributeFilters]=Rp):r[Tn.AttributeFilters]=Op;break}case Dn.URLTemplatization:{const e=o[Tn.UrlTemplatizationRulesGroups];(!e?.length||e.some(e=>!e.templatizationRules?.length))&&(r[Tn.UrlTemplatizationRulesGroups]="Each rule group needs at least one non-blank template");break}}return r})(n.type,e,a.formData)),a.handleErrorChange(void 0,void 0,t);const r=Object.keys(t).length>0?"Invalid form values":void 0;return i(r),{errorMessage:r,preparedFormData:e}},[a,n]),d=Xt(()=>({selectedOption:n,onSelectOption:s,loadAction:l,genericForm:a,validateFormData:c,errorMessage:o}),[n,s,l,a,c,o]);return e(Np.Provider,{value:d,children:t})},Mp=()=>{const e=Kt(Np);if(!e)throw new Error("useActionFormContext must be used within an ActionFormContextProvider");return e},zp={name:""},Bp=Vt(null),Up=({children:t,defaultExcludeName:n=""})=>{const{dataStreams:r}=Jl(),[o,i]=jt(void 0),[a,s]=jt(n),[l,c]=jt(void 0),[d,u]=jt(null),p=Ht(null),h=Fc(zp),m=Gt(e=>{h.resetFormData({name:e}),h.handleErrorChange(void 0,void 0,{}),i(void 0),s(e),c(e),u(null),p.current=null},[]),g=Gt(()=>{const e=$n(h.formData),t=(e=>{const t={};return e.name?ri(e.name)||(t.name=Er.ILLEGAL_K8S_LABEL):t.name=Er.FIELD_IS_REQUIRED,t})(e);h.handleErrorChange(void 0,void 0,t);const n=Object.keys(t).length>0?Er.REQUIRED_FIELDS:void 0;return i(n),{errorMessage:n,preparedFormData:e}},[h]),f=Gt(async e=>{const{errorMessage:t,preparedFormData:n}=g();if(t)return;const o=r.find(e=>e.name===n.name&&e.name!==a);if(o)return p.current=e,void u({preparedFormData:n,existingName:o.name,editingName:l});await e(n)},[g,r,a,l]),y=Gt(async()=>{const e=p.current,t=d?.preparedFormData;p.current=null,u(null),e&&t&&await e(t)},[d]),b=Gt(()=>{p.current=null,u(null)},[]),v=Xt(()=>({genericForm:h,loadDataStream:m,editingName:l,validateFormData:g,requestSubmit:f,pendingMerge:d,confirmMerge:y,cancelMerge:b,errorMessage:o,excludeName:a,setExcludeName:s}),[h,m,l,g,f,d,y,b,o,a]);return e(Bp.Provider,{value:v,children:t})},jp=()=>{const e=Kt(Bp);if(!e)throw new Error("useDataStreamFormContext must be used within a DataStreamFormContextProvider");return e},Wp={type:"",name:"",currentStreamName:"",disabled:!1,exportedSignals:{logs:!1,metrics:!1,traces:!1,profiles:!1},fields:[]},Hp={activeForm:null,onChangeActiveForm:()=>{},loadDestination:()=>{},genericForm:void 0,formErrorMessage:void 0,validateFormData:()=>({isOk:!1,preparedFormData:$n(Wp)}),unsavedDestinations:[],thisUnsavedDestination:void 0,setUnsavedDestinations:()=>{},addUnsavedDestination:()=>{},updateUnsavedDestination:()=>{},deleteUnsavedDestination:()=>{}},Xp=Vt(Hp),Gp=e=>e.filter(e=>!!e).map(e=>{const{name:t,componentType:n,componentProperties:r,displayName:o,initialValue:i,renderCondition:a}=e,s=n===Hn.Dropdown,l=Zo(r,{});return{componentType:n,renderCondition:a,name:t,title:o,value:i,placeholder:l.placeholder||(s?"Select an option":void 0),options:s&&Array.isArray(l.values)?l.values.map(e=>({id:e,value:e})):void 0,...l}}),Kp=({children:t})=>{const{selectedStreamName:n}=Jl(),r=Yl(e=>e.destinations),[o,i]=jt(null),[a,s]=jt(),[l,c]=jt(Hp.unsavedDestinations),d=Xt(()=>"number"==typeof o?.unsavedIdx?l[o.unsavedIdx]:void 0,[o,l]),u=Gt((e,t)=>{o&&(c(t=>[...t,{...e,option:o.option}]),i(t?e=>e?{...e,listType:Di.UNSAVED,unsavedIdx:l.length}:null:null))},[o,l.length]),p=Gt((e,t,n)=>{o&&(c(n=>n.map((n,r)=>r===e?{...n,...t,option:o.option}:n)),i(n?e=>e?{...e,listType:Di.UNSAVED}:null:null))},[o]),h=Gt(e=>{c(t=>t.filter((t,n)=>n!==e)),i(null)},[]),m=Fc({...Wp,currentStreamName:n});Wt(()=>{if(!o)return;if(d)return void m.resetFormData({...d.formData});if(o.listType===Di.EXISTS&&o.option.id){const e=r.find(e=>e.id===o.option.id);if(e)return void m.resetFormData({type:e.destinationType.type,name:e.name||e.destinationType.displayName,currentStreamName:n,disabled:!!e.disabled,exportedSignals:{logs:!!e.exportedSignals?.logs,metrics:!!e.exportedSignals?.metrics,traces:!!e.exportedSignals?.traces,profiles:!!e.exportedSignals?.profiles},fields:o.dynamicFields.map(e=>({key:e.name,value:e.value}))})}const e=hi(o.option.supportedSignals);m.resetFormData({type:o.option.type,name:o.option.displayName,currentStreamName:n,disabled:!1,exportedSignals:{logs:e.includes(hr.Logs),metrics:e.includes(hr.Metrics),traces:e.includes(hr.Traces),profiles:e.includes(hr.Profiles)},fields:o.dynamicFields.map(e=>({key:e.name,value:e.value}))})},[o,d]);const g=Gt(e=>{m.resetFormData(),m.handleErrorChange(void 0,void 0,{}),s(void 0),i(e?{...e,dynamicFields:e.option?.fields?Gp(e.option.fields):[]}:null)},[]),f=Gt((e,t)=>{let n;for(const r of t){const t=r.items.find(t=>t.type===e.destinationType.type);if(t){n=t;break}}const r=Zo(e.fields,{}),o={id:e.id,type:e.destinationType.type,displayName:e.name||e.destinationType.displayName,selected:!0,testConnectionSupported:n?.testConnectionSupported??!1,supportedSignals:e.destinationType.supportedSignals,fields:n?n.fields.map(e=>({...e,initialValue:r[e.name]??e.initialValue})):[]},a=Gp(o.fields);i({listType:Di.EXISTS,option:o,dynamicFields:a}),s(void 0)},[]),y=Gt(()=>{const e=$n(m.formData),t={};o?.dynamicFields.forEach(({name:n,required:r})=>{if(r){const r=e.fields.find(e=>e.key===n)?.value;ni(r)&&(t[n]=Er.FIELD_IS_REQUIRED)}});pi(e.exportedSignals).length||(t.exportedSignals=Er.FIELD_IS_REQUIRED);const n=0===Object.keys(t).length?void 0:"Invalid form values";return m.handleErrorChange(void 0,void 0,t),s(n),{errorMessage:n,preparedFormData:e}},[m,o]);return e(Xp.Provider,{value:{activeForm:o,onChangeActiveForm:g,loadDestination:f,genericForm:m,formErrorMessage:a,validateFormData:y,unsavedDestinations:l,thisUnsavedDestination:d,setUnsavedDestinations:c,addUnsavedDestination:u,updateUnsavedDestination:p,deleteUnsavedDestination:h},children:t})},Vp=()=>Kt(Xp),Jp={disabled:!1,ruleName:"",notes:"",workloads:null,instrumentationLibraries:null,payloadCollection:null,codeAttributes:null,headersCollection:null,customInstrumentations:null},qp=Vt(null),Yp=({children:t})=>{const[n,r]=jt(null),[o,i]=jt(void 0),a=Fc(Jp),s=Gt(e=>{a.resetFormData(),a.handleErrorChange(void 0,void 0,{}),i(void 0),r(e)},[]),l=Gt(e=>{var t;a.resetFormData((({ruleName:e,notes:t,disabled:n,workloads:r,instrumentationLibraries:o,payloadCollection:i,codeAttributes:a,headersCollection:s,customInstrumentations:l})=>({ruleName:e||"",notes:t||"",disabled:!!n,workloads:r??null,instrumentationLibraries:o??null,payloadCollection:i??null,codeAttributes:a??null,headersCollection:s??null,customInstrumentations:l??null}))(e)),a.handleErrorChange(void 0,void 0,{}),i(void 0),r((t=e.type,Ii.find(e=>e.type===t)??null))},[]),c=Gt(()=>{if(!n)return{errorMessage:"No rule type selected",preparedFormData:$n(Jp)};const e=(e=>{const t=$n(e);return t.headersCollection?.[ar.HeaderKeys]?.length&&(t.headersCollection[ar.HeaderKeys]=t.headersCollection[ar.HeaderKeys].map(e=>e.trim()).filter(e=>e)),t.customInstrumentations?.[sr.Golang]?.length&&(t.customInstrumentations[sr.Golang]=t.customInstrumentations[sr.Golang].map(e=>new fr(e.packageName,e.functionName,e.receiverName,e.receiverMethodName)).filter(e=>{return t=e,!!(t.packageName?.trim()||t.functionName?.trim()||t.receiverName?.trim()||t.receiverMethodName?.trim());var t})),t.customInstrumentations?.[sr.Java]?.length&&(t.customInstrumentations[sr.Java]=t.customInstrumentations[sr.Java].map(e=>new gr(e.className,e.methodName)).filter(e=>{return t=e,!(!t.className?.trim()&&!t.methodName?.trim());var t})),t})(a.formData),t=((e,t)=>{const n={};switch(e){case or.CodeAttributes:Object.values(t.codeAttributes||{}).some(e=>null!=e)||(n.codeAttributes="Code attributes are required");break;case or.PayloadCollection:Object.values(t.payloadCollection||{}).some(e=>null!=e)||(n.payloadCollection="Payload collection are required");break;case or.HeadersCollection:t.headersCollection?.[ar.HeaderKeys]?.length||(n.headersCollection="Header keys are required");break;case or.CustomInstrumentation:{const e=t.customInstrumentations?.[sr.Golang]||[],r=t.customInstrumentations?.[sr.Java]||[];if(!e.length&&!r.length){n.customInstrumentations="Custom instrumentation are required";break}const o=e.findIndex(e=>!new fr(e.packageName,e.functionName,e.receiverName,e.receiverMethodName).Verify());if(-1!==o){n.customInstrumentations=`Golang probe #${o+1} is invalid: provide a package name plus either a function name OR both a receiver name and receiver method name`;break}const i=r.findIndex(e=>!new gr(e.className,e.methodName).Verify());if(-1!==i){n.customInstrumentations=`Java probe #${i+1} is invalid: both class name and method name are required`;break}break}}return n})(n.type,e);a.handleErrorChange(void 0,void 0,t);const r=Object.keys(t).length>0?"Invalid form values":void 0;return i(r),{errorMessage:r,preparedFormData:e}},[a,n]),d=Xt(()=>({selectedOption:n,onSelectOption:s,loadRule:l,genericForm:a,validateFormData:c,errorMessage:o}),[n,s,l,a,c,o]);return e(qp.Provider,{value:d,children:t})},Qp=()=>{const e=Kt(qp);if(!e)throw new Error("useRuleFormContext must be used within a RuleFormContextProvider");return e};function Zp(e){return!e||!e.sources?.length&&!e.namespaces?.length&&!e.languages?.length}function eh(e){return e?{sources:e.sources?[...e.sources]:[],namespaces:e.namespaces?[...e.namespaces]:[],languages:e.languages?[...e.languages]:[]}:{sources:[],namespaces:[],languages:[]}}function th(e){return null==e||0===e}function nh(e){return{name:"",notes:"",disabled:!1,ruleType:"Relevance",sourceScopes:{sources:[],namespaces:[],languages:[]},operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:"",durationPreset:"500",customDurationMs:"",keepErrors:!1,percentageMode:"costReduction"===e?"sample":"all",percentagePreset:"0",customPercentage:""}}function rh(e){return Zp(e.sourceScopes)?null:e.sourceScopes}function oh(e){return rh(e)}function ih(e){if("all"===e.percentageMode)return null;if("custom"===e.percentagePreset){const t=parseFloat(e.customPercentage);return isNaN(t)?null:t}return parseFloat(e.percentagePreset)}function ah(e){if("custom"===e.durationPreset){const t=parseFloat(e.customDurationMs);return isNaN(t)?null:t}return parseInt(e.durationPreset,10)}function sh(e){return{httpServer:{[e.routeType]:e.route||null,method:e.method||null}}}function lh(e){return"all"===e.operationType?null:"httpServer"===e.operationType?sh(e):"httpClient"===e.operationType?{httpClient:{serverAddress:e.serverAddress||null,["route"===e.routeType?"templatedPath":"templatedPathPrefix"]:e.route||null,method:e.method||null}}:null}function ch(e){return"all"===e.operationType?null:"httpServer"===e.operationType?sh(e):"kafkaConsumer"===e.operationType?{kafkaConsumer:{kafkaTopic:e.kafkaTopic||null}}:"kafkaProducer"===e.operationType?{kafkaProducer:{kafkaTopic:e.kafkaTopic||null}}:null}function dh(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:rh(e),percentageAtMost:ih(e),operation:lh(e)}}function uh(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:rh(e),error:e.keepErrors,durationAtLeastMs:"Duration"===e.ruleType?ah(e):null,percentageAtLeast:ih(e),operation:ch(e)}}function ph(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:rh(e),percentageAtMost:ih(e)??0,operation:ch(e)}}function hh(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:oh(e),operation:lh(e),percentageAtMost:ih(e),notes:e.notes||null}}function mh(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:oh(e),error:"Error"===e.ruleType,durationAtLeastMs:"Duration"===e.ruleType?ah(e):null,operation:ch(e),percentageAtLeast:ih(e),notes:e.notes||null}}function gh(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:oh(e),operation:ch(e),percentageAtMost:ih(e)??0,notes:e.notes||null}}const fh=["5000","1000","500","100","50"],yh=["50","25","10","1","0.5","0.1","0"];function bh(e){if(null==e)return{percentageMode:"all",percentagePreset:"0",customPercentage:""};const t=yh.find(t=>Number(t)===e);return t?{percentageMode:"sample",percentagePreset:t,customPercentage:""}:{percentageMode:"sample",percentagePreset:"custom",customPercentage:String(e)}}function vh(e){if(!e)return{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""};const t=e;if(t.httpServer){return{operationType:"httpServer",routeType:t.httpServer.routePrefix?"routePrefix":"route",route:t.httpServer.route||t.httpServer.routePrefix||"",serverAddress:"",method:t.httpServer.method||"",kafkaTopic:""}}return t.kafkaConsumer?{operationType:"kafkaConsumer",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:t.kafkaConsumer.kafkaTopic||""}:t.kafkaProducer?{operationType:"kafkaProducer",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:t.kafkaProducer.kafkaTopic||""}:{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""}}function xh(e){const t=nh(),n=eh(e.rule.sourceScopes);const r=function(e){return"highlyRelevant"!==e.category?"Relevance":e.rule.error?"Error":null!=e.rule.durationAtLeastMs?"Duration":"Relevance"}(e);let o,i,a={durationPreset:"500",customDurationMs:""},s=!1;switch(e.category){case"noisy":o=function(e){const t=e.rule.operation;if(!t)return{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""};if(t.httpServer)return{operationType:"httpServer",routeType:t.httpServer.routePrefix?"routePrefix":"route",route:t.httpServer.route||t.httpServer.routePrefix||"",serverAddress:"",method:t.httpServer.method||"",kafkaTopic:""};if(t.httpClient)return{operationType:"httpClient",routeType:t.httpClient.templatedPathPrefix?"routePrefix":"route",route:t.httpClient.templatedPath||t.httpClient.templatedPathPrefix||"",serverAddress:t.httpClient.serverAddress||"",method:t.httpClient.method||"",kafkaTopic:""};return{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""}}(e),i=th(l=e.rule.percentageAtMost)?{percentageMode:"all",percentagePreset:"0",customPercentage:""}:bh(l);break;case"highlyRelevant":o=vh(e.rule.operation),i=bh(e.rule.percentageAtLeast),a=function(e){if(null==e)return{durationPreset:"500",customDurationMs:""};const t=fh.find(t=>Number(t)===e);return t?{durationPreset:t,customDurationMs:""}:{durationPreset:"custom",customDurationMs:String(e)}}(e.rule.durationAtLeastMs),s=e.rule.error;break;case"costReduction":o=vh(e.rule.operation),i=bh(e.rule.percentageAtMost)}var l;return{...t,name:e.rule.name||"",notes:e.rule.notes||"",disabled:e.rule.disabled,ruleType:r,sourceScopes:n,...o,...a,keepErrors:s,...i}}var $h;!function(e){e.Default="default",e.Action="action",e.Endpoint="endpoint",e.Scope="scope",e.Duration="duration"}($h||($h={}));const wh=[$h.Action,$h.Endpoint,$h.Scope,$h.Duration],Sh=r.span`
871
+ font-family: ${({theme:e,$isMono:t})=>t?e.font_family.secondary:e.font_family.primary};
872
+ font-size: ${({theme:e})=>e.v2.text.size.xxs}px;
873
+ line-height: 20px;
874
+ color: ${({theme:e,$variant:t})=>{const n=e.v2.colors;switch(t){case"action":return n.green[400];case"endpoint":return n.purple[300];case"scope":return n.yellow[400];case"duration":return n.orange[600];default:return n.white[500]}}};
875
+ `,Ch=r.span`
876
+ display: inline;
877
+ cursor: help;
878
+ text-decoration: underline dotted;
879
+ text-underline-offset: 3px;
880
+ `,Eh=r.div`
881
+ display: flex;
882
+ flex-direction: column;
883
+ gap: 4px;
884
+ background-color: ${({theme:e})=>e.v2.colors.black[500]};
885
+ border-radius: 4px;
886
+ padding: 8px;
887
+ max-width: 300px;
888
+ `,kh=({items:n,children:r})=>{const{popupRef:o,popupOpen:i,setPopupOpen:a,popupPosition:s,handlePosition:l}=td({positionMode:"viewport",defaultClientHeight:48,defaultClientwidth:240}),c=e=>{l(e.clientX,e.clientY),a("mouseleave"!==e.type)};return t(Ch,{onMouseEnter:c,onMouseMove:c,onMouseLeave:c,children:[r,e(Od,{ref:o,isOpen:i,top:s.top,left:s.left,asPortal:!0,style:{backgroundColor:"transparent",border:"none"},borderRadius:"0",padding:"0",maxWidth:"300px",children:e(Eh,{children:n.map((t,n)=>e(uo,{size:io.XXXS,children:t},n))})})]})},Ah=({parts:r})=>{const o=r.map(e=>({...e,text:e.text.trim()})).filter(e=>e.text.length>0);return e(n,{children:o.map((r,o)=>{const i=e(Sh,{$variant:r.variant,$isMono:wh.includes(r.variant),children:r.text});return t(Ut,{children:[0!==o&&e(n,{children:" "}),r.tooltipItems?.length?e(kh,{items:r.tooltipItems,children:i}):i]},`${r.variant}-${o}`)})})};var Dh;!function(e){e.Noisy="noisy",e.HighlyRelevant="highly-relevant",e.CostReduction="cost-reduction"}(Dh||(Dh={}));const Th=[{value:Dh.Noisy,label:"1. Noisy Operations",tooltip:"Rules that reduce noise from high-volume, low-value operations"},{value:Dh.HighlyRelevant,label:"2. Highly Relevant Operations",tooltip:"Rules that prioritize important traces for retention"},{value:Dh.CostReduction,label:"3. Cost Reduction",tooltip:"Rules that optimize costs by sampling less critical data"}],Ih={[Dh.Noisy]:"This is the most efficient way to sample (with Head Sampling). Prefer to use it where possible.",[Dh.HighlyRelevant]:'Any trace from the "Noisy Operations" category is sampled prior to checking highly relevance.',[Dh.CostReduction]:"Cost reduction rules use Tail Sampling to drop traces that are unlikely to be useful for debugging or monitoring."},Nh={[Dh.Noisy]:"Noisy Operations rules list",[Dh.HighlyRelevant]:"Highly Relevant Operations rules list",[Dh.CostReduction]:"Cost Reduction rules list"},Rh={[Dh.Noisy]:"noisy",[Dh.HighlyRelevant]:"highlyRelevant",[Dh.CostReduction]:"costReduction"};function Oh(e){const t=e.kind?String(e.kind).toLowerCase():"deployment";return e.namespace&&e.name?`${t} '${e.name}' in namespace '${e.namespace}'`:e.name?`${t} '${e.name}'`:e.namespace?`any service in namespace '${e.namespace}'`:""}function Ph(e){return`any service in namespace '${e}'`}function Fh(e){return`${e} services`}function _h(e){const t=function(e){if(!e)return[];const t=[];for(const n of e.sources??[]){const e=Oh(n);e&&t.push(e)}for(const n of e.namespaces??[])n&&t.push(Ph(n));for(const n of e.languages??[])n&&t.push(Fh(n));return t}(e);if(!t.length)return[{text:" in ",variant:$h.Default},{text:"any service in the cluster",variant:$h.Scope}];const n=[{text:" in ",variant:$h.Default}],r=t.slice(0,2),o=t.slice(2);return r.forEach((e,t)=>{t>0&&n.push({text:", ",variant:$h.Default}),n.push({text:e,variant:$h.Scope})}),o.length>0&&n.push({text:` + ${o.length} more`,variant:$h.Default,tooltipItems:o}),n}function Lh(e,t){const n=(r=e).startsWith("/")?r.slice(1):r;var r;return t?`${t} /${n}`:`/${n}`}function Mh(e){const t=e.method;return e.route?[{text:" for server endpoint ",variant:$h.Default},{text:Lh(e.route,t),variant:$h.Endpoint}]:e.routePrefix?[{text:" for endpoints under ",variant:$h.Default},{text:Lh(e.routePrefix,t),variant:$h.Endpoint}]:[]}function zh(e){const t=[];if(th(e.percentageAtMost)?t.push({text:"Drop all traces",variant:$h.Action}):(t.push({text:`Keep at most ${e.percentageAtMost}%`,variant:$h.Action}),t.push({text:" of traces",variant:$h.Default})),e.operation){const n=e.operation.httpServer,r=n?function(e){const t=e.method;return e.route?[{text:" where the root span is ",variant:$h.Default},{text:Lh(e.route,t),variant:$h.Endpoint}]:e.routePrefix?[{text:" where the root span is under ",variant:$h.Default},{text:Lh(e.routePrefix,t),variant:$h.Endpoint}]:[]}(n):[];r.length>0&&t.push(...r);const o=e.operation.httpClient,i=o?.templatedPath||o?.templatedPathPrefix,a=o?.serverAddress;if((i||a)&&0===r.length){const e=o?.method,n=i&&a?`${a}/${i}`:i||a;t.push({text:" to ",variant:$h.Default}),e?t.push({text:`${e} /${n}`,variant:$h.Endpoint}):t.push({text:`/${n}`,variant:$h.Endpoint})}}else t.push({text:" on ",variant:$h.Default}),t.push({text:"any operation",variant:$h.Endpoint});return t.push(..._h(e.sourceScopes)),t}function Bh(e){const t=[];if(null!=e.percentageAtLeast?(t.push({text:`Keep ${e.percentageAtLeast}%`,variant:$h.Action}),t.push({text:" of traces",variant:$h.Default})):t.push({text:"Keep all traces",variant:$h.Action}),e.operation){const n=e.operation.httpServer;n&&t.push(...Mh(n))}else t.push({text:" on ",variant:$h.Default}),t.push({text:"any operation",variant:$h.Endpoint});return t.push(..._h(e.sourceScopes)),!e.error&&null!=e.durationAtLeastMs&&e.durationAtLeastMs>0&&(t.push({text:" with duration > ",variant:$h.Default}),t.push({text:`${e.durationAtLeastMs}ms`,variant:$h.Duration})),t}function Uh(e){const t=[];if(t.push({text:`Keep at most ${e.percentageAtMost}%`,variant:$h.Action}),t.push({text:" of traces",variant:$h.Default}),e.operation){const n=e.operation.httpServer,r=n?Mh(n):[];r.length>0&&t.push(...r);const o=e.operation.kafkaConsumer?.kafkaTopic;o&&0===r.length&&(t.push({text:" from ",variant:$h.Default}),t.push({text:`topic '${o}'`,variant:$h.Endpoint}))}else t.push({text:" on ",variant:$h.Default}),t.push({text:"any operation",variant:$h.Endpoint});return t.push(..._h(e.sourceScopes)),t}function jh(e){return e.error?"Error":null!=e.durationAtLeastMs?"Duration":"Relevance"}function Wh(e,t,n){const r=Rh[t],o=[];for(const i of e)switch(t){case Dh.Noisy:for(const e of i.noisyOperations)n?.has(e.ruleId)||o.push({ruleId:e.ruleId,samplingId:i.id,name:e.name??null,disabled:e.disabled,notes:e.notes??null,summary:zh(e),category:r});break;case Dh.HighlyRelevant:for(const e of i.highlyRelevantOperations)n?.has(e.ruleId)||o.push({ruleId:e.ruleId,samplingId:i.id,name:e.name??null,disabled:e.disabled,notes:e.notes??null,summary:Bh(e),category:r,typeBadge:jh(e)});break;case Dh.CostReduction:for(const e of i.costReductionRules)n?.has(e.ruleId)||o.push({ruleId:e.ruleId,samplingId:i.id,name:e.name??null,disabled:e.disabled,notes:e.notes??null,summary:Uh(e),category:r})}return o}function Hh(e,t){switch(e){case"noisy":return zh(t);case"highlyRelevant":return Bh(t);case"costReduction":return Uh(t)}}function Xh(e,t,n,r){for(const o of e)if(o.id===t)switch(r){case"noisy":{const e=o.noisyOperations.find(e=>e.ruleId===n);if(e)return{category:"noisy",samplingId:o.id,rule:e};break}case"highlyRelevant":{const e=o.highlyRelevantOperations.find(e=>e.ruleId===n);if(e)return{category:"highlyRelevant",samplingId:o.id,rule:e};break}case"costReduction":{const e=o.costReductionRules.find(e=>e.ruleId===n);if(e)return{category:"costReduction",samplingId:o.id,rule:e};break}}return null}function Gh(e,t){const n=Xh(e,t.samplingId,t.rule.ruleId,t.category);return n?{...n,summary:Hh(n.category,n.rule)}:null}function Kh(e,t){const n=Xh(e,t.samplingId,t.ruleId,t.category);return n?{...n,summary:Hh(n.category,n.rule)}:null}function Vh(e){if(!e)return null;const t=(e.sources??[]).map(e=>`${e.namespace}/${e.kind}/${e.name}`).sort(),n=(e.namespaces??[]).slice().sort(),r=(e.languages??[]).slice().sort();return t.length||n.length||r.length?[t.join("|"),n.join("|"),r.join("|")].join("::"):null}function Jh(e){return null==e?null:e}function qh(e,t){return JSON.stringify({sourceScopes:Vh(e),operation:Jh(t)})}function Yh(e,t,n,r){return JSON.stringify({sourceScopes:Vh(e),error:t??!1,durationAtLeastMs:(o=n,null==o?null:o),operation:Jh(r)});var o}function Qh(e,t){return JSON.stringify({sourceScopes:Vh(e),operation:Jh(t)})}function Zh(e,t,n,r){switch(t){case"noisy":{const t=qh(n.sourceScopes,n.operation);for(const n of e)for(const e of n.noisyOperations)if((!r||e.ruleId!==r)&&qh(e.sourceScopes,e.operation)===t)return e.ruleId;return null}case"highlyRelevant":{const t=Yh(n.sourceScopes,n.error,n.durationAtLeastMs,n.operation);for(const n of e)for(const e of n.highlyRelevantOperations)if((!r||e.ruleId!==r)&&Yh(e.sourceScopes,e.error,e.durationAtLeastMs,e.operation)===t)return e.ruleId;return null}case"costReduction":{const t=Qh(n.sourceScopes,n.operation);for(const n of e)for(const e of n.costReductionRules)if((!r||e.ruleId!==r)&&Qh(e.sourceScopes,e.operation)===t)return e.ruleId;return null}}}function em(e){if(!e||!e.enabled)return[{text:"Auto rule is ",variant:$h.Default},{text:"disabled",variant:$h.Action}];return[{text:`Keep ${e.keepPercentage??0}%`,variant:$h.Action},{text:" of ",variant:$h.Default},{text:"traces for kubelet health probes in the entire cluster",variant:$h.Scope}]}function tm(e){return!0===e.error&&Zp(e.sourceScopes)&&!e.operation&&(null==e.percentageAtLeast||100===e.percentageAtLeast)}function nm(e){for(const t of e){const e=t.highlyRelevantOperations.find(tm);if(e)return{rule:e,samplingId:t.id}}return null}function rm(e){return!e||e.disabled?[{text:"Auto rule is ",variant:$h.Default},{text:"disabled",variant:$h.Action}]:[{text:"Keep all traces",variant:$h.Action},{text:" of ",variant:$h.Default},{text:"error traces across the entire cluster",variant:$h.Scope}]}function om(e){return Zp(e.sourceScopes)&&!e.operation}function im(e){for(const t of e){const e=t.costReductionRules.find(om);if(e)return{rule:e,samplingId:t.id}}return null}function am(e){return!e||e.disabled?[{text:" is ",variant:$h.Default},{text:"disabled",variant:$h.Action}]:[{text:`Keep at most ${e.percentageAtMost}%`,variant:$h.Action},{text:" of ",variant:$h.Default},{text:"traces across the entire cluster",variant:$h.Scope}]}var sm;!function(e){e.Create="create",e.View="view",e.EditAutoNoisy="edit-auto-noisy",e.EditAutoCostReduction="edit-auto-cost-reduction",e.EditAutoHighlyRelevant="edit-auto-highly-relevant"}(sm||(sm={}));const lm=Vt(null),cm=["50","25","10","1"];function dm(e){const t=String(e);return cm.includes(t)?t:"custom"}const um=({category:t,sourceOptions:n=[],namespaceOptions:r=[],children:o})=>{const{formData:i,handleFormChange:a,resetFormData:s}=Fc(nh(t)),[l,c]=jt(null);Wt(()=>{s(nh(t)),c(null)},[t]);const d=Gt(e=>{c(null),a(void 0,void 0,{...i,...e})},[i,a]),u=Gt(()=>{s(nh(t)),c(null)},[t,s]),p=Xt(()=>({formType:sm.Create,category:t,formData:i,handleChange:d,resetForm:u,duplicateWarning:l,setDuplicateWarning:c,sourceOptions:n,namespaceOptions:r}),[t,i,d,u,l,n,r]);return e(lm.Provider,{value:p,children:o})},pm=({data:t,defaultEditMode:n,sourceOptions:r=[],namespaceOptions:o=[],children:i})=>{const[a,s]=jt(!1),{formData:l,handleFormChange:c,resetFormData:d}=Fc(void 0),u=Ht(null),[p,h]=jt(null);Wt(()=>{t!==u.current&&(u.current=t,t&&n?(d(xh(t)),h(null),s(!0)):(s(!1),h(null)))},[t,n]);const m=Gt(e=>{h(null),c(void 0,void 0,{...l,...e})},[l,c]),g=Gt(()=>{t&&(d(xh(t)),h(null),s(!0))},[t,d]),f=Gt(()=>{s(!1),h(null)},[]),y=Xt(()=>({formType:sm.View,data:t,isEditing:a,formData:l,handleChange:m,handleEdit:g,handleCancelEdit:f,duplicateWarning:p,setDuplicateWarning:h,sourceOptions:r,namespaceOptions:o}),[t,a,l,m,g,f,p,r,o]);return e(lm.Provider,{value:y,children:i})};function hm(e){const[t,n]=jt(()=>0===e?"all":"sample"),[r,o]=jt(()=>dm(e)),[i,a]=jt(()=>"custom"===dm(e)?String(e):"");Wt(()=>{n(0===e?"all":"sample");const t=dm(e);o(t),a("custom"===t?String(e):"")},[e]);const s=Xt(()=>"all"===t?0:"custom"===r?Number(i)||0:Number(r),[t,r,i]);return{percentageMode:t,setPercentageMode:n,percentagePreset:r,setPercentagePreset:o,customPercentage:i,setCustomPercentage:a,resolvedPercentage:s}}const mm=({enabled:t,keepPercentage:n,children:r})=>{const[o,i]=jt(t),a=hm(n);Wt(()=>{i(t)},[t]);const s=Xt(()=>em({enabled:o,keepPercentage:a.resolvedPercentage}),[o,a.resolvedPercentage]),l=Xt(()=>({formType:sm.EditAutoNoisy,localEnabled:o,setLocalEnabled:i,...a,summary:s}),[o,a,s]);return e(lm.Provider,{value:l,children:r})},gm=({enabled:t,dropPercentage:n,children:r})=>{const[o,i]=jt(t),a=hm(n);Wt(()=>{i(t)},[t]);const s=Xt(()=>am(o?{disabled:!1,percentageAtMost:a.resolvedPercentage}:null),[o,a.resolvedPercentage]),l=Xt(()=>({formType:sm.EditAutoCostReduction,localEnabled:o,setLocalEnabled:i,...a,summary:s}),[o,a,s]);return e(lm.Provider,{value:l,children:r})},fm=({enabled:t,children:n})=>{const[r,o]=jt(t);Wt(()=>{o(t)},[t]);const i=Xt(()=>rm(r?{disabled:!1}:null),[r]),a=Xt(()=>({formType:sm.EditAutoHighlyRelevant,localEnabled:r,setLocalEnabled:o,summary:i}),[r,i]);return e(lm.Provider,{value:a,children:n})},ym=t=>{switch(t.formType){case sm.Create:return e(um,{...t});case sm.View:return e(pm,{...t});case sm.EditAutoNoisy:return e(mm,{...t});case sm.EditAutoCostReduction:return e(gm,{...t});case sm.EditAutoHighlyRelevant:return e(fm,{...t})}};function bm(e){const t=Kt(lm);if(!t)throw new Error("useSamplingRulesFormContext must be used within a SamplingRulesFormProvider");if(e&&t.formType!==e)throw new Error(`Expected formType "${e}" but found "${t.formType}"`);return t}const vm=Vt({snapshots:null,setSnapshots:()=>{},isFetching:!1,setIsFetching:()=>{},formData:[],handleSourceChange:()=>{},handleSelectAll:()=>{},formDiff:{},isFormDirty:!1}),xm=({children:t,selectedConnectionIds:n,initialInputs:r})=>{const{tier:o}=ld(),i=o===Ln.Onprem,{selectedStreamName:a}=Jl(),[s,l]=jt(!1),[c,d]=jt(null),[u,p]=jt([]);Wt(()=>{c&&p(e=>{const t=((e,t)=>$n(((e,t)=>e.clusters.filter(({clusterId:e})=>!t||t.includes(e)))(e,t)))(c,n);return t.map(t=>{const n=e?.find(e=>e.clusterId===t.clusterId),o=n??t;if(r?.[t.clusterId]){const e=r[t.clusterId],n=$n(o);return e.forEach(e=>{const t=n.namespaces.find(t=>t.name===e.namespace);if(t)if(e.name&&e.kind){const n=t.workloads.find(t=>t.name===e.name&&t.kind===e.kind);n&&(n.selected=e.selected)}else t.selected=e.selected,e.selected&&t.workloads.forEach(e=>{cd.has(e.kind)&&!i||(e.selected=!0)})}),n}return o})})},[c,n,r]);const{formDiff:h,isFormDirty:m}=Xt(()=>{const e=((e,t,n)=>{const r={};return e.forEach(e=>{e.namespaces.forEach(o=>{const i=t.find(t=>t.clusterId===e.clusterId)?.namespaces.find(e=>e.name===o.name),a=o.selected||!1;if(a!==i?.selected)r[e.clusterId]||(r[e.clusterId]=[]),r[e.clusterId].push({namespace:o.name,selected:a,currentStreamName:n}),a?r[e.clusterId]=r[e.clusterId].filter(e=>e.namespace!==o.name||e.namespace===o.name&&(!e.name||!e.kind)):o.workloads.forEach(t=>{t.selected&&r[e.clusterId].push({namespace:o.name,name:t.name,kind:t.kind,selected:!0,currentStreamName:n})});else{const t=((e,t,n)=>{const r=[];return t.workloads.forEach(o=>{const i=e?.workloads.find(e=>e.name===o.name&&e.kind===o.kind);o.selected!==i?.selected&&r.push({namespace:t.name,name:o.name,kind:o.kind,selected:o.selected||!1,currentStreamName:n})}),r})(i,o,n);t.length>0&&(r[e.clusterId]||(r[e.clusterId]=[]),r[e.clusterId].push(...t))}})}),r})(u,c?.clusters||[],a);return{formDiff:e,isFormDirty:Object.keys(e).length>0}},[u,c,a]),g=Gt(e=>!i&&cd.has(e),[i]),f=Gt(({clusterId:e,workloadId:t,selected:n,auto:r})=>{p(o=>{const i=$n(o),a=i.findIndex(t=>t.clusterId===e);if(-1===a)return i;const s=i[a].namespaces.findIndex(e=>e.name===t.namespace);if(-1===s)return i;if(t.kind&&t.name){const e=i[a].namespaces[s].workloads.findIndex(e=>e.name===t.name&&e.kind===t.kind);if(-1===e)return i;const r="boolean"==typeof n?n:!i[a].namespaces[s].workloads[e].selected;if(i[a].namespaces[s].workloads[e].selected=r,r){i[a].namespaces[s].workloads.filter(e=>!g(e.kind)).every(e=>e.selected)&&(i[a].namespaces[s].selected=!0)}else i[a].namespaces[s].selected=!1}else{const e="boolean"==typeof r?r:!i[a].namespaces[s].selected;i[a].namespaces[s].selected=e,e?i[a].namespaces[s].workloads.forEach(e=>{g(e.kind)||(e.selected=!0)}):"boolean"!=typeof n||n||i[a].namespaces[s].workloads.forEach(e=>{e.selected=!1})}return i})},[g]),y=Gt(({clusterId:e,namespaceName:t,boolean:n,searchText:r="",searchBy:o="",filters:i})=>{p(a=>{const s=$n(a),l=o===jn.Namespace?r:"",c=o===jn.Source?r:"",d=!!l||!!c||!!i?.showOnlySelected;return s.forEach((r,o)=>{e&&r.clusterId!==e||r.namespaces.forEach(({name:e,workloads:r},a)=>{if(!t||e===t)if(d)if(t){r.forEach((e,t)=>{n&&g(e.kind)||pd(e,c,i||{showOnlySelected:!1})&&(s[o].namespaces[a].workloads[t].selected=n)});const e=s[o].namespaces[a].workloads.filter(e=>!g(e.kind)).every(e=>e.selected);s[o].namespaces[a].selected=e}else{if(!ud(s[o].namespaces[a],l,i||{showOnlySelected:!1}))return;s[o].namespaces[a].selected=n,r.forEach((e,t)=>{n&&g(e.kind)||(s[o].namespaces[a].workloads[t].selected=n)})}else s[o].namespaces[a].selected=n,r.forEach((e,t)=>{n&&g(e.kind)||(s[o].namespaces[a].workloads[t].selected=n)})})}),s})},[g]);return e(vm.Provider,{value:{snapshots:c,setSnapshots:d,isFetching:s,setIsFetching:l,formData:u,handleSourceChange:f,handleSelectAll:y,formDiff:h,isFormDirty:m},children:t})},$m=()=>Kt(vm),wm=Vt({formType:void 0}),Sm=({children:t,formType:n})=>{const r=Xt(()=>({formType:n}),[n]);return e(wm.Provider,{value:r,children:t})},Cm=()=>Kt(wm),Em=r.div`
889
+ display: flex;
890
+
891
+ align-items: center;
892
+ gap: 6px;
893
+ margin-bottom: 4px;
894
+ `,km=r(Pc)`
895
+ font-size: 14px;
896
+ opacity: 0.8;
897
+ line-height: 22px;
898
+ overflow: hidden;
899
+ white-space: nowrap;
900
+ text-overflow: ellipsis;
901
+ color: ${({$status:e,theme:t})=>e?t.text[e]:t.text.secondary};
902
+ `,Am=r(Pc)`
903
+ font-size: 12px;
904
+ color: ${({theme:e})=>e.text.darker_grey};
905
+ opacity: 0.8;
906
+ `,Dm=({title:n,required:r,tooltip:o,style:i,status:a})=>n?e(Em,{style:i,children:t(Bd,{text:o,withIcon:!0,children:[e(km,{$status:a,children:n}),!r&&e(Am,{children:"(optional)"})]})}):null,Tm=r.div`
907
+ display: flex;
908
+ flex-direction: column;
909
+ position: relative;
910
+ width: 100%;
911
+ `,Im=r.div`
912
+ width: 100%;
913
+ display: flex;
914
+ align-items: center;
915
+ height: 36px;
916
+ gap: 12px;
917
+ transition: border-color 0.3s;
918
+ border-radius: 32px;
919
+ border: 1px solid ${({theme:e})=>e.colors.border};
920
+ ${({$disabled:e})=>e&&o`
921
+ cursor: not-allowed;
922
+ opacity: 0.6;
923
+ `}
924
+ ${({$isActive:e,$hasError:t,$status:n})=>e?o`
925
+ border-color: ${({theme:e})=>e.colors.secondary};
926
+ `:t?o`
927
+ border-color: ${({theme:e})=>e.text.error};
928
+ `:n?o`
929
+ border-color: ${({theme:e})=>e.text[n]};
930
+ `:""}
931
+ &:hover {
932
+ border-color: ${({theme:e})=>e.colors.secondary};
933
+ }
934
+ &:focus-within {
935
+ border-color: ${({theme:e})=>e.colors.secondary};
936
+ }
937
+ `,Nm=r.input`
938
+ padding-left: ${({$hasIcon:e})=>e?"0":"16px"};
939
+ flex: 1;
940
+ min-width: 150px;
941
+ width: 100%;
942
+ border: none;
943
+ outline: none;
944
+ background: none;
945
+ color: ${({theme:e})=>e.text.secondary};
946
+ font-size: 14px;
947
+ font-family: ${({theme:e})=>e.font_family.primary};
948
+ font-weight: 300;
949
+ &::placeholder {
950
+ color: ${({theme:e})=>e.text.secondary};
951
+ font-family: ${({theme:e})=>e.font_family.primary};
952
+ opacity: 0.4;
953
+ font-size: 14px;
954
+ font-weight: 300;
955
+ line-height: 22px; /* 157.143% */
956
+ }
957
+ &:disabled {
958
+ cursor: not-allowed;
959
+ opacity: 0.6;
960
+ }
961
+ &::-webkit-inner-spin-button,
962
+ &::-webkit-outer-spin-button {
963
+ -webkit-appearance: none;
964
+ margin: 0;
965
+ }
966
+ `,Rm=r.div`
967
+ display: flex;
968
+ align-items: center;
969
+ margin-left: 12px;
970
+ `,Om=r(Rm)`
971
+ cursor: pointer;
972
+ `,Pm=r.button`
973
+ background-color: ${({theme:e})=>e.colors.primary};
974
+ border: none;
975
+ color: ${({theme:e})=>e.text.secondary};
976
+ padding: 8px 16px;
977
+ border-radius: 20px;
978
+ cursor: pointer;
979
+ margin-left: 8px;
980
+ &:hover {
981
+ background-color: ${({theme:e})=>e.colors.secondary};
982
+ }
983
+ &:disabled {
984
+ background-color: ${({theme:e})=>e.colors.border};
985
+ cursor: not-allowed;
986
+ }
987
+ `,Fm=({icon:n,buttonLabel:r,onButtonClick:o,hasError:a,errorMessage:s,title:l,tooltip:c,required:d,value:u,onChange:p,type:h=Xn.Text,name:m,status:g,...f})=>{const y=i(),b=h===Xn.Password,[v,x]=jt(!1);return t(Tm,{children:[e(Dm,{title:l,required:d,tooltip:c,status:g}),t(Im,{$disabled:f.disabled,$hasError:a||!!s,$isActive:!!f.autoFocus,$status:g,children:[b?e(Om,{onClick:()=>x(e=>!e),children:e(v?At:Dt,{size:14,fill:y.text.grey})}):n?e(Rm,{children:e(n,{size:14,fill:y.text.grey})}):null,e(Nm,{"data-id":m,type:v||h===Xn.Number?Xn.Text:h,$hasIcon:!!n||b,name:m,value:u,onChange:e=>{e.stopPropagation(),h===Xn.Number&&(e.target.value=gi(e.target.value)),p?.(e)},onKeyDown:e=>{["Enter"].includes(e.key)||e.stopPropagation()},...f}),r&&o&&e(Pm,{onClick:o,disabled:f.disabled,children:r})]}),!!s&&e(du,{children:s})]})},_m=r.div`
988
+ display: flex;
989
+ flex-direction: column;
990
+ min-width: 120px;
991
+ width: 100%;
992
+ opacity: ${({$disabled:e})=>e?.5:1};
993
+ `,Lm=r.div`
994
+ position: relative;
995
+ `,Mm=r.div`
996
+ display: flex;
997
+ align-items: center;
998
+ justify-content: space-between;
999
+ height: 36px;
1000
+ padding: ${({$isMulti:e,$hasSelections:t})=>e&&t?"0 16px 0 6px":"0 16px"};
1001
+ border-radius: 32px;
1002
+ cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
1003
+
1004
+ ${({$isOpen:e,$isMulti:t,theme:n})=>e&&!t?o`
1005
+ border: 1px solid ${n.text.grey};
1006
+ background: ${n.colors.dropdown_bg_2};
1007
+ `:o`
1008
+ border: 1px solid ${n.colors.border};
1009
+ background: transparent;
1010
+ `};
1011
+
1012
+ ${({$hasError:e,$status:t})=>e?o`
1013
+ border-color: ${({theme:e})=>e.text.error};
1014
+ `:t?o`
1015
+ border-color: ${({theme:e})=>e.text[t]};
1016
+ `:""}
1017
+
1018
+ &:hover {
1019
+ border-color: ${({$isMulti:e,$hasSelections:t,$disabled:n,theme:r})=>n?"auto":e&&t?r.colors.border:r.colors.secondary};
1020
+ }
1021
+ `,zm=r.div`
1022
+ display: flex;
1023
+ align-items: center;
1024
+ gap: 4px;
1025
+ `,Bm=({options:n,value:r,onSelect:o,onDeselect:i,title:a,tooltip:s,placeholder:l,disabled:c=!1,isMulti:d=!1,showSearch:u=!1,required:p=!1,errorMessage:h,hasError:m=!1,status:g})=>{const[f,y]=jt(!1),[b,v]=jt(!1),x=Ht(null);Zc(x,()=>y(!1));const $=()=>{(()=>{if(x.current){const e=x.current.getBoundingClientRect().bottom+300>window.innerHeight;v(e)}})(),y(e=>!e)},w=Array.isArray(r)?r.length:0;return t(_m,{$disabled:c,children:[e(Dm,{title:a,required:p,tooltip:s,status:g}),t(Lm,{ref:x,children:[t(Mm,{$isOpen:f,$isMulti:d,$hasSelections:!!Array.isArray(r)&&!!r.length,$hasError:!!h||m,$status:g,$disabled:c,onClick:()=>!c&&$(),children:[e(Hm,{value:r,placeholder:l,onDeselect:i}),t(zm,{children:[d&&e(Ec,{label:w,filled:!!w}),e(Nu,{extend:f})]})]}),f&&e(Km,{openUpwards:b,options:n,value:r,onSelect:e=>{o?.(e),d||$()},onDeselect:e=>{i?.(e),d||$()},isMulti:d,showSearch:u})]}),!!h&&e(du,{children:h})]})},Um=r(zm)`
1026
+ max-width: calc(100% - 50px);
1027
+ overflow-x: auto;
1028
+ `,jm=r(Pc)`
1029
+ display: flex;
1030
+ align-items: center;
1031
+ gap: 2px;
1032
+ padding: 4px 12px;
1033
+ background: ${({theme:e})=>e.colors.dropdown_bg_2};
1034
+ border-radius: 360px;
1035
+ white-space: nowrap;
1036
+ text-overflow: ellipsis;
1037
+ img {
1038
+ &:hover {
1039
+ transform: scale(2);
1040
+ transition: transform 0.3s;
1041
+ }
1042
+ }
1043
+ `,Wm=r(Pc)``,Hm=({value:n,placeholder:r,onDeselect:o})=>{const a=i();return Array.isArray(n)?n.length?e(Um,{children:n.map(n=>t(jm,{size:14,children:[n.value,e(Dd,{orientation:"vertical",length:"10px",margin:"0 4px"}),e(vt,{size:12,onClick:e=>{e.stopPropagation(),o?.(n)}})]},`multi-label-${n.id}`))}):e(Wm,{size:14,color:a.text.darker_grey,children:r}):e(Wm,{size:14,color:n?.value?void 0:a.text.darker_grey,children:n?.value||r})},Xm=r.div`
1044
+ position: absolute;
1045
+ ${({$openUpwards:e})=>e?"bottom":"top"}: calc(100% + 8px);
1046
+ left: 0;
1047
+ z-index: 1;
1048
+ display: flex;
1049
+ flex-direction: column;
1050
+ overflow-y: auto;
1051
+ width: calc(100% - 16px);
1052
+ max-height: 200px;
1053
+ gap: 8px;
1054
+ padding: 8px;
1055
+ background-color: ${({theme:e})=>e.colors.dropdown_bg_2};
1056
+ border: 1px solid ${({theme:e})=>e.colors.border};
1057
+ border-radius: 24px;
1058
+ `,Gm=r.div`
1059
+ display: flex;
1060
+ flex-direction: column;
1061
+ align-items: center;
1062
+ `,Km=({openUpwards:n,options:r,value:o,onSelect:i,onDeselect:a,isMulti:s,showSearch:l})=>{const[c,d]=jt(""),u=r.filter(e=>e.value?.toLowerCase().includes(c?.toLowerCase()));return t(Xm,{$openUpwards:n,children:[l&&t(Gm,{children:[e(Fm,{placeholder:"Search...",icon:Tt,value:c,onChange:e=>d(e.target.value)}),e(Dd,{thickness:1,margin:"8px 0 0 0"})]}),0===u.length?e(fp,{subTitle:l&&c?void 0:" "}):u.map((t,n)=>e(Jm,{option:t,value:o,isMulti:s,onSelect:i,onDeselect:a},`dropdown-option-${t.id||n}`))]})},Vm=r.div`
1063
+ padding: 8px 12px;
1064
+ cursor: pointer;
1065
+ display: flex;
1066
+ justify-content: space-between;
1067
+ align-items: center;
1068
+ border-radius: 32px;
1069
+ &:hover,
1070
+ &.selected {
1071
+ background: ${({theme:e})=>e.colors.majestic_blue+fc["024"]};
1072
+ }
1073
+ `,Jm=({option:n,value:r,isMulti:o,onSelect:a,onDeselect:s})=>{const l=i(),c=Array.isArray(r)?!!r?.find(e=>e.id===n.id):r?.id===n.id,d=e=>e?a?.(n):s?.(n);return o?e(Vm,{className:c?"selected":"",onClick:()=>d(!c),children:e(hu,{title:n.value||"",titleColor:l.text.secondary,value:c,onChange:d,style:{width:"100%"}})}):t(Vm,{className:c?"selected":"",onClick:()=>c?s?.(n):a?.(n),children:[t(Oo,{$gap:8,children:[n.icon&&e(n.icon,{}),e(Pc,{size:14,children:n.value})]}),c&&e(yt,{})]})},qm=r(Po)`
1074
+ gap: 12px;
1075
+ `,Ym=r(Oo)`
1076
+ width: 100%;
1077
+ gap: 12px;
1078
+ align-items: flex-end;
1079
+ `,Qm=({clientX:n=0,flipX:r,clientY:o=0,flipY:a,isOpen:s,onClose:l,onSave:c,withDelete:d,onDelete:u,title:p,titleTooltip:h,warning:m,children:g})=>{const f=i(),{popupRef:y,popupPosition:b,handlePosition:v}=td({onClickOutside:l});return Yc({key:"Enter",active:s},c),Wt(()=>v(n,o),[n,o]),0===b.top&&0!==o||0===b.left&&0!==n?null:e(Od,{ref:y,isOpen:s,top:a?void 0:b.top,bottom:a?b.top:void 0,left:r?void 0:b.left,right:r?b.left:void 0,padding:"24px",children:t(qm,{children:[e(Bd,{text:h,withIcon:!0,children:e(Pc,{size:14,children:p})}),t(Ym,{children:[g,t(Oo,{$gap:6,children:[e(Wd,{withBorder:!0,onClick:l,tooltip:"Cancel",children:e(vt,{})}),e(Wd,{withBorder:!0,backgroundColor:f.colors.secondary,onClick:c,tooltip:"Save",children:e(yt,{fill:f.text.primary})}),d&&e(Wd,{onClick:u,tooltip:"Undo",children:e(It,{})})]})]}),m&&e(Qd,{type:Gn.Warning,message:m})]})})},Zm=r.div`
1080
+ position: relative;
1081
+ `,eg=({defaultLanguage:n=Bn.Unknown,defaultVersion:r="",defaultOtelDistroName:o=null,handleSave:i})=>{const{tier:a}=ld(),{addNotification:s}=tc(),{formData:l,handleFormChange:c,resetFormData:d}=Fc({language:n,version:r,otelDistroName:o}),[u,p]=jt(!1),h=()=>{p(!1),d()},m=Xt(()=>{if(!l.language)return[];const e=Xl[l.language].community,t=a===Ln.Onprem?Xl[l.language].enterprise:[];return e.concat(t)},[l.language,a]);return t(Zm,{children:[e(Wd,{tooltip:kr.OVERRIDE_RUNTIME_DETAILS,size:32,onClick:()=>{p(!0)},children:e(Nt,{})}),e(Qm,{flipX:!0,clientX:36,isOpen:u,onClose:h,onSave:async()=>{!l.version||li(l.version)?(await i({...l}),h()):s({type:Gn.Warning,message:Er.INVALID_VERSION,hideFromHistory:!0})},withDelete:!0,onDelete:async()=>{await i({language:null,version:"",otelDistroName:null}),h()},title:kr.OVERRIDE_RUNTIME_DETAILS,warning:kr.OVERRIDE_RUNTIME_WARNING,children:t(Po,{$gap:12,children:[t(Oo,{$gap:12,children:[e(Bm,{title:kr.LANGUAGE,options:Wl,value:Wl.find(e=>e.id===l.language),onSelect:e=>{c("language",e.id),c("version",""),c("otelDistroName",null)},required:!0}),e(Fm,{title:kr.RUNTIME_VERSION,placeholder:kr.VERSION_PLACEHOLDER,value:l.version,onChange:e=>c("version",e.target.value),required:!1})]}),l.language&&e(Bm,{title:"Otel Distro Name",options:m,value:m.find(e=>e.id===l.otelDistroName),onSelect:e=>c("otelDistroName",e.id),required:!1})]})})]})},tg=r(Oo)`
1082
+ width: 100%;
1083
+ justify-content: center;
1084
+ `,ng=({containerName:r,runtimeInfo:o,agentEnabled:a,overrides:s,callbackRuntimeOverride:l})=>{const c=i(),d=s?.runtimeInfo??o,u=d?.language??Bn.Unknown,p=d?.runtimeVersion??"",h=null!=s?.runtimeInfo,m=a?.agentEnabled??!1,g=a?.agentEnabledStatus?.message??"",f=a?.otelDistroName??null,y=m?Gn.Success:g?Gn.Info:Gn.Warning,b=m?Kn.INSTRUMENTED:g?Kn.NOT_INSTRUMENTED:Kn.INSTRUMENTING;return e(sp,{title:r,subTitle:`${u?jl[u]:"no runtime info"}`+(p?` • Runtime Version: ${p}`:""),iconProps:{icon:_r(u)},extendableProps:{isExtended:!!g,renderExtended:()=>e(tg,{children:e(Pc,{size:12,family:"secondary",color:c.text.info,children:ci(g)})})},renderActions:()=>t(n,{children:[e(ju,{status:y,title:b,subtitle:f||void 0,withIcon:!0,withBorder:!0}),h&&e(ju,{status:Gn.Default,forceIcon:Rt,title:kr.OVERIDDEN,withIcon:!0,withBorder:!0}),l&&e(eg,{defaultLanguage:u,defaultVersion:p??"",defaultOtelDistroName:f,handleSave:e=>l({...e,containerName:r})})]})})};var rg;!function(e){e.Code="code",e.Badge="badge",e.Loader="loader",e.Divider="divider",e.Monitors="monitors",e.CopyText="copy-text",e.ActiveStatus="active-status"}(rg||(rg={}));const og=r.div`
1085
+ display: flex;
1086
+ flex-wrap: wrap;
1087
+ gap: 16px 32px;
1088
+ width: 100%;
1089
+ `,ig=r.div`
1090
+ display: flex;
1091
+ flex-direction: column;
1092
+ gap: 2px;
1093
+ width: ${({$width:e})=>e};
1094
+ `,ag=r(Pc)`
1095
+ color: ${({theme:e})=>e.text.grey};
1096
+ font-size: 10px;
1097
+ line-height: 16px;
1098
+ `,sg=r(Pc)`
1099
+ font-size: 12px;
1100
+ white-space: pre-wrap;
1101
+ `,lg=({data:n})=>e(og,{children:n?.map(({type:n,title:r,titleIcon:o,tooltip:i,value:a},s)=>t(ig,{$width:n&&[rg.Code].includes(n)?"inherit":n&&[rg.Loader,rg.Divider,rg.CopyText].includes(n)?"100%":"unset",children:[e(Bd,{text:i,withIcon:!0,children:t(Oo,{$alignItems:"center",$gap:4,children:[o&&e(o,{size:14}),!!r&&e(ag,{transform:"capitalize",children:r})]})}),e(cg,{type:n,value:a})]},`data-field-${r||(a?JSON.stringify(a):s)}`))}),cg=({type:t,value:n})=>{const r=i();switch(t){case rg.Divider:return e(Dd,{length:"100%",margin:"0"});case rg.Loader:return e(Fo,{children:e(Tu,{scale:1.2})});case rg.Monitors:return e(tp,{monitors:n?.split(", ")||[],withLabels:!0,color:r.colors.secondary});case rg.Badge:{const{label:t,filled:r,...o}=Zo(n,{label:"-",filled:!1});return e(Ec,{label:t,filled:r,...o})}case rg.Code:{const{language:t,code:r,...o}=Zo(n,{language:"",code:""});return e(Su,{language:t,code:r,...o})}case rg.ActiveStatus:return e(ju,{status:"true"==n?Gn.Success:Gn.Error,title:"true"==n?kr.ENABLED:kr.DISABLED,size:10,withIcon:!0,withBorder:!0});case rg.CopyText:{const t="string"==typeof n?n:JSON.stringify(n);return e(Xu,{value:t})}default:return e(sg,{children:yi("string"==typeof n?n||"-":"")})}},dg=r.div`
1102
+ display: flex;
1103
+ flex-direction: column;
1104
+ align-items: flex-start;
1105
+ align-self: stretch;
1106
+ gap: 16px;
1107
+ padding: 24px;
1108
+ border-radius: 24px;
1109
+ border: 1px solid ${({theme:e})=>e.colors.border};
1110
+ background-color: ${({theme:e,$hovered:t})=>t?e.colors.secondary+fc["010"]:"transparent"};
1111
+ transition: background-color 0.3s;
1112
+ `,ug=r.div`
1113
+ width: 100%;
1114
+ display: flex;
1115
+ flex-direction: column;
1116
+ gap: 4px;
1117
+ cursor: ${({$clickable:e})=>e?"pointer":"default"};
1118
+ `,pg=r(Pc)`
1119
+ width: 100%;
1120
+ display: flex;
1121
+ align-items: center;
1122
+ gap: 8px;
1123
+ font-size: 16px;
1124
+ `,hg=r(Pc)`
1125
+ font-size: 12px;
1126
+ color: ${({theme:e})=>e.text.grey};
1127
+ `,mg=r(Oo)`
1128
+ margin-left: auto;
1129
+ gap: 8px;
1130
+ `,gg=({title:n="Details",titleBadge:r,titleIcon:o,description:i,action:a,withExtend:s,initialExtended:l=!1,data:c,children:d})=>{const[u,p]=jt(l),[h,m]=jt(!1);return t(dg,{$hovered:h,children:[n||o||i||a?t(ug,{$clickable:s||!1,onClick:()=>s&&p(e=>!e),onMouseEnter:()=>s&&m(!0),onMouseLeave:()=>s&&m(!1),children:[t(Oo,{children:[t(Oo,{$alignItems:"center",$gap:8,children:[o&&e(Oo,{$alignItems:"center",children:e(o,{size:20})}),!!n&&e(pg,{transform:"capitalize",children:n}),r===Vn.Loading?e(Tu,{}):void 0!==r&&e(Ec,{label:r})]}),(!!a||s)&&t(mg,{children:["function"==typeof a?e(a,{hovered:h}):a,s&&e(Nu,{extend:u})]})]}),!!i&&e(hg,{children:i})]}):null,(!s||s&&u)&&(d||e(lg,{data:c}))]})},fg=({isOpen:t,noOverlay:n,name:r,type:o,isLastItem:i,onApprove:a,onDeny:s})=>{const l=o===jn.Source?"uninstrument":"delete";return e(au,{isOpen:t,noOverlay:n,title:`${l.charAt(0).toUpperCase()+l.substring(1)}${r?` ${r}`:""}`,description:`Are you sure you want to ${l}?`,note:i?{type:Gn.Warning,title:`You're about to ${l} the last ${o||r}`,message:""}:void 0,approveButton:{text:"Confirm",variant:"danger",onClick:a},denyButton:{text:"Go Back",onClick:s}})},yg=r(Oo)`
1131
+ border-bottom: ${({$hideBorder:e,theme:t})=>e?"none":`1px solid ${t.colors.border}`};
1132
+ `,bg=r.div`
1133
+ display: flex;
1134
+ align-items: center;
1135
+ border-bottom: 2px solid ${({theme:e,$selected:t})=>t?e.colors.majestic_blue:"transparent"};
1136
+ cursor: pointer;
1137
+ `,vg=r(Pc)`
1138
+ padding: 12px;
1139
+ font-size: 14px;
1140
+ color: ${({theme:e,$selected:t})=>t?e.text.secondary:e.text.grey};
1141
+ `,xg=({tabs:n,hideBorder:r=!1})=>n?.length?e(yg,{$hideBorder:r,children:n.map(({label:n,icon:r,onClick:o,selected:i})=>t(bg,{onClick:o,$selected:i,children:[e(vg,{$selected:i,children:n}),r&&e(r,{})]},`tab-${n}`))}):null,$g=r.section`
1142
+ padding: 0px 32px;
1143
+ border-bottom: 1px solid ${({theme:e})=>e.colors.border};
1144
+ `,wg=r.div`
1145
+ height: 76px;
1146
+ display: flex;
1147
+ justify-content: space-between;
1148
+ flex-shrink: 0;
1149
+ align-self: stretch;
1150
+ `,Sg=r.div`
1151
+ display: flex;
1152
+ align-items: center;
1153
+ gap: ${({$gap:e})=>e||16}px;
1154
+ `,Cg=r(Pc)`
1155
+ font-size: 18px;
1156
+ line-height: 26px;
1157
+ max-width: ${({$maxWidth:e})=>e};
1158
+ overflow: hidden;
1159
+ white-space: nowrap;
1160
+ text-overflow: ellipsis;
1161
+ `,Eg=r(Tc)`
1162
+ gap: 8px;
1163
+ `,kg=r(Tc)``,Ag=({onClose:n,width:r,icons:o,iconSrcs:i,title:a,titleTooltip:s,replaceTitleWith:l,actions:c,actionButtons:d=[],tabs:u})=>t($g,{children:[t(wg,{children:[t(Sg,{children:[o?.length||i?.length?e(Zu,{icons:o,iconSrcs:i,id:`drawer-header-${a}`}):null,("function"==typeof l?e(l,{}):l||null)||e(Bd,{text:s||a,withIcon:!!s,children:a&&e(Cg,{$maxWidth:`calc(${r} ${c||d.length?"/ 5":"- 192px"})`,children:a})})]}),t(Sg,{$gap:2,children:[c,d.map((t,n)=>e(Eg,{...t},`header-action-button-${n}`)),e(kg,{"data-id":"drawer-close",variant:"secondary",onClick:n,children:e(vt,{size:12})})]})]}),e(xg,{tabs:u,hideBorder:!0})]}),Dg=r.div`
1164
+ display: flex;
1165
+ justify-content: space-between;
1166
+ gap: 8px;
1167
+ padding: 24px 18px 24px 32px;
1168
+ border-top: 1px solid ${({theme:e})=>e.colors.border};
1169
+ background-color: ${({theme:e})=>e.colors.translucent_bg};
1170
+ transform: translateY(100%);
1171
+ animation-name: ${bc.in.bottom};
1172
+ `,Tg=r(Oo)`
1173
+ margin-right: auto;
1174
+ `,Ig=r(Oo)`
1175
+ margin: 0 auto;
1176
+ `,Ng=r(Oo)`
1177
+ margin-left: auto;
1178
+ `,Rg=r(Tc)`
1179
+ min-width: 140px;
1180
+ font-size: 14px;
1181
+ `,Og=({isOpen:n,leftButtons:r=[],centerButtons:o=[],rightButtons:i=[]})=>n?t(Dg,{children:[e(Tg,{children:r.map((t,n)=>e(Rg,{...t},`footer-left-button-${n}`))}),e(Ig,{children:o.map((t,n)=>e(Rg,{...t},`footer-center-button-${n}`))}),e(Ng,{children:i.map((t,n)=>e(Rg,{...t},`footer-right-button-${n}`))})]}):null,Pg=r.div`
1182
+ position: fixed;
1183
+ top: 0;
1184
+ bottom: 0;
1185
+ ${({$position:e})=>e}: 0;
1186
+ z-index: 1000;
1187
+ width: ${({$width:e})=>e};
1188
+ background: ${({theme:e})=>e.colors.translucent_bg};
1189
+ box-shadow: 0 2px 10px ${({theme:e})=>e.colors.primary+fc["010"]};
1190
+ overflow-y: auto;
1191
+ animation-name: ${({$position:e})=>bc.in[e]};
1192
+ `,Fg=r.div`
1193
+ display: flex;
1194
+ flex-direction: column;
1195
+ height: 100%;
1196
+ `,_g=r.div`
1197
+ flex-grow: 1;
1198
+ padding: 24px 32px;
1199
+ overflow-y: auto;
1200
+ `,Lg=({isOpen:r,onClose:o,closeOnEscape:i=!0,position:a="right",width:s="300px",children:l,header:c,footer:d})=>(Yc({key:"Escape",active:r&&i},()=>o()),Mc(r),r?un.createPortal(t(n,{children:[e(Lo,{hidden:!r,onClick:o}),e(Pg,{"data-id":"drawer",$position:a,$width:s,children:t(Fg,{children:[e(Ag,{onClose:o,width:s,...c}),e(_g,{children:l}),e(Og,{...d})]})})]}),document.body):null),Mg=({error:n})=>{const r=i(),o={container:{display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",color:r.text.error,fontFamily:r.font_family.primary},errorMessage:{padding:10,borderRadius:5,whiteSpace:"pre-wrap",background:r.colors.error},errorStack:{whiteSpace:"pre-wrap",fontSize:"12px"},errorStackWrapper:{textAlign:"left",marginTop:10},infoText:{marginTop:100,color:r.text.secondary,fontSize:"14px"}};return t("div",{style:o.container,children:[e("h2",{children:"Something went wrong!"}),e("pre",{style:o.errorMessage,children:n?.message||"Unknown Error"}),t("details",{style:o.errorStackWrapper,children:[e("summary",{children:"Stack Trace"}),e("pre",{style:o.errorStack,children:n?.stack||"Unknown Stack"})]}),e("p",{style:o.infoText,children:"Try refreshing the page or contact support"}),e(Tc,{variant:"secondary",onClick:()=>window.location.reload(),style:{fontSize:"1rem"},children:"Reload"})]})},zg=({children:t})=>e(gn,{FallbackComponent:({error:t,...n})=>e(gc,{children:e(Mg,{...n,error:t})}),children:t}),Bg=a`
1201
+ 0% {
1202
+ background-position: 0% 50%;
1203
+ }
1204
+ 100% {
1205
+ background-position: 100% 50%;
1206
+ }
1207
+ `,Ug=r(Pc)`
1208
+ background: ${({$textColor:e,$stripColor:t})=>`linear-gradient(45deg, ${e} 0%, ${e} 40%, ${t} 50%, ${e} 60%, ${e} 100%)`};
1209
+ background-size: 250% 100%; /* Expand background to allow movement */
1210
+ background-clip: text;
1211
+ color: transparent;
1212
+ animation: ${Bg} 1s reverse linear infinite;
1213
+ `,jg=({children:t="Loading...",textColor:n,stripColor:r,...o})=>{const a=i(),s=n||a.v2.colors.white[500],l=r||a.v2.colors.black[500];return e(Ug,{$textColor:s,$stripColor:l,...o,children:t})},Wg=r.div`
1214
+ width: 100%;
1215
+ height: 100%;
1216
+
1217
+ * {
1218
+ animation: none !important;
1219
+ transition: none !important;
1220
+ }
1221
+ `,Hg=({width:t="100%",height:n="100%",gap:r=0,elements:o,noAnimation:i=!1,onTopIndexChange:a})=>{const s=Ht(null),l=Xt(()=>r?o.map((t,n)=>e("div",{style:{paddingBottom:r},children:t},`scroll-y-item-${n}`)):o,[o,r]),c=Gt(e=>{if(!a||!s.current)return;const t=s.current.findItemIndex(e);a(t)},[a]),d=e(fn,{ref:s,style:{width:t,height:n},onScroll:a?c:void 0,children:l});return i?e(Wg,{children:d}):d},Xg=r.div`
1222
+ display: flex;
1223
+ flex-direction: column;
1224
+ gap: 16px;
1225
+ ${({$maxWidth:e})=>e&&`max-width: ${e};`}
1226
+ `,Gg=r.div`
1227
+ display: flex;
1228
+ align-items: center;
1229
+ gap: 16px;
1230
+ `,Kg=r.div`
1231
+ width: 50px;
1232
+ height: 50px;
1233
+ border-radius: 8px;
1234
+ background: ${({theme:e})=>`linear-gradient(90deg, ${e.v2.colors.grey[600]} 25%, ${e.v2.colors.grey[600]} 50%, ${e.v2.colors.silver[500]} 75%)`};
1235
+ background-size: 200% 100%;
1236
+ animation: ${$c} 10s infinite linear;
1237
+ `,Vg=r(Po)`
1238
+ flex: 1;
1239
+ gap: 12px;
1240
+ `,Jg=r.div`
1241
+ width: ${({$width:e})=>e};
1242
+ height: 16px;
1243
+ background: ${({theme:e})=>`linear-gradient(90deg, ${e.v2.colors.grey[600]} 25%, ${e.v2.colors.grey[600]} 50%, ${e.v2.colors.silver[500]} 75%)`};
1244
+ background-size: 200% 100%;
1245
+ animation: ${$c} 1.5s infinite linear;
1246
+ border-radius: 4px;
1247
+ `,qg=({size:n=5,maxWidth:r})=>e(Xg,{$maxWidth:r,children:[...Array(n)].map((n,r)=>t(Gg,{children:[e(Kg,{}),t(Vg,{children:[e(Jg,{$width:"80%"}),e(Jg,{$width:"100%"})]})]},r))}),Yg=r.div`
1248
+ display: flex;
1249
+ align-items: center;
1250
+ justify-content: center;
1251
+ gap: 4px;
1252
+ min-width: ${({$minWidth:e})=>e};
1253
+ width: ${({$fullWidth:e})=>e?"100%":"fit-content"};
1254
+ padding: ${({$hasLabel:e})=>e?"4px 8px":"4px"};
1255
+ border-radius: 100px;
1256
+ background-color: ${({$backgroundColor:e})=>e};
1257
+ `,Qg=({label:n,leftIcon:r,rightIcon:o,tooltip:a,status:s=Jn.Unknown,useSecondaryTone:l=!1,invertColors:c=!1,textSize:d,textColor:u,backgroundColor:p,minWidth:h="unset",fullWidth:m=!1})=>{const g=i(),f=n?.toString(),y=Vn.Loading===s,b=s?[Jn.Disabled,Vn.Disabled,Vn.Loading].includes(s)?no(g,s,c?"400":"700"):[Jn.Unknown].includes(s)?no(g,s,"600"):no(g,s,c?l?"500":"300":l?"700":"500"):g.v2.colors.grey[200],v=u||(c&&![Jn.Unknown].includes(s)?b:[Jn.Disabled,Vn.Disabled,Vn.Loading].includes(s)?g.v2.colors.grey[400]:[Gn.Error,Gn.Warning,Gn.Success].includes(s)?g.v2.colors.black[500]:g.v2.colors.white[500]),x=p||(c&&![Jn.Unknown].includes(s)?[Jn.Disabled,Vn.Disabled,Vn.Loading].includes(s)?g.v2.colors.grey[700]:g.v2.colors.silver[700]:b);return e(Bd,{text:a,fullWidth:m,children:t(Yg,{$backgroundColor:x,$minWidth:h,$fullWidth:m,$hasLabel:!!f,children:[y?e(Xo,{withSpinnerOld:!0}):r?e(r,{fill:v,size:14}):null,f?y?e(Xo,{withGradient:!0,title:f,titleSize:d||io.XXS}):e(uo,{color:v,size:d||io.XXS,nowrap:!0,children:f}):null,o&&e(o,{fill:v,size:14})]})})},Zg=r.span`
1258
+ font-family: ${({theme:e})=>e.font_family.primary};
1259
+ font-size: ${({$smallAndDark:e})=>e?"12px":"14px"};
1260
+ font-weight: 400;
1261
+ color: ${({theme:e,$smallAndDark:t})=>t?e.v2.colors.grey[400]:e.v2.colors.silver[200]};
1262
+ `,ef=r.span`
1263
+ font-family: ${({theme:e})=>e.font_family.primary};
1264
+ font-size: 14px;
1265
+ font-weight: 400;
1266
+ color: ${({theme:e})=>e.v2.colors.red[500]};
1267
+ `,tf=({label:n,tooltip:r,required:o,badge:i,width:a,smallAndDark:s})=>n||r||o?t(Oo,{$width:a,$justifyContent:"space-between",children:[n&&e(Zg,{$smallAndDark:s,children:n}),t(Oo,{$gap:4,children:[i&&e(Qg,{...i,textSize:io.XXXS}),o&&e(ef,{children:"*"}),r&&e(Bd,{text:r,withIcon:!0})]})]}):null,nf=({errorMessage:n,warnMessage:r,helpMessage:o})=>{const a=i(),s=n?a.v2.colors.red[500]:r?a.v2.colors.yellow[500]:a.v2.colors.silver[200],l=e(rt,{size:12,fill:s});return n||r||o?t(Oo,{$alignItems:"center",children:[l&&e(Po,{children:l}),e(uo,{size:io.XXS,weight:400,color:s,children:n||r||o})]}):null},rf=r.div`
1268
+ padding: ${({$small:e})=>e?"4px":"6px 12px"};
1269
+
1270
+ display: flex;
1271
+ align-self: stretch;
1272
+ align-items: center;
1273
+ gap: 8px;
1274
+ border-radius: 6px;
1275
+
1276
+ border: 1px solid ${({theme:e,$disabled:t,$error:n})=>t?e.v2.colors.grey[600]:n?e.v2.colors.red[500]:e.v2.colors.silver[500]};
1277
+ background: ${({theme:e,$disabled:t})=>t?e.v2.colors.grey[800]:e.v2.colors.black[500]};
1278
+ ${({$disabled:e,$error:t})=>!e&&!t&&o`
1279
+ &:hover,
1280
+ &:active,
1281
+ &:focus-within {
1282
+ border: 1px solid ${({theme:e})=>e.v2.colors.silver[300]};
1283
+ }
1284
+ `}
1285
+ `,of=r.input`
1286
+ max-width: ${({$maxWidth:e})=>e||"unset"};
1287
+ width: ${({$width:e})=>e||"unset"};
1288
+
1289
+ flex: 1;
1290
+ font-family: ${({theme:e})=>e.font_family.primary};
1291
+ font-size: ${({$small:e})=>e?"12px":"14px"};
1292
+ font-weight: 400;
1293
+
1294
+ cursor: text;
1295
+ color: ${({theme:e})=>e.v2.colors.white[500]};
1296
+ &::placeholder {
1297
+ color: ${({theme:e})=>e.v2.colors.silver[600]};
1298
+ }
1299
+
1300
+ &:disabled {
1301
+ cursor: not-allowed;
1302
+ color: ${({theme:e})=>e.v2.colors.grey[400]};
1303
+ &::placeholder {
1304
+ color: ${({theme:e})=>e.v2.colors.grey[400]};
1305
+ }
1306
+ }
1307
+
1308
+ overflow: hidden;
1309
+ text-overflow: ellipsis;
1310
+ white-space: nowrap;
1311
+ `,af=r.div`
1312
+ display: flex;
1313
+ align-items: center;
1314
+ justify-content: center;
1315
+ cursor: pointer;
1316
+ `,sf=({label:n,required:r,tooltip:o,badge:a,leftIcon:s,rightIcon:l,hasError:c,errorMessage:d,warnMessage:u,helpMessage:p,type:h=Xn.Text,name:m,value:g,onChange:f,disabled:y,maxWidth:b,width:v,small:x=!1,onClick:$,...w})=>{const S=i(),C=h===Xn.Password,[E,k]=jt(!1),[A,D]=jt(null),T=c||!!d||!!A,I=g?S.v2.colors.white[500]:y?S.v2.colors.grey[400]:S.v2.colors.silver[200],N=x?14:18;return t(Po,{$width:v,$gap:6,children:[e(tf,{label:n,tooltip:o,required:r,badge:a}),t(rf,{$small:x,$disabled:y,$error:T,onClick:y?void 0:$,children:[s?e(s,{size:N,fill:I}):null,e(of,{"data-id":m,type:E||h===Xn.Number||h===Xn.Decimal?Xn.Text:h,name:m,value:g,onChange:e=>{e.stopPropagation();const t=e.target.value;if(h===Xn.Number)e.target.value=gi(t),t&&t!==e.target.value?D("Please enter a valid number"):D(null);else if(h===Xn.Decimal){const n=mi(t);let r=n,o=!1;if(n&&!n.endsWith(".")){const e=parseFloat(n);if(!isNaN(e)){const t=null!=w.min?Number(w.min):void 0,n=null!=w.max?Number(w.max):void 0;null!=n&&e>n?(r=String(n),o=!0):null!=t&&e<t&&(r=String(t),o=!0)}}if(e.target.value=r,t&&t!==n)D("Please enter a valid number");else if(o){const e=null!=w.min?Number(w.min):void 0,t=null!=w.max?Number(w.max):void 0;D(`Value must be ${null!=e&&null!=t?`between ${e} and ${t}`:null!=t?`at most ${t}`:`at least ${e}`}`)}else D(null)}f?.(e)},onKeyDown:e=>{["Enter"].includes(e.key)||e.stopPropagation()},disabled:y,$maxWidth:b,$width:v,$small:x,...w}),C?e(af,{onClick:()=>k(e=>!e),children:e(E?At:Dt,{size:N,fill:I})}):l?e(l,{size:N,fill:I}):null]}),e(nf,{errorMessage:A||d,warnMessage:u,helpMessage:p})]})};var lf,cf;!function(e){e.S="s",e.L="l"}(lf||(lf={})),function(e){e.Filled="filled",e.Underline="underline"}(cf||(cf={}));const df=r.div`
1317
+ display: flex;
1318
+ align-items: center;
1319
+ gap: 2px;
1320
+ padding: 3px;
1321
+ border-radius: 8px;
1322
+ border: 1px solid ${({theme:e})=>e.v2.colors.grey[500]};
1323
+ background-color: ${({theme:e})=>e.v2.colors.silver[700]};
1324
+ width: ${({$fullWidth:e})=>e?"100%":"fit-content"};
1325
+ `,uf=r.button`
1326
+ flex: 1;
1327
+ display: flex;
1328
+ align-items: center;
1329
+ justify-content: center;
1330
+ gap: 8px;
1331
+ padding: ${({$size:e})=>e===lf.S?"4px 8px":"8px 16px"};
1332
+ border-radius: 6px;
1333
+ border: 1px solid ${({$isSelected:e,$selectedBorderColor:t})=>e&&t?t:"transparent"};
1334
+ box-shadow: ${({$isSelected:e})=>e?"0 0 11px 0 rgba(0, 0, 0, 0.32)":"none"};
1335
+
1336
+ ${({$disabled:e,$isSelected:t,$selectedBgColor:n,theme:r})=>e?o`
1337
+ cursor: not-allowed;
1338
+ background-color: ${t?(n||r.v2.colors.black[500])+fc["040"]:"transparent"};
1339
+ `:o`
1340
+ cursor: pointer;
1341
+ background-color: ${t?n||r.v2.colors.black[500]:"transparent"};
1342
+ &:hover {
1343
+ background-color: ${t?n||r.v2.colors.black[500]:r.v2.colors.silver[800]};
1344
+ }
1345
+ `}
1346
+ `,pf=r.div`
1347
+ display: flex;
1348
+ align-items: stretch;
1349
+ width: ${({$fullWidth:e})=>e?"100%":"fit-content"};
1350
+ `,hf=r.button`
1351
+ display: flex;
1352
+ height: 34px;
1353
+ padding: 8px 12px 8px 16px;
1354
+ justify-content: center;
1355
+ align-items: center;
1356
+ gap: 8px;
1357
+ border: none;
1358
+ border-bottom: 2px solid ${({theme:e,$isSelected:t})=>t?e.v2.colors.white[500]:"transparent"};
1359
+ border-radius: ${({$isSelected:e})=>e?"6px 6px 0 0":"0"};
1360
+ background-color: ${({theme:e,$isSelected:t})=>t?e.v2.colors.silver[1e3]:"transparent"};
1361
+ cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
1362
+ transition:
1363
+ border-color 0.2s,
1364
+ background-color 0.2s,
1365
+ border-radius 0.2s;
1366
+ &:hover {
1367
+ border-bottom-color: ${({theme:e,$isSelected:t})=>t?e.v2.colors.white[500]:e.v2.colors.grey[500]};
1368
+ }
1369
+ `,mf=({"data-id":r,size:o=lf.L,variant:a=cf.Filled,options:s=[],selected:l,setSelected:c,disabled:d,fullWidth:u})=>{const p=i(),h=a===cf.Underline,m=h?hf:uf;return e(h?pf:df,{"data-id":r,$fullWidth:u,children:s.map(({value:r,label:i,icon:a,tooltip:s,selectedBgColor:u,selectedBorderColor:g,disabled:f},y)=>{const b=l===r,v=f||d,x=v?p.v2.colors.grey[400]:h||b?p.v2.colors.white[500]:p.v2.colors.grey[300],$=o===lf.S?io.XXS:io.XS,w=b?500:400,S=t(n,{children:[a&&e(a,{fill:x}),i&&e(uo,{size:$,weight:w,color:x,nowrap:!0,children:i})]});return e(m,{onClick:()=>!v&&c(r),$disabled:v,$isSelected:b,$size:o,...!h&&{$selectedBgColor:u,$selectedBorderColor:g},children:s?e(Bd,{text:s,withIcon:!0,children:S}):S},`segment-${i||y}-${r}`)})})},gf=r.div`
1370
+ box-sizing: border-box !important;
1371
+ width: ${({$width:e})=>e??"fit-content"};
1372
+ padding: ${({$withSegment:e})=>e?"2px 2px 2px 12px":"6px 12px"};
1373
+ display: flex;
1374
+ align-self: stretch;
1375
+ align-items: center;
1376
+ gap: 8px;
1377
+ overflow: hidden;
1378
+ border-radius: 6px;
1379
+
1380
+ border: none;
1381
+ border-radius: 6px;
1382
+ background: ${({$isHovered:e,$isActive:t,$idleBackgroundColor:n,$emphasizeBackgroundColor:r,theme:o})=>{const i=n??o.v2.colors.silver[800],a=r??o.v2.colors.silver[700];return e||t?a:i}};
1383
+ `,ff=r.input`
1384
+ min-width: 0;
1385
+ flex: 1;
1386
+ font-family: ${({theme:e})=>e.font_family.primary};
1387
+ font-size: 14px;
1388
+ font-weight: 400;
1389
+ line-height: 20px;
1390
+
1391
+ cursor: text;
1392
+ color: ${({$textColor:e})=>e};
1393
+ &::placeholder {
1394
+ color: ${({$textColor:e})=>e};
1395
+ }
1396
+
1397
+ overflow: hidden;
1398
+ text-overflow: ellipsis;
1399
+ white-space: nowrap;
1400
+ `,yf=({"data-id":n,value:r,onChange:o,onFocus:a,onBlur:s,placeholder:l,width:c,segment:d,idleBackgroundColor:u,emphasizeBackgroundColor:p})=>{const h=i(),[m,g]=jt(!1),[f,y]=jt(!1),[b,v]=jt(!1),x=m?h.v2.colors.white[500]:h.v2.colors.silver[200],$=!!d?.options?.length,w=Xt(()=>{if($)return d?.options.find(e=>e.value===d.selected)?.label},[$,d?.options,d?.selected]),S=Xt(()=>l||($&&w?`Search by ${w.toLowerCase()}`:"Search..."),[l,$,w]);return t(gf,{$width:c,$withSegment:$,onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),$isHovered:f&&!b,$isActive:m,$idleBackgroundColor:u,$emphasizeBackgroundColor:p,children:[e(Tt,{size:18,fill:x}),e(ff,{"data-id":n??"search",name:"search",type:"text",placeholder:S,value:r,onChange:e=>{e.stopPropagation(),o(e.target.value)},onFocus:()=>{g(!0),a?.()},onBlur:()=>{g(!1),s?.()},$textColor:x}),$&&e("div",{style:{flexShrink:0},onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),children:e(mf,{"data-id":d["data-id"],options:d.options,selected:d.selected,setSelected:d.setSelected,size:lf.S})})]})};var bf,vf;!function(e){e.Primary="primary",e.Secondary="secondary",e.Text="text"}(bf||(bf={})),function(e){e.S="small",e.M="medium",e.L="large"}(vf||(vf={}));const xf=r.button`
1401
+ display: flex;
1402
+ align-items: center;
1403
+ justify-content: center;
1404
+ gap: 8px;
1405
+ ${({$fullWidth:e})=>e&&o`
1406
+ width: 100%;
1407
+ `}
1408
+ border: none;
1409
+ border-radius: 6px;
1410
+ ${({$size:e,$hasLabel:t})=>e===vf.S?o`
1411
+ height: 32px;
1412
+ ${t?o`
1413
+ padding: 8px 16px;
1414
+ `:o`
1415
+ width: 32px;
1416
+ `}
1417
+ `:e===vf.M?o`
1418
+ height: 38px;
1419
+ ${t?o`
1420
+ padding: 8px 18px;
1421
+ `:o`
1422
+ width: 38px;
1423
+ `}
1424
+ `:o`
1425
+ height: 44px;
1426
+ ${t?o`
1427
+ padding: 8px 22px;
1428
+ `:o`
1429
+ width: 44px;
1430
+ `}
1431
+ `}
1432
+
1433
+ cursor: pointer;
1434
+ &:disabled {
1435
+ background-color: ${({theme:e})=>e.v2.colors.silver[800]};
1436
+ cursor: not-allowed;
1437
+ }
1438
+ &:enabled {
1439
+ ${({$withShadow:e})=>e?o`
1440
+ box-shadow: 0 0 11px 0 rgba(0, 0, 0, 0.32);
1441
+ `:""}
1442
+ ${({$variant:e})=>e===bf.Primary?o`
1443
+ background-color: ${({theme:e})=>e.v2.colors.purple[500]};
1444
+ &:hover {
1445
+ background-color: ${({theme:e})=>e.v2.colors.purple[600]};
1446
+ }
1447
+ &:active {
1448
+ background-color: ${({theme:e})=>e.v2.colors.purple[700]};
1449
+ }
1450
+ `:e===bf.Secondary?o`
1451
+ background-color: ${({theme:e})=>e.v2.colors.silver[750]};
1452
+ &:hover {
1453
+ background-color: ${({theme:e})=>e.v2.colors.silver[600]};
1454
+ }
1455
+ &:active {
1456
+ background-color: ${({theme:e})=>e.v2.colors.silver[500]};
1457
+ }
1458
+ `:e===bf.Text?o`
1459
+ background-color: transparent;
1460
+ &:hover {
1461
+ background-color: ${({theme:e})=>e.v2.colors.silver[800]};
1462
+ }
1463
+ &:active {
1464
+ background-color: ${({theme:e})=>e.v2.colors.silver[900]};
1465
+ }
1466
+ `:""}
1467
+ }
1468
+ `,$f=Bt(({"data-id":r,label:o,tooltip:a,hideTooltipIcon:s,leftIcon:l,rightIcon:c,variant:d=bf.Primary,size:u=vf.M,iconSize:p,loading:h,fullWidth:m,withShadow:g,textColor:f,disabled:y,onClick:b,...v},x)=>{const $=i(),w=p||(u===vf.L?18:16),S=u===vf.L?io.S:io.XS,C=f||(y?$.v2.colors.grey[400]:$.v2.colors.white[500]),[E,k]=jt(!1),A=Gt(async e=>{e.stopPropagation(),k(!0),await(b?.(e)),k(!1)},[b]);return e(xf,{ref:x,"data-id":r,$variant:d,$size:u,$fullWidth:m,$withShadow:g,$hasLabel:!!o,disabled:y,onClick:h||E?void 0:A,...v,children:e(Bd,{text:a,withIcon:!s,children:h||E?o?e(jg,{size:$.v2.text.size[S],textColor:C}):e(Tu,{}):t(n,{children:[l&&e(l,{size:w,fill:C}),o?e(uo,{size:S,weight:500,color:C,nowrap:!0,children:o}):null,c&&e(c,{size:w,fill:C})]})})})});$f.displayName=$f.name;const wf=r.div`
1469
+ display: flex;
1470
+ align-items: center;
1471
+ justify-content: center;
1472
+ width: fit-content;
1473
+ height: fit-content;
1474
+ padding: 8px;
1475
+ border-radius: 100%;
1476
+ background-color: ${({theme:e})=>e.v2.colors.silver[700]};
1477
+ `,Sf=({icon:n=vt,hideIcon:r=!1,title:o="No data",subTitle:a,button:s})=>{const l=i().v2.colors.silver[200];return t(Po,{$gap:12,$alignItems:"center",children:[!r&&e(wf,{children:e(n,{size:32,fill:l})}),t(Po,{$gap:4,$alignItems:"center",children:[e(uo,{size:io.S,align:"center",children:o}),a&&e(uo,{size:io.XXS,align:"center",color:l,children:a})]}),s&&e($f,{variant:bf.Secondary,...s})]})};var Cf;!function(e){e.S="small",e.L="large"}(Cf||(Cf={}));const Ef=r.div`
1478
+ width: fit-content;
1479
+ display: flex;
1480
+ align-items: center;
1481
+ gap: 8px;
1482
+ cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
1483
+ `,kf=r.div`
1484
+ width: ${({$size:e})=>e===Cf.S?"16px":"20px"};
1485
+ height: ${({$size:e})=>e===Cf.S?"16px":"20px"};
1486
+ display: flex;
1487
+ align-items: center;
1488
+ justify-content: center;
1489
+ border-radius: 4px;
1490
+ border: 1px solid ${({$borderColor:e})=>e};
1491
+ background-color: ${({$backgroundColor:e})=>e};
1492
+ `,Af=({name:n,label:r,tooltip:o,badge:a,size:s=Cf.L,disabled:l,partiallyChecked:c,value:d,onChange:u,errorMessage:p,warnMessage:h,helpMessage:m})=>{const g=i(),[f,y]=jt(!1),b=c||d,v=s===Cf.S?12:16,x=l?g.v2.colors.grey[400]:g.v2.colors.white[500],$=b?"transparent":l?g.v2.colors.grey[700]:f?g.v2.colors.silver[400]:g.v2.colors.silver[600],w=l?g.v2.colors.grey[600]:b?g.v2.colors.purple[500]:g.v2.colors.silver[900];return t(Po,{$gap:4,children:[t(Oo,{$justifyContent:"space-between",children:[t(Ef,{"data-id":n||"checkbox"+(r?`-${r}`:""),onClick:e=>{e.stopPropagation(),l||u(!!c||!d)},$disabled:l,onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),children:[e(kf,{$size:s,$borderColor:$,$backgroundColor:w,children:c?e(xt,{size:v,fill:x}):d?e(yt,{size:v,fill:x}):null}),r&&e(uo,{size:s===Cf.S?io.XXS:io.XS,nowrap:!0,children:r})]}),e(tf,{tooltip:o,badge:a})]}),e(nf,{errorMessage:p,warnMessage:h,helpMessage:m})]})},Df=r.div`
1493
+ display: flex;
1494
+ flex-direction: ${({$direction:e})=>e===Fn.Horizontal?"row":"column"};
1495
+ gap: ${({$direction:e})=>e===Fn.Horizontal?16:8}px;
1496
+ `,Tf=({direction:n=Fn.Vertical,title:r,size:o,disabled:i,withSelectAll:a,options:s,values:l,setValues:c})=>{const d=o===Cf.S?io.XXS:io.XS,u=Xt(()=>s.every(e=>l[e.id]),[s,l]),p=Xt(()=>s.some(e=>l[e.id])&&s.some(e=>!l[e.id]),[s,l]),h=(e,t)=>{c(n=>{const r={...n};return e?r[e]=t:s.forEach(e=>r[e.id]=t),r})};return t(Df,{$direction:n,children:[r&&a?e(Af,{label:r,partiallyChecked:p,value:u,onChange:e=>h("",e),size:o}):r&&!a?e(uo,{size:d,children:r}):null,s.map(t=>e(Af,{...t,value:l[t.id],onChange:e=>h(t.id,e),disabled:i,size:o},`${r}-checkbox-${t.id}`))]})};var If,Nf;!function(e){e.Left="left",e.Right="right"}(If||(If={})),function(e){e.Top="top",e.Bottom="bottom"}(Nf||(Nf={}));const Rf=r.div`
1497
+ position: relative;
1498
+ display: flex;
1499
+ flex-direction: column;
1500
+ gap: 4px;
1501
+ `,Of=r.div`
1502
+ position: fixed;
1503
+ ${({$coords:e})=>null!=e.top?`top: ${e.top}px;`:""}
1504
+ ${({$coords:e})=>null!=e.bottom?`bottom: ${e.bottom}px;`:""}
1505
+ ${({$coords:e})=>null!=e.left?`left: ${e.left}px;`:""}
1506
+ ${({$coords:e})=>null!=e.right?`right: ${e.right}px;`:""}
1507
+ ${({$coords:e})=>null!=e.width?`width: ${e.width-16}px;`:""}
1508
+ z-index: ${({theme:e})=>e.v2.zIndex.dropdown};
1509
+
1510
+ display: flex;
1511
+ flex-direction: column;
1512
+ gap: 0;
1513
+
1514
+ min-width: 120px;
1515
+ padding: 8px;
1516
+ border-radius: 6px;
1517
+ background-color: ${({theme:e})=>e.v2.colors.silver[900]};
1518
+ box-shadow: 0 0 24px 0 rgba(0, 0, 0, 0.3);
1519
+ `,Pf=r.div`
1520
+ display: flex;
1521
+ flex-direction: column;
1522
+ gap: 0;
1523
+
1524
+ width: 100%;
1525
+ max-height: ${({$maxHeight:e})=>e||"230px"};
1526
+ overflow-y: auto;
1527
+ `,Ff=r.div`
1528
+ display: flex;
1529
+ align-items: center;
1530
+ gap: 8px;
1531
+ width: calc(100% - 16px);
1532
+ padding: 8px;
1533
+ border-radius: 6px;
1534
+ cursor: pointer;
1535
+ ${({$selected:e})=>e?o`
1536
+ background-color: ${({theme:e})=>e.v2.colors.silver[500]};
1537
+ `:o`
1538
+ background-color: transparent;
1539
+ &:hover {
1540
+ background-color: ${({theme:e})=>e.v2.colors.grey[700]};
1541
+ }
1542
+ `}
1543
+ `,_f=({defaultOpen:n,open:r,onOpenChange:o,alignX:a,alignY:s,items:l,selectedIds:c,setSelectedIds:d,label:u,withMultiSelect:p,withSearch:h,fullWidth:m,maxHeight:g,buttonProps:f,iconButtonProps:y,isLoading:b,emptyMessage:v,children:x})=>{const $=i(),w=void 0!==r,S=!!f||!!y||!!x,[C,E]=jt(n??!S),k=w?r:C,A=Gt(e=>{w||E(e),o?.(e)},[w,o]),[D,T]=jt({x:a||If.Left,y:s||Nf.Bottom}),I=Ht(null);Zc(I,()=>A(!1));const[N,R]=jt({}),O=Gt((e,t)=>{const n=I.current?.getBoundingClientRect();if(!n)return;const r=S?8:0;R({top:t===Nf.Bottom?S?n.bottom+r:n.top:void 0,bottom:t===Nf.Top?S?window.innerHeight-n.top+r:window.innerHeight-n.bottom:void 0,left:e===If.Left?n.left:void 0,right:e===If.Right?window.innerWidth-n.right:void 0,width:m?n.width:void 0})},[S,m]),P=e=>{const t=!k;if(A(t),!t)return;const n={x:a||(e.clientX>window.innerWidth/2?If.Right:If.Left),y:s||(e.clientY>window.innerHeight/2?Nf.Top:Nf.Bottom)};T(n),O(n.x,n.y)};qt(()=>{k&&O(D.x,D.y)},[k,D.x,D.y,O]);const F=e=>{d(p?c.includes(e)?c.filter(t=>t!==e):[...c,e]:[e]),S&&!p&&A(!1)},[_,L]=jt(""),M=Xt(()=>_?l.filter(e=>e?.label?.toLowerCase().includes(_.toLowerCase())):l,[l.length,_]);return t(Rf,{ref:I,children:[u&&e(tf,{label:u}),f&&e($f,{...f,fullWidth:m,rightIcon:k?Ot:Pt,onClick:P}),y&&e(Hc,{...y,onClick:P}),"function"==typeof x?x({ChevronIcon:k?Ot:Pt,handleClick:P}):x,k&&pn(t(Of,{$coords:N,"data-ignore-outside-click":"true",children:[h&&e(yf,{value:_,onChange:L,width:"100%"}),b?e(Xo,{withSpinner:!0,title:"Loading...",titleSize:io.XS}):M.length?e(Pf,{$maxHeight:g,children:M.map(n=>{if(!n)return null;const{id:r,label:o,icon:i,withCheckbox:a}=n,s=c.includes(r);return t(Ff,{"data-id":`option-${r}`,$selected:s&&!a,onClick:()=>F(r),children:[a&&e(Af,{value:s,onChange:()=>F(r)}),i&&e(i,{size:14,fill:n.color||$.v2.colors.white[500]}),e(uo,{size:io.XS,nowrap:!0,color:n.color||ao.Primary,children:o})]},r)})}):e(Ro,{$padding:"6px 0",children:e(Sf,{hideIcon:!0,title:"No results",subTitle:v})}),p&&!!M.length&&e($f,{label:"Done",onClick:()=>A(!1)})]}),document.body)]})},Lf=t=>{const{"data-id":n,options:r,placeholder:o="Search...",isLoading:i}=t,a=!0===t.multiple,[s,l]=jt(""),[c,d]=jt(!1),u=Xt(()=>a?t.value:t.value?[t.value]:[],[a,t.value]),p=Xt(()=>{if(a){const e=u.length;return e?1===e?r.find(e=>e.id===u[0])?.label??"":`${e} selected`:""}return t.value?r.find(e=>e.id===t.value)?.label??"":""},[a,t,r,u]),h=c?s:p,m=Xt(()=>{const e=a?r.map(e=>({...e,withCheckbox:!0})):r;if(!s)return e;const t=s.toLowerCase();return e.filter(e=>e.label.toLowerCase().includes(t))},[a,r,s]),g=Gt(()=>{l(""),d(!0)},[]),f=Gt(e=>{l(e.target.value),c||d(!0),a||e.target.value||!t.value||t.onSelect(null)},[c,a,t]),y=Gt(e=>{d(e),e||l("")},[]),b=Gt(e=>{if(a)return void t.onSelect(e);const n=r.find(t=>t.id===e[0]);n&&(t.onSelect(n),l(""),d(!1))},[a,t,r]),v=c&&(i||m.length>0||s.length>0);return e(_f,{open:v,onOpenChange:y,items:m,selectedIds:u,setSelectedIds:b,withMultiSelect:a,isLoading:i,emptyMessage:`No results matched the filter '${s}'`,fullWidth:!0,alignY:Nf.Bottom,children:e(sf,{name:n,leftIcon:Tt,placeholder:o,value:h,onChange:f,onFocus:g})})},Mf=r.button`
1544
+ width: 100%;
1545
+ padding: 0;
1546
+ padding-right: 12px;
1547
+ display: flex;
1548
+ align-items: center;
1549
+ justify-content: flex-start;
1550
+ gap: 12px;
1551
+ border-radius: 8px;
1552
+ border: none;
1553
+ ${({$hovered:e})=>e?o`
1554
+ background-color: ${({theme:e})=>e.v2.colors.silver[750]};
1555
+ `:o`
1556
+ background-color: ${({theme:e})=>e.v2.colors.silver[800]};
1557
+ `}
1558
+ overflow: hidden;
1559
+ cursor: pointer;
1560
+ &:disabled {
1561
+ cursor: not-allowed;
1562
+ opacity: 0.5;
1563
+ }
1564
+ `,zf=r.div`
1565
+ width: ${({$hasIcon:e})=>e?"56px":"0"};
1566
+ height: 56px;
1567
+ display: flex;
1568
+ align-items: center;
1569
+ justify-content: center;
1570
+ ${({$hovered:e})=>e?o`
1571
+ background-color: ${({theme:e})=>e.v2.colors.silver[600]};
1572
+ `:o`
1573
+ background-color: ${({theme:e})=>e.v2.colors.silver[700]};
1574
+ `}
1575
+ `,Bf=r.div`
1576
+ width: ${({$hasIcon:e})=>e?"calc(100% - 56px)":"100%"};
1577
+ display: flex;
1578
+ justify-content: space-between;
1579
+ align-items: center;
1580
+ gap: 8px;
1581
+ `,Uf=({label:n,icon:r,loading:o,disabled:i,onClick:a})=>{const[s,l]=jt(!1);return t(Mf,{$hovered:s,type:"button",disabled:i||o,onClick:a,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[e(zf,{$hovered:s,$hasIcon:!!r,children:r&&e(r,{size:36})}),t(Bf,{$hasIcon:!!r,children:[o?e(jg,{size:16}):e(uo,{variant:oo.Span,align:"center",children:n}),e(Ft,{rotate:90,size:24})]})]})},jf=({buttons:t})=>e(Po,{$gap:12,children:t.map(t=>e(Uf,{...t},t.label))});var Wf;!function(e){e.Button="button",e.ButtonDropData="button-drop-data"}(Wf||(Wf={}));const Hf=({onAnyClick:t,actions:n})=>e(Oo,{$gap:8,$alignItems:"center",children:n?.map(n=>{if(!n)return null;switch(n.type){case Wf.Button:return e($f,{...n.buttonProps,onClick:e=>{n.buttonProps?.onClick?.(e),t?.()}},n.id);case Wf.ButtonDropData:return e(_f,{...n.dropDataProps,items:n.dropDataProps?.items??[],withMultiSelect:!1,selectedIds:[],setSelectedIds:e=>{n.buttonProps?.onClick?.(e[0]),t?.()},buttonProps:n.buttonProps},n.id);default:return null}})}),Xf=({children:t,fullText:n,...r})=>{const o=Ht(null),[i,a]=jt(!1);qt(()=>{const e=o.current;if(!e)return;const t=()=>{a(e.scrollWidth>e.clientWidth+1)};t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[t]),Wt(()=>{if("undefined"==typeof document||!document.fonts?.ready)return;let e=!1;return document.fonts.ready.then(()=>{const t=o.current;!e&&t&&a(t.scrollWidth>t.clientWidth+1)}),()=>{e=!0}},[t]);const s=i?n??(null==t?"":String(t)):"";return e(Bd,{text:s,fullWidth:!0,ellipsis:!0,keepAlive:!0,children:e(uo,{ref:o,...r,children:t})})},Gf=r.div`
1582
+ display: flex;
1583
+ align-items: center;
1584
+ justify-content: center;
1585
+ padding: 8px;
1586
+ border-radius: 8px;
1587
+ background-color: ${({theme:e})=>e.v2.colors.silver[900]};
1588
+ `,Kf=({icon:n,title:r,subTitle:o,withCopy:i,badge:a,gap:s,children:l})=>{const{CopyButton:c}=Xc();return t(Oo,{$gap:o?8:6,$alignItems:"center",children:[n&&(o?e(Gf,{children:e(n,{size:24})}):e(n,{size:24})),r||a||o?t(Po,{children:[r||a?t(Oo,{$gap:6,$alignItems:"center",children:[r&&e(uo,{nowrap:!0,children:r}),i&&r&&e(c,{value:r,size:jc.XS}),a&&e(Qg,{...a})]}):null,o&&e(uo,{size:io.XXS,color:ao.Secondary,nowrap:!0,children:o})]}):null,e(Oo,{$gap:s,$margin:`0 0 0 ${s??0}px`,$alignItems:"center",children:l})]})},Vf=r.div`
1589
+ display: flex;
1590
+ flex-direction: column;
1591
+ gap: ${({$moreSpacing:e})=>e?"16px":"12px"};
1592
+ width: ${({$width:e="100%",$moreSpacing:t})=>`calc(${e} - ${t?32:24}px)`};
1593
+ align-self: ${({$fullHeight:e})=>e?"stretch":"auto"};
1594
+ padding: ${({$moreSpacing:e})=>e?"16px":"12px"};
1595
+ border-radius: ${({$moreSpacing:e})=>e?"16px":"12px"};
1596
+ background-color: ${({theme:e,$bgTint:t})=>e.v2.colors.silver[t]};
1597
+ `,Jf=r.div`
1598
+ display: flex;
1599
+ align-items: center;
1600
+ flex-wrap: wrap;
1601
+ width: 100%;
1602
+ `,qf=r.div`
1603
+ width: calc(${({$cellsPerRow:e})=>100/e+"%"} - 16px);
1604
+ margin: 8px;
1605
+ display: flex;
1606
+ flex-direction: column;
1607
+ gap: 4px;
1608
+ min-width: 0;
1609
+ `,Yf=({item:n,cellsPerRow:r})=>{const{CopyButton:o}=Xc(),{title:i,titleTooltip:a,label:s,labelTooltip:l,withCopy:c,badge:d}=n;return t(qf,{$cellsPerRow:r,children:[!!i&&e(Bd,{text:a,children:e(Xf,{size:io.XXXS,color:ao.Secondary,nowrap:!0,children:i})}),t(Oo,{$gap:4,children:[d&&e(Qg,{...d}),s&&e(Bd,{text:l,children:e(Xf,{size:io.XS,nowrap:!0,children:s})}),c&&e(o,{value:s||d?.label?.toString()||"",size:jc.XS})]})]})},Qf=({bgTint:n="900",width:r,fullHeight:o=!1,moreSpacing:i=!1,richTitle:a,withCollapse:s,collapseIsDefaultOpen:l,actions:c=[],badges:d=[],cellsPerRow:u,items:p,children:h})=>{const[m,g]=jt(l||!1),f=!s||s&&m;return t(Vf,{$width:r,$bgTint:n,$fullHeight:o,$moreSpacing:i,children:[(a||s)&&t(Oo,{$gap:16,$justifyContent:"space-between",children:[a?e(Kf,{...a}):e("div",{}),t(Oo,{children:[f&&!!c.length&&e(Hf,{actions:c}),d.map(e=>Yt(Qg,{...e,key:e.key||e.label})),s&&e(Oo,{$gap:8,$alignItems:"center",children:e($f,{variant:bf.Text,size:vf.S,leftIcon:m?Ot:Pt,onClick:()=>g(e=>!e)})})]})]}),f&&p?e(Jf,{children:p.map(t=>e(Yf,{item:t,cellsPerRow:u&&u<=p.length?u:p.length},t.id))}):null,f&&h]})};var Zf;!function(e){e.S="small",e.M="medium"}(Zf||(Zf={}));const ey=r.div`
1610
+ display: flex;
1611
+ flex-direction: column;
1612
+ gap: ${({$gap:e})=>e}px;
1613
+ width: ${({$padding:e})=>`calc(100% - ${2*e}px)`};
1614
+ align-self: ${({$fullHeight:e})=>e?"stretch":"auto"};
1615
+ padding: ${({$padding:e})=>e}px;
1616
+ border-radius: 16px;
1617
+ background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
1618
+ `,ty=Bt(({id:n,size:r=Zf.M,fullHeight:o=!1,richTitle:i,customTitle:a,search:s,customSearch:l,filters:c,actions:d,children:u},p)=>{const h=r===Zf.S?4:16,m=r===Zf.S?12:16,g=a??(i?e(Kf,{...i}):null),f=l??(s?e(yf,{...s}):null),y=!!g||!!f,b=!!d&&d.length>0;return t(ey,{ref:p,id:n,"data-section-name":n,$padding:m,$gap:h,$fullHeight:o,children:[y||b?t(Oo,{$gap:h,$justifyContent:"space-between",children:[y?t(Oo,{$gap:h,$alignItems:"center",children:[g,f,c]}):null,b&&e(Hf,{actions:d??[]})]}):null,u]})});ty.displayName="SectionCard";const ny=r.div`
1619
+ flex: 1;
1620
+ align-self: stretch;
1621
+ display: flex;
1622
+ align-items: center;
1623
+ gap: 8px;
1624
+ padding: 16px;
1625
+ border-radius: 12px;
1626
+ background-color: ${({theme:e,$status:t})=>no(e,t,t===Jn.Unknown?"750":"500")};
1627
+ `,ry=r.div`
1628
+ display: flex;
1629
+ align-items: center;
1630
+ justify-content: center;
1631
+ width: fit-content;
1632
+ height: fit-content;
1633
+ padding: 8px;
1634
+ border-radius: 12px;
1635
+ background-color: ${({theme:e,$status:t})=>t===Jn.Unknown?no(e,t,"800"):no(e,t,"900")+fc["015"]};
1636
+ `,oy=({status:n,icon:r,title:o,description:a})=>{const s=i(),l=r??Go(n,s),c=[Gn.Default,Gn.Info,Jn.Disabled,Jn.Unknown].includes(n)?s.v2.colors.white[500]:s.v2.colors.black[500];return t(ny,{$status:n,children:[e(ry,{$status:n,children:e(l,{size:32,fill:c})}),t(Po,{$gap:2,$justifyContent:"center",children:[e(uo,{size:io.M,weight:500,color:c,nowrap:!0,children:o}),e(uo,{size:io.XXS,weight:300,color:c,nowrap:!0,children:a})]})]})},iy=r.div`
1637
+ flex: 0.5;
1638
+ display: flex;
1639
+ flex-direction: column;
1640
+ gap: 12px;
1641
+ padding: 12px;
1642
+ border-radius: 12px;
1643
+ background-color: ${({theme:e})=>e.v2.colors.silver[800]};
1644
+ `,ay=["-","N/A","undefined","null","undefined/undefined","null/null"],sy=({title:n,cells:r})=>{const o=i();return t(iy,{children:[e(uo,{size:io.XXS,color:o.v2.colors.grey[150],children:n}),e(Oo,{$gap:32,children:r.map(r=>t(Po,{$gap:2,children:[!r.isLoading||r.value&&!ay.includes(r.value)?e(uo,{size:r.label?io.M:io.L,children:r.value}):e(Tu,{scale:.9}),r.label&&e(uo,{size:io.XXS,children:r.label})]},`${n}-${r.label}-${r.value}`))})]})};var ly;!function(e){e.CurrentOfMax="currentOfMax",e.GoodAgainstBad="goodAgainstBad"}(ly||(ly={}));const cy=r.div`
1645
+ display: flex;
1646
+ align-items: flex-end;
1647
+ justify-content: space-between;
1648
+ gap: 24px;
1649
+ width: fit-content;
1650
+ `,dy=r.div`
1651
+ position: relative;
1652
+ display: flex;
1653
+ flex-direction: column;
1654
+ align-items: center;
1655
+ width: ${({$width:e})=>e??150}px;
1656
+ flex-shrink: 0;
1657
+ `,uy=r.svg`
1658
+ display: block;
1659
+ width: 100%;
1660
+ height: auto;
1661
+ overflow: visible;
1662
+ `,py=r(Po)`
1663
+ position: absolute;
1664
+ left: 0;
1665
+ right: 0;
1666
+ bottom: 4px;
1667
+ align-items: center;
1668
+ gap: 2px;
1669
+ pointer-events: none;
1670
+ `,hy=r.span`
1671
+ display: inline-block;
1672
+ flex-shrink: 0;
1673
+ width: 9px;
1674
+ height: 9px;
1675
+ border-radius: 50%;
1676
+ background-color: ${({$color:e})=>e};
1677
+ `,my=e=>{if(null==e||""===e)return{number:0,prefix:"",suffix:""};if("number"==typeof e)return{number:e,prefix:"",suffix:""};const t=e.match(/^(\D*)(-?\d*\.?\d+)(.*)$/);return t?{number:parseFloat(t[2]),prefix:t[1]??"",suffix:(t[3]??"").trim()}:{number:0,prefix:"",suffix:""}},gy=10,fy=(e,t,n,r)=>{const o=r*Math.PI/180;return{x:e+n*Math.cos(o),y:t-n*Math.sin(o)}},yy=(e,t,n,r,o)=>{const i=fy(e,t,n,r),a=fy(e,t,n,o),s=r>o?1:0,l=Math.abs(r-o)>180?1:0;return`M ${i.x} ${i.y} A ${n} ${n} 0 ${l} ${s} ${a.x} ${a.y}`},by=({variant:n=ly.CurrentOfMax,gaugeWidth:r,title:o,min:a=0,max:s,current:l,primaryLabel:c,primaryColor:d,secondaryLabel:u,secondaryColor:p})=>{const{number:h}=my(a),{number:m}=my(s),{number:g,prefix:f,suffix:y}=my(l),b=i(),v=((e,t,n)=>Math.min(Math.max(e,t),n))((g-h)/Math.max(m-h,1),0,1),x=180-180*v,$=v>0?yy(60,60,55,180,x):null,w=v<1?yy(60,60,55,x,0):null,S=fy(60,60,55,180),C=fy(60,60,55,0),E=d??(n===ly.GoodAgainstBad?b.v2.colors.green[500]:b.v2.colors.purple[400]),k=p??(n===ly.GoodAgainstBad?b.v2.colors.red[500]:b.v2.colors.silver[500]),[A,D]=jt(null),T=e=>`${f}${e}${y}`,I=n===ly.GoodAgainstBad?Math.max(m-g,0):m,N="primary"===A?c:"secondary"===A?u:"",R="primary"===A?T(g):"secondary"===A?T(I):"",O=()=>D("primary"),P=()=>D("secondary"),F=()=>D(null);return t(cy,{children:[t(dy,{$width:r,children:[e(Bd,{keepAlive:!0,fullWidth:!0,title:N,text:R,children:t(uy,{viewBox:"0 0 120 65",role:"img","aria-label":`${o}: ${g} of ${m}`,children:[$&&e("path",{d:$,fill:"none",stroke:E,strokeWidth:gy,strokeLinecap:1===v?"round":"butt",onMouseEnter:O,onMouseLeave:F}),w&&e("path",{d:w,fill:"none",stroke:k,strokeWidth:gy,strokeLinecap:0===v?"round":"butt",onMouseEnter:P,onMouseLeave:F}),v>0&&e("circle",{cx:S.x,cy:S.y,r:5,fill:E,onMouseEnter:O,onMouseLeave:F}),v<1&&e("circle",{cx:C.x,cy:C.y,r:5,fill:k,onMouseEnter:P,onMouseLeave:F})]})}),o&&t(py,{children:[e(uo,{size:io.XXXS,color:b.v2.colors.grey[150],align:"center",children:o}),e(uo,{size:io.L,weight:500,align:"center",children:`${f}${g}${y}`})]})]}),t(Po,{$gap:7,children:[t(Oo,{$gap:8,$alignItems:"center",children:[e(hy,{$color:E}),e(uo,{size:io.XXXS,color:b.v2.colors.grey[150],nowrap:!0,children:c})]}),t(Oo,{$gap:8,$alignItems:"center",children:[e(hy,{$color:k}),e(uo,{size:io.XXXS,color:b.v2.colors.grey[150],nowrap:!0,children:u})]})]})]})},vy=r(Oo)`
1678
+ width: calc(100% - 20px);
1679
+ padding: 8px 12px;
1680
+ border-radius: 6px;
1681
+ background-color: ${({theme:e,$bgTint:t})=>e.v2.colors.silver[t||"800"]};
1682
+ display: flex;
1683
+ align-items: center;
1684
+ justify-content: space-between;
1685
+ gap: 12px;
1686
+ `,xy=r.div`
1687
+ position: relative;
1688
+ width: ${({$hideCopy:e})=>e?"100%":"calc(100% - 24px - 12px)"};
1689
+ display: flex;
1690
+ align-items: center;
1691
+ gap: 4px;
1692
+ `,$y=r.pre`
1693
+ flex: 1;
1694
+ margin: 0;
1695
+ padding: 0;
1696
+ font-size: 12px;
1697
+ color: #5ffb98; // TODO: add to theme
1698
+ overflow-x: auto;
1699
+ `,wy=r.span`
1700
+ flex-shrink: 0;
1701
+ font-size: 14px;
1702
+ color: #5ffb98; // TODO: add to theme
1703
+ `,Sy=({bgTint:n,label:r,value:o,hideCopy:i=!1,onDone:a})=>{const{CopyButton:s}=Xc({onDone:a}),l=Ht(null),[c,d]=jt(!1);return Wt(()=>{const e=()=>{if(l.current){const{scrollWidth:e,clientWidth:t}=l.current;d(e>t)}};e();const t=new ResizeObserver(e);return l.current&&t.observe(l.current),()=>{t.disconnect()}},[o]),t(Po,{$gap:4,children:[r&&e(uo,{size:io.XXXS,color:ao.Secondary,children:r}),t(vy,{$bgTint:n,children:[t(xy,{$hideCopy:i,children:[e($y,{ref:l,children:o}),c&&e(wy,{children:"..."})]}),!i&&e(s,{value:o,size:jc.XS})]})]})},Cy=r.div`
1704
+ display: flex;
1705
+ align-items: center;
1706
+ gap: 8px;
1707
+ padding: ${({$hideBackground:e})=>e?"0":"16px"};
1708
+ width: ${({$width:e})=>e||"auto"};
1709
+ border-radius: ${({$isExtended:e})=>e?"12px 12px 0 0":"12px"};
1710
+ background-color: ${({$hideBackground:e,$backgroundColor:t})=>e?"transparent":t};
1711
+
1712
+ ${({$withHover:e,$hideBackground:t,$hoverBackgroundColor:n})=>e&&o`
1713
+ cursor: pointer;
1714
+ transition: background 0.2s;
1715
+ &:hover {
1716
+ background-color: ${t?"transparent":n};
1717
+ }
1718
+ `}
1719
+ `,Ey=r.div`
1720
+ display: flex;
1721
+ align-items: center;
1722
+ justify-content: center;
1723
+ flex-shrink: 0;
1724
+ width: 42px;
1725
+ height: 42px;
1726
+ border-radius: 11px;
1727
+ background-color: ${({$backgroundColor:e})=>e};
1728
+ ${({$withClick:e})=>e&&o`
1729
+ cursor: pointer;
1730
+ & * {
1731
+ cursor: pointer;
1732
+ }
1733
+ &:hover {
1734
+ transform: scale(1.2);
1735
+ }
1736
+ `}
1737
+ `,ky=r(Po)`
1738
+ flex: 1;
1739
+ min-width: 0;
1740
+ `,Ay=r.div`
1741
+ display: flex;
1742
+ align-items: center;
1743
+ justify-content: center;
1744
+ flex-shrink: 0;
1745
+ width: 24px;
1746
+ height: 24px;
1747
+ `,Dy=({status:n,title:r,subTitle:o,badgeLabel:a,loading:s,action:l,isExtended:c=!1,toggleExtended:d,invertColors:u=!1,hideIcon:p=!1,hideBackground:h=!1,width:m})=>{const g=i(),f=Go(n,g),y=d?c?Ot:Pt:void 0,b=n===Jn.Unknown,v=n===Jn.Disabled,x=n===Vn.Loading||s,$=[Gn.Error,Gn.Warning,Gn.Success].includes(n),w=no(g,n,v?u?"400":"700":b?"600":u?"300":"500"),S=v?g.v2.colors.grey[400]:u?g.v2.colors.white[500]:$?g.v2.colors.black[500]:g.v2.colors.white[500],C=u&&!b?w:S,E=!u||b||v?"rgba(0, 0, 0, 0.13)":no(g,n,"800"),k=v?g.v2.colors.grey[900]:u||b?g.v2.colors.silver[800]:w,A=v?g.v2.colors.grey[800]:u||b?g.v2.colors.silver[700]:no(g,n,"600");return t(Cy,{$width:m,$withHover:!!d,$isExtended:c,$hideBackground:h,$backgroundColor:k,$hoverBackgroundColor:A,onClick:d,children:[!p&&e(Ey,{$backgroundColor:E,children:x?e(Xo,{withSpinnerOld:!0,scaleSpinnerOld:1.8}):e(f,{size:32,fill:C})}),t(ky,{$gap:4,$justifyContent:"center",children:[t(Oo,{$gap:10,$alignItems:"center",children:[e(uo,{size:io.S,weight:500,color:S,children:r}),a&&e(Qg,{label:a,backgroundColor:g.v2.colors.silver[600],textColor:g.v2.colors.white[500],textSize:io.XXXS})]}),o&&e(uo,{size:io.XXXS,color:S,children:o})]}),l&&e(Ey,{"data-id":l["data-id"],$backgroundColor:g.v2.colors.silver[750],$withClick:!!l.onClick,onClick:l.onClick,children:e(Bd,{text:l.tooltip,children:e(l.icon,{size:32,fill:S})})}),y&&e(Ay,{children:e(y,{size:24,fill:S})})]})},Ty=r.div`
1748
+ display: flex;
1749
+ flex-direction: column;
1750
+ width: 100%;
1751
+ border-radius: 12px;
1752
+ overflow: hidden;
1753
+ `,Iy=r.div`
1754
+ display: flex;
1755
+ flex-direction: column;
1756
+ gap: 8px;
1757
+ padding: 8px 12px 16px 12px;
1758
+ background-color: ${({theme:e})=>e.v2.colors.silver[900]};
1759
+ `,Ny=r.div`
1760
+ display: flex;
1761
+ align-items: center;
1762
+ gap: 8px;
1763
+ `,Ry=r.div`
1764
+ display: flex;
1765
+ align-items: center;
1766
+ justify-content: center;
1767
+ flex-shrink: 0;
1768
+ width: 18px;
1769
+ height: 18px;
1770
+ `,Oy=({conditions:n,title:r,subTitle:o})=>{const a=i(),[s,l]=jt(!1),c=Gt(()=>l(e=>!e),[]),d=Xt(()=>di(n),[n]),{errors:u,hasErrors:p,warnings:h,hasWarnings:m,hasDisableds:g,hasLoadings:f}=Xt(()=>Pr(d),[d]);Wt(()=>{l(p||m||g)},[p,m,g]);const y=Xt(()=>(!d.length||f)&&!p&&!m&&!g,[d.length,f,p,m,g]),b=Xt(()=>p?Gn.Error:m?Gn.Warning:g?Gn.Info:Gn.Success,[p,m,g]),v=Xt(()=>r||(1===d.length?ci(d[0].reason||d[0].type):void 0)||(({hasErrors:e,hasWarnings:t,hasDisableds:n,loading:r})=>{const o="Something isn't right";return e?"Something Failed":t||n?o:r?"Loading...":"Everything Successful"})({hasErrors:p,hasWarnings:m,hasDisableds:g,loading:y}),[r,d,p,m,g,y]),x=Xt(()=>o||1===d.length&&d[0].message||void 0,[o,d]),$=Xt(()=>`${p?u.length:m?h.length:d.length}/${d.length}`,[p,u.length,m,h.length,d.length]);return t(Ty,{children:[e(Dy,{status:b,invertColors:!0,title:v,subTitle:x,badgeLabel:$,loading:y,isExtended:s,toggleExtended:c}),s&&e(Iy,{children:d.map(({status:n,type:r,reason:o,message:i},s)=>{const l=n===Vn.Loading,c=n===Vn.Disabled?Gn.Info:n,d=l?null:Go(c,a),u=n===Gn.Error?no(a,Gn.Error,"500"):n===Gn.Warning?no(a,Gn.Warning,"500"):a.v2.colors.white[500],p=[r,i||o].filter(Boolean).join(" - ");return t(Ny,{children:[e(Ry,{children:l||!d?e(Xo,{withSpinnerOld:!0}):e(d,{size:18})}),e(uo,{size:io.XXXS,color:u,lineHeight:"16px",children:p})]},`condition-${s}`)})})]})};var Py,Fy,_y;!function(e){e.Default="default",e.SuccessError="successError"}(Py||(Py={})),function(e){e.S="small",e.L="large"}(Fy||(Fy={})),function(e){e.Left="left",e.Right="right"}(_y||(_y={}));const Ly=r.div`
1771
+ display: flex;
1772
+ align-items: center;
1773
+ gap: ${({$gap:e})=>e}px;
1774
+ `,My=r.div`
1775
+ position: relative;
1776
+ display: flex;
1777
+ align-items: center;
1778
+ justify-content: space-between;
1779
+
1780
+ width: ${({$size:e})=>2*e+2}px;
1781
+ height: ${({$size:e})=>e}px;
1782
+ padding: ${4}px;
1783
+ border-radius: ${({$size:e})=>2*e}px;
1784
+ background-color: ${({$disabled:e,$onBgColor:t,$offBgColor:n,$variant:r,$value:o,theme:i})=>{if(e)return i.v2.colors.grey[800];if(t&&o)return t;if(n&&!o)return n;switch(r){case Py.SuccessError:return o?i.v2.colors.green[500]:i.v2.colors.red[500];case Py.Default:default:return o?i.v2.colors.purple[500]:i.v2.colors.grey[400]}}};
1785
+
1786
+ border: 1px solid ${({$disabled:e,theme:t})=>e?t.v2.colors.grey[600]:"transparent"};
1787
+ cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
1788
+ `,zy=r.div`
1789
+ position: absolute;
1790
+ top: 50%;
1791
+ left: ${({$value:e,$size:t})=>e?`calc(100% - ${t}px - 4px)`:"4px"};
1792
+ transform: translateY(-50%);
1793
+ width: ${({$size:e})=>e}px;
1794
+ height: ${({$size:e})=>e}px;
1795
+ border-radius: 100%;
1796
+ background-color: ${({$color:e})=>e};
1797
+ 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)"};
1798
+ `,By=({variant:r=Py.Default,size:o=Fy.L,name:a,label:s,labelAlign:l=_y.Right,labelColor:c,tooltip:d,badge:u,value:p,onChange:h,disabled:m,withIcon:g,onIcon:f=yt,offIcon:y=vt,onBgColor:b,offBgColor:v,errorMessage:x,warnMessage:$,helpMessage:w})=>{const S=i(),C=m?S.v2.colors.grey[400]:S.v2.colors.white[500],E=o===Fy.S?10:16,k=c||S.v2.colors.silver[200],A=o===Fy.S?io.XXXS:io.XS,D=o===Fy.S?8:12;return t(Po,{$gap:4,children:[t(Oo,{$justifyContent:"space-between",children:[t(Ly,{"data-id":a||"toggle"+(s?`-${s}`:""),"data-toggle-value":p?"true":"false",$gap:D,children:[s&&l===_y.Left&&e(uo,{color:k,size:A,nowrap:!0,children:s}),t(My,{$onBgColor:b,$offBgColor:v,$variant:r,$size:E,$value:p,$disabled:m,onClick:e=>{e.stopPropagation(),m||h(!p)},children:[e(zy,{$color:C,$size:E,$value:p,$disabled:m}),g&&t(n,{children:[e(f,{size:E,fill:C}),e(y,{size:E,fill:C})]})]}),s&&l===_y.Right&&e(uo,{color:k,size:A,nowrap:!0,children:s})]}),e(tf,{tooltip:d,badge:u})]}),e(nf,{errorMessage:x,warnMessage:$,helpMessage:w})]})},Uy=r.div`
1799
+ display: flex;
1800
+ flex-direction: ${({$direction:e})=>e===Fn.Horizontal?"row":"column"};
1801
+ gap: ${({$direction:e})=>e===Fn.Horizontal?16:8}px;
1802
+ `,jy=({direction:n=Fn.Vertical,title:r,size:o,disabled:i,options:a,values:s,setValues:l})=>{const c=o===Fy.S?io.XS:io.S;return t(Uy,{$direction:n,children:[r&&e(uo,{size:c,children:r}),a.map(t=>e(By,{...t,labelAlign:_y.Right,value:s[t.id],onChange:e=>{return n=t.id,r=e,void l(e=>{const t={...e};return n?t[n]=r:a.forEach(e=>t[e.id]=r),t});var n,r},disabled:i,size:o},`${r}-toggle-${t.id}`))]})},Wy=r.div`
1803
+ display: flex;
1804
+ align-items: center;
1805
+ justify-content: space-between;
1806
+ width: 100%;
1807
+ overflow: hidden;
1808
+ `,Hy=r.div`
1809
+ display: flex;
1810
+ align-items: center;
1811
+ gap: 16px;
1812
+ padding: 6px 0;
1813
+ min-width: 0;
1814
+ flex: 1;
1815
+ overflow: hidden;
1816
+ `,Xy=r.div`
1817
+ display: flex;
1818
+ align-items: center;
1819
+ justify-content: center;
1820
+ flex: 0 0 36px;
1821
+ width: 36px;
1822
+ height: 36px;
1823
+ border-radius: 8px;
1824
+ background: ${({theme:e})=>e.v2.colors.silver[800]};
1825
+ `,Gy=r.img`
1826
+ width: 24px;
1827
+ height: 24px;
1828
+ `,Ky=r.div`
1829
+ display: flex;
1830
+ align-items: center;
1831
+ gap: 16px;
1832
+ flex-shrink: 0;
1833
+ `,Vy=({icon:n,iconSrc:r,title:o,subTitle:i,toggleProps:a,actions:s,onClose:l,onCloseDisabled:c})=>t(Wy,{children:[t(Hy,{children:[n?e(Xy,{children:e(n,{size:24})}):r?e(Xy,{children:e(Gy,{src:r,alt:o||"icon"})}):null,(o||i)&&t(Po,{$gap:6,children:[o&&e(uo,{size:io.S,weight:500,children:o}),i&&e(uo,{size:io.XXS,children:i})]})]}),t(Ky,{children:[a&&e(By,{...a}),s?.length?e(_f,{iconButtonProps:{"data-id":"drawer-actions",icon:_t},items:s,selectedIds:s?.filter(e=>e?.active)?.map(e=>e?.id)??[],setSelectedIds:e=>s?.find(t=>t?.id===e[0])?.onClick?.()}):null,l&&e(Hc,{"data-id":"drawer-close",icon:vt,size:jc.M,onClick:l,disabled:c})]})]}),Jy=r.div`
1834
+ display: flex;
1835
+ align-items: center;
1836
+ gap: 10px;
1837
+ ${({$fullWidth:e})=>e&&o`
1838
+ width: calc(100% - 16px);
1839
+ `}
1840
+ padding: 4px 12px 4px 4px;
1841
+ border-radius: 8px;
1842
+ background-color: ${({theme:e,$status:t})=>no(e,t,[Gn.Info,Gn.Warning].includes(t)?"1000":"900")};
1843
+ `,qy=r.div`
1844
+ width: ${({$smallIcon:e})=>e?"24px":"32px"};
1845
+ height: ${({$smallIcon:e})=>e?"24px":"32px"};
1846
+ display: flex;
1847
+ align-items: center;
1848
+ justify-content: center;
1849
+ border-radius: 6px;
1850
+ background-color: ${({theme:e,$status:t})=>no(e,t,[Gn.Info].includes(t)?"900":"800")};
1851
+ `,Yy=r.div`
1852
+ margin-left: auto;
1853
+ margin-right: 8px;
1854
+ cursor: pointer;
1855
+ &:hover {
1856
+ transform: scale(1.2);
1857
+ }
1858
+ `,Qy=({status:n,message:r,action:o,fullWidth:a,smallIcon:s})=>{const l=i(),c=Go(n,l),d=no(l,n,n===Gn.Default?"300":n===Gn.Info?"400":"500");return t(Jy,{$status:n,$fullWidth:a,children:[e("div",{children:e(qy,{$status:n,$smallIcon:s,children:e(c,{size:s?18:24})})}),e(uo,{color:d,size:io.XXXS,weight:400,children:r}),o&&e(Yy,{"data-id":o["data-id"],onClick:o.onClick,children:e(uo,{color:d,size:io.XXS,weight:500,underline:!0,children:o.label})})]})},Zy=r.div`
1859
+ display: flex;
1860
+ align-items: center;
1861
+ gap: 8px;
1862
+ padding: 4px 12px;
1863
+ `,eb=r.div`
1864
+ flex: 1;
1865
+ `,tb=r.div`
1866
+ width: 150px;
1867
+ `,nb=({note:n,actions:r,children:o})=>o?e(Zy,{children:o}):t(Zy,{children:[n&&e(Qy,{...n}),e(eb,{}),r?.map((t,n)=>e(tb,{children:e($f,{fullWidth:!0,...t})},t["data-id"]||`drawer-footer-button-${n}`))]}),rb=r.div`
1868
+ position: fixed;
1869
+ top: 0;
1870
+ bottom: 0;
1871
+ ${({$position:e})=>e}: 0;
1872
+ z-index: ${({theme:e})=>e.v2.zIndex.drawer};
1873
+
1874
+ display: flex;
1875
+ flex-direction: column;
1876
+ gap: 12px;
1877
+
1878
+ width: calc(${({$width:e})=>e} - 32px);
1879
+ padding: 12px;
1880
+ border-radius: ${({$position:e})=>"left"===e?"0 20px 20px 0":"20px 0 0 20px"};
1881
+ background: ${({theme:e})=>e.v2.colors.black[500]};
1882
+ box-shadow: 0 0 34px 0 rgba(0, 0, 0, 0.7);
1883
+ overflow: hidden;
1884
+
1885
+ ${({$disableAnimation:e,$position:t})=>!e&&o`
1886
+ animation-name: ${bc.in[t]};
1887
+ `}
1888
+ `,ob=r.div`
1889
+ display: flex;
1890
+ flex-direction: column;
1891
+ gap: 12px;
1892
+
1893
+ height: calc(100% - ${56}px);
1894
+ overflow-y: auto;
1895
+ `,ib=({isOpen:r,hideOverlay:o=!1,disableAnimation:i=!1,position:a="right",width:s="600px",header:l,footer:c,children:d})=>(Mc(r),r?pn(t(n,{children:[!o&&e(Lo,{onClick:l?.onCloseDisabled?void 0:l?.onClose}),t(rb,{"data-id":"drawer",$position:a,$width:s,$disableAnimation:i,children:[l&&e(Vy,{...l}),e(ob,{children:d}),c&&e(nb,{...c})]})]}),document.body):null),ab=({options:t,values:n,setValues:r,withMultiSelect:o,withSearch:i,...a})=>{const s=Xt(()=>n?.length?`Selected: ${t.filter(e=>n.includes(e.id)).map(e=>e.label).join(", ")||"none"}`:"",[t,n]);return e(_f,{withMultiSelect:o,withSearch:i,fullWidth:!0,alignX:If.Left,items:t,selectedIds:n,setSelectedIds:r,children:({ChevronIcon:t,handleClick:n})=>e(sf,{placeholder:"Select options...",...a,rightIcon:t,value:s,onChange:()=>{},onClick:n})})},sb=r.header`
1896
+ position: relative;
1897
+ width: calc(100% - 36px);
1898
+ padding: 12px 18px;
1899
+ background-color: ${({theme:e})=>e.v2.colors.black[500]};
1900
+ display: flex;
1901
+ align-items: center;
1902
+ justify-content: space-between;
1903
+ `,lb=r(Oo)`
1904
+ position: absolute;
1905
+ left: 50%;
1906
+ transform: translateX(-50%);
1907
+ gap: 16px;
1908
+ `,cb=({left:n=[],center:r=[],right:o=[]})=>t(sb,{children:[e(Oo,{$gap:16,children:n}),e(lb,{children:r}),e(Oo,{$gap:16,children:o})]}),db=r.div`
1909
+ display: flex;
1910
+ align-items: center;
1911
+ gap: 2px;
1912
+ width: fit-content;
1913
+ padding: 4px;
1914
+ border-radius: 8px;
1915
+ background-color: ${({theme:e})=>e.v2.colors.silver[600]};
1916
+ box-shadow: 0 3px 8px 0 rgba(0, 0, 0, 0.25);
1917
+
1918
+ position: absolute;
1919
+ right: ${({$right:e,$left:t})=>e||(t?"unset":"12px")};
1920
+ left: ${({$left:e})=>e||"unset"};
1921
+ top: 50%;
1922
+ transform: translateY(-50%);
1923
+ `,ub=({isOpen:t,actions:n,positionRight:r,positionLeft:o})=>t?e(db,{$right:r,$left:o,children:n.map(t=>{if(!t)return null;const{tooltip:n,...r}=t;return e(Bd,{text:n||"",children:e($f,{...r,variant:bf.Secondary,size:vf.S})},r.id)})}):null,pb=({values:n,setValues:r,name:o,label:a,tooltip:s,badge:l,required:c,errorMessage:d,warnMessage:u,helpMessage:p,placeholder:h,disabled:m})=>{const g=i(),f=n.length<=1,y=m,b=m||f&&y,v=n.length?n:[""];return t(Po,{"data-id":o,$gap:6,children:[e(tf,{label:a,tooltip:s,required:c,badge:l}),e(Po,{$gap:8,children:v.map((o,i)=>{const a=i===v.length-1;return t(Oo,{$gap:8,$alignItems:"center",children:[e(sf,{width:"100%",autoFocus:ni(o)&&!f&&a,value:o,onChange:e=>((e,t)=>{const o=[...n||[]];o[t]=e,r(o)})(e.target.value,i),disabled:m,placeholder:h,hasError:!!d}),a&&e($f,{leftIcon:Ct,variant:bf.Secondary,size:vf.S,disabled:y,onClick:()=>(()=>{const e=[...n||[]];e.push(""),r(e)})()}),e($f,{leftIcon:b?It:()=>e(It,{fill:g.v2.colors.red[500]}),variant:bf.Secondary,size:vf.S,disabled:b,onClick:()=>(e=>{const t=[...n||[]].filter((t,n)=>n!==e);t.length||t.push(""),r(t)})(i)})]},`input-list-${i}`)})}),e(nf,{errorMessage:d,warnMessage:u,helpMessage:p})]})},hb=({col:t,colIdx:n,row:r,rowIdx:o,rowsLength:i,handleChange:a,errorMessage:s,disabled:l})=>{const{keyName:c,componentType:d,inputType:u,label:p,placeholder:h,options:m,renderCondition:g}=t,f=r[c];if(g&&!g(r))return null;switch(d){case Hn.Dropdown:case"multi-dropdown":{const t="multi-dropdown"===d,n=Array.isArray(f)?f:null!=f&&""!==f?[String(f)]:[],r=m?.filter(e=>n.includes(e.id)).map(e=>e.id)||[];return e(ab,{name:c,label:h?p:void 0,placeholder:h||p,options:m||[],withMultiSelect:t,withSearch:t,values:r,setValues:e=>a(c,t?e:e[0]??"",o),disabled:l,hasError:!!s},c)}default:const t=i>1&&0===o&&0===n&&ni(f);return e(sf,{name:c,label:h?p:void 0,placeholder:h||p,autoFocus:t,type:u,value:f,onChange:({target:{value:e}})=>a(c,e,o),disabled:l,hasError:!!s})}},mb=r.table`
1924
+ width: 100%;
1925
+ border-collapse: separate;
1926
+ border-spacing: 0 8px;
1927
+ `,gb=r.td`
1928
+ padding: 0 8px 0 0;
1929
+ `,fb=r.td`
1930
+ width: 72px;
1931
+ padding-bottom: 2px;
1932
+ vertical-align: bottom;
1933
+ `,yb=({columns:n,values:r,setValues:o,name:a,label:s,tooltip:l,badge:c,required:d,disabled:u,errorMessage:p,warnMessage:h,helpMessage:m,limitFieldsPerRow:g})=>{const f=i(),y=Xt(()=>{const e={};return n.forEach(({keyName:t})=>e[t]=""),e},[n]),b=(e,t,n)=>{const i=r.length?$n(r):[$n(y)];i[n][e]=t,o(i)},v=Xt(()=>{if(g){const e=[];for(let t=0;;t+=g){const r=n.slice(t,t+g);if(!r.length)break;e.push(r)}return e}return[n]},[g,n]),x=r.length?r:[y];return t(Po,{"data-id":a,$gap:0,children:[e(tf,{label:s,tooltip:l,required:d,badge:c}),e(mb,{children:e("tbody",{children:x.map((n,i)=>{const a=i===x.length-1;return t(Ut,{children:[g&&i>0?e("tr",{children:e(gb,{colSpan:v.length})}):null,v.map((s,l)=>t("tr",{children:[s.map((t,r)=>t.renderCondition&&!t.renderCondition(n)?null:e(gb,{children:e(hb,{col:t,colIdx:r,row:n,rowIdx:i,rowsLength:x.length,handleChange:b,disabled:u,errorMessage:p})},`input-table-row-${i}-col-${l}-${r}`)),0===l&&e(fb,{children:t(Oo,{$gap:8,$justifyContent:"flex-end",children:[a&&e($f,{leftIcon:Ct,variant:bf.Secondary,size:vf.S,disabled:u,onClick:()=>(()=>{const e=$n(r);e.push($n(y)),o(e)})()}),e($f,{leftIcon:u?It:()=>e(It,{fill:f.v2.colors.red[500]}),variant:bf.Secondary,size:vf.S,disabled:u,onClick:()=>(e=>{const t=r.filter((t,n)=>n!==e);t.length||t.push($n(y)),o(t)})(i)})]})})]},`input-table-matrix-${i}-${l}`))]},`input-table-row-${i}`)})})}),e(nf,{errorMessage:p,warnMessage:h,helpMessage:m})]})},bb=r.div`
1934
+ display: flex;
1935
+ align-items: center;
1936
+ justify-content: space-between;
1937
+ gap: 32px;
1938
+
1939
+ padding: 18px 16px;
1940
+ border-radius: 18px;
1941
+ background-color: ${({theme:e})=>e.v2.colors.black[500]+fc["095"]};
1942
+ box-shadow: 0 4px 16.7px 0 rgba(0, 0, 0, 0.83);
1943
+
1944
+ position: fixed;
1945
+ bottom: 0;
1946
+ left: 50%;
1947
+ z-index: ${({theme:e})=>e.v2.zIndex.island};
1948
+ animation-name: ${bc.in.center};
1949
+ `,vb=({isOpen:n,onClose:r,richTitle:o,actions:i})=>n?t(bb,{children:[e(Kf,{...o}),e(Hf,{onAnyClick:r,actions:i})]}):null,xb=r.div`
1950
+ position: ${({$relativeToParent:e})=>e?"absolute":"fixed"};
1951
+ top: 50%;
1952
+ left: 50%;
1953
+ transform: translate(-50%, -50%);
1954
+ z-index: ${({theme:e})=>e.v2.zIndex.modal};
1955
+ width: fit-content;
1956
+ border-radius: 20px;
1957
+ background: ${({theme:e})=>e.v2.colors.black[500]};
1958
+ box-shadow: 0 0 34px 0 rgba(0, 0, 0, 0.7);
1959
+ overflow: hidden;
1960
+
1961
+ /* Promote to its own composited layer and isolate paint/layout so descendant
1962
+ re-renders during the slide animation can't trigger reflows of the rest of
1963
+ the page. Without this, the global \`* { transition: all 300ms }\` rule plus
1964
+ a heavy modal body (forms, etc.) make the close visibly stutter. */
1965
+ will-change: transform;
1966
+ contain: layout paint;
1967
+
1968
+ animation-name: ${({$closing:e})=>e?bc.out.center:bc.in.center};
1969
+ /* Snappier close: shorter duration with an ease-in curve. The slide-in keeps
1970
+ the global 300ms default which pairs with the fade-in for a soft entrance. */
1971
+ animation-duration: ${({$closing:e})=>e?"180ms":"300ms"};
1972
+ animation-timing-function: ${({$closing:e})=>e?"cubic-bezier(0.4, 0, 1, 1)":"cubic-bezier(0, 0, 0.2, 1)"};
1973
+
1974
+ /* Block hover/click work on form children mid-close so their transitions
1975
+ don't compete with the slide-out. */
1976
+ ${({$closing:e})=>e&&"pointer-events: none;"}
1977
+ `,$b=r(Lo)`
1978
+ will-change: opacity;
1979
+ animation-name: ${({$closing:e})=>e?wc.out:wc.in};
1980
+ animation-duration: ${({$closing:e})=>e?"180ms":"300ms"};
1981
+
1982
+ /* The blurred backdrop is the most expensive thing on screen during the close
1983
+ — animating opacity on a backdrop-filtered element forces a full GPU
1984
+ recomposite per frame. Drop the blur while closing; visually identical
1985
+ because the overlay is fading to 0. */
1986
+ ${({$closing:e})=>e&&"backdrop-filter: none; pointer-events: none;"}
1987
+ `,wb=r.div`
1988
+ position: relative;
1989
+ `,Sb=r.div`
1990
+ position: absolute;
1991
+ top: 16px;
1992
+ left: 16px;
1993
+ `,Cb=({isOpen:r,hideOverlay:o=!1,relativeToParent:i=!1,onBack:a,onClose:s,onCloseEnd:l,children:c})=>{const[d,u]=jt(r),[p,h]=jt(!1);if(Wt(()=>{r?(u(!0),h(!1)):d&&h(!0)},[r]),Mc(d),!d)return null;const m=t(n,{children:[!o&&e($b,{$relativeToParent:i,$closing:p,onClick:p?void 0:s}),e(xb,{"data-id":"modal",$relativeToParent:i,$closing:p,onAnimationEnd:e=>{e.target===e.currentTarget&&p&&(u(!1),h(!1),l?.())},children:t(wb,{children:[a&&e(Sb,{children:e(Hc,{icon:t=>e(Ft,{rotate:-90,...t}),size:jc.L,onClick:a})}),c]})})]});return i?m:pn(m,document.body)},Eb=r.div`
1994
+ position: relative;
1995
+ width: ${64}px;
1996
+ height: ${({$height:e})=>e};
1997
+ flex-shrink: 0;
1998
+ `,kb=r.aside`
1999
+ position: absolute;
2000
+ top: 0;
2001
+ left: 0;
2002
+ bottom: 0;
2003
+ display: flex;
2004
+ flex-direction: column;
2005
+ gap: 8px;
2006
+ width: ${({$expanded:e})=>e?"220px":"64px"};
2007
+ padding: 16px ${12}px;
2008
+ box-sizing: border-box;
2009
+ background-color: ${({theme:e})=>e.v2.colors.black[500]};
2010
+ overflow-x: hidden;
2011
+ overflow-y: auto;
2012
+ z-index: 10;
2013
+ transition:
2014
+ width 200ms ease,
2015
+ padding 200ms ease;
2016
+ `,Ab=r.button`
2017
+ display: flex;
2018
+ align-items: center;
2019
+ width: 100%;
2020
+ min-width: 0;
2021
+ height: ${40}px;
2022
+ padding: 0;
2023
+ margin: 0;
2024
+ border: none;
2025
+ border-radius: 6px;
2026
+ box-sizing: border-box;
2027
+ cursor: pointer;
2028
+ font: inherit;
2029
+ background-color: ${({theme:e,$selected:t})=>t?e.v2.colors.purple[500]:"transparent"};
2030
+ &:hover {
2031
+ background-color: ${({theme:e,$selected:t})=>t?e.v2.colors.purple[600]:e.v2.colors.silver[800]};
2032
+ }
2033
+ &:active {
2034
+ background-color: ${({theme:e,$selected:t})=>t?e.v2.colors.purple[700]:e.v2.colors.silver[900]};
2035
+ }
2036
+ `,Db=r.div`
2037
+ width: ${40}px;
2038
+ height: ${40}px;
2039
+ display: flex;
2040
+ align-items: center;
2041
+ justify-content: center;
2042
+ flex-shrink: 0;
2043
+ `,Tb=r.div`
2044
+ flex: 1 1 0;
2045
+ min-width: 0;
2046
+ overflow: hidden;
2047
+ padding-right: 12px;
2048
+ pointer-events: none;
2049
+ `,Ib=({height:n,icons:r})=>{const o=i(),[a,s]=jt(!1);return e(Eb,{$height:n,children:e(kb,{$expanded:a,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),children:r.map(({id:n,label:r,selected:i,icon:s,onClick:l})=>t(Ab,{$selected:i,onClick:l,"aria-label":r,title:a?void 0:r,children:[e(Db,{children:e(s,{size:24,fill:o.v2.colors.white[500]})}),a&&e(Tb,{children:e(uo,{size:io.S,weight:500,color:ao.Primary,nowrap:!0,children:r})})]},n))})})};var Nb;!function(e){e.S="small",e.L="large"}(Nb||(Nb={}));const Rb=r.div`
2050
+ width: fit-content;
2051
+ display: flex;
2052
+ align-items: center;
2053
+ gap: 8px;
2054
+ cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
2055
+ `,Ob=r.div`
2056
+ width: ${({$size:e})=>e===Nb.S?"16px":"20px"};
2057
+ height: ${({$size:e})=>e===Nb.S?"16px":"20px"};
2058
+ display: flex;
2059
+ align-items: center;
2060
+ justify-content: center;
2061
+ border-radius: 100%;
2062
+ border: 1px solid ${({$borderColor:e})=>e};
2063
+ background-color: ${({$backgroundColor:e})=>e};
2064
+ `,Pb=({"data-id":n,label:r,value:o,onChange:a,disabled:s,size:l=Nb.L})=>{const c=i(),[d,u]=jt(!1),p=o,h=l===Nb.S?6:8,m=s?c.v2.colors.grey[400]:c.v2.colors.white[500],g=p?"transparent":s?c.v2.colors.grey[700]:d?c.v2.colors.silver[400]:c.v2.colors.silver[600],f=s?c.v2.colors.grey[600]:p?c.v2.colors.purple[500]:c.v2.colors.silver[900];return t(Rb,{"data-id":n??"radio"+(r?`-${r}`:""),onClick:e=>{e.stopPropagation(),s||a(!o)},$disabled:s,onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),children:[e(Ob,{$size:l,$borderColor:g,$backgroundColor:f,children:o?e(Lt,{size:h,fill:m}):null}),r&&e(uo,{size:l===Nb.S?io.XXS:io.XS,children:r})]})},Fb=r.div`
2065
+ display: flex;
2066
+ flex-direction: ${({$flexDirection:e})=>e};
2067
+ gap: ${({$gap:e})=>e}px;
2068
+ `,_b=({label:n,direction:r,disabled:o,size:i,options:a,values:s,setValues:l})=>t(Fb,{$flexDirection:r===Fn.Horizontal?"row":"column",$gap:r===Fn.Horizontal?16:8,children:[n&&e(uo,{children:n}),a.map(t=>e(Pb,{...t,value:s[t.id],onChange:e=>{return n=t.id,r=e,void l(e=>{const t={...e};return Object.keys(t).forEach(e=>t[e]=!1),t[n]=r,t});var n,r},disabled:o,size:i},`${n}-radio-${t.id}`))]}),Lb=({currentStep:n,data:r,gap:o=12})=>e(Po,{$gap:o,children:r.map(r=>{const o=r.step<n,i=r.step===n;return t(Oo,{$gap:8,children:[o||r.forceDoneBadge?e(Qg,{status:Gn.Success,label:"",leftIcon:yt}):e(Qg,{status:Gn.Default,label:r.step.toString()}),e(uo,{size:i?io.M:io.XS,weight:i?500:400,opacity:i?1:.7,children:r.label})]},`stepper-item-${r.step}`)})});var Mb;!function(e){e.Data="data",e.Pretty="pretty"}(Mb||(Mb={}));const zb=r.div`
2069
+ height: ${({$maxHeight:e})=>e};
2070
+ width: 100%;
2071
+ display: flex;
2072
+ flex-direction: column;
2073
+ overflow: hidden;
2074
+ `,Bb=r.div`
2075
+ width: 100%;
2076
+ flex: 1;
2077
+ display: flex;
2078
+ flex-direction: column;
2079
+ `,Ub=r.div`
2080
+ flex-shrink: 0;
2081
+ position: relative;
2082
+ z-index: 2;
2083
+ `,jb=r.div`
2084
+ position: relative;
2085
+ display: flex;
2086
+ width: 100%;
2087
+ `,Wb=r.div`
2088
+ position: relative;
2089
+ min-width: ${({$minWidth:e})=>e?`${e}px`:"auto"};
2090
+ flex: ${({$flex:e})=>e??1};
2091
+ padding: 18px 24px;
2092
+ border: none;
2093
+ border-radius: ${({$isFirst:e,$isLast:t})=>e?"4px 0 0 0":t?"0 4px 0 0":"0"};
2094
+ box-sizing: border-box;
2095
+
2096
+ ${({$variant:e,$backgroundColor:t})=>{if(t)return o`
2097
+ background-color: ${t};
2098
+ `;switch(e){case Mb.Data:return o`
2099
+ background-color: ${({theme:e})=>e.v2.colors.silver[750]};
2100
+ `;case Mb.Pretty:return o`
2101
+ background-color: transparent;
2102
+ `;default:return""}}}
2103
+ `,Hb=r.div`
2104
+ position: absolute;
2105
+ top: 50%;
2106
+ right: 0;
2107
+ transform: translateY(-50%);
2108
+ width: 1px;
2109
+ height: 18px;
2110
+ background: ${({theme:e})=>e.v2.colors.silver[500]};
2111
+ `,Xb=r.div`
2112
+ min-width: ${({$minWidth:e})=>e?`${e}px`:"auto"};
2113
+ flex: ${({$flex:e})=>e??1};
2114
+ overflow: hidden;
2115
+ display: flex;
2116
+ align-items: center;
2117
+
2118
+ padding: 18px 24px;
2119
+ cursor: ${({$withClick:e})=>e?"pointer":"default"};
2120
+ box-sizing: border-box;
2121
+
2122
+ ${({$variant:e,$selected:t,$hovered:n,$isLastRow:r,$isFirstCell:i,$isLastCell:a})=>{switch(e){case Mb.Data:return o`
2123
+ border-bottom: ${({theme:e})=>r?"none":`1px solid ${e.v2.colors.silver[500]}`};
2124
+ border-radius: ${r?i?"0 0 0 4px":a?"0 0 4px 0":"0":"0"};
2125
+ background-color: ${({theme:e})=>t?e.v2.colors.blue[1e3]:n?e.v2.colors.silver[700]:e.v2.colors.silver[800]};
2126
+ `;case Mb.Pretty:return o`
2127
+ border: none;
2128
+ border-radius: ${i?"12px 0 0 12px":a?"0 12px 12px 0":"0"};
2129
+ background-color: ${({theme:e})=>t?e.v2.colors.blue[1e3]:n?e.v2.colors.silver[700]:e.v2.colors.silver[900]};
2130
+ `;default:return""}}}
2131
+ `,Gb=r.div`
2132
+ width: 100%;
2133
+ display: flex;
2134
+ align-items: center;
2135
+ justify-content: ${({$textAlign:e})=>"right"===e?"flex-end":"left"===e?"flex-start":"center"===e?"center":"unset"};
2136
+ gap: 4px;
2137
+ text-align: ${({$textAlign:e})=>e||"left"};
2138
+ `,Kb=({variant:n,columns:r,rows:o,getRowActions:i,rowActionsPushRightPosition:a,rowActionsPushLeftPosition:s,withCheckboxes:l})=>{const[c,d]=jt(null),u=Xt(()=>o.map((u,p)=>{const{cells:h,onClick:m,isSelected:g=!1,onSelect:f,onDeselect:y,hideCheckbox:b}=u,v=c===p,x=i(u),$=(e,t)=>({$isLastRow:p===o.length-1,$isFirstCell:e,$isLastCell:t,$selected:g,$withClick:!!m,onClick:()=>m?.(),$hovered:!!m&&v,onMouseEnter:()=>d(p),onMouseLeave:()=>d(null)});return t(jb,{children:[l&&e(Xb,{$variant:n,style:{flex:"0 0 68px"},...$(!0,!1),children:!b&&e(Af,{value:g,onChange:()=>g?y?.():f?.()})},"checkbox-column"),r.map(({key:o,withTooltip:i,textAlign:c,flex:d,minWidth:u},m)=>{const g=h.find(e=>e.key===o),f=0===m&&!l,y=m===r.length-1,b=x.length&&(a&&y||s&&f||!a&&!s&&y),w=e(Oo,{$width:"100%",$justifyContent:"right"===c?"flex-end":"center"===c?"center":"flex-start",children:g?.component?e(g.component,{}):e(uo,{size:io.XS,children:g?.rawValue||"-"})});return t(Xb,{$variant:n,$flex:d,$minWidth:u,...$(f,y),children:[i?e(Bd,{text:g?.rawValue?.toString()||"",ellipsis:!0,children:w}):w,b?e(ub,{isOpen:v,actions:x,positionRight:a,positionLeft:s}):null]},`row-${p}-cell-${m}`)})]},`row-${p}`)}),[o,c,i,a,s,l,r]);return e(Hg,{gap:n===Mb.Pretty?8:0,elements:u})},Vb=({columnKey:t,sortDirection:n,sortByKey:r,onSort:o})=>{const a=i(),s=r===t?a.v2.colors.white[500]:a.v2.colors.grey[400],l=n===_n.Ascending?0:180;return e(Hc,{icon:t=>e(Ft,{fill:s,rotate:l,...t}),onClick:()=>o(t)})},Jb=({columnKey:t,filters:n,onFilter:r,rowsUnfiltered:o,filterOverride:a})=>{const s=i(),l=n[t]?.length?s.v2.colors.white[500]:s.v2.colors.grey[400],c=Xt(()=>{if(a)return a.options.map(({id:e,label:t})=>({id:e,label:t,withCheckbox:!0}));return Array.from(new Set(o.map(e=>e.cells.find(e=>e.key===t)?.rawValue?.toString()).filter(e=>!!e))).sort((e,t)=>e.localeCompare(t)).map(e=>({id:e,label:e,withCheckbox:!0}))},[o,t,a]);return e(_f,{items:c,withMultiSelect:!0,selectedIds:n[t]?.map(e=>e.toString())??[],setSelectedIds:e=>r(t,e),defaultOpen:!1,iconButtonProps:{icon:t=>e(Mt,{fill:l,...t})}})},qb=({variant:n,backgroundColor:r,columns:o,rowsUnfiltered:i,sortDirection:a,sortByKey:s,onSort:l,filters:c,onFilter:d,withCheckboxes:u,partiallySelected:p,allSelected:h,onSelectAll:m})=>t(jb,{children:[u&&e(Wb,{$variant:n,$backgroundColor:r,$isFirst:!0,$isLast:!1,style:{flex:"0 0 68px"},children:e(Af,{partiallyChecked:p&&!h,value:h||!1,onChange:m})},"checkbox-column"),o.map(({key:p,label:h,withTooltip:m,tooltip:g,noSort:f,noFilter:y,filterOverride:b,flex:v,minWidth:x,textAlign:$},w)=>{const S=0===w&&!u,C=w===o.length-1,E=e(uo,{size:io.XS,align:$,children:h});return t(Wb,{$variant:n,$backgroundColor:r,$flex:v,$minWidth:x,$isFirst:S,$isLast:C,children:[t(Gb,{$textAlign:$,children:[g||m?e(Bd,{text:g||h,children:E}):E,!f&&e(Vb,{columnKey:p,sortDirection:a,sortByKey:s,onSort:l}),!y&&e(Jb,{columnKey:p,filters:c,onFilter:d,rowsUnfiltered:i,filterOverride:b})]}),!C&&n===Mb.Data&&e(Hb,{})]},`column-${p}`)})]}),Yb=({variant:n,maxHeight:r="256px",headerBackgroundColor:o,hideHeader:i=!1,isLoading:a,noDataProps:s,columns:l,rows:c,getRowActions:d,rowActionsPushRightPosition:u,rowActionsPushLeftPosition:p,withCheckboxes:h,filters:m,onFiltersChange:g})=>{const[f,y]=jt(_n.Ascending),[b,v]=jt(""),[x,$]=jt({}),w=m??x,S=Gt(e=>{v(e),y(e=>e===_n.Ascending?_n.Descending:_n.Ascending)},[]),C=Gt((e,t)=>{const n={...w,[e]:t};g&&g(n),void 0===m&&$(n)},[w,g,m]),E=Xt(()=>{const e=(e,t)=>{const n=e.cells.find(e=>e.key===t);return n&&(n.rawValue?.toString()||n.component?.({})?.props?.children?.toString())||""};return(b?[...c].sort((t,n)=>{const r=e(t,b),o=e(n,b);return(f===_n.Ascending?1:-1)*((e,t)=>"string"==typeof e&&"string"==typeof t?e.localeCompare(t):"number"==typeof e&&"number"==typeof t?e-t:"boolean"==typeof e&&"boolean"==typeof t?e===t?0:e?1:-1:String(e).localeCompare(String(t)))(r,o)}):c).filter(t=>{for(const[n,r]of Object.entries(w)){if(!r.length)continue;const o=l.find(e=>e.key===n)?.filterOverride;if(o){if(!o.filterRow(t,r))return!1}else if(!r.includes(e(t,n)))return!1}return!0})},[c,b,f,w,l]),{partiallySelected:k,allSelected:A}=Xt(()=>{const e=E.filter(e=>!e.hideCheckbox);return{partiallySelected:e.length>0&&e.some(e=>e.isSelected),allSelected:e.length>0&&e.every(e=>e.isSelected)}},[E]);return e(zb,{$maxHeight:r,children:t(Bb,{$variant:n,children:[!i&&e(Ub,{children:e(qb,{variant:n,backgroundColor:o,columns:l,rowsUnfiltered:c,sortDirection:f,sortByKey:b,onSort:S,filters:w,onFilter:C,withCheckboxes:h,partiallySelected:k,allSelected:A,onSelectAll:e=>{e?E.forEach(e=>!e.hideCheckbox&&e.onSelect?.()):E.forEach(e=>!e.hideCheckbox&&e.onDeselect?.())}})}),E.length?e(Kb,{variant:n,columns:l,rows:E,getRowActions:d||(()=>[]),rowActionsPushRightPosition:u,rowActionsPushLeftPosition:p,withCheckboxes:h}):e(Fo,{style:{height:r},children:a?e(Xo,{withSpinner:!0}):e(Sf,{...s})})]})})},Qb=r.div`
2139
+ display: flex;
2140
+ align-items: center;
2141
+ justify-content: center;
2142
+ gap: 8px;
2143
+ padding: 8px;
2144
+ border-radius: 6px;
2145
+
2146
+ ${({$flex:e})=>e?o`
2147
+ flex: ${e};
2148
+ `:o`
2149
+ width: fit-content;
2150
+ `}
2151
+
2152
+ ${({$disabled:e,$withClick:t})=>e?o`
2153
+ cursor: not-allowed;
2154
+ background-color: ${({theme:e})=>e.v2.colors.grey[800]};
2155
+ border: 1px solid transparent;
2156
+ `:t?o`
2157
+ cursor: pointer;
2158
+ background-color: ${({theme:e})=>e.v2.colors.silver[750]};
2159
+ &:hover {
2160
+ background-color: ${({theme:e})=>e.v2.colors.silver[600]};
2161
+ }
2162
+ &:active {
2163
+ background-color: ${({theme:e})=>e.v2.colors.purple[900]};
2164
+ border: 1px solid ${({theme:e})=>e.v2.colors.purple[400]};
2165
+ }
2166
+ `:o`
2167
+ background-color: ${({theme:e})=>e.v2.colors.silver[750]};
2168
+ border: 1px solid transparent;
2169
+ `}
2170
+ `,Zb=({label:n,leftIcon:r,rightIcon:o,onClick:a,disabled:s,flex:l})=>{const c=i(),d=s?c.v2.colors.grey[400]:c.v2.colors.white[500];return t(Qb,{$disabled:s,$withClick:!!a,onClick:()=>!s&&a?.(),$flex:l,children:[r&&e(r,{fill:d,size:16}),e(uo,{color:d,size:io.XS,nowrap:!0,children:n}),o&&e(o,{fill:d,size:16})]})},ev=r.div`
2171
+ padding: 6px 12px;
2172
+
2173
+ display: flex;
2174
+ align-self: stretch;
2175
+ align-items: flex-start;
2176
+ gap: 8px;
2177
+ border-radius: 6px;
2178
+
2179
+ border: 1px solid ${({theme:e,$disabled:t,$error:n})=>t?e.v2.colors.grey[600]:n?e.v2.colors.red[500]:e.v2.colors.silver[500]};
2180
+ background: ${({theme:e,$disabled:t})=>t?e.v2.colors.grey[800]:e.v2.colors.black[500]};
2181
+ ${({$disabled:e,$error:t})=>!e&&!t&&o`
2182
+ &:hover,
2183
+ &:active,
2184
+ &:focus-within {
2185
+ border: 1px solid ${({theme:e})=>e.v2.colors.silver[300]};
2186
+ }
2187
+ `}
2188
+ `,tv=r.textarea`
2189
+ max-width: ${({$maxWidth:e})=>e||"unset"};
2190
+ min-height: ${({$minHeight:e})=>e||"50px"};
2191
+ flex: 1;
2192
+ font-family: ${({theme:e})=>e.font_family.primary};
2193
+ font-size: 14px;
2194
+ font-weight: 400;
2195
+ resize: none;
2196
+
2197
+ background: transparent;
2198
+ border: none;
2199
+ outline: none;
2200
+ cursor: text;
2201
+ color: ${({theme:e})=>e.v2.colors.white[500]};
2202
+ &::placeholder {
2203
+ color: ${({theme:e})=>e.v2.colors.silver[600]};
2204
+ }
2205
+
2206
+ &:disabled {
2207
+ cursor: not-allowed;
2208
+ color: ${({theme:e})=>e.v2.colors.grey[400]};
2209
+ &::placeholder {
2210
+ color: ${({theme:e})=>e.v2.colors.grey[400]};
2211
+ }
2212
+ }
2213
+ `,nv=({label:n,required:r,tooltip:o,badge:i,errorMessage:a,warnMessage:s,helpMessage:l,name:c,value:d,onChange:u,disabled:p,maxWidth:h,minHeight:m,...g})=>{const f=Ht(null),y=()=>{f.current&&(f.current.style.height="auto",f.current.style.height=`${f.current.scrollHeight}px`)};return t(Po,{$gap:6,children:[e(tf,{label:n,tooltip:o,required:r,badge:i}),e(ev,{$disabled:p,$error:!!a,children:e(tv,{ref:f,"data-id":c,name:c,value:d,onChange:e=>{e.stopPropagation(),y(),u?.(e)},onKeyDown:e=>{e.stopPropagation()},onFocus:y,onBlur:y,disabled:p,$maxWidth:h,$minHeight:m,...g})}),e(nf,{errorMessage:a,warnMessage:s,helpMessage:l})]})},rv=[{id:"ms",label:"milliseconds"},{id:"s",label:"seconds"},{id:"m",label:"minutes"},{id:"h",label:"hours"}],ov=r.div`
2214
+ flex: 1;
2215
+ min-width: 0;
2216
+ `,iv=r.div`
2217
+ flex: 0 0 auto;
2218
+ min-width: 140px;
2219
+ `,av=({name:n,label:r,tooltip:o,badge:i,placeholder:a,required:s,disabled:l,value:c,setValue:d,units:u=rv,defaultUnit:p,errorMessage:h,warnMessage:m,helpMessage:g,hasError:f,width:y})=>{const b=Xt(()=>p&&u.some(e=>e.id===p)?p:u[0]?.id||"s",[p,u]),{num:v,unit:x}=Xt(()=>((e,t,n)=>{if(null==e||""===e)return{num:"",unit:n};const r=[...t.map(e=>e.id)].sort((e,t)=>t.length-e.length),o=new RegExp(`^\\s*(\\d+)\\s*(${r.join("|")})\\s*$`,"i"),i=String(e).match(o);if(i)return{num:i[1],unit:i[2].toLowerCase()};const a=String(e).match(/^\s*(\d+)\s*$/);return a?{num:a[1],unit:n}:{num:"",unit:n}})(c,u,b),[c,u,b]),$=(e,t)=>{d(""!==e?`${e}${t}`:"")};return t(Po,{$width:y,$gap:6,children:[e(tf,{label:r,tooltip:o,required:s,badge:i}),t(Oo,{$gap:8,$alignItems:"center",children:[e(ov,{children:e(sf,{name:n,placeholder:a,disabled:l,hasError:f||!!h,inputMode:"numeric",value:v,onChange:e=>$(gi(e.target.value),x)})}),e(iv,{children:e(ab,{name:`${n}-unit`,disabled:l,hasError:f||!!h,withSearch:!1,options:u,values:[x],setValues:e=>$(v,e[0]||x)})})]}),e(nf,{errorMessage:h,warnMessage:m,helpMessage:g})]})},sv=r.div`
2220
+ min-width: 500px;
2221
+ `,lv=r.div`
2222
+ display: flex;
2223
+ flex-direction: column;
2224
+ align-items: center;
2225
+ gap: 16px;
2226
+ padding: 24px;
2227
+ width: calc(100% - 48px);
2228
+ `,cv=r.div`
2229
+ display: flex;
2230
+ justify-content: center;
2231
+ gap: 16px;
2232
+ padding: 16px 24px;
2233
+ width: calc(100% - 48px);
2234
+ background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
2235
+ `,dv=({visual:n,title:r,description:o,isOpen:i,onClose:a,denyButton:s,approveButton:l,children:c,...d})=>e(Cb,{isOpen:i,onClose:a,...d,children:t(sv,{children:[t(lv,{children:[n&&e(n,{}),e(uo,{size:io.M,weight:500,color:ao.Primary,children:r}),e(Po,{$alignItems:"center",$gap:4,children:o.split("\n").map(t=>e(uo,{size:io.XS,weight:400,color:ao.Secondary,children:t},t))}),c]}),(s||l)&&t(cv,{children:[s&&e($f,{"data-id":"deny",...s}),l&&e($f,{"data-id":"approve",...l})]})]})});export{ub as $,Wf as A,vf as B,Su as C,Qf as D,jn as E,Po as F,Ar as G,Lg as H,Wd as I,fg as J,su as K,Fm as L,rg as M,Sf as N,ci as O,Od as P,ju as Q,Vn as R,Gn as S,Pc as T,Ko as U,Tu as V,ti as W,Xu as X,hp as Y,gp as Z,gg as _,bf as a,dv as a$,$n as a0,ii as a1,fi as a2,By as a3,Fy as a4,_y as a5,$f as a6,uo as a7,ao as a8,io as a9,ni as aA,yb as aB,In as aC,pb as aD,Hn as aE,Dn as aF,Mp as aG,xr as aH,nv as aI,xn as aJ,Vp as aK,Qy as aL,hr as aM,pi as aN,hi as aO,bi as aP,ir as aQ,ar as aR,lr as aS,fr as aT,gr as aU,sr as aV,or as aW,Qp as aX,jl as aY,_r as aZ,jp as a_,Bd as aa,mf as ab,cf as ac,lf as ad,Bn as ae,Yb as af,Mb as ag,Xo as ah,yf as ai,Qg as aj,ld as ak,Jl as al,Dr as am,od as an,Qo as ao,tr as ap,Mu as aq,ng as ar,au as as,Lr as at,Tn as au,tf as av,Af as aw,nf as ax,sf as ay,Xn as az,Fo as b,Za as b$,bm as b0,sm as b1,is as b2,fa as b3,Ca as b4,as as b5,Ia as b6,os as b7,Ki as b8,Vi as b9,Ro as bA,Oy as bB,Or as bC,Fc as bD,ui as bE,kn as bF,ei as bG,Er as bH,Zb as bI,Kr as bJ,Ni as bK,Li as bL,Oi as bM,_i as bN,ym as bO,Ll as bP,zl as bQ,ya as bR,Fi as bS,Ml as bT,hs as bU,ps as bV,fs as bW,gs as bX,ds as bY,cs as bZ,Ri as b_,ty as ba,ra as bb,eh as bc,Ei as bd,ki as be,Di as bf,ab as bg,Hc as bh,jc as bi,Ti as bj,Br as bk,Zo as bl,Ii as bm,pd as bn,cd as bo,Jn as bp,Ln as bq,oo as br,ud as bs,dd as bt,ic as bu,$m as bv,nc as bw,Sr as bx,wr as by,jr as bz,tc as c,Cl as c$,oi as c0,_f as c1,Nf as c2,If as c3,_l as c4,Ah as c5,vs as c6,em as c7,Rs as c8,Os as c9,Bs as cA,Gs as cB,Hs as cC,Xs as cD,js as cE,Ws as cF,Us as cG,qs as cH,Ys as cI,Vs as cJ,Js as cK,Ks as cL,Zs as cM,el as cN,Qs as cO,Pb as cP,Nb as cQ,$s as cR,$l as cS,wl as cT,Sl as cU,xl as cV,El as cW,kl as cX,Al as cY,Dl as cZ,Tl as c_,Ps as ca,Fs as cb,Ls as cc,_s as cd,Ms as ce,To as cf,Il as cg,Nl as ch,Rl as ci,Ol as cj,Pl as ck,Fl as cl,xs as cm,ws as cn,Ss as co,Cs as cp,ks as cq,Es as cr,Ds as cs,As as ct,Is as cu,Ts as cv,Ns as cw,ys as cx,bs as cy,zs as cz,td as d,No as d$,bl as d0,vl as d1,cl as d2,rm as d3,gl as d4,fl as d5,yl as d6,ul as d7,hl as d8,pl as d9,Xr as dA,Ur as dB,ec as dC,Cf as dD,ac as dE,Xf as dF,rr as dG,Hr as dH,Hg as dI,qg as dJ,Wr as dK,Ir as dL,Uc as dM,vr as dN,En as dO,Cn as dP,cc as dQ,Up as dR,$r as dS,Kf as dT,Hf as dU,ro as dV,Sy as dW,cr as dX,oy as dY,by as dZ,sy as d_,tl as da,nl as db,rl as dc,ol as dd,il as de,al as df,sl as dg,ll as dh,dl as di,ml as dj,Cb as dk,sd as dl,Io as dm,xm as dn,Kp as dp,Lp as dq,Yp as dr,vb as ds,Lb as dt,Zl as du,Cr as dv,Zc as dw,Ul as dx,nd as dy,zc as dz,fp as e,ia as e$,oa as e0,ja as e1,Bi as e2,Mi as e3,zi as e4,Ui as e5,Dh as e6,nm as e7,im as e8,am as e9,wa as eA,Zi as eB,Da as eC,Aa as eD,ha as eE,$a as eF,ka as eG,_a as eH,ga as eI,Pa as eJ,da as eK,qi as eL,ua as eM,ca as eN,Yi as eO,pa as eP,Ha as eQ,la as eR,Ua as eS,Xa as eT,Wa as eU,Ga as eV,Ka as eW,Na as eX,Qi as eY,ta as eZ,na as e_,Gh as ea,Wh as eb,gh as ec,mh as ed,hh as ee,Kh as ef,Hh as eg,Rh as eh,Zh as ei,ss as ej,Qa as ek,qa as el,Ya as em,Ja as en,Va as eo,Th as ep,Ih as eq,Nh as er,ns as es,rs as et,ts as eu,es as ev,ed as ew,av as ex,Sa as ey,ea as ez,yd as f,Gr as f$,th as f0,sa as f1,aa as f2,ji as f3,Wi as f4,Ji as f5,Ra as f6,Oa as f7,La as f8,Bl as f9,Kn as fA,Pn as fB,Fn as fC,Rn as fD,nr as fE,Wn as fF,Mn as fG,pr as fH,ur as fI,dr as fJ,qn as fK,br as fL,yr as fM,mr as fN,_n as fO,Nn as fP,Co as fQ,So as fR,Ao as fS,yn as fT,bn as fU,mi as fV,Tr as fW,Nr as fX,Fr as fY,wn as fZ,Mr as f_,Hi as fa,$h as fb,Pi as fc,Uh as fd,Bh as fe,zh as ff,ba as fg,ma as fh,ph as fi,uh as fj,dh as fk,Zp as fl,va as fm,Ma as fn,xa as fo,Ea as fp,za as fq,Lf as fr,Fa as fs,wo as ft,An as fu,Zn as fv,On as fw,er as fx,Qn as fy,zn as fz,Rr as g,Zu as g$,Jr as g0,qr as g1,Yr as g2,Qr as g3,Zr as g4,eo as g5,to as g6,no as g7,Vo as g8,ri as g9,yc as gA,mc as gB,Qc as gC,Lc as gD,Mc as gE,Gc as gF,Vc as gG,qc as gH,fd as gI,ad as gJ,Sm as gK,Cm as gL,Wu as gM,wp as gN,bp as gO,Ec as gP,Tc as gQ,hu as gR,lg as gS,sp as gT,Og as gU,Ag as gV,Bm as gW,zg as gX,Nu as gY,du as gZ,Dm as g_,ai as ga,li as gb,di as gc,gi as gd,yi as ge,vi as gf,xi as gg,Sn as gh,$i as gi,wi as gj,Si as gk,Ai as gl,Ba as gm,ms as gn,us as go,ls as gp,Ta as gq,Gi as gr,Xi as gs,Wl as gt,Hl as gu,Xl as gv,Gl as gw,Kl as gx,gc as gy,Sc as gz,Bc as h,qu as h0,Vu as h1,jg as h2,kd as h3,Mo as h4,tp as h5,Lo as h6,Qm as h7,Ku as h8,xg as h9,zo as ha,Bo as hb,Uo as hc,fu as hd,_o as he,Nc as hf,Rc as hg,Oc as hh,Uf as hi,jf as hj,Tf as hk,Dy as hl,rv as hm,ly as hn,cb as ho,Ib as hp,_b as hq,Zf as hr,jy as hs,Py as ht,Un as i,Oo as j,fc as k,Go as l,Yn as m,kr as n,Yo as o,zr as p,Pr as q,ib as r,Dd as s,Yl as t,Xc as u,Ci as v,Tp as w,Qd as x,ql as y,Yc as z};