@odigos/ui-kit 0.0.295 → 0.0.296
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/lib/chunks/{helpers-CVRjhvw4.js → helpers-BV_MHw06.js} +1 -1
- package/lib/chunks/index-vZsC8Ggg.js +353 -0
- package/lib/chunks/{source-instrument-form-context-CgGshOFa.js → source-instrument-form-context-CWv4NCRf.js} +1 -1
- package/lib/chunks/{ui-components-DwtaxXwl.js → ui-components-BlmdA--F.js} +14 -19
- package/lib/components/field-title/index.d.ts +1 -1
- package/lib/components/input/index.d.ts +3 -1
- package/lib/components/table/types.d.ts +1 -0
- package/lib/components/trace-view/types.d.ts +2 -1
- package/lib/components.js +1 -1
- package/lib/constants.js +1 -1
- package/lib/containers/insights/findings/drawer/anomaly/anomaly-trace-compare/helpers.d.ts +2 -2
- package/lib/containers.js +200 -200
- package/lib/contexts/odigos-api/types.d.ts +1 -0
- package/lib/contexts.js +1 -1
- package/lib/functions/parse-raw-otlp/index.d.ts +2 -1
- package/lib/functions.js +1 -1
- package/lib/hooks.js +1 -1
- package/lib/icons.js +1 -1
- package/lib/snippets/blast-radius/helpers.d.ts +5 -5
- package/lib/snippets/blast-radius/types.d.ts +0 -4
- package/lib/snippets.js +1 -1
- package/lib/store.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/types.js +1 -1
- package/lib/visuals.js +1 -1
- package/package.json +1 -1
- package/lib/chunks/index-B13xWqwt.js +0 -342
|
@@ -193,7 +193,7 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import n,{css as
|
|
|
193
193
|
background-clip: text;
|
|
194
194
|
color: transparent;
|
|
195
195
|
animation: ${Bl} 1s reverse linear infinite;
|
|
196
|
-
`,Hl=e=>{const t=Math.max(0,Date.now()-e),i=Math.floor(t/1e3),n=Math.floor(i/60),r=i%60;return`${String(n).padStart(2,"0")}:${String(r).padStart(2,"0")}`},Wl=({icon:i,title:n,titleColor:r,titleSize:a=ja.S,subTitle:s,subTitleColor:l,subTitleSize:d=ja.XXXS,startedAt:c,withGradient:u,gradientColor:p,withSpinner:h,withSpinnerOld:g,scaleSpinnerOld:m=1,percentage:f,withVisual:b,visualIcon:y=et})=>{const v=o(),[$,w]=Ht(()=>c?Hl(c):"");Wt(()=>{if(!c)return;w(Hl(c));const e=setInterval(()=>w(Hl(c)),1e3);return()=>clearInterval(e)},[c]);const S=r||v.v2.colors.white[500],x=l||v.v2.colors.silver[200],C=p||v.v2.colors.black[500];return e(Dl,{$gap:16,$alignItems:"center",children:[b?t(wl,{scale:1.7,icon:y}):h?t(gl,{percentage:f}):g?t(vl,{scale:m}):null,(n||s||c||i||u)&&e(Dl,{$gap:8,$alignItems:"center",children:[e(_l,{$gap:4,children:[i&&t(i,{}),u?t(jl,{align:"center",size:a,$titleColor:S,$gradientColor:C,nowrap:!0,children:n||"Loading..."}):n?t(Va,{align:"center",size:a,color:S,children:n}):null]}),s?t(Va,{align:"center",size:d,color:x,children:s}):null,$?t(Va,{align:"center",size:d,color:S,children:$}):null]})]})},Xl=(e,t)=>({[Oi.Default]:i=>ee({fill:dl(t,e,"300"),...i}),[Oi.Info]:i=>rt({fill:dl(t,e,"400"),...i}),[Oi.Error]:i=>nt({fill:dl(t,e,"500"),...i}),[Oi.Warning]:i=>it({fill:dl(t,e,"500"),...i}),[Oi.Success]:i=>p({fill:dl(t,e,"500"),...i}),[Oi.Loading]:e=>Wl({withSpinnerOld:!0,...e}),[Oi.Disabled]:i=>h({fill:dl(t,e,"400"),...i}),[Oi.Unknown]:i=>tt({fill:dl(t,e,"300"),...i})}[e]),Gl=e=>{switch(e){case Ui.Success:return Oi.Success;case Ui.Error:case Ui.Failure:return Oi.Error;case Ui.Notice:return Oi.Warning;case Ui.Unsupported:case Ui.Unknown:return Oi.Info;case Ui.Irrelevant:case Ui.Disabled:return Oi.Disabled;case Ui.Waiting:return Oi.Loading;case Ui.Pending:default:return Oi.Default}},Vl=(e,t)=>{const i=t.find(([t,i])=>e>=t&&(null===i||e<=i));return i?.[2]||null},Kl={redis:f,mysql:v,postgresql:b,postgres:b,kafka:m,elasticsearch:ye,clickhouse:Ee,oracle:J,aws:ot},Yl={sts:bt,dynamodb:ft,s3:W,sqs:mt,sns:gt,lambda:ht,kinesis:pt,ec2:ut,apigateway:ct,apigatewayv2:ct,bedrock:dt,bedrockruntime:dt,eventbridge:lt,sfn:st,stepfunctions:st,secretsmanager:at,cloudwatch:Ce},Jl=e=>{const t=e.attributes,i=t["db.system"];if(i){const e=Kl[i.toLowerCase()];if(e)return e}const n=t["messaging.system"];if(n){const e=Kl[n.toLowerCase()];if(e)return e}const r=t["rpc.system"];if(r?.toLowerCase().includes("aws")){const e=t["rpc.service"]?.toLowerCase();if(e){const t=Yl[e];if(t)return t}return ot}const o=e.serviceName.toLowerCase();for(const[e,t]of Object.entries(Kl))if(o.includes(e))return t;return ze},ql=e=>{if(!e)return{namespace:"",name:"",kind:""};if("id"in e&&"object"==typeof e.id)return{namespace:e.id.namespace,name:e.id.name,kind:e.id.kind,region:e.id.region||void 0};const{namespace:t,name:i,kind:n,region:r}=e;return{namespace:t,name:i,kind:n,region:r||void 0}},Ql=(e,t)=>{const i=[],n=JSON.parse(JSON.stringify(e));for(const e of n){const n=ls(t.fields,{}),r=e.items.findIndex(e=>e.type===t.destinationType.type);-1!==r&&i.push(...e.items[r].fields.map(e=>({...e,initialValue:n[e.name]})))}return i},Zl=(e,t)=>{const i=e=>e?.some(({healthy:e})=>e.status!==Oi.Success);return e?.length?e.some(({instrumentationInstances:e})=>i(e)):i(t)??!1};function ed(e){if(!e||0===e.length)return null;const t=[],i=[],n=[];for(const r of e){if(!r)continue;const e=r.workloadName??"",o=r.workloadKind??"",a=r.workloadNamespace??"",s=r.workloadLanguage??"";e||o?t.push({namespace:a,kind:o,name:e}):a&&i.push(a),s&&n.push(s)}return 0===t.length&&0===i.length&&0===n.length?null:{sources:t,namespaces:i,languages:n}}function td(e){if(!e)return null;const t=[];for(const i of e.sources??[])t.push({workloadName:i.name||null,workloadKind:i.kind||null,workloadNamespace:i.namespace||null});for(const i of e.namespaces??[])t.push({workloadNamespace:i});for(const i of e.languages??[])t.push({workloadLanguage:i});return t.length?t:null}function id(e){const{sourcesScopes:t,...i}=e;return{...i,sourceScopes:ed(t??null)}}function nd(e){const{sourceScopes:t,...i}=e;return{...i,sourcesScopes:td(t??null)}}const rd=e=>Array.isArray(e)?!e?.length:"object"==typeof e?!Object.keys(e||{}).length:[void 0,null,""].includes(e),od=e=>!!e&&(!(e.length>63)&&/^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$/.test(e)),ad=(e,t=0)=>{const i=(new Date).getTime();return new Date(e).getTime()-i<=t},sd=e=>{const t=String(e).trim().toLowerCase();return["true","false","1","0"].includes(t)},ld=(e,t=0)=>(new Date).getTime()-new Date(e).getTime()>=t,dd=/^v?\d+(\.\d+)*(-[0-9A-Za-z\-~][0-9A-Za-z\-~.]*)?(\+[0-9A-Za-z\-~][0-9A-Za-z\-~.]*)?$/,cd=e=>dd.test(e),ud=e=>e?.map(({status:e,type:t,reason:i,message:n})=>({status:e?.toLowerCase(),type:za(t),reason:i?za(i):"",message:n}))||[],pd=(e,t)=>{const i=ls(e.fields,{});return t.length?t.map(e=>({key:e.name,name:e.displayName||e.name,value:i[e.name]??null})).filter(e=>null!==e.value):Object.entries(i).map(([e,t])=>({key:e,name:e,value:t}))},hd=e=>e?Object.keys(e).filter(t=>e[t]).map(e=>Zi[e]):[],gd=e=>e?Object.keys(e).filter(t=>e[t].supported).map(e=>Zi[e]):[],md=e=>{let t=e.replace(/[^\d.]/g,"");const i=t.indexOf(".");return-1!==i&&(t=t.slice(0,i+1)+t.slice(i+1).replace(/\./g,"")),t},fd=e=>e.replace(/[^\d]/g,""),bd=e=>{const t=String(e).trim().toLowerCase();return"true"===t||"1"===t},yd=e=>{let t="";try{const i=JSON.parse(e);t=Array.isArray(i)?i.map(e=>"object"==typeof e&&null!==e?`${e.key}: ${e.value}`:e).join(", "):"object"==typeof i&&null!==i?Object.entries(i).map(([e,t])=>`${e}: ${t}`).join(", "):e}catch(i){t=e}return t},vd={0:"UNSPECIFIED",1:"INTERNAL",2:"SERVER",3:"CLIENT",4:"PRODUCER",5:"CONSUMER"},$d={0:"",1:"OK",2:"ERROR"};class wd{buf;offset=0;constructor(e){this.buf=e}get remaining(){return this.buf.length-this.offset}readTag(){if(this.remaining<=0)return null;const e=this.readVarintNumber();return null===e?null:{field:e>>>3,wire:7&e}}skip(e){switch(e){case 0:return null!==this.readVarintBig();case 1:return this.skipBytes(8);case 2:{const e=this.readVarintNumber();return null!==e&&this.skipBytes(e)}case 5:return this.skipBytes(4);default:return!1}}readVarintNumber(){const e=this.readVarintBig();if(null===e)return null;const t=Number(e);return Number.isSafeInteger(t)?t:null}readVarintBig(){let e=0n,t=0n;for(;this.remaining>0&&t<64n;){const i=this.buf[this.offset++];if(e|=BigInt(127&i)<<t,!(128&i))return e;t+=7n}return null}readFixed64(){if(this.remaining<8)return null;const e=new DataView(this.buf.buffer,this.buf.byteOffset+this.offset,8);return this.offset+=8,e.getBigUint64(0,!0)}readFixed64AsDoubleBits(){if(this.remaining<8)return null;const e=new DataView(this.buf.buffer,this.buf.byteOffset+this.offset,8);return this.offset+=8,e.getFloat64(0,!0)}readBytes(){const e=this.readVarintNumber();if(null===e||e<0||this.remaining<e)return null;const t=this.buf.subarray(this.offset,this.offset+e);return this.offset+=e,t}readString(){const e=this.readBytes();if(null===e)return null;try{return(new TextDecoder).decode(e)}catch{return null}}readMessage(){const e=this.readBytes();return null===e?null:new wd(e)}skipBytes(e){return!(this.remaining<e||(this.offset+=e,0))}}const Sd=e=>{if(!e||0===e.length)return;let t="";for(let i=0;i<e.length;i++)t+=e[i].toString(16).padStart(2,"0");return t},xd=e=>{let t="";for(;e.remaining>0;){const i=e.readTag();if(!i)break;switch(i.field){case 1:if(2!==i.wire){e.skip(i.wire);break}t=e.readString()??"";break;case 2:if(0!==i.wire){e.skip(i.wire);break}t=e.readVarintNumber()?"true":"false";break;case 3:{if(0!==i.wire){e.skip(i.wire);break}const n=e.readVarintBig();t=null===n?"":n.toString();break}case 4:{if(1!==i.wire){e.skip(i.wire);break}const n=e.readFixed64AsDoubleBits();t=null===n||Number.isNaN(n)?"":String(n);break}case 5:{if(2!==i.wire){e.skip(i.wire);break}const n=e.readMessage();if(!n)break;const r=[];for(;n.remaining>0;){const e=n.readTag();if(!e)break;if(1===e.field&&2===e.wire){const e=n.readMessage();e&&r.push(xd(e))}else n.skip(e.wire)}t=`[${r.join(", ")}]`;break}case 6:{if(2!==i.wire){e.skip(i.wire);break}const n=e.readMessage();if(!n)break;const r=[];for(;n.remaining>0;){const e=n.readTag();if(!e)break;if(1===e.field&&2===e.wire){const e=n.readMessage();if(!e)continue;const t=Cd(e);t.key&&r.push(`${t.key}=${t.value??""}`)}else n.skip(e.wire)}t=`{${r.join(", ")}}`;break}case 7:{if(2!==i.wire){e.skip(i.wire);break}const n=e.readBytes();if(!n)break;const r=Sd(n.length>16?n.subarray(0,16):n)??"";t=n.length>16?`${r}…`:r;break}default:e.skip(i.wire)}}return t},Cd=e=>{const t={};for(;e.remaining>0;){const i=e.readTag();if(!i)break;if(1===i.field&&2===i.wire)t.key=e.readString()??void 0;else if(2===i.field&&2===i.wire){const i=e.readMessage();t.value=i?xd(i):void 0}else e.skip(i.wire)}return t},Ed=(e,t)=>{const i=e.readMessage();if(!i)return;const n=Cd(i);void 0===n.key&&void 0===n.value||t.push(n)},Td=e=>{const t={};for(;e.remaining>0;){const i=e.readTag();if(!i)break;2===i.field&&2===i.wire?t.message=e.readString()??void 0:3===i.field&&0===i.wire?t.code=e.readVarintNumber()??void 0:e.skip(i.wire)}return t},Od=e=>{const t={attrs:[]};for(;e.remaining>0;){const i=e.readTag();if(!i)break;switch(i.field){case 1:1===i.wire?t.timeUnixNano=e.readFixed64()??void 0:e.skip(i.wire);break;case 2:2===i.wire?t.name=e.readString()??void 0:e.skip(i.wire);break;case 3:2===i.wire?Ed(e,t.attrs):e.skip(i.wire);break;default:e.skip(i.wire)}}return t},Nd=(e,t,i)=>{const n={attrs:[],events:[],service:t,scope:i};for(;e.remaining>0;){const t=e.readTag();if(!t)break;switch(t.field){case 1:2===t.wire?n.traceId=Sd(e.readBytes()):e.skip(t.wire);break;case 2:2===t.wire?n.spanId=Sd(e.readBytes()):e.skip(t.wire);break;case 4:2===t.wire?n.parentSpanId=Sd(e.readBytes()):e.skip(t.wire);break;case 5:2===t.wire?n.name=e.readString()??void 0:e.skip(t.wire);break;case 6:0===t.wire?n.kind=e.readVarintNumber()??void 0:e.skip(t.wire);break;case 7:1===t.wire?n.startUnixNano=e.readFixed64()??void 0:e.skip(t.wire);break;case 8:1===t.wire?n.endUnixNano=e.readFixed64()??void 0:e.skip(t.wire);break;case 9:2===t.wire?Ed(e,n.attrs):e.skip(t.wire);break;case 11:if(2===t.wire){const t=e.readMessage();t&&n.events.push(Od(t))}else e.skip(t.wire);break;case 15:if(2===t.wire){const t=e.readMessage();if(t){const e=Td(t);n.statusCode=e.code,n.statusMsg=e.message}}else e.skip(t.wire);break;default:e.skip(t.wire)}}return n},Ad=e=>{let t;for(;e.remaining>0;){const i=e.readTag();if(!i)break;if(1===i.field&&2===i.wire){const i=e.readMessage();if(!i)continue;const n=Cd(i);"service.name"===n.key&&n.value&&(t=n.value)}else e.skip(i.wire)}return t},kd=e=>{let t,i;for(;e.remaining>0;){const n=e.readTag();if(!n)break;1===n.field&&2===n.wire?t=e.readString()??void 0:2===n.field&&2===n.wire?i=e.readString()??void 0:e.skip(n.wire)}if(t)return i?`${t}@${i}`:t},Id=(e,t)=>{let i;const n=[];for(;e.remaining>0;){const r=e.readTag();if(!r)break;if(1===r.field&&2===r.wire){const t=e.readMessage();t&&(i=kd(t))}else if(2===r.field&&2===r.wire){const r=e.readMessage();r&&n.push(Nd(r,t,i))}else e.skip(r.wire)}for(const e of n)!e.scope&&i&&(e.scope=i);return n},_d=e=>{let t;const i=[];for(;e.remaining>0;){const n=e.readTag();if(!n)break;if(1===n.field&&2===n.wire){const i=e.readMessage();i&&(t=Ad(i))}else if(2===n.field&&2===n.wire){const n=e.readMessage();n&&i.push(...Id(n,t))}else e.skip(n.wire)}for(const e of i)!e.service&&t&&(e.service=t);return i},Dd=e=>({key:e.key??null,value:e.value??null}),Rd=e=>{if(!e.length)return[];const t=new Map;for(const i of e)i.spanId&&t.set(i.spanId,i);const i=new Map,n=[];for(const r of e){const e=r.parentSpanId;if(e&&t.has(e)){const t=i.get(e)??[];t.push(r),i.set(e,t)}else n.push(r)}n.sort((e,t)=>{const i=e.startUnixNano??0n,n=t.startUnixNano??0n;return i<n?-1:i>n?1:0});const r=(n[0]??e[0]).startUnixNano??0n,o=[],a=(e,t)=>{const n=e.startUnixNano??0n,s=e.endUnixNano??n,l=n>r?n-r:0n,d=s>n?s-n:1n,c=void 0!==e.statusCode?$d[e.statusCode]??null:null,u=(e.attrs??[]).map(Dd);u.sort((e,t)=>(e.key??"").localeCompare(t.key??""));const p=(e.events??[]).map(e=>{const t=e.timeUnixNano??0n,i=t>r?t-r:0n;return{name:e.name??null,offsetMs:Number(i)/1e6,attrs:(e.attrs??[]).map(Dd)}});o.push({spanId:e.spanId??null,parentSpanId:e.parentSpanId??null,name:e.name??null,service:e.service??null,kind:void 0!==e.kind?vd[e.kind]??null:null,depth:t,startUnixNano:void 0!==e.startUnixNano?e.startUnixNano.toString():null,endUnixNano:void 0!==e.endUnixNano?e.endUnixNano.toString():null,offsetMs:Number(l)/1e6,durationMs:Number(d)/1e6,scope:e.scope??null,statusCode:c||null,statusMsg:e.statusMsg??null,attrs:u.length?u:null,events:p.length?p:null});for(const n of i.get(e.spanId??"")??[])a(n,t+1)};for(const t of n.length?n:e)a(t,0);const s=new Set;return o.filter(e=>{const t=e.spanId??"";return!t||!s.has(t)&&(s.add(t),!0)})},Ld=e=>{if(null==e||""===e)return{spans:null,error:null};try{const t=(e=>{try{const t=e.replace(/\s+/g,"");if(!t)return null;const i="function"==typeof atob?atob(t):Buffer.from(t,"base64").toString("binary"),n=new Uint8Array(i.length);for(let e=0;e<i.length;e++)n[e]=i.charCodeAt(e);return n}catch{return null}})(e);if(!t||0===t.length)return{spans:null,error:"Invalid base64 rawOtlp"};const i=(e=>{const t=new wd(e),i=[];for(;t.remaining>0;){const e=t.readTag();if(!e)break;if(1===e.field&&2===e.wire){const e=t.readMessage();e&&i.push(..._d(e))}else t.skip(e.wire)}return i})(t);return i.length?{spans:Rd(i),error:null}:{spans:null,error:"No spans found in OTLP payload"}}catch(e){return{spans:null,error:e instanceof Error?e.message:"Failed to parse rawOtlp"}}},Pd=e=>{const t=e.fields.reduce((e,{key:t,value:i})=>{const n=(e=>{if(null!=e){if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e)return String(e);try{return JSON.stringify(e)}catch{return}}})(i);return void 0!==n&&e.push({key:t,value:n}),e},[]);return{...e,fields:t}},Ud=e=>{if("object"!=typeof e)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach(i=>{const n=e[i];if(Array.isArray(n)){const e=n.filter(e=>null!=e&&""!==e);e.length>0&&(t[i]=e.map(e=>Ud(e)))}else if("object"==typeof n&&null!==n){const e=Ud(n);Object.keys(e).length>0&&(t[i]=e)}else[void 0,null,""].includes(n)||(t[i]=n)}),t},Md=(e,t=2)=>JSON.stringify(e||{},null,t),Fd=async(e=1e3)=>new Promise(t=>setTimeout(t,e)),zd=e=>Object.entries(e).reduce((e,[t,i])=>(e[t]="string"==typeof i?i:JSON.stringify(i),e),{}),Bd=ri("v1.33"),jd=["runtimeDetection","agentInjectionEnabled","podsManifestInjection","agentInjected","processesAgentHealth","expectingTelemetry"],Hd=(e,t)=>{if(e!==yi.K8s)return!1;const i=ri(t);return i>0&&i<Bd},Wd=ri("v1.20"),Xd=(e,t)=>{if(e!==yi.K8s)return!0;const i=ri(t);return!(i>0)||i>=Wd},Gd=e=>e?jd.map(t=>e[t]??null):[],Vd={PID:"process.pid",VPID:"process.vpid"},Kd={[wi.Go]:"Go",[wi.Java]:"Java",[wi.JavaScript]:"Node.js",[wi.Python]:"Python",[wi.DotNet]:".NET",[wi.CSharp]:"C#",[wi.CPlusPlus]:"C++",[wi.Php]:"PHP",[wi.Ruby]:"Ruby",[wi.Rust]:"Rust",[wi.Swift]:"Swift",[wi.Elixir]:"Elixir",[wi.MySql]:"MySQL",[wi.Nginx]:"Nginx",[wi.Postgres]:"PostgreSQL",[wi.Redis]:"Redis",[wi.Kafka]:"Kafka",[wi.Ignored]:"Ignored",[wi.Unknown]:"Unknown",[wi.Processing]:"Processing",[wi.NoContainers]:"No Containers",[wi.NoRunningPods]:"No Running Pods"},Yd=[{id:wi.Go,label:Kd[wi.Go],icon:Ms(wi.Go)},{id:wi.Java,label:Kd[wi.Java],icon:Ms(wi.Java)},{id:wi.JavaScript,label:Kd[wi.JavaScript],icon:Ms(wi.JavaScript)},{id:wi.Python,label:Kd[wi.Python],icon:Ms(wi.Python)},{id:wi.Php,label:Kd[wi.Php],icon:Ms(wi.Php)},{id:wi.Ruby,label:Kd[wi.Ruby],icon:Ms(wi.Ruby)},{id:wi.Rust,label:Kd[wi.Rust],icon:Ms(wi.Rust)},{id:wi.DotNet,label:Kd[wi.DotNet],icon:Ms(wi.DotNet)},{id:wi.CSharp,label:Kd[wi.CSharp],icon:Ms(wi.CSharp)},{id:wi.CPlusPlus,label:Kd[wi.CPlusPlus],icon:Ms(wi.CPlusPlus)},{id:wi.Swift,label:Kd[wi.Swift],icon:Ms(wi.Swift)},{id:wi.Elixir,label:Kd[wi.Elixir],icon:Ms(wi.Elixir)}],Jd={id:Pi.OpentelemetryEbpfInstrumentation,label:Pi.OpentelemetryEbpfInstrumentation,icon:yt},qd={[wi.Go]:{community:[{id:Pi.GolangCommunity,label:Pi.GolangCommunity,icon:Ms(wi.Go)},Jd],enterprise:[{id:Pi.GolangEnterprise,label:Pi.GolangEnterprise,icon:Ms(wi.Go)}]},[wi.JavaScript]:{community:[{id:Pi.NodejsCommunity,label:Pi.NodejsCommunity,icon:Ms(wi.JavaScript)},Jd],enterprise:[{id:Pi.NodejsEnterprise,label:Pi.NodejsEnterprise,icon:Ms(wi.JavaScript)}]},[wi.Python]:{community:[{id:Pi.PythonCommunity,label:Pi.PythonCommunity,icon:Ms(wi.Python)},Jd],enterprise:[{id:Pi.PythonEnterprise,label:Pi.PythonEnterprise,icon:Ms(wi.Python)}]},[wi.Java]:{community:[{id:Pi.JavaCommunity,label:Pi.JavaCommunity,icon:Ms(wi.Java)},Jd],enterprise:[{id:Pi.JavaEnterprise,label:Pi.JavaEnterprise,icon:Ms(wi.Java)},{id:Pi.JavaEbpfInstrumentations,label:Pi.JavaEbpfInstrumentations,icon:Ms(wi.Java)}]},[wi.DotNet]:{community:[{id:Pi.DotNetCommunity,label:Pi.DotNetCommunity,icon:Ms(wi.DotNet)},Jd],enterprise:[{id:Pi.DotNetEnterprise,label:Pi.DotNetEnterprise,icon:Ms(wi.DotNet)}]},[wi.Ruby]:{community:[{id:Pi.RubyCommunity,label:Pi.RubyCommunity,icon:Ms(wi.Ruby)},Jd],enterprise:[{id:Pi.RubyEnterprise,label:Pi.RubyEnterprise,icon:Ms(wi.Ruby)}]},[wi.Php]:{community:[{id:Pi.PhpCommunity,label:Pi.PhpCommunity,icon:Ms(wi.Php)},Jd],enterprise:[]},[wi.CSharp]:{community:[],enterprise:[{id:Pi.CPlusPlusEnterprise,label:Pi.CPlusPlusEnterprise,icon:Ms(wi.CSharp)}]},[wi.MySql]:{community:[],enterprise:[{id:Pi.MySqlEnterprise,label:Pi.MySqlEnterprise,icon:Ms(wi.MySql)}]},[wi.CPlusPlus]:{community:[Jd],enterprise:[]},[wi.Rust]:{community:[Jd],enterprise:[]},[wi.Swift]:{community:[Jd],enterprise:[]},[wi.Elixir]:{community:[Jd],enterprise:[]},[wi.Nginx]:{community:[Jd],enterprise:[]},[wi.Postgres]:{community:[Jd],enterprise:[]},[wi.Redis]:{community:[Jd],enterprise:[]},[wi.Kafka]:{community:[Jd],enterprise:[]},[wi.Ignored]:{community:[],enterprise:[]},[wi.Unknown]:{community:[Jd],enterprise:[]},[wi.Processing]:{community:[],enterprise:[]},[wi.NoContainers]:{community:[],enterprise:[]},[wi.NoRunningPods]:{community:[],enterprise:[]}},Qd="*",Zd=e=>!!e?.includes(Qd),ec=e=>e?.length?Zd(e)?[Qd]:e:[],tc=e=>{if(e?.length&&!Zd(e))return e.filter(e=>e!==Qd)},ic=e=>e===Qd?"All languages":Kd[e]??e,nc=e=>e===Qd?vt:Ms(e),rc=ri("v1.26"),oc=(e,t)=>{if(e!==yi.K8s)return!1;const i=ri(t);return!(i>0)||i>=rc},ac=[Mi.NetworkMetrics],sc=e=>!ac.includes(e),lc=[{type:Mi.CodeAttributes,icon:qs(Mi.CodeAttributes),label:"Code Attributes",description:'The "Code Attributes" rule can be used to add code attributes containing payload data to traces.',docsUrl:"https://docs.odigos.io/pipeline/rules/codeattributes",supportedLanguages:[wi.Go,wi.Python,wi.JavaScript]},{type:Mi.CustomInstrumentation,icon:qs(Mi.CustomInstrumentation),label:"Custom Instrumentation",description:'The "Custom Instrumentation" rule can be used to instrument a specific symbol (i.e. for Golang), a class and method combination (i.e. for Java), or a class and function combination (i.e. for PHP) for detailed tracing.',docsUrl:"https://docs.odigos.io/pipeline/rules/custominstrumentation",supportedLanguages:[wi.Go,wi.Java,wi.Php]},{type:Mi.HeadersCollection,icon:qs(Mi.HeadersCollection),label:"Headers Collection",description:'The "Headers Collection" rule can be used to add span attributes containing HTTP Headers data to traces.',docsUrl:"https://docs.odigos.io/pipeline/rules/headerscollection",supportedLanguages:[wi.Go,wi.Java,wi.JavaScript]},{type:Mi.PayloadCollection,icon:qs(Mi.PayloadCollection),label:"Payload Collection",description:'The "Payload Collection" rule can be used to add span attributes containing payload data to traces.',docsUrl:"https://docs.odigos.io/pipeline/rules/payloadcollection",supportedLanguages:[wi.Go,wi.JavaScript]}],dc=e=>{const t=e?.instrumentationRuleTypes;return t?.length?t.map(e=>({type:e.type,icon:qs(e.type),label:e.displayName,description:e.description,docsUrl:e.docsUrl,supportedLanguages:e.supportedLanguages??[],fields:e.fields})):[]},cc="Recommendations",uc="Optimize your observability setup with actionable recommendations.",pc="Recommended",hc="Applied",gc="Dismissed",mc="Not applicable",fc={[wn.Recommended]:pc,[wn.Applied]:hc,[wn.Dismissed]:gc,[wn.NotApplicable]:mc},bc="Accept",yc="Dismiss",vc="Restore",$c="Docs",wc="Benefits",Sc="Considerations",xc="Apply Recommendation",Cc="Apply via UI",Ec="Apply via GitOps",Tc="Via UI",Oc="Via GitOps",Nc="Accept to choose how to apply this recommendation, or dismiss it if it is not relevant.",Ac="There are 2 ways to apply this recommendation.",kc="Odigos applies the selected change immediately.",Ic="Commit the configuration to your repository and let your GitOps controller apply it.",_c="UI changes apply only to this cluster and will not carry over if you re-install odigos.",Dc="No recommendations",Rc="There are no recommendations for this cluster right now.",Lc="This recommendation does not currently apply to your cluster.",Pc="Recommendation dismissed",Uc="Recommendation restored",Mc="Recommendation applied successfully",Fc="Failed to apply recommendation",zc={TITLE:"Regex Testing",REGEX_LABEL:"Regex",REGEX_EMPTY_HINT:"No regex to test - fill in the regex field on the row first.",TEST_STRING_LABEL:"Test string",TEST_STRING_PLACEHOLDER:"Paste a span attribute payload to test the regex against...",TEST_STRING_HELP:'The regex runs verbatim against this string. Paste the actual attribute value the processor will see - if your sample came from a log dump with JSON-escaped quotes (\\"), click Unescape first.',RESULT_LABEL:"Result",RESULT_CAPTURE_HINT:"This is the value that will be written to the new span attribute.",RESULT_EMPTY_REGEX:"Enter a regex to test.",RESULT_EMPTY_INPUT:"Enter a test string to see the result.",RESULT_NO_MATCH:"No match found.",RESULT_INVALID_REGEX_FALLBACK:"Invalid regex pattern.",UNESCAPE_LABEL:"Unescape",UNESCAPE_TOOLTIP:'Convert escape sequences (\\", \\n, \\t, \\\\) into their literal characters. Useful when pasting log output that JSON-escapes attribute values.'},Bc={SEGMENT_PRESET_LABEL:"Preset extract",SEGMENT_PRESET_TOOLTIP:"Extract a value from an existing attribute using a pre-set pattern (JSON, SQL, or Resource path).",SEGMENT_REGEX_LABEL:"Custom Regex",SEGMENT_REGEX_TOOLTIP:"Extract a value using your own regular expression with a single capture group.",PRESET_ROW_TITLE:e=>`Data format ${e+1}`,REGEX_ROW_TITLE:e=>`Custom Regex ${e+1}`,TEST_REGEX_LABEL:"Test Regex",REGEX_LABEL:"Regex",REGEX_PLACEHOLDER:"e.g. (?:^|[\\s,{(\"'])[\"']?study_id[\"']?\\s*[:=]\\s*[\"']?([^\"'\\s,;)}]+)",REGEX_HELP:"A regex with a single capture group; the captured value becomes the new attribute.",TARGET_LABEL:"New span attribute name",TARGET_PLACEHOLDER:"e.g. customerId",TARGET_HELP:"The name of the new extracted attribute."},jc={[hi.JSON]:{label:"JSON",keyLabel:"JSON key",placeholder:"e.g. customer_id",helpMessage:"Type the JSON key containing the value to extract."},[hi.SQL]:{label:"SQL",keyLabel:"SQL key",placeholder:"e.g. invoice_id",helpMessage:"Type the SQL key containing the value to extract."},[hi.ResourcePath]:{label:"Resource path",keyLabel:"Resource path key",placeholder:"e.g. tenants",helpMessage:"Type the resource name containing the value to extract."}},Hc="Cancel",Wc="Save",Xc="Edit rule",Gc="Edit auto rule",Vc="Create rule",Kc="Delete rule",Yc="Save",Jc="Create your first rule",qc="No Rules Exist",Qc="No Results",Zc=e=>`No rules match the search term "${e}"`,eu="Rule name",tu="Rule type",iu="Select the type of condition that makes a trace highly relevant.",nu="Rule Enabled",ru="Rule Disabled",ou="Enabled",au="Disabled",su="Note",lu="HTTP route",du="Method",cu="Keep Percentage",uu="Keep traces with duration larger than",pu="Keep traces with errors",hu="Keep at least this percentage of matching traces. A higher rate from another matching rule may apply instead.",gu="Keep at most this percentage of matching traces. A lower rate from another matching rule may apply instead.",mu="Custom percentage",fu="Disabled rule",bu="Sample",yu="Keep all",vu="Drop all",$u="Operation type",wu="HTTP route prefix",Su="Templated path",xu="Templated path prefix",Cu="Kafka topic",Eu="Custom duration (ms)",Tu="No preview available",Ou="Server address",Nu="Drop at most this percentage of matching traces",Au="Unnamed rule",ku="Sampling Preview",Iu="Source Scope",_u="Unknown source",Du="Operation",Ru="Duration",Lu="Errors",Pu="Keep Percentage",Uu="Define which sources this rule applies to. You can target specific services, namespaces, or apply the rule to the entire cluster.",Mu="Define which operations this rule applies to. You can target specific endpoints or requests, or apply the rule to all operations in the selected services.",Fu="Define a duration threshold for this rule. Traces with a duration longer than the specified value will be considered important and retained.",zu="Retain traces with errors from the selected services and operations.",Bu="Use Keep All to retain every matching trace, or Sample when keeping everything is too expensive. 100% means keep all",ju="Use Drop All to discard every matching trace, or Sample to keep some examples. 0% means drop all.",Hu={highlyRelevant:Bu,noisy:ju,costReduction:void 0},Wu="Type rule name",Xu="Add note here...",Gu="Type here",Vu="Search source name",Ku="e.g. collector.my.vendor.com",Yu="Optional notes (not used by the system). Add any context or details for this sampling rule.",Ju="Rule will apply to all sources in the cluster",qu="If multiple source scopes are set, they must all match simultaneously.",Qu="All sources",Zu="-",ep="All",tp="Sources",ip="Namespaces",np="Languages",rp="any of",op="AND",ap="All operations",sp="HTTP server endpoint",lp="HTTP client endpoint",dp="Kafka consumer",cp="Kafka producer",up="Sampling Rules",pp='Control how traces are categorized based on "Importance" and potential value, for fine grain control of what is kept and what is dropped.',hp="Refresh",gp="Create rule",mp="Sampling docs",fp="75vw",bp="Delete rule?",yp="Are you sure you want to delete this sampling rule?",vp="Delete",$p="Cancel",wp="Kubernetes Health Probes",Sp="Keep All Error Traces",xp="Drop Traces Cluster-Wide",Cp="A rule with the same matching conditions already exists.",Ep="Create this rule as-is?",Tp="This rule still uses the default configuration.\nDo you want to create it anyway?",Op="Rule preview",Np="Continue editing",Ap="Create 'Noisy Operation Kubernetes Health Probes' rule",kp="Edit 'Noisy Operation Kubernetes Health Probes' rule",Ip="Automatically detect and sample health probe traces across the cluster.",_p="Create 'Highly Relevant Operations' rule",Dp="Edit 'Highly Relevant Operations' rule",Rp="Automatically keep all error traces across the entire cluster.",Lp="Create 'Cost Reduction' rule",Pp="Edit 'Cost Reduction' rule",Up="Automatically drop a percentage of traces across the entire cluster.",Mp="Skip setup",Fp="Start setup",zp="Next",Bp="Go to Sampling",jp="Read more",Hp="Welcome to Sampling",Wp="Cut costs without losing what matters",Xp="Odigos sampling works in three stages:",Gp="Filter noisy traffic",Vp="Remove non-actionable traces like health checks.",Kp="Guarantee highly relevance operations",Yp="Keep traces with errors, high latency, or mission-critical endpoints/services.",Jp="Reduce cost",qp="Sample routine traffic using percentages.",Qp="Sampling does not drop individual spans - it keeps or drops the entire trace.",Zp="Filter noisy operations",eh="Cut traces with little or no observability value (health-checks, metric scarping, etc)",th="Odigos filters these efficiently, dropping them early with almost no resource cost.\n\nSampling happens at request start, so only root span attributes available at that moment can be used. Later insights about the trace (errors, latency) - aren’t available.",ih="Preset Rules",nh="Kubernetes Health Probes",rh="Automatically ignore health checks",oh="You can review, adjust, and add additional custom rules later.",ah="Choose your sampling strategy",sh="Pick the approach that best fits your balance of cost vs data-completeness",lh="Keep List",dh="Budget Friendly",ch="Define which traces must be kept, while all others are sampled by default to minimize cost.",uh="Cost-oriented - keeps only what you explicitly select.",ph="Best for very large clusters with high volumes of traces and high costs.",hh="Higher risk of missing important traces without ongoing review.",gh="Drop List",mh="Safe Choice",fh="Define which traces must be aggressively dropped, while all others are kept by default.",bh="Preserves most data unless explicitly filtered.",yh="Safer by default - gaps in rules or system changes increase cost rather than risk losing important traces.",vh="Advanced",$h="Maximum Flexibility",wh="Full control over all sampling rules and categories.\n\nBest for advanced users who want complete flexibility.",Sh="'Keep List' profile",xh="Protect important traces",Ch="Start by setting the default sampling rate for all traces.\nThen define rules to exclude highly relevant traces so they are guaranteed to be kept\n\nCommon use-cases include:",Eh="Traces with errors",Th="Slow requests (duration above threshold)",Oh="Mission-Critical endpoints or services",Nh="Services under test or evaluation",Ah="New deployments",kh="You can review, adjust, and add rules once onboarding is complete.",Ih="Common Rules",_h="Preset Rules",Dh="Error collection - entire cluster",Rh="Keep all traces with errors",Lh="Ambient sampling percentage",Ph="'Drop List' profile",Uh="Reduce high-volume traffic",Mh="Start by keeping all traces by default. Then define rules to drop high-volume or low-value traces to reduce overall volume and cost.\n\nIn many systems, a small number of endpoints generate most of the trace volume.\nTargeting these high-volume sources can significantly reduce overall data.",Fh="Advanced Configuration",zh="Configure sampling rules",Bh="Advanced mode allows you to configure all sampling categories:",jh="Noise Filtering - remove non-actionable traces",Hh="Highly Relevance - guarantee important traces are kept",Wh='Cost Control - drop traces for "Normal" operations',Xh="Rules can target:",Gh="Services",Vh="HTTP Endpoints",Kh="DB Operations",Yh="Errors",Jh="Latency and more...",qh="Sampling configured successfully!",Qh="Your sampling configuration is ready.\nYou can add and adjust rules anytime in Sampling Rules space.",Zh="Odigos will now:",eg="Filter noisy operations",tg="Guarantee important traces",ig="Reduce cost using controlled sampling",ng="Recommended",rg={noisy:"Rules that reduce noise from high-volume, low-value operations using Head Sampling.",highlyRelevant:"Add a rule to identify highly relevant operations. Traces with errors, long duration, or from critical endpoints and key workflows will be retained so important transactions are always available for analysis.",costReduction:"Rules that optimize costs by sampling less critical data using Tail Sampling."},og={noisy:Ap,highlyRelevant:_p,costReduction:Lp},ag={noisy:kp,highlyRelevant:Dp,costReduction:Pp},sg={noisy:"Noisy Operation",highlyRelevant:"Highly Relevant",costReduction:"Cost Reduction"},lg=[{id:Vi.Logs,value:"Logs"},{id:Vi.Metrics,value:"Metrics"},{id:Vi.Traces,value:"Traces"},{id:Vi.Profiles,value:"Profiles"}],dg=6048e5,cg="URL templatization",ug="Replace dynamic URL path segments with named placeholders to reduce cardinality in span names and http.route.",pg="Default templatization",hg="Custom and default URL templatization scopes across URL templatization actions.",gg="Default templatization is not enabled",mg="Automatically detect and templatize dynamic URL segments when no custom template matches.",fg="Enable for entire cluster",bg="Custom URL templates",yg="Exact overrides when default templatization misses a route. Use when low cardinality matters — define patterns per templating scope.",vg="View by:",$g="Groups",wg="Tree",Sg="List",xg="Create templating scope",Cg="Edit scoped templates",Eg="Edit",Tg="Add template",Og="Add templatization rules",Ng="Define exact path patterns for routes default templatization misses — replace dynamic segments with placeholders like {id} or {orderId} (e.g. /users/{id}/orders/{orderId}).",Ag="Add templatization rule",kg="Choose how to templatize dynamic URLs",Ig="Reduce route cardinality by replacing changing path segments with reusable placeholders.",_g="Before",Dg="After",Rg="/users/123/orders/456",Lg="/users/{id}/orders/{orderId}",Pg="Automatic templatization",Ug="Recommended",Mg="Detect and templatize dynamic URL segments when no custom rule matches.",Fg="Applies to: Entire cluster",zg="Reversible at any time",Bg="Enabled",jg="Need more control?",Hg="Create a custom rule for specific URL patterns.",Wg="Create custom rule",Xg="Learn how it works",Gg="Docs",Vg="https://docs.odigos.io/pipeline/actions/attributes/urltemplatization",Kg="Default templatization is enabled — editor coming next.",Yg="746px",Jg="Add default templatization rule",qg="Edit default templatization rule",Qg="Disable for a scope",Zg="UI template rules",em="Source Scope",tm="Scope",im="Choose which sources this template rule applies to.",nm="Sources where this template is tested and applied.",rm="This rule will apply to all sources in the cluster.",om="Default templatization",am="Automatically templatize dynamic URL segments when no custom template matches.",sm="Enable automatic URL templatization for this scope",lm=["This disables only the default (heuristic) templatization for the selected scope. Custom templates are still checked and applied when they match.","Sources that are not disabled by any rule continue to use all default heuristic templatization rules."],dm="default templatization for this scope",cm="Are you sure you want to disable default templatization for the selected scope? This takes effect in the cluster immediately.",um="Disable",pm="Skip policy",hm="Advanced",gm=["On public-facing services, bots and scanners often probe random paths that return errors such as 404. Applying default templatization to those paths can create high-cardinality routes.","Custom templates still match first. Skip policy only affects the default heuristic when no custom rule matched.","Choose either all non-2xx responses or specific status codes — not both."],mm=gm.join(" "),fm="Skip default templatization for all non-2xx responses",bm="Skip default templatization for specific HTTP status codes",ym="Example: 404, 401",vm="Comma-separated HTTP status codes between 100 and 599. Mutually exclusive with skipping all non-2xx responses.",$m="This rule will take effect in the cluster immediately after it is added.",wm="This rule will take effect in the cluster immediately after it is saved.",Sm="No template changes. Save will keep the current templates.";function xm(e,t){const i=[];return e>0&&i.push(1===e?"1 template will be added":`${e} templates will be added`),t>0&&i.push(1===t?"1 template will be removed":`${t} templates will be removed`),i.length?`On Save, ${i.join(" and ")}. Changes take effect immediately.`:Sm}const Cm="Add rule",Em="Save",Tm="Cancel",Om="Cancel without saving",Nm="Delete",Am="templating scope";function km(e){return e<=0?"Are you sure you want to delete this templating scope? This cannot be undone.":`Are you sure? This templating scope has ${1===e?"1 template":`${e} templates`}. They will be deleted permanently.`}const Im="Enter valid HTTP status codes between 100 and 599, separated by commas.",_m="Create custom template",Dm="Create new scoped template",Rm="Add URL templates",Lm="UI template rules",Pm=e=>`To ${e}`,Um=e=>`Applies to ${e} source${1===e?"":"s"}`,Mm=e=>`Applies to ${e} namespace${1===e?"":"s"}`,Fm=e=>`Applies to ${e} language${1===e?"":"s"}`,zm="Applies to entire cluster",Bm=e=>`Applies to ${e} scope${1===e?"":"s"}`,jm="Where should this rule apply?",Hm=jm,Wm="Scope controls how often this template is evaluated. Prefer a specific scope when you can.",Xm="Specific scope",Gm="Entire cluster",Vm="Apply the rule only where it is needed.",Km="Apply to every source in this cluster.",Ym="Quick start",Jm="Apply the template only to relevant sources so it is not computed for the rest of the cluster.",qm="Applies everywhere — simplest to add, but the template is computed for all sources, including irrelevant ones.",Qm="Recommended. Add to an existing group or create a new one with its own scope. The template runs only for matching traffic — more efficient.",Zm="Simplest setup, but less efficient. This template is evaluated against every request in the cluster. Prefer a specific scope when you know where it should apply.",ef="Simplest setup, but less efficient. These templates are evaluated against every request in the cluster. Prefer a specific scope when you know where they should apply.",tf="Add to existing template group",nf="Create new template group",rf="Add here",of="Create New",af="Existing templating scope",sf="Templating scopes",lf="Select where to add the new template",df="A template group already uses this scope",cf="Choose where to add the new templates.",uf="Add to existing template group",pf="Create a separate template group",hf="Use different settings or behavior for the same scope.",gf="View action settings",mf="Default settings",ff=e=>af,bf=e=>1===e?"1 template":`${e} templates`,yf="Templating scope",vf=(e,t)=>`${1===e?"1 scope":`${e} scopes`} · ${1===t?"1 template":`${t} templates`}`,$f="Template group will be added to the default action. Expand Select action to choose a different one.",wf="Select action",Sf="Rules live on an Odigos action. Use one per team, namespace, or pipeline, or create a new action.",xf="Advanced settings",Cf="Default UI-managed action · Recommended",Ef="Create a new action",Tf="Select action",Of="Default UI-managed action",Nf="Add this template group to the default UI-managed action.",Af="Select action",kf="Choose an existing action or create a new one for this template group.",If="Search template group by type action name or scope (languages, namespaces, sources)",_f="Selected Template group:",Df="URL templatization action",Rf="Create new action",Lf="__odigos_create_new_url_templatization_action__",Pf=kf,Uf="New action name",Mf="New action group",Ff="Defaults to 'UI template rules'. Actions can help keep templating rules organized, but they are optional - advanced users can create a separate action when useful.",zf="Create new template group",Bf="Next",jf="Back",Hf="Action name",Wf="Action",Xf="UI template rules",Gf="__odigos_default_url_templatization_action__",Vf="UI-owned",Kf="Externally synced",Yf=["Safe to edit in Odigos UI.","This action is created and owned here. Fresh installs do not include it until you add templates."],Jf=["Edits in Odigos UI may be overwritten.","This action is synced from outside the UI via the Kubernetes Action resource (e.g. GitOps, kubectl)."],qf=Vf,Qf="Templates",Zf="Other templates in this group",eb="Additional templates that share the same source scope and Action as this rule.",tb="e.g. /api/users/{id}",ib="Language",nb="Namespace",rb="Source",ob="AND",ab="Entire cluster",sb="Unset",lb="Enabled globally",db="Default templating disabled",cb="Enabled",ub="Default templatization is unset. No default rules are configured on an enabled action.",pb="Default templatization is enabled globally.",hb="Default templatization is disabled for the entire cluster.";function gb(e){return e<=0?pb:`Default templatization is enabled globally and disabled in ${1===e?"1 scope":`${e} scopes`}.`}const mb="Disabled for these scopes",fb="Disable for a scope",bb="Delete",yb="disabled scope",vb="Are you sure you want to remove this scope from the disabled list? Default templatization will apply again for this scope.",$b="Automatic templatization",wb="Active",Sb="Custom and default URL templatization scopes across URL templatization actions.",xb="Custom templates take precedence over automatic templatization.",Cb="Scope",Eb="Status codes",Tb="Disabled",Ob="Entire cluster",Nb="All",Ab="None",kb="Disabled",Ib="No disabled scope configured",_b="Add disabled",Db="Disabled scopes",Rb="Advanced",Lb=(e,t)=>`${1===e?"1 disabled scope":`${e} disabled scopes`} · ${1===t?"1 skip policy":`${t} skip policies`}`,Pb="Automatic templatization off for matching traffic.",Ub="Disable for a scope",Mb="Scope",Fb="Effective behavior",zb="Status",Bb="Automatic templatization off",jb="Covered by broader exception",Hb="Disabled",Wb="Redundant",Xb="No disabled scope configured",Gb="Disable automatic templatization for specific scopes when needed.",Vb=(e,t)=>`${e} configured • ${t} effective`,Kb=e=>1===e?"1 scope":`${e} scopes`,Yb="Default templatization is enabled for all HTTP status codes.";function Jb(e){return e<=0?Yb:`Default templatization skips selected HTTP status codes in ${1===e?"1 scope":`${e} scopes`}.`}const qb="HTTP status code policies",Qb="No skip policy configured",Zb="Skip automatic templatization for selected HTTP status codes in specific scopes when needed.",ey="Add skip policy for a scope",ty="Add skip policy for a scope",iy="Skip default templatization on HTTP errors",ny="Delete",ry="skip policy",oy="Are you sure you want to remove this skip policy? Default templatization will again apply for matching error responses in this scope.",ay="Template details",sy="Template",ly="Turn a concrete URL path into a pattern by replacing high-cardinality segments with placeholders like {id}.",dy="Created via",cy="Action name",uy="Kubernetes name",py="Odigos Action (Kubernetes resource) where this template is managed.",hy="Try a URL",gy="/users/12/orders/345685335358",my="Test URL",fy="Close",by="Result",yy="Templated URL path",vy="Match found",$y="This URL matches the template.",wy="No match",Sy="This URL doesn't match the template.",xy="Check the URL structure and parameter positions, then try again.",Cy={dataStreamsLoading:!1,dataStreams:[],selectedStreamName:Ya},Ey=Ft(e=>({...Cy,setDataStreamsLoading:t=>e({dataStreamsLoading:t}),setDataStreams:t=>e({dataStreams:t}),addDataStreams:t=>e(e=>{const i=[...e.dataStreams,...t].map(e=>[e.name,e]);return{dataStreams:Array.from(new Map(i).values())}}),removeDataStreams:t=>e(e=>({dataStreams:e.dataStreams.filter(e=>!t.find(t=>t.name===e.name))})),setSelectedStreamName:t=>e({selectedStreamName:t}),resetDataStreamStore:()=>e(Cy)}));var Ty;(e=>{e.AddSource="add-source",e.EditSource="edit-source",e.AddDestination="add-destination",e.EditDestination="edit-destination",e.AddAction="add-action",e.EditAction="edit-action",e.AddInstrumentationRule="add-instrumentation-rule",e.EditInstrumentationRule="edit-instrumentation-rule",e.OnboardingDone="onboarding-done"})(Ty||(Ty={}));const Oy=e=>`add-${za(e).replaceAll(" ","-").toLowerCase()}`,Ny=e=>`edit-${za(e).replaceAll(" ","-").toLowerCase()}`,Ay=Ft(e=>({drawerType:null,drawerEntityId:null,pendingViewSamplingRule:null,setDrawerType:t=>e({drawerType:t}),setDrawerEntityId:t=>e({drawerEntityId:t}),setPendingViewSamplingRule:t=>e({pendingViewSamplingRule:t})})),ky=()=>({searchText:"",statuses:[],platformTypes:[],namespaces:[],regions:[],kinds:[],monitors:[],languages:[],podsAgentInjectionStatus:[],enabledStatuses:[],onlyErrors:!1}),Iy=Ft(e=>({searchText:"",setSearchText:t=>e({searchText:t}),statuses:[],setStatuses:t=>e({statuses:t}),platformTypes:[],setPlatformTypes:t=>e({platformTypes:t}),namespaces:[],setNamespaces:t=>e({namespaces:t}),regions:[],setRegions:t=>e({regions:t}),kinds:[],setKinds:t=>e({kinds:t}),monitors:[],setMonitors:t=>e({monitors:t}),languages:[],setLanguages:t=>e({languages:t}),podsAgentInjectionStatus:[],setPodsAgentInjectionStatus:t=>e({podsAgentInjectionStatus:t}),enabledStatuses:[],setEnabledStatuses:t=>e({enabledStatuses:t}),onlyErrors:!1,setOnlyErrors:t=>e({onlyErrors:t}),setAll:t=>e(t),clearAll:()=>e({searchText:"",statuses:[],platformTypes:[],namespaces:[],regions:[],kinds:[],monitors:[],languages:[],podsAgentInjectionStatus:[],enabledStatuses:[],onlyErrors:!1}),clearFilters:()=>e({statuses:[],platformTypes:[],namespaces:[],regions:[],kinds:[],monitors:[],languages:[],podsAgentInjectionStatus:[],enabledStatuses:[],onlyErrors:!1}),getEmptyState:ky})),_y=Ft((e,t)=>({notifications:[],addNotification:i=>{const n=new Date,r=`${n.getTime().toString()}${i.target?`#${i.target}`:""}`,{notifications:o}=t();o.some(e=>e.type===i.type&&e.title===i.title&&e.message===i.message&&!e.dismissed)||e(e=>({notifications:[{...i,id:r,time:n.toISOString(),dismissed:!1,seen:!1},...e.notifications]}))},markAsDismissed:t=>{e(e=>{const i=e.notifications.findIndex(e=>e.id===t);return-1!==i&&(e.notifications[i].dismissed=!0),{notifications:e.notifications}})},markAsSeen:t=>{e(e=>{const i=e.notifications.findIndex(e=>e.id===t);return-1!==i&&(e.notifications[i].seen=!0),{notifications:e.notifications}})},removeNotification:t=>{e(e=>{const i=e.notifications.findIndex(e=>e.id===t);return-1!==i&&e.notifications.splice(i,1),{notifications:e.notifications}})},removeNotifications:t=>{t&&e(e=>({notifications:e.notifications.filter(e=>e.id.split("#")[1]!==t)}))}}));var Dy;(e=>{e.Instrumenting="instrumenting",e.Uninstrumenting="uninstrumenting",e.BulkInstrumenting="bulk-instrumenting",e.BulkUninstrumenting="bulk-uninstrumenting",e.DownloadingDiagnose="downloading-diagnose"})(Dy||(Dy={}));const Ry=(e,t)=>({...t?.[e]||{total:0,current:0,percentage:0}}),Ly=e=>(e.total<e.current&&(e.total=e.current+1),e.percentage=Math.round(e.current/e.total*100),e),Py=Ft((e,t)=>({progress:{},setProgress:(i,n)=>{const r=t(),o=Ry();return"number"==typeof n.total&&(o.total=n.total),"number"==typeof n.current&&(o.current=n.current),Array.isArray(n.list)&&(o.list=n.list),e({progress:{...r.progress,[i]:Ly(o)}})},addProgress:(i,n,r)=>{const o=t(),a=Ry(i,o.progress);return a.current+=n,r&&(a.list=a.list?.map(e=>e.label===r.label?{...e,status:r.status}:e)),e({progress:{...o.progress,[i]:Ly(a)}})},resetProgress:t=>e({progress:{[t]:void 0}})})),Uy=Ft(e=>({selectedSources:{},setSelectedSources:t=>e({selectedSources:t}),resetSelectedState:()=>e(()=>({selectedSources:{},selectedConnection:null}))})),My={configuredSources:{},configuredFutureApps:{},configuredDestinations:[],configuredDestinationsUpdateOnly:[]},Fy=(e,t)=>e.destinationType.type!==t.destinationType.type,zy=Ft(e=>({...My,setConfiguredSources:t=>e({configuredSources:t}),setConfiguredFutureApps:t=>e({configuredFutureApps:t}),setConfiguredDestinations:t=>e({configuredDestinations:t}),addConfiguredDestination:t=>e(e=>({configuredDestinations:[...e.configuredDestinations,t]})),removeConfiguredDestination:t=>e(e=>({configuredDestinations:e.configuredDestinations.filter(e=>Fy(e,t))})),setConfiguredDestinationsUpdateOnly:t=>e({configuredDestinationsUpdateOnly:t}),addConfiguredDestinationUpdateOnly:t=>e(e=>{const i=[...e.configuredDestinationsUpdateOnly,t].map(e=>[e.id,e]);return{configuredDestinationsUpdateOnly:Array.from(new Map(i).values())}}),removeConfiguredDestinationUpdateOnly:t=>e(e=>({configuredDestinationsUpdateOnly:e.configuredDestinationsUpdateOnly.filter(e=>Fy(e,t))})),clearStore:()=>e(()=>({...My}))})),By=e=>{function t(){return void 0===e?{}:$s(e)}const[i,n]=Ht(t()),[r,o]=Ht({}),[a,s]=Ht(t()),l=Xt((e,t)=>{const i={};if(!t||"object"!=typeof t)return e?{...e}:i;for(const[n,r]of Object.entries(e)){const e=n;if(Array.isArray(r)){const n=t[e];Array.isArray(n)&&r.length===n.length&&r.every((e,t)=>"object"==typeof e&&null!==e?0===Object.keys(l(e,n[t])).length:e===n[t])||(i[e]=t[e])}else if("object"==typeof r&&null!==r)if(null==t[e]||"object"!=typeof t[e])i[e]=t[e];else{const n=l(r,t[e]);Object.keys(n).length>0&&(i[e]=n)}else r!==t[e]&&(i[e]=t[e])}for(const n of Object.keys(t))n in e||(i[n]=t[n]);return i},[]),d=(e,t)=>0===Object.keys(l(e,t)).length,c=Gt(()=>!d(a,i),[a,i]);Wt(()=>{const r=t();void 0!==e&&"{}"===JSON.stringify(i)&&"{}"!==JSON.stringify(r)&&(n(r),s(r))},[e,i]);const u=Xt((e,t)=>ws("formData"===e?i:r,t.toString()),[i,r]);return{formData:i,formErrors:r,getFormDiff:l,areFormValuesEqual:d,isFormDirty:c,handleFormChange:(e,t,i)=>{if(e){const i=e.toString(),r=i.split(".");1===r.length?n(i=>({...i,[e]:t})):n(e=>{const i=$s(e);let n=i;for(let e=0;e<r.length-1;e++){const t=r[e];n[t]&&"object"==typeof n[t]||(n[t]={}),n=n[t]}return n[r[r.length-1]]=t,i}),o(e=>{const t=i,n=r[r.length-1],o=void 0!==e[t],a=n!==t&&void 0!==e[n];if(!o&&!a)return e;const s={...e};return o&&delete s[t],a&&delete s[n],s})}else i&&n({...i})},handleErrorChange:(e,t,i)=>{if(e){const i=e.toString().split(".");1===i.length?o(i=>({...i,[e]:t})):o(e=>{const n=$s(e);let r=n;for(let e=0;e<i.length-1;e++){const t=i[e];r[t]&&"object"==typeof r[t]||(r[t]={}),r=r[t]}return r[i[i.length-1]]=t,n})}else i&&o({...i})},resetFormData:e=>{const i=e||t();n(i),s(i),o({})},getNestedValue:u}},jy={type:"",name:"",notes:"",signals:[],disabled:!1,fields:{clusterAttributes:null,overwriteExistingValues:null,renames:null,attributeNamesToDelete:null,piiCategories:null,urlTemplatizationRulesGroups:null,extractAttribute:null}},Hy=()=>{const{addNotification:e}=_y(),{formData:t,formErrors:i,handleFormChange:n,handleErrorChange:r,resetFormData:o}=By(jy);return{formData:t,formErrors:i,handleFormChange:n,resetFormData:o,validateForm:i=>{const n={};let o=!0;if(Object.entries(t).forEach(([e,t])=>{switch(e){case"type":case"signals":rd(t)&&(n[e]=Za.FIELD_IS_REQUIRED)}}),t.type===oi.URLTemplatization){const e=t.fields?.urlTemplatizationRulesGroups;if(e)for(const t of e)if(t.templatizationRules?.some(e=>!e.template?.trim())){n.fields=Za.FIELD_IS_REQUIRED;break}}return o=!Object.values(n).length,!o&&i?.withAlert&&e({type:Oi.Warning,title:i.alertTitle,message:Za.REQUIRED_FIELDS,hideFromHistory:!0}),r(void 0,void 0,n),o},loadFormWithDrawerItem:({type:e,signals:t,name:i,notes:r,disabled:o,fields:a})=>{const s={...$s(jy),type:e,signals:t,name:i,notes:r,disabled:o};Object.entries(a).forEach(([e,t])=>{if(t)switch(e){case si.LabelsAttributes:case si.AnnotationsAttributes:s.fields||(s.fields={}),s.fields[e]=(i=t)&&Array.isArray(i)?i.map(e=>!e.fromSources?.length&&e.from?{...e,fromSources:[e.from]}:e):i;break;case si.UrlTemplatizationRulesGroups:s.fields||(s.fields={}),s.fields[e]=(n=t,n?.length?n.map(e=>e.workloadFilters?.length||!e.filterK8sWorkloadKind&&!e.filterK8sWorkloadName?e:{...e,workloadFilters:[{kind:e.filterK8sWorkloadKind,name:e.filterK8sWorkloadName||void 0}]}):n);break;case si.CollectContainerAttributes:case si.CollectReplicaSetAttributes:case si.CollectWorkloadId:case si.CollectClusterId:case si.ClusterAttributes:case si.OverwriteExistingValues:case si.AttributeNamesToDelete:case si.Renames:case si.PiiCategories:case si.ExtractAttribute:s.fields||(s.fields={}),s.fields[e]=t}var i,n}),n(void 0,void 0,s)}}},Wy=e=>{Wt(()=>{if(e){const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])},Xy=()=>{const e=Vt(null),[t,i]=Ht(0),[n,r]=Ht(0);return Wt(()=>{const t=()=>{if(e.current){const{width:t,height:n}=e.current.getBoundingClientRect();i(t),r(n)}};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),{containerRef:e,containerWidth:t,containerHeight:n}},Gy="data-ignore-outside-click",Vy=e=>{let t=e;for(;t;){if(t instanceof Element&&t.hasAttribute(Gy))return!0;t=t.parentNode}return!1},Ky=(e,t)=>{const i=Vt(t);i.current=t,Wt(()=>{const t=t=>{const n=t.target;e.current&&!e.current.contains(n)&&(Vy(n)||i.current())};return document.addEventListener("mousedown",t),document.addEventListener("touchstart",t),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("touchstart",t)}},[e])},Yy=({defaultClientHeight:e=0,defaultClientwidth:t=0,onClickOutside:i,positionMode:n="local"}={})=>{const r=Vt(null),[o,a]=Ht(!1),[s,l]=Ht({top:0,left:0}),[d,c]=Ht({edge:"top",align:"left"});return Ky(r,()=>{o&&(a(!1),i?.())}),{popupRef:r,popupOpen:o,setPopupOpen:a,popupPosition:s,arrowPlacement:d,handlePosition:(i,o)=>{if("local"===n)return void l({top:o,left:i});const{innerWidth:a,innerHeight:s}=window,d=r.current?.clientWidth||t,u=r.current?.clientHeight||e,p=i/a,h=p<1/3?"left":p>2/3?"right":"center";c({edge:o<s/2?"top":"bottom",align:h});let g=o,m=i;if(g>=s/2&&(g+=-u),"center"===h){m=i-d/2;const e=8;m=Math.max(e,Math.min(m,a-d-e))}else m>=a/2&&(m=i-d);l({top:g,left:m})}}},Jy=n.div`
|
|
196
|
+
`,Hl=e=>{const t=Math.max(0,Date.now()-e),i=Math.floor(t/1e3),n=Math.floor(i/60),r=i%60;return`${String(n).padStart(2,"0")}:${String(r).padStart(2,"0")}`},Wl=({icon:i,title:n,titleColor:r,titleSize:a=ja.S,subTitle:s,subTitleColor:l,subTitleSize:d=ja.XXXS,startedAt:c,withGradient:u,gradientColor:p,withSpinner:h,withSpinnerOld:g,scaleSpinnerOld:m=1,percentage:f,withVisual:b,visualIcon:y=et})=>{const v=o(),[$,w]=Ht(()=>c?Hl(c):"");Wt(()=>{if(!c)return;w(Hl(c));const e=setInterval(()=>w(Hl(c)),1e3);return()=>clearInterval(e)},[c]);const S=r||v.v2.colors.white[500],x=l||v.v2.colors.silver[200],C=p||v.v2.colors.black[500];return e(Dl,{$gap:16,$alignItems:"center",children:[b?t(wl,{scale:1.7,icon:y}):h?t(gl,{percentage:f}):g?t(vl,{scale:m}):null,(n||s||c||i||u)&&e(Dl,{$gap:8,$alignItems:"center",children:[e(_l,{$gap:4,children:[i&&t(i,{}),u?t(jl,{align:"center",size:a,$titleColor:S,$gradientColor:C,nowrap:!0,children:n||"Loading..."}):n?t(Va,{align:"center",size:a,color:S,children:n}):null]}),s?t(Va,{align:"center",size:d,color:x,children:s}):null,$?t(Va,{align:"center",size:d,color:S,children:$}):null]})]})},Xl=(e,t)=>({[Oi.Default]:i=>ee({fill:dl(t,e,"300"),...i}),[Oi.Info]:i=>rt({fill:dl(t,e,"400"),...i}),[Oi.Error]:i=>nt({fill:dl(t,e,"500"),...i}),[Oi.Warning]:i=>it({fill:dl(t,e,"500"),...i}),[Oi.Success]:i=>p({fill:dl(t,e,"500"),...i}),[Oi.Loading]:e=>Wl({withSpinnerOld:!0,...e}),[Oi.Disabled]:i=>h({fill:dl(t,e,"400"),...i}),[Oi.Unknown]:i=>tt({fill:dl(t,e,"300"),...i})}[e]),Gl=e=>{switch(e){case Ui.Success:return Oi.Success;case Ui.Error:case Ui.Failure:return Oi.Error;case Ui.Notice:return Oi.Warning;case Ui.Unsupported:case Ui.Unknown:return Oi.Info;case Ui.Irrelevant:case Ui.Disabled:return Oi.Disabled;case Ui.Waiting:return Oi.Loading;case Ui.Pending:default:return Oi.Default}},Vl=(e,t)=>{const i=t.find(([t,i])=>e>=t&&(null===i||e<=i));return i?.[2]||null},Kl={redis:f,mysql:v,postgresql:b,postgres:b,kafka:m,elasticsearch:ye,clickhouse:Ee,oracle:J,aws:ot},Yl={sts:bt,dynamodb:ft,s3:W,sqs:mt,sns:gt,lambda:ht,kinesis:pt,ec2:ut,apigateway:ct,apigatewayv2:ct,bedrock:dt,bedrockruntime:dt,eventbridge:lt,sfn:st,stepfunctions:st,secretsmanager:at,cloudwatch:Ce},Jl=e=>{const t=e.attributes,i=t["db.system"];if(i){const e=Kl[i.toLowerCase()];if(e)return e}const n=t["messaging.system"];if(n){const e=Kl[n.toLowerCase()];if(e)return e}const r=t["rpc.system"];if(r?.toLowerCase().includes("aws")){const e=t["rpc.service"]?.toLowerCase();if(e){const t=Yl[e];if(t)return t}return ot}const o=e.serviceName.toLowerCase();for(const[e,t]of Object.entries(Kl))if(o.includes(e))return t;return ze},ql=e=>{if(!e)return{namespace:"",name:"",kind:""};if("id"in e&&"object"==typeof e.id)return{namespace:e.id.namespace,name:e.id.name,kind:e.id.kind,region:e.id.region||void 0};const{namespace:t,name:i,kind:n,region:r}=e;return{namespace:t,name:i,kind:n,region:r||void 0}},Ql=(e,t)=>{const i=[],n=JSON.parse(JSON.stringify(e));for(const e of n){const n=ls(t.fields,{}),r=e.items.findIndex(e=>e.type===t.destinationType.type);-1!==r&&i.push(...e.items[r].fields.map(e=>({...e,initialValue:n[e.name]})))}return i},Zl=(e,t)=>{const i=e=>e?.some(({healthy:e})=>e.status!==Oi.Success);return e?.length?e.some(({instrumentationInstances:e})=>i(e)):i(t)??!1};function ed(e){if(!e||0===e.length)return null;const t=[],i=[],n=[];for(const r of e){if(!r)continue;const e=r.workloadName??"",o=r.workloadKind??"",a=r.workloadNamespace??"",s=r.workloadLanguage??"";e||o?t.push({namespace:a,kind:o,name:e}):a&&i.push(a),s&&n.push(s)}return 0===t.length&&0===i.length&&0===n.length?null:{sources:t,namespaces:i,languages:n}}function td(e){if(!e)return null;const t=[];for(const i of e.sources??[])t.push({workloadName:i.name||null,workloadKind:i.kind||null,workloadNamespace:i.namespace||null});for(const i of e.namespaces??[])t.push({workloadNamespace:i});for(const i of e.languages??[])t.push({workloadLanguage:i});return t.length?t:null}function id(e){const{sourcesScopes:t,...i}=e;return{...i,sourceScopes:ed(t??null)}}function nd(e){const{sourceScopes:t,...i}=e;return{...i,sourcesScopes:td(t??null)}}const rd=e=>Array.isArray(e)?!e?.length:"object"==typeof e?!Object.keys(e||{}).length:[void 0,null,""].includes(e),od=e=>!!e&&(!(e.length>63)&&/^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$/.test(e)),ad=(e,t=0)=>{const i=(new Date).getTime();return new Date(e).getTime()-i<=t},sd=e=>{const t=String(e).trim().toLowerCase();return["true","false","1","0"].includes(t)},ld=(e,t=0)=>(new Date).getTime()-new Date(e).getTime()>=t,dd=/^v?\d+(\.\d+)*(-[0-9A-Za-z\-~][0-9A-Za-z\-~.]*)?(\+[0-9A-Za-z\-~][0-9A-Za-z\-~.]*)?$/,cd=e=>dd.test(e),ud=e=>e?.map(({status:e,type:t,reason:i,message:n})=>({status:e?.toLowerCase(),type:za(t),reason:i?za(i):"",message:n}))||[],pd=(e,t)=>{const i=ls(e.fields,{});return t.length?t.map(e=>({key:e.name,name:e.displayName||e.name,value:i[e.name]??null})).filter(e=>null!==e.value):Object.entries(i).map(([e,t])=>({key:e,name:e,value:t}))},hd=e=>e?Object.keys(e).filter(t=>e[t]).map(e=>Zi[e]):[],gd=e=>e?Object.keys(e).filter(t=>e[t].supported).map(e=>Zi[e]):[],md=e=>{let t=e.replace(/[^\d.]/g,"");const i=t.indexOf(".");return-1!==i&&(t=t.slice(0,i+1)+t.slice(i+1).replace(/\./g,"")),t},fd=e=>e.replace(/[^\d]/g,""),bd=e=>{const t=String(e).trim().toLowerCase();return"true"===t||"1"===t},yd=e=>{let t="";try{const i=JSON.parse(e);t=Array.isArray(i)?i.map(e=>"object"==typeof e&&null!==e?`${e.key}: ${e.value}`:e).join(", "):"object"==typeof i&&null!==i?Object.entries(i).map(([e,t])=>`${e}: ${t}`).join(", "):e}catch(i){t=e}return t},vd={0:"UNSPECIFIED",1:"INTERNAL",2:"SERVER",3:"CLIENT",4:"PRODUCER",5:"CONSUMER"},$d={0:"",1:"OK",2:"ERROR"};class wd{buf;offset=0;constructor(e){this.buf=e}get remaining(){return this.buf.length-this.offset}readTag(){if(this.remaining<=0)return null;const e=this.readVarintNumber();return null===e?null:{field:e>>>3,wire:7&e}}skip(e){switch(e){case 0:return null!==this.readVarintBig();case 1:return this.skipBytes(8);case 2:{const e=this.readVarintNumber();return null!==e&&this.skipBytes(e)}case 5:return this.skipBytes(4);default:return!1}}readVarintNumber(){const e=this.readVarintBig();if(null===e)return null;const t=Number(e);return Number.isSafeInteger(t)?t:null}readVarintBig(){let e=0n,t=0n;for(;this.remaining>0&&t<64n;){const i=this.buf[this.offset++];if(e|=BigInt(127&i)<<t,!(128&i))return e;t+=7n}return null}readFixed64(){if(this.remaining<8)return null;const e=new DataView(this.buf.buffer,this.buf.byteOffset+this.offset,8);return this.offset+=8,e.getBigUint64(0,!0)}readFixed64AsDoubleBits(){if(this.remaining<8)return null;const e=new DataView(this.buf.buffer,this.buf.byteOffset+this.offset,8);return this.offset+=8,e.getFloat64(0,!0)}readBytes(){const e=this.readVarintNumber();if(null===e||e<0||this.remaining<e)return null;const t=this.buf.subarray(this.offset,this.offset+e);return this.offset+=e,t}readString(){const e=this.readBytes();if(null===e)return null;try{return(new TextDecoder).decode(e)}catch{return null}}readMessage(){const e=this.readBytes();return null===e?null:new wd(e)}skipBytes(e){return!(this.remaining<e||(this.offset+=e,0))}}const Sd=e=>{if(!e||0===e.length)return;let t="";for(let i=0;i<e.length;i++)t+=e[i].toString(16).padStart(2,"0");return t},xd=e=>{let t="";for(;e.remaining>0;){const i=e.readTag();if(!i)break;switch(i.field){case 1:if(2!==i.wire){e.skip(i.wire);break}t=e.readString()??"";break;case 2:if(0!==i.wire){e.skip(i.wire);break}t=e.readVarintNumber()?"true":"false";break;case 3:{if(0!==i.wire){e.skip(i.wire);break}const n=e.readVarintBig();t=null===n?"":n.toString();break}case 4:{if(1!==i.wire){e.skip(i.wire);break}const n=e.readFixed64AsDoubleBits();t=null===n||Number.isNaN(n)?"":String(n);break}case 5:{if(2!==i.wire){e.skip(i.wire);break}const n=e.readMessage();if(!n)break;const r=[];for(;n.remaining>0;){const e=n.readTag();if(!e)break;if(1===e.field&&2===e.wire){const e=n.readMessage();e&&r.push(xd(e))}else n.skip(e.wire)}t=`[${r.join(", ")}]`;break}case 6:{if(2!==i.wire){e.skip(i.wire);break}const n=e.readMessage();if(!n)break;const r=[];for(;n.remaining>0;){const e=n.readTag();if(!e)break;if(1===e.field&&2===e.wire){const e=n.readMessage();if(!e)continue;const t=Cd(e);t.key&&r.push(`${t.key}=${t.value??""}`)}else n.skip(e.wire)}t=`{${r.join(", ")}}`;break}case 7:{if(2!==i.wire){e.skip(i.wire);break}const n=e.readBytes();if(!n)break;const r=Sd(n.length>16?n.subarray(0,16):n)??"";t=n.length>16?`${r}…`:r;break}default:e.skip(i.wire)}}return t},Cd=e=>{const t={};for(;e.remaining>0;){const i=e.readTag();if(!i)break;if(1===i.field&&2===i.wire)t.key=e.readString()??void 0;else if(2===i.field&&2===i.wire){const i=e.readMessage();t.value=i?xd(i):void 0}else e.skip(i.wire)}return t},Ed=(e,t)=>{const i=e.readMessage();if(!i)return;const n=Cd(i);void 0===n.key&&void 0===n.value||t.push(n)},Td=e=>{const t={};for(;e.remaining>0;){const i=e.readTag();if(!i)break;2===i.field&&2===i.wire?t.message=e.readString()??void 0:3===i.field&&0===i.wire?t.code=e.readVarintNumber()??void 0:e.skip(i.wire)}return t},Od=e=>{const t={attrs:[]};for(;e.remaining>0;){const i=e.readTag();if(!i)break;switch(i.field){case 1:1===i.wire?t.timeUnixNano=e.readFixed64()??void 0:e.skip(i.wire);break;case 2:2===i.wire?t.name=e.readString()??void 0:e.skip(i.wire);break;case 3:2===i.wire?Ed(e,t.attrs):e.skip(i.wire);break;default:e.skip(i.wire)}}return t},Nd=(e,t,i)=>{const n={attrs:[],events:[],service:t,scope:i};for(;e.remaining>0;){const t=e.readTag();if(!t)break;switch(t.field){case 1:2===t.wire?n.traceId=Sd(e.readBytes()):e.skip(t.wire);break;case 2:2===t.wire?n.spanId=Sd(e.readBytes()):e.skip(t.wire);break;case 4:2===t.wire?n.parentSpanId=Sd(e.readBytes()):e.skip(t.wire);break;case 5:2===t.wire?n.name=e.readString()??void 0:e.skip(t.wire);break;case 6:0===t.wire?n.kind=e.readVarintNumber()??void 0:e.skip(t.wire);break;case 7:1===t.wire?n.startUnixNano=e.readFixed64()??void 0:e.skip(t.wire);break;case 8:1===t.wire?n.endUnixNano=e.readFixed64()??void 0:e.skip(t.wire);break;case 9:2===t.wire?Ed(e,n.attrs):e.skip(t.wire);break;case 11:if(2===t.wire){const t=e.readMessage();t&&n.events.push(Od(t))}else e.skip(t.wire);break;case 15:if(2===t.wire){const t=e.readMessage();if(t){const e=Td(t);n.statusCode=e.code,n.statusMsg=e.message}}else e.skip(t.wire);break;default:e.skip(t.wire)}}return n},Ad=e=>{let t;for(;e.remaining>0;){const i=e.readTag();if(!i)break;if(1===i.field&&2===i.wire){const i=e.readMessage();if(!i)continue;const n=Cd(i);"service.name"===n.key&&n.value&&(t=n.value)}else e.skip(i.wire)}return t},kd=e=>{let t,i;for(;e.remaining>0;){const n=e.readTag();if(!n)break;1===n.field&&2===n.wire?t=e.readString()??void 0:2===n.field&&2===n.wire?i=e.readString()??void 0:e.skip(n.wire)}if(t)return i?`${t}@${i}`:t},Id=(e,t)=>{let i;const n=[];for(;e.remaining>0;){const r=e.readTag();if(!r)break;if(1===r.field&&2===r.wire){const t=e.readMessage();t&&(i=kd(t))}else if(2===r.field&&2===r.wire){const r=e.readMessage();r&&n.push(Nd(r,t,i))}else e.skip(r.wire)}for(const e of n)!e.scope&&i&&(e.scope=i);return n},_d=e=>{let t;const i=[];for(;e.remaining>0;){const n=e.readTag();if(!n)break;if(1===n.field&&2===n.wire){const i=e.readMessage();i&&(t=Ad(i))}else if(2===n.field&&2===n.wire){const n=e.readMessage();n&&i.push(...Id(n,t))}else e.skip(n.wire)}for(const e of i)!e.service&&t&&(e.service=t);return i},Dd=e=>({key:e.key??null,value:e.value??null}),Rd=e=>{if(!e.length)return[];const t=new Map;for(const i of e)i.spanId&&t.set(i.spanId,i);const i=new Map,n=[];for(const r of e){const e=r.parentSpanId;if(e&&t.has(e)){const t=i.get(e)??[];t.push(r),i.set(e,t)}else n.push(r)}n.sort((e,t)=>{const i=e.startUnixNano??0n,n=t.startUnixNano??0n;return i<n?-1:i>n?1:0});const r=(n[0]??e[0]).startUnixNano??0n,o=[],a=(e,t)=>{const n=e.startUnixNano??0n,s=e.endUnixNano??n,l=n>r?n-r:0n,d=s>n?s-n:1n,c=void 0!==e.statusCode?$d[e.statusCode]??null:null,u=(e.attrs??[]).map(Dd);u.sort((e,t)=>(e.key??"").localeCompare(t.key??""));const p=(e.events??[]).map(e=>{const t=e.timeUnixNano??0n,i=t>r?t-r:0n;return{name:e.name??null,offsetMs:Number(i)/1e6,attrs:(e.attrs??[]).map(Dd)}});o.push({spanId:e.spanId??null,parentSpanId:e.parentSpanId??null,name:e.name??null,service:e.service??null,kind:void 0!==e.kind?vd[e.kind]??null:null,depth:t,startUnixNano:void 0!==e.startUnixNano?e.startUnixNano.toString():null,endUnixNano:void 0!==e.endUnixNano?e.endUnixNano.toString():null,offsetMs:Number(l)/1e6,durationMs:Number(d)/1e6,scope:e.scope??null,statusCode:c||null,statusMsg:e.statusMsg??null,attrs:u.length?u:null,events:p.length?p:null});for(const n of i.get(e.spanId??"")??[])a(n,t+1)};for(const t of n.length?n:e)a(t,0);const s=new Set;return o.filter(e=>{const t=e.spanId??"";return!t||!s.has(t)&&(s.add(t),!0)})},Ld=(e,t)=>{if(null==t||""===t)return{error:null};try{const i=(e=>{try{const t=e.replace(/\s+/g,"");if(!t)return null;const i="function"==typeof atob?atob(t):Buffer.from(t,"base64").toString("binary"),n=new Uint8Array(i.length);for(let e=0;e<i.length;e++)n[e]=i.charCodeAt(e);return n}catch{return null}})(t);if(!i||0===i.length)return{error:"Invalid base64 rawOtlp"};const n=(e=>{const t=new wd(e),i=[];for(;t.remaining>0;){const e=t.readTag();if(!e)break;if(1===e.field&&2===e.wire){const e=t.readMessage();e&&i.push(..._d(e))}else t.skip(e.wire)}return i})(i);return n.length?{traceId:e,spans:Rd(n),error:null}:{error:"No spans found in OTLP payload"}}catch(e){return{error:e instanceof Error?e.message:"Failed to parse rawOtlp"}}},Pd=e=>{const t=e.fields.reduce((e,{key:t,value:i})=>{const n=(e=>{if(null!=e){if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e)return String(e);try{return JSON.stringify(e)}catch{return}}})(i);return void 0!==n&&e.push({key:t,value:n}),e},[]);return{...e,fields:t}},Ud=e=>{if("object"!=typeof e)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach(i=>{const n=e[i];if(Array.isArray(n)){const e=n.filter(e=>null!=e&&""!==e);e.length>0&&(t[i]=e.map(e=>Ud(e)))}else if("object"==typeof n&&null!==n){const e=Ud(n);Object.keys(e).length>0&&(t[i]=e)}else[void 0,null,""].includes(n)||(t[i]=n)}),t},Md=(e,t=2)=>JSON.stringify(e||{},null,t),Fd=async(e=1e3)=>new Promise(t=>setTimeout(t,e)),zd=e=>Object.entries(e).reduce((e,[t,i])=>(e[t]="string"==typeof i?i:JSON.stringify(i),e),{}),Bd=ri("v1.33"),jd=["runtimeDetection","agentInjectionEnabled","podsManifestInjection","agentInjected","processesAgentHealth","expectingTelemetry"],Hd=(e,t)=>{if(e!==yi.K8s)return!1;const i=ri(t);return i>0&&i<Bd},Wd=ri("v1.20"),Xd=(e,t)=>{if(e!==yi.K8s)return!0;const i=ri(t);return!(i>0)||i>=Wd},Gd=e=>e?jd.map(t=>e[t]??null):[],Vd={PID:"process.pid",VPID:"process.vpid"},Kd={[wi.Go]:"Go",[wi.Java]:"Java",[wi.JavaScript]:"Node.js",[wi.Python]:"Python",[wi.DotNet]:".NET",[wi.CSharp]:"C#",[wi.CPlusPlus]:"C++",[wi.Php]:"PHP",[wi.Ruby]:"Ruby",[wi.Rust]:"Rust",[wi.Swift]:"Swift",[wi.Elixir]:"Elixir",[wi.MySql]:"MySQL",[wi.Nginx]:"Nginx",[wi.Postgres]:"PostgreSQL",[wi.Redis]:"Redis",[wi.Kafka]:"Kafka",[wi.Ignored]:"Ignored",[wi.Unknown]:"Unknown",[wi.Processing]:"Processing",[wi.NoContainers]:"No Containers",[wi.NoRunningPods]:"No Running Pods"},Yd=[{id:wi.Go,label:Kd[wi.Go],icon:Ms(wi.Go)},{id:wi.Java,label:Kd[wi.Java],icon:Ms(wi.Java)},{id:wi.JavaScript,label:Kd[wi.JavaScript],icon:Ms(wi.JavaScript)},{id:wi.Python,label:Kd[wi.Python],icon:Ms(wi.Python)},{id:wi.Php,label:Kd[wi.Php],icon:Ms(wi.Php)},{id:wi.Ruby,label:Kd[wi.Ruby],icon:Ms(wi.Ruby)},{id:wi.Rust,label:Kd[wi.Rust],icon:Ms(wi.Rust)},{id:wi.DotNet,label:Kd[wi.DotNet],icon:Ms(wi.DotNet)},{id:wi.CSharp,label:Kd[wi.CSharp],icon:Ms(wi.CSharp)},{id:wi.CPlusPlus,label:Kd[wi.CPlusPlus],icon:Ms(wi.CPlusPlus)},{id:wi.Swift,label:Kd[wi.Swift],icon:Ms(wi.Swift)},{id:wi.Elixir,label:Kd[wi.Elixir],icon:Ms(wi.Elixir)}],Jd={id:Pi.OpentelemetryEbpfInstrumentation,label:Pi.OpentelemetryEbpfInstrumentation,icon:yt},qd={[wi.Go]:{community:[{id:Pi.GolangCommunity,label:Pi.GolangCommunity,icon:Ms(wi.Go)},Jd],enterprise:[{id:Pi.GolangEnterprise,label:Pi.GolangEnterprise,icon:Ms(wi.Go)}]},[wi.JavaScript]:{community:[{id:Pi.NodejsCommunity,label:Pi.NodejsCommunity,icon:Ms(wi.JavaScript)},Jd],enterprise:[{id:Pi.NodejsEnterprise,label:Pi.NodejsEnterprise,icon:Ms(wi.JavaScript)}]},[wi.Python]:{community:[{id:Pi.PythonCommunity,label:Pi.PythonCommunity,icon:Ms(wi.Python)},Jd],enterprise:[{id:Pi.PythonEnterprise,label:Pi.PythonEnterprise,icon:Ms(wi.Python)}]},[wi.Java]:{community:[{id:Pi.JavaCommunity,label:Pi.JavaCommunity,icon:Ms(wi.Java)},Jd],enterprise:[{id:Pi.JavaEnterprise,label:Pi.JavaEnterprise,icon:Ms(wi.Java)},{id:Pi.JavaEbpfInstrumentations,label:Pi.JavaEbpfInstrumentations,icon:Ms(wi.Java)}]},[wi.DotNet]:{community:[{id:Pi.DotNetCommunity,label:Pi.DotNetCommunity,icon:Ms(wi.DotNet)},Jd],enterprise:[{id:Pi.DotNetEnterprise,label:Pi.DotNetEnterprise,icon:Ms(wi.DotNet)}]},[wi.Ruby]:{community:[{id:Pi.RubyCommunity,label:Pi.RubyCommunity,icon:Ms(wi.Ruby)},Jd],enterprise:[{id:Pi.RubyEnterprise,label:Pi.RubyEnterprise,icon:Ms(wi.Ruby)}]},[wi.Php]:{community:[{id:Pi.PhpCommunity,label:Pi.PhpCommunity,icon:Ms(wi.Php)},Jd],enterprise:[]},[wi.CSharp]:{community:[],enterprise:[{id:Pi.CPlusPlusEnterprise,label:Pi.CPlusPlusEnterprise,icon:Ms(wi.CSharp)}]},[wi.MySql]:{community:[],enterprise:[{id:Pi.MySqlEnterprise,label:Pi.MySqlEnterprise,icon:Ms(wi.MySql)}]},[wi.CPlusPlus]:{community:[Jd],enterprise:[]},[wi.Rust]:{community:[Jd],enterprise:[]},[wi.Swift]:{community:[Jd],enterprise:[]},[wi.Elixir]:{community:[Jd],enterprise:[]},[wi.Nginx]:{community:[Jd],enterprise:[]},[wi.Postgres]:{community:[Jd],enterprise:[]},[wi.Redis]:{community:[Jd],enterprise:[]},[wi.Kafka]:{community:[Jd],enterprise:[]},[wi.Ignored]:{community:[],enterprise:[]},[wi.Unknown]:{community:[Jd],enterprise:[]},[wi.Processing]:{community:[],enterprise:[]},[wi.NoContainers]:{community:[],enterprise:[]},[wi.NoRunningPods]:{community:[],enterprise:[]}},Qd="*",Zd=e=>!!e?.includes(Qd),ec=e=>e?.length?Zd(e)?[Qd]:e:[],tc=e=>{if(e?.length&&!Zd(e))return e.filter(e=>e!==Qd)},ic=e=>e===Qd?"All languages":Kd[e]??e,nc=e=>e===Qd?vt:Ms(e),rc=ri("v1.26"),oc=(e,t)=>{if(e!==yi.K8s)return!1;const i=ri(t);return!(i>0)||i>=rc},ac=[Mi.NetworkMetrics],sc=e=>!ac.includes(e),lc=[{type:Mi.CodeAttributes,icon:qs(Mi.CodeAttributes),label:"Code Attributes",description:'The "Code Attributes" rule can be used to add code attributes containing payload data to traces.',docsUrl:"https://docs.odigos.io/pipeline/rules/codeattributes",supportedLanguages:[wi.Go,wi.Python,wi.JavaScript]},{type:Mi.CustomInstrumentation,icon:qs(Mi.CustomInstrumentation),label:"Custom Instrumentation",description:'The "Custom Instrumentation" rule can be used to instrument a specific symbol (i.e. for Golang), a class and method combination (i.e. for Java), or a class and function combination (i.e. for PHP) for detailed tracing.',docsUrl:"https://docs.odigos.io/pipeline/rules/custominstrumentation",supportedLanguages:[wi.Go,wi.Java,wi.Php]},{type:Mi.HeadersCollection,icon:qs(Mi.HeadersCollection),label:"Headers Collection",description:'The "Headers Collection" rule can be used to add span attributes containing HTTP Headers data to traces.',docsUrl:"https://docs.odigos.io/pipeline/rules/headerscollection",supportedLanguages:[wi.Go,wi.Java,wi.JavaScript]},{type:Mi.PayloadCollection,icon:qs(Mi.PayloadCollection),label:"Payload Collection",description:'The "Payload Collection" rule can be used to add span attributes containing payload data to traces.',docsUrl:"https://docs.odigos.io/pipeline/rules/payloadcollection",supportedLanguages:[wi.Go,wi.JavaScript]}],dc=e=>{const t=e?.instrumentationRuleTypes;return t?.length?t.map(e=>({type:e.type,icon:qs(e.type),label:e.displayName,description:e.description,docsUrl:e.docsUrl,supportedLanguages:e.supportedLanguages??[],fields:e.fields})):[]},cc="Recommendations",uc="Optimize your observability setup with actionable recommendations.",pc="Recommended",hc="Applied",gc="Dismissed",mc="Not applicable",fc={[wn.Recommended]:pc,[wn.Applied]:hc,[wn.Dismissed]:gc,[wn.NotApplicable]:mc},bc="Accept",yc="Dismiss",vc="Restore",$c="Docs",wc="Benefits",Sc="Considerations",xc="Apply Recommendation",Cc="Apply via UI",Ec="Apply via GitOps",Tc="Via UI",Oc="Via GitOps",Nc="Accept to choose how to apply this recommendation, or dismiss it if it is not relevant.",Ac="There are 2 ways to apply this recommendation.",kc="Odigos applies the selected change immediately.",Ic="Commit the configuration to your repository and let your GitOps controller apply it.",_c="UI changes apply only to this cluster and will not carry over if you re-install odigos.",Dc="No recommendations",Rc="There are no recommendations for this cluster right now.",Lc="This recommendation does not currently apply to your cluster.",Pc="Recommendation dismissed",Uc="Recommendation restored",Mc="Recommendation applied successfully",Fc="Failed to apply recommendation",zc={TITLE:"Regex Testing",REGEX_LABEL:"Regex",REGEX_EMPTY_HINT:"No regex to test - fill in the regex field on the row first.",TEST_STRING_LABEL:"Test string",TEST_STRING_PLACEHOLDER:"Paste a span attribute payload to test the regex against...",TEST_STRING_HELP:'The regex runs verbatim against this string. Paste the actual attribute value the processor will see - if your sample came from a log dump with JSON-escaped quotes (\\"), click Unescape first.',RESULT_LABEL:"Result",RESULT_CAPTURE_HINT:"This is the value that will be written to the new span attribute.",RESULT_EMPTY_REGEX:"Enter a regex to test.",RESULT_EMPTY_INPUT:"Enter a test string to see the result.",RESULT_NO_MATCH:"No match found.",RESULT_INVALID_REGEX_FALLBACK:"Invalid regex pattern.",UNESCAPE_LABEL:"Unescape",UNESCAPE_TOOLTIP:'Convert escape sequences (\\", \\n, \\t, \\\\) into their literal characters. Useful when pasting log output that JSON-escapes attribute values.'},Bc={SEGMENT_PRESET_LABEL:"Preset extract",SEGMENT_PRESET_TOOLTIP:"Extract a value from an existing attribute using a pre-set pattern (JSON, SQL, or Resource path).",SEGMENT_REGEX_LABEL:"Custom Regex",SEGMENT_REGEX_TOOLTIP:"Extract a value using your own regular expression with a single capture group.",PRESET_ROW_TITLE:e=>`Data format ${e+1}`,REGEX_ROW_TITLE:e=>`Custom Regex ${e+1}`,TEST_REGEX_LABEL:"Test Regex",REGEX_LABEL:"Regex",REGEX_PLACEHOLDER:"e.g. (?:^|[\\s,{(\"'])[\"']?study_id[\"']?\\s*[:=]\\s*[\"']?([^\"'\\s,;)}]+)",REGEX_HELP:"A regex with a single capture group; the captured value becomes the new attribute.",TARGET_LABEL:"New span attribute name",TARGET_PLACEHOLDER:"e.g. customerId",TARGET_HELP:"The name of the new extracted attribute."},jc={[hi.JSON]:{label:"JSON",keyLabel:"JSON key",placeholder:"e.g. customer_id",helpMessage:"Type the JSON key containing the value to extract."},[hi.SQL]:{label:"SQL",keyLabel:"SQL key",placeholder:"e.g. invoice_id",helpMessage:"Type the SQL key containing the value to extract."},[hi.ResourcePath]:{label:"Resource path",keyLabel:"Resource path key",placeholder:"e.g. tenants",helpMessage:"Type the resource name containing the value to extract."}},Hc="Cancel",Wc="Save",Xc="Edit rule",Gc="Edit auto rule",Vc="Create rule",Kc="Delete rule",Yc="Save",Jc="Create your first rule",qc="No Rules Exist",Qc="No Results",Zc=e=>`No rules match the search term "${e}"`,eu="Rule name",tu="Rule type",iu="Select the type of condition that makes a trace highly relevant.",nu="Rule Enabled",ru="Rule Disabled",ou="Enabled",au="Disabled",su="Note",lu="HTTP route",du="Method",cu="Keep Percentage",uu="Keep traces with duration larger than",pu="Keep traces with errors",hu="Keep at least this percentage of matching traces. A higher rate from another matching rule may apply instead.",gu="Keep at most this percentage of matching traces. A lower rate from another matching rule may apply instead.",mu="Custom percentage",fu="Disabled rule",bu="Sample",yu="Keep all",vu="Drop all",$u="Operation type",wu="HTTP route prefix",Su="Templated path",xu="Templated path prefix",Cu="Kafka topic",Eu="Custom duration (ms)",Tu="No preview available",Ou="Server address",Nu="Drop at most this percentage of matching traces",Au="Unnamed rule",ku="Sampling Preview",Iu="Source Scope",_u="Unknown source",Du="Operation",Ru="Duration",Lu="Errors",Pu="Keep Percentage",Uu="Define which sources this rule applies to. You can target specific services, namespaces, or apply the rule to the entire cluster.",Mu="Define which operations this rule applies to. You can target specific endpoints or requests, or apply the rule to all operations in the selected services.",Fu="Define a duration threshold for this rule. Traces with a duration longer than the specified value will be considered important and retained.",zu="Retain traces with errors from the selected services and operations.",Bu="Use Keep All to retain every matching trace, or Sample when keeping everything is too expensive. 100% means keep all",ju="Use Drop All to discard every matching trace, or Sample to keep some examples. 0% means drop all.",Hu={highlyRelevant:Bu,noisy:ju,costReduction:void 0},Wu="Type rule name",Xu="Add note here...",Gu="Type here",Vu="Search source name",Ku="e.g. collector.my.vendor.com",Yu="Optional notes (not used by the system). Add any context or details for this sampling rule.",Ju="Rule will apply to all sources in the cluster",qu="If multiple source scopes are set, they must all match simultaneously.",Qu="All sources",Zu="-",ep="All",tp="Sources",ip="Namespaces",np="Languages",rp="any of",op="AND",ap="All operations",sp="HTTP server endpoint",lp="HTTP client endpoint",dp="Kafka consumer",cp="Kafka producer",up="Sampling Rules",pp='Control how traces are categorized based on "Importance" and potential value, for fine grain control of what is kept and what is dropped.',hp="Refresh",gp="Create rule",mp="Sampling docs",fp="75vw",bp="Delete rule?",yp="Are you sure you want to delete this sampling rule?",vp="Delete",$p="Cancel",wp="Kubernetes Health Probes",Sp="Keep All Error Traces",xp="Drop Traces Cluster-Wide",Cp="A rule with the same matching conditions already exists.",Ep="Create this rule as-is?",Tp="This rule still uses the default configuration.\nDo you want to create it anyway?",Op="Rule preview",Np="Continue editing",Ap="Create 'Noisy Operation Kubernetes Health Probes' rule",kp="Edit 'Noisy Operation Kubernetes Health Probes' rule",Ip="Automatically detect and sample health probe traces across the cluster.",_p="Create 'Highly Relevant Operations' rule",Dp="Edit 'Highly Relevant Operations' rule",Rp="Automatically keep all error traces across the entire cluster.",Lp="Create 'Cost Reduction' rule",Pp="Edit 'Cost Reduction' rule",Up="Automatically drop a percentage of traces across the entire cluster.",Mp="Skip setup",Fp="Start setup",zp="Next",Bp="Go to Sampling",jp="Read more",Hp="Welcome to Sampling",Wp="Cut costs without losing what matters",Xp="Odigos sampling works in three stages:",Gp="Filter noisy traffic",Vp="Remove non-actionable traces like health checks.",Kp="Guarantee highly relevance operations",Yp="Keep traces with errors, high latency, or mission-critical endpoints/services.",Jp="Reduce cost",qp="Sample routine traffic using percentages.",Qp="Sampling does not drop individual spans - it keeps or drops the entire trace.",Zp="Filter noisy operations",eh="Cut traces with little or no observability value (health-checks, metric scarping, etc)",th="Odigos filters these efficiently, dropping them early with almost no resource cost.\n\nSampling happens at request start, so only root span attributes available at that moment can be used. Later insights about the trace (errors, latency) - aren’t available.",ih="Preset Rules",nh="Kubernetes Health Probes",rh="Automatically ignore health checks",oh="You can review, adjust, and add additional custom rules later.",ah="Choose your sampling strategy",sh="Pick the approach that best fits your balance of cost vs data-completeness",lh="Keep List",dh="Budget Friendly",ch="Define which traces must be kept, while all others are sampled by default to minimize cost.",uh="Cost-oriented - keeps only what you explicitly select.",ph="Best for very large clusters with high volumes of traces and high costs.",hh="Higher risk of missing important traces without ongoing review.",gh="Drop List",mh="Safe Choice",fh="Define which traces must be aggressively dropped, while all others are kept by default.",bh="Preserves most data unless explicitly filtered.",yh="Safer by default - gaps in rules or system changes increase cost rather than risk losing important traces.",vh="Advanced",$h="Maximum Flexibility",wh="Full control over all sampling rules and categories.\n\nBest for advanced users who want complete flexibility.",Sh="'Keep List' profile",xh="Protect important traces",Ch="Start by setting the default sampling rate for all traces.\nThen define rules to exclude highly relevant traces so they are guaranteed to be kept\n\nCommon use-cases include:",Eh="Traces with errors",Th="Slow requests (duration above threshold)",Oh="Mission-Critical endpoints or services",Nh="Services under test or evaluation",Ah="New deployments",kh="You can review, adjust, and add rules once onboarding is complete.",Ih="Common Rules",_h="Preset Rules",Dh="Error collection - entire cluster",Rh="Keep all traces with errors",Lh="Ambient sampling percentage",Ph="'Drop List' profile",Uh="Reduce high-volume traffic",Mh="Start by keeping all traces by default. Then define rules to drop high-volume or low-value traces to reduce overall volume and cost.\n\nIn many systems, a small number of endpoints generate most of the trace volume.\nTargeting these high-volume sources can significantly reduce overall data.",Fh="Advanced Configuration",zh="Configure sampling rules",Bh="Advanced mode allows you to configure all sampling categories:",jh="Noise Filtering - remove non-actionable traces",Hh="Highly Relevance - guarantee important traces are kept",Wh='Cost Control - drop traces for "Normal" operations',Xh="Rules can target:",Gh="Services",Vh="HTTP Endpoints",Kh="DB Operations",Yh="Errors",Jh="Latency and more...",qh="Sampling configured successfully!",Qh="Your sampling configuration is ready.\nYou can add and adjust rules anytime in Sampling Rules space.",Zh="Odigos will now:",eg="Filter noisy operations",tg="Guarantee important traces",ig="Reduce cost using controlled sampling",ng="Recommended",rg={noisy:"Rules that reduce noise from high-volume, low-value operations using Head Sampling.",highlyRelevant:"Add a rule to identify highly relevant operations. Traces with errors, long duration, or from critical endpoints and key workflows will be retained so important transactions are always available for analysis.",costReduction:"Rules that optimize costs by sampling less critical data using Tail Sampling."},og={noisy:Ap,highlyRelevant:_p,costReduction:Lp},ag={noisy:kp,highlyRelevant:Dp,costReduction:Pp},sg={noisy:"Noisy Operation",highlyRelevant:"Highly Relevant",costReduction:"Cost Reduction"},lg=[{id:Vi.Logs,value:"Logs"},{id:Vi.Metrics,value:"Metrics"},{id:Vi.Traces,value:"Traces"},{id:Vi.Profiles,value:"Profiles"}],dg=6048e5,cg="URL templatization",ug="Replace dynamic URL path segments with named placeholders to reduce cardinality in span names and http.route.",pg="Default templatization",hg="Custom and default URL templatization scopes across URL templatization actions.",gg="Default templatization is not enabled",mg="Automatically detect and templatize dynamic URL segments when no custom template matches.",fg="Enable for entire cluster",bg="Custom URL templates",yg="Exact overrides when default templatization misses a route. Use when low cardinality matters — define patterns per templating scope.",vg="View by:",$g="Groups",wg="Tree",Sg="List",xg="Create templating scope",Cg="Edit scoped templates",Eg="Edit",Tg="Add template",Og="Add templatization rules",Ng="Define exact path patterns for routes default templatization misses — replace dynamic segments with placeholders like {id} or {orderId} (e.g. /users/{id}/orders/{orderId}).",Ag="Add templatization rule",kg="Choose how to templatize dynamic URLs",Ig="Reduce route cardinality by replacing changing path segments with reusable placeholders.",_g="Before",Dg="After",Rg="/users/123/orders/456",Lg="/users/{id}/orders/{orderId}",Pg="Automatic templatization",Ug="Recommended",Mg="Detect and templatize dynamic URL segments when no custom rule matches.",Fg="Applies to: Entire cluster",zg="Reversible at any time",Bg="Enabled",jg="Need more control?",Hg="Create a custom rule for specific URL patterns.",Wg="Create custom rule",Xg="Learn how it works",Gg="Docs",Vg="https://docs.odigos.io/pipeline/actions/attributes/urltemplatization",Kg="Default templatization is enabled — editor coming next.",Yg="746px",Jg="Add default templatization rule",qg="Edit default templatization rule",Qg="Disable for a scope",Zg="UI template rules",em="Source Scope",tm="Scope",im="Choose which sources this template rule applies to.",nm="Sources where this template is tested and applied.",rm="This rule will apply to all sources in the cluster.",om="Default templatization",am="Automatically templatize dynamic URL segments when no custom template matches.",sm="Enable automatic URL templatization for this scope",lm=["This disables only the default (heuristic) templatization for the selected scope. Custom templates are still checked and applied when they match.","Sources that are not disabled by any rule continue to use all default heuristic templatization rules."],dm="default templatization for this scope",cm="Are you sure you want to disable default templatization for the selected scope? This takes effect in the cluster immediately.",um="Disable",pm="Skip policy",hm="Advanced",gm=["On public-facing services, bots and scanners often probe random paths that return errors such as 404. Applying default templatization to those paths can create high-cardinality routes.","Custom templates still match first. Skip policy only affects the default heuristic when no custom rule matched.","Choose either all non-2xx responses or specific status codes — not both."],mm=gm.join(" "),fm="Skip default templatization for all non-2xx responses",bm="Skip default templatization for specific HTTP status codes",ym="Example: 404, 401",vm="Comma-separated HTTP status codes between 100 and 599. Mutually exclusive with skipping all non-2xx responses.",$m="This rule will take effect in the cluster immediately after it is added.",wm="This rule will take effect in the cluster immediately after it is saved.",Sm="No template changes. Save will keep the current templates.";function xm(e,t){const i=[];return e>0&&i.push(1===e?"1 template will be added":`${e} templates will be added`),t>0&&i.push(1===t?"1 template will be removed":`${t} templates will be removed`),i.length?`On Save, ${i.join(" and ")}. Changes take effect immediately.`:Sm}const Cm="Add rule",Em="Save",Tm="Cancel",Om="Cancel without saving",Nm="Delete",Am="templating scope";function km(e){return e<=0?"Are you sure you want to delete this templating scope? This cannot be undone.":`Are you sure? This templating scope has ${1===e?"1 template":`${e} templates`}. They will be deleted permanently.`}const Im="Enter valid HTTP status codes between 100 and 599, separated by commas.",_m="Create custom template",Dm="Create new scoped template",Rm="Add URL templates",Lm="UI template rules",Pm=e=>`To ${e}`,Um=e=>`Applies to ${e} source${1===e?"":"s"}`,Mm=e=>`Applies to ${e} namespace${1===e?"":"s"}`,Fm=e=>`Applies to ${e} language${1===e?"":"s"}`,zm="Applies to entire cluster",Bm=e=>`Applies to ${e} scope${1===e?"":"s"}`,jm="Where should this rule apply?",Hm=jm,Wm="Scope controls how often this template is evaluated. Prefer a specific scope when you can.",Xm="Specific scope",Gm="Entire cluster",Vm="Apply the rule only where it is needed.",Km="Apply to every source in this cluster.",Ym="Quick start",Jm="Apply the template only to relevant sources so it is not computed for the rest of the cluster.",qm="Applies everywhere — simplest to add, but the template is computed for all sources, including irrelevant ones.",Qm="Recommended. Add to an existing group or create a new one with its own scope. The template runs only for matching traffic — more efficient.",Zm="Simplest setup, but less efficient. This template is evaluated against every request in the cluster. Prefer a specific scope when you know where it should apply.",ef="Simplest setup, but less efficient. These templates are evaluated against every request in the cluster. Prefer a specific scope when you know where they should apply.",tf="Add to existing template group",nf="Create new template group",rf="Add here",of="Create New",af="Existing templating scope",sf="Templating scopes",lf="Select where to add the new template",df="A template group already uses this scope",cf="Choose where to add the new templates.",uf="Add to existing template group",pf="Create a separate template group",hf="Use different settings or behavior for the same scope.",gf="View action settings",mf="Default settings",ff=e=>af,bf=e=>1===e?"1 template":`${e} templates`,yf="Templating scope",vf=(e,t)=>`${1===e?"1 scope":`${e} scopes`} · ${1===t?"1 template":`${t} templates`}`,$f="Template group will be added to the default action. Expand Select action to choose a different one.",wf="Select action",Sf="Rules live on an Odigos action. Use one per team, namespace, or pipeline, or create a new action.",xf="Advanced settings",Cf="Default UI-managed action · Recommended",Ef="Create a new action",Tf="Select action",Of="Default UI-managed action",Nf="Add this template group to the default UI-managed action.",Af="Select action",kf="Choose an existing action or create a new one for this template group.",If="Search template group by type action name or scope (languages, namespaces, sources)",_f="Selected Template group:",Df="URL templatization action",Rf="Create new action",Lf="__odigos_create_new_url_templatization_action__",Pf=kf,Uf="New action name",Mf="New action group",Ff="Defaults to 'UI template rules'. Actions can help keep templating rules organized, but they are optional - advanced users can create a separate action when useful.",zf="Create new template group",Bf="Next",jf="Back",Hf="Action name",Wf="Action",Xf="UI template rules",Gf="__odigos_default_url_templatization_action__",Vf="UI-owned",Kf="Externally synced",Yf=["Safe to edit in Odigos UI.","This action is created and owned here. Fresh installs do not include it until you add templates."],Jf=["Edits in Odigos UI may be overwritten.","This action is synced from outside the UI via the Kubernetes Action resource (e.g. GitOps, kubectl)."],qf=Vf,Qf="Templates",Zf="Other templates in this group",eb="Additional templates that share the same source scope and Action as this rule.",tb="e.g. /api/users/{id}",ib="Language",nb="Namespace",rb="Source",ob="AND",ab="Entire cluster",sb="Unset",lb="Enabled globally",db="Default templating disabled",cb="Enabled",ub="Default templatization is unset. No default rules are configured on an enabled action.",pb="Default templatization is enabled globally.",hb="Default templatization is disabled for the entire cluster.";function gb(e){return e<=0?pb:`Default templatization is enabled globally and disabled in ${1===e?"1 scope":`${e} scopes`}.`}const mb="Disabled for these scopes",fb="Disable for a scope",bb="Delete",yb="disabled scope",vb="Are you sure you want to remove this scope from the disabled list? Default templatization will apply again for this scope.",$b="Automatic templatization",wb="Active",Sb="Custom and default URL templatization scopes across URL templatization actions.",xb="Custom templates take precedence over automatic templatization.",Cb="Scope",Eb="Status codes",Tb="Disabled",Ob="Entire cluster",Nb="All",Ab="None",kb="Disabled",Ib="No disabled scope configured",_b="Add disabled",Db="Disabled scopes",Rb="Advanced",Lb=(e,t)=>`${1===e?"1 disabled scope":`${e} disabled scopes`} · ${1===t?"1 skip policy":`${t} skip policies`}`,Pb="Automatic templatization off for matching traffic.",Ub="Disable for a scope",Mb="Scope",Fb="Effective behavior",zb="Status",Bb="Automatic templatization off",jb="Covered by broader exception",Hb="Disabled",Wb="Redundant",Xb="No disabled scope configured",Gb="Disable automatic templatization for specific scopes when needed.",Vb=(e,t)=>`${e} configured • ${t} effective`,Kb=e=>1===e?"1 scope":`${e} scopes`,Yb="Default templatization is enabled for all HTTP status codes.";function Jb(e){return e<=0?Yb:`Default templatization skips selected HTTP status codes in ${1===e?"1 scope":`${e} scopes`}.`}const qb="HTTP status code policies",Qb="No skip policy configured",Zb="Skip automatic templatization for selected HTTP status codes in specific scopes when needed.",ey="Add skip policy for a scope",ty="Add skip policy for a scope",iy="Skip default templatization on HTTP errors",ny="Delete",ry="skip policy",oy="Are you sure you want to remove this skip policy? Default templatization will again apply for matching error responses in this scope.",ay="Template details",sy="Template",ly="Turn a concrete URL path into a pattern by replacing high-cardinality segments with placeholders like {id}.",dy="Created via",cy="Action name",uy="Kubernetes name",py="Odigos Action (Kubernetes resource) where this template is managed.",hy="Try a URL",gy="/users/12/orders/345685335358",my="Test URL",fy="Close",by="Result",yy="Templated URL path",vy="Match found",$y="This URL matches the template.",wy="No match",Sy="This URL doesn't match the template.",xy="Check the URL structure and parameter positions, then try again.",Cy={dataStreamsLoading:!1,dataStreams:[],selectedStreamName:Ya},Ey=Ft(e=>({...Cy,setDataStreamsLoading:t=>e({dataStreamsLoading:t}),setDataStreams:t=>e({dataStreams:t}),addDataStreams:t=>e(e=>{const i=[...e.dataStreams,...t].map(e=>[e.name,e]);return{dataStreams:Array.from(new Map(i).values())}}),removeDataStreams:t=>e(e=>({dataStreams:e.dataStreams.filter(e=>!t.find(t=>t.name===e.name))})),setSelectedStreamName:t=>e({selectedStreamName:t}),resetDataStreamStore:()=>e(Cy)}));var Ty;(e=>{e.AddSource="add-source",e.EditSource="edit-source",e.AddDestination="add-destination",e.EditDestination="edit-destination",e.AddAction="add-action",e.EditAction="edit-action",e.AddInstrumentationRule="add-instrumentation-rule",e.EditInstrumentationRule="edit-instrumentation-rule",e.OnboardingDone="onboarding-done"})(Ty||(Ty={}));const Oy=e=>`add-${za(e).replaceAll(" ","-").toLowerCase()}`,Ny=e=>`edit-${za(e).replaceAll(" ","-").toLowerCase()}`,Ay=Ft(e=>({drawerType:null,drawerEntityId:null,pendingViewSamplingRule:null,setDrawerType:t=>e({drawerType:t}),setDrawerEntityId:t=>e({drawerEntityId:t}),setPendingViewSamplingRule:t=>e({pendingViewSamplingRule:t})})),ky=()=>({searchText:"",statuses:[],platformTypes:[],namespaces:[],regions:[],kinds:[],monitors:[],languages:[],podsAgentInjectionStatus:[],enabledStatuses:[],onlyErrors:!1}),Iy=Ft(e=>({searchText:"",setSearchText:t=>e({searchText:t}),statuses:[],setStatuses:t=>e({statuses:t}),platformTypes:[],setPlatformTypes:t=>e({platformTypes:t}),namespaces:[],setNamespaces:t=>e({namespaces:t}),regions:[],setRegions:t=>e({regions:t}),kinds:[],setKinds:t=>e({kinds:t}),monitors:[],setMonitors:t=>e({monitors:t}),languages:[],setLanguages:t=>e({languages:t}),podsAgentInjectionStatus:[],setPodsAgentInjectionStatus:t=>e({podsAgentInjectionStatus:t}),enabledStatuses:[],setEnabledStatuses:t=>e({enabledStatuses:t}),onlyErrors:!1,setOnlyErrors:t=>e({onlyErrors:t}),setAll:t=>e(t),clearAll:()=>e({searchText:"",statuses:[],platformTypes:[],namespaces:[],regions:[],kinds:[],monitors:[],languages:[],podsAgentInjectionStatus:[],enabledStatuses:[],onlyErrors:!1}),clearFilters:()=>e({statuses:[],platformTypes:[],namespaces:[],regions:[],kinds:[],monitors:[],languages:[],podsAgentInjectionStatus:[],enabledStatuses:[],onlyErrors:!1}),getEmptyState:ky})),_y=Ft((e,t)=>({notifications:[],addNotification:i=>{const n=new Date,r=`${n.getTime().toString()}${i.target?`#${i.target}`:""}`,{notifications:o}=t();o.some(e=>e.type===i.type&&e.title===i.title&&e.message===i.message&&!e.dismissed)||e(e=>({notifications:[{...i,id:r,time:n.toISOString(),dismissed:!1,seen:!1},...e.notifications]}))},markAsDismissed:t=>{e(e=>{const i=e.notifications.findIndex(e=>e.id===t);return-1!==i&&(e.notifications[i].dismissed=!0),{notifications:e.notifications}})},markAsSeen:t=>{e(e=>{const i=e.notifications.findIndex(e=>e.id===t);return-1!==i&&(e.notifications[i].seen=!0),{notifications:e.notifications}})},removeNotification:t=>{e(e=>{const i=e.notifications.findIndex(e=>e.id===t);return-1!==i&&e.notifications.splice(i,1),{notifications:e.notifications}})},removeNotifications:t=>{t&&e(e=>({notifications:e.notifications.filter(e=>e.id.split("#")[1]!==t)}))}}));var Dy;(e=>{e.Instrumenting="instrumenting",e.Uninstrumenting="uninstrumenting",e.BulkInstrumenting="bulk-instrumenting",e.BulkUninstrumenting="bulk-uninstrumenting",e.DownloadingDiagnose="downloading-diagnose"})(Dy||(Dy={}));const Ry=(e,t)=>({...t?.[e]||{total:0,current:0,percentage:0}}),Ly=e=>(e.total<e.current&&(e.total=e.current+1),e.percentage=Math.round(e.current/e.total*100),e),Py=Ft((e,t)=>({progress:{},setProgress:(i,n)=>{const r=t(),o=Ry();return"number"==typeof n.total&&(o.total=n.total),"number"==typeof n.current&&(o.current=n.current),Array.isArray(n.list)&&(o.list=n.list),e({progress:{...r.progress,[i]:Ly(o)}})},addProgress:(i,n,r)=>{const o=t(),a=Ry(i,o.progress);return a.current+=n,r&&(a.list=a.list?.map(e=>e.label===r.label?{...e,status:r.status}:e)),e({progress:{...o.progress,[i]:Ly(a)}})},resetProgress:t=>e({progress:{[t]:void 0}})})),Uy=Ft(e=>({selectedSources:{},setSelectedSources:t=>e({selectedSources:t}),resetSelectedState:()=>e(()=>({selectedSources:{},selectedConnection:null}))})),My={configuredSources:{},configuredFutureApps:{},configuredDestinations:[],configuredDestinationsUpdateOnly:[]},Fy=(e,t)=>e.destinationType.type!==t.destinationType.type,zy=Ft(e=>({...My,setConfiguredSources:t=>e({configuredSources:t}),setConfiguredFutureApps:t=>e({configuredFutureApps:t}),setConfiguredDestinations:t=>e({configuredDestinations:t}),addConfiguredDestination:t=>e(e=>({configuredDestinations:[...e.configuredDestinations,t]})),removeConfiguredDestination:t=>e(e=>({configuredDestinations:e.configuredDestinations.filter(e=>Fy(e,t))})),setConfiguredDestinationsUpdateOnly:t=>e({configuredDestinationsUpdateOnly:t}),addConfiguredDestinationUpdateOnly:t=>e(e=>{const i=[...e.configuredDestinationsUpdateOnly,t].map(e=>[e.id,e]);return{configuredDestinationsUpdateOnly:Array.from(new Map(i).values())}}),removeConfiguredDestinationUpdateOnly:t=>e(e=>({configuredDestinationsUpdateOnly:e.configuredDestinationsUpdateOnly.filter(e=>Fy(e,t))})),clearStore:()=>e(()=>({...My}))})),By=e=>{function t(){return void 0===e?{}:$s(e)}const[i,n]=Ht(t()),[r,o]=Ht({}),[a,s]=Ht(t()),l=Xt((e,t)=>{const i={};if(!t||"object"!=typeof t)return e?{...e}:i;for(const[n,r]of Object.entries(e)){const e=n;if(Array.isArray(r)){const n=t[e];Array.isArray(n)&&r.length===n.length&&r.every((e,t)=>"object"==typeof e&&null!==e?0===Object.keys(l(e,n[t])).length:e===n[t])||(i[e]=t[e])}else if("object"==typeof r&&null!==r)if(null==t[e]||"object"!=typeof t[e])i[e]=t[e];else{const n=l(r,t[e]);Object.keys(n).length>0&&(i[e]=n)}else r!==t[e]&&(i[e]=t[e])}for(const n of Object.keys(t))n in e||(i[n]=t[n]);return i},[]),d=(e,t)=>0===Object.keys(l(e,t)).length,c=Gt(()=>!d(a,i),[a,i]);Wt(()=>{const r=t();void 0!==e&&"{}"===JSON.stringify(i)&&"{}"!==JSON.stringify(r)&&(n(r),s(r))},[e,i]);const u=Xt((e,t)=>ws("formData"===e?i:r,t.toString()),[i,r]);return{formData:i,formErrors:r,getFormDiff:l,areFormValuesEqual:d,isFormDirty:c,handleFormChange:(e,t,i)=>{if(e){const i=e.toString(),r=i.split(".");1===r.length?n(i=>({...i,[e]:t})):n(e=>{const i=$s(e);let n=i;for(let e=0;e<r.length-1;e++){const t=r[e];n[t]&&"object"==typeof n[t]||(n[t]={}),n=n[t]}return n[r[r.length-1]]=t,i}),o(e=>{const t=i,n=r[r.length-1],o=void 0!==e[t],a=n!==t&&void 0!==e[n];if(!o&&!a)return e;const s={...e};return o&&delete s[t],a&&delete s[n],s})}else i&&n({...i})},handleErrorChange:(e,t,i)=>{if(e){const i=e.toString().split(".");1===i.length?o(i=>({...i,[e]:t})):o(e=>{const n=$s(e);let r=n;for(let e=0;e<i.length-1;e++){const t=i[e];r[t]&&"object"==typeof r[t]||(r[t]={}),r=r[t]}return r[i[i.length-1]]=t,n})}else i&&o({...i})},resetFormData:e=>{const i=e||t();n(i),s(i),o({})},getNestedValue:u}},jy={type:"",name:"",notes:"",signals:[],disabled:!1,fields:{clusterAttributes:null,overwriteExistingValues:null,renames:null,attributeNamesToDelete:null,piiCategories:null,urlTemplatizationRulesGroups:null,extractAttribute:null}},Hy=()=>{const{addNotification:e}=_y(),{formData:t,formErrors:i,handleFormChange:n,handleErrorChange:r,resetFormData:o}=By(jy);return{formData:t,formErrors:i,handleFormChange:n,resetFormData:o,validateForm:i=>{const n={};let o=!0;if(Object.entries(t).forEach(([e,t])=>{switch(e){case"type":case"signals":rd(t)&&(n[e]=Za.FIELD_IS_REQUIRED)}}),t.type===oi.URLTemplatization){const e=t.fields?.urlTemplatizationRulesGroups;if(e)for(const t of e)if(t.templatizationRules?.some(e=>!e.template?.trim())){n.fields=Za.FIELD_IS_REQUIRED;break}}return o=!Object.values(n).length,!o&&i?.withAlert&&e({type:Oi.Warning,title:i.alertTitle,message:Za.REQUIRED_FIELDS,hideFromHistory:!0}),r(void 0,void 0,n),o},loadFormWithDrawerItem:({type:e,signals:t,name:i,notes:r,disabled:o,fields:a})=>{const s={...$s(jy),type:e,signals:t,name:i,notes:r,disabled:o};Object.entries(a).forEach(([e,t])=>{if(t)switch(e){case si.LabelsAttributes:case si.AnnotationsAttributes:s.fields||(s.fields={}),s.fields[e]=(i=t)&&Array.isArray(i)?i.map(e=>!e.fromSources?.length&&e.from?{...e,fromSources:[e.from]}:e):i;break;case si.UrlTemplatizationRulesGroups:s.fields||(s.fields={}),s.fields[e]=(n=t,n?.length?n.map(e=>e.workloadFilters?.length||!e.filterK8sWorkloadKind&&!e.filterK8sWorkloadName?e:{...e,workloadFilters:[{kind:e.filterK8sWorkloadKind,name:e.filterK8sWorkloadName||void 0}]}):n);break;case si.CollectContainerAttributes:case si.CollectReplicaSetAttributes:case si.CollectWorkloadId:case si.CollectClusterId:case si.ClusterAttributes:case si.OverwriteExistingValues:case si.AttributeNamesToDelete:case si.Renames:case si.PiiCategories:case si.ExtractAttribute:s.fields||(s.fields={}),s.fields[e]=t}var i,n}),n(void 0,void 0,s)}}},Wy=e=>{Wt(()=>{if(e){const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])},Xy=()=>{const e=Vt(null),[t,i]=Ht(0),[n,r]=Ht(0);return Wt(()=>{const t=()=>{if(e.current){const{width:t,height:n}=e.current.getBoundingClientRect();i(t),r(n)}};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),{containerRef:e,containerWidth:t,containerHeight:n}},Gy="data-ignore-outside-click",Vy=e=>{let t=e;for(;t;){if(t instanceof Element&&t.hasAttribute(Gy))return!0;t=t.parentNode}return!1},Ky=(e,t)=>{const i=Vt(t);i.current=t,Wt(()=>{const t=t=>{const n=t.target;e.current&&!e.current.contains(n)&&(Vy(n)||i.current())};return document.addEventListener("mousedown",t),document.addEventListener("touchstart",t),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("touchstart",t)}},[e])},Yy=({defaultClientHeight:e=0,defaultClientwidth:t=0,onClickOutside:i,positionMode:n="local"}={})=>{const r=Vt(null),[o,a]=Ht(!1),[s,l]=Ht({top:0,left:0}),[d,c]=Ht({edge:"top",align:"left"});return Ky(r,()=>{o&&(a(!1),i?.())}),{popupRef:r,popupOpen:o,setPopupOpen:a,popupPosition:s,arrowPlacement:d,handlePosition:(i,o)=>{if("local"===n)return void l({top:o,left:i});const{innerWidth:a,innerHeight:s}=window,d=r.current?.clientWidth||t,u=r.current?.clientHeight||e,p=i/a,h=p<1/3?"left":p>2/3?"right":"center";c({edge:o<s/2?"top":"bottom",align:h});let g=o,m=i;if(g>=s/2&&(g+=-u),"center"===h){m=i-d/2;const e=8;m=Math.max(e,Math.min(m,a-d-e))}else m>=a/2&&(m=i-d);l({top:g,left:m})}}},Jy=n.div`
|
|
197
197
|
width: ${({$fullWidth:e,$inline:t})=>e?"100%":t?void 0:"fit-content"};
|
|
198
198
|
position: relative;
|
|
199
199
|
display: ${({$inline:e})=>e?"inline":"flex"};
|
|
@@ -318,7 +318,7 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import n,{css as
|
|
|
318
318
|
}
|
|
319
319
|
`:""}
|
|
320
320
|
}
|
|
321
|
-
`,av=Bt(({"data-id":n,label:r,tooltip:a,hideTooltipIcon:s,leftIcon:l,rightIcon:d,variant:c=nv.Primary,size:u=rv.M,isSelected:p,iconSize:h,loading:g,fullWidth:m,withShadow:f,textColor:b,textAlign:y="center",disabled:v,onClick:$,...w},S)=>{const x=o(),C=h||(u===rv.L?34:u===rv.M?24:16),E=u===rv.L?ja.S:ja.XS,T=b||(v?x.v2.colors.grey[400]:x.v2.colors.white[500]),[O,N]=Ht(!1),A=!(!g&&!O),k=!(!v&&!A),I=Xt(async e=>{e.stopPropagation(),N(!0);try{await($?.(e))}finally{N(!1)}},[$]);return t(ov,{ref:S,"data-id":n,$variant:c,$size:u,$fullWidth:m,$withShadow:f,$hasLabel:!!r,$isSelected:p,$align:y,...w,disabled:k,onClick:k?void 0:I,children:t(iv,{text:a,withIcon:!s,fullWidth:!0,children:A?t(Wl,r?{withGradient:!0,titleColor:T,titleSize:E}:{withSpinnerOld:!0}):e(i,{children:[l&&t(Rl,{$width:"fit-content",children:t(l,{size:C,fill:T})}),r?t(Va,{size:E,weight:500,color:T,nowrap:!0,align:y,children:r}):null,d&&t(Rl,{$width:"fit-content",children:t(d,{size:C,fill:T})})]})})})});av.displayName=av.name;const sv=({onDone:e}={})=>{const[i,n]=Ht(!1),[r,o]=Ht(-1),a=Xt(async(t,r)=>{if(!i){if(n(!0),void 0!==r&&o(r),navigator?.clipboard&&navigator.clipboard.writeText)try{await navigator.clipboard.writeText(t)}catch(e){}else{const e=document.createElement("textarea");e.value=t,document.body.appendChild(e),e.select();try{document.execCommand("copy")}catch(e){}document.body.removeChild(e)}e?.(),setTimeout(()=>{n(!1),o(-1)},1e3)}},[i,e]);return{CopyButton:Xt(({value:e,...n})=>t(av,{leftIcon:i?$t:wt,onClick:()=>a(e),variant:nv.Secondary,size:rv.S,...n}),[i]),isCopied:i,copiedIndex:r,clickCopy:a}},lv=e=>{const{addNotification:t}=_y(),{formData:i,handleFormChange:n,formErrors:r,handleErrorChange:o,resetFormData:a}=By(e);return{formData:i,formErrors:r,handleFormChange:n,resetFormData:a,validateForm:e=>{const n={};let r=!0;return i.name?od(i.name)?n.name=void 0:(r=!1,n.name=Za.ILLEGAL_K8S_LABEL):(r=!1,n.name=Za.FIELD_IS_REQUIRED),!r&&e?.withAlert&&t({type:Oi.Warning,title:e.alertTitle,message:Za.REQUIRED_FIELDS,hideFromHistory:!0}),o(void 0,void 0,n),r},loadFormWithDrawerItem:({name:t})=>{const i={...$s(e),name:t};n(void 0,void 0,i)}}},dv={type:"",name:"",exportedSignals:{logs:!1,metrics:!1,traces:!1,profiles:!1},fields:[],disabled:!1},cv=e=>{const{supportedSignals:t,preLoadedFields:i}=e||{},{addNotification:n}=_y(),{formData:r,formErrors:o,handleFormChange:a,handleErrorChange:s,resetFormData:l}=By(dv),[d,c]=Ht([]),[u,p]=Ht([]);return Wt(()=>{var e;p(d?(e=d,e.filter(e=>!!e).map(e=>{const{name:t,componentType:i,componentProperties:n,displayName:r,initialValue:o,renderCondition:a}=e;if(i===Ei.Dropdown){const e=ls(n,{}),s=Array.isArray(e.values)?e.values.map(e=>({id:e,label:e})):Object.entries(e.values).map(([e,t])=>({id:e,label:t}));return{name:t,componentType:i,title:r,value:o,placeholder:e.placeholder||"Select an option",options:s,renderCondition:a,...e}}return{name:t,componentType:i,title:r,value:o,renderCondition:a,...ls(n,{})}})).map(e=>{if(i){const t="string"==typeof i?ls(i,{}):i;if(e.name in t)return{...e,value:t[e.name]}}return e}):[])},[d,i]),Wt(()=>{if(u){const e=u.map(e=>({key:e.name,value:e.value}));a("fields",e)}},[u]),Wt(()=>{if(t&&0===hd(r.exportedSignals).length){const{logs:e,metrics:i,traces:n}=t;a("exportedSignals",{logs:e.supported,metrics:i.supported,traces:n.supported})}},[t,r.exportedSignals]),{formData:r,formErrors:o,handleFormChange:a,resetFormData:l,validateForm:e=>{const t={};let i=!0;return u.forEach(({name:e,value:n,required:r})=>{r&&!n&&(i=!1,t[e]=Za.FIELD_IS_REQUIRED)}),!i&&e?.withAlert&&n({type:Oi.Warning,title:e.alertTitle,message:Za.REQUIRED_FIELDS,hideFromHistory:!0}),s(void 0,void 0,t),i},loadFormWithDrawerItem:({destinationType:{type:e},name:t,disabled:i,exportedSignals:n,fields:r})=>{const o={...$s(dv),type:e,name:t,disabled:i,exportedSignals:n,fields:Object.entries(ls(r,{})).map(([e,t])=>({key:e,value:t}))};return a(void 0,void 0,o),o},yamlFields:d,setYamlFields:c,dynamicFields:u,setDynamicFields:p}},uv={ruleName:"",notes:"",disabled:!1,workloads:null,sourceScopes:null,instrumentationLibraries:null,payloadCollection:{[ji.HttpRequest]:null,[ji.HttpResponse]:null,[ji.DbQuery]:null,[ji.Messaging]:null},codeAttributes:{[Fi.Column]:null,[Fi.FilePath]:null,[Fi.Function]:null,[Fi.LineNumber]:null,[Fi.Namespace]:null,[Fi.StackTrace]:null},headersCollection:null,customInstrumentations:{[Bi.Java]:null,[Bi.Golang]:null,[Bi.Php]:null},networkMetrics:null},pv=()=>{const{formData:e,formErrors:t,handleFormChange:i,handleErrorChange:n,resetFormData:r}=By(uv);return{formData:e,formErrors:t,handleFormChange:i,resetFormData:r,validateForm:()=>(n(void 0,void 0,{}),!0),loadFormWithDrawerItem:({ruleName:e,notes:t,disabled:n,sourceScopes:r,payloadCollection:o,codeAttributes:a,headersCollection:s,customInstrumentations:l,networkMetrics:d})=>{const c={...$s(uv),ruleName:e,notes:t,disabled:n,sourceScopes:r??null,networkMetrics:d??null};o&&(c.payloadCollection={[ji.HttpRequest]:o[ji.HttpRequest]?{}:null,[ji.HttpResponse]:o[ji.HttpResponse]?{}:null,[ji.DbQuery]:o[ji.DbQuery]?{}:null,[ji.Messaging]:o[ji.Messaging]?{}:null}),a&&(c.codeAttributes={[Fi.Column]:a[Fi.Column]||null,[Fi.FilePath]:a[Fi.FilePath]||null,[Fi.Function]:a[Fi.Function]||null,[Fi.LineNumber]:a[Fi.LineNumber]||null,[Fi.Namespace]:a[Fi.Namespace]||null,[Fi.StackTrace]:a[Fi.StackTrace]||null}),s&&(c.headersCollection=s),l&&(c.customInstrumentations={[Bi.Java]:l[Bi.Java]||null,[Bi.Golang]:l[Bi.Golang]||null,[Bi.Php]:l[Bi.Php]||null}),i(void 0,void 0,c)}}},hv=({active:e,key:t,withAltKey:i,withCtrlKey:n,withShiftKey:r,withMetaKey:o},a)=>(Wt(()=>{const s=s=>{e&&t===s.key&&(!i||i&&s.altKey)&&(!n||n&&s.ctrlKey)&&(!r||r&&s.shiftKey)&&(!o||o&&s.metaKey)&&(s.preventDefault(),s.stopPropagation(),a(s))};return window.addEventListener("keydown",s),()=>{window.removeEventListener("keydown",s)}},[t,e,i,n,r,o,a]),null),gv=(e,{axis:t="horizontal",deps:i=[]}={})=>{const[n,r]=Ht(!1),o=e=>{const i="vertical"===t?e.scrollHeight>e.clientHeight+1:e.scrollWidth>e.clientWidth+1;r(i)};return Kt(()=>{const t=e.current;if(!t)return;o(t);const i=new ResizeObserver(()=>o(t));return i.observe(t),()=>i.disconnect()},[t,...i]),Wt(()=>{if("undefined"==typeof document||!document.fonts?.ready)return;let t=!1;return document.fonts.ready.then(()=>{const i=e.current;!t&&i&&o(i)}),()=>{t=!0}},[t,...i]),n},mv=(e,{behavior:t="smooth",block:i="center",inline:n,delayMs:r=50}={})=>{const o=Vt(null);return Wt(()=>{if(!e)return;const a=window.setTimeout(()=>{o.current?.scrollIntoView({behavior:t,block:i,inline:n})},r);return()=>window.clearTimeout(a)},[e,t,i,n,r]),o},fv=({sectionNames:e,threshold:t=.4})=>{const[i,n]=Ht(e[0]||""),[r,o]=Ht(null),a=Vt({}),s=Vt(!1),l=Vt(!1),d=Xt((e,t)=>{a.current[e]=t},[]),c=Xt(e=>{o(e)},[]),u=Xt(e=>{l.current=!0,n(e)},[]);return Wt(()=>{if(!l.current)return;l.current=!1;const e=a.current[i];if(!e)return;s.current=!0,e.scrollIntoView({behavior:"smooth",block:"start"});const t=setTimeout(()=>{s.current=!1},600);return()=>clearTimeout(t)},[i]),Wt(()=>{const i=a.current,o=e.map(e=>i[e]).filter(Boolean);if(!o.length)return;const l=new IntersectionObserver(e=>{if(!s.current)for(const t of e)if(t.isIntersecting){const e=t.target.getAttribute("data-section-name");e&&n(e);break}},{threshold:t,root:r});return o.forEach(e=>l.observe(e)),()=>l.disconnect()},[e,t,r]),{selectedSection:i,setSelectedSection:u,setSectionRef:d,setScrollContainerRef:c}};var bv,yv;(e=>{e.Left="left",e.Right="right"})(bv||(bv={})),(e=>{e.Top="top",e.Bottom="bottom"})(yv||(yv={}));const vv=({defaultOpen:e=!1,open:t,onOpenChange:i,alignX:n,alignY:r,withOffset:o=!0,fullWidth:a}={})=>{const s=void 0!==t,[l,d]=Ht(e),c=s?t:l,u=Xt(e=>{s||d(e),i?.(e)},[s,i]),[p,h]=Ht({x:n||bv.Left,y:r||yv.Bottom}),g=Vt(null),m=Vt(!1);Wt(()=>{if(!c)return;const e=e=>{if(m.current)return void(m.current=!1);const t=e.target;g.current?.contains(t)||Vy(t)||u(!1)},t=window.setTimeout(()=>{document.addEventListener("mousedown",e),document.addEventListener("touchstart",e)},0);return()=>{window.clearTimeout(t),document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}},[c,u]);const[f,b]=Ht({}),y=Xt((e,t)=>{const i=g.current?.getBoundingClientRect();if(!i)return;const n=o?8:0;b({top:t===yv.Bottom?o?i.bottom+n:i.top:void 0,bottom:t===yv.Top?o?window.innerHeight-i.top+n:window.innerHeight-i.bottom:void 0,left:e===bv.Left?i.left:void 0,right:e===bv.Right?window.innerWidth-i.right:void 0,width:a?i.width:void 0})},[o,a]),v=Xt(e=>{e.preventDefault(),e.stopPropagation();const t=!c;if(t&&(m.current=!0),u(t),!t)return;const i={x:n||(e.clientX>window.innerWidth/2?bv.Right:bv.Left),y:r||(e.clientY>window.innerHeight/2?yv.Top:yv.Bottom)};h(i),y(i.x,i.y)},[c,u,n,r,y]),$=Xt(e=>{e.stopPropagation()},[]);return Kt(()=>{c&&y(p.x,p.y)},[c,p.x,p.y,y]),{isOpen:c,setIsOpen:u,align:p,coords:f,triggerRef:g,toggleOpen:v,onTriggerWrapperMouseDown:$}},$v=()=>({getItemSS:(e,t)=>{const i=sessionStorage.getItem(e);return i?ls(i,t):t},setItemSS:(e,t)=>{sessionStorage.setItem(e,JSON.stringify(t))},removeItemSS:e=>{sessionStorage.removeItem(e)}}),wv={otelServiceName:"",currentStreamName:""},Sv=()=>{const{formData:e,formErrors:t,handleFormChange:i,handleErrorChange:n,resetFormData:r}=By(wv);return{formData:e,formErrors:t,handleFormChange:i,resetFormData:r,validateForm:()=>(n(void 0,void 0,{}),!0),loadFormWithDrawerItem:({serviceName:e,id:t})=>{const n={...$s(wv),otelServiceName:e||t.name||""};i(void 0,void 0,n)}}};try{Jt.addDefaultLocale(qt)}catch(e){}const xv=new Jt(qt.locale),Cv=[{ms:31536e6,long:["year","years"],short:"y"},{ms:2592e6,long:["month","months"],short:"mo"},{ms:6048e5,long:["week","weeks"],short:"w"},{ms:864e5,long:["day","days"],short:"d"},{ms:36e5,long:["hour","hours"],short:"h"},{ms:6e4,long:["minute","minutes"],short:"m"},{ms:1e3,long:["second","seconds"],short:"s"}],Ev=(e,{units:t=2,style:i="long",suffix:n=!0}={})=>{let r=Math.max(0,e);if(r<1e3)return"short"===i?"0s":n?"just now":"0 seconds";const o=[];for(const e of Cv){if(o.length===t)break;const n=Math.floor(r/e.ms);if(!(n<=0&&0===o.length)){if(n<=0)break;r-=n*e.ms,o.push("short"===i?`${n}${e.short}`:`${n} ${1===n?e.long[0]:e.long[1]}`)}}const a="short"===i?o.join(""):o.join(" ");return n&&"long"===i?`${a} ago`:a},Tv=(e,t)=>Ev(6e4*Math.max(0,e),t),Ov=e=>"string"==typeof e?new Date(e.replace("t","T").replace("z","Z")):new Date(e),Nv=()=>{const[e,t]=Ht(0);return Wt(()=>{const e=setInterval(()=>{t(e=>(e+1)%Number.MAX_SAFE_INTEGER)},1e3);return()=>clearInterval(e)},[]),{formatTimeAgo:Xt(e=>{try{return xv.format(Ov(e))}catch(e){return"-"}},[e]),formatDurationAgo:Xt((e,t)=>{try{const i=Ov(e);return Ev(Date.now()-i.getTime(),t)}catch(e){return"-"}},[e])}};var Av,kv;(e=>{e.Default="default",e.Purple="purple",e.Yellow="yellow",e.Blue="blue",e.Pink="pink",e.Red="red",e.Green="green",e.Loader="loader"})(Av||(Av={})),(e=>{e.Small="small",e.Medium="medium",e.Large="large"})(kv||(kv={}));const Iv=(e,t,i)=>{switch(t){case Av.Purple:return e.v2.colors.purple[i?"300":"900"];case Av.Yellow:return e.v2.colors.yellow[i?"300":"1000"];case Av.Blue:return e.v2.colors.blue[i?"300":"1000"];case Av.Pink:return e.v2.colors.pink[i?"500":"1000"];case Av.Red:return e.v2.colors.red[i?"300":"900"];case Av.Green:return e.v2.colors.green[i?"300":"900"];case Av.Loader:return e.v2.colors.grey[i?"600":"800"];default:return e.v2.colors.grey[i?"300":"500"]}},_v=n.div`
|
|
321
|
+
`,av=Bt(({"data-id":n,label:r,tooltip:a,hideTooltipIcon:s,leftIcon:l,rightIcon:d,variant:c=nv.Primary,size:u=rv.M,isSelected:p,iconSize:h,loading:g,fullWidth:m,withShadow:f,textColor:b,textAlign:y="center",disabled:v,onClick:$,...w},S)=>{const x=o(),C=h||(u===rv.L?24:u===rv.M?20:16),E=u===rv.L?ja.S:ja.XS,T=b||(v?x.v2.colors.grey[400]:x.v2.colors.white[500]),[O,N]=Ht(!1),A=!(!g&&!O),k=!(!v&&!A),I=Xt(async e=>{e.stopPropagation(),N(!0);try{await($?.(e))}finally{N(!1)}},[$]);return t(ov,{ref:S,"data-id":n,$variant:c,$size:u,$fullWidth:m,$withShadow:f,$hasLabel:!!r,$isSelected:p,$align:y,...w,disabled:k,onClick:k?void 0:I,children:t(iv,{text:a,withIcon:!s,fullWidth:!0,children:A?t(Wl,r?{withGradient:!0,titleColor:T,titleSize:E}:{withSpinnerOld:!0}):e(i,{children:[l&&t(Rl,{$width:"fit-content",children:t(l,{size:C,fill:T})}),r?t(Va,{size:E,weight:500,color:T,nowrap:!0,align:y,children:r}):null,d&&t(Rl,{$width:"fit-content",children:t(d,{size:C,fill:T})})]})})})});av.displayName=av.name;const sv=({onDone:e}={})=>{const[i,n]=Ht(!1),[r,o]=Ht(-1),a=Xt(async(t,r)=>{if(!i){if(n(!0),void 0!==r&&o(r),navigator?.clipboard&&navigator.clipboard.writeText)try{await navigator.clipboard.writeText(t)}catch(e){}else{const e=document.createElement("textarea");e.value=t,document.body.appendChild(e),e.select();try{document.execCommand("copy")}catch(e){}document.body.removeChild(e)}e?.(),setTimeout(()=>{n(!1),o(-1)},1e3)}},[i,e]);return{CopyButton:Xt(({value:e,...n})=>t(av,{leftIcon:i?$t:wt,onClick:()=>a(e),variant:nv.Secondary,size:rv.S,...n}),[i]),isCopied:i,copiedIndex:r,clickCopy:a}},lv=e=>{const{addNotification:t}=_y(),{formData:i,handleFormChange:n,formErrors:r,handleErrorChange:o,resetFormData:a}=By(e);return{formData:i,formErrors:r,handleFormChange:n,resetFormData:a,validateForm:e=>{const n={};let r=!0;return i.name?od(i.name)?n.name=void 0:(r=!1,n.name=Za.ILLEGAL_K8S_LABEL):(r=!1,n.name=Za.FIELD_IS_REQUIRED),!r&&e?.withAlert&&t({type:Oi.Warning,title:e.alertTitle,message:Za.REQUIRED_FIELDS,hideFromHistory:!0}),o(void 0,void 0,n),r},loadFormWithDrawerItem:({name:t})=>{const i={...$s(e),name:t};n(void 0,void 0,i)}}},dv={type:"",name:"",exportedSignals:{logs:!1,metrics:!1,traces:!1,profiles:!1},fields:[],disabled:!1},cv=e=>{const{supportedSignals:t,preLoadedFields:i}=e||{},{addNotification:n}=_y(),{formData:r,formErrors:o,handleFormChange:a,handleErrorChange:s,resetFormData:l}=By(dv),[d,c]=Ht([]),[u,p]=Ht([]);return Wt(()=>{var e;p(d?(e=d,e.filter(e=>!!e).map(e=>{const{name:t,componentType:i,componentProperties:n,displayName:r,initialValue:o,renderCondition:a}=e;if(i===Ei.Dropdown){const e=ls(n,{}),s=Array.isArray(e.values)?e.values.map(e=>({id:e,label:e})):Object.entries(e.values).map(([e,t])=>({id:e,label:t}));return{name:t,componentType:i,title:r,value:o,placeholder:e.placeholder||"Select an option",options:s,renderCondition:a,...e}}return{name:t,componentType:i,title:r,value:o,renderCondition:a,...ls(n,{})}})).map(e=>{if(i){const t="string"==typeof i?ls(i,{}):i;if(e.name in t)return{...e,value:t[e.name]}}return e}):[])},[d,i]),Wt(()=>{if(u){const e=u.map(e=>({key:e.name,value:e.value}));a("fields",e)}},[u]),Wt(()=>{if(t&&0===hd(r.exportedSignals).length){const{logs:e,metrics:i,traces:n}=t;a("exportedSignals",{logs:e.supported,metrics:i.supported,traces:n.supported})}},[t,r.exportedSignals]),{formData:r,formErrors:o,handleFormChange:a,resetFormData:l,validateForm:e=>{const t={};let i=!0;return u.forEach(({name:e,value:n,required:r})=>{r&&!n&&(i=!1,t[e]=Za.FIELD_IS_REQUIRED)}),!i&&e?.withAlert&&n({type:Oi.Warning,title:e.alertTitle,message:Za.REQUIRED_FIELDS,hideFromHistory:!0}),s(void 0,void 0,t),i},loadFormWithDrawerItem:({destinationType:{type:e},name:t,disabled:i,exportedSignals:n,fields:r})=>{const o={...$s(dv),type:e,name:t,disabled:i,exportedSignals:n,fields:Object.entries(ls(r,{})).map(([e,t])=>({key:e,value:t}))};return a(void 0,void 0,o),o},yamlFields:d,setYamlFields:c,dynamicFields:u,setDynamicFields:p}},uv={ruleName:"",notes:"",disabled:!1,workloads:null,sourceScopes:null,instrumentationLibraries:null,payloadCollection:{[ji.HttpRequest]:null,[ji.HttpResponse]:null,[ji.DbQuery]:null,[ji.Messaging]:null},codeAttributes:{[Fi.Column]:null,[Fi.FilePath]:null,[Fi.Function]:null,[Fi.LineNumber]:null,[Fi.Namespace]:null,[Fi.StackTrace]:null},headersCollection:null,customInstrumentations:{[Bi.Java]:null,[Bi.Golang]:null,[Bi.Php]:null},networkMetrics:null},pv=()=>{const{formData:e,formErrors:t,handleFormChange:i,handleErrorChange:n,resetFormData:r}=By(uv);return{formData:e,formErrors:t,handleFormChange:i,resetFormData:r,validateForm:()=>(n(void 0,void 0,{}),!0),loadFormWithDrawerItem:({ruleName:e,notes:t,disabled:n,sourceScopes:r,payloadCollection:o,codeAttributes:a,headersCollection:s,customInstrumentations:l,networkMetrics:d})=>{const c={...$s(uv),ruleName:e,notes:t,disabled:n,sourceScopes:r??null,networkMetrics:d??null};o&&(c.payloadCollection={[ji.HttpRequest]:o[ji.HttpRequest]?{}:null,[ji.HttpResponse]:o[ji.HttpResponse]?{}:null,[ji.DbQuery]:o[ji.DbQuery]?{}:null,[ji.Messaging]:o[ji.Messaging]?{}:null}),a&&(c.codeAttributes={[Fi.Column]:a[Fi.Column]||null,[Fi.FilePath]:a[Fi.FilePath]||null,[Fi.Function]:a[Fi.Function]||null,[Fi.LineNumber]:a[Fi.LineNumber]||null,[Fi.Namespace]:a[Fi.Namespace]||null,[Fi.StackTrace]:a[Fi.StackTrace]||null}),s&&(c.headersCollection=s),l&&(c.customInstrumentations={[Bi.Java]:l[Bi.Java]||null,[Bi.Golang]:l[Bi.Golang]||null,[Bi.Php]:l[Bi.Php]||null}),i(void 0,void 0,c)}}},hv=({active:e,key:t,withAltKey:i,withCtrlKey:n,withShiftKey:r,withMetaKey:o},a)=>(Wt(()=>{const s=s=>{e&&t===s.key&&(!i||i&&s.altKey)&&(!n||n&&s.ctrlKey)&&(!r||r&&s.shiftKey)&&(!o||o&&s.metaKey)&&(s.preventDefault(),s.stopPropagation(),a(s))};return window.addEventListener("keydown",s),()=>{window.removeEventListener("keydown",s)}},[t,e,i,n,r,o,a]),null),gv=(e,{axis:t="horizontal",deps:i=[]}={})=>{const[n,r]=Ht(!1),o=e=>{const i="vertical"===t?e.scrollHeight>e.clientHeight+1:e.scrollWidth>e.clientWidth+1;r(i)};return Kt(()=>{const t=e.current;if(!t)return;o(t);const i=new ResizeObserver(()=>o(t));return i.observe(t),()=>i.disconnect()},[t,...i]),Wt(()=>{if("undefined"==typeof document||!document.fonts?.ready)return;let t=!1;return document.fonts.ready.then(()=>{const i=e.current;!t&&i&&o(i)}),()=>{t=!0}},[t,...i]),n},mv=(e,{behavior:t="smooth",block:i="center",inline:n,delayMs:r=50}={})=>{const o=Vt(null);return Wt(()=>{if(!e)return;const a=window.setTimeout(()=>{o.current?.scrollIntoView({behavior:t,block:i,inline:n})},r);return()=>window.clearTimeout(a)},[e,t,i,n,r]),o},fv=({sectionNames:e,threshold:t=.4})=>{const[i,n]=Ht(e[0]||""),[r,o]=Ht(null),a=Vt({}),s=Vt(!1),l=Vt(!1),d=Xt((e,t)=>{a.current[e]=t},[]),c=Xt(e=>{o(e)},[]),u=Xt(e=>{l.current=!0,n(e)},[]);return Wt(()=>{if(!l.current)return;l.current=!1;const e=a.current[i];if(!e)return;s.current=!0,e.scrollIntoView({behavior:"smooth",block:"start"});const t=setTimeout(()=>{s.current=!1},600);return()=>clearTimeout(t)},[i]),Wt(()=>{const i=a.current,o=e.map(e=>i[e]).filter(Boolean);if(!o.length)return;const l=new IntersectionObserver(e=>{if(!s.current)for(const t of e)if(t.isIntersecting){const e=t.target.getAttribute("data-section-name");e&&n(e);break}},{threshold:t,root:r});return o.forEach(e=>l.observe(e)),()=>l.disconnect()},[e,t,r]),{selectedSection:i,setSelectedSection:u,setSectionRef:d,setScrollContainerRef:c}};var bv,yv;(e=>{e.Left="left",e.Right="right"})(bv||(bv={})),(e=>{e.Top="top",e.Bottom="bottom"})(yv||(yv={}));const vv=({defaultOpen:e=!1,open:t,onOpenChange:i,alignX:n,alignY:r,withOffset:o=!0,fullWidth:a}={})=>{const s=void 0!==t,[l,d]=Ht(e),c=s?t:l,u=Xt(e=>{s||d(e),i?.(e)},[s,i]),[p,h]=Ht({x:n||bv.Left,y:r||yv.Bottom}),g=Vt(null),m=Vt(!1);Wt(()=>{if(!c)return;const e=e=>{if(m.current)return void(m.current=!1);const t=e.target;g.current?.contains(t)||Vy(t)||u(!1)},t=window.setTimeout(()=>{document.addEventListener("mousedown",e),document.addEventListener("touchstart",e)},0);return()=>{window.clearTimeout(t),document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}},[c,u]);const[f,b]=Ht({}),y=Xt((e,t)=>{const i=g.current?.getBoundingClientRect();if(!i)return;const n=o?8:0;b({top:t===yv.Bottom?o?i.bottom+n:i.top:void 0,bottom:t===yv.Top?o?window.innerHeight-i.top+n:window.innerHeight-i.bottom:void 0,left:e===bv.Left?i.left:void 0,right:e===bv.Right?window.innerWidth-i.right:void 0,width:a?i.width:void 0})},[o,a]),v=Xt(e=>{e.preventDefault(),e.stopPropagation();const t=!c;if(t&&(m.current=!0),u(t),!t)return;const i={x:n||(e.clientX>window.innerWidth/2?bv.Right:bv.Left),y:r||(e.clientY>window.innerHeight/2?yv.Top:yv.Bottom)};h(i),y(i.x,i.y)},[c,u,n,r,y]),$=Xt(e=>{e.stopPropagation()},[]);return Kt(()=>{c&&y(p.x,p.y)},[c,p.x,p.y,y]),{isOpen:c,setIsOpen:u,align:p,coords:f,triggerRef:g,toggleOpen:v,onTriggerWrapperMouseDown:$}},$v=()=>({getItemSS:(e,t)=>{const i=sessionStorage.getItem(e);return i?ls(i,t):t},setItemSS:(e,t)=>{sessionStorage.setItem(e,JSON.stringify(t))},removeItemSS:e=>{sessionStorage.removeItem(e)}}),wv={otelServiceName:"",currentStreamName:""},Sv=()=>{const{formData:e,formErrors:t,handleFormChange:i,handleErrorChange:n,resetFormData:r}=By(wv);return{formData:e,formErrors:t,handleFormChange:i,resetFormData:r,validateForm:()=>(n(void 0,void 0,{}),!0),loadFormWithDrawerItem:({serviceName:e,id:t})=>{const n={...$s(wv),otelServiceName:e||t.name||""};i(void 0,void 0,n)}}};try{Jt.addDefaultLocale(qt)}catch(e){}const xv=new Jt(qt.locale),Cv=[{ms:31536e6,long:["year","years"],short:"y"},{ms:2592e6,long:["month","months"],short:"mo"},{ms:6048e5,long:["week","weeks"],short:"w"},{ms:864e5,long:["day","days"],short:"d"},{ms:36e5,long:["hour","hours"],short:"h"},{ms:6e4,long:["minute","minutes"],short:"m"},{ms:1e3,long:["second","seconds"],short:"s"}],Ev=(e,{units:t=2,style:i="long",suffix:n=!0}={})=>{let r=Math.max(0,e);if(r<1e3)return"short"===i?"0s":n?"just now":"0 seconds";const o=[];for(const e of Cv){if(o.length===t)break;const n=Math.floor(r/e.ms);if(!(n<=0&&0===o.length)){if(n<=0)break;r-=n*e.ms,o.push("short"===i?`${n}${e.short}`:`${n} ${1===n?e.long[0]:e.long[1]}`)}}const a="short"===i?o.join(""):o.join(" ");return n&&"long"===i?`${a} ago`:a},Tv=(e,t)=>Ev(6e4*Math.max(0,e),t),Ov=e=>"string"==typeof e?new Date(e.replace("t","T").replace("z","Z")):new Date(e),Nv=()=>{const[e,t]=Ht(0);return Wt(()=>{const e=setInterval(()=>{t(e=>(e+1)%Number.MAX_SAFE_INTEGER)},1e3);return()=>clearInterval(e)},[]),{formatTimeAgo:Xt(e=>{try{return xv.format(Ov(e))}catch(e){return"-"}},[e]),formatDurationAgo:Xt((e,t)=>{try{const i=Ov(e);return Ev(Date.now()-i.getTime(),t)}catch(e){return"-"}},[e])}};var Av,kv;(e=>{e.Default="default",e.Purple="purple",e.Yellow="yellow",e.Blue="blue",e.Pink="pink",e.Red="red",e.Green="green",e.Loader="loader"})(Av||(Av={})),(e=>{e.Small="small",e.Medium="medium",e.Large="large"})(kv||(kv={}));const Iv=(e,t,i)=>{switch(t){case Av.Purple:return e.v2.colors.purple[i?"300":"900"];case Av.Yellow:return e.v2.colors.yellow[i?"300":"1000"];case Av.Blue:return e.v2.colors.blue[i?"300":"1000"];case Av.Pink:return e.v2.colors.pink[i?"500":"1000"];case Av.Red:return e.v2.colors.red[i?"300":"900"];case Av.Green:return e.v2.colors.green[i?"300":"900"];case Av.Loader:return e.v2.colors.grey[i?"600":"800"];default:return e.v2.colors.grey[i?"300":"500"]}},_v=n.div`
|
|
322
322
|
display: flex;
|
|
323
323
|
align-items: center;
|
|
324
324
|
justify-content: center;
|
|
@@ -552,15 +552,15 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import n,{css as
|
|
|
552
552
|
background-color: ${({theme:e})=>e.v2.colors.silver[700]};
|
|
553
553
|
`,c$=({icon:i=g,hideIcon:n=!1,title:r="No data",subTitle:a,button:s,action:l})=>{const d=o().v2.colors.silver[200];return e(Dl,{$gap:12,$alignItems:"center",children:[e(Dl,{$gap:4,$alignItems:"center",children:[!n&&t(d$,{children:t(i,{size:24,fill:d})}),t(Va,{size:ja.XXS,color:Ha.Secondary,align:"center",children:r}),a&&t(Va,{size:ja.XXXS,color:Ha.Disable,align:"center",children:a})]}),s&&t(av,{variant:nv.Secondary,...s}),l]})},u$=n.span`
|
|
554
554
|
font-family: ${({theme:e})=>e.font_family.primary};
|
|
555
|
-
font-size: ${({$
|
|
555
|
+
font-size: ${({$small:e})=>e?"12px":"14px"};
|
|
556
556
|
font-weight: 400;
|
|
557
|
-
color: ${({theme:e
|
|
557
|
+
color: ${({theme:e})=>e.v2.colors.silver[200]};
|
|
558
558
|
`,p$=n.span`
|
|
559
559
|
font-family: ${({theme:e})=>e.font_family.primary};
|
|
560
560
|
font-size: 14px;
|
|
561
561
|
font-weight: 400;
|
|
562
562
|
color: ${({theme:e})=>e.v2.colors.red[500]};
|
|
563
|
-
`,h$=({label:i,tooltip:n,required:r,badge:o,width:a,
|
|
563
|
+
`,h$=({label:i,tooltip:n,required:r,badge:o,width:a,small:s})=>i||n||r?e(_l,{$width:a,$justifyContent:"space-between",children:[i&&t(u$,{$small:s,children:i}),e(_l,{$gap:4,children:[o&&t(Lv,{...o,textSize:ja.XXXS}),r&&t(p$,{children:"*"}),n&&t(iv,{text:n,withIcon:!0})]})]}):null,g$=({errorMessage:i,warnMessage:n,helpMessage:r})=>{const a=o(),s=i?a.v2.colors.red[500]:n?a.v2.colors.yellow[500]:a.v2.colors.silver[200],l=t(rt,{size:12,fill:s});return i||n||r?e(_l,{$alignItems:"center",children:[l&&t(Dl,{children:l}),t(Va,{size:ja.XXXS,weight:400,color:s,children:i||n||r})]}):null};var m$;(e=>{e.S="small",e.L="large"})(m$||(m$={}));const f$=n.div`
|
|
564
564
|
width: fit-content;
|
|
565
565
|
display: flex;
|
|
566
566
|
align-items: center;
|
|
@@ -780,8 +780,7 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import n,{css as
|
|
|
780
780
|
`}
|
|
781
781
|
cursor: ${({$clickable:e,$disabled:t,$readOnly:i})=>t?"not-allowed":i?e?"pointer":"default":"text"};
|
|
782
782
|
|
|
783
|
-
border: 1px solid
|
|
784
|
-
${({theme:e,$disabled:t,$error:i})=>t?e.v2.colors.grey[600]:i?e.v2.colors.red[500]:e.v2.colors.silver[500]};
|
|
783
|
+
border: 1px solid ${({theme:e,$disabled:t,$error:i})=>t?e.v2.colors.grey[600]:i?e.v2.colors.red[500]:e.v2.colors.silver[500]};
|
|
785
784
|
background: ${({theme:e,$disabled:t})=>t?e.v2.colors.grey[800]:e.v2.colors.black[500]};
|
|
786
785
|
${({$disabled:e,$error:t,$readOnly:i})=>!e&&!t&&!i&&r`
|
|
787
786
|
&:hover,
|
|
@@ -856,8 +855,8 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import n,{css as
|
|
|
856
855
|
display: flex;
|
|
857
856
|
align-items: center;
|
|
858
857
|
justify-content: center;
|
|
859
|
-
cursor: pointer;
|
|
860
|
-
`,lw=({label:n,required:r,tooltip:a,badge:s,leftIcon:l,
|
|
858
|
+
cursor: ${({$notClickable:e})=>e?"default":"pointer"};
|
|
859
|
+
`,lw=({label:n,required:r,tooltip:a,badge:s,leftIcon:l,leftIconClick:d,rightIcon:c,rightIconClick:u,suffix:p,hasError:h,hideFocusOutline:g=!1,errorMessage:m,warnMessage:f,helpMessage:b,type:y=Ti.Text,name:v,value:$,onChange:w,disabled:S,maxWidth:x,width:C,small:E=!1,onClick:T,...O})=>{const N=o(),A=y===Ti.Password,k=y===Ti.Number||y===Ti.Decimal,[I,_]=Ht(!1),[D,R]=Ht(null),L=e=>{e.stopPropagation();const t=e.target.value;if(y===Ti.Number||y===Ti.Decimal){const i=y===Ti.Number?fd(t):md(t),n=null!=O.min?Number(O.min):void 0,r=null!=O.max?Number(O.max):void 0,o=y===Ti.Decimal&&i.endsWith(".");let a=i,s=!1;if(i&&!o){const e=parseFloat(i);isNaN(e)||(null!=r&&e>r?(a=String(r),s=!0):null!=n&&e<n&&(a=String(n),s=!0))}e.target.value=a,R(t&&t!==i?"Please enter a valid number":s?"Value must be "+(null!=n&&null!=r?`between ${n} and ${r}`:null!=r?`at most ${r}`:`at least ${n}`):null)}w?.(e)},P=e=>{["Enter"].includes(e.key)||e.stopPropagation()},U=h||!!m||!!D,M=$?N.v2.colors.white[500]:S?N.v2.colors.grey[400]:N.v2.colors.silver[200],F=E?14:18,z=Vt(null),B=gv(z,{deps:[$]}),j=O.readOnly&&B&&null!=$&&""!==$?String($):"",H=!!p&&!A;return e(Dl,{$width:C,$gap:E?2:6,children:[t(h$,{label:n,tooltip:a,required:r,badge:s,small:E}),t(iw,{$small:E,$disabled:S,$readOnly:!!O.readOnly,$error:U,$clickable:!!T&&!S,$hasSuffix:H,$hideFocusOutline:g,onClick:S?void 0:e=>{S||(O.readOnly||z.current?.focus(),T?.(e))},children:H?e(i,{children:[t(nw,{$small:E,children:t(iv,{text:j,fullWidth:!0,keepAlive:!0,children:t(aw,{"data-id":v,type:k?Ti.Text:y,name:v,value:$,onChange:L,onKeyDown:P,disabled:S,$maxWidth:x,$width:"100%",$small:E,$tabular:k,...O,ref:z})})}),t(rw,{$disabled:S,$error:U}),t(ow,{$small:E,"aria-hidden":"true",children:t(Va,{size:ja.XXXS,color:S?Ha.Disable:Ha.Secondary,nowrap:!0,children:p})})]}):e(iv,{text:j,fullWidth:!0,keepAlive:!0,children:[l?t(sw,{$notClickable:!d,onClick:d,children:t(l,{size:F,fill:M})}):null,t(aw,{"data-id":v,type:I||k?Ti.Text:y,name:v,value:$,onChange:L,onKeyDown:P,disabled:S,$maxWidth:x,$width:C,$small:E,$tabular:k,...O,ref:z}),A?t(sw,{onClick:()=>_(e=>!e),children:t(I?Ot:Nt,{size:F,fill:M})}):c?t(sw,{$notClickable:!u,onClick:u,children:t(c,{size:F,fill:M})}):null]})}),t(g$,{errorMessage:D||m,warnMessage:f,helpMessage:b})]})},dw=e=>{const{"data-id":i,options:n,placeholder:r="Search...",isLoading:o,disabled:a}=e,s=!0===e.multiple,[l,d]=Ht(""),[c,u]=Ht(!1),p=Gt(()=>s?e.value:e.value?[e.value]:[],[s,e.value]),h=Gt(()=>{if(s){const e=p.length;return e?1===e?n.find(e=>e.id===p[0])?.label??"":`${e} selected`:""}return e.value?n.find(t=>t.id===e.value)?.label??"":""},[s,e,n,p]),g=c?l:h,m=Gt(()=>{const e=s?n.map(e=>({...e,withCheckbox:!0})):n;if(!l)return e;const t=l.toLowerCase();return e.filter(e=>[e.label,e.badge,e.secondaryLabel].some(e=>e?.toLowerCase().includes(t)))},[s,n,l]),f=Xt(()=>{d(""),u(!0)},[]),b=Xt(t=>{d(t.target.value),c||u(!0),s||t.target.value||!e.value||e.onSelect(null)},[c,s,e]),y=Xt(e=>{u(e),e||d("")},[]),v=Xt(t=>{if(s)return void e.onSelect(t);const i=n.find(e=>e.id===t[0]);i&&(e.onSelect(i),d(""),u(!1))},[s,e,n]),$=c&&(o||m.length>0||l.length>0);return t(A$,{open:$,onOpenChange:y,items:m,selectedIds:p,setSelectedIds:v,withMultiSelect:s,isLoading:o,emptyMessage:`No results matched the filter '${l}'`,fullWidth:!0,alignY:yv.Bottom,children:t(lw,{name:i,leftIcon:St,placeholder:r,value:g,onChange:b,onFocus:f,disabled:a})})},cw=n.button`
|
|
861
860
|
width: 100%;
|
|
862
861
|
padding: 0;
|
|
863
862
|
padding-right: 12px;
|
|
@@ -1870,7 +1869,7 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import n,{css as
|
|
|
1870
1869
|
gap: 4px;
|
|
1871
1870
|
text-align: ${({$textAlign:e})=>e||"left"};
|
|
1872
1871
|
min-width: 0;
|
|
1873
|
-
`,_C=({variant:n,columns:r,row:o,rowIdx:a,rowCount:s,autoWidthColumnKeys:l,resolvedColumnWidths:d,getRowActions:c,rowActionsPushRightPosition:u,rowActionsPushLeftPosition:p,withCheckboxes:h,activeRowId:g,expandedRowId:m,onToggleExpand:f,expandedMaxHeight:b})=>{const[y,v]=Ht(!1),{cells:$,onClick:w,isSelected:S=!1,onSelect:x,onDeselect:C,hideCheckbox:E,checkboxDisabled:T,checkboxTooltip:O,expandedContent:N}=o,A=o.id??String(a),k=null!=N,I=k&&m===A,_=null!=g&&o.id===g,D=c(o),R=a===s-1,L=k||!!w,P=()=>{k&&f?.(A),w?.()},U=(e,t)=>({$isLastRow:R&&!I,$isFirstCell:e,$isLastCell:t,$selected:S,$highlighted:_,$withClick:L,onClick:P,$hovered:L&&y}),M=I&&null!=N?"function"==typeof N?N({maxHeight:b}):N:null,F=D.length>0?t(nx,{isOpen:y,actions:D,positionRight:u,positionLeft:p}):null,z=e(i,{children:[h&&t(TC,{$variant:n,$index:a,style:{flex:"0 0 68px"},...U(!0,!1),children:!E&&(O?t(iv,{text:O,children:t(y$,{value:S,disabled:T,onChange:()=>S?C?.():x?.()})}):t(y$,{value:S,disabled:T,onChange:()=>S?C?.():x?.()}))},"checkbox-column"),r.map(({key:i,textAlign:o},s)=>{const c=$.find(e=>e.key===i),u=0===s&&!h,p=s===r.length-1,g=0===s,m="right"===o?"flex-end":"center"===o?"center":"flex-start",f=l.has(i),b=c?.component?c.component():t(P$,{size:ja.XXS,align:o,nowrap:!0,fullWidth:!f,children:c?.rawValue||"-"}),y=e(_l,{$width:"100%",$gap:k&&g?8:0,$justifyContent:m,style:{minWidth:0},children:[k&&g?t(I?Et:Ut,{}):null,b]});return t(TC,{$variant:n,$index:a,$autoWidth:l.has(i),$resolvedWidth:d[i],...U(u,p),children:y},`row-${a}-cell-${s}`)})]}),B={onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1)};return k?e(SC,{"data-table-row-index":a,children:[e(wC,{...B,children:[z,F]}),null!=M&&e(i,{children:[t(xC,{$maxHeight:b,children:M}),!R&&t(bS,{margin:"0"})]})]}):e(wC,{"data-table-row-index":a,...B,children:[z,F]})},DC=({variant:e,columns:n,rows:r,autoWidthColumnKeys:o,resolvedColumnWidths:a,getRowActions:s,rowActionsPushRightPosition:l,rowActionsPushLeftPosition:d,withCheckboxes:c,activeRowId:u,scrollToIndex:p,scrollSignal:h,useVirtua:g=!0,expandedRowId:m,onToggleExpand:f,expandedMaxHeight:b})=>{const y=Gt(()=>r.map((i,p)=>t(_C,{variant:e,columns:n,row:i,rowIdx:p,rowCount:r.length,autoWidthColumnKeys:o,resolvedColumnWidths:a,getRowActions:s,rowActionsPushRightPosition:l,rowActionsPushLeftPosition:d,withCheckboxes:c,activeRowId:u,expandedRowId:m,onToggleExpand:f,expandedMaxHeight:b},`row-${p}`)),[r,u,s,l,d,c,n,o,a,m,f,b,e]);return g?t(eC,{gap:e===fC.Pretty?8:0,elements:y,scrollToIndex:p,scrollSignal:h}):t(i,{children:y})},RC=({columnKey:e,sortDirection:i,sortByKey:n,onSort:r})=>{const a=o(),s=n===e?a.v2.colors.white[500]:a.v2.colors.grey[400],l=i===fi.Ascending?0:180;return t(av,{variant:nv.Text,size:rv.S,leftIcon:()=>t(At,{fill:s,rotate:l}),onClick:()=>r(e)})},LC=({columnKey:e,filters:i,onFilter:n,rowsUnfiltered:r,filterOverride:a})=>{const s=o(),l=i[e]?.length?s.v2.colors.white[500]:s.v2.colors.grey[400],d=Gt(()=>a?a.options.map(({id:e,label:t})=>({id:e,label:t,withCheckbox:!0})):Array.from(new Set(r.map(t=>t.cells.find(t=>t.key===e)?.rawValue?.toString()).filter(e=>!!e))).sort((e,t)=>e.localeCompare(t)).map(e=>({id:e,label:e,withCheckbox:!0})),[r,e,a]);return t(A$,{items:d,withMultiSelect:!0,selectedIds:i[e]?.map(e=>e.toString())??[],setSelectedIds:t=>n(e,t),defaultOpen:!1,iconButtonProps:{leftIcon:e=>t(Mt,{fill:l,...e})}})},PC=({variant:i,backgroundColor:n,columns:r,rowsUnfiltered:o,autoWidthColumnKeys:a,resolvedColumnWidths:s,sortDirection:l,sortByKey:d,onSort:c,filters:u,onFilter:p,withCheckboxes:h,partiallySelected:g,allSelected:m,onSelectAll:f})=>e(wC,{children:[h&&t(CC,{$variant:i,$backgroundColor:n,$isFirst:!0,$isLast:!1,style:{flex:"0 0 68px",display:"flex",alignItems:"center"},children:t(y$,{partiallyChecked:g&&!m,value:m||!1,onChange:f})},"checkbox-column"),r.map(({key:g,label:m,tooltip:f,noSort:b,noFilter:y,filterOverride:v,textAlign:$},w)=>{const S=0===w&&!h,x=w===r.length-1,C=f?t(Va,{size:ja.XS,align:$,nowrap:!0,children:m}):t(P$,{size:ja.XS,align:$,nowrap:!0,fullWidth:!1,children:m});return e(CC,{$variant:i,$backgroundColor:n,$isFirst:S,$isLast:x,$autoWidth:a.has(g),$resolvedWidth:s[g],children:[e(IC,{$textAlign:$,children:[f?t(iv,{text:f,children:C}):C,(!b||!y)&&e(kC,{children:[!b&&t(RC,{columnKey:g,sortDirection:l,sortByKey:d,onSort:c}),!y&&t(LC,{columnKey:g,filters:u,onFilter:p,rowsUnfiltered:o,filterOverride:v})]})]}),!x&&i===fC.Data&&t(EC,{})]},`column-${g}`)})]}),UC=()=>{},MC={},FC=[],zC=e=>[],BC=({variant:i,maxHeight:n,fitContent:r=!1,headerBackgroundColor:o,hideHeader:a=!1,isLoading:s,noDataProps:l,columns:d,rows:c,getRowActions:u,rowActionsPushRightPosition:p,rowActionsPushLeftPosition:h,withCheckboxes:g,filters:m,onFiltersChange:f,activeRowId:b,scrollSignal:y,expandedRowId:v,onExpandedRowIdChange:$})=>{const[w,S]=Ht(fi.Ascending),[x,C]=Ht(""),[E,T]=Ht({}),[O,N]=Ht(null),A=m??E,k=void 0!==v,I=k?v:O,_=Xt(e=>{C(e),S(e=>e===fi.Ascending?fi.Descending:fi.Ascending)},[]),D=Xt((e,t)=>{const i={...A,[e]:t};f&&f(i),void 0===m&&T(i)},[A,f,m]),R=Gt(()=>{const e=(e,t)=>{const i=e.cells.find(e=>e.key===t);return i?""!==i.rawValue&&null!=i.rawValue?i.rawValue:i.component?.({})?.props?.children?.toString()||"":""},t=/^-?\d+(\.\d+)?$/,i=e=>{if("number"==typeof e&&Number.isFinite(e))return e;if("string"==typeof e){const i=e.trim();return t.test(i)?Number(i):e}return String(e??"")};return(x?[...c].sort((t,n)=>{const r=i(e(t,x)),o=i(e(n,x));return(w===fi.Ascending?1:-1)*((e,t)=>"number"==typeof e&&"number"==typeof t?e-t:String(e).localeCompare(String(t)))(r,o)}):c).filter(t=>{for(const[i,n]of Object.entries(A)){if(!n.length)continue;const r=d.find(e=>e.key===i)?.filterOverride;if(r){if(!r.filterRow(t,n))return!1;continue}const o=String(e(t,i)??"");if(!n.map(String).includes(o))return!1}return!0})},[c,x,w,A,d]),L=Gt(()=>null==b?-1:R.findIndex(e=>e.id===b),[R,b]),{partiallySelected:
|
|
1872
|
+
`,_C=({variant:n,columns:r,row:o,rowIdx:a,rowCount:s,autoWidthColumnKeys:l,resolvedColumnWidths:d,getRowActions:c,rowActionsPushRightPosition:u,rowActionsPushLeftPosition:p,withCheckboxes:h,activeRowId:g,expandedRowId:m,onToggleExpand:f,expandedMaxHeight:b})=>{const[y,v]=Ht(!1),{cells:$,onClick:w,isSelected:S=!1,onSelect:x,onDeselect:C,hideCheckbox:E,checkboxDisabled:T,checkboxTooltip:O,expandedContent:N}=o,A=o.id??String(a),k=null!=N,I=k&&m===A,_=null!=g&&o.id===g,D=c(o),R=a===s-1,L=k||!!w,P=()=>{k&&f?.(A),w?.()},U=(e,t)=>({$isLastRow:R&&!I,$isFirstCell:e,$isLastCell:t,$selected:S,$highlighted:_,$withClick:L,onClick:P,$hovered:L&&y}),M=I&&null!=N?"function"==typeof N?N({maxHeight:b}):N:null,F=D.length>0?t(nx,{isOpen:y,actions:D,positionRight:u,positionLeft:p}):null,z=e(i,{children:[h&&t(TC,{$variant:n,$index:a,style:{flex:"0 0 68px"},...U(!0,!1),children:!E&&(O?t(iv,{text:O,children:t(y$,{value:S,disabled:T,onChange:()=>S?C?.():x?.()})}):t(y$,{value:S,disabled:T,onChange:()=>S?C?.():x?.()}))},"checkbox-column"),r.map(({key:i,textAlign:o},s)=>{const c=$.find(e=>e.key===i),u=0===s&&!h,p=s===r.length-1,g=0===s,m="right"===o?"flex-end":"center"===o?"center":"flex-start",f=l.has(i),b=c?.component?c.component():t(P$,{size:ja.XXS,align:o,nowrap:!0,fullWidth:!f,children:c?.rawValue||"-"}),y=e(_l,{$width:"100%",$gap:k&&g?8:0,$justifyContent:m,style:{minWidth:0},children:[k&&g?t(I?Et:Ut,{}):null,b]});return t(TC,{$variant:n,$index:a,$autoWidth:l.has(i),$resolvedWidth:d[i],...U(u,p),children:y},`row-${a}-cell-${s}`)})]}),B={onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1)};return k?e(SC,{"data-table-row-index":a,children:[e(wC,{...B,children:[z,F]}),null!=M&&e(i,{children:[t(xC,{$maxHeight:b,children:M}),!R&&t(bS,{margin:"0"})]})]}):e(wC,{"data-table-row-index":a,...B,children:[z,F]})},DC=({variant:e,columns:n,rows:r,autoWidthColumnKeys:o,resolvedColumnWidths:a,getRowActions:s,rowActionsPushRightPosition:l,rowActionsPushLeftPosition:d,withCheckboxes:c,activeRowId:u,scrollToIndex:p,scrollSignal:h,useVirtua:g=!0,expandedRowId:m,onToggleExpand:f,expandedMaxHeight:b})=>{const y=Gt(()=>r.map((i,p)=>t(_C,{variant:e,columns:n,row:i,rowIdx:p,rowCount:r.length,autoWidthColumnKeys:o,resolvedColumnWidths:a,getRowActions:s,rowActionsPushRightPosition:l,rowActionsPushLeftPosition:d,withCheckboxes:c,activeRowId:u,expandedRowId:m,onToggleExpand:f,expandedMaxHeight:b},`row-${p}`)),[r,u,s,l,d,c,n,o,a,m,f,b,e]);return g?t(eC,{gap:e===fC.Pretty?8:0,elements:y,scrollToIndex:p,scrollSignal:h}):t(i,{children:y})},RC=({columnKey:e,sortDirection:i,sortByKey:n,onSort:r})=>{const a=o(),s=n===e?a.v2.colors.white[500]:a.v2.colors.grey[400],l=i===fi.Ascending?0:180;return t(av,{variant:nv.Text,size:rv.S,leftIcon:()=>t(At,{fill:s,rotate:l}),onClick:()=>r(e)})},LC=({columnKey:e,filters:i,onFilter:n,rowsUnfiltered:r,filterOverride:a})=>{const s=o(),l=i[e]?.length?s.v2.colors.white[500]:s.v2.colors.grey[400],d=Gt(()=>a?a.options.map(({id:e,label:t})=>({id:e,label:t,withCheckbox:!0})):Array.from(new Set(r.map(t=>t.cells.find(t=>t.key===e)?.rawValue?.toString()).filter(e=>!!e))).sort((e,t)=>e.localeCompare(t)).map(e=>({id:e,label:e,withCheckbox:!0})),[r,e,a]);return t(A$,{items:d,withMultiSelect:!0,selectedIds:i[e]?.map(e=>e.toString())??[],setSelectedIds:t=>n(e,t),defaultOpen:!1,iconButtonProps:{leftIcon:e=>t(Mt,{fill:l,...e})}})},PC=({variant:i,backgroundColor:n,columns:r,rowsUnfiltered:o,autoWidthColumnKeys:a,resolvedColumnWidths:s,sortDirection:l,sortByKey:d,onSort:c,filters:u,onFilter:p,withCheckboxes:h,partiallySelected:g,allSelected:m,onSelectAll:f})=>e(wC,{children:[h&&t(CC,{$variant:i,$backgroundColor:n,$isFirst:!0,$isLast:!1,style:{flex:"0 0 68px",display:"flex",alignItems:"center"},children:t(y$,{partiallyChecked:g&&!m,value:m||!1,onChange:f})},"checkbox-column"),r.map(({key:g,label:m,tooltip:f,noSort:b,noFilter:y,filterOverride:v,textAlign:$},w)=>{const S=0===w&&!h,x=w===r.length-1,C=f?t(Va,{size:ja.XS,align:$,nowrap:!0,children:m}):t(P$,{size:ja.XS,align:$,nowrap:!0,fullWidth:!1,children:m});return e(CC,{$variant:i,$backgroundColor:n,$isFirst:S,$isLast:x,$autoWidth:a.has(g),$resolvedWidth:s[g],children:[e(IC,{$textAlign:$,children:[f?t(iv,{text:f,children:C}):C,(!b||!y)&&e(kC,{children:[!b&&t(RC,{columnKey:g,sortDirection:l,sortByKey:d,onSort:c}),!y&&t(LC,{columnKey:g,filters:u,onFilter:p,rowsUnfiltered:o,filterOverride:v})]})]}),!x&&i===fC.Data&&t(EC,{})]},`column-${g}`)})]}),UC=()=>{},MC={},FC=[],zC=e=>[],BC=({variant:i,maxHeight:n,fitContent:r=!1,headerBackgroundColor:o,hideHeader:a=!1,isLoading:s,noDataProps:l,columns:d,rows:c,getRowActions:u,rowActionsPushRightPosition:p,rowActionsPushLeftPosition:h,withCheckboxes:g,filters:m,onFiltersChange:f,activeRowId:b,scrollSignal:y,expandedRowId:v,onExpandedRowIdChange:$})=>{const[w,S]=Ht(fi.Ascending),[x,C]=Ht(""),[E,T]=Ht({}),[O,N]=Ht(null),A=m??E,k=void 0!==v,I=k?v:O,_=Xt(e=>{C(e),S(e=>e===fi.Ascending?fi.Descending:fi.Ascending)},[]),D=Xt((e,t)=>{const i={...A,[e]:t};f&&f(i),void 0===m&&T(i)},[A,f,m]),R=Gt(()=>{const e=(e,t)=>{const i=e.cells.find(e=>e.key===t);return i?""!==i.rawValue&&null!=i.rawValue?i.rawValue:i.component?.({})?.props?.children?.toString()||"":""},t=/^-?\d+(\.\d+)?$/,i=e=>{if("number"==typeof e&&Number.isFinite(e))return e;if("string"==typeof e){const i=e.trim();return t.test(i)?Number(i):e}return String(e??"")};return(x?[...c].sort((t,n)=>{const r=i(e(t,x)),o=i(e(n,x));return(w===fi.Ascending?1:-1)*((e,t)=>"number"==typeof e&&"number"==typeof t?e-t:String(e).localeCompare(String(t)))(r,o)}):c).filter(t=>{for(const[i,n]of Object.entries(A)){if(!n.length)continue;const r=d.find(e=>e.key===i)?.filterOverride;if(r){if(!r.filterRow(t,n))return!1;continue}const o=String(e(t,i)??"");if(!n.map(String).includes(o))return!1}return!0})},[c,x,w,A,d]),L=Gt(()=>null==b?-1:R.findIndex(e=>e.id===b),[R,b]),P=!!g&&R.some(e=>!e.hideCheckbox),{partiallySelected:U,allSelected:M}=Gt(()=>{const e=R.filter(e=>!e.hideCheckbox&&!e.checkboxDisabled);return{partiallySelected:e.length>0&&e.some(e=>e.isSelected),allSelected:e.length>0&&e.every(e=>e.isSelected)}},[R]),F=Gt(()=>{const e=new Set,t=d[d.length-1]?.key;for(const i of d)i.key!==t&&!1!==i.autoWidth&&e.add(i.key);return e},[d]),z=Vt(null),[B,j]=Ht({}),H=Gt(()=>{if(0===F.size)return[];const i=d[0]?.key,n=c.some(e=>null!=e.expandedContent);return d.filter(e=>F.has(e.key)).map(r=>{const o=[e(AC,{children:[t(Va,{size:ja.XS,align:r.textAlign,nowrap:!0,children:r.label}),(!r.noSort||!r.noFilter)&&e(kC,{children:[!r.noSort&&t(RC,{columnKey:r.key,sortDirection:fi.Ascending,sortByKey:"",onSort:UC}),!r.noFilter&&t(LC,{columnKey:r.key,filters:MC,onFilter:UC,rowsUnfiltered:FC,filterOverride:r.filterOverride})]})]},`mw-${r.key}-header`)],a=n&&r.key===i;return c.forEach((i,n)=>{const s=i.cells.find(e=>e.key===r.key);if(!s)return;const l=s.component?s.component():t(Va,{size:ja.XS,children:s.rawValue||"-"});o.push(a?e(_l,{$gap:8,children:[t(Ut,{}),l]},`mw-${r.key}-${n}`):t(zt.Fragment,{children:l},`mw-${r.key}-${n}`))}),{key:r.key,nodes:o}})},[d,c,F]);Kt(()=>{if(!z.current||0===F.size)return void j(e=>0===Object.keys(e).length?e:{});const e={};z.current.querySelectorAll("[data-mw-key]").forEach(t=>{const i=t.dataset.mwKey;if(!i)return;const n=Math.ceil(Math.max(t.getBoundingClientRect().width,t.scrollWidth));(!e[i]||n>e[i])&&(e[i]=n)}),j(t=>Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(i=>t[i]===e[i])?t:e)},[H,F]);const W=Vt(null),[X,G]=Ht(0),V=R.some(e=>null!=e.expandedContent);Kt(()=>{if(!V)return void G(0);const e=W.current;if(!e)return;const t=()=>{const t=e.clientHeight;G(e=>e===t?e:t)};t();const i=new ResizeObserver(t);return i.observe(e),()=>i.disconnect()},[V,R.length]);const K=Xt(e=>{const t=I===e?null:e;k||N(t),$?.(t)},[I,k,$]),Y=V&&X>0?`${X}px`:void 0,J=r&&null!=n&&R.length>=100,q=!r||J;return e(bC,{$maxHeight:n,$fitContent:r,$virtualize:J,children:[H.length>0&&t(OC,{ref:z,"aria-hidden":!0,children:H.flatMap(({key:e,nodes:i})=>i.map((i,n)=>t(NC,{"data-mw-key":e,children:i},`mw-${e}-${n}`)))}),e(yC,{$variant:i,children:[!a&&t(vC,{children:t(PC,{variant:i,backgroundColor:o,columns:d,rowsUnfiltered:c,autoWidthColumnKeys:F,resolvedColumnWidths:B,sortDirection:w,sortByKey:x,onSort:_,filters:A,onFilter:D,withCheckboxes:P,partiallySelected:U,allSelected:M,onSelectAll:e=>{e?R.forEach(e=>!e.hideCheckbox&&!e.checkboxDisabled&&e.onSelect?.()):R.forEach(e=>!e.hideCheckbox&&!e.checkboxDisabled&&e.onDeselect?.())}})}),R.length?q?t($C,{ref:V?W:void 0,children:t(DC,{variant:i,columns:d,rows:R,autoWidthColumnKeys:F,resolvedColumnWidths:B,getRowActions:u||zC,rowActionsPushRightPosition:p,rowActionsPushLeftPosition:h,withCheckboxes:P,activeRowId:b,scrollToIndex:L,scrollSignal:y,useVirtua:!0,expandedRowId:I,onToggleExpand:K,expandedMaxHeight:Y})}):t(DC,{variant:i,columns:d,rows:R,autoWidthColumnKeys:F,resolvedColumnWidths:B,getRowActions:u||zC,rowActionsPushRightPosition:p,rowActionsPushLeftPosition:h,withCheckboxes:P,activeRowId:b,scrollToIndex:L,scrollSignal:y,useVirtua:!1,expandedRowId:I,onToggleExpand:K,expandedMaxHeight:Y}):t(Rl,{$fullHeight:!n,$height:n,$padding:"12px 0",children:s?t(gC,{size:3,maxHeight:n}):t(c$,{...l})})]})]})},jC=n.div`
|
|
1874
1873
|
padding: 6px 12px;
|
|
1875
1874
|
|
|
1876
1875
|
display: flex;
|
|
@@ -1926,10 +1925,6 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import n,{css as
|
|
|
1926
1925
|
width: 100%;
|
|
1927
1926
|
flex: 1;
|
|
1928
1927
|
`,JC=n.div`
|
|
1929
|
-
display: flex;
|
|
1930
|
-
flex-wrap: wrap;
|
|
1931
|
-
align-items: center;
|
|
1932
|
-
gap: 10px;
|
|
1933
1928
|
width: 100%;
|
|
1934
1929
|
padding: 8px;
|
|
1935
1930
|
background-color: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
@@ -1986,7 +1981,7 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import n,{css as
|
|
|
1986
1981
|
${({theme:e,$variant:t})=>{switch(t){case"timing":return r`
|
|
1987
1982
|
background-color: ${e.v2.colors.yellow[1e3]};
|
|
1988
1983
|
border-left: 2px solid ${e.v2.colors.yellow[500]};
|
|
1989
|
-
`;case"new":return r`
|
|
1984
|
+
`;case"new":case"removed":return r`
|
|
1990
1985
|
background-color: ${e.v2.colors.red[900]};
|
|
1991
1986
|
border-left: 2px solid ${e.v2.colors.red[500]};
|
|
1992
1987
|
`;case"placeholder":return r`
|
|
@@ -2101,20 +2096,20 @@ import{jsxs as e,jsx as t,Fragment as i}from"react/jsx-runtime";import n,{css as
|
|
|
2101
2096
|
box-sizing: border-box;
|
|
2102
2097
|
background-color: ${({theme:e})=>e.v2.colors.green[900]};
|
|
2103
2098
|
border-left: 2px solid ${({theme:e})=>e.v2.colors.green[500]};
|
|
2104
|
-
`,hE=(e,t)=>{switch(t){case"warning":return e.v2.colors.yellow[400];case"danger":return e.v2.colors.red[300];case"success":return e.v2.colors.green[300]}},
|
|
2099
|
+
`,hE=e=>"placeholder"===e||"removed"===e,gE=(e,t)=>{switch(t){case"warning":return e.v2.colors.yellow[400];case"danger":return e.v2.colors.red[300];case"success":return e.v2.colors.green[300]}},mE=({row:i})=>{const n=o(),r=!!i.scope,a=i.attributes?.filter(e=>!!e?.key||!!e?.placeholder)??[];return r||i.scopePlaceholder||a.length?t(uE,{children:e(Dl,{$gap:0,children:[i.scopePlaceholder?t(pE,{children:t(_t,{size:12,fill:n.v2.colors.green[500]})}):r?t(ux,{label:"Scope Attribute",value:i.scope}):null,a.map((e,i)=>e.placeholder?t(pE,{children:t(_t,{size:12,fill:n.v2.colors.green[500]})},`attr-placeholder-${i}`):t(ux,{label:e.key??"",value:e.value},`${e.key}-${i}`))]})}):null},fE=({row:i,expanded:n,onToggle:r})=>{const a=o(),s=(e=>e??"default")(i.variant),l=!hE(s),d=i.depth??0,c=Xt(()=>{l&&r(i.id)},[l,r,i.id]);if(hE(s)){const e="removed"===s?a.v2.colors.red[500]:a.v2.colors.green[500];return t(tE,{type:"button",$variant:s,$selected:!1,$interactive:!1,disabled:!0,"aria-hidden":!0,children:t(iE,{$depth:d,children:t(cE,{children:i.badge?.icon?t(i.badge.icon,{size:12,fill:e}):null})})})}const u=i.badge?.icon??void 0,p=i.badge?.tone??("new"===s?"danger":"warning"),h="timing"===s?a.v2.colors.yellow[500]:void 0;return e(tE,{type:"button",$variant:s,$selected:n,$interactive:l,onClick:c,"aria-pressed":n,children:[e(iE,{$depth:d,children:[t(nE,{size:ja.XXXS,color:Ha.Disable,nowrap:!0,children:i.index??""}),e(rE,{children:[i.service?t(oE,{title:i.service,children:t(aE,{size:ja.XXXS,color:a.v2.colors.purple[300],children:i.service})}):null,e(sE,{children:[t(Va,{size:ja.XXXS,color:n||"default"!==s?Ha.Primary:Ha.Secondary,nowrap:!0,children:i.name??""}),i.badge?.label?e(dE,{$tone:p,children:[t(Va,{size:ja.XXXS,color:gE(a,p),nowrap:!0,children:i.badge.label}),u?t(u,{size:12,fill:gE(a,p)}):null]}):null]}),i.durationLabel?t(lE,{size:ja.XXXS,color:h??Ha.Secondary,nowrap:!0,children:i.durationLabel}):null]})]}),n?t(mE,{row:i}):null]})},bE=({traceId:i,title:n,titleIcon:r,headerBadge:a,meta:s,rows:l,expandedRowIds:d,onToggleRow:c,corner:u="both"})=>{const p=o(),{clickCopy:h,isCopied:g}=sv(),m=Gt(()=>new Set(d??[]),[d]),f=Xt(e=>{c?.(e)},[c]),b=!!(r||n||a?.label||s?.length),y="success"===a?.tone?p.v2.colors.green[500]:"danger"===a?.tone?p.v2.colors.red[800]:p.v2.colors.silver[700],v="success"===a?.tone?p.v2.colors.black[500]:"danger"===a?.tone?p.v2.colors.white[500]:p.v2.colors.silver[200];return e(YC,{children:[b&&t(JC,{$corner:u??"both",children:e(Dl,{$gap:8,children:[e(_l,{$gap:10,$wrap:"wrap",children:[(r||n)&&e(qC,{children:[r&&t(r,{size:16,fill:p.v2.colors.white[500]}),n&&t(Va,{size:ja.XS,color:Ha.Primary,nowrap:!0,children:n})]}),a?.label?t(Lv,{label:a.label,backgroundColor:y,textColor:v,textSize:ja.XXXS}):null,s?.map(e=>t(QC,{children:t(Va,{size:ja.XXXS,color:Ha.Secondary,nowrap:!0,children:e.label})},e.label))]}),!!i&&t(lw,{label:"Trace ID",value:i,readOnly:!0,small:!0,leftIcon:g?$t:wt,leftIconClick:()=>h(i)})]})}),t(ZC,{$hasHeader:b,$corner:u??"both",children:l?.length?l.map(e=>t(fE,{row:e,expanded:m.has(e.id),onToggle:f},e.id)):t(_l,{$justifyContent:"center",style:{padding:16},children:t(Va,{size:ja.XXXS,color:Ha.Secondary,children:"No spans"})})})]})},yE=n.div`
|
|
2105
2100
|
min-width: 500px;
|
|
2106
|
-
`,
|
|
2101
|
+
`,vE=n.div`
|
|
2107
2102
|
display: flex;
|
|
2108
2103
|
flex-direction: column;
|
|
2109
2104
|
align-items: center;
|
|
2110
2105
|
gap: 16px;
|
|
2111
2106
|
padding: 24px;
|
|
2112
2107
|
width: 100%;
|
|
2113
|
-
|
|
2108
|
+
`,$E=n.div`
|
|
2114
2109
|
display: flex;
|
|
2115
2110
|
justify-content: center;
|
|
2116
2111
|
gap: 16px;
|
|
2117
2112
|
padding: 16px 24px;
|
|
2118
2113
|
width: 100%;
|
|
2119
2114
|
background-color: ${({theme:e})=>e.v2.colors.silver[1e3]};
|
|
2120
|
-
|
|
2115
|
+
`,wE=({visual:i,title:n,description:r,isOpen:o,onClose:a,denyButton:s,approveButton:l,children:d,...c})=>t(Ux,{isOpen:o,onClose:a,...c,children:e(yE,{children:[e(vE,{children:[i&&t(i,{}),t(Va,{size:ja.M,weight:500,color:Ha.Primary,children:n}),t(Dl,{$alignItems:"center",$gap:4,children:r.split("\n").map(e=>t(Va,{size:ja.XS,weight:400,color:Ha.Secondary,children:e},e))}),d]}),(s||l)&&e($E,{children:[s&&t(av,{"data-id":"deny",...s}),l&&t(av,{"data-id":"approve",...l})]})]})});export{o$ as $,k$ as A,av as B,Rl as C,YS as D,Ti as E,Dl as F,H$ as G,jS as H,Ax as I,Ju as J,tp as K,Dv as L,ip as M,c$ as N,np as O,yi as P,qu as Q,L$ as R,Oi as S,iv as T,_u as U,wl as V,wE as W,wi as X,Ms as Y,Y$ as Z,Uu as _,I$ as a,ku as a$,dw as a0,Vu as a1,m$ as a2,rp as a3,op as a4,Iu as a5,ss as a6,bS as a7,Cx as a8,Zv as a9,wu as aA,A$ as aB,du as aC,Cu as aD,sp as aE,$u as aF,Zu as aG,lp as aH,ap as aI,dp as aJ,cp as aK,Hu as aL,cu as aM,hu as aN,gu as aO,bu as aP,vu as aQ,yu as aR,Au as aS,eu as aT,tu as aU,su as aV,Wu as aW,Xu as aX,Yu as aY,sg as aZ,iu as a_,Gc as aa,Tu as ab,Mi as ac,Bi as ad,Yi as ae,Ji as af,qi as ag,zi as ah,ji as ai,Fi as aj,za as ak,Lu as al,pu as am,Ru as an,uu as ao,Fu as ap,Eu as aq,Du as ar,Mu as as,Ku as at,Ou as au,bx as av,Gu as aw,Su as ax,lu as ay,xu as az,bi as b,Il as b$,$s as b0,lg as b1,eC as b2,Wl as b3,l$ as b4,sv as b5,_s as b6,nS as b7,_y as b8,Za as b9,gd as bA,Vi as bB,hd as bC,Av as bD,hr as bE,gr as bF,mr as bG,fr as bH,br as bI,cn as bJ,so as bK,lo as bL,co as bM,uo as bN,po as bO,on as bP,nn as bQ,Do as bR,mn as bS,Ko as bT,hn as bU,Wo as bV,Fa as bW,Ma as bX,lc as bY,Li as bZ,Xv as b_,ll as ba,Si as bb,xi as bc,Ey as bd,Py as be,zy as bf,Dy as bg,Js as bh,Ja as bi,Dn as bj,en as bk,Gs as bl,Fc as bm,Mc as bn,Pc as bo,Uc as bp,nd as bq,dc as br,id as bs,By as bt,Nn as bu,si as bv,oi as bw,rd as bx,od as by,Pn as bz,zc as c,Bo as c$,gC as c0,En as c1,Lv as c2,li as c3,Bc as c4,hi as c5,jc as c6,gx as c7,P$ as c8,Ka as c9,Or as cA,Fr as cB,kr as cC,Ar as cD,Mr as cE,Ur as cF,Rr as cG,Dr as cH,Pr as cI,Lr as cJ,Gr as cK,Xr as cL,Br as cM,zr as cN,Wr as cO,Hr as cP,jr as cQ,Jr as cR,Yr as cS,Kr as cT,Vr as cU,_x as cV,no as cW,Fn as cX,Mn as cY,io as cZ,kx as c_,Pd as ca,oc as cb,ec as cc,tc as cd,nc as ce,ic as cf,Sp as cg,Nu as ch,Pu as ci,xp as cj,ju as ck,wp as cl,ou as cm,au as cn,mu as co,Cr as cp,xr as cq,Er as cr,Tr as cs,qr as ct,Qr as cu,Zr as cv,eo as cw,_r as cx,Ir as cy,Nr as cz,h$ as d,Na as d$,jo as d0,Ho as d1,Go as d2,Yn as d3,Jn as d4,Xn as d5,Xo as d6,Eo as d7,Co as d8,bv as d9,qo as dA,ca as dB,ua as dC,da as dD,la as dE,Qo as dF,ga as dG,ha as dH,pa as dI,ba as dJ,fa as dK,ma as dL,Zo as dM,$a as dN,va as dO,ya as dP,ea as dQ,Sa as dR,wa as dS,ta as dT,xa as dU,kv as dV,Ca as dW,Ea as dX,Oa as dY,ka as dZ,Aa as d_,Oo as da,Vo as db,To as dc,$o as dd,rr as de,No as df,Wn as dg,So as dh,Ao as di,ko as dj,Gn as dk,Vn as dl,Kn as dm,qn as dn,Qn as dp,vo as dq,Ua as dr,La as ds,Jo as dt,ra as du,na as dv,ia as dw,sa as dx,aa as dy,oa as dz,Va as e,Hd as e$,Ta as e0,Pa as e1,Da as e2,Ra as e3,_a as e4,Ia as e5,an as e6,pr as e7,dr as e8,ur as e9,Nv as eA,Xd as eB,mv as eC,rs as eD,Ui as eE,ns as eF,Vd as eG,ux as eH,Fs as eI,Kw as eJ,Ay as eK,ql as eL,Jl as eM,Hs as eN,ox as eO,Ny as eP,sl as eQ,ks as eR,Gl as eS,Ky as eT,qd as eU,Yd as eV,cd as eW,dl as eX,Xl as eY,zs as eZ,Ai as e_,cr as ea,ar as eb,sr as ec,lr as ed,or as ee,nr as ef,_n as eg,ai as eh,AS as ei,OS as ej,Un as ek,Ws as el,sc as em,Ba as en,qa as eo,gi as ep,Qx as eq,Ds as er,cS as es,bs as et,mS as eu,On as ev,pd as ew,Es as ex,Ql as ey,qs as ez,Ha as f,im as f$,Gd as f0,e$ as f1,BC as f2,fC as f3,fu as f4,Vc as f5,nl as f6,Bs as f7,wn as f8,Sn as f9,Kc as fA,rg as fB,ag as fC,og as fD,Np as fE,Tp as fF,Ep as fG,Op as fH,Rp as fI,Dp as fJ,Up as fK,Pp as fL,Ip as fM,kp as fN,Wc as fO,fp as fP,Xf as fQ,Rf as fR,Lf as fS,Ef as fT,Tf as fU,jm as fV,Vm as fW,Xm as fX,Km as fY,Gm as fZ,Ym as f_,xn as fa,Ec as fb,Ic as fc,Cc as fd,kc as fe,_c as ff,xc as fg,Nc as fh,bc as fi,yc as fj,Ac as fk,Tc as fl,Oc as fm,Lc as fn,fc as fo,wc as fp,Sc as fq,$c as fr,vc as fs,uc as ft,cc as fu,Rc as fv,Dc as fw,Hc as fx,Yc as fy,Xc as fz,ja as g,pm as g$,tm as g0,cf as g1,df as g2,uf as g3,bf as g4,Ug as g5,hf as g6,pf as g7,Uf as g8,Mf as g9,Yg as gA,ef as gB,Qf as gC,tb as gD,Am as gE,km as gF,hy as gG,gy as gH,yy as gI,wy as gJ,Im as gK,Cm as gL,wm as gM,$m as gN,iy as gO,Zg as gP,Qg as gQ,ty as gR,qg as gS,Jg as gT,am as gU,om as gV,db as gW,lm as gX,yS as gY,sm as gZ,hm as g_,Cf as ga,xf as gb,Nf as gc,Of as gd,kf as ge,Af as gf,Wf as gg,Yf as gh,Jf as gi,Vf as gj,Kf as gk,zm as gl,Bm as gm,Um as gn,Mm as go,Fm as gp,Lm as gq,Rm as gr,_m as gs,Pm as gt,Nm as gu,jf as gv,Om as gw,Em as gx,Tm as gy,Bf as gz,_l as h,lh as h$,gm as h0,fm as h1,bm as h2,vm as h3,ym as h4,um as h5,cm as h6,dm as h7,fy as h8,Eg as h9,Nl as hA,qh as hB,Qh as hC,Zh as hD,eg as hE,tg as hF,ig as hG,Bp as hH,Hp as hI,Wp as hJ,Xp as hK,Vp as hL,Gp as hM,Yp as hN,Kp as hO,qp as hP,Jp as hQ,Qp as hR,Mp as hS,Fp as hT,ah as hU,sh as hV,hh as hW,uh as hX,ph as hY,dh as hZ,ch as h_,ay as ha,ly as hb,sy as hc,nm as hd,dy as he,cy as hf,uy as hg,py as hh,Df as hi,Cg as hj,eb as hk,Zf as hl,hv as hm,ad as hn,yv as ho,Ux as hp,Ty as hq,ng as hr,zp as hs,Zp as ht,eh as hu,th as hv,ih as hw,rh as hx,nh as hy,oh as hz,rv as i,go as i$,bh as i0,yh as i1,mh as i2,fh as i3,gh as i4,$h as i5,wh as i6,vh as i7,jp as i8,jh as i9,Nh as iA,Ah as iB,Ih as iC,Lh as iD,rl as iE,Al as iF,tw as iG,Ns as iH,dn as iI,ln as iJ,sn as iK,pn as iL,un as iM,gn as iN,Tv as iO,iC as iP,lC as iQ,rC as iR,Is as iS,bE as iT,Ld as iU,Ln as iV,Rn as iW,Dw as iX,rn as iY,er as iZ,vr as i_,Hh as ia,Wh as ib,Bh as ic,Gh as id,Vh as ie,Kh as ig,Yh as ih,Jh as ii,Xh as ij,Fh as ik,zh as il,kh as im,Ph as io,Uh as ip,Mh as iq,_h as ir,Rh as is,Dh as it,Sh as iu,xh as iv,Ch as iw,Eh as ix,Th as iy,Oh as iz,nv as j,ib as j$,mo as j0,jn as j1,zn as j2,fo as j3,Hn as j4,bo as j5,Bn as j6,xo as j7,ho as j8,tr as j9,Vs as jA,Xs as jB,Xy as jC,Ts as jD,Cs as jE,xs as jF,Ya as jG,cl as jH,Hi as jI,Q$ as jJ,Qc as jK,Jc as jL,qc as jM,Zc as jN,ep as jO,Cp as jP,mp as jQ,hp as jR,gp as jS,pp as jT,up as jU,vp as jV,$p as jW,yp as jX,bp as jY,fv as jZ,ab as j_,ir as ja,Zn as jb,ro as jc,oo as jd,ao as je,Sr as jf,wr as jg,$r as jh,to as ji,yr as jj,Hw as jk,Rw as jl,bn as jm,kl as jn,mC as jo,Iy as jp,Os as jq,Qa as jr,Kd as js,$v as jt,Oy as ju,Uy as jv,Ks as jw,Rs as jx,Ls as jy,Ys as jz,g$ as k,Pi as k$,nb as k0,ob as k1,rb as k2,fb as k3,Db as k4,gb as k5,bb as k6,vb as k7,yb as k8,ey as k9,kg as kA,Ig as kB,_g as kC,Dg as kD,Xg as kE,Rg as kF,Lg as kG,Vg as kH,Gg as kI,Ag as kJ,ug as kK,cg as kL,_i as kM,ui as kN,ki as kO,Ri as kP,vn as kQ,yn as kR,fn as kS,tn as kT,vi as kU,$i as kV,Ni as kW,pi as kX,Cn as kY,mi as kZ,ci as k_,qb as ka,Jb as kb,ny as kc,oy as kd,ry as ke,$b as kf,wb as kg,Sb as kh,Rb as ki,Lb as kj,Pg as kk,Mg as kl,Fg as km,zg as kn,Bg as ko,bg as kp,vg as kq,$g as kr,wg as ks,Sg as kt,vf as ku,xg as kv,sf as kw,jg as kx,Hg as ky,Wg as kz,Gx as l,ru as l$,Ci as l0,Gi as l1,Xi as l2,Wi as l3,Di as l4,$n as l5,Zi as l6,Qi as l7,Ki as l8,fi as l9,fd as lA,bd as lB,yd as lC,Ud as lD,Md as lE,Ss as lF,Fd as lG,zd as lH,Tn as lI,Qd as lJ,Qu as lK,yo as lL,wo as lM,Lp as lN,_p as lO,Ap as lP,zu as lQ,Bu as lR,zo as lS,Fo as lT,Mo as lU,Uo as lV,_o as lW,Lo as lX,Io as lY,Ro as lZ,Po as l_,di as la,Ii as lb,xl as lc,Sl as ld,Tl as le,ys as lf,os as lg,vs as lh,md as li,As as lj,Us as lk,ws as ll,js as lm,is as ln,Zs as lo,el as lp,tl as lq,il as lr,ol as ls,Vl as lt,Zl as lu,ed as lv,td as lw,sd as lx,ld as ly,ud as lz,ts as m,Hb as m$,nu as m0,Jd as m1,hc as m2,gc as m3,mc as m4,pc as m5,dg as m6,Hf as m7,tf as m8,nf as m9,Gf as mA,Kg as mB,mb as mC,mg as mD,gg as mE,hg as mF,mf as mG,cb as mH,lb as mI,hb as mJ,pb as mK,ub as mL,sb as mM,mm as mN,Zm as mO,qm as mP,Qm as mQ,Jm as mR,jb as mS,Bb as mT,Ub as mU,Fb as mV,Mb as mW,zb as mX,Kb as mY,Gb as mZ,Xb as m_,rf as ma,wf as mb,Sf as mc,_b as md,Ib as me,kb as mf,xb as mg,Tb as mh,Ab as mi,Cb as mj,Ob as mk,Eb as ml,Nb as mm,qf as mn,Tg as mo,zf as mp,fg as mq,my as mr,Hm as ms,Wm as mt,of as mu,Pf as mv,Dm as mw,Ng as mx,Og as my,yg as mz,es as n,TS as n$,Wb as n0,Pb as n1,Vb as n2,af as n3,Sm as n4,ff as n5,vy as n6,$y as n7,Ff as n8,$f as n9,cv as nA,pv as nB,gv as nC,Yy as nD,Sv as nE,Wv as nF,Qv as nG,Gv as nH,Hv as nI,hw as nJ,gw as nK,$$ as nL,XC as nM,QS as nN,tx as nO,nx as nP,ax as nQ,Ul as nR,Hx as nS,Pl as nT,Mv as nU,vx as nV,W$ as nW,Ml as nX,Fl as nY,zl as nZ,qw as n_,rm as na,xy as nb,Sy as nc,by as nd,If as ne,pg as nf,em as ng,_f as nh,lf as ni,Zb as nj,Qb as nk,Yb as nl,yf as nm,gf as nn,xm as no,kn as np,In as nq,Yo as nr,Zd as ns,Gy as nt,Ev as nu,Vy as nv,Hy as nw,vv as nx,Wy as ny,lv as nz,Ei as o,Ll as o0,Xa as o1,CS as p,$S as q,vS as r,KC as s,ri as t,y$ as u,JS as v,WC as w,ls as x,hx as y,lw as z};
|