@localstack/appinspector-ui 1.0.98 → 1.0.99

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
@@ -2418,7 +2418,7 @@ module.exports = __toCommonJS(index_exports);
2418
2418
 
2419
2419
  // src/pages/spans-list-page.tsx
2420
2420
  var import_material23 = require("@mui/material");
2421
- var import_react67 = require("react");
2421
+ var import_react69 = require("react");
2422
2422
 
2423
2423
  // src/api/errors.ts
2424
2424
  var AppInspectorNotFoundError = class extends Error {
@@ -4838,20 +4838,20 @@ var RowSorting = {
4838
4838
  createColumn: (column, table) => {
4839
4839
  column.getAutoSortingFn = () => {
4840
4840
  const firstRows = table.getFilteredRowModel().flatRows.slice(10);
4841
- let isString2 = false;
4841
+ let isString3 = false;
4842
4842
  for (const row of firstRows) {
4843
4843
  const value = row == null ? void 0 : row.getValue(column.id);
4844
4844
  if (Object.prototype.toString.call(value) === "[object Date]") {
4845
4845
  return sortingFns.datetime;
4846
4846
  }
4847
4847
  if (typeof value === "string") {
4848
- isString2 = true;
4848
+ isString3 = true;
4849
4849
  if (value.split(reSplitAlphaNumeric).length > 1) {
4850
4850
  return sortingFns.alphanumeric;
4851
4851
  }
4852
4852
  }
4853
4853
  }
4854
- if (isString2) {
4854
+ if (isString3) {
4855
4855
  return sortingFns.text;
4856
4856
  }
4857
4857
  return sortingFns.basic;
@@ -15444,10 +15444,74 @@ var StatusMessage = ({
15444
15444
  return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_jsx_runtime129.Fragment, {});
15445
15445
  };
15446
15446
 
15447
- // src/hooks/use-local-storage.tsx
15447
+ // src/hooks/status-provider.tsx
15448
+ var import_react45 = require("react");
15449
+
15450
+ // src/hooks/use-status.tsx
15448
15451
  var import_react44 = require("react");
15452
+ var useStatus = () => {
15453
+ const api = useAppInspectorApi();
15454
+ const [checking, setChecking] = (0, import_react44.useState)(true);
15455
+ const [status, setStatus] = (0, import_react44.useState)();
15456
+ const [error, setError] = (0, import_react44.useState)();
15457
+ const hasFetchedReference = (0, import_react44.useRef)(false);
15458
+ const abortControllerReference = (0, import_react44.useRef)(null);
15459
+ const checkStatus = (0, import_react44.useCallback)(async () => {
15460
+ if (abortControllerReference.current !== null) {
15461
+ abortControllerReference.current.abort();
15462
+ }
15463
+ const abortController = new AbortController();
15464
+ abortControllerReference.current = abortController;
15465
+ setChecking(true);
15466
+ try {
15467
+ const response = await api.getStatus();
15468
+ if (!abortController.signal.aborted) {
15469
+ setStatus(response);
15470
+ setError(void 0);
15471
+ }
15472
+ } catch (error_) {
15473
+ if (!abortController.signal.aborted) {
15474
+ setError(error_ instanceof Error ? error_ : new Error("Unknown error"));
15475
+ setStatus(void 0);
15476
+ }
15477
+ } finally {
15478
+ if (!abortController.signal.aborted) {
15479
+ setChecking(false);
15480
+ }
15481
+ }
15482
+ }, [api]);
15483
+ (0, import_react44.useEffect)(() => {
15484
+ if (!hasFetchedReference.current) {
15485
+ hasFetchedReference.current = true;
15486
+ void checkStatus();
15487
+ }
15488
+ }, [checkStatus]);
15489
+ return { checking, checkStatus, error, status };
15490
+ };
15491
+
15492
+ // src/hooks/status-provider.tsx
15493
+ var import_jsx_runtime130 = require("react/jsx-runtime");
15494
+ var AppInspectorStatusContext = (0, import_react45.createContext)(void 0);
15495
+ var StatusProvider = ({ children }) => {
15496
+ const { checking, checkStatus, error, status } = useStatus();
15497
+ const value = (0, import_react45.useMemo)(
15498
+ () => ({ checking, checkStatus, status, statusError: error }),
15499
+ [checking, checkStatus, status, error]
15500
+ );
15501
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(AppInspectorStatusContext.Provider, { value, children });
15502
+ };
15503
+ var useAppInspectorStatus = () => {
15504
+ const value = (0, import_react45.useContext)(AppInspectorStatusContext);
15505
+ if (!value) {
15506
+ throw new Error("@localstack-studio/ui: useAppInspectorStatus must be used within a <StatusProvider> (rendered internally by <AppInspectorContextProvider>)");
15507
+ }
15508
+ return value;
15509
+ };
15510
+
15511
+ // src/hooks/use-local-storage.tsx
15512
+ var import_react46 = require("react");
15449
15513
  function useLocalStorage(key, initialValue) {
15450
- const [storedValue, setStoredValue] = (0, import_react44.useState)(() => {
15514
+ const [storedValue, setStoredValue] = (0, import_react46.useState)(() => {
15451
15515
  try {
15452
15516
  const item = globalThis.localStorage.getItem(key);
15453
15517
  return item ? JSON.parse(item) : initialValue;
@@ -15456,7 +15520,7 @@ function useLocalStorage(key, initialValue) {
15456
15520
  return initialValue;
15457
15521
  }
15458
15522
  });
15459
- const setValue = (0, import_react44.useCallback)((value) => {
15523
+ const setValue = (0, import_react46.useCallback)((value) => {
15460
15524
  try {
15461
15525
  setStoredValue((previousState) => {
15462
15526
  const next = typeof value === "function" ? value(previousState) : value;
@@ -15471,7 +15535,7 @@ function useLocalStorage(key, initialValue) {
15471
15535
  console.error(`Error setting localStorage key "${key}":`, error);
15472
15536
  }
15473
15537
  }, [key]);
15474
- (0, import_react44.useEffect)(() => {
15538
+ (0, import_react46.useEffect)(() => {
15475
15539
  const handleStorageChange = (event) => {
15476
15540
  if (event.key === key && event.newValue !== null) {
15477
15541
  try {
@@ -15490,49 +15554,7 @@ function useLocalStorage(key, initialValue) {
15490
15554
  }
15491
15555
 
15492
15556
  // src/hooks/use-spans.ts
15493
- var import_react50 = require("react");
15494
-
15495
- // src/hooks/use-status.tsx
15496
- var import_react45 = require("react");
15497
- var useStatus = () => {
15498
- const api = useAppInspectorApi();
15499
- const [checking, setChecking] = (0, import_react45.useState)(true);
15500
- const [status, setStatus] = (0, import_react45.useState)();
15501
- const [error, setError] = (0, import_react45.useState)();
15502
- const hasFetchedReference = (0, import_react45.useRef)(false);
15503
- const abortControllerReference = (0, import_react45.useRef)(null);
15504
- const checkStatus = (0, import_react45.useCallback)(async () => {
15505
- if (abortControllerReference.current !== null) {
15506
- abortControllerReference.current.abort();
15507
- }
15508
- const abortController = new AbortController();
15509
- abortControllerReference.current = abortController;
15510
- setChecking(true);
15511
- try {
15512
- const response = await api.getStatus();
15513
- if (!abortController.signal.aborted) {
15514
- setStatus(response);
15515
- setError(void 0);
15516
- }
15517
- } catch (error_) {
15518
- if (!abortController.signal.aborted) {
15519
- setError(error_ instanceof Error ? error_ : new Error("Unknown error"));
15520
- setStatus(void 0);
15521
- }
15522
- } finally {
15523
- if (!abortController.signal.aborted) {
15524
- setChecking(false);
15525
- }
15526
- }
15527
- }, [api]);
15528
- (0, import_react45.useEffect)(() => {
15529
- if (!hasFetchedReference.current) {
15530
- hasFetchedReference.current = true;
15531
- void checkStatus();
15532
- }
15533
- }, [checkStatus]);
15534
- return { checking, checkStatus, error, status };
15535
- };
15557
+ var import_react52 = require("react");
15536
15558
 
15537
15559
  // src/utils/pagination-buffer.ts
15538
15560
  var insertSorted = (array, item, compareFunction, hint = "back") => {
@@ -15713,12 +15735,13 @@ var createPaginationBuffer = (options) => {
15713
15735
  };
15714
15736
 
15715
15737
  // src/hooks/use-spans-ws.tsx
15716
- var import_react48 = require("react");
15738
+ var import_react50 = require("react");
15717
15739
 
15718
15740
  // src/config.ts
15719
15741
  var APPINSPECTOR_API_PREFIX = "/_localstack/appinspector";
15720
15742
  var API_VERSION = "v1";
15721
15743
  var API_ENDPOINTS = {
15744
+ ANALYTICS: "/analytics",
15722
15745
  EVENTS: "/traces/*/spans/*/events",
15723
15746
  ROOT: "/",
15724
15747
  SPANS: "/traces/*/spans",
@@ -15741,8 +15764,8 @@ var getAppInspectorApiUrl = (localstackEndpoint, endpoint) => {
15741
15764
  var LOCALSTACK_INFO_PATH = "/_localstack/info";
15742
15765
 
15743
15766
  // src/context.tsx
15744
- var import_react46 = require("react");
15745
- var import_react47 = require("react");
15767
+ var import_react48 = require("react");
15768
+ var import_react49 = require("react");
15746
15769
 
15747
15770
  // src/api/client.ts
15748
15771
  var import_semver2 = __toESM(require_semver2(), 1);
@@ -15813,6 +15836,7 @@ var createScopedLogger = (scope) => ({
15813
15836
 
15814
15837
  // src/api/client.ts
15815
15838
  var apiLogger = createScopedLogger("API");
15839
+ var analyticsLogger = createScopedLogger("ANALYTICS");
15816
15840
  var makeRequest = async (options) => {
15817
15841
  const url = getAppInspectorApiUrl(options.localstackEndpoint, options.endpoint);
15818
15842
  try {
@@ -15885,110 +15909,2031 @@ var buildEventsEndpoint = (request) => {
15885
15909
  if (request.pagination_token) {
15886
15910
  queryParameters.set("pagination_token", request.pagination_token);
15887
15911
  }
15888
- for (const [key, value] of Object.entries(request)) {
15889
- if (value !== void 0 && key !== "limit" && key !== "pagination_token" && value !== null) {
15890
- queryParameters.set(key, String(value));
15912
+ for (const [key, value] of Object.entries(request)) {
15913
+ if (value !== void 0 && key !== "limit" && key !== "pagination_token" && value !== null) {
15914
+ queryParameters.set(key, String(value));
15915
+ }
15916
+ }
15917
+ const queryString = queryParameters.toString();
15918
+ return queryString ? `${basePath}?${queryString}` : basePath;
15919
+ };
15920
+ var fetchLocalStackVersion = async (localstackEndpoint) => {
15921
+ try {
15922
+ const response = await fetch(`${localstackEndpoint}${LOCALSTACK_INFO_PATH}`);
15923
+ if (!response.ok) return void 0;
15924
+ const info = await response.json();
15925
+ return info.version;
15926
+ } catch {
15927
+ return void 0;
15928
+ }
15929
+ };
15930
+ var createApiClient = ({ localstackEndpoint }) => {
15931
+ return {
15932
+ deleteSpans: async (_request) => {
15933
+ return makeRequest({
15934
+ endpoint: API_ENDPOINTS.SPANS,
15935
+ localstackEndpoint,
15936
+ request: {
15937
+ method: "DELETE"
15938
+ }
15939
+ });
15940
+ },
15941
+ getEvents: async (request) => {
15942
+ const endpoint = buildEventsEndpoint(request);
15943
+ return makeRequest({ endpoint, localstackEndpoint });
15944
+ },
15945
+ getIamEvents: async (request) => {
15946
+ const iamEventsRequest = {
15947
+ ...request,
15948
+ event_type: "iam.policy_evaluation"
15949
+ };
15950
+ const endpoint = buildEventsEndpoint(iamEventsRequest);
15951
+ return makeRequest({ endpoint, localstackEndpoint });
15952
+ },
15953
+ getSpans: async (request) => {
15954
+ const endpoint = buildSpansEndpoint(request);
15955
+ const response = await makeRequest({ endpoint, localstackEndpoint });
15956
+ return {
15957
+ ...response,
15958
+ spans: response.spans.map((span) => ({
15959
+ ...span,
15960
+ endTime: unixNanoToDate(span.end_time_unix_nano),
15961
+ startTime: unixNanoToDate(span.start_time_unix_nano)
15962
+ }))
15963
+ };
15964
+ },
15965
+ getStatus: async () => {
15966
+ let headerVersion;
15967
+ const [statusResult, infoVersion] = await Promise.allSettled([
15968
+ makeRequest({
15969
+ captureHeaders: (headers) => {
15970
+ headerVersion = headers.get("x-localstack") ?? void 0;
15971
+ },
15972
+ endpoint: API_ENDPOINTS.STATUS,
15973
+ localstackEndpoint
15974
+ }),
15975
+ fetchLocalStackVersion(localstackEndpoint)
15976
+ ]);
15977
+ if (statusResult.status === "rejected") {
15978
+ const reason = statusResult.reason;
15979
+ if (reason instanceof AppInspectorNotFoundError) {
15980
+ reason.localstackVersion = infoVersion.status === "fulfilled" ? infoVersion.value : void 0;
15981
+ }
15982
+ throw reason instanceof Error ? reason : new Error("Unknown error occurred");
15983
+ }
15984
+ const localstackVersion = headerVersion && import_semver2.default.coerce(headerVersion) ? headerVersion : infoVersion.status === "fulfilled" ? infoVersion.value : void 0;
15985
+ return { ...statusResult.value, localstackVersion };
15986
+ },
15987
+ postAnalytics: async (request) => {
15988
+ try {
15989
+ await makeRequest({
15990
+ endpoint: API_ENDPOINTS.ANALYTICS,
15991
+ localstackEndpoint,
15992
+ request: {
15993
+ body: JSON.stringify(request),
15994
+ method: "POST"
15995
+ }
15996
+ });
15997
+ } catch (error) {
15998
+ analyticsLogger.warn("Failed to post analytics event:", { error, event: request.event });
15999
+ }
16000
+ },
16001
+ setStatus: async (request) => {
16002
+ return makeRequest({
16003
+ endpoint: API_ENDPOINTS.STATUS,
16004
+ localstackEndpoint,
16005
+ request: {
16006
+ body: JSON.stringify(request),
16007
+ method: "PUT"
16008
+ }
16009
+ });
16010
+ }
16011
+ };
16012
+ };
16013
+
16014
+ // src/hooks/use-appinspector-open-analytics.ts
16015
+ var import_react47 = require("react");
16016
+
16017
+ // node_modules/ua-parser-js/src/main/ua-parser.mjs
16018
+ var LIBVERSION = "2.0.9";
16019
+ var UA_MAX_LENGTH = 500;
16020
+ var USER_AGENT = "user-agent";
16021
+ var EMPTY = "";
16022
+ var UNKNOWN = "?";
16023
+ var TYPEOF = {
16024
+ FUNCTION: "function",
16025
+ OBJECT: "object",
16026
+ STRING: "string",
16027
+ UNDEFINED: "undefined"
16028
+ };
16029
+ var BROWSER = "browser";
16030
+ var CPU = "cpu";
16031
+ var DEVICE = "device";
16032
+ var ENGINE = "engine";
16033
+ var OS = "os";
16034
+ var RESULT = "result";
16035
+ var NAME = "name";
16036
+ var TYPE = "type";
16037
+ var VENDOR = "vendor";
16038
+ var VERSION = "version";
16039
+ var ARCHITECTURE = "architecture";
16040
+ var MAJOR = "major";
16041
+ var MODEL = "model";
16042
+ var CONSOLE = "console";
16043
+ var MOBILE = "mobile";
16044
+ var TABLET = "tablet";
16045
+ var SMARTTV = "smarttv";
16046
+ var WEARABLE = "wearable";
16047
+ var XR = "xr";
16048
+ var EMBEDDED = "embedded";
16049
+ var FETCHER = "fetcher";
16050
+ var INAPP = "inapp";
16051
+ var BRANDS = "brands";
16052
+ var FORMFACTORS = "formFactors";
16053
+ var FULLVERLIST = "fullVersionList";
16054
+ var PLATFORM = "platform";
16055
+ var PLATFORMVER = "platformVersion";
16056
+ var BITNESS = "bitness";
16057
+ var CH = "sec-ch-ua";
16058
+ var CH_FULL_VER_LIST = CH + "-full-version-list";
16059
+ var CH_ARCH = CH + "-arch";
16060
+ var CH_BITNESS = CH + "-" + BITNESS;
16061
+ var CH_FORM_FACTORS = CH + "-form-factors";
16062
+ var CH_MOBILE = CH + "-" + MOBILE;
16063
+ var CH_MODEL = CH + "-" + MODEL;
16064
+ var CH_PLATFORM = CH + "-" + PLATFORM;
16065
+ var CH_PLATFORM_VER = CH_PLATFORM + "-version";
16066
+ var CH_ALL_VALUES = [BRANDS, FULLVERLIST, MOBILE, MODEL, PLATFORM, PLATFORMVER, ARCHITECTURE, FORMFACTORS, BITNESS];
16067
+ var AMAZON = "Amazon";
16068
+ var APPLE = "Apple";
16069
+ var ASUS = "ASUS";
16070
+ var BLACKBERRY = "BlackBerry";
16071
+ var GOOGLE = "Google";
16072
+ var HUAWEI = "Huawei";
16073
+ var LENOVO = "Lenovo";
16074
+ var HONOR = "Honor";
16075
+ var LG = "LG";
16076
+ var MICROSOFT = "Microsoft";
16077
+ var MOTOROLA = "Motorola";
16078
+ var NVIDIA = "Nvidia";
16079
+ var ONEPLUS = "OnePlus";
16080
+ var OPPO = "OPPO";
16081
+ var SAMSUNG = "Samsung";
16082
+ var SHARP = "Sharp";
16083
+ var SONY = "Sony";
16084
+ var XIAOMI = "Xiaomi";
16085
+ var ZEBRA = "Zebra";
16086
+ var CHROME = "Chrome";
16087
+ var CHROMIUM = "Chromium";
16088
+ var CHROMECAST = "Chromecast";
16089
+ var EDGE = "Edge";
16090
+ var FIREFOX = "Firefox";
16091
+ var OPERA = "Opera";
16092
+ var FACEBOOK = "Facebook";
16093
+ var SOGOU = "Sogou";
16094
+ var PREFIX_MOBILE = "Mobile ";
16095
+ var SUFFIX_BROWSER = " Browser";
16096
+ var WINDOWS = "Windows";
16097
+ var isWindow = typeof window !== TYPEOF.UNDEFINED;
16098
+ var NAVIGATOR = isWindow && window.navigator ? window.navigator : void 0;
16099
+ var NAVIGATOR_UADATA = NAVIGATOR && NAVIGATOR.userAgentData ? NAVIGATOR.userAgentData : void 0;
16100
+ var extend = function(defaultRgx, extensions) {
16101
+ var mergedRgx = {};
16102
+ var extraRgx = extensions;
16103
+ if (!isExtensions(extensions)) {
16104
+ extraRgx = {};
16105
+ for (var i2 in extensions) {
16106
+ for (var j2 in extensions[i2]) {
16107
+ extraRgx[j2] = extensions[i2][j2].concat(extraRgx[j2] ? extraRgx[j2] : []);
16108
+ }
16109
+ }
16110
+ }
16111
+ for (var k2 in defaultRgx) {
16112
+ mergedRgx[k2] = extraRgx[k2] && extraRgx[k2].length % 2 === 0 ? extraRgx[k2].concat(defaultRgx[k2]) : defaultRgx[k2];
16113
+ }
16114
+ return mergedRgx;
16115
+ };
16116
+ var enumerize = function(arr) {
16117
+ var enums = {};
16118
+ for (var i2 = 0; i2 < arr.length; i2++) {
16119
+ enums[arr[i2].toUpperCase()] = arr[i2];
16120
+ }
16121
+ return enums;
16122
+ };
16123
+ var has = function(str1, str2) {
16124
+ if (typeof str1 === TYPEOF.OBJECT && str1.length > 0) {
16125
+ for (var i2 in str1) {
16126
+ if (lowerize(str2) == lowerize(str1[i2])) return true;
16127
+ }
16128
+ return false;
16129
+ }
16130
+ return isString2(str1) ? lowerize(str2) == lowerize(str1) : false;
16131
+ };
16132
+ var isExtensions = function(obj, deep) {
16133
+ for (var prop in obj) {
16134
+ return /^(browser|cpu|device|engine|os)$/.test(prop) || (deep ? isExtensions(obj[prop]) : false);
16135
+ }
16136
+ };
16137
+ var isString2 = function(val) {
16138
+ return typeof val === TYPEOF.STRING;
16139
+ };
16140
+ var itemListToArray = function(header) {
16141
+ if (!header) return void 0;
16142
+ var arr = [];
16143
+ var tokens = strip(/\\?\"/g, header).split(",");
16144
+ for (var i2 = 0; i2 < tokens.length; i2++) {
16145
+ if (tokens[i2].indexOf(";") > -1) {
16146
+ var token = trim(tokens[i2]).split(";v=");
16147
+ arr[i2] = { brand: token[0], version: token[1] };
16148
+ } else {
16149
+ arr[i2] = trim(tokens[i2]);
16150
+ }
16151
+ }
16152
+ return arr;
16153
+ };
16154
+ var lowerize = function(str) {
16155
+ return isString2(str) ? str.toLowerCase() : str;
16156
+ };
16157
+ var majorize = function(version) {
16158
+ return isString2(version) ? strip(/[^\d\.]/g, version).split(".")[0] : void 0;
16159
+ };
16160
+ var setProps = function(arr) {
16161
+ for (var i2 in arr) {
16162
+ if (!arr.hasOwnProperty(i2)) continue;
16163
+ var propName = arr[i2];
16164
+ if (typeof propName == TYPEOF.OBJECT && propName.length == 2) {
16165
+ this[propName[0]] = propName[1];
16166
+ } else {
16167
+ this[propName] = void 0;
16168
+ }
16169
+ }
16170
+ return this;
16171
+ };
16172
+ var strip = function(pattern, str) {
16173
+ return isString2(str) ? str.replace(pattern, EMPTY) : str;
16174
+ };
16175
+ var stripQuotes = function(str) {
16176
+ return strip(/\\?\"/g, str);
16177
+ };
16178
+ var trim = function(str, len) {
16179
+ str = strip(/^\s\s*/, String(str));
16180
+ return typeof len === TYPEOF.UNDEFINED ? str : str.substring(0, len);
16181
+ };
16182
+ var rgxMapper = function(ua, arrays) {
16183
+ if (!ua || !arrays) return;
16184
+ var i2 = 0, j2, k2, p2, q2, matches, match;
16185
+ while (i2 < arrays.length && !matches) {
16186
+ var regex = arrays[i2], props = arrays[i2 + 1];
16187
+ j2 = k2 = 0;
16188
+ while (j2 < regex.length && !matches) {
16189
+ if (!regex[j2]) {
16190
+ break;
16191
+ }
16192
+ matches = regex[j2++].exec(ua);
16193
+ if (!!matches) {
16194
+ for (p2 = 0; p2 < props.length; p2++) {
16195
+ match = matches[++k2];
16196
+ q2 = props[p2];
16197
+ if (typeof q2 === TYPEOF.OBJECT && q2.length > 0) {
16198
+ if (q2.length === 2) {
16199
+ if (typeof q2[1] == TYPEOF.FUNCTION) {
16200
+ this[q2[0]] = q2[1].call(this, match);
16201
+ } else {
16202
+ this[q2[0]] = q2[1];
16203
+ }
16204
+ } else if (q2.length >= 3) {
16205
+ if (typeof q2[1] === TYPEOF.FUNCTION && !(q2[1].exec && q2[1].test)) {
16206
+ if (q2.length > 3) {
16207
+ this[q2[0]] = match ? q2[1].apply(this, q2.slice(2)) : void 0;
16208
+ } else {
16209
+ this[q2[0]] = match ? q2[1].call(this, match, q2[2]) : void 0;
16210
+ }
16211
+ } else {
16212
+ if (q2.length == 3) {
16213
+ this[q2[0]] = match ? match.replace(q2[1], q2[2]) : void 0;
16214
+ } else if (q2.length == 4) {
16215
+ this[q2[0]] = match ? q2[3].call(this, match.replace(q2[1], q2[2])) : void 0;
16216
+ } else if (q2.length > 4) {
16217
+ this[q2[0]] = match ? q2[3].apply(this, [match.replace(q2[1], q2[2])].concat(q2.slice(4))) : void 0;
16218
+ }
16219
+ }
16220
+ }
16221
+ } else {
16222
+ this[q2] = match ? match : void 0;
16223
+ }
16224
+ }
16225
+ }
16226
+ }
16227
+ i2 += 2;
16228
+ }
16229
+ };
16230
+ var strMapper = function(str, map) {
16231
+ for (var i2 in map) {
16232
+ if (typeof map[i2] === TYPEOF.OBJECT && map[i2].length > 0) {
16233
+ for (var j2 = 0; j2 < map[i2].length; j2++) {
16234
+ if (has(map[i2][j2], str)) {
16235
+ return i2 === UNKNOWN ? void 0 : i2;
16236
+ }
16237
+ }
16238
+ } else if (has(map[i2], str)) {
16239
+ return i2 === UNKNOWN ? void 0 : i2;
16240
+ }
16241
+ }
16242
+ return map.hasOwnProperty("*") ? map["*"] : str;
16243
+ };
16244
+ var windowsVersionMap = {
16245
+ "ME": "4.90",
16246
+ "NT 3.51": "3.51",
16247
+ "NT 4.0": "4.0",
16248
+ "2000": ["5.0", "5.01"],
16249
+ "XP": ["5.1", "5.2"],
16250
+ "Vista": "6.0",
16251
+ "7": "6.1",
16252
+ "8": "6.2",
16253
+ "8.1": "6.3",
16254
+ "10": ["6.4", "10.0"],
16255
+ "NT": ""
16256
+ };
16257
+ var formFactorsMap = {
16258
+ "embedded": "Automotive",
16259
+ "mobile": "Mobile",
16260
+ "tablet": ["Tablet", "EInk"],
16261
+ "smarttv": "TV",
16262
+ "wearable": "Watch",
16263
+ "xr": ["VR", "XR"],
16264
+ "?": ["Desktop", "Unknown"],
16265
+ "*": void 0
16266
+ };
16267
+ var browserHintsMap = {
16268
+ "Chrome": "Google Chrome",
16269
+ "Edge": "Microsoft Edge",
16270
+ "Edge WebView2": "Microsoft Edge WebView2",
16271
+ "Chrome WebView": "Android WebView",
16272
+ "Chrome Headless": "HeadlessChrome",
16273
+ "Huawei Browser": "HuaweiBrowser",
16274
+ "MIUI Browser": "Miui Browser",
16275
+ "Opera Mobi": "OperaMobile",
16276
+ "Yandex": "YaBrowser"
16277
+ };
16278
+ var defaultRegexes = {
16279
+ browser: [
16280
+ [
16281
+ // Most common regardless engine
16282
+ /\b(?:crmo|crios)\/([\w\.]+)/i
16283
+ // Chrome for Android/iOS
16284
+ ],
16285
+ [VERSION, [NAME, PREFIX_MOBILE + "Chrome"]],
16286
+ [
16287
+ /webview.+edge\/([\w\.]+)/i
16288
+ // Microsoft Edge
16289
+ ],
16290
+ [VERSION, [NAME, EDGE + " WebView"]],
16291
+ [
16292
+ /edg(?:e|ios|a)?\/([\w\.]+)/i
16293
+ ],
16294
+ [VERSION, [NAME, "Edge"]],
16295
+ [
16296
+ // Presto based
16297
+ /(opera mini)\/([-\w\.]+)/i,
16298
+ // Opera Mini
16299
+ /(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,
16300
+ // Opera Mobi/Tablet
16301
+ /(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i
16302
+ // Opera
16303
+ ],
16304
+ [NAME, VERSION],
16305
+ [
16306
+ /opios[\/ ]+([\w\.]+)/i
16307
+ // Opera mini on iphone >= 8.0
16308
+ ],
16309
+ [VERSION, [NAME, OPERA + " Mini"]],
16310
+ [
16311
+ /\bop(?:rg)?x\/([\w\.]+)/i
16312
+ // Opera GX
16313
+ ],
16314
+ [VERSION, [NAME, OPERA + " GX"]],
16315
+ [
16316
+ /\bopr\/([\w\.]+)/i
16317
+ // Opera Webkit
16318
+ ],
16319
+ [VERSION, [NAME, OPERA]],
16320
+ [
16321
+ // Mixed
16322
+ /\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i
16323
+ // Baidu
16324
+ ],
16325
+ [VERSION, [NAME, "Baidu"]],
16326
+ [
16327
+ /\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i
16328
+ // Maxthon
16329
+ ],
16330
+ [VERSION, [NAME, "Maxthon"]],
16331
+ [
16332
+ /(kindle)\/([\w\.]+)/i,
16333
+ // Kindle
16334
+ /(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,
16335
+ // Lunascape/Maxthon/Netfront/Jasmine/Blazer/Sleipnir
16336
+ // Trident based
16337
+ /(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,
16338
+ // Avant/IEMobile/SlimBrowser/SlimBoat/Slimjet
16339
+ /(?:ms|\()(ie) ([\w\.]+)/i,
16340
+ // Internet Explorer
16341
+ // Blink/Webkit/KHTML based // Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon/LG Browser/Otter/qutebrowser/Dooble/Palemoon/HiBrowser
16342
+ /(atlas|flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:hi|lg |ovi|qute)browser|palemoon)\/v?([-\w\.]+)/i,
16343
+ // Atlas/Rekonq/Puffin/Whale/QQBrowserLite/QQ//Vivaldi/DuckDuckGo/Klar/Helio/Dragon
16344
+ /(brave)(?: chrome)?\/([\d\.]+)/i,
16345
+ // Brave
16346
+ /(aloha|heytap|ovi|115|surf|qwant)browser\/([\d\.]+)/i,
16347
+ // Aloha/HeyTap/Ovi/115/Surf
16348
+ /(qwant)(?:ios|mobile)\/([\d\.]+)/i,
16349
+ // Qwant
16350
+ /(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i
16351
+ // Ecosia/Weibo
16352
+ ],
16353
+ [NAME, VERSION],
16354
+ [
16355
+ /quark(?:pc)?\/([-\w\.]+)/i
16356
+ // Quark
16357
+ ],
16358
+ [VERSION, [NAME, "Quark"]],
16359
+ [
16360
+ /\bddg\/([\w\.]+)/i
16361
+ // DuckDuckGo
16362
+ ],
16363
+ [VERSION, [NAME, "DuckDuckGo"]],
16364
+ [
16365
+ /(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i
16366
+ // UCBrowser
16367
+ ],
16368
+ [VERSION, [NAME, "UCBrowser"]],
16369
+ [
16370
+ /microm.+\bqbcore\/([\w\.]+)/i,
16371
+ // WeChat Desktop for Windows Built-in Browser
16372
+ /\bqbcore\/([\w\.]+).+microm/i,
16373
+ /micromessenger\/([\w\.]+)/i
16374
+ // WeChat
16375
+ ],
16376
+ [VERSION, [NAME, "WeChat"]],
16377
+ [
16378
+ /konqueror\/([\w\.]+)/i
16379
+ // Konqueror
16380
+ ],
16381
+ [VERSION, [NAME, "Konqueror"]],
16382
+ [
16383
+ /trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i
16384
+ // IE11
16385
+ ],
16386
+ [VERSION, [NAME, "IE"]],
16387
+ [
16388
+ /ya(?:search)?browser\/([\w\.]+)/i
16389
+ // Yandex
16390
+ ],
16391
+ [VERSION, [NAME, "Yandex"]],
16392
+ [
16393
+ /slbrowser\/([\w\.]+)/i
16394
+ // Smart Lenovo Browser
16395
+ ],
16396
+ [VERSION, [NAME, "Smart " + LENOVO + SUFFIX_BROWSER]],
16397
+ [
16398
+ /(av(?:ast|g|ira))\/([\w\.]+)/i
16399
+ // Avast/AVG/Avira Secure Browser
16400
+ ],
16401
+ [[NAME, /(.+)/, "$1 Secure" + SUFFIX_BROWSER], VERSION],
16402
+ [
16403
+ /norton\/([\w\.]+)/i
16404
+ // Norton Private Browser
16405
+ ],
16406
+ [VERSION, [NAME, "Norton Private" + SUFFIX_BROWSER]],
16407
+ [
16408
+ /\bfocus\/([\w\.]+)/i
16409
+ // Firefox Focus
16410
+ ],
16411
+ [VERSION, [NAME, FIREFOX + " Focus"]],
16412
+ [
16413
+ / mms\/([\w\.]+)$/i
16414
+ // Opera Neon
16415
+ ],
16416
+ [VERSION, [NAME, OPERA + " Neon"]],
16417
+ [
16418
+ / opt\/([\w\.]+)$/i
16419
+ // Opera Touch
16420
+ ],
16421
+ [VERSION, [NAME, OPERA + " Touch"]],
16422
+ [
16423
+ /coc_coc\w+\/([\w\.]+)/i
16424
+ // Coc Coc Browser
16425
+ ],
16426
+ [VERSION, [NAME, "Coc Coc"]],
16427
+ [
16428
+ /dolfin\/([\w\.]+)/i
16429
+ // Dolphin
16430
+ ],
16431
+ [VERSION, [NAME, "Dolphin"]],
16432
+ [
16433
+ /coast\/([\w\.]+)/i
16434
+ // Opera Coast
16435
+ ],
16436
+ [VERSION, [NAME, OPERA + " Coast"]],
16437
+ [
16438
+ /miuibrowser\/([\w\.]+)/i
16439
+ // MIUI Browser
16440
+ ],
16441
+ [VERSION, [NAME, "MIUI" + SUFFIX_BROWSER]],
16442
+ [
16443
+ /fxios\/([\w\.-]+)/i
16444
+ // Firefox for iOS
16445
+ ],
16446
+ [VERSION, [NAME, PREFIX_MOBILE + FIREFOX]],
16447
+ [
16448
+ /\bqihoobrowser\/?([\w\.]*)/i
16449
+ // 360
16450
+ ],
16451
+ [VERSION, [NAME, "360"]],
16452
+ [
16453
+ /\b(qq)\/([\w\.]+)/i
16454
+ // QQ
16455
+ ],
16456
+ [[NAME, /(.+)/, "$1Browser"], VERSION],
16457
+ [
16458
+ /(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i
16459
+ ],
16460
+ [[NAME, /(.+)/, "$1" + SUFFIX_BROWSER], VERSION],
16461
+ [
16462
+ // Oculus/Sailfish/HuaweiBrowser/VivoBrowser/PicoBrowser
16463
+ /samsungbrowser\/([\w\.]+)/i
16464
+ // Samsung Internet
16465
+ ],
16466
+ [VERSION, [NAME, SAMSUNG + " Internet"]],
16467
+ [
16468
+ /metasr[\/ ]?([\d\.]+)/i
16469
+ // Sogou Explorer
16470
+ ],
16471
+ [VERSION, [NAME, SOGOU + " Explorer"]],
16472
+ [
16473
+ /(sogou)mo\w+\/([\d\.]+)/i
16474
+ // Sogou Mobile
16475
+ ],
16476
+ [[NAME, SOGOU + " Mobile"], VERSION],
16477
+ [
16478
+ /(electron)\/([\w\.]+) safari/i,
16479
+ // Electron-based App
16480
+ /(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,
16481
+ // Tesla
16482
+ /m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i
16483
+ // QQ/2345
16484
+ ],
16485
+ [NAME, VERSION],
16486
+ [
16487
+ /(lbbrowser|luakit|rekonq|steam(?= (clie|tenf|gameo)))/i
16488
+ // LieBao Browser/Luakit/Rekonq/Steam
16489
+ ],
16490
+ [NAME],
16491
+ [
16492
+ /ome\/([\w\.]+).+(iron(?= saf)|360(?=[es]e$))/i
16493
+ // Iron / 360
16494
+ ],
16495
+ [VERSION, NAME],
16496
+ [
16497
+ // WebView
16498
+ /((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i
16499
+ // Facebook App for iOS & Android
16500
+ ],
16501
+ [[NAME, FACEBOOK], VERSION, [TYPE, INAPP]],
16502
+ [
16503
+ /(kakao(?:talk|story))[\/ ]([\w\.]+)/i,
16504
+ // Kakao App
16505
+ /(naver)\(.*?(\d+\.[\w\.]+).*\)/i,
16506
+ // Naver InApp
16507
+ /(daum)apps[\/ ]([\w\.]+)/i,
16508
+ // Daum App
16509
+ /safari (line)\/([\w\.]+)/i,
16510
+ // Line App for iOS
16511
+ /\b(line)\/([\w\.]+)\/iab/i,
16512
+ // Line App for Android
16513
+ /(alipay)client\/([\w\.]+)/i,
16514
+ // Alipay
16515
+ /(twitter)(?:and| f.+e\/([\w\.]+))/i,
16516
+ // Twitter
16517
+ /(bing)(?:web|sapphire)\/([\w\.]+)/i,
16518
+ // Bing
16519
+ /(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i
16520
+ // Instagram/Snapchat/Klarna
16521
+ ],
16522
+ [NAME, VERSION, [TYPE, INAPP]],
16523
+ [
16524
+ /\bgsa\/([\w\.]+) .*safari\//i
16525
+ // Google Search Appliance on iOS
16526
+ ],
16527
+ [VERSION, [NAME, "GSA"], [TYPE, INAPP]],
16528
+ [
16529
+ /(?:musical_ly|trill)(?:.+app_?version\/|_)([\w\.]+)/i
16530
+ // TikTok
16531
+ ],
16532
+ [VERSION, [NAME, "TikTok"], [TYPE, INAPP]],
16533
+ [
16534
+ /\[(linkedin)app\]/i
16535
+ // LinkedIn App for iOS & Android
16536
+ ],
16537
+ [NAME, [TYPE, INAPP]],
16538
+ [
16539
+ /(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i
16540
+ // Zalo
16541
+ ],
16542
+ [[NAME, /(.+)/, "Zalo"], VERSION, [TYPE, INAPP]],
16543
+ [
16544
+ /(chromium)[\/ ]([-\w\.]+)/i
16545
+ // Chromium
16546
+ ],
16547
+ [NAME, VERSION],
16548
+ [
16549
+ /ome-(lighthouse)$/i
16550
+ // Chrome Lighthouse
16551
+ ],
16552
+ [NAME, [TYPE, FETCHER]],
16553
+ [
16554
+ /headlesschrome(?:\/([\w\.]+)| )/i
16555
+ // Chrome Headless
16556
+ ],
16557
+ [VERSION, [NAME, CHROME + " Headless"]],
16558
+ [
16559
+ /wv\).+chrome\/([\w\.]+).+edgw\//i
16560
+ // Edge WebView2
16561
+ ],
16562
+ [VERSION, [NAME, EDGE + " WebView2"]],
16563
+ [
16564
+ / wv\).+(chrome)\/([\w\.]+)/i
16565
+ // Chrome WebView
16566
+ ],
16567
+ [[NAME, CHROME + " WebView"], VERSION],
16568
+ [
16569
+ /droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i
16570
+ // Android Browser
16571
+ ],
16572
+ [VERSION, [NAME, "Android" + SUFFIX_BROWSER]],
16573
+ [
16574
+ /chrome\/([\w\.]+) mobile/i
16575
+ // Chrome Mobile
16576
+ ],
16577
+ [VERSION, [NAME, PREFIX_MOBILE + "Chrome"]],
16578
+ [
16579
+ /(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i
16580
+ // Chrome/OmniWeb/Arora/Tizen/Nokia
16581
+ ],
16582
+ [NAME, VERSION],
16583
+ [
16584
+ /version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i
16585
+ // Safari Mobile
16586
+ ],
16587
+ [VERSION, [NAME, PREFIX_MOBILE + "Safari"]],
16588
+ [
16589
+ /iphone .*mobile(?:\/\w+ | ?)safari/i
16590
+ ],
16591
+ [[NAME, PREFIX_MOBILE + "Safari"]],
16592
+ [
16593
+ /version\/([\w\.\,]+) .*(safari)/i
16594
+ // Safari
16595
+ ],
16596
+ [VERSION, NAME],
16597
+ [
16598
+ /webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i
16599
+ // Safari < 3.0
16600
+ ],
16601
+ [NAME, [VERSION, "1"]],
16602
+ [
16603
+ /(webkit|khtml)\/([\w\.]+)/i
16604
+ ],
16605
+ [NAME, VERSION],
16606
+ [
16607
+ // Gecko based
16608
+ /(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i
16609
+ // Firefox Mobile
16610
+ ],
16611
+ [[NAME, PREFIX_MOBILE + FIREFOX], VERSION],
16612
+ [
16613
+ /(navigator|netscape\d?)\/([-\w\.]+)/i
16614
+ // Netscape
16615
+ ],
16616
+ [[NAME, "Netscape"], VERSION],
16617
+ [
16618
+ /(wolvic|librewolf)\/([\w\.]+)/i
16619
+ // Wolvic/LibreWolf
16620
+ ],
16621
+ [NAME, VERSION],
16622
+ [
16623
+ /mobile vr; rv:([\w\.]+)\).+firefox/i
16624
+ // Firefox Reality
16625
+ ],
16626
+ [VERSION, [NAME, FIREFOX + " Reality"]],
16627
+ [
16628
+ /ekiohf.+(flow)\/([\w\.]+)/i,
16629
+ // Flow
16630
+ /(swiftfox)/i,
16631
+ // Swiftfox
16632
+ /(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,
16633
+ // IceDragon/Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo/Conkeror
16634
+ /(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|basilisk|waterfox)\/([-\w\.]+)$/i,
16635
+ // Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix
16636
+ /(firefox)\/([\w\.]+)/i,
16637
+ // Other Firefox-based
16638
+ /(mozilla)\/([\w\.]+(?= .+rv\:.+gecko\/\d+)|[0-4][\w\.]+(?!.+compatible))/i,
16639
+ // Mozilla
16640
+ // Other
16641
+ /(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,
16642
+ // Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Obigo/Mosaic/Go/ICE/UP.Browser/Ladybird
16643
+ /\b(links) \(([\w\.]+)/i
16644
+ // Links
16645
+ ],
16646
+ [NAME, [VERSION, /_/g, "."]],
16647
+ [
16648
+ /(cobalt)\/([\w\.]+)/i
16649
+ // Cobalt
16650
+ ],
16651
+ [NAME, [VERSION, /[^\d\.]+./, EMPTY]]
16652
+ ],
16653
+ cpu: [
16654
+ [
16655
+ /\b((amd|x|x86[-_]?|wow|win)64)\b/i
16656
+ // AMD64 (x64)
16657
+ ],
16658
+ [[ARCHITECTURE, "amd64"]],
16659
+ [
16660
+ /(ia32(?=;))/i,
16661
+ // IA32 (quicktime)
16662
+ /\b((i[346]|x)86)(pc)?\b/i
16663
+ // IA32 (x86)
16664
+ ],
16665
+ [[ARCHITECTURE, "ia32"]],
16666
+ [
16667
+ /\b(aarch64|arm(v?[89]e?l?|_?64))\b/i
16668
+ // ARM64
16669
+ ],
16670
+ [[ARCHITECTURE, "arm64"]],
16671
+ [
16672
+ /\b(arm(v[67])?ht?n?[fl]p?)\b/i
16673
+ // ARMHF
16674
+ ],
16675
+ [[ARCHITECTURE, "armhf"]],
16676
+ [
16677
+ // PocketPC mistakenly identified as PowerPC
16678
+ /( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i
16679
+ ],
16680
+ [[ARCHITECTURE, "arm"]],
16681
+ [
16682
+ / sun4\w[;\)]/i
16683
+ // SPARC
16684
+ ],
16685
+ [[ARCHITECTURE, "sparc"]],
16686
+ [
16687
+ // IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC
16688
+ /\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i,
16689
+ /((ppc|powerpc)(64)?)( mac|;|\))/i,
16690
+ // PowerPC
16691
+ /(?:osf1|[freopnt]{3,4}bsd) (alpha)/i
16692
+ // Alpha
16693
+ ],
16694
+ [[ARCHITECTURE, /ower/, EMPTY, lowerize]],
16695
+ [
16696
+ /mc680.0/i
16697
+ ],
16698
+ [[ARCHITECTURE, "68k"]],
16699
+ [
16700
+ /winnt.+\[axp/i
16701
+ ],
16702
+ [[ARCHITECTURE, "alpha"]]
16703
+ ],
16704
+ device: [
16705
+ [
16706
+ //////////////////////////
16707
+ // MOBILES & TABLETS
16708
+ /////////////////////////
16709
+ // Samsung
16710
+ /\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i
16711
+ ],
16712
+ [MODEL, [VENDOR, SAMSUNG], [TYPE, TABLET]],
16713
+ [
16714
+ /\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,
16715
+ /samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,
16716
+ /sec-(sgh\w+)/i
16717
+ ],
16718
+ [MODEL, [VENDOR, SAMSUNG], [TYPE, MOBILE]],
16719
+ [
16720
+ // Apple
16721
+ /(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i
16722
+ // iPod/iPhone
16723
+ ],
16724
+ [MODEL, [VENDOR, APPLE], [TYPE, MOBILE]],
16725
+ [
16726
+ /\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,
16727
+ // iPad
16728
+ /\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i
16729
+ ],
16730
+ [MODEL, [VENDOR, APPLE], [TYPE, TABLET]],
16731
+ [
16732
+ /(macintosh);/i
16733
+ ],
16734
+ [MODEL, [VENDOR, APPLE]],
16735
+ [
16736
+ // Sharp
16737
+ /\b(sh-?[altvz]?\d\d[a-ekm]?)/i
16738
+ ],
16739
+ [MODEL, [VENDOR, SHARP], [TYPE, MOBILE]],
16740
+ [
16741
+ // Honor
16742
+ /\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i
16743
+ ],
16744
+ [MODEL, [VENDOR, HONOR], [TYPE, TABLET]],
16745
+ [
16746
+ /honor([-\w ]+)[;\)]/i
16747
+ ],
16748
+ [MODEL, [VENDOR, HONOR], [TYPE, MOBILE]],
16749
+ [
16750
+ // Huawei
16751
+ /\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i
16752
+ ],
16753
+ [MODEL, [VENDOR, HUAWEI], [TYPE, TABLET]],
16754
+ [
16755
+ /(?:huawei) ?([-\w ]+)[;\)]/i,
16756
+ /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i
16757
+ ],
16758
+ [MODEL, [VENDOR, HUAWEI], [TYPE, MOBILE]],
16759
+ [
16760
+ // Xiaomi
16761
+ /oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,
16762
+ /\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i
16763
+ // Mi Pad tablets
16764
+ ],
16765
+ [[MODEL, /_/g, " "], [VENDOR, XIAOMI], [TYPE, TABLET]],
16766
+ [
16767
+ /\b; (\w+) build\/hm\1/i,
16768
+ // Xiaomi Hongmi 'numeric' models
16769
+ /\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,
16770
+ // Xiaomi Hongmi
16771
+ // Xiaomi Redmi / POCO / Black Shark / Qin
16772
+ /oid[^\)]+; (redmi[\-_ ]?(?:note|k)?[\w_ ]+|m?[12]\d[01]\d\w{3,6}|poco[\w ]+|(shark )?\w{3}-[ah]0|qin ?[1-3](s\+|ultra| pro)?)( bui|; wv|\))/i,
16773
+ // Xiaomi Mi
16774
+ /\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note|max|cc)?[_ ]?(?:\d{0,2}\w?)[_ ]?(?:plus|se|lite|pro)?( 5g|lte)?)(?: bui|\))/i,
16775
+ / ([\w ]+) miui\/v?\d/i
16776
+ ],
16777
+ [[MODEL, /_/g, " "], [VENDOR, XIAOMI], [TYPE, MOBILE]],
16778
+ [
16779
+ // OnePlus
16780
+ /droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-l]\w[1m]10)\b/i,
16781
+ /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i
16782
+ ],
16783
+ [MODEL, [VENDOR, ONEPLUS], [TYPE, MOBILE]],
16784
+ [
16785
+ // OPPO
16786
+ /; (\w+) bui.+ oppo/i,
16787
+ /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i
16788
+ ],
16789
+ [MODEL, [VENDOR, OPPO], [TYPE, MOBILE]],
16790
+ [
16791
+ /\b(opd2(\d{3}a?))(?: bui|\))/i
16792
+ ],
16793
+ [MODEL, [VENDOR, strMapper, { "OnePlus": ["203", "304", "403", "404", "413", "415"], "*": OPPO }], [TYPE, TABLET]],
16794
+ [
16795
+ // BLU
16796
+ /(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i
16797
+ // Vivo series
16798
+ ],
16799
+ [MODEL, [VENDOR, "BLU"], [TYPE, MOBILE]],
16800
+ [
16801
+ // Vivo
16802
+ /; vivo (\w+)(?: bui|\))/i,
16803
+ /\b(v[12]\d{3}\w?[at])(?: bui|;)/i
16804
+ ],
16805
+ [MODEL, [VENDOR, "Vivo"], [TYPE, MOBILE]],
16806
+ [
16807
+ // Realme
16808
+ /\b(rmx[1-3]\d{3})(?: bui|;|\))/i
16809
+ ],
16810
+ [MODEL, [VENDOR, "Realme"], [TYPE, MOBILE]],
16811
+ [
16812
+ // Lenovo
16813
+ /(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,
16814
+ /lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i
16815
+ ],
16816
+ [MODEL, [VENDOR, LENOVO], [TYPE, TABLET]],
16817
+ [
16818
+ /lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i
16819
+ ],
16820
+ [MODEL, [VENDOR, LENOVO], [TYPE, MOBILE]],
16821
+ [
16822
+ // Motorola
16823
+ /\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,
16824
+ /\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,
16825
+ /((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i
16826
+ ],
16827
+ [MODEL, [VENDOR, MOTOROLA], [TYPE, MOBILE]],
16828
+ [
16829
+ /\b(mz60\d|xoom[2 ]{0,2}) build\//i
16830
+ ],
16831
+ [MODEL, [VENDOR, MOTOROLA], [TYPE, TABLET]],
16832
+ [
16833
+ // LG
16834
+ /\b(?:lg)?([vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i
16835
+ ],
16836
+ [MODEL, [VENDOR, LG], [TYPE, TABLET]],
16837
+ [
16838
+ /(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,
16839
+ /\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,
16840
+ /\blg-?([\d\w]+) bui/i
16841
+ ],
16842
+ [MODEL, [VENDOR, LG], [TYPE, MOBILE]],
16843
+ [
16844
+ // Nokia
16845
+ /(nokia) (t[12][01])/i
16846
+ ],
16847
+ [VENDOR, MODEL, [TYPE, TABLET]],
16848
+ [
16849
+ /(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,
16850
+ /nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i
16851
+ ],
16852
+ [[MODEL, /_/g, " "], [TYPE, MOBILE], [VENDOR, "Nokia"]],
16853
+ [
16854
+ // Google
16855
+ /(pixel (c|tablet))\b/i
16856
+ // Google Pixel C/Tablet
16857
+ ],
16858
+ [MODEL, [VENDOR, GOOGLE], [TYPE, TABLET]],
16859
+ [
16860
+ // Google Pixel
16861
+ /droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i
16862
+ ],
16863
+ [MODEL, [VENDOR, GOOGLE], [TYPE, MOBILE]],
16864
+ [
16865
+ /(google) (pixelbook( go)?)/i
16866
+ ],
16867
+ [VENDOR, MODEL],
16868
+ [
16869
+ // Sony
16870
+ /droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i
16871
+ ],
16872
+ [MODEL, [VENDOR, SONY], [TYPE, MOBILE]],
16873
+ [
16874
+ /sony tablet [ps]/i,
16875
+ /\b(?:sony)?sgp\w+(?: bui|\))/i
16876
+ ],
16877
+ [[MODEL, "Xperia Tablet"], [VENDOR, SONY], [TYPE, TABLET]],
16878
+ [
16879
+ // Amazon
16880
+ /(alexa)webm/i,
16881
+ /(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,
16882
+ // Kindle Fire without Silk / Echo Show
16883
+ /(kf[a-z]+)( bui|\)).+silk\//i
16884
+ // Kindle Fire HD
16885
+ ],
16886
+ [MODEL, [VENDOR, AMAZON], [TYPE, TABLET]],
16887
+ [
16888
+ /((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i
16889
+ // Fire Phone
16890
+ ],
16891
+ [[MODEL, /(.+)/g, "Fire Phone $1"], [VENDOR, AMAZON], [TYPE, MOBILE]],
16892
+ [
16893
+ // BlackBerry
16894
+ /(playbook);[-\w\),; ]+(rim)/i
16895
+ // BlackBerry PlayBook
16896
+ ],
16897
+ [MODEL, VENDOR, [TYPE, TABLET]],
16898
+ [
16899
+ /\b((?:bb[a-f]|st[hv])100-\d)/i,
16900
+ /(?:blackberry|\(bb10;) (\w+)/i
16901
+ ],
16902
+ [MODEL, [VENDOR, BLACKBERRY], [TYPE, MOBILE]],
16903
+ [
16904
+ // Asus
16905
+ /(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i
16906
+ ],
16907
+ [MODEL, [VENDOR, ASUS], [TYPE, TABLET]],
16908
+ [
16909
+ / (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i
16910
+ ],
16911
+ [MODEL, [VENDOR, ASUS], [TYPE, MOBILE]],
16912
+ [
16913
+ // HTC
16914
+ /(nexus 9)/i
16915
+ // HTC Nexus 9
16916
+ ],
16917
+ [MODEL, [VENDOR, "HTC"], [TYPE, TABLET]],
16918
+ [
16919
+ /(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,
16920
+ // HTC
16921
+ // ZTE
16922
+ /(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,
16923
+ /(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i
16924
+ // Alcatel/GeeksPhone/Nexian/Panasonic/Sony
16925
+ ],
16926
+ [VENDOR, [MODEL, /_/g, " "], [TYPE, MOBILE]],
16927
+ [
16928
+ // TCL
16929
+ /tcl (xess p17aa)/i,
16930
+ /droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i
16931
+ ],
16932
+ [MODEL, [VENDOR, "TCL"], [TYPE, TABLET]],
16933
+ [
16934
+ /droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i
16935
+ ],
16936
+ [MODEL, [VENDOR, "TCL"], [TYPE, MOBILE]],
16937
+ [
16938
+ // itel
16939
+ /(itel) ((\w+))/i
16940
+ ],
16941
+ [[VENDOR, lowerize], MODEL, [TYPE, strMapper, { "tablet": ["p10001l", "w7001"], "*": "mobile" }]],
16942
+ [
16943
+ // Acer
16944
+ /droid.+; ([ab][1-7]-?[0178a]\d\d?)/i
16945
+ ],
16946
+ [MODEL, [VENDOR, "Acer"], [TYPE, TABLET]],
16947
+ [
16948
+ // Meizu
16949
+ /droid.+; (m[1-5] note) bui/i,
16950
+ /\bmz-([-\w]{2,})/i
16951
+ ],
16952
+ [MODEL, [VENDOR, "Meizu"], [TYPE, MOBILE]],
16953
+ [
16954
+ // Ulefone
16955
+ /; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i
16956
+ ],
16957
+ [MODEL, [VENDOR, "Ulefone"], [TYPE, MOBILE]],
16958
+ [
16959
+ // Energizer
16960
+ /; (energy ?\w+)(?: bui|\))/i,
16961
+ /; energizer ([\w ]+)(?: bui|\))/i
16962
+ ],
16963
+ [MODEL, [VENDOR, "Energizer"], [TYPE, MOBILE]],
16964
+ [
16965
+ // Cat
16966
+ /; cat (b35);/i,
16967
+ /; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i
16968
+ ],
16969
+ [MODEL, [VENDOR, "Cat"], [TYPE, MOBILE]],
16970
+ [
16971
+ // Smartfren
16972
+ /((?:new )?andromax[\w- ]+)(?: bui|\))/i
16973
+ ],
16974
+ [MODEL, [VENDOR, "Smartfren"], [TYPE, MOBILE]],
16975
+ [
16976
+ // Nothing
16977
+ /droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i
16978
+ ],
16979
+ [MODEL, [VENDOR, "Nothing"], [TYPE, MOBILE]],
16980
+ [
16981
+ // Archos
16982
+ /; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,
16983
+ /archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i
16984
+ ],
16985
+ [MODEL, [VENDOR, "Archos"], [TYPE, TABLET]],
16986
+ [
16987
+ /archos ([\w ]+)( b|\))/i,
16988
+ /; (ac[3-6]\d\w{2,8})( b|\))/i
16989
+ ],
16990
+ [MODEL, [VENDOR, "Archos"], [TYPE, MOBILE]],
16991
+ [
16992
+ // HMD
16993
+ /; (n159v)/i
16994
+ ],
16995
+ [MODEL, [VENDOR, "HMD"], [TYPE, MOBILE]],
16996
+ [
16997
+ // MIXED
16998
+ /(imo) (tab \w+)/i,
16999
+ // IMO
17000
+ /(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i
17001
+ // Infinix XPad / Tecno
17002
+ ],
17003
+ [VENDOR, MODEL, [TYPE, TABLET]],
17004
+ [
17005
+ /(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,
17006
+ // BlackBerry/BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron/Tecno/Micromax/Advan
17007
+ // BLU/HMD/IMO/Infinix/Lava/OnePlus/TCL/Wiko
17008
+ /; (blu|hmd|imo|infinix|lava|oneplus|tcl|wiko)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,
17009
+ /(hp) ([\w ]+\w)/i,
17010
+ // HP iPAQ
17011
+ /(microsoft); (lumia[\w ]+)/i,
17012
+ // Microsoft Lumia
17013
+ /(oppo) ?([\w ]+) bui/i,
17014
+ // OPPO
17015
+ /(hisense) ([ehv][\w ]+)\)/i,
17016
+ // Hisense
17017
+ /droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i
17018
+ // Philips
17019
+ ],
17020
+ [VENDOR, MODEL, [TYPE, MOBILE]],
17021
+ [
17022
+ /(kobo)\s(ereader|touch)/i,
17023
+ // Kobo
17024
+ /(hp).+(touchpad(?!.+tablet)|tablet)/i,
17025
+ // HP TouchPad
17026
+ /(kindle)\/([\w\.]+)/i
17027
+ // Kindle
17028
+ ],
17029
+ [VENDOR, MODEL, [TYPE, TABLET]],
17030
+ [
17031
+ /(surface duo)/i
17032
+ // Surface Duo
17033
+ ],
17034
+ [MODEL, [VENDOR, MICROSOFT], [TYPE, TABLET]],
17035
+ [
17036
+ /droid [\d\.]+; (fp\du?)(?: b|\))/i
17037
+ // Fairphone
17038
+ ],
17039
+ [MODEL, [VENDOR, "Fairphone"], [TYPE, MOBILE]],
17040
+ [
17041
+ /((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i
17042
+ // Nvidia Tablets
17043
+ ],
17044
+ [MODEL, [VENDOR, NVIDIA], [TYPE, TABLET]],
17045
+ [
17046
+ /(sprint) (\w+)/i
17047
+ // Sprint Phones
17048
+ ],
17049
+ [VENDOR, MODEL, [TYPE, MOBILE]],
17050
+ [
17051
+ /(kin\.[onetw]{3})/i
17052
+ // Microsoft Kin
17053
+ ],
17054
+ [[MODEL, /\./g, " "], [VENDOR, MICROSOFT], [TYPE, MOBILE]],
17055
+ [
17056
+ /droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i
17057
+ // Zebra
17058
+ ],
17059
+ [MODEL, [VENDOR, ZEBRA], [TYPE, TABLET]],
17060
+ [
17061
+ /droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i
17062
+ ],
17063
+ [MODEL, [VENDOR, ZEBRA], [TYPE, MOBILE]],
17064
+ [
17065
+ ///////////////////
17066
+ // SMARTTVS
17067
+ ///////////////////
17068
+ /(philips)[\w ]+tv/i,
17069
+ // Philips
17070
+ /smart-tv.+(samsung)/i
17071
+ // Samsung
17072
+ ],
17073
+ [VENDOR, [TYPE, SMARTTV]],
17074
+ [
17075
+ /hbbtv.+maple;(\d+)/i
17076
+ ],
17077
+ [[MODEL, /^/, "SmartTV"], [VENDOR, SAMSUNG], [TYPE, SMARTTV]],
17078
+ [
17079
+ /(vizio)(?: |.+model\/)(\w+-\w+)/i,
17080
+ // Vizio
17081
+ /tcast.+(lg)e?. ([-\w]+)/i
17082
+ // LG SmartTV
17083
+ ],
17084
+ [VENDOR, MODEL, [TYPE, SMARTTV]],
17085
+ [
17086
+ /(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i
17087
+ ],
17088
+ [[VENDOR, LG], [TYPE, SMARTTV]],
17089
+ [
17090
+ /(apple) ?tv/i
17091
+ // Apple TV
17092
+ ],
17093
+ [VENDOR, [MODEL, APPLE + " TV"], [TYPE, SMARTTV]],
17094
+ [
17095
+ /crkey.*devicetype\/chromecast/i
17096
+ // Google Chromecast Third Generation
17097
+ ],
17098
+ [[MODEL, CHROMECAST + " Third Generation"], [VENDOR, GOOGLE], [TYPE, SMARTTV]],
17099
+ [
17100
+ /crkey.*devicetype\/([^/]*)/i
17101
+ // Google Chromecast with specific device type
17102
+ ],
17103
+ [[MODEL, /^/, "Chromecast "], [VENDOR, GOOGLE], [TYPE, SMARTTV]],
17104
+ [
17105
+ /fuchsia.*crkey/i
17106
+ // Google Chromecast Nest Hub
17107
+ ],
17108
+ [[MODEL, CHROMECAST + " Nest Hub"], [VENDOR, GOOGLE], [TYPE, SMARTTV]],
17109
+ [
17110
+ /crkey/i
17111
+ // Google Chromecast, Linux-based or unknown
17112
+ ],
17113
+ [[MODEL, CHROMECAST], [VENDOR, GOOGLE], [TYPE, SMARTTV]],
17114
+ [
17115
+ /(portaltv)/i
17116
+ // Facebook Portal TV
17117
+ ],
17118
+ [MODEL, [VENDOR, FACEBOOK], [TYPE, SMARTTV]],
17119
+ [
17120
+ /droid.+aft(\w+)( bui|\))/i
17121
+ // Fire TV
17122
+ ],
17123
+ [MODEL, [VENDOR, AMAZON], [TYPE, SMARTTV]],
17124
+ [
17125
+ /(shield \w+ tv)/i
17126
+ // Nvidia Shield TV
17127
+ ],
17128
+ [MODEL, [VENDOR, NVIDIA], [TYPE, SMARTTV]],
17129
+ [
17130
+ /\(dtv[\);].+(aquos)/i,
17131
+ /(aquos-tv[\w ]+)\)/i
17132
+ // Sharp
17133
+ ],
17134
+ [MODEL, [VENDOR, SHARP], [TYPE, SMARTTV]],
17135
+ [
17136
+ /(bravia[\w ]+)( bui|\))/i
17137
+ // Sony
17138
+ ],
17139
+ [MODEL, [VENDOR, SONY], [TYPE, SMARTTV]],
17140
+ [
17141
+ /(mi(tv|box)-?\w+) bui/i
17142
+ // Xiaomi
17143
+ ],
17144
+ [MODEL, [VENDOR, XIAOMI], [TYPE, SMARTTV]],
17145
+ [
17146
+ /Hbbtv.*(technisat) (.*);/i
17147
+ // TechniSAT
17148
+ ],
17149
+ [VENDOR, MODEL, [TYPE, SMARTTV]],
17150
+ [
17151
+ /\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,
17152
+ // Roku
17153
+ /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i
17154
+ // HbbTV devices
17155
+ ],
17156
+ [[VENDOR, /.+\/(\w+)/, "$1", strMapper, { "LG": "lge" }], [MODEL, trim], [TYPE, SMARTTV]],
17157
+ [
17158
+ ///////////////////
17159
+ // CONSOLES
17160
+ ///////////////////
17161
+ /(playstation \w+)/i
17162
+ // Playstation
17163
+ ],
17164
+ [MODEL, [VENDOR, SONY], [TYPE, CONSOLE]],
17165
+ [
17166
+ /\b(xbox(?: one)?(?!; xbox))[\); ]/i
17167
+ // Microsoft Xbox
17168
+ ],
17169
+ [MODEL, [VENDOR, MICROSOFT], [TYPE, CONSOLE]],
17170
+ [
17171
+ /(ouya)/i,
17172
+ // Ouya
17173
+ /(nintendo) (\w+)/i,
17174
+ // Nintendo
17175
+ /(retroid) (pocket ([^\)]+))/i,
17176
+ // Retroid Pocket
17177
+ /(valve).+(steam deck)/i,
17178
+ /droid.+; ((shield|rgcube|gr0006))( bui|\))/i
17179
+ // Nvidia Portable/Anbernic/Logitech
17180
+ ],
17181
+ [[VENDOR, strMapper, { "Nvidia": "Shield", "Anbernic": "RGCUBE", "Logitech": "GR0006" }], MODEL, [TYPE, CONSOLE]],
17182
+ [
17183
+ ///////////////////
17184
+ // WEARABLES
17185
+ ///////////////////
17186
+ /\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i
17187
+ // Samsung Galaxy Watch
17188
+ ],
17189
+ [MODEL, [VENDOR, SAMSUNG], [TYPE, WEARABLE]],
17190
+ [
17191
+ /((pebble))app/i,
17192
+ // Pebble
17193
+ /(asus|google|lg|oppo|xiaomi) ((pixel |zen)?watch[\w ]*)( bui|\))/i
17194
+ // Asus ZenWatch / LG Watch / Pixel Watch / Xiaomi Watch
17195
+ ],
17196
+ [VENDOR, MODEL, [TYPE, WEARABLE]],
17197
+ [
17198
+ /(ow(?:19|20)?we?[1-3]{1,3})/i
17199
+ // Oppo Watch
17200
+ ],
17201
+ [MODEL, [VENDOR, OPPO], [TYPE, WEARABLE]],
17202
+ [
17203
+ /(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i
17204
+ // Apple Watch
17205
+ ],
17206
+ [MODEL, [VENDOR, APPLE], [TYPE, WEARABLE]],
17207
+ [
17208
+ /(opwwe\d{3})/i
17209
+ // OnePlus Watch
17210
+ ],
17211
+ [MODEL, [VENDOR, ONEPLUS], [TYPE, WEARABLE]],
17212
+ [
17213
+ /(moto 360)/i
17214
+ // Motorola 360
17215
+ ],
17216
+ [MODEL, [VENDOR, MOTOROLA], [TYPE, WEARABLE]],
17217
+ [
17218
+ /(smartwatch 3)/i
17219
+ // Sony SmartWatch
17220
+ ],
17221
+ [MODEL, [VENDOR, SONY], [TYPE, WEARABLE]],
17222
+ [
17223
+ /(g watch r)/i
17224
+ // LG G Watch R
17225
+ ],
17226
+ [MODEL, [VENDOR, LG], [TYPE, WEARABLE]],
17227
+ [
17228
+ /droid.+; (wt63?0{2,3})\)/i
17229
+ ],
17230
+ [MODEL, [VENDOR, ZEBRA], [TYPE, WEARABLE]],
17231
+ [
17232
+ ///////////////////
17233
+ // XR
17234
+ ///////////////////
17235
+ /droid.+; (glass) \d/i
17236
+ // Google Glass
17237
+ ],
17238
+ [MODEL, [VENDOR, GOOGLE], [TYPE, XR]],
17239
+ [
17240
+ /(pico) ([\w ]+) os\d/i
17241
+ // Pico
17242
+ ],
17243
+ [VENDOR, MODEL, [TYPE, XR]],
17244
+ [
17245
+ /(quest( \d| pro)?s?).+vr/i
17246
+ // Meta Quest
17247
+ ],
17248
+ [MODEL, [VENDOR, FACEBOOK], [TYPE, XR]],
17249
+ [
17250
+ /mobile vr; rv.+firefox/i
17251
+ // Unidentifiable VR device using Firefox Reality / Wolvic
17252
+ ],
17253
+ [[TYPE, XR]],
17254
+ [
17255
+ ///////////////////
17256
+ // EMBEDDED
17257
+ ///////////////////
17258
+ /(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i
17259
+ // Tesla
17260
+ ],
17261
+ [VENDOR, [TYPE, EMBEDDED]],
17262
+ [
17263
+ /(aeobc)\b/i
17264
+ // Echo Dot
17265
+ ],
17266
+ [MODEL, [VENDOR, AMAZON], [TYPE, EMBEDDED]],
17267
+ [
17268
+ /(homepod).+mac os/i
17269
+ // Apple HomePod
17270
+ ],
17271
+ [MODEL, [VENDOR, APPLE], [TYPE, EMBEDDED]],
17272
+ [
17273
+ /windows iot/i
17274
+ // Unidentifiable embedded device using Windows IoT
17275
+ ],
17276
+ [[TYPE, EMBEDDED]],
17277
+ [
17278
+ ////////////////////
17279
+ // MIXED (GENERIC)
17280
+ ///////////////////
17281
+ /droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i
17282
+ // Unidentifiable SmartTV
17283
+ ],
17284
+ [MODEL, [TYPE, SMARTTV]],
17285
+ [
17286
+ /\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i
17287
+ ],
17288
+ [[TYPE, SMARTTV]],
17289
+ [
17290
+ /droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i
17291
+ ],
17292
+ [MODEL, [TYPE, strMapper, { "mobile": "Mobile", "xr": "VR", "*": TABLET }]],
17293
+ [
17294
+ /\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i
17295
+ // Unidentifiable Tablet
17296
+ ],
17297
+ [[TYPE, TABLET]],
17298
+ [
17299
+ /(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i
17300
+ // Unidentifiable Mobile
17301
+ ],
17302
+ [[TYPE, MOBILE]],
17303
+ [
17304
+ /droid .+?; ([\w\. -]+)( bui|\))/i
17305
+ // Generic Android Device
17306
+ ],
17307
+ [MODEL, [VENDOR, "Generic"]]
17308
+ ],
17309
+ engine: [
17310
+ [
17311
+ /windows.+ edge\/([\w\.]+)/i
17312
+ // EdgeHTML
17313
+ ],
17314
+ [VERSION, [NAME, EDGE + "HTML"]],
17315
+ [
17316
+ /(arkweb)\/([\w\.]+)/i
17317
+ // ArkWeb
17318
+ ],
17319
+ [NAME, VERSION],
17320
+ [
17321
+ /webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i
17322
+ // Blink
17323
+ ],
17324
+ [VERSION, [NAME, "Blink"]],
17325
+ [
17326
+ /(presto)\/([\w\.]+)/i,
17327
+ // Presto
17328
+ /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,
17329
+ // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m/Goanna/Servo
17330
+ /ekioh(flow)\/([\w\.]+)/i,
17331
+ // Flow
17332
+ /(khtml|tasman|links|dillo)[\/ ]\(?([\w\.]+)/i,
17333
+ // KHTML/Tasman/Links/Dillo
17334
+ /(icab)[\/ ]([23]\.[\d\.]+)/i,
17335
+ // iCab
17336
+ /\b(libweb)/i
17337
+ // LibWeb
17338
+ ],
17339
+ [NAME, VERSION],
17340
+ [
17341
+ /ladybird\//i
17342
+ ],
17343
+ [[NAME, "LibWeb"]],
17344
+ [
17345
+ /rv\:([\w\.]{1,9})\b.+(gecko)/i
17346
+ // Gecko
17347
+ ],
17348
+ [VERSION, NAME]
17349
+ ],
17350
+ os: [
17351
+ [
17352
+ // Windows
17353
+ /(windows nt) (6\.[23]); arm/i
17354
+ // Windows RT
17355
+ ],
17356
+ [[NAME, /N/, "R"], [VERSION, strMapper, windowsVersionMap]],
17357
+ [
17358
+ /(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,
17359
+ // Windows IoT/Mobile/Phone
17360
+ // Windows NT/3.1/95/98/ME/2000/XP/Vista/7/8/8.1/10/11
17361
+ /(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i
17362
+ ],
17363
+ [NAME, VERSION],
17364
+ [
17365
+ /windows nt ?([\d\.\)]*)(?!.+xbox)/i,
17366
+ /\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i
17367
+ ],
17368
+ [[VERSION, /(;|\))/g, "", strMapper, windowsVersionMap], [NAME, WINDOWS]],
17369
+ [
17370
+ /(windows ce)\/?([\d\.]*)/i
17371
+ // Windows CE
17372
+ ],
17373
+ [NAME, VERSION],
17374
+ [
17375
+ // iOS/macOS
17376
+ /[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,
17377
+ // iOS
17378
+ /(?:ios;fbsv|ios(?=.+ip(?:ad|hone)|.+apple ?tv)|ip(?:ad|hone)(?: |.+i(?:pad)?)os|apple ?tv.+ios)[\/ ]([\w\.]+)/i,
17379
+ /\btvos ?([\w\.]+)/i,
17380
+ /cfnetwork\/.+darwin/i
17381
+ ],
17382
+ [[VERSION, /_/g, "."], [NAME, "iOS"]],
17383
+ [
17384
+ /(mac os x) ?([\w\. ]*)/i,
17385
+ /(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i
17386
+ // Mac OS
17387
+ ],
17388
+ [[NAME, "macOS"], [VERSION, /_/g, "."]],
17389
+ [
17390
+ // Google Chromecast
17391
+ /android ([\d\.]+).*crkey/i
17392
+ // Google Chromecast, Android-based
17393
+ ],
17394
+ [VERSION, [NAME, CHROMECAST + " Android"]],
17395
+ [
17396
+ /fuchsia.*crkey\/([\d\.]+)/i
17397
+ // Google Chromecast, Fuchsia-based
17398
+ ],
17399
+ [VERSION, [NAME, CHROMECAST + " Fuchsia"]],
17400
+ [
17401
+ /crkey\/([\d\.]+).*devicetype\/smartspeaker/i
17402
+ // Google Chromecast, Linux-based Smart Speaker
17403
+ ],
17404
+ [VERSION, [NAME, CHROMECAST + " SmartSpeaker"]],
17405
+ [
17406
+ /linux.*crkey\/([\d\.]+)/i
17407
+ // Google Chromecast, Legacy Linux-based
17408
+ ],
17409
+ [VERSION, [NAME, CHROMECAST + " Linux"]],
17410
+ [
17411
+ /crkey\/([\d\.]+)/i
17412
+ // Google Chromecast, unknown
17413
+ ],
17414
+ [VERSION, [NAME, CHROMECAST]],
17415
+ [
17416
+ // Mobile OSes
17417
+ /droid ([\w\.]+)\b.+(android[- ]x86)/i
17418
+ // Android-x86
17419
+ ],
17420
+ [VERSION, NAME],
17421
+ [
17422
+ /(ubuntu) ([\w\.]+) like android/i
17423
+ // Ubuntu Touch
17424
+ ],
17425
+ [[NAME, /(.+)/, "$1 Touch"], VERSION],
17426
+ [
17427
+ /(harmonyos)[\/ ]?([\d\.]*)/i,
17428
+ // HarmonyOS
17429
+ // Android/Blackberry/WebOS/QNX/Bada/RIM/KaiOS/Maemo/MeeGo/S40/Sailfish OS/OpenHarmony/Tizen
17430
+ /(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i
17431
+ ],
17432
+ [NAME, VERSION],
17433
+ [
17434
+ /\(bb(10);/i
17435
+ // BlackBerry 10
17436
+ ],
17437
+ [VERSION, [NAME, BLACKBERRY]],
17438
+ [
17439
+ /(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i
17440
+ // Symbian
17441
+ ],
17442
+ [VERSION, [NAME, "Symbian"]],
17443
+ [
17444
+ /mozilla\/[\d\.]+ \((?:mobile[;\w ]*|tablet|tv|[^\)]*(?:viera|lg(?:l25|-d300)|alcatel ?o.+|y300-f1)); rv:([\w\.]+)\).+gecko\//i
17445
+ // Firefox OS
17446
+ ],
17447
+ [VERSION, [NAME, FIREFOX + " OS"]],
17448
+ [
17449
+ /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,
17450
+ // WebOS
17451
+ /webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i
17452
+ ],
17453
+ [VERSION, [NAME, "webOS"]],
17454
+ [
17455
+ /web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i
17456
+ // https://webostv.developer.lge.com/develop/specifications/web-api-and-web-engine
17457
+ ],
17458
+ [[VERSION, strMapper, { "25": "120", "24": "108", "23": "94", "22": "87", "6": "79", "5": "68", "4": "53", "3": "38", "2": "538", "1": "537", "*": "TV" }], [NAME, "webOS"]],
17459
+ [
17460
+ /watch(?: ?os[,\/ ]|\d,\d\/)([\d\.]+)/i
17461
+ // watchOS
17462
+ ],
17463
+ [VERSION, [NAME, "watchOS"]],
17464
+ [
17465
+ // Google ChromeOS
17466
+ /cros [\w]+(?:\)| ([\w\.]+)\b)/i
17467
+ // Chromium OS
17468
+ ],
17469
+ [VERSION, [NAME, "Chrome OS"]],
17470
+ [
17471
+ // Smart TVs
17472
+ /kepler ([\w\.]+); (aft|aeo)/i
17473
+ // Vega OS
17474
+ ],
17475
+ [VERSION, [NAME, "Vega OS"]],
17476
+ [
17477
+ /(netrange)mmh/i,
17478
+ // Netrange
17479
+ /(nettv)\/(\d+\.[\w\.]+)/i,
17480
+ // NetTV
17481
+ // Console
17482
+ /(nintendo|playstation) (\w+)/i,
17483
+ // Nintendo/Playstation
17484
+ /(xbox); +xbox ([^\);]+)/i,
17485
+ // Microsoft Xbox (360, One, X, S, Series X, Series S)
17486
+ /(pico) .+os([\w\.]+)/i,
17487
+ // Pico
17488
+ // Other
17489
+ /\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,
17490
+ // Joli/Palm
17491
+ /linux.+(mint)[\/\(\) ]?([\w\.]*)/i,
17492
+ // Mint
17493
+ /(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,
17494
+ // Mageia/VectorLinux/Fuchsia/ArcaOS/Arch
17495
+ /([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,
17496
+ // Ubuntu/Debian/SUSE/Gentoo/Slackware/Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus/Raspbian/Plan9/Minix/RISCOS/Contiki/Deepin/Manjaro/elementary/Sabayon/Linspire/Knoppix
17497
+ /((?:open)?solaris)[-\/ ]?([\w\.]*)/i,
17498
+ // Solaris
17499
+ /\b(aix)[; ]([1-9\.]{0,4})/i,
17500
+ // AIX
17501
+ /(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,
17502
+ // Hurd/Linux/MorphOS
17503
+ /(gnu) ?([\w\.]*)/i,
17504
+ // GNU
17505
+ /\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,
17506
+ // FreeBSD/NetBSD/OpenBSD/PC-BSD/GhostBSD/DragonFly
17507
+ /(haiku) ?(r\d)?/i
17508
+ // Haiku
17509
+ ],
17510
+ [NAME, VERSION],
17511
+ [
17512
+ /(sunos) ?([\d\.]*)/i
17513
+ // Solaris
17514
+ ],
17515
+ [[NAME, "Solaris"], VERSION],
17516
+ [
17517
+ /\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,
17518
+ // BeOS/OS2/AmigaOS/OpenVMS/HP-UX/SerenityOS
17519
+ /(unix) ?([\w\.]*)/i
17520
+ // UNIX
17521
+ ],
17522
+ [NAME, VERSION]
17523
+ ]
17524
+ };
17525
+ var defaultProps = (function() {
17526
+ var props = { init: {}, isIgnore: {}, isIgnoreRgx: {}, toString: {} };
17527
+ setProps.call(props.init, [
17528
+ [BROWSER, [NAME, VERSION, MAJOR, TYPE]],
17529
+ [CPU, [ARCHITECTURE]],
17530
+ [DEVICE, [TYPE, MODEL, VENDOR]],
17531
+ [ENGINE, [NAME, VERSION]],
17532
+ [OS, [NAME, VERSION]]
17533
+ ]);
17534
+ setProps.call(props.isIgnore, [
17535
+ [BROWSER, [VERSION, MAJOR]],
17536
+ [ENGINE, [VERSION]],
17537
+ [OS, [VERSION]]
17538
+ ]);
17539
+ setProps.call(props.isIgnoreRgx, [
17540
+ [BROWSER, / ?browser$/i],
17541
+ [OS, / ?os$/i]
17542
+ ]);
17543
+ setProps.call(props.toString, [
17544
+ [BROWSER, [NAME, VERSION]],
17545
+ [CPU, [ARCHITECTURE]],
17546
+ [DEVICE, [VENDOR, MODEL]],
17547
+ [ENGINE, [NAME, VERSION]],
17548
+ [OS, [NAME, VERSION]]
17549
+ ]);
17550
+ return props;
17551
+ })();
17552
+ var createIData = function(item, itemType) {
17553
+ var init_props = defaultProps.init[itemType], is_ignoreProps = defaultProps.isIgnore[itemType] || 0, is_ignoreRgx = defaultProps.isIgnoreRgx[itemType] || 0, toString_props = defaultProps.toString[itemType] || 0;
17554
+ function IData() {
17555
+ setProps.call(this, init_props);
17556
+ }
17557
+ IData.prototype.getItem = function() {
17558
+ return item;
17559
+ };
17560
+ IData.prototype.withClientHints = function() {
17561
+ if (!NAVIGATOR_UADATA) {
17562
+ return item.parseCH().get();
17563
+ }
17564
+ return NAVIGATOR_UADATA.getHighEntropyValues(CH_ALL_VALUES).then(function(res) {
17565
+ return item.setCH(new UACHData(res, false)).parseCH().get();
17566
+ });
17567
+ };
17568
+ IData.prototype.withFeatureCheck = function() {
17569
+ return item.detectFeature().get();
17570
+ };
17571
+ if (itemType != RESULT) {
17572
+ IData.prototype.is = function(strToCheck) {
17573
+ var is = false;
17574
+ for (var i2 in this) {
17575
+ if (this.hasOwnProperty(i2) && !has(is_ignoreProps, i2) && lowerize(is_ignoreRgx ? strip(is_ignoreRgx, this[i2]) : this[i2]) == lowerize(is_ignoreRgx ? strip(is_ignoreRgx, strToCheck) : strToCheck)) {
17576
+ is = true;
17577
+ if (strToCheck != TYPEOF.UNDEFINED) break;
17578
+ } else if (strToCheck == TYPEOF.UNDEFINED && is) {
17579
+ is = !is;
17580
+ break;
17581
+ }
17582
+ }
17583
+ return is;
17584
+ };
17585
+ IData.prototype.toString = function() {
17586
+ var str = EMPTY;
17587
+ for (var i2 in toString_props) {
17588
+ if (typeof this[toString_props[i2]] !== TYPEOF.UNDEFINED) {
17589
+ str += (str ? " " : EMPTY) + this[toString_props[i2]];
17590
+ }
17591
+ }
17592
+ return str || TYPEOF.UNDEFINED;
17593
+ };
17594
+ }
17595
+ IData.prototype.then = function(cb2) {
17596
+ var that = this;
17597
+ var IDataResolve = function() {
17598
+ for (var prop in that) {
17599
+ if (that.hasOwnProperty(prop)) {
17600
+ this[prop] = that[prop];
17601
+ }
17602
+ }
17603
+ };
17604
+ IDataResolve.prototype = {
17605
+ is: IData.prototype.is,
17606
+ toString: IData.prototype.toString,
17607
+ withClientHints: IData.prototype.withClientHints,
17608
+ withFeatureCheck: IData.prototype.withFeatureCheck
17609
+ };
17610
+ var resolveData = new IDataResolve();
17611
+ cb2(resolveData);
17612
+ return resolveData;
17613
+ };
17614
+ return new IData();
17615
+ };
17616
+ function UACHData(uach, isHttpUACH) {
17617
+ uach = uach || {};
17618
+ setProps.call(this, CH_ALL_VALUES);
17619
+ if (isHttpUACH) {
17620
+ setProps.call(this, [
17621
+ [BRANDS, itemListToArray(uach[CH])],
17622
+ [FULLVERLIST, itemListToArray(uach[CH_FULL_VER_LIST])],
17623
+ [MOBILE, /\?1/.test(uach[CH_MOBILE])],
17624
+ [MODEL, stripQuotes(uach[CH_MODEL])],
17625
+ [PLATFORM, stripQuotes(uach[CH_PLATFORM])],
17626
+ [PLATFORMVER, stripQuotes(uach[CH_PLATFORM_VER])],
17627
+ [ARCHITECTURE, stripQuotes(uach[CH_ARCH])],
17628
+ [FORMFACTORS, itemListToArray(uach[CH_FORM_FACTORS])],
17629
+ [BITNESS, stripQuotes(uach[CH_BITNESS])]
17630
+ ]);
17631
+ } else {
17632
+ for (var prop in uach) {
17633
+ if (this.hasOwnProperty(prop) && typeof uach[prop] !== TYPEOF.UNDEFINED) this[prop] = uach[prop];
15891
17634
  }
15892
17635
  }
15893
- const queryString = queryParameters.toString();
15894
- return queryString ? `${basePath}?${queryString}` : basePath;
17636
+ }
17637
+ function UAItem(itemType, ua, rgxMap, uaCH) {
17638
+ setProps.call(this, [
17639
+ ["itemType", itemType],
17640
+ ["ua", ua],
17641
+ ["uaCH", uaCH],
17642
+ ["rgxMap", rgxMap],
17643
+ ["data", createIData(this, itemType)]
17644
+ ]);
17645
+ return this;
17646
+ }
17647
+ UAItem.prototype.get = function(prop) {
17648
+ if (!prop) return this.data;
17649
+ return this.data.hasOwnProperty(prop) ? this.data[prop] : void 0;
15895
17650
  };
15896
- var fetchLocalStackVersion = async (localstackEndpoint) => {
15897
- try {
15898
- const response = await fetch(`${localstackEndpoint}${LOCALSTACK_INFO_PATH}`);
15899
- if (!response.ok) return void 0;
15900
- const info = await response.json();
15901
- return info.version;
15902
- } catch {
15903
- return void 0;
17651
+ UAItem.prototype.set = function(prop, val) {
17652
+ this.data[prop] = val;
17653
+ return this;
17654
+ };
17655
+ UAItem.prototype.setCH = function(ch) {
17656
+ this.uaCH = ch;
17657
+ return this;
17658
+ };
17659
+ UAItem.prototype.detectFeature = function() {
17660
+ if (NAVIGATOR && NAVIGATOR.userAgent == this.ua) {
17661
+ switch (this.itemType) {
17662
+ case BROWSER:
17663
+ if (NAVIGATOR.brave && typeof NAVIGATOR.brave.isBrave == TYPEOF.FUNCTION) {
17664
+ this.set(NAME, "Brave");
17665
+ }
17666
+ break;
17667
+ case DEVICE:
17668
+ if (!this.get(TYPE) && NAVIGATOR_UADATA && NAVIGATOR_UADATA[MOBILE]) {
17669
+ this.set(TYPE, MOBILE);
17670
+ }
17671
+ if (this.get(MODEL) == "Macintosh" && NAVIGATOR && typeof NAVIGATOR.standalone !== TYPEOF.UNDEFINED && NAVIGATOR.maxTouchPoints && NAVIGATOR.maxTouchPoints > 2) {
17672
+ this.set(MODEL, "iPad").set(TYPE, TABLET);
17673
+ }
17674
+ break;
17675
+ case OS:
17676
+ if (!this.get(NAME) && NAVIGATOR_UADATA && NAVIGATOR_UADATA[PLATFORM]) {
17677
+ this.set(NAME, NAVIGATOR_UADATA[PLATFORM]);
17678
+ }
17679
+ break;
17680
+ case RESULT:
17681
+ var data = this.data;
17682
+ var detect = function(itemType) {
17683
+ return data[itemType].getItem().detectFeature().get();
17684
+ };
17685
+ this.set(BROWSER, detect(BROWSER)).set(CPU, detect(CPU)).set(DEVICE, detect(DEVICE)).set(ENGINE, detect(ENGINE)).set(OS, detect(OS));
17686
+ }
15904
17687
  }
17688
+ return this;
15905
17689
  };
15906
- var createApiClient = ({ localstackEndpoint }) => {
15907
- return {
15908
- deleteSpans: async (_request) => {
15909
- return makeRequest({
15910
- endpoint: API_ENDPOINTS.SPANS,
15911
- localstackEndpoint,
15912
- request: {
15913
- method: "DELETE"
17690
+ UAItem.prototype.parseUA = function() {
17691
+ if (this.itemType != RESULT) {
17692
+ rgxMapper.call(this.data, this.ua, this.rgxMap);
17693
+ }
17694
+ switch (this.itemType) {
17695
+ case BROWSER:
17696
+ this.set(MAJOR, majorize(this.get(VERSION)));
17697
+ break;
17698
+ case OS:
17699
+ if (this.get(NAME) == "iOS" && this.get(VERSION) == "18.6") {
17700
+ var realVersion = /\) Version\/([\d\.]+)/.exec(this.ua);
17701
+ if (realVersion && parseInt(realVersion[1].substring(0, 2), 10) >= 26) {
17702
+ this.set(VERSION, realVersion[1]);
15914
17703
  }
15915
- });
15916
- },
15917
- getEvents: async (request) => {
15918
- const endpoint = buildEventsEndpoint(request);
15919
- return makeRequest({ endpoint, localstackEndpoint });
15920
- },
15921
- getIamEvents: async (request) => {
15922
- const iamEventsRequest = {
15923
- ...request,
15924
- event_type: "iam.policy_evaluation"
15925
- };
15926
- const endpoint = buildEventsEndpoint(iamEventsRequest);
15927
- return makeRequest({ endpoint, localstackEndpoint });
15928
- },
15929
- getSpans: async (request) => {
15930
- const endpoint = buildSpansEndpoint(request);
15931
- const response = await makeRequest({ endpoint, localstackEndpoint });
15932
- return {
15933
- ...response,
15934
- spans: response.spans.map((span) => ({
15935
- ...span,
15936
- endTime: unixNanoToDate(span.end_time_unix_nano),
15937
- startTime: unixNanoToDate(span.start_time_unix_nano)
15938
- }))
15939
- };
15940
- },
15941
- getStatus: async () => {
15942
- let headerVersion;
15943
- const [statusResult, infoVersion] = await Promise.allSettled([
15944
- makeRequest({
15945
- captureHeaders: (headers) => {
15946
- headerVersion = headers.get("x-localstack") ?? void 0;
15947
- },
15948
- endpoint: API_ENDPOINTS.STATUS,
15949
- localstackEndpoint
15950
- }),
15951
- fetchLocalStackVersion(localstackEndpoint)
15952
- ]);
15953
- if (statusResult.status === "rejected") {
15954
- const reason = statusResult.reason;
15955
- if (reason instanceof AppInspectorNotFoundError) {
15956
- reason.localstackVersion = infoVersion.status === "fulfilled" ? infoVersion.value : void 0;
17704
+ }
17705
+ break;
17706
+ }
17707
+ return this;
17708
+ };
17709
+ UAItem.prototype.parseCH = function() {
17710
+ var uaCH = this.uaCH, rgxMap = this.rgxMap;
17711
+ switch (this.itemType) {
17712
+ case BROWSER:
17713
+ case ENGINE:
17714
+ var brands = uaCH[FULLVERLIST] || uaCH[BRANDS], prevName;
17715
+ if (brands) {
17716
+ for (var i2 = 0; i2 < brands.length; i2++) {
17717
+ var brandName = brands[i2].brand || brands[i2], brandVersion = brands[i2].version;
17718
+ if (this.itemType == BROWSER && !/not.a.brand/i.test(brandName) && (!prevName || /Chrom/.test(prevName) && brandName != CHROMIUM || prevName == EDGE && /WebView2/.test(brandName))) {
17719
+ brandName = strMapper(brandName, browserHintsMap);
17720
+ prevName = this.get(NAME);
17721
+ if (!(prevName && !/Chrom/.test(prevName) && /Chrom/.test(brandName))) {
17722
+ this.set(NAME, brandName).set(VERSION, brandVersion).set(MAJOR, majorize(brandVersion));
17723
+ }
17724
+ prevName = brandName;
17725
+ }
17726
+ if (this.itemType == ENGINE && brandName == CHROMIUM) {
17727
+ this.set(VERSION, brandVersion);
17728
+ }
15957
17729
  }
15958
- throw reason instanceof Error ? reason : new Error("Unknown error occurred");
15959
17730
  }
15960
- const localstackVersion = headerVersion && import_semver2.default.coerce(headerVersion) ? headerVersion : infoVersion.status === "fulfilled" ? infoVersion.value : void 0;
15961
- return { ...statusResult.value, localstackVersion };
15962
- },
15963
- setStatus: async (request) => {
15964
- return makeRequest({
15965
- endpoint: API_ENDPOINTS.STATUS,
15966
- localstackEndpoint,
15967
- request: {
15968
- body: JSON.stringify(request),
15969
- method: "PUT"
17731
+ break;
17732
+ case CPU:
17733
+ var archName = uaCH[ARCHITECTURE];
17734
+ if (archName) {
17735
+ if (archName && uaCH[BITNESS] == "64") archName += "64";
17736
+ rgxMapper.call(this.data, archName + ";", rgxMap);
17737
+ }
17738
+ break;
17739
+ case DEVICE:
17740
+ if (uaCH[MOBILE]) {
17741
+ this.set(TYPE, MOBILE);
17742
+ }
17743
+ if (uaCH[MODEL]) {
17744
+ this.set(MODEL, uaCH[MODEL]);
17745
+ if (!this.get(TYPE) || !this.get(VENDOR)) {
17746
+ var reParse = {};
17747
+ rgxMapper.call(reParse, "droid 9; " + uaCH[MODEL] + ")", rgxMap);
17748
+ if (!this.get(TYPE) && !!reParse.type) {
17749
+ this.set(TYPE, reParse.type);
17750
+ }
17751
+ if (!this.get(VENDOR) && !!reParse.vendor) {
17752
+ this.set(VENDOR, reParse.vendor);
17753
+ }
17754
+ }
17755
+ }
17756
+ if (uaCH[FORMFACTORS]) {
17757
+ var ff;
17758
+ if (typeof uaCH[FORMFACTORS] !== "string") {
17759
+ var idx = 0;
17760
+ while (!ff && idx < uaCH[FORMFACTORS].length) {
17761
+ ff = strMapper(uaCH[FORMFACTORS][idx++], formFactorsMap);
17762
+ }
17763
+ } else {
17764
+ ff = strMapper(uaCH[FORMFACTORS], formFactorsMap);
15970
17765
  }
17766
+ this.set(TYPE, ff);
17767
+ }
17768
+ break;
17769
+ case OS:
17770
+ var osName = uaCH[PLATFORM];
17771
+ if (osName) {
17772
+ var osVersion = uaCH[PLATFORMVER];
17773
+ if (osName == WINDOWS) osVersion = parseInt(majorize(osVersion), 10) >= 13 ? "11" : "10";
17774
+ this.set(NAME, osName).set(VERSION, osVersion);
17775
+ }
17776
+ if (this.get(NAME) == WINDOWS && uaCH[MODEL] == "Xbox") {
17777
+ this.set(NAME, "Xbox").set(VERSION, void 0);
17778
+ }
17779
+ break;
17780
+ case RESULT:
17781
+ var data = this.data;
17782
+ var parse2 = function(itemType) {
17783
+ return data[itemType].getItem().setCH(uaCH).parseCH().get();
17784
+ };
17785
+ this.set(BROWSER, parse2(BROWSER)).set(CPU, parse2(CPU)).set(DEVICE, parse2(DEVICE)).set(ENGINE, parse2(ENGINE)).set(OS, parse2(OS));
17786
+ }
17787
+ return this;
17788
+ };
17789
+ function UAParser(ua, extensions, headers) {
17790
+ if (typeof ua === TYPEOF.OBJECT) {
17791
+ if (isExtensions(ua, true)) {
17792
+ if (typeof extensions === TYPEOF.OBJECT) {
17793
+ headers = extensions;
17794
+ }
17795
+ extensions = ua;
17796
+ } else {
17797
+ headers = ua;
17798
+ extensions = void 0;
17799
+ }
17800
+ ua = void 0;
17801
+ } else if (typeof ua === TYPEOF.STRING && !isExtensions(extensions, true)) {
17802
+ headers = extensions;
17803
+ extensions = void 0;
17804
+ }
17805
+ if (headers) {
17806
+ if (typeof headers.append === TYPEOF.FUNCTION) {
17807
+ var kv = {};
17808
+ headers.forEach(function(v2, k2) {
17809
+ kv[String(k2).toLowerCase()] = v2;
15971
17810
  });
17811
+ headers = kv;
17812
+ } else {
17813
+ var normalized = {};
17814
+ for (var header in headers) {
17815
+ if (headers.hasOwnProperty(header)) {
17816
+ normalized[String(header).toLowerCase()] = headers[header];
17817
+ }
17818
+ }
17819
+ headers = normalized;
17820
+ }
17821
+ }
17822
+ if (!(this instanceof UAParser)) {
17823
+ return new UAParser(ua, extensions, headers).getResult();
17824
+ }
17825
+ var userAgent = typeof ua === TYPEOF.STRING ? ua : (
17826
+ // Passed user-agent string
17827
+ headers && headers[USER_AGENT] ? headers[USER_AGENT] : (
17828
+ // User-Agent from passed headers
17829
+ NAVIGATOR && NAVIGATOR.userAgent ? NAVIGATOR.userAgent : (
17830
+ // navigator.userAgent
17831
+ EMPTY
17832
+ )
17833
+ )
17834
+ ), httpUACH = new UACHData(headers, true), regexMap = extensions ? extend(defaultRegexes, extensions) : defaultRegexes, createItemFunc = function(itemType) {
17835
+ if (itemType == RESULT) {
17836
+ return function() {
17837
+ return new UAItem(itemType, userAgent, regexMap, httpUACH).set("ua", userAgent).set(BROWSER, this.getBrowser()).set(CPU, this.getCPU()).set(DEVICE, this.getDevice()).set(ENGINE, this.getEngine()).set(OS, this.getOS()).get();
17838
+ };
17839
+ } else {
17840
+ return function() {
17841
+ return new UAItem(itemType, userAgent, regexMap[itemType], httpUACH).parseUA().get();
17842
+ };
15972
17843
  }
15973
17844
  };
17845
+ setProps.call(this, [
17846
+ ["getBrowser", createItemFunc(BROWSER)],
17847
+ ["getCPU", createItemFunc(CPU)],
17848
+ ["getDevice", createItemFunc(DEVICE)],
17849
+ ["getEngine", createItemFunc(ENGINE)],
17850
+ ["getOS", createItemFunc(OS)],
17851
+ ["getResult", createItemFunc(RESULT)],
17852
+ ["getUA", function() {
17853
+ return userAgent;
17854
+ }],
17855
+ ["setUA", function(ua2) {
17856
+ if (isString2(ua2)) userAgent = trim(ua2, UA_MAX_LENGTH);
17857
+ return this;
17858
+ }]
17859
+ ]).setUA(userAgent);
17860
+ return this;
17861
+ }
17862
+ UAParser.VERSION = LIBVERSION;
17863
+ UAParser.BROWSER = enumerize([NAME, VERSION, MAJOR, TYPE]);
17864
+ UAParser.CPU = enumerize([ARCHITECTURE]);
17865
+ UAParser.DEVICE = enumerize([MODEL, VENDOR, TYPE, CONSOLE, MOBILE, SMARTTV, TABLET, WEARABLE, EMBEDDED]);
17866
+ UAParser.ENGINE = UAParser.OS = enumerize([NAME, VERSION]);
17867
+
17868
+ // src/utils/browser.ts
17869
+ var FALLBACK = { browser: "Other", browser_version: "unknown" };
17870
+ var detectBrowser = () => {
17871
+ if (typeof navigator === "undefined" || typeof navigator.userAgent !== "string") {
17872
+ return FALLBACK;
17873
+ }
17874
+ const { name, version } = new UAParser(navigator.userAgent).getBrowser();
17875
+ if (!name || !version) {
17876
+ return FALLBACK;
17877
+ }
17878
+ return { browser: name, browser_version: version };
17879
+ };
17880
+
17881
+ // src/hooks/use-appinspector-open-analytics.ts
17882
+ var buildPayload = (container) => {
17883
+ if (container.source === "vscode") {
17884
+ return {
17885
+ extension_version: container.extensionVersion,
17886
+ ide_version: container.ideVersion,
17887
+ source: "vscode"
17888
+ };
17889
+ }
17890
+ const { browser, browser_version } = detectBrowser();
17891
+ return { browser, browser_version, source: "web" };
17892
+ };
17893
+ var useAppInspectorOpenAnalytics = () => {
17894
+ const api = useAppInspectorApi();
17895
+ const { deploymentContainer } = useAppInspector();
17896
+ const { status, statusError } = useAppInspectorStatus();
17897
+ const firedRef = (0, import_react47.useRef)(false);
17898
+ (0, import_react47.useEffect)(() => {
17899
+ if (firedRef.current) {
17900
+ return;
17901
+ }
17902
+ if (statusError) {
17903
+ return;
17904
+ }
17905
+ if (status?.status !== "ENABLED") {
17906
+ return;
17907
+ }
17908
+ firedRef.current = true;
17909
+ api.postAnalytics({
17910
+ event: "appinspector_open",
17911
+ payload: buildPayload(deploymentContainer)
17912
+ }).catch(() => {
17913
+ });
17914
+ }, [api, deploymentContainer, status, statusError]);
15974
17915
  };
15975
17916
 
15976
17917
  // src/context.tsx
15977
- var import_jsx_runtime130 = require("react/jsx-runtime");
15978
- var AppInspectorContext = (0, import_react46.createContext)(void 0);
17918
+ var import_jsx_runtime131 = require("react/jsx-runtime");
17919
+ var AppInspectorContext = (0, import_react48.createContext)(void 0);
15979
17920
  var useAppInspector = () => {
15980
- const context = (0, import_react46.useContext)(AppInspectorContext);
17921
+ const context = (0, import_react48.useContext)(AppInspectorContext);
15981
17922
  if (!context) {
15982
17923
  throw new Error("@localstack-studio/ui: components must be used within a <AppInspectorContextProvider>");
15983
17924
  }
15984
17925
  return context;
15985
17926
  };
17927
+ var AppInspectorAnalyticsBoundary = ({ children }) => {
17928
+ useAppInspectorOpenAnalytics();
17929
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_jsx_runtime131.Fragment, { children });
17930
+ };
15986
17931
  var AppInspectorContextProvider = (props) => {
15987
- const api = (0, import_react47.useMemo)(
17932
+ const api = (0, import_react49.useMemo)(
15988
17933
  () => createApiClient({ localstackEndpoint: props.localstackEndpoint }),
15989
17934
  [props.localstackEndpoint]
15990
17935
  );
15991
- const resolveLink = (0, import_react47.useCallback)(
17936
+ const resolveLink = (0, import_react49.useCallback)(
15992
17937
  (options) => {
15993
17938
  if (options.to === "settings") {
15994
17939
  return `${props.routePrefix}/settings`;
@@ -16000,29 +17945,34 @@ var AppInspectorContextProvider = (props) => {
16000
17945
  },
16001
17946
  [props.routePrefix]
16002
17947
  );
16003
- const contextValue = (0, import_react47.useMemo)(
17948
+ const deploymentContainer = (0, import_react49.useMemo)(
17949
+ () => props.deploymentContainer ?? { source: "web" },
17950
+ [props.deploymentContainer]
17951
+ );
17952
+ const contextValue = (0, import_react49.useMemo)(
16004
17953
  () => ({
17954
+ deploymentContainer,
16005
17955
  linkComponent: props.linkComponent,
16006
17956
  localstackEndpoint: props.localstackEndpoint,
16007
17957
  resolveLink
16008
17958
  }),
16009
- [props.linkComponent, props.localstackEndpoint, resolveLink]
17959
+ [deploymentContainer, props.linkComponent, props.localstackEndpoint, resolveLink]
16010
17960
  );
16011
- return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(ApiProvider, { api, children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(AppInspectorContext.Provider, { value: contextValue, children: props.children }) });
17961
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(ApiProvider, { api, children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(StatusProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(AppInspectorContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(AppInspectorAnalyticsBoundary, { children: props.children }) }) }) });
16012
17962
  };
16013
17963
 
16014
17964
  // src/hooks/use-spans-ws.tsx
16015
17965
  function useSpansWebSocket(options) {
16016
17966
  const { onMessage } = options;
16017
- const onMessageRef = (0, import_react48.useRef)(onMessage);
16018
- (0, import_react48.useEffect)(() => {
17967
+ const onMessageRef = (0, import_react50.useRef)(onMessage);
17968
+ (0, import_react50.useEffect)(() => {
16019
17969
  onMessageRef.current = onMessage;
16020
17970
  }, [onMessage]);
16021
- const [connected, setConnected] = (0, import_react48.useState)(false);
16022
- const wsRef = (0, import_react48.useRef)(void 0);
16023
- const reconnectRef = (0, import_react48.useRef)(void 0);
17971
+ const [connected, setConnected] = (0, import_react50.useState)(false);
17972
+ const wsRef = (0, import_react50.useRef)(void 0);
17973
+ const reconnectRef = (0, import_react50.useRef)(void 0);
16024
17974
  const { localstackEndpoint } = useAppInspector();
16025
- const connect = (0, import_react48.useCallback)(() => {
17975
+ const connect = (0, import_react50.useCallback)(() => {
16026
17976
  if (wsRef.current !== void 0) return;
16027
17977
  const url = new URL(getAppInspectorApiUrl(localstackEndpoint, API_ENDPOINTS.WEBSOCKET_SPANS));
16028
17978
  url.protocol = globalThis.location.protocol === "https:" ? "wss" : "ws";
@@ -16048,7 +17998,7 @@ function useSpansWebSocket(options) {
16048
17998
  }
16049
17999
  });
16050
18000
  }, [localstackEndpoint]);
16051
- (0, import_react48.useEffect)(() => {
18001
+ (0, import_react50.useEffect)(() => {
16052
18002
  connect();
16053
18003
  return () => {
16054
18004
  if (reconnectRef.current !== void 0) clearTimeout(reconnectRef.current);
@@ -16065,17 +18015,17 @@ function useSpansWebSocket(options) {
16065
18015
  }
16066
18016
 
16067
18017
  // src/hooks/use-throttled-items.ts
16068
- var import_react49 = require("react");
18018
+ var import_react51 = require("react");
16069
18019
  function useThrottledItems(items, getId, catchUpIncrement = 10) {
16070
- const [displayedItems, setDisplayedItems] = (0, import_react49.useState)([]);
16071
- const [isCatchingUpForward, setIsCatchingUpForward] = (0, import_react49.useState)(false);
16072
- const [isCatchingUpBackward, setIsCatchingUpBackward] = (0, import_react49.useState)(false);
16073
- const targetRef = (0, import_react49.useRef)([]);
16074
- const rafRef = (0, import_react49.useRef)(void 0);
16075
- const leftHiddenRef = (0, import_react49.useRef)(0);
16076
- const rightHiddenRef = (0, import_react49.useRef)(0);
16077
- const shrinkRafPendingRef = (0, import_react49.useRef)(false);
16078
- (0, import_react49.useEffect)(() => {
18020
+ const [displayedItems, setDisplayedItems] = (0, import_react51.useState)([]);
18021
+ const [isCatchingUpForward, setIsCatchingUpForward] = (0, import_react51.useState)(false);
18022
+ const [isCatchingUpBackward, setIsCatchingUpBackward] = (0, import_react51.useState)(false);
18023
+ const targetRef = (0, import_react51.useRef)([]);
18024
+ const rafRef = (0, import_react51.useRef)(void 0);
18025
+ const leftHiddenRef = (0, import_react51.useRef)(0);
18026
+ const rightHiddenRef = (0, import_react51.useRef)(0);
18027
+ const shrinkRafPendingRef = (0, import_react51.useRef)(false);
18028
+ (0, import_react51.useEffect)(() => {
16079
18029
  const previousTarget = targetRef.current;
16080
18030
  const target = items ?? [];
16081
18031
  targetRef.current = target;
@@ -16146,7 +18096,7 @@ function useThrottledItems(items, getId, catchUpIncrement = 10) {
16146
18096
  });
16147
18097
  }
16148
18098
  }, [items, getId, catchUpIncrement]);
16149
- (0, import_react49.useEffect)(() => {
18099
+ (0, import_react51.useEffect)(() => {
16150
18100
  return () => {
16151
18101
  if (rafRef.current !== void 0) {
16152
18102
  cancelAnimationFrame(rafRef.current);
@@ -16161,12 +18111,12 @@ function useThrottledItems(items, getId, catchUpIncrement = 10) {
16161
18111
  var PAGE_SIZE = 30;
16162
18112
  var useSpans = () => {
16163
18113
  const api = useAppInspectorApi();
16164
- const [spans, setSpans] = (0, import_react50.useState)();
18114
+ const [spans, setSpans] = (0, import_react52.useState)();
16165
18115
  const throttledSpans = useThrottledItems(spans, (span) => span.span_id);
16166
- const [fetchError, setFetchError] = (0, import_react50.useState)();
16167
- const [fetchingForward, setFetchingForward] = (0, import_react50.useState)(false);
16168
- const [fetchingBackward, setFetchingBackward] = (0, import_react50.useState)(false);
16169
- const paginationBufferRef = (0, import_react50.useRef)(createPaginationBuffer({
18116
+ const [fetchError, setFetchError] = (0, import_react52.useState)();
18117
+ const [fetchingForward, setFetchingForward] = (0, import_react52.useState)(false);
18118
+ const [fetchingBackward, setFetchingBackward] = (0, import_react52.useState)(false);
18119
+ const paginationBufferRef = (0, import_react52.useRef)(createPaginationBuffer({
16170
18120
  async fetchPage(token) {
16171
18121
  const response = await api.getSpans({
16172
18122
  limit: PAGE_SIZE,
@@ -16193,9 +18143,9 @@ var useSpans = () => {
16193
18143
  onError: (error) => {
16194
18144
  setFetchError(error);
16195
18145
  },
16196
- onStatusChange(status2) {
16197
- setFetchingBackward(status2.fetchingBackward);
16198
- setFetchingForward(status2.fetchingForward);
18146
+ onStatusChange(status) {
18147
+ setFetchingBackward(status.fetchingBackward);
18148
+ setFetchingForward(status.fetchingForward);
16199
18149
  },
16200
18150
  // The spans endpoint is sorted by span ingestion time, which might differ from
16201
18151
  // the span timestamp. In order to accomodate for this, we will sort the spans
@@ -16204,24 +18154,23 @@ var useSpans = () => {
16204
18154
  return a3.start_time_unix_nano < b3.start_time_unix_nano ? -1 : 1;
16205
18155
  }
16206
18156
  }));
16207
- const [totalCount, setTotalCount] = (0, import_react50.useState)();
16208
- const [licenseLimit, setLicenseLimit] = (0, import_react50.useState)();
16209
- const [systemLimit, setSystemLimit] = (0, import_react50.useState)();
16210
- const [iamErrorCount, setIamErrorCount] = (0, import_react50.useState)();
16211
- const [hasMoreBackward, setHasMoreBackward] = (0, import_react50.useState)();
16212
- const [hasMoreForward, setHasMoreForward] = (0, import_react50.useState)();
16213
- const fetchForward = (0, import_react50.useCallback)(() => {
18157
+ const [totalCount, setTotalCount] = (0, import_react52.useState)();
18158
+ const [licenseLimit, setLicenseLimit] = (0, import_react52.useState)();
18159
+ const [systemLimit, setSystemLimit] = (0, import_react52.useState)();
18160
+ const [iamErrorCount, setIamErrorCount] = (0, import_react52.useState)();
18161
+ const [hasMoreBackward, setHasMoreBackward] = (0, import_react52.useState)();
18162
+ const [hasMoreForward, setHasMoreForward] = (0, import_react52.useState)();
18163
+ const fetchForward = (0, import_react52.useCallback)(() => {
16214
18164
  void paginationBufferRef.current.fetchForward();
16215
18165
  }, []);
16216
- const fetchBackward = (0, import_react50.useCallback)(() => {
18166
+ const fetchBackward = (0, import_react52.useCallback)(() => {
16217
18167
  void paginationBufferRef.current.fetchBackward();
16218
18168
  }, []);
16219
- (0, import_react50.useEffect)(() => {
18169
+ (0, import_react52.useEffect)(() => {
16220
18170
  fetchForward();
16221
18171
  }, [fetchForward]);
16222
- const { checking, checkStatus, error: statusError, status } = useStatus();
16223
- const [clearingSpans, setClearingSpans] = (0, import_react50.useState)(false);
16224
- const clearSpans = (0, import_react50.useCallback)(async () => {
18172
+ const [clearingSpans, setClearingSpans] = (0, import_react52.useState)(false);
18173
+ const clearSpans = (0, import_react52.useCallback)(async () => {
16225
18174
  if (clearingSpans) {
16226
18175
  return;
16227
18176
  }
@@ -16238,11 +18187,11 @@ var useSpans = () => {
16238
18187
  setClearingSpans(false);
16239
18188
  }
16240
18189
  }, [clearingSpans, api]);
16241
- const [streamPaused, setStreamPaused] = (0, import_react50.useState)(false);
16242
- const toggleStream = (0, import_react50.useCallback)(() => {
18190
+ const [streamPaused, setStreamPaused] = (0, import_react52.useState)(false);
18191
+ const toggleStream = (0, import_react52.useCallback)(() => {
16243
18192
  setStreamPaused((previous) => !previous);
16244
18193
  }, []);
16245
- (0, import_react50.useEffect)(() => {
18194
+ (0, import_react52.useEffect)(() => {
16246
18195
  if (hasMoreForward === true && !fetchingForward && !streamPaused) {
16247
18196
  void paginationBufferRef.current.fetchForward();
16248
18197
  }
@@ -16262,8 +18211,6 @@ var useSpans = () => {
16262
18211
  }
16263
18212
  });
16264
18213
  return {
16265
- checking,
16266
- checkStatus,
16267
18214
  clearingSpans,
16268
18215
  clearSpans,
16269
18216
  fetchBackward,
@@ -16276,8 +18223,6 @@ var useSpans = () => {
16276
18223
  iamErrorCount,
16277
18224
  licenseLimit,
16278
18225
  spans: throttledSpans.items,
16279
- status,
16280
- statusError,
16281
18226
  streamPaused,
16282
18227
  systemLimit,
16283
18228
  toggleStream,
@@ -16289,13 +18234,13 @@ var useSpans = () => {
16289
18234
  var import_icons_material12 = require("@mui/icons-material");
16290
18235
  var import_material22 = require("@mui/material");
16291
18236
  var import_styles = require("@mui/material/styles");
16292
- var import_react65 = require("@xyflow/react");
16293
- var import_react66 = require("react");
18237
+ var import_react67 = require("@xyflow/react");
18238
+ var import_react68 = require("react");
16294
18239
 
16295
18240
  // src/components/event-details/event-details.tsx
16296
18241
  var import_icons_material9 = require("@mui/icons-material");
16297
18242
  var import_material17 = require("@mui/material");
16298
- var import_react57 = require("react");
18243
+ var import_react59 = require("react");
16299
18244
 
16300
18245
  // src/utils/iam-utils.ts
16301
18246
  function determinePermissionStatus(payload) {
@@ -16494,28 +18439,28 @@ var getEventGroupsByType = (events) => {
16494
18439
  // src/components/event-details/event-detail.tsx
16495
18440
  var import_icons_material7 = require("@mui/icons-material");
16496
18441
  var import_material14 = require("@mui/material");
16497
- var import_react54 = require("react");
18442
+ var import_react56 = require("react");
16498
18443
 
16499
18444
  // src/components/status-icon.tsx
16500
18445
  var import_icons_material4 = require("@mui/icons-material");
16501
18446
  var import_material9 = require("@mui/material");
16502
- var import_jsx_runtime131 = require("react/jsx-runtime");
18447
+ var import_jsx_runtime132 = require("react/jsx-runtime");
16503
18448
  var StatusIcon = ({ errorLevel }) => {
16504
18449
  switch (errorLevel) {
16505
18450
  case EventLevel.LevelError: {
16506
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_icons_material4.Cancel, { sx: { color: "red" } });
18451
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_icons_material4.Cancel, { sx: { color: "red" } });
16507
18452
  }
16508
18453
  case EventLevel.LevelInfo: {
16509
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_icons_material4.Info, { sx: { color: "gray" } });
18454
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_icons_material4.Info, { sx: { color: "gray" } });
16510
18455
  }
16511
18456
  case EventLevel.LevelPermission: {
16512
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_icons_material4.RemoveCircle, { sx: { color: "blue" } });
18457
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_icons_material4.RemoveCircle, { sx: { color: "blue" } });
16513
18458
  }
16514
18459
  case EventLevel.LevelWarning: {
16515
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_icons_material4.Error, { sx: { color: "orange" } });
18460
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_icons_material4.Error, { sx: { color: "orange" } });
16516
18461
  }
16517
18462
  default: {
16518
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_icons_material4.CheckCircle, { sx: { color: "lightgray" } });
18463
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_icons_material4.CheckCircle, { sx: { color: "lightgray" } });
16519
18464
  }
16520
18465
  }
16521
18466
  };
@@ -16523,39 +18468,39 @@ var StatusIcon = ({ errorLevel }) => {
16523
18468
  // src/components/event-details/iam-event-detail.tsx
16524
18469
  var import_icons_material5 = require("@mui/icons-material");
16525
18470
  var import_material10 = require("@mui/material");
16526
- var import_jsx_runtime132 = require("react/jsx-runtime");
16527
- var DetailRow = ({ content, label }) => /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(import_material10.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr", mb: 0.5 }, children: [
16528
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material10.Typography, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: label }),
16529
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material10.Box, { children: typeof content === "string" ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material10.Typography, { sx: { color: "text.primary", wordBreak: "break-word" }, variant: "caption", children: content }) : content })
18471
+ var import_jsx_runtime133 = require("react/jsx-runtime");
18472
+ var DetailRow = ({ content, label }) => /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_material10.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr", mb: 0.5 }, children: [
18473
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material10.Typography, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: label }),
18474
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material10.Box, { children: typeof content === "string" ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material10.Typography, { sx: { color: "text.primary", wordBreak: "break-word" }, variant: "caption", children: content }) : content })
16530
18475
  ] });
16531
18476
  var PermissionIcon = ({ status }) => {
16532
18477
  switch (status) {
16533
18478
  case "explicitly_allowed":
16534
18479
  case "implicitly_allowed": {
16535
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_icons_material5.CheckCircle, { sx: { color: "success.main", fontSize: "1rem" } });
18480
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons_material5.CheckCircle, { sx: { color: "success.main", fontSize: "1rem" } });
16536
18481
  }
16537
18482
  case "explicitly_denied": {
16538
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_icons_material5.Error, { sx: { color: "error.main", fontSize: "1rem" } });
18483
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons_material5.Error, { sx: { color: "error.main", fontSize: "1rem" } });
16539
18484
  }
16540
18485
  case "implicitly_denied": {
16541
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_icons_material5.Warning, { sx: { color: "warning.main", fontSize: "1rem" } });
18486
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons_material5.Warning, { sx: { color: "warning.main", fontSize: "1rem" } });
16542
18487
  }
16543
18488
  }
16544
18489
  };
16545
18490
  var IAMEventDetail = ({ event }) => {
16546
18491
  const payloadString = event.attributes?.payload;
16547
18492
  if (!payloadString) {
16548
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material10.Typography, { color: "text.secondary", variant: "caption", children: "No IAM policy evaluation data available" });
18493
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material10.Typography, { color: "text.secondary", variant: "caption", children: "No IAM policy evaluation data available" });
16549
18494
  }
16550
18495
  const parsedIAM = parseIAMEvent(payloadString);
16551
18496
  if (!parsedIAM) {
16552
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material10.Typography, { color: "text.secondary", variant: "caption", children: "Failed to parse IAM event data" });
18497
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material10.Typography, { color: "text.secondary", variant: "caption", children: "Failed to parse IAM event data" });
16553
18498
  }
16554
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(import_material10.Box, { children: [
16555
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material10.Box, { sx: { mb: 1.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
18499
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_material10.Box, { children: [
18500
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material10.Box, { sx: { mb: 1.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
16556
18501
  import_material10.Chip,
16557
18502
  {
16558
- icon: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(PermissionIcon, { status: parsedIAM.permission }),
18503
+ icon: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(PermissionIcon, { status: parsedIAM.permission }),
16559
18504
  label: formatPermissionStatus(parsedIAM.permission),
16560
18505
  size: "small",
16561
18506
  sx: {
@@ -16565,36 +18510,36 @@ var IAMEventDetail = ({ event }) => {
16565
18510
  variant: "outlined"
16566
18511
  }
16567
18512
  ) }),
16568
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(DetailRow, { content: `${parsedIAM.service}:${parsedIAM.operation}`, label: "Operation" }),
16569
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(DetailRow, { content: parsedIAM.principal, label: "Principal" }),
16570
- parsedIAM.details.actions && parsedIAM.details.actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
18513
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(DetailRow, { content: `${parsedIAM.service}:${parsedIAM.operation}`, label: "Operation" }),
18514
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(DetailRow, { content: parsedIAM.principal, label: "Principal" }),
18515
+ parsedIAM.details.actions && parsedIAM.details.actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
16571
18516
  DetailRow,
16572
18517
  {
16573
- content: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material10.Box, { children: parsedIAM.details.actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material10.Typography, { sx: { color: "text.primary", display: "block" }, variant: "caption", children: action }, action)) }),
18518
+ content: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material10.Box, { children: parsedIAM.details.actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material10.Typography, { sx: { color: "text.primary", display: "block" }, variant: "caption", children: action }, action)) }),
16574
18519
  label: "Actions"
16575
18520
  }
16576
18521
  ),
16577
- parsedIAM.details.resources && parsedIAM.details.resources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
18522
+ parsedIAM.details.resources && parsedIAM.details.resources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
16578
18523
  DetailRow,
16579
18524
  {
16580
- content: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material10.Box, { children: parsedIAM.details.resources.map((resource) => /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material10.Typography, { sx: { color: "text.primary", display: "block", wordBreak: "break-all" }, variant: "caption", children: resource }, resource)) }),
18525
+ content: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material10.Box, { children: parsedIAM.details.resources.map((resource) => /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material10.Typography, { sx: { color: "text.primary", display: "block", wordBreak: "break-all" }, variant: "caption", children: resource }, resource)) }),
16581
18526
  label: "Resources"
16582
18527
  }
16583
18528
  ),
16584
- (parsedIAM.details.explicitAllows !== void 0 || parsedIAM.details.explicitDenies !== void 0 || parsedIAM.details.implicitDenies !== void 0) && /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(import_material10.Box, { sx: { mt: 1.5 }, children: [
16585
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material10.Typography, { color: "text.secondary", sx: { display: "block", fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Policy Evaluation" }),
16586
- /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(import_material10.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "repeat(3, 1fr)" }, children: [
16587
- parsedIAM.details.explicitAllows !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(import_material10.Box, { sx: { textAlign: "center" }, children: [
16588
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material10.Typography, { color: "success.main", sx: { display: "block", fontWeight: "bold" }, variant: "subtitle2", children: parsedIAM.details.explicitAllows }),
16589
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material10.Typography, { color: "text.secondary", variant: "caption", children: "Explicit Allows" })
18529
+ (parsedIAM.details.explicitAllows !== void 0 || parsedIAM.details.explicitDenies !== void 0 || parsedIAM.details.implicitDenies !== void 0) && /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_material10.Box, { sx: { mt: 1.5 }, children: [
18530
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material10.Typography, { color: "text.secondary", sx: { display: "block", fontWeight: 600, mb: 0.5 }, variant: "caption", children: "Policy Evaluation" }),
18531
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_material10.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "repeat(3, 1fr)" }, children: [
18532
+ parsedIAM.details.explicitAllows !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_material10.Box, { sx: { textAlign: "center" }, children: [
18533
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material10.Typography, { color: "success.main", sx: { display: "block", fontWeight: "bold" }, variant: "subtitle2", children: parsedIAM.details.explicitAllows }),
18534
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material10.Typography, { color: "text.secondary", variant: "caption", children: "Explicit Allows" })
16590
18535
  ] }),
16591
- parsedIAM.details.explicitDenies !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(import_material10.Box, { sx: { textAlign: "center" }, children: [
16592
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material10.Typography, { color: "error.main", sx: { display: "block", fontWeight: "bold" }, variant: "subtitle2", children: parsedIAM.details.explicitDenies }),
16593
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material10.Typography, { color: "text.secondary", variant: "caption", children: "Explicit Denies" })
18536
+ parsedIAM.details.explicitDenies !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_material10.Box, { sx: { textAlign: "center" }, children: [
18537
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material10.Typography, { color: "error.main", sx: { display: "block", fontWeight: "bold" }, variant: "subtitle2", children: parsedIAM.details.explicitDenies }),
18538
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material10.Typography, { color: "text.secondary", variant: "caption", children: "Explicit Denies" })
16594
18539
  ] }),
16595
- parsedIAM.details.implicitDenies !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(import_material10.Box, { sx: { textAlign: "center" }, children: [
16596
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material10.Typography, { color: "warning.main", sx: { display: "block", fontWeight: "bold" }, variant: "subtitle2", children: parsedIAM.details.implicitDenies }),
16597
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_material10.Typography, { color: "text.secondary", variant: "caption", children: "Implicit Denies" })
18540
+ parsedIAM.details.implicitDenies !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_material10.Box, { sx: { textAlign: "center" }, children: [
18541
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material10.Typography, { color: "warning.main", sx: { display: "block", fontWeight: "bold" }, variant: "subtitle2", children: parsedIAM.details.implicitDenies }),
18542
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material10.Typography, { color: "text.secondary", variant: "caption", children: "Implicit Denies" })
16598
18543
  ] })
16599
18544
  ] })
16600
18545
  ] })
@@ -16604,19 +18549,19 @@ var IAMEventDetail = ({ event }) => {
16604
18549
  // src/components/event-details/iam-permission-detail.tsx
16605
18550
  var import_icons_material6 = require("@mui/icons-material");
16606
18551
  var import_material11 = require("@mui/material");
16607
- var import_react51 = require("react");
16608
- var import_jsx_runtime133 = require("react/jsx-runtime");
18552
+ var import_react53 = require("react");
18553
+ var import_jsx_runtime134 = require("react/jsx-runtime");
16609
18554
  var getChipColors = (status) => ({
16610
18555
  backgroundColor: getPermissionStatusColor(status),
16611
18556
  color: "white"
16612
18557
  });
16613
- var LabelValue = ({ label, value }) => /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_material11.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr", mb: 0.5 }, children: [
16614
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Typography, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: label }),
16615
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Typography, { sx: { wordBreak: "break-all" }, variant: "caption", children: value })
18558
+ var LabelValue = ({ label, value }) => /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material11.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr", mb: 0.5 }, children: [
18559
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Typography, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: label }),
18560
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Typography, { sx: { wordBreak: "break-all" }, variant: "caption", children: value })
16616
18561
  ] });
16617
18562
  var IAMPermissionItem = ({ event }) => {
16618
- const [isOpen, setIsOpen] = (0, import_react51.useState)(false);
16619
- const parsedData = (0, import_react51.useMemo)(() => {
18563
+ const [isOpen, setIsOpen] = (0, import_react53.useState)(false);
18564
+ const parsedData = (0, import_react53.useMemo)(() => {
16620
18565
  const payloadString = event.attributes?.payload;
16621
18566
  if (!payloadString) return;
16622
18567
  const parsedIAM2 = parseIAMEvent(payloadString);
@@ -16627,40 +18572,40 @@ var IAMPermissionItem = ({ event }) => {
16627
18572
  return null;
16628
18573
  }
16629
18574
  const { chipColors, parsedIAM } = parsedData;
16630
- return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_material11.Box, { sx: { mb: 0.5 }, children: [
16631
- /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_material11.Box, { sx: { alignItems: "center", display: "flex", gap: 1 }, children: [
16632
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.IconButton, { onClick: () => {
18575
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material11.Box, { sx: { mb: 0.5 }, children: [
18576
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material11.Box, { sx: { alignItems: "center", display: "flex", gap: 1 }, children: [
18577
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.IconButton, { onClick: () => {
16633
18578
  setIsOpen(!isOpen);
16634
- }, size: "small", sx: { p: 0 }, children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons_material6.KeyboardArrowDown, { sx: { fontSize: 16 } }) : /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_icons_material6.KeyboardArrowRight, { sx: { fontSize: 16 } }) }),
16635
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Chip, { label: formatPermissionStatus(parsedIAM.permission), size: "small", sx: { ...chipColors, fontWeight: 500 } }),
16636
- /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_material11.Typography, { color: "text.secondary", noWrap: true, sx: { flex: 1, overflow: "hidden", textOverflow: "ellipsis" }, variant: "caption", children: [
18579
+ }, size: "small", sx: { p: 0 }, children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_icons_material6.KeyboardArrowDown, { sx: { fontSize: 16 } }) : /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_icons_material6.KeyboardArrowRight, { sx: { fontSize: 16 } }) }),
18580
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Chip, { label: formatPermissionStatus(parsedIAM.permission), size: "small", sx: { ...chipColors, fontWeight: 500 } }),
18581
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material11.Typography, { color: "text.secondary", noWrap: true, sx: { flex: 1, overflow: "hidden", textOverflow: "ellipsis" }, variant: "caption", children: [
16637
18582
  parsedIAM.service,
16638
18583
  ":",
16639
18584
  parsedIAM.operation
16640
18585
  ] })
16641
18586
  ] }),
16642
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_material11.Box, { sx: { borderColor: "divider", borderLeft: "2px solid", ml: 1, mt: 0.5, pl: 1.5, py: 0.5 }, children: [
16643
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(LabelValue, { label: "Principal", value: parsedIAM.principal }),
16644
- parsedIAM.details.actions && parsedIAM.details.actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_material11.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr", mb: 0.5 }, children: [
16645
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Typography, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: "Actions" }),
16646
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Box, { children: parsedIAM.details.actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Typography, { sx: { display: "block" }, variant: "caption", children: action }, action)) })
18587
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material11.Box, { sx: { borderColor: "divider", borderLeft: "2px solid", ml: 1, mt: 0.5, pl: 1.5, py: 0.5 }, children: [
18588
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(LabelValue, { label: "Principal", value: parsedIAM.principal }),
18589
+ parsedIAM.details.actions && parsedIAM.details.actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material11.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr", mb: 0.5 }, children: [
18590
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Typography, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: "Actions" }),
18591
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Box, { children: parsedIAM.details.actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Typography, { sx: { display: "block" }, variant: "caption", children: action }, action)) })
16647
18592
  ] }),
16648
- parsedIAM.details.resources && parsedIAM.details.resources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_material11.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr" }, children: [
16649
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Typography, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: "Resources" }),
16650
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Box, { children: parsedIAM.details.resources.map((resource) => /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Typography, { sx: { display: "block", wordBreak: "break-all" }, variant: "caption", children: resource }, resource)) })
18593
+ parsedIAM.details.resources && parsedIAM.details.resources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material11.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr" }, children: [
18594
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Typography, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: "Resources" }),
18595
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Box, { children: parsedIAM.details.resources.map((resource) => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Typography, { sx: { display: "block", wordBreak: "break-all" }, variant: "caption", children: resource }, resource)) })
16651
18596
  ] })
16652
18597
  ] })
16653
18598
  ] });
16654
18599
  };
16655
- var IAMPermissionDetail = ({ events }) => /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_material11.Box, { children: events.map((event) => /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(IAMPermissionItem, { event }, `${event.span_id}-${event.event_id}`)) });
18600
+ var IAMPermissionDetail = ({ events }) => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material11.Box, { children: events.map((event) => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(IAMPermissionItem, { event }, `${event.span_id}-${event.event_id}`)) });
16656
18601
 
16657
18602
  // src/components/event-details/payload-viewer.tsx
16658
18603
  var import_material13 = require("@mui/material");
16659
18604
 
16660
18605
  // node_modules/@textea/json-viewer/dist/index.mjs
16661
- var import_jsx_runtime134 = require("react/jsx-runtime");
18606
+ var import_jsx_runtime135 = require("react/jsx-runtime");
16662
18607
  var import_material12 = require("@mui/material");
16663
- var import_react52 = require("react");
18608
+ var import_react54 = require("react");
16664
18609
  var import_zustand = require("zustand");
16665
18610
  var import_copy_to_clipboard = __toESM(require_copy_to_clipboard(), 1);
16666
18611
  function r(e2) {
@@ -16777,10 +18722,10 @@ var createJsonViewerStore = (props) => {
16777
18722
  };
16778
18723
  });
16779
18724
  };
16780
- var JsonViewerStoreContext = (0, import_react52.createContext)(void 0);
18725
+ var JsonViewerStoreContext = (0, import_react54.createContext)(void 0);
16781
18726
  JsonViewerStoreContext.Provider;
16782
18727
  var useJsonViewerStore = (selector2, equalityFn) => {
16783
- const store = (0, import_react52.useContext)(JsonViewerStoreContext);
18728
+ const store = (0, import_react54.useContext)(JsonViewerStoreContext);
16784
18729
  return (0, import_zustand.useStore)(store, selector2, equalityFn);
16785
18730
  };
16786
18731
  var useTextColor = () => {
@@ -16905,9 +18850,9 @@ async function copyString(value) {
16905
18850
  }
16906
18851
  function useClipboard() {
16907
18852
  let { timeout = 2e3 } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
16908
- const [copied, setCopied] = (0, import_react52.useState)(false);
16909
- const copyTimeout = (0, import_react52.useRef)(null);
16910
- const handleCopyResult = (0, import_react52.useCallback)((value) => {
18853
+ const [copied, setCopied] = (0, import_react54.useState)(false);
18854
+ const copyTimeout = (0, import_react54.useRef)(null);
18855
+ const handleCopyResult = (0, import_react54.useCallback)((value) => {
16911
18856
  const current = copyTimeout.current;
16912
18857
  if (current) {
16913
18858
  window.clearTimeout(current);
@@ -16918,7 +18863,7 @@ function useClipboard() {
16918
18863
  timeout
16919
18864
  ]);
16920
18865
  const onCopy = useJsonViewerStore((store) => store.onCopy);
16921
- const copy = (0, import_react52.useCallback)(async (path, value) => {
18866
+ const copy = (0, import_react54.useCallback)(async (path, value) => {
16922
18867
  if (typeof onCopy === "function") {
16923
18868
  try {
16924
18869
  await onCopy(path, value, copyString);
@@ -16939,7 +18884,7 @@ function useClipboard() {
16939
18884
  handleCopyResult,
16940
18885
  onCopy
16941
18886
  ]);
16942
- const reset = (0, import_react52.useCallback)(() => {
18887
+ const reset = (0, import_react54.useCallback)(() => {
16943
18888
  setCopied(false);
16944
18889
  if (copyTimeout.current) {
16945
18890
  clearTimeout(copyTimeout.current);
@@ -16953,7 +18898,7 @@ function useClipboard() {
16953
18898
  }
16954
18899
  function useIsCycleReference(path, value) {
16955
18900
  const rootValue = useJsonViewerStore((store) => store.value);
16956
- return (0, import_react52.useMemo)(() => isCycleReference(rootValue, path, value), [
18901
+ return (0, import_react54.useMemo)(() => isCycleReference(rootValue, path, value), [
16957
18902
  path,
16958
18903
  value,
16959
18904
  rootValue
@@ -16966,7 +18911,7 @@ function useInspect(path, value, nestedIndex) {
16966
18911
  const setInspectCache = useJsonViewerStore((store) => store.setInspectCache);
16967
18912
  const defaultInspectDepth = useJsonViewerStore((store) => store.defaultInspectDepth);
16968
18913
  const defaultInspectControl = useJsonViewerStore((store) => store.defaultInspectControl);
16969
- (0, import_react52.useEffect)(() => {
18914
+ (0, import_react54.useEffect)(() => {
16970
18915
  const inspect2 = getInspectCache(path, nestedIndex);
16971
18916
  if (inspect2 !== void 0) {
16972
18917
  return;
@@ -16988,7 +18933,7 @@ function useInspect(path, value, nestedIndex) {
16988
18933
  value,
16989
18934
  setInspectCache
16990
18935
  ]);
16991
- const [inspect, set] = (0, import_react52.useState)(() => {
18936
+ const [inspect, set] = (0, import_react54.useState)(() => {
16992
18937
  const shouldInspect = getInspectCache(path, nestedIndex);
16993
18938
  if (shouldInspect !== void 0) {
16994
18939
  return shouldInspect;
@@ -16998,7 +18943,7 @@ function useInspect(path, value, nestedIndex) {
16998
18943
  }
16999
18944
  return isTrap ? false : typeof defaultInspectControl === "function" ? defaultInspectControl(path, value) : depth < defaultInspectDepth;
17000
18945
  });
17001
- const setInspect = (0, import_react52.useCallback)((apply) => {
18946
+ const setInspect = (0, import_react54.useCallback)((apply) => {
17002
18947
  set((oldState) => {
17003
18948
  const newState = typeof apply === "boolean" ? apply : apply(oldState);
17004
18949
  setInspectCache(path, newState, nestedIndex);
@@ -17014,7 +18959,7 @@ function useInspect(path, value, nestedIndex) {
17014
18959
  setInspect
17015
18960
  ];
17016
18961
  }
17017
- var DataBox = (props) => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Box, {
18962
+ var DataBox = (props) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Box, {
17018
18963
  component: "div",
17019
18964
  ...props,
17020
18965
  sx: {
@@ -17025,7 +18970,7 @@ var DataBox = (props) => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_m
17025
18970
  var DataTypeLabel = (param) => {
17026
18971
  let { dataType, enable = true } = param;
17027
18972
  if (!enable) return null;
17028
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DataBox, {
18973
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DataBox, {
17029
18974
  className: "data-type-label",
17030
18975
  sx: {
17031
18976
  mx: 0.5,
@@ -17038,23 +18983,23 @@ var DataTypeLabel = (param) => {
17038
18983
  };
17039
18984
  function defineEasyType(param) {
17040
18985
  let { is, serialize, deserialize, type, colorKey, displayTypeLabel = true, Renderer } = param;
17041
- const Render = /* @__PURE__ */ (0, import_react52.memo)(Renderer);
18986
+ const Render = /* @__PURE__ */ (0, import_react54.memo)(Renderer);
17042
18987
  const EasyType = (props) => {
17043
18988
  const storeDisplayDataTypes = useJsonViewerStore((store) => store.displayDataTypes);
17044
18989
  const color2 = useJsonViewerStore((store) => store.colorspace[colorKey]);
17045
18990
  const onSelect = useJsonViewerStore((store) => store.onSelect);
17046
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(DataBox, {
18991
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(DataBox, {
17047
18992
  onClick: () => onSelect === null || onSelect === void 0 ? void 0 : onSelect(props.path, props.value),
17048
18993
  sx: {
17049
18994
  color: color2
17050
18995
  },
17051
18996
  children: [
17052
- displayTypeLabel && storeDisplayDataTypes && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DataTypeLabel, {
18997
+ displayTypeLabel && storeDisplayDataTypes && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DataTypeLabel, {
17053
18998
  dataType: type
17054
18999
  }),
17055
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DataBox, {
19000
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DataBox, {
17056
19001
  className: "".concat(type, "-value"),
17057
- children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Render, {
19002
+ children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Render, {
17058
19003
  path: props.path,
17059
19004
  inspect: props.inspect,
17060
19005
  setInspect: props.setInspect,
@@ -17075,7 +19020,7 @@ function defineEasyType(param) {
17075
19020
  const EasyTypeEditor = (param2) => {
17076
19021
  let { value, setValue, abortEditing, commitEditing } = param2;
17077
19022
  const color2 = useJsonViewerStore((store) => store.colorspace[colorKey]);
17078
- const handleKeyDown = (0, import_react52.useCallback)((event) => {
19023
+ const handleKeyDown = (0, import_react54.useCallback)((event) => {
17079
19024
  if (event.key === "Enter") {
17080
19025
  event.preventDefault();
17081
19026
  commitEditing(value);
@@ -17089,12 +19034,12 @@ function defineEasyType(param) {
17089
19034
  commitEditing,
17090
19035
  value
17091
19036
  ]);
17092
- const handleChange = (0, import_react52.useCallback)((event) => {
19037
+ const handleChange = (0, import_react54.useCallback)((event) => {
17093
19038
  setValue(event.target.value);
17094
19039
  }, [
17095
19040
  setValue
17096
19041
  ]);
17097
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.InputBase, {
19042
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.InputBase, {
17098
19043
  autoFocus: true,
17099
19044
  value,
17100
19045
  onChange: handleChange,
@@ -17134,7 +19079,7 @@ var booleanType = defineEasyType({
17134
19079
  },
17135
19080
  Renderer: (param) => {
17136
19081
  let { value } = param;
17137
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_jsx_runtime134.Fragment, {
19082
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_jsx_runtime135.Fragment, {
17138
19083
  children: value ? "true" : "false"
17139
19084
  });
17140
19085
  }
@@ -17153,7 +19098,7 @@ var dateType = defineEasyType({
17153
19098
  colorKey: "base0D",
17154
19099
  Renderer: (param) => {
17155
19100
  let { value } = param;
17156
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_jsx_runtime134.Fragment, {
19101
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_jsx_runtime135.Fragment, {
17157
19102
  children: value.toLocaleTimeString("en-us", displayOptions)
17158
19103
  });
17159
19104
  }
@@ -17182,12 +19127,12 @@ var functionName = (func) => {
17182
19127
  var lb = "{";
17183
19128
  var rb = "}";
17184
19129
  var PreFunctionType = (props) => {
17185
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material12.NoSsr, {
19130
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material12.NoSsr, {
17186
19131
  children: [
17187
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DataTypeLabel, {
19132
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DataTypeLabel, {
17188
19133
  dataType: "function"
17189
19134
  }),
17190
- /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material12.Box, {
19135
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material12.Box, {
17191
19136
  component: "span",
17192
19137
  className: "data-function-start",
17193
19138
  sx: {
@@ -17203,8 +19148,8 @@ var PreFunctionType = (props) => {
17203
19148
  });
17204
19149
  };
17205
19150
  var PostFunctionType = () => {
17206
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.NoSsr, {
17207
- children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Box, {
19151
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.NoSsr, {
19152
+ children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Box, {
17208
19153
  component: "span",
17209
19154
  className: "data-function-end",
17210
19155
  children: rb
@@ -17213,15 +19158,15 @@ var PostFunctionType = () => {
17213
19158
  };
17214
19159
  var FunctionType = (props) => {
17215
19160
  const functionColor = useJsonViewerStore((store) => store.colorspace.base05);
17216
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.NoSsr, {
17217
- children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Box, {
19161
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.NoSsr, {
19162
+ children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Box, {
17218
19163
  className: "data-function",
17219
19164
  sx: {
17220
19165
  display: props.inspect ? "block" : "inline-block",
17221
19166
  pl: props.inspect ? 2 : 0,
17222
19167
  color: functionColor
17223
19168
  },
17224
- children: props.inspect ? functionBody(props.value) : /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Box, {
19169
+ children: props.inspect ? functionBody(props.value) : /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Box, {
17225
19170
  component: "span",
17226
19171
  className: "data-function-body",
17227
19172
  onClick: () => props.setInspect(true),
@@ -17249,7 +19194,7 @@ var nullType = defineEasyType({
17249
19194
  displayTypeLabel: false,
17250
19195
  Renderer: () => {
17251
19196
  const backgroundColor = useJsonViewerStore((store) => store.colorspace.base02);
17252
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Box, {
19197
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Box, {
17253
19198
  sx: {
17254
19199
  fontSize: "0.8rem",
17255
19200
  backgroundColor,
@@ -17272,7 +19217,7 @@ var nanType = defineEasyType({
17272
19217
  deserialize: (value) => parseFloat(value),
17273
19218
  Renderer: () => {
17274
19219
  const backgroundColor = useJsonViewerStore((store) => store.colorspace.base02);
17275
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Box, {
19220
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Box, {
17276
19221
  sx: {
17277
19222
  backgroundColor,
17278
19223
  fontSize: "0.8rem",
@@ -17292,7 +19237,7 @@ var floatType = defineEasyType({
17292
19237
  deserialize: (value) => parseFloat(value),
17293
19238
  Renderer: (param) => {
17294
19239
  let { value } = param;
17295
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_jsx_runtime134.Fragment, {
19240
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_jsx_runtime135.Fragment, {
17296
19241
  children: value
17297
19242
  });
17298
19243
  }
@@ -17306,7 +19251,7 @@ var intType = defineEasyType({
17306
19251
  deserialize: (value) => parseFloat(value),
17307
19252
  Renderer: (param) => {
17308
19253
  let { value } = param;
17309
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_jsx_runtime134.Fragment, {
19254
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_jsx_runtime135.Fragment, {
17310
19255
  children: value
17311
19256
  });
17312
19257
  }
@@ -17319,16 +19264,16 @@ var bigIntType = defineEasyType({
17319
19264
  deserialize: (value) => BigInt(value.replace(/\D/g, "")),
17320
19265
  Renderer: (param) => {
17321
19266
  let { value } = param;
17322
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_jsx_runtime134.Fragment, {
19267
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_jsx_runtime135.Fragment, {
17323
19268
  children: "".concat(value, "n")
17324
19269
  });
17325
19270
  }
17326
19271
  });
17327
19272
  var BaseIcon = (param) => {
17328
19273
  let { d: d2, ...props } = param;
17329
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.SvgIcon, {
19274
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.SvgIcon, {
17330
19275
  ...props,
17331
- children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("path", {
19276
+ children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("path", {
17332
19277
  d: d2
17333
19278
  })
17334
19279
  });
@@ -17343,55 +19288,55 @@ var Edit = "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.3
17343
19288
  var ExpandMore = "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z";
17344
19289
  var Delete = "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5l-1-1h-5l-1 1H5v2h14V4z";
17345
19290
  var AddBoxIcon = (props) => {
17346
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(BaseIcon, {
19291
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(BaseIcon, {
17347
19292
  d: AddBox,
17348
19293
  ...props
17349
19294
  });
17350
19295
  };
17351
19296
  var CheckIcon = (props) => {
17352
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(BaseIcon, {
19297
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(BaseIcon, {
17353
19298
  d: Check,
17354
19299
  ...props
17355
19300
  });
17356
19301
  };
17357
19302
  var ChevronRightIcon = (props) => {
17358
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(BaseIcon, {
19303
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(BaseIcon, {
17359
19304
  d: ChevronRight,
17360
19305
  ...props
17361
19306
  });
17362
19307
  };
17363
19308
  var CircularArrowsIcon = (props) => {
17364
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(BaseIcon, {
19309
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(BaseIcon, {
17365
19310
  d: CircularArrows,
17366
19311
  ...props
17367
19312
  });
17368
19313
  };
17369
19314
  var CloseIcon = (props) => {
17370
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(BaseIcon, {
19315
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(BaseIcon, {
17371
19316
  d: Close,
17372
19317
  ...props
17373
19318
  });
17374
19319
  };
17375
19320
  var ContentCopyIcon = (props) => {
17376
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(BaseIcon, {
19321
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(BaseIcon, {
17377
19322
  d: ContentCopy,
17378
19323
  ...props
17379
19324
  });
17380
19325
  };
17381
19326
  var EditIcon = (props) => {
17382
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(BaseIcon, {
19327
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(BaseIcon, {
17383
19328
  d: Edit,
17384
19329
  ...props
17385
19330
  });
17386
19331
  };
17387
19332
  var ExpandMoreIcon = (props) => {
17388
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(BaseIcon, {
19333
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(BaseIcon, {
17389
19334
  d: ExpandMore,
17390
19335
  ...props
17391
19336
  });
17392
19337
  };
17393
19338
  var DeleteIcon = (props) => {
17394
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(BaseIcon, {
19339
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(BaseIcon, {
17395
19340
  d: Delete,
17396
19341
  ...props
17397
19342
  });
@@ -17414,23 +19359,23 @@ function inspectMetadata(value) {
17414
19359
  var PreObjectType = (props) => {
17415
19360
  const metadataColor = useJsonViewerStore((store) => store.colorspace.base04);
17416
19361
  const textColor = useTextColor();
17417
- const isArrayLike = (0, import_react52.useMemo)(() => Array.isArray(props.value) || props.value instanceof Set, [
19362
+ const isArrayLike = (0, import_react54.useMemo)(() => Array.isArray(props.value) || props.value instanceof Set, [
17418
19363
  props.value
17419
19364
  ]);
17420
- const isEmptyValue = (0, import_react52.useMemo)(() => getValueSize(props.value) === 0, [
19365
+ const isEmptyValue = (0, import_react54.useMemo)(() => getValueSize(props.value) === 0, [
17421
19366
  props.value
17422
19367
  ]);
17423
- const sizeOfValue = (0, import_react52.useMemo)(() => inspectMetadata(props.value), [
19368
+ const sizeOfValue = (0, import_react54.useMemo)(() => inspectMetadata(props.value), [
17424
19369
  props.value
17425
19370
  ]);
17426
19371
  const displaySize = useJsonViewerStore((store) => store.displaySize);
17427
- const shouldDisplaySize = (0, import_react52.useMemo)(() => typeof displaySize === "function" ? displaySize(props.path, props.value) : displaySize, [
19372
+ const shouldDisplaySize = (0, import_react54.useMemo)(() => typeof displaySize === "function" ? displaySize(props.path, props.value) : displaySize, [
17428
19373
  displaySize,
17429
19374
  props.path,
17430
19375
  props.value
17431
19376
  ]);
17432
19377
  const isTrap = useIsCycleReference(props.path, props.value);
17433
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material12.Box, {
19378
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material12.Box, {
17434
19379
  component: "span",
17435
19380
  className: "data-object-start",
17436
19381
  sx: {
@@ -17438,7 +19383,7 @@ var PreObjectType = (props) => {
17438
19383
  },
17439
19384
  children: [
17440
19385
  isArrayLike ? arrayLb : objectLb,
17441
- shouldDisplaySize && props.inspect && !isEmptyValue && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Box, {
19386
+ shouldDisplaySize && props.inspect && !isEmptyValue && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Box, {
17442
19387
  component: "span",
17443
19388
  sx: {
17444
19389
  pl: 0.5,
@@ -17448,16 +19393,16 @@ var PreObjectType = (props) => {
17448
19393
  },
17449
19394
  children: sizeOfValue
17450
19395
  }),
17451
- isTrap && !props.inspect && /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_jsx_runtime134.Fragment, {
19396
+ isTrap && !props.inspect && /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_jsx_runtime135.Fragment, {
17452
19397
  children: [
17453
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(CircularArrowsIcon, {
19398
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(CircularArrowsIcon, {
17454
19399
  sx: {
17455
19400
  fontSize: 12,
17456
19401
  color: textColor,
17457
19402
  mx: 0.5
17458
19403
  }
17459
19404
  }),
17460
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DataBox, {
19405
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DataBox, {
17461
19406
  sx: {
17462
19407
  cursor: "pointer",
17463
19408
  userSelect: "none"
@@ -17472,22 +19417,22 @@ var PreObjectType = (props) => {
17472
19417
  var PostObjectType = (props) => {
17473
19418
  const metadataColor = useJsonViewerStore((store) => store.colorspace.base04);
17474
19419
  const textColor = useTextColor();
17475
- const isArrayLike = (0, import_react52.useMemo)(() => Array.isArray(props.value) || props.value instanceof Set, [
19420
+ const isArrayLike = (0, import_react54.useMemo)(() => Array.isArray(props.value) || props.value instanceof Set, [
17476
19421
  props.value
17477
19422
  ]);
17478
- const isEmptyValue = (0, import_react52.useMemo)(() => getValueSize(props.value) === 0, [
19423
+ const isEmptyValue = (0, import_react54.useMemo)(() => getValueSize(props.value) === 0, [
17479
19424
  props.value
17480
19425
  ]);
17481
- const sizeOfValue = (0, import_react52.useMemo)(() => inspectMetadata(props.value), [
19426
+ const sizeOfValue = (0, import_react54.useMemo)(() => inspectMetadata(props.value), [
17482
19427
  props.value
17483
19428
  ]);
17484
19429
  const displaySize = useJsonViewerStore((store) => store.displaySize);
17485
- const shouldDisplaySize = (0, import_react52.useMemo)(() => typeof displaySize === "function" ? displaySize(props.path, props.value) : displaySize, [
19430
+ const shouldDisplaySize = (0, import_react54.useMemo)(() => typeof displaySize === "function" ? displaySize(props.path, props.value) : displaySize, [
17486
19431
  displaySize,
17487
19432
  props.path,
17488
19433
  props.value
17489
19434
  ]);
17490
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material12.Box, {
19435
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material12.Box, {
17491
19436
  component: "span",
17492
19437
  className: "data-object-end",
17493
19438
  sx: {
@@ -17498,7 +19443,7 @@ var PostObjectType = (props) => {
17498
19443
  },
17499
19444
  children: [
17500
19445
  isArrayLike ? arrayRb : objectRb,
17501
- shouldDisplaySize && (isEmptyValue || !props.inspect) ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Box, {
19446
+ shouldDisplaySize && (isEmptyValue || !props.inspect) ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Box, {
17502
19447
  component: "span",
17503
19448
  sx: {
17504
19449
  pl: 0.5,
@@ -17519,9 +19464,9 @@ var ObjectType = (props) => {
17519
19464
  const borderColor = useJsonViewerStore((store) => store.colorspace.base02);
17520
19465
  const groupArraysAfterLength = useJsonViewerStore((store) => store.groupArraysAfterLength);
17521
19466
  const isTrap = useIsCycleReference(props.path, props.value);
17522
- const [displayLength, setDisplayLength] = (0, import_react52.useState)(useJsonViewerStore((store) => store.maxDisplayLength));
19467
+ const [displayLength, setDisplayLength] = (0, import_react54.useState)(useJsonViewerStore((store) => store.maxDisplayLength));
17523
19468
  const objectSortKeys = useJsonViewerStore((store) => store.objectSortKeys);
17524
- const elements = (0, import_react52.useMemo)(() => {
19469
+ const elements = (0, import_react54.useMemo)(() => {
17525
19470
  if (!props.inspect) {
17526
19471
  return null;
17527
19472
  }
@@ -17538,7 +19483,7 @@ var ObjectType = (props) => {
17538
19483
  ...props.path,
17539
19484
  key
17540
19485
  ];
17541
- elements3.push(/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DataKeyPair, {
19486
+ elements3.push(/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DataKeyPair, {
17542
19487
  path,
17543
19488
  value: value2,
17544
19489
  prevValue: props.prevValue instanceof Map ? props.prevValue.get(k2) : void 0,
@@ -17554,7 +19499,7 @@ var ObjectType = (props) => {
17554
19499
  while (true) {
17555
19500
  const nextResult = iterator2.next();
17556
19501
  var _nextResult_done;
17557
- elements3.push(/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DataKeyPair, {
19502
+ elements3.push(/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DataKeyPair, {
17558
19503
  path: [
17559
19504
  ...props.path,
17560
19505
  "iterator:".concat(count2)
@@ -17582,7 +19527,7 @@ var ObjectType = (props) => {
17582
19527
  ...props.path,
17583
19528
  index
17584
19529
  ];
17585
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DataKeyPair, {
19530
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DataKeyPair, {
17586
19531
  path,
17587
19532
  value: value2,
17588
19533
  prevValue: Array.isArray(props.prevValue) ? props.prevValue[index] : void 0,
@@ -17591,7 +19536,7 @@ var ObjectType = (props) => {
17591
19536
  });
17592
19537
  if (value.length > displayLength) {
17593
19538
  const rest = value.length - displayLength;
17594
- elements4.push(/* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(DataBox, {
19539
+ elements4.push(/* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(DataBox, {
17595
19540
  sx: {
17596
19541
  cursor: "pointer",
17597
19542
  lineHeight: 1.5,
@@ -17614,7 +19559,7 @@ var ObjectType = (props) => {
17614
19559
  const prevElements = Array.isArray(props.prevValue) ? segmentArray(props.prevValue, groupArraysAfterLength) : void 0;
17615
19560
  const elementsLastIndex = elements3.length - 1;
17616
19561
  return elements3.map((list, index) => {
17617
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DataKeyPair, {
19562
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DataKeyPair, {
17618
19563
  path: props.path,
17619
19564
  value: list,
17620
19565
  nestedIndex: index,
@@ -17641,7 +19586,7 @@ var ObjectType = (props) => {
17641
19586
  ...props.path,
17642
19587
  key
17643
19588
  ];
17644
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DataKeyPair, {
19589
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DataKeyPair, {
17645
19590
  path,
17646
19591
  value: value2,
17647
19592
  prevValue: (_props_prevValue = props.prevValue) === null || _props_prevValue === void 0 ? void 0 : _props_prevValue[key],
@@ -17650,7 +19595,7 @@ var ObjectType = (props) => {
17650
19595
  });
17651
19596
  if (entries.length > displayLength) {
17652
19597
  const rest = entries.length - displayLength;
17653
- elements2.push(/* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(DataBox, {
19598
+ elements2.push(/* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(DataBox, {
17654
19599
  sx: {
17655
19600
  cursor: "pointer",
17656
19601
  lineHeight: 1.5,
@@ -17682,13 +19627,13 @@ var ObjectType = (props) => {
17682
19627
  const marginLeft = props.inspect ? 0.6 : 0;
17683
19628
  const width = useJsonViewerStore((store) => store.indentWidth);
17684
19629
  const indentWidth = props.inspect ? width - marginLeft : width;
17685
- const isEmptyValue = (0, import_react52.useMemo)(() => getValueSize(props.value) === 0, [
19630
+ const isEmptyValue = (0, import_react54.useMemo)(() => getValueSize(props.value) === 0, [
17686
19631
  props.value
17687
19632
  ]);
17688
19633
  if (isEmptyValue) {
17689
19634
  return null;
17690
19635
  }
17691
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Box, {
19636
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Box, {
17692
19637
  className: "data-object",
17693
19638
  sx: {
17694
19639
  display: props.inspect ? "block" : "inline-block",
@@ -17697,7 +19642,7 @@ var ObjectType = (props) => {
17697
19642
  color: keyColor,
17698
19643
  borderLeft: props.inspect ? "1px solid ".concat(borderColor) : "none"
17699
19644
  },
17700
- children: props.inspect ? elements : !isTrap && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Box, {
19645
+ children: props.inspect ? elements : !isTrap && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Box, {
17701
19646
  component: "span",
17702
19647
  className: "data-object-body",
17703
19648
  onClick: () => props.setInspect(true),
@@ -17725,11 +19670,11 @@ var stringType = defineEasyType({
17725
19670
  serialize: (value) => value,
17726
19671
  deserialize: (value) => value,
17727
19672
  Renderer: (props) => {
17728
- const [showRest, setShowRest] = (0, import_react52.useState)(false);
19673
+ const [showRest, setShowRest] = (0, import_react54.useState)(false);
17729
19674
  const collapseStringsAfterLength = useJsonViewerStore((store) => store.collapseStringsAfterLength);
17730
19675
  const value = showRest ? props.value : props.value.slice(0, collapseStringsAfterLength);
17731
19676
  const hasRest = props.value.length > collapseStringsAfterLength;
17732
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material12.Box, {
19677
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material12.Box, {
17733
19678
  component: "span",
17734
19679
  sx: {
17735
19680
  overflowWrap: "anywhere",
@@ -17747,7 +19692,7 @@ var stringType = defineEasyType({
17747
19692
  children: [
17748
19693
  '"',
17749
19694
  value,
17750
- hasRest && !showRest && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Box, {
19695
+ hasRest && !showRest && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Box, {
17751
19696
  component: "span",
17752
19697
  sx: {
17753
19698
  padding: 0.5
@@ -17766,7 +19711,7 @@ var undefinedType = defineEasyType({
17766
19711
  displayTypeLabel: false,
17767
19712
  Renderer: () => {
17768
19713
  const backgroundColor = useJsonViewerStore((store) => store.colorspace.base02);
17769
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Box, {
19714
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Box, {
17770
19715
  sx: {
17771
19716
  fontSize: "0.7rem",
17772
19717
  backgroundColor,
@@ -17782,17 +19727,17 @@ function memorizeDataType(dataType) {
17782
19727
  var _prevProps_path, _nextProps_path;
17783
19728
  return Object.is(prevProps.value, nextProps.value) && prevProps.inspect && nextProps.inspect && ((_prevProps_path = prevProps.path) === null || _prevProps_path === void 0 ? void 0 : _prevProps_path.join(".")) === ((_nextProps_path = nextProps.path) === null || _nextProps_path === void 0 ? void 0 : _nextProps_path.join("."));
17784
19729
  }
17785
- dataType.Component = /* @__PURE__ */ (0, import_react52.memo)(dataType.Component, compare);
19730
+ dataType.Component = /* @__PURE__ */ (0, import_react54.memo)(dataType.Component, compare);
17786
19731
  if (dataType.Editor) {
17787
- dataType.Editor = /* @__PURE__ */ (0, import_react52.memo)(dataType.Editor, function compare2(prevProps, nextProps) {
19732
+ dataType.Editor = /* @__PURE__ */ (0, import_react54.memo)(dataType.Editor, function compare2(prevProps, nextProps) {
17788
19733
  return Object.is(prevProps.value, nextProps.value);
17789
19734
  });
17790
19735
  }
17791
19736
  if (dataType.PreComponent) {
17792
- dataType.PreComponent = /* @__PURE__ */ (0, import_react52.memo)(dataType.PreComponent, compare);
19737
+ dataType.PreComponent = /* @__PURE__ */ (0, import_react54.memo)(dataType.PreComponent, compare);
17793
19738
  }
17794
19739
  if (dataType.PostComponent) {
17795
- dataType.PostComponent = /* @__PURE__ */ (0, import_react52.memo)(dataType.PostComponent, compare);
19740
+ dataType.PostComponent = /* @__PURE__ */ (0, import_react54.memo)(dataType.PostComponent, compare);
17796
19741
  }
17797
19742
  return dataType;
17798
19743
  }
@@ -17818,10 +19763,10 @@ var createTypeRegistryStore = () => {
17818
19763
  }
17819
19764
  }));
17820
19765
  };
17821
- var TypeRegistryStoreContext = /* @__PURE__ */ (0, import_react52.createContext)(void 0);
19766
+ var TypeRegistryStoreContext = /* @__PURE__ */ (0, import_react54.createContext)(void 0);
17822
19767
  TypeRegistryStoreContext.Provider;
17823
19768
  var useTypeRegistryStore = (selector2, equalityFn) => {
17824
- const store = (0, import_react52.useContext)(TypeRegistryStoreContext);
19769
+ const store = (0, import_react54.useContext)(TypeRegistryStoreContext);
17825
19770
  return (0, import_zustand.useStore)(store, selector2, equalityFn);
17826
19771
  };
17827
19772
  function matchTypeComponents(value, path, registry) {
@@ -17841,13 +19786,13 @@ function matchTypeComponents(value, path, registry) {
17841
19786
  }
17842
19787
  function useTypeComponents(value, path) {
17843
19788
  const registry = useTypeRegistryStore((store) => store.registry);
17844
- return (0, import_react52.useMemo)(() => matchTypeComponents(value, path, registry), [
19789
+ return (0, import_react54.useMemo)(() => matchTypeComponents(value, path, registry), [
17845
19790
  value,
17846
19791
  path,
17847
19792
  registry
17848
19793
  ]);
17849
19794
  }
17850
- var IconBox = (props) => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Box, {
19795
+ var IconBox = (props) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Box, {
17851
19796
  component: "span",
17852
19797
  ...props,
17853
19798
  sx: {
@@ -17862,7 +19807,7 @@ var DataKeyPair = (props) => {
17862
19807
  var _props_editable;
17863
19808
  const propsEditable = (_props_editable = props.editable) !== null && _props_editable !== void 0 ? _props_editable : void 0;
17864
19809
  const storeEditable = useJsonViewerStore((store) => store.editable);
17865
- const editable = (0, import_react52.useMemo)(() => {
19810
+ const editable = (0, import_react54.useMemo)(() => {
17866
19811
  if (storeEditable === false) {
17867
19812
  return false;
17868
19813
  }
@@ -17879,11 +19824,11 @@ var DataKeyPair = (props) => {
17879
19824
  storeEditable,
17880
19825
  value
17881
19826
  ]);
17882
- const [tempValue, setTempValue] = (0, import_react52.useState)("");
19827
+ const [tempValue, setTempValue] = (0, import_react54.useState)("");
17883
19828
  const depth = path.length;
17884
19829
  const key = path[depth - 1];
17885
19830
  const hoverPath = useJsonViewerStore((store) => store.hoverPath);
17886
- const isHover = (0, import_react52.useMemo)(() => {
19831
+ const isHover = (0, import_react54.useMemo)(() => {
17887
19832
  return hoverPath && path.every((value2, index) => value2 === hoverPath.path[index] && nestedIndex === hoverPath.nestedIndex);
17888
19833
  }, [
17889
19834
  hoverPath,
@@ -17893,7 +19838,7 @@ var DataKeyPair = (props) => {
17893
19838
  const setHover = useJsonViewerStore((store) => store.setHover);
17894
19839
  const root = useJsonViewerStore((store) => store.value);
17895
19840
  const [inspect, setInspect] = useInspect(path, value, nestedIndex);
17896
- const [editing, setEditing] = (0, import_react52.useState)(false);
19841
+ const [editing, setEditing] = (0, import_react54.useState)(false);
17897
19842
  const onChange = useJsonViewerStore((store) => store.onChange);
17898
19843
  const keyColor = useTextColor();
17899
19844
  const numberKeyColor = useJsonViewerStore((store) => store.colorspace.base0C);
@@ -17905,7 +19850,7 @@ var DataKeyPair = (props) => {
17905
19850
  const isNumberKey = Number.isInteger(Number(key));
17906
19851
  const storeEnableAdd = useJsonViewerStore((store) => store.enableAdd);
17907
19852
  const onAdd = useJsonViewerStore((store) => store.onAdd);
17908
- const enableAdd = (0, import_react52.useMemo)(() => {
19853
+ const enableAdd = (0, import_react54.useMemo)(() => {
17909
19854
  if (!onAdd || nestedIndex !== void 0) return false;
17910
19855
  if (storeEnableAdd === false) {
17911
19856
  return false;
@@ -17930,7 +19875,7 @@ var DataKeyPair = (props) => {
17930
19875
  ]);
17931
19876
  const storeEnableDelete = useJsonViewerStore((store) => store.enableDelete);
17932
19877
  const onDelete = useJsonViewerStore((store) => store.onDelete);
17933
- const enableDelete = (0, import_react52.useMemo)(() => {
19878
+ const enableDelete = (0, import_react54.useMemo)(() => {
17934
19879
  if (!onDelete || nestedIndex !== void 0) return false;
17935
19880
  if (isRoot) {
17936
19881
  return false;
@@ -17957,7 +19902,7 @@ var DataKeyPair = (props) => {
17957
19902
  const enableClipboard = useJsonViewerStore((store) => store.enableClipboard);
17958
19903
  const { copy, copied } = useClipboard();
17959
19904
  const highlightUpdates = useJsonViewerStore((store) => store.highlightUpdates);
17960
- const isHighlight = (0, import_react52.useMemo)(() => {
19905
+ const isHighlight = (0, import_react54.useMemo)(() => {
17961
19906
  if (!highlightUpdates || prevValue === void 0) return false;
17962
19907
  if (typeof value !== typeof prevValue) {
17963
19908
  return true;
@@ -17981,8 +19926,8 @@ var DataKeyPair = (props) => {
17981
19926
  prevValue,
17982
19927
  value
17983
19928
  ]);
17984
- const highlightContainer = (0, import_react52.useRef)();
17985
- (0, import_react52.useEffect)(() => {
19929
+ const highlightContainer = (0, import_react54.useRef)();
19930
+ (0, import_react54.useEffect)(() => {
17986
19931
  if (highlightContainer.current && isHighlight && "animate" in highlightContainer.current) {
17987
19932
  highlightContainer.current.animate([
17988
19933
  {
@@ -18002,7 +19947,7 @@ var DataKeyPair = (props) => {
18002
19947
  prevValue,
18003
19948
  value
18004
19949
  ]);
18005
- const startEditing = (0, import_react52.useCallback)((event) => {
19950
+ const startEditing = (0, import_react54.useCallback)((event) => {
18006
19951
  event.preventDefault();
18007
19952
  if (serialize) setTempValue(serialize(value));
18008
19953
  setEditing(true);
@@ -18010,14 +19955,14 @@ var DataKeyPair = (props) => {
18010
19955
  serialize,
18011
19956
  value
18012
19957
  ]);
18013
- const abortEditing = (0, import_react52.useCallback)(() => {
19958
+ const abortEditing = (0, import_react54.useCallback)(() => {
18014
19959
  setEditing(false);
18015
19960
  setTempValue("");
18016
19961
  }, [
18017
19962
  setEditing,
18018
19963
  setTempValue
18019
19964
  ]);
18020
- const commitEditing = (0, import_react52.useCallback)((newValue) => {
19965
+ const commitEditing = (0, import_react54.useCallback)((newValue) => {
18021
19966
  setEditing(false);
18022
19967
  if (!deserialize) return;
18023
19968
  try {
@@ -18031,20 +19976,20 @@ var DataKeyPair = (props) => {
18031
19976
  path,
18032
19977
  value
18033
19978
  ]);
18034
- const actionIcons = (0, import_react52.useMemo)(() => {
19979
+ const actionIcons = (0, import_react54.useMemo)(() => {
18035
19980
  if (editing) {
18036
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_jsx_runtime134.Fragment, {
19981
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_jsx_runtime135.Fragment, {
18037
19982
  children: [
18038
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(IconBox, {
18039
- children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(CloseIcon, {
19983
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(IconBox, {
19984
+ children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(CloseIcon, {
18040
19985
  sx: {
18041
19986
  fontSize: ".8rem"
18042
19987
  },
18043
19988
  onClick: abortEditing
18044
19989
  })
18045
19990
  }),
18046
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(IconBox, {
18047
- children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(CheckIcon, {
19991
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(IconBox, {
19992
+ children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(CheckIcon, {
18048
19993
  sx: {
18049
19994
  fontSize: ".8rem"
18050
19995
  },
@@ -18054,9 +19999,9 @@ var DataKeyPair = (props) => {
18054
19999
  ]
18055
20000
  });
18056
20001
  }
18057
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_jsx_runtime134.Fragment, {
20002
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_jsx_runtime135.Fragment, {
18058
20003
  children: [
18059
- enableClipboard && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(IconBox, {
20004
+ enableClipboard && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(IconBox, {
18060
20005
  onClick: (event) => {
18061
20006
  event.preventDefault();
18062
20007
  try {
@@ -18065,41 +20010,41 @@ var DataKeyPair = (props) => {
18065
20010
  console.error(e2);
18066
20011
  }
18067
20012
  },
18068
- children: copied ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(CheckIcon, {
20013
+ children: copied ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(CheckIcon, {
18069
20014
  sx: {
18070
20015
  fontSize: ".8rem"
18071
20016
  }
18072
- }) : /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(ContentCopyIcon, {
20017
+ }) : /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ContentCopyIcon, {
18073
20018
  sx: {
18074
20019
  fontSize: ".8rem"
18075
20020
  }
18076
20021
  })
18077
20022
  }),
18078
- Editor && editable && serialize && deserialize && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(IconBox, {
20023
+ Editor && editable && serialize && deserialize && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(IconBox, {
18079
20024
  onClick: startEditing,
18080
- children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(EditIcon, {
20025
+ children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(EditIcon, {
18081
20026
  sx: {
18082
20027
  fontSize: ".8rem"
18083
20028
  }
18084
20029
  })
18085
20030
  }),
18086
- enableAdd && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(IconBox, {
20031
+ enableAdd && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(IconBox, {
18087
20032
  onClick: (event) => {
18088
20033
  event.preventDefault();
18089
20034
  onAdd === null || onAdd === void 0 ? void 0 : onAdd(path);
18090
20035
  },
18091
- children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(AddBoxIcon, {
20036
+ children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(AddBoxIcon, {
18092
20037
  sx: {
18093
20038
  fontSize: ".8rem"
18094
20039
  }
18095
20040
  })
18096
20041
  }),
18097
- enableDelete && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(IconBox, {
20042
+ enableDelete && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(IconBox, {
18098
20043
  onClick: (event) => {
18099
20044
  event.preventDefault();
18100
20045
  onDelete === null || onDelete === void 0 ? void 0 : onDelete(path, value);
18101
20046
  },
18102
- children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DeleteIcon, {
20047
+ children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DeleteIcon, {
18103
20048
  sx: {
18104
20049
  fontSize: ".9rem"
18105
20050
  }
@@ -18127,12 +20072,12 @@ var DataKeyPair = (props) => {
18127
20072
  abortEditing,
18128
20073
  commitEditing
18129
20074
  ]);
18130
- const isEmptyValue = (0, import_react52.useMemo)(() => getValueSize(value) === 0, [
20075
+ const isEmptyValue = (0, import_react54.useMemo)(() => getValueSize(value) === 0, [
18131
20076
  value
18132
20077
  ]);
18133
20078
  const expandable = !isEmptyValue && !!(PreComponent && PostComponent);
18134
20079
  const KeyRenderer = useJsonViewerStore((store) => store.keyRenderer);
18135
- const downstreamProps = (0, import_react52.useMemo)(() => ({
20080
+ const downstreamProps = (0, import_react54.useMemo)(() => ({
18136
20081
  path,
18137
20082
  inspect,
18138
20083
  setInspect,
@@ -18147,19 +20092,19 @@ var DataKeyPair = (props) => {
18147
20092
  prevValue,
18148
20093
  nestedIndex
18149
20094
  ]);
18150
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_material12.Box, {
20095
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_material12.Box, {
18151
20096
  className: "data-key-pair",
18152
20097
  "data-testid": "data-key-pair" + path.join("."),
18153
20098
  sx: {
18154
20099
  userSelect: "text"
18155
20100
  },
18156
- onMouseEnter: (0, import_react52.useCallback)(() => setHover(path, nestedIndex), [
20101
+ onMouseEnter: (0, import_react54.useCallback)(() => setHover(path, nestedIndex), [
18157
20102
  setHover,
18158
20103
  path,
18159
20104
  nestedIndex
18160
20105
  ]),
18161
20106
  children: [
18162
- /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(DataBox, {
20107
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(DataBox, {
18163
20108
  component: "span",
18164
20109
  className: "data-key",
18165
20110
  sx: {
@@ -18168,7 +20113,7 @@ var DataKeyPair = (props) => {
18168
20113
  letterSpacing: 0.5,
18169
20114
  opacity: 0.8
18170
20115
  },
18171
- onClick: (0, import_react52.useCallback)((event) => {
20116
+ onClick: (0, import_react54.useCallback)((event) => {
18172
20117
  if (event.isDefaultPrevented()) {
18173
20118
  return;
18174
20119
  }
@@ -18180,7 +20125,7 @@ var DataKeyPair = (props) => {
18180
20125
  setInspect
18181
20126
  ]),
18182
20127
  children: [
18183
- expandable ? inspect ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(ExpandMoreIcon, {
20128
+ expandable ? inspect ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ExpandMoreIcon, {
18184
20129
  className: "data-key-toggle-expanded",
18185
20130
  sx: {
18186
20131
  fontSize: ".8rem",
@@ -18188,7 +20133,7 @@ var DataKeyPair = (props) => {
18188
20133
  cursor: "pointer"
18189
20134
  }
18190
20135
  }
18191
- }) : /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(ChevronRightIcon, {
20136
+ }) : /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ChevronRightIcon, {
18192
20137
  className: "data-key-toggle-collapsed",
18193
20138
  sx: {
18194
20139
  fontSize: ".8rem",
@@ -18197,44 +20142,44 @@ var DataKeyPair = (props) => {
18197
20142
  }
18198
20143
  }
18199
20144
  }) : null,
18200
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Box, {
20145
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Box, {
18201
20146
  ref: highlightContainer,
18202
20147
  className: "data-key-key",
18203
20148
  component: "span",
18204
- children: isRoot && depth === 0 ? rootName !== false ? quotesOnKeys ? /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_jsx_runtime134.Fragment, {
20149
+ children: isRoot && depth === 0 ? rootName !== false ? quotesOnKeys ? /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_jsx_runtime135.Fragment, {
18205
20150
  children: [
18206
20151
  '"',
18207
20152
  rootName,
18208
20153
  '"'
18209
20154
  ]
18210
- }) : /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_jsx_runtime134.Fragment, {
20155
+ }) : /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_jsx_runtime135.Fragment, {
18211
20156
  children: rootName
18212
- }) : null : KeyRenderer.when(downstreamProps) ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(KeyRenderer, {
20157
+ }) : null : KeyRenderer.when(downstreamProps) ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(KeyRenderer, {
18213
20158
  ...downstreamProps
18214
- }) : nestedIndex === void 0 && (isNumberKey ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Box, {
20159
+ }) : nestedIndex === void 0 && (isNumberKey ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Box, {
18215
20160
  component: "span",
18216
20161
  style: {
18217
20162
  color: numberKeyColor,
18218
20163
  userSelect: isNumberKey ? "none" : "auto"
18219
20164
  },
18220
20165
  children: key
18221
- }) : quotesOnKeys ? /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_jsx_runtime134.Fragment, {
20166
+ }) : quotesOnKeys ? /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_jsx_runtime135.Fragment, {
18222
20167
  children: [
18223
20168
  '"',
18224
20169
  key,
18225
20170
  '"'
18226
20171
  ]
18227
- }) : /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_jsx_runtime134.Fragment, {
20172
+ }) : /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_jsx_runtime135.Fragment, {
18228
20173
  children: key
18229
20174
  }))
18230
20175
  }),
18231
- isRoot ? rootName !== false && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DataBox, {
20176
+ isRoot ? rootName !== false && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DataBox, {
18232
20177
  className: "data-key-colon",
18233
20178
  sx: {
18234
20179
  mr: 0.5
18235
20180
  },
18236
20181
  children: ":"
18237
- }) : nestedIndex === void 0 && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DataBox, {
20182
+ }) : nestedIndex === void 0 && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DataBox, {
18238
20183
  className: "data-key-colon",
18239
20184
  sx: {
18240
20185
  mr: 0.5,
@@ -18245,29 +20190,29 @@ var DataKeyPair = (props) => {
18245
20190
  },
18246
20191
  children: ":"
18247
20192
  }),
18248
- PreComponent && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(PreComponent, {
20193
+ PreComponent && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(PreComponent, {
18249
20194
  ...downstreamProps
18250
20195
  }),
18251
20196
  isHover && expandable && inspect && actionIcons
18252
20197
  ]
18253
20198
  }),
18254
- editing && editable ? Editor && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Editor, {
20199
+ editing && editable ? Editor && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Editor, {
18255
20200
  path,
18256
20201
  value: tempValue,
18257
20202
  setValue: setTempValue,
18258
20203
  abortEditing,
18259
20204
  commitEditing
18260
- }) : Component ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Component, {
20205
+ }) : Component ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Component, {
18261
20206
  ...downstreamProps
18262
- }) : /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Box, {
20207
+ }) : /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Box, {
18263
20208
  component: "span",
18264
20209
  className: "data-value-fallback",
18265
20210
  children: "fallback: ".concat(value)
18266
20211
  }),
18267
- PostComponent && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(PostComponent, {
20212
+ PostComponent && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(PostComponent, {
18268
20213
  ...downstreamProps
18269
20214
  }),
18270
- !last && displayComma && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DataBox, {
20215
+ !last && displayComma && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DataBox, {
18271
20216
  children: ","
18272
20217
  }),
18273
20218
  isHover && expandable && !inspect && actionIcons,
@@ -18278,8 +20223,8 @@ var DataKeyPair = (props) => {
18278
20223
  };
18279
20224
  var query = "(prefers-color-scheme: dark)";
18280
20225
  function useThemeDetector() {
18281
- const [isDark, setIsDark] = (0, import_react52.useState)(false);
18282
- (0, import_react52.useEffect)(() => {
20226
+ const [isDark, setIsDark] = (0, import_react54.useState)(false);
20227
+ (0, import_react54.useEffect)(() => {
18283
20228
  const listener = (e2) => setIsDark(e2.matches);
18284
20229
  setIsDark(window.matchMedia(query).matches);
18285
20230
  const queryMedia = window.matchMedia(query);
@@ -18289,8 +20234,8 @@ function useThemeDetector() {
18289
20234
  return isDark;
18290
20235
  }
18291
20236
  function useSetIfNotUndefinedEffect(key, value) {
18292
- const { setState } = (0, import_react52.useContext)(JsonViewerStoreContext);
18293
- (0, import_react52.useEffect)(() => {
20237
+ const { setState } = (0, import_react54.useContext)(JsonViewerStoreContext);
20238
+ (0, import_react54.useEffect)(() => {
18294
20239
  if (value !== void 0) {
18295
20240
  setState({
18296
20241
  [key]: value
@@ -18303,8 +20248,8 @@ function useSetIfNotUndefinedEffect(key, value) {
18303
20248
  ]);
18304
20249
  }
18305
20250
  var JsonViewerInner = (props) => {
18306
- const { setState } = (0, import_react52.useContext)(JsonViewerStoreContext);
18307
- (0, import_react52.useEffect)(() => {
20251
+ const { setState } = (0, import_react54.useContext)(JsonViewerStoreContext);
20252
+ (0, import_react54.useEffect)(() => {
18308
20253
  setState((state) => ({
18309
20254
  prevValue: state.value,
18310
20255
  value: props.value
@@ -18332,7 +20277,7 @@ var JsonViewerInner = (props) => {
18332
20277
  useSetIfNotUndefinedEffect("displaySize", props.displaySize);
18333
20278
  useSetIfNotUndefinedEffect("displayComma", props.displayComma);
18334
20279
  useSetIfNotUndefinedEffect("highlightUpdates", props.highlightUpdates);
18335
- (0, import_react52.useEffect)(() => {
20280
+ (0, import_react54.useEffect)(() => {
18336
20281
  if (props.theme === "light") {
18337
20282
  setState({
18338
20283
  colorspace: lightColorspace
@@ -18350,13 +20295,13 @@ var JsonViewerInner = (props) => {
18350
20295
  setState,
18351
20296
  props.theme
18352
20297
  ]);
18353
- const themeCls = (0, import_react52.useMemo)(() => {
20298
+ const themeCls = (0, import_react54.useMemo)(() => {
18354
20299
  if (typeof props.theme === "object") return "json-viewer-theme-custom";
18355
20300
  return props.theme === "dark" ? "json-viewer-theme-dark" : "json-viewer-theme-light";
18356
20301
  }, [
18357
20302
  props.theme
18358
20303
  ]);
18359
- const onceRef = (0, import_react52.useRef)(true);
20304
+ const onceRef = (0, import_react54.useRef)(true);
18360
20305
  const registerTypes = useTypeRegistryStore((store) => store.registerTypes);
18361
20306
  if (onceRef.current) {
18362
20307
  const allTypes = props.valueTypes ? [
@@ -18368,7 +20313,7 @@ var JsonViewerInner = (props) => {
18368
20313
  registerTypes(allTypes);
18369
20314
  onceRef.current = false;
18370
20315
  }
18371
- (0, import_react52.useEffect)(() => {
20316
+ (0, import_react54.useEffect)(() => {
18372
20317
  const allTypes = props.valueTypes ? [
18373
20318
  ...predefinedTypes,
18374
20319
  ...props.valueTypes
@@ -18382,12 +20327,12 @@ var JsonViewerInner = (props) => {
18382
20327
  ]);
18383
20328
  const value = useJsonViewerStore((store) => store.value);
18384
20329
  const prevValue = useJsonViewerStore((store) => store.prevValue);
18385
- const emptyPath = (0, import_react52.useMemo)(() => [], []);
20330
+ const emptyPath = (0, import_react54.useMemo)(() => [], []);
18386
20331
  const setHover = useJsonViewerStore((store) => store.setHover);
18387
- const onMouseLeave = (0, import_react52.useCallback)(() => setHover(null), [
20332
+ const onMouseLeave = (0, import_react54.useCallback)(() => setHover(null), [
18388
20333
  setHover
18389
20334
  ]);
18390
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.Paper, {
20335
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.Paper, {
18391
20336
  elevation: 0,
18392
20337
  className: clsx(themeCls, props.className),
18393
20338
  style: props.style,
@@ -18398,7 +20343,7 @@ var JsonViewerInner = (props) => {
18398
20343
  ...props.sx
18399
20344
  },
18400
20345
  onMouseLeave,
18401
- children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DataKeyPair, {
20346
+ children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DataKeyPair, {
18402
20347
  value,
18403
20348
  prevValue,
18404
20349
  path: emptyPath,
@@ -18413,14 +20358,14 @@ var JsonViewer = function JsonViewer2(props) {
18413
20358
  }
18414
20359
  }
18415
20360
  const isAutoDarkTheme = useThemeDetector();
18416
- const themeType = (0, import_react52.useMemo)(() => {
20361
+ const themeType = (0, import_react54.useMemo)(() => {
18417
20362
  var _props_theme;
18418
20363
  return props.theme === "auto" ? isAutoDarkTheme ? "dark" : "light" : (_props_theme = props.theme) !== null && _props_theme !== void 0 ? _props_theme : "light";
18419
20364
  }, [
18420
20365
  isAutoDarkTheme,
18421
20366
  props.theme
18422
20367
  ]);
18423
- const theme = (0, import_react52.useMemo)(() => {
20368
+ const theme = (0, import_react54.useMemo)(() => {
18424
20369
  const backgroundColor = typeof themeType === "object" ? themeType.base00 : themeType === "dark" ? darkColorspace.base00 : lightColorspace.base00;
18425
20370
  const foregroundColor = typeof themeType === "object" ? themeType.base07 : themeType === "dark" ? darkColorspace.base07 : lightColorspace.base07;
18426
20371
  return (0, import_material12.createTheme)({
@@ -18448,15 +20393,15 @@ var JsonViewer = function JsonViewer2(props) {
18448
20393
  ...props,
18449
20394
  theme: themeType
18450
20395
  };
18451
- const jsonViewerStore = (0, import_react52.useMemo)(() => createJsonViewerStore(props), []);
18452
- const typeRegistryStore = (0, import_react52.useMemo)(() => createTypeRegistryStore(), []);
18453
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_material12.ThemeProvider, {
20396
+ const jsonViewerStore = (0, import_react54.useMemo)(() => createJsonViewerStore(props), []);
20397
+ const typeRegistryStore = (0, import_react54.useMemo)(() => createTypeRegistryStore(), []);
20398
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material12.ThemeProvider, {
18454
20399
  theme,
18455
- children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(TypeRegistryStoreContext.Provider, {
20400
+ children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(TypeRegistryStoreContext.Provider, {
18456
20401
  value: typeRegistryStore,
18457
- children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(JsonViewerStoreContext.Provider, {
20402
+ children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(JsonViewerStoreContext.Provider, {
18458
20403
  value: jsonViewerStore,
18459
- children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(JsonViewerInner, {
20404
+ children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(JsonViewerInner, {
18460
20405
  ...mixedProps
18461
20406
  })
18462
20407
  })
@@ -18465,8 +20410,8 @@ var JsonViewer = function JsonViewer2(props) {
18465
20410
  };
18466
20411
 
18467
20412
  // src/components/event-details/payload-viewer.tsx
18468
- var import_react53 = require("react");
18469
- var import_jsx_runtime135 = require("react/jsx-runtime");
20413
+ var import_react55 = require("react");
20414
+ var import_jsx_runtime136 = require("react/jsx-runtime");
18470
20415
  function tryParseJson(value) {
18471
20416
  if (typeof value !== "string") {
18472
20417
  return value;
@@ -18477,9 +20422,9 @@ function tryParseJson(value) {
18477
20422
  return value;
18478
20423
  }
18479
20424
  }
18480
- var PayloadViewer = (0, import_react53.memo)(({ sx, testId, value }) => {
20425
+ var PayloadViewer = (0, import_react55.memo)(({ sx, testId, value }) => {
18481
20426
  const theme = (0, import_material13.useTheme)();
18482
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_material13.Box, { "data-testid": testId, sx: { backgroundColor: "background.default", borderRadius: 1, fontSize: 12, overflow: "auto", p: 1, ...sx }, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
20427
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material13.Box, { "data-testid": testId, sx: { backgroundColor: "background.default", borderRadius: 1, fontSize: 12, overflow: "auto", p: 1, ...sx }, children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
18483
20428
  JsonViewer,
18484
20429
  {
18485
20430
  displayDataTypes: false,
@@ -18493,21 +20438,21 @@ var PayloadViewer = (0, import_react53.memo)(({ sx, testId, value }) => {
18493
20438
  });
18494
20439
 
18495
20440
  // src/components/event-details/event-detail.tsx
18496
- var import_jsx_runtime136 = require("react/jsx-runtime");
18497
- var DetailRow2 = ({ content, label }) => /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material14.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr", mb: 0.5 }, children: [
18498
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.Typography, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: label }),
18499
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.Box, { children: typeof content === "string" ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.Typography, { sx: { color: "text.primary", whiteSpace: "pre-wrap" }, variant: "caption", children: content }) : content })
20441
+ var import_jsx_runtime137 = require("react/jsx-runtime");
20442
+ var DetailRow2 = ({ content, label }) => /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material14.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "72px 1fr", mb: 0.5 }, children: [
20443
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material14.Typography, { color: "text.secondary", sx: { fontWeight: 600 }, variant: "caption", children: label }),
20444
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material14.Box, { children: typeof content === "string" ? /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material14.Typography, { sx: { color: "text.primary", whiteSpace: "pre-wrap" }, variant: "caption", children: content }) : content })
18500
20445
  ] });
18501
20446
  var EventMessage = ({ event }) => {
18502
- const [isOpen, setIsOpen] = (0, import_react54.useState)(false);
18503
- const [isOverflowing, setIsOverflowing] = (0, import_react54.useState)(false);
18504
- const textReference = (0, import_react54.useRef)(null);
18505
- const parsedMessage = (0, import_react54.useMemo)(() => parseEventMessage(event), [event]);
18506
- const isIAMPolicyEvent = (0, import_react54.useMemo)(
20447
+ const [isOpen, setIsOpen] = (0, import_react56.useState)(false);
20448
+ const [isOverflowing, setIsOverflowing] = (0, import_react56.useState)(false);
20449
+ const textReference = (0, import_react56.useRef)(null);
20450
+ const parsedMessage = (0, import_react56.useMemo)(() => parseEventMessage(event), [event]);
20451
+ const isIAMPolicyEvent = (0, import_react56.useMemo)(
18507
20452
  () => event.event_type === "iam.policy_evaluation" && event.attributes?.payload && typeof event.attributes.payload === "string",
18508
20453
  [event]
18509
20454
  );
18510
- (0, import_react54.useEffect)(() => {
20455
+ (0, import_react56.useEffect)(() => {
18511
20456
  const checkOverflow = () => {
18512
20457
  const element = textReference.current;
18513
20458
  if (element) {
@@ -18520,17 +20465,17 @@ var EventMessage = ({ event }) => {
18520
20465
  window.removeEventListener("resize", checkOverflow);
18521
20466
  };
18522
20467
  }, [parsedMessage.headline]);
18523
- const hasAdditionalContent = (0, import_react54.useMemo)(
20468
+ const hasAdditionalContent = (0, import_react56.useMemo)(
18524
20469
  () => parsedMessage.message || parsedMessage.details || isIAMPolicyEvent,
18525
20470
  [parsedMessage.message, parsedMessage.details, isIAMPolicyEvent]
18526
20471
  );
18527
- const shouldShowToggle = (0, import_react54.useMemo)(
20472
+ const shouldShowToggle = (0, import_react56.useMemo)(
18528
20473
  () => isOverflowing || hasAdditionalContent,
18529
20474
  [isOverflowing, hasAdditionalContent]
18530
20475
  );
18531
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material14.Box, { sx: { display: "flex", flexDirection: "column" }, children: [
18532
- /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material14.Box, { sx: { alignItems: "center", display: "flex" }, children: [
18533
- Boolean(shouldShowToggle) && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
20476
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material14.Box, { sx: { display: "flex", flexDirection: "column" }, children: [
20477
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material14.Box, { sx: { alignItems: "center", display: "flex" }, children: [
20478
+ Boolean(shouldShowToggle) && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
18534
20479
  import_material14.IconButton,
18535
20480
  {
18536
20481
  onClick: () => {
@@ -18538,10 +20483,10 @@ var EventMessage = ({ event }) => {
18538
20483
  },
18539
20484
  size: "small",
18540
20485
  sx: { mr: 1, p: 0 },
18541
- children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_icons_material7.KeyboardArrowDown, { sx: { fontSize: 16 } }) : /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_icons_material7.KeyboardArrowRight, { sx: { fontSize: 16 } })
20486
+ children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_icons_material7.KeyboardArrowDown, { sx: { fontSize: 16 } }) : /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_icons_material7.KeyboardArrowRight, { sx: { fontSize: 16 } })
18542
20487
  }
18543
20488
  ),
18544
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
20489
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
18545
20490
  import_material14.Typography,
18546
20491
  {
18547
20492
  ref: textReference,
@@ -18559,12 +20504,12 @@ var EventMessage = ({ event }) => {
18559
20504
  }
18560
20505
  )
18561
20506
  ] }),
18562
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.Box, { sx: { borderColor: "divider", borderLeft: "2px solid", ml: 1, mt: 0.5, pl: 1.5, py: 0.5 }, children: isIAMPolicyEvent ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(IAMEventDetail, { event }) : /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_jsx_runtime136.Fragment, { children: [
18563
- Boolean(parsedMessage.message) && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DetailRow2, { content: parsedMessage.message, label: "Message" }),
18564
- Boolean(parsedMessage.details) && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
20507
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material14.Box, { sx: { borderColor: "divider", borderLeft: "2px solid", ml: 1, mt: 0.5, pl: 1.5, py: 0.5 }, children: isIAMPolicyEvent ? /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(IAMEventDetail, { event }) : /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_jsx_runtime137.Fragment, { children: [
20508
+ Boolean(parsedMessage.message) && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(DetailRow2, { content: parsedMessage.message, label: "Message" }),
20509
+ Boolean(parsedMessage.details) && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
18565
20510
  DetailRow2,
18566
20511
  {
18567
- content: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(PayloadViewer, { sx: { px: 0 }, value: tryParseJson(parsedMessage.details) }),
20512
+ content: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(PayloadViewer, { sx: { px: 0 }, value: tryParseJson(parsedMessage.details) }),
18568
20513
  label: "Details"
18569
20514
  }
18570
20515
  )
@@ -18596,15 +20541,15 @@ var EventDetail = ({
18596
20541
  type
18597
20542
  }) => {
18598
20543
  if (type === "permission") {
18599
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(IAMPermissionDetail, { events });
20544
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(IAMPermissionDetail, { events });
18600
20545
  }
18601
20546
  const eventLevel = getEventLevelFromGroup(type);
18602
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material14.Box, { children: [
18603
- /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_material14.Box, { sx: { alignItems: "center", display: "flex", mb: 0.5 }, children: [
18604
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(StatusIcon, { errorLevel: eventLevel }),
18605
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.Typography, { color: "text.secondary", sx: { fontWeight: 600, ml: 0.5 }, variant: "caption", children: displayText })
20547
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material14.Box, { children: [
20548
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material14.Box, { sx: { alignItems: "center", display: "flex", mb: 0.5 }, children: [
20549
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(StatusIcon, { errorLevel: eventLevel }),
20550
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material14.Typography, { color: "text.secondary", sx: { fontWeight: 600, ml: 0.5 }, variant: "caption", children: displayText })
18606
20551
  ] }),
18607
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.Box, { children: events.map((event) => /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_material14.Box, { sx: { maxWidth: "100%", mb: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(EventMessage, { event }) }, `${event.span_id}-${event.event_id}`)) })
20552
+ /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material14.Box, { children: events.map((event) => /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material14.Box, { sx: { maxWidth: "100%", mb: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(EventMessage, { event }) }, `${event.span_id}-${event.event_id}`)) })
18608
20553
  ] });
18609
20554
  };
18610
20555
 
@@ -23933,7 +25878,7 @@ async function checkFeatures(context, config, args) {
23933
25878
  }
23934
25879
 
23935
25880
  // node_modules/@aws-sdk/middleware-user-agent/dist-es/constants.js
23936
- var USER_AGENT = "user-agent";
25881
+ var USER_AGENT2 = "user-agent";
23937
25882
  var X_AMZ_USER_AGENT = "x-amz-user-agent";
23938
25883
  var SPACE = " ";
23939
25884
  var UA_NAME_SEPARATOR = "/";
@@ -23985,9 +25930,9 @@ var userAgentMiddleware = (options) => (next, context) => async (args) => {
23985
25930
  ].join(SPACE);
23986
25931
  if (options.runtime !== "browser") {
23987
25932
  if (normalUAValue) {
23988
- headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT] ? `${headers[USER_AGENT]} ${normalUAValue}` : normalUAValue;
25933
+ headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT] ? `${headers[USER_AGENT2]} ${normalUAValue}` : normalUAValue;
23989
25934
  }
23990
- headers[USER_AGENT] = sdkUserAgentValue;
25935
+ headers[USER_AGENT2] = sdkUserAgentValue;
23991
25936
  } else {
23992
25937
  headers[X_AMZ_USER_AGENT] = sdkUserAgentValue;
23993
25938
  }
@@ -28296,8 +30241,8 @@ var QueryStatus = {
28296
30241
 
28297
30242
  // src/components/event-details/lambda-invoke-logs-section.tsx
28298
30243
  var import_material15 = require("@mui/material");
28299
- var import_react55 = require("react");
28300
- var import_jsx_runtime137 = require("react/jsx-runtime");
30244
+ var import_react57 = require("react");
30245
+ var import_jsx_runtime138 = require("react/jsx-runtime");
28301
30246
  var POLL_INTERVAL_MS = 1e3;
28302
30247
  async function pollQueryResults(client, queryId) {
28303
30248
  return client.send(new GetQueryResultsCommand({ queryId }));
@@ -28314,7 +30259,7 @@ async function startLambdaLogsQuery(client, functionName2, requestId, startTimeS
28314
30259
  }
28315
30260
  function useCloudWatchLogsClient(region) {
28316
30261
  const { localstackEndpoint } = useAppInspector();
28317
- const client = (0, import_react55.useMemo)(() => new CloudWatchLogsClient({
30262
+ const client = (0, import_react57.useMemo)(() => new CloudWatchLogsClient({
28318
30263
  credentials: {
28319
30264
  accessKeyId: "test",
28320
30265
  secretAccessKey: "test"
@@ -28325,12 +30270,12 @@ function useCloudWatchLogsClient(region) {
28325
30270
  return client;
28326
30271
  }
28327
30272
  function useLambdaInvokeLogs(functionName2, requestId, region, startTimeNano, endTimeNano) {
28328
- const [loading, setLoading] = (0, import_react55.useState)(true);
28329
- const [logs, setLogs] = (0, import_react55.useState)([]);
28330
- const [error, setError] = (0, import_react55.useState)();
28331
- const pollTimerRef = (0, import_react55.useRef)(null);
30273
+ const [loading, setLoading] = (0, import_react57.useState)(true);
30274
+ const [logs, setLogs] = (0, import_react57.useState)([]);
30275
+ const [error, setError] = (0, import_react57.useState)();
30276
+ const pollTimerRef = (0, import_react57.useRef)(null);
28332
30277
  const cloudWatchLogs = useCloudWatchLogsClient(region);
28333
- (0, import_react55.useEffect)(() => {
30278
+ (0, import_react57.useEffect)(() => {
28334
30279
  let cancelled = false;
28335
30280
  const startTimeSec = Math.floor(Number(BigInt(startTimeNano) / BigInt(1e9)));
28336
30281
  const endTimeSec = Math.ceil(Number(BigInt(endTimeNano) / BigInt(1e9)));
@@ -28387,29 +30332,29 @@ function useLambdaInvokeLogs(functionName2, requestId, region, startTimeNano, en
28387
30332
  var LambdaInvokeLogsSection = ({ endTimeNano, functionName: functionName2, region, requestId, startTimeNano }) => {
28388
30333
  const { error, loading, logs } = useLambdaInvokeLogs(functionName2, requestId, region, startTimeNano, endTimeNano);
28389
30334
  if (loading) {
28390
- return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_material15.Stack, { alignItems: "center", direction: "row", spacing: 1, children: [
28391
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material15.CircularProgress, { size: 14 }),
28392
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material15.Typography, { color: "text.secondary", variant: "body2", children: "Loading logs\u2026" })
30335
+ return /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material15.Stack, { alignItems: "center", direction: "row", spacing: 1, children: [
30336
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material15.CircularProgress, { size: 14 }),
30337
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material15.Typography, { color: "text.secondary", variant: "body2", children: "Loading logs\u2026" })
28393
30338
  ] });
28394
30339
  }
28395
30340
  if (error !== void 0) {
28396
- return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material15.Typography, { color: "error", variant: "body2", children: error.message });
30341
+ return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material15.Typography, { color: "error", variant: "body2", children: error.message });
28397
30342
  }
28398
30343
  if (logs.length === 0) {
28399
- return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material15.Typography, { color: "text.secondary", variant: "body2", children: "No logs found for this invocation." });
30344
+ return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material15.Typography, { color: "text.secondary", variant: "body2", children: "No logs found for this invocation." });
28400
30345
  }
28401
- return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material15.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: logs.map((log) => /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(import_material15.Typography, { variant: "body2", children: `[${log.timestamp}] ${log.message}` }, log.ptr)) }) });
30346
+ return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material15.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: logs.map((log) => /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material15.Typography, { variant: "body2", children: `[${log.timestamp}] ${log.message}` }, log.ptr)) }) });
28402
30347
  };
28403
30348
 
28404
30349
  // src/components/event-details/toggle-section.tsx
28405
30350
  var import_icons_material8 = require("@mui/icons-material");
28406
30351
  var import_material16 = require("@mui/material");
28407
- var import_react56 = require("react");
28408
- var import_jsx_runtime138 = require("react/jsx-runtime");
30352
+ var import_react58 = require("react");
30353
+ var import_jsx_runtime139 = require("react/jsx-runtime");
28409
30354
  var ToggleSection = ({ action, children, headline, initialOpen = true }) => {
28410
- const [isOpen, setIsOpen] = (0, import_react56.useState)(initialOpen);
28411
- return /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_material16.Box, { sx: { mt: 4 }, children: [
28412
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
30355
+ const [isOpen, setIsOpen] = (0, import_react58.useState)(initialOpen);
30356
+ return /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material16.Box, { sx: { mt: 4 }, children: [
30357
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
28413
30358
  import_material16.Box,
28414
30359
  {
28415
30360
  onClick: () => {
@@ -28423,7 +30368,7 @@ var ToggleSection = ({ action, children, headline, initialOpen = true }) => {
28423
30368
  mb: 1
28424
30369
  },
28425
30370
  children: [
28426
- /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
30371
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
28427
30372
  import_material16.Box,
28428
30373
  {
28429
30374
  role: "button",
@@ -28433,23 +30378,23 @@ var ToggleSection = ({ action, children, headline, initialOpen = true }) => {
28433
30378
  gap: 1
28434
30379
  },
28435
30380
  children: [
28436
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Typography, { sx: { fontWeight: 600 }, variant: "subtitle2", children: headline }),
28437
- isOpen ? /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_icons_material8.KeyboardArrowDown, { sx: { color: "text.secondary", height: 20, width: 20 } }) : /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_icons_material8.KeyboardArrowRight, { sx: { color: "text.secondary", height: 20, width: 20 } })
30381
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material16.Typography, { sx: { fontWeight: 600 }, variant: "subtitle2", children: headline }),
30382
+ isOpen ? /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_icons_material8.KeyboardArrowDown, { sx: { color: "text.secondary", height: 20, width: 20 } }) : /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_icons_material8.KeyboardArrowRight, { sx: { color: "text.secondary", height: 20, width: 20 } })
28438
30383
  ]
28439
30384
  }
28440
30385
  ),
28441
- action !== false && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Box, { onClick: (event) => {
30386
+ action !== false && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material16.Box, { onClick: (event) => {
28442
30387
  event.stopPropagation();
28443
30388
  }, children: action })
28444
30389
  ]
28445
30390
  }
28446
30391
  ),
28447
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_material16.Box, { children })
30392
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material16.Box, { children })
28448
30393
  ] });
28449
30394
  };
28450
30395
 
28451
30396
  // src/components/event-details/event-details.tsx
28452
- var import_jsx_runtime139 = require("react/jsx-runtime");
30397
+ var import_jsx_runtime140 = require("react/jsx-runtime");
28453
30398
  var checkIsLambdaInvoke = (span) => {
28454
30399
  if (span.service_name !== "lambda") {
28455
30400
  return false;
@@ -28464,13 +30409,13 @@ var checkIsSqsSendMessage = (span) => {
28464
30409
  return span.operation_name.startsWith("SendMessage");
28465
30410
  };
28466
30411
  var EventDetails = ({ onClose, selectedEvent }) => {
28467
- const eventGroups = (0, import_react57.useMemo)(
30412
+ const eventGroups = (0, import_react59.useMemo)(
28468
30413
  () => getEventGroupsByType(selectedEvent?.events ?? []),
28469
30414
  [selectedEvent?.events]
28470
30415
  );
28471
- const [parseNestedJson, setParseNestedJson] = (0, import_react57.useState)(true);
30416
+ const [parseNestedJson, setParseNestedJson] = (0, import_react59.useState)(true);
28472
30417
  if (!selectedEvent) {
28473
- return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Box, { sx: { p: 3, textAlign: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Typography, { color: "text.secondary", variant: "body2", children: "Select an event to view details" }) });
30418
+ return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Box, { sx: { p: 3, textAlign: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { color: "text.secondary", variant: "body2", children: "Select an event to view details" }) });
28474
30419
  }
28475
30420
  const isLambdaInvoke = checkIsLambdaInvoke(selectedEvent);
28476
30421
  const isSqsSendMessage = checkIsSqsSendMessage(selectedEvent);
@@ -28492,8 +30437,8 @@ var EventDetails = ({ onClose, selectedEvent }) => {
28492
30437
  const exceptionPayload = tryParseJson(selectedEvent.attributes?.["localstack.aws.service.exception"]);
28493
30438
  const hasPayloads = requestPayload !== void 0 || responsePayload !== void 0 || exceptionPayload !== void 0 || isResponseSuppressed;
28494
30439
  const duration = selectedEvent.end_time_unix_nano ? ((BigInt(selectedEvent.end_time_unix_nano) - BigInt(selectedEvent.start_time_unix_nano)) / BigInt("1000000")).toString() : void 0;
28495
- return /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material17.Box, { "data-testid": EVENT_DETAILS_TEST_ID, sx: { display: "flex", flexDirection: "column", height: "100%" }, children: [
28496
- /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
30440
+ return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material17.Box, { "data-testid": EVENT_DETAILS_TEST_ID, sx: { display: "flex", flexDirection: "column", height: "100%" }, children: [
30441
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
28497
30442
  import_material17.Box,
28498
30443
  {
28499
30444
  sx: {
@@ -28506,57 +30451,57 @@ var EventDetails = ({ onClose, selectedEvent }) => {
28506
30451
  py: 1
28507
30452
  },
28508
30453
  children: [
28509
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "h6", children: "Operation Details" }) }),
28510
- onClose && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.IconButton, { "data-testid": EVENT_DETAILS_CLOSE_BUTTON_TEST_ID, onClick: onClose, size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_icons_material9.Close, {}) })
30454
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "h6", children: "Operation Details" }) }),
30455
+ onClose && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.IconButton, { "data-testid": EVENT_DETAILS_CLOSE_BUTTON_TEST_ID, onClick: onClose, size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_icons_material9.Close, {}) })
28511
30456
  ]
28512
30457
  }
28513
30458
  ),
28514
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Box, { sx: { flexGrow: 1, overflow: "auto", p: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material17.Stack, { spacing: 2, children: [
28515
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(ToggleSection, { headline: "Basic Information", children: /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material17.Stack, { "data-testid": EVENT_DETAILS_SECTION_BASIC_INFORMATION_TEST_ID, spacing: 1, children: [
28516
- /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material17.Box, { sx: { display: "grid", gap: 2, gridTemplateColumns: "1.3fr 1fr" }, children: [
28517
- /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material17.Box, { children: [
28518
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Service" }),
28519
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Typography, { "data-testid": EVENT_DETAILS_SERVICE_NAME_TEST_ID, variant: "body2", children: selectedEvent.service_name })
30459
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Box, { sx: { flexGrow: 1, overflow: "auto", p: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material17.Stack, { spacing: 2, children: [
30460
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(ToggleSection, { headline: "Basic Information", children: /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material17.Stack, { "data-testid": EVENT_DETAILS_SECTION_BASIC_INFORMATION_TEST_ID, spacing: 1, children: [
30461
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material17.Box, { sx: { display: "grid", gap: 2, gridTemplateColumns: "1.3fr 1fr" }, children: [
30462
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material17.Box, { children: [
30463
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Service" }),
30464
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { "data-testid": EVENT_DETAILS_SERVICE_NAME_TEST_ID, variant: "body2", children: selectedEvent.service_name })
28520
30465
  ] }),
28521
- /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material17.Box, { children: [
28522
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Operation" }),
28523
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Typography, { "data-testid": EVENT_DETAILS_OPERATION_NAME_TEST_ID, variant: "body2", children: selectedEvent.operation_name })
30466
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material17.Box, { children: [
30467
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Operation" }),
30468
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { "data-testid": EVENT_DETAILS_OPERATION_NAME_TEST_ID, variant: "body2", children: selectedEvent.operation_name })
28524
30469
  ] })
28525
30470
  ] }),
28526
- /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material17.Box, { children: [
28527
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Resource" }),
28528
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Typography, { "data-testid": EVENT_DETAILS_RESOURCE_NAME_TEST_ID, variant: "body2", children: selectedEvent.resource_name })
30471
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material17.Box, { children: [
30472
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Resource" }),
30473
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { "data-testid": EVENT_DETAILS_RESOURCE_NAME_TEST_ID, variant: "body2", children: selectedEvent.resource_name })
28529
30474
  ] }),
28530
- Boolean(resourceArn) && /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material17.Box, { children: [
28531
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Resource ARN" }),
28532
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Typography, { "data-testid": EVENT_DETAILS_RESOURCE_ARN_TEST_ID, variant: "body2", children: resourceArn })
30475
+ Boolean(resourceArn) && /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material17.Box, { children: [
30476
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Resource ARN" }),
30477
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { "data-testid": EVENT_DETAILS_RESOURCE_ARN_TEST_ID, variant: "body2", children: resourceArn })
28533
30478
  ] }),
28534
- /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material17.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "1.3fr 1fr" }, children: [
28535
- /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material17.Box, { children: [
28536
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Account" }),
28537
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Typography, { "data-testid": EVENT_DETAILS_ACCOUNT_TEST_ID, variant: "body2", children: selectedEvent.account_id })
30479
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material17.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: "1.3fr 1fr" }, children: [
30480
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material17.Box, { children: [
30481
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Account" }),
30482
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { "data-testid": EVENT_DETAILS_ACCOUNT_TEST_ID, variant: "body2", children: selectedEvent.account_id })
28538
30483
  ] }),
28539
- /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material17.Box, { children: [
28540
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Region" }),
28541
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Typography, { "data-testid": EVENT_DETAILS_REGION_TEST_ID, variant: "body2", children: selectedEvent.region })
30484
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material17.Box, { children: [
30485
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Region" }),
30486
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { "data-testid": EVENT_DETAILS_REGION_TEST_ID, variant: "body2", children: selectedEvent.region })
28542
30487
  ] })
28543
30488
  ] }),
28544
- /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material17.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: duration === void 0 ? "1fr" : "1.3fr 1fr" }, children: [
28545
- /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material17.Box, { children: [
28546
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Start Time" }),
28547
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Typography, { "data-testid": EVENT_DETAILS_START_TIME_TEST_ID, variant: "body2", children: unixNanoToDate(selectedEvent.start_time_unix_nano)?.toISOString() })
30489
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material17.Box, { sx: { display: "grid", gap: 1, gridTemplateColumns: duration === void 0 ? "1fr" : "1.3fr 1fr" }, children: [
30490
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material17.Box, { children: [
30491
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Start Time" }),
30492
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { "data-testid": EVENT_DETAILS_START_TIME_TEST_ID, variant: "body2", children: unixNanoToDate(selectedEvent.start_time_unix_nano)?.toISOString() })
28548
30493
  ] }),
28549
- duration !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material17.Box, { children: [
28550
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Duration" }),
28551
- /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material17.Typography, { "data-testid": EVENT_DETAILS_DURATION_TEST_ID, variant: "body2", children: [
30494
+ duration !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material17.Box, { children: [
30495
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Duration" }),
30496
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material17.Typography, { "data-testid": EVENT_DETAILS_DURATION_TEST_ID, variant: "body2", children: [
28552
30497
  duration,
28553
30498
  "ms"
28554
30499
  ] })
28555
30500
  ] })
28556
30501
  ] }),
28557
- /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material17.Box, { children: [
28558
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Status" }),
28559
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Stack, { alignItems: "center", direction: "row", flexWrap: "wrap", gap: 1, sx: { mb: eventGroups.errors || eventGroups.warnings ? 1 : 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
30502
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material17.Box, { children: [
30503
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Status" }),
30504
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Stack, { alignItems: "center", direction: "row", flexWrap: "wrap", gap: 1, sx: { mb: eventGroups.errors || eventGroups.warnings ? 1 : 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
28560
30505
  import_material17.Chip,
28561
30506
  {
28562
30507
  color: selectedEvent.status_code === 2 ? "error" : selectedEvent.status_code === 1 ? "success" : "default",
@@ -28567,50 +30512,50 @@ var EventDetails = ({ onClose, selectedEvent }) => {
28567
30512
  ) })
28568
30513
  ] })
28569
30514
  ] }) }),
28570
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Divider, {}),
28571
- /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(ToggleSection, { headline: "Permissions", children: [
28572
- selectedEvent.iam_errors_suppressed && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Alert, { "data-testid": EVENT_DETAILS_IAM_ERRORS_SUPPRESSED_TEST_ID, severity: "warning", sx: { mb: 1 }, children: "IAM errors are suppressed \u2014 upgrade your license to view" }),
28573
- !selectedEvent.iam_errors_suppressed && !eventGroups.permissions && !eventGroups.errors && !eventGroups.warnings && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Typography, { color: "text.secondary", variant: "body2", children: "There is no permission information available." }),
28574
- eventGroups.permissions && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(EventDetail, { displayText: "Permissions", events: eventGroups.permissions, type: "permission" }),
28575
- eventGroups.errors && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(EventDetail, { displayText: "Error", events: eventGroups.errors, type: "error" }),
28576
- eventGroups.warnings && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(EventDetail, { displayText: "Warning", events: eventGroups.warnings, type: "warning" })
30515
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Divider, {}),
30516
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(ToggleSection, { headline: "Permissions", children: [
30517
+ selectedEvent.iam_errors_suppressed && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Alert, { "data-testid": EVENT_DETAILS_IAM_ERRORS_SUPPRESSED_TEST_ID, severity: "warning", sx: { mb: 1 }, children: "IAM errors are suppressed \u2014 upgrade your license to view" }),
30518
+ !selectedEvent.iam_errors_suppressed && !eventGroups.permissions && !eventGroups.errors && !eventGroups.warnings && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { color: "text.secondary", variant: "body2", children: "There is no permission information available." }),
30519
+ eventGroups.permissions && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(EventDetail, { displayText: "Permissions", events: eventGroups.permissions, type: "permission" }),
30520
+ eventGroups.errors && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(EventDetail, { displayText: "Error", events: eventGroups.errors, type: "error" }),
30521
+ eventGroups.warnings && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(EventDetail, { displayText: "Warning", events: eventGroups.warnings, type: "warning" })
28577
30522
  ] }),
28578
- hasPayloads && /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_jsx_runtime139.Fragment, { children: [
28579
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Divider, {}),
28580
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
30523
+ hasPayloads && /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_jsx_runtime140.Fragment, { children: [
30524
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Divider, {}),
30525
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
28581
30526
  ToggleSection,
28582
30527
  {
28583
- action: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
30528
+ action: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
28584
30529
  import_material17.FormControlLabel,
28585
30530
  {
28586
- control: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Switch, { checked: !parseNestedJson, onChange: (event) => {
30531
+ control: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Switch, { checked: !parseNestedJson, onChange: (event) => {
28587
30532
  setParseNestedJson(!event.target.checked);
28588
30533
  }, size: "small" }),
28589
- label: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Typography, { variant: "caption", children: "View raw data" }),
30534
+ label: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { variant: "caption", children: "View raw data" }),
28590
30535
  sx: { mr: 0 }
28591
30536
  }
28592
30537
  ),
28593
30538
  headline: "Payloads",
28594
- children: /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material17.Stack, { spacing: 2, children: [
28595
- requestPayload !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material17.Box, { children: [
28596
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Request" }),
28597
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(PayloadViewer, { testId: EVENT_DETAILS_REQUEST_PAYLOAD, value: requestPayload })
30539
+ children: /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material17.Stack, { spacing: 2, children: [
30540
+ requestPayload !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material17.Box, { children: [
30541
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Request" }),
30542
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(PayloadViewer, { testId: EVENT_DETAILS_REQUEST_PAYLOAD, value: requestPayload })
28598
30543
  ] }),
28599
- (responsePayload !== void 0 || isResponseSuppressed) && /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material17.Box, { children: [
28600
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Response" }),
28601
- isResponseSuppressed ? /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Box, { sx: { py: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Alert, { severity: "warning", sx: { mb: 1 }, children: "Response payload is available \u2014 upgrade your license to view" }) }) : /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(PayloadViewer, { testId: EVENT_DETAILS_RESPONSE_PAYLOAD_TEST_ID, value: responsePayload })
30544
+ (responsePayload !== void 0 || isResponseSuppressed) && /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material17.Box, { children: [
30545
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Response" }),
30546
+ isResponseSuppressed ? /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Box, { sx: { py: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Alert, { severity: "warning", sx: { mb: 1 }, children: "Response payload is available \u2014 upgrade your license to view" }) }) : /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(PayloadViewer, { testId: EVENT_DETAILS_RESPONSE_PAYLOAD_TEST_ID, value: responsePayload })
28602
30547
  ] }),
28603
- exceptionPayload !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material17.Box, { children: [
28604
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Exception" }),
28605
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(PayloadViewer, { testId: EVENT_DETAILS_EXCEPTION_PAYLOAD_TEST_ID, value: exceptionPayload })
30548
+ exceptionPayload !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material17.Box, { children: [
30549
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Exception" }),
30550
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(PayloadViewer, { testId: EVENT_DETAILS_EXCEPTION_PAYLOAD_TEST_ID, value: exceptionPayload })
28606
30551
  ] })
28607
30552
  ] })
28608
30553
  }
28609
30554
  )
28610
30555
  ] }),
28611
- isLambdaInvoke && requestId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_jsx_runtime139.Fragment, { children: [
28612
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Divider, {}),
28613
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(ToggleSection, { headline: "Lambda Logs", children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
30556
+ isLambdaInvoke && requestId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_jsx_runtime140.Fragment, { children: [
30557
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Divider, {}),
30558
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(ToggleSection, { headline: "Lambda Logs", children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
28614
30559
  LambdaInvokeLogsSection,
28615
30560
  {
28616
30561
  endTimeNano: selectedEvent.end_time_unix_nano ?? selectedEvent.start_time_unix_nano,
@@ -28621,21 +30566,21 @@ var EventDetails = ({ onClose, selectedEvent }) => {
28621
30566
  }
28622
30567
  ) })
28623
30568
  ] }),
28624
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Divider, {}),
28625
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(ToggleSection, { headline: "Advanced Information", initialOpen: false, children: /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material17.Stack, { spacing: 1, children: [
28626
- /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material17.Box, { children: [
28627
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Span ID" }),
28628
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Typography, { "data-testid": EVENT_DETAILS_SPAN_ID_TEST_ID, variant: "body2", children: selectedEvent.span_id })
30569
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Divider, {}),
30570
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(ToggleSection, { headline: "Advanced Information", initialOpen: false, children: /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material17.Stack, { spacing: 1, children: [
30571
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material17.Box, { children: [
30572
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Span ID" }),
30573
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { "data-testid": EVENT_DETAILS_SPAN_ID_TEST_ID, variant: "body2", children: selectedEvent.span_id })
28629
30574
  ] }),
28630
- /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material17.Box, { children: [
28631
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Trace ID" }),
28632
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Typography, { "data-testid": EVENT_DETAILS_TRACE_ID_TEST_ID, variant: "body2", children: selectedEvent.trace_id })
30575
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material17.Box, { children: [
30576
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Trace ID" }),
30577
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { "data-testid": EVENT_DETAILS_TRACE_ID_TEST_ID, variant: "body2", children: selectedEvent.trace_id })
28633
30578
  ] }),
28634
- requestId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_material17.Box, { children: [
28635
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Request ID" }),
28636
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_material17.Typography, { "data-testid": EVENT_DETAILS_REQUEST_ID_TEST_ID, variant: "body2", children: requestId })
30579
+ requestId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_material17.Box, { children: [
30580
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { sx: { fontWeight: 600 }, variant: "caption", children: "Request ID" }),
30581
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material17.Typography, { "data-testid": EVENT_DETAILS_REQUEST_ID_TEST_ID, variant: "body2", children: requestId })
28637
30582
  ] }),
28638
- eventGroups.info && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(EventDetail, { displayText: "Info", events: eventGroups.info, type: "info" })
30583
+ eventGroups.info && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(EventDetail, { displayText: "Info", events: eventGroups.info, type: "info" })
28639
30584
  ] }) })
28640
30585
  ] }) })
28641
30586
  ] });
@@ -28644,35 +30589,35 @@ var EventDetails = ({ onClose, selectedEvent }) => {
28644
30589
  // src/components/trace-graph/trace-graph.tsx
28645
30590
  var import_base = require("@xyflow/react/dist/base.css");
28646
30591
  var import_material21 = require("@mui/material");
28647
- var import_react63 = require("@xyflow/react");
28648
- var import_react64 = require("react");
30592
+ var import_react65 = require("@xyflow/react");
30593
+ var import_react66 = require("react");
28649
30594
 
28650
30595
  // src/components/trace-graph/service-node.tsx
28651
30596
  var import_material19 = require("@mui/material");
28652
30597
  var import_style = require("@xyflow/react/dist/style.css");
28653
- var import_react59 = require("@xyflow/react");
28654
- var import_react60 = require("react");
30598
+ var import_react61 = require("@xyflow/react");
30599
+ var import_react62 = require("react");
28655
30600
 
28656
30601
  // src/components/trace-graph/problem-indicator.tsx
28657
30602
  var import_icons_material10 = require("@mui/icons-material");
28658
30603
  var import_material18 = require("@mui/material");
28659
- var import_react58 = require("react");
28660
- var import_jsx_runtime140 = require("react/jsx-runtime");
30604
+ var import_react60 = require("react");
30605
+ var import_jsx_runtime141 = require("react/jsx-runtime");
28661
30606
  var ProblemIndicator = ({ error }) => {
28662
- const icon = (0, import_react58.useMemo)(() => {
30607
+ const icon = (0, import_react60.useMemo)(() => {
28663
30608
  switch (error.level) {
28664
30609
  case "error": {
28665
- return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_icons_material10.Error, { sx: { color: "#d32f2f", fontSize: "14px" } });
30610
+ return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_icons_material10.Error, { sx: { color: "#d32f2f", fontSize: "14px" } });
28666
30611
  }
28667
30612
  case "warning": {
28668
- return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_icons_material10.Warning, { sx: { color: "#ff9800", fontSize: "14px" } });
30613
+ return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_icons_material10.Warning, { sx: { color: "#ff9800", fontSize: "14px" } });
28669
30614
  }
28670
30615
  default: {
28671
- return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_icons_material10.Info, { sx: { color: "#2196f3", fontSize: "14px" } });
30616
+ return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_icons_material10.Info, { sx: { color: "#2196f3", fontSize: "14px" } });
28672
30617
  }
28673
30618
  }
28674
30619
  }, [error.level]);
28675
- const color2 = (0, import_react58.useMemo)(() => {
30620
+ const color2 = (0, import_react60.useMemo)(() => {
28676
30621
  switch (error.level) {
28677
30622
  case "error": {
28678
30623
  return "#d32f2f";
@@ -28685,7 +30630,7 @@ var ProblemIndicator = ({ error }) => {
28685
30630
  }
28686
30631
  }
28687
30632
  }, [error.level]);
28688
- return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_material18.Tooltip, { arrow: true, title: error.message ?? "Issue detected", children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
30633
+ return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material18.Tooltip, { arrow: true, title: error.message ?? "Issue detected", children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
28689
30634
  import_material18.Box,
28690
30635
  {
28691
30636
  sx: {
@@ -28705,16 +30650,16 @@ var ProblemIndicator = ({ error }) => {
28705
30650
  };
28706
30651
 
28707
30652
  // src/components/trace-graph/service-node.tsx
28708
- var import_jsx_runtime141 = require("react/jsx-runtime");
30653
+ var import_jsx_runtime142 = require("react/jsx-runtime");
28709
30654
  var handleStyle = {
28710
30655
  backgroundColor: "white",
28711
30656
  borderColor: "lightgray",
28712
30657
  opacity: 0
28713
30658
  };
28714
- var ServiceNode = (0, import_react60.memo)(({ data, selected }) => {
30659
+ var ServiceNode = (0, import_react62.memo)(({ data, selected }) => {
28715
30660
  const theme = (0, import_material19.useTheme)();
28716
30661
  const hasErrors = (data.event.errors && data.event.errors.length > 0) ?? false;
28717
- return /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
30662
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
28718
30663
  import_material19.Box,
28719
30664
  {
28720
30665
  "data-testid": SERVICE_NODE_TEST_ID,
@@ -28737,18 +30682,18 @@ var ServiceNode = (0, import_react60.memo)(({ data, selected }) => {
28737
30682
  },
28738
30683
  tabIndex: 0,
28739
30684
  children: [
28740
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_react59.Handle, { position: import_react59.Position.Left, style: handleStyle, type: "target" }),
28741
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_react59.Handle, { position: import_react59.Position.Right, style: handleStyle, type: "source" }),
28742
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
30685
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_react61.Handle, { position: import_react61.Position.Left, style: handleStyle, type: "target" }),
30686
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_react61.Handle, { position: import_react61.Position.Right, style: handleStyle, type: "source" }),
30687
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
28743
30688
  import_material19.Stack,
28744
30689
  {
28745
30690
  alignItems: "center",
28746
30691
  direction: "row",
28747
30692
  sx: { gap: "8px", pb: "2px", pt: "6px", px: "8px" },
28748
30693
  children: [
28749
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Box, { sx: { borderRadius: "4px", flexShrink: 0, lineHeight: 0, overflow: "hidden" }, children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(AwsServiceIcon, { hideTooltip: true, service: data.event.service_name, size: "medium" }) }),
28750
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_material19.Stack, { sx: { minWidth: 0 }, children: [
28751
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
30694
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Box, { sx: { borderRadius: "4px", flexShrink: 0, lineHeight: 0, overflow: "hidden" }, children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(AwsServiceIcon, { hideTooltip: true, service: data.event.service_name, size: "medium" }) }),
30695
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_material19.Stack, { sx: { minWidth: 0 }, children: [
30696
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
28752
30697
  import_material19.Typography,
28753
30698
  {
28754
30699
  noWrap: true,
@@ -28757,7 +30702,7 @@ var ServiceNode = (0, import_react60.memo)(({ data, selected }) => {
28757
30702
  children: data.event.service_name
28758
30703
  }
28759
30704
  ),
28760
- data.event.resource_name != "" && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
30705
+ data.event.resource_name != "" && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
28761
30706
  import_material19.Typography,
28762
30707
  {
28763
30708
  color: "text.secondary",
@@ -28771,15 +30716,15 @@ var ServiceNode = (0, import_react60.memo)(({ data, selected }) => {
28771
30716
  ]
28772
30717
  }
28773
30718
  ),
28774
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_material19.Divider, { sx: { ml: "38px", mr: "8px", my: "5px" } }),
28775
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
30719
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_material19.Divider, { sx: { ml: "38px", mr: "8px", my: "5px" } }),
30720
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
28776
30721
  import_material19.Stack,
28777
30722
  {
28778
30723
  alignItems: "center",
28779
30724
  direction: "row",
28780
30725
  sx: { minWidth: 0, pb: "5px", pr: "8px", pt: "1px" },
28781
30726
  children: [
28782
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
30727
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
28783
30728
  import_material19.Box,
28784
30729
  {
28785
30730
  sx: {
@@ -28789,10 +30734,10 @@ var ServiceNode = (0, import_react60.memo)(({ data, selected }) => {
28789
30734
  justifyContent: "center",
28790
30735
  width: "38px"
28791
30736
  },
28792
- children: hasErrors && data.event.errors?.map((error) => /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(ProblemIndicator, { error }, error.span_id))
30737
+ children: hasErrors && data.event.errors?.map((error) => /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(ProblemIndicator, { error }, error.span_id))
28793
30738
  }
28794
30739
  ),
28795
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
30740
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
28796
30741
  import_material19.Typography,
28797
30742
  {
28798
30743
  "data-testid": SERVICE_NODE_OPERATION_NAME_TEST_ID,
@@ -28867,18 +30812,18 @@ var getLayoutedNodesAndEdges = (inputNodes, inputEdges, order2 = "oldest_first")
28867
30812
  // src/components/trace-graph/xyflow/controls.tsx
28868
30813
  var import_icons_material11 = require("@mui/icons-material");
28869
30814
  var import_material20 = require("@mui/material");
28870
- var import_react61 = require("@xyflow/react");
28871
- var import_react62 = require("react");
30815
+ var import_react63 = require("@xyflow/react");
30816
+ var import_react64 = require("react");
28872
30817
  var import_shallow = require("zustand/shallow");
28873
- var import_jsx_runtime142 = require("react/jsx-runtime");
30818
+ var import_jsx_runtime143 = require("react/jsx-runtime");
28874
30819
  var selector = (s2) => ({
28875
30820
  isInteractive: s2.nodesDraggable || s2.nodesConnectable || s2.elementsSelectable,
28876
30821
  maxZoomReached: s2.transform[2] >= s2.maxZoom,
28877
30822
  minZoomReached: s2.transform[2] <= s2.minZoom
28878
30823
  });
28879
- var Controls = (0, import_react62.memo)(() => {
28880
- const { maxZoomReached, minZoomReached } = (0, import_react61.useStore)(selector, import_shallow.shallow);
28881
- const { fitView, zoomIn, zoomOut } = (0, import_react61.useReactFlow)();
30824
+ var Controls = (0, import_react64.memo)(() => {
30825
+ const { maxZoomReached, minZoomReached } = (0, import_react63.useStore)(selector, import_shallow.shallow);
30826
+ const { fitView, zoomIn, zoomOut } = (0, import_react63.useReactFlow)();
28882
30827
  const onZoomInHandler = () => {
28883
30828
  void zoomIn();
28884
30829
  };
@@ -28888,7 +30833,7 @@ var Controls = (0, import_react62.memo)(() => {
28888
30833
  const onFitViewHandler = () => {
28889
30834
  void fitView();
28890
30835
  };
28891
- return /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
30836
+ return /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(
28892
30837
  import_material20.Box,
28893
30838
  {
28894
30839
  sx: {
@@ -28902,33 +30847,33 @@ var Controls = (0, import_react62.memo)(() => {
28902
30847
  zIndex: 5
28903
30848
  },
28904
30849
  children: [
28905
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
30850
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
28906
30851
  import_material20.IconButton,
28907
30852
  {
28908
30853
  className: "react-flow__controls-zoomin",
28909
30854
  disabled: maxZoomReached,
28910
30855
  onClick: onZoomInHandler,
28911
30856
  size: "small",
28912
- children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_icons_material11.Add, {})
30857
+ children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_icons_material11.Add, {})
28913
30858
  }
28914
30859
  ),
28915
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
30860
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
28916
30861
  import_material20.IconButton,
28917
30862
  {
28918
30863
  className: "react-flow__controls-zoomout",
28919
30864
  disabled: minZoomReached,
28920
30865
  onClick: onZoomOutHandler,
28921
30866
  size: "small",
28922
- children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_icons_material11.Remove, {})
30867
+ children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_icons_material11.Remove, {})
28923
30868
  }
28924
30869
  ),
28925
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
30870
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
28926
30871
  import_material20.IconButton,
28927
30872
  {
28928
30873
  className: "react-flow__controls-fitview",
28929
30874
  onClick: onFitViewHandler,
28930
30875
  size: "small",
28931
- children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_icons_material11.FitScreen, {})
30876
+ children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_icons_material11.FitScreen, {})
28932
30877
  }
28933
30878
  )
28934
30879
  ]
@@ -28937,7 +30882,7 @@ var Controls = (0, import_react62.memo)(() => {
28937
30882
  });
28938
30883
 
28939
30884
  // src/components/trace-graph/trace-graph.tsx
28940
- var import_jsx_runtime143 = require("react/jsx-runtime");
30885
+ var import_jsx_runtime144 = require("react/jsx-runtime");
28941
30886
  var nodeTypes = {
28942
30887
  service: ServiceNode
28943
30888
  };
@@ -28948,9 +30893,9 @@ var TraceGraph = ({
28948
30893
  order: order2 = "oldest_first",
28949
30894
  spans
28950
30895
  }) => {
28951
- const [nodes, setNodes, onNodesChange] = (0, import_react63.useNodesState)([]);
28952
- const [edges, setEdges] = (0, import_react63.useEdgesState)([]);
28953
- (0, import_react64.useEffect)(() => {
30896
+ const [nodes, setNodes, onNodesChange] = (0, import_react65.useNodesState)([]);
30897
+ const [edges, setEdges] = (0, import_react65.useEdgesState)([]);
30898
+ (0, import_react66.useEffect)(() => {
28954
30899
  const allNodes = [];
28955
30900
  const allEdges = [];
28956
30901
  for (const span of spans.data ?? []) {
@@ -28965,15 +30910,15 @@ var TraceGraph = ({
28965
30910
  },
28966
30911
  id: span.span_id,
28967
30912
  position: { x: 0, y: 0 },
28968
- sourcePosition: import_react63.Position.Right,
28969
- targetPosition: import_react63.Position.Left,
30913
+ sourcePosition: import_react65.Position.Right,
30914
+ targetPosition: import_react65.Position.Left,
28970
30915
  type: "service"
28971
30916
  });
28972
30917
  if (span.parent_span_id !== null) {
28973
30918
  allEdges.push({
28974
30919
  animated: false,
28975
30920
  id: `e-${span.parent_span_id}-${span.span_id}`,
28976
- markerEnd: { color: "lightgray", height: 16, type: import_react63.MarkerType.Arrow, width: 16 },
30921
+ markerEnd: { color: "lightgray", height: 16, type: import_react65.MarkerType.Arrow, width: 16 },
28977
30922
  source: span.parent_span_id,
28978
30923
  style: { stroke: "lightgray", strokeWidth: 1 },
28979
30924
  target: span.span_id
@@ -28982,7 +30927,7 @@ var TraceGraph = ({
28982
30927
  for (const linkedSpanId of span.linked_span_ids ?? []) {
28983
30928
  allEdges.push({
28984
30929
  id: `e-link-${linkedSpanId}-${span.span_id}`,
28985
- markerEnd: { color: "lightgray", height: 16, type: import_react63.MarkerType.Arrow, width: 16 },
30930
+ markerEnd: { color: "lightgray", height: 16, type: import_react65.MarkerType.Arrow, width: 16 },
28986
30931
  source: linkedSpanId,
28987
30932
  style: { stroke: "lightgray", strokeWidth: 1 },
28988
30933
  // animated: true,
@@ -29001,11 +30946,11 @@ var TraceGraph = ({
29001
30946
  setEdges(layoutedEdges);
29002
30947
  }, [spans.data, initialFocusEventId, order2, setNodes, setEdges]);
29003
30948
  const theme = (0, import_material21.useTheme)();
29004
- return /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(import_jsx_runtime143.Fragment, { children: [
29005
- spans.error && /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(
30949
+ return /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(import_jsx_runtime144.Fragment, { children: [
30950
+ spans.error && /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
29006
30951
  import_material21.Alert,
29007
30952
  {
29008
- action: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_material21.Button, { onClick: () => {
30953
+ action: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_material21.Button, { onClick: () => {
29009
30954
  onRefresh();
29010
30955
  }, children: "Retry" }),
29011
30956
  severity: "error",
@@ -29016,8 +30961,8 @@ var TraceGraph = ({
29016
30961
  ]
29017
30962
  }
29018
30963
  ),
29019
- /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(
29020
- import_react63.ReactFlow,
30964
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
30965
+ import_react65.ReactFlow,
29021
30966
  {
29022
30967
  "data-testid": TRACE_GRAPH_TEST_ID,
29023
30968
  edges,
@@ -29034,9 +30979,9 @@ var TraceGraph = ({
29034
30979
  onNodesChange,
29035
30980
  selectNodesOnDrag: false,
29036
30981
  children: [
29037
- /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(Controls, {}),
29038
- /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
29039
- import_react63.Background,
30982
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(Controls, {}),
30983
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
30984
+ import_react65.Background,
29040
30985
  {
29041
30986
  bgColor: theme.palette.background.default,
29042
30987
  color: theme.palette.text.disabled
@@ -29049,7 +30994,7 @@ var TraceGraph = ({
29049
30994
  };
29050
30995
 
29051
30996
  // src/pages/trace-graph-page.tsx
29052
- var import_jsx_runtime144 = require("react/jsx-runtime");
30997
+ var import_jsx_runtime145 = require("react/jsx-runtime");
29053
30998
  var HEADER_HEIGHT = 56;
29054
30999
  var DRAWER_WIDTH = "35%";
29055
31000
  var Main = (0, import_styles.styled)("main", { shouldForwardProp: (property) => property !== "open" })(({ open, theme }) => ({
@@ -29099,7 +31044,7 @@ var TraceGraphView = ({
29099
31044
  traceId
29100
31045
  }) => {
29101
31046
  const shouldShowStatusMessage = Boolean(statusError) || status?.status === "DISABLED";
29102
- return /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
31047
+ return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
29103
31048
  import_material22.Box,
29104
31049
  {
29105
31050
  "data-testid": TRACE_GRAPH_PAGE_TEST_ID,
@@ -29112,13 +31057,13 @@ var TraceGraphView = ({
29112
31057
  overflow: "hidden"
29113
31058
  },
29114
31059
  children: [
29115
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(import_material22.Box, { sx: { display: "flex", width: "100%" }, children: [
29116
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_material22.Button, { onClick: () => {
31060
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_material22.Box, { sx: { display: "flex", width: "100%" }, children: [
31061
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material22.Button, { onClick: () => {
29117
31062
  navigateToSpansList();
29118
- }, startIcon: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_icons_material12.ArrowBack, {}), children: "Go back" }),
29119
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_material22.Box, { sx: { flexGrow: 1 } })
31063
+ }, startIcon: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_icons_material12.ArrowBack, {}), children: "Go back" }),
31064
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_material22.Box, { sx: { flexGrow: 1 } })
29120
31065
  ] }),
29121
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
31066
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
29122
31067
  import_material22.Paper,
29123
31068
  {
29124
31069
  sx: {
@@ -29128,7 +31073,7 @@ var TraceGraphView = ({
29128
31073
  position: "relative",
29129
31074
  width: "100%"
29130
31075
  },
29131
- children: shouldShowStatusMessage ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
31076
+ children: shouldShowStatusMessage ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
29132
31077
  StatusMessage,
29133
31078
  {
29134
31079
  error: statusError,
@@ -29136,15 +31081,15 @@ var TraceGraphView = ({
29136
31081
  onRetry: handleRetry,
29137
31082
  status
29138
31083
  }
29139
- ) : /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(import_jsx_runtime144.Fragment, { children: [
29140
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(Main, { open, children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
31084
+ ) : /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_jsx_runtime145.Fragment, { children: [
31085
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Main, { open, children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
29141
31086
  import_material22.Box,
29142
31087
  {
29143
31088
  sx: {
29144
31089
  height: "100%",
29145
31090
  overflow: "auto"
29146
31091
  },
29147
- children: traceId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_react65.ReactFlowProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
31092
+ children: traceId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_react67.ReactFlowProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
29148
31093
  TraceGraph,
29149
31094
  {
29150
31095
  initialFocusEventId: spanId,
@@ -29162,7 +31107,7 @@ var TraceGraphView = ({
29162
31107
  ) })
29163
31108
  }
29164
31109
  ) }),
29165
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(StyledDrawer, { anchor: "right", open, variant: "persistent", children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(EventDetails, { onClose: handleClose, selectedEvent }) })
31110
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(StyledDrawer, { anchor: "right", open, variant: "persistent", children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(EventDetails, { onClose: handleClose, selectedEvent }) })
29166
31111
  ] })
29167
31112
  }
29168
31113
  )
@@ -29206,10 +31151,10 @@ async function fetchConnectedTraces(api, traceIds, allSpans = /* @__PURE__ */ ne
29206
31151
  }
29207
31152
  var TraceGraphPage = ({ onClose, order: order2 = "oldest_first", spanId, traceId }) => {
29208
31153
  const api = useAppInspectorApi();
29209
- const [spans, setSpans] = (0, import_react66.useState)();
29210
- const [loading, setLoading] = (0, import_react66.useState)(false);
29211
- const [fetchError, setFetchError] = (0, import_react66.useState)();
29212
- const fetchSpans = (0, import_react66.useCallback)(async () => {
31154
+ const [spans, setSpans] = (0, import_react68.useState)();
31155
+ const [loading, setLoading] = (0, import_react68.useState)(false);
31156
+ const [fetchError, setFetchError] = (0, import_react68.useState)();
31157
+ const fetchSpans = (0, import_react68.useCallback)(async () => {
29213
31158
  setLoading(true);
29214
31159
  try {
29215
31160
  const spans2 = await fetchConnectedTraces(api, [traceId]);
@@ -29222,35 +31167,35 @@ var TraceGraphPage = ({ onClose, order: order2 = "oldest_first", spanId, traceId
29222
31167
  setLoading(false);
29223
31168
  }
29224
31169
  }, [api, traceId]);
29225
- (0, import_react66.useEffect)(() => {
31170
+ (0, import_react68.useEffect)(() => {
29226
31171
  void fetchSpans();
29227
31172
  }, [fetchSpans]);
29228
- const [open, setOpen] = (0, import_react66.useState)(true);
29229
- const [selectedEvent, setSelectedEvent] = (0, import_react66.useState)(() => spans?.find((span) => span.span_id === spanId));
29230
- const spansReference = (0, import_react66.useRef)();
29231
- (0, import_react66.useEffect)(() => {
31173
+ const [open, setOpen] = (0, import_react68.useState)(true);
31174
+ const [selectedEvent, setSelectedEvent] = (0, import_react68.useState)(() => spans?.find((span) => span.span_id === spanId));
31175
+ const spansReference = (0, import_react68.useRef)();
31176
+ (0, import_react68.useEffect)(() => {
29232
31177
  if (!spansReference.current && spans) {
29233
31178
  setSelectedEvent(spans.find((span) => span.span_id === spanId));
29234
31179
  spansReference.current = spans;
29235
31180
  }
29236
31181
  }, [spans, setSelectedEvent, spanId]);
29237
- const { checkStatus, error: statusError, status } = useStatus();
29238
- const handleEnable = (0, import_react66.useCallback)(async () => {
31182
+ const { checkStatus, status, statusError } = useAppInspectorStatus();
31183
+ const handleEnable = (0, import_react68.useCallback)(async () => {
29239
31184
  await api.setStatus({ status: "ENABLED" });
29240
31185
  void checkStatus();
29241
31186
  }, [api, checkStatus]);
29242
- const handleEventSelect = (0, import_react66.useCallback)((spanId2) => {
31187
+ const handleEventSelect = (0, import_react68.useCallback)((spanId2) => {
29243
31188
  const span = spans?.find((s2) => s2.span_id === spanId2);
29244
31189
  setSelectedEvent(span);
29245
31190
  setOpen(true);
29246
31191
  }, [spans]);
29247
- const handleRetry = (0, import_react66.useCallback)(() => {
31192
+ const handleRetry = (0, import_react68.useCallback)(() => {
29248
31193
  void checkStatus();
29249
31194
  }, [checkStatus]);
29250
- const navigateToSpansList = (0, import_react66.useCallback)(() => {
31195
+ const navigateToSpansList = (0, import_react68.useCallback)(() => {
29251
31196
  onClose?.();
29252
31197
  }, [onClose]);
29253
- return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
31198
+ return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
29254
31199
  TraceGraphView,
29255
31200
  {
29256
31201
  fetchError,
@@ -29276,12 +31221,10 @@ var TraceGraphPage = ({ onClose, order: order2 = "oldest_first", spanId, traceId
29276
31221
  };
29277
31222
 
29278
31223
  // src/pages/spans-list-page.tsx
29279
- var import_jsx_runtime145 = require("react/jsx-runtime");
31224
+ var import_jsx_runtime146 = require("react/jsx-runtime");
29280
31225
  var SpansListPage = () => {
29281
31226
  const api = useAppInspectorApi();
29282
31227
  const {
29283
- checking,
29284
- checkStatus,
29285
31228
  clearingSpans,
29286
31229
  clearSpans,
29287
31230
  fetchBackward,
@@ -29294,36 +31237,35 @@ var SpansListPage = () => {
29294
31237
  iamErrorCount,
29295
31238
  licenseLimit,
29296
31239
  spans,
29297
- status,
29298
- statusError,
29299
31240
  streamPaused,
29300
31241
  systemLimit,
29301
31242
  toggleStream,
29302
31243
  totalCount
29303
31244
  } = useSpans();
29304
- const clearSpansSync = (0, import_react67.useCallback)(() => {
31245
+ const { checking, checkStatus, status, statusError } = useAppInspectorStatus();
31246
+ const clearSpansSync = (0, import_react69.useCallback)(() => {
29305
31247
  void clearSpans();
29306
31248
  }, [clearSpans]);
29307
31249
  const localstackVersion = status?.localstackVersion ?? (statusError instanceof AppInspectorNotFoundError ? statusError.localstackVersion : void 0);
29308
31250
  const versionCompatibility = checkEmulatorVersion(localstackVersion);
29309
- const [bannerDismissed, setBannerDismissed] = (0, import_react67.useState)(false);
31251
+ const [bannerDismissed, setBannerDismissed] = (0, import_react69.useState)(false);
29310
31252
  const [order2, setOrder] = useLocalStorage("spans-order", "oldest_first");
29311
- const [selectedTraceId, setSelectedTraceId] = (0, import_react67.useState)();
29312
- const [selectedSpanId, setSelectedSpanId] = (0, import_react67.useState)();
29313
- const navigateToSpan = (0, import_react67.useCallback)((span) => {
31253
+ const [selectedTraceId, setSelectedTraceId] = (0, import_react69.useState)();
31254
+ const [selectedSpanId, setSelectedSpanId] = (0, import_react69.useState)();
31255
+ const navigateToSpan = (0, import_react69.useCallback)((span) => {
29314
31256
  setSelectedTraceId(span.trace_id);
29315
31257
  setSelectedSpanId(span.span_id);
29316
31258
  }, []);
29317
- const handleRetry = (0, import_react67.useCallback)(() => {
31259
+ const handleRetry = (0, import_react69.useCallback)(() => {
29318
31260
  void checkStatus();
29319
31261
  }, [checkStatus]);
29320
- const handleEnable = (0, import_react67.useCallback)(async () => {
31262
+ const handleEnable = (0, import_react69.useCallback)(async () => {
29321
31263
  await api.setStatus({ status: "ENABLED" });
29322
31264
  void checkStatus();
29323
31265
  }, [api, checkStatus]);
29324
31266
  const shouldShowStatusMessage = Boolean(statusError) || status?.status === "DISABLED";
29325
- return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_jsx_runtime145.Fragment, { children: [
29326
- /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
31267
+ return /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(import_jsx_runtime146.Fragment, { children: [
31268
+ /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(
29327
31269
  import_material23.Box,
29328
31270
  {
29329
31271
  "data-testid": SPANS_LIST_PAGE_TEST_ID,
@@ -29339,7 +31281,7 @@ var SpansListPage = () => {
29339
31281
  width: "100%"
29340
31282
  },
29341
31283
  children: [
29342
- !checking && !shouldShowStatusMessage && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
31284
+ !checking && !shouldShowStatusMessage && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
29343
31285
  EmulatorVersionBanner,
29344
31286
  {
29345
31287
  compatibility: bannerDismissed && versionCompatibility === "warning" ? "ok" : versionCompatibility,
@@ -29349,7 +31291,7 @@ var SpansListPage = () => {
29349
31291
  } : void 0
29350
31292
  }
29351
31293
  ),
29352
- shouldShowStatusMessage ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
31294
+ shouldShowStatusMessage ? /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
29353
31295
  StatusMessage,
29354
31296
  {
29355
31297
  error: statusError,
@@ -29358,7 +31300,7 @@ var SpansListPage = () => {
29358
31300
  onRetry: handleRetry,
29359
31301
  status
29360
31302
  }
29361
- ) : /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
31303
+ ) : /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
29362
31304
  SpansList,
29363
31305
  {
29364
31306
  clearingSpans,
@@ -29385,7 +31327,7 @@ var SpansListPage = () => {
29385
31327
  ]
29386
31328
  }
29387
31329
  ),
29388
- selectedTraceId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(TraceGraphPage, { onClose: () => {
31330
+ selectedTraceId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(TraceGraphPage, { onClose: () => {
29389
31331
  setSelectedTraceId(void 0);
29390
31332
  }, order: order2, spanId: selectedSpanId, traceId: selectedTraceId })
29391
31333
  ] });