@perses-dev/tracing-gantt-chart-plugin 0.14.0-beta.4 → 0.14.0-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/__mf/js/{TracingGanttChart.25469bc6.js → TracingGanttChart.f0c26d62.js} +2 -2
  2. package/__mf/js/async/{121.7adfb80a.js → 121.df4d0300.js} +2 -2
  3. package/__mf/js/async/{811.d189dcab.js → 192.89555fac.js} +1 -1
  4. package/__mf/js/async/{2.69dd0b5a.js → 2.4738a299.js} +1 -1
  5. package/__mf/js/async/{209.87ebfcdc.js → 209.78f545a3.js} +1 -1
  6. package/__mf/js/async/{192.76368d51.js → 228.e5bab00d.js} +12 -12
  7. package/__mf/js/async/{235.473377f1.js → 235.3fa0afcc.js} +1 -1
  8. package/__mf/js/async/{247.6f2b5db4.js → 247.4e6c03b2.js} +1 -1
  9. package/__mf/js/async/{274.0e1a3c50.js → 274.f16e2860.js} +2 -2
  10. package/__mf/js/async/{356.84186cf2.js → 356.51e075cb.js} +1 -1
  11. package/__mf/js/async/{392.b4ef4bed.js → 392.d64f8d43.js} +2 -2
  12. package/__mf/js/async/{43.b28c172b.js → 43.a1e4dd53.js} +2 -2
  13. package/__mf/js/async/{436.011d9f4a.js → 436.0d96813b.js} +2 -2
  14. package/__mf/js/async/{470.a685ec67.js → 470.d037a952.js} +2 -2
  15. package/__mf/js/async/{496.428b22b2.js → 496.fec34ae2.js} +1 -1
  16. package/__mf/js/async/{868.975c73f4.js → 540.5a7eee69.js} +5 -5
  17. package/__mf/js/async/{587.b6132a72.js → 587.1810c140.js} +1 -1
  18. package/__mf/js/async/{588.ecf8c406.js → 588.4b4320d2.js} +1 -1
  19. package/__mf/js/async/{616.a05f041f.js → 616.6d40c00d.js} +1 -1
  20. package/__mf/js/async/{672.67abeefe.js → 672.1fa664e0.js} +1 -1
  21. package/__mf/js/async/{71.9a0d88e8.js → 71.bac87854.js} +1 -1
  22. package/__mf/js/async/{77.dfea4185.js → 77.25e79b17.js} +1 -1
  23. package/__mf/js/async/{873.5bcb7b27.js → 873.33292cb5.js} +1 -1
  24. package/__mf/js/async/{941.a871c18b.js → 941.05714bd4.js} +2 -2
  25. package/__mf/js/async/{968.8371f445.js → 968.e37d5fa0.js} +1 -1
  26. package/__mf/js/async/{978.86e57dbe.js → 978.3f957894.js} +1 -1
  27. package/__mf/js/async/__federation_expose_TracingGanttChart.d8dd8209.js +1 -0
  28. package/__mf/js/async/{lib-router.9f5c8003.js → lib-router.f80c6616.js} +2 -2
  29. package/__mf/js/{main.e4f544d0.js → main.ece590d1.js} +2 -2
  30. package/lib/setup-tests.js +7 -0
  31. package/lib/setup-tests.js.map +1 -1
  32. package/mf-manifest.json +35 -35
  33. package/mf-stats.json +35 -35
  34. package/package.json +4 -4
  35. package/__mf/js/async/__federation_expose_TracingGanttChart.5578e1c1.js +0 -1
  36. /package/__mf/css/async/{192.85c2cbf6.css → 228.85c2cbf6.css} +0 -0
  37. /package/__mf/js/async/{121.7adfb80a.js.LICENSE.txt → 121.df4d0300.js.LICENSE.txt} +0 -0
  38. /package/__mf/js/async/{192.76368d51.js.LICENSE.txt → 228.e5bab00d.js.LICENSE.txt} +0 -0
  39. /package/__mf/js/async/{274.0e1a3c50.js.LICENSE.txt → 274.f16e2860.js.LICENSE.txt} +0 -0
  40. /package/__mf/js/async/{392.b4ef4bed.js.LICENSE.txt → 392.d64f8d43.js.LICENSE.txt} +0 -0
  41. /package/__mf/js/async/{43.b28c172b.js.LICENSE.txt → 43.a1e4dd53.js.LICENSE.txt} +0 -0
  42. /package/__mf/js/async/{436.011d9f4a.js.LICENSE.txt → 436.0d96813b.js.LICENSE.txt} +0 -0
  43. /package/__mf/js/async/{470.a685ec67.js.LICENSE.txt → 470.d037a952.js.LICENSE.txt} +0 -0
  44. /package/__mf/js/async/{868.975c73f4.js.LICENSE.txt → 540.5a7eee69.js.LICENSE.txt} +0 -0
  45. /package/__mf/js/async/{941.a871c18b.js.LICENSE.txt → 941.05714bd4.js.LICENSE.txt} +0 -0
  46. /package/__mf/js/async/{lib-router.9f5c8003.js.LICENSE.txt → lib-router.f80c6616.js.LICENSE.txt} +0 -0
package/mf-manifest.json CHANGED
@@ -5,11 +5,11 @@
5
5
  "name": "TracingGanttChart",
6
6
  "type": "app",
7
7
  "buildInfo": {
8
- "buildVersion": "0.14.0-beta.4",
8
+ "buildVersion": "0.14.0-beta.6",
9
9
  "buildName": "@perses-dev/tracing-gantt-chart-plugin"
10
10
  },
11
11
  "remoteEntry": {
12
- "name": "__mf/js/TracingGanttChart.25469bc6.js",
12
+ "name": "__mf/js/TracingGanttChart.f0c26d62.js",
13
13
  "path": "",
14
14
  "type": "global"
15
15
  },
@@ -19,9 +19,9 @@
19
19
  "zip": "",
20
20
  "api": ""
21
21
  },
22
- "globalName": "TracingGanttChart_0_14_0_beta_4",
22
+ "globalName": "TracingGanttChart_0_14_0_beta_6",
23
23
  "pluginVersion": "2.6.0",
24
- "getPublicPath": "function() { const prefix = window.PERSES_PLUGIN_ASSETS_PATH || window.PERSES_APP_CONFIG?.api_prefix || \"\"; return prefix + \"/plugins/TracingGanttChart~0.14.0-beta.4/\"; }"
24
+ "getPublicPath": "function() { const prefix = window.PERSES_PLUGIN_ASSETS_PATH || window.PERSES_APP_CONFIG?.api_prefix || \"\"; return prefix + \"/plugins/TracingGanttChart~0.14.0-beta.6/\"; }"
25
25
  },
26
26
  "shared": [
27
27
  {
@@ -34,7 +34,7 @@
34
34
  "js": {
35
35
  "async": [],
36
36
  "sync": [
37
- "__mf/js/async/274.0e1a3c50.js"
37
+ "__mf/js/async/274.f16e2860.js"
38
38
  ]
39
39
  },
40
40
  "css": {
@@ -54,8 +54,8 @@
54
54
  "js": {
55
55
  "async": [],
56
56
  "sync": [
57
- "__mf/js/async/235.473377f1.js",
58
- "__mf/js/async/616.a05f041f.js"
57
+ "__mf/js/async/235.3fa0afcc.js",
58
+ "__mf/js/async/616.6d40c00d.js"
59
59
  ]
60
60
  },
61
61
  "css": {
@@ -75,8 +75,8 @@
75
75
  "js": {
76
76
  "async": [],
77
77
  "sync": [
78
- "__mf/js/async/587.b6132a72.js",
79
- "__mf/js/async/968.8371f445.js"
78
+ "__mf/js/async/587.1810c140.js",
79
+ "__mf/js/async/968.e37d5fa0.js"
80
80
  ]
81
81
  },
82
82
  "css": {
@@ -89,20 +89,20 @@
89
89
  {
90
90
  "id": "TracingGanttChart:@perses-dev/components",
91
91
  "name": "@perses-dev/components",
92
- "version": "0.55.0-beta.10",
92
+ "version": "0.55.0-beta.13",
93
93
  "singleton": true,
94
- "requiredVersion": "^0.55.0-beta.10",
94
+ "requiredVersion": "^0.55.0-beta.13",
95
95
  "assets": {
96
96
  "js": {
97
97
  "async": [],
98
98
  "sync": [
99
- "__mf/js/async/192.76368d51.js"
99
+ "__mf/js/async/228.e5bab00d.js"
100
100
  ]
101
101
  },
102
102
  "css": {
103
103
  "async": [],
104
104
  "sync": [
105
- "__mf/css/async/192.85c2cbf6.css"
105
+ "__mf/css/async/228.85c2cbf6.css"
106
106
  ]
107
107
  }
108
108
  },
@@ -111,14 +111,14 @@
111
111
  {
112
112
  "id": "TracingGanttChart:@perses-dev/plugin-system",
113
113
  "name": "@perses-dev/plugin-system",
114
- "version": "0.55.0-beta.10",
114
+ "version": "0.55.0-beta.13",
115
115
  "singleton": true,
116
- "requiredVersion": "^0.55.0-beta.10",
116
+ "requiredVersion": "^0.55.0-beta.13",
117
117
  "assets": {
118
118
  "js": {
119
119
  "async": [],
120
120
  "sync": [
121
- "__mf/js/async/868.975c73f4.js"
121
+ "__mf/js/async/540.5a7eee69.js"
122
122
  ]
123
123
  },
124
124
  "css": {
@@ -138,7 +138,7 @@
138
138
  "js": {
139
139
  "async": [],
140
140
  "sync": [
141
- "__mf/js/async/811.d189dcab.js"
141
+ "__mf/js/async/192.89555fac.js"
142
142
  ]
143
143
  },
144
144
  "css": {
@@ -158,7 +158,7 @@
158
158
  "js": {
159
159
  "async": [],
160
160
  "sync": [
161
- "__mf/js/async/873.5bcb7b27.js"
161
+ "__mf/js/async/873.33292cb5.js"
162
162
  ]
163
163
  },
164
164
  "css": {
@@ -178,7 +178,7 @@
178
178
  "js": {
179
179
  "async": [],
180
180
  "sync": [
181
- "__mf/js/async/392.b4ef4bed.js"
181
+ "__mf/js/async/392.d64f8d43.js"
182
182
  ]
183
183
  },
184
184
  "css": {
@@ -198,7 +198,7 @@
198
198
  "js": {
199
199
  "async": [],
200
200
  "sync": [
201
- "__mf/js/async/470.a685ec67.js"
201
+ "__mf/js/async/470.d037a952.js"
202
202
  ]
203
203
  },
204
204
  "css": {
@@ -218,7 +218,7 @@
218
218
  "js": {
219
219
  "async": [],
220
220
  "sync": [
221
- "__mf/js/async/121.7adfb80a.js"
221
+ "__mf/js/async/121.df4d0300.js"
222
222
  ]
223
223
  },
224
224
  "css": {
@@ -238,7 +238,7 @@
238
238
  "js": {
239
239
  "async": [],
240
240
  "sync": [
241
- "__mf/js/async/978.86e57dbe.js"
241
+ "__mf/js/async/978.3f957894.js"
242
242
  ]
243
243
  },
244
244
  "css": {
@@ -257,26 +257,26 @@
257
257
  "assets": {
258
258
  "js": {
259
259
  "sync": [
260
- "__mf/js/async/436.011d9f4a.js",
261
- "__mf/js/async/247.6f2b5db4.js",
262
- "__mf/js/async/672.67abeefe.js",
263
- "__mf/js/async/__federation_expose_TracingGanttChart.5578e1c1.js"
260
+ "__mf/js/async/436.0d96813b.js",
261
+ "__mf/js/async/247.4e6c03b2.js",
262
+ "__mf/js/async/672.1fa664e0.js",
263
+ "__mf/js/async/__federation_expose_TracingGanttChart.d8dd8209.js"
264
264
  ],
265
265
  "async": [
266
- "__mf/js/async/588.ecf8c406.js",
267
- "__mf/js/async/71.9a0d88e8.js",
268
- "__mf/js/async/43.b28c172b.js",
269
- "__mf/js/async/209.87ebfcdc.js",
270
- "__mf/js/async/lib-router.9f5c8003.js",
271
- "__mf/js/async/356.84186cf2.js",
272
- "__mf/js/async/77.dfea4185.js",
273
- "__mf/js/async/496.428b22b2.js"
266
+ "__mf/js/async/588.4b4320d2.js",
267
+ "__mf/js/async/71.bac87854.js",
268
+ "__mf/js/async/43.a1e4dd53.js",
269
+ "__mf/js/async/209.78f545a3.js",
270
+ "__mf/js/async/lib-router.f80c6616.js",
271
+ "__mf/js/async/356.51e075cb.js",
272
+ "__mf/js/async/77.25e79b17.js",
273
+ "__mf/js/async/496.fec34ae2.js"
274
274
  ]
275
275
  },
276
276
  "css": {
277
277
  "sync": [],
278
278
  "async": [
279
- "__mf/css/async/192.85c2cbf6.css"
279
+ "__mf/css/async/228.85c2cbf6.css"
280
280
  ]
281
281
  }
282
282
  },
package/mf-stats.json CHANGED
@@ -5,11 +5,11 @@
5
5
  "name": "TracingGanttChart",
6
6
  "type": "app",
7
7
  "buildInfo": {
8
- "buildVersion": "0.14.0-beta.4",
8
+ "buildVersion": "0.14.0-beta.6",
9
9
  "buildName": "@perses-dev/tracing-gantt-chart-plugin"
10
10
  },
11
11
  "remoteEntry": {
12
- "name": "__mf/js/TracingGanttChart.25469bc6.js",
12
+ "name": "__mf/js/TracingGanttChart.f0c26d62.js",
13
13
  "path": "",
14
14
  "type": "global"
15
15
  },
@@ -19,9 +19,9 @@
19
19
  "zip": "",
20
20
  "api": ""
21
21
  },
22
- "globalName": "TracingGanttChart_0_14_0_beta_4",
22
+ "globalName": "TracingGanttChart_0_14_0_beta_6",
23
23
  "pluginVersion": "2.6.0",
24
- "getPublicPath": "function() { const prefix = window.PERSES_PLUGIN_ASSETS_PATH || window.PERSES_APP_CONFIG?.api_prefix || \"\"; return prefix + \"/plugins/TracingGanttChart~0.14.0-beta.4/\"; }"
24
+ "getPublicPath": "function() { const prefix = window.PERSES_PLUGIN_ASSETS_PATH || window.PERSES_APP_CONFIG?.api_prefix || \"\"; return prefix + \"/plugins/TracingGanttChart~0.14.0-beta.6/\"; }"
25
25
  },
26
26
  "shared": [
27
27
  {
@@ -36,7 +36,7 @@
36
36
  "js": {
37
37
  "async": [],
38
38
  "sync": [
39
- "__mf/js/async/274.0e1a3c50.js"
39
+ "__mf/js/async/274.f16e2860.js"
40
40
  ]
41
41
  },
42
42
  "css": {
@@ -60,8 +60,8 @@
60
60
  "js": {
61
61
  "async": [],
62
62
  "sync": [
63
- "__mf/js/async/235.473377f1.js",
64
- "__mf/js/async/616.a05f041f.js"
63
+ "__mf/js/async/235.3fa0afcc.js",
64
+ "__mf/js/async/616.6d40c00d.js"
65
65
  ]
66
66
  },
67
67
  "css": {
@@ -85,8 +85,8 @@
85
85
  "js": {
86
86
  "async": [],
87
87
  "sync": [
88
- "__mf/js/async/587.b6132a72.js",
89
- "__mf/js/async/968.8371f445.js"
88
+ "__mf/js/async/587.1810c140.js",
89
+ "__mf/js/async/968.e37d5fa0.js"
90
90
  ]
91
91
  },
92
92
  "css": {
@@ -100,23 +100,23 @@
100
100
  },
101
101
  {
102
102
  "singleton": true,
103
- "requiredVersion": "^0.55.0-beta.10",
103
+ "requiredVersion": "^0.55.0-beta.13",
104
104
  "shareScope": "default",
105
105
  "name": "@perses-dev/components",
106
- "version": "0.55.0-beta.10",
106
+ "version": "0.55.0-beta.13",
107
107
  "eager": false,
108
108
  "id": "TracingGanttChart:@perses-dev/components",
109
109
  "assets": {
110
110
  "js": {
111
111
  "async": [],
112
112
  "sync": [
113
- "__mf/js/async/192.76368d51.js"
113
+ "__mf/js/async/228.e5bab00d.js"
114
114
  ]
115
115
  },
116
116
  "css": {
117
117
  "async": [],
118
118
  "sync": [
119
- "__mf/css/async/192.85c2cbf6.css"
119
+ "__mf/css/async/228.85c2cbf6.css"
120
120
  ]
121
121
  }
122
122
  },
@@ -128,17 +128,17 @@
128
128
  },
129
129
  {
130
130
  "singleton": true,
131
- "requiredVersion": "^0.55.0-beta.10",
131
+ "requiredVersion": "^0.55.0-beta.13",
132
132
  "shareScope": "default",
133
133
  "name": "@perses-dev/plugin-system",
134
- "version": "0.55.0-beta.10",
134
+ "version": "0.55.0-beta.13",
135
135
  "eager": false,
136
136
  "id": "TracingGanttChart:@perses-dev/plugin-system",
137
137
  "assets": {
138
138
  "js": {
139
139
  "async": [],
140
140
  "sync": [
141
- "__mf/js/async/868.975c73f4.js"
141
+ "__mf/js/async/540.5a7eee69.js"
142
142
  ]
143
143
  },
144
144
  "css": {
@@ -164,7 +164,7 @@
164
164
  "js": {
165
165
  "async": [],
166
166
  "sync": [
167
- "__mf/js/async/811.d189dcab.js"
167
+ "__mf/js/async/192.89555fac.js"
168
168
  ]
169
169
  },
170
170
  "css": {
@@ -188,7 +188,7 @@
188
188
  "js": {
189
189
  "async": [],
190
190
  "sync": [
191
- "__mf/js/async/873.5bcb7b27.js"
191
+ "__mf/js/async/873.33292cb5.js"
192
192
  ]
193
193
  },
194
194
  "css": {
@@ -212,7 +212,7 @@
212
212
  "js": {
213
213
  "async": [],
214
214
  "sync": [
215
- "__mf/js/async/392.b4ef4bed.js"
215
+ "__mf/js/async/392.d64f8d43.js"
216
216
  ]
217
217
  },
218
218
  "css": {
@@ -238,7 +238,7 @@
238
238
  "js": {
239
239
  "async": [],
240
240
  "sync": [
241
- "__mf/js/async/470.a685ec67.js"
241
+ "__mf/js/async/470.d037a952.js"
242
242
  ]
243
243
  },
244
244
  "css": {
@@ -262,7 +262,7 @@
262
262
  "js": {
263
263
  "async": [],
264
264
  "sync": [
265
- "__mf/js/async/121.7adfb80a.js"
265
+ "__mf/js/async/121.df4d0300.js"
266
266
  ]
267
267
  },
268
268
  "css": {
@@ -288,7 +288,7 @@
288
288
  "js": {
289
289
  "async": [],
290
290
  "sync": [
291
- "__mf/js/async/978.86e57dbe.js"
291
+ "__mf/js/async/978.3f957894.js"
292
292
  ]
293
293
  },
294
294
  "css": {
@@ -317,26 +317,26 @@
317
317
  "assets": {
318
318
  "js": {
319
319
  "sync": [
320
- "__mf/js/async/436.011d9f4a.js",
321
- "__mf/js/async/247.6f2b5db4.js",
322
- "__mf/js/async/672.67abeefe.js",
323
- "__mf/js/async/__federation_expose_TracingGanttChart.5578e1c1.js"
320
+ "__mf/js/async/436.0d96813b.js",
321
+ "__mf/js/async/247.4e6c03b2.js",
322
+ "__mf/js/async/672.1fa664e0.js",
323
+ "__mf/js/async/__federation_expose_TracingGanttChart.d8dd8209.js"
324
324
  ],
325
325
  "async": [
326
- "__mf/js/async/588.ecf8c406.js",
327
- "__mf/js/async/71.9a0d88e8.js",
328
- "__mf/js/async/43.b28c172b.js",
329
- "__mf/js/async/209.87ebfcdc.js",
330
- "__mf/js/async/lib-router.9f5c8003.js",
331
- "__mf/js/async/356.84186cf2.js",
332
- "__mf/js/async/77.dfea4185.js",
333
- "__mf/js/async/496.428b22b2.js"
326
+ "__mf/js/async/588.4b4320d2.js",
327
+ "__mf/js/async/71.bac87854.js",
328
+ "__mf/js/async/43.a1e4dd53.js",
329
+ "__mf/js/async/209.78f545a3.js",
330
+ "__mf/js/async/lib-router.f80c6616.js",
331
+ "__mf/js/async/356.51e075cb.js",
332
+ "__mf/js/async/77.25e79b17.js",
333
+ "__mf/js/async/496.fec34ae2.js"
334
334
  ]
335
335
  },
336
336
  "css": {
337
337
  "sync": [],
338
338
  "async": [
339
- "__mf/css/async/192.85c2cbf6.css"
339
+ "__mf/css/async/228.85c2cbf6.css"
340
340
  ]
341
341
  }
342
342
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@perses-dev/tracing-gantt-chart-plugin",
3
- "version": "0.14.0-beta.4",
3
+ "version": "0.14.0-beta.6",
4
4
  "license": "Apache-2.0",
5
5
  "homepage": "https://github.com/perses/plugins/blob/main/README.md",
6
6
  "repository": {
@@ -32,9 +32,9 @@
32
32
  "@emotion/react": "^11.7.1",
33
33
  "@emotion/styled": "^11.6.0",
34
34
  "@hookform/resolvers": "^5.9.1",
35
- "@perses-dev/components": "^0.55.0-beta.10",
36
- "@perses-dev/spec": "^0.3.0-beta.8",
37
- "@perses-dev/plugin-system": "^0.55.0-beta.10",
35
+ "@perses-dev/components": "^0.55.0-beta.13",
36
+ "@perses-dev/spec": "^0.3.0-beta.9",
37
+ "@perses-dev/plugin-system": "^0.55.0-beta.13",
38
38
  "date-fns": "^4.1.0",
39
39
  "date-fns-tz": "^3.2.0",
40
40
  "echarts": "5.5.0",
@@ -1 +0,0 @@
1
- "use strict";(self.chunk_TracingGanttChart_0_14_0_beta_4=self.chunk_TracingGanttChart_0_14_0_beta_4||[]).push([["989"],{68985(e,t,n){n.r(t),n.d(t,{TracingGanttChart:()=>eE});var s=n(62540),r=n(81315),i=n(66711),a=n(97090),l=n(70451),o=n(74628),d=n(315),u=n(47095),c=n(88091),p=n(87034),x=n(33868),m=n(47601),h=n(7800),f=n(76477),v=n(6227),j=n(57438),g=n(79956),b=n(14045),k=n(98873),M=n(47563),T=n(92959);let w=new T.A({hue:{min:20,max:360}}),y=new T.A({hue:{min:0,max:20}}),I={},A="2rem",S=e=>{var t;return(null==(t=e.status)?void 0:t.code)===M.CY};function U(e,t,n,s){return function(e,t,n,s){let r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if("categorical"===n){let n=t.echartsTheme.color,i=[e.palette.error.light,e.palette.error.main,e.palette.error.dark],a=r?i:n;if(0===a.length)return console.warn("getConsistentCategoricalColor() called with empty color palette, fallback to #000"),"#000";let l=0;for(let e=0;e<s.length;e++)l=s.charCodeAt(e)+((l<<5)-l);return a[Math.abs(l)%a.length]??"#000"}{let e,t;return(t=I[e=`${s}_____${r}`])||(t=function(e,t){let[n,s,r]=t?y.hsl(e):w.hsl(e),i=`${(100*s).toFixed(0)}%`,a=`${(100*r).toFixed(0)}%`;return`hsla(${n.toFixed(2)},${i},${a},0.9)`}(s,r),I[e]=t),t}}(e,t,n,s.resource.serviceName??"",S(s))}function C(e){return e<1?`${Math.round(1e3*e)}μs`:e<1e3?`${+e.toFixed(2)}ms`:`${+(e/1e3).toFixed(2)}s`}function L(e){let{customLinks:t,trace:n,span:r}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(f.A,{children:[(0,s.jsx)(E,{name:"span ID",value:r.spanId}),(0,s.jsx)(E,{name:"start",value:C(r.startTimeUnixMs-n.startTimeUnixMs)}),(0,s.jsx)(E,{name:"duration",value:C(r.endTimeUnixMs-r.startTimeUnixMs)}),r.kind&&(0,s.jsx)(E,{name:"kind",value:r.kind}),r.status.code&&(0,s.jsx)(E,{name:"status code",value:r.status.code}),r.status.message&&(0,s.jsx)(E,{name:"status message",value:r.status.message})]}),r.attributes.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(v.A,{}),(0,s.jsx)($,{customLinks:t,attributes:r.attributes.toSorted((e,t)=>e.key.localeCompare(t.key))})]}),r.resource.attributes.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(v.A,{}),(0,s.jsx)($,{customLinks:t,attributes:r.resource.attributes.toSorted((e,t)=>e.key.localeCompare(t.key))})]}),(r.scope.name||r.scope.version||r.scope.attributes&&r.scope.attributes.length>0)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(v.A,{}),(0,s.jsxs)(f.A,{children:[r.scope.name&&(0,s.jsx)(E,{name:"scope name",value:r.scope.name}),r.scope.version&&(0,s.jsx)(E,{name:"scope version",value:r.scope.version}),(0,s.jsx)(z,{customLinks:t,attributes:(r.scope.attributes??[]).toSorted((e,t)=>e.key.localeCompare(t.key))})]})]})]})}function $(e){let{customLinks:t,attributes:n}=e;return(0,s.jsx)(f.A,{children:(0,s.jsx)(z,{customLinks:t,attributes:n})})}function z(e){let{customLinks:t,attributes:n}=e,r=(0,k.useAllVariableValues)(),i=(0,l.useMemo)(()=>Object.fromEntries(((null==t?void 0:t.links.attributes)??[]).map(e=>[e.name,e.link])),[t]),a=(0,l.useMemo)(()=>{let e=n.map(e=>[e.key.replaceAll(".","_"),R(e.value)]);return{...null==t?void 0:t.variables,...Object.fromEntries(e)}},[t,n]);return(0,s.jsx)(s.Fragment,{children:n.map((e,t)=>(0,s.jsx)(E,{name:e.key,value:R(e.value),link:i[e.key]?(0,k.replaceVariablesInString)(i[e.key],r,a):void 0},t))})}function E(e){let{name:t,value:n,link:r}=e,{RouterComponent:i}=(0,k.useRouterContext)(),a=i&&r?(0,s.jsx)(j.A,{component:i,to:r,children:n}):n;return(0,s.jsx)(g.Ay,{sx:{px:1,py:0},children:(0,s.jsx)(b.A,{primary:t,secondary:a,slotProps:{primary:{variant:"h5"},secondary:{variant:"body1",sx:{wordBreak:"break-word"}}}})})}function R(e){if("stringValue"in e)return e.stringValue||"<empty string>";if("intValue"in e)return e.intValue;if("doubleValue"in e)return String(e.doubleValue);if("boolValue"in e)return String(e.boolValue);if("arrayValue"in e){let t=e.arrayValue.values;return t&&t.length>0?t.map(R).join(", "):"<empty array>"}return"<unknown type>"}var V=n(99415),F=n(39098),P=n(87275),B=n(38990);function D(e){let{customLinks:t,trace:n,span:r}=e;return(0,s.jsx)(s.Fragment,{children:r.events.toSorted((e,t)=>e.timeUnixMs-t.timeUnixMs).map((e,r)=>(0,s.jsxs)(l.Fragment,{children:[r>0&&(0,s.jsx)(v.A,{}),(0,s.jsx)(_,{customLinks:t,trace:n,event:e})]},r))})}function _(e){let{customLinks:t,trace:n,event:r}=e,i=r.timeUnixMs-n.startTimeUnixMs,[a,o]=(0,l.useState)(!1);return(0,s.jsxs)(f.A,{children:[(0,s.jsxs)(V.A,{onClick:()=>{o(!a)},sx:{px:1},children:[(0,s.jsx)(b.A,{primary:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("strong",{children:[C(i),":"]})," ",r.name]}),slotProps:{primary:{noWrap:!0}}}),a?(0,s.jsx)(B.default,{}):(0,s.jsx)(P.default,{})]}),(0,s.jsx)(F.A,{in:a,timeout:"auto",unmountOnExit:!0,children:(0,s.jsxs)(f.A,{sx:{px:1},children:[(0,s.jsx)(E,{name:"name",value:r.name}),(0,s.jsx)(E,{name:"time",value:C(i)}),(0,s.jsx)(z,{customLinks:t,attributes:r.attributes})]})})]})}function N(e){let{customLinks:t,span:n}=e;return(0,s.jsx)(s.Fragment,{children:n.links.map((e,n)=>(0,s.jsxs)(l.Fragment,{children:[n>0&&(0,s.jsx)(v.A,{}),(0,s.jsx)(O,{link:e,customLinks:t})]},n))})}function O(e){let{customLinks:t,link:n}=e,r=(0,k.useAllVariableValues)(),i=(null==t?void 0:t.links.trace)?(0,k.replaceVariablesInString)(t.links.trace,r,{...null==t?void 0:t.variables,traceId:n.traceId}):void 0,a=(null==t?void 0:t.links.span)?(0,k.replaceVariablesInString)(t.links.span,r,{...null==t?void 0:t.variables,traceId:n.traceId,spanId:n.spanId}):void 0;return(0,s.jsxs)(f.A,{children:[(0,s.jsx)(E,{name:"trace ID",value:n.traceId,link:i}),(0,s.jsx)(E,{name:"span ID",value:n.spanId,link:a}),(0,s.jsx)(z,{customLinks:t,attributes:n.attributes})]})}function W(e){let{customLinks:t,trace:n,span:r,onCloseBtnClick:i}=e,[a,d]=(0,l.useState)("attributes");return"events"===a&&0===r.events.length&&d("attributes"),"links"===a&&0===r.links.length&&d("attributes"),(0,s.jsxs)(o.A,{children:[(0,s.jsx)(u.A,{sx:{float:"right"},onClick:i,children:(0,s.jsx)(h.default,{})}),(0,s.jsx)(c.A,{sx:{wordBreak:"break-word"},children:r.resource.serviceName}),(0,s.jsx)(c.A,{variant:"h2",sx:{wordBreak:"break-word"},children:r.name}),(0,s.jsx)(o.A,{sx:{borderBottom:1,borderColor:"divider"},children:(0,s.jsxs)(p.A,{value:a,onChange:(e,t)=>d(t),variant:"scrollable",children:[(0,s.jsx)(x.A,{sx:{p:0},value:"attributes",label:"Attributes"}),r.events.length>0&&(0,s.jsx)(x.A,{value:"events",label:"Events",icon:(0,s.jsx)(m.A,{label:r.events.length}),iconPosition:"end",sx:{minHeight:48,height:48}}),r.links.length>0&&(0,s.jsx)(x.A,{value:"links",label:"Links",icon:(0,s.jsx)(m.A,{label:r.links.length}),iconPosition:"end",sx:{minHeight:48,height:48}})]})}),"attributes"===a&&(0,s.jsx)(L,{customLinks:t,trace:n,span:r}),"events"===a&&(0,s.jsx)(D,{customLinks:t,trace:n,span:r}),"links"===a&&(0,s.jsx)(N,{customLinks:t,span:r})]})}var G=n(56599),H=n(74649),Y=n(40224);function J(e,t){for(let n of e)!1!==t(n)&&J(n.childSpans,t)}function Q(e){return{timeUnixMs:1e-6*parseInt(e.timeUnixNano),name:e.name,attributes:e.attributes??[]}}function X(e){return{traceId:e.traceId,spanId:e.spanId,attributes:e.attributes??[]}}var Z=n(77308);function q(e){let{trace:t,viewport:n}=e,r=n.endTimeUnixMs-n.startTimeUnixMs,i=n.startTimeUnixMs-t.startTimeUnixMs;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ee,{style:{left:"0%",borderWidth:0},children:C(i)}),(0,s.jsx)(ee,{style:{left:"25%"},children:C(i+.25*r)}),(0,s.jsx)(ee,{style:{left:"50%"},children:C(i+.5*r)}),(0,s.jsx)(ee,{style:{left:"75%"},children:C(i+.75*r)}),(0,s.jsx)(ee,{style:{left:"100%"},children:(0,s.jsx)("span",{style:{position:"absolute",right:".75rem"},children:C(i+ +r)})})]})}function K(){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ee,{style:{left:"25%"}}),(0,s.jsx)(ee,{style:{left:"50%"}}),(0,s.jsx)(ee,{style:{left:"75%"}})]})}let ee=(0,Z.A)(o.A)(e=>{let{theme:t}=e;return{position:"absolute",height:"100%",borderLeft:`1px solid ${t.palette.divider}`,padding:".25rem"}});function et(e){let{trace:t,viewport:n,nameColumnWidth:r,divider:i}=e,a=(0,G.A)();return(0,s.jsxs)(d.A,{direction:"row",alignItems:"center",sx:{height:A,fontSize:"0.9rem",borderBottom:`1px solid ${a.palette.divider}`},children:[(0,s.jsx)(o.A,{style:{width:`${100*r}%`},children:(0,s.jsx)("span",{style:{padding:".25rem"},children:"Service & Operation"})}),i,(0,s.jsx)(o.A,{sx:{position:"relative",height:"100%",flexGrow:1},children:(0,s.jsx)(q,{trace:t,viewport:n})})]})}let en=(0,l.createContext)(void 0);function es(e){let{children:t}=e,[n,r]=(0,l.useState)(new Set),[i,a]=(0,l.useState)([]),[o,d]=(0,l.useState)(void 0);return(0,s.jsx)(en.Provider,{value:{collapsedSpans:n,setCollapsedSpans:r,visibleSpans:i,setVisibleSpans:a,hoveredParent:o,setHoveredParent:d},children:t})}function er(){let e=(0,l.useContext)(en);if(void 0===e)throw Error("No GanttTableContext found. Did you forget a Provider?");return e}function ei(e){var t,n;let{options:i,span:a,viewport:l}=e,d=(0,G.A)(),u=(0,r.useChartsTheme)(),c=a.endTimeUnixMs-a.startTimeUnixMs,p=l.endTimeUnixMs-l.startTimeUnixMs,x=c/p,m=(a.startTimeUnixMs-l.startTimeUnixMs)/p;return(0,s.jsxs)(o.A,{sx:{position:"relative",height:"100%",flexGrow:1,overflow:"hidden"},children:[(0,s.jsx)(K,{}),(0,s.jsx)(o.A,{"data-testid":"span-duration-bar",sx:{position:"absolute",top:0,bottom:0,margin:"auto",minWidth:"2px",height:"8px",borderRadius:d.shape.borderRadius},style:{left:`${100*m}%`,width:`${100*x}%`,backgroundColor:U(d,u,null==(n=i.visual)||null==(t=n.palette)?void 0:t.mode,a)}}),(0,s.jsx)(o.A,{sx:{position:"absolute",top:"50%",transform:"translateY(-50%)",padding:"0 8px",color:d.palette.grey[700],fontSize:".7rem"},style:m+x<.95?{left:`${(m+x)*100}%`}:{left:`${100*m}%`,transform:"translateY(-50%) translateX(-100%)"},children:C(c)})]})}var ea=n(94574),el=n(11061);function eo(e){let{span:t}=e,{collapsedSpans:n,setCollapsedSpans:r,visibleSpans:i,hoveredParent:a,setHoveredParent:o}=er(),d=(0,G.A)(),u=(0,l.useCallback)(e=>{e.stopPropagation(),r(e=>{let n=new Set(e);return n.has(t.spanId)?n.delete(t.spanId):n.add(t.spanId),n})},[t,r]),c=(0,l.useCallback)(()=>{o(t.spanId)},[t,o]),p=[t],x=t.parentSpan;for(;x;)p.unshift(x),x=x.parentSpan;return(0,s.jsx)(s.Fragment,{children:p.map((e,t)=>(0,s.jsx)(ed,{style:{width:t===p.length-1||0===i.length||i.includes(e.spanId)?24:8,borderLeft:`${a===(e.parentSpanId??"")?3:1}px solid ${d.palette.divider}`},onMouseEnter:()=>o(e.parentSpanId??""),onMouseLeave:()=>o(void 0),children:t===p.length-1&&e.childSpans.length>0&&(n.has(e.spanId)?(0,s.jsx)(el.default,{titleAccess:"expand",onClick:u,onMouseEnter:c}):(0,s.jsx)(P.default,{titleAccess:"collapse",onClick:u,onMouseEnter:c}))},e.spanId))})}let ed=(0,Z.A)("div")({display:"flex",height:"100%",alignItems:"center",justifyContent:"flex-end",flexShrink:0,transition:"width 1s"});var eu=n(58597),ec=n(97653),ep=n(65241);function ex(e){let{customLinks:t,span:n}=e,i=(0,k.useAllVariableValues)(),{RouterComponent:a}=(0,k.useRouterContext)(),[o,d]=(0,l.useState)(null),c=!!o;if(!a||!t.links.span)return null;if(1===n.links.length&&n.links[0]){let e=n.links[0];return(0,s.jsx)(r.InfoTooltip,{description:"open linked span",children:(0,s.jsx)(u.A,{size:"small",component:a,to:(0,k.replaceVariablesInString)(t.links.span,i,{...t.variables,traceId:e.traceId,spanId:e.spanId}),children:(0,s.jsx)(ep.default,{fontSize:"inherit"})})})}let p=e=>{e.stopPropagation(),d(null)};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.InfoTooltip,{description:`${n.links.length} linked spans`,children:(0,s.jsx)(u.A,{"aria-label":"span links","aria-haspopup":"true","aria-expanded":c?"true":void 0,size:"small",onClick:e=>{e.stopPropagation(),d(e.currentTarget)},children:(0,s.jsx)(ep.default,{fontSize:"inherit"})})}),(0,s.jsx)(eu.A,{anchorEl:o,open:c,onClose:p,children:n.links.map(e=>(0,s.jsxs)(ec.A,{component:a,onClick:p,to:(0,k.replaceVariablesInString)(t.links.span,i,{...t.variables,traceId:e.traceId,spanId:e.spanId}),children:["Open linked span ",e.spanId]},e.spanId))})]})}function em(e){let{customLinks:t,span:n,nameColumnWidth:r}=e;return(0,s.jsxs)(d.A,{direction:"row",sx:{alignItems:"center"},style:{width:`${100*r}%`},children:[(0,s.jsx)(eo,{span:n}),S(n)&&(0,s.jsx)(ea.default,{titleAccess:"error",color:"error",sx:{marginRight:"5px"}}),(0,s.jsxs)(o.A,{sx:{whiteSpace:"nowrap",overflow:"hidden"},children:[(0,s.jsxs)("strong",{children:[n.resource.serviceName,":"]})," ",n.name]}),t&&t.links.span&&n.links.length>0&&(0,s.jsx)(o.A,{sx:{marginLeft:"auto",px:1},children:(0,s.jsx)(ex,{customLinks:t,span:n})})]})}let eh=(0,l.memo)(function(e){let t,{options:n,customLinks:r,span:i,viewport:a,selected:l,matched:o,focused:d,nameColumnWidth:u,divider:c,onClick:p}=e,x=(0,G.A)();return l?t=x.palette.action.focus:d?t=x.palette.action.selected:o&&(t=x.palette.action.hover),(0,s.jsxs)(ef,{sx:{backgroundColor:t,"&:hover":t?{backgroundColor:t}:void 0},direction:"row",onClick:()=>{var e;(null==(e=document.getSelection())?void 0:e.type)!=="Range"&&p(i)},children:[(0,s.jsx)(em,{customLinks:r,span:i,nameColumnWidth:u}),c,(0,s.jsx)(ei,{options:n,span:i,viewport:a})]})}),ef=(0,Z.A)(d.A)(e=>{let{theme:t}=e;return{height:A,"&:hover":{backgroundColor:t.palette.action.hover,borderTop:`1px solid ${t.palette.divider}`,borderBottom:`1px solid ${t.palette.divider}`}}});function ev(e){let{parentRef:t,spacing:n=0,onMove:r}=e,[i,a]=(0,l.useState)(!1),o=(0,k.useEvent)(e=>{if(!t.current)return;let s=t.current.getBoundingClientRect(),i=(e.clientX-s.left+n)/s.width;.05<=i&&i<=.95&&r(i)}),d=(0,k.useEvent)(()=>{a(!1)});return(0,l.useEffect)(()=>{function e(){window.removeEventListener("mousemove",o),window.removeEventListener("mouseup",d),document.body.style.cursor="inherit"}return i?(window.addEventListener("mousemove",o),window.addEventListener("mouseup",d),document.body.style.cursor="col-resize"):e(),e},[i,o,d]),(0,s.jsx)(ej,{onMouseDown:e=>{e.preventDefault(),a(!0)},onClick:e=>e.stopPropagation()})}let ej=(0,Z.A)(o.A)(e=>{let{theme:t}=e;return{position:"relative",width:"1px",minWidth:"1px",height:"100%",backgroundColor:t.palette.divider,cursor:"col-resize","&:before":{position:"absolute",width:"7px",left:"-3px",top:0,bottom:0,content:'" "',zIndex:1}}});function eg(e){let{options:t,customLinks:n,trace:r,viewport:i,selectedSpan:a,onSpanClick:d,matchingSpanIds:u,focusedSpanId:c}=e,{collapsedSpans:p,setCollapsedSpans:x,setVisibleSpans:m}=er(),[h,f]=(0,l.useState)(.25),v=(0,l.useRef)(null),j=(0,l.useRef)(null),g=(0,G.A)(),b=(0,l.useMemo)(()=>{let e=[];return J(r.rootSpans,t=>{if(e.push(t),p.has(t.spanId))return!1}),e},[r.rootSpans,p]),k=(0,l.useMemo)(()=>new Set(u??[]),[u]);(0,l.useEffect)(()=>{if(!c)return;let e=r.spanById.get(c);if(!e)return;let t=new Set,n=e.parentSpan;for(;n;)t.add(n.spanId),n=n.parentSpan;t.size>0&&x(e=>{let n=new Set(e),s=!1;for(let e of t)n.delete(e)&&(s=!0);return s?n:e})},[c,r.spanById,x]),(0,l.useEffect)(()=>{if(!c||!j.current)return;let e=b.findIndex(e=>e.spanId===c);e>=0&&j.current.scrollToIndex({index:e,align:"center"})},[c,b]);let M=(0,l.useMemo)(()=>{if(!a)return 0;let e=b.findIndex(e=>e.spanId===a.spanId);return e>=0?e:0},[b,a]),T=(0,s.jsx)(ev,{parentRef:v,onMove:f});return(0,s.jsxs)(o.A,{ref:v,sx:{display:"flex",flexDirection:"column",flexGrow:1,border:`1px solid ${g.palette.divider}`,borderRadius:`${g.shape.borderRadius}px`},children:[(0,s.jsx)(et,{trace:r,viewport:i,nameColumnWidth:h,divider:T}),(0,s.jsx)(H.aY,{ref:j,data:b,initialTopMostItemIndex:M,itemContent:(e,r)=>(0,s.jsx)(eh,{options:t,customLinks:n,span:r,viewport:i,selected:r===a,matched:k.has(r.spanId),focused:r.spanId===c,nameColumnWidth:h,divider:T,onClick:d}),rangeChanged:function(e){let{startIndex:t,endIndex:n}=e,s=[];for(let e=t;e<=n;e++)s.push(b[e].spanId);m(s)}})]})}var eb=n(85180);function ek(e){var t,n;let{options:i,trace:a,viewport:d,setViewport:u}=e,c=(0,G.A)(),p=(0,r.useChartsTheme)(),{width:x,ref:m}=(0,eb.default)(),h=(0,l.useRef)(null),[f,v]=(0,l.useState)({type:"none"}),j=a.endTimeUnixMs-a.startTimeUnixMs,g=(d.startTimeUnixMs-a.startTimeUnixMs)/j,b=(a.endTimeUnixMs-d.endTimeUnixMs)/j,M=(0,l.useCallback)(e=>{var t,n;return U(c,p,null==(n=i.visual)||null==(t=n.palette)?void 0:t.mode,e)},[c,p,null==(n=i.visual)||null==(t=n.palette)?void 0:t.mode]);(0,l.useEffect)(()=>{if(!h.current||!x)return;let e=h.current.getContext("2d");if(e){let t,n,s,r,i;n=Math.round(Math.min(Math.max(60/(t=a.spanById.size),1),7)),s=a.endTimeUnixMs-a.startTimeUnixMs,r=60/t,i=0,J(a.rootSpans,t=>{let l=t.endTimeUnixMs-t.startTimeUnixMs,o=(t.startTimeUnixMs-a.startTimeUnixMs)/s;e.fillStyle=M(t),e.beginPath(),e.rect(Math.round(o*x),Math.round(i),Math.max(2,Math.round(l/s*x)),n),e.fill(),i+=r})}},[x,60,a,M]);let T=e=>{if(!h.current||!x)return 0;let t=e.clientX-h.current.getBoundingClientRect().left;return a.startTimeUnixMs+t/x*j},w=(0,k.useEvent)(e=>{switch(e.preventDefault(),f.type){case"none":return;case"resize":{let t,n,s=f.fixedPoint,r=T(e);s<r?(t=s,n=r):(t=r,n=s),u({startTimeUnixMs:Math.max(t,a.startTimeUnixMs),endTimeUnixMs:Math.min(n,a.endTimeUnixMs)});return}case"drag":{let{start:t,end:n}=f,s=T(e);s-t<a.startTimeUnixMs&&(s=a.startTimeUnixMs+t),s+n>a.endTimeUnixMs&&(s=a.endTimeUnixMs-n),u({startTimeUnixMs:s-t,endTimeUnixMs:s+n});return}}}),y=(0,k.useEvent)(e=>{e.preventDefault(),v({type:"none"}),d.startTimeUnixMs===d.endTimeUnixMs&&u({startTimeUnixMs:a.startTimeUnixMs,endTimeUnixMs:a.endTimeUnixMs})});return(0,l.useEffect)(()=>{function e(){window.removeEventListener("mousemove",w),window.removeEventListener("mouseup",y),document.body.style.cursor="inherit"}return"none"===f.type?e():(window.addEventListener("mousemove",w),window.addEventListener("mouseup",y),document.body.style.cursor="resize"===f.type?"col-resize":"move"),e},[f,w,y]),(0,s.jsxs)(o.A,{ref:m,sx:{position:"relative",height:60},onMouseDown:e=>{if(e.preventDefault(),!(e.target instanceof HTMLElement))return;let t=d.startTimeUnixMs===a.startTimeUnixMs&&d.endTimeUnixMs===a.endTimeUnixMs,n=e.target.dataset.elem,s=T(e);"resizerLeft"===n?v({type:"resize",fixedPoint:d.endTimeUnixMs}):"resizerRight"===n?v({type:"resize",fixedPoint:d.startTimeUnixMs}):"cutoffBox"===n||t?(v({type:"resize",fixedPoint:s}),u({startTimeUnixMs:s,endTimeUnixMs:s})):v({type:"drag",start:s-d.startTimeUnixMs,end:d.endTimeUnixMs-s})},children:[(0,s.jsx)("canvas",{ref:h,width:x,height:60,style:{position:"absolute"}}),(0,s.jsx)(K,{}),(0,s.jsx)(eM,{"data-elem":"cutoffBox",style:{left:0,width:`${100*g}%`}}),(0,s.jsx)(eT,{"data-elem":"resizerLeft",style:{left:`${100*g}%`}}),(0,s.jsx)(eT,{"data-elem":"resizerRight",style:{right:`${100*b}%`}}),(0,s.jsx)(eM,{"data-elem":"cutoffBox",style:{right:0,width:`${100*b}%`}})]})}let eM=(0,Z.A)(o.A)({position:"absolute",height:"100%",backgroundColor:"rgba(225, 225, 225, .5)"}),eT=(0,Z.A)(o.A)(e=>{let{theme:t}=e;return{position:"absolute",height:"100%",backgroundColor:t.palette.divider,width:"2px",cursor:"col-resize","&:before":{position:"absolute",width:"8px",left:"-3px",top:0,bottom:0,content:'" "',zIndex:1}}});function ew(e){let{options:t,trace:n,viewport:r,setViewport:i}=e,a=(0,G.A)();return(0,s.jsxs)(o.A,{sx:{border:`1px solid ${a.palette.divider}`,borderRadius:`${a.shape.borderRadius}px`},children:[(0,s.jsx)(o.A,{sx:{position:"relative",height:A,borderBottom:`1px solid ${a.palette.divider}`},children:(0,s.jsx)(q,{trace:n,viewport:{startTimeUnixMs:n.startTimeUnixMs,endTimeUnixMs:n.endTimeUnixMs}})}),(0,s.jsx)(ek,{options:t,trace:n,viewport:r,setViewport:i})]})}var ey=n(93648),eI=n(2582);function eA(e){let{search:t}=e,{searchQuery:n,setSearchQuery:r,matchingSpanIds:i,focusedMatchIndex:a,setFocusedMatchIndex:l}=t,o=n.length>0,c=i.length,p=c>0;function x(){p&&l((a-1+c)%c)}function m(){p&&l((a+1)%c)}return(0,s.jsxs)(d.A,{direction:"row",sx:{alignItems:"center",gap:.5,minWidth:300},children:[(0,s.jsx)(ey.A,{size:"small",placeholder:"Search spans...",value:n,onChange:e=>r(e.target.value),onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),e.shiftKey?x():m())},slotProps:{input:{endAdornment:(0,s.jsx)(eI.A,{position:"end",sx:{visibility:o?"visible":"hidden",whiteSpace:"nowrap"},children:p?`${a+1}/${c}`:"0/0"})}},sx:{minWidth:200}}),(0,s.jsx)(u.A,{size:"small",disabled:!p,"aria-label":"Previous match",onClick:x,children:(0,s.jsx)(B.default,{})}),(0,s.jsx)(u.A,{size:"small",disabled:!p,"aria-label":"Next match",onClick:m,children:(0,s.jsx)(P.default,{})}),(0,s.jsx)(u.A,{size:"small",disabled:!o,"aria-label":"Clear search",onClick:()=>r(""),children:(0,s.jsx)(h.default,{})})]})}var eS=n(65211),eU=n(98599);let eC={year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",fractionalSecondDigits:3},eL=new Intl.DateTimeFormat(void 0,{...eC,timeZone:"UTC",timeZoneName:"short"}).format;function e$(e){let{trace:t,search:n}=e,{dateFormatOptionsWithUserTimeZone:i}=(0,r.useTimeZone)(),a=(0,l.useMemo)(()=>{let e=i(eC);return new Intl.DateTimeFormat(void 0,e).format},[i]),[o,p]=(0,l.useState)(!1),x=t.rootSpans[0];return x?(0,s.jsxs)(d.A,{direction:"column",sx:{gap:1},children:[(0,s.jsxs)(d.A,{direction:"row",sx:{gap:1,justifyContent:"space-between",flexWrap:"wrap"},children:[(0,s.jsxs)(d.A,{direction:"row",sx:{gap:1,alignItems:"center"},children:[(0,s.jsxs)(c.A,{variant:"h3",children:[x.resource.serviceName,": ",x.name," (",C(t.endTimeUnixMs-t.startTimeUnixMs),")"]}),(0,s.jsx)(u.A,{size:"small",onClick:()=>p(e=>!e),"aria-label":"Toggle search",children:(0,s.jsx)(eU.default,{fontSize:"small"})})]}),(0,s.jsxs)(d.A,{direction:"row",sx:{rowGap:1,columnGap:2,alignItems:"center",flexWrap:"wrap"},children:[(0,s.jsxs)(c.A,{variant:"h4",sx:{fontWeight:"normal"},children:[(0,s.jsx)("strong",{children:"Start:"})," ",(0,s.jsx)(eS.A,{title:eL(t.startTimeUnixMs),placement:"top",arrow:!0,children:(0,s.jsx)(c.A,{component:"span",children:a(t.startTimeUnixMs)})})]}),(0,s.jsxs)(c.A,{variant:"h4",sx:{fontWeight:"normal"},children:[(0,s.jsx)("strong",{children:"Trace ID:"})," ",x.traceId]})]})]}),o&&(0,s.jsx)(eA,{search:n})]}):(0,s.jsx)(c.A,{children:"Trace contains no spans."})}function ez(e){let{options:t,customLinks:n,trace:r}=e,i=(0,l.useMemo)(()=>{try{return function(e){let t=new Map,n=[],s=0,r=0;for(let n of e.resourceSpans){let e=function(e){let t="unknown";for(let n of(null==e?void 0:e.attributes)??[])if("service.name"===n.key&&"stringValue"in n.value){t=n.value.stringValue;break}return{serviceName:t,attributes:(null==e?void 0:e.attributes)??[]}}(n.resource);for(let a of n.scopeSpans){let n=a.scope??{};for(let l of a.spans){var i;let a={resource:e,scope:n,childSpans:[],...{traceId:(i=l).traceId,spanId:i.spanId,parentSpanId:i.parentSpanId,name:i.name,kind:i.kind,startTimeUnixMs:1e-6*parseInt(i.startTimeUnixNano),endTimeUnixMs:1e-6*parseInt(i.endTimeUnixNano),attributes:i.attributes??[],events:(i.events??[]).map(Q),links:(i.links??[]).map(X),status:i.status??{}}};t.set(l.spanId,a),(0===s||a.startTimeUnixMs<s)&&(s=a.startTimeUnixMs),(0===r||a.endTimeUnixMs>r)&&(r=a.endTimeUnixMs)}}}for(let[,e]of t){if(!e.parentSpanId){n.push(e);continue}let s=t.get(e.parentSpanId);if(!s){console.trace(`span ${e.spanId} has parent ${e.parentSpanId} which has not been received yet`),n.push(e);continue}e.parentSpan=s;let r=(0,Y.sortedIndexBy)(s.childSpans,e,e=>e.startTimeUnixMs);s.childSpans.splice(r,0,e)}return{trace:e,rootSpans:n,spanById:t,startTimeUnixMs:s,endTimeUnixMs:r}}(r)}catch(e){throw Error(`Error: unable to parse trace: ${e}`,{cause:e})}},[r]),[a,u]=(0,l.useState)({startTimeUnixMs:i.startTimeUnixMs,endTimeUnixMs:i.endTimeUnixMs}),[c,p]=(0,l.useState)(()=>t.selectedSpanId?i.spanById.get(t.selectedSpanId):void 0),x=function(e){let[t,n]=(0,l.useState)(""),[s,r]=(0,l.useState)(0),i=(0,l.useMemo)(()=>{if(0===t.length)return[];let n=t.toLowerCase(),s=[];return J(e.rootSpans,e=>{var t;let r;r=e=>e.key.toLowerCase().includes(n)||R(e.value).toLowerCase().includes(n),((null==(t=e.resource.serviceName)?void 0:t.toLowerCase().includes(n))||e.name.toLowerCase().includes(n)||e.spanId.toLowerCase().includes(n)||e.attributes.some(r)||e.resource.attributes.some(r))&&s.push(e.spanId)}),s},[t,e.rootSpans]);return{searchQuery:t,setSearchQuery:(0,l.useCallback)(e=>{n(e),r(0)},[]),matchingSpanIds:i,focusedMatchIndex:s,setFocusedMatchIndex:r}}(i),m=(0,l.useRef)(null),[h,f]=(0,l.useState)(.82),v=m.current&&parseFloat(getComputedStyle(m.current).columnGap)||0;return(0,s.jsxs)(d.A,{ref:m,direction:"row",sx:{height:"100%",minHeight:"240px",gap:2},children:[(0,s.jsxs)(d.A,{sx:{flexGrow:1,gap:2},children:[(0,s.jsx)(e$,{trace:i,search:x}),(0,s.jsx)(ew,{options:t,trace:i,viewport:a,setViewport:u}),(0,s.jsx)(es,{children:(0,s.jsx)(eg,{options:t,customLinks:n,trace:i,viewport:a,selectedSpan:c,onSpanClick:p,matchingSpanIds:x.matchingSpanIds,focusedSpanId:x.matchingSpanIds[x.focusedMatchIndex]})})]}),c&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ev,{parentRef:m,spacing:v,onMove:f}),(0,s.jsx)(o.A,{style:{width:`${(1-h)*100}%`,minWidth:`${(1-h)*100}%`},sx:{overflow:"auto"},children:(0,s.jsx)(W,{customLinks:n,trace:i,span:c,onCloseBtnClick:()=>p(void 0)})})]})]})}let eE={PanelComponent:function(e){var t,n,i,a;let{spec:l,queryResults:d}=e,u=(0,r.useChartsTheme)().container.padding.default;if(d.length>1)return(0,s.jsx)(r.TextOverlay,{message:"This panel does not support more than one query."});if(null==(t=d[0])?void 0:t.data.searchResult)return(0,s.jsx)(r.TextOverlay,{message:"This panel does not support displaying trace search results. Please enter a trace id in the query field instead."});let c=null==(n=d[0])?void 0:n.data.trace;if(!c)return(0,s.jsx)(r.NoDataOverlay,{resource:"trace"});let p=null==(i=d[0])?void 0:i.definition.spec.plugin.spec,x=null==p||null==(a=p.datasource)?void 0:a.name,m=l.links?{variables:{datasourceName:x??""},links:l.links}:void 0;return(0,s.jsx)(o.A,{sx:{height:"100%",padding:`${u}px`},children:(0,s.jsx)(ez,{options:l,customLinks:m,trace:c})})},supportedQueryTypes:["TraceQuery"],createInitialOptions:function(){return{}},actions:[{component:function(e){var t,n;let{queryResults:o}=e,d=null==(n=o[0])||null==(t=n.data)?void 0:t.trace,u=(0,l.useCallback)(()=>{var e,t,n;let s,r;if(!d)return;let i=JSON.stringify(d,null,2);e=function(e){for(let t of e.resourceSpans)for(let e of t.scopeSpans)for(let t of e.spans)return`${t.traceId}.json`;return"trace.json"}(d),t="application/json",n=i,s=URL.createObjectURL(new Blob([n],{type:t})),(r=document.createElement("a")).download=e,r.href=s,r.click(),URL.revokeObjectURL(s)},[d]);return d?(0,s.jsx)(r.InfoTooltip,{description:"download OTLP/JSON trace",children:(0,s.jsx)(i.v,{"aria-label":"download OTLP/JSON trace",size:"small",onClick:u,children:(0,s.jsx)(a.default,{fontSize:"inherit"})})}):null}}]}}}]);