@odigos/ui-kit 0.0.286-dev.520 → 0.0.287

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/lib/chunks/helpers-CtkwQ3Wc.js +9 -0
  3. package/lib/chunks/{index-9H2LDuOq.js → index-BlYPxLja.js} +23 -23
  4. package/lib/chunks/source-instrument-form-context-Bg6JzU76.js +5 -0
  5. package/lib/chunks/ui-components-CjgsN17j.js +1943 -0
  6. package/lib/components/button/index.d.ts +3 -1
  7. package/lib/components/drop-data/index.d.ts +4 -10
  8. package/lib/components/index.d.ts +2 -0
  9. package/lib/components/popup/index.d.ts +17 -0
  10. package/lib/components/select-window-hours/index.d.ts +17 -0
  11. package/lib/components.js +1 -1
  12. package/lib/constants/index.d.ts +1 -0
  13. package/lib/constants/instrumentation-rules/index.d.ts +2 -1
  14. package/lib/constants/strings/index.d.ts +14 -0
  15. package/lib/constants/url-templatization/index.d.ts +90 -0
  16. package/lib/constants.js +1 -1
  17. package/lib/containers/_drawers/index.d.ts +3 -0
  18. package/lib/containers/_drawers/url-templatization-custom-template-drawer/destination-step.d.ts +16 -0
  19. package/lib/containers/_drawers/url-templatization-custom-template-drawer/index.d.ts +18 -0
  20. package/lib/containers/_drawers/url-templatization-default-rule-drawer/index.d.ts +14 -0
  21. package/lib/containers/_drawers/url-templatization-template-view-drawer/index.d.ts +9 -0
  22. package/lib/containers/central-connections/helpers.d.ts +8 -0
  23. package/lib/containers/central-connections/index.d.ts +1 -0
  24. package/lib/containers/index.d.ts +1 -0
  25. package/lib/containers/insights/findings/drawer/anomaly/index.d.ts +1 -0
  26. package/lib/containers/insights/findings/drawer/helpers.d.ts +0 -2
  27. package/lib/containers/insights/findings/drawer/violation/index.d.ts +1 -0
  28. package/lib/containers/insights/findings/helpers.d.ts +13 -3
  29. package/lib/containers/insights/findings/resolve-findings/index.d.ts +11 -0
  30. package/lib/containers/insights/overview/contained-table-and-heading/index.d.ts +1 -0
  31. package/lib/containers/insights/settings-and-configurations/panels/guardrails/create-panel.d.ts +2 -6
  32. package/lib/containers/insights/settings-and-configurations/panels/guardrails/facet-section.d.ts +1 -0
  33. package/lib/containers/insights/settings-and-configurations/panels/guardrails/mappers.d.ts +5 -0
  34. package/lib/containers/insights/transactions/helpers.d.ts +0 -1
  35. package/lib/containers/url-templatization/converters.d.ts +43 -0
  36. package/lib/containers/url-templatization/custom-templates-list.d.ts +16 -0
  37. package/lib/containers/url-templatization/default-rules-list.d.ts +10 -0
  38. package/lib/containers/url-templatization/helpers.d.ts +17 -0
  39. package/lib/containers/url-templatization/index.d.ts +5 -0
  40. package/lib/containers/url-templatization/scope-summary.d.ts +8 -0
  41. package/lib/containers/url-templatization/template-path.d.ts +8 -0
  42. package/lib/containers.js +888 -432
  43. package/lib/contexts/odigos-api/hooks/use-insights-api.d.ts +4 -1
  44. package/lib/contexts/odigos-api/index.d.ts +1 -1
  45. package/lib/contexts/odigos-api/types.d.ts +5 -0
  46. package/lib/contexts/odigos-context.d.ts +3 -3
  47. package/lib/contexts.js +1 -1
  48. package/lib/functions.js +1 -1
  49. package/lib/hooks/index.d.ts +1 -0
  50. package/lib/hooks/useAnchoredPopup.d.ts +44 -0
  51. package/lib/hooks/useOnClickOutside.d.ts +1 -0
  52. package/lib/hooks.js +1 -1
  53. package/lib/icons/common/clock-icon/index.d.ts +2 -0
  54. package/lib/icons/common/index.d.ts +1 -0
  55. package/lib/icons/overview/index.d.ts +1 -0
  56. package/lib/icons/overview/url-templatization-icon/index.d.ts +2 -0
  57. package/lib/icons.js +1 -1
  58. package/lib/snippets/actions/index.d.ts +8 -5
  59. package/lib/snippets/upgrade-modal/index.d.ts +1 -1
  60. package/lib/snippets/wide-drawer/index.d.ts +6 -0
  61. package/lib/snippets.js +1 -1
  62. package/lib/store.js +1 -1
  63. package/lib/theme.js +1 -1
  64. package/lib/types/actions/index.d.ts +12 -0
  65. package/lib/types/common/index.d.ts +7 -2
  66. package/lib/types/instrumentation-rules/index.d.ts +1 -0
  67. package/lib/types.js +1 -1
  68. package/lib/visuals.js +1 -1
  69. package/package.json +1 -1
  70. package/lib/chunks/helpers-B0SJ6hqm.js +0 -9
  71. package/lib/chunks/source-instrument-form-context-BF70uJ_R.js +0 -5
  72. package/lib/chunks/ui-components-DqG0z5U0.js +0 -1878
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.287](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.286...ui-kit-v0.0.287) (2026-08-23)
4
+
5
+
6
+ ### Features
7
+
8
+ * add security/insights page ([#1173](https://github.com/odigos-io/ui-kit/issues/1173)) ([a9ae296](https://github.com/odigos-io/ui-kit/commit/a9ae296df7cf46a9e3a3ec772dc07a27a08dbd68))
9
+
3
10
  ## [0.0.286](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.285...ui-kit-v0.0.286) (2026-08-12)
4
11
 
5
12
 
@@ -0,0 +1,9 @@
1
+ import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{Fragment as n,useMemo as o,useContext as a,createContext as s}from"react";import{T as i,t as u,b as l,P as c}from"./ui-components-CjgsN17j.js";import p from"styled-components";var d;(e=>{e.Default="default",e.Action="action",e.Endpoint="endpoint",e.Scope="scope",e.Duration="duration"})(d||(d={}));const f=[d.Action,d.Endpoint,d.Scope,d.Duration],h=p.span`
2
+ font-family: ${({theme:e,$isMono:t})=>t?e.font_family.secondary:e.font_family.primary};
3
+ font-size: ${({theme:e})=>e.v2.text.size.xxs}px;
4
+ line-height: 20px;
5
+ color: ${({theme:e,$variant:t})=>{const r=e.v2.colors;switch(t){case"action":return r.green[400];case"endpoint":return r.purple[300];case"scope":return r.yellow[400];case"duration":return r.orange[500];default:return r.white[500]}}};
6
+ `,m=p.span`
7
+ text-decoration: underline dotted;
8
+ text-underline-offset: 3px;
9
+ `,v=({parts:o})=>{const a=o.map(e=>({...e,text:e.text.trim()})).filter(e=>e.text.length>0);return e(t,{children:a.map((o,a)=>{const s=e(h,{$variant:o.variant,$isMono:f.includes(o.variant),children:o.text});return r(n,{children:[0!==a&&e(t,{children:" "}),o.tooltipItems?.length?e(i,{text:o.tooltipItems,inline:!0,maxWidth:"300px",children:e(m,{children:s})}):s]},`${o.variant}-${a}`)})})};function g(){return{sources:[],namespaces:[],languages:[]}}function y(e){return!e||!e.sources?.length&&!e.namespaces?.length&&!e.languages?.length}function x(e){return e?{sources:e.sources?[...e.sources]:[],namespaces:e.namespaces?[...e.namespaces]:[],languages:e.languages?[...e.languages]:[]}:{sources:[],namespaces:[],languages:[]}}function k(e){return null==e||0===e}function T(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 A(e){return y(e.sourceScopes)?null:e.sourceScopes}function S(e){return A(e)}function R(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 P(e){if("custom"===e.durationPreset){const t=parseFloat(e.customDurationMs);return isNaN(t)?null:t}return parseInt(e.durationPreset,10)}function b(e){return{httpServer:{[e.routeType]:e.route||null,method:e.method||null}}}function D(e){return"all"===e.operationType?null:"httpServer"===e.operationType?b(e):"httpClient"===e.operationType?{httpClient:{serverAddress:e.serverAddress||null,["route"===e.routeType?"templatedPath":"templatedPathPrefix"]:e.route||null,method:e.method||null}}:null}function I(e){return"all"===e.operationType?null:"httpServer"===e.operationType?b(e):"kafkaConsumer"===e.operationType?{kafkaConsumer:{kafkaTopic:e.kafkaTopic||null}}:"kafkaProducer"===e.operationType?{kafkaProducer:{kafkaTopic:e.kafkaTopic||null}}:null}function M(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:A(e),percentageAtMost:R(e),operation:D(e)}}function C(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:A(e),error:e.keepErrors,durationAtLeastMs:"Duration"===e.ruleType?P(e):null,percentageAtLeast:R(e),operation:I(e)}}function $(e){return{ruleId:"",name:e.name||null,disabled:!1,notes:e.notes||null,sourceScopes:A(e),percentageAtMost:R(e)??0,operation:I(e)}}function E(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:S(e),operation:D(e),percentageAtMost:R(e),notes:e.notes||null}}function w(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:S(e),error:"Error"===e.ruleType,durationAtLeastMs:"Duration"===e.ruleType?P(e):null,operation:I(e),percentageAtLeast:R(e),notes:e.notes||null}}function L(e){return{name:e.name||null,disabled:e.disabled,sourceScopes:S(e),operation:I(e),percentageAtMost:R(e)??0,notes:e.notes||null}}const N=["5000","1000","500","100","50"],O=["50","25","10","1","0.5","0.1","0"];function H(e){if(null==e)return{percentageMode:"all",percentagePreset:"0",customPercentage:""};const t=O.find(t=>Number(t)===e);return t?{percentageMode:"sample",percentagePreset:t,customPercentage:""}:{percentageMode:"sample",percentagePreset:"custom",customPercentage:String(e)}}function K(e){if(!e)return{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""};const t=e;return t.httpServer?{operationType:"httpServer",routeType:t.httpServer.routePrefix?"routePrefix":"route",route:t.httpServer.route||t.httpServer.routePrefix||"",serverAddress:"",method:t.httpServer.method||"",kafkaTopic:""}: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 j(e){const t=T(),r=x(e.rule.sourceScopes),n=(e=>"highlyRelevant"!==e.category?"Relevance":e.rule.error?"Error":null!=e.rule.durationAtLeastMs?"Duration":"Relevance")(e);let o,a,s={durationPreset:"500",customDurationMs:""},i=!1;switch(e.category){case"noisy":o=(e=>{const t=e.rule.operation;return t?t.httpServer?{operationType:"httpServer",routeType:t.httpServer.routePrefix?"routePrefix":"route",route:t.httpServer.route||t.httpServer.routePrefix||"",serverAddress:"",method:t.httpServer.method||"",kafkaTopic:""}:t.httpClient?{operationType:"httpClient",routeType:t.httpClient.templatedPathPrefix?"routePrefix":"route",route:t.httpClient.templatedPath||t.httpClient.templatedPathPrefix||"",serverAddress:t.httpClient.serverAddress||"",method:t.httpClient.method||"",kafkaTopic:""}:{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""}:{operationType:"all",routeType:"route",route:"",serverAddress:"",method:"",kafkaTopic:""}})(e),a=k(u=e.rule.percentageAtMost)?{percentageMode:"all",percentagePreset:"0",customPercentage:""}:H(u);break;case"highlyRelevant":o=K(e.rule.operation),a=H(e.rule.percentageAtLeast),s=(e=>{if(null==e)return{durationPreset:"500",customDurationMs:""};const t=N.find(t=>Number(t)===e);return t?{durationPreset:t,customDurationMs:""}:{durationPreset:"custom",customDurationMs:String(e)}})(e.rule.durationAtLeastMs),i=e.rule.error;break;case"costReduction":o=K(e.rule.operation),a=H(e.rule.percentageAtMost)}var u;return{...t,name:e.rule.name||"",notes:e.rule.notes||"",disabled:e.rule.disabled,ruleType:n,sourceScopes:r,...o,...s,keepErrors:i,...a}}const z=s({platformType:c.K8s,tier:l.Community,version:"v0.0.0"}),F=({children:t,platformType:r,tier:n,version:a})=>{const s=o(()=>({platformType:r,tier:n,version:a}),[r,n,a]);return e(z.Provider,{value:s,children:t})},J=(e,t)=>null==e?0:"number"==typeof e||"string"==typeof e?e:t?e[t]??0:0,V=(e,t,r)=>{const n=J(t,r);return!n||u(e)>=u(n)},B=e=>{const t=a(z),r=J(e,t.platformType),n=V(t.version,r),o=t.platformType===c.K8s,s=t.platformType===c.Vm,i=t.platformType===c.Connector,u=t.platformType===c.AwsEcs;return{...t,isVersionSupported:n,minSupportedVersion:r,isK8s:o,isVm:s,isConnector:i,isAwsEcs:u,isEnterprise:t.tier===l.Onprem}};var W;(e=>{e.Noisy="noisy",e.HighlyRelevant="highly-relevant",e.CostReduction="cost-reduction"})(W||(W={}));const _=[{value:W.Noisy,label:"1. Noisy Operations",tooltip:"Rules that reduce noise from high-volume, low-value operations"},{value:W.HighlyRelevant,label:"2. Highly Relevant Operations",tooltip:"Rules that prioritize important traces for retention"},{value:W.CostReduction,label:"3. Cost Reduction",tooltip:"Rules that optimize costs by sampling less critical data"}],q={[W.Noisy]:"This is the most efficient way to sample (with Head Sampling). Prefer to use it where possible.",[W.HighlyRelevant]:'Any trace from the "Noisy Operations" category is sampled prior to checking highly relevance.',[W.CostReduction]:"Cost reduction rules use Tail Sampling to drop traces that are unlikely to be useful for debugging or monitoring."},G={[W.Noisy]:"Noisy Operations rules list",[W.HighlyRelevant]:"Highly Relevant Operations rules list",[W.CostReduction]:"Cost Reduction rules list"},Q={[W.Noisy]:"noisy",[W.HighlyRelevant]:"highlyRelevant",[W.CostReduction]:"costReduction"},U={noisy:W.Noisy,highlyRelevant:W.HighlyRelevant,costReduction:W.CostReduction};function X(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 Y(e){return`any service in namespace '${e}'`}function Z(e){return`${e} services`}function ee(e,t="global"){const r=(e=>{if(!e)return[];const t=[];for(const r of e.sources??[]){const e=X(r);e&&t.push(e)}for(const r of e.namespaces??[])r&&t.push(Y(r));for(const r of e.languages??[])r&&t.push(Z(r));return t})(e);if(!r.length)return"source"===t?[]:[{text:" in ",variant:d.Default},{text:"any service in the cluster",variant:d.Scope}];const n=[{text:" in ",variant:d.Default}],o=r.slice(0,2),a=r.slice(2);return o.forEach((e,t)=>{t>0&&n.push({text:", ",variant:d.Default}),n.push({text:e,variant:d.Scope})}),a.length>0&&n.push({text:` + ${a.length} more`,variant:d.Default,tooltipItems:a}),n}function te(e,t){const r=(n=e).startsWith("/")?n.slice(1):n;var n;return t?`${t} /${r}`:`/${r}`}function re(e){const t=e.method;return e.route?[{text:" for server endpoint ",variant:d.Default},{text:te(e.route,t),variant:d.Endpoint}]:e.routePrefix?[{text:" for endpoints under ",variant:d.Default},{text:te(e.routePrefix,t),variant:d.Endpoint}]:[]}function ne(e,t="global"){const r=[];if(k(e.percentageAtMost)?r.push({text:"Drop all traces",variant:d.Action}):(r.push({text:`Keep at most ${e.percentageAtMost}%`,variant:d.Action}),r.push({text:" of traces",variant:d.Default})),e.operation){const t=e.operation.httpServer,n=t?(e=>{const t=e.method;return e.route?[{text:" where the root span is ",variant:d.Default},{text:te(e.route,t),variant:d.Endpoint}]:e.routePrefix?[{text:" where the root span is under ",variant:d.Default},{text:te(e.routePrefix,t),variant:d.Endpoint}]:[]})(t):[];n.length>0&&r.push(...n);const o=e.operation.httpClient,a=o?.templatedPath||o?.templatedPathPrefix,s=o?.serverAddress;if((a||s)&&0===n.length){const e=o?.method;if(r.push({text:" to ",variant:d.Default}),a){const t=te(a,e);s&&(r.push({text:"server address ",variant:d.Default}),r.push({text:s,variant:d.Endpoint}),r.push({text:" ",variant:d.Default})),r.push({text:t,variant:d.Endpoint})}else s&&(r.push({text:"server address ",variant:d.Default}),r.push({text:s,variant:d.Endpoint}))}}else r.push({text:" on ",variant:d.Default}),r.push({text:"any operation",variant:d.Endpoint});return r.push(...ee(e.sourceScopes,t)),r}function oe(e,t="global"){const r=[];if(null!=e.percentageAtLeast?(r.push({text:`Keep ${e.percentageAtLeast}%`,variant:d.Action}),r.push({text:" of traces",variant:d.Default})):r.push({text:"Keep all traces",variant:d.Action}),e.operation){const t=e.operation.httpServer;t&&r.push(...re(t))}else r.push({text:" on ",variant:d.Default}),r.push({text:"any operation",variant:d.Endpoint});return r.push(...ee(e.sourceScopes,t)),!e.error&&null!=e.durationAtLeastMs&&e.durationAtLeastMs>0&&(r.push({text:" with duration > ",variant:d.Default}),r.push({text:`${e.durationAtLeastMs}ms`,variant:d.Duration})),r}function ae(e,t="global"){const r=[];if(r.push({text:`Keep at most ${e.percentageAtMost}%`,variant:d.Action}),r.push({text:" of traces",variant:d.Default}),e.operation){const t=e.operation.httpServer,n=t?re(t):[];n.length>0&&r.push(...n);const o=e.operation.kafkaConsumer?.kafkaTopic;o&&0===n.length&&(r.push({text:" from ",variant:d.Default}),r.push({text:`topic '${o}'`,variant:d.Endpoint}))}else r.push({text:" on ",variant:d.Default}),r.push({text:"any operation",variant:d.Endpoint});return r.push(...ee(e.sourceScopes,t)),r}function se(e){return e.error?"Error":null!=e.durationAtLeastMs?"Duration":"Relevance"}function ie(e,t,r){const n=Q[t],o=[];for(const a of e)switch(t){case W.Noisy:for(const e of a.noisyOperations)r?.has(e.ruleId)||o.push({ruleId:e.ruleId,samplingId:a.id,name:e.name??null,disabled:e.disabled,notes:e.notes??null,summary:ne(e),category:n});break;case W.HighlyRelevant:for(const e of a.highlyRelevantOperations)r?.has(e.ruleId)||o.push({ruleId:e.ruleId,samplingId:a.id,name:e.name??null,disabled:e.disabled,notes:e.notes??null,summary:oe(e),category:n,typeBadge:se(e)});break;case W.CostReduction:for(const e of a.costReductionRules)r?.has(e.ruleId)||o.push({ruleId:e.ruleId,samplingId:a.id,name:e.name??null,disabled:e.disabled,notes:e.notes??null,summary:ae(e),category:n})}return o}function ue(e,t){switch(e){case"noisy":return ne(t);case"highlyRelevant":return oe(t);case"costReduction":return ae(t)}}function le(e,t,r,n){for(const o of e)if(o.id===t)switch(n){case"noisy":{const e=o.noisyOperations.find(e=>e.ruleId===r);if(e)return{category:"noisy",samplingId:o.id,rule:e};break}case"highlyRelevant":{const e=o.highlyRelevantOperations.find(e=>e.ruleId===r);if(e)return{category:"highlyRelevant",samplingId:o.id,rule:e};break}case"costReduction":{const e=o.costReductionRules.find(e=>e.ruleId===r);if(e)return{category:"costReduction",samplingId:o.id,rule:e};break}}return null}function ce(e,t){const r=le(e,t.samplingId,t.rule.ruleId,t.category);return r?{...r,summary:ue(r.category,r.rule)}:null}function pe(e,t){const r=le(e,t.samplingId,t.ruleId,t.category);return r?{...r,summary:ue(r.category,r.rule)}:null}function de(e,t,r){for(const n of e){const o=le(e,n.id,t,r);if(o)return{...o,summary:ue(o.category,o.rule)}}return null}function fe(e){if(!e)return null;const t=(e.sources??[]).map(e=>`${e.namespace}/${e.kind}/${e.name}`).sort(),r=(e.namespaces??[]).slice().sort(),n=(e.languages??[]).slice().sort();return t.length||r.length||n.length?[t.join("|"),r.join("|"),n.join("|")].join("::"):null}function he(e){return null==e?null:e}function me(e,t){return JSON.stringify({sourceScopes:fe(e),operation:he(t)})}function ve(e,t,r,n){return JSON.stringify({sourceScopes:fe(e),error:t??!1,durationAtLeastMs:(o=r,null==o?null:o),operation:he(n)});var o}function ge(e,t){return JSON.stringify({sourceScopes:fe(e),operation:he(t)})}function ye(e,t,r,n){switch(t){case"noisy":{const t=me(r.sourceScopes,r.operation);for(const r of e)for(const e of r.noisyOperations)if((!n||e.ruleId!==n)&&me(e.sourceScopes,e.operation)===t)return e.ruleId;return null}case"highlyRelevant":{const t=ve(r.sourceScopes,r.error,r.durationAtLeastMs,r.operation);for(const r of e)for(const e of r.highlyRelevantOperations)if((!n||e.ruleId!==n)&&ve(e.sourceScopes,e.error,e.durationAtLeastMs,e.operation)===t)return e.ruleId;return null}case"costReduction":{const t=ge(r.sourceScopes,r.operation);for(const r of e)for(const e of r.costReductionRules)if((!n||e.ruleId!==n)&&ge(e.sourceScopes,e.operation)===t)return e.ruleId;return null}}}function xe(e){return e&&e.enabled?[{text:`Keep ${e.keepPercentage??0}%`,variant:d.Action},{text:" of ",variant:d.Default},{text:"traces for kubelet health probes in the entire cluster",variant:d.Scope}]:[{text:"Auto rule is ",variant:d.Default},{text:"disabled",variant:d.Action}]}function ke(e){return!0===e.error&&y(e.sourceScopes)&&!e.operation&&(null==e.percentageAtLeast||100===e.percentageAtLeast)}function Te(e){for(const t of e){const e=t.highlyRelevantOperations.find(ke);if(e)return{rule:e,samplingId:t.id}}return null}function Ae(e){return!e||e.disabled?[{text:"Auto rule is ",variant:d.Default},{text:"disabled",variant:d.Action}]:[{text:"Keep all traces",variant:d.Action},{text:" of ",variant:d.Default},{text:"error traces across the entire cluster",variant:d.Scope}]}function Se(e){return y(e.sourceScopes)&&!e.operation}function Re(e){for(const t of e){const e=t.costReductionRules.find(Se);if(e)return{rule:e,samplingId:t.id}}return null}function Pe(e){return!e||e.disabled?[{text:" is ",variant:d.Default},{text:"disabled",variant:d.Action}]:[{text:`Keep at most ${e.percentageAtMost}%`,variant:d.Action},{text:" of ",variant:d.Default},{text:"traces across the entire cluster",variant:d.Scope}]}export{w as A,E as B,v as C,pe as D,ue as E,Q as F,ye as G,_ as H,q as I,G as J,F as O,U as R,W as S,d as a,ee as b,V as c,k as d,ae as e,oe as f,ne as g,$ as h,y as i,C as j,M as k,Ae as l,g as m,x as n,Pe as o,xe as p,T as q,J as r,de as s,Te as t,B as u,j as v,Re as w,ce as x,ie as y,L as z};
@@ -1,4 +1,4 @@
1
- import{jsx as e,jsxs as a,Fragment as t}from"react/jsx-runtime";import l,{css as r,useTheme as n}from"styled-components";import{D as i,c as o,F as s,d as c,e as d,f as p,g as u,h,B as g,i as m,j as v,k as b,W as f,u as y,M as x,I as C,l as k,N as $,m as S,C as w,n as T,o as M,V as A,p as O,q as L,r as P,s as E,v as I,w as N,x as R,y as V,z,E as D,G as X,H,J as _,K as B,L as j,S as q,O as K,Q as U,U as G,X as F,Y as W,Z as J,_ as Y,$ as Z,a0 as Q,a1 as ee,a2 as ae,a3 as te,a4 as le,a5 as re,a6 as ne,a7 as ie,a8 as oe,a9 as se,aa as ce,T as de,ab as pe,ac as ue,ad as he,ae as ge,af as me,ag as ve,ah as be,ai as fe,aj as ye,ak as xe,al as Ce,am as ke,an as $e,b as Se,ao as we,ap as Te,aq as Me,ar as Ae,as as Oe,at as Le,au as Pe,av as Ee,aw as Ie,ax as Ne,ay as Re,az as Ve,aA as ze,aB as De,aC as Xe,aD as He,aE as _e,aF as Be,aG as je,aH as qe,aI as Ke,aJ as Ue,aK as Ge,aL as Fe,aM as We,aN as Je,aO as Ye,aP as Ze,aQ as Qe,aR as ea,aS as aa,aT as ta,aU as la,aV as ra,aW as na,aX as ia,aY as oa,aZ as sa,a_ as ca,a$ as da,b0 as pa,b1 as ua,b2 as ha,b3 as ga,b4 as ma,b5 as va,b6 as ba,b7 as fa,R as ya,b8 as xa,A as Ca,b9 as ka}from"./ui-components-DqG0z5U0.js";import{XIcon as $a,VIcon as Sa,TrashIcon as wa,PlusIcon as Ta,VSquareIcon as Ma,XSquareIcon as Aa,EditIcon as Oa,OdigosLogoTextCentral as La,OdigosLogoTextEnterprise as Pa,OdigosLogoTextCommunity as Ea,OdigosLogoTextColoredCentral as Ia,OdigosLogoTextColoredEnterprise as Na,OdigosLogoTextColoredCommunity as Ra,ArrowLeftIcon as Va,ArrowRightIcon as za,CopyIcon as Da,YamlIcon as Xa}from"../icons.js";import Ha,{useMemo as _a,useRef as Ba,useCallback as ja,useState as qa,useEffect as Ka,Fragment as Ua,forwardRef as Ga,useImperativeHandle as Fa}from"react";import{i as Wa,m as Ja,u as Ya,n as Za,a as Qa,C as et,b as at,d as tt,e as lt,f as rt,g as nt,h as it,j as ot,k as st}from"./helpers-B0SJ6hqm.js";const ct=/^[a-zA-Z]$/,dt=new Set(["*","+","?"]),pt=new Set(["^","$"]),ut={group:"rgba(102, 242, 102, 0.5)","anchor-quantifier":"rgba(102, 191, 255, 0.5)","class-bracket":"rgba(255, 153, 153, 0.5)","class-content":"rgba(178, 1, 1, 0.5)",alternation:"rgba(255, 153, 153, 0.5)",literal:"transparent"},ht=l.div`
1
+ import{jsx as e,jsxs as a,Fragment as t}from"react/jsx-runtime";import l,{css as r,useTheme as n}from"styled-components";import{D as i,c as o,F as s,d as c,e as d,f as p,g as u,h,B as g,i as m,j as v,k as b,W as f,u as y,M as x,I as C,l as k,N as $,m as S,C as w,n as T,o as M,V as A,p as P,q as O,r as L,s as E,v as I,w as R,x as N,y as V,z as D,E as z,G as _,H as X,J as H,K as B,L as j,S as q,O as U,Q as G,U as K,X as F,Y as W,Z as J,_ as Y,$ as Z,a0 as Q,a1 as ee,a2 as ae,a3 as te,a4 as le,a5 as re,a6 as ne,a7 as ie,a8 as oe,a9 as se,aa as ce,T as de,ab as pe,ac as ue,ad as he,ae as ge,af as me,ag as ve,ah as be,ai as fe,aj as ye,ak as xe,al as Ce,am as ke,an as $e,b as Se,ao as we,ap as Te,aq as Me,ar as Ae,as as Pe,at as Oe,au as Le,av as Ee,aw as Ie,ax as Re,ay as Ne,az as Ve,aA as De,aB as ze,aC as _e,aD as Xe,aE as He,aF as Be,aG as je,aH as qe,aI as Ue,aJ as Ge,aK as Ke,aL as Fe,aM as We,aN as Je,aO as Ye,aP as Ze,aQ as Qe,aR as ea,aS as aa,aT as ta,aU as la,aV as ra,aW as na,aX as ia,aY as oa,aZ as sa,a_ as ca,a$ as da,b0 as pa,b1 as ua,b2 as ha,b3 as ga,b4 as ma,b5 as va,b6 as ba,b7 as fa,R as ya,b8 as xa,A as Ca,b9 as ka}from"./ui-components-CjgsN17j.js";import{XIcon as $a,VIcon as Sa,TrashIcon as wa,PlusIcon as Ta,VSquareIcon as Ma,XSquareIcon as Aa,EditIcon as Pa,OdigosLogoTextCentral as Oa,OdigosLogoTextEnterprise as La,OdigosLogoTextCommunity as Ea,OdigosLogoTextColoredCentral as Ia,OdigosLogoTextColoredEnterprise as Ra,OdigosLogoTextColoredCommunity as Na,ArrowLeftIcon as Va,ArrowRightIcon as Da,CopyIcon as za,YamlIcon as _a}from"../icons.js";import Xa,{useMemo as Ha,useRef as Ba,useCallback as ja,useState as qa,useEffect as Ua,Fragment as Ga,forwardRef as Ka,useImperativeHandle as Fa}from"react";import{i as Wa,m as Ja,u as Ya,n as Za,a as Qa,C as et,b as at,d as tt,e as lt,f as rt,g as nt,h as it,j as ot,k as st}from"./helpers-CtkwQ3Wc.js";const ct=/^[a-zA-Z]$/,dt=new Set(["*","+","?"]),pt=new Set(["^","$"]),ut={group:"rgba(102, 242, 102, 0.5)","anchor-quantifier":"rgba(102, 191, 255, 0.5)","class-bracket":"rgba(255, 153, 153, 0.5)","class-content":"rgba(178, 1, 1, 0.5)",alternation:"rgba(255, 153, 153, 0.5)",literal:"transparent"},ht=l.div`
2
2
  padding: 8px 16px;
3
3
  border-radius: 6px;
4
4
  border: 1px solid ${({theme:e})=>e.v2.colors.silver[500]};
@@ -20,7 +20,7 @@ import{jsx as e,jsxs as a,Fragment as t}from"react/jsx-runtime";import l,{css as
20
20
  }
21
21
  `,gt=l.span`
22
22
  background: ${({$kind:e})=>ut[e]};
23
- `,mt=({pattern:a,"data-id":t})=>{const l=_a(()=>(e=>{const a=[];let t=0,l=!1;const r=(e,t)=>{const l=a[a.length-1];l&&l.kind===t?l.text+=e:a.push({text:e,kind:t})};for(;t<e.length;){const a=e[t];if(l){if("]"===a){r("]","class-bracket"),l=!1,t++;continue}if("\\"===a&&t+1<e.length){r(e.slice(t,t+2),"class-content"),t+=2;continue}r(a,"class-content"),t++}else{if("("===a&&"?"===e[t+1]){let a=2;const l=e[t+2];if(":"===l||"="===l||"!"===l)a=3;else if("<"===l){const l=e[t+3];if("="===l||"!"===l)a=4;else{const l=e.indexOf(">",t+2);-1!==l&&(a=l-t+1)}}r(e.slice(t,t+a),"group"),t+=a;continue}if("("!==a&&")"!==a)if("["!==a)if(dt.has(a)||pt.has(a))r(a,"anchor-quantifier"),t++;else{if("{"===a){const a=e.indexOf("}",t);if(a>t&&/^\{\d+,?\d*\}$/.test(e.slice(t,a+1))){r(e.slice(t,a+1),"anchor-quantifier"),t=a+1;continue}}if("\\"===a&&t+1<e.length){const a=e[t+1];ct.test(a)?r(e.slice(t,t+2),"anchor-quantifier"):r(e.slice(t,t+2),"literal"),t+=2;continue}"|"!==a?(r(a,"literal"),t++):(r("|","alternation"),t++)}else"^"===e[t+1]?(r("[^","class-bracket"),t+=2):(r("[","class-bracket"),t++),l=!0;else r(a,"group"),t++}}return a})(a),[a]);return e(ht,a?{"data-id":t,children:l.map((a,t)=>e(gt,{$kind:a.kind,children:a.text},t))}:{"data-id":t,children:" "})},vt="rgba(102, 191, 255, 0.5)",bt=r`
23
+ `,mt=({pattern:a,"data-id":t})=>{const l=Ha(()=>(e=>{const a=[];let t=0,l=!1;const r=(e,t)=>{const l=a[a.length-1];l&&l.kind===t?l.text+=e:a.push({text:e,kind:t})};for(;t<e.length;){const a=e[t];if(l){if("]"===a){r("]","class-bracket"),l=!1,t++;continue}if("\\"===a&&t+1<e.length){r(e.slice(t,t+2),"class-content"),t+=2;continue}r(a,"class-content"),t++}else{if("("===a&&"?"===e[t+1]){let a=2;const l=e[t+2];if(":"===l||"="===l||"!"===l)a=3;else if("<"===l){const l=e[t+3];if("="===l||"!"===l)a=4;else{const l=e.indexOf(">",t+2);-1!==l&&(a=l-t+1)}}r(e.slice(t,t+a),"group"),t+=a;continue}if("("!==a&&")"!==a)if("["!==a)if(dt.has(a)||pt.has(a))r(a,"anchor-quantifier"),t++;else{if("{"===a){const a=e.indexOf("}",t);if(a>t&&/^\{\d+,?\d*\}$/.test(e.slice(t,a+1))){r(e.slice(t,a+1),"anchor-quantifier"),t=a+1;continue}}if("\\"===a&&t+1<e.length){const a=e[t+1];ct.test(a)?r(e.slice(t,t+2),"anchor-quantifier"):r(e.slice(t,t+2),"literal"),t+=2;continue}"|"!==a?(r(a,"literal"),t++):(r("|","alternation"),t++)}else"^"===e[t+1]?(r("[^","class-bracket"),t+=2):(r("[","class-bracket"),t++),l=!0;else r(a,"group"),t++}}return a})(a),[a]);return e(ht,a?{"data-id":t,children:l.map((a,t)=>e(gt,{$kind:a.kind,children:a.text},t))}:{"data-id":t,children:" "})},vt="rgba(102, 191, 255, 0.5)",bt=r`
24
24
  font-family: ${({theme:e})=>e.font_family.code};
25
25
  font-size: 12px;
26
26
  line-height: 20px;
@@ -78,7 +78,7 @@ import{jsx as e,jsxs as a,Fragment as t}from"react/jsx-runtime";import l,{css as
78
78
  &::placeholder {
79
79
  color: ${({theme:e})=>e.v2.colors.silver[600]};
80
80
  }
81
- `,Ct=e=>({before:e,matchPre:"",capture:"",matchPost:"",after:""}),kt=({regex:t,value:l,onChange:r,minHeight:n=240,...i})=>{const o=Ba(null),s=Ba(null),c=_a(()=>((e,a)=>{if(!e||!a)return Ct(a);let t;try{t=new RegExp(e)}catch{return Ct(a)}const l=t.exec(a);if(!l)return Ct(a);const r=l.index,n=l.index+l[0].length;if(l.length<2||null==l[1])return{before:a.slice(0,r),matchPre:"",capture:a.slice(r,n),matchPost:"",after:a.slice(n)};const i=l[0].indexOf(l[1]),o=i>=0?r+i:r,s=o+l[1].length;return{before:a.slice(0,r),matchPre:a.slice(r,o),capture:a.slice(o,s),matchPost:a.slice(s,n),after:a.slice(n)}})(t,l),[t,l]),d=ja(()=>{o.current&&s.current&&(o.current.scrollTop=s.current.scrollTop,o.current.scrollLeft=s.current.scrollLeft)},[]);return a(ft,{$minHeight:n,children:[a(yt,{ref:o,"aria-hidden":!0,children:[c.before,e("span",{style:{background:vt},children:c.matchPre}),e("span",{style:{background:"rgba(102, 242, 102, 0.5)"},children:c.capture}),e("span",{style:{background:vt},children:c.matchPost}),c.after,l.endsWith("\n")?" ":""]}),e(xt,{ref:s,$minHeight:n,value:l,onChange:e=>r(e.target.value),onScroll:d,spellCheck:!1,...i})]})},$t=l.div`
81
+ `,Ct=e=>({before:e,matchPre:"",capture:"",matchPost:"",after:""}),kt=({regex:t,value:l,onChange:r,minHeight:n=240,...i})=>{const o=Ba(null),s=Ba(null),c=Ha(()=>((e,a)=>{if(!e||!a)return Ct(a);let t;try{t=new RegExp(e)}catch{return Ct(a)}const l=t.exec(a);if(!l)return Ct(a);const r=l.index,n=l.index+l[0].length;if(l.length<2||null==l[1])return{before:a.slice(0,r),matchPre:"",capture:a.slice(r,n),matchPost:"",after:a.slice(n)};const i=l[0].indexOf(l[1]),o=i>=0?r+i:r,s=o+l[1].length;return{before:a.slice(0,r),matchPre:a.slice(r,o),capture:a.slice(o,s),matchPost:a.slice(s,n),after:a.slice(n)}})(t,l),[t,l]),d=ja(()=>{o.current&&s.current&&(o.current.scrollTop=s.current.scrollTop,o.current.scrollLeft=s.current.scrollLeft)},[]);return a(ft,{$minHeight:n,children:[a(yt,{ref:o,"aria-hidden":!0,children:[c.before,e("span",{style:{background:vt},children:c.matchPre}),e("span",{style:{background:"rgba(102, 242, 102, 0.5)"},children:c.capture}),e("span",{style:{background:vt},children:c.matchPost}),c.after,l.endsWith("\n")?" ":""]}),e(xt,{ref:s,$minHeight:n,value:l,onChange:e=>r(e.target.value),onScroll:d,spellCheck:!1,...i})]})},$t=l.div`
82
82
  flex: 1;
83
83
  min-height: 0;
84
84
  overflow-y: auto;
@@ -100,7 +100,7 @@ import{jsx as e,jsxs as a,Fragment as t}from"react/jsx-runtime";import l,{css as
100
100
  word-break: break-all;
101
101
  white-space: pre-wrap;
102
102
  user-select: text;
103
- `,Tt=({isOpen:t,regex:l,onClose:r,initialTestString:n=""})=>{const[f,y]=qa(n),x=_a(()=>((e,a)=>{if(!e)return{ok:!0,isMatch:!1,message:o.RESULT_EMPTY_REGEX};if(!a)return{ok:!0,isMatch:!1,message:o.RESULT_EMPTY_INPUT};let t;try{t=new RegExp(e)}catch(e){return{ok:!1,message:e instanceof Error?e.message:o.RESULT_INVALID_REGEX_FALLBACK}}const l=t.exec(a);return l?{ok:!0,isMatch:!0,message:l.length>1?l[1]:l[0]}:{ok:!0,isMatch:!1,message:o.RESULT_NO_MATCH}})(l,f),[l,f]),C=x.ok?x.isMatch?"match":"neutral":"error";return e(i,{isOpen:t,header:{title:o.TITLE,onClose:()=>{y(""),r()}},children:e($t,{children:a(St,{children:[a(s,{$gap:6,children:[e(c,{label:o.REGEX_LABEL}),e(mt,{pattern:l,"data-id":"regex-tester-regex"}),!l&&e(d,{size:u.XXS,color:p.Secondary,children:o.REGEX_EMPTY_HINT})]}),a(s,{$gap:6,children:[a(h,{$width:"100%",$justifyContent:"space-between",$alignItems:"center",children:[e(c,{label:o.TEST_STRING_LABEL}),e(g,{"data-id":"regex-tester-unescape",label:o.UNESCAPE_LABEL,tooltip:o.UNESCAPE_TOOLTIP,variant:v.Secondary,size:m.S,onClick:()=>y(e=>(e=>{let a="";for(let t=0;t<e.length;t++){if("\\"===e[t]&&t+1<e.length){const l=e[t+1],r="n"===l?"\n":"t"===l?"\t":"r"===l?"\r":'"'===l?'"':"'"===l?"'":"\\"===l?"\\":null;if(null!=r){a+=r,t++;continue}}a+=e[t]}return a})(e)),disabled:(k=f,!/\\["'\\nrt]/.test(k))})]}),e(kt,{name:"regex-tester-test-string","data-id":"regex-tester-test-string",placeholder:o.TEST_STRING_PLACEHOLDER,regex:l,value:f,onChange:y,minHeight:240}),e(b,{helpMessage:o.TEST_STRING_HELP})]}),a(s,{$gap:8,children:[e(c,{label:o.RESULT_LABEL}),e(wt,{$tone:C,"data-id":"regex-tester-result",children:x.message}),x.ok&&x.isMatch&&e(d,{size:u.XXS,color:p.Secondary,children:o.RESULT_CAPTURE_HINT})]})]})})});var k},Mt=l.div`
103
+ `,Tt=({isOpen:t,regex:l,onClose:r,initialTestString:n=""})=>{const[f,y]=qa(n),x=Ha(()=>((e,a)=>{if(!e)return{ok:!0,isMatch:!1,message:o.RESULT_EMPTY_REGEX};if(!a)return{ok:!0,isMatch:!1,message:o.RESULT_EMPTY_INPUT};let t;try{t=new RegExp(e)}catch(e){return{ok:!1,message:e instanceof Error?e.message:o.RESULT_INVALID_REGEX_FALLBACK}}const l=t.exec(a);return l?{ok:!0,isMatch:!0,message:l.length>1?l[1]:l[0]}:{ok:!0,isMatch:!1,message:o.RESULT_NO_MATCH}})(l,f),[l,f]),C=x.ok?x.isMatch?"match":"neutral":"error";return e(i,{isOpen:t,header:{title:o.TITLE,onClose:()=>{y(""),r()}},children:e($t,{children:a(St,{children:[a(s,{$gap:6,children:[e(c,{label:o.REGEX_LABEL}),e(mt,{pattern:l,"data-id":"regex-tester-regex"}),!l&&e(d,{size:u.XXS,color:p.Secondary,children:o.REGEX_EMPTY_HINT})]}),a(s,{$gap:6,children:[a(h,{$width:"100%",$justifyContent:"space-between",$alignItems:"center",children:[e(c,{label:o.TEST_STRING_LABEL}),e(g,{"data-id":"regex-tester-unescape",label:o.UNESCAPE_LABEL,tooltip:o.UNESCAPE_TOOLTIP,variant:v.Secondary,size:m.S,onClick:()=>y(e=>(e=>{let a="";for(let t=0;t<e.length;t++){if("\\"===e[t]&&t+1<e.length){const l=e[t+1],r="n"===l?"\n":"t"===l?"\t":"r"===l?"\r":'"'===l?'"':"'"===l?"'":"\\"===l?"\\":null;if(null!=r){a+=r,t++;continue}}a+=e[t]}return a})(e)),disabled:(k=f,!/\\["'\\nrt]/.test(k))})]}),e(kt,{name:"regex-tester-test-string","data-id":"regex-tester-test-string",placeholder:o.TEST_STRING_PLACEHOLDER,regex:l,value:f,onChange:y,minHeight:240}),e(b,{helpMessage:o.TEST_STRING_HELP})]}),a(s,{$gap:8,children:[e(c,{label:o.RESULT_LABEL}),e(wt,{$tone:C,"data-id":"regex-tester-result",children:x.message}),x.ok&&x.isMatch&&e(d,{size:u.XXS,color:p.Secondary,children:o.RESULT_CAPTURE_HINT})]})]})})});var k},Mt=l.div`
104
104
  display: grid;
105
105
  grid-template-rows: ${({$open:e})=>e?"1fr":"0fr"};
106
106
  opacity: ${({$open:e})=>e?1:0};
@@ -115,7 +115,7 @@ import{jsx as e,jsxs as a,Fragment as t}from"react/jsx-runtime";import l,{css as
115
115
  overflow: hidden;
116
116
  min-height: 0;
117
117
  }
118
- `,At=({open:a,children:t,delayInMs:l=0,gapCancelPx:r=0})=>e(Mt,{$open:a,$delayInMs:l,$gapCancelPx:r,"aria-hidden":!a,children:e("div",{className:"animated-collapse-inner",children:t})}),Ot=({isOpen:a,onClose:t,onDeny:l,onApprove:r})=>e(f,{title:"Discard changes?",description:"You have unsaved changes.\nIf you cancel now, your changes won't be saved.",isOpen:a,onClose:t,denyButton:{label:"Keep editing",variant:v.Secondary,onClick:()=>{l?.(),t()}},approveButton:{label:"Discard changes",variant:v.Primary,onClick:()=>{r?.(),t()}}}),Lt=l.div`
118
+ `,At=({open:a,children:t,delayInMs:l=0,gapCancelPx:r=0})=>e(Mt,{$open:a,$delayInMs:l,$gapCancelPx:r,"aria-hidden":!a,children:e("div",{className:"animated-collapse-inner",children:t})}),Pt=({isOpen:a,onClose:t,onDeny:l,onApprove:r})=>e(f,{title:"Discard changes?",description:"You have unsaved changes.\nIf you cancel now, your changes won't be saved.",isOpen:a,onClose:t,denyButton:{label:"Keep editing",variant:v.Secondary,onClick:()=>{l?.(),t()}},approveButton:{label:"Discard changes",variant:v.Primary,onClick:()=>{r?.(),t()}}}),Ot=l.div`
119
119
  display: flex;
120
120
  flex-direction: column;
121
121
  gap: 12px;
@@ -123,16 +123,16 @@ import{jsx as e,jsxs as a,Fragment as t}from"react/jsx-runtime";import l,{css as
123
123
  height: 70vh;
124
124
  padding: 12px;
125
125
  overflow: auto;
126
- `,Pt=l.div`
126
+ `,Lt=l.div`
127
127
  display: flex;
128
128
  align-items: center;
129
129
  justify-content: space-between;
130
130
  width: 100%;
131
- `,Et=({isOpen:t,onClose:l,language:r,code:n,...i})=>{const{CopyButton:o}=y();return e(x,{isOpen:t,onClose:l,children:a(Lt,{children:[a(Pt,{children:[e(d,{size:u.XS,children:"JSON view"}),e(C,{icon:a=>e($a,{...a}),size:k.L,onClick:l})]}),r&&n?e(S,{fullHeight:!0,overflow:"auto",children:a(h,{$width:"100%",$alignItems:"flex-start",$justifyContent:"space-between",children:[e(w,{language:r,code:n,...i}),e(o,{value:n})]})}):e($,{})]})})},It=({isOpen:a,onClose:t,onViewConnector:l})=>e(f,{isOpen:a,onClose:t,visual:()=>e(A,{scale:1.2,icon:Sa}),title:M.CLOUD_CONNECTOR_CREATED_MODAL_TITLE,description:M.CLOUD_CONNECTOR_CREATED_MODAL_DESC,denyButton:{label:T.STAY_ON_CONNECTIONS,variant:v.Secondary,onClick:t},approveButton:{label:T.GO_TO_CONNECTOR_OVERVIEW,variant:v.Primary,onClick:l??t}}),Nt=({isOpen:a,onClose:t,onDeny:l,onApprove:r,action:n="delete",target:i,description:o,overrideApproveButtonLabel:s,overrideDenyButtonLabel:c})=>{const d=n.charAt(0).toUpperCase()+n.substring(1),p=i?.endsWith("s")?"these":"this";return e(f,{title:`${d}${i?` ${i}`:""}?`,description:o??`Are you sure you want to ${n}${i?` ${p} ${i}`:""}?`,isOpen:a,onClose:t,denyButton:{label:c??"Go back",variant:v.Secondary,onClick:()=>{l?.(),t()}},approveButton:{label:s??d,variant:v.Primary,onClick:()=>{r?.(),t()}}})},Rt=({componentType:a,inputType:t,name:l,label:r,tooltip:n,badge:i,placeholder:o,required:s,disabled:c,value:d,setValue:p,errorMessage:u,warnMessage:h,helpMessage:g,dropdownOptions:m,dropdownNoSearch:v,dropdownNoCheckbox:b,timeUnits:f,timeDefaultUnit:y,toggleSize:x=E.L,keyLabel:C,valueLabel:k})=>{switch(a){case O.Input:return e(H,{name:l,type:t,label:r,tooltip:n,badge:i,placeholder:o,required:s,disabled:c,value:d??"",onChange:e=>{const a=e.target.value;p(t===_.Number?""===a?null:Number(a):a)},errorMessage:u,warnMessage:h,helpMessage:g},l);case O.MultiInput:return e(X,{name:l,label:r,tooltip:n,badge:i,placeholder:o,required:s,disabled:c,values:Array.isArray(d)?d:D(d,[]),setValues:e=>p(e),errorMessage:u,warnMessage:h,helpMessage:g,plain:!0},l);case O.KeyValuePair:return e(z,{name:l,label:r,tooltip:n,badge:i,required:s,disabled:c,limitFieldsPerRow:2,columns:[{keyName:"key",label:C||"Key",placeholder:C||"Key"},{keyName:"value",label:k||"Value",placeholder:k||"Value"}],values:Array.isArray(d)?d:D(d,[]),setValues:e=>p(e),errorMessage:u,warnMessage:h,helpMessage:g},l);case O.TextArea:return e(V,{name:l,label:r,tooltip:n,badge:i,required:s,disabled:c,placeholder:o,value:d??"",onChange:e=>p(e.target.value),errorMessage:u,warnMessage:h,helpMessage:g},l);case O.Dropdown:return e(R,{name:l,label:r,tooltip:n,badge:i,placeholder:o,required:s,disabled:c,withSearch:!v,options:m?.map(e=>({id:e.id||"",label:e.label||"",withCheckbox:!b}))||[],values:d?[String(d)]:[],setValues:e=>p(e[0]),errorMessage:u,warnMessage:h,helpMessage:g},l);case O.Checkbox:return e(N,{name:l,label:r,tooltip:n,badge:i,value:!0===d||"true"===d,onChange:e=>p(e),disabled:c,errorMessage:u,warnMessage:h,helpMessage:g},l);case O.Time:return e(I,{name:l,label:r,tooltip:n,badge:i,placeholder:o,required:s,disabled:c,value:d??"",setValue:e=>p(e),units:f,defaultUnit:y,errorMessage:u,warnMessage:h,helpMessage:g},l);case O.Toggle:return e(L,{name:l,size:x,labelAlign:P.Right,label:r,tooltip:n,badge:i,value:!0===d||"true"===d,onChange:e=>p(e),disabled:c,errorMessage:u,warnMessage:h,helpMessage:g},l);default:return null}},Vt=l.div`
131
+ `,Et=({isOpen:t,onClose:l,language:r,code:n,...i})=>{const{CopyButton:o}=y();return e(x,{isOpen:t,onClose:l,children:a(Ot,{children:[a(Lt,{children:[e(d,{size:u.XS,children:"JSON view"}),e(C,{icon:a=>e($a,{...a}),size:k.L,onClick:l})]}),r&&n?e(S,{fullHeight:!0,overflow:"auto",children:a(h,{$width:"100%",$alignItems:"flex-start",$justifyContent:"space-between",children:[e(w,{language:r,code:n,...i}),e(o,{value:n})]})}):e($,{})]})})},It=({isOpen:a,onClose:t,onViewConnector:l})=>e(f,{isOpen:a,onClose:t,visual:()=>e(A,{scale:1.2,icon:Sa}),title:M.CLOUD_CONNECTOR_CREATED_MODAL_TITLE,description:M.CLOUD_CONNECTOR_CREATED_MODAL_DESC,denyButton:{label:T.STAY_ON_CONNECTIONS,variant:v.Secondary,onClick:t},approveButton:{label:T.GO_TO_CONNECTOR_OVERVIEW,variant:v.Primary,onClick:l??t}}),Rt=({isOpen:a,onClose:t,onDeny:l,onApprove:r,action:n="delete",target:i,description:o,overrideApproveButtonLabel:s,overrideDenyButtonLabel:c})=>{const d=n.charAt(0).toUpperCase()+n.substring(1),p=i?.endsWith("s")?"these":"this";return e(f,{title:`${d}${i?` ${i}`:""}?`,description:o??`Are you sure you want to ${n}${i?` ${p} ${i}`:""}?`,isOpen:a,onClose:t,denyButton:{label:c??"Go back",variant:v.Secondary,onClick:()=>{l?.(),t()}},approveButton:{label:s??d,variant:v.Primary,onClick:()=>{r?.(),t()}}})},Nt=({componentType:a,inputType:t,name:l,label:r,tooltip:n,badge:i,placeholder:o,required:s,disabled:c,value:d,setValue:p,errorMessage:u,warnMessage:h,helpMessage:g,dropdownOptions:m,dropdownNoSearch:v,dropdownNoCheckbox:b,timeUnits:f,timeDefaultUnit:y,toggleSize:x=E.L,keyLabel:C,valueLabel:k})=>{switch(a){case P.Input:return e(X,{name:l,type:t,label:r,tooltip:n,badge:i,placeholder:o,required:s,disabled:c,value:d??"",onChange:e=>{const a=e.target.value;p(t===H.Number?""===a?null:Number(a):a)},errorMessage:u,warnMessage:h,helpMessage:g},l);case P.MultiInput:return e(_,{name:l,label:r,tooltip:n,badge:i,placeholder:o,required:s,disabled:c,values:Array.isArray(d)?d:z(d,[]),setValues:e=>p(e),errorMessage:u,warnMessage:h,helpMessage:g,plain:!0},l);case P.KeyValuePair:return e(D,{name:l,label:r,tooltip:n,badge:i,required:s,disabled:c,limitFieldsPerRow:2,columns:[{keyName:"key",label:C||"Key",placeholder:C||"Key"},{keyName:"value",label:k||"Value",placeholder:k||"Value"}],values:Array.isArray(d)?d:z(d,[]),setValues:e=>p(e),errorMessage:u,warnMessage:h,helpMessage:g},l);case P.TextArea:return e(V,{name:l,label:r,tooltip:n,badge:i,required:s,disabled:c,placeholder:o,value:d??"",onChange:e=>p(e.target.value),errorMessage:u,warnMessage:h,helpMessage:g},l);case P.Dropdown:return e(N,{name:l,label:r,tooltip:n,badge:i,placeholder:o,required:s,disabled:c,withSearch:!v,options:m?.map(e=>({id:e.id||"",label:e.label||"",withCheckbox:!b}))||[],values:d?[String(d)]:[],setValues:e=>p(e[0]),errorMessage:u,warnMessage:h,helpMessage:g},l);case P.Checkbox:return e(R,{name:l,label:r,tooltip:n,badge:i,value:!0===d||"true"===d,onChange:e=>p(e),disabled:c,errorMessage:u,warnMessage:h,helpMessage:g},l);case P.Time:return e(I,{name:l,label:r,tooltip:n,badge:i,placeholder:o,required:s,disabled:c,value:d??"",setValue:e=>p(e),units:f,defaultUnit:y,errorMessage:u,warnMessage:h,helpMessage:g},l);case P.Toggle:return e(O,{name:l,size:x,labelAlign:L.Right,label:r,tooltip:n,badge:i,value:!0===d||"true"===d,onChange:e=>p(e),disabled:c,errorMessage:u,warnMessage:h,helpMessage:g},l);default:return null}},Vt=l.div`
132
132
  display: flex;
133
133
  flex-wrap: wrap;
134
134
  gap: 8px;
135
- `,zt=l.div`
135
+ `,Dt=l.div`
136
136
  display: flex;
137
137
  align-items: center;
138
138
  gap: 8px;
@@ -145,22 +145,22 @@ import{jsx as e,jsxs as a,Fragment as t}from"react/jsx-runtime";import l,{css as
145
145
  &:hover {
146
146
  background: ${({theme:e})=>e.v2.colors.silver[700]};
147
147
  }
148
- `,Dt=l.div`
148
+ `,zt=l.div`
149
149
  display: flex;
150
150
  width: 32px;
151
151
  height: 32px;
152
152
  justify-content: center;
153
153
  align-items: center;
154
154
  flex-shrink: 0;
155
- `,Xt=l.div`
155
+ `,_t=l.div`
156
156
  display: flex;
157
157
  flex-direction: column;
158
158
  gap: 12px;
159
- `,Ht=l.div`
159
+ `,Xt=l.div`
160
160
  display: flex;
161
161
  flex-wrap: wrap;
162
162
  gap: 6px;
163
- `,_t=l.div`
163
+ `,Ht=l.div`
164
164
  display: flex;
165
165
  align-items: center;
166
166
  gap: 8px;
@@ -176,7 +176,7 @@ import{jsx as e,jsxs as a,Fragment as t}from"react/jsx-runtime";import l,{css as
176
176
  border-radius: 999px;
177
177
  background-color: ${({theme:e})=>e.v2.colors.silver[700]};
178
178
  border: 1px solid ${({theme:e})=>e.v2.colors.silver[600]};
179
- `,jt={[Y.JavaScript]:"Node.js",[Y.DotNet]:".NET",[Y.Php]:"PHP",[Y.Java]:"Java",[Y.Go]:"Go",[Y.Python]:"Python",[Y.Ruby]:"Ruby",[Y.Rust]:"Rust"},qt=[Y.Python,Y.Java,Y.JavaScript,Y.DotNet,Y.Php,Y.Ruby,Y.Go],Kt=[{value:"all",label:"Entire Cluster"},{value:"source",label:"Specific Source"},{value:"namespace",label:"Specific Namespace"},{value:"language",label:"Specific Programming Language"}];function Ut(e){return jt[e]||e.charAt(0).toUpperCase()+e.slice(1)}function Gt(e){return null!=e?`${e}. ${oe}`:oe}const Ft=({readOnly:a,...t})=>e(a?Yt:Qt,{...t}),Wt=({title:t,count:l,children:r})=>a(s,{$gap:6,children:[a(h,{$gap:8,$alignItems:"center",children:[e(d,{size:u.XS,color:p.Primary,nowrap:!0,children:t}),l>1&&e(d,{size:u.XXS,color:p.Secondary,nowrap:!0,children:`(${ne})`})]}),e(Ht,{children:r})]}),Jt=()=>{const a=n();return e(_t,{children:e(Bt,{children:e(d,{size:u.XXS,color:a.v2.colors.white[500],nowrap:!0,children:ie})})})},Yt=({scopes:t,titleNumber:l})=>{const r=Gt(l);if(Wa(t))return e(S,{bgTint:"900",richTitle:{title:r},withCollapse:!0,collapseIsDefaultOpen:!0,children:e(B,{status:q.Default,message:j,fullWidth:!0})});const n=t.sources??[],i=t.namespaces??[],o=t.languages??[],s=[];return n.length&&s.push({kind:"sources",node:e(Wt,{title:K,count:n.length,children:n.map((a,t)=>{const l=[a.namespace,a.kind,a.name].filter(Boolean),r=l.length?l.join(" / "):G;return e(U,{label:r},`src-${t}-${r}`)})})}),i.length&&s.push({kind:"namespaces",node:e(Wt,{title:F,count:i.length,children:i.map((a,t)=>e(U,{label:a},`ns-${t}-${a}`))})}),o.length&&s.push({kind:"languages",node:e(Wt,{title:W,count:o.length,children:o.map((a,t)=>{const l=Z(a);return e(U,{label:Ut(a),leftIcon:l},`lang-${t}-${a}`)})})}),e(S,{bgTint:"900",richTitle:{title:r,subTitle:s.length>1?J:void 0},withCollapse:!0,collapseIsDefaultOpen:!0,children:e(S,{bgTint:"800",children:e(Xt,{children:s.map((t,l)=>a(Ha.Fragment,{children:[l>0&&e(Jt,{}),t.node]},t.kind))})})})},Zt=e=>e.sources.length>0?"source":e.namespaces.length>0?"namespace":e.languages.length>0?"language":"all",Qt=({scopes:t,onChange:l,sourceOptions:r=[],namespaceOptions:n=[],supportedLanguages:i,titleNumber:o,dataIdPrefix:c="source-scope",slim:h,disabled:g})=>{const m=t??Ja(),[v,b]=qa(()=>Zt(m)),{sources:f,namespaces:y,languages:x}=m,C=f.length>0||y.length>0||x.length>0;Ka(()=>{C&&"all"===v&&b(Zt(m))},[C,v]);const k=_a(()=>Kt.map(e=>"language"===e.value&&0===i?.length?null:{...e,disabled:"all"===e.value&&C}).filter(Boolean),[C]),$=_a(()=>f.map(e=>`${e.namespace}/${e.kind}/${e.name}`),[f]),S=_a(()=>[...y],[y]),w=_a(()=>new Set(x),[x]),T=ja(e=>{b(e)},[]),M=ja(e=>{const a=e.map(e=>(e=>{const a=e.split("/");return 3!==a.length?null:{namespace:a[0],kind:a[1],name:a[2]}})(e)).filter(e=>null!=e).map(e=>({namespace:e.namespace,kind:e.kind,name:e.name}));l({...m,sources:a})},[m,l]),A=ja(e=>{l({...m,namespaces:e})},[m,l]),O=ja(e=>{const a=m.languages,t=a.includes(e)?a.filter(a=>a!==e):[...a,e];l({...m,languages:t})},[m,l]),L=!C&&"all"===v,P=(i||qt).map(e=>({id:e,label:jt[e]??e.charAt(0).toUpperCase()+e.slice(1),Icon:Z(e)}));return a(Q,{richTitle:h?{title:Gt(o),titleSize:u.XS,titleColor:p.Secondary,tooltip:ee}:{title:Gt(o),subTitle:ee,subTitleWrap:!0},backgroundColor:h?"transparent":void 0,padding:h?0:void 0,children:[e(B,L?{status:q.Default,message:j,fullWidth:!0,smallIcon:!0}:{status:q.Info,message:J,fullWidth:!0,smallIcon:!0}),e(s,{$alignItems:"flex-start",children:e(ae,{options:k,selected:v,setSelected:T,disabled:g})}),"source"===v&&e(te,{multiple:!0,"data-id":`${c}-autocomplete-source`,options:r,value:$,onSelect:M,placeholder:le,disabled:g}),"namespace"===v&&e(te,{multiple:!0,"data-id":`${c}-autocomplete-namespace`,options:n,value:S,onSelect:A,placeholder:"Search namespace",disabled:g}),"language"===v&&P.length>0&&e(Vt,{children:P.map(({id:t,label:l,Icon:r})=>{const n=w.has(t);return a(zt,{$selected:n,onClick:()=>O(t),children:[e(N,{name:`${c}-lang-${t}`,size:re.S,value:n,onChange:()=>O(t),disabled:g}),e(Dt,{children:e(r,{size:20})}),e(d,{size:u.XS,nowrap:!0,children:l})]},t)})})]})},el=e=>{if(null!=e){if(!Array.isArray(e)&&"object"==typeof e)return Object.entries(e).map(([e,a])=>({id:e,label:null==a?e:String(a)}));if(Array.isArray(e))return e.map(e=>"string"==typeof e?{id:e,label:e}:e)}},al=e=>{if(!Array.isArray(e)||e.length<3)return;const[a,t,l]=e;return e=>{const r=null==e?.[a]?"":String(e[a]);switch(t){case"=":case"==":case"===":return r===l;case"!=":case"!==":return r!==l;default:return!0}}},tl=e=>{if(Array.isArray(e))return e.map(e=>{const a=e;return{keyName:String(a.keyName??a.name??""),label:a.label??a.displayName,tooltip:a.tooltip,placeholder:a.placeholder,helpMessage:a.helpMessage,componentType:a.componentType,options:el(a.options??a.values),fullRow:a.fullRow,defaultValue:a.defaultValue,withRegexTester:a.withRegexTester,separator:a.separator,copyByColumn:a.copyByColumn,renderCondition:al(a.renderCondition)}})},ll=e=>{if(Array.isArray(e))return e.map(e=>{if("string"==typeof e)return{id:e,label:e};const a=e;return{id:String(a.id??a.keyName??a.name??""),label:a.label??a.displayName??String(a.id??""),tooltip:a.tooltip,fields:Array.isArray(a.fields)?a.fields.map(rl):void 0}})},rl=e=>{const a="string"==typeof e.componentProperties?D(e.componentProperties,{}):e.componentProps||{};return{name:e.name,componentType:e.componentType,inputType:e.inputType??a.inputType??a.type,title:e.displayName,tooltip:a.tooltip,placeholder:a.placeholder,helpMessage:a.helpMessage,required:a.required,initialValue:e.initialValue,renderCondition:e.renderCondition,options:el(a.options??a.values),itemWrapperKey:a.itemWrapperKey,columns:tl(a.columns),limitFieldsPerRow:a.limitFieldsPerRow,variant:a.variant,wrapKey:a.wrapKey,checkboxOptions:ll(a.options??a.values),checkedValue:a.checkedValue??"true",valueMode:a.valueMode??"object",fields:Array.isArray(a.fields)?a.fields.map(rl):void 0,addLabel:a.addLabel,itemLabel:a.itemLabel,keyLabel:a.titleKey??a.keyLabel,valueLabel:a.titleValue??a.valueLabel,persistAs:a.persistAs}},nl=e=>{const a=e.initialValue;if(void 0!==a&&""!==a)return e.componentType===O.CheckboxList?"array"===e.valueMode?D(a,[]):D(a,{}):e.componentType!==O.MultiInput&&e.componentType!==O.MultiTabledInput||!e.wrapKey?e.componentType===O.MultiInput||e.componentType===O.MultiTabledInput?D(a,[]):e.componentType===O.SourceScopes?"null"===a||"{}"===a?Ja():Za(D(a,null)):e.componentType===O.Toggle||e.componentType===O.Checkbox?"true"===a:a:{[e.wrapKey]:D(a,[])}},il=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),ol=e=>Array.isArray(e)?e:[],sl=e=>{const a={};return e.forEach(e=>{a[String(e.key??"")]=String(e.value??"")}),a},cl=e=>il(e)?Object.entries(e).map(([e,a])=>({key:e,value:String(a??"")})):[],dl=({field:a,value:t,setValue:l,errorMessage:r,disabled:n})=>{const[i,o]=qa(()=>cl(t));return Ka(()=>{const e=il(t)?t:{};((e,a)=>{const t=Object.keys(e),l=Object.keys(a);return t.length===l.length&&t.every(t=>Object.prototype.hasOwnProperty.call(a,t)&&a[t]===e[t])})(sl(i),e)||o(cl(t))},[t]),e(z,{name:a.name,label:a.title,tooltip:a.tooltip,helpMessage:a.helpMessage,required:a.required,disabled:n,limitFieldsPerRow:2,columns:[{keyName:"key",label:a.keyLabel||"Key",placeholder:a.keyLabel||"Key"},{keyName:"value",label:a.valueLabel||"Value",placeholder:a.valueLabel||"Value"}],values:i,setValues:e=>{o(e),l(sl(e))},errorMessage:r})},pl=({field:l,value:r,setValue:n,errorMessage:i,disabled:o,keyValuePersistAs:h,sourceOptions:g,namespaceOptions:m})=>{const{name:v,componentType:f,inputType:y,title:x,tooltip:C,placeholder:k,helpMessage:$,required:S,initialValue:w,options:T,itemWrapperKey:M,columns:A,limitFieldsPerRow:L,variant:P,wrapKey:E,checkboxOptions:I}=l,[R,V]=qa({open:!1,value:""});if(f===O.SourceScopes)return e(Ft,{scopes:Za(r),onChange:e=>n(e),sourceOptions:g,namespaceOptions:m,dataIdPrefix:`dynamic-field-${v}`,slim:!0});if(f===O.CheckboxList&&"array"===l.valueMode){const t=ol(r),l=(e,a)=>n(a?[...t.filter(a=>a!==e),e]:t.filter(a=>a!==e));return a(s,{$gap:12,children:[x&&e(c,{label:x,tooltip:C,required:S}),e(s,{$gap:8,children:(I||[]).map(a=>{const r=e(N,{name:a.id,label:a.label,value:t.includes(a.id),disabled:o,onChange:e=>l(a.id,e)},a.id);return a.tooltip?e(de,{text:a.tooltip,withIcon:!0,children:r},a.id):r})}),e(b,{errorMessage:i,helpMessage:$})]})}if(f===O.CheckboxList){const t=il(r)?r:{},c=(e=>"emptyObject"!==e.checkedValue||{})(l),g=e=>"emptyObject"===l.checkedValue?il(e):!!e;return a(s,{$gap:12,children:[x&&e(d,{size:u.XS,color:p.Secondary,nowrap:!0,children:x}),e(s,{$gap:12,children:(I||[]).map(l=>{const r=t[l.id],i=g(r),d=il(r)?r:{},p=e(N,{label:l.label,value:i,disabled:o,onChange:e=>n({...t,[l.id]:e?il(r)?r:c:null})}),u=l.tooltip?e(de,{text:l.tooltip,withIcon:!0,children:p}):p,m=i&&l.fields?.length?e(s,{$gap:12,$padding:"0 0 0 24px",children:l.fields.map(a=>e(pl,{field:a,value:d[a.name],setValue:e=>n({...t,[l.id]:{...d,[a.name]:e}}),disabled:o,keyValuePersistAs:h},`${v}-${l.id}-${a.name}`))}):null;return a(s,{$gap:12,children:[u,m]},l.id)})}),e(b,{errorMessage:i,helpMessage:$})]})}if(f===O.MultiTabledInput){const l=ol(E?r?.[E]:r),s=e=>n(E?{...il(r)?r:{},[E]:e}:e),c=(A||[]).some(e=>e.withRegexTester);return a(t,{children:[e("cards"===P?pe:z,{name:v,label:x,tooltip:C,helpMessage:$,required:S,disabled:o,columns:A||[],limitFieldsPerRow:L,values:l,setValues:s,errorMessage:i,onTestRegex:c?e=>V({open:!0,value:e}):void 0}),c&&e(Tt,{isOpen:R.open,regex:R.value,onClose:()=>V({open:!1,value:""})})]})}if(f===O.MultiInput&&E){const a=ol(r?.[E]);return e(X,{name:v,label:x,tooltip:C,helpMessage:$,required:S,disabled:o,placeholder:k,values:a,setValues:e=>n({...il(r)?r:{},[E]:e}),errorMessage:i})}if(f===O.MultiInput&&M){const a=ol(r).map(e=>String(e?.[M]??""));return e(X,{name:v,label:x,tooltip:C,helpMessage:$,required:S,disabled:o,placeholder:k,values:a,setValues:e=>n(e.map(e=>({[M]:e}))),errorMessage:i})}return f===O.KeyValuePair?"map"===(l.persistAs??h)?e(dl,{field:l,value:r,setValue:n,errorMessage:i,disabled:o}):e(Rt,{componentType:f,name:v,label:x,tooltip:C,helpMessage:$,disabled:o,required:S,errorMessage:i,keyLabel:l.keyLabel,valueLabel:l.valueLabel,value:r??[],setValue:n}):e(Rt,{componentType:f,inputType:y,name:v,label:x,tooltip:C,helpMessage:$,disabled:o,required:S,placeholder:k,errorMessage:i,dropdownOptions:T,value:(null==r?w:r)??"",setValue:n})},ul=({field:l,value:r,setValue:i,disabled:o,keyValuePersistAs:d,sourceOptions:p,namespaceOptions:u})=>{const b=n(),f=ol(r),y=f.length?f:[{}],x=l.fields||[],C=e=>i(e);return a(t,{children:[y.map((t,r)=>a(Ua,{children:[e(ce,{}),a(s,{$gap:12,children:[a(h,{$justifyContent:"space-between",$alignItems:"center",children:[e(c,{label:`${l.itemLabel||l.title||"Item"} ${r+1}`}),e(g,{leftIcon:()=>e(wa,{fill:b.v2.colors.red[500]}),variant:v.Secondary,size:m.S,onClick:()=>(e=>{const a=y.filter((a,t)=>t!==e);C(a)})(r),disabled:o||1===y.length})]}),x.map(a=>e(pl,{field:a,value:t[a.name],setValue:e=>((e,a,t)=>C(y.map((l,r)=>r===e?{...l,[a]:t}:l)))(r,a.name,e),disabled:o,keyValuePersistAs:d,sourceOptions:p,namespaceOptions:u},`${l.name}-group-${r}-${a.name}`))]})]},`${l.name}-group-${r}`)),e(g,{variant:v.Secondary,label:l.addLabel||"Add",leftIcon:Ta,onClick:()=>C([...y,{}]),disabled:o}),e(ce,{})]})},hl=({field:t,value:l,setValue:r,errorMessage:n,disabled:i})=>a(s,{$gap:12,children:[t.title&&e(c,{label:t.title,tooltip:t.tooltip,required:t.required}),e(s,{$gap:8,children:(t.checkboxOptions||[]).map(a=>{const t=e(N,{name:a.id,label:a.label,value:!0===l?.[a.id],disabled:i,onChange:e=>r(a.id,e)},a.id);return a.tooltip?e(de,{text:a.tooltip,withIcon:!0,children:t},a.id):t})}),e(b,{errorMessage:n,helpMessage:t.helpMessage})]}),gl=({signals:a,fields:l,value:r,setValue:n,formErrors:i,disabled:o,seedInitialValues:s,keyValuePersistAs:c="map",sourceOptions:d,namespaceOptions:p})=>{const{isK8s:u}=Ya(),h=(l||[]).filter(e=>!!e).map(e=>rl(e));return Ka(()=>{if(!s)return;const e=r||{},a={};h.forEach(t=>{if(t.componentType===O.SourceScopes&&!u)return;const l=t.componentType===O.SourceScopes?nl(t)??Ja():nl(t);if(void 0===l)return;if(t.componentType===O.CheckboxList&&"flatFields"===t.valueMode&&il(l))return void Object.entries(l).forEach(([t,l])=>{void 0!==e[t]&&null!==e[t]||(a[t]=l)});const r=e[t.name];if(t.componentType===O.SourceScopes){if(void 0!==r)return}else if(null!=r)return;a[t.name]=il(l)&&il(a[t.name])?{...a[t.name],...l}:l}),Object.entries(a).forEach(([e,a])=>n(e,a))},[]),e(t,{children:h.map(t=>{const l=Object.entries(r||{}).map(([e,a])=>({name:e,key:e,value:a}));if(t.renderCondition&&!se(t.renderCondition,a,l))return null;if(t.componentType===O.SourceScopes&&!u)return null;const s=r?.[t.name];if(t.componentType===O.FieldGroup)return e(ul,{field:t,value:s,setValue:e=>n(t.name,e),disabled:o,keyValuePersistAs:c,sourceOptions:d,namespaceOptions:p},t.name);if(t.componentType===O.CheckboxList&&"flatFields"===t.valueMode){const a=t.checkboxOptions?.map(e=>i[e.id]).find(Boolean);return e(hl,{field:t,value:r||{},setValue:n,errorMessage:a,disabled:o},t.name)}return e(pl,{field:t,value:s,setValue:e=>n(t.name,e),errorMessage:i[t.name],disabled:o,keyValuePersistAs:c,sourceOptions:d,namespaceOptions:p},t.name)})})},ml=gl,vl=({isEnabled:a,setIsEnabled:t,fieldDisabled:l})=>{const r=n();return e(ae,{options:[{icon:Ma,label:"Enable",value:!0,selectedBgColor:r.v2.colors.green[1e3],selectedBorderColor:r.v2.colors.green[400],selectedTextColor:r.v2.colors.green[400]},{icon:Aa,label:"Disable",value:!1,selectedBgColor:r.v2.colors.red[1e3],selectedBorderColor:r.v2.colors.red[500],selectedTextColor:r.v2.colors.red[400]}],size:ue.S,selected:a,setSelected:t,disabled:l})},bl=l.div`
179
+ `,jt={[Y.JavaScript]:"Node.js",[Y.DotNet]:".NET",[Y.Php]:"PHP",[Y.Java]:"Java",[Y.Go]:"Go",[Y.Python]:"Python",[Y.Ruby]:"Ruby",[Y.Rust]:"Rust"},qt=[Y.Python,Y.Java,Y.JavaScript,Y.DotNet,Y.Php,Y.Ruby,Y.Go],Ut=[{value:"all",label:"Entire Cluster"},{value:"source",label:"Specific Source"},{value:"namespace",label:"Specific Namespace"},{value:"language",label:"Specific Programming Language"}];function Gt(e){return jt[e]||e.charAt(0).toUpperCase()+e.slice(1)}function Kt(e){return null!=e?`${e}. ${oe}`:oe}const Ft=({readOnly:a,...t})=>e(a?Yt:Qt,{...t}),Wt=({title:t,count:l,children:r})=>a(s,{$gap:6,children:[a(h,{$gap:8,$alignItems:"center",children:[e(d,{size:u.XS,color:p.Primary,nowrap:!0,children:t}),l>1&&e(d,{size:u.XXS,color:p.Secondary,nowrap:!0,children:`(${ne})`})]}),e(Xt,{children:r})]}),Jt=()=>{const a=n();return e(Ht,{children:e(Bt,{children:e(d,{size:u.XXS,color:a.v2.colors.white[500],nowrap:!0,children:ie})})})},Yt=({scopes:t,titleNumber:l})=>{const r=Kt(l);if(Wa(t))return e(S,{bgTint:"900",richTitle:{title:r},withCollapse:!0,collapseIsDefaultOpen:!0,children:e(B,{status:q.Default,message:j,fullWidth:!0})});const n=t.sources??[],i=t.namespaces??[],o=t.languages??[],s=[];return n.length&&s.push({kind:"sources",node:e(Wt,{title:U,count:n.length,children:n.map((a,t)=>{const l=[a.namespace,a.kind,a.name].filter(Boolean),r=l.length?l.join(" / "):K;return e(G,{label:r},`src-${t}-${r}`)})})}),i.length&&s.push({kind:"namespaces",node:e(Wt,{title:F,count:i.length,children:i.map((a,t)=>e(G,{label:a},`ns-${t}-${a}`))})}),o.length&&s.push({kind:"languages",node:e(Wt,{title:W,count:o.length,children:o.map((a,t)=>{const l=Z(a);return e(G,{label:Gt(a),leftIcon:l},`lang-${t}-${a}`)})})}),e(S,{bgTint:"900",richTitle:{title:r,subTitle:s.length>1?J:void 0},withCollapse:!0,collapseIsDefaultOpen:!0,children:e(S,{bgTint:"800",children:e(_t,{children:s.map((t,l)=>a(Xa.Fragment,{children:[l>0&&e(Jt,{}),t.node]},t.kind))})})})},Zt=e=>e.sources.length>0?"source":e.namespaces.length>0?"namespace":e.languages.length>0?"language":"all",Qt=({scopes:t,onChange:l,sourceOptions:r=[],namespaceOptions:n=[],supportedLanguages:i,titleNumber:o,dataIdPrefix:c="source-scope",slim:h,disabled:g})=>{const m=t??Ja(),[v,b]=qa(()=>Zt(m)),{sources:f,namespaces:y,languages:x}=m,C=f.length>0||y.length>0||x.length>0;Ua(()=>{C&&"all"===v&&b(Zt(m))},[C,v]);const k=Ha(()=>Ut.map(e=>"language"===e.value&&0===i?.length?null:{...e,disabled:"all"===e.value&&C}).filter(Boolean),[C]),$=Ha(()=>f.map(e=>`${e.namespace}/${e.kind}/${e.name}`),[f]),S=Ha(()=>[...y],[y]),w=Ha(()=>new Set(x),[x]),T=ja(e=>{b(e)},[]),M=ja(e=>{const a=e.map(e=>(e=>{const a=e.split("/");return 3!==a.length?null:{namespace:a[0],kind:a[1],name:a[2]}})(e)).filter(e=>null!=e).map(e=>({namespace:e.namespace,kind:e.kind,name:e.name}));l({...m,sources:a})},[m,l]),A=ja(e=>{l({...m,namespaces:e})},[m,l]),P=ja(e=>{const a=m.languages,t=a.includes(e)?a.filter(a=>a!==e):[...a,e];l({...m,languages:t})},[m,l]),O=!C&&"all"===v,L=(i||qt).map(e=>({id:e,label:jt[e]??e.charAt(0).toUpperCase()+e.slice(1),Icon:Z(e)}));return a(Q,{richTitle:h?{title:Kt(o),titleSize:u.XS,titleColor:p.Secondary,tooltip:ee}:{title:Kt(o),subTitle:ee,subTitleWrap:!0},backgroundColor:h?"transparent":void 0,padding:h?0:void 0,children:[e(B,O?{status:q.Default,message:j,fullWidth:!0,smallIcon:!0}:{status:q.Info,message:J,fullWidth:!0,smallIcon:!0}),e(s,{$alignItems:"flex-start",children:e(ae,{options:k,selected:v,setSelected:T,disabled:g})}),"source"===v&&e(te,{multiple:!0,"data-id":`${c}-autocomplete-source`,options:r,value:$,onSelect:M,placeholder:le,disabled:g}),"namespace"===v&&e(te,{multiple:!0,"data-id":`${c}-autocomplete-namespace`,options:n,value:S,onSelect:A,placeholder:"Search namespace",disabled:g}),"language"===v&&L.length>0&&e(Vt,{children:L.map(({id:t,label:l,Icon:r})=>{const n=w.has(t);return a(Dt,{$selected:n,onClick:()=>P(t),children:[e(R,{name:`${c}-lang-${t}`,size:re.S,value:n,onChange:()=>P(t),disabled:g}),e(zt,{children:e(r,{size:20})}),e(d,{size:u.XS,nowrap:!0,children:l})]},t)})})]})},el=e=>{if(null!=e){if(!Array.isArray(e)&&"object"==typeof e)return Object.entries(e).map(([e,a])=>({id:e,label:null==a?e:String(a)}));if(Array.isArray(e))return e.map(e=>"string"==typeof e?{id:e,label:e}:e)}},al=e=>{if(!Array.isArray(e)||e.length<3)return;const[a,t,l]=e;return e=>{const r=null==e?.[a]?"":String(e[a]);switch(t){case"=":case"==":case"===":return r===l;case"!=":case"!==":return r!==l;default:return!0}}},tl=e=>{if(Array.isArray(e))return e.map(e=>{const a=e;return{keyName:String(a.keyName??a.name??""),label:a.label??a.displayName,tooltip:a.tooltip,placeholder:a.placeholder,helpMessage:a.helpMessage,componentType:a.componentType,options:el(a.options??a.values),fullRow:a.fullRow,defaultValue:a.defaultValue,withRegexTester:a.withRegexTester,separator:a.separator,copyByColumn:a.copyByColumn,renderCondition:al(a.renderCondition)}})},ll=e=>{if(Array.isArray(e))return e.map(e=>{if("string"==typeof e)return{id:e,label:e};const a=e;return{id:String(a.id??a.keyName??a.name??""),label:a.label??a.displayName??String(a.id??""),tooltip:a.tooltip,fields:Array.isArray(a.fields)?a.fields.map(rl):void 0}})},rl=e=>{const a="string"==typeof e.componentProperties?z(e.componentProperties,{}):e.componentProps||{};return{name:e.name,componentType:e.componentType,inputType:e.inputType??a.inputType??a.type,title:e.displayName,tooltip:a.tooltip,placeholder:a.placeholder,helpMessage:a.helpMessage,required:a.required,initialValue:e.initialValue,renderCondition:e.renderCondition,options:el(a.options??a.values),itemWrapperKey:a.itemWrapperKey,columns:tl(a.columns),limitFieldsPerRow:a.limitFieldsPerRow,variant:a.variant,wrapKey:a.wrapKey,checkboxOptions:ll(a.options??a.values),checkedValue:a.checkedValue??"true",valueMode:a.valueMode??"object",fields:Array.isArray(a.fields)?a.fields.map(rl):void 0,addLabel:a.addLabel,itemLabel:a.itemLabel,keyLabel:a.titleKey??a.keyLabel,valueLabel:a.titleValue??a.valueLabel,persistAs:a.persistAs}},nl=e=>{const a=e.initialValue;if(void 0!==a&&""!==a)return e.componentType===P.CheckboxList?"array"===e.valueMode?z(a,[]):z(a,{}):e.componentType!==P.MultiInput&&e.componentType!==P.MultiTabledInput||!e.wrapKey?e.componentType===P.MultiInput||e.componentType===P.MultiTabledInput?z(a,[]):e.componentType===P.SourceScopes?"null"===a||"{}"===a?Ja():Za(z(a,null)):e.componentType===P.Toggle||e.componentType===P.Checkbox?"true"===a:a:{[e.wrapKey]:z(a,[])}},il=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),ol=e=>Array.isArray(e)?e:[],sl=e=>{const a={};return e.forEach(e=>{a[String(e.key??"")]=String(e.value??"")}),a},cl=e=>il(e)?Object.entries(e).map(([e,a])=>({key:e,value:String(a??"")})):[],dl=({field:a,value:t,setValue:l,errorMessage:r,disabled:n})=>{const[i,o]=qa(()=>cl(t));return Ua(()=>{const e=il(t)?t:{};((e,a)=>{const t=Object.keys(e),l=Object.keys(a);return t.length===l.length&&t.every(t=>Object.prototype.hasOwnProperty.call(a,t)&&a[t]===e[t])})(sl(i),e)||o(cl(t))},[t]),e(D,{name:a.name,label:a.title,tooltip:a.tooltip,helpMessage:a.helpMessage,required:a.required,disabled:n,limitFieldsPerRow:2,columns:[{keyName:"key",label:a.keyLabel||"Key",placeholder:a.keyLabel||"Key"},{keyName:"value",label:a.valueLabel||"Value",placeholder:a.valueLabel||"Value"}],values:i,setValues:e=>{o(e),l(sl(e))},errorMessage:r})},pl=({field:l,value:r,setValue:n,errorMessage:i,disabled:o,keyValuePersistAs:h,sourceOptions:g,namespaceOptions:m})=>{const{name:v,componentType:f,inputType:y,title:x,tooltip:C,placeholder:k,helpMessage:$,required:S,initialValue:w,options:T,itemWrapperKey:M,columns:A,limitFieldsPerRow:O,variant:L,wrapKey:E,checkboxOptions:I}=l,[N,V]=qa({open:!1,value:""});if(f===P.SourceScopes)return e(Ft,{scopes:Za(r),onChange:e=>n(e),sourceOptions:g,namespaceOptions:m,dataIdPrefix:`dynamic-field-${v}`,slim:!0});if(f===P.CheckboxList&&"array"===l.valueMode){const t=ol(r),l=(e,a)=>n(a?[...t.filter(a=>a!==e),e]:t.filter(a=>a!==e));return a(s,{$gap:12,children:[x&&e(c,{label:x,tooltip:C,required:S}),e(s,{$gap:8,children:(I||[]).map(a=>{const r=e(R,{name:a.id,label:a.label,value:t.includes(a.id),disabled:o,onChange:e=>l(a.id,e)},a.id);return a.tooltip?e(de,{text:a.tooltip,withIcon:!0,children:r},a.id):r})}),e(b,{errorMessage:i,helpMessage:$})]})}if(f===P.CheckboxList){const t=il(r)?r:{},c=(e=>"emptyObject"!==e.checkedValue||{})(l),g=e=>"emptyObject"===l.checkedValue?il(e):!!e;return a(s,{$gap:12,children:[x&&e(d,{size:u.XS,color:p.Secondary,nowrap:!0,children:x}),e(s,{$gap:12,children:(I||[]).map(l=>{const r=t[l.id],i=g(r),d=il(r)?r:{},p=e(R,{label:l.label,value:i,disabled:o,onChange:e=>n({...t,[l.id]:e?il(r)?r:c:null})}),u=l.tooltip?e(de,{text:l.tooltip,withIcon:!0,children:p}):p,m=i&&l.fields?.length?e(s,{$gap:12,$padding:"0 0 0 24px",children:l.fields.map(a=>e(pl,{field:a,value:d[a.name],setValue:e=>n({...t,[l.id]:{...d,[a.name]:e}}),disabled:o,keyValuePersistAs:h},`${v}-${l.id}-${a.name}`))}):null;return a(s,{$gap:12,children:[u,m]},l.id)})}),e(b,{errorMessage:i,helpMessage:$})]})}if(f===P.MultiTabledInput){const l=ol(E?r?.[E]:r),s=e=>n(E?{...il(r)?r:{},[E]:e}:e),c=(A||[]).some(e=>e.withRegexTester);return a(t,{children:[e("cards"===L?pe:D,{name:v,label:x,tooltip:C,helpMessage:$,required:S,disabled:o,columns:A||[],limitFieldsPerRow:O,values:l,setValues:s,errorMessage:i,onTestRegex:c?e=>V({open:!0,value:e}):void 0}),c&&e(Tt,{isOpen:N.open,regex:N.value,onClose:()=>V({open:!1,value:""})})]})}if(f===P.MultiInput&&E){const a=ol(r?.[E]);return e(_,{name:v,label:x,tooltip:C,helpMessage:$,required:S,disabled:o,placeholder:k,values:a,setValues:e=>n({...il(r)?r:{},[E]:e}),errorMessage:i})}if(f===P.MultiInput&&M){const a=ol(r).map(e=>String(e?.[M]??""));return e(_,{name:v,label:x,tooltip:C,helpMessage:$,required:S,disabled:o,placeholder:k,values:a,setValues:e=>n(e.map(e=>({[M]:e}))),errorMessage:i})}return f===P.KeyValuePair?"map"===(l.persistAs??h)?e(dl,{field:l,value:r,setValue:n,errorMessage:i,disabled:o}):e(Nt,{componentType:f,name:v,label:x,tooltip:C,helpMessage:$,disabled:o,required:S,errorMessage:i,keyLabel:l.keyLabel,valueLabel:l.valueLabel,value:r??[],setValue:n}):e(Nt,{componentType:f,inputType:y,name:v,label:x,tooltip:C,helpMessage:$,disabled:o,required:S,placeholder:k,errorMessage:i,dropdownOptions:T,value:(null==r?w:r)??"",setValue:n})},ul=({field:l,value:r,setValue:i,disabled:o,keyValuePersistAs:d,sourceOptions:p,namespaceOptions:u})=>{const b=n(),f=ol(r),y=f.length?f:[{}],x=l.fields||[],C=e=>i(e);return a(t,{children:[y.map((t,r)=>a(Ga,{children:[e(ce,{}),a(s,{$gap:12,children:[a(h,{$justifyContent:"space-between",$alignItems:"center",children:[e(c,{label:`${l.itemLabel||l.title||"Item"} ${r+1}`}),e(g,{leftIcon:()=>e(wa,{fill:b.v2.colors.red[500]}),variant:v.Secondary,size:m.S,onClick:()=>(e=>{const a=y.filter((a,t)=>t!==e);C(a)})(r),disabled:o||1===y.length})]}),x.map(a=>e(pl,{field:a,value:t[a.name],setValue:e=>((e,a,t)=>C(y.map((l,r)=>r===e?{...l,[a]:t}:l)))(r,a.name,e),disabled:o,keyValuePersistAs:d,sourceOptions:p,namespaceOptions:u},`${l.name}-group-${r}-${a.name}`))]})]},`${l.name}-group-${r}`)),e(g,{variant:v.Secondary,label:l.addLabel||"Add",leftIcon:Ta,onClick:()=>C([...y,{}]),disabled:o}),e(ce,{})]})},hl=({field:t,value:l,setValue:r,errorMessage:n,disabled:i})=>a(s,{$gap:12,children:[t.title&&e(c,{label:t.title,tooltip:t.tooltip,required:t.required}),e(s,{$gap:8,children:(t.checkboxOptions||[]).map(a=>{const t=e(R,{name:a.id,label:a.label,value:!0===l?.[a.id],disabled:i,onChange:e=>r(a.id,e)},a.id);return a.tooltip?e(de,{text:a.tooltip,withIcon:!0,children:t},a.id):t})}),e(b,{errorMessage:n,helpMessage:t.helpMessage})]}),gl=({signals:a,fields:l,value:r,setValue:n,formErrors:i,disabled:o,seedInitialValues:s,keyValuePersistAs:c="map",sourceOptions:d,namespaceOptions:p})=>{const{isK8s:u}=Ya(),h=(l||[]).filter(e=>!!e).map(e=>rl(e));return Ua(()=>{if(!s)return;const e=r||{},a={};h.forEach(t=>{if(t.componentType===P.SourceScopes&&!u)return;const l=t.componentType===P.SourceScopes?nl(t)??Ja():nl(t);if(void 0===l)return;if(t.componentType===P.CheckboxList&&"flatFields"===t.valueMode&&il(l))return void Object.entries(l).forEach(([t,l])=>{void 0!==e[t]&&null!==e[t]||(a[t]=l)});const r=e[t.name];if(t.componentType===P.SourceScopes){if(void 0!==r)return}else if(null!=r)return;a[t.name]=il(l)&&il(a[t.name])?{...a[t.name],...l}:l}),Object.entries(a).forEach(([e,a])=>n(e,a))},[]),e(t,{children:h.map((t,l)=>{const s=Object.entries(r||{}).map(([e,a])=>({name:e,key:e,value:a}));if(t.renderCondition&&!se(t.renderCondition,a,s))return null;if(t.componentType===P.SourceScopes&&!u)return null;const h=r?.[t.name],g=`${t.name}-${l}`;if(t.componentType===P.FieldGroup)return e(ul,{field:t,value:h,setValue:e=>n(t.name,e),disabled:o,keyValuePersistAs:c,sourceOptions:d,namespaceOptions:p},g);if(t.componentType===P.CheckboxList&&"flatFields"===t.valueMode){const a=t.checkboxOptions?.map(e=>i[e.id]).find(Boolean);return e(hl,{field:t,value:r||{},setValue:n,errorMessage:a,disabled:o},g)}return e(pl,{field:t,value:h,setValue:e=>n(t.name,e),errorMessage:i[t.name],disabled:o,keyValuePersistAs:c,sourceOptions:d,namespaceOptions:p},g)})})},ml=gl,vl=({isEnabled:a,setIsEnabled:t,fieldDisabled:l})=>{const r=n();return e(ae,{options:[{icon:Ma,label:"Enable",value:!0,selectedBgColor:r.v2.colors.green[1e3],selectedBorderColor:r.v2.colors.green[400],selectedTextColor:r.v2.colors.green[400]},{icon:Aa,label:"Disable",value:!1,selectedBgColor:r.v2.colors.red[1e3],selectedBorderColor:r.v2.colors.red[500],selectedTextColor:r.v2.colors.red[400]}],size:ue.S,selected:a,setSelected:t,disabled:l})},bl=l.div`
180
180
  display: flex;
181
181
  align-items: center;
182
182
  gap: 24px;
@@ -188,14 +188,14 @@ import{jsx as e,jsxs as a,Fragment as t}from"react/jsx-runtime";import l,{css as
188
188
  min-width: 0;
189
189
  white-space: pre;
190
190
  overflow-x: auto;
191
- `,yl=({title:t,summary:l,onEdit:r,renderAction:n})=>{const i=_a(()=>{const e=[];return t&&(e.push({text:t,variant:Qa.Default}),e.push({text:" - ",variant:Qa.Default})),e.push(...l),e},[t,l]);return a(bl,{children:[e(fl,{children:e(et,{parts:i})}),n&&n(),r&&e(g,{"data-id":"sampling-btn-edit-auto-rule",label:he,rightIcon:Oa,variant:v.Text,size:m.S,onClick:r})]})},xl={[Ce.HttpRequest]:"HTTP request",[Ce.HttpResponse]:"HTTP response",[Ce.DbQuery]:"DB query",[Ce.Messaging]:"messaging"};function Cl(e,a,t){return 1===e?a:t??`${a}s`}function kl(e,a){const t=[],l=e.slice(0,3),r=e.slice(3);return l.forEach((e,l)=>{l>0&&t.push({text:", ",variant:Qa.Default}),t.push({text:e,variant:a})}),r.length>0&&t.push({text:` + ${r.length} more`,variant:Qa.Default,tooltipItems:r}),t}const $l=({option:a,formState:t,renderAction:l})=>{const r=_a(()=>{const e=function(e,a){switch(e){case me.CodeAttributes:return(e=>{const a=Object.values(ke).filter(a=>!!e.codeAttributes?.[a]).map(e=>$e(e).toLowerCase());return a.length?[{text:"Collect",variant:Qa.Action},{text:" ",variant:Qa.Default},...kl(a,Qa.Endpoint)]:null})(a);case me.PayloadCollection:return(e=>{const a=Object.values(Ce).filter(a=>null!=e.payloadCollection?.[a]).map(e=>xl[e]);return a.length?[{text:"Collect",variant:Qa.Action},{text:" ",variant:Qa.Default},...kl(a,Qa.Endpoint)]:null})(a);case me.HeadersCollection:return(e=>{const a=(e.headersCollection?.[xe.HeaderKeys]??[]).map(e=>e.trim()).filter(e=>e.length>0);if(!a.length)return null;const t=Cl(a.length,"HTTP header");return[{text:`Collect ${a.length} ${t}`,variant:Qa.Action},{text:"",variant:Qa.Default,tooltipItems:a}]})(a);case me.CustomInstrumentation:return(e=>{const a=(e.customInstrumentations?.[ve.Java]??[]).map(e=>new be(e.className,e.methodName)).filter(e=>e.Verify()),t=(e.customInstrumentations?.[ve.Golang]??[]).map(e=>new fe(e.packageName,e.functionName,e.receiverName,e.receiverMethodName)).filter(e=>e.Verify()),l=(e.customInstrumentations?.[ve.Php]??[]).map(e=>new ye(e.className,e.functionName)).filter(e=>e.Verify());if(!(a.length+t.length+l.length))return null;const r=[];a.length&&r.push(`${a.length} Java ${Cl(a.length,"probe")}`),t.length&&r.push(`${t.length} Go ${Cl(t.length,"probe")}`),l.length&&r.push(`${l.length} PHP ${Cl(l.length,"probe")}`);const n=[...a.map(e=>`Java: ${e.toString()}`),...t.map(e=>`Go: ${e.toString()}`),...l.map(e=>`PHP: ${e.toString()}`)];return[{text:`Apply ${r.join(" + ")}`,variant:Qa.Action},{text:"",variant:Qa.Default,tooltipItems:n}]})(a);default:return null}}(a?.type,t);return e?[...e,...at(t.sourceScopes)]:[]},[a?.type,t]),n=0===r.length;return e(yl,{title:n?ge:"Instrumentation Rule Preview",summary:r,renderAction:l})},Sl=({size:a=200,central:t=!1,useInline:l=!1})=>{const{tier:r}=Ya();if(l){if(t)return e(La,{size:a});switch(r){case Se.Community:return e(Ea,{size:a});case Se.Onprem:return e(Pa,{size:a});default:return null}}if(t)return e(Ia,{size:a});switch(r){case Se.Community:return e(Ra,{size:a});case Se.Onprem:return e(Na,{size:a});default:return null}},wl=[{value:"50",label:"50%"},{value:"25",label:"25%"},{value:"10",label:"10%"},{value:"1",label:"1%"},{value:"custom",label:"Custom"}],Tl=[{value:"10",label:"10%"},{value:"1",label:"1%"},{value:"0.5",label:"0.5%"},{value:"0.1",label:"0.1%"},{value:"custom",label:"Custom"}],Ml=[{value:"5000",label:"5s"},{value:"1000",label:"1s"},{value:"500",label:"500ms"},{value:"100",label:"100ms"},{value:"50",label:"50ms"},{value:"custom",label:"Custom"}],Al=({description:t,options:l,selected:r,onSelect:n,customName:i,customLabel:o,customPlaceholder:d,customValue:p,onCustomChange:u,customInputType:g=_.Number,customMin:m,customMax:v})=>a(s,{$gap:6,children:[e(c,{label:t}),a(h,{$gap:8,$alignItems:"flex-end",children:[e(ae,{options:l,selected:r,setSelected:n}),"custom"===r&&e(H,{name:i,label:o,placeholder:d,type:g,value:p,onChange:u,width:160,min:m,max:v})]})]}),Ol=()=>{},Ll=a=>a.readOnly?e(Pl,{rule:a.rule}):e(El,{ruleType:a.ruleType,formState:a.formState,onChange:a.onChange}),Pl=({rule:t})=>{const l=null!=t.durationAtLeastMs;return t.error?e(Q,{richTitle:{title:we},children:e(L,{name:"sampling-view-toggle-keep-errors",onChange:Ol,value:!0,size:E.S,label:Te,labelAlign:P.Right})}):l?e(Q,{richTitle:{title:Me},children:a("div",{children:[e(d,{size:u.XXXS,color:p.Secondary,children:Ae}),e(d,{size:u.XS,children:`${t.durationAtLeastMs}ms`})]})}):null},El=({ruleType:a,formState:t,onChange:l})=>{const r=ja(e=>l({durationPreset:e}),[l]),n=ja(e=>l({customDurationMs:e.target.value}),[l]);return"Duration"===a?e(Q,{richTitle:{title:Me,subTitle:Oe},children:e(Al,{description:Ae,options:Ml,selected:t.durationPreset,onSelect:r,customName:"sampling-input-custom-duration",customLabel:Le,customPlaceholder:"200ms",customValue:t.customDurationMs,onCustomChange:n})}):null},Il=l.div`
191
+ `,yl=({title:t,summary:l,onEdit:r,renderAction:n})=>{const i=Ha(()=>{const e=[];return t&&(e.push({text:t,variant:Qa.Default}),e.push({text:" - ",variant:Qa.Default})),e.push(...l),e},[t,l]);return a(bl,{children:[e(fl,{children:e(et,{parts:i})}),n&&n(),r&&e(g,{"data-id":"sampling-btn-edit-auto-rule",label:he,rightIcon:Pa,variant:v.Text,size:m.S,onClick:r})]})},xl={[Ce.HttpRequest]:"HTTP request",[Ce.HttpResponse]:"HTTP response",[Ce.DbQuery]:"DB query",[Ce.Messaging]:"messaging"};function Cl(e,a,t){return 1===e?a:t??`${a}s`}function kl(e,a){const t=[],l=e.slice(0,3),r=e.slice(3);return l.forEach((e,l)=>{l>0&&t.push({text:", ",variant:Qa.Default}),t.push({text:e,variant:a})}),r.length>0&&t.push({text:` + ${r.length} more`,variant:Qa.Default,tooltipItems:r}),t}const $l=({option:a,formState:t,renderAction:l})=>{const r=Ha(()=>{const e=function(e,a){switch(e){case me.CodeAttributes:return(e=>{const a=Object.values(ke).filter(a=>!!e.codeAttributes?.[a]).map(e=>$e(e).toLowerCase());return a.length?[{text:"Collect",variant:Qa.Action},{text:" ",variant:Qa.Default},...kl(a,Qa.Endpoint)]:null})(a);case me.PayloadCollection:return(e=>{const a=Object.values(Ce).filter(a=>null!=e.payloadCollection?.[a]).map(e=>xl[e]);return a.length?[{text:"Collect",variant:Qa.Action},{text:" ",variant:Qa.Default},...kl(a,Qa.Endpoint)]:null})(a);case me.HeadersCollection:return(e=>{const a=(e.headersCollection?.[xe.HeaderKeys]??[]).map(e=>e.trim()).filter(e=>e.length>0);if(!a.length)return null;const t=Cl(a.length,"HTTP header");return[{text:`Collect ${a.length} ${t}`,variant:Qa.Action},{text:"",variant:Qa.Default,tooltipItems:a}]})(a);case me.CustomInstrumentation:return(e=>{const a=(e.customInstrumentations?.[ve.Java]??[]).map(e=>new be(e.className,e.methodName)).filter(e=>e.Verify()),t=(e.customInstrumentations?.[ve.Golang]??[]).map(e=>new fe(e.packageName,e.functionName,e.receiverName,e.receiverMethodName)).filter(e=>e.Verify()),l=(e.customInstrumentations?.[ve.Php]??[]).map(e=>new ye(e.className,e.functionName)).filter(e=>e.Verify());if(!(a.length+t.length+l.length))return null;const r=[];a.length&&r.push(`${a.length} Java ${Cl(a.length,"probe")}`),t.length&&r.push(`${t.length} Go ${Cl(t.length,"probe")}`),l.length&&r.push(`${l.length} PHP ${Cl(l.length,"probe")}`);const n=[...a.map(e=>`Java: ${e.toString()}`),...t.map(e=>`Go: ${e.toString()}`),...l.map(e=>`PHP: ${e.toString()}`)];return[{text:`Apply ${r.join(" + ")}`,variant:Qa.Action},{text:"",variant:Qa.Default,tooltipItems:n}]})(a);case me.NetworkMetrics:return[{text:"Collect",variant:Qa.Action},{text:" ",variant:Qa.Default},{text:"network flow and TCP stats metrics",variant:Qa.Endpoint}];default:return null}}(a?.type,t);return e?[...e,...at(t.sourceScopes)]:[]},[a?.type,t]),n=0===r.length;return e(yl,{title:n?ge:"Instrumentation Rule Preview",summary:r,renderAction:l})},Sl=({size:a=200,central:t=!1,useInline:l=!1})=>{const{tier:r}=Ya();if(l){if(t)return e(Oa,{size:a});switch(r){case Se.Community:return e(Ea,{size:a});case Se.Onprem:return e(La,{size:a});default:return null}}if(t)return e(Ia,{size:a});switch(r){case Se.Community:return e(Na,{size:a});case Se.Onprem:return e(Ra,{size:a});default:return null}},wl=[{value:"50",label:"50%"},{value:"25",label:"25%"},{value:"10",label:"10%"},{value:"1",label:"1%"},{value:"custom",label:"Custom"}],Tl=[{value:"10",label:"10%"},{value:"1",label:"1%"},{value:"0.5",label:"0.5%"},{value:"0.1",label:"0.1%"},{value:"custom",label:"Custom"}],Ml=[{value:"5000",label:"5s"},{value:"1000",label:"1s"},{value:"500",label:"500ms"},{value:"100",label:"100ms"},{value:"50",label:"50ms"},{value:"custom",label:"Custom"}],Al=({description:t,options:l,selected:r,onSelect:n,customName:i,customLabel:o,customPlaceholder:d,customValue:p,onCustomChange:u,customInputType:g=H.Number,customMin:m,customMax:v})=>a(s,{$gap:6,children:[e(c,{label:t}),a(h,{$gap:8,$alignItems:"flex-end",children:[e(ae,{options:l,selected:r,setSelected:n}),"custom"===r&&e(X,{name:i,label:o,placeholder:d,type:g,value:p,onChange:u,width:160,min:m,max:v})]})]}),Pl=()=>{},Ol=a=>a.readOnly?e(Ll,{rule:a.rule}):e(El,{ruleType:a.ruleType,formState:a.formState,onChange:a.onChange}),Ll=({rule:t})=>{const l=null!=t.durationAtLeastMs;return t.error?e(Q,{richTitle:{title:we},children:e(O,{name:"sampling-view-toggle-keep-errors",onChange:Pl,value:!0,size:E.S,label:Te,labelAlign:L.Right})}):l?e(Q,{richTitle:{title:Me},children:a("div",{children:[e(d,{size:u.XXXS,color:p.Secondary,children:Ae}),e(d,{size:u.XS,children:`${t.durationAtLeastMs}ms`})]})}):null},El=({ruleType:a,formState:t,onChange:l})=>{const r=ja(e=>l({durationPreset:e}),[l]),n=ja(e=>l({customDurationMs:e.target.value}),[l]);return"Duration"===a?e(Q,{richTitle:{title:Me,subTitle:Pe},children:e(Al,{description:Ae,options:Ml,selected:t.durationPreset,onSelect:r,customName:"sampling-input-custom-duration",customLabel:Oe,customPlaceholder:"200ms",customValue:t.customDurationMs,onCustomChange:n})}):null},Il=l.div`
192
192
  display: flex;
193
193
  gap: 32px;
194
- `,Nl=l.div`
194
+ `,Rl=l.div`
195
195
  display: flex;
196
196
  flex-direction: column;
197
197
  gap: 4px;
198
- `,Rl=l.div`
198
+ `,Nl=l.div`
199
199
  display: flex;
200
200
  flex-wrap: wrap;
201
201
  align-items: flex-end;
@@ -207,21 +207,21 @@ import{jsx as e,jsxs as a,Fragment as t}from"react/jsx-runtime";import l,{css as
207
207
  padding: 12px 16px;
208
208
  border-radius: 8px;
209
209
  background-color: ${({theme:e})=>e.v2.colors.black[500]};
210
- `,zl=l.div`
210
+ `,Dl=l.div`
211
211
  display: flex;
212
212
  align-items: flex-end;
213
213
  gap: 10px;
214
214
  flex: 1;
215
- `,Dl=l.div`
215
+ `,zl=l.div`
216
216
  display: flex;
217
217
  align-items: center;
218
218
  height: 32px;
219
- `,Xl=l.div`
219
+ `,_l=l.div`
220
220
  display: flex;
221
221
  align-items: flex-end;
222
222
  gap: 16px;
223
223
  margin-bottom: 12px;
224
- `,Hl="Any",_l="Kafka topic",Bl=()=>e("div",{style:{marginBottom:"8px"},children:e(d,{size:u.XS,weight:500,children:"And"})}),jl=[{value:"all",label:"All Operations"},{value:"httpServer",label:"HTTP Server"},{value:"httpClient",label:"HTTP Client"}],ql=[{value:"all",label:"All Operations"},{value:"httpServer",label:"HTTP Server"},{value:"kafkaConsumer",label:"Kafka Consumer"},{value:"kafkaProducer",label:"Kafka Producer"}],Kl=[{id:"",label:Hl},{id:"GET",label:"GET"},{id:"POST",label:"POST"},{id:"PUT",label:"PUT"},{id:"DELETE",label:"DELETE"},{id:"PATCH",label:"PATCH"}],Ul=a=>a.readOnly?e(Gl,{data:a.data}):e(Fl,{category:a.category,formState:a.formState,onChange:a.onChange}),Gl=({data:t})=>{const l=_a(()=>(e=>{if("noisy"===e.category){const a=e.rule.operation;if(a?.httpServer)return[{id:"type",title:Ke,value:qe},{id:"route",title:De,value:a.httpServer.route||a.httpServer.routePrefix||Ue},{id:"method",title:Be,value:a.httpServer.method||Hl}];if(a?.httpClient){const e=[{id:"type",title:Ke,value:Ge}];return a.httpClient.serverAddress&&e.push({id:"serverAddress",title:"Server address",value:a.httpClient.serverAddress}),e.push({id:"route",title:De,value:a.httpClient.templatedPath||a.httpClient.templatedPathPrefix||Ue}),e.push({id:"method",title:Be,value:a.httpClient.method||Hl}),e}return[{id:"type",title:Ke,value:Fe}]}const a=e.rule.operation;return a?.httpServer?[{id:"type",title:Ke,value:qe},{id:"route",title:De,value:a.httpServer.route||a.httpServer.routePrefix||Ue},{id:"method",title:Be,value:a.httpServer.method||Hl}]:a?.kafkaConsumer?[{id:"type",title:Ke,value:We},{id:"topic",title:_l,value:a.kafkaConsumer.kafkaTopic||Ue}]:a?.kafkaProducer?[{id:"type",title:Ke,value:Je},{id:"topic",title:_l,value:a.kafkaProducer.kafkaTopic||Ue}]:[{id:"type",title:Ke,value:Fe}]})(t),[t]);return e(Q,{richTitle:{title:Pe},children:e(Il,{children:l.map(({id:t,title:l,value:r})=>a(Nl,{children:[e(d,{size:u.XXXS,color:p.Secondary,nowrap:!0,children:l}),e(d,{size:u.XS,nowrap:!0,children:r})]},t))})})},Fl=({category:t,formState:l,onChange:r})=>{const n=_a(()=>"noisy"===t?jl:ql,[t]),i=ja(e=>r({operationType:e,route:"",serverAddress:"",method:"",kafkaTopic:""}),[r]),o=ja(e=>a=>{a&&r({routeType:e,route:""})},[r]),c=ja(e=>r({route:e.target.value}),[r]),d=ja(e=>r({serverAddress:e.target.value}),[r]),p=ja(e=>r({method:e[0]||""}),[r]),u=ja(e=>r({kafkaTopic:e.target.value}),[r]),h="httpServer"===l.operationType||"httpClient"===l.operationType,g="kafkaConsumer"===l.operationType||"kafkaProducer"===l.operationType,b="httpClient"===l.operationType?ze:De,f="httpClient"===l.operationType?Xe:He;return a(Q,{richTitle:{title:`2. ${Pe}`,subTitle:Ee},children:[e(s,{$alignItems:"flex-start",children:e(ae,{options:n,selected:l.operationType,setSelected:i})}),h&&a(Rl,{children:["httpClient"===l.operationType&&a(Xl,{children:[e(H,{name:"sampling-input-server-address",label:Ne,placeholder:Ie,value:l.serverAddress,onChange:d}),e(Bl,{})]}),a(Vl,{children:[a(zl,{children:[e(Dl,{children:e(Re,{"data-id":"sampling-radio-route",value:"route"===l.routeType,onChange:o("route")})}),e(H,{name:"sampling-input-route",label:b,placeholder:Ve,value:"route"===l.routeType?l.route:"",onChange:c,disabled:"route"!==l.routeType})]}),a(zl,{children:[e(Dl,{children:e(Re,{"data-id":"sampling-radio-route-prefix",value:"routePrefix"===l.routeType,onChange:o("routePrefix")})}),e(H,{name:"sampling-input-route-prefix",label:f,placeholder:Ve,value:"routePrefix"===l.routeType?l.route:"",onChange:c,disabled:"routePrefix"!==l.routeType})]})]}),a(Xl,{children:[e(Bl,{}),e(_e,{label:Be,items:Kl,selectedIds:[l.method||""],setSelectedIds:e=>p(e),buttonProps:{"data-id":"sampling-btn-method",label:Kl.find(e=>e.id===l.method)?.label||Hl,size:m.S,variant:v.Secondary}})]})]}),g&&e(H,{name:"sampling-input-kafka-topic",label:je,placeholder:"Type kafka topic",value:l.kafkaTopic,onChange:u,width:"320px"})]})},Wl=[{value:"all",label:"Drop All"},{value:"sample",label:"Sample"}],Jl=[{value:"all",label:"Keep All"},{value:"sample",label:"Sample"}],Yl=a=>a.readOnly?e(Zl,{data:a.data}):e(Ql,{category:a.category,formState:a.formState,onChange:a.onChange}),Zl=({data:t})=>{const l=_a(()=>(e=>{switch(e.category){case"highlyRelevant":return null!=e.rule.percentageAtLeast?{title:Ze,method:aa,description:Qe,value:`${e.rule.percentageAtLeast}%`}:{title:Ze,method:la,description:null,value:null};case"noisy":return tt(e.rule.percentageAtMost)?{title:Ze,method:ta,description:null,value:null}:{title:Ze,method:aa,description:ea,value:`${e.rule.percentageAtMost}%`};case"costReduction":return{title:Ze,method:aa,description:ea,value:`${e.rule.percentageAtMost}%`}}})(t),[t]),r=[{id:"method",title:Be,value:l.method},...null!=l.description?[{id:"value",title:l.description,value:l.value}]:[]];return e(Q,{richTitle:{title:l.title},children:e(Il,{children:r.map(({id:t,title:l,value:r})=>a(Nl,{children:[e(d,{size:u.XXXS,color:p.Secondary,nowrap:!0,children:l}),e(d,{size:u.XS,nowrap:!0,children:r})]},t))})})},Ql=({category:t,formState:l,onChange:r})=>{const n="highlyRelevant"===t,i=n?Jl:Wl,o=`${n?4:3}. ${Ze}`,c=Ye[t],d=n?Qe:ea,p="noisy"===t?Tl:wl,u=ja(e=>r({percentageMode:e}),[r]),h=ja(e=>r({percentagePreset:e}),[r]),g=ja(e=>r({customPercentage:e.target.value}),[r]);return a(Q,{richTitle:{title:o,subTitle:c},children:["costReduction"!==t&&e(s,{$alignItems:"flex-start",children:e(ae,{options:i,selected:l.percentageMode,setSelected:u})}),("costReduction"===t||"sample"===l.percentageMode)&&e(Al,{description:d,options:p,selected:l.percentagePreset,onSelect:h,customName:"sampling-input-custom-percentage",customPlaceholder:"5%",customValue:l.customPercentage,onCustomChange:g,customInputType:_.Decimal,customMin:0,customMax:100})]})},er=l.div`
224
+ `,Xl="Any",Hl="Kafka topic",Bl=()=>e("div",{style:{marginBottom:"8px"},children:e(d,{size:u.XS,weight:500,children:"And"})}),jl=[{value:"all",label:"All Operations"},{value:"httpServer",label:"HTTP Server"},{value:"httpClient",label:"HTTP Client"}],ql=[{value:"all",label:"All Operations"},{value:"httpServer",label:"HTTP Server"},{value:"kafkaConsumer",label:"Kafka Consumer"},{value:"kafkaProducer",label:"Kafka Producer"}],Ul=[{id:"",label:Xl},{id:"GET",label:"GET"},{id:"POST",label:"POST"},{id:"PUT",label:"PUT"},{id:"DELETE",label:"DELETE"},{id:"PATCH",label:"PATCH"}],Gl=a=>a.readOnly?e(Kl,{data:a.data}):e(Fl,{category:a.category,formState:a.formState,onChange:a.onChange}),Kl=({data:t})=>{const l=Ha(()=>(e=>{if("noisy"===e.category){const a=e.rule.operation;if(a?.httpServer)return[{id:"type",title:Ue,value:qe},{id:"route",title:ze,value:a.httpServer.route||a.httpServer.routePrefix||Ge},{id:"method",title:Be,value:a.httpServer.method||Xl}];if(a?.httpClient){const e=[{id:"type",title:Ue,value:Ke}];return a.httpClient.serverAddress&&e.push({id:"serverAddress",title:"Server address",value:a.httpClient.serverAddress}),e.push({id:"route",title:ze,value:a.httpClient.templatedPath||a.httpClient.templatedPathPrefix||Ge}),e.push({id:"method",title:Be,value:a.httpClient.method||Xl}),e}return[{id:"type",title:Ue,value:Fe}]}const a=e.rule.operation;return a?.httpServer?[{id:"type",title:Ue,value:qe},{id:"route",title:ze,value:a.httpServer.route||a.httpServer.routePrefix||Ge},{id:"method",title:Be,value:a.httpServer.method||Xl}]:a?.kafkaConsumer?[{id:"type",title:Ue,value:We},{id:"topic",title:Hl,value:a.kafkaConsumer.kafkaTopic||Ge}]:a?.kafkaProducer?[{id:"type",title:Ue,value:Je},{id:"topic",title:Hl,value:a.kafkaProducer.kafkaTopic||Ge}]:[{id:"type",title:Ue,value:Fe}]})(t),[t]);return e(Q,{richTitle:{title:Le},children:e(Il,{children:l.map(({id:t,title:l,value:r})=>a(Rl,{children:[e(d,{size:u.XXXS,color:p.Secondary,nowrap:!0,children:l}),e(d,{size:u.XS,nowrap:!0,children:r})]},t))})})},Fl=({category:t,formState:l,onChange:r})=>{const n=Ha(()=>"noisy"===t?jl:ql,[t]),i=ja(e=>r({operationType:e,route:"",serverAddress:"",method:"",kafkaTopic:""}),[r]),o=ja(e=>a=>{a&&r({routeType:e,route:""})},[r]),c=ja(e=>r({route:e.target.value}),[r]),d=ja(e=>r({serverAddress:e.target.value}),[r]),p=ja(e=>r({method:e[0]||""}),[r]),u=ja(e=>r({kafkaTopic:e.target.value}),[r]),h="httpServer"===l.operationType||"httpClient"===l.operationType,g="kafkaConsumer"===l.operationType||"kafkaProducer"===l.operationType,b="httpClient"===l.operationType?De:ze,f="httpClient"===l.operationType?_e:Xe;return a(Q,{richTitle:{title:`2. ${Le}`,subTitle:Ee},children:[e(s,{$alignItems:"flex-start",children:e(ae,{options:n,selected:l.operationType,setSelected:i})}),h&&a(Nl,{children:["httpClient"===l.operationType&&a(_l,{children:[e(X,{name:"sampling-input-server-address",label:Re,placeholder:Ie,value:l.serverAddress,onChange:d}),e(Bl,{})]}),a(Vl,{children:[a(Dl,{children:[e(zl,{children:e(Ne,{"data-id":"sampling-radio-route",value:"route"===l.routeType,onChange:o("route")})}),e(X,{name:"sampling-input-route",label:b,placeholder:Ve,value:"route"===l.routeType?l.route:"",onChange:c,disabled:"route"!==l.routeType})]}),a(Dl,{children:[e(zl,{children:e(Ne,{"data-id":"sampling-radio-route-prefix",value:"routePrefix"===l.routeType,onChange:o("routePrefix")})}),e(X,{name:"sampling-input-route-prefix",label:f,placeholder:Ve,value:"routePrefix"===l.routeType?l.route:"",onChange:c,disabled:"routePrefix"!==l.routeType})]})]}),a(_l,{children:[e(Bl,{}),e(He,{label:Be,items:Ul,selectedIds:[l.method||""],setSelectedIds:e=>p(e),buttonProps:{"data-id":"sampling-btn-method",label:Ul.find(e=>e.id===l.method)?.label||Xl,size:m.S,variant:v.Secondary}})]})]}),g&&e(X,{name:"sampling-input-kafka-topic",label:je,placeholder:"Type kafka topic",value:l.kafkaTopic,onChange:u,width:"320px"})]})},Wl=[{value:"all",label:"Drop All"},{value:"sample",label:"Sample"}],Jl=[{value:"all",label:"Keep All"},{value:"sample",label:"Sample"}],Yl=a=>a.readOnly?e(Zl,{data:a.data}):e(Ql,{category:a.category,formState:a.formState,onChange:a.onChange}),Zl=({data:t})=>{const l=Ha(()=>(e=>{switch(e.category){case"highlyRelevant":return null!=e.rule.percentageAtLeast?{title:Ze,method:aa,description:Qe,value:`${e.rule.percentageAtLeast}%`}:{title:Ze,method:la,description:null,value:null};case"noisy":return tt(e.rule.percentageAtMost)?{title:Ze,method:ta,description:null,value:null}:{title:Ze,method:aa,description:ea,value:`${e.rule.percentageAtMost}%`};case"costReduction":return{title:Ze,method:aa,description:ea,value:`${e.rule.percentageAtMost}%`}}})(t),[t]),r=[{id:"method",title:Be,value:l.method},...null!=l.description?[{id:"value",title:l.description,value:l.value}]:[]];return e(Q,{richTitle:{title:l.title},children:e(Il,{children:r.map(({id:t,title:l,value:r})=>a(Rl,{children:[e(d,{size:u.XXXS,color:p.Secondary,nowrap:!0,children:l}),e(d,{size:u.XS,nowrap:!0,children:r})]},t))})})},Ql=({category:t,formState:l,onChange:r})=>{const n="highlyRelevant"===t,i=n?Jl:Wl,o=`${n?4:3}. ${Ze}`,c=Ye[t],d=n?Qe:ea,p="noisy"===t?Tl:wl,u=ja(e=>r({percentageMode:e}),[r]),h=ja(e=>r({percentagePreset:e}),[r]),g=ja(e=>r({customPercentage:e.target.value}),[r]);return a(Q,{richTitle:{title:o,subTitle:c},children:["costReduction"!==t&&e(s,{$alignItems:"flex-start",children:e(ae,{options:i,selected:l.percentageMode,setSelected:u})}),("costReduction"===t||"sample"===l.percentageMode)&&e(Al,{description:d,options:p,selected:l.percentagePreset,onSelect:h,customName:"sampling-input-custom-percentage",customPlaceholder:"5%",customValue:l.customPercentage,onCustomChange:g,customInputType:H.Decimal,customMin:0,customMax:100})]})},er=l.div`
225
225
  display: flex;
226
226
  align-items: flex-end;
227
227
  gap: 16px;
@@ -231,7 +231,7 @@ import{jsx as e,jsxs as a,Fragment as t}from"react/jsx-runtime";import l,{css as
231
231
  `,tr=l.div`
232
232
  flex: 1;
233
233
  min-width: 0;
234
- `;function lr(e){return"highlyRelevant"===e.category?e.rule.error?"Error":null!=e.rule.durationAtLeastMs?"Duration":"Relevance":pa[e.category]}const rr=a=>a.readOnly?e(nr,{data:a.data}):e(ir,{formState:a.formState,onChange:a.onChange}),nr=({data:t})=>{const l=_a(()=>[{id:"name",title:na,value:t.rule.name||ra},{id:"type",title:ia,value:lr(t)}],[t]),r=t.rule.notes||Ue;return a(Q,{children:[e(Il,{children:l.map(({id:t,title:l,value:r})=>a(Nl,{children:[e(d,{size:u.XXXS,color:p.Secondary,nowrap:!0,children:l}),e(d,{size:u.XS,nowrap:!0,children:r})]},t))}),a(Nl,{children:[e(d,{size:u.XXXS,color:p.Secondary,children:oa}),e(d,{size:u.XS,children:r})]})]})},ir=({formState:t,onChange:l})=>{const r=ja(e=>l({name:e.target.value}),[l]),n=ja(e=>l({notes:e.target.value}),[l]);return e(Q,{children:a(er,{children:[e(ar,{children:e(H,{name:"sampling-input-rule-name",label:na,tooltip:"Optional. Give this rule a name for easier identification.",placeholder:sa,value:t.name,onChange:r})}),e(tr,{children:e(H,{name:"sampling-input-note",label:oa,tooltip:da,placeholder:ca,value:t.notes,onChange:n})})]})})},or=[{value:"Relevance",label:"Relevance"},{value:"Error",label:"Error"},{value:"Duration",label:"Duration"}],sr=({formState:a,onChange:t})=>{const l=ja(e=>t({ruleType:e,keepErrors:"Error"===e}),[t]);return e(Q,{richTitle:{title:`3. ${ia}`,subTitle:ua},children:e(s,{$alignItems:"flex-start",children:e(ae,{options:or,selected:a.ruleType,setSelected:l})})})},cr=a=>{const t=_a(()=>{if(a.readOnly)return a.summary;switch(a.category){case"noisy":return nt(st(a.formState));case"highlyRelevant":return rt(ot(a.formState));case"costReduction":return lt(it(a.formState))}},[a]);if(a.readOnly)return e(yl,{title:ha,summary:t,renderAction:a.renderAction});const l=1===t.length&&"default"===t[0].variant;return e(yl,{title:l?ge:ha,summary:l?[]:t,renderAction:a.renderAction})},dr=(e,a)=>!a?.length||!!a?.find(a=>a===e),pr=({title:t="Signals",required:l,errorMessage:r,allowedSignals:n,selectedSignals:i,setSelectedSignals:o,disabled:d})=>{const[p,u]=qa(1===i.length),g=Ba(JSON.stringify(i));return Ka(()=>{let e=ga(i).filter(e=>dr(e,n));e.length||(e=ma.filter(({id:e})=>dr(e,n)).map(({id:e})=>e));const a=JSON.stringify(e);g.current!==a&&(g.current=a,o(e),u(1===e.length))},[n,i]),a(s,{$gap:12,children:[e(c,{label:t,required:l}),e(h,{$gap:12,children:ma.map(a=>{const t=dr(a.id,n),l=((e,a)=>!!a?.find(a=>a===e))(a.id,i);return t?e(N,{label:a.value,disabled:d||!t||p&&l,value:l,onChange:e=>((e,a)=>{const t=e,l=a?[...i,t]:i.filter(e=>e!==t);o(l),u(1===l.length)})(a.id,e)},a.id):null})}),e(b,{errorMessage:r})]})},ur=({minSupportedVersion:a,currentVersion:t})=>e(f,{isOpen:!0,onClose:()=>{},relativeToParent:!0,visual:()=>e(A,{scale:2.4,icon:()=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"21",viewBox:"0 0 22 21",fill:"none",children:e("path",{fill:"#151618",d:"M9.4844 0.730003C9.99694 -0.243259 11.4076 -0.24341 11.92 0.730003L11.9685 0.831353L14.3039 6.22012L20.153 6.77755C21.3553 6.89211 21.841 8.38683 20.9358 9.18621L16.5314 13.0731L17.8091 18.8079C18.0716 19.9868 16.8005 20.9109 15.7605 20.2969L10.7017 17.3093L5.64282 20.2969C4.60289 20.9104 3.33173 19.9866 3.59427 18.8079L4.87192 13.0741L0.468608 9.18621C-0.43662 8.38693 0.0482932 6.8924 1.25029 6.77755L7.09837 6.22012L9.43588 0.831353L9.4844 0.730003ZM8.55284 7.02876C8.35287 7.48992 7.9179 7.80589 7.41751 7.85357L2.03952 8.36571L6.09027 11.941C6.46691 12.2737 6.63296 12.7852 6.5237 13.2758L5.34956 18.5459L10.0008 15.8009L10.1669 15.7179C10.5087 15.574 10.8945 15.5741 11.2364 15.7179L11.4036 15.8009L16.0538 18.5459L14.8807 13.2758C14.7714 12.7851 14.9374 12.2737 15.3141 11.941L19.3627 8.36571L13.9858 7.85357C13.4855 7.80587 13.0505 7.4899 12.8505 7.02876L10.7017 2.07342L8.55284 7.02876Z"})})}),title:"Upgrade Required",description:`To use this feature, please upgrade to Odigos v${a} or later.\nCurrent version: ${t}.`}),hr=l.div`
234
+ `;function lr(e){return"highlyRelevant"===e.category?e.rule.error?"Error":null!=e.rule.durationAtLeastMs?"Duration":"Relevance":pa[e.category]}const rr=a=>a.readOnly?e(nr,{data:a.data}):e(ir,{formState:a.formState,onChange:a.onChange}),nr=({data:t})=>{const l=Ha(()=>[{id:"name",title:na,value:t.rule.name||ra},{id:"type",title:ia,value:lr(t)}],[t]),r=t.rule.notes||Ge;return a(Q,{children:[e(Il,{children:l.map(({id:t,title:l,value:r})=>a(Rl,{children:[e(d,{size:u.XXXS,color:p.Secondary,nowrap:!0,children:l}),e(d,{size:u.XS,nowrap:!0,children:r})]},t))}),a(Rl,{children:[e(d,{size:u.XXXS,color:p.Secondary,children:oa}),e(d,{size:u.XS,children:r})]})]})},ir=({formState:t,onChange:l})=>{const r=ja(e=>l({name:e.target.value}),[l]),n=ja(e=>l({notes:e.target.value}),[l]);return e(Q,{children:a(er,{children:[e(ar,{children:e(X,{name:"sampling-input-rule-name",label:na,tooltip:"Optional. Give this rule a name for easier identification.",placeholder:sa,value:t.name,onChange:r})}),e(tr,{children:e(X,{name:"sampling-input-note",label:oa,tooltip:da,placeholder:ca,value:t.notes,onChange:n})})]})})},or=[{value:"Relevance",label:"Relevance"},{value:"Error",label:"Error"},{value:"Duration",label:"Duration"}],sr=({formState:a,onChange:t})=>{const l=ja(e=>t({ruleType:e,keepErrors:"Error"===e}),[t]);return e(Q,{richTitle:{title:`3. ${ia}`,subTitle:ua},children:e(s,{$alignItems:"flex-start",children:e(ae,{options:or,selected:a.ruleType,setSelected:l})})})},cr=a=>{const t=Ha(()=>{if(a.readOnly)return a.summary;switch(a.category){case"noisy":return nt(st(a.formState));case"highlyRelevant":return rt(ot(a.formState));case"costReduction":return lt(it(a.formState))}},[a]);if(a.readOnly)return e(yl,{title:ha,summary:t,renderAction:a.renderAction});const l=1===t.length&&"default"===t[0].variant;return e(yl,{title:l?ge:ha,summary:l?[]:t,renderAction:a.renderAction})},dr=(e,a)=>!a?.length||!!a?.find(a=>a===e),pr=({title:t="Signals",required:l,errorMessage:r,allowedSignals:n,selectedSignals:i,setSelectedSignals:o,disabled:d})=>{const[p,u]=qa(1===i.length),g=Ba(JSON.stringify(i));return Ua(()=>{let e=ga(i).filter(e=>dr(e,n));e.length||(e=ma.filter(({id:e})=>dr(e,n)).map(({id:e})=>e));const a=JSON.stringify(e);g.current!==a&&(g.current=a,o(e),u(1===e.length))},[n,i]),a(s,{$gap:12,children:[e(c,{label:t,required:l}),e(h,{$gap:12,children:ma.map(a=>{const t=dr(a.id,n),l=((e,a)=>!!a?.find(a=>a===e))(a.id,i);return t?e(R,{label:a.value,disabled:d||!t||p&&l,value:l,onChange:e=>((e,a)=>{const t=e,l=a?[...i,t]:i.filter(e=>e!==t);o(l),u(1===l.length)})(a.id,e)},a.id):null})}),e(b,{errorMessage:r})]})},ur=({minSupportedVersion:a,currentVersion:t})=>e(f,{isOpen:!0,onClose:()=>{},relativeToParent:!0,visual:()=>e(A,{scale:2.4,icon:()=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"21",viewBox:"0 0 22 21",fill:"none",children:e("path",{fill:"#151618",d:"M9.4844 0.730003C9.99694 -0.243259 11.4076 -0.24341 11.92 0.730003L11.9685 0.831353L14.3039 6.22012L20.153 6.77755C21.3553 6.89211 21.841 8.38683 20.9358 9.18621L16.5314 13.0731L17.8091 18.8079C18.0716 19.9868 16.8005 20.9109 15.7605 20.2969L10.7017 17.3093L5.64282 20.2969C4.60289 20.9104 3.33173 19.9866 3.59427 18.8079L4.87192 13.0741L0.468608 9.18621C-0.43662 8.38693 0.0482932 6.8924 1.25029 6.77755L7.09837 6.22012L9.43588 0.831353L9.4844 0.730003ZM8.55284 7.02876C8.35287 7.48992 7.9179 7.80589 7.41751 7.85357L2.03952 8.36571L6.09027 11.941C6.46691 12.2737 6.63296 12.7852 6.5237 13.2758L5.34956 18.5459L10.0008 15.8009L10.1669 15.7179C10.5087 15.574 10.8945 15.5741 11.2364 15.7179L11.4036 15.8009L16.0538 18.5459L14.8807 13.2758C14.7714 12.7851 14.9374 12.2737 15.3141 11.941L19.3627 8.36571L13.9858 7.85357C13.4855 7.80587 13.0505 7.4899 12.8505 7.02876L10.7017 2.07342L8.55284 7.02876Z"})})}),title:M.UPGRADE_REQUIRED,description:`${M.UPGRADE_TO_USE_FEATURE(a)}\n${M.CURRENT_VERSION(t)}`}),hr=l.div`
235
235
  display: flex;
236
236
  flex-direction: column;
237
237
  justify-content: flex-end;
@@ -278,7 +278,7 @@ import{jsx as e,jsxs as a,Fragment as t}from"react/jsx-runtime";import l,{css as
278
278
  padding: 5vh 10vw;
279
279
  border-radius: 12px;
280
280
  background-color: ${({theme:e})=>e.v2.colors.silver[800]};
281
- `,$r=Ga(({isOpen:t,withOverlay:l,disableAnimation:r,onClose:n,onBack:o,onNext:s,nextIsSkip:c,onSave:d,disableSave:p,connectionIds:h,header:g,subHeader:m,leftColumn:b,rightColumn:y,search:x,filters:C,errorMessage:k,isFormDirty:$,hideDirtyNote:S,forcedNote:w,isFetching:T,progress:M},A)=>{const[O,L]=qa(!1),[P,E]=qa(!1),[I,N]=qa(void 0);Fa(A,()=>({clearErrors:()=>N(void 0)}));const R=P,V=ja(()=>{$&&!O?L(!0):(L(!1),n?.())},[$,O,n]),z=p||P||"boolean"==typeof $&&!$,D=ja(async()=>{E(!0);const e=await d();E(!1),!1!==e&&(e?.error?N(e.error):(h?.setValue([]),n?.()))},[d,h,n]),X=!!x||!!h||!!C,H=!!m,_=(X?48:0)+(H?50:0),B=_a(()=>w||(T?{status:q.Info,message:"Fetching Data..."}:P&&!M?{status:q.Info,message:"Saving Changes..."}:I||k?{status:q.Error,message:I||k}:"boolean"!=typeof $||S?void 0:$?{status:q.Info,message:'The values don\'t reflect the current configurations of the selected clusters.\n"Save" will override the current configurations.'}:{status:q.Success,message:"The values reflect the current configuration of the selected cluster."}),[T,P,M,I,k,$,S,w]),j=_a(()=>o?{label:"Back",leftIcon:Va,variant:v.Secondary,onClick:o}:{label:"Cancel",variant:v.Secondary,onClick:V,disabled:R},[o,V,R]),[K,U]=qa(!1),G=_a(()=>s?c?{"data-id":"wide-drawer-skip",label:"Skip",rightIcon:za,variant:v.Secondary,onClick:()=>U(!0)}:{"data-id":"wide-drawer-next",label:"Next",rightIcon:za,variant:v.Primary,onClick:s}:{"data-id":"wide-drawer-save",label:"Save",variant:v.Primary,onClick:D,disabled:z},[s,c,D,z]);return a(i,{width:br,isOpen:t,disableAnimation:r,hideOverlay:!P&&!l,header:{...g,onClose:n?V:void 0,onCloseDisabled:R},footer:{note:B,actions:[j,G]},children:[P?e(ba,{$height:"calc(100vh - 136px)",children:e(kr,{children:e(fa,{titleSize:u.S,subTitleSize:u.XXXS,withGradient:!0,withSpinner:!0,...M})})}):a(fr,{children:[X&&a(yr,{children:[h&&e(ya,{icon:Ma,title:"Selected Clusters",badge:{label:h.value.length}}),x&&e(xa,{...x,width:x.width??"100%"}),C]}),H&&e(xr,{children:e(ya,{icon:m.icon,title:m.title,subTitle:m.description,badge:m.badge})}),a(Cr,{children:[e(vr,{isLeft:!0,heightOffset:_,...b}),e(vr,{isRight:!0,heightOffset:_,...y})]})]}),e(Ot,{isOpen:O,onClose:()=>L(!1),onApprove:V}),e(f,{title:"Skip setup?",description:"Without completing setup, Odigos won't be able to collect and send your telemetry data. This may interrupt your data flow and limit the platform's ability to provide value.",isOpen:K,onClose:()=>U(!1),denyButton:{label:"Go Back",variant:v.Secondary,onClick:()=>U(!1)},approveButton:{label:"Skip",variant:v.Primary,onClick:()=>{s?.(),U(!1)}}})]})});$r.displayName=$r.name;const Sr=l.div`
281
+ `,$r=Ka(({isOpen:t,withOverlay:l,disableAnimation:r,onClose:n,onBack:o,onNext:s,nextIsSkip:c,onSave:d,disableSave:p,connectionIds:h,header:g,subHeader:m,leftColumn:b,rightColumn:y,search:x,filters:C,errorMessage:k,isFormDirty:$,allowSaveWhenPristine:S,hideDirtyNote:w,forcedNote:T,isFetching:M,progress:A},P)=>{const[O,L]=qa(!1),[E,I]=qa(!1),[R,N]=qa(void 0);Fa(P,()=>({clearErrors:()=>N(void 0)}));const V=E,D=ja(()=>{$&&!O?L(!0):(L(!1),n?.())},[$,O,n]),z=p||E||!S&&"boolean"==typeof $&&!$,_=ja(async()=>{I(!0);const e=await d();I(!1),!1!==e&&(e?.error?N(e.error):(h?.setValue([]),n?.()))},[d,h,n]),X=!!x||!!h||!!C,H=!!m,B=(X?48:0)+(H?50:0),j=Ha(()=>T||(M?{status:q.Info,message:"Fetching Data..."}:E&&!A?{status:q.Info,message:"Saving Changes..."}:R||k?{status:q.Error,message:R||k}:"boolean"!=typeof $||w?void 0:$?{status:q.Info,message:'The values don\'t reflect the current configurations of the selected clusters.\n"Save" will override the current configurations.'}:{status:q.Success,message:"The values reflect the current configuration of the selected cluster."}),[M,E,A,R,k,$,w,T]),U=Ha(()=>o?{label:"Back",leftIcon:Va,variant:v.Secondary,onClick:o}:{label:"Cancel",variant:v.Secondary,onClick:D,disabled:V},[o,D,V]),[G,K]=qa(!1),F=Ha(()=>s?c?{"data-id":"wide-drawer-skip",label:"Skip",rightIcon:Da,variant:v.Secondary,onClick:()=>K(!0)}:{"data-id":"wide-drawer-next",label:"Next",rightIcon:Da,variant:v.Primary,onClick:s}:{"data-id":"wide-drawer-save",label:"Save",variant:v.Primary,onClick:_,disabled:z},[s,c,_,z]);return a(i,{width:br,isOpen:t,disableAnimation:r,hideOverlay:!E&&!l,header:{...g,onClose:n?D:void 0,onCloseDisabled:V},footer:{note:j,actions:[U,F]},children:[E?e(ba,{$height:"calc(100vh - 136px)",children:e(kr,{children:e(fa,{titleSize:u.S,subTitleSize:u.XXXS,withGradient:!0,withSpinner:!0,...A})})}):a(fr,{children:[X&&a(yr,{children:[h&&e(ya,{icon:Ma,title:"Selected Clusters",badge:{label:h.value.length}}),x&&e(xa,{...x,width:x.width??"100%"}),C]}),H&&e(xr,{children:e(ya,{icon:m.icon,title:m.title,subTitle:m.description,badge:m.badge})}),a(Cr,{children:[e(vr,{isLeft:!0,heightOffset:B,...b}),e(vr,{isRight:!0,heightOffset:B,...y})]})]}),e(Pt,{isOpen:O,onClose:()=>L(!1),onApprove:D}),e(f,{title:"Skip setup?",description:"Without completing setup, Odigos won't be able to collect and send your telemetry data. This may interrupt your data flow and limit the platform's ability to provide value.",isOpen:G,onClose:()=>K(!1),denyButton:{label:"Go Back",variant:v.Secondary,onClick:()=>K(!1)},approveButton:{label:"Skip",variant:v.Primary,onClick:()=>{s?.(),K(!1)}}})]})});$r.displayName=$r.name;const Sr=l.div`
282
282
  padding: 0 24px;
283
283
  border-radius: 12px;
284
284
  background-color: ${({$codeBgColor:e})=>e||"transparent"};
@@ -308,4 +308,4 @@ import{jsx as e,jsxs as a,Fragment as t}from"react/jsx-runtime";import l,{css as
308
308
  pre {
309
309
  margin: 0;
310
310
  }
311
- `,Or=({title:t="YAML",yaml:l,defaultOpen:r,fullHeight:n,bgTint:i="1000",codeBgColor:o,compact:s})=>{const{clickCopy:c,isCopied:h,CopyButton:g}=y(),b=_a(()=>l?[{id:ka(),type:Ca.Button,buttonProps:{variant:v.Text,size:m.S,leftIcon:h?Sa:Da,onClick:()=>c(l||""),disabled:h}}]:[],[l,h]);return s?a(wr,{children:[a(Tr,{children:[e(Xa,{size:16}),e(Mr,{children:e(d,{size:u.XXS,color:p.Primary,children:t})}),l&&e(g,{value:l})]}),l?e(Ar,{children:e(w,{code:l,language:"yaml",theme:"duotoneDark"})}):e($,{title:"YAML not found",subTitle:"The YAML for this resource is not available"})]}):e(S,{bgTint:i,richTitle:{icon:Xa,title:t},actions:b,withCollapse:!0,collapseIsDefaultOpen:r,fullHeight:n,children:e(Sr,{$codeBgColor:o,children:l?e(w,{code:l,language:"yaml",theme:"duotoneDark"}):e(ba,{children:e($,{title:"YAML not found",subTitle:"The YAML for this resource is not available"})})})})};export{At as A,Ot as C,Ml as D,vl as E,$l as I,Tl as N,Sl as O,wl as P,rr as R,cr as S,ur as U,br as W,Or as Y,Et as a,It as b,Nt as c,Ll as d,ml as e,Rt as f,gl as g,Ul as h,Yl as i,Al as j,sr as k,pr as l,Ft as m,$r as n,Tt as o,yl as p};
311
+ `,Pr=({title:t="YAML",yaml:l,defaultOpen:r,fullHeight:n,bgTint:i="1000",codeBgColor:o,compact:s})=>{const{clickCopy:c,isCopied:h,CopyButton:g}=y(),b=Ha(()=>l?[{id:ka(),type:Ca.Button,buttonProps:{variant:v.Text,size:m.S,leftIcon:h?Sa:za,onClick:()=>c(l||""),disabled:h}}]:[],[l,h]);return s?a(wr,{children:[a(Tr,{children:[e(_a,{size:16}),e(Mr,{children:e(d,{size:u.XXS,color:p.Primary,children:t})}),l&&e(g,{value:l})]}),l?e(Ar,{children:e(w,{code:l,language:"yaml",theme:"duotoneDark"})}):e($,{title:"YAML not found",subTitle:"The YAML for this resource is not available"})]}):e(S,{bgTint:i,richTitle:{icon:_a,title:t},actions:b,withCollapse:!0,collapseIsDefaultOpen:r,fullHeight:n,children:e(Sr,{$codeBgColor:o,children:l?e(w,{code:l,language:"yaml",theme:"duotoneDark"}):e(ba,{children:e($,{title:"YAML not found",subTitle:"The YAML for this resource is not available"})})})})};export{At as A,Pt as C,Ml as D,vl as E,$l as I,Tl as N,Sl as O,wl as P,rr as R,cr as S,ur as U,br as W,Pr as Y,Et as a,It as b,Rt as c,Ol as d,ml as e,Nt as f,gl as g,Gl as h,Yl as i,Al as j,sr as k,pr as l,Ft as m,$r as n,Tt as o,yl as p};