@odigos/ui-kit 0.0.239 → 0.0.240
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/lib/chunks/helpers-D-6cJlOn.js +19 -0
- package/lib/chunks/index-RUJS9Blu.js +147 -0
- package/lib/chunks/source-instrument-form-context-CEgbaSRi.js +1 -0
- package/lib/chunks/ui-components-B0BVzW_z.js +1570 -0
- package/lib/chunks/{vendor-C150cdxb.js → vendor-Be0cOokr.js} +1 -1
- package/lib/components/_v2/button/index.d.ts +1 -1
- package/lib/components/_v2/condition/index.d.ts +1 -0
- package/lib/components/_v2/drop-data/index.d.ts +2 -2
- package/lib/components/_v2/input-table/types.d.ts +2 -0
- package/lib/components/index.d.ts +0 -22
- package/lib/components/v2.js +1 -1
- package/lib/components.js +1 -1
- package/lib/constants/sources/index.d.ts +5 -5
- package/lib/constants/strings/index.d.ts +3 -0
- package/lib/constants.js +1 -1
- package/lib/containers/_v2/_drawers/add-source-drawer/strings.d.ts +54 -0
- package/lib/containers/_v2/_drawers/edit-source-drawer/helpers.d.ts +3 -3
- package/lib/containers/_v2/_drawers/edit-source-drawer/index.d.ts +3 -3
- package/lib/containers/_v2/_drawers/edit-source-drawer/overview/containers-card/index.d.ts +2 -2
- package/lib/containers/_v2/_drawers/edit-source-drawer/overview/health-card.d.ts +2 -2
- package/lib/containers/_v2/_drawers/edit-source-drawer/overview/index.d.ts +3 -2
- package/lib/containers/_v2/_drawers/edit-source-drawer/overview/main-card.d.ts +2 -2
- package/lib/containers/_v2/_drawers/edit-source-drawer/overview/pods-card/index.d.ts +2 -2
- package/lib/containers/_v2/_drawers/edit-source-drawer/overview/pods-card/pods-list/helpers.d.ts +5 -2
- package/lib/containers/_v2/_drawers/edit-source-drawer/overview/pods-card/pods-list/process-row.d.ts +1 -0
- package/lib/containers/_v2/_drawers/edit-source-drawer/overview/statuses-card.d.ts +3 -2
- package/lib/containers/_v2/_drawers/edit-source-drawer/peers/index.d.ts +2 -2
- package/lib/containers/_v2/_drawers/edit-source-drawer/pods/containers-card/index.d.ts +2 -2
- package/lib/containers/_v2/_drawers/edit-source-drawer/pods/containers-card/process-card.d.ts +3 -1
- package/lib/containers/_v2/_drawers/edit-source-drawer/pods/index.d.ts +2 -2
- package/lib/containers/_v2/_drawers/edit-source-drawer/profiling/index.d.ts +2 -2
- package/lib/containers/_v2/overview/columns/column/index.d.ts +2 -2
- package/lib/containers/_v2/overview/columns/column/list-item.d.ts +2 -2
- package/lib/containers/_v2/overview/columns/column/source-visual-state.d.ts +3 -3
- package/lib/containers/_v2/overview/drawers/index.d.ts +1 -1
- package/lib/containers/_v2/overview/search/builder.d.ts +4 -4
- package/lib/containers/index.d.ts +0 -3
- package/lib/containers/service-map/helpers/build-map-nodes.d.ts +2 -2
- package/lib/containers/v2.js +162 -122
- package/lib/containers.js +19 -49
- package/lib/contexts/source-edit-form-context.d.ts +2 -2
- package/lib/contexts.js +1 -1
- package/lib/functions/filter-sources/index.d.ts +2 -2
- package/lib/functions/filter-sources-by-stream/index.d.ts +2 -2
- package/lib/functions/get-conditions-booleans/index.d.ts +5 -3
- package/lib/functions/get-containers-counts/index.d.ts +2 -2
- package/lib/functions/get-containers-icons/index.d.ts +5 -5
- package/lib/functions/get-entity-id/index.d.ts +8 -4
- package/lib/functions/get-main-container-language/index.d.ts +2 -2
- package/lib/functions/get-workload-id/index.d.ts +2 -2
- package/lib/functions/is-pod-injected-with-agent/index.d.ts +1 -0
- package/lib/functions/map-desired-status-to-condition-status/index.d.ts +1 -1
- package/lib/functions.js +1 -1
- package/lib/hooks/index.d.ts +0 -1
- package/lib/hooks/useActionFormData.d.ts +1 -1
- package/lib/hooks/useSourceFormData.d.ts +2 -2
- package/lib/hooks/useTimeAgo.d.ts +11 -0
- package/lib/hooks.js +1 -1
- package/lib/mock-data/index.d.ts +0 -1
- package/lib/mock-data/sources/index.d.ts +4 -7
- package/lib/snippets/_v2/delete-modal/index.d.ts +3 -0
- package/lib/snippets/_v2/dynamic-field/index.d.ts +2 -3
- package/lib/snippets/index.d.ts +0 -4
- package/lib/snippets/v2.js +1 -1
- package/lib/snippets.js +49 -1
- package/lib/store/useEntityStore.d.ts +2 -2
- package/lib/store/useFilterStore.d.ts +8 -14
- package/lib/store/useSelectedStore.d.ts +2 -2
- package/lib/store/useSetupStore.d.ts +10 -15
- package/lib/store.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/types/destinations/index.d.ts +3 -3
- package/lib/types/namespaces/index.d.ts +3 -3
- package/lib/types/sources/index.d.ts +3 -44
- package/lib/types/workload/index.d.ts +16 -51
- package/lib/types.js +1 -1
- package/lib/visuals.js +1 -1
- package/package.json +1 -1
- package/lib/chunks/index-B5PgIL40.js +0 -3
- package/lib/chunks/index-Dy4pkeq6.js +0 -145
- package/lib/chunks/index-uXyrp4Xe.js +0 -41
- package/lib/chunks/ui-components-BPdnIOmj.js +0 -2248
- package/lib/components/badge/index.d.ts +0 -11
- package/lib/components/button/index.d.ts +0 -6
- package/lib/components/cancel-warning/index.d.ts +0 -10
- package/lib/components/checkbox/index.d.ts +0 -15
- package/lib/components/condition-details/index.d.ts +0 -10
- package/lib/components/data-card/data-card-fields/index.d.ts +0 -23
- package/lib/components/data-card/index.d.ts +0 -17
- package/lib/components/data-tab/index.d.ts +0 -43
- package/lib/components/delete-warning/index.d.ts +0 -13
- package/lib/components/describe-row/index.d.ts +0 -13
- package/lib/components/drawer/drawer-footer/index.d.ts +0 -16
- package/lib/components/drawer/drawer-header/index.d.ts +0 -24
- package/lib/components/drawer/index.d.ts +0 -15
- package/lib/components/dropdown/index.d.ts +0 -25
- package/lib/components/extend-arrow/index.d.ts +0 -8
- package/lib/components/field-error/index.d.ts +0 -4
- package/lib/components/field-label/index.d.ts +0 -11
- package/lib/components/input/index.d.ts +0 -15
- package/lib/components/modal/index.d.ts +0 -14
- package/lib/components/monitors-icons/index.d.ts +0 -11
- package/lib/components/no-data-found/index.d.ts +0 -6
- package/lib/components/popup-form/index.d.ts +0 -18
- package/lib/components/status/index.d.ts +0 -17
- package/lib/components/tab-list/index.d.ts +0 -18
- package/lib/components/warning-modal/index.d.ts +0 -24
- package/lib/containers/overview-drawer/index.d.ts +0 -27
- package/lib/containers/source-drawer/build-card.d.ts +0 -3
- package/lib/containers/source-drawer/describe/index.d.ts +0 -13
- package/lib/containers/source-drawer/index.d.ts +0 -23
- package/lib/containers/source-drawer/libraries/index.d.ts +0 -12
- package/lib/containers/source-drawer/odigos-health/index.d.ts +0 -5
- package/lib/containers/source-drawer/peers/index.d.ts +0 -12
- package/lib/containers/source-form/index.d.ts +0 -8
- package/lib/hooks/useSourceSelectionFormData.d.ts +0 -32
- package/lib/mock-data/workload/index.d.ts +0 -2
- package/lib/snippets/add-button/index.d.ts +0 -9
- package/lib/snippets/copy-text/index.d.ts +0 -7
- package/lib/snippets/pod-container/index.d.ts +0 -5
- package/lib/snippets/source-container/index.d.ts +0 -6
- package/lib/snippets/source-container/override-runtime.d.ts +0 -10
|
@@ -1,2248 +0,0 @@
|
|
|
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 S,RustLogo as w,RubyLogo as C,PhpLogo as E,CPlusPlusLogo as k,CSharpLogo as A,DotnetLogo as T,PythonLogo as D,NodejsLogo as I,GoLogo as N,JavaLogo as R,PyroscopeLogo as O,AwsXrayLogo as _,VictoriaMetricsLogo as P,UptraceLogo as L,TraceloopLogo as F,TingyunLogo as M,TempoLogo as z,TelemetryHubLogo as U,SumoLogicLogo as B,SplunkLogo as j,SignozLogo as H,SeqLogo as W,AwsS3Logo as G,QuickwitLogo as X,GigapipeLogo as V,QrynLogo as K,PrometheusLogo as q,OpenTelemetryLogo as J,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 Se,Dash0Logo as we,CoralogixLogo as Ce,AwsCloudwatchLogo as Ee,ClickhouseLogo as ke,ChronosphereLogo as Ae,ChecklyLogo as Te,CauselyLogo as De,BonreeLogo as Ie,BetterStackLogo as Ne,AzureMonitorLogo as Re,AzureBlobLogo as Oe,AxiomLogo as _e,AppDynamicsLogo as Pe,AlibabaCloudLogo as Le,AlaudaLogo as Fe,SamplingIcon as Me,InstrumentationRuleIcon as ze,DestinationIcon as Ue,SourceIcon as Be,NamespacesIcon as je,PayloadCollectionIcon as He,HeadersCollectionIcon as We,CustomInstrumentationIcon as Ge,CodeAttributesIcon as Xe,TracesIcon as Ve,MetricsIcon as Ke,LogsIcon as qe,VmLogo as Je,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 St,ExtendArrowIcon as wt,PlusIcon as Ct,NoDataIcon as Et,RefreshIcon as kt,EyeClosedIcon as At,EyeOpenIcon as Tt,SearchIcon as Dt,TrashIcon as It,EditIcon as Nt,EditedIcon as Rt,ChevronUpIcon as Ot,ChevronDownIcon as _t,ArrowIcon as Pt,DotsVerticalIcon as Lt,DotIcon as Ft,FilterIcon as Mt}from"../icons.js";import{create as zt}from"zustand";import{forwardRef as Ut,Fragment as Bt,useState as jt,useEffect as Ht,useRef as Wt,useMemo as Gt,useCallback as Xt,useContext as Vt,createContext as Kt,memo as qt,useLayoutEffect as Jt,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)),Sn=(e,t)=>t.split(".").reduce((e,t)=>e?.[t],e),wn=(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,Tn,Dn,In,Nn,Rn,On,_n,Pn,Ln,Fn,Mn,zn,Un,Bn,jn,Hn,Wn,Gn,Xn,Vn,Kn,qn,Jn,Yn,Qn,Zn,er,tr,nr,rr,or,ir,ar,sr,lr,cr,dr,ur,pr,hr,mr,gr,fr,yr;!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"}(Tn||(Tn={})),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"}(Dn||(Dn={})),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"}(_n||(_n={})),function(e){e.Horizontal="horizontal",e.Vertical="vertical"}(Pn||(Pn={})),function(e){e.Ascending="ascending",e.Descending="descending"}(Ln||(Ln={})),function(e){e.Community="community",e.Onprem="onprem"}(Fn||(Fn={})),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"}(Un||(Un={})),function(e){e.Create="Create",e.Read="Read",e.Update="Update",e.Delete="Delete"}(Bn||(Bn={})),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"}(Hn||(Hn={})),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"}(Wn||(Wn={})),function(e){e.Text="text",e.Password="password",e.Number="number",e.Decimal="decimal"}(Gn||(Gn={})),function(e){e.Warning="warning",e.Error="error",e.Success="success",e.Info="info",e.Default="default"}(Xn||(Xn={})),function(e){e.INSTRUMENTED="Instrumented",e.INSTRUMENTING="Instrumenting",e.UNINSTRUMENTED="Uninstrumented",e.NOT_INSTRUMENTED="Not Instrumented"}(Vn||(Vn={})),function(e){e.Loading="loading",e.Disabled="disabled"}(Kn||(Kn={})),function(e){e.Disabled="disabled",e.Unknown="unknown"}(qn||(qn={})),function(e){e.MarkedForInstrumentation="MarkedForInstrumentation",e.RuntimeDetection="RuntimeDetection",e.AgentEnabled="AgentEnabled",e.AgentInjected="AgentInjected",e.WorkloadRollout="WorkloadRollout",e.ProcessesHealthStatus="ProcessesHealthStatus",e.ExpectingTelemetry="ExpectingTelemetry",e.WorkloadOdigosHealth="WorkloadOdigosHealth"}(Jn||(Jn={})),function(e){e.TriggeredSuccessfully="RolloutTriggeredSuccessfully",e.RolloutFinished="RolloutFinished",e.PreviousRolloutOngoing="PreviousRolloutOngoing",e.Disabled="Disabled",e.NotRequired="NotRequired",e.WaitingForRestart="WaitingForRestart",e.WorkloadNotSupporting="WorkloadNotSupporting",e.WaitingInQueue="WaitingInQueue",e.FailedToPatch="FailedToPatch"}(Yn||(Yn={})),function(e){e.SuccessfullyInjected="SuccessfullyInjected",e.NoAgentInjected="NoAgentInjected",e.SomePodsAgentNotInjectedRolloutNeeded="SomePodsAgentNotInjectedRolloutNeeded",e.AgentInjectedAndDataSent="AgentInjectedAndDataSent"}(Qn||(Qn={})),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"}(Zn||(Zn={})),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"}(er||(er={})),function(e){e.Labeled="labeled"}(tr||(tr={})),function(e){e.AddRule="addRule",e.AddSource="addSource",e.AddAction="addAction",e.AddDestination="addDestination"}(nr||(nr={})),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"}(rr||(rr={})),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"}(or||(or={})),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"}(ir||(ir={})),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"}(ar||(ar={})),function(e){e.CodeAttributes="CodeAttributes",e.HeadersCollection="HeadersCollection",e.PayloadCollection="PayloadCollection",e.CustomInstrumentation="CustomInstrumentation",e.UnknownType="UnknownType"}(sr||(sr={})),function(e){e.Column="column",e.FilePath="filePath",e.Function="function",e.LineNumber="lineNumber",e.Namespace="namespace",e.StackTrace="stacktrace"}(lr||(lr={})),function(e){e.HeaderKeys="headerKeys"}(cr||(cr={})),function(e){e.Java="java",e.Golang="golang"}(dr||(dr={}));class br{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 vr{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"}(ur||(ur={})),function(e){e.Healthy="Healthy",e.Updating="Updating",e.Degraded="Degraded",e.Failed="Failed",e.Down="Down",e.Unknown="Unknown"}(pr||(pr={})),function(e){e.Pending="Pending",e.Running="Running",e.Succeeded="Succeeded",e.Failed="Failed",e.Unknown="Unknown"}(hr||(hr={})),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"}(mr||(mr={})),function(e){e.Running="Running",e.Waiting="Waiting",e.Terminated="Terminated"}(gr||(gr={})),function(e){e.Logs="LOGS",e.Metrics="METRICS",e.Traces="TRACES",e.Profiles="PROFILES"}(fr||(fr={})),function(e){e.Logs="logs",e.Metrics="metrics",e.Traces="traces",e.Profiles="profiles"}(yr||(yr={}));const xr={[fr.Logs]:yr.Logs,[fr.Metrics]:yr.Metrics,[fr.Traces]:yr.Traces,[fr.Profiles]:yr.Profiles},$r={[yr.Logs]:fr.Logs,[yr.Metrics]:fr.Metrics,[yr.Traces]:fr.Traces,[yr.Profiles]:fr.Profiles};var Sr;!function(e){e.Equals="equals",e.NotEquals="notEquals",e.EndWith="endWith",e.StartWith="startWith"}(Sr||(Sr={}));const wr=(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===Xn.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},Cr="https://docs.odigos.io",Er="default",kr="this-cluster",Ar="This Cluster",Tr={SELECTED_DATA_STREAM:"SELECTED_DATA_STREAM",SELECTED_DATA_STREAM_WITH_PROXY:e=>`SELECTED_DATA_STREAM_${e}`,OVERVIEW_FILTERS:"OVERVIEW_FILTERS",DARK_MODE:"DARK_MODE"},Dr={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)'},Ir={NAMESPACE:"Namespace",NAME:"Name",KIND:"Kind",CONNECTION:"Connection",CONNECTIONS:"Connections",DATA_STREAM:"Data Stream",DATA_STREAMS:"Data Streams",STREAM_NAME:"Data Stream name",NAME_YOUR_STREAM:"Name your Data Stream",NAME_YOUR_STREAM_PLACEHOLDER:"e.g. Highest priority",STREAM_DESCRIPTION:"Provide a clear and descriptive name for your pipeline to ensure its purpose is easily understood by you and your team.",STREAM_CONFIRM:"Confirm your new Data Stream",RENAME_STREAM:e=>`Rename "${e}"`,DATA_STREAM_EXISTS_WARNING:(e,t)=>`A Data Stream with this name already exists, you can still rename the current "${e}", but it will merge into the existing "${t}".`,DATA_STREAM_MERGE_WARNING:(e,t)=>e?`A Data Stream named "${t}" already exists. Saving will merge "${e}" into "${t}" - both streams will share the same configuration going forward.`:`A Data Stream named "${t}" already exists. Saving will merge into "${t}" - the new stream will share the existing configuration going forward.`,ACTION:"Action",ACTIONS:"Actions",ADD_ACTION:"Add Action",ACTION_DETAILS:"Action Details",INSTRUMENTATION_RULE:"Instrumentation Rule",INSTRUMENTATION_RULES:"Instrumentation Rules",ADD_INSTRUMENTATION_RULE:"Add Instrumentation Rule",INSTRUMENTATION_RULE_DETAILS:"Instrumentation Rule Details",DESTINATION:"Destination",DESTINATIONS:"Destinations",ADD_DESTINATION:"Add Destination",ADD_DESTINATIONS:"Add Destinations",ADD_DESTINATION_DESCRIPTION:"Add a destination to send your telemetry data to. You can add multiple destinations.",DESTINATION_DETAILS:"Destination Details",SELECTED_DESTINATIONS:"Selected Destinations",SOURCE:"Source",SOURCES:"Sources",ADD_SOURCE:"Add Source",SOURCE_DETAILS:"Source Details",SELECT_SOURCES:"Select Sources",SELECTED_SOURCES:"Selected Sources",SELECT_SOURCES_DESCRIPTION:"Choose which sources to monitor in your pipeline.",NO_SOURCES:"No sources",NO_SOURCES_GO_BACK:"No sources selected. Please go back to select sources.",PLEASE_ADD_SOURCE:"Please add a source",NO_SOURCES_NAMESPACE:"No sources available in this namespace",TRY_SEARCH_OR_OTHER_NAMESPACE:"Try searching again or select another namespace.",PLEASE_MAKE_SURE_UNIGNORED_NAMESPACES:"Please make sure your cluster has unignored namespaces",INSTALLATION:"Installation",SOURCES_SETUP:"Sources setup",DESTINATIONS_SETUP:"Destinations setup",SUMMARY:"Summary",REVIEW_SETUP:"Review your setup and confirm your choices.",NO_SOURCES_SELECTED:"No sources selected",ADD_SOURCE_PROMPT:"Add at least one source to start collecting data",NO_DESTINATIONS_SELECTED:"No destinations selected",ADD_DESTINATION_PROMPT:"Add destination so your data has somewhere to go",GET_STARTED_WITH:"Get started with",GET_STARTED_DESCRIPTION:"First, select the sources you want Odigos to monitor. Next, choose where your data should be sent by configuring destinations.",TYPE:"Type",NOTES:"Notes",STATUS:"Status",READONLY:"Readonly",LANGUAGE:"Language",VERSION:"Version",RUNTIME_VERSION:"Runtime Version",VERSION_PLACEHOLDER:"1.0.0",MONITORS:"Monitors",SIGNALS_FOR_PROCESSING:"Signals for Processing",MANAGED_BY_PROFILE:"Managed by Profile",TIER:"Tier",ENTERPRISE:"Enterprise",ENTERPRISE_TIER:"Enterprise Tier",COMMUNITY:"Community",COMMUNITY_TIER:"Community Tier",API_TOKEN:"API Token",API_TOKENS:"API Tokens",DESCRIBE_ODIGOS:"Describe Odigos",DESCRIBE_SOURCE:"Describe Source",OVERVIEW:"Overview",LIBRARIES:"Libraries",STANDARD_LIBRARY:"Standard Library",STANDARD:"Standard",PEER_SOURCES:"Peer Sources",PROFILING:"Profiling",INBOUND:"Inbound",OUTBOUND:"Outbound",INBOUND_DESCRIPTION:e=>`Services that send requests to ${e}`,OUTBOUND_DESCRIPTION:e=>`Services that ${e} sends requests to`,NO_INBOUND_CONNECTIONS:"No inbound connections",NO_OUTBOUND_CONNECTIONS:"No outbound connections",COULD_NOT_FETCH_PEER_SOURCES:"Could not fetch peer sources",VIRTUAL:"Virtual",VIRTUAL_TOOLTIP:"This service is not instrumented/injected with Odigos, but we can still see it in the service map because it is connected to other services.",NO_RESULTS:"No results",NO_RESULTS_FOR_FILTER:e=>`No results matched the filter '${e}'`,POD:"Pod",PODS:"Pods",PODS_HEALTHY:"Pods are healthy",PODS_NOT_HEALTHY:"Pods are not healthy",NO_RUNNING_PODS:"Check if you have any running pods and try again",AGENT_INJECTED:"Agent injected",AGENT_NOT_INJECTED:"Agent not injected",KUBERNETES_HEALTHY:"Kubernetes healthy",ODIGOS_HEALTHY:"Odigos healthy",HEALTHY:"Healthy",UNHEALTHY:"Unhealthy",NOT_HEALTHY:"Not Healthy",NODE:"Node",START_TIME:"Start Time",RESTARTS:"Restarts",LATEST_REVISION:"Latest Revision",OLD_REVISION:"Old Revision",READY:"Ready",NOT_READY:"Not Ready",STARTED:"Started",NOT_STARTED:"Not Started",CRASHLOOP:"Crashloop",NO_CRASHLOOP:"No Crashloop",CRASHLOOP_BACKOFF:"Crashloop backoff",CANNOT_POOL_IMAGE:"Cannot pool image",DEVICE_NAME:"Device Name",INSTRUMENTED:"Instrumented",UNINSTRUMENTED:"Uninstrumented",INSTRUMENTED_WITH_DISTRO:e=>`Instrumented | ${e}`,DEBUG_COMMANDS:"Debug Commands",GET_POD:"Get Pod",GET_POD_YAML:"Get Pod YAML",GET_POD_JSON:"Get Pod JSON",GET_POD_DESCRIBE:"Get Pod Describe",GET_POD_LOGS:"Get Pod Logs",CONTAINER:"Container",CONTAINERS:"Containers",DETECTED_CONTAINERS:"Detected Containers",DETECTED_CONTAINERS_DESCRIPTION:"The system automatically instruments the containers it detects with a supported programming language.",NO_CONTAINERS_DETECTED:"No containers detected",DETECTED_PROCESSES:"Detected Processes",DETECTED_PROCESSES_DESCRIPTION:"The system automatically instruments the processes it detects with a supported programming language.",NO_PROCESSES_DETECTED:"No processes detected",CONTAINER_NAME:"Container Name",PROCESS:"Process",PROCESSES:"Processes",PROCESS_FALLBACK_NAME:"process",OPEN_IN_POD_TAB:"Open in 'Pod' tab",ALL_CONTAINERS_HEALTHY:e=>`All ${e} containers are healthy`,ALL_PROCESSES_HEALTHY:e=>`All ${e} processes are healthy`,PID:e=>`pid ${e}`,IDENTIFYING_ATTRIBUTES:"Identifying Attributes",INSTRUMENTATION_LIBRARIES:"Instrumentation Libraries",FILTERED_COUNT_TOOLTIP:"Represents filtered amount, out of total amount",SEARCH_NAMESPACES:"Search Namespaces",SEARCH_SOURCES:"Search Sources",SELECT_ALL:"Select All",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.",OVERRIDE_OTEL_DISTRO_NAME:"Override OTel distro name",OVERRIDE_OTEL_DISTRO_NAME_WARNING:"This is an advanced configuration. If the selected OTel distro name is incorrect, data collection may be incomplete or may not occur at all.",OTEL_DISTRO_NAME:"OTel distro name",WAITING_FOR_RUNTIME_DETECTION:"Waiting for runtime detection...",DETECTING_RUNTIME_INFO:"Detecting runtime info",NO_AVAILABLE_AGENT:"No available agent",ACTIVE:"Active",INACTIVE:"Inactive",ENABLED:"Enabled",DISABLED:"Disabled",NO_TRACES_FOUND:"No traces found",ARE_SERVICES_INSTRUMENTED_AND_PRODUCING_TRAFFIC:"Are your services instrumented & producing traffic?",JAVA_CUSTOM_PROBES:"Java Custom Probes",GOLANG_CUSTOM_PROBES:"Golang Custom Probes",ROLLOUT:"Rollout",ROLLOUT_RESTART:"Rollout Restart",ROLLOUT_NOT_REQUIRED:"Rollout Not Required",ROLLOUT_NOT_REQUIRED_MESSAGE:"This source is instrumented with eBPF and does not require a restart.",ROLLOUT_FAILED:"Rollout Failed",ROLLOUT_PREVIOUS_ONGOING:"Previous Rollout Ongoing",ROLLOUT_PREVIOUS_ONGOING_MESSAGE:"A previous rollout is ongoing. Please wait for it to finish before triggering a new one.",ROLLOUT_AUTO_DISABLED:"Auto Rollout Disabled",ROLLOUT_AUTO_DISABLED_MESSAGE:"Trigger a manual rollout to inject the agent.",ROLLOUT_FINISHED:"Rollout Finished",ROLLOUT_FINISHED_MESSAGE:"All pods have been updated and are healthy.",ROLLBACK:"Rollback",ROLLBACK_OCCURRED:"Rollback Occurred",ROLLBACK_OCCURRED_MESSAGE:"Odigos detected a crash and rolled back instrumentation to protect your workload.",ROLLBACK_SUCCESS:"Rollback Success",ROLLBACK_RECOVER:"Recover",FETCHING_NAMESPACES:"Fetching namespaces",FETCHING_NAMESPACES_SUBTITLE:"Please wait while we fetch the namespaces",ADD_SOURCES_DESCRIPTION:"Choose which sources to monitor in your pipeline.",CREATING_SOURCES:"Creating Sources...",CREATING_SOURCES_SUBTITLE:"This may take a few moments while sources are being created.",SELECT_NAMESPACE:"Select namespace from the list",SELECT_NAMESPACE_SUBTITLE:"Add namespace so you can select workloads from it.",CREATING_ACTION:"Creating action",CREATING_ACTION_SUBTITLE:"Please wait while we create the action",ADD_ACTION_DESCRIPTION:"Select an action to modify telemetry data before it's sent to destinations. Choose an action type and configure its details.",CREATING_INSTRUMENTATION_RULE:"Creating instrumentation rule",CREATING_INSTRUMENTATION_RULE_SUBTITLE:"Please wait while we create the instrumentation rule",ADD_INSTRUMENTATION_RULE_DESCRIPTION:"Define how telemetry is recorded from your application. Choose a rule type and configure the details.",CREATING_DESTINATION:"Creating destination",CREATING_DESTINATION_SUBTITLE:"Please wait while we create the destination",ADD_DESTINATION_DRAWER_DESCRIPTION:"Add backend destination you want to connect with Odigos.",THROUGHPUT_LAST_10_SECONDS:"Throughput (last 10 seconds)"},Nr={GET_STARTED:"Get started",ADD:"Add",ADD_NEW:"Add New",NEW:"New",SELECT:"Select",CREATE:"Create",UPDATE:"Update",EDIT:"Edit",DELETE:"Delete",RESTART:"Restart",RESTART_POD:"Restart pod",REFRESH:"Refresh",CANCEL:"Cancel",DONE:"Done",SAVE:"Save",BACK:"Back",NEXT:"Next",TEST:"Test",TEST_CONNECTION:"Test Connection",INSTRUMENT:"Instrument",UNINSTRUMENT:"Uninstrument"},Rr=(e,t)=>t?e.filter(e=>e.dataStreamNames.includes(t)||t===Er&&!e.dataStreamNames.length):[],Or=(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?Or(e,r,n):n[r]=e}):n[i]=o:Or(o,i,n)}return n},_r=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]}`},Pr=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`}},Lr=()=>{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)})},Fr=e=>{const t=e?.toLowerCase(),n=t?.includes(An.Samplers),r=t===An.Attributes;if(n)return l;if(r)return c;return{[Tn.K8sAttributes]:m,[Tn.AddClusterInfo]:h,[Tn.DeleteAttributes]:p,[Tn.PiiMasking]:c,[Tn.RenameAttributes]:u,[Tn.URLTemplatization]:d,[Tn.ErrorSampler]:l,[Tn.ProbabilisticSampler]:l,[Tn.LatencySampler]:l,[Tn.ServiceNameSampler]:l,[Tn.SpanAttributeSampler]:l}[e]||g},Mr=e=>{const t=e?.filter(({status:e})=>e===Xn.Error),n=e?.filter(({status:e})=>e===Xn.Warning),r=e?.filter(({status:e})=>e===Kn.Disabled),o=e?.filter(({status:e})=>e===Kn.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?Xn.Error:a?Xn.Warning:s?Xn.Info:void 0}},zr=e=>{const t=e?.reduce((e,t)=>t.agentEnabled?.agentEnabled?e+1:e,0);return`${t}/${e?.length||0} instrumented`},Ur=e=>({[Un.Java]:R,[Un.Go]:N,[Un.JavaScript]:I,[Un.Python]:D,[Un.DotNet]:T,[Un.CSharp]:A,[Un.CPlusPlus]:k,[Un.Php]:E,[Un.Ruby]:C,[Un.Rust]:w,[Un.Swift]:S,[Un.Elixir]:$,[Un.MySql]:x,[Un.Nginx]:v,[Un.Postgres]:b,[Un.Redis]:y,[Un.Kafka]:f,[Un.Ignored]:g,[Un.Unknown]:g,[Un.Processing]:g,[Un.NoContainers]:g,[Un.NoRunningPods]:g}[e]||g),Br=e=>e?e.overrides?.runtimeInfo?.language??e.runtimeInfo?.language??Un.Unknown:Un.Unknown,jr=e=>e?e.overrides?.runtimeInfo?.runtimeVersion??e.runtimeInfo?.runtimeVersion??null:null,Hr=e=>e?.map(e=>Ur(Br(e)))||[],Wr=e=>e?.map(e=>Ur(e))||[],Gr=e=>e.detectedLanguages?.length?Wr(e.detectedLanguages):Hr(e.containers),Xr=(e,t)=>{const n={[rr.Alauda]:Fe,[rr.AlibabaCloud]:Le,[rr.AppDynamics]:Pe,[rr.Axiom]:_e,[rr.AzureBlob]:Oe,[rr.AzureMonitor]:Re,[rr.BetterStack]:Ne,[rr.Bonree]:Ie,[rr.Causely]:De,[rr.Checkly]:Te,[rr.Chronosphere]:Ae,[rr.ClickHouse]:ke,[rr.CloudWatch]:Ee,[rr.Coralogix]:Ce,[rr.Dash0]:we,[rr.Datadog]:Se,[rr.Dynamic]:J,[rr.Dynatrace]:$e,[rr.ElasticApm]:xe,[rr.ElasticSearch]:ve,[rr.GoogleCloud]:be,[rr.GoogleCloudOTLP]:be,[rr.GrafanaCloudLoki]:ye,[rr.GrafanaCloudPrometheus]:ye,[rr.GrafanaCloudTempo]:ye,[rr.Greptime]:fe,[rr.Groundcover]:ge,[rr.Honeycomb]:me,[rr.HyperDX]:he,[rr.Instana]:pe,[rr.Jaeger]:ue,[rr.Kafka]:f,[rr.Kloudmate]:de,[rr.Last9]:ce,[rr.Lightstep]:le,[rr.LogzIo]:se,[rr.Loki]:ae,[rr.Lumigo]:ie,[rr.Middleware]:oe,[rr.NewRelic]:re,[rr.Observe]:ne,[rr.Odigos]:te,[rr.OneUptime]:ee,[rr.OpenObserve]:Z,[rr.Opsverse]:Q,[rr.Oracle]:Y,[rr.OTLP]:J,[rr.OTLPHttp]:J,[rr.Prometheus]:q,[rr.Qryn]:K,[rr.QrynOss]:V,[rr.Quickwit]:X,[rr.S3]:G,[rr.Seq]:W,[rr.Signalfx]:j,[rr.Signoz]:H,[rr.Splunk]:j,[rr.SplunkSapm]:j,[rr.SplunkOtlp]:j,[rr.SumoLogic]:B,[rr.TelemetryHub]:U,[rr.Tempo]:z,[rr.Tingyun]:M,[rr.Traceloop]:F,[rr.Uptrace]:L,[rr.VictoriaMetrics]:P,[rr.VictoriaMetricsCloud]:P,[rr.XRay]:_,[rr.Pyroscope]:O}[e];return n&&!t?{icon:n}:{iconSrc:`https://d15jtxgb40qetw.cloudfront.net/${e}.svg`}},Vr=e=>({[jn.Namespace]:je,[jn.Source]:Be,[jn.Destination]:Ue,[jn.Action]:d,[jn.InstrumentationRule]:ze,[jn.SamplingRule]:Me}[e]),Kr=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,qr=e=>e?"string"==typeof e?e:`${e.namespace}/${e.kind}/${e.name}`:"",Jr=e=>qr(Kr(e)),Yr=(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},Qr=(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},Zr=e=>({[sr.CodeAttributes]:Xe,[sr.CustomInstrumentation]:Ge,[sr.HeadersCollection]:We,[sr.PayloadCollection]:He,[sr.UnknownType]:g}[e]||g),eo=e=>e.overrides?.runtimeInfo?.language??e.runtimeInfo?.language??Un.Unknown,to=e=>{const{numberOfInstances:t,containers:n}=e;if(!n)return t&&t>0?Un.Processing:Un.NoRunningPods;const r=n?.filter(e=>eo(e)!==Un.Ignored);if(!r.length)return Un.NoContainers;const o=r.find(e=>eo(e)!==Un.Unknown);return o?eo(o):Un.Unknown},no=(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},ro=e=>({[fr.Logs]:qe,[fr.Metrics]:Ke,[fr.Traces]:Ve,[fr.Profiles]:te}[e]),oo=e=>{if(!e)return te;return{[Mn.K8s]:m,[Mn.Vm]:Je}[e]},io=e=>{if(!e)return"Unknown";return{[Mn.K8s]:"Kubernetes Cluster",[Mn.Vm]:"Virtual Machine"}[e]},ao=(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(...ao(e,t,n)),o}):[]},so=(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},lo=(e,t,n)=>{switch(t){case Xn.Default:return e.v2.colors.purple[n];case Xn.Info:return e.v2.colors.blue[n];case Xn.Error:return e.v2.colors.red[n];case Xn.Warning:return e.v2.colors.yellow[n];case Xn.Success:return e.v2.colors.green[n];case Kn.Loading:case qn.Disabled:case qn.Unknown:return e.v2.colors.silver[n];default:return e.v2.colors.white[500]}},co=e=>{switch(e){case pr.Updating:case hr.Pending:case mr.ContainerCreating:case gr.Waiting:return Xn.Info;case pr.Healthy:case hr.Succeeded:case hr.Running:case mr.Running:case gr.Running:return Xn.Success;case pr.Degraded:return Xn.Warning;case pr.Failed:case hr.Failed:case mr.Error:case mr.CrashLoopBackOff:case mr.CreateContainerError:case mr.CreateContainerConfigError:case mr.ErrImagePull:case mr.ErrImageNeverPull:case mr.ImagePullBackOff:case mr.InvalidImageName:case mr.RegistryUnavailable:case mr.NetworkNotReady:case mr.OOMKilled:case mr.ContainerCannotRun:case gr.Terminated:case mr.DeadlineExceeded:case mr.StartError:return Xn.Error;case pr.Down:case mr.Completed:return qn.Disabled;case pr.Unknown:case hr.Unknown:default:return qn.Unknown}};var uo,po,ho;!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"}(uo||(uo={})),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"}(po||(po={})),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"}(ho||(ho={}));const mo=new Set(Object.values(ho)),go=(e,t)=>{if("string"!=typeof(n=t)||!mo.has(n))return t;var n;switch(t){case ho.Primary:return e.v2.colors.white[500];case ho.Secondary:return e.v2.colors.silver[200];case ho.Tertiary:return e.v2.colors.black[500];case ho.Disable:return e.v2.colors.grey[400];case ho.Error:return e.v2.colors.red[500];case ho.Mandatory:return e.v2.colors.red[600];case ho.Link:return e.v2.colors.purple[400];case ho.Success:return e.v2.colors.green[400];default:return}},fo=r.p`
|
|
2
|
-
margin: 0;
|
|
3
|
-
color: ${({$color:e,theme:t})=>go(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
|
-
`,yo=Ut(({children:n,variant:r=uo.P,color:o,size:i=po.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(fo,{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(Bt,{children:[n,r!==y.length-1&&e("br",{})]},`typography-${r}-${n}`))})});yo.displayName="Typography";const bo=r.div`
|
|
30
|
-
border-radius: 100%;
|
|
31
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[700]};
|
|
32
|
-
position: relative;
|
|
33
|
-
`,vo=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
|
-
`,xo=r(yo)`
|
|
48
|
-
position: absolute;
|
|
49
|
-
top: 50%;
|
|
50
|
-
left: 50%;
|
|
51
|
-
transform: translate(-50%, -50%);
|
|
52
|
-
`,$o=({percentage:n})=>t(bo,{children:[e(vo,{}),"number"==typeof n?e(xo,{size:po.M,weight:500,children:`${n}%`}):null]}),So={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 wo(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 So[r]?{value:t,unit:r}:{value:t,unit:"px"}}function Co(e){const t=wo(e);return`${t.value}${t.unit}`}const Eo=((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"),ko=({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}=wo(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:Co(1.5),height:Co(4),borderRadius:Co(2),backgroundColor:u,transition:"2s",animationFillMode:"both",animation:`${Eo} ${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)`}})]})},Ao=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
|
-
`,To=({scale:t,icon:n})=>{const r=i();return e(Ao,{$size:45*t,$color:"rgba(80, 246, 232, 0.10)",children:e(Ao,{$size:43*t,$color:"rgba(80, 246, 232, 0.20)",children:e(Ao,{$size:39*t,$color:"rgba(80, 246, 232, 0.40)",children:e(Ao,{$size:33*t,$color:"rgba(80, 246, 232, 0.60)",children:e(Ao,{$size:23*t,$color:"#50F6E8",children:e(n,{size:16*t,fill:r.v2.colors.black[500]})})})})})})},Do=434,Io=635,No=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
|
-
`,Ro=r.div`
|
|
71
|
-
position: absolute;
|
|
72
|
-
top: 50%;
|
|
73
|
-
left: 50%;
|
|
74
|
-
transform: translate(-50%, -50%);
|
|
75
|
-
`,Oo=()=>t(No,{children:[e(Ro,{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(Ro,{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(Ro,{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(Ro,{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(Ro,{children:e(te,{size:112})})]}),_o=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
|
-
`,Po=({scale:t=1,icon:n})=>{const r=i();return e(_o,{$size:73*t,$color:"rgba(106, 42, 255, 0.10)",children:e(_o,{$size:71*t,$color:"rgba(106, 42, 255, 0.20)",children:e(_o,{$size:65*t,$color:"rgba(106, 42, 255, 0.40)",children:e(_o,{$size:56*t,$color:"rgba(106, 42, 255, 0.60)",children:e(_o,{$size:39*t,$color:r.v2.colors.purple[500],children:e(n,{size:32*t,fill:r.v2.colors.white[500]})})})})})})},Lo=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: 12px;
|
|
93
|
-
`,Fo=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
|
-
`,Mo=r.div`
|
|
104
|
-
padding: ${({$padding:e})=>e||"12px"};
|
|
105
|
-
`,zo=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
|
-
`,Uo=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
|
-
`,Bo=r(Uo)`
|
|
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
|
-
`,jo=r.div`
|
|
134
|
-
display: flex;
|
|
135
|
-
flex-direction: column;
|
|
136
|
-
padding: 12px;
|
|
137
|
-
overflow-y: scroll;
|
|
138
|
-
`,Ho=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
|
-
`,Wo=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
|
-
`,Go=r(Uo)`
|
|
157
|
-
max-width: ${({$maxWidth:e})=>e||"unset"};
|
|
158
|
-
width: 100%;
|
|
159
|
-
`,Xo=r(zo)`
|
|
160
|
-
gap: 16px;
|
|
161
|
-
padding: 16px;
|
|
162
|
-
`,Vo=r.div`
|
|
163
|
-
width: 100%;
|
|
164
|
-
max-height: ${({$maxHeight:e})=>e||"unset"};
|
|
165
|
-
overflow-y: auto;
|
|
166
|
-
`,Ko=a`
|
|
167
|
-
0% {
|
|
168
|
-
background-position: 0% 50%;
|
|
169
|
-
}
|
|
170
|
-
100% {
|
|
171
|
-
background-position: 100% 50%;
|
|
172
|
-
}
|
|
173
|
-
`,qo=r(yo)`
|
|
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: ${Ko} 1s reverse linear infinite;
|
|
179
|
-
`,Jo=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")}`},Yo=({icon:n,title:r,titleColor:o,titleSize:a=po.S,subTitle:s,subTitleColor:l,subTitleSize:c=po.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?Jo(d):"");Ht(()=>{if(!d)return;$(Jo(d));const e=setInterval(()=>$(Jo(d)),1e3);return()=>clearInterval(e)},[d]);const S=o||v.v2.colors.white[500],w=l||v.v2.colors.silver[200],C=p||v.v2.colors.black[500];return t(Uo,{$gap:16,$alignItems:"center",children:[y?e(To,{scale:1.7,icon:b}):h?e($o,{percentage:f}):m?e(ko,{scale:g}):null,(r||s||d||n)&&t(Uo,{$gap:8,$alignItems:"center",children:[t(zo,{$gap:4,children:[n&&e(n,{}),u?e(qo,{align:"center",size:a,$titleColor:S,$gradientColor:C,children:r}):e(yo,{align:"center",size:a,color:S,children:r})]}),s?e(yo,{align:"center",size:c,color:w,children:s}):null,x?e(yo,{align:"center",size:c,color:S,children:x}):null]})]})},Qo=(e,t)=>({[Xn.Default]:n=>te({fill:lo(t,e,"300"),...n}),[Xn.Info]:n=>rt({fill:lo(t,e,"400"),...n}),[Xn.Error]:n=>nt({fill:lo(t,e,"500"),...n}),[Xn.Warning]:n=>tt({fill:lo(t,e,"500"),...n}),[Xn.Success]:n=>et({fill:lo(t,e,"500"),...n}),[Kn.Loading]:e=>Yo({withSpinnerOld:!0,...e}),[qn.Disabled]:n=>Ze({fill:lo(t,e,"400"),...n}),[qn.Unknown]:n=>Qe({fill:lo(t,e,"300"),...n})}[e]),Zo=e=>{switch(e){case ar.Success:return Xn.Success;case ar.Error:case ar.Failure:return Xn.Error;case ar.Notice:return Xn.Warning;case ar.Unsupported:case ar.Unknown:return Xn.Info;case ar.Irrelevant:case ar.Disabled:return Kn.Disabled;case ar.Waiting:return Kn.Loading;case ar.Pending:default:return Xn.Default}},ei=(e,t)=>{const n=t.find(([t,n])=>e>=t&&(null===n||e<=n));return n?.[2]||null},ti={redis:y,mysql:x,postgresql:b,postgres:b,kafka:f,elasticsearch:ve,clickhouse:ke,oracle:Y,aws:ot},ni={sts:ft,dynamodb:gt,s3:G,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},ri=e=>{const t=e.attributes,n=t["db.system"];if(n){const e=ti[n.toLowerCase()];if(e)return e}const r=t["messaging.system"];if(r){const e=ti[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=ni[e];if(t)return t}return ot}const i=e.serviceName.toLowerCase();for(const[e,t]of Object.entries(ti))if(i.includes(e))return t;return Ue},oi=e=>{const{namespace:t,name:n,kind:r}=e??{};return{namespace:t??"",name:n??"",kind:r??""}};function ii(e,t){if(!e)return t;if("object"==typeof e)return e;try{return JSON.parse(e)}catch(e){return t}}const ai=(e,t)=>{const n=[],r=JSON.parse(JSON.stringify(e));for(const e of r){const r=ii(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},si=(e,t)=>{const n=e=>e?.some(({healthy:e})=>e.status!==Xn.Success);return e?.length?e.some(({instrumentationInstances:e})=>n(e)):n(t)??!1},li=e=>Array.isArray(e)?!e?.length:"object"==typeof e?!Object.keys(e||{}).length:[void 0,null,""].includes(e),ci=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)},di=(e,t=0)=>{const n=(new Date).getTime();return new Date(e).getTime()-n<=t},ui="PodManifestInjectionOptional",pi=e=>e?.agentInjected||e?.agentInjectedStatus?.reasonEnum===ui||!1,hi=e=>{const t=String(e).trim().toLowerCase();return["true","false","1","0"].includes(t)},mi=(e,t=0)=>(new Date).getTime()-new Date(e).getTime()>=t,gi=/^(\d+\.)?(\d+\.)?(\*|\d+)$/,fi=e=>gi.test(e),yi=e=>e?e.replace(/([a-z0-9])([A-Z])/g,"$1 $2"):"",bi=e=>e?.map(({status:e,type:t,reason:n,message:r})=>({status:e?.toLowerCase(),type:yi(t),reason:n?yi(n):"",message:r}))||[],vi=e=>{switch(e){case ar.Failure:case ar.Error:return Xn.Error;case ar.Notice:return Xn.Warning;case ar.Pending:case ar.Waiting:return Kn.Loading;case ar.Unsupported:case ar.Disabled:return Kn.Disabled;case ar.Success:return Xn.Success;case ar.Irrelevant:case ar.Unknown:default:return Xn.Info}},xi=(e,t)=>{const n=ii(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}))},$i=e=>e?Object.keys(e).filter(t=>e[t]).map(e=>$r[e]):[],Si=e=>e?Object.keys(e).filter(t=>e[t].supported).map(e=>$r[e]):[],wi=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},Ci=e=>e.replace(/[^\d]/g,""),Ei=e=>{const t=String(e).trim().toLowerCase();return"true"===t||"1"===t},ki=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},Ai=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}},Ti=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=>Ti(e)))}else if("object"==typeof r&&null!==r){const e=Ti(r);Object.keys(e).length>0&&(t[n]=e)}else[void 0,null,""].includes(r)||(t[n]=r)}),t},Di=(e,t=2)=>JSON.stringify(e||{},null,t),Ii=async(e=1e3)=>new Promise(t=>setTimeout(t,e)),Ni=e=>Object.entries(e).reduce((e,[t,n])=>(e[t]="string"==typeof n?n:JSON.stringify(n),e),{}),Ri=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)},Oi=zt(e=>({activeNodeType:null,activeNodeId:null,setActiveNodeType:t=>e({activeNodeType:t}),setActiveNodeId:t=>e({activeNodeId:t})})),_i=[{type:Tn.K8sAttributes,icon:Fr(Tn.K8sAttributes),label:"Kubernetes Attributes",description:"Add dynamic k8s resource attributes to your data.",allowedSignals:[fr.Traces,fr.Metrics,fr.Logs,fr.Profiles],docsEndpoint:"/pipeline/actions/attributes/k8sattributes",docsDescription:"This action adds kubernetes related resource attributes to spans, metrics data points and log records."},{type:Tn.AddClusterInfo,icon:Fr(Tn.AddClusterInfo),label:"Add Cluster Info",description:"Add static cluster-scoped attributes to your data.",allowedSignals:[fr.Traces,fr.Metrics,fr.Logs,fr.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:Tn.DeleteAttributes,icon:Fr(Tn.DeleteAttributes),label:"Delete Attribute",description:"Delete attributes from logs, metrics, and traces.",allowedSignals:[fr.Traces,fr.Metrics,fr.Logs,fr.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:Tn.RenameAttributes,icon:Fr(Tn.RenameAttributes),label:"Rename Attribute",description:"Rename attributes in logs, metrics, and traces.",allowedSignals:[fr.Traces,fr.Metrics,fr.Logs,fr.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:Tn.PiiMasking,icon:Fr(Tn.PiiMasking),label:"PII Masking",description:"Mask PII data in your traces.",allowedSignals:[fr.Traces,fr.Profiles],docsEndpoint:"/pipeline/actions/attributes/piimasking",docsDescription:"This action processes a list of PII categories to be masked from the traces."},{type:Tn.URLTemplatization,icon:Fr(Tn.URLTemplatization),label:"URL Templatization",description:"Replace dynamic URL path segments with named placeholders to reduce span cardinality.",allowedSignals:[fr.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:Ri("v1.21.0")}],Pi=[{type:Tn.ErrorSampler,icon:Fr(An.Samplers),label:"Error Sampler",description:"Sample errors based on percentage.",allowedSignals:[fr.Traces,fr.Profiles],docsEndpoint:"/pipeline/actions/sampling/errorsampler",docsDescription:"This action is a Global Action that supports error sampling by filtering out non-error traces."},{type:Tn.LatencySampler,icon:Fr(An.Samplers),label:"Latency Sampler",description:"Add latency to your traces.",allowedSignals:[fr.Traces,fr.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:Tn.ProbabilisticSampler,icon:Fr(An.Samplers),label:"Probabilistic Sampler",description:"Sample traces based on percentage.",allowedSignals:[fr.Traces,fr.Profiles],docsEndpoint:"/pipeline/actions/sampling/probabilisticsampler",docsDescription:"This action supports probabilistic sampling based on a configured sampling percentage applied to the TraceID."},{type:Tn.ServiceNameSampler,icon:Fr(An.Samplers),label:"Service Name Sampler",description:"Sample traces based on the presence of specified services within a trace.",allowedSignals:[fr.Traces,fr.Profiles],docsEndpoint:"/pipeline/actions/sampling/servicenamesampler",docsDescription:"This action supports service name sampling based on the presence of specified services within a trace."},{type:Tn.SpanAttributeSampler,icon:Fr(An.Samplers),label:"Span Attributes Sampler",description:"Sample traces based on the presence or value of specific attributes within a trace.",allowedSignals:[fr.Traces,fr.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."}],Li=[{label:"Attributes",icon:Fr(An.Attributes),items:_i},{label:"Samplers",icon:Fr(An.Samplers),items:Pi}];var Fi;!function(e){e.ALL="all",e.UNSAVED="unsaved",e.EXISTS="exists",e.DETECTED="detected",e.SELF_HOSTED="self-hosted",e.MANAGED="managed"}(Fi||(Fi={}));const Mi={[Fi.ALL]:{TITLE:"All",DESCRIPTION:"All destinations"},[Fi.UNSAVED]:{TITLE:"Selected",DESCRIPTION:"These are destinations that you have not yet saved."},[Fi.EXISTS]:{TITLE:"Already configured",DESCRIPTION:"These are destinations that you have already configured in other data-streams and can reuse them."},[Fi.DETECTED]:{TITLE:"Suggested",DESCRIPTION:"Odigos found these destinations in your cluster and pre-filled their details. Review and enable them to start sending data."},[Fi.SELF_HOSTED]:{TITLE:"Self hosted",DESCRIPTION:"Full control and customization for advanced application monitoring."},[Fi.MANAGED]:{TITLE:"Managed",DESCRIPTION:"Effortless monitoring with scalable performance management."}},zi=[{type:sr.CodeAttributes,icon:Zr(sr.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:[Un.Go,Un.Python]},{type:sr.CustomInstrumentation,icon:Zr(sr.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:[Un.Go,Un.Java]},{type:sr.HeadersCollection,icon:Zr(sr.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:[Un.Go,Un.Java,Un.JavaScript]},{type:sr.PayloadCollection,icon:Zr(sr.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:[Un.Go,Un.JavaScript]}],Ui="Cancel",Bi="Save",ji="Edit rule",Hi="Edit auto rule",Wi="Create rule",Gi="Delete rule",Xi="Save",Vi="Create your first rule",Ki="No Rules Exist",qi="No Results",Ji=e=>`No rules match the search term "${e}"`,Yi="Rule name",Qi="Rule type",Zi="Select the type of condition that makes a trace highly relevant.",ea="Rule Enabled",ta="Rule Disabled",na="Enabled",ra="Disabled",oa="Note",ia="HTTP route",aa="Method",sa="Keep Percentage",la="Keep traces with duration larger than",ca="Keep traces with errors",da="Keep at least this percentage of matching traces. A higher rate from another matching rule may apply instead.",ua="Keep at most this percentage of matching traces. A lower rate from another matching rule may apply instead.",pa="Custom percentage",ha="Disabled rule",ma="Sample",ga="Keep all",fa="Drop all",ya="Operation type",ba="HTTP route prefix",va="Templated path",xa="Templated path prefix",$a="Kafka topic",Sa="Custom duration (ms)",wa="No preview available",Ca="Server address",Ea="Drop at most this percentage of matching traces",ka="Unnamed rule",Aa="Sampling Preview",Ta="Source Scope",Da="Unknown source",Ia="Operation",Na="Duration",Ra="Errors",Oa="Keep Percentage",_a="Define which sources this rule applies to. You can target specific services, namespaces, or apply the rule to the entire cluster.",Pa="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.",La="Define a duration threshold for this rule. Traces with a duration longer than the specified value will be considered important and retained.",Fa="Retain traces with errors from the selected services and operations.",Ma="Use Keep All to retain every matching trace, or Sample when keeping everything is too expensive. 100% means keep all",za="Use Drop All to discard every matching trace, or Sample to keep some examples. 0% means drop all.",Ua={highlyRelevant:Ma,noisy:za,costReduction:void 0},Ba="Type rule name",ja="Add note here...",Ha="Type here",Wa="Search source name",Ga="e.g. collector.my.vendor.com",Xa="Optional notes (not used by the system). Add any context or details for this sampling rule.",Va="Rule will apply to all sources in the cluster",Ka="If multiple source scopes are set, they must all match simultaneously.",qa="All sources",Ja="-",Ya="All",Qa="All operations",Za="HTTP server endpoint",es="HTTP client endpoint",ts="Kafka consumer",ns="Kafka producer",rs="Sampling Rules",os='Control how traces are categorized based on "Importance" and potential value, for fine grain control of what is kept and what is dropped.',is="Refresh",as="Create rule",ss="Sampling docs",ls="75vw",cs="Delete rule?",ds="Are you sure you want to delete this sampling rule?",us="Delete",ps="Cancel",hs="Kubernetes Health Probes",ms="Keep All Error Traces",gs="Drop Traces Cluster-Wide",fs="A rule with the same matching conditions already exists.",ys="Create 'Noisy Operation Kubernetes Health Probes' rule",bs="Edit 'Noisy Operation Kubernetes Health Probes' rule",vs="Automatically detect and sample health probe traces across the cluster.",xs="Create 'Highly Relevant Operations' rule",$s="Edit 'Highly Relevant Operations' rule",Ss="Automatically keep all error traces across the entire cluster.",ws="Create 'Cost Reduction' rule",Cs="Edit 'Cost Reduction' rule",Es="Automatically drop a percentage of traces across the entire cluster.",ks="Skip setup",As="Start setup",Ts="Next",Ds="Go to Sampling",Is="Read more",Ns="Welcome to Sampling",Rs="Cut costs without losing what matters",Os="Odigos sampling works in three stages:",_s="Filter noisy traffic",Ps="Remove non-actionable traces like health checks.",Ls="Guarantee highly relevance operations",Fs="Keep traces with errors, high latency, or mission-critical endpoints/services.",Ms="Reduce cost",zs="Sample routine traffic using percentages.",Us="Sampling does not drop individual spans - it keeps or drops the entire trace.",Bs="Filter noisy operations",js="Cut traces with little or no observability value (health-checks, metric scarping, etc)",Hs="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.",Ws="Preset Rules",Gs="Kubernetes Health Probes",Xs="Automatically ignore health checks",Vs="You can review, adjust, and add additional custom rules later.",Ks="Choose your sampling strategy",qs="Pick the approach that best fits your balance of cost vs data-completeness",Js="Keep List",Ys="Budget Friendly",Qs="Define which traces must be kept, while all others are sampled by default to minimize cost.",Zs="Cost-oriented - keeps only what you explicitly select.",el="Best for very large clusters with high volumes of traces and high costs.",tl="Higher risk of missing important traces without ongoing review.",nl="Drop List",rl="Safe Choice",ol="Define which traces must be aggressively dropped, while all others are kept by default.",il="Preserves most data unless explicitly filtered.",al="Safer by default - gaps in rules or system changes increase cost rather than risk losing important traces.",sl="Advanced",ll="Maximum Flexibility",cl="Full control over all sampling rules and categories.\n\nBest for advanced users who want complete flexibility.",dl="'Keep List' profile",ul="Protect important traces",pl="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:",hl="Traces with errors",ml="Slow requests (duration above threshold)",gl="Mission-Critical endpoints or services",fl="Services under test or evaluation",yl="New deployments",bl="You can review, adjust, and add rules once onboarding is complete.",vl="Common Rules",xl="Preset Rules",$l="Error collection - entire cluster",Sl="Keep all traces with errors",wl="Ambient sampling percentage",Cl="'Drop List' profile",El="Reduce high-volume traffic",kl="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.",Al="Advanced Configuration",Tl="Configure sampling rules",Dl="Advanced mode allows you to configure all sampling categories:",Il="Noise Filtering - remove non-actionable traces",Nl="Highly Relevance - guarantee important traces are kept",Rl='Cost Control - drop traces for "Normal" operations',Ol="Rules can target:",_l="Services",Pl="HTTP Endpoints",Ll="DB Operations",Fl="Errors",Ml="Latency and more...",zl="Sampling configured successfully!",Ul="Your sampling configuration is ready.\nYou can add and adjust rules anytime in Sampling Rules space.",Bl="Odigos will now:",jl="Filter noisy operations",Hl="Guarantee important traces",Wl="Reduce cost using controlled sampling",Gl="Recommended",Xl={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."},Vl={noisy:ys,highlyRelevant:xs,costReduction:ws},Kl={noisy:bs,highlyRelevant:$s,costReduction:Cs},ql={noisy:"Noisy Operation",highlyRelevant:"Highly Relevant",costReduction:"Cost Reduction"},Jl=[{id:fr.Logs,value:"Logs"},{id:fr.Metrics,value:"Metrics"},{id:fr.Traces,value:"Traces"},{id:fr.Profiles,value:"Profiles"}],Yl={PID:"process.pid",VPID:"process.vpid"},Ql={[Un.Go]:"Go",[Un.Java]:"Java",[Un.JavaScript]:"Node.js",[Un.Python]:"Python",[Un.DotNet]:".NET",[Un.CSharp]:"C#",[Un.CPlusPlus]:"C++",[Un.Php]:"PHP",[Un.Ruby]:"Ruby",[Un.Rust]:"Rust",[Un.Swift]:"Swift",[Un.Elixir]:"Elixir",[Un.MySql]:"MySQL",[Un.Nginx]:"Nginx",[Un.Postgres]:"PostgreSQL",[Un.Redis]:"Redis",[Un.Kafka]:"Kafka",[Un.Ignored]:"Ignored",[Un.Unknown]:"Unknown",[Un.Processing]:"Processing",[Un.NoContainers]:"No Containers",[Un.NoRunningPods]:"No Running Pods"},Zl=[{id:Un.Go,value:Ql[Un.Go],icon:Ur(Un.Go)},{id:Un.Java,value:Ql[Un.Java],icon:Ur(Un.Java)},{id:Un.JavaScript,value:Ql[Un.JavaScript],icon:Ur(Un.JavaScript)},{id:Un.Python,value:Ql[Un.Python],icon:Ur(Un.Python)},{id:Un.Php,value:Ql[Un.Php],icon:Ur(Un.Php)},{id:Un.Ruby,value:Ql[Un.Ruby],icon:Ur(Un.Ruby)},{id:Un.Rust,value:Ql[Un.Rust],icon:Ur(Un.Rust)},{id:Un.DotNet,value:Ql[Un.DotNet],icon:Ur(Un.DotNet)},{id:Un.CSharp,value:Ql[Un.CSharp],icon:Ur(Un.CSharp)},{id:Un.CPlusPlus,value:Ql[Un.CPlusPlus],icon:Ur(Un.CPlusPlus)},{id:Un.Swift,value:Ql[Un.Swift],icon:Ur(Un.Swift)},{id:Un.Elixir,value:Ql[Un.Elixir],icon:Ur(Un.Elixir)}],ec={id:ir.OpentelemetryEbpfInstrumentation,value:ir.OpentelemetryEbpfInstrumentation,icon:J},tc={[Un.Go]:{community:[{id:ir.GolangCommunity,value:ir.GolangCommunity,icon:Ur(Un.Go)},ec],enterprise:[{id:ir.GolangEnterprise,value:ir.GolangEnterprise,icon:Ur(Un.Go)}]},[Un.JavaScript]:{community:[{id:ir.NodejsCommunity,value:ir.NodejsCommunity,icon:Ur(Un.JavaScript)},ec],enterprise:[{id:ir.NodejsEnterprise,value:ir.NodejsEnterprise,icon:Ur(Un.JavaScript)}]},[Un.Python]:{community:[{id:ir.PythonCommunity,value:ir.PythonCommunity,icon:Ur(Un.Python)},ec],enterprise:[{id:ir.PythonEnterprise,value:ir.PythonEnterprise,icon:Ur(Un.Python)}]},[Un.Java]:{community:[{id:ir.JavaCommunity,value:ir.JavaCommunity,icon:Ur(Un.Java)},ec],enterprise:[{id:ir.JavaEnterprise,value:ir.JavaEnterprise,icon:Ur(Un.Java)},{id:ir.JavaEbpfInstrumentations,value:ir.JavaEbpfInstrumentations,icon:Ur(Un.Java)}]},[Un.DotNet]:{community:[{id:ir.DotNetCommunity,value:ir.DotNetCommunity,icon:Ur(Un.DotNet)},ec],enterprise:[{id:ir.DotNetEnterprise,value:ir.DotNetEnterprise,icon:Ur(Un.DotNet)}]},[Un.Ruby]:{community:[{id:ir.RubyCommunity,value:ir.RubyCommunity,icon:Ur(Un.Ruby)},ec],enterprise:[{id:ir.RubyEnterprise,value:ir.RubyEnterprise,icon:Ur(Un.Ruby)}]},[Un.Php]:{community:[{id:ir.PhpCommunity,value:ir.PhpCommunity,icon:Ur(Un.Php)},ec],enterprise:[]},[Un.CSharp]:{community:[],enterprise:[{id:ir.CPlusPlusEnterprise,value:ir.CPlusPlusEnterprise,icon:Ur(Un.CSharp)}]},[Un.MySql]:{community:[],enterprise:[{id:ir.MySqlEnterprise,value:ir.MySqlEnterprise,icon:Ur(Un.MySql)}]},[Un.CPlusPlus]:{community:[ec],enterprise:[]},[Un.Rust]:{community:[ec],enterprise:[]},[Un.Swift]:{community:[ec],enterprise:[]},[Un.Elixir]:{community:[ec],enterprise:[]},[Un.Nginx]:{community:[ec],enterprise:[]},[Un.Postgres]:{community:[ec],enterprise:[]},[Un.Redis]:{community:[ec],enterprise:[]},[Un.Kafka]:{community:[ec],enterprise:[]},[Un.Ignored]:{community:[],enterprise:[]},[Un.Unknown]:{community:[],enterprise:[]},[Un.Processing]:{community:[],enterprise:[]},[Un.NoContainers]:{community:[],enterprise:[]},[Un.NoRunningPods]:{community:[],enterprise:[]}},nc=6048e5,rc=zt()(Zt(e=>({darkMode:!0,setDarkMode:t=>e({darkMode:t})}),{name:Tr.DARK_MODE,storage:"undefined"!=typeof window?en(()=>localStorage):void 0})),oc={dataStreamsLoading:!1,dataStreams:[],selectedStreamName:Er},ic=zt(e=>({...oc,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(oc)})),ac=zt(e=>({drawerType:null,drawerEntityId:null,setDrawerType:t=>e({drawerType:t}),setDrawerEntityId:t=>e({drawerEntityId:t})})),sc=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(Jr(e),t)}),n.forEach(e=>{const n=Jr(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=>qr(e))),o=e[r].filter(e=>!t.has(Jr(e)));return{[r]:o}})},resetEntityStore:()=>{e({namespacesLoading:!1,namespaces:[],sourcesLoading:!1,sources:[],destinationsLoading:!1,destinations:[],actionsLoading:!1,actions:[],instrumentationRulesLoading:!1,instrumentationRules:[]})}})),lc=()=>({searchText:"",statuses:[],platformTypes:[],namespaces:[],kinds:[],monitors:[],languages:[],conditions:[],podsAgentInjectionStatus:[],errors:[],onlyErrors:!1}),cc=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:lc})),dc=zt(e=>({currentModal:"",setCurrentModal:t=>e({currentModal:t})})),uc=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 pc;!function(e){e.Instrumenting="instrumenting",e.Uninstrumenting="uninstrumenting",e.BulkInstrumenting="bulk-instrumenting",e.BulkUninstrumenting="bulk-uninstrumenting",e.DownloadingDiagnose="downloading-diagnose"}(pc||(pc={}));const hc=(e,t)=>({...t?.[e]||{total:0,current:0,percentage:0}}),mc=e=>(e.total<e.current&&(e.total=e.current+1),e.percentage=Math.round(e.current/e.total*100),e),gc=zt((e,t)=>({progress:{},setProgress:(n,r)=>{const o=t(),i=hc();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]:mc(i)}})},addProgress:(n,r,o)=>{const i=t(),a=hc(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]:mc(a)}})},resetProgress:t=>e({progress:{[t]:void 0}})})),fc=zt(e=>({selectedSources:{},setSelectedSources:t=>e({selectedSources:t}),resetSelectedState:()=>e(()=>({selectedSources:{},selectedConnection:null}))})),yc={configuredSources:{},configuredFutureApps:{},configuredDestinations:[],configuredDestinationsUpdateOnly:[]},bc=(e,t)=>e.destinationType.type!==t.destinationType.type,vc=zt(e=>({...yc,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=>bc(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=>bc(e,t))})),clearStore:()=>e(()=>({...yc}))})),xc={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"}},$c={v2:xc.v2,darkMode:!0,colors:{...xc.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:xc.font_family},Sc={v2:xc.v2,darkMode:!1,colors:{...xc.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:xc.font_family},wc=e=>e?$c:Sc;var Cc=Object.freeze({__proto__:null,baseTheme:xc,darkModeTheme:$c,getTheme:wc,lightModeTheme:Sc});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 Ec=({children:t})=>{const{darkMode:n}=rc();return e(s,{theme:wc(n),children:t})},kc={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 Ac=Object.freeze({__proto__:null,hex:kc});const Tc={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
|
-
`}},Dc={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
|
-
`},Ic=a`
|
|
224
|
-
0% {
|
|
225
|
-
transform: scale(1);
|
|
226
|
-
opacity: 1;
|
|
227
|
-
}
|
|
228
|
-
75%, 100% {
|
|
229
|
-
transform: scale(2);
|
|
230
|
-
opacity: 0;
|
|
231
|
-
}
|
|
232
|
-
`,Nc=a`
|
|
233
|
-
0% {
|
|
234
|
-
background-position: -500px 0;
|
|
235
|
-
}
|
|
236
|
-
100% {
|
|
237
|
-
background-position: 500px 0;
|
|
238
|
-
}
|
|
239
|
-
`,Rc={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 Oc=Object.freeze({__proto__:null,fade:Rc,ping:Ic,progress:Dc,shimmer:Nc,slide:Tc});const _c=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?"":kc["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]+kc["020"]:t?e.colors.majestic_blue_soft:e.colors.secondary+kc["020"]};\n }`}
|
|
273
|
-
`,Pc=({label:n,filled:r,status:o,withIcon:a,onClick:s})=>{const l=i(),c=o&&a?Qo(o,l):null;return t(_c,{$filled:r,$status:o,$clickable:!!s,onClick:s,children:[!!c&&e(c,{}),n]})},Lc=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
|
-
`,Fc={primary:o`
|
|
284
|
-
border: 1px solid ${({theme:e})=>e.text.secondary+kc["024"]};
|
|
285
|
-
background: ${({theme:e})=>e.colors.secondary};
|
|
286
|
-
color: ${({theme:e})=>e.colors.primary};
|
|
287
|
-
&:hover {
|
|
288
|
-
background: ${({theme:e})=>e.colors.secondary+kc["080"]};
|
|
289
|
-
}
|
|
290
|
-
&:active {
|
|
291
|
-
background: ${({theme:e})=>e.text.secondary+kc["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+kc["010"]};
|
|
300
|
-
}
|
|
301
|
-
&:active {
|
|
302
|
-
border: 1px solid ${({theme:e})=>e.text.dark_grey};
|
|
303
|
-
background: ${({theme:e})=>e.colors.secondary+kc["015"]};
|
|
304
|
-
}
|
|
305
|
-
`,tertiary:o`
|
|
306
|
-
border-color: transparent;
|
|
307
|
-
background: transparent;
|
|
308
|
-
&:hover {
|
|
309
|
-
background: ${({theme:e})=>e.colors.dropdown_bg_2+kc["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+kc["090"]};
|
|
319
|
-
}
|
|
320
|
-
&:active {
|
|
321
|
-
background: ${({theme:e})=>e.text.error+kc["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+kc["090"]};
|
|
328
|
-
}
|
|
329
|
-
&:active {
|
|
330
|
-
background: ${({theme:e})=>e.text.warning+kc["080"]};
|
|
331
|
-
}
|
|
332
|
-
`},Mc=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&&Fc[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+kc["010"]};
|
|
354
|
-
&:hover {
|
|
355
|
-
background: ${({theme:e})=>e.text.secondary+kc["015"]};
|
|
356
|
-
}
|
|
357
|
-
`:""}
|
|
358
|
-
`}
|
|
359
|
-
`,zc=({children:t,variant:n="primary",onClick:r,...o})=>{const i=Wt(null);return e(Lc,{$variant:n,children:e(Mc,{ref:i,$variant:n,onClick:e=>{r&&r(e),i.current?.blur()},...o,children:t})})},Uc=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
|
-
`,Bc=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(">","")}})},jc=e=>{const t=e.match(/<strong[^>]*>(.*?)<\/strong>/g);return t?.map(e=>{const t=e.replace(/<strong[^>]*>/,"").replace(/<\/strong>/,"");return{original:e,label:t}})},Hc=(n,r)=>{const o=Bc(n);o?.forEach((e,t)=>{n=n.replace(e.original,`LINK-${t}###`)});const i=jc(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(Bt,{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(Bt,{children:[e("strong",{style:{fontWeight:600},children:a?.label}),o?`${o} `:" "]},n)}return n+" "})},Wc=({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=Gt(()=>(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(Uc,{$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(Bt,{children:[Hc(n,m),r!==g.length-1?e("br",{}):null]},`text-${r}-${n}`)):n})},Gc=e=>{function t(){return void 0===e?{}:$n(e)}const[n,r]=jt(t()),[o,i]=jt({}),[a,s]=jt(t()),l=Xt((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=Gt(()=>!c(a,n),[a,n]);Ht(()=>{const o=t();void 0!==e&&"{}"===JSON.stringify(n)&&"{}"!==JSON.stringify(o)&&(r(o),s(o))},[e,n]);const u=Xt((e,t)=>Sn("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(),o=n.split(".");1===o.length?r(n=>({...n,[e]:t})):r(e=>{const n=$n(e);let r=n;for(let e=0;e<o.length-1;e++){const t=o[e];r[t]&&"object"==typeof r[t]||(r[t]={}),r=r[t]}return r[o[o.length-1]]=t,n}),i(e=>{const t=n,r=o[o.length-1],i=void 0!==e[t],a=r!==t&&void 0!==e[r];if(!i&&!a)return e;const s={...e};return i&&delete s[t],a&&delete s[r],s})}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}},Xc={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}},Vc=()=>{const{addNotification:e}=uc(),{formData:t,formErrors:n,handleFormChange:r,handleErrorChange:o,resetFormData:i}=Gc(Xc),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":li(t)&&(r[e]=Dr.FIELD_IS_REQUIRED)}}),t.type===Tn.URLTemplatization){const e=t.fields?.urlTemplatizationRulesGroups;if(e)for(const t of e)if(t.templatizationRules?.some(e=>!e.template?.trim())){r.fields=Dr.FIELD_IS_REQUIRED;break}}return i=!Object.values(r).length,!i&&n?.withAlert&&e({type:Xn.Warning,title:n.alertTitle,message:Dr.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(Xc),type:e,signals:t,name:n,notes:o,disabled:i};Object.entries(s).forEach(([e,t])=>{if(t)switch(e){case Dn.LabelsAttributes:case Dn.AnnotationsAttributes:l.fields||(l.fields={}),l.fields[e]=a(t);break;case Dn.CollectContainerAttributes:case Dn.CollectReplicaSetAttributes:case Dn.CollectWorkloadId:case Dn.CollectClusterId:case Dn.ClusterAttributes:case Dn.OverwriteExistingValues:case Dn.AttributeNamesToDelete:case Dn.Renames:case Dn.PiiCategories:case Dn.FallbackSamplingRatio:case Dn.SamplingPercentage:case Dn.EndpointsFilters:case Dn.ServicesNameFilters:case Dn.AttributeFilters:case Dn.UrlTemplatizationRulesGroups:l.fields||(l.fields={}),l.fields[e]=t}}),r(void 0,void 0,l)}}},Kc=e=>{Ht(()=>{if(e){const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])},qc=()=>{const{setCurrentModal:e}=dc(),{setDrawerType:t,setDrawerEntityId:n}=ac(),{setActiveNodeType:r,setActiveNodeId:o,activeNodeId:i}=Oi();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 nr.AddSource:e(jn.Source);break;case nr.AddDestination:e(jn.Destination);break;case nr.AddAction:e(jn.Action);break;case nr.AddRule:e(jn.InstrumentationRule)}}}},Jc=()=>{const{setDrawerType:e,setDrawerEntityId:t}=ac(),{markAsDismissed:n,markAsSeen:r}=uc();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(Qr(l,jn.InstrumentationRule));break;case jn.Source:case"InstrumentationConfig":case"InstrumentationInstance":e(jn.Source),t(Qr(l,jn.Source));break;case jn.Action:e(jn.Action),t(Qr(l,jn.Action));break;case jn.Destination:case"Destination":e(jn.Destination),t(Qr(l,jn.Destination))}r(a),c&&n(a)}}},Yc=()=>{const e=Wt(null),[t,n]=jt(0),[r,o]=jt(0);return Ht(()=>{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 Qc;!function(e){e[e.XS=16]="XS",e[e.S=18]="S",e[e.M=24]="M",e[e.L=32]="L"}(Qc||(Qc={}));const Zc=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
|
-
`,ed=({"data-id":t,icon:n,size:r=Qc.S,onClick:o,disabled:i})=>e(Zc,{"data-id":t,$size:r,$disabled:i,onClick:e=>{o&&!i&&(e.stopPropagation(),o(e))},children:e(n,{size:r})}),td=({onDone:t}={})=>{const[n,r]=jt(!1),[o,i]=jt(-1),a=Xt(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:Xt(({value:t,size:r})=>e(ed,{icon:n?yt:bt,size:r,onClick:()=>a(t)}),[n]),isCopied:n,copiedIndex:o,clickCopy:a}},nd=e=>{const{addNotification:t}=uc(),{formData:n,handleFormChange:r,formErrors:o,handleErrorChange:i,resetFormData:a}=Gc(e);return{formData:n,formErrors:o,handleFormChange:r,resetFormData:a,validateForm:e=>{const r={};let o=!0;return n.name?ci(n.name)?r.name=void 0:(o=!1,r.name=Dr.ILLEGAL_K8S_LABEL):(o=!1,r.name=Dr.FIELD_IS_REQUIRED),!o&&e?.withAlert&&t({type:Xn.Warning,title:e.alertTitle,message:Dr.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)}}},rd={type:"",name:"",exportedSignals:{logs:!1,metrics:!1,traces:!1,profiles:!1},fields:[],disabled:!1},od=e=>{const{supportedSignals:t,preLoadedFields:n}=e||{},{addNotification:r}=uc(),{formData:o,formErrors:i,handleFormChange:a,handleErrorChange:s,resetFormData:l}=Gc(rd),[c,d]=jt([]),[u,p]=jt([]);Ht(()=>{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===Wn.Dropdown){const e=ii(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,...ii(r,{})}})).map(e=>{if(n){const t="string"==typeof n?ii(n,{}):n;if(e.name in t)return{...e,value:t[e.name]}}return e}):[])},[c,n]),Ht(()=>{if(u){const e=u.map(e=>({key:e.name,value:e.value}));a("fields",e)}},[u]),Ht(()=>{if(t&&0===$i(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]=Dr.FIELD_IS_REQUIRED)}),!n&&e?.withAlert&&r({type:Xn.Warning,title:e.alertTitle,message:Dr.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(rd),type:e,name:t,disabled:n,exportedSignals:r,fields:Object.entries(ii(o,{})).map(([e,t])=>({key:e,value:t}))};return a(void 0,void 0,i),i},yamlFields:c,setYamlFields:d,dynamicFields:u,setDynamicFields:p}},id={ruleName:"",notes:"",disabled:!1,workloads:null,instrumentationLibraries:null,payloadCollection:{[ur.HttpRequest]:null,[ur.HttpResponse]:null,[ur.DbQuery]:null,[ur.Messaging]:null},codeAttributes:{[lr.Column]:null,[lr.FilePath]:null,[lr.Function]:null,[lr.LineNumber]:null,[lr.Namespace]:null,[lr.StackTrace]:null},headersCollection:null,customInstrumentations:{[dr.Java]:null,[dr.Golang]:null}},ad=()=>{const{formData:e,formErrors:t,handleFormChange:n,handleErrorChange:r,resetFormData:o}=Gc(id);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(id),ruleName:e,notes:t,disabled:r};o&&(l.payloadCollection={[ur.HttpRequest]:o[ur.HttpRequest]?{}:null,[ur.HttpResponse]:o[ur.HttpResponse]?{}:null,[ur.DbQuery]:o[ur.DbQuery]?{}:null,[ur.Messaging]:o[ur.Messaging]?{}:null}),i&&(l.codeAttributes={[lr.Column]:i[lr.Column]||null,[lr.FilePath]:i[lr.FilePath]||null,[lr.Function]:i[lr.Function]||null,[lr.LineNumber]:i[lr.LineNumber]||null,[lr.Namespace]:i[lr.Namespace]||null,[lr.StackTrace]:i[lr.StackTrace]||null}),a&&(l.headersCollection=a),s&&(l.customInstrumentations={[dr.Java]:s[dr.Java]||null,[dr.Golang]:s[dr.Golang]||null}),n(void 0,void 0,l)}}},sd=({active:e,key:t,withAltKey:n,withCtrlKey:r,withShiftKey:o,withMetaKey:i},a)=>(Ht(()=>{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),ld="data-ignore-outside-click",cd=(e,t)=>{const n=Wt(t);n.current=t,Ht(()=>{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(ld))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])},dd=({sectionNames:e,threshold:t=.4})=>{const[n,r]=jt(e[0]||""),[o,i]=jt(null),a=Wt({}),s=Wt(!1),l=Wt(!1),c=Xt((e,t)=>{a.current[e]=t},[]),d=Xt(e=>{i(e)},[]),u=Xt(e=>{l.current=!0,r(e)},[]);return Ht(()=>{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]),Ht(()=>{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}},ud=({defaultClientHeight:e=0,defaultClientwidth:t=0,onClickOutside:n,positionMode:r="local"}={})=>{const o=Wt(null),[i,a]=jt(!1),[s,l]=jt({top:0,left:0}),[c,d]=jt({edge:"top",align:"left"});cd(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})}}},pd=()=>({getItemSS:(e,t)=>{const n=sessionStorage.getItem(e);return n?ii(n,t):t},setItemSS:(e,t)=>{sessionStorage.setItem(e,JSON.stringify(t))},removeItemSS:e=>{sessionStorage.removeItem(e)}}),hd={otelServiceName:"",currentStreamName:""},md=()=>{const{formData:e,formErrors:t,handleFormChange:n,handleErrorChange:r,resetFormData:o}=Gc(hd);return{formData:e,formErrors:t,handleFormChange:n,resetFormData:o,validateForm:()=>(r(void 0,void 0,{}),!0),loadFormWithDrawerItem:({otelServiceName:e,name:t})=>{const r={...$n(hd),otelServiceName:e||t||""};n(void 0,void 0,r)}}},gd=Kt({platformType:Mn.K8s,tier:Fn.Community,version:"v0.0.0"}),fd=({children:t,platformType:n,tier:r,version:o})=>{const i=Gt(()=>({platformType:n,tier:r,version:o}),[n,r,o]);return e(gd.Provider,{value:i,children:t})},yd=(e,t)=>!t||Ri(e)>=Ri(t),bd=e=>{const t=Vt(gd),n=yd(t.version,e),r=t.platformType===Mn.Vm;return{...t,isVersionSupported:n,isVm:r,isEnterprise:t.tier===Fn.Onprem}},vd=new Set([or.StaticPod]),xd=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}},$d=(e,t,n)=>{if(t&&!e.name.toLowerCase().includes(t.toLowerCase()))return!1;if(n.showOnlySelected){const{isAllSourced:t,isSomeSourced:n,isFutureApps:r}=xd(e);return t||n||r}return!0},Sd=(e,t,n)=>!(t&&!e.name.toLowerCase().includes(t.toLowerCase()))&&(!n.showOnlySelected||e.selected),wd=(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}},Cd=(e,t,n)=>({...wd(e,t),currentStreamName:t}),Ed=(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}},kd=e=>{const{fetchNamespacesWithWorkloads:t}=e,{tier:n}=bd(),r=e=>n!==Fn.Onprem&&vd.has(e),{selectedStreamName:o}=ic(),{namespaces:i,addEntities:a}=sc(),[s,l]=jt(!1),[c,d]=jt({}),[u,p]=jt(!1),[h,m]=jt(""),[g,f]=jt({}),[y,b]=jt({}),[v,x]=jt(""),[$,S]=jt(jn.Source),[w,C]=jt(!1),[E,k]=jt(!1),A=Gt(()=>{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,!w||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,$,w,E]);return Ht(()=>{(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=>wd(e,o)),s[e.name]=t.map(e=>Cd(e,o)),c[e.name]=Ed(e,o)}a(jn.Namespace,n.map(({sources:e,...t})=>t));const{configuredSources:u,configuredFutureApps:p}=vc.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]:Ed(r,o,e)}))},searchText:v,setSearchText:x,searchBy:$,setSearchBy:S,showSelectedOnly:w,setShowSelectedOnly:C,showRunningOnly:E,setShowRunningOnly:k}};try{Qt.addDefaultLocale(nn)}catch(e){}const Ad=()=>{const e=Wt(new Qt(nn.locale));return{formatTimeAgo:Xt(t=>{try{return"string"==typeof t&&(t=t.replace("t","T").replace("z","Z")),e.current.format(new Date(t))}catch(e){return"-"}},[])}},Td=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+kc["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: ${Tc.in.center};
|
|
393
|
-
`,Dd=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
|
-
`,Id=r.div`
|
|
401
|
-
cursor: pointer;
|
|
402
|
-
display: flex;
|
|
403
|
-
align-items: center;
|
|
404
|
-
gap: 8px;
|
|
405
|
-
`,Nd=r.div`
|
|
406
|
-
display: flex;
|
|
407
|
-
align-items: center;
|
|
408
|
-
gap: 8px;
|
|
409
|
-
`,Rd=r(Bo)`
|
|
410
|
-
min-width: 350px;
|
|
411
|
-
min-height: 150px;
|
|
412
|
-
`,Od=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
|
-
`,_d=r(Wc)`
|
|
422
|
-
text-transform: uppercase;
|
|
423
|
-
font-family: ${({theme:e})=>e.font_family.secondary};
|
|
424
|
-
pointer-events: auto;
|
|
425
|
-
`,Pd=r(Wc)`
|
|
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
|
-
`,Ld=({isOpen:r,noOverlay:o,header:i,actionComponent:a,onClose:s,children:l,closeOnEscape:c=!0})=>(sd({key:"Escape",active:r&&c},()=>s()),Kc(r),r?un.createPortal(t(n,{children:[e(Ho,{hidden:!r,onClick:s,style:{opacity:o?0:1}}),t(Td,{"data-id":"modal"+(i?`-${i.title.replaceAll(" ","-")}`:""),children:[i&&t(Dd,{children:[t(Id,{onClick:s,children:[e(vt,{}),e(Pd,{children:"Cancel"})]}),e(Od,{children:e(_d,{children:i.title})}),e(Nd,{children:a})]}),e(Rd,{children:l})]})]}),document.body):null),Fd=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)+kc["050"]};
|
|
437
|
-
opacity: ${({$opacity:e})=>e||1};
|
|
438
|
-
`,Md=({orientation:t="horizontal",type:n,thickness:r=1,length:o,margin:i,opacity:a})=>e(Fd,{$orientation:t,$type:n,$thickness:r,$length:o,$margin:i,$opacity:a}),zd=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
|
-
`,Ud=r.div`
|
|
455
|
-
padding: ${({$padding:e})=>void 0!==e?e:"12px"};
|
|
456
|
-
border-bottom: 1px solid ${({theme:e})=>e.colors.border};
|
|
457
|
-
`,Bd=r.div`
|
|
458
|
-
padding: ${({$padding:e})=>void 0!==e?e:"12px"};
|
|
459
|
-
`,jd=r.div`
|
|
460
|
-
padding: ${({$padding:e})=>void 0!==e?e:"12px"};
|
|
461
|
-
border-top: 1px solid ${({theme:e})=>e.colors.border};
|
|
462
|
-
`,Hd=Ut(({isOpen:n,asPortal:r,...o},i)=>{const a=Gt(()=>{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(zd,{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(Ud,{$padding:u,children:m}),e(Bd,{$padding:u,children:n}),g&&e(jd,{$padding:u,children:g})]})},[i,o,r]);return n?r?un.createPortal(a,document.body):a:null});Hd.displayName=Hd.name;const Wd=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
|
-
`,Gd=r.div`
|
|
477
|
-
display: flex;
|
|
478
|
-
flex-direction: column;
|
|
479
|
-
align-items: flex-start;
|
|
480
|
-
gap: 8px;
|
|
481
|
-
width: 100%;
|
|
482
|
-
`,Xd=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
|
-
`,Vd=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
|
-
`,Kd=r.div`
|
|
502
|
-
display: flex;
|
|
503
|
-
flex-direction: column;
|
|
504
|
-
align-items: stretch;
|
|
505
|
-
min-width: 0;
|
|
506
|
-
`,qd=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
|
-
`,Jd=({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}=ud({positionMode:"viewport",defaultClientHeight:48,defaultClientwidth:Math.min(7.5*(s?.length||0),300)}),x=Gt(()=>!!Bc(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(Wd,{$fullWidth:d,$ellipsis:p,$hasText:!!s,onMouseEnter:$,onMouseMove:$,onMouseLeave:$,children:[c,r&&e(Qe,{fill:h.v2.colors.white[500]}),e(Hd,{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(Kd,{children:["top"===b.edge&&e(Xd,{$align:b.align,children:e(Vd,{$pointsUp:!0})}),e(qd,{children:t(Gd,{children:[(!!o||!!a)&&t(zo,{$gap:4,style:{alignItems:"center"},children:[o&&e(o,{size:16},"icon"),a&&e(yo,{size:po.XS,children:a},"title")]}),!!s&&e(yo,{size:po.XXXS,children:s}),!!l&&e(yo,{size:po.XXXS,color:ho.Secondary,children:new Date(l).toLocaleString()})]})}),"bottom"===b.edge&&e(Xd,{$align:b.align,children:e(Vd,{$pointsUp:!1})})]})})]}):e(n,{children:c})},Yd=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+kc["070"]:e.colors.dropdown_bg_2};
|
|
525
|
-
}
|
|
526
|
-
`,Qd=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: ${Ic} 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
|
|
542
|
-
}
|
|
543
|
-
`,Zd=({children:n,onClick:r,tooltip:o,size:i=36,withPing:a,pingColor:s,withBorder:l,backgroundColor:c,...d})=>e(Jd,{text:o,children:t(Yd,{$size:i,$withBorder:l,$backgroundColor:c,onClick:r,...d,children:[a&&e(Qd,{$size:i,$color:s}),n]})}),eu=r.div`
|
|
544
|
-
position: relative;
|
|
545
|
-
&.animated {
|
|
546
|
-
overflow: hidden;
|
|
547
|
-
padding-bottom: 1px;
|
|
548
|
-
border-radius: 32px;
|
|
549
|
-
animation: ${({$isLeaving:e})=>e?Tc.out.bottom:Tc.in.bottom} ${({$duration:e})=>e/10}ms forwards;
|
|
550
|
-
}
|
|
551
|
-
`,tu=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: ${Dc.out} ${({$duration:e})=>""+(e-e/10)}ms forwards;
|
|
561
|
-
`,nu=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
|
-
`,ru=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
|
-
`,ou=r(Wc)`
|
|
577
|
-
font-size: 14px;
|
|
578
|
-
color: ${({$type:e,theme:t})=>t.text[e]};
|
|
579
|
-
`,iu=r(Wc)`
|
|
580
|
-
color: ${({$type:e,theme:t})=>t.text[e]};
|
|
581
|
-
font-size: 12px;
|
|
582
|
-
`,au=r(zo)``,su=r(Wc)`
|
|
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
|
-
`,lu=({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=Wt(null),f=Wt(null),y=e=>{l&&(m(!0),l({asSeen:e?.asSeen}))};Ht(()=>(g.current=setTimeout(()=>y({asSeen:!1}),c),()=>{g.current&&clearTimeout(g.current)}),[c]);const b=r||Qo(n,p);return t(eu,{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(nu,{"data-id":"toast",$type:n,style:u,children:[e(b,{fill:p.text[n]}),t(ru,{$withAction:!!s,$overrideMaxWidth:d,children:[o&&e(ou,{$type:n,children:o}),o&&a&&e(Md,{orientation:"vertical",type:n}),a&&e(iu,{$type:n,children:a})]}),(!!s||!!l)&&t(au,{children:[s&&e(su,{"data-id":"toast-action",onClick:s.onClick,children:s.label}),l&&e(Zd,{"data-id":"toast-close",onClick:()=>y({asSeen:!0}),children:e(vt,{size:12})})]})]}),l&&e(tu,{ref:f,$duration:c,$type:n})]})},cu=r.div`
|
|
594
|
-
padding: 24px 32px;
|
|
595
|
-
`,du=r.div`
|
|
596
|
-
padding: ${({$withNote:e})=>e?"12px 0px":"12px 0px 32px 0"};
|
|
597
|
-
`,uu=r(Wc)`
|
|
598
|
-
font-size: 20px;
|
|
599
|
-
line-height: 28px;
|
|
600
|
-
`,pu=r(Wc)`
|
|
601
|
-
color: ${({theme:e})=>e.text.grey};
|
|
602
|
-
width: 416px;
|
|
603
|
-
font-style: normal;
|
|
604
|
-
font-weight: 300;
|
|
605
|
-
line-height: 24px;
|
|
606
|
-
`,hu=r.div`
|
|
607
|
-
display: flex;
|
|
608
|
-
justify-content: space-between;
|
|
609
|
-
gap: 12px;
|
|
610
|
-
`,mu=r(zc)`
|
|
611
|
-
width: 250px;
|
|
612
|
-
`,gu=r.div`
|
|
613
|
-
margin-bottom: 12px;
|
|
614
|
-
`,fu=({isOpen:n,noOverlay:r,title:o="",description:i="",note:a,approveButton:s,denyButton:l,closeOnEscape:c=!0})=>{sd({key:"Enter",active:n&&c},()=>s.onClick());const d=()=>l.onClick();return e(Ld,{isOpen:n,noOverlay:r,onClose:d,children:t(cu,{children:[e(uu,{children:o}),e(du,{$withNote:!!a,children:e(pu,{children:i})}),!!a&&e(gu,{children:e(lu,{type:a.type,title:a.title,message:a.message})}),t(hu,{children:[e(mu,{"data-id":"approve",variant:s.variant||"primary",onClick:()=>s.onClick(),children:s.text}),e(mu,{"data-id":"deny",variant:l.variant||"secondary",onClick:d,children:l.text})]})]})})},yu=({isOpen:t,noOverlay:n,name:r,onApprove:o,onDeny:i})=>e(fu,{isOpen:t,noOverlay:n,title:"Cancel"+(r?` ${r}`:""),description:"Are you sure you want to cancel?",approveButton:{text:"Confirm",variant:Xn.Warning,onClick:o},denyButton:{text:"Go Back",onClick:i}}),bu=r.div`
|
|
615
|
-
padding: 4px 0 0 0;
|
|
616
|
-
`,vu=r(Wc)`
|
|
617
|
-
font-size: 12px;
|
|
618
|
-
color: ${({theme:e})=>e.text.error};
|
|
619
|
-
`,xu=({children:t})=>e(bu,{children:e(vu,{children:t})}),$u=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
|
-
`,Su=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+kc["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
|
-
`,wu=({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);Ht(()=>g(a),[a]);return t(Uo,{children:[t($u,{"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(Su,{$isChecked:m,$isPartiallyChecked:s,$disabled:c,children:s?e(xt,{fill:h.text.white}):m?e(yt,{fill:h.text.white}):null}),n&&e(Jd,{text:o,withIcon:!0,children:e(Wc,{size:12,color:r||h.text.grey,style:{maxWidth:"90%"},children:n})})]}),!!u&&e(xu,{children:u})]})},Cu=r(zo)`
|
|
640
|
-
gap: 0;
|
|
641
|
-
`,Eu=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
|
-
`,ku=({isPrettyMode:n,setIsPrettyMode:r})=>t(Cu,{children:[e(Eu,{$position:"left",$selected:n,onClick:()=>r(!0),children:e($t,{})}),e(Eu,{$position:"right",$selected:!n,onClick:()=>r(!1),children:e(St,{})})]}),Au=r.table`
|
|
654
|
-
border-collapse: collapse;
|
|
655
|
-
font-family: ${({theme:e})=>e.font_family.primary};
|
|
656
|
-
`,Tu=r.tbody``,Du=r.tr`
|
|
657
|
-
td:first-child {
|
|
658
|
-
padding-left: 0 !important;
|
|
659
|
-
}
|
|
660
|
-
td:last-child {
|
|
661
|
-
padding-right: 0 !important;
|
|
662
|
-
}
|
|
663
|
-
`,Iu=r.td`
|
|
664
|
-
vertical-align: top;
|
|
665
|
-
padding: 4px 6px;
|
|
666
|
-
`,Nu=r(Wc)`
|
|
667
|
-
white-space: nowrap;
|
|
668
|
-
`,Ru=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
|
-
`,Ou=({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=ii(n,{}),t=Ti(e);c=Di(o?Or(t):t)}else c=n;return a&&"json"===t?e(_u,{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(Ru,{...n({token:t})},`line-${o}-token-${r}`))},`line-${o}`))})})},_u=({darkMode:n,str:r})=>{const o=i(),a=(n,r)=>{const i=new Array(n).fill(n=>t(Du,{...n,children:[e(Iu,{}),e(Iu,{})]}));return e(Bt,{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(Au,{children:e(Tu,{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(Bt,{children:[a(2,s),t(Du,{...c,children:[e(Iu,{children:e(Nu,{children:l[0].content})}),e(Iu,{})]})]},`line-${s}`):2===l.length?e(Du,{...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(Jd,{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=Qo(i,n);return t||(t=Qo(Xn.Warning,n)),e(t,{},`${o}-${i}-${r}`);default:return null}})?.filter(e=>!!e)||[]}})(n.content,o),c=0===i;return e(Iu,{children:t(zo,{children:[e(zo,{children:l}),e(Ru,{$noWrap:c,...r({token:n}),children:a})]})},`line-${s}-token-${i}`)})},`line-${s}`):(l.length,null)})})})})},Pu={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 Lu(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 Pu[r]?{value:t,unit:r}:{value:t,unit:"px"}}function Fu(e){const t=Lu(e);return`${t.value}${t.unit}`}const Mu=((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"),zu=({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}=Lu(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:Fu(1.5),height:Fu(4),borderRadius:Fu(2),backgroundColor:u,transition:"2s",animationFillMode:"both",animation:`${Mu} ${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)`}})]})},Uu=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
|
-
`,Bu=({extend:t,size:n=14,align:r="center"})=>e(Uu,{$align:r,children:e(wt,{size:n,rotate:t?180:0})}),ju=r.div`
|
|
682
|
-
border-radius: 24px;
|
|
683
|
-
background-color: ${({theme:e,$status:t})=>t===Xn.Error?e.text.error+kc["010"]:t===Xn.Warning?e.text.warning+kc["010"]:e.colors.secondary+kc["005"]};
|
|
684
|
-
&:hover {
|
|
685
|
-
background-color: ${({theme:e,$status:t})=>t===Xn.Error?e.text.error+kc["020"]:t===Xn.Warning?e.text.warning+kc["020"]:e.colors.secondary+kc["010"]};
|
|
686
|
-
}
|
|
687
|
-
cursor: pointer;
|
|
688
|
-
transition: background 0.3s;
|
|
689
|
-
`,Hu=r.div`
|
|
690
|
-
display: flex;
|
|
691
|
-
align-items: center;
|
|
692
|
-
gap: 12px;
|
|
693
|
-
padding: 12px 18px;
|
|
694
|
-
`,Wu=r.div`
|
|
695
|
-
display: flex;
|
|
696
|
-
flex-direction: column;
|
|
697
|
-
gap: 8px;
|
|
698
|
-
padding: 6px 18px 12px 18px;
|
|
699
|
-
`,Gu=r.div`
|
|
700
|
-
display: flex;
|
|
701
|
-
align-items: center;
|
|
702
|
-
gap: 12px;
|
|
703
|
-
`,Xu=r(Wc)`
|
|
704
|
-
white-space: nowrap;
|
|
705
|
-
`,Vu=r(Uo)`
|
|
706
|
-
width: 16px;
|
|
707
|
-
`,Ku=({conditions:n,headerLabelError:r="Something Failed",headerLabelWarning:o="Something isn't right",headerLabelSuccess:a="Everything Successful"})=>{const s=i(),[l,c]=jt(!1),d=Gt(()=>bi(n),[n]),{errors:u,hasErrors:p,warnings:h,hasWarnings:m,hasDisableds:g,hasLoadings:f}=Gt(()=>Mr(d),[d]);Ht(()=>{c(p||m||g)},[p,m,g]);const y=(!d.length||f)&&!p&&!m&&!g,b=p?Xn.Error:m?Xn.Warning:g?Xn.Info:Xn.Success,v=Qo(b,s),x=p?r:m||g?o:y?"Loading...":a,$=p?s.text.error:m?s.text.warning:s.text.info,S=`(${p?u.length:m?h.length:d.length}/${d.length})`,w=p?s.text.error_secondary:m?s.text.warning_secondary:s.text.info_secondary,C=Xt(()=>c(e=>!e),[]);return t(ju,{onClick:C,$status:b,children:[t(Hu,{children:[e(y?zu:v,{}),e(Wc,{color:$,size:14,children:x}),e(Wc,{color:w,size:12,family:"secondary",children:S}),e(Bu,{extend:l,align:"right"})]}),l&&e(Wu,{children:d.map(({status:n,type:r,reason:o,message:i},a)=>{const l=n===Kn.Loading?()=>e(zu,{scale:.8}):n===Kn.Disabled?Qo(Xn.Info,s):Qo(n,s),c=n===Kn.Disabled?s.text.info:n===Xn.Error?s.text.error:n===Xn.Warning?s.text.warning:s.text.info,d=n===Kn.Disabled?s.text.info_secondary:n===Xn.Error?s.text.error_secondary:n===Xn.Warning?s.text.warning_secondary:s.text.info_secondary;return t(Gu,{children:[e(Vu,{children:e(l,{})}),t(Wc,{color:c,size:12,children:[e(Xu,{color:d,size:12,weight:700,children:r}),i||o]})]},`condition-${a}`)})})]})},qu=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]+kc["050"]}`:"none"};
|
|
715
|
-
background: ${({$withBackground:e,$status:t,theme:n})=>e?`linear-gradient(90deg, transparent 0%, ${n.text[t]+kc["030"]} 100%)`:"transparent"};
|
|
716
|
-
`,Ju=r.div`
|
|
717
|
-
display: flex;
|
|
718
|
-
align-items: center;
|
|
719
|
-
`,Yu=r.div`
|
|
720
|
-
display: flex;
|
|
721
|
-
align-items: center;
|
|
722
|
-
`,Qu=({title:n,subtitle:r,status:o=Xn.Default,forceIcon:a,withIcon:s,withBorder:l,withBackground:c,width:d,size:u=12,family:p="secondary",nowrap:h=!1})=>{const m=i(),g=[Kn.Loading,Kn.Disabled].includes(o)?Xn.Info:o,f=a?()=>e(a,{size:u+2,fill:m.text[g]}):o===Kn.Loading?()=>e(zu,{scale:.8}):()=>Qo(g,m)?.({size:u+2});return t(qu,{$status:g,$width:d,$size:u,$withIcon:s,$withBorder:l,$withBackground:c,children:[s&&e(Ju,{children:e(f,{})}),(!!n||!!r)&&t(Yu,{children:[!!n&&e(Wc,{size:u,family:p,color:m.text[g],nowrap:h,children:n}),!!n&&!!r&&e(Md,{orientation:"vertical",length:u-2+"px",type:g}),!!r&&e(Wc,{size:u-2,family:p,color:m.text[`${g}_secondary`],nowrap:h,children:r})]})]})},Zu=({label:n,onClick:r,variant:o="tertiary",textProps:a,...s})=>{const l=i();return t(zc,{onClick:r,variant:o,...s,children:[e(Ct,{fill:"primary"===o?l.text.primary:l.text.info}),e(Wc,{size:14,family:"secondary",decoration:"underline",color:"primary"===o?l.text.primary:void 0,...a,children:n||Nr.ADD})]})},ep=r(zo)`
|
|
723
|
-
width: 100%;
|
|
724
|
-
border-radius: 8px;
|
|
725
|
-
background-color: ${({theme:e})=>e.colors.secondary+kc["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
|
-
`,tp=({value:n,callbackCopyDone:r})=>{const{clickCopy:o,isCopied:i}=td();return t(ep,{children:[e("pre",{children:n}),e(Zd,{onClick:e=>{e.stopPropagation(),o(n),r?.()},tooltip:i?"Copied!":"Copy",children:e(i?yt:bt,{})})]})},np=r(Wc)`
|
|
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
|
-
`,rp=({maxWidth:n,text:r,textSize:o=16,textColor:i})=>{const[a,s]=jt(!1),l=Wt(null);return Ht(()=>{if(l.current){const{clientWidth:e}=l.current;s(e<1.05*(n-o)&&e>.95*(n-o))}},[n,o,r]),t(zo,{$gap:0,children:[r&&e(Jd,{text:a?r:void 0,children:e(np,{ref:l,$maxWidth:n-o,size:o,color:i,children:r})}),a&&e(np,{$maxWidth:o,size:o,color:i,children:"..."})]})},op=({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})},ip=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+kc["030"]} 100%)`}};
|
|
751
|
-
`,ap=({icon:t,src:n="",alt:r="",status:o,size:i=36})=>e(ip,{$status:o,$size:i,children:n?e(op,{src:n,alt:r,size:i-12}):e(t||g,{size:i-12})}),sp=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
|
-
`,lp=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)+kc["030"]};
|
|
771
|
-
background: ${({$status:e,theme:t})=>{const n=t.colors[e||"dropdown_bg_2"];return`linear-gradient(180deg, ${n} 0%, ${n+kc["030"]} 100%)`}};
|
|
772
|
-
`,cp=({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(cp,{icons:r.map(t=>()=>e(op,{src:t,size:c})),status:o,size:a,id:s});if(1===n.length)return e(ap,{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(sp,{$status:o,$size:a,children:n.map((r,i)=>i>2?null:e(lp,{$status:o,$size:1.5*c,$top:d(i),$left:u(i),$zIndex:i+1,children:2===i&&n.length>3?t(Wc,{family:"secondary",color:l.text.dark_grey,size:.8*c,children:["+",n.length-2]}):e(r,{size:c})},`icon-${s}-${i}`))})},dp=Jl.map(({id:e})=>e),up=({monitors:n=dp,withTooltips:r,withLabels:o,size:a=12,color:s})=>{const l=i(),c=s||l.text.grey;return e(zo,{$gap:o?a:a/2,children:n.map(n=>{const i=yn(n.toLowerCase()),s=ro(n);return s?e(Jd,{text:r?i:"",children:t(zo,{$gap:a/3,children:[e(s,{size:o?a+2:a,fill:c}),o&&e(Wc,{size:a,color:c,children:i})]})},n):null})})},pp=r.div`
|
|
773
|
-
visibility: hidden;
|
|
774
|
-
`,hp=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]+kc["010"]:e.colors.secondary+kc["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]+kc["020"]:e.colors.secondary+kc["010"])};
|
|
788
|
-
${pp} {
|
|
789
|
-
visibility: visible;
|
|
790
|
-
}
|
|
791
|
-
}
|
|
792
|
-
`:`\n &:hover {\n ${pp} {\n visibility: visible;\n }\n }\n `}
|
|
793
|
-
`,mp=r.div`
|
|
794
|
-
display: flex;
|
|
795
|
-
align-items: center;
|
|
796
|
-
gap: 8px;
|
|
797
|
-
margin-left: auto;
|
|
798
|
-
`,gp=r(Wc)`
|
|
799
|
-
margin-right: 16px;
|
|
800
|
-
`,fp=r(Wc)`
|
|
801
|
-
font-size: 10px;
|
|
802
|
-
color: ${({theme:e})=>e.text.grey};
|
|
803
|
-
`,yp=({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:S,onCheckboxChange:w}={},extendableProps:{withExtend:C,isExtended:E,renderExtended:k}={},...A})=>{const T=i(),[D,I]=jt(E||!1),[N,R]=jt(0),O=Wt(null),_=Wt(null),P=Wt(null);return Ht(()=>{if(O.current){const e=O.current.clientWidth,t=_.current?.clientWidth||0;R(e-((v?125:85)+t))}},[v]),t(hp,{ref:O,$status:p,$faded:h,$bgColor:m,$bgColorHover:g,$withClick:!!a,onClick:a,...A,children:[t(zo,{$gap:8,children:[t(zo,{$gap:16,children:[S?e(zu,{}):v?e(wu,{value:$,onChange:w,disabled:x}):null,c?.length||u?.length?e(cp,{icons:c,iconSrcs:u,status:p,id:`${n}-${r}`}):l||d?e(ap,{icon:l,src:d,status:p}):null]}),t(Uo,{$gap:4,children:[n&&e(rp,{maxWidth:N,text:n,textSize:14}),t(zo,{$gap:4,children:[r&&e(rp,{maxWidth:N-(P.current?.clientWidth||0),text:r,textSize:10,textColor:T.text.grey}),f&&f.length>0&&t(zo,{$gap:4,ref:P,children:[r&&e(fp,{children:"•"}),e(up,{monitors:f,withLabels:y,size:10})]})]}),b&&b.length>0?e(zo,{$gap:4,children:b?.map((t,n)=>e(Bt,{children:t},`componentsUnderTitles-${n}`))}):null]}),t(mp,{ref:_,children:[!!o&&e(pp,{children:e(gp,{size:14,family:"secondary",children:o})}),s&&s(),C&&t(Bt,{children:[e(Md,{orientation:"vertical",length:"16px",margin:"0 2px"}),e(Zd,{onClick:()=>I(e=>!e),children:e(Bu,{extend:D})})]})]})]}),D&&k&&t(Uo,{children:[e(Md,{margin:"16px 0"}),k()]})]})},bp=r(zo)`
|
|
804
|
-
width: 100%;
|
|
805
|
-
justify-content: space-between;
|
|
806
|
-
`,vp=r(Wc)`
|
|
807
|
-
font-size: 12px;
|
|
808
|
-
color: ${({theme:e})=>e.text.grey};
|
|
809
|
-
`,xp=r(Wc)`
|
|
810
|
-
font-size: 10px;
|
|
811
|
-
color: ${({theme:e})=>e.text.darker_grey};
|
|
812
|
-
`,$p=r.div`
|
|
813
|
-
display: flex;
|
|
814
|
-
align-items: center;
|
|
815
|
-
gap: 8px;
|
|
816
|
-
margin-left: auto;
|
|
817
|
-
`,Sp=r(Wc)`
|
|
818
|
-
font-size: 12px;
|
|
819
|
-
text-align: right;
|
|
820
|
-
`,wp=({title:n,subTitle:r,tooltip:o,value:i})=>t(bp,{children:[e(Uo,{$gap:4,children:t(Jd,{text:o||"",children:[n&&e(vp,{children:n},"title"),r&&e(xp,{children:r},"subtitle")]})}),e($p,{children:i?.status?e(Qu,{status:"transitioning"===i.status?Kn.Loading:i.status,title:i.text||i.status,withBorder:!0,withIcon:!0}):e(Sp,{children:i?.text||"-"})})]}),Cp=r(Uo)`
|
|
821
|
-
width: 100%;
|
|
822
|
-
`,Ep=({containerName:n,actualDevices:r,started:o,ready:i,instrumentationInstances:a})=>{const s=Gt(()=>{const t=[];return o?.name&&t.push(e(Qu,{status:hi(o.value)?Ei(o.value)?Xn.Success:Xn.Error:Xn.Default,title:o.name,withIcon:!0,withBorder:!0,size:8},"started")),i?.name&&t.push(e(Qu,{status:hi(i.value)?Ei(i.value)?Xn.Success:Xn.Error:Xn.Default,title:i.name,withIcon:!0,withBorder:!0,size:8},"ready")),t},[o?.name,o?.value,i?.name,i?.value]);return e(yp,{title:n.value,subTitle:a.length?`${a.length} Instrumented Processes`:void 0,visualProps:{componentsUnderTitles:s},renderActions:()=>e(Qu,{status:Xn.Info,title:"Instrumentation Device",subtitle:r.value&&"[]"!==r.value?r.value:"none",withBorder:!0}),extendableProps:{isExtended:!!a.length,renderExtended:()=>e(Cp,{$gap:24,children:a.map((n,r)=>t(Cp,{$gap:8,children:[e(wp,{title:`Instrumented Process #${r+1}`,subTitle:n.message?.value||"",value:{status:n.healthy.status,text:n.healthy.status===Xn.Success?"healthy":"unhealthy"}}),n.identifyingAttributes?.map(({name:t,value:n})=>e(wp,{title:t,subTitle:"",value:{text:n,status:void 0}},`describe-${t}-${n}`))]},`process-${r}`))})}})},kp=({title:n="Data not found",subTitle:r})=>{const o=i().v2.colors.grey[400];return t(Bo,{children:[t(zo,{$gap:8,children:[e(Et,{fill:o}),e(yo,{size:po.XS,color:o,align:"center",children:n})]}),r&&e(yo,{size:po.XXS,color:o,align:"center",children:r})]})},Ap=r(Uo)`
|
|
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
|
-
`,Tp=qt(({id:t,data:n})=>{const{title:r,subTitle:o}=n;return e(Ap,{"data-id":t,children:e(kp,{title:r,subTitle:o})})});Tp.displayName=Tp.name;const Dp=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
|
-
`,Ip=r.div`
|
|
835
|
-
position: relative;
|
|
836
|
-
`,Np=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
|
-
`,Rp=qt(({id:r,data:o})=>{const{id:a,status:s,title:l,icons:c,isVirtual:d}=o,u=i(),p=d||s!==Xn.Error?null:Qo(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(Ip,{"data-id":r,children:[e(Dp,{$isVirtual:d,children:e(cp,{id:a,icons:c,status:d?void 0:s})}),t(Np,{children:[p&&e(p,{}),e(Wc,{size:12,style:{textAlign:"center",wordBreak:"break-word",lineHeight:"1.3"},children:l})]})]})]})});Rp.displayName=Rp.name;const Op={duration:300,padding:.1,includeHiddenNodes:!0},_p=r.div`
|
|
849
|
-
height: 100%;
|
|
850
|
-
.react-flow__attribution {
|
|
851
|
-
visibility: hidden;
|
|
852
|
-
}
|
|
853
|
-
`,Pp=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
|
-
`,Lp={[er.MapItem]:Rp,[er.NoData]:Tp},Fp=({trigger:e})=>{const{fitView:t}=dn(),n=Wt(!0);return Ht(()=>{n.current?n.current=!1:e>0&&requestAnimationFrame(()=>t(Op))},[e,t]),null},Mp=({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}=qc(),{setActiveNodeType:h,setActiveNodeId:m}=Oi();return t(sn,{zoomOnScroll:s,nodes:n,nodeTypes:Lp,edges:r,onNodeClick:p,onEdgeClick:l,onNodeMouseEnter:c,onNodeMouseLeave:d,onNodesChange:o,onEdgesChange:i,onBlur:()=>{h(null),m(null)},children:[e(Fp,{trigger:a}),e(Pp,{children:e(ln,{position:"bottom-right",orientation:"horizontal",showInteractive:!1,showZoom:!0,showFitView:!0,fitViewOptions:Op,children:u&&e(cn,{onClick:u,children:e(kt,{size:20})})})})]})},zp=t=>e(_p,{children:e(an,{children:e(Mp,{...t})})}),Up={type:"",disabled:!1,name:"",notes:"",signals:[],fields:{}},Bp=Kt(null),jp="All row fields are required",Hp="At least one row is required",Wp=Dr.LATENCY_HTTP_ROUTE,Gp=e=>"string"==typeof e?!e.trim():li(e),Xp=(e,t)=>!!e&&t.every(t=>{const n=e[t];return Array.isArray(n)?n.length>0:!Gp(n)}),Vp=({children:t})=>{const[n,r]=jt(null),o=Gc(Up),i=Xt(e=>{o.resetFormData(),o.handleErrorChange(void 0,void 0,{}),e?.type&&o.handleFormChange("type",e.type),r(e)},[]),a=Xt(e=>{var t;o.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)),o.handleErrorChange(void 0,void 0,{}),r((t=e.type,_i.find(e=>e.type===t)??Pi.find(e=>e.type===t)??null))},[]),s=Xt(()=>{if(!n)return{errorMessage:"No action type selected",preparedFormData:$n(Up)};const e=(e=>{const t=$n(e),n=t.fields||{},r=n[Dn.UrlTemplatizationRulesGroups];r?.length&&(n[Dn.UrlTemplatizationRulesGroups]=r.map(e=>({...e,templatizationRules:(e.templatizationRules||[]).filter(e=>!!e.template?.trim())})));const o=n[Dn.AttributeNamesToDelete];o?.length&&(n[Dn.AttributeNamesToDelete]=o.filter(e=>!!e?.trim()));const i=n[Dn.Renames];return i&&(n[Dn.Renames]=Object.fromEntries(Object.entries(i).filter(([e,t])=>!!e?.trim()&&!!t?.trim()))),t.fields=n,t})(o.formData),t={};li(e.signals)&&(t.signals=Dr.FIELD_IS_REQUIRED),n.type&&Object.assign(t,((e,t,n)=>{const r={},o=t.fields||{},i=n.fields||{};switch(e){case Tn.K8sAttributes:{const e=!(o[Dn.CollectContainerAttributes]||o[Dn.CollectReplicaSetAttributes]||o[Dn.CollectWorkloadId]||o[Dn.CollectClusterId]),t=!o[Dn.LabelsAttributes]?.length,n=!o[Dn.AnnotationsAttributes]?.length;e&&t&&n&&(r[Dn.CollectContainerAttributes]="Enable at least one option or add a label/annotation row");const i=o[Dn.LabelsAttributes];i?.some(e=>!Xp(e,["labelKey","attributeKey","fromSources"]))&&(r[Dn.LabelsAttributes]=jp);const a=o[Dn.AnnotationsAttributes];a?.some(e=>!Xp(e,["annotationKey","attributeKey","fromSources"]))&&(r[Dn.AnnotationsAttributes]=jp);break}case Tn.AddClusterInfo:{const e=o[Dn.ClusterAttributes];e?.length?e.some(e=>!Xp(e,["attributeName","attributeStringValue"]))&&(r[Dn.ClusterAttributes]=jp):r[Dn.ClusterAttributes]=Hp;break}case Tn.DeleteAttributes:{const e=i[Dn.AttributeNamesToDelete]||[],t=o[Dn.AttributeNamesToDelete]||[];t.length?e.length>t.length&&(r[Dn.AttributeNamesToDelete]=jp):r[Dn.AttributeNamesToDelete]=e.length?jp:Hp;break}case Tn.RenameAttributes:{const e=Object.entries(i[Dn.Renames]||{}),t=Object.entries(o[Dn.Renames]||{}),n=e.some(([e,t])=>!e?.trim()||!t?.trim());t.length?n&&(r[Dn.Renames]=jp):r[Dn.Renames]=e.length?jp:Hp;break}case Tn.PiiMasking:{const e=o[Dn.PiiCategories];e?.length||(r[Dn.PiiCategories]="Select at least one attribute to mask");break}case Tn.ErrorSampler:Gp(o[Dn.FallbackSamplingRatio])&&(r[Dn.FallbackSamplingRatio]=Dr.FIELD_IS_REQUIRED);break;case Tn.ProbabilisticSampler:Gp(o[Dn.SamplingPercentage])&&(r[Dn.SamplingPercentage]=Dr.FIELD_IS_REQUIRED);break;case Tn.LatencySampler:{const e=o[Dn.EndpointsFilters];e?.length?e.some(e=>!Xp(e,["serviceName","httpRoute","minimumLatencyThreshold","fallbackSamplingRatio"]))?r[Dn.EndpointsFilters]=jp:e.some(e=>!!e.httpRoute&&!e.httpRoute.startsWith("/"))&&(r[Dn.EndpointsFilters]=Wp):r[Dn.EndpointsFilters]=Hp;break}case Tn.ServiceNameSampler:{const e=o[Dn.ServicesNameFilters];e?.length?e.some(e=>!Xp(e,["serviceName","samplingRatio","fallbackSamplingRatio"]))&&(r[Dn.ServicesNameFilters]=jp):r[Dn.ServicesNameFilters]=Hp;break}case Tn.SpanAttributeSampler:{const e=o[Dn.AttributeFilters],t=["stringCondition","numberCondition","booleanCondition","jsonCondition"],n=new Set(["exists","is_valid_json","is_invalid_json","jsonpath_exists"]);e?.length?e.some(e=>{if(!Xp(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)||!Gp(i.expectedValue))})&&(r[Dn.AttributeFilters]=jp):r[Dn.AttributeFilters]=Hp;break}case Tn.URLTemplatization:{const e=o[Dn.UrlTemplatizationRulesGroups];(!e?.length||e.some(e=>!e.templatizationRules?.length))&&(r[Dn.UrlTemplatizationRulesGroups]="Each rule group needs at least one non-blank template");break}}return r})(n.type,e,o.formData)),o.handleErrorChange(void 0,void 0,t);return{errorMessage:Object.keys(t).length>0?"Invalid form values":void 0,preparedFormData:e}},[o,n]),l=Gt(()=>({selectedOption:n,onSelectOption:i,loadAction:a,genericForm:o,validateFormData:s}),[n,i,a,o,s]);return e(Bp.Provider,{value:l,children:t})},Kp=()=>{const e=Vt(Bp);if(!e)throw new Error("useActionFormContext must be used within an ActionFormContextProvider");return e},qp={name:""},Jp=Kt(null),Yp=({children:t,defaultExcludeName:n=""})=>{const{dataStreams:r}=ic(),[o,i]=jt(void 0),[a,s]=jt(n),[l,c]=jt(void 0),[d,u]=jt(null),p=Wt(null),h=Gc(qp),m=Xt(e=>{h.resetFormData({name:e}),h.handleErrorChange(void 0,void 0,{}),i(void 0),s(e),c(e),u(null),p.current=null},[]),g=Xt(()=>{const e=$n(h.formData),t=(e=>{const t={};return e.name?ci(e.name)||(t.name=Dr.ILLEGAL_K8S_LABEL):t.name=Dr.FIELD_IS_REQUIRED,t})(e);h.handleErrorChange(void 0,void 0,t);const n=Object.keys(t).length>0?Dr.REQUIRED_FIELDS:void 0;return i(n),{errorMessage:n,preparedFormData:e}},[h]),f=Xt(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=Xt(async()=>{const e=p.current,t=d?.preparedFormData;p.current=null,u(null),e&&t&&await e(t)},[d]),b=Xt(()=>{p.current=null,u(null)},[]),v=Gt(()=>({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(Jp.Provider,{value:v,children:t})},Qp=()=>{const e=Vt(Jp);if(!e)throw new Error("useDataStreamFormContext must be used within a DataStreamFormContextProvider");return e},Zp={type:"",name:"",currentStreamName:"",disabled:!1,exportedSignals:{logs:!1,metrics:!1,traces:!1,profiles:!1},fields:[]},eh={activeForm:null,onChangeActiveForm:()=>{},loadDestination:()=>{},genericForm:void 0,validateFormData:()=>({isOk:!1,preparedFormData:$n(Zp)}),unsavedDestinations:[],thisUnsavedDestination:void 0,setUnsavedDestinations:()=>{},addUnsavedDestination:()=>{},updateUnsavedDestination:()=>{},deleteUnsavedDestination:()=>{}},th=Kt(eh),nh=e=>e.filter(e=>!!e).map(e=>{const{name:t,componentType:n,componentProperties:r,displayName:o,initialValue:i,renderCondition:a}=e,s=n===Wn.Dropdown,l=ii(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}}),rh=({children:t})=>{const{selectedStreamName:n}=ic(),r=sc(e=>e.destinations),[o,i]=jt(null),[a,s]=jt(eh.unsavedDestinations),l=Gt(()=>"number"==typeof o?.unsavedIdx?a[o.unsavedIdx]:void 0,[o,a]),c=Xt((e,t)=>{o&&(s(t=>[...t,{...e,option:o.option}]),i(t?e=>e?{...e,listType:Fi.UNSAVED,unsavedIdx:a.length}:null:null))},[o,a.length]),d=Xt((e,t,n)=>{o&&(s(n=>n.map((n,r)=>r===e?{...n,...t,option:o.option}:n)),i(n?e=>e?{...e,listType:Fi.UNSAVED}:null:null))},[o]),u=Xt(e=>{s(t=>t.filter((t,n)=>n!==e)),i(null)},[]),p=Gc({...Zp,currentStreamName:n});Ht(()=>{if(!o)return;if(l)return void p.resetFormData({...l.formData});if(o.listType===Fi.EXISTS&&o.option.id){const e=r.find(e=>e.id===o.option.id);if(e)return void p.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=Si(o.option.supportedSignals);p.resetFormData({type:o.option.type,name:o.option.displayName,currentStreamName:n,disabled:!1,exportedSignals:{logs:e.includes(fr.Logs),metrics:e.includes(fr.Metrics),traces:e.includes(fr.Traces),profiles:e.includes(fr.Profiles)},fields:o.dynamicFields.map(e=>({key:e.name,value:e.value}))})},[o,l]);const h=Xt(e=>{p.resetFormData(),p.handleErrorChange(void 0,void 0,{}),i(e?{...e,dynamicFields:e.option?.fields?nh(e.option.fields):[]}:null)},[]),m=Xt((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=ii(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=nh(o.fields);i({listType:Fi.EXISTS,option:o,dynamicFields:a})},[]),g=Xt(()=>{const e=$n(p.formData),t={};o?.dynamicFields.forEach(({name:n,required:r})=>{if(r){const r=e.fields.find(e=>e.key===n)?.value;li(r)&&(t[n]=Dr.FIELD_IS_REQUIRED)}});return $i(e.exportedSignals).length||(t.exportedSignals=Dr.FIELD_IS_REQUIRED),p.handleErrorChange(void 0,void 0,t),{errorMessage:0===Object.keys(t).length?void 0:"Invalid form values",preparedFormData:e}},[p,o]);return e(th.Provider,{value:{activeForm:o,onChangeActiveForm:h,loadDestination:m,genericForm:p,validateFormData:g,unsavedDestinations:a,thisUnsavedDestination:l,setUnsavedDestinations:s,addUnsavedDestination:c,updateUnsavedDestination:d,deleteUnsavedDestination:u},children:t})},oh=()=>Vt(th),ih={disabled:!1,ruleName:"",notes:"",workloads:null,instrumentationLibraries:null,payloadCollection:null,codeAttributes:null,headersCollection:null,customInstrumentations:null},ah=Kt(null),sh=({children:t})=>{const[n,r]=jt(null),o=Gc(ih),i=Xt(e=>{o.resetFormData(),o.handleErrorChange(void 0,void 0,{}),r(e)},[]),a=Xt(e=>{var t;o.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)),o.handleErrorChange(void 0,void 0,{}),r((t=e.type,zi.find(e=>e.type===t)??null))},[]),s=Xt(()=>{if(!n)return{errorMessage:"No rule type selected",preparedFormData:$n(ih)};const e=(e=>{const t=$n(e);return t.headersCollection?.[cr.HeaderKeys]?.length&&(t.headersCollection[cr.HeaderKeys]=t.headersCollection[cr.HeaderKeys].map(e=>e.trim()).filter(e=>e)),t.customInstrumentations?.[dr.Golang]?.length&&(t.customInstrumentations[dr.Golang]=t.customInstrumentations[dr.Golang].map(e=>new vr(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?.[dr.Java]?.length&&(t.customInstrumentations[dr.Java]=t.customInstrumentations[dr.Java].map(e=>new br(e.className,e.methodName)).filter(e=>{return t=e,!(!t.className?.trim()&&!t.methodName?.trim());var t})),t})(o.formData),t=((e,t)=>{const n={};switch(e){case sr.CodeAttributes:Object.values(t.codeAttributes||{}).some(e=>null!=e)||(n.codeAttributes="Code attributes are required");break;case sr.PayloadCollection:Object.values(t.payloadCollection||{}).some(e=>null!=e)||(n.payloadCollection="Payload collection are required");break;case sr.HeadersCollection:t.headersCollection?.[cr.HeaderKeys]?.length||(n.headersCollection="Header keys are required");break;case sr.CustomInstrumentation:{const e=t.customInstrumentations?.[dr.Golang]||[],r=t.customInstrumentations?.[dr.Java]||[];if(!e.length&&!r.length){n.customInstrumentations="Custom instrumentation are required";break}const o=e.findIndex(e=>!new vr(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 br(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);return o.handleErrorChange(void 0,void 0,t),{errorMessage:Object.keys(t).length>0?"Invalid form values":void 0,preparedFormData:e}},[o,n]),l=Gt(()=>({selectedOption:n,onSelectOption:i,loadRule:a,genericForm:o,validateFormData:s}),[n,i,a,o,s]);return e(ah.Provider,{value:l,children:t})},lh=()=>{const e=Vt(ah);if(!e)throw new Error("useRuleFormContext must be used within a RuleFormContextProvider");return e};function ch(e){return!e||!e.sources?.length&&!e.namespaces?.length&&!e.languages?.length}function dh(e){return e?{sources:e.sources?[...e.sources]:[],namespaces:e.namespaces?[...e.namespaces]:[],languages:e.languages?[...e.languages]:[]}:{sources:[],namespaces:[],languages:[]}}function uh(e){return null==e||0===e}function ph(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 hh(e){return ch(e.sourceScopes)?null:e.sourceScopes}function mh(e){return hh(e)}function gh(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 fh(e){if("custom"===e.durationPreset){const t=parseFloat(e.customDurationMs);return isNaN(t)?null:t}return parseInt(e.durationPreset,10)}function yh(e){return{httpServer:{[e.routeType]:e.route||null,method:e.method||null}}}function bh(e){return"all"===e.operationType?null:"httpServer"===e.operationType?yh(e):"httpClient"===e.operationType?{httpClient:{serverAddress:e.serverAddress||null,["route"===e.routeType?"templatedPath":"templatedPathPrefix"]:e.route||null,method:e.method||null}}:null}function vh(e){return"all"===e.operationType?null:"httpServer"===e.operationType?yh(e):"kafkaConsumer"===e.operationType?{kafkaConsumer:{kafkaTopic:e.kafkaTopic||null}}:"kafkaProducer"===e.operationType?{kafkaProducer:{kafkaTopic:e.kafkaTopic||null}}:null}function xh(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:hh(e),percentageAtMost:gh(e),operation:bh(e)}}function $h(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:hh(e),error:e.keepErrors,durationAtLeastMs:"Duration"===e.ruleType?fh(e):null,percentageAtLeast:gh(e),operation:vh(e)}}function Sh(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:hh(e),percentageAtMost:gh(e)??0,operation:vh(e)}}function wh(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:mh(e),operation:bh(e),percentageAtMost:gh(e),notes:e.notes||null}}function Ch(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:mh(e),error:"Error"===e.ruleType,durationAtLeastMs:"Duration"===e.ruleType?fh(e):null,operation:vh(e),percentageAtLeast:gh(e),notes:e.notes||null}}function Eh(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:mh(e),operation:vh(e),percentageAtMost:gh(e)??0,notes:e.notes||null}}const kh=["5000","1000","500","100","50"],Ah=["50","25","10","1","0.5","0.1","0"];function Th(e){if(null==e)return{percentageMode:"all",percentagePreset:"0",customPercentage:""};const t=Ah.find(t=>Number(t)===e);return t?{percentageMode:"sample",percentagePreset:t,customPercentage:""}:{percentageMode:"sample",percentagePreset:"custom",customPercentage:String(e)}}function Dh(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 Ih(e){const t=ph(),n=dh(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=uh(l=e.rule.percentageAtMost)?{percentageMode:"all",percentagePreset:"0",customPercentage:""}:Th(l);break;case"highlyRelevant":o=Dh(e.rule.operation),i=Th(e.rule.percentageAtLeast),a=function(e){if(null==e)return{durationPreset:"500",customDurationMs:""};const t=kh.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=Dh(e.rule.operation),i=Th(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 Nh;!function(e){e.Default="default",e.Action="action",e.Endpoint="endpoint",e.Scope="scope",e.Duration="duration"}(Nh||(Nh={}));const Rh=[Nh.Action,Nh.Endpoint,Nh.Scope,Nh.Duration],Oh=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
|
-
`,_h=r.span`
|
|
876
|
-
display: inline;
|
|
877
|
-
cursor: help;
|
|
878
|
-
text-decoration: underline dotted;
|
|
879
|
-
text-underline-offset: 3px;
|
|
880
|
-
`,Ph=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
|
-
`,Lh=({items:n,children:r})=>{const{popupRef:o,popupOpen:i,setPopupOpen:a,popupPosition:s,handlePosition:l}=ud({positionMode:"viewport",defaultClientHeight:48,defaultClientwidth:240}),c=e=>{l(e.clientX,e.clientY),a("mouseleave"!==e.type)};return t(_h,{onMouseEnter:c,onMouseMove:c,onMouseLeave:c,children:[r,e(Hd,{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(Ph,{children:n.map((t,n)=>e(yo,{size:po.XXXS,children:t},n))})})]})},Fh=({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(Oh,{$variant:r.variant,$isMono:Rh.includes(r.variant),children:r.text});return t(Bt,{children:[0!==o&&e(n,{children:" "}),r.tooltipItems?.length?e(Lh,{items:r.tooltipItems,children:i}):i]},`${r.variant}-${o}`)})})};var Mh;!function(e){e.Noisy="noisy",e.HighlyRelevant="highly-relevant",e.CostReduction="cost-reduction"}(Mh||(Mh={}));const zh=[{value:Mh.Noisy,label:"1. Noisy Operations",tooltip:"Rules that reduce noise from high-volume, low-value operations"},{value:Mh.HighlyRelevant,label:"2. Highly Relevant Operations",tooltip:"Rules that prioritize important traces for retention"},{value:Mh.CostReduction,label:"3. Cost Reduction",tooltip:"Rules that optimize costs by sampling less critical data"}],Uh={[Mh.Noisy]:"This is the most efficient way to sample (with Head Sampling). Prefer to use it where possible.",[Mh.HighlyRelevant]:'Any trace from the "Noisy Operations" category is sampled prior to checking highly relevance.',[Mh.CostReduction]:"Cost reduction rules use Tail Sampling to drop traces that are unlikely to be useful for debugging or monitoring."},Bh={[Mh.Noisy]:"Noisy Operations rules list",[Mh.HighlyRelevant]:"Highly Relevant Operations rules list",[Mh.CostReduction]:"Cost Reduction rules list"},jh={[Mh.Noisy]:"noisy",[Mh.HighlyRelevant]:"highlyRelevant",[Mh.CostReduction]:"costReduction"};function Hh(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 Wh(e){return`any service in namespace '${e}'`}function Gh(e){return`${e} services`}function Xh(e){const t=function(e){if(!e)return[];const t=[];for(const n of e.sources??[]){const e=Hh(n);e&&t.push(e)}for(const n of e.namespaces??[])n&&t.push(Wh(n));for(const n of e.languages??[])n&&t.push(Gh(n));return t}(e);if(!t.length)return[{text:" in ",variant:Nh.Default},{text:"any service in the cluster",variant:Nh.Scope}];const n=[{text:" in ",variant:Nh.Default}],r=t.slice(0,2),o=t.slice(2);return r.forEach((e,t)=>{t>0&&n.push({text:", ",variant:Nh.Default}),n.push({text:e,variant:Nh.Scope})}),o.length>0&&n.push({text:` + ${o.length} more`,variant:Nh.Default,tooltipItems:o}),n}function Vh(e,t){const n=(r=e).startsWith("/")?r.slice(1):r;var r;return t?`${t} /${n}`:`/${n}`}function Kh(e){const t=e.method;return e.route?[{text:" for server endpoint ",variant:Nh.Default},{text:Vh(e.route,t),variant:Nh.Endpoint}]:e.routePrefix?[{text:" for endpoints under ",variant:Nh.Default},{text:Vh(e.routePrefix,t),variant:Nh.Endpoint}]:[]}function qh(e){const t=[];if(uh(e.percentageAtMost)?t.push({text:"Drop all traces",variant:Nh.Action}):(t.push({text:`Keep at most ${e.percentageAtMost}%`,variant:Nh.Action}),t.push({text:" of traces",variant:Nh.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:Nh.Default},{text:Vh(e.route,t),variant:Nh.Endpoint}]:e.routePrefix?[{text:" where the root span is under ",variant:Nh.Default},{text:Vh(e.routePrefix,t),variant:Nh.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:Nh.Default}),e?t.push({text:`${e} /${n}`,variant:Nh.Endpoint}):t.push({text:`/${n}`,variant:Nh.Endpoint})}}else t.push({text:" on ",variant:Nh.Default}),t.push({text:"any operation",variant:Nh.Endpoint});return t.push(...Xh(e.sourceScopes)),t}function Jh(e){const t=[];if(null!=e.percentageAtLeast?(t.push({text:`Keep ${e.percentageAtLeast}%`,variant:Nh.Action}),t.push({text:" of traces",variant:Nh.Default})):t.push({text:"Keep all traces",variant:Nh.Action}),e.operation){const n=e.operation.httpServer;n&&t.push(...Kh(n))}else t.push({text:" on ",variant:Nh.Default}),t.push({text:"any operation",variant:Nh.Endpoint});return t.push(...Xh(e.sourceScopes)),!e.error&&null!=e.durationAtLeastMs&&e.durationAtLeastMs>0&&(t.push({text:" with duration > ",variant:Nh.Default}),t.push({text:`${e.durationAtLeastMs}ms`,variant:Nh.Duration})),t}function Yh(e){const t=[];if(t.push({text:`Keep at most ${e.percentageAtMost}%`,variant:Nh.Action}),t.push({text:" of traces",variant:Nh.Default}),e.operation){const n=e.operation.httpServer,r=n?Kh(n):[];r.length>0&&t.push(...r);const o=e.operation.kafkaConsumer?.kafkaTopic;o&&0===r.length&&(t.push({text:" from ",variant:Nh.Default}),t.push({text:`topic '${o}'`,variant:Nh.Endpoint}))}else t.push({text:" on ",variant:Nh.Default}),t.push({text:"any operation",variant:Nh.Endpoint});return t.push(...Xh(e.sourceScopes)),t}function Qh(e){return e.error?"Error":null!=e.durationAtLeastMs?"Duration":"Relevance"}function Zh(e,t,n){const r=jh[t],o=[];for(const i of e)switch(t){case Mh.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:qh(e),category:r});break;case Mh.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:Jh(e),category:r,typeBadge:Qh(e)});break;case Mh.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:Yh(e),category:r})}return o}function em(e,t){switch(e){case"noisy":return qh(t);case"highlyRelevant":return Jh(t);case"costReduction":return Yh(t)}}function tm(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 nm(e,t){const n=tm(e,t.samplingId,t.rule.ruleId,t.category);return n?{...n,summary:em(n.category,n.rule)}:null}function rm(e,t){const n=tm(e,t.samplingId,t.ruleId,t.category);return n?{...n,summary:em(n.category,n.rule)}:null}function om(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 im(e){return null==e?null:e}function am(e,t){return JSON.stringify({sourceScopes:om(e),operation:im(t)})}function sm(e,t,n,r){return JSON.stringify({sourceScopes:om(e),error:t??!1,durationAtLeastMs:(o=n,null==o?null:o),operation:im(r)});var o}function lm(e,t){return JSON.stringify({sourceScopes:om(e),operation:im(t)})}function cm(e,t,n,r){switch(t){case"noisy":{const t=am(n.sourceScopes,n.operation);for(const n of e)for(const e of n.noisyOperations)if((!r||e.ruleId!==r)&&am(e.sourceScopes,e.operation)===t)return e.ruleId;return null}case"highlyRelevant":{const t=sm(n.sourceScopes,n.error,n.durationAtLeastMs,n.operation);for(const n of e)for(const e of n.highlyRelevantOperations)if((!r||e.ruleId!==r)&&sm(e.sourceScopes,e.error,e.durationAtLeastMs,e.operation)===t)return e.ruleId;return null}case"costReduction":{const t=lm(n.sourceScopes,n.operation);for(const n of e)for(const e of n.costReductionRules)if((!r||e.ruleId!==r)&&lm(e.sourceScopes,e.operation)===t)return e.ruleId;return null}}}function dm(e){if(!e||!e.enabled)return[{text:"Auto rule is ",variant:Nh.Default},{text:"disabled",variant:Nh.Action}];return[{text:`Keep ${e.keepPercentage??0}%`,variant:Nh.Action},{text:" of ",variant:Nh.Default},{text:"traces for kubelet health probes in the entire cluster",variant:Nh.Scope}]}function um(e){return!0===e.error&&ch(e.sourceScopes)&&!e.operation&&(null==e.percentageAtLeast||100===e.percentageAtLeast)}function pm(e){for(const t of e){const e=t.highlyRelevantOperations.find(um);if(e)return{rule:e,samplingId:t.id}}return null}function hm(e){return!e||e.disabled?[{text:"Auto rule is ",variant:Nh.Default},{text:"disabled",variant:Nh.Action}]:[{text:"Keep all traces",variant:Nh.Action},{text:" of ",variant:Nh.Default},{text:"error traces across the entire cluster",variant:Nh.Scope}]}function mm(e){return ch(e.sourceScopes)&&!e.operation}function gm(e){for(const t of e){const e=t.costReductionRules.find(mm);if(e)return{rule:e,samplingId:t.id}}return null}function fm(e){return!e||e.disabled?[{text:" is ",variant:Nh.Default},{text:"disabled",variant:Nh.Action}]:[{text:`Keep at most ${e.percentageAtMost}%`,variant:Nh.Action},{text:" of ",variant:Nh.Default},{text:"traces across the entire cluster",variant:Nh.Scope}]}var ym;!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"}(ym||(ym={}));const bm=Kt(null),vm=["50","25","10","1"];function xm(e){const t=String(e);return vm.includes(t)?t:"custom"}const $m=({category:t,sourceOptions:n=[],namespaceOptions:r=[],children:o})=>{const{formData:i,handleFormChange:a,resetFormData:s}=Gc(ph(t)),[l,c]=jt(null);Ht(()=>{s(ph(t)),c(null)},[t]);const d=Xt(e=>{c(null),a(void 0,void 0,{...i,...e})},[i,a]),u=Xt(()=>{s(ph(t)),c(null)},[t,s]),p=Gt(()=>({formType:ym.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(bm.Provider,{value:p,children:o})},Sm=({data:t,defaultEditMode:n,sourceOptions:r=[],namespaceOptions:o=[],children:i})=>{const[a,s]=jt(!1),{formData:l,handleFormChange:c,resetFormData:d}=Gc(void 0),u=Wt(null),[p,h]=jt(null);Ht(()=>{t!==u.current&&(u.current=t,t&&n?(d(Ih(t)),h(null),s(!0)):(s(!1),h(null)))},[t,n]);const m=Xt(e=>{h(null),c(void 0,void 0,{...l,...e})},[l,c]),g=Xt(()=>{t&&(d(Ih(t)),h(null),s(!0))},[t,d]),f=Xt(()=>{s(!1),h(null)},[]),y=Gt(()=>({formType:ym.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(bm.Provider,{value:y,children:i})};function wm(e){const[t,n]=jt(()=>0===e?"all":"sample"),[r,o]=jt(()=>xm(e)),[i,a]=jt(()=>"custom"===xm(e)?String(e):"");Ht(()=>{n(0===e?"all":"sample");const t=xm(e);o(t),a("custom"===t?String(e):"")},[e]);const s=Gt(()=>"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 Cm=({enabled:t,keepPercentage:n,children:r})=>{const[o,i]=jt(t),a=wm(n);Ht(()=>{i(t)},[t]);const s=Gt(()=>dm({enabled:o,keepPercentage:a.resolvedPercentage}),[o,a.resolvedPercentage]),l=Gt(()=>({formType:ym.EditAutoNoisy,localEnabled:o,setLocalEnabled:i,...a,summary:s}),[o,a,s]);return e(bm.Provider,{value:l,children:r})},Em=({enabled:t,dropPercentage:n,children:r})=>{const[o,i]=jt(t),a=wm(n);Ht(()=>{i(t)},[t]);const s=Gt(()=>fm(o?{disabled:!1,percentageAtMost:a.resolvedPercentage}:null),[o,a.resolvedPercentage]),l=Gt(()=>({formType:ym.EditAutoCostReduction,localEnabled:o,setLocalEnabled:i,...a,summary:s}),[o,a,s]);return e(bm.Provider,{value:l,children:r})},km=({enabled:t,children:n})=>{const[r,o]=jt(t);Ht(()=>{o(t)},[t]);const i=Gt(()=>hm(r?{disabled:!1}:null),[r]),a=Gt(()=>({formType:ym.EditAutoHighlyRelevant,localEnabled:r,setLocalEnabled:o,summary:i}),[r,i]);return e(bm.Provider,{value:a,children:n})},Am=t=>{switch(t.formType){case ym.Create:return e($m,{...t});case ym.View:return e(Sm,{...t});case ym.EditAutoNoisy:return e(Cm,{...t});case ym.EditAutoCostReduction:return e(Em,{...t});case ym.EditAutoHighlyRelevant:return e(km,{...t})}};function Tm(e){const t=Vt(bm);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 Dm={otelServiceName:"",currentStreamName:""},Im=Kt(null),Nm=({children:t})=>{const[n,r]=jt(void 0),o=Gc(Dm),i=Xt(e=>{o.resetFormData((({otelServiceName:e,name:t})=>({otelServiceName:e||t||"",currentStreamName:""}))(e)),o.handleErrorChange(void 0,void 0,{}),r(void 0)},[]),a=Xt(()=>{const e=$n(o.formData);return o.handleErrorChange(void 0,void 0,{}),r(void 0),{errorMessage:void 0,preparedFormData:e}},[o]),s=Gt(()=>({loadSource:i,genericForm:o,validateFormData:a,errorMessage:n}),[i,o,a,n]);return e(Im.Provider,{value:s,children:t})},Rm=()=>{const e=Vt(Im);if(!e)throw new Error("useSourceEditFormContext must be used within a SourceEditFormContextProvider");return e},Om=Kt({snapshots:null,setSnapshots:()=>{},isFetching:!1,setIsFetching:()=>{},formData:[],handleSourceChange:()=>{},handleSelectAll:()=>{},formDiff:{},isFormDirty:!1}),_m=({children:t,selectedConnectionIds:n,initialInputs:r})=>{const{tier:o}=bd(),i=o===Fn.Onprem,{selectedStreamName:a}=ic(),[s,l]=jt(!1),[c,d]=jt(null),[u,p]=jt([]);Ht(()=>{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=>{vd.has(e.kind)&&!i||(e.selected=!0)})}),n}return o})})},[c,n,r]);const{formDiff:h,isFormDirty:m}=Gt(()=>{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=Xt(e=>!i&&vd.has(e),[i]),f=Xt(({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=Xt(({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)||Sd(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(!$d(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(Om.Provider,{value:{snapshots:c,setSnapshots:d,isFetching:s,setIsFetching:l,formData:u,handleSourceChange:f,handleSelectAll:y,formDiff:h,isFormDirty:m},children:t})},Pm=()=>Vt(Om),Lm=Kt({formType:void 0}),Fm=({children:t,formType:n})=>{const r=Gt(()=>({formType:n}),[n]);return e(Lm.Provider,{value:r,children:t})},Mm=()=>Vt(Lm),zm=r.div`
|
|
889
|
-
display: flex;
|
|
890
|
-
|
|
891
|
-
align-items: center;
|
|
892
|
-
gap: 6px;
|
|
893
|
-
margin-bottom: 4px;
|
|
894
|
-
`,Um=r(Wc)`
|
|
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
|
-
`,Bm=r(Wc)`
|
|
903
|
-
font-size: 12px;
|
|
904
|
-
color: ${({theme:e})=>e.text.darker_grey};
|
|
905
|
-
opacity: 0.8;
|
|
906
|
-
`,jm=({title:n,required:r,tooltip:o,style:i,status:a})=>n?e(zm,{style:i,children:t(Jd,{text:o,withIcon:!0,children:[e(Um,{$status:a,children:n}),!r&&e(Bm,{children:"(optional)"})]})}):null,Hm=r.div`
|
|
907
|
-
display: flex;
|
|
908
|
-
flex-direction: column;
|
|
909
|
-
position: relative;
|
|
910
|
-
width: 100%;
|
|
911
|
-
`,Wm=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
|
-
`,Gm=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
|
-
`,Xm=r.div`
|
|
967
|
-
display: flex;
|
|
968
|
-
align-items: center;
|
|
969
|
-
margin-left: 12px;
|
|
970
|
-
`,Vm=r(Xm)`
|
|
971
|
-
cursor: pointer;
|
|
972
|
-
`,Km=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
|
-
`,qm=({icon:n,buttonLabel:r,onButtonClick:o,hasError:a,errorMessage:s,title:l,tooltip:c,required:d,value:u,onChange:p,type:h=Gn.Text,name:m,status:g,...f})=>{const y=i(),b=h===Gn.Password,[v,x]=jt(!1);return t(Hm,{children:[e(jm,{title:l,required:d,tooltip:c,status:g}),t(Wm,{$disabled:f.disabled,$hasError:a||!!s,$isActive:!!f.autoFocus,$status:g,children:[b?e(Vm,{onClick:()=>x(e=>!e),children:e(v?At:Tt,{size:14,fill:y.text.grey})}):n?e(Xm,{children:e(n,{size:14,fill:y.text.grey})}):null,e(Gm,{"data-id":m,type:v||h===Gn.Number?Gn.Text:h,$hasIcon:!!n||b,name:m,value:u,onChange:e=>{e.stopPropagation(),h===Gn.Number&&(e.target.value=Ci(e.target.value)),p?.(e)},onKeyDown:e=>{["Enter"].includes(e.key)||e.stopPropagation()},...f}),r&&o&&e(Km,{onClick:o,disabled:f.disabled,children:r})]}),!!s&&e(xu,{children:s})]})},Jm=r.div`
|
|
988
|
-
display: flex;
|
|
989
|
-
flex-direction: column;
|
|
990
|
-
min-width: 120px;
|
|
991
|
-
width: 100%;
|
|
992
|
-
opacity: ${({$disabled:e})=>e?.5:1};
|
|
993
|
-
`,Ym=r.div`
|
|
994
|
-
position: relative;
|
|
995
|
-
`,Qm=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
|
-
`,eg=({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=Wt(null);cd(x,()=>y(!1));const $=()=>{(()=>{if(x.current){const e=x.current.getBoundingClientRect().bottom+300>window.innerHeight;v(e)}})(),y(e=>!e)},S=Array.isArray(r)?r.length:0;return t(Jm,{$disabled:c,children:[e(jm,{title:a,required:p,tooltip:s,status:g}),t(Ym,{ref:x,children:[t(Qm,{$isOpen:f,$isMulti:d,$hasSelections:!!Array.isArray(r)&&!!r.length,$hasError:!!h||m,$status:g,$disabled:c,onClick:()=>!c&&$(),children:[e(og,{value:r,placeholder:l,onDeselect:i}),t(Zm,{children:[d&&e(Pc,{label:S,filled:!!S}),e(Bu,{extend:f})]})]}),f&&e(sg,{openUpwards:b,options:n,value:r,onSelect:e=>{o?.(e),d||$()},onDeselect:e=>{i?.(e),d||$()},isMulti:d,showSearch:u})]}),!!h&&e(xu,{children:h})]})},tg=r(Zm)`
|
|
1026
|
-
max-width: calc(100% - 50px);
|
|
1027
|
-
overflow-x: auto;
|
|
1028
|
-
`,ng=r(Wc)`
|
|
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
|
-
`,rg=r(Wc)``,og=({value:n,placeholder:r,onDeselect:o})=>{const a=i();return Array.isArray(n)?n.length?e(tg,{children:n.map(n=>t(ng,{size:14,children:[n.value,e(Md,{orientation:"vertical",length:"10px",margin:"0 4px"}),e(vt,{size:12,onClick:e=>{e.stopPropagation(),o?.(n)}})]},`multi-label-${n.id}`))}):e(rg,{size:14,color:a.text.darker_grey,children:r}):e(rg,{size:14,color:n?.value?void 0:a.text.darker_grey,children:n?.value||r})},ig=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
|
-
`,ag=r.div`
|
|
1059
|
-
display: flex;
|
|
1060
|
-
flex-direction: column;
|
|
1061
|
-
align-items: center;
|
|
1062
|
-
`,sg=({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(ig,{$openUpwards:n,children:[l&&t(ag,{children:[e(qm,{placeholder:"Search...",icon:Dt,value:c,onChange:e=>d(e.target.value)}),e(Md,{thickness:1,margin:"8px 0 0 0"})]}),0===u.length?e(kp,{subTitle:l&&c?void 0:" "}):u.map((t,n)=>e(cg,{option:t,value:o,isMulti:s,onSelect:i,onDeselect:a},`dropdown-option-${t.id||n}`))]})},lg=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+kc["024"]};
|
|
1072
|
-
}
|
|
1073
|
-
`,cg=({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(lg,{className:c?"selected":"",onClick:()=>d(!c),children:e(wu,{title:n.value||"",titleColor:l.text.secondary,value:c,onChange:d,style:{width:"100%"}})}):t(lg,{className:c?"selected":"",onClick:()=>c?s?.(n):a?.(n),children:[t(zo,{$gap:8,children:[n.icon&&e(n.icon,{}),e(Wc,{size:14,children:n.value})]}),c&&e(yt,{})]})},dg=r(Uo)`
|
|
1074
|
-
gap: 12px;
|
|
1075
|
-
`,ug=r(zo)`
|
|
1076
|
-
width: 100%;
|
|
1077
|
-
gap: 12px;
|
|
1078
|
-
align-items: flex-end;
|
|
1079
|
-
`,pg=({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}=ud({onClickOutside:l});return sd({key:"Enter",active:s},c),Ht(()=>v(n,o),[n,o]),0===b.top&&0!==o||0===b.left&&0!==n?null:e(Hd,{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(dg,{children:[e(Jd,{text:h,withIcon:!0,children:e(Wc,{size:14,children:p})}),t(ug,{children:[g,t(zo,{$gap:6,children:[e(Zd,{withBorder:!0,onClick:l,tooltip:"Cancel",children:e(vt,{})}),e(Zd,{withBorder:!0,backgroundColor:f.colors.secondary,onClick:c,tooltip:"Save",children:e(yt,{fill:f.text.primary})}),d&&e(Zd,{onClick:u,tooltip:"Undo",children:e(It,{})})]})]}),m&&e(lu,{type:Xn.Warning,message:m})]})})},hg=r.div`
|
|
1080
|
-
position: relative;
|
|
1081
|
-
`,mg=({defaultLanguage:n=Un.Unknown,defaultVersion:r="",defaultOtelDistroName:o=null,handleSave:i})=>{const{tier:a}=bd(),{addNotification:s}=uc(),{formData:l,handleFormChange:c,resetFormData:d}=Gc({language:n,version:r,otelDistroName:o}),[u,p]=jt(!1),h=()=>{p(!1),d()},m=Gt(()=>{if(!l.language)return[];const e=tc[l.language].community,t=a===Fn.Onprem?tc[l.language].enterprise:[];return e.concat(t)},[l.language,a]);return t(hg,{children:[e(Zd,{tooltip:Ir.OVERRIDE_RUNTIME_DETAILS,size:32,onClick:()=>{p(!0)},children:e(Nt,{})}),e(pg,{flipX:!0,clientX:36,isOpen:u,onClose:h,onSave:async()=>{!l.version||fi(l.version)?(await i({...l}),h()):s({type:Xn.Warning,message:Dr.INVALID_VERSION,hideFromHistory:!0})},withDelete:!0,onDelete:async()=>{await i({language:null,version:"",otelDistroName:null}),h()},title:Ir.OVERRIDE_RUNTIME_DETAILS,warning:Ir.OVERRIDE_RUNTIME_WARNING,children:t(Uo,{$gap:12,children:[t(zo,{$gap:12,children:[e(eg,{title:Ir.LANGUAGE,options:Zl,value:Zl.find(e=>e.id===l.language),onSelect:e=>{c("language",e.id),c("version",""),c("otelDistroName",null)},required:!0}),e(qm,{title:Ir.RUNTIME_VERSION,placeholder:Ir.VERSION_PLACEHOLDER,value:l.version,onChange:e=>c("version",e.target.value),required:!1})]}),l.language&&e(eg,{title:"Otel Distro Name",options:m,value:m.find(e=>e.id===l.otelDistroName),onSelect:e=>c("otelDistroName",e.id),required:!1})]})})]})},gg=r(zo)`
|
|
1082
|
-
width: 100%;
|
|
1083
|
-
justify-content: center;
|
|
1084
|
-
`,fg=({containerName:r,runtimeInfo:o,agentEnabled:a,overrides:s,callbackRuntimeOverride:l})=>{const c=i(),d=s?.runtimeInfo??o,u=d?.language??Un.Unknown,p=d?.runtimeVersion??"",h=null!=s?.runtimeInfo,m=a?.agentEnabled??!1,g=a?.agentEnabledStatus?.message??"",f=a?.otelDistroName??null,y=m?Xn.Success:g?Xn.Info:Xn.Warning,b=m?Vn.INSTRUMENTED:g?Vn.NOT_INSTRUMENTED:Vn.INSTRUMENTING;return e(yp,{title:r,subTitle:`${u?Ql[u]:"no runtime info"}`+(p?` • Runtime Version: ${p}`:""),iconProps:{icon:Ur(u)},extendableProps:{isExtended:!!g,renderExtended:()=>e(gg,{children:e(Wc,{size:12,family:"secondary",color:c.text.info,children:yi(g)})})},renderActions:()=>t(n,{children:[e(Qu,{status:y,title:b,subtitle:f||void 0,withIcon:!0,withBorder:!0}),h&&e(Qu,{status:Xn.Default,forceIcon:Rt,title:Ir.OVERIDDEN,withIcon:!0,withBorder:!0}),l&&e(mg,{defaultLanguage:u,defaultVersion:p??"",defaultOtelDistroName:f,handleSave:e=>l({...e,containerName:r})})]})})};var yg;!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"}(yg||(yg={}));const bg=r.div`
|
|
1085
|
-
display: flex;
|
|
1086
|
-
flex-wrap: wrap;
|
|
1087
|
-
gap: 16px 32px;
|
|
1088
|
-
width: 100%;
|
|
1089
|
-
`,vg=r.div`
|
|
1090
|
-
display: flex;
|
|
1091
|
-
flex-direction: column;
|
|
1092
|
-
gap: 2px;
|
|
1093
|
-
width: ${({$width:e})=>e};
|
|
1094
|
-
`,xg=r(Wc)`
|
|
1095
|
-
color: ${({theme:e})=>e.text.grey};
|
|
1096
|
-
font-size: 10px;
|
|
1097
|
-
line-height: 16px;
|
|
1098
|
-
`,$g=r(Wc)`
|
|
1099
|
-
font-size: 12px;
|
|
1100
|
-
white-space: pre-wrap;
|
|
1101
|
-
`,Sg=({data:n})=>e(bg,{children:n?.map(({type:n,title:r,titleIcon:o,tooltip:i,value:a},s)=>t(vg,{$width:n&&[yg.Code].includes(n)?"inherit":n&&[yg.Loader,yg.Divider,yg.CopyText].includes(n)?"100%":"unset",children:[e(Jd,{text:i,withIcon:!0,children:t(zo,{$alignItems:"center",$gap:4,children:[o&&e(o,{size:14}),!!r&&e(xg,{transform:"capitalize",children:r})]})}),e(wg,{type:n,value:a})]},`data-field-${r||(a?JSON.stringify(a):s)}`))}),wg=({type:t,value:n})=>{const r=i();switch(t){case yg.Divider:return e(Md,{length:"100%",margin:"0"});case yg.Loader:return e(Bo,{children:e(zu,{scale:1.2})});case yg.Monitors:return e(up,{monitors:n?.split(", ")||[],withLabels:!0,color:r.colors.secondary});case yg.Badge:{const{label:t,filled:r,...o}=ii(n,{label:"-",filled:!1});return e(Pc,{label:t,filled:r,...o})}case yg.Code:{const{language:t,code:r,...o}=ii(n,{language:"",code:""});return e(Ou,{language:t,code:r,...o})}case yg.ActiveStatus:return e(Qu,{status:"true"==n?Xn.Success:Xn.Error,title:"true"==n?Ir.ENABLED:Ir.DISABLED,size:10,withIcon:!0,withBorder:!0});case yg.CopyText:{const t="string"==typeof n?n:JSON.stringify(n);return e(tp,{value:t})}default:return e($g,{children:ki("string"==typeof n?n||"-":"")})}},Cg=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+kc["010"]:"transparent"};
|
|
1111
|
-
transition: background-color 0.3s;
|
|
1112
|
-
`,Eg=r.div`
|
|
1113
|
-
width: 100%;
|
|
1114
|
-
display: flex;
|
|
1115
|
-
flex-direction: column;
|
|
1116
|
-
gap: 4px;
|
|
1117
|
-
cursor: ${({$clickable:e})=>e?"pointer":"default"};
|
|
1118
|
-
`,kg=r(Wc)`
|
|
1119
|
-
width: 100%;
|
|
1120
|
-
display: flex;
|
|
1121
|
-
align-items: center;
|
|
1122
|
-
gap: 8px;
|
|
1123
|
-
font-size: 16px;
|
|
1124
|
-
`,Ag=r(Wc)`
|
|
1125
|
-
font-size: 12px;
|
|
1126
|
-
color: ${({theme:e})=>e.text.grey};
|
|
1127
|
-
`,Tg=r(zo)`
|
|
1128
|
-
margin-left: auto;
|
|
1129
|
-
gap: 8px;
|
|
1130
|
-
`,Dg=({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(Cg,{$hovered:h,children:[n||o||i||a?t(Eg,{$clickable:s||!1,onClick:()=>s&&p(e=>!e),onMouseEnter:()=>s&&m(!0),onMouseLeave:()=>s&&m(!1),children:[t(zo,{children:[t(zo,{$alignItems:"center",$gap:8,children:[o&&e(zo,{$alignItems:"center",children:e(o,{size:20})}),!!n&&e(kg,{transform:"capitalize",children:n}),r===Kn.Loading?e(zu,{}):void 0!==r&&e(Pc,{label:r})]}),(!!a||s)&&t(Tg,{children:["function"==typeof a?e(a,{hovered:h}):a,s&&e(Bu,{extend:u})]})]}),!!i&&e(Ag,{children:i})]}):null,(!s||s&&u)&&(d||e(Sg,{data:c}))]})},Ig=({isOpen:t,noOverlay:n,name:r,type:o,isLastItem:i,onApprove:a,onDeny:s})=>{const l=o===jn.Source?"uninstrument":"delete";return e(fu,{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:Xn.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}})},Ng=r(zo)`
|
|
1131
|
-
border-bottom: ${({$hideBorder:e,theme:t})=>e?"none":`1px solid ${t.colors.border}`};
|
|
1132
|
-
`,Rg=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
|
-
`,Og=r(Wc)`
|
|
1138
|
-
padding: 12px;
|
|
1139
|
-
font-size: 14px;
|
|
1140
|
-
color: ${({theme:e,$selected:t})=>t?e.text.secondary:e.text.grey};
|
|
1141
|
-
`,_g=({tabs:n,hideBorder:r=!1})=>n?.length?e(Ng,{$hideBorder:r,children:n.map(({label:n,icon:r,onClick:o,selected:i})=>t(Rg,{onClick:o,$selected:i,children:[e(Og,{$selected:i,children:n}),r&&e(r,{})]},`tab-${n}`))}):null,Pg=r.section`
|
|
1142
|
-
padding: 0px 32px;
|
|
1143
|
-
border-bottom: 1px solid ${({theme:e})=>e.colors.border};
|
|
1144
|
-
`,Lg=r.div`
|
|
1145
|
-
height: 76px;
|
|
1146
|
-
display: flex;
|
|
1147
|
-
justify-content: space-between;
|
|
1148
|
-
flex-shrink: 0;
|
|
1149
|
-
align-self: stretch;
|
|
1150
|
-
`,Fg=r.div`
|
|
1151
|
-
display: flex;
|
|
1152
|
-
align-items: center;
|
|
1153
|
-
gap: ${({$gap:e})=>e||16}px;
|
|
1154
|
-
`,Mg=r(Wc)`
|
|
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
|
-
`,zg=r(zc)`
|
|
1162
|
-
gap: 8px;
|
|
1163
|
-
`,Ug=r(zc)``,Bg=({onClose:n,width:r,icons:o,iconSrcs:i,title:a,titleTooltip:s,replaceTitleWith:l,actions:c,actionButtons:d=[],tabs:u})=>t(Pg,{children:[t(Lg,{children:[t(Fg,{children:[o?.length||i?.length?e(cp,{icons:o,iconSrcs:i,id:`drawer-header-${a}`}):null,("function"==typeof l?e(l,{}):l||null)||e(Jd,{text:s||a,withIcon:!!s,children:a&&e(Mg,{$maxWidth:`calc(${r} ${c||d.length?"/ 5":"- 192px"})`,children:a})})]}),t(Fg,{$gap:2,children:[c,d.map((t,n)=>e(zg,{...t},`header-action-button-${n}`)),e(Ug,{"data-id":"drawer-close",variant:"secondary",onClick:n,children:e(vt,{size:12})})]})]}),e(_g,{tabs:u,hideBorder:!0})]}),jg=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: ${Tc.in.bottom};
|
|
1172
|
-
`,Hg=r(zo)`
|
|
1173
|
-
margin-right: auto;
|
|
1174
|
-
`,Wg=r(zo)`
|
|
1175
|
-
margin: 0 auto;
|
|
1176
|
-
`,Gg=r(zo)`
|
|
1177
|
-
margin-left: auto;
|
|
1178
|
-
`,Xg=r(zc)`
|
|
1179
|
-
min-width: 140px;
|
|
1180
|
-
font-size: 14px;
|
|
1181
|
-
`,Vg=({isOpen:n,leftButtons:r=[],centerButtons:o=[],rightButtons:i=[]})=>n?t(jg,{children:[e(Hg,{children:r.map((t,n)=>e(Xg,{...t},`footer-left-button-${n}`))}),e(Wg,{children:o.map((t,n)=>e(Xg,{...t},`footer-center-button-${n}`))}),e(Gg,{children:i.map((t,n)=>e(Xg,{...t},`footer-right-button-${n}`))})]}):null,Kg=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+kc["010"]};
|
|
1190
|
-
overflow-y: auto;
|
|
1191
|
-
animation-name: ${({$position:e})=>Tc.in[e]};
|
|
1192
|
-
`,qg=r.div`
|
|
1193
|
-
display: flex;
|
|
1194
|
-
flex-direction: column;
|
|
1195
|
-
height: 100%;
|
|
1196
|
-
`,Jg=r.div`
|
|
1197
|
-
flex-grow: 1;
|
|
1198
|
-
padding: 24px 32px;
|
|
1199
|
-
overflow-y: auto;
|
|
1200
|
-
`,Yg=({isOpen:r,onClose:o,closeOnEscape:i=!0,position:a="right",width:s="300px",children:l,header:c,footer:d})=>(sd({key:"Escape",active:r&&i},()=>o()),Kc(r),r?un.createPortal(t(n,{children:[e(Ho,{hidden:!r,onClick:o}),e(Kg,{"data-id":"drawer",$position:a,$width:s,children:t(qg,{children:[e(Bg,{onClose:o,width:s,...c}),e(Jg,{children:l}),e(Vg,{...d})]})})]}),document.body):null),Qg=({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(zc,{variant:"secondary",onClick:()=>window.location.reload(),style:{fontSize:"1rem"},children:"Reload"})]})},Zg=({children:t})=>e(gn,{FallbackComponent:({error:t,...n})=>e(Ec,{children:e(Qg,{...n,error:t})}),children:t}),ef=a`
|
|
1201
|
-
0% {
|
|
1202
|
-
background-position: 0% 50%;
|
|
1203
|
-
}
|
|
1204
|
-
100% {
|
|
1205
|
-
background-position: 100% 50%;
|
|
1206
|
-
}
|
|
1207
|
-
`,tf=r(Wc)`
|
|
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: ${ef} 1s reverse linear infinite;
|
|
1213
|
-
`,nf=({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(tf,{$textColor:s,$stripColor:l,...o,children:t})},rf=r.div`
|
|
1214
|
-
width: 100%;
|
|
1215
|
-
height: 100%;
|
|
1216
|
-
|
|
1217
|
-
* {
|
|
1218
|
-
animation: none !important;
|
|
1219
|
-
transition: none !important;
|
|
1220
|
-
}
|
|
1221
|
-
`,of=({width:t="100%",height:n="100%",gap:r=0,elements:o,noAnimation:i=!1,onTopIndexChange:a})=>{const s=Wt(null),l=Gt(()=>r?o.map((t,n)=>e("div",{style:{paddingBottom:r},children:t},`scroll-y-item-${n}`)):o,[o,r]),c=Xt(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(rf,{children:d}):d},af=r.div`
|
|
1222
|
-
display: flex;
|
|
1223
|
-
flex-direction: column;
|
|
1224
|
-
gap: 16px;
|
|
1225
|
-
${({$maxWidth:e})=>e&&`max-width: ${e};`}
|
|
1226
|
-
`,sf=r.div`
|
|
1227
|
-
display: flex;
|
|
1228
|
-
align-items: center;
|
|
1229
|
-
gap: 16px;
|
|
1230
|
-
`,lf=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: ${Nc} 10s infinite linear;
|
|
1237
|
-
`,cf=r(Uo)`
|
|
1238
|
-
flex: 1;
|
|
1239
|
-
gap: 12px;
|
|
1240
|
-
`,df=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: ${Nc} 1.5s infinite linear;
|
|
1246
|
-
border-radius: 4px;
|
|
1247
|
-
`,uf=({size:n=5,maxWidth:r})=>e(af,{$maxWidth:r,children:[...Array(n)].map((n,r)=>t(sf,{children:[e(lf,{}),t(cf,{children:[e(df,{$width:"80%"}),e(df,{$width:"100%"})]})]},r))}),pf=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
|
-
`,hf=({label:n,leftIcon:r,rightIcon:o,tooltip:a,status:s=qn.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=Kn.Loading===s,b=s?[qn.Disabled,Kn.Disabled,Kn.Loading].includes(s)?lo(g,s,c?"400":"700"):[qn.Unknown].includes(s)?lo(g,s,"600"):lo(g,s,c?l?"500":"300":l?"700":"500"):g.v2.colors.grey[200],v=u||(c&&![qn.Unknown].includes(s)?b:[qn.Disabled,Kn.Disabled,Kn.Loading].includes(s)?g.v2.colors.grey[400]:[Xn.Error,Xn.Warning,Xn.Success].includes(s)?g.v2.colors.black[500]:g.v2.colors.white[500]),x=p||(c&&![qn.Unknown].includes(s)?[qn.Disabled,Kn.Disabled,Kn.Loading].includes(s)?g.v2.colors.grey[700]:g.v2.colors.silver[700]:b);return e(Jd,{text:a,fullWidth:m,children:t(pf,{$backgroundColor:x,$minWidth:h,$fullWidth:m,$hasLabel:!!f,children:[y?e(Yo,{withSpinnerOld:!0}):r?e(r,{fill:v,size:d?g.v2.text.size[d]+2:14}):null,f?y?e(Yo,{withGradient:!0,title:f,titleSize:d||po.XXS}):e(yo,{color:v,size:d||po.XXS,nowrap:!0,children:f}):null,o&&e(o,{fill:v,size:d?g.v2.text.size[d]+2:14})]})})},mf=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
|
-
`,gf=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
|
-
`,ff=({label:n,tooltip:r,required:o,badge:i,width:a,smallAndDark:s})=>n||r||o?t(zo,{$width:a,$justifyContent:"space-between",children:[n&&e(mf,{$smallAndDark:s,children:n}),t(zo,{$gap:4,children:[i&&e(hf,{...i,textSize:po.XXXS}),o&&e(gf,{children:"*"}),r&&e(Jd,{text:r,withIcon:!0})]})]}):null,yf=({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(zo,{$alignItems:"center",children:[l&&e(Uo,{children:l}),e(yo,{size:po.XXS,weight:400,color:s,children:n||r||o})]}):null},bf=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
|
-
`,vf=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
|
-
`,xf=r.div`
|
|
1312
|
-
display: flex;
|
|
1313
|
-
align-items: center;
|
|
1314
|
-
justify-content: center;
|
|
1315
|
-
cursor: pointer;
|
|
1316
|
-
`,$f=({label:n,required:r,tooltip:o,badge:a,leftIcon:s,rightIcon:l,hasError:c,errorMessage:d,warnMessage:u,helpMessage:p,type:h=Gn.Text,name:m,value:g,onChange:f,disabled:y,maxWidth:b,width:v,small:x=!1,onClick:$,...S})=>{const w=i(),C=h===Gn.Password,[E,k]=jt(!1),[A,T]=jt(null),D=c||!!d||!!A,I=g?w.v2.colors.white[500]:y?w.v2.colors.grey[400]:w.v2.colors.silver[200],N=x?14:18;return t(Uo,{$width:v,$gap:6,children:[e(ff,{label:n,tooltip:o,required:r,badge:a}),t(bf,{$small:x,$disabled:y,$error:D,onClick:y?void 0:$,children:[s?e(s,{size:N,fill:I}):null,e(vf,{"data-id":m,type:E||h===Gn.Number||h===Gn.Decimal?Gn.Text:h,name:m,value:g,onChange:e=>{e.stopPropagation();const t=e.target.value;if(h===Gn.Number)e.target.value=Ci(t),t&&t!==e.target.value?T("Please enter a valid number"):T(null);else if(h===Gn.Decimal){const n=wi(t);let r=n,o=!1;if(n&&!n.endsWith(".")){const e=parseFloat(n);if(!isNaN(e)){const t=null!=S.min?Number(S.min):void 0,n=null!=S.max?Number(S.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)T("Please enter a valid number");else if(o){const e=null!=S.min?Number(S.min):void 0,t=null!=S.max?Number(S.max):void 0;T(`Value must be ${null!=e&&null!=t?`between ${e} and ${t}`:null!=t?`at most ${t}`:`at least ${e}`}`)}else T(null)}f?.(e)},onKeyDown:e=>{["Enter"].includes(e.key)||e.stopPropagation()},disabled:y,$maxWidth:b,$width:v,$small:x,...S}),C?e(xf,{onClick:()=>k(e=>!e),children:e(E?At:Tt,{size:N,fill:I})}):l?e(l,{size:N,fill:I}):null]}),e(yf,{errorMessage:A||d,warnMessage:u,helpMessage:p})]})};var Sf,wf;!function(e){e.S="s",e.L="l"}(Sf||(Sf={})),function(e){e.Filled="filled",e.Underline="underline"}(wf||(wf={}));const Cf=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
|
-
`,Ef=r.button`
|
|
1326
|
-
flex: 1;
|
|
1327
|
-
display: flex;
|
|
1328
|
-
align-items: center;
|
|
1329
|
-
justify-content: center;
|
|
1330
|
-
gap: 8px;
|
|
1331
|
-
padding: ${({$size:e})=>e===Sf.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])+kc["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
|
-
`,kf=r.div`
|
|
1347
|
-
display: flex;
|
|
1348
|
-
align-items: stretch;
|
|
1349
|
-
width: ${({$fullWidth:e})=>e?"100%":"fit-content"};
|
|
1350
|
-
`,Af=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
|
-
`,Tf=({"data-id":r,size:o=Sf.L,variant:a=wf.Filled,options:s=[],selected:l,setSelected:c,disabled:d,fullWidth:u})=>{const p=i(),h=a===wf.Underline,m=h?Af:Ef;return e(h?kf:Cf,{"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===Sf.S?po.XXS:po.XS,S=b?500:400,w=t(n,{children:[a&&e(a,{fill:x}),i&&e(yo,{size:$,weight:S,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(Jd,{text:s,withIcon:!0,children:w}):w},`segment-${i||y}-${r}`)})})},Df=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
|
-
`,If=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
|
-
`,Nf=({"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,S=Gt(()=>{if($)return d?.options.find(e=>e.value===d.selected)?.label},[$,d?.options,d?.selected]),w=Gt(()=>l||($&&S?`Search by ${S.toLowerCase()}`:"Search..."),[l,$,S]);return t(Df,{$width:c,$withSegment:$,onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),$isHovered:f&&!b,$isActive:m,$idleBackgroundColor:u,$emphasizeBackgroundColor:p,children:[e(Dt,{size:18,fill:x}),e(If,{"data-id":n??"search",name:"search",type:"text",placeholder:w,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(Tf,{"data-id":d["data-id"],options:d.options,selected:d.selected,setSelected:d.setSelected,size:Sf.S})})]})};var Rf,Of;!function(e){e.Primary="primary",e.Secondary="secondary",e.Text="text"}(Rf||(Rf={})),function(e){e.S="small",e.M="medium",e.L="large"}(Of||(Of={}));const _f=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===Of.S?o`
|
|
1411
|
-
height: 32px;
|
|
1412
|
-
${t?o`
|
|
1413
|
-
padding: 8px 16px;
|
|
1414
|
-
`:o`
|
|
1415
|
-
width: 32px;
|
|
1416
|
-
`}
|
|
1417
|
-
`:e===Of.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===Rf.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===Rf.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===Rf.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
|
-
`,Pf=Ut(({"data-id":r,label:o,tooltip:a,hideTooltipIcon:s,leftIcon:l,rightIcon:c,variant:d=Rf.Primary,size:u=Of.M,iconSize:p,loading:h,fullWidth:m,withShadow:g,textColor:f,disabled:y,onClick:b,...v},x)=>{const $=i(),S=p||(u===Of.L?18:16),w=u===Of.L?po.S:po.XS,C=f||(y?$.v2.colors.grey[400]:$.v2.colors.white[500]),[E,k]=jt(!1),A=Xt(async e=>{e.stopPropagation(),k(!0),await(b?.(e)),k(!1)},[b]);return e(_f,{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(Jd,{text:a,withIcon:!s,children:h||E?o?e(nf,{size:$.v2.text.size[w],textColor:C}):e(zu,{}):t(n,{children:[l&&e(l,{size:S,fill:C}),o?e(yo,{size:w,weight:500,color:C,nowrap:!0,children:o}):null,c&&e(c,{size:S,fill:C})]})})})});Pf.displayName=Pf.name;const Lf=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
|
-
`,Ff=({icon:n=vt,hideIcon:r=!1,title:o="No data",subTitle:a,button:s})=>{const l=i().v2.colors.silver[200];return t(Uo,{$gap:12,$alignItems:"center",children:[!r&&e(Lf,{children:e(n,{size:32,fill:l})}),t(Uo,{$gap:4,$alignItems:"center",children:[e(yo,{size:po.S,align:"center",children:o}),a&&e(yo,{size:po.XXS,align:"center",color:l,children:a})]}),s&&e(Pf,{variant:Rf.Secondary,...s})]})};var Mf;!function(e){e.S="small",e.L="large"}(Mf||(Mf={}));const zf=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
|
-
`,Uf=r.div`
|
|
1484
|
-
width: ${({$size:e})=>e===Mf.S?"16px":"20px"};
|
|
1485
|
-
height: ${({$size:e})=>e===Mf.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
|
-
`,Bf=({name:n,label:r,tooltip:o,badge:a,size:s=Mf.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===Mf.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],S=l?g.v2.colors.grey[600]:b?g.v2.colors.purple[500]:g.v2.colors.silver[900];return t(Uo,{$gap:4,children:[t(zo,{$justifyContent:"space-between",children:[t(zf,{"data-id":n||"checkbox"+(r?`-${r}`:""),onClick:e=>{e.stopPropagation(),l||u(!!c||!d)},$disabled:l,onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),children:[e(Uf,{$size:s,$borderColor:$,$backgroundColor:S,children:c?e(xt,{size:v,fill:x}):d?e(yt,{size:v,fill:x}):null}),r&&e(yo,{size:s===Mf.S?po.XXS:po.XS,nowrap:!0,children:r})]}),e(ff,{tooltip:o,badge:a})]}),e(yf,{errorMessage:p,warnMessage:h,helpMessage:m})]})},jf=r.div`
|
|
1493
|
-
display: flex;
|
|
1494
|
-
flex-direction: ${({$direction:e})=>e===Pn.Horizontal?"row":"column"};
|
|
1495
|
-
gap: ${({$direction:e})=>e===Pn.Horizontal?16:8}px;
|
|
1496
|
-
`,Hf=({direction:n=Pn.Vertical,title:r,size:o,disabled:i,withSelectAll:a,options:s,values:l,setValues:c})=>{const d=o===Mf.S?po.XXS:po.XS,u=Gt(()=>s.every(e=>l[e.id]),[s,l]),p=Gt(()=>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(jf,{$direction:n,children:[r&&a?e(Bf,{label:r,partiallyChecked:p,value:u,onChange:e=>h("",e),size:o}):r&&!a?e(yo,{size:d,children:r}):null,s.map(t=>e(Bf,{...t,value:l[t.id],onChange:e=>h(t.id,e),disabled:i,size:o},`${r}-checkbox-${t.id}`))]})};var Wf,Gf;!function(e){e.Left="left",e.Right="right"}(Wf||(Wf={})),function(e){e.Top="top",e.Bottom="bottom"}(Gf||(Gf={}));const Xf=r.div`
|
|
1497
|
-
position: relative;
|
|
1498
|
-
display: flex;
|
|
1499
|
-
flex-direction: column;
|
|
1500
|
-
gap: 4px;
|
|
1501
|
-
`,Vf=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
|
-
`,Kf=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
|
-
`,qf=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
|
-
`,Jf=({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(),S=void 0!==r,w=!!f||!!y||!!x,[C,E]=jt(n??!w),k=S?r:C,A=Xt(e=>{S||E(e),o?.(e)},[S,o]),[T,D]=jt({x:a||Wf.Left,y:s||Gf.Bottom}),I=Wt(null);cd(I,()=>A(!1));const[N,R]=jt({}),O=Xt((e,t)=>{const n=I.current?.getBoundingClientRect();if(!n)return;const r=w?8:0;R({top:t===Gf.Bottom?w?n.bottom+r:n.top:void 0,bottom:t===Gf.Top?w?window.innerHeight-n.top+r:window.innerHeight-n.bottom:void 0,left:e===Wf.Left?n.left:void 0,right:e===Wf.Right?window.innerWidth-n.right:void 0,width:m?n.width:void 0})},[w,m]),_=e=>{const t=!k;if(A(t),!t)return;const n={x:a||(e.clientX>window.innerWidth/2?Wf.Right:Wf.Left),y:s||(e.clientY>window.innerHeight/2?Gf.Top:Gf.Bottom)};D(n),O(n.x,n.y)};Jt(()=>{k&&O(T.x,T.y)},[k,T.x,T.y,O]);const P=e=>{d(p?c.includes(e)?c.filter(t=>t!==e):[...c,e]:[e]),w&&!p&&A(!1)},[L,F]=jt(""),M=Gt(()=>L?l.filter(e=>e?.label?.toLowerCase().includes(L.toLowerCase())):l,[l.length,L]);return t(Xf,{ref:I,children:[u&&e(ff,{label:u}),f&&e(Pf,{...f,fullWidth:m,rightIcon:k?Ot:_t,onClick:_}),y&&e(Pf,{variant:Rf.Text,size:Of.S,...y,onClick:_}),"function"==typeof x?x({ChevronIcon:k?Ot:_t,handleClick:_}):x,k&&pn(t(Vf,{$coords:N,"data-ignore-outside-click":"true",children:[h&&e(Nf,{value:L,onChange:F,width:"100%"}),b?e(Yo,{withSpinner:!0,title:"Loading...",titleSize:po.XS}):M.length?e(Kf,{$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(qf,{"data-id":`option-${r}`,$selected:s&&!a,onClick:()=>P(r),children:[a&&e(Bf,{value:s,onChange:()=>P(r)}),i&&e(i,{size:14,fill:n.color||$.v2.colors.white[500]}),e(yo,{size:po.XS,nowrap:!0,color:n.color||ho.Primary,children:o})]},r)})}):e(Mo,{$padding:"6px 0",children:e(Ff,{hideIcon:!0,title:"No results",subTitle:v})}),p&&!!M.length&&e(Pf,{label:"Done",onClick:()=>A(!1)})]}),document.body)]})},Yf=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=Gt(()=>a?t.value:t.value?[t.value]:[],[a,t.value]),p=Gt(()=>{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=Gt(()=>{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=Xt(()=>{l(""),d(!0)},[]),f=Xt(e=>{l(e.target.value),c||d(!0),a||e.target.value||!t.value||t.onSelect(null)},[c,a,t]),y=Xt(e=>{d(e),e||l("")},[]),b=Xt(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(Jf,{open:v,onOpenChange:y,items:m,selectedIds:u,setSelectedIds:b,withMultiSelect:a,isLoading:i,emptyMessage:`No results matched the filter '${s}'`,fullWidth:!0,alignY:Gf.Bottom,children:e($f,{name:n,leftIcon:Dt,placeholder:o,value:h,onChange:f,onFocus:g})})},Qf=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
|
-
`,ey=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
|
-
`,ty=({label:n,icon:r,loading:o,disabled:i,onClick:a})=>{const[s,l]=jt(!1);return t(Qf,{$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(ey,{$hasIcon:!!r,children:[o?e(nf,{size:16}):e(yo,{variant:uo.Span,align:"center",children:n}),e(Pt,{rotate:90,size:24})]})]})},ny=({buttons:t})=>e(Uo,{$gap:12,children:t.map(t=>e(ty,{...t},t.label))});var ry;!function(e){e.Button="button",e.ButtonDropData="button-drop-data"}(ry||(ry={}));const oy=({onAnyClick:t,actions:n})=>e(zo,{$gap:8,$alignItems:"center",children:n?.map(n=>{if(!n)return null;switch(n.type){case ry.Button:return e(Pf,{...n.buttonProps,onClick:e=>{n.buttonProps?.onClick?.(e),t?.()}},n.id);case ry.ButtonDropData:return e(Jf,{...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}})}),iy=({children:t,fullText:n,...r})=>{const o=Wt(null),[i,a]=jt(!1);Jt(()=>{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]),Ht(()=>{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(Jd,{text:s,fullWidth:!0,ellipsis:!0,keepAlive:!0,children:e(yo,{ref:o,...r,children:t})})},ay=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.white[500]+kc["004"]};
|
|
1588
|
-
`,sy=({icon:n,iconWithWrapper:r=!1,title:o,titleSize:i=po.S,subTitle:a,subTitleSize:s=po.XXS,tooltip:l,withCopy:c,badge:d,gap:u,children:p})=>{const{CopyButton:h}=td();return t(zo,{$gap:a?8:6,$alignItems:"center",children:[n&&(r||a?e(ay,{children:e(n,{size:24})}):e(n,{size:24})),o||d||a?t(Uo,{children:[o||d?t(zo,{$gap:6,$alignItems:"center",children:[o&&e(yo,{size:i,nowrap:!0,children:o}),c&&o&&e(h,{value:o,size:Qc.XS}),l&&e(Jd,{text:l,withIcon:!0}),d&&e(hf,{...d})]}):null,a&&e(yo,{size:s,color:ho.Secondary,nowrap:!0,children:a})]}):null,e(zo,{$gap:u,$margin:`0 0 0 ${u??0}px`,$alignItems:"center",children:p})]})},ly=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
|
-
`,cy=r.div`
|
|
1598
|
-
display: flex;
|
|
1599
|
-
align-items: flex-end;
|
|
1600
|
-
flex-wrap: wrap;
|
|
1601
|
-
width: 100%;
|
|
1602
|
-
`,dy=r.div`
|
|
1603
|
-
width: ${({$cellsPerRow:e})=>e?`calc(${100/e}% - 16px)`:"unset"};
|
|
1604
|
-
margin: 8px;
|
|
1605
|
-
display: flex;
|
|
1606
|
-
flex-direction: column;
|
|
1607
|
-
gap: 4px;
|
|
1608
|
-
min-width: 0;
|
|
1609
|
-
`,uy=({item:n,cellsPerRow:r})=>{const{CopyButton:o}=td(),{spacer:i,title:a,titleTooltip:s,label:l,labelTooltip:c,withCopy:d,badge:u}=n;return i?e("div",{style:{flex:1}}):t(dy,{$cellsPerRow:r,children:[!!a&&e(Jd,{text:s,children:e(iy,{size:po.XXXS,color:ho.Secondary,nowrap:!0,children:a})}),t(zo,{$gap:4,children:[u&&e(hf,{...u}),l&&e(Jd,{text:c,children:e(iy,{size:po.XS,nowrap:!0,children:l})}),d&&e(o,{value:l||u?.label?.toString()||"",size:Qc.XS})]})]})},py=({bgTint:n="900",width:r,fullHeight:o=!1,moreSpacing:i=!1,richTitle:a,withCollapse:s,collapseIsDefaultOpen:l,badges:c=[],actions:d=[],dropDataActions:u=[],cellsPerRow:p,items:h,children:m})=>{const[g,f]=jt(l||!1),y=!s||s&&g,b=!!d.length,v=!!u.length,x=!!c.length;return t(ly,{$width:r,$bgTint:n,$fullHeight:o,$moreSpacing:i,children:[(a||s)&&t(zo,{$gap:16,$justifyContent:"space-between",children:[a?e(sy,{...a}):e("div",{}),t(zo,{$gap:12,children:[b&&y&&e(oy,{actions:d}),x&&e(zo,{$gap:8,children:c.map(e=>Yt(hf,{...e,key:e.key||e.label}))}),(v||s)&&t(zo,{$gap:2,children:[v&&e(Jf,{iconButtonProps:{"data-id":"drawer-actions",leftIcon:Lt},items:u,selectedIds:[],setSelectedIds:e=>u?.find(t=>t?.id===e[0])?.onClick?.()}),s&&e(Pf,{variant:Rf.Text,size:Of.S,leftIcon:g?Ot:_t,onClick:()=>f(e=>!e)})]})]})]}),y&&h?e(cy,{children:h.map(t=>e(uy,{item:t,cellsPerRow:p&&p<=h.length?p:void 0},t.id))}):null,y&&m]})};var hy;!function(e){e.S="small",e.M="medium"}(hy||(hy={}));const my=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
|
-
`,gy=Ut(({id:n,size:r=hy.M,fullHeight:o=!1,richTitle:i,customTitle:a,search:s,customSearch:l,filters:c,actions:d,children:u},p)=>{const h=r===hy.S?4:16,m=r===hy.S?12:16,g=a??(i?e(sy,{...i}):null),f=l??(s?e(Nf,{...s}):null),y=!!g||!!f,b=!!d&&d.length>0;return t(my,{ref:p,id:n,"data-section-name":n,$padding:m,$gap:h,$fullHeight:o,children:[y||b?t(zo,{$gap:h,$justifyContent:"space-between",children:[y?t(zo,{$gap:h,$alignItems:"center",children:[g,f,c]}):null,b&&e(oy,{actions:d??[]})]}):null,u]})});gy.displayName="SectionCard";const fy=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})=>lo(e,t,t===qn.Unknown?"750":"500")};
|
|
1627
|
-
`,yy=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===qn.Unknown?lo(e,t,"800"):lo(e,t,"900")+kc["015"]};
|
|
1636
|
-
`,by=({status:n,icon:r,title:o,description:a})=>{const s=i(),l=r??Qo(n,s),c=[Xn.Default,Xn.Info,qn.Disabled,qn.Unknown].includes(n)?s.v2.colors.white[500]:s.v2.colors.black[500];return t(fy,{$status:n,children:[e(yy,{$status:n,children:e(l,{size:32,fill:c})}),t(Uo,{$gap:2,$justifyContent:"center",children:[e(yo,{size:po.M,weight:500,color:c,nowrap:!0,children:o}),e(yo,{size:po.XXS,weight:300,color:c,nowrap:!0,children:a})]})]})},vy=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
|
-
`,xy=["-","N/A","undefined","null","undefined/undefined","null/null"],$y=({title:n,cells:r})=>{const o=i();return t(vy,{children:[e(yo,{size:po.XXS,color:o.v2.colors.grey[150],children:n}),e(zo,{$gap:32,children:r.map(r=>t(Uo,{$gap:2,children:[!r.isLoading||r.value&&!xy.includes(r.value)?e(yo,{size:r.label?po.M:po.L,children:r.value}):e(zu,{scale:.9}),r.label&&e(yo,{size:po.XXS,children:r.label})]},`${n}-${r.label}-${r.value}`))})]})};var Sy;!function(e){e.CurrentOfMax="currentOfMax",e.GoodAgainstBad="goodAgainstBad"}(Sy||(Sy={}));const wy=r.div`
|
|
1645
|
-
display: flex;
|
|
1646
|
-
align-items: flex-end;
|
|
1647
|
-
justify-content: space-between;
|
|
1648
|
-
gap: 24px;
|
|
1649
|
-
width: fit-content;
|
|
1650
|
-
`,Cy=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
|
-
`,Ey=r.svg`
|
|
1658
|
-
display: block;
|
|
1659
|
-
width: 100%;
|
|
1660
|
-
height: auto;
|
|
1661
|
-
overflow: visible;
|
|
1662
|
-
`,ky=r(Uo)`
|
|
1663
|
-
position: absolute;
|
|
1664
|
-
left: 0;
|
|
1665
|
-
right: 0;
|
|
1666
|
-
bottom: 4px;
|
|
1667
|
-
align-items: center;
|
|
1668
|
-
gap: 2px;
|
|
1669
|
-
pointer-events: none;
|
|
1670
|
-
`,Ay=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
|
-
`,Ty=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:""}},Dy=10,Iy=(e,t,n,r)=>{const o=r*Math.PI/180;return{x:e+n*Math.cos(o),y:t-n*Math.sin(o)}},Ny=(e,t,n,r,o)=>{const i=Iy(e,t,n,r),a=Iy(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}`},Ry=({variant:n=Sy.CurrentOfMax,gaugeWidth:r,title:o,min:a=0,max:s,current:l,primaryLabel:c,primaryColor:d,secondaryLabel:u,secondaryColor:p})=>{const{number:h}=Ty(a),{number:m}=Ty(s),{number:g,prefix:f,suffix:y}=Ty(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?Ny(60,60,55,180,x):null,S=v<1?Ny(60,60,55,x,0):null,w=Iy(60,60,55,180),C=Iy(60,60,55,0),E=d??(n===Sy.GoodAgainstBad?b.v2.colors.green[500]:b.v2.colors.purple[400]),k=p??(n===Sy.GoodAgainstBad?b.v2.colors.red[500]:b.v2.colors.silver[500]),[A,T]=jt(null),D=e=>`${f}${e}${y}`,I=n===Sy.GoodAgainstBad?Math.max(m-g,0):m,N="primary"===A?c:"secondary"===A?u:"",R="primary"===A?D(g):"secondary"===A?D(I):"",O=()=>T("primary"),_=()=>T("secondary"),P=()=>T(null);return t(wy,{children:[t(Cy,{$width:r,children:[e(Jd,{keepAlive:!0,fullWidth:!0,title:N,text:R,children:t(Ey,{viewBox:"0 0 120 65",role:"img","aria-label":`${o}: ${g} of ${m}`,children:[$&&e("path",{d:$,fill:"none",stroke:E,strokeWidth:Dy,strokeLinecap:1===v?"round":"butt",onMouseEnter:O,onMouseLeave:P}),S&&e("path",{d:S,fill:"none",stroke:k,strokeWidth:Dy,strokeLinecap:0===v?"round":"butt",onMouseEnter:_,onMouseLeave:P}),v>0&&e("circle",{cx:w.x,cy:w.y,r:5,fill:E,onMouseEnter:O,onMouseLeave:P}),v<1&&e("circle",{cx:C.x,cy:C.y,r:5,fill:k,onMouseEnter:_,onMouseLeave:P})]})}),o&&t(ky,{children:[e(yo,{size:po.XXXS,color:b.v2.colors.grey[150],align:"center",children:o}),e(yo,{size:po.L,weight:500,align:"center",children:`${f}${g}${y}`})]})]}),t(Uo,{$gap:7,children:[t(zo,{$gap:8,$alignItems:"center",children:[e(Ay,{$color:E}),e(yo,{size:po.XXXS,color:b.v2.colors.grey[150],nowrap:!0,children:c})]}),t(zo,{$gap:8,$alignItems:"center",children:[e(Ay,{$color:k}),e(yo,{size:po.XXXS,color:b.v2.colors.grey[150],nowrap:!0,children:u})]})]})]})},Oy=r(zo)`
|
|
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
|
-
`,_y=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
|
-
`,Py=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
|
-
`,Ly=r.span`
|
|
1700
|
-
flex-shrink: 0;
|
|
1701
|
-
font-size: 14px;
|
|
1702
|
-
color: #5ffb98; // TODO: add to theme
|
|
1703
|
-
`,Fy=({bgTint:n,label:r,value:o,hideCopy:i=!1,onDone:a})=>{const{CopyButton:s}=td({onDone:a}),l=Wt(null),[c,d]=jt(!1);return Ht(()=>{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(Uo,{$gap:4,children:[r&&e(yo,{size:po.XXXS,color:ho.Secondary,children:r}),t(Oy,{$bgTint:n,children:[t(_y,{$hideCopy:i,children:[e(Py,{ref:l,children:o}),c&&e(Ly,{children:"..."})]}),!i&&e(s,{value:o,size:Qc.XS})]})]})},My=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
|
-
`,zy=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
|
-
`,Uy=r(Uo)`
|
|
1738
|
-
flex: 1;
|
|
1739
|
-
min-width: 0;
|
|
1740
|
-
`,By=r.div`
|
|
1741
|
-
display: flex;
|
|
1742
|
-
align-items: center;
|
|
1743
|
-
justify-content: center;
|
|
1744
|
-
flex-shrink: 0;
|
|
1745
|
-
width: 24px;
|
|
1746
|
-
height: 24px;
|
|
1747
|
-
`,jy=({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=Qo(n,g),y=d?c?Ot:_t:void 0,b=n===qn.Unknown,v=n===qn.Disabled,x=n===Kn.Loading||s,$=[Xn.Error,Xn.Warning,Xn.Success].includes(n),S=lo(g,n,v?u?"400":"700":b?"600":u?"300":"500"),w=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?S:w,E=!u||b||v?"rgba(0, 0, 0, 0.13)":lo(g,n,"800"),k=v?g.v2.colors.grey[900]:u||b?g.v2.colors.silver[800]:S,A=v?g.v2.colors.grey[800]:u||b?g.v2.colors.silver[700]:lo(g,n,"600");return t(My,{$width:m,$withHover:!!d,$isExtended:c,$hideBackground:h,$backgroundColor:k,$hoverBackgroundColor:A,onClick:d,children:[!p&&e(zy,{$backgroundColor:E,children:x?e(Yo,{withSpinnerOld:!0,scaleSpinnerOld:1.8}):e(f,{size:32,fill:C})}),t(Uy,{$gap:4,$justifyContent:"center",children:[t(zo,{$gap:10,$alignItems:"center",children:[e(yo,{size:po.S,weight:500,color:w,children:r}),a&&e(hf,{label:a,backgroundColor:g.v2.colors.silver[600],textColor:g.v2.colors.white[500],textSize:po.XXXS})]}),o&&e(yo,{size:po.XXXS,color:w,children:o})]}),l&&e(zy,{"data-id":l["data-id"],$backgroundColor:g.v2.colors.silver[750],$withClick:!!l.onClick,onClick:l.onClick,children:e(Jd,{text:l.tooltip,children:e(l.icon,{size:32,fill:w})})}),y&&e(By,{children:e(y,{size:24,fill:w})})]})},Hy=r.div`
|
|
1748
|
-
display: flex;
|
|
1749
|
-
flex-direction: column;
|
|
1750
|
-
width: 100%;
|
|
1751
|
-
border-radius: 12px;
|
|
1752
|
-
overflow: hidden;
|
|
1753
|
-
`,Wy=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
|
-
`,Gy=r.div`
|
|
1760
|
-
display: flex;
|
|
1761
|
-
align-items: center;
|
|
1762
|
-
gap: 8px;
|
|
1763
|
-
`,Xy=r.div`
|
|
1764
|
-
display: flex;
|
|
1765
|
-
align-items: center;
|
|
1766
|
-
justify-content: center;
|
|
1767
|
-
flex-shrink: 0;
|
|
1768
|
-
width: 18px;
|
|
1769
|
-
height: 18px;
|
|
1770
|
-
`,Vy=({conditions:n,title:r,subTitle:o})=>{const a=i(),[s,l]=jt(!1),c=Xt(()=>l(e=>!e),[]),d=Gt(()=>bi(n),[n]),{errors:u,hasErrors:p,warnings:h,hasWarnings:m,hasDisableds:g,hasLoadings:f}=Gt(()=>Mr(d),[d]);Ht(()=>{l(p||m||g)},[p,m,g]);const y=Gt(()=>(!d.length||f)&&!p&&!m&&!g,[d.length,f,p,m,g]),b=Gt(()=>p?Xn.Error:m?Xn.Warning:g?Xn.Info:Xn.Success,[p,m,g]),v=Gt(()=>r||(1===d.length?yi(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=Gt(()=>o||1===d.length&&d[0].message||void 0,[o,d]),$=Gt(()=>`${p?u.length:m?h.length:d.length}/${d.length}`,[p,u.length,m,h.length,d.length]);return t(Hy,{children:[e(jy,{status:b,invertColors:!0,title:v,subTitle:x,badgeLabel:$,loading:y,isExtended:s,toggleExtended:c}),s&&e(Wy,{children:d.map(({status:n,type:r,reason:o,message:i},s)=>{const l=n===Kn.Loading,c=n===Kn.Disabled?Xn.Info:n,d=l?null:Qo(c,a),u=n===Xn.Error?lo(a,Xn.Error,"500"):n===Xn.Warning?lo(a,Xn.Warning,"500"):a.v2.colors.white[500],p=[r,i||o].filter(Boolean).join(" - ");return t(Gy,{children:[e(Xy,{children:l||!d?e(Yo,{withSpinnerOld:!0}):e(d,{size:18})}),e(yo,{size:po.XXXS,color:u,lineHeight:"16px",children:p})]},`condition-${s}`)})})]})};var Ky,qy,Jy;!function(e){e.Default="default",e.SuccessError="successError"}(Ky||(Ky={})),function(e){e.S="small",e.L="large"}(qy||(qy={})),function(e){e.Left="left",e.Right="right"}(Jy||(Jy={}));const Yy=r.div`
|
|
1771
|
-
display: flex;
|
|
1772
|
-
align-items: center;
|
|
1773
|
-
gap: ${({$gap:e})=>e}px;
|
|
1774
|
-
`,Qy=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 Ky.SuccessError:return o?i.v2.colors.green[500]:i.v2.colors.red[500];case Ky.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
|
-
`,eb=({variant:r=Ky.Default,size:o=qy.L,name:a,label:s,labelAlign:l=Jy.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:S})=>{const w=i(),C=m?w.v2.colors.grey[400]:w.v2.colors.white[500],E=o===qy.S?10:16,k=c||w.v2.colors.silver[200],A=o===qy.S?po.XXXS:po.XS,T=o===qy.S?8:12;return t(Uo,{$gap:4,children:[t(zo,{$justifyContent:"space-between",children:[t(Yy,{"data-id":a||"toggle"+(s?`-${s}`:""),"data-toggle-value":p?"true":"false",$gap:T,children:[s&&l===Jy.Left&&e(yo,{color:k,size:A,nowrap:!0,children:s}),t(Qy,{$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===Jy.Right&&e(yo,{color:k,size:A,nowrap:!0,children:s})]}),e(ff,{tooltip:d,badge:u})]}),e(yf,{errorMessage:x,warnMessage:$,helpMessage:S})]})},tb=r.div`
|
|
1799
|
-
display: flex;
|
|
1800
|
-
flex-direction: ${({$direction:e})=>e===Pn.Horizontal?"row":"column"};
|
|
1801
|
-
gap: ${({$direction:e})=>e===Pn.Horizontal?16:8}px;
|
|
1802
|
-
`,nb=({direction:n=Pn.Vertical,title:r,size:o,disabled:i,options:a,values:s,setValues:l})=>{const c=o===qy.S?po.XS:po.S;return t(tb,{$direction:n,children:[r&&e(yo,{size:c,children:r}),a.map(t=>e(eb,{...t,labelAlign:Jy.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}`))]})},rb=r.div`
|
|
1803
|
-
display: flex;
|
|
1804
|
-
align-items: center;
|
|
1805
|
-
justify-content: space-between;
|
|
1806
|
-
width: 100%;
|
|
1807
|
-
overflow: hidden;
|
|
1808
|
-
`,ob=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
|
-
`,ib=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
|
-
`,ab=r.img`
|
|
1826
|
-
width: 24px;
|
|
1827
|
-
height: 24px;
|
|
1828
|
-
`,sb=r.div`
|
|
1829
|
-
display: flex;
|
|
1830
|
-
align-items: center;
|
|
1831
|
-
gap: 16px;
|
|
1832
|
-
flex-shrink: 0;
|
|
1833
|
-
`,lb=({icon:n,iconSrc:r,title:o,titleBadges:i,subTitle:a,toggleProps:s,actions:l,onClose:c,onCloseDisabled:d})=>t(rb,{children:[t(ob,{children:[n?e(ib,{children:e(n,{size:24})}):r?e(ib,{children:e(ab,{src:r,alt:o||"icon"})}):null,(o||i?.length||a)&&t(Uo,{$gap:6,children:[(o||i?.length)&&t(zo,{$gap:16,children:[o&&e(yo,{size:po.S,weight:500,children:o}),i?.length&&e(zo,{$gap:4,children:i?.map(t=>e(hf,{...t},t.label))})]}),a&&e(yo,{size:po.XXS,children:a})]})]}),t(sb,{children:[s&&e(eb,{...s}),l?.length?e(Jf,{iconButtonProps:{"data-id":"drawer-actions",leftIcon:Lt},items:l,selectedIds:l?.filter(e=>e?.active)?.map(e=>e?.id)??[],setSelectedIds:e=>l?.find(t=>t?.id===e[0])?.onClick?.()}):null,c&&e(ed,{"data-id":"drawer-close",icon:vt,size:Qc.M,onClick:c,disabled:d})]})]}),cb=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})=>lo(e,t,[Xn.Info,Xn.Warning].includes(t)?"1000":"900")};
|
|
1843
|
-
`,db=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})=>lo(e,t,[Xn.Info].includes(t)?"900":"800")};
|
|
1851
|
-
`,ub=r.div`
|
|
1852
|
-
margin-left: auto;
|
|
1853
|
-
margin-right: 8px;
|
|
1854
|
-
cursor: pointer;
|
|
1855
|
-
&:hover {
|
|
1856
|
-
transform: scale(1.2);
|
|
1857
|
-
}
|
|
1858
|
-
`,pb=({status:n,message:r,action:o,fullWidth:a,smallIcon:s})=>{const l=i(),c=Qo(n,l),d=lo(l,n,n===Xn.Default?"300":n===Xn.Info?"400":"500");return t(cb,{$status:n,$fullWidth:a,children:[e("div",{children:e(db,{$status:n,$smallIcon:s,children:e(c,{size:s?18:24})})}),e(yo,{color:d,size:po.XXXS,weight:400,children:r}),o&&e(ub,{"data-id":o["data-id"],onClick:o.onClick,children:e(yo,{color:d,size:po.XXS,weight:500,underline:!0,children:o.label})})]})},hb=r.div`
|
|
1859
|
-
display: flex;
|
|
1860
|
-
align-items: center;
|
|
1861
|
-
gap: 8px;
|
|
1862
|
-
padding: 4px 12px;
|
|
1863
|
-
`,mb=r.div`
|
|
1864
|
-
flex: 1;
|
|
1865
|
-
`,gb=r.div`
|
|
1866
|
-
width: 150px;
|
|
1867
|
-
`,fb=({note:n,actions:r,children:o})=>o?e(hb,{children:o}):t(hb,{children:[n&&e(pb,{...n}),e(mb,{}),r?.map((t,n)=>e(gb,{children:e(Pf,{fullWidth:!0,...t})},t["data-id"]||`drawer-footer-button-${n}`))]}),yb=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: ${Tc.in[t]};
|
|
1887
|
-
`}
|
|
1888
|
-
`,bb=r.div`
|
|
1889
|
-
display: flex;
|
|
1890
|
-
flex-direction: column;
|
|
1891
|
-
gap: 12px;
|
|
1892
|
-
|
|
1893
|
-
height: calc(100% - ${56}px);
|
|
1894
|
-
overflow-y: auto;
|
|
1895
|
-
`,vb=({isOpen:r,hideOverlay:o=!1,disableAnimation:i=!1,position:a="right",width:s="600px",header:l,footer:c,children:d})=>(Kc(r),r?pn(t(n,{children:[!o&&e(Ho,{onClick:l?.onCloseDisabled?void 0:l?.onClose}),t(yb,{"data-id":"drawer",$position:a,$width:s,$disableAnimation:i,children:[l&&e(lb,{...l}),e(bb,{children:d}),c&&e(fb,{...c})]})]}),document.body):null),xb=({options:t,values:n,setValues:r,withMultiSelect:o,withSearch:i,...a})=>{const s=Gt(()=>n?.length?`Selected: ${t.filter(e=>n.includes(e.id)).map(e=>e.label).join(", ")||"none"}`:"",[t,n]);return e(Jf,{withMultiSelect:o,withSearch:i,fullWidth:!0,alignX:Wf.Left,items:t,selectedIds:n,setSelectedIds:r,children:({ChevronIcon:t,handleClick:n})=>e($f,{placeholder:"Select options...",...a,rightIcon:t,value:s,onChange:()=>{},onClick:n})})},$b=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
|
-
`,Sb=r(zo)`
|
|
1904
|
-
position: absolute;
|
|
1905
|
-
left: 50%;
|
|
1906
|
-
transform: translateX(-50%);
|
|
1907
|
-
gap: 16px;
|
|
1908
|
-
`,wb=({left:n=[],center:r=[],right:o=[]})=>t($b,{children:[e(zo,{$gap:16,children:n}),e(Sb,{children:r}),e(zo,{$gap:16,children:o})]}),Cb=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
|
-
`,Eb=({isOpen:t,actions:n,positionRight:r,positionLeft:o})=>t?e(Cb,{$right:r,$left:o,children:n.map(t=>{if(!t)return null;const{tooltip:n,...r}=t;return e(Jd,{text:n||"",children:e(Pf,{...r,variant:Rf.Secondary,size:Of.S})},r.id)})}):null,kb=r.div`
|
|
1924
|
-
display: flex;
|
|
1925
|
-
align-items: center;
|
|
1926
|
-
justify-content: center;
|
|
1927
|
-
min-width: 32px;
|
|
1928
|
-
min-height: 32px;
|
|
1929
|
-
aspect-ratio: 1 / 1;
|
|
1930
|
-
padding: 2px;
|
|
1931
|
-
border-radius: 8px;
|
|
1932
|
-
background-color: ${({theme:e,$noBackground:t})=>t?"transparent":e.v2.colors.silver[750]+kc["050"]};
|
|
1933
|
-
`,Ab=r.div`
|
|
1934
|
-
display: flex;
|
|
1935
|
-
align-items: center;
|
|
1936
|
-
justify-content: center;
|
|
1937
|
-
padding: 2px;
|
|
1938
|
-
border-radius: 4px;
|
|
1939
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[750]+kc["050"]};
|
|
1940
|
-
`,Tb=({icons:n,icon:r,iconSrc:o,smallIconSize:i=12,largeIconSize:a=22})=>{if(n&&n.length>1){const r=n.slice(0,3),o=n.length-r.length,a=r.slice(0,2),s=r.slice(2),l=s.length>0;return e("div",{style:{width:"fit-content"},children:e(kb,{$noBackground:!0,children:t(Uo,{$gap:1,children:[e(zo,{$gap:1,$justifyContent:"space-between",children:a.map((t,n)=>e(Ab,{children:e(t,{size:i})},`top-${n}`))}),l&&t(zo,{$gap:1,$justifyContent:"space-between",children:[s.map((t,n)=>e(Ab,{children:e(t,{size:i})},`bottom-${n}`)),o>0&&e(Ab,{children:e(yo,{size:po.XXXS,weight:500,children:`+${o}`})})]})]})})})}const s=n?.[0]||r;return e("div",{style:{width:"fit-content"},children:e(kb,{children:s?e(s,{size:a}):e("img",{src:o,alt:"icon",width:a,height:a})})})},Db=({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(Uo,{"data-id":o,$gap:6,children:[e(ff,{label:a,tooltip:s,required:c,badge:l}),e(Uo,{$gap:8,children:v.map((o,i)=>{const a=i===v.length-1;return t(zo,{$gap:8,$alignItems:"center",children:[e($f,{width:"100%",autoFocus:li(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(Pf,{leftIcon:Ct,variant:Rf.Secondary,size:Of.S,disabled:y,onClick:()=>(()=>{const e=[...n||[]];e.push(""),r(e)})()}),e(Pf,{leftIcon:b?It:()=>e(It,{fill:g.v2.colors.red[500]}),variant:Rf.Secondary,size:Of.S,disabled:b,onClick:()=>(e=>{const t=[...n||[]].filter((t,n)=>n!==e);t.length||t.push(""),r(t)})(i)})]},`input-list-${i}`)})}),e(yf,{errorMessage:d,warnMessage:u,helpMessage:p})]})},Ib=({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 Wn.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(xb,{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&&li(f);return e($f,{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})}},Nb=r.table`
|
|
1941
|
-
width: 100%;
|
|
1942
|
-
border-collapse: separate;
|
|
1943
|
-
border-spacing: 0 8px;
|
|
1944
|
-
`,Rb=r.td`
|
|
1945
|
-
padding: 0 8px 0 0;
|
|
1946
|
-
`,Ob=r.td`
|
|
1947
|
-
width: 72px;
|
|
1948
|
-
padding-bottom: 2px;
|
|
1949
|
-
vertical-align: bottom;
|
|
1950
|
-
`,_b=({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=Gt(()=>{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=Gt(()=>{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(Uo,{"data-id":a,$gap:0,children:[e(ff,{label:s,tooltip:l,required:d,badge:c}),e(Nb,{children:e("tbody",{children:x.map((n,i)=>{const a=i===x.length-1;return t(Bt,{children:[g&&i>0?e("tr",{children:e(Rb,{colSpan:v.length})}):null,v.map((s,l)=>t("tr",{children:[s.map((t,r)=>t.renderCondition&&!t.renderCondition(n)?null:e(Rb,{children:e(Ib,{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(Ob,{children:t(zo,{$gap:8,$justifyContent:"flex-end",children:[a&&e(Pf,{leftIcon:Ct,variant:Rf.Secondary,size:Of.S,disabled:u,onClick:()=>(()=>{const e=$n(r);e.push($n(y)),o(e)})()}),e(Pf,{leftIcon:u?It:()=>e(It,{fill:f.v2.colors.red[500]}),variant:Rf.Secondary,size:Of.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(yf,{errorMessage:p,warnMessage:h,helpMessage:m})]})},Pb=r.div`
|
|
1951
|
-
display: flex;
|
|
1952
|
-
align-items: center;
|
|
1953
|
-
justify-content: space-between;
|
|
1954
|
-
gap: 32px;
|
|
1955
|
-
|
|
1956
|
-
padding: 18px 16px;
|
|
1957
|
-
border-radius: 18px;
|
|
1958
|
-
background-color: ${({theme:e})=>e.v2.colors.black[500]+kc["095"]};
|
|
1959
|
-
box-shadow: 0 4px 16.7px 0 rgba(0, 0, 0, 0.83);
|
|
1960
|
-
|
|
1961
|
-
position: fixed;
|
|
1962
|
-
bottom: 0;
|
|
1963
|
-
left: 50%;
|
|
1964
|
-
z-index: ${({theme:e})=>e.v2.zIndex.island};
|
|
1965
|
-
animation-name: ${Tc.in.center};
|
|
1966
|
-
`,Lb=({isOpen:n,onClose:r,richTitle:o,actions:i})=>n?t(Pb,{children:[e(sy,{...o}),e(oy,{onAnyClick:r,actions:i})]}):null,Fb=r.div`
|
|
1967
|
-
position: ${({$relativeToParent:e})=>e?"absolute":"fixed"};
|
|
1968
|
-
top: 50%;
|
|
1969
|
-
left: 50%;
|
|
1970
|
-
transform: translate(-50%, -50%);
|
|
1971
|
-
z-index: ${({theme:e})=>e.v2.zIndex.modal};
|
|
1972
|
-
width: fit-content;
|
|
1973
|
-
border-radius: 20px;
|
|
1974
|
-
background: ${({theme:e})=>e.v2.colors.black[500]};
|
|
1975
|
-
box-shadow: 0 0 34px 0 rgba(0, 0, 0, 0.7);
|
|
1976
|
-
overflow: hidden;
|
|
1977
|
-
|
|
1978
|
-
/* Promote to its own composited layer and isolate paint/layout so descendant
|
|
1979
|
-
re-renders during the slide animation can't trigger reflows of the rest of
|
|
1980
|
-
the page. Without this, the global \`* { transition: all 300ms }\` rule plus
|
|
1981
|
-
a heavy modal body (forms, etc.) make the close visibly stutter. */
|
|
1982
|
-
will-change: transform;
|
|
1983
|
-
contain: layout paint;
|
|
1984
|
-
|
|
1985
|
-
animation-name: ${({$closing:e})=>e?Tc.out.center:Tc.in.center};
|
|
1986
|
-
/* Snappier close: shorter duration with an ease-in curve. The slide-in keeps
|
|
1987
|
-
the global 300ms default which pairs with the fade-in for a soft entrance. */
|
|
1988
|
-
animation-duration: ${({$closing:e})=>e?"180ms":"300ms"};
|
|
1989
|
-
animation-timing-function: ${({$closing:e})=>e?"cubic-bezier(0.4, 0, 1, 1)":"cubic-bezier(0, 0, 0.2, 1)"};
|
|
1990
|
-
|
|
1991
|
-
/* Block hover/click work on form children mid-close so their transitions
|
|
1992
|
-
don't compete with the slide-out. */
|
|
1993
|
-
${({$closing:e})=>e&&"pointer-events: none;"}
|
|
1994
|
-
`,Mb=r(Ho)`
|
|
1995
|
-
will-change: opacity;
|
|
1996
|
-
animation-name: ${({$closing:e})=>e?Rc.out:Rc.in};
|
|
1997
|
-
animation-duration: ${({$closing:e})=>e?"180ms":"300ms"};
|
|
1998
|
-
|
|
1999
|
-
/* The blurred backdrop is the most expensive thing on screen during the close
|
|
2000
|
-
— animating opacity on a backdrop-filtered element forces a full GPU
|
|
2001
|
-
recomposite per frame. Drop the blur while closing; visually identical
|
|
2002
|
-
because the overlay is fading to 0. */
|
|
2003
|
-
${({$closing:e})=>e&&"backdrop-filter: none; pointer-events: none;"}
|
|
2004
|
-
`,zb=r.div`
|
|
2005
|
-
position: relative;
|
|
2006
|
-
`,Ub=r.div`
|
|
2007
|
-
position: absolute;
|
|
2008
|
-
top: 16px;
|
|
2009
|
-
left: 16px;
|
|
2010
|
-
`,Bb=({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(Ht(()=>{r?(u(!0),h(!1)):d&&h(!0)},[r]),Kc(d),!d)return null;const m=t(n,{children:[!o&&e(Mb,{$relativeToParent:i,$closing:p,onClick:p?void 0:s}),e(Fb,{"data-id":"modal",$relativeToParent:i,$closing:p,onAnimationEnd:e=>{e.target===e.currentTarget&&p&&(u(!1),h(!1),l?.())},children:t(zb,{children:[a&&e(Ub,{children:e(ed,{icon:t=>e(Pt,{rotate:-90,...t}),size:Qc.L,onClick:a})}),c]})})]});return i?m:pn(m,document.body)},jb=r.div`
|
|
2011
|
-
position: relative;
|
|
2012
|
-
width: ${64}px;
|
|
2013
|
-
height: ${({$height:e})=>e};
|
|
2014
|
-
flex-shrink: 0;
|
|
2015
|
-
`,Hb=r.aside`
|
|
2016
|
-
position: absolute;
|
|
2017
|
-
top: 0;
|
|
2018
|
-
left: 0;
|
|
2019
|
-
bottom: 0;
|
|
2020
|
-
display: flex;
|
|
2021
|
-
flex-direction: column;
|
|
2022
|
-
gap: 8px;
|
|
2023
|
-
width: ${({$expanded:e})=>e?"220px":"64px"};
|
|
2024
|
-
padding: 16px ${12}px;
|
|
2025
|
-
box-sizing: border-box;
|
|
2026
|
-
background-color: ${({theme:e})=>e.v2.colors.black[500]};
|
|
2027
|
-
overflow-x: hidden;
|
|
2028
|
-
overflow-y: auto;
|
|
2029
|
-
z-index: 10;
|
|
2030
|
-
transition:
|
|
2031
|
-
width 200ms ease,
|
|
2032
|
-
padding 200ms ease;
|
|
2033
|
-
`,Wb=r.button`
|
|
2034
|
-
display: flex;
|
|
2035
|
-
align-items: center;
|
|
2036
|
-
width: 100%;
|
|
2037
|
-
min-width: 0;
|
|
2038
|
-
height: ${40}px;
|
|
2039
|
-
padding: 0;
|
|
2040
|
-
margin: 0;
|
|
2041
|
-
border: none;
|
|
2042
|
-
border-radius: 6px;
|
|
2043
|
-
box-sizing: border-box;
|
|
2044
|
-
cursor: pointer;
|
|
2045
|
-
font: inherit;
|
|
2046
|
-
background-color: ${({theme:e,$selected:t})=>t?e.v2.colors.purple[500]:"transparent"};
|
|
2047
|
-
&:hover {
|
|
2048
|
-
background-color: ${({theme:e,$selected:t})=>t?e.v2.colors.purple[600]:e.v2.colors.silver[800]};
|
|
2049
|
-
}
|
|
2050
|
-
&:active {
|
|
2051
|
-
background-color: ${({theme:e,$selected:t})=>t?e.v2.colors.purple[700]:e.v2.colors.silver[900]};
|
|
2052
|
-
}
|
|
2053
|
-
`,Gb=r.div`
|
|
2054
|
-
width: ${40}px;
|
|
2055
|
-
height: ${40}px;
|
|
2056
|
-
display: flex;
|
|
2057
|
-
align-items: center;
|
|
2058
|
-
justify-content: center;
|
|
2059
|
-
flex-shrink: 0;
|
|
2060
|
-
`,Xb=r.div`
|
|
2061
|
-
flex: 1 1 0;
|
|
2062
|
-
min-width: 0;
|
|
2063
|
-
overflow: hidden;
|
|
2064
|
-
padding-right: 12px;
|
|
2065
|
-
pointer-events: none;
|
|
2066
|
-
`,Vb=({height:n,icons:r})=>{const o=i(),[a,s]=jt(!1);return e(jb,{$height:n,children:e(Hb,{$expanded:a,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),children:r.map(({id:n,label:r,selected:i,icon:s,onClick:l})=>t(Wb,{$selected:i,onClick:l,"aria-label":r,title:a?void 0:r,children:[e(Gb,{children:e(s,{size:24,fill:o.v2.colors.white[500]})}),a&&e(Xb,{children:e(yo,{size:po.S,weight:500,color:ho.Primary,nowrap:!0,children:r})})]},n))})})};var Kb;!function(e){e.S="small",e.L="large"}(Kb||(Kb={}));const qb=r.div`
|
|
2067
|
-
width: fit-content;
|
|
2068
|
-
display: flex;
|
|
2069
|
-
align-items: center;
|
|
2070
|
-
gap: 8px;
|
|
2071
|
-
cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
|
|
2072
|
-
`,Jb=r.div`
|
|
2073
|
-
width: ${({$size:e})=>e===Kb.S?"16px":"20px"};
|
|
2074
|
-
height: ${({$size:e})=>e===Kb.S?"16px":"20px"};
|
|
2075
|
-
display: flex;
|
|
2076
|
-
align-items: center;
|
|
2077
|
-
justify-content: center;
|
|
2078
|
-
border-radius: 100%;
|
|
2079
|
-
border: 1px solid ${({$borderColor:e})=>e};
|
|
2080
|
-
background-color: ${({$backgroundColor:e})=>e};
|
|
2081
|
-
`,Yb=({"data-id":n,label:r,value:o,onChange:a,disabled:s,size:l=Kb.L})=>{const c=i(),[d,u]=jt(!1),p=o,h=l===Kb.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(qb,{"data-id":n??"radio"+(r?`-${r}`:""),onClick:e=>{e.stopPropagation(),s||a(!o)},$disabled:s,onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),children:[e(Jb,{$size:l,$borderColor:g,$backgroundColor:f,children:o?e(Ft,{size:h,fill:m}):null}),r&&e(yo,{size:l===Kb.S?po.XXS:po.XS,children:r})]})},Qb=r.div`
|
|
2082
|
-
display: flex;
|
|
2083
|
-
flex-direction: ${({$flexDirection:e})=>e};
|
|
2084
|
-
gap: ${({$gap:e})=>e}px;
|
|
2085
|
-
`,Zb=({label:n,direction:r,disabled:o,size:i,options:a,values:s,setValues:l})=>t(Qb,{$flexDirection:r===Pn.Horizontal?"row":"column",$gap:r===Pn.Horizontal?16:8,children:[n&&e(yo,{children:n}),a.map(t=>e(Yb,{...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}`))]}),ev=({currentStep:n,data:r,gap:o=12})=>e(Uo,{$gap:o,children:r.map(r=>{const o=r.step<n,i=r.step===n;return t(zo,{$gap:8,children:[o||r.forceDoneBadge?e(hf,{status:Xn.Success,label:"",leftIcon:yt}):e(hf,{status:Xn.Default,label:r.step.toString()}),e(yo,{size:i?po.M:po.XS,weight:i?500:400,opacity:i?1:.7,children:r.label})]},`stepper-item-${r.step}`)})});var tv;!function(e){e.Data="data",e.Pretty="pretty"}(tv||(tv={}));const nv=r.div`
|
|
2086
|
-
height: ${({$maxHeight:e})=>e};
|
|
2087
|
-
width: 100%;
|
|
2088
|
-
display: flex;
|
|
2089
|
-
flex-direction: column;
|
|
2090
|
-
overflow: hidden;
|
|
2091
|
-
`,rv=r.div`
|
|
2092
|
-
width: 100%;
|
|
2093
|
-
flex: 1;
|
|
2094
|
-
display: flex;
|
|
2095
|
-
flex-direction: column;
|
|
2096
|
-
`,ov=r.div`
|
|
2097
|
-
flex-shrink: 0;
|
|
2098
|
-
position: relative;
|
|
2099
|
-
z-index: 2;
|
|
2100
|
-
`,iv=r.div`
|
|
2101
|
-
position: relative;
|
|
2102
|
-
display: flex;
|
|
2103
|
-
width: 100%;
|
|
2104
|
-
`,av=r.div`
|
|
2105
|
-
position: relative;
|
|
2106
|
-
min-width: ${({$minWidth:e})=>e?`${e}px`:"auto"};
|
|
2107
|
-
flex: ${({$flex:e})=>e??1};
|
|
2108
|
-
padding: 18px 24px;
|
|
2109
|
-
border: none;
|
|
2110
|
-
border-radius: ${({$isFirst:e,$isLast:t})=>e?"4px 0 0 0":t?"0 4px 0 0":"0"};
|
|
2111
|
-
box-sizing: border-box;
|
|
2112
|
-
|
|
2113
|
-
${({$variant:e,$backgroundColor:t})=>{if(t)return o`
|
|
2114
|
-
background-color: ${t};
|
|
2115
|
-
`;switch(e){case tv.Data:return o`
|
|
2116
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[750]};
|
|
2117
|
-
`;case tv.Pretty:return o`
|
|
2118
|
-
background-color: transparent;
|
|
2119
|
-
`;default:return""}}}
|
|
2120
|
-
`,sv=r.div`
|
|
2121
|
-
position: absolute;
|
|
2122
|
-
top: 50%;
|
|
2123
|
-
right: 0;
|
|
2124
|
-
transform: translateY(-50%);
|
|
2125
|
-
width: 1px;
|
|
2126
|
-
height: 18px;
|
|
2127
|
-
background: ${({theme:e})=>e.v2.colors.silver[500]};
|
|
2128
|
-
`,lv=r.div`
|
|
2129
|
-
min-width: ${({$minWidth:e})=>e?`${e}px`:"auto"};
|
|
2130
|
-
flex: ${({$flex:e})=>e??1};
|
|
2131
|
-
overflow: hidden;
|
|
2132
|
-
display: flex;
|
|
2133
|
-
align-items: center;
|
|
2134
|
-
|
|
2135
|
-
padding: 18px 24px;
|
|
2136
|
-
cursor: ${({$withClick:e})=>e?"pointer":"default"};
|
|
2137
|
-
box-sizing: border-box;
|
|
2138
|
-
|
|
2139
|
-
${({$variant:e,$selected:t,$hovered:n,$isLastRow:r,$isFirstCell:i,$isLastCell:a})=>{switch(e){case tv.Data:return o`
|
|
2140
|
-
border-bottom: ${({theme:e})=>r?"none":`1px solid ${e.v2.colors.silver[500]}`};
|
|
2141
|
-
border-radius: ${r?i?"0 0 0 4px":a?"0 0 4px 0":"0":"0"};
|
|
2142
|
-
background-color: ${({theme:e})=>t?e.v2.colors.blue[1e3]:n?e.v2.colors.silver[700]:e.v2.colors.silver[800]};
|
|
2143
|
-
`;case tv.Pretty:return o`
|
|
2144
|
-
border: none;
|
|
2145
|
-
border-radius: ${i?"12px 0 0 12px":a?"0 12px 12px 0":"0"};
|
|
2146
|
-
background-color: ${({theme:e})=>t?e.v2.colors.blue[1e3]:n?e.v2.colors.silver[700]:e.v2.colors.silver[900]};
|
|
2147
|
-
`;default:return""}}}
|
|
2148
|
-
`,cv=r.div`
|
|
2149
|
-
width: 100%;
|
|
2150
|
-
display: flex;
|
|
2151
|
-
align-items: center;
|
|
2152
|
-
justify-content: ${({$textAlign:e})=>"right"===e?"flex-end":"left"===e?"flex-start":"center"===e?"center":"unset"};
|
|
2153
|
-
gap: 4px;
|
|
2154
|
-
text-align: ${({$textAlign:e})=>e||"left"};
|
|
2155
|
-
`,dv=({variant:n,columns:r,rows:o,getRowActions:i,rowActionsPushRightPosition:a,rowActionsPushLeftPosition:s,withCheckboxes:l})=>{const[c,d]=jt(null),u=Gt(()=>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(iv,{children:[l&&e(lv,{$variant:n,style:{flex:"0 0 68px"},...$(!0,!1),children:!b&&e(Bf,{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),S=e(zo,{$width:"100%",$justifyContent:"right"===c?"flex-end":"center"===c?"center":"flex-start",children:g?.component?e(g.component,{}):e(yo,{size:po.XS,children:g?.rawValue||"-"})});return t(lv,{$variant:n,$flex:d,$minWidth:u,...$(f,y),children:[i?e(Jd,{text:g?.rawValue?.toString()||"",ellipsis:!0,children:S}):S,b?e(Eb,{isOpen:v,actions:x,positionRight:a,positionLeft:s}):null]},`row-${p}-cell-${m}`)})]},`row-${p}`)}),[o,c,i,a,s,l,r]);return e(of,{gap:n===tv.Pretty?8:0,elements:u})},uv=({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===Ln.Ascending?0:180;return e(ed,{icon:t=>e(Pt,{fill:s,rotate:l,...t}),onClick:()=>o(t)})},pv=({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=Gt(()=>{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(Jf,{items:c,withMultiSelect:!0,selectedIds:n[t]?.map(e=>e.toString())??[],setSelectedIds:e=>r(t,e),defaultOpen:!1,iconButtonProps:{leftIcon:t=>e(Mt,{fill:l,...t})}})},hv=({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(iv,{children:[u&&e(av,{$variant:n,$backgroundColor:r,$isFirst:!0,$isLast:!1,style:{flex:"0 0 68px"},children:e(Bf,{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:$},S)=>{const w=0===S&&!u,C=S===o.length-1,E=e(yo,{size:po.XS,align:$,children:h});return t(av,{$variant:n,$backgroundColor:r,$flex:v,$minWidth:x,$isFirst:w,$isLast:C,children:[t(cv,{$textAlign:$,children:[g||m?e(Jd,{text:g||h,children:E}):E,!f&&e(uv,{columnKey:p,sortDirection:a,sortByKey:s,onSort:l}),!y&&e(pv,{columnKey:p,filters:c,onFilter:d,rowsUnfiltered:i,filterOverride:b})]}),!C&&n===tv.Data&&e(sv,{})]},`column-${p}`)})]}),mv=({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(Ln.Ascending),[b,v]=jt(""),[x,$]=jt({}),S=m??x,w=Xt(e=>{v(e),y(e=>e===Ln.Ascending?Ln.Descending:Ln.Ascending)},[]),C=Xt((e,t)=>{const n={...S,[e]:t};g&&g(n),void 0===m&&$(n)},[S,g,m]),E=Gt(()=>{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===Ln.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(S)){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,S,l]),{partiallySelected:k,allSelected:A}=Gt(()=>{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(nv,{$maxHeight:r,children:t(rv,{$variant:n,children:[!i&&e(ov,{children:e(hv,{variant:n,backgroundColor:o,columns:l,rowsUnfiltered:c,sortDirection:f,sortByKey:b,onSort:w,filters:S,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(dv,{variant:n,columns:l,rows:E,getRowActions:d||(()=>[]),rowActionsPushRightPosition:u,rowActionsPushLeftPosition:p,withCheckboxes:h}):e(Bo,{style:{height:r},children:a?e(Yo,{withSpinner:!0}):e(Ff,{...s})})]})})};var gv;!function(e){e.Default="default",e.Purple="purple",e.Yellow="yellow",e.Blue="blue",e.Pink="pink",e.Green="green",e.Loader="loader"}(gv||(gv={}));const fv=(e,t,n)=>{switch(t){case gv.Purple:return e.v2.colors.purple[n?"300":"900"];case gv.Yellow:return e.v2.colors.yellow[n?"300":"1000"];case gv.Blue:return e.v2.colors.blue[n?"300":"1000"];case gv.Pink:return e.v2.colors.red[n?"300":"1000"];case gv.Green:return e.v2.colors.green[n?"300":"900"];case gv.Loader:return e.v2.colors.grey[n?"600":"800"];default:return e.v2.colors.grey[n?"300":"500"]}},yv=r.div`
|
|
2156
|
-
display: flex;
|
|
2157
|
-
align-items: center;
|
|
2158
|
-
justify-content: center;
|
|
2159
|
-
gap: 8px;
|
|
2160
|
-
padding: 4px 8px;
|
|
2161
|
-
border-radius: 6px;
|
|
2162
|
-
border: 1px solid transparent;
|
|
2163
|
-
|
|
2164
|
-
${({$flex:e})=>e?o`
|
|
2165
|
-
flex: ${e};
|
|
2166
|
-
`:o`
|
|
2167
|
-
width: fit-content;
|
|
2168
|
-
`}
|
|
2169
|
-
|
|
2170
|
-
${({$disabled:e,$variant:t,$withClick:n})=>e?o`
|
|
2171
|
-
background-color: ${({theme:e})=>e.v2.colors.grey[800]};
|
|
2172
|
-
cursor: not-allowed;
|
|
2173
|
-
`:o`
|
|
2174
|
-
background-color: ${({theme:e})=>fv(e,t)};
|
|
2175
|
-
${n&&o`
|
|
2176
|
-
cursor: pointer;
|
|
2177
|
-
&:hover,
|
|
2178
|
-
&:active {
|
|
2179
|
-
border: 1px solid ${({theme:e})=>fv(e,t,!0)};
|
|
2180
|
-
}
|
|
2181
|
-
`}
|
|
2182
|
-
`}
|
|
2183
|
-
`,bv=({variant:n=gv.Default,label:r,leftIcon:o,rightIcon:a,onClick:s,disabled:l,flex:c})=>{const d=i(),u=l?d.v2.colors.grey[400]:n===gv.Default?d.v2.colors.white[500]:fv(d,n,!0),p=n===gv.Loader;return t(yv,{$variant:n,$disabled:l,$withClick:!!s,onClick:()=>!l&&s?.(),$flex:c,children:[o&&e(o,{fill:u,size:16}),p?e(Yo,{withGradient:!0,title:r,titleSize:po.XXS}):e(yo,{color:u,size:po.XXS,nowrap:!0,children:r}),a&&e(a,{fill:u,size:16})]})},vv=r.div`
|
|
2184
|
-
padding: 6px 12px;
|
|
2185
|
-
|
|
2186
|
-
display: flex;
|
|
2187
|
-
align-self: stretch;
|
|
2188
|
-
align-items: flex-start;
|
|
2189
|
-
gap: 8px;
|
|
2190
|
-
border-radius: 6px;
|
|
2191
|
-
|
|
2192
|
-
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]};
|
|
2193
|
-
background: ${({theme:e,$disabled:t})=>t?e.v2.colors.grey[800]:e.v2.colors.black[500]};
|
|
2194
|
-
${({$disabled:e,$error:t})=>!e&&!t&&o`
|
|
2195
|
-
&:hover,
|
|
2196
|
-
&:active,
|
|
2197
|
-
&:focus-within {
|
|
2198
|
-
border: 1px solid ${({theme:e})=>e.v2.colors.silver[300]};
|
|
2199
|
-
}
|
|
2200
|
-
`}
|
|
2201
|
-
`,xv=r.textarea`
|
|
2202
|
-
max-width: ${({$maxWidth:e})=>e||"unset"};
|
|
2203
|
-
min-height: ${({$minHeight:e})=>e||"50px"};
|
|
2204
|
-
flex: 1;
|
|
2205
|
-
font-family: ${({theme:e})=>e.font_family.primary};
|
|
2206
|
-
font-size: 14px;
|
|
2207
|
-
font-weight: 400;
|
|
2208
|
-
resize: none;
|
|
2209
|
-
|
|
2210
|
-
background: transparent;
|
|
2211
|
-
border: none;
|
|
2212
|
-
outline: none;
|
|
2213
|
-
cursor: text;
|
|
2214
|
-
color: ${({theme:e})=>e.v2.colors.white[500]};
|
|
2215
|
-
&::placeholder {
|
|
2216
|
-
color: ${({theme:e})=>e.v2.colors.silver[600]};
|
|
2217
|
-
}
|
|
2218
|
-
|
|
2219
|
-
&:disabled {
|
|
2220
|
-
cursor: not-allowed;
|
|
2221
|
-
color: ${({theme:e})=>e.v2.colors.grey[400]};
|
|
2222
|
-
&::placeholder {
|
|
2223
|
-
color: ${({theme:e})=>e.v2.colors.grey[400]};
|
|
2224
|
-
}
|
|
2225
|
-
}
|
|
2226
|
-
`,$v=({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=Wt(null),y=()=>{f.current&&(f.current.style.height="auto",f.current.style.height=`${f.current.scrollHeight}px`)};return t(Uo,{$gap:6,children:[e(ff,{label:n,tooltip:o,required:r,badge:i}),e(vv,{$disabled:p,$error:!!a,children:e(xv,{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(yf,{errorMessage:a,warnMessage:s,helpMessage:l})]})},Sv=[{id:"ms",label:"milliseconds"},{id:"s",label:"seconds"},{id:"m",label:"minutes"},{id:"h",label:"hours"}],wv=r.div`
|
|
2227
|
-
flex: 1;
|
|
2228
|
-
min-width: 0;
|
|
2229
|
-
`,Cv=r.div`
|
|
2230
|
-
flex: 0 0 auto;
|
|
2231
|
-
min-width: 140px;
|
|
2232
|
-
`,Ev=({name:n,label:r,tooltip:o,badge:i,placeholder:a,required:s,disabled:l,value:c,setValue:d,units:u=Sv,defaultUnit:p,errorMessage:h,warnMessage:m,helpMessage:g,hasError:f,width:y})=>{const b=Gt(()=>p&&u.some(e=>e.id===p)?p:u[0]?.id||"s",[p,u]),{num:v,unit:x}=Gt(()=>((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(Uo,{$width:y,$gap:6,children:[e(ff,{label:r,tooltip:o,required:s,badge:i}),t(zo,{$gap:8,$alignItems:"center",children:[e(wv,{children:e($f,{name:n,placeholder:a,disabled:l,hasError:f||!!h,inputMode:"numeric",value:v,onChange:e=>$(Ci(e.target.value),x)})}),e(Cv,{children:e(xb,{name:`${n}-unit`,disabled:l,hasError:f||!!h,withSearch:!1,options:u,values:[x],setValues:e=>$(v,e[0]||x)})})]}),e(yf,{errorMessage:h,warnMessage:m,helpMessage:g})]})},kv=r.div`
|
|
2233
|
-
min-width: 500px;
|
|
2234
|
-
`,Av=r.div`
|
|
2235
|
-
display: flex;
|
|
2236
|
-
flex-direction: column;
|
|
2237
|
-
align-items: center;
|
|
2238
|
-
gap: 16px;
|
|
2239
|
-
padding: 24px;
|
|
2240
|
-
width: calc(100% - 48px);
|
|
2241
|
-
`,Tv=r.div`
|
|
2242
|
-
display: flex;
|
|
2243
|
-
justify-content: center;
|
|
2244
|
-
gap: 16px;
|
|
2245
|
-
padding: 16px 24px;
|
|
2246
|
-
width: calc(100% - 48px);
|
|
2247
|
-
background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
|
|
2248
|
-
`,Dv=({visual:n,title:r,description:o,isOpen:i,onClose:a,denyButton:s,approveButton:l,children:c,...d})=>e(Bb,{isOpen:i,onClose:a,...d,children:t(kv,{children:[t(Av,{children:[n&&e(n,{}),e(yo,{size:po.M,weight:500,color:ho.Primary,children:r}),e(Uo,{$alignItems:"center",$gap:4,children:o.split("\n").map(t=>e(yo,{size:po.XS,weight:400,color:ho.Secondary,children:t},t))}),c]}),(s||l)&&t(Tv,{children:[s&&e(Pf,{"data-id":"deny",...s}),l&&e(Pf,{"data-id":"approve",...l})]})]})});export{vb as $,ry as A,Of as B,Ou as C,py as D,Xn as E,zo as F,kc as G,Qo as H,Zd as I,ac as J,sd as K,Yo as L,Nr as M,Ff as N,Yg as O,Un as P,Ig as Q,yu as R,Tf as S,eb as T,jn as U,qm as V,er as W,Ir as X,ri as Y,Gr as Z,Mr as _,Rf as a,Dv as a$,Md as a0,sc as a1,Oi as a2,zp as a3,yg as a4,yi as a5,Qu as a6,Kn as a7,Zo as a8,zu as a9,li as aA,_b as aB,In as aC,Db as aD,Wn as aE,Tn as aF,Kp as aG,Cr as aH,$v as aI,xn as aJ,oh as aK,pb as aL,fr as aM,$i as aN,Si as aO,Ai as aP,lr as aQ,cr as aR,ur as aS,vr as aT,br as aU,dr as aV,sr as aW,lh as aX,Ql as aY,Ur as aZ,Qp as a_,si as aa,tp as ab,wp as ac,Ep as ad,Dg as ae,Eb as af,$n as ag,lu as ah,hi as ai,Ei as aj,bd as ak,ic as al,Rr as am,md as an,oi as ao,or as ap,Ku as aq,fg as ar,fu as as,Hr as at,Dn as au,ff as av,Bf as aw,yf as ax,$f as ay,Gn as az,Bo as b,Zl as b$,Rm as b0,Tm as b1,ym as b2,ms as b3,Ea as b4,Oa as b5,gs as b6,za as b7,hs as b8,na as b9,Kr as bA,Mo as bB,Vy as bC,Fr as bD,Gc as bE,xi as bF,kn as bG,ai as bH,Dr as bI,bv as bJ,Zr as bK,pi as bL,vi as bM,ar as bN,jy as bO,Fy as bP,Yl as bQ,Br as bR,gv as bS,of as bT,Tb as bU,_r as bV,Jn as bW,Yn as bX,Qn as bY,cd as bZ,tc as b_,ra as ba,gy as bb,pa as bc,dh as bd,_i as be,Pi as bf,Fi as bg,xb as bh,ed as bi,Qc as bj,Mi as bk,Xr as bl,ii as bm,zi as bn,Sd as bo,vd as bp,qn as bq,Fn as br,uo as bs,$d as bt,xd as bu,gc as bv,Pm as bw,pc as bx,Ar as by,kr as bz,qy as c,Qs as c$,fi as c0,jr as c1,Ui as c2,Xi as c3,ji as c4,Gi as c5,Am as c6,Xl as c7,Kl as c8,ka as c9,Vs as cA,Po as cB,zl as cC,Ul as cD,Bl as cE,jl as cF,Hl as cG,Wl as cH,Ds as cI,Ns as cJ,Rs as cK,Os as cL,Ps as cM,_s as cN,Fs as cO,Ls as cP,zs as cQ,Ms as cR,Us as cS,ks as cT,As as cU,Ks as cV,qs as cW,tl as cX,Zs as cY,el as cZ,Ys as c_,Wi as ca,Vl as cb,Ss as cc,$s as cd,Es as ce,Cs as cf,vs as cg,bs as ch,Bi as ci,ls as cj,di as ck,Jf as cl,Gf as cm,Wf as cn,dc as co,Bb as cp,Gl as cq,Fh as cr,Ts as cs,dm as ct,Bs as cu,js as cv,Hs as cw,Ws as cx,Xs as cy,Gs as cz,Jy as d,qr as d$,Js as d0,il as d1,al as d2,rl as d3,ol as d4,nl as d5,ll as d6,cl as d7,sl as d8,Yb as d9,hl as dA,ml as dB,gl as dC,fl as dD,yl as dE,vl as dF,wl as dG,yd as dH,Lo as dI,_m as dJ,rh as dK,Vp as dL,sh as dM,Lb as dN,ev as dO,cc as dP,Tr as dQ,Jl as dR,pd as dS,qc as dT,Yr as dU,Vr as dV,Mf as dW,fc as dX,iy as dY,Jr as dZ,uf as d_,Kb as da,Is as db,Il as dc,Nl as dd,Rl as de,Dl as df,_l as dg,Pl as dh,Ll as di,Fl as dj,Ml as dk,Ol as dl,Al as dm,Tl as dn,bl as dp,hm as dq,Cl as dr,El as ds,kl as dt,xl as du,Sl as dv,$l as dw,dl as dx,ul as dy,pl as dz,Pf as e,ia as e$,Yc as e0,wr as e1,En as e2,Cn as e3,Nm as e4,vc as e5,Yp as e6,Er as e7,sy as e8,oy as e9,ss as eA,is as eB,as as eC,os as eD,rs as eE,zh as eF,Uh as eG,Bh as eH,us as eI,ps as eJ,ds as eK,cs as eL,dd as eM,Ev as eN,Ra as eO,ca as eP,Na as eQ,la as eR,Fa as eS,La as eT,Sa as eU,Ia as eV,Pa as eW,Ga as eX,Ca as eY,Ha as eZ,va as e_,co as ea,pr as eb,by as ec,Ry as ed,$y as ee,Fo as ef,ha as eg,Ya as eh,qi as ei,Vi as ej,Ki as ek,Ji as el,Mh as em,pm as en,gm as eo,fm as ep,nm as eq,Zh as er,Eh as es,Ch as et,wh as eu,rm as ev,em as ew,jh as ex,cm as ey,fs as ez,yo as f,Zn as f$,xa as f0,ba as f1,aa as f2,$a as f3,Za as f4,ya as f5,Ja as f6,es as f7,Qa as f8,ts as f9,xh as fA,ch as fB,Ta as fC,Va as fD,Da as fE,_a as fF,Ka as fG,Yf as fH,Wa as fI,To as fJ,An as fK,nr as fL,On as fM,rr as fN,tr as fO,zn as fP,Vn as fQ,_n as fR,Sr as fS,Pn as fT,Rn as fU,ir as fV,Hn as fW,Mn as fX,gr as fY,mr as fZ,hr as f_,ns as fa,Ua as fb,sa as fc,da as fd,ua as fe,ma as ff,uh as fg,fa as fh,ga as fi,Yi as fj,Qi as fk,oa as fl,Ba as fm,ja as fn,Xa as fo,ql as fp,Zi as fq,Nh as fr,Hi as fs,Yh as ft,Jh as fu,qh as fv,Aa as fw,wa as fx,Sh as fy,$h as fz,Lr as g,Zu as g$,$r as g0,xr as g1,yr as g2,Ln as g3,Nn as g4,Io as g5,Do as g6,Oo as g7,ui as g8,yn as g9,Ni as gA,Ri as gB,Li as gC,qa as gD,ws as gE,xs as gF,ys as gG,Ma as gH,ta as gI,ea as gJ,ec as gK,nc as gL,rc as gM,Ec as gN,Oc as gO,Ac as gP,Cc as gQ,ld as gR,Vc as gS,Kc as gT,nd as gU,od as gV,ad as gW,kd as gX,fd as gY,Fm as gZ,Mm as g_,bn as ga,wi as gb,Or as gc,Pr as gd,zr as ge,Sn as gf,Wr as gg,Qr as gh,to as gi,no as gj,ro as gk,oo as gl,io as gm,ao as gn,so as go,lo as gp,ei as gq,ci as gr,mi as gs,bi as gt,Ci as gu,ki as gv,Ti as gw,Di as gx,wn as gy,Ii as gz,ho as h,Rp as h0,Tp as h1,Pc as h2,zc as h3,wu as h4,Sg as h5,yp as h6,Vg as h7,Bg as h8,eg as h9,Sv as hA,Sy as hB,wb as hC,Vb as hD,Zb as hE,hy as hF,nb as hG,Ky as hH,go as hI,Zg as ha,Bu as hb,xu as hc,jm as hd,cp as he,ap as hf,op as hg,nf as hh,Ld as hi,Wo as hj,up as hk,Ho as hl,pg as hm,rp as hn,_g as ho,Go as hp,Xo as hq,Vo as hr,ku as hs,jo as ht,Bc as hu,jc as hv,Hc as hw,ty as hx,ny as hy,Hf as hz,po as i,Jd as j,wf as k,Sf as l,mv as m,tv as n,Nf as o,hf as p,Uo as q,uc as r,ud as s,Hd as t,td as u,kp as v,Wc as w,Ad as x,Jc as y,Bn as z};
|