@localstack/appinspector-ui 1.0.23 → 1.0.24

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.cjs CHANGED
@@ -37,7 +37,7 @@ module.exports = __toCommonJS(index_exports);
37
37
 
38
38
  // src/pages/spans-list-page.tsx
39
39
  var import_material8 = require("@mui/material");
40
- var import_react8 = require("react");
40
+ var import_react9 = require("react");
41
41
  var import_react_router_dom = require("react-router-dom");
42
42
 
43
43
  // src/api/use-api.tsx
@@ -62,7 +62,7 @@ var import_material6 = require("@mui/material");
62
62
  var import_icons_material = require("@mui/icons-material");
63
63
  var import_material5 = require("@mui/material");
64
64
  var import_x_data_grid = require("@mui/x-data-grid");
65
- var import_react3 = require("react");
65
+ var import_react4 = require("react");
66
66
 
67
67
  // src/components/cells/event-indicator-cell.tsx
68
68
  var import_material = require("@mui/material");
@@ -199,6 +199,9 @@ var WrapInComponent = ({ children, wrap, wrapperFn }) => {
199
199
  return children;
200
200
  };
201
201
 
202
+ // src/components/aws-service-icon/icons/index.tsx
203
+ var import_react3 = require("react");
204
+
202
205
  // src/types/service-names.ts
203
206
  var SERVICE_NAME = {
204
207
  ACCESSANALYZER: "accessanalyzer",
@@ -2388,7 +2391,8 @@ var SvgXray = (props) => /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("svg",
2388
2391
  ] });
2389
2392
  var xray_default = SvgXray;
2390
2393
 
2391
- // src/components/aws-service-icon/icons/index.ts
2394
+ // src/components/aws-service-icon/icons/index.tsx
2395
+ var import_jsx_runtime122 = require("react/jsx-runtime");
2392
2396
  var ICONS_MAP = {
2393
2397
  [SERVICE_NAME.ACCOUNT]: account_default,
2394
2398
  [SERVICE_NAME.ACM]: acm_default,
@@ -2511,30 +2515,30 @@ var ICONS_MAP = {
2511
2515
  [SERVICE_NAME.WAFV2]: wafv2_default,
2512
2516
  [SERVICE_NAME.XRAY]: xray_default
2513
2517
  };
2514
- var getIconComponent = (service) => {
2515
- return ICONS_MAP[service] ?? ICONS_MAP.infrastructure;
2516
- };
2518
+ var AwsServiceIconBase = (0, import_react3.memo)((props) => {
2519
+ const Icon = ICONS_MAP[props.service] ?? ICONS_MAP.infrastructure;
2520
+ return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Icon, { ...props });
2521
+ });
2517
2522
  var supportedServiceNames = Object.keys(ICONS_MAP);
2518
2523
 
2519
2524
  // src/components/aws-service-icon/aws-service-icon.tsx
2520
- var import_jsx_runtime122 = require("react/jsx-runtime");
2525
+ var import_jsx_runtime123 = require("react/jsx-runtime");
2521
2526
  var sizes = { large: [32, 32], medium: [22, 22], small: [11, 11] };
2522
2527
  var AwsServiceIcon = ({ hideTooltip, service, size = "medium", title }) => {
2523
2528
  const [width, height] = sizes[size];
2524
- const Icon = getIconComponent(service);
2525
- return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
2529
+ return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
2526
2530
  WrapInComponent,
2527
2531
  {
2528
2532
  wrap: !hideTooltip,
2529
- wrapperFn: (child) => /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_material2.Tooltip, { placement: "top", title: title ?? service, children: child }),
2530
- children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Icon, { height, style: { display: "block" }, width })
2533
+ wrapperFn: (child) => /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_material2.Tooltip, { placement: "top", title: title ?? service, children: child }),
2534
+ children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(AwsServiceIconBase, { height, service, style: { display: "block" }, width })
2531
2535
  }
2532
2536
  );
2533
2537
  };
2534
2538
 
2535
2539
  // src/components/cells/pill-cell.tsx
2536
2540
  var import_material3 = require("@mui/material");
2537
- var import_jsx_runtime123 = require("react/jsx-runtime");
2541
+ var import_jsx_runtime124 = require("react/jsx-runtime");
2538
2542
  var PillCell = ({
2539
2543
  backgroundColor,
2540
2544
  borderColor,
@@ -2544,7 +2548,7 @@ var PillCell = ({
2544
2548
  paddingBottom,
2545
2549
  paddingTop
2546
2550
  }) => {
2547
- return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
2551
+ return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
2548
2552
  import_material3.Box,
2549
2553
  {
2550
2554
  sx: {
@@ -2567,7 +2571,7 @@ var PillCell = ({
2567
2571
  };
2568
2572
 
2569
2573
  // src/components/cells/service-cell.tsx
2570
- var import_jsx_runtime124 = require("react/jsx-runtime");
2574
+ var import_jsx_runtime125 = require("react/jsx-runtime");
2571
2575
  var ServiceCell = ({
2572
2576
  borderColor,
2573
2577
  borderWidth,
@@ -2577,9 +2581,9 @@ var ServiceCell = ({
2577
2581
  showIcon = true,
2578
2582
  width = "32px"
2579
2583
  }) => {
2580
- return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_material4.Box, { sx: { width: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(PillCell, { borderColor, borderWidth, height, children: [
2581
- showIcon ? /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(import_jsx_runtime124.Fragment, { children: [
2582
- /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
2584
+ return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material4.Box, { sx: { width: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(PillCell, { borderColor, borderWidth, height, children: [
2585
+ showIcon ? /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(import_jsx_runtime125.Fragment, { children: [
2586
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
2583
2587
  import_material4.Box,
2584
2588
  {
2585
2589
  sx: {
@@ -2591,12 +2595,12 @@ var ServiceCell = ({
2591
2595
  padding: 0,
2592
2596
  width
2593
2597
  },
2594
- children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(AwsServiceIcon, { hideTooltip: true, service, size: "large" })
2598
+ children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(AwsServiceIcon, { hideTooltip: true, service, size: "large" })
2595
2599
  }
2596
2600
  ),
2597
- /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_material4.Divider, { orientation: "vertical" })
2601
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material4.Divider, { orientation: "vertical" })
2598
2602
  ] }) : void 0,
2599
- /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
2603
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
2600
2604
  import_material4.Typography,
2601
2605
  {
2602
2606
  sx: {
@@ -2619,9 +2623,9 @@ var ServiceCell = ({
2619
2623
  children: service
2620
2624
  }
2621
2625
  ),
2622
- resource ? /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(import_jsx_runtime124.Fragment, { children: [
2623
- /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_material4.Box, { sx: { height: "100%", paddingY: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_material4.Divider, { orientation: "vertical" }) }),
2624
- /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
2626
+ resource ? /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(import_jsx_runtime125.Fragment, { children: [
2627
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material4.Box, { sx: { height: "100%", paddingY: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material4.Divider, { orientation: "vertical" }) }),
2628
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
2625
2629
  import_material4.Typography,
2626
2630
  {
2627
2631
  sx: {
@@ -2711,7 +2715,7 @@ var searchInObject = (object, searchTerm, skipKeys = []) => {
2711
2715
  };
2712
2716
 
2713
2717
  // src/components/spans-list/spans-data-grid.tsx
2714
- var import_jsx_runtime125 = require("react/jsx-runtime");
2718
+ var import_jsx_runtime126 = require("react/jsx-runtime");
2715
2719
  var resourceNameComparator = (v1 = "", v2 = "") => {
2716
2720
  return v1.localeCompare(v2);
2717
2721
  };
@@ -2726,7 +2730,7 @@ var columns = [
2726
2730
  field: "trace_id",
2727
2731
  headerName: "Trace",
2728
2732
  renderCell: (parameters) => {
2729
- return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material5.Tooltip, { arrow: true, title: String(parameters.value), children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
2733
+ return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Tooltip, { arrow: true, title: String(parameters.value), children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
2730
2734
  "span",
2731
2735
  {
2732
2736
  style: {
@@ -2745,7 +2749,7 @@ var columns = [
2745
2749
  {
2746
2750
  field: "start_time_unix_nano",
2747
2751
  headerName: "Time",
2748
- renderCell: (parameters) => /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(ResponsiveTimestampCell, { value: parameters.value }),
2752
+ renderCell: (parameters) => /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(ResponsiveTimestampCell, { value: parameters.value }),
2749
2753
  type: "string",
2750
2754
  width: 180
2751
2755
  },
@@ -2756,7 +2760,7 @@ var columns = [
2756
2760
  if (!parameters.row.parent_service_name || !parameters.row.parent_resource_name) {
2757
2761
  return;
2758
2762
  }
2759
- return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(ServiceCell, { resource: parameters.row.parent_resource_name, service: parameters.row.parent_service_name });
2763
+ return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(ServiceCell, { resource: parameters.row.parent_resource_name, service: parameters.row.parent_service_name });
2760
2764
  },
2761
2765
  sortable: true,
2762
2766
  sortComparator: resourceNameComparator,
@@ -2774,7 +2778,7 @@ var columns = [
2774
2778
  headerName: "Consumer",
2775
2779
  maxWidth: 260,
2776
2780
  renderCell: (parameters) => {
2777
- return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(ServiceCell, { resource: parameters.row.resource_name, service: parameters.row.service_name });
2781
+ return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(ServiceCell, { resource: parameters.row.resource_name, service: parameters.row.service_name });
2778
2782
  },
2779
2783
  sortComparator: resourceNameComparator
2780
2784
  },
@@ -2783,7 +2787,7 @@ var columns = [
2783
2787
  field: "events",
2784
2788
  headerName: "Events",
2785
2789
  minWidth: 120,
2786
- renderCell: (parameters) => /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(EventIndicatorCell, { events: parameters.row.events }),
2790
+ renderCell: (parameters) => /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(EventIndicatorCell, { events: parameters.row.events }),
2787
2791
  sortable: false
2788
2792
  }
2789
2793
  ];
@@ -2805,8 +2809,8 @@ var SpansDataGrid = ({
2805
2809
  // setRows,
2806
2810
  sortingOption = defaultSortingOption
2807
2811
  }) => {
2808
- const [searchTerm, setSearchTerm] = (0, import_react3.useState)(() => localStorage.getItem("spansSearchTerm") ?? "");
2809
- const [sortModel, setSortModel] = (0, import_react3.useState)(() => {
2812
+ const [searchTerm, setSearchTerm] = (0, import_react4.useState)(() => localStorage.getItem("spansSearchTerm") ?? "");
2813
+ const [sortModel, setSortModel] = (0, import_react4.useState)(() => {
2810
2814
  const savedSorting = localStorage.getItem("spansSortModel");
2811
2815
  if (savedSorting) {
2812
2816
  try {
@@ -2822,38 +2826,38 @@ var SpansDataGrid = ({
2822
2826
  }
2823
2827
  ];
2824
2828
  });
2825
- const handleRowClick = (0, import_react3.useCallback)((parameters) => {
2829
+ const handleRowClick = (0, import_react4.useCallback)((parameters) => {
2826
2830
  onSpanClick(parameters.row);
2827
2831
  }, [onSpanClick]);
2828
- const handleSearchTermChange = (0, import_react3.useCallback)((span) => {
2832
+ const handleSearchTermChange = (0, import_react4.useCallback)((span) => {
2829
2833
  const newValue = span.target.value;
2830
2834
  setSearchTerm(newValue);
2831
2835
  localStorage.setItem("spansSearchTerm", newValue);
2832
2836
  }, []);
2833
- const handleSortModelChange = (0, import_react3.useCallback)((newSortModel) => {
2837
+ const handleSortModelChange = (0, import_react4.useCallback)((newSortModel) => {
2834
2838
  setSortModel(newSortModel);
2835
2839
  localStorage.setItem("spansSortModel", JSON.stringify(newSortModel));
2836
2840
  }, []);
2837
- const filterSpansBySearchTerm = (0, import_react3.useCallback)(
2841
+ const filterSpansBySearchTerm = (0, import_react4.useCallback)(
2838
2842
  (span) => {
2839
2843
  if (searchTerm.length === 0) return true;
2840
2844
  return searchInObject(span, searchTerm);
2841
2845
  },
2842
2846
  [searchTerm]
2843
2847
  );
2844
- const filtersToApply = (0, import_react3.useMemo)(() => [filterSpansBySearchTerm], [filterSpansBySearchTerm]);
2845
- const filteredRows = (0, import_react3.useMemo)(
2848
+ const filtersToApply = (0, import_react4.useMemo)(() => [filterSpansBySearchTerm], [filterSpansBySearchTerm]);
2849
+ const filteredRows = (0, import_react4.useMemo)(
2846
2850
  () => rows.filter((row) => filtersToApply.every((filter) => filter(row))),
2847
2851
  [filtersToApply, rows]
2848
2852
  );
2849
- return /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(import_jsx_runtime125.Fragment, { children: [
2850
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material5.Grid, { item: true, xs: 12, children: /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(import_material5.Box, { sx: { alignItems: "center", display: "flex", gap: "0.5rem" }, children: [
2851
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
2853
+ return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_jsx_runtime126.Fragment, { children: [
2854
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Grid, { item: true, xs: 12, children: /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_material5.Box, { sx: { alignItems: "center", display: "flex", gap: "0.5rem" }, children: [
2855
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
2852
2856
  import_material5.TextField,
2853
2857
  {
2854
- label: /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(import_material5.Box, { sx: { display: "flex", gap: "0.25rem" }, children: [
2855
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_icons_material.Search, { fontSize: "small" }),
2856
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material5.Typography, { children: "Search Spans" })
2858
+ label: /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_material5.Box, { sx: { display: "flex", gap: "0.25rem" }, children: [
2859
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_icons_material.Search, { fontSize: "small" }),
2860
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Typography, { children: "Search Spans" })
2857
2861
  ] }),
2858
2862
  onChange: handleSearchTermChange,
2859
2863
  size: "small",
@@ -2861,11 +2865,11 @@ var SpansDataGrid = ({
2861
2865
  value: searchTerm
2862
2866
  }
2863
2867
  ),
2864
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material5.Box, { sx: { flexGrow: 1 } }),
2865
- onFilterWriteOperationsChange && /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
2868
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Box, { sx: { flexGrow: 1 } }),
2869
+ onFilterWriteOperationsChange && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
2866
2870
  import_material5.FormControlLabel,
2867
2871
  {
2868
- control: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
2872
+ control: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
2869
2873
  import_material5.Switch,
2870
2874
  {
2871
2875
  checked: filterWriteOperations,
@@ -2878,10 +2882,10 @@ var SpansDataGrid = ({
2878
2882
  label: "Only Write Operations"
2879
2883
  }
2880
2884
  ),
2881
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material5.Button, { onClick: onClearSpans, startIcon: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_icons_material.DeleteForeverOutlined, {}), children: "Clear Spans" }),
2882
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_material5.Button, { disabled: loading, onClick: onRefresh, startIcon: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_icons_material.Cached, {}), children: "Refresh" })
2885
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Button, { onClick: onClearSpans, startIcon: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_icons_material.DeleteForeverOutlined, {}), children: "Clear Spans" }),
2886
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material5.Button, { disabled: loading, onClick: onRefresh, startIcon: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_icons_material.Cached, {}), children: "Refresh" })
2883
2887
  ] }) }),
2884
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", { style: { display: "flex", flexDirection: "column", flexGrow: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
2888
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { style: { display: "flex", flexDirection: "column", flexGrow: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
2885
2889
  import_material5.Paper,
2886
2890
  {
2887
2891
  sx: {
@@ -2892,7 +2896,7 @@ var SpansDataGrid = ({
2892
2896
  minHeight: 120,
2893
2897
  p: 2
2894
2898
  },
2895
- children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
2899
+ children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
2896
2900
  import_x_data_grid.DataGrid,
2897
2901
  {
2898
2902
  columns,
@@ -2930,13 +2934,13 @@ var SpansDataGrid = ({
2930
2934
  };
2931
2935
 
2932
2936
  // src/components/spans-list/spans-list.tsx
2933
- var import_jsx_runtime126 = require("react/jsx-runtime");
2937
+ var import_jsx_runtime127 = require("react/jsx-runtime");
2934
2938
  var SpansList = (props) => {
2935
- return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_material6.Box, { "data-testid": "spans-data-grid", sx: { display: "flex", flexDirection: "column", flexGrow: 1, gap: 2, width: "100%" }, children: [
2936
- props.spans.error && /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
2939
+ return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_material6.Box, { "data-testid": "spans-data-grid", sx: { display: "flex", flexDirection: "column", flexGrow: 1, gap: 2, width: "100%" }, children: [
2940
+ props.spans.error && /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
2937
2941
  import_material6.Alert,
2938
2942
  {
2939
- action: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_material6.Button, { onClick: props.onRefresh, children: "Retry" }),
2943
+ action: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material6.Button, { onClick: props.onRefresh, children: "Retry" }),
2940
2944
  severity: "error",
2941
2945
  children: [
2942
2946
  "Unexpected error:",
@@ -2945,7 +2949,7 @@ var SpansList = (props) => {
2945
2949
  ]
2946
2950
  }
2947
2951
  ),
2948
- (props.spans.data !== void 0 || props.spans.loading) && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
2952
+ (props.spans.data !== void 0 || props.spans.loading) && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
2949
2953
  SpansDataGrid,
2950
2954
  {
2951
2955
  filterWriteOperations: props.filterWriteOperations,
@@ -3011,14 +3015,14 @@ var getAppInspectorApiUrl = (localstackEndpoint, endpoint) => {
3011
3015
  };
3012
3016
 
3013
3017
  // src/components/status-message/status-message.tsx
3014
- var import_jsx_runtime127 = require("react/jsx-runtime");
3018
+ var import_jsx_runtime128 = require("react/jsx-runtime");
3015
3019
  var StatusMessage = ({
3016
3020
  error,
3017
3021
  onRetry,
3018
3022
  status
3019
3023
  }) => {
3020
3024
  if (error instanceof AppInspectorNotFoundError) {
3021
- return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
3025
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
3022
3026
  import_material7.Box,
3023
3027
  {
3024
3028
  sx: {
@@ -3029,18 +3033,18 @@ var StatusMessage = ({
3029
3033
  justifyContent: "center",
3030
3034
  p: 4
3031
3035
  },
3032
- children: /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
3036
+ children: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
3033
3037
  import_material7.Alert,
3034
3038
  {
3035
- icon: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_icons_material2.ErrorOutline, { fontSize: "large" }),
3039
+ icon: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_icons_material2.ErrorOutline, { fontSize: "large" }),
3036
3040
  severity: "error",
3037
3041
  sx: { maxWidth: 600, width: "100%" },
3038
3042
  children: [
3039
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.AlertTitle, { sx: { fontWeight: "bold" }, children: "App Inspector Not Available" }),
3040
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Typography, { sx: { mb: 2 }, variant: "body2", children: "The App Inspector extension is not licensed or not enabled in LocalStack." }),
3041
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Typography, { sx: { mb: 1 }, variant: "body2", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("strong", { children: "To enable App Inspector:" }) }),
3042
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Typography, { sx: { mb: 1 }, variant: "body2", children: "Set the environment variable and restart LocalStack:" }),
3043
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
3043
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.AlertTitle, { sx: { fontWeight: "bold" }, children: "App Inspector Not Available" }),
3044
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.Typography, { sx: { mb: 2 }, variant: "body2", children: "The App Inspector extension is not licensed or not enabled in LocalStack." }),
3045
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.Typography, { sx: { mb: 1 }, variant: "body2", children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("strong", { children: "To enable App Inspector:" }) }),
3046
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.Typography, { sx: { mb: 1 }, variant: "body2", children: "Set the environment variable and restart LocalStack:" }),
3047
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
3044
3048
  import_material7.Box,
3045
3049
  {
3046
3050
  component: "pre",
@@ -3053,24 +3057,24 @@ var StatusMessage = ({
3053
3057
  children: "LOCALSTACK_APPINSPECTOR_ENABLE=1"
3054
3058
  }
3055
3059
  ),
3056
- /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_material7.Typography, { sx: { fontStyle: "italic", mb: 1, mt: 2 }, variant: "body2", children: [
3060
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(import_material7.Typography, { sx: { fontStyle: "italic", mb: 1, mt: 2 }, variant: "body2", children: [
3057
3061
  "Runtime changes can be made via endpoint",
3058
3062
  " ",
3059
- /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("code", { children: [
3063
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("code", { children: [
3060
3064
  APPINSPECTOR_API_PREFIX,
3061
3065
  "/status"
3062
3066
  ] }),
3063
3067
  ". For persistent default state across restarts, adjust the",
3064
3068
  " ",
3065
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("code", { children: "LOCALSTACK_APPINSPECTOR_ENABLE" }),
3069
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("code", { children: "LOCALSTACK_APPINSPECTOR_ENABLE" }),
3066
3070
  " ",
3067
3071
  "environment variable in your",
3068
3072
  " ",
3069
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("code", { children: "~/.localstack" }),
3073
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("code", { children: "~/.localstack" }),
3070
3074
  " ",
3071
3075
  "profile files.",
3072
3076
  " ",
3073
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
3077
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
3074
3078
  import_material7.Link,
3075
3079
  {
3076
3080
  href: "https://docs.localstack.cloud/aws/capabilities/config/configuration/#profiles",
@@ -3080,8 +3084,8 @@ var StatusMessage = ({
3080
3084
  }
3081
3085
  )
3082
3086
  ] }),
3083
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Typography, { sx: { mb: 1, mt: 2 }, variant: "body2", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("strong", { children: "For more information:" }) }),
3084
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
3087
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.Typography, { sx: { mb: 1, mt: 2 }, variant: "body2", children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("strong", { children: "For more information:" }) }),
3088
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
3085
3089
  import_material7.Link,
3086
3090
  {
3087
3091
  href: "https://docs.localstack.cloud/user-guide/tools/application-inspector/",
@@ -3090,7 +3094,7 @@ var StatusMessage = ({
3090
3094
  children: "App Inspector Documentation"
3091
3095
  }
3092
3096
  ),
3093
- onRetry && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Box, { sx: { display: "flex", justifyContent: "flex-start", mt: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
3097
+ onRetry && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.Box, { sx: { display: "flex", justifyContent: "flex-start", mt: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
3094
3098
  import_material7.Button,
3095
3099
  {
3096
3100
  "aria-label": "Check App Inspector status again",
@@ -3106,7 +3110,7 @@ var StatusMessage = ({
3106
3110
  );
3107
3111
  }
3108
3112
  if (error instanceof ConnectionError) {
3109
- return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
3113
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
3110
3114
  import_material7.Box,
3111
3115
  {
3112
3116
  sx: {
@@ -3117,17 +3121,17 @@ var StatusMessage = ({
3117
3121
  justifyContent: "center",
3118
3122
  p: 4
3119
3123
  },
3120
- children: /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
3124
+ children: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
3121
3125
  import_material7.Alert,
3122
3126
  {
3123
- icon: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_icons_material2.ErrorOutline, { fontSize: "large" }),
3127
+ icon: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_icons_material2.ErrorOutline, { fontSize: "large" }),
3124
3128
  severity: "error",
3125
3129
  sx: { maxWidth: 600, width: "100%" },
3126
3130
  children: [
3127
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.AlertTitle, { sx: { fontWeight: "bold" }, children: "Connection Error" }),
3128
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Typography, { sx: { mb: 2 }, variant: "body2", children: "Failed to connect to LocalStack. Please ensure LocalStack is running and accessible." }),
3129
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Typography, { sx: { mb: 1 }, variant: "body2", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("strong", { children: "To start LocalStack:" }) }),
3130
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
3131
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.AlertTitle, { sx: { fontWeight: "bold" }, children: "Connection Error" }),
3132
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.Typography, { sx: { mb: 2 }, variant: "body2", children: "Failed to connect to LocalStack. Please ensure LocalStack is running and accessible." }),
3133
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.Typography, { sx: { mb: 1 }, variant: "body2", children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("strong", { children: "To start LocalStack:" }) }),
3134
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
3131
3135
  import_material7.Box,
3132
3136
  {
3133
3137
  component: "pre",
@@ -3140,7 +3144,7 @@ var StatusMessage = ({
3140
3144
  children: "localstack start"
3141
3145
  }
3142
3146
  ),
3143
- onRetry && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Box, { sx: { display: "flex", justifyContent: "flex-start", mt: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
3147
+ onRetry && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.Box, { sx: { display: "flex", justifyContent: "flex-start", mt: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
3144
3148
  import_material7.Button,
3145
3149
  {
3146
3150
  "aria-label": "Retry connection to LocalStack",
@@ -3156,7 +3160,7 @@ var StatusMessage = ({
3156
3160
  );
3157
3161
  }
3158
3162
  if (status?.status === "DISABLED") {
3159
- return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
3163
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
3160
3164
  import_material7.Box,
3161
3165
  {
3162
3166
  sx: {
@@ -3167,17 +3171,17 @@ var StatusMessage = ({
3167
3171
  justifyContent: "center",
3168
3172
  p: 4
3169
3173
  },
3170
- children: /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
3174
+ children: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
3171
3175
  import_material7.Alert,
3172
3176
  {
3173
- icon: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_icons_material2.InfoOutlined, { fontSize: "large" }),
3177
+ icon: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_icons_material2.InfoOutlined, { fontSize: "large" }),
3174
3178
  severity: "warning",
3175
3179
  sx: { maxWidth: 600, width: "100%" },
3176
3180
  children: [
3177
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.AlertTitle, { sx: { fontWeight: "bold" }, children: "App Inspector is Disabled" }),
3178
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Typography, { sx: { mb: 2 }, variant: "body2", children: "App Inspector is currently disabled. Please enable it to view traces and spans." }),
3179
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Typography, { sx: { mb: 1 }, variant: "body2", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("strong", { children: "To enable App Inspector at runtime:" }) }),
3180
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
3181
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.AlertTitle, { sx: { fontWeight: "bold" }, children: "App Inspector is Disabled" }),
3182
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.Typography, { sx: { mb: 2 }, variant: "body2", children: "App Inspector is currently disabled. Please enable it to view traces and spans." }),
3183
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.Typography, { sx: { mb: 1 }, variant: "body2", children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("strong", { children: "To enable App Inspector at runtime:" }) }),
3184
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
3181
3185
  import_material7.Box,
3182
3186
  {
3183
3187
  component: "pre",
@@ -3188,14 +3192,14 @@ var StatusMessage = ({
3188
3192
  overflowX: "auto",
3189
3193
  p: 1
3190
3194
  },
3191
- children: `curl -X PUT http://localhost:4566${APPINSPECTOR_API_PREFIX}/status \\
3192
- -H "Content-Type: application/json" \\
3195
+ children: String.raw`curl -X PUT http://localhost:4566${APPINSPECTOR_API_PREFIX}/status \
3196
+ -H "Content-Type: application/json" \
3193
3197
  -d '{"status": "ENABLED"}'`
3194
3198
  }
3195
3199
  ),
3196
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Typography, { sx: { mb: 1, mt: 2 }, variant: "body2", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("strong", { children: "To enable App Inspector persistently across restarts:" }) }),
3197
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Typography, { sx: { mb: 1 }, variant: "body2", children: "Set the environment variable:" }),
3198
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
3200
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.Typography, { sx: { mb: 1, mt: 2 }, variant: "body2", children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("strong", { children: "To enable App Inspector persistently across restarts:" }) }),
3201
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.Typography, { sx: { mb: 1 }, variant: "body2", children: "Set the environment variable:" }),
3202
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
3199
3203
  import_material7.Box,
3200
3204
  {
3201
3205
  component: "pre",
@@ -3208,8 +3212,8 @@ var StatusMessage = ({
3208
3212
  children: "APPINSPECTOR=1"
3209
3213
  }
3210
3214
  ),
3211
- Boolean(status.note) && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Typography, { sx: { display: "block", fontStyle: "italic", mt: 2 }, variant: "caption", children: status.note }),
3212
- onRetry && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Box, { sx: { display: "flex", justifyContent: "flex-start", mt: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
3215
+ Boolean(status.note) && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.Typography, { sx: { display: "block", fontStyle: "italic", mt: 2 }, variant: "caption", children: status.note }),
3216
+ onRetry && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.Box, { sx: { display: "flex", justifyContent: "flex-start", mt: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
3213
3217
  import_material7.Button,
3214
3218
  {
3215
3219
  "aria-label": "Check if App Inspector is enabled",
@@ -3225,7 +3229,7 @@ var StatusMessage = ({
3225
3229
  );
3226
3230
  }
3227
3231
  if (error) {
3228
- return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
3232
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
3229
3233
  import_material7.Box,
3230
3234
  {
3231
3235
  sx: {
@@ -3236,16 +3240,16 @@ var StatusMessage = ({
3236
3240
  justifyContent: "center",
3237
3241
  p: 4
3238
3242
  },
3239
- children: /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
3243
+ children: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
3240
3244
  import_material7.Alert,
3241
3245
  {
3242
- icon: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_icons_material2.ErrorOutline, { fontSize: "large" }),
3246
+ icon: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_icons_material2.ErrorOutline, { fontSize: "large" }),
3243
3247
  severity: "error",
3244
3248
  sx: { maxWidth: 600, width: "100%" },
3245
3249
  children: [
3246
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.AlertTitle, { sx: { fontWeight: "bold" }, children: "Error" }),
3247
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Typography, { sx: { mb: 2 }, variant: "body2", children: error.message }),
3248
- onRetry && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_material7.Box, { sx: { display: "flex", justifyContent: "flex-start", mt: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
3250
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.AlertTitle, { sx: { fontWeight: "bold" }, children: "Error" }),
3251
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.Typography, { sx: { mb: 2 }, variant: "body2", children: error.message }),
3252
+ onRetry && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_material7.Box, { sx: { display: "flex", justifyContent: "flex-start", mt: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
3249
3253
  import_material7.Button,
3250
3254
  {
3251
3255
  "aria-label": "Retry operation",
@@ -3260,12 +3264,12 @@ var StatusMessage = ({
3260
3264
  }
3261
3265
  );
3262
3266
  }
3263
- return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_jsx_runtime127.Fragment, {});
3267
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_jsx_runtime128.Fragment, {});
3264
3268
  };
3265
3269
 
3266
3270
  // src/context.tsx
3267
- var import_react4 = require("react");
3268
3271
  var import_react5 = require("react");
3272
+ var import_react6 = require("react");
3269
3273
 
3270
3274
  // src/constants/error-messages.ts
3271
3275
  var ERROR_MESSAGES = {
@@ -3386,20 +3390,20 @@ var createApiClient = ({ localstackEndpoint }) => {
3386
3390
  };
3387
3391
 
3388
3392
  // src/context.tsx
3389
- var import_jsx_runtime128 = require("react/jsx-runtime");
3390
- var AppInspectorContext = (0, import_react4.createContext)(void 0);
3393
+ var import_jsx_runtime129 = require("react/jsx-runtime");
3394
+ var AppInspectorContext = (0, import_react5.createContext)(void 0);
3391
3395
  var useAppInspector = () => {
3392
- const context = (0, import_react4.useContext)(AppInspectorContext);
3396
+ const context = (0, import_react5.useContext)(AppInspectorContext);
3393
3397
  if (!context) {
3394
3398
  throw new Error("@localstack-studio/ui: components must be used within a <AppInspectorContextProvider>");
3395
3399
  }
3396
3400
  return context;
3397
3401
  };
3398
3402
  var AppInspectorContextProvider = (props) => {
3399
- const api = (0, import_react5.useMemo)(() => {
3403
+ const api = (0, import_react6.useMemo)(() => {
3400
3404
  return false ? createApiClientMock() : createApiClient({ localstackEndpoint: props.localstackEndpoint });
3401
3405
  }, [props.localstackEndpoint]);
3402
- const resolveLink = (0, import_react5.useCallback)(
3406
+ const resolveLink = (0, import_react6.useCallback)(
3403
3407
  (options) => {
3404
3408
  if (options.to === "settings") {
3405
3409
  return `${props.routePrefix}/settings`;
@@ -3411,7 +3415,7 @@ var AppInspectorContextProvider = (props) => {
3411
3415
  },
3412
3416
  [props.routePrefix]
3413
3417
  );
3414
- const contextValue = (0, import_react5.useMemo)(
3418
+ const contextValue = (0, import_react6.useMemo)(
3415
3419
  () => ({
3416
3420
  linkComponent: props.linkComponent,
3417
3421
  localstackEndpoint: props.localstackEndpoint,
@@ -3419,13 +3423,13 @@ var AppInspectorContextProvider = (props) => {
3419
3423
  }),
3420
3424
  [props.linkComponent, props.localstackEndpoint, resolveLink]
3421
3425
  );
3422
- return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(ApiProvider, { api, children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(AppInspectorContext.Provider, { value: contextValue, children: props.children }) });
3426
+ return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(ApiProvider, { api, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(AppInspectorContext.Provider, { value: contextValue, children: props.children }) });
3423
3427
  };
3424
3428
 
3425
3429
  // src/hooks/use-local-storage.tsx
3426
- var import_react6 = require("react");
3430
+ var import_react7 = require("react");
3427
3431
  function useLocalStorage(key, initialValue) {
3428
- const [storedValue, setStoredValue] = (0, import_react6.useState)(() => {
3432
+ const [storedValue, setStoredValue] = (0, import_react7.useState)(() => {
3429
3433
  try {
3430
3434
  const item = globalThis.localStorage.getItem(key);
3431
3435
  return item ? JSON.parse(item) : initialValue;
@@ -3434,7 +3438,7 @@ function useLocalStorage(key, initialValue) {
3434
3438
  return initialValue;
3435
3439
  }
3436
3440
  });
3437
- const setValue = (0, import_react6.useCallback)((value) => {
3441
+ const setValue = (0, import_react7.useCallback)((value) => {
3438
3442
  try {
3439
3443
  setStoredValue(value);
3440
3444
  globalThis.localStorage.setItem(key, JSON.stringify(value));
@@ -3446,7 +3450,7 @@ function useLocalStorage(key, initialValue) {
3446
3450
  console.error(`Error setting localStorage key "${key}":`, error);
3447
3451
  }
3448
3452
  }, [key]);
3449
- (0, import_react6.useEffect)(() => {
3453
+ (0, import_react7.useEffect)(() => {
3450
3454
  const handleStorageChange = (event) => {
3451
3455
  if (event.key === key && event.newValue !== null) {
3452
3456
  try {
@@ -3465,15 +3469,15 @@ function useLocalStorage(key, initialValue) {
3465
3469
  }
3466
3470
 
3467
3471
  // src/hooks/use-status.tsx
3468
- var import_react7 = require("react");
3472
+ var import_react8 = require("react");
3469
3473
  var useStatus = () => {
3470
3474
  const api = useAppInspectorApi();
3471
- const [checking, setChecking] = (0, import_react7.useState)(true);
3472
- const [status, setStatus] = (0, import_react7.useState)();
3473
- const [error, setError] = (0, import_react7.useState)();
3474
- const hasFetchedReference = (0, import_react7.useRef)(false);
3475
- const abortControllerReference = (0, import_react7.useRef)(null);
3476
- const checkStatus = (0, import_react7.useCallback)(async () => {
3475
+ const [checking, setChecking] = (0, import_react8.useState)(true);
3476
+ const [status, setStatus] = (0, import_react8.useState)();
3477
+ const [error, setError] = (0, import_react8.useState)();
3478
+ const hasFetchedReference = (0, import_react8.useRef)(false);
3479
+ const abortControllerReference = (0, import_react8.useRef)(null);
3480
+ const checkStatus = (0, import_react8.useCallback)(async () => {
3477
3481
  if (abortControllerReference.current) {
3478
3482
  abortControllerReference.current.abort();
3479
3483
  }
@@ -3497,7 +3501,7 @@ var useStatus = () => {
3497
3501
  }
3498
3502
  }
3499
3503
  }, [api]);
3500
- (0, import_react7.useEffect)(() => {
3504
+ (0, import_react8.useEffect)(() => {
3501
3505
  if (!hasFetchedReference.current) {
3502
3506
  hasFetchedReference.current = true;
3503
3507
  void checkStatus();
@@ -3507,28 +3511,28 @@ var useStatus = () => {
3507
3511
  };
3508
3512
 
3509
3513
  // src/pages/spans-list-page.tsx
3510
- var import_jsx_runtime129 = require("react/jsx-runtime");
3514
+ var import_jsx_runtime130 = require("react/jsx-runtime");
3515
+ var spansPerPageOptions = [25, 50, 100];
3511
3516
  var SpansListPage = () => {
3512
3517
  const api = useAppInspectorApi();
3513
- const [spans, setSpans] = (0, import_react8.useState)();
3514
- const [loading, setLoading] = (0, import_react8.useState)(false);
3515
- const hasFetched = (0, import_react8.useRef)(false);
3518
+ const [spans, setSpans] = (0, import_react9.useState)();
3519
+ const [loading, setLoading] = (0, import_react9.useState)(false);
3520
+ const hasFetched = (0, import_react9.useRef)(false);
3516
3521
  const [filterWriteOperations, setFilterWriteOperations] = useLocalStorage("filterWriteOperations", true);
3517
- const mapPageToNextCursor = (0, import_react8.useRef)({});
3518
- const [page, setPage] = (0, import_react8.useState)(0);
3519
- const [pageSize, setPageSize] = (0, import_react8.useState)(100);
3520
- const [spansPerPageOptions] = (0, import_react8.useState)(() => [25, 50, 100]);
3521
- const [spanCount, setSpanCount] = (0, import_react8.useState)(0);
3522
- const queryOptions = (0, import_react8.useMemo)(() => {
3522
+ const mapPageToNextCursor = (0, import_react9.useRef)({});
3523
+ const [page, setPage] = (0, import_react9.useState)(0);
3524
+ const [pageSize, setPageSize] = (0, import_react9.useState)(100);
3525
+ const [spanCount, setSpanCount] = (0, import_react9.useState)(0);
3526
+ const queryOptions = (0, import_react9.useMemo)(() => {
3523
3527
  return {
3524
3528
  is_write_operation: filterWriteOperations ? true : void 0,
3525
3529
  limit: pageSize,
3526
3530
  pagination_token: mapPageToNextCursor.current[page - 1]
3527
3531
  };
3528
3532
  }, [filterWriteOperations, pageSize, page]);
3529
- const [fetchError, setFetchError] = (0, import_react8.useState)();
3533
+ const [fetchError, setFetchError] = (0, import_react9.useState)();
3530
3534
  const { checkStatus, error: statusError, status } = useStatus();
3531
- const fetchSpans = (0, import_react8.useCallback)(async () => {
3535
+ const fetchSpans = (0, import_react9.useCallback)(async () => {
3532
3536
  setLoading(true);
3533
3537
  try {
3534
3538
  const response = await api.getSpans(queryOptions);
@@ -3545,26 +3549,26 @@ var SpansListPage = () => {
3545
3549
  setLoading(false);
3546
3550
  }
3547
3551
  }, [api, page, queryOptions]);
3548
- const fetchSpansSync = (0, import_react8.useCallback)(() => {
3552
+ const fetchSpansSync = (0, import_react9.useCallback)(() => {
3549
3553
  void fetchSpans();
3550
3554
  }, [fetchSpans]);
3551
- (0, import_react8.useEffect)(() => {
3555
+ (0, import_react9.useEffect)(() => {
3552
3556
  if (hasFetched.current) return;
3553
3557
  if (status?.status !== "ENABLED") return;
3554
3558
  hasFetched.current = true;
3555
3559
  void fetchSpans();
3556
3560
  }, [fetchSpans, status]);
3557
- (0, import_react8.useEffect)(() => {
3561
+ (0, import_react9.useEffect)(() => {
3558
3562
  if (!hasFetched.current) return;
3559
3563
  void fetchSpans();
3560
3564
  }, [fetchSpans]);
3561
3565
  const navigate = (0, import_react_router_dom.useNavigate)();
3562
3566
  const { resolveLink } = useAppInspector();
3563
- const navigateToSpan = (0, import_react8.useCallback)((span) => {
3567
+ const navigateToSpan = (0, import_react9.useCallback)((span) => {
3564
3568
  const url = resolveLink({ to: "trace-graph", traceId: span.trace_id });
3565
3569
  navigate(`${url}?spanId=${span.span_id}`);
3566
3570
  }, [navigate, resolveLink]);
3567
- const clearSpans = (0, import_react8.useCallback)(async () => {
3571
+ const clearSpans = (0, import_react9.useCallback)(async () => {
3568
3572
  setLoading(true);
3569
3573
  try {
3570
3574
  await api.deleteSpans();
@@ -3578,11 +3582,11 @@ var SpansListPage = () => {
3578
3582
  setLoading(false);
3579
3583
  }
3580
3584
  }, [api, fetchSpans]);
3581
- const handleRetry = (0, import_react8.useCallback)(() => {
3585
+ const handleRetry = (0, import_react9.useCallback)(() => {
3582
3586
  void checkStatus();
3583
3587
  }, [checkStatus]);
3584
3588
  const shouldShowStatusMessage = Boolean(statusError) || status?.status === "DISABLED";
3585
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
3589
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
3586
3590
  import_material8.Box,
3587
3591
  {
3588
3592
  "data-testid": "spans-list-page",
@@ -3593,14 +3597,14 @@ var SpansListPage = () => {
3593
3597
  flexGrow: 1,
3594
3598
  width: "100%"
3595
3599
  },
3596
- children: shouldShowStatusMessage ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
3600
+ children: shouldShowStatusMessage ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
3597
3601
  StatusMessage,
3598
3602
  {
3599
3603
  error: statusError,
3600
3604
  onRetry: handleRetry,
3601
3605
  status
3602
3606
  }
3603
- ) : /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
3607
+ ) : /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
3604
3608
  SpansList,
3605
3609
  {
3606
3610
  filterWriteOperations,
@@ -3637,13 +3641,13 @@ var SpansListPage = () => {
3637
3641
  var import_icons_material11 = require("@mui/icons-material");
3638
3642
  var import_material21 = require("@mui/material");
3639
3643
  var import_styles = require("@mui/material/styles");
3640
- var import_react21 = require("@xyflow/react");
3641
- var import_react22 = require("react");
3644
+ var import_react22 = require("@xyflow/react");
3645
+ var import_react23 = require("react");
3642
3646
  var import_react_router_dom2 = require("react-router-dom");
3643
3647
 
3644
3648
  // src/components/event-details/event-details.tsx
3645
3649
  var import_material16 = require("@mui/material");
3646
- var import_react12 = require("react");
3650
+ var import_react13 = require("react");
3647
3651
 
3648
3652
  // src/utils/iam-utils.ts
3649
3653
  function determinePermissionStatus(payload) {
@@ -3842,9 +3846,9 @@ var getEventGroupsByType = (events) => {
3842
3846
  // src/components/event-details/event-details-header.tsx
3843
3847
  var import_icons_material3 = require("@mui/icons-material");
3844
3848
  var import_material9 = require("@mui/material");
3845
- var import_jsx_runtime130 = require("react/jsx-runtime");
3849
+ var import_jsx_runtime131 = require("react/jsx-runtime");
3846
3850
  var EventDetailsHeader = ({ event, onClose }) => {
3847
- return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
3851
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
3848
3852
  import_material9.Box,
3849
3853
  {
3850
3854
  sx: {
@@ -3856,16 +3860,16 @@ var EventDetailsHeader = ({ event, onClose }) => {
3856
3860
  p: 2
3857
3861
  },
3858
3862
  children: [
3859
- /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_material9.Box, { children: [
3860
- /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_material9.Typography, { sx: { fontWeight: 600 }, variant: "h6", children: "Event Details" }),
3861
- /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_material9.Typography, { color: "text.secondary", variant: "body2", children: [
3863
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_material9.Box, { children: [
3864
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_material9.Typography, { sx: { fontWeight: 600 }, variant: "h6", children: "Event Details" }),
3865
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_material9.Typography, { color: "text.secondary", variant: "body2", children: [
3862
3866
  event.service_name,
3863
3867
  " ",
3864
3868
  "-",
3865
3869
  event.operation_name
3866
3870
  ] })
3867
3871
  ] }),
3868
- onClose && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_material9.IconButton, { onClick: onClose, size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_icons_material3.Close, {}) })
3872
+ onClose && /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_material9.IconButton, { onClick: onClose, size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_icons_material3.Close, {}) })
3869
3873
  ]
3870
3874
  }
3871
3875
  );
@@ -3877,28 +3881,28 @@ var import_material15 = require("@mui/material");
3877
3881
  // src/components/event-details/event-detail.tsx
3878
3882
  var import_icons_material7 = require("@mui/icons-material");
3879
3883
  var import_material13 = require("@mui/material");
3880
- var import_react10 = require("react");
3884
+ var import_react11 = require("react");
3881
3885
 
3882
3886
  // src/components/status-icon.tsx
3883
3887
  var import_icons_material4 = require("@mui/icons-material");
3884
3888
  var import_material10 = require("@mui/material");
3885
- var import_jsx_runtime131 = require("react/jsx-runtime");
3889
+ var import_jsx_runtime132 = require("react/jsx-runtime");
3886
3890
  var StatusIcon = ({ errorLevel }) => {
3887
3891
  switch (errorLevel) {
3888
3892
  case EventLevel.LevelError: {
3889
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_icons_material4.Cancel, { sx: { color: "red" } });
3893
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_icons_material4.Cancel, { sx: { color: "red" } });
3890
3894
  }
3891
3895
  case EventLevel.LevelInfo: {
3892
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_icons_material4.Info, { sx: { color: "gray" } });
3896
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_icons_material4.Info, { sx: { color: "gray" } });
3893
3897
  }
3894
3898
  case EventLevel.LevelPermission: {
3895
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_icons_material4.RemoveCircle, { sx: { color: "blue" } });
3899
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_icons_material4.RemoveCircle, { sx: { color: "blue" } });
3896
3900
  }
3897
3901
  case EventLevel.LevelWarning: {
3898
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_icons_material4.Error, { sx: { color: "orange" } });
3902
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_icons_material4.Error, { sx: { color: "orange" } });
3899
3903
  }
3900
3904
  default: {
3901
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_icons_material4.CheckCircle, { sx: { color: "lightgray" } });
3905
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_icons_material4.CheckCircle, { sx: { color: "lightgray" } });
3902
3906
  }
3903
3907
  }
3904
3908
  };
@@ -3906,9 +3910,9 @@ var StatusIcon = ({ errorLevel }) => {
3906
3910
  // src/components/event-details/iam-event-detail.tsx
3907
3911
  var import_icons_material5 = require("@mui/icons-material");
3908
3912
  var import_material11 = require("@mui/material");
3909
- var import_jsx_runtime132 = require("react/jsx-runtime");
3910
- var DetailRow = ({ content, label }) => /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(import_material11.Grid, { container: true, spacing: 0, sx: { mb: 1 }, children: [
3911
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material11.Grid, { item: true, sx: { pr: 1 }, xs: 3, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
3913
+ var import_jsx_runtime133 = require("react/jsx-runtime");
3914
+ var DetailRow = ({ content, label }) => /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_material11.Grid, { container: true, spacing: 0, sx: { mb: 1 }, children: [
3915
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Grid, { item: true, sx: { pr: 1 }, xs: 3, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
3912
3916
  import_material11.Typography,
3913
3917
  {
3914
3918
  sx: {
@@ -3919,7 +3923,7 @@ var DetailRow = ({ content, label }) => /* @__PURE__ */ (0, import_jsx_runtime13
3919
3923
  children: label
3920
3924
  }
3921
3925
  ) }),
3922
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material11.Grid, { item: true, xs: 9, children: typeof content === "string" ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
3926
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Grid, { item: true, xs: 9, children: typeof content === "string" ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
3923
3927
  import_material11.Typography,
3924
3928
  {
3925
3929
  sx: {
@@ -3935,30 +3939,30 @@ var PermissionIcon = ({ status }) => {
3935
3939
  switch (status) {
3936
3940
  case "explicitly_allowed":
3937
3941
  case "implicitly_allowed": {
3938
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_icons_material5.CheckCircle, { sx: { color: "success.main", fontSize: "1rem" } });
3942
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons_material5.CheckCircle, { sx: { color: "success.main", fontSize: "1rem" } });
3939
3943
  }
3940
3944
  case "explicitly_denied": {
3941
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_icons_material5.Error, { sx: { color: "error.main", fontSize: "1rem" } });
3945
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons_material5.Error, { sx: { color: "error.main", fontSize: "1rem" } });
3942
3946
  }
3943
3947
  case "implicitly_denied": {
3944
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_icons_material5.Warning, { sx: { color: "warning.main", fontSize: "1rem" } });
3948
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons_material5.Warning, { sx: { color: "warning.main", fontSize: "1rem" } });
3945
3949
  }
3946
3950
  }
3947
3951
  };
3948
3952
  var IAMEventDetail = ({ event }) => {
3949
3953
  const payloadString = event.attributes?.payload;
3950
3954
  if (!payloadString) {
3951
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material11.Box, { sx: { p: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material11.Typography, { sx: { fontWeight: 600 }, variant: "body2", children: "No IAM policy evaluation data available" }) });
3955
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Box, { sx: { p: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Typography, { sx: { fontWeight: 600 }, variant: "body2", children: "No IAM policy evaluation data available" }) });
3952
3956
  }
3953
3957
  const parsedIAM = parseIAMEvent(payloadString);
3954
3958
  if (!parsedIAM) {
3955
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material11.Box, { sx: { p: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material11.Typography, { sx: { fontWeight: 600 }, variant: "body2", children: "Failed to parse IAM event data" }) });
3959
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Box, { sx: { p: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Typography, { sx: { fontWeight: 600 }, variant: "body2", children: "Failed to parse IAM event data" }) });
3956
3960
  }
3957
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(import_material11.Box, { sx: { p: 2 }, children: [
3958
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material11.Box, { sx: { mb: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
3961
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_material11.Box, { sx: { p: 2 }, children: [
3962
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Box, { sx: { mb: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
3959
3963
  import_material11.Chip,
3960
3964
  {
3961
- icon: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(PermissionIcon, { status: parsedIAM.permission }),
3965
+ icon: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(PermissionIcon, { status: parsedIAM.permission }),
3962
3966
  label: formatPermissionStatus(parsedIAM.permission),
3963
3967
  size: "small",
3964
3968
  sx: {
@@ -3968,12 +3972,12 @@ var IAMEventDetail = ({ event }) => {
3968
3972
  variant: "outlined"
3969
3973
  }
3970
3974
  ) }),
3971
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(DetailRow, { content: `${parsedIAM.service}:${parsedIAM.operation}`, label: "Operation" }),
3972
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(DetailRow, { content: parsedIAM.principal, label: "Principal" }),
3973
- parsedIAM.details.actions && parsedIAM.details.actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
3975
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(DetailRow, { content: `${parsedIAM.service}:${parsedIAM.operation}`, label: "Operation" }),
3976
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(DetailRow, { content: parsedIAM.principal, label: "Principal" }),
3977
+ parsedIAM.details.actions && parsedIAM.details.actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
3974
3978
  DetailRow,
3975
3979
  {
3976
- content: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material11.Box, { children: parsedIAM.details.actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
3980
+ content: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Box, { children: parsedIAM.details.actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
3977
3981
  import_material11.Typography,
3978
3982
  {
3979
3983
  sx: {
@@ -3987,10 +3991,10 @@ var IAMEventDetail = ({ event }) => {
3987
3991
  label: "Actions"
3988
3992
  }
3989
3993
  ),
3990
- parsedIAM.details.resources && parsedIAM.details.resources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
3994
+ parsedIAM.details.resources && parsedIAM.details.resources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
3991
3995
  DetailRow,
3992
3996
  {
3993
- content: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material11.Box, { children: parsedIAM.details.resources.map((resource) => /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
3997
+ content: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Box, { children: parsedIAM.details.resources.map((resource) => /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
3994
3998
  import_material11.Typography,
3995
3999
  {
3996
4000
  sx: {
@@ -4005,20 +4009,20 @@ var IAMEventDetail = ({ event }) => {
4005
4009
  label: "Resources"
4006
4010
  }
4007
4011
  ),
4008
- /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(import_material11.Box, { sx: { mt: 2 }, children: [
4009
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material11.Typography, { sx: { fontWeight: 600, mb: 1 }, variant: "caption", children: "Policy Evaluation" }),
4010
- /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(import_material11.Grid, { container: true, spacing: 2, children: [
4011
- parsedIAM.details.explicitAllows !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material11.Grid, { item: true, xs: 4, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(import_material11.Box, { sx: { textAlign: "center" }, children: [
4012
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material11.Typography, { color: "success.main", sx: { fontWeight: "bold" }, variant: "h6", children: parsedIAM.details.explicitAllows }),
4013
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material11.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Explicit Allows" })
4012
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_material11.Box, { sx: { mt: 2 }, children: [
4013
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Typography, { sx: { fontWeight: 600, mb: 1 }, variant: "caption", children: "Policy Evaluation" }),
4014
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_material11.Grid, { container: true, spacing: 2, children: [
4015
+ parsedIAM.details.explicitAllows !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Grid, { item: true, xs: 4, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_material11.Box, { sx: { textAlign: "center" }, children: [
4016
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Typography, { color: "success.main", sx: { fontWeight: "bold" }, variant: "h6", children: parsedIAM.details.explicitAllows }),
4017
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Explicit Allows" })
4014
4018
  ] }) }),
4015
- parsedIAM.details.explicitDenies !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material11.Grid, { item: true, xs: 4, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(import_material11.Box, { sx: { textAlign: "center" }, children: [
4016
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material11.Typography, { color: "error.main", sx: { fontWeight: "bold" }, variant: "h6", children: parsedIAM.details.explicitDenies }),
4017
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material11.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Explicit Denies" })
4019
+ parsedIAM.details.explicitDenies !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Grid, { item: true, xs: 4, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_material11.Box, { sx: { textAlign: "center" }, children: [
4020
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Typography, { color: "error.main", sx: { fontWeight: "bold" }, variant: "h6", children: parsedIAM.details.explicitDenies }),
4021
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Explicit Denies" })
4018
4022
  ] }) }),
4019
- parsedIAM.details.implicitDenies !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material11.Grid, { item: true, xs: 4, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(import_material11.Box, { sx: { textAlign: "center" }, children: [
4020
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material11.Typography, { color: "warning.main", sx: { fontWeight: "bold" }, variant: "h6", children: parsedIAM.details.implicitDenies }),
4021
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material11.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Implicit Denies" })
4023
+ parsedIAM.details.implicitDenies !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Grid, { item: true, xs: 4, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_material11.Box, { sx: { textAlign: "center" }, children: [
4024
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Typography, { color: "warning.main", sx: { fontWeight: "bold" }, variant: "h6", children: parsedIAM.details.implicitDenies }),
4025
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Implicit Denies" })
4022
4026
  ] }) })
4023
4027
  ] })
4024
4028
  ] })
@@ -4028,8 +4032,8 @@ var IAMEventDetail = ({ event }) => {
4028
4032
  // src/components/event-details/iam-permission-detail.tsx
4029
4033
  var import_icons_material6 = require("@mui/icons-material");
4030
4034
  var import_material12 = require("@mui/material");
4031
- var import_react9 = require("react");
4032
- var import_jsx_runtime133 = require("react/jsx-runtime");
4035
+ var import_react10 = require("react");
4036
+ var import_jsx_runtime134 = require("react/jsx-runtime");
4033
4037
  var getChipColors = (status) => {
4034
4038
  const isAllowed = status === "explicitly_allowed" || status === "implicitly_allowed";
4035
4039
  return {
@@ -4038,8 +4042,8 @@ var getChipColors = (status) => {
4038
4042
  };
4039
4043
  };
4040
4044
  var IAMPermissionItem = ({ event }) => {
4041
- const [isOpen, setIsOpen] = (0, import_react9.useState)(false);
4042
- const parsedData = (0, import_react9.useMemo)(() => {
4045
+ const [isOpen, setIsOpen] = (0, import_react10.useState)(false);
4046
+ const parsedData = (0, import_react10.useMemo)(() => {
4043
4047
  const payloadString = event.attributes?.payload;
4044
4048
  if (!payloadString) {
4045
4049
  return;
@@ -4057,12 +4061,12 @@ var IAMPermissionItem = ({ event }) => {
4057
4061
  return null;
4058
4062
  }
4059
4063
  const { chipColors, parsedIAM } = parsedData;
4060
- return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_material12.Box, { sx: { mb: 1 }, children: [
4061
- /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_material12.Box, { sx: { alignItems: "center", display: "flex" }, children: [
4062
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material12.IconButton, { onClick: () => {
4064
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material12.Box, { sx: { mb: 1 }, children: [
4065
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material12.Box, { sx: { alignItems: "center", display: "flex" }, children: [
4066
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.IconButton, { onClick: () => {
4063
4067
  setIsOpen(!isOpen);
4064
- }, size: "small", sx: { mr: 1, p: 0 }, children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons_material6.KeyboardArrowDown, {}) : /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons_material6.KeyboardArrowRight, {}) }),
4065
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
4068
+ }, size: "small", sx: { mr: 1, p: 0 }, children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_icons_material6.KeyboardArrowDown, {}) : /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_icons_material6.KeyboardArrowRight, {}) }),
4069
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
4066
4070
  import_material12.Chip,
4067
4071
  {
4068
4072
  label: formatPermissionStatus(parsedIAM.permission),
@@ -4074,18 +4078,18 @@ var IAMPermissionItem = ({ event }) => {
4074
4078
  }
4075
4079
  )
4076
4080
  ] }),
4077
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material12.Box, { sx: { ml: 4, mt: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_material12.Box, { children: [
4078
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material12.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Principal" }),
4079
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material12.Typography, { variant: "body2", children: parsedIAM.principal })
4081
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Box, { sx: { ml: 4, mt: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material12.Box, { children: [
4082
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Principal" }),
4083
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Typography, { variant: "body2", children: parsedIAM.principal })
4080
4084
  ] }) })
4081
4085
  ] });
4082
4086
  };
4083
- var IAMPermissionDetail = ({ events }) => /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material12.Box, { sx: { mt: 2 }, children: events.map((event) => /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(IAMPermissionItem, { event }, `${event.span_id}-${event.event_id}`)) });
4087
+ var IAMPermissionDetail = ({ events }) => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Box, { sx: { mt: 2 }, children: events.map((event) => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(IAMPermissionItem, { event }, `${event.span_id}-${event.event_id}`)) });
4084
4088
 
4085
4089
  // src/components/event-details/event-detail.tsx
4086
- var import_jsx_runtime134 = require("react/jsx-runtime");
4087
- var DetailRow2 = ({ content, label }) => /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material13.Grid, { container: true, spacing: 0, sx: { mb: 1 }, children: [
4088
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material13.Grid, { item: true, sx: { pr: 1 }, xs: 3, children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
4090
+ var import_jsx_runtime135 = require("react/jsx-runtime");
4091
+ var DetailRow2 = ({ content, label }) => /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material13.Grid, { container: true, spacing: 0, sx: { mb: 1 }, children: [
4092
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.Grid, { item: true, sx: { pr: 1 }, xs: 3, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
4089
4093
  import_material13.Typography,
4090
4094
  {
4091
4095
  sx: {
@@ -4096,7 +4100,7 @@ var DetailRow2 = ({ content, label }) => /* @__PURE__ */ (0, import_jsx_runtime1
4096
4100
  children: label
4097
4101
  }
4098
4102
  ) }),
4099
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material13.Grid, { item: true, xs: 9, children: typeof content === "string" ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
4103
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.Grid, { item: true, xs: 9, children: typeof content === "string" ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
4100
4104
  import_material13.Typography,
4101
4105
  {
4102
4106
  sx: {
@@ -4109,15 +4113,15 @@ var DetailRow2 = ({ content, label }) => /* @__PURE__ */ (0, import_jsx_runtime1
4109
4113
  ) : content })
4110
4114
  ] });
4111
4115
  var EventMessage = ({ event }) => {
4112
- const [isOpen, setIsOpen] = (0, import_react10.useState)(false);
4113
- const [isOverflowing, setIsOverflowing] = (0, import_react10.useState)(false);
4114
- const textReference = (0, import_react10.useRef)(null);
4115
- const parsedMessage = (0, import_react10.useMemo)(() => parseEventMessage(event), [event]);
4116
- const isIAMPolicyEvent = (0, import_react10.useMemo)(
4116
+ const [isOpen, setIsOpen] = (0, import_react11.useState)(false);
4117
+ const [isOverflowing, setIsOverflowing] = (0, import_react11.useState)(false);
4118
+ const textReference = (0, import_react11.useRef)(null);
4119
+ const parsedMessage = (0, import_react11.useMemo)(() => parseEventMessage(event), [event]);
4120
+ const isIAMPolicyEvent = (0, import_react11.useMemo)(
4117
4121
  () => event.event_type === "iam.policy_evaluation" && event.attributes?.payload && typeof event.attributes.payload === "string",
4118
- [event.event_type, event.attributes?.payload]
4122
+ [event]
4119
4123
  );
4120
- (0, import_react10.useEffect)(() => {
4124
+ (0, import_react11.useEffect)(() => {
4121
4125
  const checkOverflow = () => {
4122
4126
  const element = textReference.current;
4123
4127
  if (element) {
@@ -4130,17 +4134,17 @@ var EventMessage = ({ event }) => {
4130
4134
  window.removeEventListener("resize", checkOverflow);
4131
4135
  };
4132
4136
  }, [parsedMessage.headline]);
4133
- const hasAdditionalContent = (0, import_react10.useMemo)(
4137
+ const hasAdditionalContent = (0, import_react11.useMemo)(
4134
4138
  () => parsedMessage.message || parsedMessage.details || isIAMPolicyEvent,
4135
4139
  [parsedMessage.message, parsedMessage.details, isIAMPolicyEvent]
4136
4140
  );
4137
- const shouldShowToggle = (0, import_react10.useMemo)(
4141
+ const shouldShowToggle = (0, import_react11.useMemo)(
4138
4142
  () => isOverflowing || hasAdditionalContent,
4139
4143
  [isOverflowing, hasAdditionalContent]
4140
4144
  );
4141
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material13.Box, { sx: { display: "flex", flexDirection: "column" }, children: [
4142
- /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material13.Box, { sx: { alignItems: "flex-start", display: "flex" }, children: [
4143
- Boolean(shouldShowToggle) && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
4145
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material13.Box, { sx: { display: "flex", flexDirection: "column" }, children: [
4146
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material13.Box, { sx: { alignItems: "flex-start", display: "flex" }, children: [
4147
+ Boolean(shouldShowToggle) && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
4144
4148
  import_material13.IconButton,
4145
4149
  {
4146
4150
  onClick: () => {
@@ -4148,10 +4152,10 @@ var EventMessage = ({ event }) => {
4148
4152
  },
4149
4153
  size: "small",
4150
4154
  sx: { mr: 1, mt: -0.5, p: 0 },
4151
- children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_icons_material7.KeyboardArrowDown, {}) : /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_icons_material7.KeyboardArrowRight, {})
4155
+ children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_icons_material7.KeyboardArrowDown, {}) : /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_icons_material7.KeyboardArrowRight, {})
4152
4156
  }
4153
4157
  ),
4154
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
4158
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
4155
4159
  import_material13.Typography,
4156
4160
  {
4157
4161
  ref: textReference,
@@ -4169,9 +4173,9 @@ var EventMessage = ({ event }) => {
4169
4173
  }
4170
4174
  )
4171
4175
  ] }),
4172
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material13.Box, { sx: { ml: 4, mt: 1 }, children: isIAMPolicyEvent ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(IAMEventDetail, { event }) : /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_jsx_runtime134.Fragment, { children: [
4173
- Boolean(parsedMessage.message) && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DetailRow2, { content: parsedMessage.message, label: "Message:" }),
4174
- Boolean(parsedMessage.details) && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DetailRow2, { content: parsedMessage.details, label: "Details:" })
4176
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.Box, { sx: { ml: 4, mt: 1 }, children: isIAMPolicyEvent ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(IAMEventDetail, { event }) : /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_jsx_runtime135.Fragment, { children: [
4177
+ Boolean(parsedMessage.message) && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DetailRow2, { content: parsedMessage.message, label: "Message:" }),
4178
+ Boolean(parsedMessage.details) && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DetailRow2, { content: parsedMessage.details, label: "Details:" })
4175
4179
  ] }) })
4176
4180
  ] });
4177
4181
  };
@@ -4200,8 +4204,8 @@ var EventDetail = ({
4200
4204
  type
4201
4205
  }) => {
4202
4206
  if (type === "permission") {
4203
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material13.Box, { children: [
4204
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
4207
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material13.Box, { children: [
4208
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
4205
4209
  import_material13.Box,
4206
4210
  {
4207
4211
  sx: {
@@ -4209,7 +4213,7 @@ var EventDetail = ({
4209
4213
  display: "flex",
4210
4214
  mb: 1
4211
4215
  },
4212
- children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
4216
+ children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
4213
4217
  import_material13.Typography,
4214
4218
  {
4215
4219
  sx: {
@@ -4224,12 +4228,12 @@ var EventDetail = ({
4224
4228
  )
4225
4229
  }
4226
4230
  ),
4227
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(IAMPermissionDetail, { events })
4231
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(IAMPermissionDetail, { events })
4228
4232
  ] });
4229
4233
  }
4230
4234
  const eventLevel = getEventLevelFromGroup(type);
4231
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material13.Box, { children: [
4232
- /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
4235
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material13.Box, { children: [
4236
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
4233
4237
  import_material13.Box,
4234
4238
  {
4235
4239
  sx: {
@@ -4239,8 +4243,8 @@ var EventDetail = ({
4239
4243
  mb: 1
4240
4244
  },
4241
4245
  children: [
4242
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(StatusIcon, { errorLevel: eventLevel }),
4243
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
4246
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(StatusIcon, { errorLevel: eventLevel }),
4247
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
4244
4248
  import_material13.Typography,
4245
4249
  {
4246
4250
  sx: {
@@ -4259,14 +4263,14 @@ var EventDetail = ({
4259
4263
  ]
4260
4264
  }
4261
4265
  ),
4262
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material13.Box, { sx: { mt: 2 }, children: events.map((event) => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
4266
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.Box, { sx: { mt: 2 }, children: events.map((event) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
4263
4267
  import_material13.Box,
4264
4268
  {
4265
4269
  sx: {
4266
4270
  maxWidth: "100%",
4267
4271
  mb: 1
4268
4272
  },
4269
- children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(EventMessage, { event })
4273
+ children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(EventMessage, { event })
4270
4274
  },
4271
4275
  `${event.span_id}-${event.event_id}`
4272
4276
  )) })
@@ -4276,12 +4280,12 @@ var EventDetail = ({
4276
4280
  // src/components/event-details/toggle-section.tsx
4277
4281
  var import_icons_material8 = require("@mui/icons-material");
4278
4282
  var import_material14 = require("@mui/material");
4279
- var import_react11 = require("react");
4280
- var import_jsx_runtime135 = require("react/jsx-runtime");
4283
+ var import_react12 = require("react");
4284
+ var import_jsx_runtime136 = require("react/jsx-runtime");
4281
4285
  var ToggleSection = ({ children, headline, initialOpen = true }) => {
4282
- const [isOpen, setIsOpen] = (0, import_react11.useState)(initialOpen);
4283
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material14.Box, { sx: { mt: 4 }, children: [
4284
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
4286
+ const [isOpen, setIsOpen] = (0, import_react12.useState)(initialOpen);
4287
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material14.Box, { sx: { mt: 4 }, children: [
4288
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
4285
4289
  import_material14.Box,
4286
4290
  {
4287
4291
  onClick: () => {
@@ -4291,7 +4295,7 @@ var ToggleSection = ({ children, headline, initialOpen = true }) => {
4291
4295
  cursor: "pointer",
4292
4296
  mb: 1
4293
4297
  },
4294
- children: /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
4298
+ children: /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(
4295
4299
  import_material14.Box,
4296
4300
  {
4297
4301
  role: "button",
@@ -4301,24 +4305,24 @@ var ToggleSection = ({ children, headline, initialOpen = true }) => {
4301
4305
  gap: 1
4302
4306
  },
4303
4307
  children: [
4304
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material14.Typography, { sx: { fontWeight: 600 }, variant: "subtitle2", children: headline }),
4305
- isOpen ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_icons_material8.KeyboardArrowDown, { sx: { color: "text.secondary", height: 20, width: 20 } }) : /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_icons_material8.KeyboardArrowRight, { sx: { color: "text.secondary", height: 20, width: 20 } })
4308
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.Typography, { sx: { fontWeight: 600 }, variant: "subtitle2", children: headline }),
4309
+ isOpen ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_icons_material8.KeyboardArrowDown, { sx: { color: "text.secondary", height: 20, width: 20 } }) : /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_icons_material8.KeyboardArrowRight, { sx: { color: "text.secondary", height: 20, width: 20 } })
4306
4310
  ]
4307
4311
  }
4308
4312
  )
4309
4313
  }
4310
4314
  ),
4311
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material14.Box, { children })
4315
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.Box, { children })
4312
4316
  ] });
4313
4317
  };
4314
4318
 
4315
4319
  // src/components/event-details/event-section.tsx
4316
- var import_jsx_runtime136 = require("react/jsx-runtime");
4320
+ var import_jsx_runtime137 = require("react/jsx-runtime");
4317
4321
  var EventSection = ({
4318
4322
  eventGroups,
4319
4323
  headline
4320
- }) => /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(ToggleSection, { headline, children: /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material15.Box, { children: [
4321
- eventGroups.errors && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
4324
+ }) => /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(ToggleSection, { headline, children: /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material15.Box, { children: [
4325
+ eventGroups.errors && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
4322
4326
  EventDetail,
4323
4327
  {
4324
4328
  displayText: "Error",
@@ -4326,7 +4330,7 @@ var EventSection = ({
4326
4330
  type: "error"
4327
4331
  }
4328
4332
  ),
4329
- eventGroups.warnings && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
4333
+ eventGroups.warnings && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
4330
4334
  EventDetail,
4331
4335
  {
4332
4336
  displayText: "Warning",
@@ -4334,7 +4338,7 @@ var EventSection = ({
4334
4338
  type: "warning"
4335
4339
  }
4336
4340
  ),
4337
- eventGroups.permissions && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
4341
+ eventGroups.permissions && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
4338
4342
  EventDetail,
4339
4343
  {
4340
4344
  displayText: "IAM Permission",
@@ -4342,7 +4346,7 @@ var EventSection = ({
4342
4346
  type: "permission"
4343
4347
  }
4344
4348
  ),
4345
- eventGroups.info && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
4349
+ eventGroups.info && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
4346
4350
  EventDetail,
4347
4351
  {
4348
4352
  displayText: "Info",
@@ -4353,65 +4357,65 @@ var EventSection = ({
4353
4357
  ] }) });
4354
4358
 
4355
4359
  // src/components/event-details/event-details.tsx
4356
- var import_jsx_runtime137 = require("react/jsx-runtime");
4360
+ var import_jsx_runtime138 = require("react/jsx-runtime");
4357
4361
  var EventDetails = ({ onClose, selectedEvent }) => {
4358
- const attributes = (0, import_react12.useMemo)(() => {
4362
+ const attributes = (0, import_react13.useMemo)(() => {
4359
4363
  const attributes2 = Object.entries(selectedEvent?.attributes ?? {});
4360
4364
  return attributes2.filter(([key]) => key !== "localstack.aws.account_id" && key !== "localstack.aws.service");
4361
4365
  }, [selectedEvent?.attributes]);
4362
4366
  if (!selectedEvent) {
4363
- return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material16.Box, { sx: { p: 3, textAlign: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material16.Typography, { color: "text.secondary", variant: "body2", children: "Select an event to view details" }) });
4367
+ return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Box, { sx: { p: 3, textAlign: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Typography, { color: "text.secondary", variant: "body2", children: "Select an event to view details" }) });
4364
4368
  }
4365
- return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material16.Box, { "data-testid": "event-details", sx: { display: "flex", flexDirection: "column", height: "100%" }, children: [
4366
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(EventDetailsHeader, { event: selectedEvent, onClose }),
4367
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material16.Box, { sx: { flexGrow: 1, overflow: "auto", p: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material16.Stack, { spacing: 2, children: [
4368
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(ToggleSection, { headline: "Basic Information", children: /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material16.Stack, { spacing: 1, children: [
4369
- /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material16.Box, { children: [
4370
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material16.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Span ID" }),
4371
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material16.Typography, { variant: "body2", children: selectedEvent.span_id })
4369
+ return /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material16.Box, { "data-testid": "event-details", sx: { display: "flex", flexDirection: "column", height: "100%" }, children: [
4370
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(EventDetailsHeader, { event: selectedEvent, onClose }),
4371
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Box, { sx: { flexGrow: 1, overflow: "auto", p: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material16.Stack, { spacing: 2, children: [
4372
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(ToggleSection, { headline: "Basic Information", children: /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material16.Stack, { spacing: 1, children: [
4373
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material16.Box, { children: [
4374
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Span ID" }),
4375
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Typography, { variant: "body2", children: selectedEvent.span_id })
4372
4376
  ] }),
4373
- /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material16.Box, { children: [
4374
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material16.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Trace ID" }),
4375
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material16.Typography, { variant: "body2", children: selectedEvent.trace_id })
4377
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material16.Box, { children: [
4378
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Trace ID" }),
4379
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Typography, { variant: "body2", children: selectedEvent.trace_id })
4376
4380
  ] }),
4377
- /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material16.Box, { children: [
4378
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material16.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Operation" }),
4379
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material16.Typography, { variant: "body2", children: selectedEvent.operation_name })
4381
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material16.Box, { children: [
4382
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Operation" }),
4383
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Typography, { variant: "body2", children: selectedEvent.operation_name })
4380
4384
  ] })
4381
4385
  ] }) }),
4382
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material16.Divider, {}),
4383
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(ToggleSection, { headline: "Service Information", children: /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material16.Stack, { spacing: 1, children: [
4384
- /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material16.Box, { children: [
4385
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material16.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Service" }),
4386
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material16.Typography, { variant: "body2", children: selectedEvent.service_name })
4386
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Divider, {}),
4387
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(ToggleSection, { headline: "Service Information", children: /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material16.Stack, { spacing: 1, children: [
4388
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material16.Box, { children: [
4389
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Service" }),
4390
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Typography, { variant: "body2", children: selectedEvent.service_name })
4387
4391
  ] }),
4388
- /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material16.Box, { children: [
4389
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material16.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Resource" }),
4390
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material16.Typography, { variant: "body2", children: selectedEvent.resource_name })
4392
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material16.Box, { children: [
4393
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Resource" }),
4394
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Typography, { variant: "body2", children: selectedEvent.resource_name })
4391
4395
  ] }),
4392
- Boolean(selectedEvent.region) && /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material16.Box, { children: [
4393
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material16.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Region" }),
4394
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material16.Typography, { variant: "body2", children: selectedEvent.region })
4396
+ Boolean(selectedEvent.region) && /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material16.Box, { children: [
4397
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Region" }),
4398
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Typography, { variant: "body2", children: selectedEvent.region })
4395
4399
  ] })
4396
4400
  ] }) }),
4397
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material16.Divider, {}),
4398
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(ToggleSection, { headline: "Timing", children: /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material16.Stack, { spacing: 1, children: [
4399
- /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material16.Box, { children: [
4400
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material16.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Start Time" }),
4401
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material16.Typography, { variant: "body2", children: unixNanoToDate(selectedEvent.start_time_unix_nano)?.toISOString() })
4401
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Divider, {}),
4402
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(ToggleSection, { headline: "Timing", children: /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material16.Stack, { spacing: 1, children: [
4403
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material16.Box, { children: [
4404
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Start Time" }),
4405
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Typography, { variant: "body2", children: unixNanoToDate(selectedEvent.start_time_unix_nano)?.toISOString() })
4402
4406
  ] }),
4403
- Boolean(selectedEvent.end_time_unix_nano) && /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material16.Box, { children: [
4404
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material16.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Duration" }),
4405
- /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material16.Typography, { variant: "body2", children: [
4407
+ Boolean(selectedEvent.end_time_unix_nano) && /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material16.Box, { children: [
4408
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Duration" }),
4409
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material16.Typography, { variant: "body2", children: [
4406
4410
  ((BigInt(selectedEvent.end_time_unix_nano) - BigInt(selectedEvent.start_time_unix_nano)) / BigInt("1000000")).toString(),
4407
4411
  " ",
4408
4412
  "ms"
4409
4413
  ] })
4410
4414
  ] })
4411
4415
  ] }) }),
4412
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material16.Divider, {}),
4413
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(ToggleSection, { headline: "Status", children: /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material16.Stack, { direction: "row", spacing: 1, children: [
4414
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
4416
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Divider, {}),
4417
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(ToggleSection, { headline: "Status", children: /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material16.Stack, { direction: "row", spacing: 1, children: [
4418
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
4415
4419
  import_material16.Chip,
4416
4420
  {
4417
4421
  color: selectedEvent.status_code === 2 ? "error" : selectedEvent.status_code === 1 ? "success" : "default",
@@ -4419,11 +4423,11 @@ var EventDetails = ({ onClose, selectedEvent }) => {
4419
4423
  size: "small"
4420
4424
  }
4421
4425
  ),
4422
- Boolean(selectedEvent.status_message) && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material16.Typography, { variant: "body2", children: selectedEvent.status_message })
4426
+ Boolean(selectedEvent.status_message) && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Typography, { variant: "body2", children: selectedEvent.status_message })
4423
4427
  ] }) }),
4424
- selectedEvent.events.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_jsx_runtime137.Fragment, { children: [
4425
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material16.Divider, {}),
4426
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
4428
+ selectedEvent.events.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_jsx_runtime138.Fragment, { children: [
4429
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Divider, {}),
4430
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
4427
4431
  EventSection,
4428
4432
  {
4429
4433
  eventGroups: getEventGroupsByType(selectedEvent.events),
@@ -4431,11 +4435,11 @@ var EventDetails = ({ onClose, selectedEvent }) => {
4431
4435
  }
4432
4436
  )
4433
4437
  ] }),
4434
- attributes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_jsx_runtime137.Fragment, { children: [
4435
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material16.Divider, {}),
4436
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(ToggleSection, { headline: "Attributes", children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material16.Stack, { spacing: 1, children: attributes.map(([key, value]) => /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material16.Box, { children: [
4437
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material16.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: key }),
4438
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material16.Typography, { variant: "body2", children: renderKeyValue(key, value) })
4438
+ attributes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_jsx_runtime138.Fragment, { children: [
4439
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Divider, {}),
4440
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(ToggleSection, { headline: "Attributes", children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Stack, { spacing: 1, children: attributes.map(([key, value]) => /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material16.Box, { children: [
4441
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: key }),
4442
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Typography, { variant: "body2", children: renderKeyValue(key, value) })
4439
4443
  ] }, key)) }) })
4440
4444
  ] })
4441
4445
  ] }) })
@@ -4443,46 +4447,46 @@ var EventDetails = ({ onClose, selectedEvent }) => {
4443
4447
  };
4444
4448
  function renderKeyValue(key, value) {
4445
4449
  if (typeof value === "string" && (key === "localstack.aws.service.request" || key === "localstack.aws.service.response" || key === "localstack.aws.service.exception")) {
4446
- return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material16.Box, { sx: { backgroundColor: (theme) => theme.palette.background.default, borderRadius: 1, p: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("pre", { style: { margin: 0, overflow: "auto" }, children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material16.Typography, { variant: "body2", children: JSON.stringify(JSON.parse(value), void 0, 2) }) }) });
4450
+ return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Box, { sx: { backgroundColor: (theme) => theme.palette.background.default, borderRadius: 1, p: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("pre", { style: { margin: 0, overflow: "auto" }, children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Typography, { variant: "body2", children: JSON.stringify(JSON.parse(value), void 0, 2) }) }) });
4447
4451
  }
4448
4452
  if (typeof value === "boolean") {
4449
- return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material16.Typography, { variant: "body2", children: value ? "yes" : "no" });
4453
+ return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Typography, { variant: "body2", children: value ? "yes" : "no" });
4450
4454
  }
4451
- return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material16.Typography, { variant: "body2", children: value });
4455
+ return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Typography, { variant: "body2", children: value });
4452
4456
  }
4453
4457
 
4454
4458
  // src/components/trace-graph/trace-graph.tsx
4455
4459
  var import_base = require("@xyflow/react/dist/base.css");
4456
4460
  var import_material20 = require("@mui/material");
4457
- var import_react19 = require("@xyflow/react");
4458
- var import_react20 = require("react");
4461
+ var import_react20 = require("@xyflow/react");
4462
+ var import_react21 = require("react");
4459
4463
 
4460
4464
  // src/components/trace-graph/service-node.tsx
4461
4465
  var import_material18 = require("@mui/material");
4462
4466
  var import_style = require("@xyflow/react/dist/style.css");
4463
- var import_react14 = require("@xyflow/react");
4464
- var import_react15 = require("react");
4467
+ var import_react15 = require("@xyflow/react");
4468
+ var import_react16 = require("react");
4465
4469
 
4466
4470
  // src/components/trace-graph/problem-indicator.tsx
4467
4471
  var import_icons_material9 = require("@mui/icons-material");
4468
4472
  var import_material17 = require("@mui/material");
4469
- var import_react13 = require("react");
4470
- var import_jsx_runtime138 = require("react/jsx-runtime");
4473
+ var import_react14 = require("react");
4474
+ var import_jsx_runtime139 = require("react/jsx-runtime");
4471
4475
  var ProblemIndicator = ({ error }) => {
4472
- const icon = (0, import_react13.useMemo)(() => {
4476
+ const icon = (0, import_react14.useMemo)(() => {
4473
4477
  switch (error.level) {
4474
4478
  case "error": {
4475
- return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_icons_material9.Error, { sx: { color: "#d32f2f", fontSize: "14px" } });
4479
+ return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_icons_material9.Error, { sx: { color: "#d32f2f", fontSize: "14px" } });
4476
4480
  }
4477
4481
  case "warning": {
4478
- return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_icons_material9.Warning, { sx: { color: "#ff9800", fontSize: "14px" } });
4482
+ return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_icons_material9.Warning, { sx: { color: "#ff9800", fontSize: "14px" } });
4479
4483
  }
4480
4484
  default: {
4481
- return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_icons_material9.Info, { sx: { color: "#2196f3", fontSize: "14px" } });
4485
+ return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_icons_material9.Info, { sx: { color: "#2196f3", fontSize: "14px" } });
4482
4486
  }
4483
4487
  }
4484
4488
  }, [error.level]);
4485
- const color = (0, import_react13.useMemo)(() => {
4489
+ const color = (0, import_react14.useMemo)(() => {
4486
4490
  switch (error.level) {
4487
4491
  case "error": {
4488
4492
  return "#d32f2f";
@@ -4495,7 +4499,7 @@ var ProblemIndicator = ({ error }) => {
4495
4499
  }
4496
4500
  }
4497
4501
  }, [error.level]);
4498
- return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material17.Tooltip, { arrow: true, title: error.message ?? "Issue detected", children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
4502
+ return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Tooltip, { arrow: true, title: error.message ?? "Issue detected", children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
4499
4503
  import_material17.Box,
4500
4504
  {
4501
4505
  sx: {
@@ -4515,17 +4519,17 @@ var ProblemIndicator = ({ error }) => {
4515
4519
  };
4516
4520
 
4517
4521
  // src/components/trace-graph/service-node.tsx
4518
- var import_jsx_runtime139 = require("react/jsx-runtime");
4522
+ var import_jsx_runtime140 = require("react/jsx-runtime");
4519
4523
  var handleStyle = {
4520
4524
  backgroundColor: "white",
4521
4525
  borderColor: "lightgray",
4522
4526
  opacity: 0
4523
4527
  };
4524
- var ServiceNode = (0, import_react15.memo)(function ServiceNode2({ data, selected }) {
4525
- const handleClick = (0, import_react15.useCallback)(() => {
4528
+ var ServiceNode = (0, import_react16.memo)(function ServiceNode2({ data, selected }) {
4529
+ const handleClick = (0, import_react16.useCallback)(() => {
4526
4530
  data.onEventSelect(data.event);
4527
4531
  }, [data]);
4528
- const handleKeyPress = (0, import_react15.useCallback)(
4532
+ const handleKeyPress = (0, import_react16.useCallback)(
4529
4533
  (event) => {
4530
4534
  if (event.key === "Enter" || event.key === " ") {
4531
4535
  handleClick();
@@ -4534,8 +4538,8 @@ var ServiceNode = (0, import_react15.memo)(function ServiceNode2({ data, selecte
4534
4538
  [handleClick]
4535
4539
  );
4536
4540
  const hasErrors = (data.event.errors && data.event.errors.length > 0) ?? false;
4537
- return /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material18.Box, { sx: { maxWidth: 200 }, children: [
4538
- /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
4541
+ return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material18.Box, { sx: { maxWidth: 200 }, children: [
4542
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
4539
4543
  import_material18.Box,
4540
4544
  {
4541
4545
  onClick: handleClick,
@@ -4558,9 +4562,9 @@ var ServiceNode = (0, import_react15.memo)(function ServiceNode2({ data, selecte
4558
4562
  },
4559
4563
  tabIndex: 0,
4560
4564
  children: [
4561
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_react14.Handle, { position: import_react14.Position.Left, style: handleStyle, type: "target" }),
4562
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_react14.Handle, { position: import_react14.Position.Right, style: handleStyle, type: "source" }),
4563
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
4565
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_react15.Handle, { position: import_react15.Position.Left, style: handleStyle, type: "target" }),
4566
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_react15.Handle, { position: import_react15.Position.Right, style: handleStyle, type: "source" }),
4567
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
4564
4568
  ServiceCell,
4565
4569
  {
4566
4570
  borderColor: selected ? "text.primary" : void 0,
@@ -4574,7 +4578,7 @@ var ServiceNode = (0, import_react15.memo)(function ServiceNode2({ data, selecte
4574
4578
  ]
4575
4579
  }
4576
4580
  ),
4577
- /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
4581
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
4578
4582
  import_material18.Stack,
4579
4583
  {
4580
4584
  alignItems: "center",
@@ -4585,7 +4589,7 @@ var ServiceNode = (0, import_react15.memo)(function ServiceNode2({ data, selecte
4585
4589
  mt: 0.5
4586
4590
  },
4587
4591
  children: [
4588
- hasErrors && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
4592
+ hasErrors && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
4589
4593
  import_material18.Stack,
4590
4594
  {
4591
4595
  direction: "row",
@@ -4594,10 +4598,10 @@ var ServiceNode = (0, import_react15.memo)(function ServiceNode2({ data, selecte
4594
4598
  flexWrap: "wrap",
4595
4599
  gap: "2px"
4596
4600
  },
4597
- children: data.event.errors?.map((error) => /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(ProblemIndicator, { error }, error.span_id))
4601
+ children: data.event.errors?.map((error) => /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(ProblemIndicator, { error }, error.span_id))
4598
4602
  }
4599
4603
  ),
4600
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
4604
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
4601
4605
  import_material18.Typography,
4602
4606
  {
4603
4607
  sx: {
@@ -4620,7 +4624,7 @@ var ServiceNode = (0, import_react15.memo)(function ServiceNode2({ data, selecte
4620
4624
 
4621
4625
  // src/components/trace-graph/utils.ts
4622
4626
  var import_dagre = __toESM(require("@dagrejs/dagre"), 1);
4623
- var import_react16 = require("@xyflow/react");
4627
+ var import_react17 = require("@xyflow/react");
4624
4628
  var generateNodesAndEdges = (event, onEventSelect, parentId) => {
4625
4629
  const nodes = [];
4626
4630
  const edges = [];
@@ -4637,8 +4641,8 @@ var generateNodesAndEdges = (event, onEventSelect, parentId) => {
4637
4641
  id: event.span_id,
4638
4642
  position: { x: 0, y: 0 },
4639
4643
  // Will be set by layout
4640
- sourcePosition: import_react16.Position.Right,
4641
- targetPosition: import_react16.Position.Left,
4644
+ sourcePosition: import_react17.Position.Right,
4645
+ targetPosition: import_react17.Position.Left,
4642
4646
  type: "service"
4643
4647
  });
4644
4648
  if (parentId) {
@@ -4648,7 +4652,7 @@ var generateNodesAndEdges = (event, onEventSelect, parentId) => {
4648
4652
  markerEnd: {
4649
4653
  color: "lightgray",
4650
4654
  height: 16,
4651
- type: import_react16.MarkerType.Arrow,
4655
+ type: import_react17.MarkerType.Arrow,
4652
4656
  width: 16
4653
4657
  },
4654
4658
  source: parentId,
@@ -4713,8 +4717,8 @@ var calculateCenterX = (focusNodeX, viewPortPixelWidth, minX, maxX) => {
4713
4717
  // src/components/trace-graph/xyflow/controls.tsx
4714
4718
  var import_icons_material10 = require("@mui/icons-material");
4715
4719
  var import_material19 = require("@mui/material");
4716
- var import_react17 = require("@xyflow/react");
4717
- var import_react18 = require("react");
4720
+ var import_react18 = require("@xyflow/react");
4721
+ var import_react19 = require("react");
4718
4722
 
4719
4723
  // node_modules/zustand/esm/shallow.mjs
4720
4724
  function shallow$1(objA, objB) {
@@ -4755,15 +4759,15 @@ function shallow$1(objA, objB) {
4755
4759
  }
4756
4760
 
4757
4761
  // src/components/trace-graph/xyflow/controls.tsx
4758
- var import_jsx_runtime140 = require("react/jsx-runtime");
4762
+ var import_jsx_runtime141 = require("react/jsx-runtime");
4759
4763
  var selector = (s) => ({
4760
4764
  isInteractive: s.nodesDraggable || s.nodesConnectable || s.elementsSelectable,
4761
4765
  maxZoomReached: s.transform[2] >= s.maxZoom,
4762
4766
  minZoomReached: s.transform[2] <= s.minZoom
4763
4767
  });
4764
- var Controls = (0, import_react18.memo)(() => {
4765
- const { maxZoomReached, minZoomReached } = (0, import_react17.useStore)(selector, shallow$1);
4766
- const { fitView, zoomIn, zoomOut } = (0, import_react17.useReactFlow)();
4768
+ var Controls = (0, import_react19.memo)(() => {
4769
+ const { maxZoomReached, minZoomReached } = (0, import_react18.useStore)(selector, shallow$1);
4770
+ const { fitView, zoomIn, zoomOut } = (0, import_react18.useReactFlow)();
4767
4771
  const onZoomInHandler = () => {
4768
4772
  void zoomIn();
4769
4773
  };
@@ -4773,7 +4777,7 @@ var Controls = (0, import_react18.memo)(() => {
4773
4777
  const onFitViewHandler = () => {
4774
4778
  void fitView();
4775
4779
  };
4776
- return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
4780
+ return /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
4777
4781
  import_material19.Box,
4778
4782
  {
4779
4783
  sx: {
@@ -4787,33 +4791,33 @@ var Controls = (0, import_react18.memo)(() => {
4787
4791
  zIndex: 5
4788
4792
  },
4789
4793
  children: [
4790
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
4794
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
4791
4795
  import_material19.IconButton,
4792
4796
  {
4793
4797
  className: "react-flow__controls-zoomin",
4794
4798
  disabled: maxZoomReached,
4795
4799
  onClick: onZoomInHandler,
4796
4800
  size: "small",
4797
- children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_icons_material10.Add, {})
4801
+ children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_icons_material10.Add, {})
4798
4802
  }
4799
4803
  ),
4800
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
4804
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
4801
4805
  import_material19.IconButton,
4802
4806
  {
4803
4807
  className: "react-flow__controls-zoomout",
4804
4808
  disabled: minZoomReached,
4805
4809
  onClick: onZoomOutHandler,
4806
4810
  size: "small",
4807
- children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_icons_material10.Remove, {})
4811
+ children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_icons_material10.Remove, {})
4808
4812
  }
4809
4813
  ),
4810
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
4814
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
4811
4815
  import_material19.IconButton,
4812
4816
  {
4813
4817
  className: "react-flow__controls-fitview",
4814
4818
  onClick: onFitViewHandler,
4815
4819
  size: "small",
4816
- children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_icons_material10.FitScreen, {})
4820
+ children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_icons_material10.FitScreen, {})
4817
4821
  }
4818
4822
  )
4819
4823
  ]
@@ -4822,7 +4826,7 @@ var Controls = (0, import_react18.memo)(() => {
4822
4826
  });
4823
4827
 
4824
4828
  // src/components/trace-graph/trace-graph.tsx
4825
- var import_jsx_runtime141 = require("react/jsx-runtime");
4829
+ var import_jsx_runtime142 = require("react/jsx-runtime");
4826
4830
  var nodeTypes = {
4827
4831
  service: ServiceNode
4828
4832
  };
@@ -4833,12 +4837,12 @@ var TraceGraph = ({
4833
4837
  spans,
4834
4838
  viewPortPixelWidth
4835
4839
  }) => {
4836
- const [nodes, setNodes] = (0, import_react20.useState)([]);
4837
- const [edges, setEdges] = (0, import_react20.useState)([]);
4838
- const [initialViewSet, setInitialViewSet] = (0, import_react20.useState)(false);
4839
- const { fitView, setCenter } = (0, import_react19.useReactFlow)();
4840
- const store = (0, import_react19.useStoreApi)();
4841
- const updateSelectedNode = (0, import_react20.useCallback)(
4840
+ const [nodes, setNodes] = (0, import_react21.useState)([]);
4841
+ const [edges, setEdges] = (0, import_react21.useState)([]);
4842
+ const [initialViewSet, setInitialViewSet] = (0, import_react21.useState)(false);
4843
+ const { fitView, setCenter } = (0, import_react20.useReactFlow)();
4844
+ const store = (0, import_react20.useStoreApi)();
4845
+ const updateSelectedNode = (0, import_react21.useCallback)(
4842
4846
  (nodeId) => {
4843
4847
  const { addSelectedNodes } = store.getState();
4844
4848
  if (nodeId) {
@@ -4850,7 +4854,7 @@ var TraceGraph = ({
4850
4854
  },
4851
4855
  [nodes, store]
4852
4856
  );
4853
- (0, import_react20.useEffect)(() => {
4857
+ (0, import_react21.useEffect)(() => {
4854
4858
  const spansMap = /* @__PURE__ */ new Map();
4855
4859
  const rootSpans = [];
4856
4860
  for (const span of spans.data ?? []) {
@@ -4882,7 +4886,7 @@ var TraceGraph = ({
4882
4886
  setNodes(layoutedNodes);
4883
4887
  setEdges(layoutedEdges);
4884
4888
  }, [onEventSelect, spans.data]);
4885
- (0, import_react20.useEffect)(() => {
4889
+ (0, import_react21.useEffect)(() => {
4886
4890
  const shouldSetInitialView = !spans.loading && nodes.length > 0 && !initialViewSet;
4887
4891
  if (shouldSetInitialView) {
4888
4892
  if (initialFocusEventId) {
@@ -4902,20 +4906,20 @@ var TraceGraph = ({
4902
4906
  setInitialViewSet(true);
4903
4907
  }
4904
4908
  }, [spans.loading, nodes, initialFocusEventId, viewPortPixelWidth, setCenter, fitView, onEventSelect, initialViewSet]);
4905
- (0, import_react20.useEffect)(() => {
4909
+ (0, import_react21.useEffect)(() => {
4906
4910
  if (initialFocusEventId) {
4907
4911
  updateSelectedNode(initialFocusEventId);
4908
4912
  }
4909
4913
  }, [initialFocusEventId, updateSelectedNode]);
4910
- const onNodeClick = (0, import_react20.useCallback)((_event, node) => {
4914
+ const onNodeClick = (0, import_react21.useCallback)((_event, node) => {
4911
4915
  onEventSelect(node.data.event);
4912
4916
  updateSelectedNode(node.id);
4913
4917
  }, [onEventSelect, updateSelectedNode]);
4914
- return /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_jsx_runtime141.Fragment, { children: [
4915
- spans.error && /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
4918
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_jsx_runtime142.Fragment, { children: [
4919
+ spans.error && /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
4916
4920
  import_material20.Alert,
4917
4921
  {
4918
- action: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material20.Button, { onClick: () => {
4922
+ action: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material20.Button, { onClick: () => {
4919
4923
  onRefresh();
4920
4924
  }, children: "Retry" }),
4921
4925
  severity: "error",
@@ -4926,8 +4930,8 @@ var TraceGraph = ({
4926
4930
  ]
4927
4931
  }
4928
4932
  ),
4929
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
4930
- import_react19.ReactFlow,
4933
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
4934
+ import_react20.ReactFlow,
4931
4935
  {
4932
4936
  "data-testid": "trace-graph",
4933
4937
  defaultViewport: { x: 0, y: 0, zoom: 1 },
@@ -4940,8 +4944,8 @@ var TraceGraph = ({
4940
4944
  onNodeClick,
4941
4945
  selectNodesOnDrag: false,
4942
4946
  children: [
4943
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Controls, {}),
4944
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_react19.Background, {})
4947
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(Controls, {}),
4948
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_react20.Background, {})
4945
4949
  ]
4946
4950
  }
4947
4951
  )
@@ -4949,7 +4953,7 @@ var TraceGraph = ({
4949
4953
  };
4950
4954
 
4951
4955
  // src/pages/trace-graph-page.tsx
4952
- var import_jsx_runtime142 = require("react/jsx-runtime");
4956
+ var import_jsx_runtime143 = require("react/jsx-runtime");
4953
4957
  var HEADER_HEIGHT = 56;
4954
4958
  var DRAWER_WIDTH = "35%";
4955
4959
  var Main = (0, import_styles.styled)("main", { shouldForwardProp: (property) => property !== "open" })(({ open, theme }) => ({
@@ -4998,7 +5002,7 @@ var TraceGraphView = ({
4998
5002
  viewPortPixelWidth
4999
5003
  }) => {
5000
5004
  const shouldShowStatusMessage = Boolean(statusError) || status?.status === "DISABLED";
5001
- return /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
5005
+ return /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(
5002
5006
  import_material21.Box,
5003
5007
  {
5004
5008
  "data-testid": "trace-graph-page",
@@ -5011,13 +5015,13 @@ var TraceGraphView = ({
5011
5015
  overflow: "hidden"
5012
5016
  },
5013
5017
  children: [
5014
- /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material21.Box, { sx: { display: "flex", width: "100%" }, children: [
5015
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material21.Button, { onClick: () => {
5018
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(import_material21.Box, { sx: { display: "flex", width: "100%" }, children: [
5019
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_material21.Button, { onClick: () => {
5016
5020
  navigateToSpansList();
5017
- }, startIcon: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_icons_material11.ArrowBack, {}), children: "Go back" }),
5018
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material21.Box, { sx: { flexGrow: 1 } })
5021
+ }, startIcon: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_icons_material11.ArrowBack, {}), children: "Go back" }),
5022
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_material21.Box, { sx: { flexGrow: 1 } })
5019
5023
  ] }),
5020
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
5024
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
5021
5025
  import_material21.Paper,
5022
5026
  {
5023
5027
  sx: {
@@ -5027,22 +5031,22 @@ var TraceGraphView = ({
5027
5031
  position: "relative",
5028
5032
  width: "100%"
5029
5033
  },
5030
- children: shouldShowStatusMessage ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
5034
+ children: shouldShowStatusMessage ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
5031
5035
  StatusMessage,
5032
5036
  {
5033
5037
  error: statusError,
5034
5038
  onRetry: handleRetry,
5035
5039
  status
5036
5040
  }
5037
- ) : /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_jsx_runtime142.Fragment, { children: [
5038
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(Main, { open, children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
5041
+ ) : /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(import_jsx_runtime143.Fragment, { children: [
5042
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(Main, { open, children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
5039
5043
  import_material21.Box,
5040
5044
  {
5041
5045
  sx: {
5042
5046
  height: "100%",
5043
5047
  overflow: "auto"
5044
5048
  },
5045
- children: traceId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_react21.ReactFlowProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
5049
+ children: traceId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_react22.ReactFlowProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
5046
5050
  TraceGraph,
5047
5051
  {
5048
5052
  initialFocusEventId: spanId,
@@ -5060,7 +5064,7 @@ var TraceGraphView = ({
5060
5064
  ) })
5061
5065
  }
5062
5066
  ) }),
5063
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(StyledDrawer, { anchor: "right", open, variant: "persistent", children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(EventDetails, { onClose: handleClose, selectedEvent }) })
5067
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(StyledDrawer, { anchor: "right", open, variant: "persistent", children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(EventDetails, { onClose: handleClose, selectedEvent }) })
5064
5068
  ] })
5065
5069
  }
5066
5070
  )
@@ -5073,10 +5077,10 @@ var TraceGraphPage = () => {
5073
5077
  const [searchParameters] = (0, import_react_router_dom2.useSearchParams)();
5074
5078
  const spanId = searchParameters.get("spanId");
5075
5079
  const api = useAppInspectorApi();
5076
- const [spans, setSpans] = (0, import_react22.useState)();
5077
- const [loading, setLoading] = (0, import_react22.useState)(false);
5078
- const [fetchError, setFetchError] = (0, import_react22.useState)();
5079
- const fetchSpans = (0, import_react22.useCallback)(async () => {
5080
+ const [spans, setSpans] = (0, import_react23.useState)();
5081
+ const [loading, setLoading] = (0, import_react23.useState)(false);
5082
+ const [fetchError, setFetchError] = (0, import_react23.useState)();
5083
+ const fetchSpans = (0, import_react23.useCallback)(async () => {
5080
5084
  setLoading(true);
5081
5085
  try {
5082
5086
  const response = await api.getSpans({
@@ -5091,14 +5095,14 @@ var TraceGraphPage = () => {
5091
5095
  setLoading(false);
5092
5096
  }
5093
5097
  }, [api, traceId]);
5094
- (0, import_react22.useEffect)(() => {
5098
+ (0, import_react23.useEffect)(() => {
5095
5099
  void fetchSpans();
5096
5100
  }, [fetchSpans]);
5097
- const [open, setOpen] = (0, import_react22.useState)(true);
5098
- const [selectedEvent, setSelectedEvent] = (0, import_react22.useState)();
5099
- const [viewPortPixelWidth, setViewPortPixelWidth] = (0, import_react22.useState)(0);
5101
+ const [open, setOpen] = (0, import_react23.useState)(true);
5102
+ const [selectedEvent, setSelectedEvent] = (0, import_react23.useState)();
5103
+ const [viewPortPixelWidth, setViewPortPixelWidth] = (0, import_react23.useState)(0);
5100
5104
  const { checkStatus, error: statusError, status } = useStatus();
5101
- const calculateDrawerWidth = (0, import_react22.useCallback)(() => {
5105
+ const calculateDrawerWidth = (0, import_react23.useCallback)(() => {
5102
5106
  const percentageMatch = /(\d+)%/.exec(DRAWER_WIDTH);
5103
5107
  if (percentageMatch && open) {
5104
5108
  const percentage = Number.parseInt(percentageMatch[1], 10);
@@ -5106,7 +5110,7 @@ var TraceGraphPage = () => {
5106
5110
  }
5107
5111
  return 0;
5108
5112
  }, [open]);
5109
- (0, import_react22.useEffect)(() => {
5113
+ (0, import_react23.useEffect)(() => {
5110
5114
  const updateViewportWidth = () => {
5111
5115
  const totalWidth = window.innerWidth;
5112
5116
  const drawerPixelWidth = open ? calculateDrawerWidth() : 0;
@@ -5120,20 +5124,20 @@ var TraceGraphPage = () => {
5120
5124
  clearTimeout(timeoutId);
5121
5125
  };
5122
5126
  }, [open, calculateDrawerWidth]);
5123
- const handleEventSelect = (0, import_react22.useCallback)((event) => {
5127
+ const handleEventSelect = (0, import_react23.useCallback)((event) => {
5124
5128
  setSelectedEvent(event);
5125
5129
  setOpen(true);
5126
5130
  }, []);
5127
- const handleRetry = (0, import_react22.useCallback)(() => {
5131
+ const handleRetry = (0, import_react23.useCallback)(() => {
5128
5132
  void checkStatus();
5129
5133
  }, [checkStatus]);
5130
5134
  const navigate = (0, import_react_router_dom2.useNavigate)();
5131
5135
  const { resolveLink } = useAppInspector();
5132
- const navigateToSpansList = (0, import_react22.useCallback)(() => {
5136
+ const navigateToSpansList = (0, import_react23.useCallback)(() => {
5133
5137
  const url = resolveLink({ to: "spans-list" });
5134
5138
  navigate(url);
5135
5139
  }, [navigate, resolveLink]);
5136
- return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
5140
+ return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
5137
5141
  TraceGraphView,
5138
5142
  {
5139
5143
  fetchError,