@localstack/appinspector-ui 1.0.163 → 1.0.164

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/dist/index.js CHANGED
@@ -2421,8 +2421,8 @@ var init_event_streams = __esm({
2421
2421
  });
2422
2422
 
2423
2423
  // src/pages/spans-list-page.tsx
2424
- import { Box as Box20, Paper as Paper3 } from "@mui/material";
2425
- import { useCallback as useCallback12, useEffect as useEffect22, useRef as useRef17, useState as useState21 } from "react";
2424
+ import { Box as Box21, Paper as Paper3 } from "@mui/material";
2425
+ import { useCallback as useCallback13, useEffect as useEffect23, useRef as useRef18, useState as useState22 } from "react";
2426
2426
 
2427
2427
  // src/api/errors.ts
2428
2428
  var AppInspectorDisabledError = class extends Error {
@@ -7412,10 +7412,10 @@ var createHtmlRenderState = function() {
7412
7412
  };
7413
7413
 
7414
7414
  // node_modules/.pnpm/framer-motion@6.5.1_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/framer-motion/dist/es/render/html/use-props.mjs
7415
- function copyRawValuesOnly(target, source, props) {
7416
- for (var key in source) {
7417
- if (!isMotionValue(source[key]) && !isForcedMotionValue(key, props)) {
7418
- target[key] = source[key];
7415
+ function copyRawValuesOnly(target, source2, props) {
7416
+ for (var key in source2) {
7417
+ if (!isMotionValue(source2[key]) && !isForcedMotionValue(key, props)) {
7418
+ target[key] = source2[key];
7419
7419
  }
7420
7420
  }
7421
7421
  }
@@ -10201,22 +10201,22 @@ function isNear(value, target, maxDistance) {
10201
10201
  }
10202
10202
  return distance(value, target) < maxDistance;
10203
10203
  }
10204
- function calcAxisDelta(delta, source, target, origin) {
10204
+ function calcAxisDelta(delta, source2, target, origin) {
10205
10205
  if (origin === void 0) {
10206
10206
  origin = 0.5;
10207
10207
  }
10208
10208
  delta.origin = origin;
10209
- delta.originPoint = mix(source.min, source.max, delta.origin);
10210
- delta.scale = calcLength(target) / calcLength(source);
10209
+ delta.originPoint = mix(source2.min, source2.max, delta.origin);
10210
+ delta.scale = calcLength(target) / calcLength(source2);
10211
10211
  if (isNear(delta.scale, 1, 1e-4) || isNaN(delta.scale))
10212
10212
  delta.scale = 1;
10213
10213
  delta.translate = mix(target.min, target.max, delta.origin) - delta.originPoint;
10214
10214
  if (isNear(delta.translate) || isNaN(delta.translate))
10215
10215
  delta.translate = 0;
10216
10216
  }
10217
- function calcBoxDelta(delta, source, target, origin) {
10218
- calcAxisDelta(delta.x, source.x, target.x, origin === null || origin === void 0 ? void 0 : origin.originX);
10219
- calcAxisDelta(delta.y, source.y, target.y, origin === null || origin === void 0 ? void 0 : origin.originY);
10217
+ function calcBoxDelta(delta, source2, target, origin) {
10218
+ calcAxisDelta(delta.x, source2.x, target.x, origin === null || origin === void 0 ? void 0 : origin.originX);
10219
+ calcAxisDelta(delta.y, source2.y, target.y, origin === null || origin === void 0 ? void 0 : origin.originY);
10220
10220
  }
10221
10221
  function calcRelativeAxis(target, relative, parent) {
10222
10222
  target.min = parent.min + relative.min;
@@ -10273,14 +10273,14 @@ function calcViewportConstraints(layoutBox, constraintsBox) {
10273
10273
  y: calcViewportAxisConstraints(layoutBox.y, constraintsBox.y)
10274
10274
  };
10275
10275
  }
10276
- function calcOrigin2(source, target) {
10276
+ function calcOrigin2(source2, target) {
10277
10277
  var origin = 0.5;
10278
- var sourceLength = calcLength(source);
10278
+ var sourceLength = calcLength(source2);
10279
10279
  var targetLength = calcLength(target);
10280
10280
  if (targetLength > sourceLength) {
10281
- origin = progress(target.min, target.max - sourceLength, source.min);
10281
+ origin = progress(target.min, target.max - sourceLength, source2.min);
10282
10282
  } else if (sourceLength > targetLength) {
10283
- origin = progress(source.min, source.max - targetLength, target.min);
10283
+ origin = progress(source2.min, source2.max - targetLength, target.min);
10284
10284
  }
10285
10285
  return clamp2(0, 1, origin);
10286
10286
  }
@@ -13094,22 +13094,6 @@ var ResponsiveTimestampCell = memo3(({ date }) => {
13094
13094
  return /* @__PURE__ */ jsx3("span", { style: { display: "inline-block", width: "100%" }, children: formattedTime });
13095
13095
  });
13096
13096
 
13097
- // src/types/error-levels.ts
13098
- var ErrorLevel = {
13099
- ERROR: 3,
13100
- // General error
13101
- IAM_PERMISSION: 5,
13102
- // IAM permission issues
13103
- OK: 2,
13104
- // OK
13105
- // Standard OTEL status codes
13106
- UNSET: 1,
13107
- // Unset
13108
- // Extended custom levels
13109
- WARNING: 4
13110
- // Warning
13111
- };
13112
-
13113
13097
  // src/utils/service-display-name.ts
13114
13098
  var SERVICE_DISPLAY_NAME = {
13115
13099
  "account": "Account",
@@ -15222,6 +15206,22 @@ ServiceCell.displayName = "ServiceCell";
15222
15206
  import { Cancel, Error as Error2, GppBad } from "@mui/icons-material";
15223
15207
  import { Box as Box2, Divider, Tooltip as Tooltip2, Typography as Typography2 } from "@mui/material";
15224
15208
 
15209
+ // src/types/error-levels.ts
15210
+ var ErrorLevel = {
15211
+ ERROR: 3,
15212
+ // General error
15213
+ IAM_PERMISSION: 5,
15214
+ // IAM permission issues
15215
+ OK: 2,
15216
+ // OK
15217
+ // Standard OTEL status codes
15218
+ UNSET: 1,
15219
+ // Unset
15220
+ // Extended custom levels
15221
+ WARNING: 4
15222
+ // Warning
15223
+ };
15224
+
15225
15225
  // src/utils/iam-utils.ts
15226
15226
  function determinePermissionStatus(payload) {
15227
15227
  if (payload.explicit_deny_count && payload.explicit_deny_count > 0) {
@@ -15308,25 +15308,7 @@ function parseIAMEvent(payloadString) {
15308
15308
  }
15309
15309
  }
15310
15310
 
15311
- // src/components/cells/status-cell.tsx
15312
- import { Fragment as Fragment2, jsx as jsx124, jsxs as jsxs119 } from "react/jsx-runtime";
15313
- var StatusIcon = ({ errorLevel, operationStatus, spanStatusCode }) => {
15314
- switch (errorLevel) {
15315
- case ErrorLevel.ERROR: {
15316
- return /* @__PURE__ */ jsx124(Cancel, { sx: { color: "red" } });
15317
- }
15318
- case ErrorLevel.IAM_PERMISSION: {
15319
- const isDenial = operationStatus ? operationStatus === "iam_explicit_deny" || operationStatus === "iam_implicit_deny" : spanStatusCode === 2;
15320
- return /* @__PURE__ */ jsx124(GppBad, { sx: { color: isDenial ? "red" : "warning.main" } });
15321
- }
15322
- case ErrorLevel.WARNING: {
15323
- return /* @__PURE__ */ jsx124(Error2, { sx: { color: "orange" } });
15324
- }
15325
- default: {
15326
- return /* @__PURE__ */ jsx124(Fragment2, {});
15327
- }
15328
- }
15329
- };
15311
+ // src/utils/error-level.ts
15330
15312
  var calculateHighestErrorLevel = (span) => {
15331
15313
  if (span.operation_status) {
15332
15314
  switch (span.operation_status) {
@@ -15358,6 +15340,26 @@ var calculateHighestErrorLevel = (span) => {
15358
15340
  if (hasWarning) return ErrorLevel.WARNING;
15359
15341
  return span.status_code || ErrorLevel.UNSET;
15360
15342
  };
15343
+
15344
+ // src/components/cells/status-cell.tsx
15345
+ import { Fragment as Fragment2, jsx as jsx124, jsxs as jsxs119 } from "react/jsx-runtime";
15346
+ var StatusIcon = ({ errorLevel, operationStatus, spanStatusCode }) => {
15347
+ switch (errorLevel) {
15348
+ case ErrorLevel.ERROR: {
15349
+ return /* @__PURE__ */ jsx124(Cancel, { sx: { color: "red" } });
15350
+ }
15351
+ case ErrorLevel.IAM_PERMISSION: {
15352
+ const isDenial = operationStatus ? operationStatus === "iam_explicit_deny" || operationStatus === "iam_implicit_deny" : spanStatusCode === 2;
15353
+ return /* @__PURE__ */ jsx124(GppBad, { sx: { color: isDenial ? "red" : "warning.main" } });
15354
+ }
15355
+ case ErrorLevel.WARNING: {
15356
+ return /* @__PURE__ */ jsx124(Error2, { sx: { color: "orange" } });
15357
+ }
15358
+ default: {
15359
+ return /* @__PURE__ */ jsx124(Fragment2, {});
15360
+ }
15361
+ }
15362
+ };
15361
15363
  var SPAN_STATUS_LABELS = {
15362
15364
  0: "Unset",
15363
15365
  1: "OK",
@@ -15527,47 +15529,26 @@ import {
15527
15529
  Typography as Typography4
15528
15530
  } from "@mui/material";
15529
15531
  import { useState as useState5 } from "react";
15530
- import { Fragment as Fragment4, jsx as jsx126, jsxs as jsxs121 } from "react/jsx-runtime";
15532
+
15533
+ // src/utils/spans-filters.ts
15531
15534
  var EMPTY_FILTERS = {
15532
15535
  consumerService: [],
15533
15536
  producerService: [],
15534
15537
  status: []
15535
15538
  };
15536
15539
  var EXTERNAL_PRODUCER_VALUE = "__external__";
15537
- function applyFilters(spans, filters) {
15538
- if (isFiltersEmpty(filters)) return spans;
15539
- return spans.filter((span) => {
15540
- if (filters.consumerService.length > 0 && !filters.consumerService.includes(span.service_name)) {
15541
- return false;
15542
- }
15543
- if (filters.producerService.length > 0) {
15544
- const includesExternal = filters.producerService.includes(EXTERNAL_PRODUCER_VALUE);
15545
- const namedServices = filters.producerService.filter((value) => value !== EXTERNAL_PRODUCER_VALUE);
15546
- const matchesExternal = includesExternal && !span.parent_service_name;
15547
- const matchesNamed = namedServices.length > 0 && !!span.parent_service_name && namedServices.includes(span.parent_service_name);
15548
- if (!matchesExternal && !matchesNamed) return false;
15549
- }
15550
- if (filters.status.length > 0) {
15551
- if (!span.operation_status) return false;
15552
- if (!filters.status.includes(collapseStatusValue(span.operation_status))) return false;
15553
- }
15554
- return true;
15555
- });
15556
- }
15557
15540
  function isFiltersEmpty(filters) {
15558
15541
  return filters.consumerService.length === 0 && filters.producerService.length === 0 && filters.status.length === 0;
15559
15542
  }
15543
+
15544
+ // src/components/spans-list/spans-filter-bar.tsx
15545
+ import { Fragment as Fragment4, jsx as jsx126, jsxs as jsxs121 } from "react/jsx-runtime";
15560
15546
  var STATUS_LABELS = {
15561
15547
  error: "Error",
15562
15548
  iam_deny: "IAM Deny",
15563
15549
  iam_warn: "IAM Warning",
15564
15550
  ok: "Success"
15565
15551
  };
15566
- var collapseStatusValue = (status) => {
15567
- if (status === "iam_explicit_deny" || status === "iam_implicit_deny") return "iam_deny";
15568
- if (status === "iam_explicit_warn" || status === "iam_implicit_warn") return "iam_warn";
15569
- return status;
15570
- };
15571
15552
  var statusOptionIcon = (value) => {
15572
15553
  switch (value) {
15573
15554
  case "error": {
@@ -15867,21 +15848,29 @@ var SpansDataGridRow = memo8(
15867
15848
  );
15868
15849
  var SpansDataGrid = ({
15869
15850
  clearingSpans,
15851
+ consumerValues,
15870
15852
  errorCount: _errorCount,
15871
15853
  fetchingBackward,
15872
15854
  fetchingForward,
15855
+ filteredErrorCount,
15856
+ filteredSpans,
15857
+ filteredWarningCount,
15858
+ filters,
15859
+ hasExternalProducer,
15873
15860
  hasMoreBackward,
15874
15861
  hasMoreForward,
15875
15862
  licenseLimit,
15876
15863
  onClearSpans,
15864
+ onFiltersChange,
15877
15865
  onOrderChange,
15878
15866
  onSearchChange,
15879
15867
  onSpanClick,
15880
15868
  order: order2,
15869
+ producerValues,
15881
15870
  search,
15882
15871
  searching,
15883
15872
  searchSupported,
15884
- spans,
15873
+ statusValues,
15885
15874
  systemLimit,
15886
15875
  totalCount,
15887
15876
  warningCount: _warningCount
@@ -15896,7 +15885,6 @@ var SpansDataGrid = ({
15896
15885
  clearTimeout(handle);
15897
15886
  };
15898
15887
  }, [searchDraft, onSearchChange]);
15899
- const [filters, setFilters] = useState6(EMPTY_FILTERS);
15900
15888
  const filtersActive = !isFiltersEmpty(filters);
15901
15889
  const activeFilterNames = [
15902
15890
  filters.producerService.length > 0 && "Producer",
@@ -15911,17 +15899,15 @@ var SpansDataGrid = ({
15911
15899
  const handleClearAll = useCallback2(() => {
15912
15900
  setSearchDraft("");
15913
15901
  onSearchChange("");
15914
- setFilters(EMPTY_FILTERS);
15915
- }, [onSearchChange]);
15902
+ onFiltersChange(EMPTY_FILTERS);
15903
+ }, [onSearchChange, onFiltersChange]);
15916
15904
  const handleClearSpans = useCallback2(() => {
15917
15905
  setSearchDraft("");
15918
- setFilters(EMPTY_FILTERS);
15906
+ onFiltersChange(EMPTY_FILTERS);
15919
15907
  onClearSpans();
15920
- }, [onClearSpans]);
15908
+ }, [onClearSpans, onFiltersChange]);
15921
15909
  const producerOptions = useMemo4(() => {
15922
- const services = new Set(
15923
- spans?.map((span) => span.parent_service_name).filter(Boolean) ?? []
15924
- );
15910
+ const services = new Set(producerValues);
15925
15911
  for (const value of filters.producerService) {
15926
15912
  if (value !== EXTERNAL_PRODUCER_VALUE) services.add(value);
15927
15913
  }
@@ -15930,48 +15916,29 @@ var SpansDataGrid = ({
15930
15916
  serviceCode: service,
15931
15917
  value: service
15932
15918
  }));
15933
- const hasExternalProducer = spans?.some((span) => !span.parent_service_name);
15934
15919
  if (hasExternalProducer || filters.producerService.includes(EXTERNAL_PRODUCER_VALUE)) {
15935
15920
  options.push({ label: "External producer", value: EXTERNAL_PRODUCER_VALUE });
15936
15921
  }
15937
15922
  return options;
15938
- }, [spans, filters.producerService]);
15923
+ }, [producerValues, hasExternalProducer, filters.producerService]);
15939
15924
  const consumerOptions = useMemo4(() => {
15940
- const services = new Set(spans?.map((span) => span.service_name) ?? []);
15925
+ const services = new Set(consumerValues);
15941
15926
  for (const value of filters.consumerService) services.add(value);
15942
15927
  return [...services].toSorted().map((service) => ({
15943
15928
  label: getServiceDisplayName(service),
15944
15929
  serviceCode: service,
15945
15930
  value: service
15946
15931
  }));
15947
- }, [spans, filters.consumerService]);
15932
+ }, [consumerValues, filters.consumerService]);
15948
15933
  const statusOptions = useMemo4(() => {
15949
- const statuses = new Set(
15950
- spans?.map((span) => span.operation_status).filter(Boolean).map((s) => collapseStatusValue(s))
15951
- );
15934
+ const statuses = new Set(statusValues);
15952
15935
  for (const value of filters.status) statuses.add(value);
15953
15936
  return [...statuses].toSorted().map((status) => ({
15954
15937
  icon: statusOptionIcon(status),
15955
15938
  label: STATUS_LABELS[status] ?? status,
15956
15939
  value: status
15957
15940
  }));
15958
- }, [spans, filters.status]);
15959
- const filteredSpans = useMemo4(() => {
15960
- if (!spans) return;
15961
- if (!filtersActive) return spans;
15962
- return applyFilters(spans, filters);
15963
- }, [spans, filters, filtersActive]);
15964
- const filteredErrorCount = useMemo4(
15965
- () => filteredSpans?.filter((span) => {
15966
- const level = calculateHighestErrorLevel(span);
15967
- return level === ErrorLevel.ERROR || level === ErrorLevel.IAM_PERMISSION;
15968
- }).length,
15969
- [filteredSpans]
15970
- );
15971
- const filteredWarningCount = useMemo4(
15972
- () => filteredSpans?.filter((span) => calculateHighestErrorLevel(span) === ErrorLevel.WARNING).length,
15973
- [filteredSpans]
15974
- );
15941
+ }, [statusValues, filters.status]);
15975
15942
  const columns = useMemo4(() => [
15976
15943
  columnHelper.accessor("startTime", {
15977
15944
  cell: (props) => /* @__PURE__ */ jsx127(ResponsiveTimestampCell, { date: props.getValue() }),
@@ -16108,7 +16075,7 @@ var SpansDataGrid = ({
16108
16075
  const element = containerRef.current;
16109
16076
  if (!element || !isAtLiveEdgeRef.current) return;
16110
16077
  element.scrollTop = element.scrollHeight;
16111
- }, [order2, spans?.length, lastSpanId]);
16078
+ }, [order2, filteredSpans?.length, lastSpanId]);
16112
16079
  return /* @__PURE__ */ jsxs122(Fragment5, { children: [
16113
16080
  /* @__PURE__ */ jsx127(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsxs122(Box5, { sx: { display: "flex", flexDirection: "column", gap: "0.5rem", pt: 1, px: 1 }, children: [
16114
16081
  /* @__PURE__ */ jsxs122(Box5, { sx: { alignItems: "center", display: "flex", flexWrap: "wrap", gap: "0.5rem" }, children: [
@@ -16126,7 +16093,7 @@ var SpansDataGrid = ({
16126
16093
  {
16127
16094
  consumerOptions,
16128
16095
  filters,
16129
- onFiltersChange: setFilters,
16096
+ onFiltersChange,
16130
16097
  producerOptions,
16131
16098
  statusOptions
16132
16099
  }
@@ -16245,7 +16212,7 @@ var SpansDataGrid = ({
16245
16212
  )) }, headerGroup.id);
16246
16213
  }) }),
16247
16214
  /* @__PURE__ */ jsxs122(TableBody, { children: [
16248
- (spans === void 0 || clearingSpans || searching) && /* @__PURE__ */ jsx127(TableRow, { children: /* @__PURE__ */ jsx127(TableCell, { colSpan: columnCount, sx: { fontStyle: "italic", textAlign: "center" }, children: /* @__PURE__ */ jsx127(CircularProgress, { size: 48, sx: { m: 4 } }) }) }),
16215
+ (filteredSpans === void 0 || clearingSpans || searching) && /* @__PURE__ */ jsx127(TableRow, { children: /* @__PURE__ */ jsx127(TableCell, { colSpan: columnCount, sx: { fontStyle: "italic", textAlign: "center" }, children: /* @__PURE__ */ jsx127(CircularProgress, { size: 48, sx: { m: 4 } }) }) }),
16249
16216
  !clearingSpans && !searching && filteredSpans?.length === 0 && (searchActive || filtersActive ? /* @__PURE__ */ jsx127(
16250
16217
  NoMatchRow,
16251
16218
  {
@@ -16352,21 +16319,29 @@ var SpansList = (props) => {
16352
16319
  SpansDataGrid,
16353
16320
  {
16354
16321
  clearingSpans: props.clearingSpans,
16322
+ consumerValues: props.consumerValues,
16355
16323
  errorCount: props.errorCount,
16356
16324
  fetchingBackward: props.fetchingBackward,
16357
16325
  fetchingForward: props.fetchingForward,
16326
+ filteredErrorCount: props.filteredErrorCount,
16327
+ filteredSpans: props.filteredSpans,
16328
+ filteredWarningCount: props.filteredWarningCount,
16329
+ filters: props.filters,
16330
+ hasExternalProducer: props.hasExternalProducer,
16358
16331
  hasMoreBackward: props.hasMoreBackward,
16359
16332
  hasMoreForward: props.hasMoreForward,
16360
16333
  licenseLimit: props.licenseLimit,
16361
16334
  onClearSpans: props.onClearSpans,
16335
+ onFiltersChange: props.onFiltersChange,
16362
16336
  onOrderChange: props.onOrderChange,
16363
16337
  onSearchChange: props.onSearchChange,
16364
16338
  onSpanClick: props.onSpanClick,
16365
16339
  order: props.order,
16340
+ producerValues: props.producerValues,
16366
16341
  search: props.search,
16367
16342
  searching: props.searching,
16368
16343
  searchSupported: props.searchSupported,
16369
- spans: props.spans,
16344
+ statusValues: props.statusValues,
16370
16345
  systemLimit: props.systemLimit,
16371
16346
  totalCount: props.totalCount,
16372
16347
  warningCount: props.warningCount
@@ -16586,6 +16561,46 @@ var StatusMessage = ({
16586
16561
  return /* @__PURE__ */ jsx129(Fragment6, {});
16587
16562
  };
16588
16563
 
16564
+ // src/components/worker-error-message/worker-error-message.tsx
16565
+ import { ErrorOutline as ErrorOutline2 } from "@mui/icons-material";
16566
+ import { Alert as Alert4, AlertTitle as AlertTitle2, Box as Box8, Button as Button6, Typography as Typography7 } from "@mui/material";
16567
+ import { jsx as jsx130, jsxs as jsxs125 } from "react/jsx-runtime";
16568
+ var WorkerErrorMessage = ({ error, onRetry }) => /* @__PURE__ */ jsx130(
16569
+ Box8,
16570
+ {
16571
+ sx: {
16572
+ alignItems: "center",
16573
+ display: "flex",
16574
+ flexDirection: "column",
16575
+ gap: 2,
16576
+ justifyContent: "center",
16577
+ p: 4
16578
+ },
16579
+ children: /* @__PURE__ */ jsxs125(
16580
+ Alert4,
16581
+ {
16582
+ icon: /* @__PURE__ */ jsx130(ErrorOutline2, { fontSize: "large" }),
16583
+ severity: "error",
16584
+ sx: { maxWidth: 600, width: "100%" },
16585
+ children: [
16586
+ /* @__PURE__ */ jsx130(AlertTitle2, { sx: { fontWeight: "bold" }, children: "Unable to Start Span Filtering" }),
16587
+ /* @__PURE__ */ jsx130(Typography7, { sx: { mb: 2 }, variant: "body2", children: "App Inspector couldn't start the background worker that filters and sorts operations. This is usually caused by a Content-Security-Policy blocking Web Workers in this environment." }),
16588
+ /* @__PURE__ */ jsx130(Typography7, { sx: { fontFamily: "monospace", mb: 2 }, variant: "caption", children: error.message }),
16589
+ onRetry && /* @__PURE__ */ jsx130(Box8, { sx: { display: "flex", justifyContent: "flex-start" }, children: /* @__PURE__ */ jsx130(
16590
+ Button6,
16591
+ {
16592
+ "aria-label": "Retry starting the spans filter worker",
16593
+ onClick: onRetry,
16594
+ variant: "outlined",
16595
+ children: "Retry"
16596
+ }
16597
+ ) })
16598
+ ]
16599
+ }
16600
+ )
16601
+ }
16602
+ );
16603
+
16589
16604
  // src/hooks/status-provider.tsx
16590
16605
  import { createContext as createContext8, useContext as useContext14 } from "react";
16591
16606
 
@@ -16672,11 +16687,11 @@ function useConnectionStateMachine() {
16672
16687
  }
16673
16688
 
16674
16689
  // src/hooks/status-provider.tsx
16675
- import { jsx as jsx130 } from "react/jsx-runtime";
16690
+ import { jsx as jsx131 } from "react/jsx-runtime";
16676
16691
  var AppInspectorStatusContext = createContext8(void 0);
16677
16692
  var StatusProvider = ({ children }) => {
16678
16693
  const value = useConnectionStateMachine();
16679
- return /* @__PURE__ */ jsx130(AppInspectorStatusContext.Provider, { value, children });
16694
+ return /* @__PURE__ */ jsx131(AppInspectorStatusContext.Provider, { value, children });
16680
16695
  };
16681
16696
  var useAppInspectorStatus = () => {
16682
16697
  const value = useContext14(AppInspectorStatusContext);
@@ -16732,7 +16747,7 @@ function useLocalStorage(key, initialValue) {
16732
16747
  }
16733
16748
 
16734
16749
  // src/hooks/use-spans.ts
16735
- import { useCallback as useCallback7, useEffect as useEffect16, useRef as useRef10, useState as useState11 } from "react";
16750
+ import { useCallback as useCallback8, useEffect as useEffect17, useMemo as useMemo6, useRef as useRef11, useState as useState12 } from "react";
16736
16751
 
16737
16752
  // src/utils/pagination-buffer.ts
16738
16753
  var insertSorted = (array, item, compareFunction, hint = "back") => {
@@ -16847,6 +16862,7 @@ var createPaginationBuffer = (options) => {
16847
16862
  nextForwardToken = newPage.nextForwardToken;
16848
16863
  hasMoreBackward ??= newPage.hasMoreBackward;
16849
16864
  nextBackwardToken ??= newPage.nextBackwardToken;
16865
+ options.onPageFetched?.("forward", newPage.items);
16850
16866
  reportDataChange();
16851
16867
  } catch (error) {
16852
16868
  if (controller.signal.aborted) {
@@ -16884,6 +16900,7 @@ var createPaginationBuffer = (options) => {
16884
16900
  nextBackwardToken = newPage.nextBackwardToken;
16885
16901
  hasMoreForward ??= newPage.hasMoreForward;
16886
16902
  nextForwardToken ??= newPage.nextForwardToken;
16903
+ options.onPageFetched?.("backward", newPage.items);
16887
16904
  reportDataChange();
16888
16905
  } catch (error) {
16889
16906
  if (controller.signal.aborted) {
@@ -16948,8 +16965,92 @@ var createPaginationBuffer = (options) => {
16948
16965
  };
16949
16966
  };
16950
16967
 
16968
+ // src/workers/spans-reducer.ts
16969
+ var toSpanFilterProjection = (span) => ({
16970
+ errors: span.errors?.map((error) => ({ level: error.level })),
16971
+ events: span.events.map((event) => ({
16972
+ attributes: typeof event.attributes?.payload === "string" ? { payload: event.attributes.payload } : void 0,
16973
+ event_type: event.event_type
16974
+ })),
16975
+ operation_status: span.operation_status,
16976
+ parent_service_name: span.parent_service_name,
16977
+ service_name: span.service_name,
16978
+ span_id: span.span_id,
16979
+ start_time_unix_nano: span.start_time_unix_nano,
16980
+ status_code: span.status_code
16981
+ });
16982
+
16983
+ // src/hooks/use-spans-compute.ts
16984
+ import { useCallback as useCallback5, useEffect as useEffect14, useRef as useRef8, useState as useState10 } from "react";
16985
+
16986
+ // inline-worker:/home/runner/work/localstack-appinspector-ui/localstack-appinspector-ui/src/workers/spans-worker.worker.ts
16987
+ var source = '(() => {\n // src/types/error-levels.ts\n var ErrorLevel = {\n ERROR: 3,\n // General error\n IAM_PERMISSION: 5,\n // IAM permission issues\n OK: 2,\n // OK\n // Standard OTEL status codes\n UNSET: 1,\n // Unset\n // Extended custom levels\n WARNING: 4\n // Warning\n };\n\n // src/utils/iam-utils.ts\n function determinePermissionStatus(payload) {\n if (payload.explicit_deny_count && payload.explicit_deny_count > 0) {\n return "explicitly_denied";\n }\n if (payload.is_allowed && payload.explicit_allow_count && payload.explicit_allow_count > 0) {\n return "explicitly_allowed";\n }\n if (payload.is_allowed) {\n return "implicitly_allowed";\n }\n return "implicitly_denied";\n }\n function parseIAMEvent(payloadString) {\n try {\n const payload = JSON.parse(payloadString);\n const permission = determinePermissionStatus(payload);\n const actions = [];\n const resources = [];\n if (payload.explicit_allows) {\n for (const allow of payload.explicit_allows) {\n if (!actions.includes(allow.action)) actions.push(allow.action);\n if (!resources.includes(allow.resource)) resources.push(allow.resource);\n }\n }\n if (payload.explicit_denies) {\n for (const deny of payload.explicit_denies) {\n if (!actions.includes(deny.action)) actions.push(deny.action);\n if (!resources.includes(deny.resource)) resources.push(deny.resource);\n }\n }\n if (payload.implicit_denies) {\n for (const deny of payload.implicit_denies) {\n if (!actions.includes(deny.action)) actions.push(deny.action);\n if (!resources.includes(deny.resource)) resources.push(deny.resource);\n }\n }\n return {\n details: {\n actions,\n explicitAllows: payload.explicit_allow_count,\n explicitDenies: payload.explicit_deny_count,\n implicitDenies: payload.implicit_deny_count,\n resources\n },\n operation: payload.operation,\n permission,\n principal: payload.principal_arn,\n service: payload.service\n };\n } catch (error) {\n console.error("Error parsing IAM event payload:", error);\n return void 0;\n }\n }\n\n // src/utils/error-level.ts\n var calculateHighestErrorLevel = (span) => {\n if (span.operation_status) {\n switch (span.operation_status) {\n case "error": {\n return ErrorLevel.ERROR;\n }\n case "iam_explicit_deny":\n case "iam_explicit_warn":\n case "iam_implicit_deny":\n case "iam_implicit_warn": {\n return ErrorLevel.IAM_PERMISSION;\n }\n default: {\n return ErrorLevel.OK;\n }\n }\n }\n const hasIamDenial = span.events.some((event) => {\n if (!event.event_type?.toLowerCase().includes("iam")) return false;\n if (typeof event.attributes?.payload !== "string") return false;\n const parsed = parseIAMEvent(event.attributes.payload);\n return parsed?.permission === "explicitly_denied" || parsed?.permission === "implicitly_denied";\n });\n if (hasIamDenial) return ErrorLevel.IAM_PERMISSION;\n if (span.status_code === 2) return ErrorLevel.ERROR;\n const hasErrorInErrors = span.errors?.some((error) => error.level === "error");\n if (hasErrorInErrors) return ErrorLevel.ERROR;\n const hasWarning = span.errors?.some((error) => error.level === "warning");\n if (hasWarning) return ErrorLevel.WARNING;\n return span.status_code || ErrorLevel.UNSET;\n };\n\n // src/utils/spans-filters.ts\n var EMPTY_FILTERS = {\n consumerService: [],\n producerService: [],\n status: []\n };\n var EXTERNAL_PRODUCER_VALUE = "__external__";\n function isFiltersEmpty(filters) {\n return filters.consumerService.length === 0 && filters.producerService.length === 0 && filters.status.length === 0;\n }\n var collapseStatusValue = (status) => {\n if (status === "iam_explicit_deny" || status === "iam_implicit_deny") return "iam_deny";\n if (status === "iam_explicit_warn" || status === "iam_implicit_warn") return "iam_warn";\n return status;\n };\n function applyFilters(spans, filters) {\n if (isFiltersEmpty(filters)) return spans;\n return spans.filter((span) => {\n if (filters.consumerService.length > 0 && !filters.consumerService.includes(span.service_name)) {\n return false;\n }\n if (filters.producerService.length > 0) {\n const includesExternal = filters.producerService.includes(EXTERNAL_PRODUCER_VALUE);\n const namedServices = filters.producerService.filter((value) => value !== EXTERNAL_PRODUCER_VALUE);\n const matchesExternal = includesExternal && !span.parent_service_name;\n const matchesNamed = namedServices.length > 0 && !!span.parent_service_name && namedServices.includes(span.parent_service_name);\n if (!matchesExternal && !matchesNamed) return false;\n }\n if (filters.status.length > 0) {\n if (!span.operation_status) return false;\n if (!filters.status.includes(collapseStatusValue(span.operation_status))) return false;\n }\n return true;\n });\n }\n\n // src/workers/spans-reducer.ts\n var compareByStartTime = (a, b) => a.start_time_unix_nano < b.start_time_unix_nano ? -1 : 1;\n var insertSorted = (array, item, compareFunction, hint) => {\n let left;\n let right;\n if (hint === "back") {\n left = array.length;\n right = array.length;\n let step = 1;\n while (left > 0 && compareFunction(array[left - 1], item) > 0) {\n right = left;\n left = Math.max(0, left - step);\n step *= 2;\n }\n } else {\n left = 0;\n right = 0;\n let step = 1;\n while (right < array.length && compareFunction(array[right], item) <= 0) {\n left = right + 1;\n right = Math.min(array.length, right + step);\n step *= 2;\n }\n }\n while (left < right) {\n const mid = left + right >>> 1;\n if (compareFunction(array[mid], item) <= 0) {\n left = mid + 1;\n } else {\n right = mid;\n }\n }\n array.splice(left, 0, item);\n };\n var createSpansReducer = () => {\n let corpus = [];\n let filters = EMPTY_FILTERS;\n const computeResult = () => {\n const filtered = applyFilters(corpus, filters);\n let errorCount = 0;\n let warningCount = 0;\n const orderedFilteredIds = [];\n for (const entry of filtered) {\n orderedFilteredIds.push(entry.span_id);\n if (entry.errorLevel === ErrorLevel.ERROR || entry.errorLevel === ErrorLevel.IAM_PERMISSION) {\n errorCount++;\n } else if (entry.errorLevel === ErrorLevel.WARNING) {\n warningCount++;\n }\n }\n const producers = /* @__PURE__ */ new Set();\n const consumers = /* @__PURE__ */ new Set();\n const statuses = /* @__PURE__ */ new Set();\n let hasExternalProducer = false;\n for (const entry of corpus) {\n if (entry.parent_service_name) producers.add(entry.parent_service_name);\n else hasExternalProducer = true;\n consumers.add(entry.service_name);\n if (entry.operation_status) statuses.add(collapseStatusValue(entry.operation_status));\n }\n return {\n consumerValues: [...consumers].toSorted(),\n errorCount,\n hasExternalProducer,\n orderedFilteredIds,\n producerValues: [...producers].toSorted(),\n statusValues: [...statuses].toSorted(),\n warningCount\n };\n };\n return {\n addPage: (direction, projections) => {\n const hint = direction === "forward" ? "back" : "front";\n const sorted = projections.toSorted(compareByStartTime);\n for (const projection of sorted) {\n insertSorted(corpus, { ...projection, errorLevel: calculateHighestErrorLevel(projection) }, compareByStartTime, hint);\n }\n return computeResult();\n },\n clear: () => {\n corpus = [];\n filters = EMPTY_FILTERS;\n return computeResult();\n },\n setFilters: (next) => {\n filters = next;\n return computeResult();\n }\n };\n };\n\n // src/workers/spans-worker.worker.ts\n var context = globalThis;\n var reducer = createSpansReducer();\n context.addEventListener("message", (event) => {\n const request = event.data;\n const result = request.op === "addPage" ? reducer.addPage(request.direction, request.projections) : request.op === "setFilters" ? reducer.setFilters(request.filters) : reducer.clear();\n context.postMessage({ result, seq: request.seq });\n });\n})();\n';
16988
+ function createInlineWorker() {
16989
+ const url = URL.createObjectURL(new Blob([source], { type: "text/javascript" }));
16990
+ try {
16991
+ return new Worker(url);
16992
+ } finally {
16993
+ URL.revokeObjectURL(url);
16994
+ }
16995
+ }
16996
+
16997
+ // src/hooks/use-spans-compute.ts
16998
+ var EMPTY_RESULT = {
16999
+ consumerValues: [],
17000
+ errorCount: 0,
17001
+ hasExternalProducer: false,
17002
+ orderedFilteredIds: [],
17003
+ producerValues: [],
17004
+ statusValues: [],
17005
+ warningCount: 0
17006
+ };
17007
+ var useSpansCompute = () => {
17008
+ const [result, setResult] = useState10(EMPTY_RESULT);
17009
+ const [workerError, setWorkerError] = useState10();
17010
+ const [retryCount, setRetryCount] = useState10(0);
17011
+ const workerRef = useRef8();
17012
+ const seqRef = useRef8(0);
17013
+ const lastAppliedRef = useRef8(0);
17014
+ useEffect14(() => {
17015
+ try {
17016
+ const worker = createInlineWorker();
17017
+ worker.addEventListener("message", (event) => {
17018
+ const { result: nextResult, seq } = event.data;
17019
+ if (seq < lastAppliedRef.current) return;
17020
+ lastAppliedRef.current = seq;
17021
+ setResult(nextResult);
17022
+ });
17023
+ worker.addEventListener("error", (event) => {
17024
+ setWorkerError(new Error(event.message || "Spans filter worker crashed."));
17025
+ });
17026
+ workerRef.current = worker;
17027
+ return () => {
17028
+ worker.terminate();
17029
+ workerRef.current = void 0;
17030
+ };
17031
+ } catch (error) {
17032
+ setWorkerError(error instanceof Error ? error : new Error("Failed to start the spans filter worker."));
17033
+ return;
17034
+ }
17035
+ }, [retryCount]);
17036
+ const retryWorker = useCallback5(() => {
17037
+ setWorkerError(void 0);
17038
+ setRetryCount((count2) => count2 + 1);
17039
+ }, []);
17040
+ const addPage = useCallback5((direction, projections) => {
17041
+ workerRef.current?.postMessage({ direction, op: "addPage", projections, seq: ++seqRef.current });
17042
+ }, []);
17043
+ const setFilters = useCallback5((filters) => {
17044
+ workerRef.current?.postMessage({ filters, op: "setFilters", seq: ++seqRef.current });
17045
+ }, []);
17046
+ const clear = useCallback5(() => {
17047
+ workerRef.current?.postMessage({ op: "clear", seq: ++seqRef.current });
17048
+ }, []);
17049
+ return { addPage, clear, result, retryWorker, setFilters, workerError };
17050
+ };
17051
+
16951
17052
  // src/hooks/use-spans-ws.tsx
16952
- import { useCallback as useCallback6, useEffect as useEffect15, useRef as useRef9, useState as useState10 } from "react";
17053
+ import { useCallback as useCallback7, useEffect as useEffect16, useRef as useRef10, useState as useState11 } from "react";
16953
17054
 
16954
17055
  // src/config.ts
16955
17056
  var APPINSPECTOR_API_PREFIX = "/_localstack/appinspector";
@@ -16979,7 +17080,7 @@ var LOCALSTACK_INFO_PATH = "/_localstack/info";
16979
17080
 
16980
17081
  // src/context.tsx
16981
17082
  import { createContext as createContext9, useContext as useContext15 } from "react";
16982
- import { useCallback as useCallback5, useMemo as useMemo5 } from "react";
17083
+ import { useCallback as useCallback6, useMemo as useMemo5 } from "react";
16983
17084
 
16984
17085
  // src/api/client.ts
16985
17086
  var import_semver2 = __toESM(require_semver2(), 1);
@@ -17248,7 +17349,7 @@ var createApiClient = ({ localstackEndpoint }) => {
17248
17349
  };
17249
17350
 
17250
17351
  // src/hooks/use-appinspector-open-analytics.ts
17251
- import { useEffect as useEffect14, useRef as useRef8 } from "react";
17352
+ import { useEffect as useEffect15, useRef as useRef9 } from "react";
17252
17353
 
17253
17354
  // node_modules/.pnpm/ua-parser-js@2.0.9/node_modules/ua-parser-js/src/main/ua-parser.mjs
17254
17355
  var LIBVERSION = "2.0.9";
@@ -19130,8 +19231,8 @@ var useAppInspectorOpenAnalytics = () => {
19130
19231
  const api = useAppInspectorApi();
19131
19232
  const { deploymentContainer } = useAppInspector();
19132
19233
  const { status, statusError } = useAppInspectorStatus();
19133
- const firedRef = useRef8(false);
19134
- useEffect14(() => {
19234
+ const firedRef = useRef9(false);
19235
+ useEffect15(() => {
19135
19236
  if (firedRef.current) {
19136
19237
  return;
19137
19238
  }
@@ -19151,7 +19252,7 @@ var useAppInspectorOpenAnalytics = () => {
19151
19252
  };
19152
19253
 
19153
19254
  // src/context.tsx
19154
- import { Fragment as Fragment7, jsx as jsx131 } from "react/jsx-runtime";
19255
+ import { Fragment as Fragment7, jsx as jsx132 } from "react/jsx-runtime";
19155
19256
  var AppInspectorContext = createContext9(void 0);
19156
19257
  var useAppInspector = () => {
19157
19258
  const context = useContext15(AppInspectorContext);
@@ -19162,14 +19263,14 @@ var useAppInspector = () => {
19162
19263
  };
19163
19264
  var AppInspectorAnalyticsBoundary = ({ children }) => {
19164
19265
  useAppInspectorOpenAnalytics();
19165
- return /* @__PURE__ */ jsx131(Fragment7, { children });
19266
+ return /* @__PURE__ */ jsx132(Fragment7, { children });
19166
19267
  };
19167
19268
  var AppInspectorContextProvider = (props) => {
19168
19269
  const api = useMemo5(
19169
19270
  () => createApiClient({ localstackEndpoint: props.localstackEndpoint }),
19170
19271
  [props.localstackEndpoint]
19171
19272
  );
19172
- const resolveLink = useCallback5(
19273
+ const resolveLink = useCallback6(
19173
19274
  (options) => {
19174
19275
  if (options.to === "settings") {
19175
19276
  return `${props.routePrefix}/settings`;
@@ -19195,7 +19296,7 @@ var AppInspectorContextProvider = (props) => {
19195
19296
  }),
19196
19297
  [deploymentContainer, props.headerHeight, props.linkComponent, props.localstackEndpoint, resolveLink]
19197
19298
  );
19198
- return /* @__PURE__ */ jsx131(ApiProvider, { api, children: /* @__PURE__ */ jsx131(StatusProvider, { children: /* @__PURE__ */ jsx131(AppInspectorContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx131(AppInspectorAnalyticsBoundary, { children: props.children }) }) }) });
19299
+ return /* @__PURE__ */ jsx132(ApiProvider, { api, children: /* @__PURE__ */ jsx132(StatusProvider, { children: /* @__PURE__ */ jsx132(AppInspectorContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx132(AppInspectorAnalyticsBoundary, { children: props.children }) }) }) });
19199
19300
  };
19200
19301
 
19201
19302
  // src/hooks/use-spans-ws.tsx
@@ -19230,22 +19331,22 @@ var parseSpansWebSocketMessage = (raw) => {
19230
19331
  };
19231
19332
  function useSpansWebSocket(options) {
19232
19333
  const { enabled, onClose, onMessage, onOpen } = options;
19233
- const onMessageRef = useRef9(onMessage);
19234
- const onOpenRef = useRef9(onOpen);
19235
- const onCloseRef = useRef9(onClose);
19236
- useEffect15(() => {
19334
+ const onMessageRef = useRef10(onMessage);
19335
+ const onOpenRef = useRef10(onOpen);
19336
+ const onCloseRef = useRef10(onClose);
19337
+ useEffect16(() => {
19237
19338
  onMessageRef.current = onMessage;
19238
19339
  }, [onMessage]);
19239
- useEffect15(() => {
19340
+ useEffect16(() => {
19240
19341
  onOpenRef.current = onOpen;
19241
19342
  }, [onOpen]);
19242
- useEffect15(() => {
19343
+ useEffect16(() => {
19243
19344
  onCloseRef.current = onClose;
19244
19345
  }, [onClose]);
19245
- const [connected, setConnected] = useState10(false);
19246
- const wsRef = useRef9(void 0);
19346
+ const [connected, setConnected] = useState11(false);
19347
+ const wsRef = useRef10(void 0);
19247
19348
  const { localstackEndpoint } = useAppInspector();
19248
- const connect = useCallback6(() => {
19349
+ const connect = useCallback7(() => {
19249
19350
  if (wsRef.current !== void 0) return;
19250
19351
  const url = new URL(getAppInspectorApiUrl(localstackEndpoint, API_ENDPOINTS.WEBSOCKET_SPANS));
19251
19352
  url.protocol = globalThis.location.protocol === "https:" ? "wss" : "ws";
@@ -19286,7 +19387,7 @@ function useSpansWebSocket(options) {
19286
19387
  }
19287
19388
  });
19288
19389
  }, [localstackEndpoint]);
19289
- useEffect15(() => {
19390
+ useEffect16(() => {
19290
19391
  if (!enabled) {
19291
19392
  if (wsRef.current !== void 0) {
19292
19393
  wsRef.current.close();
@@ -19315,45 +19416,57 @@ var PAGE_SIZE = 100;
19315
19416
  var useSpans = () => {
19316
19417
  const api = useAppInspectorApi();
19317
19418
  const { onWsClose, onWsOpen, status, wsEnabled } = useAppInspectorStatus();
19318
- const [spans, setSpans] = useState11();
19319
- const [fetchError, setFetchError] = useState11();
19320
- const [fetchingForward, setFetchingForward] = useState11(false);
19321
- const [fetchingBackward, setFetchingBackward] = useState11(false);
19322
- const [search, setSearch] = useState11("");
19323
- const searchRef = useRef10("");
19324
- const [searching, setSearching] = useState11(false);
19325
- const searchSeqRef = useRef10(0);
19326
- const paginationBufferRef = useRef10();
19327
- const [totalCount, setTotalCount] = useState11();
19328
- const [licenseLimit, setLicenseLimit] = useState11();
19329
- const [systemLimit, setSystemLimit] = useState11();
19330
- const [errorCount, setErrorCount] = useState11();
19331
- const [warningCount, setWarningCount] = useState11();
19332
- const [hasMoreBackward, setHasMoreBackward] = useState11();
19333
- const [hasMoreForward, setHasMoreForward] = useState11();
19334
- const fetchForward = useCallback7(() => {
19419
+ const { addPage, clear: clearCompute, result: computeResult, retryWorker, setFilters: setComputeFilters, workerError } = useSpansCompute();
19420
+ const spanMapRef = useRef11(/* @__PURE__ */ new Map());
19421
+ const [filters, setFiltersState] = useState12(EMPTY_FILTERS);
19422
+ const setFilters = useCallback8((next) => {
19423
+ setFiltersState(next);
19424
+ setComputeFilters(next);
19425
+ }, [setComputeFilters]);
19426
+ const [fetchError, setFetchError] = useState12();
19427
+ const [fetchingForward, setFetchingForward] = useState12(false);
19428
+ const [fetchingBackward, setFetchingBackward] = useState12(false);
19429
+ const [search, setSearch] = useState12("");
19430
+ const searchRef = useRef11("");
19431
+ const [searching, setSearching] = useState12(false);
19432
+ const searchSeqRef = useRef11(0);
19433
+ const paginationBufferRef = useRef11();
19434
+ const [totalCount, setTotalCount] = useState12();
19435
+ const [licenseLimit, setLicenseLimit] = useState12();
19436
+ const [systemLimit, setSystemLimit] = useState12();
19437
+ const [errorCount, setErrorCount] = useState12();
19438
+ const [warningCount, setWarningCount] = useState12();
19439
+ const [hasMoreBackward, setHasMoreBackward] = useState12();
19440
+ const [hasMoreForward, setHasMoreForward] = useState12();
19441
+ const [spansLoaded, setSpansLoaded] = useState12(false);
19442
+ const fetchForward = useCallback8(() => {
19335
19443
  void paginationBufferRef.current?.fetchForward();
19336
19444
  }, []);
19337
- const fetchBackward = useCallback7(() => {
19445
+ const fetchBackward = useCallback8(() => {
19338
19446
  void paginationBufferRef.current?.fetchBackward();
19339
19447
  }, []);
19340
- const [epoch, setEpoch] = useState11();
19341
- const onEpochSeen = useCallback7((observedEpoch) => {
19448
+ const resetCorpus = useCallback8(() => {
19449
+ spanMapRef.current.clear();
19450
+ clearCompute();
19451
+ }, [clearCompute]);
19452
+ const [epoch, setEpoch] = useState12();
19453
+ const onEpochSeen = useCallback8((observedEpoch) => {
19342
19454
  if (observedEpoch === null || observedEpoch === void 0) {
19343
19455
  return;
19344
19456
  }
19345
19457
  setEpoch(observedEpoch);
19346
19458
  }, []);
19347
- const clearCache = useCallback7(() => {
19459
+ const clearCache = useCallback8(() => {
19348
19460
  paginationBufferRef.current?.clear();
19461
+ resetCorpus();
19349
19462
  setTotalCount(void 0);
19350
19463
  setErrorCount(void 0);
19351
19464
  setWarningCount(void 0);
19352
19465
  void paginationBufferRef.current?.fetchForward();
19353
- }, []);
19354
- const hasFetchedWithoutEpochRef = useRef10(false);
19355
- const previousEpochRef = useRef10();
19356
- useEffect16(() => {
19466
+ }, [resetCorpus]);
19467
+ const hasFetchedWithoutEpochRef = useRef11(false);
19468
+ const previousEpochRef = useRef11();
19469
+ useEffect17(() => {
19357
19470
  if (epoch === void 0) {
19358
19471
  return;
19359
19472
  }
@@ -19364,7 +19477,7 @@ var useSpans = () => {
19364
19477
  }
19365
19478
  previousEpochRef.current = epoch;
19366
19479
  }, [epoch, clearCache]);
19367
- const applySearch = useCallback7((term) => {
19480
+ const applySearch = useCallback8((term) => {
19368
19481
  const normalized = term.trim();
19369
19482
  if (normalized === searchRef.current) {
19370
19483
  return;
@@ -19374,13 +19487,14 @@ var useSpans = () => {
19374
19487
  const seq = ++searchSeqRef.current;
19375
19488
  setSearching(true);
19376
19489
  paginationBufferRef.current?.clear();
19490
+ resetCorpus();
19377
19491
  void paginationBufferRef.current?.fetchForward().finally(() => {
19378
19492
  if (searchSeqRef.current === seq) {
19379
19493
  setSearching(false);
19380
19494
  }
19381
19495
  });
19382
- }, []);
19383
- useEffect16(() => {
19496
+ }, [resetCorpus]);
19497
+ useEffect17(() => {
19384
19498
  const buffer = createPaginationBuffer({
19385
19499
  async fetchPage(token, signal) {
19386
19500
  const requestPage = async (paginationToken) => {
@@ -19415,31 +19529,34 @@ var useSpans = () => {
19415
19529
  throw error;
19416
19530
  }
19417
19531
  },
19418
- onDataChange: ({ hasMoreBackward: hasMoreBackward2, hasMoreForward: hasMoreForward2, items }) => {
19532
+ onDataChange: ({ hasMoreBackward: hasMoreBackward2, hasMoreForward: hasMoreForward2 }) => {
19419
19533
  setFetchError(void 0);
19420
- setSpans(items);
19421
19534
  setHasMoreBackward(hasMoreBackward2);
19422
19535
  setHasMoreForward(hasMoreForward2);
19536
+ setSpansLoaded(true);
19423
19537
  },
19424
19538
  onError: (error) => {
19425
19539
  setFetchError(error);
19426
19540
  },
19541
+ // Each fetched page streams into the corpus: full spans into the Map (for render
19542
+ // lookup) and lean projections into the compute backend (for merge/filter/count).
19543
+ // Ordering is owned by the compute backend, so no main-thread sortComparator is needed.
19544
+ onPageFetched: (direction, items) => {
19545
+ for (const span of items) {
19546
+ spanMapRef.current.set(span.span_id, span);
19547
+ }
19548
+ addPage(direction, items.map((span) => toSpanFilterProjection(span)));
19549
+ },
19427
19550
  onStatusChange(status2) {
19428
19551
  setFetchingBackward(status2.fetchingBackward);
19429
19552
  setFetchingForward(status2.fetchingForward);
19430
- },
19431
- // The spans endpoint is sorted by span ingestion time, which might differ from
19432
- // the span timestamp. In order to accomodate for this, we will sort the spans
19433
- // in the frontend with the following sort comparator.
19434
- sortComparator(a3, b3) {
19435
- return a3.start_time_unix_nano < b3.start_time_unix_nano ? -1 : 1;
19436
19553
  }
19437
19554
  });
19438
19555
  paginationBufferRef.current = buffer;
19439
19556
  void buffer.fetchForward();
19440
- }, [api, onEpochSeen]);
19441
- const [clearingSpans, setClearingSpans] = useState11(false);
19442
- const clearSpans = useCallback7(async () => {
19557
+ }, [api, addPage, onEpochSeen, resetCorpus]);
19558
+ const [clearingSpans, setClearingSpans] = useState12(false);
19559
+ const clearSpans = useCallback8(async () => {
19443
19560
  if (clearingSpans) {
19444
19561
  return;
19445
19562
  }
@@ -19451,6 +19568,7 @@ var useSpans = () => {
19451
19568
  setSearch("");
19452
19569
  setSearching(false);
19453
19570
  paginationBufferRef.current?.clear();
19571
+ resetCorpus();
19454
19572
  await paginationBufferRef.current?.fetchForward();
19455
19573
  } catch (error) {
19456
19574
  console.error("Failed to delete spans:", error);
@@ -19458,18 +19576,18 @@ var useSpans = () => {
19458
19576
  } finally {
19459
19577
  setClearingSpans(false);
19460
19578
  }
19461
- }, [clearingSpans, api]);
19462
- useEffect16(() => {
19579
+ }, [clearingSpans, api, resetCorpus]);
19580
+ useEffect17(() => {
19463
19581
  if (hasMoreForward === true && !fetchingForward) {
19464
19582
  void paginationBufferRef.current?.fetchForward();
19465
19583
  }
19466
19584
  }, [hasMoreForward, fetchingForward]);
19467
- useEffect16(() => {
19585
+ useEffect17(() => {
19468
19586
  if (hasMoreBackward === true && !fetchingBackward && !fetchingForward) {
19469
19587
  void paginationBufferRef.current?.fetchBackward();
19470
19588
  }
19471
19589
  }, [hasMoreBackward, fetchingBackward, fetchingForward]);
19472
- const [previousStatusEpoch, setPreviousStatusEpoch] = useState11();
19590
+ const [previousStatusEpoch, setPreviousStatusEpoch] = useState12();
19473
19591
  if (status !== void 0 && status.epoch !== previousStatusEpoch) {
19474
19592
  setPreviousStatusEpoch(status.epoch);
19475
19593
  onEpochSeen(status.epoch);
@@ -19494,43 +19612,58 @@ var useSpans = () => {
19494
19612
  fetchForward();
19495
19613
  }
19496
19614
  });
19497
- const clearFetchError = useCallback7(() => {
19615
+ const clearFetchError = useCallback8(() => {
19498
19616
  setFetchError(void 0);
19499
19617
  }, []);
19618
+ const filteredSpans = useMemo6(() => {
19619
+ if (!spansLoaded) return;
19620
+ const spanMap = spanMapRef.current;
19621
+ return computeResult.orderedFilteredIds.map((id2) => spanMap.get(id2)).filter((span) => span !== void 0);
19622
+ }, [computeResult, spansLoaded]);
19500
19623
  return {
19501
19624
  clearFetchError,
19502
19625
  clearingSpans,
19503
19626
  clearSpans,
19627
+ consumerValues: computeResult.consumerValues,
19504
19628
  errorCount,
19505
19629
  fetchBackward,
19506
19630
  fetchError,
19507
19631
  fetchForward,
19508
19632
  fetchingBackward,
19509
19633
  fetchingForward,
19634
+ filteredErrorCount: computeResult.errorCount,
19635
+ filteredSpans,
19636
+ filteredWarningCount: computeResult.warningCount,
19637
+ filters,
19638
+ hasExternalProducer: computeResult.hasExternalProducer,
19510
19639
  hasMoreBackward,
19511
19640
  hasMoreForward,
19512
19641
  licenseLimit,
19642
+ producerValues: computeResult.producerValues,
19643
+ retryWorker,
19513
19644
  search,
19514
19645
  searching,
19646
+ setFilters,
19515
19647
  setSearch: applySearch,
19516
- spans,
19648
+ statusValues: computeResult.statusValues,
19517
19649
  systemLimit,
19518
19650
  totalCount,
19519
- warningCount
19651
+ warningCount,
19652
+ workerError
19520
19653
  };
19521
19654
  };
19522
19655
 
19523
19656
  // src/pages/trace-graph-page.tsx
19524
19657
  import { ArrowBack } from "@mui/icons-material";
19525
- import { Box as Box19, Button as Button7, Drawer, Paper as Paper2 } from "@mui/material";
19658
+ import { Box as Box20, Button as Button8, Drawer, Paper as Paper2 } from "@mui/material";
19526
19659
  import { styled } from "@mui/material/styles";
19527
19660
  import { ReactFlowProvider } from "@xyflow/react";
19528
- import { useCallback as useCallback11, useEffect as useEffect21, useRef as useRef16, useState as useState20 } from "react";
19661
+ import { useCallback as useCallback12, useEffect as useEffect22, useRef as useRef17, useState as useState21 } from "react";
19529
19662
 
19530
19663
  // src/components/event-details/event-details.tsx
19531
19664
  import { Close as Close3 } from "@mui/icons-material";
19532
- import { Alert as Alert4, Box as Box16, Chip as Chip3, Divider as Divider4, FormControlLabel, IconButton as IconButton5, Stack as Stack4, Switch, Typography as Typography12 } from "@mui/material";
19533
- import { useMemo as useMemo10, useState as useState17 } from "react";
19665
+ import { Alert as Alert5, Box as Box17, Chip as Chip3, Divider as Divider4, FormControlLabel, IconButton as IconButton5, Stack as Stack4, Switch, Typography as Typography13 } from "@mui/material";
19666
+ import { useMemo as useMemo11, useState as useState18 } from "react";
19534
19667
 
19535
19668
  // src/utils/event-utils.ts
19536
19669
  var iamEventParser = (eventName, attributes) => {
@@ -19643,11 +19776,11 @@ var getEventGroupsByType = (events) => {
19643
19776
  // src/components/event-details/copy-button.tsx
19644
19777
  import { Check, ContentCopy } from "@mui/icons-material";
19645
19778
  import { IconButton as IconButton3, Tooltip as Tooltip5 } from "@mui/material";
19646
- import { useCallback as useCallback8, useState as useState12 } from "react";
19647
- import { jsx as jsx132 } from "react/jsx-runtime";
19779
+ import { useCallback as useCallback9, useState as useState13 } from "react";
19780
+ import { jsx as jsx133 } from "react/jsx-runtime";
19648
19781
  var CopyButton = ({ value }) => {
19649
- const [copied, setCopied] = useState12(false);
19650
- const handleCopy = useCallback8(() => {
19782
+ const [copied, setCopied] = useState13(false);
19783
+ const handleCopy = useCallback9(() => {
19651
19784
  const text2 = typeof value === "string" ? value : JSON.stringify(value, void 0, 2);
19652
19785
  void navigator.clipboard.writeText(text2).then(() => {
19653
19786
  setCopied(true);
@@ -19656,83 +19789,83 @@ var CopyButton = ({ value }) => {
19656
19789
  }, 1500);
19657
19790
  });
19658
19791
  }, [value]);
19659
- return /* @__PURE__ */ jsx132(Tooltip5, { title: copied ? "Copied!" : "Copy", children: /* @__PURE__ */ jsx132(
19792
+ return /* @__PURE__ */ jsx133(Tooltip5, { title: copied ? "Copied!" : "Copy", children: /* @__PURE__ */ jsx133(
19660
19793
  IconButton3,
19661
19794
  {
19662
19795
  className: "copy-btn",
19663
19796
  onClick: handleCopy,
19664
19797
  size: "small",
19665
19798
  sx: { ml: 0.5, opacity: copied ? 1 : 0, p: 0.25, transition: "opacity 0.15s" },
19666
- children: copied ? /* @__PURE__ */ jsx132(Check, { sx: { fontSize: 14 } }) : /* @__PURE__ */ jsx132(ContentCopy, { sx: { fontSize: 14 } })
19799
+ children: copied ? /* @__PURE__ */ jsx133(Check, { sx: { fontSize: 14 } }) : /* @__PURE__ */ jsx133(ContentCopy, { sx: { fontSize: 14 } })
19667
19800
  }
19668
19801
  ) });
19669
19802
  };
19670
19803
 
19671
19804
  // src/components/event-details/event-detail.tsx
19672
19805
  import { KeyboardArrowDown, KeyboardArrowRight } from "@mui/icons-material";
19673
- import { Box as Box13, IconButton as IconButton4, Typography as Typography9 } from "@mui/material";
19674
- import { useEffect as useEffect18, useMemo as useMemo8, useRef as useRef12, useState as useState14 } from "react";
19806
+ import { Box as Box14, IconButton as IconButton4, Typography as Typography10 } from "@mui/material";
19807
+ import { useEffect as useEffect19, useMemo as useMemo9, useRef as useRef13, useState as useState15 } from "react";
19675
19808
 
19676
19809
  // src/components/status-icon.tsx
19677
19810
  import { Cancel as Cancel3, CheckCircle, Error as Error3, Info, RemoveCircle } from "@mui/icons-material";
19678
- import { Box as Box8 } from "@mui/material";
19679
- import { jsx as jsx133 } from "react/jsx-runtime";
19811
+ import { Box as Box9 } from "@mui/material";
19812
+ import { jsx as jsx134 } from "react/jsx-runtime";
19680
19813
  var StatusIcon2 = ({ errorLevel }) => {
19681
19814
  switch (errorLevel) {
19682
19815
  case EventLevel.LevelError: {
19683
- return /* @__PURE__ */ jsx133(Cancel3, { sx: { color: "red" } });
19816
+ return /* @__PURE__ */ jsx134(Cancel3, { sx: { color: "red" } });
19684
19817
  }
19685
19818
  case EventLevel.LevelInfo: {
19686
- return /* @__PURE__ */ jsx133(Info, { sx: { color: "gray" } });
19819
+ return /* @__PURE__ */ jsx134(Info, { sx: { color: "gray" } });
19687
19820
  }
19688
19821
  case EventLevel.LevelPermission: {
19689
- return /* @__PURE__ */ jsx133(RemoveCircle, { sx: { color: "blue" } });
19822
+ return /* @__PURE__ */ jsx134(RemoveCircle, { sx: { color: "blue" } });
19690
19823
  }
19691
19824
  case EventLevel.LevelWarning: {
19692
- return /* @__PURE__ */ jsx133(Error3, { sx: { color: "orange" } });
19825
+ return /* @__PURE__ */ jsx134(Error3, { sx: { color: "orange" } });
19693
19826
  }
19694
19827
  default: {
19695
- return /* @__PURE__ */ jsx133(CheckCircle, { sx: { color: "lightgray" } });
19828
+ return /* @__PURE__ */ jsx134(CheckCircle, { sx: { color: "lightgray" } });
19696
19829
  }
19697
19830
  }
19698
19831
  };
19699
19832
 
19700
19833
  // src/components/event-details/iam-event-detail.tsx
19701
19834
  import { CheckCircle as CheckCircle2, Error as ErrorIcon, Warning } from "@mui/icons-material";
19702
- import { Box as Box9, Chip, Typography as Typography7 } from "@mui/material";
19703
- import { jsx as jsx134, jsxs as jsxs125 } from "react/jsx-runtime";
19704
- var DetailRow = ({ content, label }) => /* @__PURE__ */ jsxs125(Box9, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr", mb: 0.5 }, children: [
19705
- /* @__PURE__ */ jsx134(Typography7, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: label }),
19706
- /* @__PURE__ */ jsx134(Box9, { children: typeof content === "string" ? /* @__PURE__ */ jsx134(Typography7, { sx: { color: "text.primary", wordBreak: "break-word" }, variant: "caption", children: content }) : content })
19835
+ import { Box as Box10, Chip, Typography as Typography8 } from "@mui/material";
19836
+ import { jsx as jsx135, jsxs as jsxs126 } from "react/jsx-runtime";
19837
+ var DetailRow = ({ content, label }) => /* @__PURE__ */ jsxs126(Box10, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr", mb: 0.5 }, children: [
19838
+ /* @__PURE__ */ jsx135(Typography8, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: label }),
19839
+ /* @__PURE__ */ jsx135(Box10, { children: typeof content === "string" ? /* @__PURE__ */ jsx135(Typography8, { sx: { color: "text.primary", wordBreak: "break-word" }, variant: "caption", children: content }) : content })
19707
19840
  ] });
19708
19841
  var PermissionIcon = ({ status }) => {
19709
19842
  switch (status) {
19710
19843
  case "explicitly_allowed":
19711
19844
  case "implicitly_allowed": {
19712
- return /* @__PURE__ */ jsx134(CheckCircle2, { sx: { color: "success.main", fontSize: "1rem" } });
19845
+ return /* @__PURE__ */ jsx135(CheckCircle2, { sx: { color: "success.main", fontSize: "1rem" } });
19713
19846
  }
19714
19847
  case "explicitly_denied": {
19715
- return /* @__PURE__ */ jsx134(ErrorIcon, { sx: { color: "error.main", fontSize: "1rem" } });
19848
+ return /* @__PURE__ */ jsx135(ErrorIcon, { sx: { color: "error.main", fontSize: "1rem" } });
19716
19849
  }
19717
19850
  case "implicitly_denied": {
19718
- return /* @__PURE__ */ jsx134(Warning, { sx: { color: "warning.main", fontSize: "1rem" } });
19851
+ return /* @__PURE__ */ jsx135(Warning, { sx: { color: "warning.main", fontSize: "1rem" } });
19719
19852
  }
19720
19853
  }
19721
19854
  };
19722
19855
  var IAMEventDetail = ({ event }) => {
19723
19856
  const payloadString = event.attributes?.payload;
19724
19857
  if (!payloadString) {
19725
- return /* @__PURE__ */ jsx134(Typography7, { color: "text.secondary", variant: "caption", children: "No IAM policy evaluation data available" });
19858
+ return /* @__PURE__ */ jsx135(Typography8, { color: "text.secondary", variant: "caption", children: "No IAM policy evaluation data available" });
19726
19859
  }
19727
19860
  const parsedIAM = parseIAMEvent(payloadString);
19728
19861
  if (!parsedIAM) {
19729
- return /* @__PURE__ */ jsx134(Typography7, { color: "text.secondary", variant: "caption", children: "Failed to parse IAM event data" });
19862
+ return /* @__PURE__ */ jsx135(Typography8, { color: "text.secondary", variant: "caption", children: "Failed to parse IAM event data" });
19730
19863
  }
19731
- return /* @__PURE__ */ jsxs125(Box9, { children: [
19732
- /* @__PURE__ */ jsx134(Box9, { sx: { mb: 1.5 }, children: /* @__PURE__ */ jsx134(
19864
+ return /* @__PURE__ */ jsxs126(Box10, { children: [
19865
+ /* @__PURE__ */ jsx135(Box10, { sx: { mb: 1.5 }, children: /* @__PURE__ */ jsx135(
19733
19866
  Chip,
19734
19867
  {
19735
- icon: /* @__PURE__ */ jsx134(PermissionIcon, { status: parsedIAM.permission }),
19868
+ icon: /* @__PURE__ */ jsx135(PermissionIcon, { status: parsedIAM.permission }),
19736
19869
  label: formatPermissionStatus(parsedIAM.permission),
19737
19870
  size: "small",
19738
19871
  sx: {
@@ -19742,36 +19875,36 @@ var IAMEventDetail = ({ event }) => {
19742
19875
  variant: "outlined"
19743
19876
  }
19744
19877
  ) }),
19745
- /* @__PURE__ */ jsx134(DetailRow, { content: `${parsedIAM.service}:${parsedIAM.operation}`, label: "Operation" }),
19746
- /* @__PURE__ */ jsx134(DetailRow, { content: parsedIAM.principal, label: "Principal" }),
19747
- parsedIAM.details.actions && parsedIAM.details.actions.length > 0 && /* @__PURE__ */ jsx134(
19878
+ /* @__PURE__ */ jsx135(DetailRow, { content: `${parsedIAM.service}:${parsedIAM.operation}`, label: "Operation" }),
19879
+ /* @__PURE__ */ jsx135(DetailRow, { content: parsedIAM.principal, label: "Principal" }),
19880
+ parsedIAM.details.actions && parsedIAM.details.actions.length > 0 && /* @__PURE__ */ jsx135(
19748
19881
  DetailRow,
19749
19882
  {
19750
- content: /* @__PURE__ */ jsx134(Box9, { children: parsedIAM.details.actions.map((action) => /* @__PURE__ */ jsx134(Typography7, { sx: { color: "text.primary", display: "block" }, variant: "caption", children: action }, action)) }),
19883
+ content: /* @__PURE__ */ jsx135(Box10, { children: parsedIAM.details.actions.map((action) => /* @__PURE__ */ jsx135(Typography8, { sx: { color: "text.primary", display: "block" }, variant: "caption", children: action }, action)) }),
19751
19884
  label: "Actions"
19752
19885
  }
19753
19886
  ),
19754
- parsedIAM.details.resources && parsedIAM.details.resources.length > 0 && /* @__PURE__ */ jsx134(
19887
+ parsedIAM.details.resources && parsedIAM.details.resources.length > 0 && /* @__PURE__ */ jsx135(
19755
19888
  DetailRow,
19756
19889
  {
19757
- content: /* @__PURE__ */ jsx134(Box9, { children: parsedIAM.details.resources.map((resource) => /* @__PURE__ */ jsx134(Typography7, { sx: { color: "text.primary", display: "block", wordBreak: "break-all" }, variant: "caption", children: resource }, resource)) }),
19890
+ content: /* @__PURE__ */ jsx135(Box10, { children: parsedIAM.details.resources.map((resource) => /* @__PURE__ */ jsx135(Typography8, { sx: { color: "text.primary", display: "block", wordBreak: "break-all" }, variant: "caption", children: resource }, resource)) }),
19758
19891
  label: "Resources"
19759
19892
  }
19760
19893
  ),
19761
- (parsedIAM.details.explicitAllows !== void 0 || parsedIAM.details.explicitDenies !== void 0 || parsedIAM.details.implicitDenies !== void 0) && /* @__PURE__ */ jsxs125(Box9, { sx: { mt: 1.5 }, children: [
19762
- /* @__PURE__ */ jsx134(Typography7, { color: "text.secondary", sx: { display: "block", fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Policy Evaluation" }),
19763
- /* @__PURE__ */ jsxs125(Box9, { sx: { display: "grid", gap: 1, gridTemplateColumns: "repeat(3, 1fr)" }, children: [
19764
- parsedIAM.details.explicitAllows !== void 0 && /* @__PURE__ */ jsxs125(Box9, { sx: { textAlign: "center" }, children: [
19765
- /* @__PURE__ */ jsx134(Typography7, { color: "success.main", sx: { display: "block", fontWeight: "bold" }, variant: "subtitle2", children: parsedIAM.details.explicitAllows }),
19766
- /* @__PURE__ */ jsx134(Typography7, { color: "text.secondary", variant: "caption", children: "Explicit Allows" })
19894
+ (parsedIAM.details.explicitAllows !== void 0 || parsedIAM.details.explicitDenies !== void 0 || parsedIAM.details.implicitDenies !== void 0) && /* @__PURE__ */ jsxs126(Box10, { sx: { mt: 1.5 }, children: [
19895
+ /* @__PURE__ */ jsx135(Typography8, { color: "text.secondary", sx: { display: "block", fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Policy Evaluation" }),
19896
+ /* @__PURE__ */ jsxs126(Box10, { sx: { display: "grid", gap: 1, gridTemplateColumns: "repeat(3, 1fr)" }, children: [
19897
+ parsedIAM.details.explicitAllows !== void 0 && /* @__PURE__ */ jsxs126(Box10, { sx: { textAlign: "center" }, children: [
19898
+ /* @__PURE__ */ jsx135(Typography8, { color: "success.main", sx: { display: "block", fontWeight: "bold" }, variant: "subtitle2", children: parsedIAM.details.explicitAllows }),
19899
+ /* @__PURE__ */ jsx135(Typography8, { color: "text.secondary", variant: "caption", children: "Explicit Allows" })
19767
19900
  ] }),
19768
- parsedIAM.details.explicitDenies !== void 0 && /* @__PURE__ */ jsxs125(Box9, { sx: { textAlign: "center" }, children: [
19769
- /* @__PURE__ */ jsx134(Typography7, { color: "error.main", sx: { display: "block", fontWeight: "bold" }, variant: "subtitle2", children: parsedIAM.details.explicitDenies }),
19770
- /* @__PURE__ */ jsx134(Typography7, { color: "text.secondary", variant: "caption", children: "Explicit Denies" })
19901
+ parsedIAM.details.explicitDenies !== void 0 && /* @__PURE__ */ jsxs126(Box10, { sx: { textAlign: "center" }, children: [
19902
+ /* @__PURE__ */ jsx135(Typography8, { color: "error.main", sx: { display: "block", fontWeight: "bold" }, variant: "subtitle2", children: parsedIAM.details.explicitDenies }),
19903
+ /* @__PURE__ */ jsx135(Typography8, { color: "text.secondary", variant: "caption", children: "Explicit Denies" })
19771
19904
  ] }),
19772
- parsedIAM.details.implicitDenies !== void 0 && /* @__PURE__ */ jsxs125(Box9, { sx: { textAlign: "center" }, children: [
19773
- /* @__PURE__ */ jsx134(Typography7, { color: "warning.main", sx: { display: "block", fontWeight: "bold" }, variant: "subtitle2", children: parsedIAM.details.implicitDenies }),
19774
- /* @__PURE__ */ jsx134(Typography7, { color: "text.secondary", variant: "caption", children: "Implicit Denies" })
19905
+ parsedIAM.details.implicitDenies !== void 0 && /* @__PURE__ */ jsxs126(Box10, { sx: { textAlign: "center" }, children: [
19906
+ /* @__PURE__ */ jsx135(Typography8, { color: "warning.main", sx: { display: "block", fontWeight: "bold" }, variant: "subtitle2", children: parsedIAM.details.implicitDenies }),
19907
+ /* @__PURE__ */ jsx135(Typography8, { color: "text.secondary", variant: "caption", children: "Implicit Denies" })
19775
19908
  ] })
19776
19909
  ] })
19777
19910
  ] })
@@ -19779,16 +19912,16 @@ var IAMEventDetail = ({ event }) => {
19779
19912
  };
19780
19913
 
19781
19914
  // src/components/event-details/iam-permission-detail.tsx
19782
- import { Box as Box10, Chip as Chip2, Stack as Stack2, Typography as Typography8 } from "@mui/material";
19783
- import { useMemo as useMemo6 } from "react";
19784
- import { jsx as jsx135, jsxs as jsxs126 } from "react/jsx-runtime";
19915
+ import { Box as Box11, Chip as Chip2, Stack as Stack2, Typography as Typography9 } from "@mui/material";
19916
+ import { useMemo as useMemo7 } from "react";
19917
+ import { jsx as jsx136, jsxs as jsxs127 } from "react/jsx-runtime";
19785
19918
  var getChipColor = (isAllowed, spanStatusCode) => {
19786
19919
  if (isAllowed) return "success.main";
19787
19920
  if (spanStatusCode === 2) return "error.main";
19788
19921
  return "warning.main";
19789
19922
  };
19790
19923
  var IAMPermissionItem = ({ event, spanStatusCode }) => {
19791
- const parsedData = useMemo6(() => {
19924
+ const parsedData = useMemo7(() => {
19792
19925
  const payloadString = event.attributes?.payload;
19793
19926
  if (!payloadString) return;
19794
19927
  const parsedIAM2 = parseIAMEvent(payloadString);
@@ -19801,43 +19934,43 @@ var IAMPermissionItem = ({ event, spanStatusCode }) => {
19801
19934
  const { parsedIAM } = parsedData;
19802
19935
  const isAllowed = parsedIAM.permission === "explicitly_allowed" || parsedIAM.permission === "implicitly_allowed";
19803
19936
  const chipColors = { backgroundColor: getChipColor(isAllowed, spanStatusCode), color: "white" };
19804
- return /* @__PURE__ */ jsxs126(Box10, { sx: { mb: 0.5 }, children: [
19805
- /* @__PURE__ */ jsx135(Box10, { sx: { alignItems: "center", display: "flex", gap: 1, mb: 0.5 }, children: /* @__PURE__ */ jsx135(Chip2, { label: formatPermissionStatus(parsedIAM.permission), size: "small", sx: { ...chipColors, fontWeight: 500 } }) }),
19806
- /* @__PURE__ */ jsxs126(Stack2, { spacing: 1, children: [
19807
- /* @__PURE__ */ jsxs126(Box10, { "data-testid": EVENT_DETAILS_IAM_PRINCIPAL_TEST_ID, children: [
19808
- /* @__PURE__ */ jsx135(Typography8, { sx: { display: "block", fontWeight: 600 }, variant: "caption", children: "Principal" }),
19809
- /* @__PURE__ */ jsxs126(Stack2, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
19810
- /* @__PURE__ */ jsx135(Typography8, { sx: { wordBreak: "break-all" }, variant: "body2", children: parsedIAM.principal }),
19811
- /* @__PURE__ */ jsx135(CopyButton, { value: parsedIAM.principal })
19937
+ return /* @__PURE__ */ jsxs127(Box11, { sx: { mb: 0.5 }, children: [
19938
+ /* @__PURE__ */ jsx136(Box11, { sx: { alignItems: "center", display: "flex", gap: 1, mb: 0.5 }, children: /* @__PURE__ */ jsx136(Chip2, { label: formatPermissionStatus(parsedIAM.permission), size: "small", sx: { ...chipColors, fontWeight: 500 } }) }),
19939
+ /* @__PURE__ */ jsxs127(Stack2, { spacing: 1, children: [
19940
+ /* @__PURE__ */ jsxs127(Box11, { "data-testid": EVENT_DETAILS_IAM_PRINCIPAL_TEST_ID, children: [
19941
+ /* @__PURE__ */ jsx136(Typography9, { sx: { display: "block", fontWeight: 600 }, variant: "caption", children: "Principal" }),
19942
+ /* @__PURE__ */ jsxs127(Stack2, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
19943
+ /* @__PURE__ */ jsx136(Typography9, { sx: { wordBreak: "break-all" }, variant: "body2", children: parsedIAM.principal }),
19944
+ /* @__PURE__ */ jsx136(CopyButton, { value: parsedIAM.principal })
19812
19945
  ] })
19813
19946
  ] }),
19814
- parsedIAM.details.actions && parsedIAM.details.actions.length > 0 && /* @__PURE__ */ jsxs126(Box10, { "data-testid": EVENT_DETAILS_IAM_ACTIONS_TEST_ID, children: [
19815
- /* @__PURE__ */ jsx135(Typography8, { sx: { display: "block", fontWeight: 600 }, variant: "caption", children: "Actions" }),
19816
- parsedIAM.details.actions.map((action) => /* @__PURE__ */ jsxs126(Stack2, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
19817
- /* @__PURE__ */ jsx135(Typography8, { sx: { display: "block" }, variant: "body2", children: action }),
19818
- /* @__PURE__ */ jsx135(CopyButton, { value: action })
19947
+ parsedIAM.details.actions && parsedIAM.details.actions.length > 0 && /* @__PURE__ */ jsxs127(Box11, { "data-testid": EVENT_DETAILS_IAM_ACTIONS_TEST_ID, children: [
19948
+ /* @__PURE__ */ jsx136(Typography9, { sx: { display: "block", fontWeight: 600 }, variant: "caption", children: "Actions" }),
19949
+ parsedIAM.details.actions.map((action) => /* @__PURE__ */ jsxs127(Stack2, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
19950
+ /* @__PURE__ */ jsx136(Typography9, { sx: { display: "block" }, variant: "body2", children: action }),
19951
+ /* @__PURE__ */ jsx136(CopyButton, { value: action })
19819
19952
  ] }, action))
19820
19953
  ] }),
19821
- parsedIAM.details.resources && parsedIAM.details.resources.length > 0 && /* @__PURE__ */ jsxs126(Box10, { "data-testid": EVENT_DETAILS_IAM_RESOURCES_TEST_ID, children: [
19822
- /* @__PURE__ */ jsx135(Typography8, { sx: { display: "block", fontWeight: 600 }, variant: "caption", children: "Resources" }),
19823
- parsedIAM.details.resources.map((resource) => /* @__PURE__ */ jsxs126(Stack2, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
19824
- /* @__PURE__ */ jsx135(Typography8, { sx: { display: "block", wordBreak: "break-all" }, variant: "body2", children: resource }),
19825
- /* @__PURE__ */ jsx135(CopyButton, { value: resource })
19954
+ parsedIAM.details.resources && parsedIAM.details.resources.length > 0 && /* @__PURE__ */ jsxs127(Box11, { "data-testid": EVENT_DETAILS_IAM_RESOURCES_TEST_ID, children: [
19955
+ /* @__PURE__ */ jsx136(Typography9, { sx: { display: "block", fontWeight: 600 }, variant: "caption", children: "Resources" }),
19956
+ parsedIAM.details.resources.map((resource) => /* @__PURE__ */ jsxs127(Stack2, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
19957
+ /* @__PURE__ */ jsx136(Typography9, { sx: { display: "block", wordBreak: "break-all" }, variant: "body2", children: resource }),
19958
+ /* @__PURE__ */ jsx136(CopyButton, { value: resource })
19826
19959
  ] }, resource))
19827
19960
  ] })
19828
19961
  ] })
19829
19962
  ] });
19830
19963
  };
19831
- var IAMPermissionDetail = ({ events, spanStatusCode }) => /* @__PURE__ */ jsx135(Box10, { children: events.map((event) => /* @__PURE__ */ jsx135(IAMPermissionItem, { event, spanStatusCode }, `${event.span_id}-${event.event_id}`)) });
19964
+ var IAMPermissionDetail = ({ events, spanStatusCode }) => /* @__PURE__ */ jsx136(Box11, { children: events.map((event) => /* @__PURE__ */ jsx136(IAMPermissionItem, { event, spanStatusCode }, `${event.span_id}-${event.event_id}`)) });
19832
19965
 
19833
19966
  // src/components/event-details/payload-viewer.tsx
19834
- import { Box as Box12, useTheme as useTheme3 } from "@mui/material";
19967
+ import { Box as Box13, useTheme as useTheme3 } from "@mui/material";
19835
19968
 
19836
19969
  // node_modules/.pnpm/@textea+json-viewer@3.5.0_@emotion+react@11.14.0_@types+react@17.0.91_react@17.0.2__@em_040507e953752247cb848fd3f764690c/node_modules/@textea/json-viewer/dist/index.mjs
19837
19970
  var import_copy_to_clipboard = __toESM(require_copy_to_clipboard(), 1);
19838
- import { jsx as jsx136, jsxs as jsxs127, Fragment as Fragment8 } from "react/jsx-runtime";
19839
- import { Box as Box11, InputBase, NoSsr, SvgIcon, createTheme, ThemeProvider, Paper } from "@mui/material";
19840
- import { createContext as createContext10, useContext as useContext16, useState as useState13, useRef as useRef11, useCallback as useCallback9, useMemo as useMemo7, useEffect as useEffect17, memo as memo9 } from "react";
19971
+ import { jsx as jsx137, jsxs as jsxs128, Fragment as Fragment8 } from "react/jsx-runtime";
19972
+ import { Box as Box12, InputBase, NoSsr, SvgIcon, createTheme, ThemeProvider, Paper } from "@mui/material";
19973
+ import { createContext as createContext10, useContext as useContext16, useState as useState14, useRef as useRef12, useCallback as useCallback10, useMemo as useMemo8, useEffect as useEffect18, memo as memo9 } from "react";
19841
19974
  import { create, useStore, createStore } from "zustand";
19842
19975
  function r(e2) {
19843
19976
  var t, f2, n = "";
@@ -20081,9 +20214,9 @@ async function copyString(value) {
20081
20214
  }
20082
20215
  function useClipboard() {
20083
20216
  let { timeout = 2e3 } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
20084
- const [copied, setCopied] = useState13(false);
20085
- const copyTimeout = useRef11(null);
20086
- const handleCopyResult = useCallback9((value) => {
20217
+ const [copied, setCopied] = useState14(false);
20218
+ const copyTimeout = useRef12(null);
20219
+ const handleCopyResult = useCallback10((value) => {
20087
20220
  const current = copyTimeout.current;
20088
20221
  if (current) {
20089
20222
  window.clearTimeout(current);
@@ -20094,7 +20227,7 @@ function useClipboard() {
20094
20227
  timeout
20095
20228
  ]);
20096
20229
  const onCopy = useJsonViewerStore((store) => store.onCopy);
20097
- const copy = useCallback9(async (path, value) => {
20230
+ const copy = useCallback10(async (path, value) => {
20098
20231
  if (typeof onCopy === "function") {
20099
20232
  try {
20100
20233
  await onCopy(path, value, copyString);
@@ -20115,7 +20248,7 @@ function useClipboard() {
20115
20248
  handleCopyResult,
20116
20249
  onCopy
20117
20250
  ]);
20118
- const reset = useCallback9(() => {
20251
+ const reset = useCallback10(() => {
20119
20252
  setCopied(false);
20120
20253
  if (copyTimeout.current) {
20121
20254
  clearTimeout(copyTimeout.current);
@@ -20129,7 +20262,7 @@ function useClipboard() {
20129
20262
  }
20130
20263
  function useIsCycleReference(path, value) {
20131
20264
  const rootValue = useJsonViewerStore((store) => store.value);
20132
- return useMemo7(() => isCycleReference(rootValue, path, value), [
20265
+ return useMemo8(() => isCycleReference(rootValue, path, value), [
20133
20266
  path,
20134
20267
  value,
20135
20268
  rootValue
@@ -20142,7 +20275,7 @@ function useInspect(path, value, nestedIndex) {
20142
20275
  const setInspectCache = useJsonViewerStore((store) => store.setInspectCache);
20143
20276
  const defaultInspectDepth = useJsonViewerStore((store) => store.defaultInspectDepth);
20144
20277
  const defaultInspectControl = useJsonViewerStore((store) => store.defaultInspectControl);
20145
- useEffect17(() => {
20278
+ useEffect18(() => {
20146
20279
  const inspect2 = getInspectCache(path, nestedIndex);
20147
20280
  if (inspect2 !== void 0) {
20148
20281
  return;
@@ -20164,7 +20297,7 @@ function useInspect(path, value, nestedIndex) {
20164
20297
  value,
20165
20298
  setInspectCache
20166
20299
  ]);
20167
- const [inspect, set] = useState13(() => {
20300
+ const [inspect, set] = useState14(() => {
20168
20301
  const shouldInspect = getInspectCache(path, nestedIndex);
20169
20302
  if (shouldInspect !== void 0) {
20170
20303
  return shouldInspect;
@@ -20174,7 +20307,7 @@ function useInspect(path, value, nestedIndex) {
20174
20307
  }
20175
20308
  return isTrap ? false : typeof defaultInspectControl === "function" ? defaultInspectControl(path, value) : depth < defaultInspectDepth;
20176
20309
  });
20177
- const setInspect = useCallback9((apply) => {
20310
+ const setInspect = useCallback10((apply) => {
20178
20311
  set((oldState) => {
20179
20312
  const newState = typeof apply === "boolean" ? apply : apply(oldState);
20180
20313
  setInspectCache(path, newState, nestedIndex);
@@ -20190,7 +20323,7 @@ function useInspect(path, value, nestedIndex) {
20190
20323
  setInspect
20191
20324
  ];
20192
20325
  }
20193
- var DataBox = (props) => /* @__PURE__ */ jsx136(Box11, {
20326
+ var DataBox = (props) => /* @__PURE__ */ jsx137(Box12, {
20194
20327
  component: "div",
20195
20328
  ...props,
20196
20329
  sx: {
@@ -20201,7 +20334,7 @@ var DataBox = (props) => /* @__PURE__ */ jsx136(Box11, {
20201
20334
  var DataTypeLabel = (param) => {
20202
20335
  let { dataType, enable = true } = param;
20203
20336
  if (!enable) return null;
20204
- return /* @__PURE__ */ jsx136(DataBox, {
20337
+ return /* @__PURE__ */ jsx137(DataBox, {
20205
20338
  className: "data-type-label",
20206
20339
  sx: {
20207
20340
  mx: 0.5,
@@ -20219,18 +20352,18 @@ function defineEasyType(param) {
20219
20352
  const storeDisplayDataTypes = useJsonViewerStore((store) => store.displayDataTypes);
20220
20353
  const color2 = useJsonViewerStore((store) => store.colorspace[colorKey]);
20221
20354
  const onSelect = useJsonViewerStore((store) => store.onSelect);
20222
- return /* @__PURE__ */ jsxs127(DataBox, {
20355
+ return /* @__PURE__ */ jsxs128(DataBox, {
20223
20356
  onClick: () => onSelect === null || onSelect === void 0 ? void 0 : onSelect(props.path, props.value),
20224
20357
  sx: {
20225
20358
  color: color2
20226
20359
  },
20227
20360
  children: [
20228
- displayTypeLabel && storeDisplayDataTypes && /* @__PURE__ */ jsx136(DataTypeLabel, {
20361
+ displayTypeLabel && storeDisplayDataTypes && /* @__PURE__ */ jsx137(DataTypeLabel, {
20229
20362
  dataType: type
20230
20363
  }),
20231
- /* @__PURE__ */ jsx136(DataBox, {
20364
+ /* @__PURE__ */ jsx137(DataBox, {
20232
20365
  className: "".concat(type, "-value"),
20233
- children: /* @__PURE__ */ jsx136(Render, {
20366
+ children: /* @__PURE__ */ jsx137(Render, {
20234
20367
  path: props.path,
20235
20368
  inspect: props.inspect,
20236
20369
  setInspect: props.setInspect,
@@ -20251,7 +20384,7 @@ function defineEasyType(param) {
20251
20384
  const EasyTypeEditor = (param2) => {
20252
20385
  let { value, setValue, abortEditing, commitEditing } = param2;
20253
20386
  const color2 = useJsonViewerStore((store) => store.colorspace[colorKey]);
20254
- const handleKeyDown = useCallback9((event) => {
20387
+ const handleKeyDown = useCallback10((event) => {
20255
20388
  if (event.key === "Enter") {
20256
20389
  event.preventDefault();
20257
20390
  commitEditing(value);
@@ -20265,12 +20398,12 @@ function defineEasyType(param) {
20265
20398
  commitEditing,
20266
20399
  value
20267
20400
  ]);
20268
- const handleChange = useCallback9((event) => {
20401
+ const handleChange = useCallback10((event) => {
20269
20402
  setValue(event.target.value);
20270
20403
  }, [
20271
20404
  setValue
20272
20405
  ]);
20273
- return /* @__PURE__ */ jsx136(InputBase, {
20406
+ return /* @__PURE__ */ jsx137(InputBase, {
20274
20407
  autoFocus: true,
20275
20408
  value,
20276
20409
  onChange: handleChange,
@@ -20310,7 +20443,7 @@ var booleanType = defineEasyType({
20310
20443
  },
20311
20444
  Renderer: (param) => {
20312
20445
  let { value } = param;
20313
- return /* @__PURE__ */ jsx136(Fragment8, {
20446
+ return /* @__PURE__ */ jsx137(Fragment8, {
20314
20447
  children: value ? "true" : "false"
20315
20448
  });
20316
20449
  }
@@ -20329,7 +20462,7 @@ var dateType = defineEasyType({
20329
20462
  colorKey: "base0D",
20330
20463
  Renderer: (param) => {
20331
20464
  let { value } = param;
20332
- return /* @__PURE__ */ jsx136(Fragment8, {
20465
+ return /* @__PURE__ */ jsx137(Fragment8, {
20333
20466
  children: value.toLocaleTimeString("en-us", displayOptions)
20334
20467
  });
20335
20468
  }
@@ -20358,12 +20491,12 @@ var functionName = (func) => {
20358
20491
  var lb = "{";
20359
20492
  var rb = "}";
20360
20493
  var PreFunctionType = (props) => {
20361
- return /* @__PURE__ */ jsxs127(NoSsr, {
20494
+ return /* @__PURE__ */ jsxs128(NoSsr, {
20362
20495
  children: [
20363
- /* @__PURE__ */ jsx136(DataTypeLabel, {
20496
+ /* @__PURE__ */ jsx137(DataTypeLabel, {
20364
20497
  dataType: "function"
20365
20498
  }),
20366
- /* @__PURE__ */ jsxs127(Box11, {
20499
+ /* @__PURE__ */ jsxs128(Box12, {
20367
20500
  component: "span",
20368
20501
  className: "data-function-start",
20369
20502
  sx: {
@@ -20379,8 +20512,8 @@ var PreFunctionType = (props) => {
20379
20512
  });
20380
20513
  };
20381
20514
  var PostFunctionType = () => {
20382
- return /* @__PURE__ */ jsx136(NoSsr, {
20383
- children: /* @__PURE__ */ jsx136(Box11, {
20515
+ return /* @__PURE__ */ jsx137(NoSsr, {
20516
+ children: /* @__PURE__ */ jsx137(Box12, {
20384
20517
  component: "span",
20385
20518
  className: "data-function-end",
20386
20519
  children: rb
@@ -20389,15 +20522,15 @@ var PostFunctionType = () => {
20389
20522
  };
20390
20523
  var FunctionType = (props) => {
20391
20524
  const functionColor = useJsonViewerStore((store) => store.colorspace.base05);
20392
- return /* @__PURE__ */ jsx136(NoSsr, {
20393
- children: /* @__PURE__ */ jsx136(Box11, {
20525
+ return /* @__PURE__ */ jsx137(NoSsr, {
20526
+ children: /* @__PURE__ */ jsx137(Box12, {
20394
20527
  className: "data-function",
20395
20528
  sx: {
20396
20529
  display: props.inspect ? "block" : "inline-block",
20397
20530
  pl: props.inspect ? 2 : 0,
20398
20531
  color: functionColor
20399
20532
  },
20400
- children: props.inspect ? functionBody(props.value) : /* @__PURE__ */ jsx136(Box11, {
20533
+ children: props.inspect ? functionBody(props.value) : /* @__PURE__ */ jsx137(Box12, {
20401
20534
  component: "span",
20402
20535
  className: "data-function-body",
20403
20536
  onClick: () => props.setInspect(true),
@@ -20425,7 +20558,7 @@ var nullType = defineEasyType({
20425
20558
  displayTypeLabel: false,
20426
20559
  Renderer: () => {
20427
20560
  const backgroundColor = useJsonViewerStore((store) => store.colorspace.base02);
20428
- return /* @__PURE__ */ jsx136(Box11, {
20561
+ return /* @__PURE__ */ jsx137(Box12, {
20429
20562
  sx: {
20430
20563
  fontSize: "0.8rem",
20431
20564
  backgroundColor,
@@ -20448,7 +20581,7 @@ var nanType = defineEasyType({
20448
20581
  deserialize: (value) => parseFloat(value),
20449
20582
  Renderer: () => {
20450
20583
  const backgroundColor = useJsonViewerStore((store) => store.colorspace.base02);
20451
- return /* @__PURE__ */ jsx136(Box11, {
20584
+ return /* @__PURE__ */ jsx137(Box12, {
20452
20585
  sx: {
20453
20586
  backgroundColor,
20454
20587
  fontSize: "0.8rem",
@@ -20468,7 +20601,7 @@ var floatType = defineEasyType({
20468
20601
  deserialize: (value) => parseFloat(value),
20469
20602
  Renderer: (param) => {
20470
20603
  let { value } = param;
20471
- return /* @__PURE__ */ jsx136(Fragment8, {
20604
+ return /* @__PURE__ */ jsx137(Fragment8, {
20472
20605
  children: value
20473
20606
  });
20474
20607
  }
@@ -20482,7 +20615,7 @@ var intType = defineEasyType({
20482
20615
  deserialize: (value) => parseFloat(value),
20483
20616
  Renderer: (param) => {
20484
20617
  let { value } = param;
20485
- return /* @__PURE__ */ jsx136(Fragment8, {
20618
+ return /* @__PURE__ */ jsx137(Fragment8, {
20486
20619
  children: value
20487
20620
  });
20488
20621
  }
@@ -20495,16 +20628,16 @@ var bigIntType = defineEasyType({
20495
20628
  deserialize: (value) => BigInt(value.replace(/\D/g, "")),
20496
20629
  Renderer: (param) => {
20497
20630
  let { value } = param;
20498
- return /* @__PURE__ */ jsx136(Fragment8, {
20631
+ return /* @__PURE__ */ jsx137(Fragment8, {
20499
20632
  children: "".concat(value, "n")
20500
20633
  });
20501
20634
  }
20502
20635
  });
20503
20636
  var BaseIcon = (param) => {
20504
20637
  let { d: d2, ...props } = param;
20505
- return /* @__PURE__ */ jsx136(SvgIcon, {
20638
+ return /* @__PURE__ */ jsx137(SvgIcon, {
20506
20639
  ...props,
20507
- children: /* @__PURE__ */ jsx136("path", {
20640
+ children: /* @__PURE__ */ jsx137("path", {
20508
20641
  d: d2
20509
20642
  })
20510
20643
  });
@@ -20519,55 +20652,55 @@ var Edit = "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.3
20519
20652
  var ExpandMore = "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z";
20520
20653
  var Delete = "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5l-1-1h-5l-1 1H5v2h14V4z";
20521
20654
  var AddBoxIcon = (props) => {
20522
- return /* @__PURE__ */ jsx136(BaseIcon, {
20655
+ return /* @__PURE__ */ jsx137(BaseIcon, {
20523
20656
  d: AddBox,
20524
20657
  ...props
20525
20658
  });
20526
20659
  };
20527
20660
  var CheckIcon = (props) => {
20528
- return /* @__PURE__ */ jsx136(BaseIcon, {
20661
+ return /* @__PURE__ */ jsx137(BaseIcon, {
20529
20662
  d: Check2,
20530
20663
  ...props
20531
20664
  });
20532
20665
  };
20533
20666
  var ChevronRightIcon = (props) => {
20534
- return /* @__PURE__ */ jsx136(BaseIcon, {
20667
+ return /* @__PURE__ */ jsx137(BaseIcon, {
20535
20668
  d: ChevronRight,
20536
20669
  ...props
20537
20670
  });
20538
20671
  };
20539
20672
  var CircularArrowsIcon = (props) => {
20540
- return /* @__PURE__ */ jsx136(BaseIcon, {
20673
+ return /* @__PURE__ */ jsx137(BaseIcon, {
20541
20674
  d: CircularArrows,
20542
20675
  ...props
20543
20676
  });
20544
20677
  };
20545
20678
  var CloseIcon = (props) => {
20546
- return /* @__PURE__ */ jsx136(BaseIcon, {
20679
+ return /* @__PURE__ */ jsx137(BaseIcon, {
20547
20680
  d: Close2,
20548
20681
  ...props
20549
20682
  });
20550
20683
  };
20551
20684
  var ContentCopyIcon = (props) => {
20552
- return /* @__PURE__ */ jsx136(BaseIcon, {
20685
+ return /* @__PURE__ */ jsx137(BaseIcon, {
20553
20686
  d: ContentCopy2,
20554
20687
  ...props
20555
20688
  });
20556
20689
  };
20557
20690
  var EditIcon = (props) => {
20558
- return /* @__PURE__ */ jsx136(BaseIcon, {
20691
+ return /* @__PURE__ */ jsx137(BaseIcon, {
20559
20692
  d: Edit,
20560
20693
  ...props
20561
20694
  });
20562
20695
  };
20563
20696
  var ExpandMoreIcon = (props) => {
20564
- return /* @__PURE__ */ jsx136(BaseIcon, {
20697
+ return /* @__PURE__ */ jsx137(BaseIcon, {
20565
20698
  d: ExpandMore,
20566
20699
  ...props
20567
20700
  });
20568
20701
  };
20569
20702
  var DeleteIcon = (props) => {
20570
- return /* @__PURE__ */ jsx136(BaseIcon, {
20703
+ return /* @__PURE__ */ jsx137(BaseIcon, {
20571
20704
  d: Delete,
20572
20705
  ...props
20573
20706
  });
@@ -20590,23 +20723,23 @@ function inspectMetadata(value) {
20590
20723
  var PreObjectType = (props) => {
20591
20724
  const metadataColor = useJsonViewerStore((store) => store.colorspace.base04);
20592
20725
  const textColor = useTextColor();
20593
- const isArrayLike = useMemo7(() => Array.isArray(props.value) || props.value instanceof Set, [
20726
+ const isArrayLike = useMemo8(() => Array.isArray(props.value) || props.value instanceof Set, [
20594
20727
  props.value
20595
20728
  ]);
20596
- const isEmptyValue = useMemo7(() => getValueSize(props.value) === 0, [
20729
+ const isEmptyValue = useMemo8(() => getValueSize(props.value) === 0, [
20597
20730
  props.value
20598
20731
  ]);
20599
- const sizeOfValue = useMemo7(() => inspectMetadata(props.value), [
20732
+ const sizeOfValue = useMemo8(() => inspectMetadata(props.value), [
20600
20733
  props.value
20601
20734
  ]);
20602
20735
  const displaySize = useJsonViewerStore((store) => store.displaySize);
20603
- const shouldDisplaySize = useMemo7(() => typeof displaySize === "function" ? displaySize(props.path, props.value) : displaySize, [
20736
+ const shouldDisplaySize = useMemo8(() => typeof displaySize === "function" ? displaySize(props.path, props.value) : displaySize, [
20604
20737
  displaySize,
20605
20738
  props.path,
20606
20739
  props.value
20607
20740
  ]);
20608
20741
  const isTrap = useIsCycleReference(props.path, props.value);
20609
- return /* @__PURE__ */ jsxs127(Box11, {
20742
+ return /* @__PURE__ */ jsxs128(Box12, {
20610
20743
  component: "span",
20611
20744
  className: "data-object-start",
20612
20745
  sx: {
@@ -20614,7 +20747,7 @@ var PreObjectType = (props) => {
20614
20747
  },
20615
20748
  children: [
20616
20749
  isArrayLike ? arrayLb : objectLb,
20617
- shouldDisplaySize && props.inspect && !isEmptyValue && /* @__PURE__ */ jsx136(Box11, {
20750
+ shouldDisplaySize && props.inspect && !isEmptyValue && /* @__PURE__ */ jsx137(Box12, {
20618
20751
  component: "span",
20619
20752
  sx: {
20620
20753
  pl: 0.5,
@@ -20624,16 +20757,16 @@ var PreObjectType = (props) => {
20624
20757
  },
20625
20758
  children: sizeOfValue
20626
20759
  }),
20627
- isTrap && !props.inspect && /* @__PURE__ */ jsxs127(Fragment8, {
20760
+ isTrap && !props.inspect && /* @__PURE__ */ jsxs128(Fragment8, {
20628
20761
  children: [
20629
- /* @__PURE__ */ jsx136(CircularArrowsIcon, {
20762
+ /* @__PURE__ */ jsx137(CircularArrowsIcon, {
20630
20763
  sx: {
20631
20764
  fontSize: 12,
20632
20765
  color: textColor,
20633
20766
  mx: 0.5
20634
20767
  }
20635
20768
  }),
20636
- /* @__PURE__ */ jsx136(DataBox, {
20769
+ /* @__PURE__ */ jsx137(DataBox, {
20637
20770
  sx: {
20638
20771
  cursor: "pointer",
20639
20772
  userSelect: "none"
@@ -20648,22 +20781,22 @@ var PreObjectType = (props) => {
20648
20781
  var PostObjectType = (props) => {
20649
20782
  const metadataColor = useJsonViewerStore((store) => store.colorspace.base04);
20650
20783
  const textColor = useTextColor();
20651
- const isArrayLike = useMemo7(() => Array.isArray(props.value) || props.value instanceof Set, [
20784
+ const isArrayLike = useMemo8(() => Array.isArray(props.value) || props.value instanceof Set, [
20652
20785
  props.value
20653
20786
  ]);
20654
- const isEmptyValue = useMemo7(() => getValueSize(props.value) === 0, [
20787
+ const isEmptyValue = useMemo8(() => getValueSize(props.value) === 0, [
20655
20788
  props.value
20656
20789
  ]);
20657
- const sizeOfValue = useMemo7(() => inspectMetadata(props.value), [
20790
+ const sizeOfValue = useMemo8(() => inspectMetadata(props.value), [
20658
20791
  props.value
20659
20792
  ]);
20660
20793
  const displaySize = useJsonViewerStore((store) => store.displaySize);
20661
- const shouldDisplaySize = useMemo7(() => typeof displaySize === "function" ? displaySize(props.path, props.value) : displaySize, [
20794
+ const shouldDisplaySize = useMemo8(() => typeof displaySize === "function" ? displaySize(props.path, props.value) : displaySize, [
20662
20795
  displaySize,
20663
20796
  props.path,
20664
20797
  props.value
20665
20798
  ]);
20666
- return /* @__PURE__ */ jsxs127(Box11, {
20799
+ return /* @__PURE__ */ jsxs128(Box12, {
20667
20800
  component: "span",
20668
20801
  className: "data-object-end",
20669
20802
  sx: {
@@ -20674,7 +20807,7 @@ var PostObjectType = (props) => {
20674
20807
  },
20675
20808
  children: [
20676
20809
  isArrayLike ? arrayRb : objectRb,
20677
- shouldDisplaySize && (isEmptyValue || !props.inspect) ? /* @__PURE__ */ jsx136(Box11, {
20810
+ shouldDisplaySize && (isEmptyValue || !props.inspect) ? /* @__PURE__ */ jsx137(Box12, {
20678
20811
  component: "span",
20679
20812
  sx: {
20680
20813
  pl: 0.5,
@@ -20695,9 +20828,9 @@ var ObjectType = (props) => {
20695
20828
  const borderColor = useJsonViewerStore((store) => store.colorspace.base02);
20696
20829
  const groupArraysAfterLength = useJsonViewerStore((store) => store.groupArraysAfterLength);
20697
20830
  const isTrap = useIsCycleReference(props.path, props.value);
20698
- const [displayLength, setDisplayLength] = useState13(useJsonViewerStore((store) => store.maxDisplayLength));
20831
+ const [displayLength, setDisplayLength] = useState14(useJsonViewerStore((store) => store.maxDisplayLength));
20699
20832
  const objectSortKeys = useJsonViewerStore((store) => store.objectSortKeys);
20700
- const elements = useMemo7(() => {
20833
+ const elements = useMemo8(() => {
20701
20834
  if (!props.inspect) {
20702
20835
  return null;
20703
20836
  }
@@ -20714,7 +20847,7 @@ var ObjectType = (props) => {
20714
20847
  ...props.path,
20715
20848
  key
20716
20849
  ];
20717
- elements3.push(/* @__PURE__ */ jsx136(DataKeyPair, {
20850
+ elements3.push(/* @__PURE__ */ jsx137(DataKeyPair, {
20718
20851
  path,
20719
20852
  value: value2,
20720
20853
  prevValue: props.prevValue instanceof Map ? props.prevValue.get(k2) : void 0,
@@ -20730,7 +20863,7 @@ var ObjectType = (props) => {
20730
20863
  while (true) {
20731
20864
  const nextResult = iterator2.next();
20732
20865
  var _nextResult_done;
20733
- elements3.push(/* @__PURE__ */ jsx136(DataKeyPair, {
20866
+ elements3.push(/* @__PURE__ */ jsx137(DataKeyPair, {
20734
20867
  path: [
20735
20868
  ...props.path,
20736
20869
  "iterator:".concat(count2)
@@ -20758,7 +20891,7 @@ var ObjectType = (props) => {
20758
20891
  ...props.path,
20759
20892
  index
20760
20893
  ];
20761
- return /* @__PURE__ */ jsx136(DataKeyPair, {
20894
+ return /* @__PURE__ */ jsx137(DataKeyPair, {
20762
20895
  path,
20763
20896
  value: value2,
20764
20897
  prevValue: Array.isArray(props.prevValue) ? props.prevValue[index] : void 0,
@@ -20767,7 +20900,7 @@ var ObjectType = (props) => {
20767
20900
  });
20768
20901
  if (value.length > displayLength) {
20769
20902
  const rest = value.length - displayLength;
20770
- elements4.push(/* @__PURE__ */ jsxs127(DataBox, {
20903
+ elements4.push(/* @__PURE__ */ jsxs128(DataBox, {
20771
20904
  sx: {
20772
20905
  cursor: "pointer",
20773
20906
  lineHeight: 1.5,
@@ -20790,7 +20923,7 @@ var ObjectType = (props) => {
20790
20923
  const prevElements = Array.isArray(props.prevValue) ? segmentArray(props.prevValue, groupArraysAfterLength) : void 0;
20791
20924
  const elementsLastIndex = elements3.length - 1;
20792
20925
  return elements3.map((list, index) => {
20793
- return /* @__PURE__ */ jsx136(DataKeyPair, {
20926
+ return /* @__PURE__ */ jsx137(DataKeyPair, {
20794
20927
  path: props.path,
20795
20928
  value: list,
20796
20929
  nestedIndex: index,
@@ -20817,7 +20950,7 @@ var ObjectType = (props) => {
20817
20950
  ...props.path,
20818
20951
  key
20819
20952
  ];
20820
- return /* @__PURE__ */ jsx136(DataKeyPair, {
20953
+ return /* @__PURE__ */ jsx137(DataKeyPair, {
20821
20954
  path,
20822
20955
  value: value2,
20823
20956
  prevValue: (_props_prevValue = props.prevValue) === null || _props_prevValue === void 0 ? void 0 : _props_prevValue[key],
@@ -20826,7 +20959,7 @@ var ObjectType = (props) => {
20826
20959
  });
20827
20960
  if (entries.length > displayLength) {
20828
20961
  const rest = entries.length - displayLength;
20829
- elements2.push(/* @__PURE__ */ jsxs127(DataBox, {
20962
+ elements2.push(/* @__PURE__ */ jsxs128(DataBox, {
20830
20963
  sx: {
20831
20964
  cursor: "pointer",
20832
20965
  lineHeight: 1.5,
@@ -20858,13 +20991,13 @@ var ObjectType = (props) => {
20858
20991
  const marginLeft = props.inspect ? 0.6 : 0;
20859
20992
  const width = useJsonViewerStore((store) => store.indentWidth);
20860
20993
  const indentWidth = props.inspect ? width - marginLeft : width;
20861
- const isEmptyValue = useMemo7(() => getValueSize(props.value) === 0, [
20994
+ const isEmptyValue = useMemo8(() => getValueSize(props.value) === 0, [
20862
20995
  props.value
20863
20996
  ]);
20864
20997
  if (isEmptyValue) {
20865
20998
  return null;
20866
20999
  }
20867
- return /* @__PURE__ */ jsx136(Box11, {
21000
+ return /* @__PURE__ */ jsx137(Box12, {
20868
21001
  className: "data-object",
20869
21002
  sx: {
20870
21003
  display: props.inspect ? "block" : "inline-block",
@@ -20873,7 +21006,7 @@ var ObjectType = (props) => {
20873
21006
  color: keyColor,
20874
21007
  borderLeft: props.inspect ? "1px solid ".concat(borderColor) : "none"
20875
21008
  },
20876
- children: props.inspect ? elements : !isTrap && /* @__PURE__ */ jsx136(Box11, {
21009
+ children: props.inspect ? elements : !isTrap && /* @__PURE__ */ jsx137(Box12, {
20877
21010
  component: "span",
20878
21011
  className: "data-object-body",
20879
21012
  onClick: () => props.setInspect(true),
@@ -20901,11 +21034,11 @@ var stringType = defineEasyType({
20901
21034
  serialize: (value) => value,
20902
21035
  deserialize: (value) => value,
20903
21036
  Renderer: (props) => {
20904
- const [showRest, setShowRest] = useState13(false);
21037
+ const [showRest, setShowRest] = useState14(false);
20905
21038
  const collapseStringsAfterLength = useJsonViewerStore((store) => store.collapseStringsAfterLength);
20906
21039
  const value = showRest ? props.value : props.value.slice(0, collapseStringsAfterLength);
20907
21040
  const hasRest = props.value.length > collapseStringsAfterLength;
20908
- return /* @__PURE__ */ jsxs127(Box11, {
21041
+ return /* @__PURE__ */ jsxs128(Box12, {
20909
21042
  component: "span",
20910
21043
  sx: {
20911
21044
  overflowWrap: "anywhere",
@@ -20923,7 +21056,7 @@ var stringType = defineEasyType({
20923
21056
  children: [
20924
21057
  '"',
20925
21058
  value,
20926
- hasRest && !showRest && /* @__PURE__ */ jsx136(Box11, {
21059
+ hasRest && !showRest && /* @__PURE__ */ jsx137(Box12, {
20927
21060
  component: "span",
20928
21061
  sx: {
20929
21062
  padding: 0.5
@@ -20942,7 +21075,7 @@ var undefinedType = defineEasyType({
20942
21075
  displayTypeLabel: false,
20943
21076
  Renderer: () => {
20944
21077
  const backgroundColor = useJsonViewerStore((store) => store.colorspace.base02);
20945
- return /* @__PURE__ */ jsx136(Box11, {
21078
+ return /* @__PURE__ */ jsx137(Box12, {
20946
21079
  sx: {
20947
21080
  fontSize: "0.7rem",
20948
21081
  backgroundColor,
@@ -21017,13 +21150,13 @@ function matchTypeComponents(value, path, registry) {
21017
21150
  }
21018
21151
  function useTypeComponents(value, path) {
21019
21152
  const registry = useTypeRegistryStore((store) => store.registry);
21020
- return useMemo7(() => matchTypeComponents(value, path, registry), [
21153
+ return useMemo8(() => matchTypeComponents(value, path, registry), [
21021
21154
  value,
21022
21155
  path,
21023
21156
  registry
21024
21157
  ]);
21025
21158
  }
21026
- var IconBox = (props) => /* @__PURE__ */ jsx136(Box11, {
21159
+ var IconBox = (props) => /* @__PURE__ */ jsx137(Box12, {
21027
21160
  component: "span",
21028
21161
  ...props,
21029
21162
  sx: {
@@ -21038,7 +21171,7 @@ var DataKeyPair = (props) => {
21038
21171
  var _props_editable;
21039
21172
  const propsEditable = (_props_editable = props.editable) !== null && _props_editable !== void 0 ? _props_editable : void 0;
21040
21173
  const storeEditable = useJsonViewerStore((store) => store.editable);
21041
- const editable = useMemo7(() => {
21174
+ const editable = useMemo8(() => {
21042
21175
  if (storeEditable === false) {
21043
21176
  return false;
21044
21177
  }
@@ -21055,11 +21188,11 @@ var DataKeyPair = (props) => {
21055
21188
  storeEditable,
21056
21189
  value
21057
21190
  ]);
21058
- const [tempValue, setTempValue] = useState13("");
21191
+ const [tempValue, setTempValue] = useState14("");
21059
21192
  const depth = path.length;
21060
21193
  const key = path[depth - 1];
21061
21194
  const hoverPath = useJsonViewerStore((store) => store.hoverPath);
21062
- const isHover = useMemo7(() => {
21195
+ const isHover = useMemo8(() => {
21063
21196
  return hoverPath && path.every((value2, index) => value2 === hoverPath.path[index] && nestedIndex === hoverPath.nestedIndex);
21064
21197
  }, [
21065
21198
  hoverPath,
@@ -21069,7 +21202,7 @@ var DataKeyPair = (props) => {
21069
21202
  const setHover = useJsonViewerStore((store) => store.setHover);
21070
21203
  const root2 = useJsonViewerStore((store) => store.value);
21071
21204
  const [inspect, setInspect] = useInspect(path, value, nestedIndex);
21072
- const [editing, setEditing] = useState13(false);
21205
+ const [editing, setEditing] = useState14(false);
21073
21206
  const onChange = useJsonViewerStore((store) => store.onChange);
21074
21207
  const keyColor = useTextColor();
21075
21208
  const numberKeyColor = useJsonViewerStore((store) => store.colorspace.base0C);
@@ -21081,7 +21214,7 @@ var DataKeyPair = (props) => {
21081
21214
  const isNumberKey = Number.isInteger(Number(key));
21082
21215
  const storeEnableAdd = useJsonViewerStore((store) => store.enableAdd);
21083
21216
  const onAdd = useJsonViewerStore((store) => store.onAdd);
21084
- const enableAdd = useMemo7(() => {
21217
+ const enableAdd = useMemo8(() => {
21085
21218
  if (!onAdd || nestedIndex !== void 0) return false;
21086
21219
  if (storeEnableAdd === false) {
21087
21220
  return false;
@@ -21106,7 +21239,7 @@ var DataKeyPair = (props) => {
21106
21239
  ]);
21107
21240
  const storeEnableDelete = useJsonViewerStore((store) => store.enableDelete);
21108
21241
  const onDelete = useJsonViewerStore((store) => store.onDelete);
21109
- const enableDelete = useMemo7(() => {
21242
+ const enableDelete = useMemo8(() => {
21110
21243
  if (!onDelete || nestedIndex !== void 0) return false;
21111
21244
  if (isRoot) {
21112
21245
  return false;
@@ -21133,7 +21266,7 @@ var DataKeyPair = (props) => {
21133
21266
  const enableClipboard = useJsonViewerStore((store) => store.enableClipboard);
21134
21267
  const { copy, copied } = useClipboard();
21135
21268
  const highlightUpdates = useJsonViewerStore((store) => store.highlightUpdates);
21136
- const isHighlight = useMemo7(() => {
21269
+ const isHighlight = useMemo8(() => {
21137
21270
  if (!highlightUpdates || prevValue === void 0) return false;
21138
21271
  if (typeof value !== typeof prevValue) {
21139
21272
  return true;
@@ -21157,8 +21290,8 @@ var DataKeyPair = (props) => {
21157
21290
  prevValue,
21158
21291
  value
21159
21292
  ]);
21160
- const highlightContainer = useRef11();
21161
- useEffect17(() => {
21293
+ const highlightContainer = useRef12();
21294
+ useEffect18(() => {
21162
21295
  if (highlightContainer.current && isHighlight && "animate" in highlightContainer.current) {
21163
21296
  highlightContainer.current.animate([
21164
21297
  {
@@ -21178,7 +21311,7 @@ var DataKeyPair = (props) => {
21178
21311
  prevValue,
21179
21312
  value
21180
21313
  ]);
21181
- const startEditing = useCallback9((event) => {
21314
+ const startEditing = useCallback10((event) => {
21182
21315
  event.preventDefault();
21183
21316
  if (serialize) setTempValue(serialize(value));
21184
21317
  setEditing(true);
@@ -21186,14 +21319,14 @@ var DataKeyPair = (props) => {
21186
21319
  serialize,
21187
21320
  value
21188
21321
  ]);
21189
- const abortEditing = useCallback9(() => {
21322
+ const abortEditing = useCallback10(() => {
21190
21323
  setEditing(false);
21191
21324
  setTempValue("");
21192
21325
  }, [
21193
21326
  setEditing,
21194
21327
  setTempValue
21195
21328
  ]);
21196
- const commitEditing = useCallback9((newValue) => {
21329
+ const commitEditing = useCallback10((newValue) => {
21197
21330
  setEditing(false);
21198
21331
  if (!deserialize) return;
21199
21332
  try {
@@ -21207,20 +21340,20 @@ var DataKeyPair = (props) => {
21207
21340
  path,
21208
21341
  value
21209
21342
  ]);
21210
- const actionIcons = useMemo7(() => {
21343
+ const actionIcons = useMemo8(() => {
21211
21344
  if (editing) {
21212
- return /* @__PURE__ */ jsxs127(Fragment8, {
21345
+ return /* @__PURE__ */ jsxs128(Fragment8, {
21213
21346
  children: [
21214
- /* @__PURE__ */ jsx136(IconBox, {
21215
- children: /* @__PURE__ */ jsx136(CloseIcon, {
21347
+ /* @__PURE__ */ jsx137(IconBox, {
21348
+ children: /* @__PURE__ */ jsx137(CloseIcon, {
21216
21349
  sx: {
21217
21350
  fontSize: ".8rem"
21218
21351
  },
21219
21352
  onClick: abortEditing
21220
21353
  })
21221
21354
  }),
21222
- /* @__PURE__ */ jsx136(IconBox, {
21223
- children: /* @__PURE__ */ jsx136(CheckIcon, {
21355
+ /* @__PURE__ */ jsx137(IconBox, {
21356
+ children: /* @__PURE__ */ jsx137(CheckIcon, {
21224
21357
  sx: {
21225
21358
  fontSize: ".8rem"
21226
21359
  },
@@ -21230,9 +21363,9 @@ var DataKeyPair = (props) => {
21230
21363
  ]
21231
21364
  });
21232
21365
  }
21233
- return /* @__PURE__ */ jsxs127(Fragment8, {
21366
+ return /* @__PURE__ */ jsxs128(Fragment8, {
21234
21367
  children: [
21235
- enableClipboard && /* @__PURE__ */ jsx136(IconBox, {
21368
+ enableClipboard && /* @__PURE__ */ jsx137(IconBox, {
21236
21369
  onClick: (event) => {
21237
21370
  event.preventDefault();
21238
21371
  try {
@@ -21241,41 +21374,41 @@ var DataKeyPair = (props) => {
21241
21374
  console.error(e2);
21242
21375
  }
21243
21376
  },
21244
- children: copied ? /* @__PURE__ */ jsx136(CheckIcon, {
21377
+ children: copied ? /* @__PURE__ */ jsx137(CheckIcon, {
21245
21378
  sx: {
21246
21379
  fontSize: ".8rem"
21247
21380
  }
21248
- }) : /* @__PURE__ */ jsx136(ContentCopyIcon, {
21381
+ }) : /* @__PURE__ */ jsx137(ContentCopyIcon, {
21249
21382
  sx: {
21250
21383
  fontSize: ".8rem"
21251
21384
  }
21252
21385
  })
21253
21386
  }),
21254
- Editor && editable && serialize && deserialize && /* @__PURE__ */ jsx136(IconBox, {
21387
+ Editor && editable && serialize && deserialize && /* @__PURE__ */ jsx137(IconBox, {
21255
21388
  onClick: startEditing,
21256
- children: /* @__PURE__ */ jsx136(EditIcon, {
21389
+ children: /* @__PURE__ */ jsx137(EditIcon, {
21257
21390
  sx: {
21258
21391
  fontSize: ".8rem"
21259
21392
  }
21260
21393
  })
21261
21394
  }),
21262
- enableAdd && /* @__PURE__ */ jsx136(IconBox, {
21395
+ enableAdd && /* @__PURE__ */ jsx137(IconBox, {
21263
21396
  onClick: (event) => {
21264
21397
  event.preventDefault();
21265
21398
  onAdd === null || onAdd === void 0 ? void 0 : onAdd(path);
21266
21399
  },
21267
- children: /* @__PURE__ */ jsx136(AddBoxIcon, {
21400
+ children: /* @__PURE__ */ jsx137(AddBoxIcon, {
21268
21401
  sx: {
21269
21402
  fontSize: ".8rem"
21270
21403
  }
21271
21404
  })
21272
21405
  }),
21273
- enableDelete && /* @__PURE__ */ jsx136(IconBox, {
21406
+ enableDelete && /* @__PURE__ */ jsx137(IconBox, {
21274
21407
  onClick: (event) => {
21275
21408
  event.preventDefault();
21276
21409
  onDelete === null || onDelete === void 0 ? void 0 : onDelete(path, value);
21277
21410
  },
21278
- children: /* @__PURE__ */ jsx136(DeleteIcon, {
21411
+ children: /* @__PURE__ */ jsx137(DeleteIcon, {
21279
21412
  sx: {
21280
21413
  fontSize: ".9rem"
21281
21414
  }
@@ -21303,12 +21436,12 @@ var DataKeyPair = (props) => {
21303
21436
  abortEditing,
21304
21437
  commitEditing
21305
21438
  ]);
21306
- const isEmptyValue = useMemo7(() => getValueSize(value) === 0, [
21439
+ const isEmptyValue = useMemo8(() => getValueSize(value) === 0, [
21307
21440
  value
21308
21441
  ]);
21309
21442
  const expandable = !isEmptyValue && !!(PreComponent && PostComponent);
21310
21443
  const KeyRenderer = useJsonViewerStore((store) => store.keyRenderer);
21311
- const downstreamProps = useMemo7(() => ({
21444
+ const downstreamProps = useMemo8(() => ({
21312
21445
  path,
21313
21446
  inspect,
21314
21447
  setInspect,
@@ -21323,19 +21456,19 @@ var DataKeyPair = (props) => {
21323
21456
  prevValue,
21324
21457
  nestedIndex
21325
21458
  ]);
21326
- return /* @__PURE__ */ jsxs127(Box11, {
21459
+ return /* @__PURE__ */ jsxs128(Box12, {
21327
21460
  className: "data-key-pair",
21328
21461
  "data-testid": "data-key-pair" + path.join("."),
21329
21462
  sx: {
21330
21463
  userSelect: "text"
21331
21464
  },
21332
- onMouseEnter: useCallback9(() => setHover(path, nestedIndex), [
21465
+ onMouseEnter: useCallback10(() => setHover(path, nestedIndex), [
21333
21466
  setHover,
21334
21467
  path,
21335
21468
  nestedIndex
21336
21469
  ]),
21337
21470
  children: [
21338
- /* @__PURE__ */ jsxs127(DataBox, {
21471
+ /* @__PURE__ */ jsxs128(DataBox, {
21339
21472
  component: "span",
21340
21473
  className: "data-key",
21341
21474
  sx: {
@@ -21344,7 +21477,7 @@ var DataKeyPair = (props) => {
21344
21477
  letterSpacing: 0.5,
21345
21478
  opacity: 0.8
21346
21479
  },
21347
- onClick: useCallback9((event) => {
21480
+ onClick: useCallback10((event) => {
21348
21481
  if (event.isDefaultPrevented()) {
21349
21482
  return;
21350
21483
  }
@@ -21356,7 +21489,7 @@ var DataKeyPair = (props) => {
21356
21489
  setInspect
21357
21490
  ]),
21358
21491
  children: [
21359
- expandable ? inspect ? /* @__PURE__ */ jsx136(ExpandMoreIcon, {
21492
+ expandable ? inspect ? /* @__PURE__ */ jsx137(ExpandMoreIcon, {
21360
21493
  className: "data-key-toggle-expanded",
21361
21494
  sx: {
21362
21495
  fontSize: ".8rem",
@@ -21364,7 +21497,7 @@ var DataKeyPair = (props) => {
21364
21497
  cursor: "pointer"
21365
21498
  }
21366
21499
  }
21367
- }) : /* @__PURE__ */ jsx136(ChevronRightIcon, {
21500
+ }) : /* @__PURE__ */ jsx137(ChevronRightIcon, {
21368
21501
  className: "data-key-toggle-collapsed",
21369
21502
  sx: {
21370
21503
  fontSize: ".8rem",
@@ -21373,44 +21506,44 @@ var DataKeyPair = (props) => {
21373
21506
  }
21374
21507
  }
21375
21508
  }) : null,
21376
- /* @__PURE__ */ jsx136(Box11, {
21509
+ /* @__PURE__ */ jsx137(Box12, {
21377
21510
  ref: highlightContainer,
21378
21511
  className: "data-key-key",
21379
21512
  component: "span",
21380
- children: isRoot && depth === 0 ? rootName !== false ? quotesOnKeys ? /* @__PURE__ */ jsxs127(Fragment8, {
21513
+ children: isRoot && depth === 0 ? rootName !== false ? quotesOnKeys ? /* @__PURE__ */ jsxs128(Fragment8, {
21381
21514
  children: [
21382
21515
  '"',
21383
21516
  rootName,
21384
21517
  '"'
21385
21518
  ]
21386
- }) : /* @__PURE__ */ jsx136(Fragment8, {
21519
+ }) : /* @__PURE__ */ jsx137(Fragment8, {
21387
21520
  children: rootName
21388
- }) : null : KeyRenderer.when(downstreamProps) ? /* @__PURE__ */ jsx136(KeyRenderer, {
21521
+ }) : null : KeyRenderer.when(downstreamProps) ? /* @__PURE__ */ jsx137(KeyRenderer, {
21389
21522
  ...downstreamProps
21390
- }) : nestedIndex === void 0 && (isNumberKey ? /* @__PURE__ */ jsx136(Box11, {
21523
+ }) : nestedIndex === void 0 && (isNumberKey ? /* @__PURE__ */ jsx137(Box12, {
21391
21524
  component: "span",
21392
21525
  style: {
21393
21526
  color: numberKeyColor,
21394
21527
  userSelect: isNumberKey ? "none" : "auto"
21395
21528
  },
21396
21529
  children: key
21397
- }) : quotesOnKeys ? /* @__PURE__ */ jsxs127(Fragment8, {
21530
+ }) : quotesOnKeys ? /* @__PURE__ */ jsxs128(Fragment8, {
21398
21531
  children: [
21399
21532
  '"',
21400
21533
  key,
21401
21534
  '"'
21402
21535
  ]
21403
- }) : /* @__PURE__ */ jsx136(Fragment8, {
21536
+ }) : /* @__PURE__ */ jsx137(Fragment8, {
21404
21537
  children: key
21405
21538
  }))
21406
21539
  }),
21407
- isRoot ? rootName !== false && /* @__PURE__ */ jsx136(DataBox, {
21540
+ isRoot ? rootName !== false && /* @__PURE__ */ jsx137(DataBox, {
21408
21541
  className: "data-key-colon",
21409
21542
  sx: {
21410
21543
  mr: 0.5
21411
21544
  },
21412
21545
  children: ":"
21413
- }) : nestedIndex === void 0 && /* @__PURE__ */ jsx136(DataBox, {
21546
+ }) : nestedIndex === void 0 && /* @__PURE__ */ jsx137(DataBox, {
21414
21547
  className: "data-key-colon",
21415
21548
  sx: {
21416
21549
  mr: 0.5,
@@ -21421,29 +21554,29 @@ var DataKeyPair = (props) => {
21421
21554
  },
21422
21555
  children: ":"
21423
21556
  }),
21424
- PreComponent && /* @__PURE__ */ jsx136(PreComponent, {
21557
+ PreComponent && /* @__PURE__ */ jsx137(PreComponent, {
21425
21558
  ...downstreamProps
21426
21559
  }),
21427
21560
  isHover && expandable && inspect && actionIcons
21428
21561
  ]
21429
21562
  }),
21430
- editing && editable ? Editor && /* @__PURE__ */ jsx136(Editor, {
21563
+ editing && editable ? Editor && /* @__PURE__ */ jsx137(Editor, {
21431
21564
  path,
21432
21565
  value: tempValue,
21433
21566
  setValue: setTempValue,
21434
21567
  abortEditing,
21435
21568
  commitEditing
21436
- }) : Component ? /* @__PURE__ */ jsx136(Component, {
21569
+ }) : Component ? /* @__PURE__ */ jsx137(Component, {
21437
21570
  ...downstreamProps
21438
- }) : /* @__PURE__ */ jsx136(Box11, {
21571
+ }) : /* @__PURE__ */ jsx137(Box12, {
21439
21572
  component: "span",
21440
21573
  className: "data-value-fallback",
21441
21574
  children: "fallback: ".concat(value)
21442
21575
  }),
21443
- PostComponent && /* @__PURE__ */ jsx136(PostComponent, {
21576
+ PostComponent && /* @__PURE__ */ jsx137(PostComponent, {
21444
21577
  ...downstreamProps
21445
21578
  }),
21446
- !last && displayComma && /* @__PURE__ */ jsx136(DataBox, {
21579
+ !last && displayComma && /* @__PURE__ */ jsx137(DataBox, {
21447
21580
  children: ","
21448
21581
  }),
21449
21582
  isHover && expandable && !inspect && actionIcons,
@@ -21454,8 +21587,8 @@ var DataKeyPair = (props) => {
21454
21587
  };
21455
21588
  var query = "(prefers-color-scheme: dark)";
21456
21589
  function useThemeDetector() {
21457
- const [isDark, setIsDark] = useState13(false);
21458
- useEffect17(() => {
21590
+ const [isDark, setIsDark] = useState14(false);
21591
+ useEffect18(() => {
21459
21592
  const listener = (e2) => setIsDark(e2.matches);
21460
21593
  setIsDark(window.matchMedia(query).matches);
21461
21594
  const queryMedia = window.matchMedia(query);
@@ -21466,7 +21599,7 @@ function useThemeDetector() {
21466
21599
  }
21467
21600
  function useSetIfNotUndefinedEffect(key, value) {
21468
21601
  const { setState } = useContext16(JsonViewerStoreContext);
21469
- useEffect17(() => {
21602
+ useEffect18(() => {
21470
21603
  if (value !== void 0) {
21471
21604
  setState({
21472
21605
  [key]: value
@@ -21480,7 +21613,7 @@ function useSetIfNotUndefinedEffect(key, value) {
21480
21613
  }
21481
21614
  var JsonViewerInner = (props) => {
21482
21615
  const { setState } = useContext16(JsonViewerStoreContext);
21483
- useEffect17(() => {
21616
+ useEffect18(() => {
21484
21617
  setState((state) => ({
21485
21618
  prevValue: state.value,
21486
21619
  value: props.value
@@ -21508,7 +21641,7 @@ var JsonViewerInner = (props) => {
21508
21641
  useSetIfNotUndefinedEffect("displaySize", props.displaySize);
21509
21642
  useSetIfNotUndefinedEffect("displayComma", props.displayComma);
21510
21643
  useSetIfNotUndefinedEffect("highlightUpdates", props.highlightUpdates);
21511
- useEffect17(() => {
21644
+ useEffect18(() => {
21512
21645
  if (props.theme === "light") {
21513
21646
  setState({
21514
21647
  colorspace: lightColorspace
@@ -21526,13 +21659,13 @@ var JsonViewerInner = (props) => {
21526
21659
  setState,
21527
21660
  props.theme
21528
21661
  ]);
21529
- const themeCls = useMemo7(() => {
21662
+ const themeCls = useMemo8(() => {
21530
21663
  if (typeof props.theme === "object") return "json-viewer-theme-custom";
21531
21664
  return props.theme === "dark" ? "json-viewer-theme-dark" : "json-viewer-theme-light";
21532
21665
  }, [
21533
21666
  props.theme
21534
21667
  ]);
21535
- const onceRef = useRef11(true);
21668
+ const onceRef = useRef12(true);
21536
21669
  const registerTypes = useTypeRegistryStore((store) => store.registerTypes);
21537
21670
  if (onceRef.current) {
21538
21671
  const allTypes = props.valueTypes ? [
@@ -21544,7 +21677,7 @@ var JsonViewerInner = (props) => {
21544
21677
  registerTypes(allTypes);
21545
21678
  onceRef.current = false;
21546
21679
  }
21547
- useEffect17(() => {
21680
+ useEffect18(() => {
21548
21681
  const allTypes = props.valueTypes ? [
21549
21682
  ...predefinedTypes,
21550
21683
  ...props.valueTypes
@@ -21558,12 +21691,12 @@ var JsonViewerInner = (props) => {
21558
21691
  ]);
21559
21692
  const value = useJsonViewerStore((store) => store.value);
21560
21693
  const prevValue = useJsonViewerStore((store) => store.prevValue);
21561
- const emptyPath = useMemo7(() => [], []);
21694
+ const emptyPath = useMemo8(() => [], []);
21562
21695
  const setHover = useJsonViewerStore((store) => store.setHover);
21563
- const onMouseLeave = useCallback9(() => setHover(null), [
21696
+ const onMouseLeave = useCallback10(() => setHover(null), [
21564
21697
  setHover
21565
21698
  ]);
21566
- return /* @__PURE__ */ jsx136(Paper, {
21699
+ return /* @__PURE__ */ jsx137(Paper, {
21567
21700
  elevation: 0,
21568
21701
  className: clsx(themeCls, props.className),
21569
21702
  style: props.style,
@@ -21574,7 +21707,7 @@ var JsonViewerInner = (props) => {
21574
21707
  ...props.sx
21575
21708
  },
21576
21709
  onMouseLeave,
21577
- children: /* @__PURE__ */ jsx136(DataKeyPair, {
21710
+ children: /* @__PURE__ */ jsx137(DataKeyPair, {
21578
21711
  value,
21579
21712
  prevValue,
21580
21713
  path: emptyPath,
@@ -21589,14 +21722,14 @@ var JsonViewer = function JsonViewer2(props) {
21589
21722
  }
21590
21723
  }
21591
21724
  const isAutoDarkTheme = useThemeDetector();
21592
- const themeType = useMemo7(() => {
21725
+ const themeType = useMemo8(() => {
21593
21726
  var _props_theme;
21594
21727
  return props.theme === "auto" ? isAutoDarkTheme ? "dark" : "light" : (_props_theme = props.theme) !== null && _props_theme !== void 0 ? _props_theme : "light";
21595
21728
  }, [
21596
21729
  isAutoDarkTheme,
21597
21730
  props.theme
21598
21731
  ]);
21599
- const theme = useMemo7(() => {
21732
+ const theme = useMemo8(() => {
21600
21733
  const backgroundColor = typeof themeType === "object" ? themeType.base00 : themeType === "dark" ? darkColorspace.base00 : lightColorspace.base00;
21601
21734
  const foregroundColor = typeof themeType === "object" ? themeType.base07 : themeType === "dark" ? darkColorspace.base07 : lightColorspace.base07;
21602
21735
  return createTheme({
@@ -21624,15 +21757,15 @@ var JsonViewer = function JsonViewer2(props) {
21624
21757
  ...props,
21625
21758
  theme: themeType
21626
21759
  };
21627
- const jsonViewerStore = useMemo7(() => createJsonViewerStore(props), []);
21628
- const typeRegistryStore = useMemo7(() => createTypeRegistryStore(), []);
21629
- return /* @__PURE__ */ jsx136(ThemeProvider, {
21760
+ const jsonViewerStore = useMemo8(() => createJsonViewerStore(props), []);
21761
+ const typeRegistryStore = useMemo8(() => createTypeRegistryStore(), []);
21762
+ return /* @__PURE__ */ jsx137(ThemeProvider, {
21630
21763
  theme,
21631
- children: /* @__PURE__ */ jsx136(TypeRegistryStoreContext.Provider, {
21764
+ children: /* @__PURE__ */ jsx137(TypeRegistryStoreContext.Provider, {
21632
21765
  value: typeRegistryStore,
21633
- children: /* @__PURE__ */ jsx136(JsonViewerStoreContext.Provider, {
21766
+ children: /* @__PURE__ */ jsx137(JsonViewerStoreContext.Provider, {
21634
21767
  value: jsonViewerStore,
21635
- children: /* @__PURE__ */ jsx136(JsonViewerInner, {
21768
+ children: /* @__PURE__ */ jsx137(JsonViewerInner, {
21636
21769
  ...mixedProps
21637
21770
  })
21638
21771
  })
@@ -21642,7 +21775,7 @@ var JsonViewer = function JsonViewer2(props) {
21642
21775
 
21643
21776
  // src/components/event-details/payload-viewer.tsx
21644
21777
  import { memo as memo10 } from "react";
21645
- import { jsx as jsx137 } from "react/jsx-runtime";
21778
+ import { jsx as jsx138 } from "react/jsx-runtime";
21646
21779
  function tryParseJson(value) {
21647
21780
  if (typeof value !== "string") {
21648
21781
  return value;
@@ -21655,7 +21788,7 @@ function tryParseJson(value) {
21655
21788
  }
21656
21789
  var PayloadViewer = memo10(({ sx, testId, value }) => {
21657
21790
  const theme = useTheme3();
21658
- return /* @__PURE__ */ jsx137(Box12, { "data-testid": testId, sx: { backgroundColor: "background.default", borderRadius: 1, fontSize: 12, overflow: "auto", p: 1, ...sx }, children: /* @__PURE__ */ jsx137(
21791
+ return /* @__PURE__ */ jsx138(Box13, { "data-testid": testId, sx: { backgroundColor: "background.default", borderRadius: 1, fontSize: 12, overflow: "auto", p: 1, ...sx }, children: /* @__PURE__ */ jsx138(
21659
21792
  JsonViewer,
21660
21793
  {
21661
21794
  displayDataTypes: false,
@@ -21669,21 +21802,21 @@ var PayloadViewer = memo10(({ sx, testId, value }) => {
21669
21802
  });
21670
21803
 
21671
21804
  // src/components/event-details/event-detail.tsx
21672
- import { Fragment as Fragment9, jsx as jsx138, jsxs as jsxs128 } from "react/jsx-runtime";
21673
- var DetailRow2 = ({ content, label }) => /* @__PURE__ */ jsxs128(Box13, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr", mb: 0.5 }, children: [
21674
- /* @__PURE__ */ jsx138(Typography9, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: label }),
21675
- /* @__PURE__ */ jsx138(Box13, { children: typeof content === "string" ? /* @__PURE__ */ jsx138(Typography9, { sx: { color: "text.primary", whiteSpace: "pre-wrap" }, variant: "caption", children: content }) : content })
21805
+ import { Fragment as Fragment9, jsx as jsx139, jsxs as jsxs129 } from "react/jsx-runtime";
21806
+ var DetailRow2 = ({ content, label }) => /* @__PURE__ */ jsxs129(Box14, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr", mb: 0.5 }, children: [
21807
+ /* @__PURE__ */ jsx139(Typography10, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: label }),
21808
+ /* @__PURE__ */ jsx139(Box14, { children: typeof content === "string" ? /* @__PURE__ */ jsx139(Typography10, { sx: { color: "text.primary", whiteSpace: "pre-wrap" }, variant: "caption", children: content }) : content })
21676
21809
  ] });
21677
21810
  var EventMessage = ({ event }) => {
21678
- const [isOpen, setIsOpen] = useState14(false);
21679
- const [isOverflowing, setIsOverflowing] = useState14(false);
21680
- const textReference = useRef12(null);
21681
- const parsedMessage = useMemo8(() => parseEventMessage(event), [event]);
21682
- const isIAMPolicyEvent = useMemo8(
21811
+ const [isOpen, setIsOpen] = useState15(false);
21812
+ const [isOverflowing, setIsOverflowing] = useState15(false);
21813
+ const textReference = useRef13(null);
21814
+ const parsedMessage = useMemo9(() => parseEventMessage(event), [event]);
21815
+ const isIAMPolicyEvent = useMemo9(
21683
21816
  () => event.event_type === "iam.policy_evaluation" && event.attributes?.payload && typeof event.attributes.payload === "string",
21684
21817
  [event]
21685
21818
  );
21686
- useEffect18(() => {
21819
+ useEffect19(() => {
21687
21820
  const checkOverflow = () => {
21688
21821
  const element = textReference.current;
21689
21822
  if (element) {
@@ -21696,17 +21829,17 @@ var EventMessage = ({ event }) => {
21696
21829
  window.removeEventListener("resize", checkOverflow);
21697
21830
  };
21698
21831
  }, [parsedMessage.headline]);
21699
- const hasAdditionalContent = useMemo8(
21832
+ const hasAdditionalContent = useMemo9(
21700
21833
  () => parsedMessage.message || parsedMessage.details || isIAMPolicyEvent,
21701
21834
  [parsedMessage.message, parsedMessage.details, isIAMPolicyEvent]
21702
21835
  );
21703
- const shouldShowToggle = useMemo8(
21836
+ const shouldShowToggle = useMemo9(
21704
21837
  () => isOverflowing || hasAdditionalContent,
21705
21838
  [isOverflowing, hasAdditionalContent]
21706
21839
  );
21707
- return /* @__PURE__ */ jsxs128(Box13, { sx: { display: "flex", flexDirection: "column" }, children: [
21708
- /* @__PURE__ */ jsxs128(Box13, { sx: { alignItems: "center", display: "flex" }, children: [
21709
- Boolean(shouldShowToggle) && /* @__PURE__ */ jsx138(
21840
+ return /* @__PURE__ */ jsxs129(Box14, { sx: { display: "flex", flexDirection: "column" }, children: [
21841
+ /* @__PURE__ */ jsxs129(Box14, { sx: { alignItems: "center", display: "flex" }, children: [
21842
+ Boolean(shouldShowToggle) && /* @__PURE__ */ jsx139(
21710
21843
  IconButton4,
21711
21844
  {
21712
21845
  onClick: () => {
@@ -21714,11 +21847,11 @@ var EventMessage = ({ event }) => {
21714
21847
  },
21715
21848
  size: "small",
21716
21849
  sx: { mr: 1, p: 0 },
21717
- children: isOpen ? /* @__PURE__ */ jsx138(KeyboardArrowDown, { sx: { fontSize: 16 } }) : /* @__PURE__ */ jsx138(KeyboardArrowRight, { sx: { fontSize: 16 } })
21850
+ children: isOpen ? /* @__PURE__ */ jsx139(KeyboardArrowDown, { sx: { fontSize: 16 } }) : /* @__PURE__ */ jsx139(KeyboardArrowRight, { sx: { fontSize: 16 } })
21718
21851
  }
21719
21852
  ),
21720
- /* @__PURE__ */ jsx138(
21721
- Typography9,
21853
+ /* @__PURE__ */ jsx139(
21854
+ Typography10,
21722
21855
  {
21723
21856
  ref: textReference,
21724
21857
  sx: {
@@ -21735,12 +21868,12 @@ var EventMessage = ({ event }) => {
21735
21868
  }
21736
21869
  )
21737
21870
  ] }),
21738
- isOpen && /* @__PURE__ */ jsx138(Box13, { sx: { borderColor: "divider", borderLeft: "2px solid", ml: 1, mt: 0.5, pl: 1.5, py: 0.5 }, children: isIAMPolicyEvent ? /* @__PURE__ */ jsx138(IAMEventDetail, { event }) : /* @__PURE__ */ jsxs128(Fragment9, { children: [
21739
- Boolean(parsedMessage.message) && /* @__PURE__ */ jsx138(DetailRow2, { content: parsedMessage.message, label: "Message" }),
21740
- Boolean(parsedMessage.details) && /* @__PURE__ */ jsx138(
21871
+ isOpen && /* @__PURE__ */ jsx139(Box14, { sx: { borderColor: "divider", borderLeft: "2px solid", ml: 1, mt: 0.5, pl: 1.5, py: 0.5 }, children: isIAMPolicyEvent ? /* @__PURE__ */ jsx139(IAMEventDetail, { event }) : /* @__PURE__ */ jsxs129(Fragment9, { children: [
21872
+ Boolean(parsedMessage.message) && /* @__PURE__ */ jsx139(DetailRow2, { content: parsedMessage.message, label: "Message" }),
21873
+ Boolean(parsedMessage.details) && /* @__PURE__ */ jsx139(
21741
21874
  DetailRow2,
21742
21875
  {
21743
- content: /* @__PURE__ */ jsx138(PayloadViewer, { sx: { px: 0 }, value: tryParseJson(parsedMessage.details) }),
21876
+ content: /* @__PURE__ */ jsx139(PayloadViewer, { sx: { px: 0 }, value: tryParseJson(parsedMessage.details) }),
21744
21877
  label: "Details"
21745
21878
  }
21746
21879
  )
@@ -21773,15 +21906,15 @@ var EventDetail = ({
21773
21906
  type
21774
21907
  }) => {
21775
21908
  if (type === "permission") {
21776
- return /* @__PURE__ */ jsx138(IAMPermissionDetail, { events, spanStatusCode });
21909
+ return /* @__PURE__ */ jsx139(IAMPermissionDetail, { events, spanStatusCode });
21777
21910
  }
21778
21911
  const eventLevel = getEventLevelFromGroup(type);
21779
- return /* @__PURE__ */ jsxs128(Box13, { children: [
21780
- /* @__PURE__ */ jsxs128(Box13, { sx: { alignItems: "center", display: "flex", mb: 0.5 }, children: [
21781
- /* @__PURE__ */ jsx138(StatusIcon2, { errorLevel: eventLevel }),
21782
- /* @__PURE__ */ jsx138(Typography9, { color: "text.secondary", sx: { fontWeight: 600, ml: 0.5 }, variant: "caption", children: displayText })
21912
+ return /* @__PURE__ */ jsxs129(Box14, { children: [
21913
+ /* @__PURE__ */ jsxs129(Box14, { sx: { alignItems: "center", display: "flex", mb: 0.5 }, children: [
21914
+ /* @__PURE__ */ jsx139(StatusIcon2, { errorLevel: eventLevel }),
21915
+ /* @__PURE__ */ jsx139(Typography10, { color: "text.secondary", sx: { fontWeight: 600, ml: 0.5 }, variant: "caption", children: displayText })
21783
21916
  ] }),
21784
- /* @__PURE__ */ jsx138(Box13, { children: events.map((event) => /* @__PURE__ */ jsx138(Box13, { sx: { maxWidth: "100%", mb: 0.5 }, children: /* @__PURE__ */ jsx138(EventMessage, { event }) }, `${event.span_id}-${event.event_id}`)) })
21917
+ /* @__PURE__ */ jsx139(Box14, { children: events.map((event) => /* @__PURE__ */ jsx139(Box14, { sx: { maxWidth: "100%", mb: 0.5 }, children: /* @__PURE__ */ jsx139(EventMessage, { event }) }, `${event.span_id}-${event.event_id}`)) })
21785
21918
  ] });
21786
21919
  };
21787
21920
 
@@ -22223,18 +22356,18 @@ function toBase64(_input) {
22223
22356
  // node_modules/.pnpm/@smithy+util-stream@4.5.25/node_modules/@smithy/util-stream/dist-es/blob/Uint8ArrayBlobAdapter.js
22224
22357
  init_dist_es();
22225
22358
  var Uint8ArrayBlobAdapter = class _Uint8ArrayBlobAdapter extends Uint8Array {
22226
- static fromString(source, encoding = "utf-8") {
22227
- if (typeof source === "string") {
22359
+ static fromString(source2, encoding = "utf-8") {
22360
+ if (typeof source2 === "string") {
22228
22361
  if (encoding === "base64") {
22229
- return _Uint8ArrayBlobAdapter.mutate(fromBase64(source));
22362
+ return _Uint8ArrayBlobAdapter.mutate(fromBase64(source2));
22230
22363
  }
22231
- return _Uint8ArrayBlobAdapter.mutate(fromUtf8(source));
22364
+ return _Uint8ArrayBlobAdapter.mutate(fromUtf8(source2));
22232
22365
  }
22233
- throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`);
22366
+ throw new Error(`Unsupported conversion from ${typeof source2} to Uint8ArrayBlobAdapter.`);
22234
22367
  }
22235
- static mutate(source) {
22236
- Object.setPrototypeOf(source, _Uint8ArrayBlobAdapter.prototype);
22237
- return source;
22368
+ static mutate(source2) {
22369
+ Object.setPrototypeOf(source2, _Uint8ArrayBlobAdapter.prototype);
22370
+ return source2;
22238
22371
  }
22239
22372
  transformToString(encoding = "utf-8") {
22240
22373
  if (encoding === "base64") {
@@ -28459,7 +28592,7 @@ var SmithyMessageEncoderStream = class {
28459
28592
  };
28460
28593
 
28461
28594
  // node_modules/.pnpm/@smithy+eventstream-serde-universal@4.2.14/node_modules/@smithy/eventstream-serde-universal/dist-es/getChunkedStream.js
28462
- function getChunkedStream(source) {
28595
+ function getChunkedStream(source2) {
28463
28596
  let currentMessageTotalLength = 0;
28464
28597
  let currentMessagePendingLength = 0;
28465
28598
  let currentMessage = null;
@@ -28475,7 +28608,7 @@ function getChunkedStream(source) {
28475
28608
  currentMessageView.setUint32(0, size, false);
28476
28609
  };
28477
28610
  const iterator = async function* () {
28478
- const sourceIterator = source[Symbol.asyncIterator]();
28611
+ const sourceIterator = source2[Symbol.asyncIterator]();
28479
28612
  while (true) {
28480
28613
  const { value, done } = await sourceIterator.next();
28481
28614
  if (done) {
@@ -31738,9 +31871,9 @@ var QueryStatus = {
31738
31871
  };
31739
31872
 
31740
31873
  // src/components/event-details/lambda-invoke-logs-section.tsx
31741
- import { Box as Box14, CircularProgress as CircularProgress3, Stack as Stack3, Typography as Typography10 } from "@mui/material";
31742
- import { useEffect as useEffect19, useMemo as useMemo9, useRef as useRef13, useState as useState15 } from "react";
31743
- import { jsx as jsx139, jsxs as jsxs129 } from "react/jsx-runtime";
31874
+ import { Box as Box15, CircularProgress as CircularProgress3, Stack as Stack3, Typography as Typography11 } from "@mui/material";
31875
+ import { useEffect as useEffect20, useMemo as useMemo10, useRef as useRef14, useState as useState16 } from "react";
31876
+ import { jsx as jsx140, jsxs as jsxs130 } from "react/jsx-runtime";
31744
31877
  var POLL_INTERVAL_MS2 = 1e3;
31745
31878
  async function pollQueryResults(client, queryId) {
31746
31879
  return client.send(new GetQueryResultsCommand({ queryId }));
@@ -31757,7 +31890,7 @@ async function startLambdaLogsQuery(client, functionName2, requestId, startTimeS
31757
31890
  }
31758
31891
  function useCloudWatchLogsClient(region) {
31759
31892
  const { localstackEndpoint } = useAppInspector();
31760
- const client = useMemo9(() => new CloudWatchLogsClient({
31893
+ const client = useMemo10(() => new CloudWatchLogsClient({
31761
31894
  credentials: {
31762
31895
  accessKeyId: "test",
31763
31896
  secretAccessKey: "test"
@@ -31768,12 +31901,12 @@ function useCloudWatchLogsClient(region) {
31768
31901
  return client;
31769
31902
  }
31770
31903
  function useLambdaInvokeLogs(functionName2, requestId, region, startTimeNano, endTimeNano) {
31771
- const [loading, setLoading] = useState15(true);
31772
- const [logs, setLogs] = useState15([]);
31773
- const [error, setError] = useState15();
31774
- const pollTimerRef = useRef13(null);
31904
+ const [loading, setLoading] = useState16(true);
31905
+ const [logs, setLogs] = useState16([]);
31906
+ const [error, setError] = useState16();
31907
+ const pollTimerRef = useRef14(null);
31775
31908
  const cloudWatchLogs = useCloudWatchLogsClient(region);
31776
- useEffect19(() => {
31909
+ useEffect20(() => {
31777
31910
  let cancelled = false;
31778
31911
  const startTimeSec = Math.floor(Number(BigInt(startTimeNano) / BigInt(1e9)));
31779
31912
  const endTimeSec = Math.ceil(Number(BigInt(endTimeNano) / BigInt(1e9)));
@@ -31830,30 +31963,30 @@ function useLambdaInvokeLogs(functionName2, requestId, region, startTimeNano, en
31830
31963
  var LambdaInvokeLogsSection = ({ endTimeNano, functionName: functionName2, region, requestId, startTimeNano }) => {
31831
31964
  const { error, loading, logs } = useLambdaInvokeLogs(functionName2, requestId, region, startTimeNano, endTimeNano);
31832
31965
  if (loading) {
31833
- return /* @__PURE__ */ jsxs129(Stack3, { alignItems: "center", direction: "row", spacing: 1, children: [
31834
- /* @__PURE__ */ jsx139(CircularProgress3, { size: 14 }),
31835
- /* @__PURE__ */ jsx139(Typography10, { color: "text.secondary", variant: "body2", children: "Loading logs\u2026" })
31966
+ return /* @__PURE__ */ jsxs130(Stack3, { alignItems: "center", direction: "row", spacing: 1, children: [
31967
+ /* @__PURE__ */ jsx140(CircularProgress3, { size: 14 }),
31968
+ /* @__PURE__ */ jsx140(Typography11, { color: "text.secondary", variant: "body2", children: "Loading logs\u2026" })
31836
31969
  ] });
31837
31970
  }
31838
31971
  if (error !== void 0) {
31839
- return /* @__PURE__ */ jsx139(Typography10, { color: "error", variant: "body2", children: error.message });
31972
+ return /* @__PURE__ */ jsx140(Typography11, { color: "error", variant: "body2", children: error.message });
31840
31973
  }
31841
31974
  if (logs.length === 0) {
31842
- return /* @__PURE__ */ jsx139(Typography10, { color: "text.secondary", variant: "body2", children: "No logs found for this invocation." });
31975
+ return /* @__PURE__ */ jsx140(Typography11, { color: "text.secondary", variant: "body2", children: "No logs found for this invocation." });
31843
31976
  }
31844
- return /* @__PURE__ */ jsx139(Box14, { sx: { backgroundColor: (theme) => theme.palette.background.default, borderRadius: 1, p: 1 }, children: /* @__PURE__ */ jsx139("pre", { style: { margin: 0, overflow: "auto" }, children: logs.map((log) => /* @__PURE__ */ jsx139(Typography10, { variant: "body2", children: `[${log.timestamp}] ${log.message}` }, log.ptr)) }) });
31977
+ return /* @__PURE__ */ jsx140(Box15, { sx: { backgroundColor: (theme) => theme.palette.background.default, borderRadius: 1, p: 1 }, children: /* @__PURE__ */ jsx140("pre", { style: { margin: 0, overflow: "auto" }, children: logs.map((log) => /* @__PURE__ */ jsx140(Typography11, { variant: "body2", children: `[${log.timestamp}] ${log.message}` }, log.ptr)) }) });
31845
31978
  };
31846
31979
 
31847
31980
  // src/components/event-details/toggle-section.tsx
31848
31981
  import { KeyboardArrowDown as KeyboardArrowDown2, KeyboardArrowRight as KeyboardArrowRight2 } from "@mui/icons-material";
31849
- import { Box as Box15, Typography as Typography11 } from "@mui/material";
31850
- import { useState as useState16 } from "react";
31851
- import { jsx as jsx140, jsxs as jsxs130 } from "react/jsx-runtime";
31982
+ import { Box as Box16, Typography as Typography12 } from "@mui/material";
31983
+ import { useState as useState17 } from "react";
31984
+ import { jsx as jsx141, jsxs as jsxs131 } from "react/jsx-runtime";
31852
31985
  var ToggleSection = ({ action, children, headline, initialOpen = true }) => {
31853
- const [isOpen, setIsOpen] = useState16(initialOpen);
31854
- return /* @__PURE__ */ jsxs130(Box15, { sx: { mt: 4 }, children: [
31855
- /* @__PURE__ */ jsxs130(
31856
- Box15,
31986
+ const [isOpen, setIsOpen] = useState17(initialOpen);
31987
+ return /* @__PURE__ */ jsxs131(Box16, { sx: { mt: 4 }, children: [
31988
+ /* @__PURE__ */ jsxs131(
31989
+ Box16,
31857
31990
  {
31858
31991
  onClick: () => {
31859
31992
  setIsOpen(!isOpen);
@@ -31866,8 +31999,8 @@ var ToggleSection = ({ action, children, headline, initialOpen = true }) => {
31866
31999
  mb: 1
31867
32000
  },
31868
32001
  children: [
31869
- /* @__PURE__ */ jsxs130(
31870
- Box15,
32002
+ /* @__PURE__ */ jsxs131(
32003
+ Box16,
31871
32004
  {
31872
32005
  role: "button",
31873
32006
  sx: {
@@ -31876,23 +32009,23 @@ var ToggleSection = ({ action, children, headline, initialOpen = true }) => {
31876
32009
  gap: 1
31877
32010
  },
31878
32011
  children: [
31879
- /* @__PURE__ */ jsx140(Typography11, { sx: { fontWeight: 600 }, variant: "subtitle2", children: headline }),
31880
- isOpen ? /* @__PURE__ */ jsx140(KeyboardArrowDown2, { sx: { color: "text.secondary", height: 20, width: 20 } }) : /* @__PURE__ */ jsx140(KeyboardArrowRight2, { sx: { color: "text.secondary", height: 20, width: 20 } })
32012
+ /* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600 }, variant: "subtitle2", children: headline }),
32013
+ isOpen ? /* @__PURE__ */ jsx141(KeyboardArrowDown2, { sx: { color: "text.secondary", height: 20, width: 20 } }) : /* @__PURE__ */ jsx141(KeyboardArrowRight2, { sx: { color: "text.secondary", height: 20, width: 20 } })
31881
32014
  ]
31882
32015
  }
31883
32016
  ),
31884
- action !== false && /* @__PURE__ */ jsx140(Box15, { onClick: (event) => {
32017
+ action !== false && /* @__PURE__ */ jsx141(Box16, { onClick: (event) => {
31885
32018
  event.stopPropagation();
31886
32019
  }, children: action })
31887
32020
  ]
31888
32021
  }
31889
32022
  ),
31890
- isOpen && /* @__PURE__ */ jsx140(Box15, { children })
32023
+ isOpen && /* @__PURE__ */ jsx141(Box16, { children })
31891
32024
  ] });
31892
32025
  };
31893
32026
 
31894
32027
  // src/components/event-details/event-details.tsx
31895
- import { Fragment as Fragment10, jsx as jsx141, jsxs as jsxs131 } from "react/jsx-runtime";
32028
+ import { Fragment as Fragment10, jsx as jsx142, jsxs as jsxs132 } from "react/jsx-runtime";
31896
32029
  var checkIsLambdaInvoke = (span) => {
31897
32030
  if (span.service_name !== "lambda") {
31898
32031
  return false;
@@ -31907,13 +32040,13 @@ var checkIsSqsSendMessage = (span) => {
31907
32040
  return span.operation_name.startsWith("SendMessage");
31908
32041
  };
31909
32042
  var EventDetails = ({ onClose, selectedEvent }) => {
31910
- const eventGroups = useMemo10(
32043
+ const eventGroups = useMemo11(
31911
32044
  () => getEventGroupsByType(selectedEvent?.events ?? []),
31912
32045
  [selectedEvent?.events]
31913
32046
  );
31914
- const [parseNestedJson, setParseNestedJson] = useState17(true);
32047
+ const [parseNestedJson, setParseNestedJson] = useState18(true);
31915
32048
  if (!selectedEvent) {
31916
- return /* @__PURE__ */ jsx141(Box16, { sx: { p: 3, textAlign: "center" }, children: /* @__PURE__ */ jsx141(Typography12, { color: "text.secondary", variant: "body2", children: "Select an operation to view graph" }) });
32049
+ return /* @__PURE__ */ jsx142(Box17, { sx: { p: 3, textAlign: "center" }, children: /* @__PURE__ */ jsx142(Typography13, { color: "text.secondary", variant: "body2", children: "Select an operation to view graph" }) });
31917
32050
  }
31918
32051
  const isLambdaInvoke = checkIsLambdaInvoke(selectedEvent);
31919
32052
  const isSqsSendMessage = checkIsSqsSendMessage(selectedEvent);
@@ -31939,9 +32072,9 @@ var EventDetails = ({ onClose, selectedEvent }) => {
31939
32072
  const exceptionPayload = tryParseJson(selectedEvent.attributes?.["localstack.aws.service.exception"]);
31940
32073
  const hasPayloads = requestPayload !== void 0 || responsePayload !== void 0 || exceptionPayload !== void 0 || isResponseSuppressed;
31941
32074
  const duration = selectedEvent.end_time_unix_nano ? ((BigInt(selectedEvent.end_time_unix_nano) - BigInt(selectedEvent.start_time_unix_nano)) / BigInt("1000000")).toString() : void 0;
31942
- return /* @__PURE__ */ jsxs131(Box16, { "data-testid": EVENT_DETAILS_TEST_ID, sx: { display: "flex", flexDirection: "column", height: "100%" }, children: [
31943
- /* @__PURE__ */ jsxs131(
31944
- Box16,
32075
+ return /* @__PURE__ */ jsxs132(Box17, { "data-testid": EVENT_DETAILS_TEST_ID, sx: { display: "flex", flexDirection: "column", height: "100%" }, children: [
32076
+ /* @__PURE__ */ jsxs132(
32077
+ Box17,
31945
32078
  {
31946
32079
  sx: {
31947
32080
  alignItems: "center",
@@ -31953,90 +32086,90 @@ var EventDetails = ({ onClose, selectedEvent }) => {
31953
32086
  py: 1
31954
32087
  },
31955
32088
  children: [
31956
- /* @__PURE__ */ jsx141(Box16, { children: /* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600 }, variant: "h6", children: "Operation Details" }) }),
31957
- onClose && /* @__PURE__ */ jsx141(IconButton5, { "data-testid": EVENT_DETAILS_CLOSE_BUTTON_TEST_ID, onClick: onClose, size: "small", children: /* @__PURE__ */ jsx141(Close3, {}) })
32089
+ /* @__PURE__ */ jsx142(Box17, { children: /* @__PURE__ */ jsx142(Typography13, { sx: { fontWeight: 600 }, variant: "h6", children: "Operation Details" }) }),
32090
+ onClose && /* @__PURE__ */ jsx142(IconButton5, { "data-testid": EVENT_DETAILS_CLOSE_BUTTON_TEST_ID, onClick: onClose, size: "small", children: /* @__PURE__ */ jsx142(Close3, {}) })
31958
32091
  ]
31959
32092
  }
31960
32093
  ),
31961
- /* @__PURE__ */ jsx141(Box16, { sx: { flexGrow: 1, overflow: "auto", p: 2 }, children: /* @__PURE__ */ jsxs131(Stack4, { spacing: 2, children: [
31962
- /* @__PURE__ */ jsx141(ToggleSection, { headline: "Basic Information", children: /* @__PURE__ */ jsxs131(Stack4, { "data-testid": EVENT_DETAILS_SECTION_BASIC_INFORMATION_TEST_ID, spacing: 1, children: [
31963
- /* @__PURE__ */ jsxs131(Box16, { sx: { display: "grid", gap: 2, gridTemplateColumns: "1.3fr 1fr" }, children: [
31964
- /* @__PURE__ */ jsxs131(Box16, { children: [
31965
- /* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600 }, variant: "caption", children: "Service" }),
31966
- /* @__PURE__ */ jsxs131(Stack4, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31967
- /* @__PURE__ */ jsx141(Typography12, { "data-testid": EVENT_DETAILS_SERVICE_NAME_TEST_ID, variant: "body2", children: getServiceDisplayName(selectedEvent.service_name) }),
31968
- /* @__PURE__ */ jsx141(CopyButton, { value: getServiceDisplayName(selectedEvent.service_name) })
32094
+ /* @__PURE__ */ jsx142(Box17, { sx: { flexGrow: 1, overflow: "auto", p: 2 }, children: /* @__PURE__ */ jsxs132(Stack4, { spacing: 2, children: [
32095
+ /* @__PURE__ */ jsx142(ToggleSection, { headline: "Basic Information", children: /* @__PURE__ */ jsxs132(Stack4, { "data-testid": EVENT_DETAILS_SECTION_BASIC_INFORMATION_TEST_ID, spacing: 1, children: [
32096
+ /* @__PURE__ */ jsxs132(Box17, { sx: { display: "grid", gap: 2, gridTemplateColumns: "1.3fr 1fr" }, children: [
32097
+ /* @__PURE__ */ jsxs132(Box17, { children: [
32098
+ /* @__PURE__ */ jsx142(Typography13, { sx: { fontWeight: 600 }, variant: "caption", children: "Service" }),
32099
+ /* @__PURE__ */ jsxs132(Stack4, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
32100
+ /* @__PURE__ */ jsx142(Typography13, { "data-testid": EVENT_DETAILS_SERVICE_NAME_TEST_ID, variant: "body2", children: getServiceDisplayName(selectedEvent.service_name) }),
32101
+ /* @__PURE__ */ jsx142(CopyButton, { value: getServiceDisplayName(selectedEvent.service_name) })
31969
32102
  ] })
31970
32103
  ] }),
31971
- /* @__PURE__ */ jsxs131(Box16, { children: [
31972
- /* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600 }, variant: "caption", children: "Action" }),
31973
- /* @__PURE__ */ jsxs131(Stack4, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31974
- /* @__PURE__ */ jsx141(Typography12, { "data-testid": EVENT_DETAILS_OPERATION_NAME_TEST_ID, variant: "body2", children: selectedEvent.operation_name }),
31975
- /* @__PURE__ */ jsx141(CopyButton, { value: selectedEvent.operation_name })
32104
+ /* @__PURE__ */ jsxs132(Box17, { children: [
32105
+ /* @__PURE__ */ jsx142(Typography13, { sx: { fontWeight: 600 }, variant: "caption", children: "Action" }),
32106
+ /* @__PURE__ */ jsxs132(Stack4, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
32107
+ /* @__PURE__ */ jsx142(Typography13, { "data-testid": EVENT_DETAILS_OPERATION_NAME_TEST_ID, variant: "body2", children: selectedEvent.operation_name }),
32108
+ /* @__PURE__ */ jsx142(CopyButton, { value: selectedEvent.operation_name })
31976
32109
  ] })
31977
32110
  ] })
31978
32111
  ] }),
31979
- /* @__PURE__ */ jsxs131(Box16, { sx: cfnResourceType ? { display: "grid", gap: 2, gridTemplateColumns: "1.3fr 1fr" } : void 0, children: [
31980
- /* @__PURE__ */ jsxs131(Box16, { children: [
31981
- /* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600 }, variant: "caption", children: "Resource" }),
31982
- /* @__PURE__ */ jsxs131(Stack4, { alignItems: "center", "data-testid": EVENT_DETAILS_RESOURCE_NAME_TEST_ID, direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31983
- /* @__PURE__ */ jsx141(Typography12, { variant: "body2", children: selectedEvent.resource_name }),
31984
- /* @__PURE__ */ jsx141(CopyButton, { value: selectedEvent.resource_name })
32112
+ /* @__PURE__ */ jsxs132(Box17, { sx: cfnResourceType ? { display: "grid", gap: 2, gridTemplateColumns: "1.3fr 1fr" } : void 0, children: [
32113
+ /* @__PURE__ */ jsxs132(Box17, { children: [
32114
+ /* @__PURE__ */ jsx142(Typography13, { sx: { fontWeight: 600 }, variant: "caption", children: "Resource" }),
32115
+ /* @__PURE__ */ jsxs132(Stack4, { alignItems: "center", "data-testid": EVENT_DETAILS_RESOURCE_NAME_TEST_ID, direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
32116
+ /* @__PURE__ */ jsx142(Typography13, { variant: "body2", children: selectedEvent.resource_name }),
32117
+ /* @__PURE__ */ jsx142(CopyButton, { value: selectedEvent.resource_name })
31985
32118
  ] })
31986
32119
  ] }),
31987
- Boolean(cfnResourceType) && /* @__PURE__ */ jsxs131(Box16, { children: [
31988
- /* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600 }, variant: "caption", children: "Resource Type" }),
31989
- /* @__PURE__ */ jsxs131(Stack4, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31990
- /* @__PURE__ */ jsx141(Typography12, { "data-testid": EVENT_DETAILS_CFN_RESOURCE_TYPE_TEST_ID, variant: "body2", children: cfnResourceType }),
31991
- /* @__PURE__ */ jsx141(CopyButton, { value: cfnResourceType })
32120
+ Boolean(cfnResourceType) && /* @__PURE__ */ jsxs132(Box17, { children: [
32121
+ /* @__PURE__ */ jsx142(Typography13, { sx: { fontWeight: 600 }, variant: "caption", children: "Resource Type" }),
32122
+ /* @__PURE__ */ jsxs132(Stack4, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
32123
+ /* @__PURE__ */ jsx142(Typography13, { "data-testid": EVENT_DETAILS_CFN_RESOURCE_TYPE_TEST_ID, variant: "body2", children: cfnResourceType }),
32124
+ /* @__PURE__ */ jsx142(CopyButton, { value: cfnResourceType })
31992
32125
  ] })
31993
32126
  ] })
31994
32127
  ] }),
31995
- Boolean(resourceArn) && /* @__PURE__ */ jsxs131(Box16, { children: [
31996
- /* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600 }, variant: "caption", children: "Resource ARN" }),
31997
- /* @__PURE__ */ jsxs131(Stack4, { alignItems: "center", "data-testid": EVENT_DETAILS_RESOURCE_ARN_TEST_ID, direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
31998
- /* @__PURE__ */ jsx141(Typography12, { variant: "body2", children: resourceArn }),
31999
- /* @__PURE__ */ jsx141(CopyButton, { value: resourceArn })
32128
+ Boolean(resourceArn) && /* @__PURE__ */ jsxs132(Box17, { children: [
32129
+ /* @__PURE__ */ jsx142(Typography13, { sx: { fontWeight: 600 }, variant: "caption", children: "Resource ARN" }),
32130
+ /* @__PURE__ */ jsxs132(Stack4, { alignItems: "center", "data-testid": EVENT_DETAILS_RESOURCE_ARN_TEST_ID, direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
32131
+ /* @__PURE__ */ jsx142(Typography13, { variant: "body2", children: resourceArn }),
32132
+ /* @__PURE__ */ jsx142(CopyButton, { value: resourceArn })
32000
32133
  ] })
32001
32134
  ] }),
32002
- /* @__PURE__ */ jsxs131(Box16, { sx: { display: "grid", gap: 1, gridTemplateColumns: "1.3fr 1fr" }, children: [
32003
- /* @__PURE__ */ jsxs131(Box16, { children: [
32004
- /* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600 }, variant: "caption", children: "Account" }),
32005
- /* @__PURE__ */ jsxs131(Stack4, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
32006
- /* @__PURE__ */ jsx141(Typography12, { "data-testid": EVENT_DETAILS_ACCOUNT_TEST_ID, variant: "body2", children: selectedEvent.account_id }),
32007
- /* @__PURE__ */ jsx141(CopyButton, { value: selectedEvent.account_id })
32135
+ /* @__PURE__ */ jsxs132(Box17, { sx: { display: "grid", gap: 1, gridTemplateColumns: "1.3fr 1fr" }, children: [
32136
+ /* @__PURE__ */ jsxs132(Box17, { children: [
32137
+ /* @__PURE__ */ jsx142(Typography13, { sx: { fontWeight: 600 }, variant: "caption", children: "Account" }),
32138
+ /* @__PURE__ */ jsxs132(Stack4, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
32139
+ /* @__PURE__ */ jsx142(Typography13, { "data-testid": EVENT_DETAILS_ACCOUNT_TEST_ID, variant: "body2", children: selectedEvent.account_id }),
32140
+ /* @__PURE__ */ jsx142(CopyButton, { value: selectedEvent.account_id })
32008
32141
  ] })
32009
32142
  ] }),
32010
- /* @__PURE__ */ jsxs131(Box16, { children: [
32011
- /* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600 }, variant: "caption", children: "Region" }),
32012
- /* @__PURE__ */ jsxs131(Stack4, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
32013
- /* @__PURE__ */ jsx141(Typography12, { "data-testid": EVENT_DETAILS_REGION_TEST_ID, variant: "body2", children: selectedEvent.region }),
32014
- /* @__PURE__ */ jsx141(CopyButton, { value: selectedEvent.region })
32143
+ /* @__PURE__ */ jsxs132(Box17, { children: [
32144
+ /* @__PURE__ */ jsx142(Typography13, { sx: { fontWeight: 600 }, variant: "caption", children: "Region" }),
32145
+ /* @__PURE__ */ jsxs132(Stack4, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
32146
+ /* @__PURE__ */ jsx142(Typography13, { "data-testid": EVENT_DETAILS_REGION_TEST_ID, variant: "body2", children: selectedEvent.region }),
32147
+ /* @__PURE__ */ jsx142(CopyButton, { value: selectedEvent.region })
32015
32148
  ] })
32016
32149
  ] })
32017
32150
  ] }),
32018
- /* @__PURE__ */ jsxs131(Box16, { sx: { display: "grid", gap: 1, gridTemplateColumns: duration === void 0 ? "1fr" : "1.3fr 1fr" }, children: [
32019
- /* @__PURE__ */ jsxs131(Box16, { children: [
32020
- /* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600 }, variant: "caption", children: "Start Time" }),
32021
- /* @__PURE__ */ jsxs131(Stack4, { alignItems: "center", "data-testid": EVENT_DETAILS_START_TIME_TEST_ID, direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
32022
- /* @__PURE__ */ jsx141(Typography12, { variant: "body2", children: /* @__PURE__ */ jsx141(ResponsiveTimestampCell, { date: unixNanoToDate(selectedEvent.start_time_unix_nano) }) }),
32023
- /* @__PURE__ */ jsx141(CopyButton, { value: unixNanoToDate(selectedEvent.start_time_unix_nano)?.toISOString() })
32151
+ /* @__PURE__ */ jsxs132(Box17, { sx: { display: "grid", gap: 1, gridTemplateColumns: duration === void 0 ? "1fr" : "1.3fr 1fr" }, children: [
32152
+ /* @__PURE__ */ jsxs132(Box17, { children: [
32153
+ /* @__PURE__ */ jsx142(Typography13, { sx: { fontWeight: 600 }, variant: "caption", children: "Start Time" }),
32154
+ /* @__PURE__ */ jsxs132(Stack4, { alignItems: "center", "data-testid": EVENT_DETAILS_START_TIME_TEST_ID, direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
32155
+ /* @__PURE__ */ jsx142(Typography13, { variant: "body2", children: /* @__PURE__ */ jsx142(ResponsiveTimestampCell, { date: unixNanoToDate(selectedEvent.start_time_unix_nano) }) }),
32156
+ /* @__PURE__ */ jsx142(CopyButton, { value: unixNanoToDate(selectedEvent.start_time_unix_nano)?.toISOString() })
32024
32157
  ] })
32025
32158
  ] }),
32026
- duration !== void 0 && /* @__PURE__ */ jsxs131(Box16, { children: [
32027
- /* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600 }, variant: "caption", children: "Duration" }),
32028
- /* @__PURE__ */ jsxs131(Stack4, { alignItems: "center", "data-testid": EVENT_DETAILS_DURATION_TEST_ID, direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
32029
- /* @__PURE__ */ jsxs131(Typography12, { variant: "body2", children: [
32159
+ duration !== void 0 && /* @__PURE__ */ jsxs132(Box17, { children: [
32160
+ /* @__PURE__ */ jsx142(Typography13, { sx: { fontWeight: 600 }, variant: "caption", children: "Duration" }),
32161
+ /* @__PURE__ */ jsxs132(Stack4, { alignItems: "center", "data-testid": EVENT_DETAILS_DURATION_TEST_ID, direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
32162
+ /* @__PURE__ */ jsxs132(Typography13, { variant: "body2", children: [
32030
32163
  duration,
32031
32164
  "ms"
32032
32165
  ] }),
32033
- /* @__PURE__ */ jsx141(CopyButton, { value: `${duration}ms` })
32166
+ /* @__PURE__ */ jsx142(CopyButton, { value: `${duration}ms` })
32034
32167
  ] })
32035
32168
  ] })
32036
32169
  ] }),
32037
- /* @__PURE__ */ jsxs131(Box16, { children: [
32038
- /* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600 }, variant: "caption", children: "Status" }),
32039
- /* @__PURE__ */ jsx141(Stack4, { alignItems: "center", direction: "row", flexWrap: "wrap", gap: 1, sx: { mb: eventGroups.errors || eventGroups.warnings ? 1 : 0 }, children: /* @__PURE__ */ jsx141(
32170
+ /* @__PURE__ */ jsxs132(Box17, { children: [
32171
+ /* @__PURE__ */ jsx142(Typography13, { sx: { fontWeight: 600 }, variant: "caption", children: "Status" }),
32172
+ /* @__PURE__ */ jsx142(Stack4, { alignItems: "center", direction: "row", flexWrap: "wrap", gap: 1, sx: { mb: eventGroups.errors || eventGroups.warnings ? 1 : 0 }, children: /* @__PURE__ */ jsx142(
32040
32173
  Chip3,
32041
32174
  {
32042
32175
  color: selectedEvent.status_code === 2 ? "error" : selectedEvent.status_code === 1 ? "success" : "default",
@@ -32047,50 +32180,50 @@ var EventDetails = ({ onClose, selectedEvent }) => {
32047
32180
  ) })
32048
32181
  ] })
32049
32182
  ] }) }),
32050
- /* @__PURE__ */ jsx141(Divider4, {}),
32051
- /* @__PURE__ */ jsxs131(ToggleSection, { headline: "Permissions", children: [
32052
- selectedEvent.iam_errors_suppressed && /* @__PURE__ */ jsx141(Alert4, { "data-testid": EVENT_DETAILS_IAM_ERRORS_SUPPRESSED_TEST_ID, severity: "warning", sx: { mb: 1 }, children: "IAM errors are suppressed \u2014 upgrade your license to view" }),
32053
- !selectedEvent.iam_errors_suppressed && !eventGroups.permissions && !eventGroups.errors && !eventGroups.warnings && /* @__PURE__ */ jsx141(Typography12, { color: "text.secondary", variant: "body2", children: "There is no permission information available." }),
32054
- eventGroups.permissions && /* @__PURE__ */ jsx141(EventDetail, { displayText: "Permissions", events: eventGroups.permissions, spanStatusCode: selectedEvent.status_code, type: "permission" }),
32055
- eventGroups.errors && /* @__PURE__ */ jsx141(EventDetail, { displayText: "Error", events: eventGroups.errors, type: "error" }),
32056
- eventGroups.warnings && /* @__PURE__ */ jsx141(EventDetail, { displayText: "Warning", events: eventGroups.warnings, type: "warning" })
32183
+ /* @__PURE__ */ jsx142(Divider4, {}),
32184
+ /* @__PURE__ */ jsxs132(ToggleSection, { headline: "Permissions", children: [
32185
+ selectedEvent.iam_errors_suppressed && /* @__PURE__ */ jsx142(Alert5, { "data-testid": EVENT_DETAILS_IAM_ERRORS_SUPPRESSED_TEST_ID, severity: "warning", sx: { mb: 1 }, children: "IAM errors are suppressed \u2014 upgrade your license to view" }),
32186
+ !selectedEvent.iam_errors_suppressed && !eventGroups.permissions && !eventGroups.errors && !eventGroups.warnings && /* @__PURE__ */ jsx142(Typography13, { color: "text.secondary", variant: "body2", children: "There is no permission information available." }),
32187
+ eventGroups.permissions && /* @__PURE__ */ jsx142(EventDetail, { displayText: "Permissions", events: eventGroups.permissions, spanStatusCode: selectedEvent.status_code, type: "permission" }),
32188
+ eventGroups.errors && /* @__PURE__ */ jsx142(EventDetail, { displayText: "Error", events: eventGroups.errors, type: "error" }),
32189
+ eventGroups.warnings && /* @__PURE__ */ jsx142(EventDetail, { displayText: "Warning", events: eventGroups.warnings, type: "warning" })
32057
32190
  ] }),
32058
- hasPayloads && /* @__PURE__ */ jsxs131(Fragment10, { children: [
32059
- /* @__PURE__ */ jsx141(Divider4, {}),
32060
- /* @__PURE__ */ jsx141(
32191
+ hasPayloads && /* @__PURE__ */ jsxs132(Fragment10, { children: [
32192
+ /* @__PURE__ */ jsx142(Divider4, {}),
32193
+ /* @__PURE__ */ jsx142(
32061
32194
  ToggleSection,
32062
32195
  {
32063
- action: /* @__PURE__ */ jsx141(
32196
+ action: /* @__PURE__ */ jsx142(
32064
32197
  FormControlLabel,
32065
32198
  {
32066
- control: /* @__PURE__ */ jsx141(Switch, { checked: !parseNestedJson, onChange: (event) => {
32199
+ control: /* @__PURE__ */ jsx142(Switch, { checked: !parseNestedJson, onChange: (event) => {
32067
32200
  setParseNestedJson(!event.target.checked);
32068
32201
  }, size: "small" }),
32069
- label: /* @__PURE__ */ jsx141(Typography12, { variant: "caption", children: "View raw data" }),
32202
+ label: /* @__PURE__ */ jsx142(Typography13, { variant: "caption", children: "View raw data" }),
32070
32203
  sx: { mr: 0 }
32071
32204
  }
32072
32205
  ),
32073
32206
  headline: "Payloads",
32074
- children: /* @__PURE__ */ jsxs131(Stack4, { spacing: 2, children: [
32075
- requestPayload !== void 0 && /* @__PURE__ */ jsxs131(Box16, { children: [
32076
- /* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Request" }),
32077
- /* @__PURE__ */ jsx141(PayloadViewer, { testId: EVENT_DETAILS_REQUEST_PAYLOAD, value: requestPayload })
32207
+ children: /* @__PURE__ */ jsxs132(Stack4, { spacing: 2, children: [
32208
+ requestPayload !== void 0 && /* @__PURE__ */ jsxs132(Box17, { children: [
32209
+ /* @__PURE__ */ jsx142(Typography13, { sx: { fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Request" }),
32210
+ /* @__PURE__ */ jsx142(PayloadViewer, { testId: EVENT_DETAILS_REQUEST_PAYLOAD, value: requestPayload })
32078
32211
  ] }),
32079
- (responsePayload !== void 0 || isResponseSuppressed) && /* @__PURE__ */ jsxs131(Box16, { children: [
32080
- /* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Response" }),
32081
- isResponseSuppressed ? /* @__PURE__ */ jsx141(Box16, { sx: { py: 1 }, children: /* @__PURE__ */ jsx141(Alert4, { severity: "warning", sx: { mb: 1 }, children: "Response payload is available \u2014 upgrade your license to view" }) }) : /* @__PURE__ */ jsx141(PayloadViewer, { testId: EVENT_DETAILS_RESPONSE_PAYLOAD_TEST_ID, value: responsePayload })
32212
+ (responsePayload !== void 0 || isResponseSuppressed) && /* @__PURE__ */ jsxs132(Box17, { children: [
32213
+ /* @__PURE__ */ jsx142(Typography13, { sx: { fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Response" }),
32214
+ isResponseSuppressed ? /* @__PURE__ */ jsx142(Box17, { sx: { py: 1 }, children: /* @__PURE__ */ jsx142(Alert5, { severity: "warning", sx: { mb: 1 }, children: "Response payload is available \u2014 upgrade your license to view" }) }) : /* @__PURE__ */ jsx142(PayloadViewer, { testId: EVENT_DETAILS_RESPONSE_PAYLOAD_TEST_ID, value: responsePayload })
32082
32215
  ] }),
32083
- exceptionPayload !== void 0 && /* @__PURE__ */ jsxs131(Box16, { children: [
32084
- /* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Exception" }),
32085
- /* @__PURE__ */ jsx141(PayloadViewer, { testId: EVENT_DETAILS_EXCEPTION_PAYLOAD_TEST_ID, value: exceptionPayload })
32216
+ exceptionPayload !== void 0 && /* @__PURE__ */ jsxs132(Box17, { children: [
32217
+ /* @__PURE__ */ jsx142(Typography13, { sx: { fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Exception" }),
32218
+ /* @__PURE__ */ jsx142(PayloadViewer, { testId: EVENT_DETAILS_EXCEPTION_PAYLOAD_TEST_ID, value: exceptionPayload })
32086
32219
  ] })
32087
32220
  ] })
32088
32221
  }
32089
32222
  )
32090
32223
  ] }),
32091
- isLambdaInvoke && requestId !== void 0 && /* @__PURE__ */ jsxs131(Fragment10, { children: [
32092
- /* @__PURE__ */ jsx141(Divider4, {}),
32093
- /* @__PURE__ */ jsx141(ToggleSection, { headline: "Lambda Logs", children: /* @__PURE__ */ jsx141(
32224
+ isLambdaInvoke && requestId !== void 0 && /* @__PURE__ */ jsxs132(Fragment10, { children: [
32225
+ /* @__PURE__ */ jsx142(Divider4, {}),
32226
+ /* @__PURE__ */ jsx142(ToggleSection, { headline: "Lambda Logs", children: /* @__PURE__ */ jsx142(
32094
32227
  LambdaInvokeLogsSection,
32095
32228
  {
32096
32229
  endTimeNano: selectedEvent.end_time_unix_nano ?? selectedEvent.start_time_unix_nano,
@@ -32101,30 +32234,30 @@ var EventDetails = ({ onClose, selectedEvent }) => {
32101
32234
  }
32102
32235
  ) })
32103
32236
  ] }),
32104
- /* @__PURE__ */ jsx141(Divider4, {}),
32105
- /* @__PURE__ */ jsx141(ToggleSection, { headline: "Advanced Information", initialOpen: false, children: /* @__PURE__ */ jsxs131(Stack4, { spacing: 1, children: [
32106
- /* @__PURE__ */ jsxs131(Box16, { children: [
32107
- /* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600 }, variant: "caption", children: "Span ID" }),
32108
- /* @__PURE__ */ jsxs131(Stack4, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
32109
- /* @__PURE__ */ jsx141(Typography12, { "data-testid": EVENT_DETAILS_SPAN_ID_TEST_ID, variant: "body2", children: selectedEvent.span_id }),
32110
- /* @__PURE__ */ jsx141(CopyButton, { value: selectedEvent.span_id })
32237
+ /* @__PURE__ */ jsx142(Divider4, {}),
32238
+ /* @__PURE__ */ jsx142(ToggleSection, { headline: "Advanced Information", initialOpen: false, children: /* @__PURE__ */ jsxs132(Stack4, { spacing: 1, children: [
32239
+ /* @__PURE__ */ jsxs132(Box17, { children: [
32240
+ /* @__PURE__ */ jsx142(Typography13, { sx: { fontWeight: 600 }, variant: "caption", children: "Span ID" }),
32241
+ /* @__PURE__ */ jsxs132(Stack4, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
32242
+ /* @__PURE__ */ jsx142(Typography13, { "data-testid": EVENT_DETAILS_SPAN_ID_TEST_ID, variant: "body2", children: selectedEvent.span_id }),
32243
+ /* @__PURE__ */ jsx142(CopyButton, { value: selectedEvent.span_id })
32111
32244
  ] })
32112
32245
  ] }),
32113
- /* @__PURE__ */ jsxs131(Box16, { children: [
32114
- /* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600 }, variant: "caption", children: "Trace ID" }),
32115
- /* @__PURE__ */ jsxs131(Stack4, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
32116
- /* @__PURE__ */ jsx141(Typography12, { "data-testid": EVENT_DETAILS_TRACE_ID_TEST_ID, variant: "body2", children: selectedEvent.trace_id }),
32117
- /* @__PURE__ */ jsx141(CopyButton, { value: selectedEvent.trace_id })
32246
+ /* @__PURE__ */ jsxs132(Box17, { children: [
32247
+ /* @__PURE__ */ jsx142(Typography13, { sx: { fontWeight: 600 }, variant: "caption", children: "Trace ID" }),
32248
+ /* @__PURE__ */ jsxs132(Stack4, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
32249
+ /* @__PURE__ */ jsx142(Typography13, { "data-testid": EVENT_DETAILS_TRACE_ID_TEST_ID, variant: "body2", children: selectedEvent.trace_id }),
32250
+ /* @__PURE__ */ jsx142(CopyButton, { value: selectedEvent.trace_id })
32118
32251
  ] })
32119
32252
  ] }),
32120
- requestId !== void 0 && /* @__PURE__ */ jsxs131(Box16, { children: [
32121
- /* @__PURE__ */ jsx141(Typography12, { sx: { fontWeight: 600 }, variant: "caption", children: "Request ID" }),
32122
- /* @__PURE__ */ jsxs131(Stack4, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
32123
- /* @__PURE__ */ jsx141(Typography12, { "data-testid": EVENT_DETAILS_REQUEST_ID_TEST_ID, variant: "body2", children: requestId }),
32124
- /* @__PURE__ */ jsx141(CopyButton, { value: requestId })
32253
+ requestId !== void 0 && /* @__PURE__ */ jsxs132(Box17, { children: [
32254
+ /* @__PURE__ */ jsx142(Typography13, { sx: { fontWeight: 600 }, variant: "caption", children: "Request ID" }),
32255
+ /* @__PURE__ */ jsxs132(Stack4, { alignItems: "center", direction: "row", sx: { "&:hover .copy-btn": { opacity: 1 } }, children: [
32256
+ /* @__PURE__ */ jsx142(Typography13, { "data-testid": EVENT_DETAILS_REQUEST_ID_TEST_ID, variant: "body2", children: requestId }),
32257
+ /* @__PURE__ */ jsx142(CopyButton, { value: requestId })
32125
32258
  ] })
32126
32259
  ] }),
32127
- eventGroups.info && /* @__PURE__ */ jsx141(EventDetail, { displayText: "Info", events: eventGroups.info, type: "info" })
32260
+ eventGroups.info && /* @__PURE__ */ jsx142(EventDetail, { displayText: "Info", events: eventGroups.info, type: "info" })
32128
32261
  ] }) })
32129
32262
  ] }) })
32130
32263
  ] });
@@ -32132,18 +32265,18 @@ var EventDetails = ({ onClose, selectedEvent }) => {
32132
32265
 
32133
32266
  // src/components/trace-graph/trace-graph.tsx
32134
32267
  import "@xyflow/react/dist/base.css";
32135
- import { Alert as Alert5, Button as Button6, useTheme as useTheme6 } from "@mui/material";
32268
+ import { Alert as Alert6, Button as Button7, useTheme as useTheme6 } from "@mui/material";
32136
32269
  import { Background, MarkerType, MiniMap, Position as Position2, ReactFlow, useEdgesState, useNodesState, useStore as useStore4 } from "@xyflow/react";
32137
- import { useCallback as useCallback10, useEffect as useEffect20, useRef as useRef15, useState as useState19 } from "react";
32270
+ import { useCallback as useCallback11, useEffect as useEffect21, useRef as useRef16, useState as useState20 } from "react";
32138
32271
 
32139
32272
  // src/components/trace-graph/service-node.tsx
32140
32273
  import { Cancel as Cancel4, GppBad as GppBad3 } from "@mui/icons-material";
32141
- import { Box as Box17, Divider as Divider5, Stack as Stack5, Tooltip as Tooltip6, Typography as Typography13, useTheme as useTheme4 } from "@mui/material";
32274
+ import { Box as Box18, Divider as Divider5, Stack as Stack5, Tooltip as Tooltip6, Typography as Typography14, useTheme as useTheme4 } from "@mui/material";
32142
32275
  import { Handle, Position } from "@xyflow/react";
32143
32276
  import "@xyflow/react/dist/style.css";
32144
32277
  import "react";
32145
- import { memo as memo11, useMemo as useMemo11, useRef as useRef14, useState as useState18 } from "react";
32146
- import { Fragment as Fragment11, jsx as jsx142, jsxs as jsxs132 } from "react/jsx-runtime";
32278
+ import { memo as memo11, useMemo as useMemo12, useRef as useRef15, useState as useState19 } from "react";
32279
+ import { Fragment as Fragment11, jsx as jsx143, jsxs as jsxs133 } from "react/jsx-runtime";
32147
32280
  var handleStyle = {
32148
32281
  backgroundColor: "white",
32149
32282
  borderColor: "lightgray",
@@ -32151,20 +32284,20 @@ var handleStyle = {
32151
32284
  };
32152
32285
  var NodeContent = ({ event, expanded, hasPermissionEvents, isError, isWarning }) => {
32153
32286
  const theme = useTheme4();
32154
- return /* @__PURE__ */ jsxs132(Fragment11, { children: [
32155
- /* @__PURE__ */ jsx142(Handle, { position: Position.Left, style: handleStyle, type: "target" }),
32156
- /* @__PURE__ */ jsx142(Handle, { position: Position.Right, style: handleStyle, type: "source" }),
32157
- /* @__PURE__ */ jsxs132(
32287
+ return /* @__PURE__ */ jsxs133(Fragment11, { children: [
32288
+ /* @__PURE__ */ jsx143(Handle, { position: Position.Left, style: handleStyle, type: "target" }),
32289
+ /* @__PURE__ */ jsx143(Handle, { position: Position.Right, style: handleStyle, type: "source" }),
32290
+ /* @__PURE__ */ jsxs133(
32158
32291
  Stack5,
32159
32292
  {
32160
32293
  alignItems: "center",
32161
32294
  direction: "row",
32162
32295
  sx: { gap: "8px", pb: "2px", pt: "6px", px: "8px" },
32163
32296
  children: [
32164
- /* @__PURE__ */ jsx142(Box17, { sx: { borderRadius: "4px", flexShrink: 0, lineHeight: 0, overflow: "hidden" }, children: /* @__PURE__ */ jsx142(AwsServiceIcon, { hideTooltip: true, service: event.service_name, size: "medium" }) }),
32165
- /* @__PURE__ */ jsxs132(Stack5, { sx: expanded ? void 0 : { minWidth: 0 }, children: [
32166
- /* @__PURE__ */ jsx142(
32167
- Typography13,
32297
+ /* @__PURE__ */ jsx143(Box18, { sx: { borderRadius: "4px", flexShrink: 0, lineHeight: 0, overflow: "hidden" }, children: /* @__PURE__ */ jsx143(AwsServiceIcon, { hideTooltip: true, service: event.service_name, size: "medium" }) }),
32298
+ /* @__PURE__ */ jsxs133(Stack5, { sx: expanded ? void 0 : { minWidth: 0 }, children: [
32299
+ /* @__PURE__ */ jsx143(
32300
+ Typography14,
32168
32301
  {
32169
32302
  noWrap: !expanded,
32170
32303
  sx: { fontWeight: 700, lineHeight: 1.25, ...expanded && { whiteSpace: "nowrap" } },
@@ -32172,8 +32305,8 @@ var NodeContent = ({ event, expanded, hasPermissionEvents, isError, isWarning })
32172
32305
  children: getServiceDisplayName(event.service_name)
32173
32306
  }
32174
32307
  ),
32175
- event.resource_name != "" && /* @__PURE__ */ jsx142(
32176
- Typography13,
32308
+ event.resource_name != "" && /* @__PURE__ */ jsx143(
32309
+ Typography14,
32177
32310
  {
32178
32311
  color: "text.secondary",
32179
32312
  noWrap: !expanded,
@@ -32186,16 +32319,16 @@ var NodeContent = ({ event, expanded, hasPermissionEvents, isError, isWarning })
32186
32319
  ]
32187
32320
  }
32188
32321
  ),
32189
- /* @__PURE__ */ jsx142(Divider5, { sx: { ml: "38px", mr: "8px", my: "5px" } }),
32190
- /* @__PURE__ */ jsxs132(
32322
+ /* @__PURE__ */ jsx143(Divider5, { sx: { ml: "38px", mr: "8px", my: "5px" } }),
32323
+ /* @__PURE__ */ jsxs133(
32191
32324
  Stack5,
32192
32325
  {
32193
32326
  alignItems: "center",
32194
32327
  direction: "row",
32195
32328
  sx: expanded ? { pb: "5px", pr: "8px", pt: "1px" } : { minWidth: 0, pb: "5px", pr: "8px", pt: "1px" },
32196
32329
  children: [
32197
- /* @__PURE__ */ jsxs132(
32198
- Box17,
32330
+ /* @__PURE__ */ jsxs133(
32331
+ Box18,
32199
32332
  {
32200
32333
  sx: {
32201
32334
  alignItems: "center",
@@ -32205,13 +32338,13 @@ var NodeContent = ({ event, expanded, hasPermissionEvents, isError, isWarning })
32205
32338
  width: "38px"
32206
32339
  },
32207
32340
  children: [
32208
- (isError || isWarning) && hasPermissionEvents && /* @__PURE__ */ jsx142(Tooltip6, { arrow: true, title: "Permission denied", children: /* @__PURE__ */ jsx142(GppBad3, { sx: { color: isError ? theme.palette.error.main : theme.palette.warning.main, fontSize: "16px" } }) }),
32209
- isError && !hasPermissionEvents && /* @__PURE__ */ jsx142(Tooltip6, { arrow: true, title: "Error", children: /* @__PURE__ */ jsx142(Cancel4, { sx: { color: theme.palette.error.main, fontSize: "16px" } }) })
32341
+ (isError || isWarning) && hasPermissionEvents && /* @__PURE__ */ jsx143(Tooltip6, { arrow: true, title: "Permission denied", children: /* @__PURE__ */ jsx143(GppBad3, { sx: { color: isError ? theme.palette.error.main : theme.palette.warning.main, fontSize: "16px" } }) }),
32342
+ isError && !hasPermissionEvents && /* @__PURE__ */ jsx143(Tooltip6, { arrow: true, title: "Error", children: /* @__PURE__ */ jsx143(Cancel4, { sx: { color: theme.palette.error.main, fontSize: "16px" } }) })
32210
32343
  ]
32211
32344
  }
32212
32345
  ),
32213
- /* @__PURE__ */ jsx142(
32214
- Typography13,
32346
+ /* @__PURE__ */ jsx143(
32347
+ Typography14,
32215
32348
  {
32216
32349
  "data-testid": SERVICE_NODE_OPERATION_NAME_TEST_ID,
32217
32350
  noWrap: !expanded,
@@ -32227,10 +32360,10 @@ var NodeContent = ({ event, expanded, hasPermissionEvents, isError, isWarning })
32227
32360
  };
32228
32361
  var ServiceNode = memo11(({ data, selected }) => {
32229
32362
  const theme = useTheme4();
32230
- const [isHovered, setIsHovered] = useState18(false);
32231
- const nodeRef = useRef14(null);
32363
+ const [isHovered, setIsHovered] = useState19(false);
32364
+ const nodeRef = useRef15(null);
32232
32365
  const { operation_status } = data.event;
32233
- const hasPermissionEventsLegacy = useMemo11(
32366
+ const hasPermissionEventsLegacy = useMemo12(
32234
32367
  () => data.event.events.some(
32235
32368
  (event) => event.event_type === "iam.policy_evaluation" && event.name === "iam.policy.denied"
32236
32369
  ),
@@ -32261,8 +32394,8 @@ var ServiceNode = memo11(({ data, selected }) => {
32261
32394
  const xyNode = nodeRef.current?.closest(".react-flow__node");
32262
32395
  if (xyNode) xyNode.style.zIndex = "";
32263
32396
  };
32264
- return /* @__PURE__ */ jsxs132(
32265
- Box17,
32397
+ return /* @__PURE__ */ jsxs133(
32398
+ Box18,
32266
32399
  {
32267
32400
  "data-testid": SERVICE_NODE_TEST_ID,
32268
32401
  onMouseEnter: handleMouseEnter,
@@ -32272,8 +32405,8 @@ var ServiceNode = memo11(({ data, selected }) => {
32272
32405
  sx: { display: "inline-block", position: "relative" },
32273
32406
  tabIndex: 0,
32274
32407
  children: [
32275
- /* @__PURE__ */ jsx142(
32276
- Box17,
32408
+ /* @__PURE__ */ jsx143(
32409
+ Box18,
32277
32410
  {
32278
32411
  sx: {
32279
32412
  ...sharedBoxSx,
@@ -32281,11 +32414,11 @@ var ServiceNode = memo11(({ data, selected }) => {
32281
32414
  maxWidth: 220,
32282
32415
  overflow: "hidden"
32283
32416
  },
32284
- children: /* @__PURE__ */ jsx142(NodeContent, { ...contentProps, expanded: false })
32417
+ children: /* @__PURE__ */ jsx143(NodeContent, { ...contentProps, expanded: false })
32285
32418
  }
32286
32419
  ),
32287
- /* @__PURE__ */ jsx142(
32288
- Box17,
32420
+ /* @__PURE__ */ jsx143(
32421
+ Box18,
32289
32422
  {
32290
32423
  onMouseLeave: handleMouseLeave,
32291
32424
  sx: {
@@ -32299,7 +32432,7 @@ var ServiceNode = memo11(({ data, selected }) => {
32299
32432
  width: "max-content",
32300
32433
  zIndex: 10
32301
32434
  },
32302
- children: /* @__PURE__ */ jsx142(NodeContent, { ...contentProps, expanded: true })
32435
+ children: /* @__PURE__ */ jsx143(NodeContent, { ...contentProps, expanded: true })
32303
32436
  }
32304
32437
  )
32305
32438
  ]
@@ -32394,11 +32527,11 @@ var getLayoutedNodesAndEdges = (inputNodes, inputEdges) => {
32394
32527
 
32395
32528
  // src/components/trace-graph/xyflow/controls.tsx
32396
32529
  import { Add, FitScreen, Remove } from "@mui/icons-material";
32397
- import { Box as Box18, IconButton as IconButton6 } from "@mui/material";
32530
+ import { Box as Box19, IconButton as IconButton6 } from "@mui/material";
32398
32531
  import { useReactFlow, useStore as useStore2 } from "@xyflow/react";
32399
32532
  import { memo as memo12 } from "react";
32400
32533
  import { shallow } from "zustand/shallow";
32401
- import { jsx as jsx143, jsxs as jsxs133 } from "react/jsx-runtime";
32534
+ import { jsx as jsx144, jsxs as jsxs134 } from "react/jsx-runtime";
32402
32535
  var selector = (s) => ({
32403
32536
  isInteractive: s.nodesDraggable || s.nodesConnectable || s.elementsSelectable,
32404
32537
  maxZoomReached: s.transform[2] >= s.maxZoom,
@@ -32416,8 +32549,8 @@ var Controls = memo12(() => {
32416
32549
  const onFitViewHandler = () => {
32417
32550
  void fitView();
32418
32551
  };
32419
- return /* @__PURE__ */ jsxs133(
32420
- Box18,
32552
+ return /* @__PURE__ */ jsxs134(
32553
+ Box19,
32421
32554
  {
32422
32555
  sx: {
32423
32556
  bottom: 0,
@@ -32430,33 +32563,33 @@ var Controls = memo12(() => {
32430
32563
  zIndex: 5
32431
32564
  },
32432
32565
  children: [
32433
- /* @__PURE__ */ jsx143(
32566
+ /* @__PURE__ */ jsx144(
32434
32567
  IconButton6,
32435
32568
  {
32436
32569
  className: "react-flow__controls-zoomin",
32437
32570
  disabled: maxZoomReached,
32438
32571
  onClick: onZoomInHandler,
32439
32572
  size: "small",
32440
- children: /* @__PURE__ */ jsx143(Add, {})
32573
+ children: /* @__PURE__ */ jsx144(Add, {})
32441
32574
  }
32442
32575
  ),
32443
- /* @__PURE__ */ jsx143(
32576
+ /* @__PURE__ */ jsx144(
32444
32577
  IconButton6,
32445
32578
  {
32446
32579
  className: "react-flow__controls-zoomout",
32447
32580
  disabled: minZoomReached,
32448
32581
  onClick: onZoomOutHandler,
32449
32582
  size: "small",
32450
- children: /* @__PURE__ */ jsx143(Remove, {})
32583
+ children: /* @__PURE__ */ jsx144(Remove, {})
32451
32584
  }
32452
32585
  ),
32453
- /* @__PURE__ */ jsx143(
32586
+ /* @__PURE__ */ jsx144(
32454
32587
  IconButton6,
32455
32588
  {
32456
32589
  className: "react-flow__controls-fitview",
32457
32590
  onClick: onFitViewHandler,
32458
32591
  size: "small",
32459
- children: /* @__PURE__ */ jsx143(FitScreen, {})
32592
+ children: /* @__PURE__ */ jsx144(FitScreen, {})
32460
32593
  }
32461
32594
  )
32462
32595
  ]
@@ -32468,7 +32601,7 @@ var Controls = memo12(() => {
32468
32601
  import { useTheme as useTheme5 } from "@mui/material";
32469
32602
  import { useStore as useStore3 } from "@xyflow/react";
32470
32603
  import { memo as memo13 } from "react";
32471
- import { jsx as jsx144, jsxs as jsxs134 } from "react/jsx-runtime";
32604
+ import { jsx as jsx145, jsxs as jsxs135 } from "react/jsx-runtime";
32472
32605
  var ICON_FRACTION = 0.35;
32473
32606
  var PADDING_FRACTION = 0.18;
32474
32607
  var ICON_NATIVE_SIZE = 80;
@@ -32497,10 +32630,10 @@ var MinimapServiceNode = memo13(({
32497
32630
  const dotY = y + height - padding - dotRadius;
32498
32631
  const outlineColor = selected ? isError ? errorColor : "#1a73e8" : "#cccccc";
32499
32632
  const outlineWidth = selected ? 2 : 1;
32500
- return /* @__PURE__ */ jsxs134("g", { onClick: onClick ? (event2) => {
32633
+ return /* @__PURE__ */ jsxs135("g", { onClick: onClick ? (event2) => {
32501
32634
  onClick(event2, id2);
32502
32635
  } : void 0, children: [
32503
- /* @__PURE__ */ jsx144(
32636
+ /* @__PURE__ */ jsx145(
32504
32637
  "rect",
32505
32638
  {
32506
32639
  fill: theme.palette.background.paper,
@@ -32514,7 +32647,7 @@ var MinimapServiceNode = memo13(({
32514
32647
  y
32515
32648
  }
32516
32649
  ),
32517
- isError && /* @__PURE__ */ jsx144(
32650
+ isError && /* @__PURE__ */ jsx145(
32518
32651
  "rect",
32519
32652
  {
32520
32653
  fill: errorColor,
@@ -32526,8 +32659,8 @@ var MinimapServiceNode = memo13(({
32526
32659
  y: y + 3
32527
32660
  }
32528
32661
  ),
32529
- Icon && /* @__PURE__ */ jsx144("g", { transform: `translate(${String(x + padding)}, ${String(y + padding)}) scale(${String(scale2)})`, children: /* @__PURE__ */ jsx144(Icon, { height: ICON_NATIVE_SIZE, width: ICON_NATIVE_SIZE }) }),
32530
- isError && Icon && /* @__PURE__ */ jsx144(
32662
+ Icon && /* @__PURE__ */ jsx145("g", { transform: `translate(${String(x + padding)}, ${String(y + padding)}) scale(${String(scale2)})`, children: /* @__PURE__ */ jsx145(Icon, { height: ICON_NATIVE_SIZE, width: ICON_NATIVE_SIZE }) }),
32663
+ isError && Icon && /* @__PURE__ */ jsx145(
32531
32664
  "circle",
32532
32665
  {
32533
32666
  cx: dotX,
@@ -32540,7 +32673,7 @@ var MinimapServiceNode = memo13(({
32540
32673
  });
32541
32674
 
32542
32675
  // src/components/trace-graph/trace-graph.tsx
32543
- import { Fragment as Fragment12, jsx as jsx145, jsxs as jsxs135 } from "react/jsx-runtime";
32676
+ import { Fragment as Fragment12, jsx as jsx146, jsxs as jsxs136 } from "react/jsx-runtime";
32544
32677
  var nodeTypes = {
32545
32678
  service: ServiceNode
32546
32679
  };
@@ -32548,7 +32681,7 @@ var ExtentUpdater = ({ onUpdate, viewportRef }) => {
32548
32681
  const zoom = useStore4((s) => s.transform[2]);
32549
32682
  const width = useStore4((s) => s.width);
32550
32683
  const height = useStore4((s) => s.height);
32551
- useEffect20(() => {
32684
+ useEffect21(() => {
32552
32685
  viewportRef.current = { height, width, zoom };
32553
32686
  onUpdate();
32554
32687
  }, [zoom, width, height, onUpdate, viewportRef]);
@@ -32562,10 +32695,10 @@ var TraceGraph = ({
32562
32695
  }) => {
32563
32696
  const [nodes2, setNodes, onNodesChange] = useNodesState([]);
32564
32697
  const [edges, setEdges] = useEdgesState([]);
32565
- const [translateExtent, setTranslateExtent] = useState19();
32566
- const nodeBoundsRef = useRef15(null);
32567
- const viewportRef = useRef15({ height: 0, width: 0, zoom: 1 });
32568
- const updateExtent = useCallback10(() => {
32698
+ const [translateExtent, setTranslateExtent] = useState20();
32699
+ const nodeBoundsRef = useRef16(null);
32700
+ const viewportRef = useRef16({ height: 0, width: 0, zoom: 1 });
32701
+ const updateExtent = useCallback11(() => {
32569
32702
  const bounds = nodeBoundsRef.current;
32570
32703
  const { height, width, zoom } = viewportRef.current;
32571
32704
  if (!bounds || width === 0 || height === 0) return;
@@ -32578,7 +32711,7 @@ var TraceGraph = ({
32578
32711
  [bounds.maxX + hMargin, bounds.maxY + vMargin]
32579
32712
  ]);
32580
32713
  }, []);
32581
- useEffect20(() => {
32714
+ useEffect21(() => {
32582
32715
  const allNodes = [];
32583
32716
  const allEdges = [];
32584
32717
  for (const span of spans.data ?? []) {
@@ -32651,11 +32784,11 @@ var TraceGraph = ({
32651
32784
  }
32652
32785
  }, [spans.data, initialFocusEventId, setNodes, setEdges, updateExtent]);
32653
32786
  const theme = useTheme6();
32654
- return /* @__PURE__ */ jsxs135(Fragment12, { children: [
32655
- spans.error && /* @__PURE__ */ jsxs135(
32656
- Alert5,
32787
+ return /* @__PURE__ */ jsxs136(Fragment12, { children: [
32788
+ spans.error && /* @__PURE__ */ jsxs136(
32789
+ Alert6,
32657
32790
  {
32658
- action: /* @__PURE__ */ jsx145(Button6, { onClick: () => {
32791
+ action: /* @__PURE__ */ jsx146(Button7, { onClick: () => {
32659
32792
  onRefresh();
32660
32793
  }, children: "Retry" }),
32661
32794
  severity: "error",
@@ -32667,7 +32800,7 @@ var TraceGraph = ({
32667
32800
  ]
32668
32801
  }
32669
32802
  ),
32670
- /* @__PURE__ */ jsxs135(
32803
+ /* @__PURE__ */ jsxs136(
32671
32804
  ReactFlow,
32672
32805
  {
32673
32806
  colorMode: theme.palette.mode,
@@ -32687,9 +32820,9 @@ var TraceGraph = ({
32687
32820
  selectNodesOnDrag: false,
32688
32821
  translateExtent,
32689
32822
  children: [
32690
- /* @__PURE__ */ jsx145(ExtentUpdater, { onUpdate: updateExtent, viewportRef }),
32691
- /* @__PURE__ */ jsx145(Controls, {}),
32692
- /* @__PURE__ */ jsx145(
32823
+ /* @__PURE__ */ jsx146(ExtentUpdater, { onUpdate: updateExtent, viewportRef }),
32824
+ /* @__PURE__ */ jsx146(Controls, {}),
32825
+ /* @__PURE__ */ jsx146(
32693
32826
  MiniMap,
32694
32827
  {
32695
32828
  nodeComponent: MinimapServiceNode,
@@ -32697,7 +32830,7 @@ var TraceGraph = ({
32697
32830
  zoomable: true
32698
32831
  }
32699
32832
  ),
32700
- /* @__PURE__ */ jsx145(
32833
+ /* @__PURE__ */ jsx146(
32701
32834
  Background,
32702
32835
  {
32703
32836
  bgColor: theme.palette.background.default,
@@ -32711,7 +32844,7 @@ var TraceGraph = ({
32711
32844
  };
32712
32845
 
32713
32846
  // src/pages/trace-graph-page.tsx
32714
- import { jsx as jsx146, jsxs as jsxs136 } from "react/jsx-runtime";
32847
+ import { jsx as jsx147, jsxs as jsxs137 } from "react/jsx-runtime";
32715
32848
  var DRAWER_WIDTH = "35%";
32716
32849
  var Main = styled("main", { shouldForwardProp: (property) => property !== "open" })(({ open, theme }) => ({
32717
32850
  flexGrow: 1,
@@ -32755,7 +32888,7 @@ var TraceGraphView = ({
32755
32888
  spans,
32756
32889
  traceId
32757
32890
  }) => {
32758
- return /* @__PURE__ */ jsxs136(
32891
+ return /* @__PURE__ */ jsxs137(
32759
32892
  Paper2,
32760
32893
  {
32761
32894
  "data-testid": TRACE_GRAPH_PAGE_TEST_ID,
@@ -32768,11 +32901,11 @@ var TraceGraphView = ({
32768
32901
  width: "100%"
32769
32902
  },
32770
32903
  children: [
32771
- /* @__PURE__ */ jsx146(Main, { open, children: /* @__PURE__ */ jsxs136(Box19, { sx: { display: "flex", flexDirection: "column", height: "100%" }, children: [
32772
- /* @__PURE__ */ jsx146(Box19, { sx: { display: "flex", px: 1, py: 1 }, children: /* @__PURE__ */ jsx146(Button7, { onClick: () => {
32904
+ /* @__PURE__ */ jsx147(Main, { open, children: /* @__PURE__ */ jsxs137(Box20, { sx: { display: "flex", flexDirection: "column", height: "100%" }, children: [
32905
+ /* @__PURE__ */ jsx147(Box20, { sx: { display: "flex", px: 1, py: 1 }, children: /* @__PURE__ */ jsx147(Button8, { onClick: () => {
32773
32906
  navigateToSpansList();
32774
- }, startIcon: /* @__PURE__ */ jsx146(ArrowBack, {}), children: "Go back" }) }),
32775
- /* @__PURE__ */ jsx146(Box19, { sx: { flexGrow: 1, overflow: "auto" }, children: traceId !== void 0 && /* @__PURE__ */ jsx146(ReactFlowProvider, { children: /* @__PURE__ */ jsx146(
32907
+ }, startIcon: /* @__PURE__ */ jsx147(ArrowBack, {}), children: "Go back" }) }),
32908
+ /* @__PURE__ */ jsx147(Box20, { sx: { flexGrow: 1, overflow: "auto" }, children: traceId !== void 0 && /* @__PURE__ */ jsx147(ReactFlowProvider, { children: /* @__PURE__ */ jsx147(
32776
32909
  TraceGraph,
32777
32910
  {
32778
32911
  initialFocusEventId: spanId,
@@ -32788,7 +32921,7 @@ var TraceGraphView = ({
32788
32921
  }
32789
32922
  ) }) })
32790
32923
  ] }) }),
32791
- /* @__PURE__ */ jsx146(StyledDrawer, { anchor: "right", open, variant: "persistent", children: /* @__PURE__ */ jsx146(EventDetails, { onClose: handleClose, selectedEvent }) })
32924
+ /* @__PURE__ */ jsx147(StyledDrawer, { anchor: "right", open, variant: "persistent", children: /* @__PURE__ */ jsx147(EventDetails, { onClose: handleClose, selectedEvent }) })
32792
32925
  ]
32793
32926
  }
32794
32927
  );
@@ -32836,10 +32969,10 @@ async function fetchConnectedTracesWaterfall(api, traceIds, allSpans = /* @__PUR
32836
32969
  }
32837
32970
  var TraceGraphPage = ({ onClose, spanId, traceId }) => {
32838
32971
  const api = useAppInspectorApi();
32839
- const [spans, setSpans] = useState20();
32840
- const [loading, setLoading] = useState20(false);
32841
- const [fetchError, setFetchError] = useState20();
32842
- const fetchSpans = useCallback11(async () => {
32972
+ const [spans, setSpans] = useState21();
32973
+ const [loading, setLoading] = useState21(false);
32974
+ const [fetchError, setFetchError] = useState21();
32975
+ const fetchSpans = useCallback12(async () => {
32843
32976
  setLoading(true);
32844
32977
  try {
32845
32978
  const spans2 = await fetchConnectedTraces(api, traceId);
@@ -32852,27 +32985,27 @@ var TraceGraphPage = ({ onClose, spanId, traceId }) => {
32852
32985
  setLoading(false);
32853
32986
  }
32854
32987
  }, [api, traceId]);
32855
- useEffect21(() => {
32988
+ useEffect22(() => {
32856
32989
  void fetchSpans();
32857
32990
  }, [fetchSpans]);
32858
- const [open, setOpen] = useState20(true);
32859
- const [selectedEvent, setSelectedEvent] = useState20(() => spans?.find((span) => span.span_id === spanId));
32860
- const spansReference = useRef16();
32861
- useEffect21(() => {
32991
+ const [open, setOpen] = useState21(true);
32992
+ const [selectedEvent, setSelectedEvent] = useState21(() => spans?.find((span) => span.span_id === spanId));
32993
+ const spansReference = useRef17();
32994
+ useEffect22(() => {
32862
32995
  if (!spansReference.current && spans) {
32863
32996
  setSelectedEvent(spans.find((span) => span.span_id === spanId));
32864
32997
  spansReference.current = spans;
32865
32998
  }
32866
32999
  }, [spans, setSelectedEvent, spanId]);
32867
- const handleEventSelect = useCallback11((spanId2) => {
33000
+ const handleEventSelect = useCallback12((spanId2) => {
32868
33001
  const span = spans?.find((s) => s.span_id === spanId2);
32869
33002
  setSelectedEvent(span);
32870
33003
  setOpen(true);
32871
33004
  }, [spans]);
32872
- const navigateToSpansList = useCallback11(() => {
33005
+ const navigateToSpansList = useCallback12(() => {
32873
33006
  onClose?.();
32874
33007
  }, [onClose]);
32875
- return /* @__PURE__ */ jsx146(
33008
+ return /* @__PURE__ */ jsx147(
32876
33009
  TraceGraphView,
32877
33010
  {
32878
33011
  fetchError,
@@ -32893,57 +33026,67 @@ var TraceGraphPage = ({ onClose, spanId, traceId }) => {
32893
33026
  };
32894
33027
 
32895
33028
  // src/pages/spans-list-page.tsx
32896
- import { jsx as jsx147, jsxs as jsxs137 } from "react/jsx-runtime";
33029
+ import { jsx as jsx148, jsxs as jsxs138 } from "react/jsx-runtime";
32897
33030
  var SpansListPage = () => {
32898
33031
  const api = useAppInspectorApi();
32899
33032
  const {
32900
33033
  clearFetchError,
32901
33034
  clearingSpans,
32902
33035
  clearSpans,
33036
+ consumerValues,
32903
33037
  errorCount,
32904
33038
  fetchError,
32905
33039
  fetchForward,
32906
33040
  fetchingBackward,
32907
33041
  fetchingForward,
33042
+ filteredErrorCount,
33043
+ filteredSpans,
33044
+ filteredWarningCount,
33045
+ filters,
33046
+ hasExternalProducer,
32908
33047
  hasMoreBackward,
32909
33048
  hasMoreForward,
32910
33049
  licenseLimit,
33050
+ producerValues,
33051
+ retryWorker,
32911
33052
  search,
32912
33053
  searching,
33054
+ setFilters,
32913
33055
  setSearch,
32914
- spans,
33056
+ statusValues,
32915
33057
  systemLimit,
32916
33058
  totalCount,
32917
- warningCount
33059
+ warningCount,
33060
+ workerError
32918
33061
  } = useSpans();
32919
33062
  const { checkStatus, phase, status, statusError } = useAppInspectorStatus();
32920
- const clearSpansSync = useCallback12(() => {
33063
+ const clearSpansSync = useCallback13(() => {
32921
33064
  void clearSpans();
32922
33065
  }, [clearSpans]);
32923
33066
  const localstackVersion = status?.localstackVersion ?? (statusError instanceof AppInspectorNotFoundError ? statusError.localstackVersion : void 0);
32924
33067
  const versionCompatibility = checkEmulatorVersion(localstackVersion);
32925
33068
  const searchSupported = emulatorSupportsSearch(localstackVersion);
32926
- const [bannerDismissed, setBannerDismissed] = useState21(false);
33069
+ const [bannerDismissed, setBannerDismissed] = useState22(false);
32927
33070
  const [order2, setOrder] = useLocalStorage("spans-order", "oldest_first");
32928
- const [selectedTraceId, setSelectedTraceId] = useState21();
32929
- const [selectedSpanId, setSelectedSpanId] = useState21();
32930
- const navigateToSpan = useCallback12((span) => {
33071
+ const [selectedTraceId, setSelectedTraceId] = useState22();
33072
+ const [selectedSpanId, setSelectedSpanId] = useState22();
33073
+ const navigateToSpan = useCallback13((span) => {
32931
33074
  setSelectedTraceId(span.trace_id);
32932
33075
  setSelectedSpanId(span.span_id);
32933
33076
  }, []);
32934
- const handleRetry = useCallback12(() => {
33077
+ const handleRetry = useCallback13(() => {
32935
33078
  checkStatus();
32936
33079
  fetchForward();
32937
33080
  }, [checkStatus, fetchForward]);
32938
- const handleEnable = useCallback12(async () => {
33081
+ const handleEnable = useCallback13(async () => {
32939
33082
  await api.setStatus({ status: "ENABLED" });
32940
33083
  clearFetchError();
32941
33084
  checkStatus();
32942
33085
  }, [api, checkStatus, clearFetchError]);
32943
- const isDelayedRefetchRef = useRef17(false);
32944
- const delayedRefetchTimerRef = useRef17();
32945
- const prevFetchingForwardRef = useRef17(false);
32946
- useEffect22(() => {
33086
+ const isDelayedRefetchRef = useRef18(false);
33087
+ const delayedRefetchTimerRef = useRef18();
33088
+ const prevFetchingForwardRef = useRef18(false);
33089
+ useEffect23(() => {
32947
33090
  const wasFetching = prevFetchingForwardRef.current;
32948
33091
  prevFetchingForwardRef.current = fetchingForward;
32949
33092
  if (wasFetching && !fetchingForward) {
@@ -32964,10 +33107,10 @@ var SpansListPage = () => {
32964
33107
  switch (phase) {
32965
33108
  case "CHECKING_STATUS":
32966
33109
  case "CONNECTING_WS": {
32967
- return /* @__PURE__ */ jsx147(StatusMessage, { phase });
33110
+ return /* @__PURE__ */ jsx148(StatusMessage, { phase });
32968
33111
  }
32969
33112
  case "DISABLED": {
32970
- return /* @__PURE__ */ jsx147(
33113
+ return /* @__PURE__ */ jsx148(
32971
33114
  StatusMessage,
32972
33115
  {
32973
33116
  onEnable: handleEnable,
@@ -32976,7 +33119,7 @@ var SpansListPage = () => {
32976
33119
  );
32977
33120
  }
32978
33121
  case "INCOMPATIBLE": {
32979
- return /* @__PURE__ */ jsx147(
33122
+ return /* @__PURE__ */ jsx148(
32980
33123
  StatusMessage,
32981
33124
  {
32982
33125
  localstackVersion,
@@ -32986,10 +33129,13 @@ var SpansListPage = () => {
32986
33129
  );
32987
33130
  }
32988
33131
  case "LIVE": {
33132
+ if (workerError) {
33133
+ return /* @__PURE__ */ jsx148(WorkerErrorMessage, { error: workerError, onRetry: retryWorker });
33134
+ }
32989
33135
  break;
32990
33136
  }
32991
33137
  case "UNREACHABLE": {
32992
- return /* @__PURE__ */ jsx147(
33138
+ return /* @__PURE__ */ jsx148(
32993
33139
  StatusMessage,
32994
33140
  {
32995
33141
  onRetry: handleRetry,
@@ -32998,9 +33144,9 @@ var SpansListPage = () => {
32998
33144
  );
32999
33145
  }
33000
33146
  }
33001
- return /* @__PURE__ */ jsxs137(Paper3, { square: true, sx: { display: "flex", flexDirection: "column", flexGrow: 1 }, children: [
33002
- /* @__PURE__ */ jsxs137(
33003
- Box20,
33147
+ return /* @__PURE__ */ jsxs138(Paper3, { square: true, sx: { display: "flex", flexDirection: "column", flexGrow: 1 }, children: [
33148
+ /* @__PURE__ */ jsxs138(
33149
+ Box21,
33004
33150
  {
33005
33151
  "data-testid": SPANS_LIST_PAGE_TEST_ID,
33006
33152
  sx: {
@@ -33015,7 +33161,7 @@ var SpansListPage = () => {
33015
33161
  width: "100%"
33016
33162
  },
33017
33163
  children: [
33018
- /* @__PURE__ */ jsx147(
33164
+ /* @__PURE__ */ jsx148(
33019
33165
  EmulatorVersionBanner,
33020
33166
  {
33021
33167
  compatibility: bannerDismissed && versionCompatibility === "warning" ? "ok" : versionCompatibility,
@@ -33025,27 +33171,35 @@ var SpansListPage = () => {
33025
33171
  } : void 0
33026
33172
  }
33027
33173
  ),
33028
- /* @__PURE__ */ jsx147(
33174
+ /* @__PURE__ */ jsx148(
33029
33175
  SpansList,
33030
33176
  {
33031
33177
  clearingSpans,
33178
+ consumerValues,
33032
33179
  errorCount,
33033
33180
  fetchError,
33034
33181
  fetchingBackward,
33035
33182
  fetchingForward,
33183
+ filteredErrorCount,
33184
+ filteredSpans,
33185
+ filteredWarningCount,
33186
+ filters,
33187
+ hasExternalProducer,
33036
33188
  hasMoreBackward,
33037
33189
  hasMoreForward,
33038
33190
  licenseLimit,
33039
33191
  onClearSpans: clearSpansSync,
33040
33192
  onFetchForward: fetchForward,
33193
+ onFiltersChange: setFilters,
33041
33194
  onOrderChange: setOrder,
33042
33195
  onSearchChange: setSearch,
33043
33196
  onSpanClick: navigateToSpan,
33044
33197
  order: order2,
33198
+ producerValues,
33045
33199
  search,
33046
33200
  searching,
33047
33201
  searchSupported,
33048
- spans,
33202
+ statusValues,
33049
33203
  systemLimit,
33050
33204
  totalCount,
33051
33205
  warningCount
@@ -33054,7 +33208,7 @@ var SpansListPage = () => {
33054
33208
  ]
33055
33209
  }
33056
33210
  ),
33057
- selectedTraceId !== void 0 && /* @__PURE__ */ jsx147(TraceGraphPage, { onClose: () => {
33211
+ selectedTraceId !== void 0 && /* @__PURE__ */ jsx148(TraceGraphPage, { onClose: () => {
33058
33212
  setSelectedTraceId(void 0);
33059
33213
  }, spanId: selectedSpanId, traceId: selectedTraceId })
33060
33214
  ] });