@workflow/web 4.1.0-beta.40 → 4.1.0-beta.42

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 (26) hide show
  1. package/README.md +5 -0
  2. package/build/client/assets/{highlighted-body-B3W2YXNL-BlfdcYh0.js → highlighted-body-B3W2YXNL-Zd0qPYE7.js} +1 -1
  3. package/build/client/assets/{home-Xl3EX8M3.js → home-C-j1J39E.js} +1 -1
  4. package/build/client/assets/{manifest-0e172cba.js → manifest-41615f41.js} +1 -1
  5. package/build/client/assets/mermaid-3ZIDBTTL-BMFG0Hnn.js +172 -0
  6. package/build/client/assets/{root-D-041AAq.js → root-EzkmXyJV.js} +1 -1
  7. package/build/client/assets/root-SL7uvdv2.css +1 -0
  8. package/build/client/assets/run-detail-C0ZpSKc-.js +36 -0
  9. package/build/client/assets/server-build-d6BKG46c.css +1 -0
  10. package/build/client/assets/{use-workflow-graph-C-GqGBPl.js → use-workflow-graph-DXipnqlR.js} +1 -1
  11. package/build/server/assets/{app-DLRJr3zg.js → app-BIqik-91.js} +1 -1
  12. package/build/server/assets/{highlighted-body-B3W2YXNL-7BMdhIzo.js → highlighted-body-B3W2YXNL-WkqeTqm-.js} +2 -2
  13. package/build/server/assets/{mermaid-3ZIDBTTL-C-mhM4Cx.js → mermaid-3ZIDBTTL-ClaETQoK.js} +2 -2
  14. package/build/server/assets/{server-build-B-uZ5KmC.js → server-build-Cyb0dncG.js} +1671 -1184
  15. package/build/server/assets/{token-mzBpVePm.js → token-Bjyd4X_e.js} +3 -3
  16. package/build/server/assets/{token-BRJJ012D.js → token-CTJIoJEi.js} +2 -2
  17. package/build/server/assets/{token-util-YAVqVR6-.js → token-util-D-4jXUkD.js} +2 -2
  18. package/build/server/assets/{token-util-C29I-on4.js → token-util-DoGNqK5w.js} +1 -1
  19. package/build/server/assets/{token-util-D7WmNSMO.js → token-util-Dp_pg92C.js} +2 -2
  20. package/build/server/index.js +1 -1
  21. package/package.json +5 -5
  22. package/server.js +4 -2
  23. package/build/client/assets/mermaid-3ZIDBTTL-RlQIshou.js +0 -172
  24. package/build/client/assets/root-9gRDb_Jz.css +0 -1
  25. package/build/client/assets/run-detail-BPOihWwO.js +0 -41
  26. package/build/client/assets/server-build-Dj97HEP4.css +0 -1
@@ -14,7 +14,7 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
14
14
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
15
15
  var __superGet = (cls, obj, key) => __reflectGet(__getProtoOf(cls), key, obj);
16
16
  var _a2, _reader;
17
- import { a as requireReact, S as ServerRouter, c as createReadableStreamFromReadable, r as reactExports, g as getDefaultExportFromCjs, R as React, b as ReactExports, w as withComponentProps, M as Meta, L as Links, d as ScrollRestoration, e as Scripts, O as Outlet, u as useNavigate, f as useSearchParams, h as Link$1, i as useLocation, j as useParams } from "./app-DLRJr3zg.js";
17
+ import { a as requireReact, S as ServerRouter, c as createReadableStreamFromReadable, r as reactExports, g as getDefaultExportFromCjs, R as React, b as ReactExports, w as withComponentProps, M as Meta, L as Links, d as ScrollRestoration, e as Scripts, O as Outlet, u as useNavigate, f as useSearchParams, h as Link$1, i as useLocation, j as useParams } from "./app-BIqik-91.js";
18
18
  import require$$0$4, { PassThrough } from "node:stream";
19
19
  import require$$0 from "util";
20
20
  import require$$1$1 from "crypto";
@@ -25,7 +25,7 @@ import path$2, { join as join$1, resolve, dirname, isAbsolute, sep } from "node:
25
25
  import { fileURLToPath } from "node:url";
26
26
  import { createRequire } from "module";
27
27
  import require$$0$8, { readdir, readlink, readFile, mkdir, access, constants as constants$5, writeFile, unlink, rm } from "node:fs/promises";
28
- import crypto, { webcrypto } from "node:crypto";
28
+ import crypto, { createHash, webcrypto } from "node:crypto";
29
29
  import require$$1$2 from "tty";
30
30
  import require$$0$1 from "os";
31
31
  import { createRequire as createRequire$1 } from "node:module";
@@ -30198,7 +30198,7 @@ const createLucideIcon = (iconName, iconNode) => {
30198
30198
  * This source code is licensed under the ISC license.
30199
30199
  * See the LICENSE file in the root directory of this source tree.
30200
30200
  */
30201
- const __iconNode$A = [
30201
+ const __iconNode$z = [
30202
30202
  [
30203
30203
  "path",
30204
30204
  {
@@ -30207,14 +30207,14 @@ const __iconNode$A = [
30207
30207
  }
30208
30208
  ]
30209
30209
  ];
30210
- const Activity = createLucideIcon("activity", __iconNode$A);
30210
+ const Activity = createLucideIcon("activity", __iconNode$z);
30211
30211
  /**
30212
30212
  * @license lucide-react v0.575.0 - ISC
30213
30213
  *
30214
30214
  * This source code is licensed under the ISC license.
30215
30215
  * See the LICENSE file in the root directory of this source tree.
30216
30216
  */
30217
- const __iconNode$z = [
30217
+ const __iconNode$y = [
30218
30218
  ["path", { d: "M6.87 6.87a8 8 0 1 0 11.26 11.26", key: "3on8tj" }],
30219
30219
  ["path", { d: "M19.9 14.25a8 8 0 0 0-9.15-9.15", key: "15ghsc" }],
30220
30220
  ["path", { d: "m22 6-3-3", key: "1opdir" }],
@@ -30222,105 +30222,105 @@ const __iconNode$z = [
30222
30222
  ["path", { d: "m2 2 20 20", key: "1ooewy" }],
30223
30223
  ["path", { d: "M4 4 2 6", key: "1ycko6" }]
30224
30224
  ];
30225
- const AlarmClockOff = createLucideIcon("alarm-clock-off", __iconNode$z);
30225
+ const AlarmClockOff = createLucideIcon("alarm-clock-off", __iconNode$y);
30226
30226
  /**
30227
30227
  * @license lucide-react v0.575.0 - ISC
30228
30228
  *
30229
30229
  * This source code is licensed under the ISC license.
30230
30230
  * See the LICENSE file in the root directory of this source tree.
30231
30231
  */
30232
- const __iconNode$y = [
30232
+ const __iconNode$x = [
30233
30233
  ["path", { d: "m3 16 4 4 4-4", key: "1co6wj" }],
30234
30234
  ["path", { d: "M7 20V4", key: "1yoxec" }],
30235
30235
  ["path", { d: "M20 8h-5", key: "1vsyxs" }],
30236
30236
  ["path", { d: "M15 10V6.5a2.5 2.5 0 0 1 5 0V10", key: "ag13bf" }],
30237
30237
  ["path", { d: "M15 14h5l-5 6h5", key: "ur5jdg" }]
30238
30238
  ];
30239
- const ArrowDownAZ = createLucideIcon("arrow-down-a-z", __iconNode$y);
30239
+ const ArrowDownAZ = createLucideIcon("arrow-down-a-z", __iconNode$x);
30240
30240
  /**
30241
30241
  * @license lucide-react v0.575.0 - ISC
30242
30242
  *
30243
30243
  * This source code is licensed under the ISC license.
30244
30244
  * See the LICENSE file in the root directory of this source tree.
30245
30245
  */
30246
- const __iconNode$x = [
30246
+ const __iconNode$w = [
30247
30247
  ["path", { d: "m3 8 4-4 4 4", key: "11wl7u" }],
30248
30248
  ["path", { d: "M7 4v16", key: "1glfcx" }],
30249
30249
  ["path", { d: "M20 8h-5", key: "1vsyxs" }],
30250
30250
  ["path", { d: "M15 10V6.5a2.5 2.5 0 0 1 5 0V10", key: "ag13bf" }],
30251
30251
  ["path", { d: "M15 14h5l-5 6h5", key: "ur5jdg" }]
30252
30252
  ];
30253
- const ArrowUpAZ = createLucideIcon("arrow-up-a-z", __iconNode$x);
30253
+ const ArrowUpAZ = createLucideIcon("arrow-up-a-z", __iconNode$w);
30254
30254
  /**
30255
30255
  * @license lucide-react v0.575.0 - ISC
30256
30256
  *
30257
30257
  * This source code is licensed under the ISC license.
30258
30258
  * See the LICENSE file in the root directory of this source tree.
30259
30259
  */
30260
- const __iconNode$w = [
30260
+ const __iconNode$v = [
30261
30261
  ["path", { d: "M7 7h10v10", key: "1tivn9" }],
30262
30262
  ["path", { d: "M7 17 17 7", key: "1vkiza" }]
30263
30263
  ];
30264
- const ArrowUpRight = createLucideIcon("arrow-up-right", __iconNode$w);
30264
+ const ArrowUpRight = createLucideIcon("arrow-up-right", __iconNode$v);
30265
30265
  /**
30266
30266
  * @license lucide-react v0.575.0 - ISC
30267
30267
  *
30268
30268
  * This source code is licensed under the ISC license.
30269
30269
  * See the LICENSE file in the root directory of this source tree.
30270
30270
  */
30271
- const __iconNode$v = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
30272
- const Check = createLucideIcon("check", __iconNode$v);
30271
+ const __iconNode$u = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
30272
+ const Check = createLucideIcon("check", __iconNode$u);
30273
30273
  /**
30274
30274
  * @license lucide-react v0.575.0 - ISC
30275
30275
  *
30276
30276
  * This source code is licensed under the ISC license.
30277
30277
  * See the LICENSE file in the root directory of this source tree.
30278
30278
  */
30279
- const __iconNode$u = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
30280
- const ChevronDown = createLucideIcon("chevron-down", __iconNode$u);
30279
+ const __iconNode$t = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
30280
+ const ChevronDown = createLucideIcon("chevron-down", __iconNode$t);
30281
30281
  /**
30282
30282
  * @license lucide-react v0.575.0 - ISC
30283
30283
  *
30284
30284
  * This source code is licensed under the ISC license.
30285
30285
  * See the LICENSE file in the root directory of this source tree.
30286
30286
  */
30287
- const __iconNode$t = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
30288
- const ChevronLeft = createLucideIcon("chevron-left", __iconNode$t);
30287
+ const __iconNode$s = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
30288
+ const ChevronLeft = createLucideIcon("chevron-left", __iconNode$s);
30289
30289
  /**
30290
30290
  * @license lucide-react v0.575.0 - ISC
30291
30291
  *
30292
30292
  * This source code is licensed under the ISC license.
30293
30293
  * See the LICENSE file in the root directory of this source tree.
30294
30294
  */
30295
- const __iconNode$s = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
30296
- const ChevronRight = createLucideIcon("chevron-right", __iconNode$s);
30295
+ const __iconNode$r = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
30296
+ const ChevronRight = createLucideIcon("chevron-right", __iconNode$r);
30297
30297
  /**
30298
30298
  * @license lucide-react v0.575.0 - ISC
30299
30299
  *
30300
30300
  * This source code is licensed under the ISC license.
30301
30301
  * See the LICENSE file in the root directory of this source tree.
30302
30302
  */
30303
- const __iconNode$r = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
30304
- const ChevronUp = createLucideIcon("chevron-up", __iconNode$r);
30303
+ const __iconNode$q = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
30304
+ const ChevronUp = createLucideIcon("chevron-up", __iconNode$q);
30305
30305
  /**
30306
30306
  * @license lucide-react v0.575.0 - ISC
30307
30307
  *
30308
30308
  * This source code is licensed under the ISC license.
30309
30309
  * See the LICENSE file in the root directory of this source tree.
30310
30310
  */
30311
- const __iconNode$q = [
30311
+ const __iconNode$p = [
30312
30312
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
30313
30313
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
30314
30314
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
30315
30315
  ];
30316
- const CircleAlert = createLucideIcon("circle-alert", __iconNode$q);
30316
+ const CircleAlert = createLucideIcon("circle-alert", __iconNode$p);
30317
30317
  /**
30318
30318
  * @license lucide-react v0.575.0 - ISC
30319
30319
  *
30320
30320
  * This source code is licensed under the ISC license.
30321
30321
  * See the LICENSE file in the root directory of this source tree.
30322
30322
  */
30323
- const __iconNode$p = [
30323
+ const __iconNode$o = [
30324
30324
  [
30325
30325
  "path",
30326
30326
  {
@@ -30330,127 +30330,127 @@ const __iconNode$p = [
30330
30330
  ],
30331
30331
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
30332
30332
  ];
30333
- const CirclePlay = createLucideIcon("circle-play", __iconNode$p);
30333
+ const CirclePlay = createLucideIcon("circle-play", __iconNode$o);
30334
30334
  /**
30335
30335
  * @license lucide-react v0.575.0 - ISC
30336
30336
  *
30337
30337
  * This source code is licensed under the ISC license.
30338
30338
  * See the LICENSE file in the root directory of this source tree.
30339
30339
  */
30340
- const __iconNode$o = [
30340
+ const __iconNode$n = [
30341
30341
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
30342
30342
  ["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
30343
30343
  ["path", { d: "M12 17h.01", key: "p32p05" }]
30344
30344
  ];
30345
- const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$o);
30345
+ const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$n);
30346
30346
  /**
30347
30347
  * @license lucide-react v0.575.0 - ISC
30348
30348
  *
30349
30349
  * This source code is licensed under the ISC license.
30350
30350
  * See the LICENSE file in the root directory of this source tree.
30351
30351
  */
30352
- const __iconNode$n = [
30352
+ const __iconNode$m = [
30353
30353
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
30354
30354
  ["rect", { x: "9", y: "9", width: "6", height: "6", rx: "1", key: "1ssd4o" }]
30355
30355
  ];
30356
- const CircleStop = createLucideIcon("circle-stop", __iconNode$n);
30356
+ const CircleStop = createLucideIcon("circle-stop", __iconNode$m);
30357
30357
  /**
30358
30358
  * @license lucide-react v0.575.0 - ISC
30359
30359
  *
30360
30360
  * This source code is licensed under the ISC license.
30361
30361
  * See the LICENSE file in the root directory of this source tree.
30362
30362
  */
30363
- const __iconNode$m = [
30363
+ const __iconNode$l = [
30364
30364
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
30365
30365
  ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
30366
30366
  ["path", { d: "m9 9 6 6", key: "z0biqf" }]
30367
30367
  ];
30368
- const CircleX = createLucideIcon("circle-x", __iconNode$m);
30368
+ const CircleX = createLucideIcon("circle-x", __iconNode$l);
30369
30369
  /**
30370
30370
  * @license lucide-react v0.575.0 - ISC
30371
30371
  *
30372
30372
  * This source code is licensed under the ISC license.
30373
30373
  * See the LICENSE file in the root directory of this source tree.
30374
30374
  */
30375
- const __iconNode$l = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]];
30376
- const Circle = createLucideIcon("circle", __iconNode$l);
30375
+ const __iconNode$k = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]];
30376
+ const Circle = createLucideIcon("circle", __iconNode$k);
30377
30377
  /**
30378
30378
  * @license lucide-react v0.575.0 - ISC
30379
30379
  *
30380
30380
  * This source code is licensed under the ISC license.
30381
30381
  * See the LICENSE file in the root directory of this source tree.
30382
30382
  */
30383
- const __iconNode$k = [
30383
+ const __iconNode$j = [
30384
30384
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
30385
30385
  ["path", { d: "M12 6v6l4 2", key: "mmk7yg" }]
30386
30386
  ];
30387
- const Clock = createLucideIcon("clock", __iconNode$k);
30387
+ const Clock = createLucideIcon("clock", __iconNode$j);
30388
30388
  /**
30389
30389
  * @license lucide-react v0.575.0 - ISC
30390
30390
  *
30391
30391
  * This source code is licensed under the ISC license.
30392
30392
  * See the LICENSE file in the root directory of this source tree.
30393
30393
  */
30394
- const __iconNode$j = [
30394
+ const __iconNode$i = [
30395
30395
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
30396
30396
  ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
30397
30397
  ];
30398
- const Copy = createLucideIcon("copy", __iconNode$j);
30398
+ const Copy = createLucideIcon("copy", __iconNode$i);
30399
30399
  /**
30400
30400
  * @license lucide-react v0.575.0 - ISC
30401
30401
  *
30402
30402
  * This source code is licensed under the ISC license.
30403
30403
  * See the LICENSE file in the root directory of this source tree.
30404
30404
  */
30405
- const __iconNode$i = [
30405
+ const __iconNode$h = [
30406
30406
  ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
30407
30407
  ["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
30408
30408
  ["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
30409
30409
  ];
30410
- const Ellipsis = createLucideIcon("ellipsis", __iconNode$i);
30410
+ const Ellipsis = createLucideIcon("ellipsis", __iconNode$h);
30411
30411
  /**
30412
30412
  * @license lucide-react v0.575.0 - ISC
30413
30413
  *
30414
30414
  * This source code is licensed under the ISC license.
30415
30415
  * See the LICENSE file in the root directory of this source tree.
30416
30416
  */
30417
- const __iconNode$h = [
30417
+ const __iconNode$g = [
30418
30418
  ["path", { d: "M15 6a9 9 0 0 0-9 9V3", key: "1cii5b" }],
30419
30419
  ["circle", { cx: "18", cy: "6", r: "3", key: "1h7g24" }],
30420
30420
  ["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }]
30421
30421
  ];
30422
- const GitBranch = createLucideIcon("git-branch", __iconNode$h);
30422
+ const GitBranch = createLucideIcon("git-branch", __iconNode$g);
30423
30423
  /**
30424
30424
  * @license lucide-react v0.575.0 - ISC
30425
30425
  *
30426
30426
  * This source code is licensed under the ISC license.
30427
30427
  * See the LICENSE file in the root directory of this source tree.
30428
30428
  */
30429
- const __iconNode$g = [
30429
+ const __iconNode$f = [
30430
30430
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
30431
30431
  ["path", { d: "M12 16v-4", key: "1dtifu" }],
30432
30432
  ["path", { d: "M12 8h.01", key: "e9boi3" }]
30433
30433
  ];
30434
- const Info$2 = createLucideIcon("info", __iconNode$g);
30434
+ const Info$2 = createLucideIcon("info", __iconNode$f);
30435
30435
  /**
30436
30436
  * @license lucide-react v0.575.0 - ISC
30437
30437
  *
30438
30438
  * This source code is licensed under the ISC license.
30439
30439
  * See the LICENSE file in the root directory of this source tree.
30440
30440
  */
30441
- const __iconNode$f = [
30441
+ const __iconNode$e = [
30442
30442
  ["path", { d: "M9 17H7A5 5 0 0 1 7 7h2", key: "8i5ue5" }],
30443
30443
  ["path", { d: "M15 7h2a5 5 0 1 1 0 10h-2", key: "1b9ql8" }],
30444
30444
  ["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
30445
30445
  ];
30446
- const Link2 = createLucideIcon("link-2", __iconNode$f);
30446
+ const Link2 = createLucideIcon("link-2", __iconNode$e);
30447
30447
  /**
30448
30448
  * @license lucide-react v0.575.0 - ISC
30449
30449
  *
30450
30450
  * This source code is licensed under the ISC license.
30451
30451
  * See the LICENSE file in the root directory of this source tree.
30452
30452
  */
30453
- const __iconNode$e = [
30453
+ const __iconNode$d = [
30454
30454
  ["path", { d: "M3 5h.01", key: "18ugdj" }],
30455
30455
  ["path", { d: "M3 12h.01", key: "nlz23k" }],
30456
30456
  ["path", { d: "M3 19h.01", key: "noohij" }],
@@ -30458,26 +30458,15 @@ const __iconNode$e = [
30458
30458
  ["path", { d: "M8 12h13", key: "1za7za" }],
30459
30459
  ["path", { d: "M8 19h13", key: "m83p4d" }]
30460
30460
  ];
30461
- const List$1 = createLucideIcon("list", __iconNode$e);
30461
+ const List$1 = createLucideIcon("list", __iconNode$d);
30462
30462
  /**
30463
30463
  * @license lucide-react v0.575.0 - ISC
30464
30464
  *
30465
30465
  * This source code is licensed under the ISC license.
30466
30466
  * See the LICENSE file in the root directory of this source tree.
30467
30467
  */
30468
- const __iconNode$d = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
30469
- const LoaderCircle = createLucideIcon("loader-circle", __iconNode$d);
30470
- /**
30471
- * @license lucide-react v0.575.0 - ISC
30472
- *
30473
- * This source code is licensed under the ISC license.
30474
- * See the LICENSE file in the root directory of this source tree.
30475
- */
30476
- const __iconNode$c = [
30477
- ["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
30478
- ["path", { d: "M7 11V7a5 5 0 0 1 9.9-1", key: "1mm8w8" }]
30479
- ];
30480
- const LockOpen = createLucideIcon("lock-open", __iconNode$c);
30468
+ const __iconNode$c = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
30469
+ const LoaderCircle = createLucideIcon("loader-circle", __iconNode$c);
30481
30470
  /**
30482
30471
  * @license lucide-react v0.575.0 - ISC
30483
30472
  *
@@ -33964,792 +33953,6 @@ const Lr = /* @__PURE__ */ K$3(() => {
33964
33953
  function kn$1(t, e, n) {
33965
33954
  return e !== "normal" && !(e != null && e.endsWith("px")) && n(`${t} was not resolved to pixel value correctly`, e, Ct$1.WARN), e === "normal" ? 0 : parseInt(e != null ? e : "0", 10);
33966
33955
  }
33967
- var __create = Object.create;
33968
- var __defProp2 = Object.defineProperty;
33969
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
33970
- var __getOwnPropNames = Object.getOwnPropertyNames;
33971
- var __getProtoOf2 = Object.getPrototypeOf;
33972
- var __hasOwnProp = Object.prototype.hasOwnProperty;
33973
- var __commonJS = (cb, mod) => function __require() {
33974
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
33975
- };
33976
- var __export = (target2, all2) => {
33977
- for (var name2 in all2)
33978
- __defProp2(target2, name2, { get: all2[name2], enumerable: true });
33979
- };
33980
- var __copyProps = (to2, from, except, desc) => {
33981
- if (from && typeof from === "object" || typeof from === "function") {
33982
- for (let key of __getOwnPropNames(from))
33983
- if (!__hasOwnProp.call(to2, key) && key !== except)
33984
- __defProp2(to2, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
33985
- }
33986
- return to2;
33987
- };
33988
- var __toESM = (mod, isNodeMode, target2) => (target2 = mod != null ? __create(__getProtoOf2(mod)) : {}, __copyProps(
33989
- // If the importer is in node compatibility mode or this is not an ESM
33990
- // file that has been converted to a CommonJS file using a Babel-
33991
- // compatible transform (i.e. "__esModule" has not been set), then set
33992
- // "default" to the CommonJS "module.exports" for node compatibility.
33993
- __defProp2(target2, "default", { value: mod, enumerable: true }),
33994
- mod
33995
- ));
33996
- var require_is_object = __commonJS({
33997
- "node_modules/is-object/index.js"(exports$1, module) {
33998
- module.exports = function isObject2(x2) {
33999
- return typeof x2 === "object" && x2 !== null;
34000
- };
34001
- }
34002
- });
34003
- var require_is_window = __commonJS({
34004
- "node_modules/is-window/index.js"(exports$1, module) {
34005
- module.exports = function(obj) {
34006
- if (obj == null) {
34007
- return false;
34008
- }
34009
- var o = Object(obj);
34010
- return o === o.window;
34011
- };
34012
- }
34013
- });
34014
- var require_is_dom = __commonJS({
34015
- "node_modules/is-dom/index.js"(exports$1, module) {
34016
- var isObject2 = require_is_object();
34017
- var isWindow = require_is_window();
34018
- function isNode2(val) {
34019
- if (!isObject2(val) || !isWindow(window) || typeof window.Node !== "function") {
34020
- return false;
34021
- }
34022
- return typeof val.nodeType === "number" && typeof val.nodeName === "string";
34023
- }
34024
- module.exports = isNode2;
34025
- }
34026
- });
34027
- var themes_exports = {};
34028
- __export(themes_exports, {
34029
- chromeDark: () => theme,
34030
- chromeLight: () => theme2
34031
- });
34032
- var theme = {
34033
- BASE_FONT_FAMILY: "Menlo, monospace",
34034
- BASE_FONT_SIZE: "11px",
34035
- BASE_LINE_HEIGHT: 1.2,
34036
- BASE_BACKGROUND_COLOR: "rgb(36, 36, 36)",
34037
- BASE_COLOR: "rgb(213, 213, 213)",
34038
- OBJECT_PREVIEW_ARRAY_MAX_PROPERTIES: 10,
34039
- OBJECT_PREVIEW_OBJECT_MAX_PROPERTIES: 5,
34040
- OBJECT_NAME_COLOR: "rgb(227, 110, 236)",
34041
- OBJECT_VALUE_NULL_COLOR: "rgb(127, 127, 127)",
34042
- OBJECT_VALUE_UNDEFINED_COLOR: "rgb(127, 127, 127)",
34043
- OBJECT_VALUE_REGEXP_COLOR: "rgb(233, 63, 59)",
34044
- OBJECT_VALUE_STRING_COLOR: "rgb(233, 63, 59)",
34045
- OBJECT_VALUE_SYMBOL_COLOR: "rgb(233, 63, 59)",
34046
- OBJECT_VALUE_NUMBER_COLOR: "hsl(252, 100%, 75%)",
34047
- OBJECT_VALUE_BOOLEAN_COLOR: "hsl(252, 100%, 75%)",
34048
- OBJECT_VALUE_FUNCTION_PREFIX_COLOR: "rgb(85, 106, 242)",
34049
- HTML_TAG_COLOR: "rgb(93, 176, 215)",
34050
- HTML_TAGNAME_COLOR: "rgb(93, 176, 215)",
34051
- HTML_TAGNAME_TEXT_TRANSFORM: "lowercase",
34052
- HTML_ATTRIBUTE_NAME_COLOR: "rgb(155, 187, 220)",
34053
- HTML_ATTRIBUTE_VALUE_COLOR: "rgb(242, 151, 102)",
34054
- HTML_COMMENT_COLOR: "rgb(137, 137, 137)",
34055
- HTML_DOCTYPE_COLOR: "rgb(192, 192, 192)",
34056
- ARROW_COLOR: "rgb(145, 145, 145)",
34057
- ARROW_MARGIN_RIGHT: 3,
34058
- ARROW_FONT_SIZE: 12,
34059
- ARROW_ANIMATION_DURATION: "0",
34060
- TREENODE_FONT_FAMILY: "Menlo, monospace",
34061
- TREENODE_FONT_SIZE: "11px",
34062
- TREENODE_LINE_HEIGHT: 1.2,
34063
- TREENODE_PADDING_LEFT: 12,
34064
- TABLE_BORDER_COLOR: "rgb(85, 85, 85)",
34065
- TABLE_TH_BACKGROUND_COLOR: "rgb(44, 44, 44)",
34066
- TABLE_TH_HOVER_COLOR: "rgb(48, 48, 48)",
34067
- TABLE_SORT_ICON_COLOR: "black",
34068
- //'rgb(48, 57, 66)',
34069
- TABLE_DATA_BACKGROUND_IMAGE: "linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0) 50%, rgba(51, 139, 255, 0.0980392) 50%, rgba(51, 139, 255, 0.0980392))",
34070
- TABLE_DATA_BACKGROUND_SIZE: "128px 32px"
34071
- };
34072
- var theme2 = {
34073
- BASE_FONT_FAMILY: "Menlo, monospace",
34074
- BASE_FONT_SIZE: "11px",
34075
- BASE_LINE_HEIGHT: 1.2,
34076
- BASE_BACKGROUND_COLOR: "white",
34077
- BASE_COLOR: "black",
34078
- OBJECT_PREVIEW_ARRAY_MAX_PROPERTIES: 10,
34079
- OBJECT_PREVIEW_OBJECT_MAX_PROPERTIES: 5,
34080
- OBJECT_NAME_COLOR: "rgb(136, 19, 145)",
34081
- OBJECT_VALUE_NULL_COLOR: "rgb(128, 128, 128)",
34082
- OBJECT_VALUE_UNDEFINED_COLOR: "rgb(128, 128, 128)",
34083
- OBJECT_VALUE_REGEXP_COLOR: "rgb(196, 26, 22)",
34084
- OBJECT_VALUE_STRING_COLOR: "rgb(196, 26, 22)",
34085
- OBJECT_VALUE_SYMBOL_COLOR: "rgb(196, 26, 22)",
34086
- OBJECT_VALUE_NUMBER_COLOR: "rgb(28, 0, 207)",
34087
- OBJECT_VALUE_BOOLEAN_COLOR: "rgb(28, 0, 207)",
34088
- OBJECT_VALUE_FUNCTION_PREFIX_COLOR: "rgb(13, 34, 170)",
34089
- HTML_TAG_COLOR: "rgb(168, 148, 166)",
34090
- HTML_TAGNAME_COLOR: "rgb(136, 18, 128)",
34091
- HTML_TAGNAME_TEXT_TRANSFORM: "lowercase",
34092
- HTML_ATTRIBUTE_NAME_COLOR: "rgb(153, 69, 0)",
34093
- HTML_ATTRIBUTE_VALUE_COLOR: "rgb(26, 26, 166)",
34094
- HTML_COMMENT_COLOR: "rgb(35, 110, 37)",
34095
- HTML_DOCTYPE_COLOR: "rgb(192, 192, 192)",
34096
- ARROW_COLOR: "#6e6e6e",
34097
- ARROW_MARGIN_RIGHT: 3,
34098
- ARROW_FONT_SIZE: 12,
34099
- ARROW_ANIMATION_DURATION: "0",
34100
- TREENODE_FONT_FAMILY: "Menlo, monospace",
34101
- TREENODE_FONT_SIZE: "11px",
34102
- TREENODE_LINE_HEIGHT: 1.2,
34103
- TREENODE_PADDING_LEFT: 12,
34104
- TABLE_BORDER_COLOR: "#aaa",
34105
- TABLE_TH_BACKGROUND_COLOR: "#eee",
34106
- TABLE_TH_HOVER_COLOR: "hsla(0, 0%, 90%, 1)",
34107
- TABLE_SORT_ICON_COLOR: "#6e6e6e",
34108
- TABLE_DATA_BACKGROUND_IMAGE: "linear-gradient(to bottom, white, white 50%, rgb(234, 243, 255) 50%, rgb(234, 243, 255))",
34109
- TABLE_DATA_BACKGROUND_SIZE: "128px 32px"
34110
- };
34111
- var ExpandedPathsContext = reactExports.createContext([{}, () => {
34112
- }]);
34113
- var unselectable = {
34114
- WebkitTouchCallout: "none",
34115
- WebkitUserSelect: "none",
34116
- KhtmlUserSelect: "none",
34117
- MozUserSelect: "none",
34118
- msUserSelect: "none",
34119
- OUserSelect: "none",
34120
- userSelect: "none"
34121
- };
34122
- var createTheme = (theme3) => ({
34123
- DOMNodePreview: {
34124
- htmlOpenTag: {
34125
- base: {
34126
- color: theme3.HTML_TAG_COLOR
34127
- },
34128
- tagName: {
34129
- color: theme3.HTML_TAGNAME_COLOR,
34130
- textTransform: theme3.HTML_TAGNAME_TEXT_TRANSFORM
34131
- },
34132
- htmlAttributeName: {
34133
- color: theme3.HTML_ATTRIBUTE_NAME_COLOR
34134
- },
34135
- htmlAttributeValue: {
34136
- color: theme3.HTML_ATTRIBUTE_VALUE_COLOR
34137
- }
34138
- },
34139
- htmlCloseTag: {
34140
- base: {
34141
- color: theme3.HTML_TAG_COLOR
34142
- },
34143
- offsetLeft: {
34144
- /* hack: offset placeholder */
34145
- marginLeft: -theme3.TREENODE_PADDING_LEFT
34146
- },
34147
- tagName: {
34148
- color: theme3.HTML_TAGNAME_COLOR,
34149
- textTransform: theme3.HTML_TAGNAME_TEXT_TRANSFORM
34150
- }
34151
- },
34152
- htmlComment: {
34153
- color: theme3.HTML_COMMENT_COLOR
34154
- },
34155
- htmlDoctype: {
34156
- color: theme3.HTML_DOCTYPE_COLOR
34157
- }
34158
- },
34159
- ObjectPreview: {
34160
- objectDescription: {
34161
- fontStyle: "italic"
34162
- },
34163
- preview: {
34164
- fontStyle: "italic"
34165
- },
34166
- arrayMaxProperties: theme3.OBJECT_PREVIEW_ARRAY_MAX_PROPERTIES,
34167
- objectMaxProperties: theme3.OBJECT_PREVIEW_OBJECT_MAX_PROPERTIES
34168
- },
34169
- ObjectName: {
34170
- base: {
34171
- color: theme3.OBJECT_NAME_COLOR
34172
- },
34173
- dimmed: {
34174
- opacity: 0.6
34175
- }
34176
- },
34177
- ObjectValue: {
34178
- objectValueNull: {
34179
- color: theme3.OBJECT_VALUE_NULL_COLOR
34180
- },
34181
- objectValueUndefined: {
34182
- color: theme3.OBJECT_VALUE_UNDEFINED_COLOR
34183
- },
34184
- objectValueRegExp: {
34185
- color: theme3.OBJECT_VALUE_REGEXP_COLOR
34186
- },
34187
- objectValueString: {
34188
- color: theme3.OBJECT_VALUE_STRING_COLOR
34189
- },
34190
- objectValueSymbol: {
34191
- color: theme3.OBJECT_VALUE_SYMBOL_COLOR
34192
- },
34193
- objectValueNumber: {
34194
- color: theme3.OBJECT_VALUE_NUMBER_COLOR
34195
- },
34196
- objectValueBoolean: {
34197
- color: theme3.OBJECT_VALUE_BOOLEAN_COLOR
34198
- },
34199
- objectValueFunctionPrefix: {
34200
- color: theme3.OBJECT_VALUE_FUNCTION_PREFIX_COLOR,
34201
- fontStyle: "italic"
34202
- },
34203
- objectValueFunctionName: {
34204
- fontStyle: "italic"
34205
- }
34206
- },
34207
- TreeView: {
34208
- treeViewOutline: {
34209
- padding: 0,
34210
- margin: 0,
34211
- listStyleType: "none"
34212
- }
34213
- },
34214
- TreeNode: {
34215
- treeNodeBase: {
34216
- color: theme3.BASE_COLOR,
34217
- backgroundColor: theme3.BASE_BACKGROUND_COLOR,
34218
- lineHeight: theme3.TREENODE_LINE_HEIGHT,
34219
- cursor: "default",
34220
- boxSizing: "border-box",
34221
- listStyle: "none",
34222
- fontFamily: theme3.TREENODE_FONT_FAMILY,
34223
- fontSize: theme3.TREENODE_FONT_SIZE
34224
- },
34225
- treeNodePreviewContainer: {},
34226
- treeNodePlaceholder: {
34227
- whiteSpace: "pre",
34228
- fontSize: theme3.ARROW_FONT_SIZE,
34229
- marginRight: theme3.ARROW_MARGIN_RIGHT,
34230
- ...unselectable
34231
- },
34232
- treeNodeArrow: {
34233
- base: {
34234
- color: theme3.ARROW_COLOR,
34235
- display: "inline-block",
34236
- // lineHeight: '14px',
34237
- fontSize: theme3.ARROW_FONT_SIZE,
34238
- marginRight: theme3.ARROW_MARGIN_RIGHT,
34239
- ...parseFloat(theme3.ARROW_ANIMATION_DURATION) > 0 ? {
34240
- transition: `transform ${theme3.ARROW_ANIMATION_DURATION} ease 0s`
34241
- } : {},
34242
- ...unselectable
34243
- },
34244
- expanded: {
34245
- WebkitTransform: "rotateZ(90deg)",
34246
- MozTransform: "rotateZ(90deg)",
34247
- transform: "rotateZ(90deg)"
34248
- },
34249
- collapsed: {
34250
- WebkitTransform: "rotateZ(0deg)",
34251
- MozTransform: "rotateZ(0deg)",
34252
- transform: "rotateZ(0deg)"
34253
- }
34254
- },
34255
- treeNodeChildNodesContainer: {
34256
- margin: 0,
34257
- // reset user-agent style
34258
- paddingLeft: theme3.TREENODE_PADDING_LEFT
34259
- }
34260
- },
34261
- TableInspector: {
34262
- base: {
34263
- color: theme3.BASE_COLOR,
34264
- position: "relative",
34265
- border: `1px solid ${theme3.TABLE_BORDER_COLOR}`,
34266
- fontFamily: theme3.BASE_FONT_FAMILY,
34267
- fontSize: theme3.BASE_FONT_SIZE,
34268
- lineHeight: "120%",
34269
- boxSizing: "border-box",
34270
- cursor: "default"
34271
- }
34272
- },
34273
- TableInspectorHeaderContainer: {
34274
- base: {
34275
- top: 0,
34276
- height: "17px",
34277
- left: 0,
34278
- right: 0,
34279
- overflowX: "hidden"
34280
- },
34281
- table: {
34282
- tableLayout: "fixed",
34283
- borderSpacing: 0,
34284
- borderCollapse: "separate",
34285
- height: "100%",
34286
- width: "100%",
34287
- margin: 0
34288
- }
34289
- },
34290
- TableInspectorDataContainer: {
34291
- tr: {
34292
- display: "table-row"
34293
- },
34294
- td: {
34295
- boxSizing: "border-box",
34296
- border: "none",
34297
- // prevent overrides
34298
- height: "16px",
34299
- // /* 0.5 * table.background-size height */
34300
- verticalAlign: "top",
34301
- padding: "1px 4px",
34302
- WebkitUserSelect: "text",
34303
- whiteSpace: "nowrap",
34304
- textOverflow: "ellipsis",
34305
- overflow: "hidden",
34306
- lineHeight: "14px"
34307
- },
34308
- div: {
34309
- position: "static",
34310
- top: "17px",
34311
- bottom: 0,
34312
- overflowY: "overlay",
34313
- transform: "translateZ(0)",
34314
- left: 0,
34315
- right: 0,
34316
- overflowX: "hidden"
34317
- },
34318
- table: {
34319
- positon: "static",
34320
- left: 0,
34321
- top: 0,
34322
- right: 0,
34323
- bottom: 0,
34324
- borderTop: "0 none transparent",
34325
- margin: 0,
34326
- // prevent user agent stylesheet overrides
34327
- backgroundImage: theme3.TABLE_DATA_BACKGROUND_IMAGE,
34328
- backgroundSize: theme3.TABLE_DATA_BACKGROUND_SIZE,
34329
- tableLayout: "fixed",
34330
- // table
34331
- borderSpacing: 0,
34332
- borderCollapse: "separate",
34333
- // height: '100%',
34334
- width: "100%",
34335
- fontSize: theme3.BASE_FONT_SIZE,
34336
- lineHeight: "120%"
34337
- }
34338
- },
34339
- TableInspectorTH: {
34340
- base: {
34341
- position: "relative",
34342
- // anchor for sort icon container
34343
- height: "auto",
34344
- textAlign: "left",
34345
- backgroundColor: theme3.TABLE_TH_BACKGROUND_COLOR,
34346
- borderBottom: `1px solid ${theme3.TABLE_BORDER_COLOR}`,
34347
- fontWeight: "normal",
34348
- verticalAlign: "middle",
34349
- padding: "0 4px",
34350
- whiteSpace: "nowrap",
34351
- textOverflow: "ellipsis",
34352
- overflow: "hidden",
34353
- lineHeight: "14px",
34354
- ":hover": {
34355
- backgroundColor: theme3.TABLE_TH_HOVER_COLOR
34356
- }
34357
- },
34358
- div: {
34359
- whiteSpace: "nowrap",
34360
- textOverflow: "ellipsis",
34361
- overflow: "hidden",
34362
- // prevent user agent stylesheet overrides
34363
- fontSize: theme3.BASE_FONT_SIZE,
34364
- lineHeight: "120%"
34365
- }
34366
- },
34367
- TableInspectorLeftBorder: {
34368
- none: {
34369
- borderLeft: "none"
34370
- },
34371
- solid: {
34372
- borderLeft: `1px solid ${theme3.TABLE_BORDER_COLOR}`
34373
- }
34374
- },
34375
- TableInspectorSortIcon: {
34376
- display: "block",
34377
- marginRight: 3,
34378
- // 4,
34379
- width: 8,
34380
- height: 7,
34381
- marginTop: -7,
34382
- color: theme3.TABLE_SORT_ICON_COLOR,
34383
- fontSize: 12,
34384
- // lineHeight: 14
34385
- ...unselectable
34386
- }
34387
- });
34388
- var DEFAULT_THEME_NAME = "chromeLight";
34389
- var ThemeContext = reactExports.createContext(createTheme(themes_exports[DEFAULT_THEME_NAME]));
34390
- var useStyles = (baseStylesKey) => {
34391
- const themeStyles = reactExports.useContext(ThemeContext);
34392
- return themeStyles[baseStylesKey];
34393
- };
34394
- var themeAcceptor = (WrappedComponent) => {
34395
- const ThemeAcceptor = ({ theme: theme3 = DEFAULT_THEME_NAME, ...restProps }) => {
34396
- const themeStyles = reactExports.useMemo(() => {
34397
- switch (Object.prototype.toString.call(theme3)) {
34398
- case "[object String]":
34399
- return createTheme(themes_exports[theme3]);
34400
- case "[object Object]":
34401
- return createTheme(theme3);
34402
- default:
34403
- return createTheme(themes_exports[DEFAULT_THEME_NAME]);
34404
- }
34405
- }, [theme3]);
34406
- return /* @__PURE__ */ ReactExports.createElement(ThemeContext.Provider, { value: themeStyles }, /* @__PURE__ */ ReactExports.createElement(WrappedComponent, { ...restProps }));
34407
- };
34408
- return ThemeAcceptor;
34409
- };
34410
- var Arrow$2 = ({ expanded: expanded2, styles: styles2 }) => /* @__PURE__ */ ReactExports.createElement(
34411
- "span",
34412
- {
34413
- style: {
34414
- ...styles2.base,
34415
- ...expanded2 ? styles2.expanded : styles2.collapsed
34416
- }
34417
- },
34418
- "▶"
34419
- );
34420
- var TreeNode = reactExports.memo((props) => {
34421
- props = {
34422
- expanded: true,
34423
- nodeRenderer: ({ name: name2 }) => /* @__PURE__ */ ReactExports.createElement("span", null, name2),
34424
- onClick: () => {
34425
- },
34426
- shouldShowArrow: false,
34427
- shouldShowPlaceholder: true,
34428
- ...props
34429
- };
34430
- const { expanded: expanded2, onClick, children: children2, nodeRenderer, title, shouldShowArrow, shouldShowPlaceholder: shouldShowPlaceholder2 } = props;
34431
- const styles2 = useStyles("TreeNode");
34432
- const NodeRenderer2 = nodeRenderer;
34433
- return /* @__PURE__ */ ReactExports.createElement("li", { "aria-expanded": expanded2, role: "treeitem", style: styles2.treeNodeBase, title }, /* @__PURE__ */ ReactExports.createElement("div", { style: styles2.treeNodePreviewContainer, onClick }, shouldShowArrow || reactExports.Children.count(children2) > 0 ? /* @__PURE__ */ ReactExports.createElement(Arrow$2, { expanded: expanded2, styles: styles2.treeNodeArrow }) : shouldShowPlaceholder2 && /* @__PURE__ */ ReactExports.createElement("span", { style: styles2.treeNodePlaceholder }, " "), /* @__PURE__ */ ReactExports.createElement(NodeRenderer2, { ...props })), /* @__PURE__ */ ReactExports.createElement("ol", { role: "group", style: styles2.treeNodeChildNodesContainer }, expanded2 ? children2 : void 0));
34434
- });
34435
- var DEFAULT_ROOT_PATH = "$";
34436
- var WILDCARD = "*";
34437
- function hasChildNodes(data, dataIterator) {
34438
- return !dataIterator(data).next().done;
34439
- }
34440
- var wildcardPathsFromLevel = (level) => {
34441
- return Array.from(
34442
- { length: level },
34443
- (_2, i) => [DEFAULT_ROOT_PATH].concat(Array.from({ length: i }, () => "*")).join(".")
34444
- );
34445
- };
34446
- var getExpandedPaths = (data, dataIterator, expandPaths, expandLevel, prevExpandedPaths) => {
34447
- const wildcardPaths = [].concat(wildcardPathsFromLevel(expandLevel)).concat(expandPaths).filter((path2) => typeof path2 === "string");
34448
- const expandedPaths = [];
34449
- wildcardPaths.forEach((wildcardPath) => {
34450
- const keyPaths = wildcardPath.split(".");
34451
- const populatePaths = (curData, curPath, depth) => {
34452
- if (depth === keyPaths.length) {
34453
- expandedPaths.push(curPath);
34454
- return;
34455
- }
34456
- const key = keyPaths[depth];
34457
- if (depth === 0) {
34458
- if (hasChildNodes(curData, dataIterator) && (key === DEFAULT_ROOT_PATH || key === WILDCARD)) {
34459
- populatePaths(curData, DEFAULT_ROOT_PATH, depth + 1);
34460
- }
34461
- } else {
34462
- if (key === WILDCARD) {
34463
- for (const { name: name2, data: data2 } of dataIterator(curData)) {
34464
- if (hasChildNodes(data2, dataIterator)) {
34465
- populatePaths(data2, `${curPath}.${name2}`, depth + 1);
34466
- }
34467
- }
34468
- } else {
34469
- const value = curData[key];
34470
- if (hasChildNodes(value, dataIterator)) {
34471
- populatePaths(value, `${curPath}.${key}`, depth + 1);
34472
- }
34473
- }
34474
- }
34475
- };
34476
- populatePaths(data, "", 0);
34477
- });
34478
- return expandedPaths.reduce(
34479
- (obj, path2) => {
34480
- obj[path2] = true;
34481
- return obj;
34482
- },
34483
- { ...prevExpandedPaths }
34484
- );
34485
- };
34486
- var ConnectedTreeNode = reactExports.memo((props) => {
34487
- const { data, dataIterator, path: path2, depth, nodeRenderer } = props;
34488
- const [expandedPaths, setExpandedPaths] = reactExports.useContext(ExpandedPathsContext);
34489
- const nodeHasChildNodes = hasChildNodes(data, dataIterator);
34490
- const expanded2 = !!expandedPaths[path2];
34491
- const handleClick = reactExports.useCallback(
34492
- () => nodeHasChildNodes && setExpandedPaths((prevExpandedPaths) => ({
34493
- ...prevExpandedPaths,
34494
- [path2]: !expanded2
34495
- })),
34496
- [nodeHasChildNodes, setExpandedPaths, path2, expanded2]
34497
- );
34498
- return /* @__PURE__ */ ReactExports.createElement(
34499
- TreeNode,
34500
- {
34501
- expanded: expanded2,
34502
- onClick: handleClick,
34503
- shouldShowArrow: nodeHasChildNodes,
34504
- shouldShowPlaceholder: depth > 0,
34505
- nodeRenderer,
34506
- ...props
34507
- },
34508
- // only render if the node is expanded
34509
- expanded2 ? [...dataIterator(data)].map(({ name: name2, data: data2, ...renderNodeProps }) => {
34510
- return /* @__PURE__ */ ReactExports.createElement(
34511
- ConnectedTreeNode,
34512
- {
34513
- name: name2,
34514
- data: data2,
34515
- depth: depth + 1,
34516
- path: `${path2}.${name2}`,
34517
- key: name2,
34518
- dataIterator,
34519
- nodeRenderer,
34520
- ...renderNodeProps
34521
- }
34522
- );
34523
- }) : null
34524
- );
34525
- });
34526
- var TreeView = reactExports.memo(({ name: name2, data, dataIterator, nodeRenderer, expandPaths, expandLevel }) => {
34527
- const styles2 = useStyles("TreeView");
34528
- const stateAndSetter = reactExports.useState({});
34529
- const [, setExpandedPaths] = stateAndSetter;
34530
- reactExports.useLayoutEffect(
34531
- () => setExpandedPaths(
34532
- (prevExpandedPaths) => getExpandedPaths(data, dataIterator, expandPaths, expandLevel, prevExpandedPaths)
34533
- ),
34534
- [data, dataIterator, expandPaths, expandLevel]
34535
- );
34536
- return /* @__PURE__ */ ReactExports.createElement(ExpandedPathsContext.Provider, { value: stateAndSetter }, /* @__PURE__ */ ReactExports.createElement("ol", { role: "tree", style: styles2.treeViewOutline }, /* @__PURE__ */ ReactExports.createElement(
34537
- ConnectedTreeNode,
34538
- {
34539
- name: name2,
34540
- data,
34541
- dataIterator,
34542
- depth: 0,
34543
- path: DEFAULT_ROOT_PATH,
34544
- nodeRenderer
34545
- }
34546
- )));
34547
- });
34548
- var ObjectName = ({ name: name2, dimmed = false, styles: styles2 = {} }) => {
34549
- const themeStyles = useStyles("ObjectName");
34550
- const appliedStyles = {
34551
- ...themeStyles.base,
34552
- ...dimmed ? themeStyles["dimmed"] : {},
34553
- ...styles2
34554
- };
34555
- return /* @__PURE__ */ ReactExports.createElement("span", { style: appliedStyles }, name2);
34556
- };
34557
- var ObjectValue = ({ object: object2, styles: styles2 }) => {
34558
- const themeStyles = useStyles("ObjectValue");
34559
- const mkStyle = (key) => ({ ...themeStyles[key], ...styles2 });
34560
- switch (typeof object2) {
34561
- case "bigint":
34562
- return /* @__PURE__ */ ReactExports.createElement("span", { style: mkStyle("objectValueNumber") }, String(object2), "n");
34563
- case "number":
34564
- return /* @__PURE__ */ ReactExports.createElement("span", { style: mkStyle("objectValueNumber") }, String(object2));
34565
- case "string":
34566
- return /* @__PURE__ */ ReactExports.createElement("span", { style: mkStyle("objectValueString") }, '"', object2, '"');
34567
- case "boolean":
34568
- return /* @__PURE__ */ ReactExports.createElement("span", { style: mkStyle("objectValueBoolean") }, String(object2));
34569
- case "undefined":
34570
- return /* @__PURE__ */ ReactExports.createElement("span", { style: mkStyle("objectValueUndefined") }, "undefined");
34571
- case "object":
34572
- if (object2 === null) {
34573
- return /* @__PURE__ */ ReactExports.createElement("span", { style: mkStyle("objectValueNull") }, "null");
34574
- }
34575
- if (object2 instanceof Date) {
34576
- return /* @__PURE__ */ ReactExports.createElement("span", null, object2.toString());
34577
- }
34578
- if (object2 instanceof RegExp) {
34579
- return /* @__PURE__ */ ReactExports.createElement("span", { style: mkStyle("objectValueRegExp") }, object2.toString());
34580
- }
34581
- if (Array.isArray(object2)) {
34582
- return /* @__PURE__ */ ReactExports.createElement("span", null, `Array(${object2.length})`);
34583
- }
34584
- if (!object2.constructor) {
34585
- return /* @__PURE__ */ ReactExports.createElement("span", null, "Object");
34586
- }
34587
- if (typeof object2.constructor.isBuffer === "function" && object2.constructor.isBuffer(object2)) {
34588
- return /* @__PURE__ */ ReactExports.createElement("span", null, `Buffer[${object2.length}]`);
34589
- }
34590
- return /* @__PURE__ */ ReactExports.createElement("span", null, object2.constructor.name);
34591
- case "function":
34592
- return /* @__PURE__ */ ReactExports.createElement("span", null, /* @__PURE__ */ ReactExports.createElement("span", { style: mkStyle("objectValueFunctionPrefix") }, "ƒ "), /* @__PURE__ */ ReactExports.createElement("span", { style: mkStyle("objectValueFunctionName") }, object2.name, "()"));
34593
- case "symbol":
34594
- return /* @__PURE__ */ ReactExports.createElement("span", { style: mkStyle("objectValueSymbol") }, object2.toString());
34595
- default:
34596
- return /* @__PURE__ */ ReactExports.createElement("span", null);
34597
- }
34598
- };
34599
- var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
34600
- var propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
34601
- function getPropertyValue(object2, propertyName) {
34602
- const propertyDescriptor = Object.getOwnPropertyDescriptor(object2, propertyName);
34603
- if (propertyDescriptor.get) {
34604
- try {
34605
- return propertyDescriptor.get();
34606
- } catch {
34607
- return propertyDescriptor.get;
34608
- }
34609
- }
34610
- return object2[propertyName];
34611
- }
34612
- function intersperse(arr, sep2) {
34613
- if (arr.length === 0) {
34614
- return [];
34615
- }
34616
- return arr.slice(1).reduce((xs, x2) => xs.concat([sep2, x2]), [arr[0]]);
34617
- }
34618
- var ObjectPreview = ({ data }) => {
34619
- const styles2 = useStyles("ObjectPreview");
34620
- const object2 = data;
34621
- if (typeof object2 !== "object" || object2 === null || object2 instanceof Date || object2 instanceof RegExp) {
34622
- return /* @__PURE__ */ ReactExports.createElement(ObjectValue, { object: object2 });
34623
- }
34624
- if (Array.isArray(object2)) {
34625
- const maxProperties = styles2.arrayMaxProperties;
34626
- const previewArray = object2.slice(0, maxProperties).map((element2, index2) => /* @__PURE__ */ ReactExports.createElement(ObjectValue, { key: index2, object: element2 }));
34627
- if (object2.length > maxProperties) {
34628
- previewArray.push(/* @__PURE__ */ ReactExports.createElement("span", { key: "ellipsis" }, "…"));
34629
- }
34630
- const arrayLength = object2.length;
34631
- return /* @__PURE__ */ ReactExports.createElement(ReactExports.Fragment, null, /* @__PURE__ */ ReactExports.createElement("span", { style: styles2.objectDescription }, arrayLength === 0 ? `` : `(${arrayLength}) `), /* @__PURE__ */ ReactExports.createElement("span", { style: styles2.preview }, "[", intersperse(previewArray, ", "), "]"));
34632
- } else {
34633
- const maxProperties = styles2.objectMaxProperties;
34634
- const propertyNodes = [];
34635
- for (const propertyName in object2) {
34636
- if (hasOwnProperty$1.call(object2, propertyName)) {
34637
- let ellipsis;
34638
- if (propertyNodes.length === maxProperties - 1 && Object.keys(object2).length > maxProperties) {
34639
- ellipsis = /* @__PURE__ */ ReactExports.createElement("span", { key: "ellipsis" }, "…");
34640
- }
34641
- const propertyValue2 = getPropertyValue(object2, propertyName);
34642
- propertyNodes.push(
34643
- /* @__PURE__ */ ReactExports.createElement("span", { key: propertyName }, /* @__PURE__ */ ReactExports.createElement(ObjectName, { name: propertyName || `""` }), ": ", /* @__PURE__ */ ReactExports.createElement(ObjectValue, { object: propertyValue2 }), ellipsis)
34644
- );
34645
- if (ellipsis) break;
34646
- }
34647
- }
34648
- const objectConstructorName = object2.constructor ? object2.constructor.name : "Object";
34649
- return /* @__PURE__ */ ReactExports.createElement(ReactExports.Fragment, null, /* @__PURE__ */ ReactExports.createElement("span", { style: styles2.objectDescription }, objectConstructorName === "Object" ? "" : `${objectConstructorName} `), /* @__PURE__ */ ReactExports.createElement("span", { style: styles2.preview }, "{", intersperse(propertyNodes, ", "), "}"));
34650
- }
34651
- };
34652
- var ObjectRootLabel = ({ name: name2, data }) => {
34653
- if (typeof name2 === "string") {
34654
- return /* @__PURE__ */ ReactExports.createElement("span", null, /* @__PURE__ */ ReactExports.createElement(ObjectName, { name: name2 }), /* @__PURE__ */ ReactExports.createElement("span", null, ": "), /* @__PURE__ */ ReactExports.createElement(ObjectPreview, { data }));
34655
- } else {
34656
- return /* @__PURE__ */ ReactExports.createElement(ObjectPreview, { data });
34657
- }
34658
- };
34659
- var ObjectLabel = ({ name: name2, data, isNonenumerable = false }) => {
34660
- const object2 = data;
34661
- return /* @__PURE__ */ ReactExports.createElement("span", null, typeof name2 === "string" ? /* @__PURE__ */ ReactExports.createElement(ObjectName, { name: name2, dimmed: isNonenumerable }) : /* @__PURE__ */ ReactExports.createElement(ObjectPreview, { data: name2 }), /* @__PURE__ */ ReactExports.createElement("span", null, ": "), /* @__PURE__ */ ReactExports.createElement(ObjectValue, { object: object2 }));
34662
- };
34663
- var createIterator = (showNonenumerable, sortObjectKeys) => {
34664
- const objectIterator = function* (data) {
34665
- const shouldIterate = typeof data === "object" && data !== null || typeof data === "function";
34666
- if (!shouldIterate) return;
34667
- const dataIsArray = Array.isArray(data);
34668
- if (!dataIsArray && data[Symbol.iterator]) {
34669
- let i = 0;
34670
- for (const entry2 of data) {
34671
- if (Array.isArray(entry2) && entry2.length === 2) {
34672
- const [k2, v2] = entry2;
34673
- yield {
34674
- name: k2,
34675
- data: v2
34676
- };
34677
- } else {
34678
- yield {
34679
- name: i.toString(),
34680
- data: entry2
34681
- };
34682
- }
34683
- i++;
34684
- }
34685
- } else {
34686
- const keys2 = Object.getOwnPropertyNames(data);
34687
- if (sortObjectKeys === true && !dataIsArray) {
34688
- keys2.sort();
34689
- } else if (typeof sortObjectKeys === "function") {
34690
- keys2.sort(sortObjectKeys);
34691
- }
34692
- for (const propertyName of keys2) {
34693
- if (propertyIsEnumerable.call(data, propertyName)) {
34694
- const propertyValue2 = getPropertyValue(data, propertyName);
34695
- yield {
34696
- name: propertyName || `""`,
34697
- data: propertyValue2
34698
- };
34699
- } else if (showNonenumerable) {
34700
- let propertyValue2;
34701
- try {
34702
- propertyValue2 = getPropertyValue(data, propertyName);
34703
- } catch (e) {
34704
- }
34705
- if (propertyValue2 !== void 0) {
34706
- yield {
34707
- name: propertyName,
34708
- data: propertyValue2,
34709
- isNonenumerable: true
34710
- };
34711
- }
34712
- }
34713
- }
34714
- if (showNonenumerable && data !== Object.prototype) {
34715
- yield {
34716
- name: "__proto__",
34717
- data: Object.getPrototypeOf(data),
34718
- isNonenumerable: true
34719
- };
34720
- }
34721
- }
34722
- };
34723
- return objectIterator;
34724
- };
34725
- var defaultNodeRenderer = ({ depth, name: name2, data, isNonenumerable }) => depth === 0 ? /* @__PURE__ */ ReactExports.createElement(ObjectRootLabel, { name: name2, data }) : /* @__PURE__ */ ReactExports.createElement(ObjectLabel, { name: name2, data, isNonenumerable });
34726
- var ObjectInspector = ({ showNonenumerable = false, sortObjectKeys, nodeRenderer, ...treeViewProps }) => {
34727
- const dataIterator = createIterator(showNonenumerable, sortObjectKeys);
34728
- const renderer = nodeRenderer ? nodeRenderer : defaultNodeRenderer;
34729
- return /* @__PURE__ */ ReactExports.createElement(TreeView, { nodeRenderer: renderer, dataIterator, ...treeViewProps });
34730
- };
34731
- var themedObjectInspector = themeAcceptor(ObjectInspector);
34732
- __toESM(require_is_dom());
34733
- const useDarkMode = () => {
34734
- const [isDark, setIsDark] = reactExports.useState(() => {
34735
- if (typeof document === "undefined")
34736
- return false;
34737
- return document.documentElement.classList.contains("dark");
34738
- });
34739
- reactExports.useEffect(() => {
34740
- if (typeof document === "undefined")
34741
- return;
34742
- const observer = new MutationObserver(() => {
34743
- setIsDark(document.documentElement.classList.contains("dark"));
34744
- });
34745
- observer.observe(document.documentElement, {
34746
- attributes: true,
34747
- attributeFilter: ["class"]
34748
- });
34749
- return () => observer.disconnect();
34750
- }, []);
34751
- return isDark;
34752
- };
34753
33956
  class DevalueError extends Error {
34754
33957
  /**
34755
33958
  * @param {string} message
@@ -35712,6 +34915,850 @@ async function hydrateResourceIOWithKey(resource, key) {
35712
34915
  }
35713
34916
  return result;
35714
34917
  }
34918
+ const KEYFRAMES = `@keyframes wf-spinner-fade{0%{opacity:1}100%{opacity:.15}}`;
34919
+ function Spinner({ size: size2 = 14, color: color5 }) {
34920
+ const config2 = size2 <= 12 ? {
34921
+ angle: 45,
34922
+ delays: [-875, -750, -625, -500, -375, -250, -125, 0],
34923
+ duration: 1e3,
34924
+ lineW: 3,
34925
+ lineH: 1.5
34926
+ } : size2 <= 16 ? {
34927
+ angle: 36,
34928
+ delays: [-900, -800, -700, -600, -500, -400, -300, -200, -100, 0],
34929
+ duration: 1e3,
34930
+ lineW: 4,
34931
+ lineH: 1.5
34932
+ } : {
34933
+ angle: 30,
34934
+ delays: [
34935
+ -1100,
34936
+ -1e3,
34937
+ -900,
34938
+ -800,
34939
+ -700,
34940
+ -600,
34941
+ -500,
34942
+ -400,
34943
+ -300,
34944
+ -200,
34945
+ -100,
34946
+ 0
34947
+ ],
34948
+ duration: 1200,
34949
+ lineW: size2 * 0.24,
34950
+ lineH: size2 * 0.08
34951
+ };
34952
+ return jsxRuntimeExports.jsxs("span", { style: {
34953
+ display: "inline-flex",
34954
+ position: "relative",
34955
+ width: size2,
34956
+ height: size2
34957
+ }, children: [jsxRuntimeExports.jsx("style", { dangerouslySetInnerHTML: { __html: KEYFRAMES } }), config2.delays.map((delay, i) => jsxRuntimeExports.jsx("span", { style: {
34958
+ position: "absolute",
34959
+ left: "50%",
34960
+ top: "50%",
34961
+ width: config2.lineW,
34962
+ height: config2.lineH,
34963
+ marginLeft: -config2.lineW / 2,
34964
+ marginTop: -config2.lineH / 2,
34965
+ borderRadius: 1,
34966
+ backgroundColor: color5 ?? "var(--ds-gray-700)",
34967
+ transform: `rotate(${i * config2.angle}deg) translate(${size2 * 0.36}px)`,
34968
+ animation: `wf-spinner-fade ${config2.duration}ms linear infinite`,
34969
+ animationDelay: `${delay}ms`
34970
+ } }, delay))] });
34971
+ }
34972
+ const STYLES$2 = `.wf-decrypt-btn{appearance:none;-webkit-appearance:none;border:none;display:inline-flex;align-items:center;justify-content:center;height:40px;padding:0 12px;border-radius:6px;font-size:14px;font-weight:500;line-height:20px;cursor:pointer;white-space:nowrap;gap:6px;transition:background 150ms}.wf-decrypt-idle{color:var(--ds-gray-1000);background:var(--ds-background-100);box-shadow:0 0 0 1px var(--ds-gray-400)}.wf-decrypt-idle:hover{background:var(--ds-gray-alpha-200)}.wf-decrypt-done{color:var(--ds-green-900);background:var(--ds-green-100);box-shadow:0 0 0 1px var(--ds-green-400);cursor:default}`;
34973
+ function DecryptButton({ decrypted = false, loading = false, onClick }) {
34974
+ return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("style", { dangerouslySetInnerHTML: { __html: STYLES$2 } }), jsxRuntimeExports.jsxs("button", { type: "button", onClick: decrypted ? void 0 : onClick, disabled: decrypted || loading, className: `wf-decrypt-btn ${decrypted ? "wf-decrypt-done" : "wf-decrypt-idle"}`, children: [loading ? jsxRuntimeExports.jsx(Spinner, { size: 14 }) : decrypted ? jsxRuntimeExports.jsxs("svg", { width: 14, height: 14, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [jsxRuntimeExports.jsx("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2" }), jsxRuntimeExports.jsx("path", { d: "M7 11V7a5 5 0 0 1 9.9-1" })] }) : jsxRuntimeExports.jsxs("svg", { width: 14, height: 14, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [jsxRuntimeExports.jsx("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2" }), jsxRuntimeExports.jsx("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })] }), loading ? "Decrypting…" : decrypted ? "Decrypted" : "Decrypt"] })] });
34975
+ }
34976
+ var __create = Object.create;
34977
+ var __defProp2 = Object.defineProperty;
34978
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
34979
+ var __getOwnPropNames = Object.getOwnPropertyNames;
34980
+ var __getProtoOf2 = Object.getPrototypeOf;
34981
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
34982
+ var __commonJS = (cb, mod) => function __require() {
34983
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
34984
+ };
34985
+ var __export = (target2, all2) => {
34986
+ for (var name2 in all2)
34987
+ __defProp2(target2, name2, { get: all2[name2], enumerable: true });
34988
+ };
34989
+ var __copyProps = (to2, from, except, desc) => {
34990
+ if (from && typeof from === "object" || typeof from === "function") {
34991
+ for (let key of __getOwnPropNames(from))
34992
+ if (!__hasOwnProp.call(to2, key) && key !== except)
34993
+ __defProp2(to2, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
34994
+ }
34995
+ return to2;
34996
+ };
34997
+ var __toESM = (mod, isNodeMode, target2) => (target2 = mod != null ? __create(__getProtoOf2(mod)) : {}, __copyProps(
34998
+ // If the importer is in node compatibility mode or this is not an ESM
34999
+ // file that has been converted to a CommonJS file using a Babel-
35000
+ // compatible transform (i.e. "__esModule" has not been set), then set
35001
+ // "default" to the CommonJS "module.exports" for node compatibility.
35002
+ __defProp2(target2, "default", { value: mod, enumerable: true }),
35003
+ mod
35004
+ ));
35005
+ var require_is_object = __commonJS({
35006
+ "node_modules/is-object/index.js"(exports$1, module) {
35007
+ module.exports = function isObject2(x2) {
35008
+ return typeof x2 === "object" && x2 !== null;
35009
+ };
35010
+ }
35011
+ });
35012
+ var require_is_window = __commonJS({
35013
+ "node_modules/is-window/index.js"(exports$1, module) {
35014
+ module.exports = function(obj) {
35015
+ if (obj == null) {
35016
+ return false;
35017
+ }
35018
+ var o = Object(obj);
35019
+ return o === o.window;
35020
+ };
35021
+ }
35022
+ });
35023
+ var require_is_dom = __commonJS({
35024
+ "node_modules/is-dom/index.js"(exports$1, module) {
35025
+ var isObject2 = require_is_object();
35026
+ var isWindow = require_is_window();
35027
+ function isNode2(val) {
35028
+ if (!isObject2(val) || !isWindow(window) || typeof window.Node !== "function") {
35029
+ return false;
35030
+ }
35031
+ return typeof val.nodeType === "number" && typeof val.nodeName === "string";
35032
+ }
35033
+ module.exports = isNode2;
35034
+ }
35035
+ });
35036
+ var themes_exports = {};
35037
+ __export(themes_exports, {
35038
+ chromeDark: () => theme,
35039
+ chromeLight: () => theme2
35040
+ });
35041
+ var theme = {
35042
+ BASE_FONT_FAMILY: "Menlo, monospace",
35043
+ BASE_FONT_SIZE: "11px",
35044
+ BASE_LINE_HEIGHT: 1.2,
35045
+ BASE_BACKGROUND_COLOR: "rgb(36, 36, 36)",
35046
+ BASE_COLOR: "rgb(213, 213, 213)",
35047
+ OBJECT_PREVIEW_ARRAY_MAX_PROPERTIES: 10,
35048
+ OBJECT_PREVIEW_OBJECT_MAX_PROPERTIES: 5,
35049
+ OBJECT_NAME_COLOR: "rgb(227, 110, 236)",
35050
+ OBJECT_VALUE_NULL_COLOR: "rgb(127, 127, 127)",
35051
+ OBJECT_VALUE_UNDEFINED_COLOR: "rgb(127, 127, 127)",
35052
+ OBJECT_VALUE_REGEXP_COLOR: "rgb(233, 63, 59)",
35053
+ OBJECT_VALUE_STRING_COLOR: "rgb(233, 63, 59)",
35054
+ OBJECT_VALUE_SYMBOL_COLOR: "rgb(233, 63, 59)",
35055
+ OBJECT_VALUE_NUMBER_COLOR: "hsl(252, 100%, 75%)",
35056
+ OBJECT_VALUE_BOOLEAN_COLOR: "hsl(252, 100%, 75%)",
35057
+ OBJECT_VALUE_FUNCTION_PREFIX_COLOR: "rgb(85, 106, 242)",
35058
+ HTML_TAG_COLOR: "rgb(93, 176, 215)",
35059
+ HTML_TAGNAME_COLOR: "rgb(93, 176, 215)",
35060
+ HTML_TAGNAME_TEXT_TRANSFORM: "lowercase",
35061
+ HTML_ATTRIBUTE_NAME_COLOR: "rgb(155, 187, 220)",
35062
+ HTML_ATTRIBUTE_VALUE_COLOR: "rgb(242, 151, 102)",
35063
+ HTML_COMMENT_COLOR: "rgb(137, 137, 137)",
35064
+ HTML_DOCTYPE_COLOR: "rgb(192, 192, 192)",
35065
+ ARROW_COLOR: "rgb(145, 145, 145)",
35066
+ ARROW_MARGIN_RIGHT: 3,
35067
+ ARROW_FONT_SIZE: 12,
35068
+ ARROW_ANIMATION_DURATION: "0",
35069
+ TREENODE_FONT_FAMILY: "Menlo, monospace",
35070
+ TREENODE_FONT_SIZE: "11px",
35071
+ TREENODE_LINE_HEIGHT: 1.2,
35072
+ TREENODE_PADDING_LEFT: 12,
35073
+ TABLE_BORDER_COLOR: "rgb(85, 85, 85)",
35074
+ TABLE_TH_BACKGROUND_COLOR: "rgb(44, 44, 44)",
35075
+ TABLE_TH_HOVER_COLOR: "rgb(48, 48, 48)",
35076
+ TABLE_SORT_ICON_COLOR: "black",
35077
+ //'rgb(48, 57, 66)',
35078
+ TABLE_DATA_BACKGROUND_IMAGE: "linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0) 50%, rgba(51, 139, 255, 0.0980392) 50%, rgba(51, 139, 255, 0.0980392))",
35079
+ TABLE_DATA_BACKGROUND_SIZE: "128px 32px"
35080
+ };
35081
+ var theme2 = {
35082
+ BASE_FONT_FAMILY: "Menlo, monospace",
35083
+ BASE_FONT_SIZE: "11px",
35084
+ BASE_LINE_HEIGHT: 1.2,
35085
+ BASE_BACKGROUND_COLOR: "white",
35086
+ BASE_COLOR: "black",
35087
+ OBJECT_PREVIEW_ARRAY_MAX_PROPERTIES: 10,
35088
+ OBJECT_PREVIEW_OBJECT_MAX_PROPERTIES: 5,
35089
+ OBJECT_NAME_COLOR: "rgb(136, 19, 145)",
35090
+ OBJECT_VALUE_NULL_COLOR: "rgb(128, 128, 128)",
35091
+ OBJECT_VALUE_UNDEFINED_COLOR: "rgb(128, 128, 128)",
35092
+ OBJECT_VALUE_REGEXP_COLOR: "rgb(196, 26, 22)",
35093
+ OBJECT_VALUE_STRING_COLOR: "rgb(196, 26, 22)",
35094
+ OBJECT_VALUE_SYMBOL_COLOR: "rgb(196, 26, 22)",
35095
+ OBJECT_VALUE_NUMBER_COLOR: "rgb(28, 0, 207)",
35096
+ OBJECT_VALUE_BOOLEAN_COLOR: "rgb(28, 0, 207)",
35097
+ OBJECT_VALUE_FUNCTION_PREFIX_COLOR: "rgb(13, 34, 170)",
35098
+ HTML_TAG_COLOR: "rgb(168, 148, 166)",
35099
+ HTML_TAGNAME_COLOR: "rgb(136, 18, 128)",
35100
+ HTML_TAGNAME_TEXT_TRANSFORM: "lowercase",
35101
+ HTML_ATTRIBUTE_NAME_COLOR: "rgb(153, 69, 0)",
35102
+ HTML_ATTRIBUTE_VALUE_COLOR: "rgb(26, 26, 166)",
35103
+ HTML_COMMENT_COLOR: "rgb(35, 110, 37)",
35104
+ HTML_DOCTYPE_COLOR: "rgb(192, 192, 192)",
35105
+ ARROW_COLOR: "#6e6e6e",
35106
+ ARROW_MARGIN_RIGHT: 3,
35107
+ ARROW_FONT_SIZE: 12,
35108
+ ARROW_ANIMATION_DURATION: "0",
35109
+ TREENODE_FONT_FAMILY: "Menlo, monospace",
35110
+ TREENODE_FONT_SIZE: "11px",
35111
+ TREENODE_LINE_HEIGHT: 1.2,
35112
+ TREENODE_PADDING_LEFT: 12,
35113
+ TABLE_BORDER_COLOR: "#aaa",
35114
+ TABLE_TH_BACKGROUND_COLOR: "#eee",
35115
+ TABLE_TH_HOVER_COLOR: "hsla(0, 0%, 90%, 1)",
35116
+ TABLE_SORT_ICON_COLOR: "#6e6e6e",
35117
+ TABLE_DATA_BACKGROUND_IMAGE: "linear-gradient(to bottom, white, white 50%, rgb(234, 243, 255) 50%, rgb(234, 243, 255))",
35118
+ TABLE_DATA_BACKGROUND_SIZE: "128px 32px"
35119
+ };
35120
+ var ExpandedPathsContext = reactExports.createContext([{}, () => {
35121
+ }]);
35122
+ var unselectable = {
35123
+ WebkitTouchCallout: "none",
35124
+ WebkitUserSelect: "none",
35125
+ KhtmlUserSelect: "none",
35126
+ MozUserSelect: "none",
35127
+ msUserSelect: "none",
35128
+ OUserSelect: "none",
35129
+ userSelect: "none"
35130
+ };
35131
+ var createTheme = (theme3) => ({
35132
+ DOMNodePreview: {
35133
+ htmlOpenTag: {
35134
+ base: {
35135
+ color: theme3.HTML_TAG_COLOR
35136
+ },
35137
+ tagName: {
35138
+ color: theme3.HTML_TAGNAME_COLOR,
35139
+ textTransform: theme3.HTML_TAGNAME_TEXT_TRANSFORM
35140
+ },
35141
+ htmlAttributeName: {
35142
+ color: theme3.HTML_ATTRIBUTE_NAME_COLOR
35143
+ },
35144
+ htmlAttributeValue: {
35145
+ color: theme3.HTML_ATTRIBUTE_VALUE_COLOR
35146
+ }
35147
+ },
35148
+ htmlCloseTag: {
35149
+ base: {
35150
+ color: theme3.HTML_TAG_COLOR
35151
+ },
35152
+ offsetLeft: {
35153
+ /* hack: offset placeholder */
35154
+ marginLeft: -theme3.TREENODE_PADDING_LEFT
35155
+ },
35156
+ tagName: {
35157
+ color: theme3.HTML_TAGNAME_COLOR,
35158
+ textTransform: theme3.HTML_TAGNAME_TEXT_TRANSFORM
35159
+ }
35160
+ },
35161
+ htmlComment: {
35162
+ color: theme3.HTML_COMMENT_COLOR
35163
+ },
35164
+ htmlDoctype: {
35165
+ color: theme3.HTML_DOCTYPE_COLOR
35166
+ }
35167
+ },
35168
+ ObjectPreview: {
35169
+ objectDescription: {
35170
+ fontStyle: "italic"
35171
+ },
35172
+ preview: {
35173
+ fontStyle: "italic"
35174
+ },
35175
+ arrayMaxProperties: theme3.OBJECT_PREVIEW_ARRAY_MAX_PROPERTIES,
35176
+ objectMaxProperties: theme3.OBJECT_PREVIEW_OBJECT_MAX_PROPERTIES
35177
+ },
35178
+ ObjectName: {
35179
+ base: {
35180
+ color: theme3.OBJECT_NAME_COLOR
35181
+ },
35182
+ dimmed: {
35183
+ opacity: 0.6
35184
+ }
35185
+ },
35186
+ ObjectValue: {
35187
+ objectValueNull: {
35188
+ color: theme3.OBJECT_VALUE_NULL_COLOR
35189
+ },
35190
+ objectValueUndefined: {
35191
+ color: theme3.OBJECT_VALUE_UNDEFINED_COLOR
35192
+ },
35193
+ objectValueRegExp: {
35194
+ color: theme3.OBJECT_VALUE_REGEXP_COLOR
35195
+ },
35196
+ objectValueString: {
35197
+ color: theme3.OBJECT_VALUE_STRING_COLOR
35198
+ },
35199
+ objectValueSymbol: {
35200
+ color: theme3.OBJECT_VALUE_SYMBOL_COLOR
35201
+ },
35202
+ objectValueNumber: {
35203
+ color: theme3.OBJECT_VALUE_NUMBER_COLOR
35204
+ },
35205
+ objectValueBoolean: {
35206
+ color: theme3.OBJECT_VALUE_BOOLEAN_COLOR
35207
+ },
35208
+ objectValueFunctionPrefix: {
35209
+ color: theme3.OBJECT_VALUE_FUNCTION_PREFIX_COLOR,
35210
+ fontStyle: "italic"
35211
+ },
35212
+ objectValueFunctionName: {
35213
+ fontStyle: "italic"
35214
+ }
35215
+ },
35216
+ TreeView: {
35217
+ treeViewOutline: {
35218
+ padding: 0,
35219
+ margin: 0,
35220
+ listStyleType: "none"
35221
+ }
35222
+ },
35223
+ TreeNode: {
35224
+ treeNodeBase: {
35225
+ color: theme3.BASE_COLOR,
35226
+ backgroundColor: theme3.BASE_BACKGROUND_COLOR,
35227
+ lineHeight: theme3.TREENODE_LINE_HEIGHT,
35228
+ cursor: "default",
35229
+ boxSizing: "border-box",
35230
+ listStyle: "none",
35231
+ fontFamily: theme3.TREENODE_FONT_FAMILY,
35232
+ fontSize: theme3.TREENODE_FONT_SIZE
35233
+ },
35234
+ treeNodePreviewContainer: {},
35235
+ treeNodePlaceholder: {
35236
+ whiteSpace: "pre",
35237
+ fontSize: theme3.ARROW_FONT_SIZE,
35238
+ marginRight: theme3.ARROW_MARGIN_RIGHT,
35239
+ ...unselectable
35240
+ },
35241
+ treeNodeArrow: {
35242
+ base: {
35243
+ color: theme3.ARROW_COLOR,
35244
+ display: "inline-block",
35245
+ // lineHeight: '14px',
35246
+ fontSize: theme3.ARROW_FONT_SIZE,
35247
+ marginRight: theme3.ARROW_MARGIN_RIGHT,
35248
+ ...parseFloat(theme3.ARROW_ANIMATION_DURATION) > 0 ? {
35249
+ transition: `transform ${theme3.ARROW_ANIMATION_DURATION} ease 0s`
35250
+ } : {},
35251
+ ...unselectable
35252
+ },
35253
+ expanded: {
35254
+ WebkitTransform: "rotateZ(90deg)",
35255
+ MozTransform: "rotateZ(90deg)",
35256
+ transform: "rotateZ(90deg)"
35257
+ },
35258
+ collapsed: {
35259
+ WebkitTransform: "rotateZ(0deg)",
35260
+ MozTransform: "rotateZ(0deg)",
35261
+ transform: "rotateZ(0deg)"
35262
+ }
35263
+ },
35264
+ treeNodeChildNodesContainer: {
35265
+ margin: 0,
35266
+ // reset user-agent style
35267
+ paddingLeft: theme3.TREENODE_PADDING_LEFT
35268
+ }
35269
+ },
35270
+ TableInspector: {
35271
+ base: {
35272
+ color: theme3.BASE_COLOR,
35273
+ position: "relative",
35274
+ border: `1px solid ${theme3.TABLE_BORDER_COLOR}`,
35275
+ fontFamily: theme3.BASE_FONT_FAMILY,
35276
+ fontSize: theme3.BASE_FONT_SIZE,
35277
+ lineHeight: "120%",
35278
+ boxSizing: "border-box",
35279
+ cursor: "default"
35280
+ }
35281
+ },
35282
+ TableInspectorHeaderContainer: {
35283
+ base: {
35284
+ top: 0,
35285
+ height: "17px",
35286
+ left: 0,
35287
+ right: 0,
35288
+ overflowX: "hidden"
35289
+ },
35290
+ table: {
35291
+ tableLayout: "fixed",
35292
+ borderSpacing: 0,
35293
+ borderCollapse: "separate",
35294
+ height: "100%",
35295
+ width: "100%",
35296
+ margin: 0
35297
+ }
35298
+ },
35299
+ TableInspectorDataContainer: {
35300
+ tr: {
35301
+ display: "table-row"
35302
+ },
35303
+ td: {
35304
+ boxSizing: "border-box",
35305
+ border: "none",
35306
+ // prevent overrides
35307
+ height: "16px",
35308
+ // /* 0.5 * table.background-size height */
35309
+ verticalAlign: "top",
35310
+ padding: "1px 4px",
35311
+ WebkitUserSelect: "text",
35312
+ whiteSpace: "nowrap",
35313
+ textOverflow: "ellipsis",
35314
+ overflow: "hidden",
35315
+ lineHeight: "14px"
35316
+ },
35317
+ div: {
35318
+ position: "static",
35319
+ top: "17px",
35320
+ bottom: 0,
35321
+ overflowY: "overlay",
35322
+ transform: "translateZ(0)",
35323
+ left: 0,
35324
+ right: 0,
35325
+ overflowX: "hidden"
35326
+ },
35327
+ table: {
35328
+ positon: "static",
35329
+ left: 0,
35330
+ top: 0,
35331
+ right: 0,
35332
+ bottom: 0,
35333
+ borderTop: "0 none transparent",
35334
+ margin: 0,
35335
+ // prevent user agent stylesheet overrides
35336
+ backgroundImage: theme3.TABLE_DATA_BACKGROUND_IMAGE,
35337
+ backgroundSize: theme3.TABLE_DATA_BACKGROUND_SIZE,
35338
+ tableLayout: "fixed",
35339
+ // table
35340
+ borderSpacing: 0,
35341
+ borderCollapse: "separate",
35342
+ // height: '100%',
35343
+ width: "100%",
35344
+ fontSize: theme3.BASE_FONT_SIZE,
35345
+ lineHeight: "120%"
35346
+ }
35347
+ },
35348
+ TableInspectorTH: {
35349
+ base: {
35350
+ position: "relative",
35351
+ // anchor for sort icon container
35352
+ height: "auto",
35353
+ textAlign: "left",
35354
+ backgroundColor: theme3.TABLE_TH_BACKGROUND_COLOR,
35355
+ borderBottom: `1px solid ${theme3.TABLE_BORDER_COLOR}`,
35356
+ fontWeight: "normal",
35357
+ verticalAlign: "middle",
35358
+ padding: "0 4px",
35359
+ whiteSpace: "nowrap",
35360
+ textOverflow: "ellipsis",
35361
+ overflow: "hidden",
35362
+ lineHeight: "14px",
35363
+ ":hover": {
35364
+ backgroundColor: theme3.TABLE_TH_HOVER_COLOR
35365
+ }
35366
+ },
35367
+ div: {
35368
+ whiteSpace: "nowrap",
35369
+ textOverflow: "ellipsis",
35370
+ overflow: "hidden",
35371
+ // prevent user agent stylesheet overrides
35372
+ fontSize: theme3.BASE_FONT_SIZE,
35373
+ lineHeight: "120%"
35374
+ }
35375
+ },
35376
+ TableInspectorLeftBorder: {
35377
+ none: {
35378
+ borderLeft: "none"
35379
+ },
35380
+ solid: {
35381
+ borderLeft: `1px solid ${theme3.TABLE_BORDER_COLOR}`
35382
+ }
35383
+ },
35384
+ TableInspectorSortIcon: {
35385
+ display: "block",
35386
+ marginRight: 3,
35387
+ // 4,
35388
+ width: 8,
35389
+ height: 7,
35390
+ marginTop: -7,
35391
+ color: theme3.TABLE_SORT_ICON_COLOR,
35392
+ fontSize: 12,
35393
+ // lineHeight: 14
35394
+ ...unselectable
35395
+ }
35396
+ });
35397
+ var DEFAULT_THEME_NAME = "chromeLight";
35398
+ var ThemeContext = reactExports.createContext(createTheme(themes_exports[DEFAULT_THEME_NAME]));
35399
+ var useStyles = (baseStylesKey) => {
35400
+ const themeStyles = reactExports.useContext(ThemeContext);
35401
+ return themeStyles[baseStylesKey];
35402
+ };
35403
+ var themeAcceptor = (WrappedComponent) => {
35404
+ const ThemeAcceptor = ({ theme: theme3 = DEFAULT_THEME_NAME, ...restProps }) => {
35405
+ const themeStyles = reactExports.useMemo(() => {
35406
+ switch (Object.prototype.toString.call(theme3)) {
35407
+ case "[object String]":
35408
+ return createTheme(themes_exports[theme3]);
35409
+ case "[object Object]":
35410
+ return createTheme(theme3);
35411
+ default:
35412
+ return createTheme(themes_exports[DEFAULT_THEME_NAME]);
35413
+ }
35414
+ }, [theme3]);
35415
+ return /* @__PURE__ */ ReactExports.createElement(ThemeContext.Provider, { value: themeStyles }, /* @__PURE__ */ ReactExports.createElement(WrappedComponent, { ...restProps }));
35416
+ };
35417
+ return ThemeAcceptor;
35418
+ };
35419
+ var Arrow$2 = ({ expanded: expanded2, styles: styles2 }) => /* @__PURE__ */ ReactExports.createElement(
35420
+ "span",
35421
+ {
35422
+ style: {
35423
+ ...styles2.base,
35424
+ ...expanded2 ? styles2.expanded : styles2.collapsed
35425
+ }
35426
+ },
35427
+ "▶"
35428
+ );
35429
+ var TreeNode = reactExports.memo((props) => {
35430
+ props = {
35431
+ expanded: true,
35432
+ nodeRenderer: ({ name: name2 }) => /* @__PURE__ */ ReactExports.createElement("span", null, name2),
35433
+ onClick: () => {
35434
+ },
35435
+ shouldShowArrow: false,
35436
+ shouldShowPlaceholder: true,
35437
+ ...props
35438
+ };
35439
+ const { expanded: expanded2, onClick, children: children2, nodeRenderer, title, shouldShowArrow, shouldShowPlaceholder: shouldShowPlaceholder2 } = props;
35440
+ const styles2 = useStyles("TreeNode");
35441
+ const NodeRenderer2 = nodeRenderer;
35442
+ return /* @__PURE__ */ ReactExports.createElement("li", { "aria-expanded": expanded2, role: "treeitem", style: styles2.treeNodeBase, title }, /* @__PURE__ */ ReactExports.createElement("div", { style: styles2.treeNodePreviewContainer, onClick }, shouldShowArrow || reactExports.Children.count(children2) > 0 ? /* @__PURE__ */ ReactExports.createElement(Arrow$2, { expanded: expanded2, styles: styles2.treeNodeArrow }) : shouldShowPlaceholder2 && /* @__PURE__ */ ReactExports.createElement("span", { style: styles2.treeNodePlaceholder }, " "), /* @__PURE__ */ ReactExports.createElement(NodeRenderer2, { ...props })), /* @__PURE__ */ ReactExports.createElement("ol", { role: "group", style: styles2.treeNodeChildNodesContainer }, expanded2 ? children2 : void 0));
35443
+ });
35444
+ var DEFAULT_ROOT_PATH = "$";
35445
+ var WILDCARD = "*";
35446
+ function hasChildNodes(data, dataIterator) {
35447
+ return !dataIterator(data).next().done;
35448
+ }
35449
+ var wildcardPathsFromLevel = (level) => {
35450
+ return Array.from(
35451
+ { length: level },
35452
+ (_2, i) => [DEFAULT_ROOT_PATH].concat(Array.from({ length: i }, () => "*")).join(".")
35453
+ );
35454
+ };
35455
+ var getExpandedPaths = (data, dataIterator, expandPaths, expandLevel, prevExpandedPaths) => {
35456
+ const wildcardPaths = [].concat(wildcardPathsFromLevel(expandLevel)).concat(expandPaths).filter((path2) => typeof path2 === "string");
35457
+ const expandedPaths = [];
35458
+ wildcardPaths.forEach((wildcardPath) => {
35459
+ const keyPaths = wildcardPath.split(".");
35460
+ const populatePaths = (curData, curPath, depth) => {
35461
+ if (depth === keyPaths.length) {
35462
+ expandedPaths.push(curPath);
35463
+ return;
35464
+ }
35465
+ const key = keyPaths[depth];
35466
+ if (depth === 0) {
35467
+ if (hasChildNodes(curData, dataIterator) && (key === DEFAULT_ROOT_PATH || key === WILDCARD)) {
35468
+ populatePaths(curData, DEFAULT_ROOT_PATH, depth + 1);
35469
+ }
35470
+ } else {
35471
+ if (key === WILDCARD) {
35472
+ for (const { name: name2, data: data2 } of dataIterator(curData)) {
35473
+ if (hasChildNodes(data2, dataIterator)) {
35474
+ populatePaths(data2, `${curPath}.${name2}`, depth + 1);
35475
+ }
35476
+ }
35477
+ } else {
35478
+ const value = curData[key];
35479
+ if (hasChildNodes(value, dataIterator)) {
35480
+ populatePaths(value, `${curPath}.${key}`, depth + 1);
35481
+ }
35482
+ }
35483
+ }
35484
+ };
35485
+ populatePaths(data, "", 0);
35486
+ });
35487
+ return expandedPaths.reduce(
35488
+ (obj, path2) => {
35489
+ obj[path2] = true;
35490
+ return obj;
35491
+ },
35492
+ { ...prevExpandedPaths }
35493
+ );
35494
+ };
35495
+ var ConnectedTreeNode = reactExports.memo((props) => {
35496
+ const { data, dataIterator, path: path2, depth, nodeRenderer } = props;
35497
+ const [expandedPaths, setExpandedPaths] = reactExports.useContext(ExpandedPathsContext);
35498
+ const nodeHasChildNodes = hasChildNodes(data, dataIterator);
35499
+ const expanded2 = !!expandedPaths[path2];
35500
+ const handleClick = reactExports.useCallback(
35501
+ () => nodeHasChildNodes && setExpandedPaths((prevExpandedPaths) => ({
35502
+ ...prevExpandedPaths,
35503
+ [path2]: !expanded2
35504
+ })),
35505
+ [nodeHasChildNodes, setExpandedPaths, path2, expanded2]
35506
+ );
35507
+ return /* @__PURE__ */ ReactExports.createElement(
35508
+ TreeNode,
35509
+ {
35510
+ expanded: expanded2,
35511
+ onClick: handleClick,
35512
+ shouldShowArrow: nodeHasChildNodes,
35513
+ shouldShowPlaceholder: depth > 0,
35514
+ nodeRenderer,
35515
+ ...props
35516
+ },
35517
+ // only render if the node is expanded
35518
+ expanded2 ? [...dataIterator(data)].map(({ name: name2, data: data2, ...renderNodeProps }) => {
35519
+ return /* @__PURE__ */ ReactExports.createElement(
35520
+ ConnectedTreeNode,
35521
+ {
35522
+ name: name2,
35523
+ data: data2,
35524
+ depth: depth + 1,
35525
+ path: `${path2}.${name2}`,
35526
+ key: name2,
35527
+ dataIterator,
35528
+ nodeRenderer,
35529
+ ...renderNodeProps
35530
+ }
35531
+ );
35532
+ }) : null
35533
+ );
35534
+ });
35535
+ var TreeView = reactExports.memo(({ name: name2, data, dataIterator, nodeRenderer, expandPaths, expandLevel }) => {
35536
+ const styles2 = useStyles("TreeView");
35537
+ const stateAndSetter = reactExports.useState({});
35538
+ const [, setExpandedPaths] = stateAndSetter;
35539
+ reactExports.useLayoutEffect(
35540
+ () => setExpandedPaths(
35541
+ (prevExpandedPaths) => getExpandedPaths(data, dataIterator, expandPaths, expandLevel, prevExpandedPaths)
35542
+ ),
35543
+ [data, dataIterator, expandPaths, expandLevel]
35544
+ );
35545
+ return /* @__PURE__ */ ReactExports.createElement(ExpandedPathsContext.Provider, { value: stateAndSetter }, /* @__PURE__ */ ReactExports.createElement("ol", { role: "tree", style: styles2.treeViewOutline }, /* @__PURE__ */ ReactExports.createElement(
35546
+ ConnectedTreeNode,
35547
+ {
35548
+ name: name2,
35549
+ data,
35550
+ dataIterator,
35551
+ depth: 0,
35552
+ path: DEFAULT_ROOT_PATH,
35553
+ nodeRenderer
35554
+ }
35555
+ )));
35556
+ });
35557
+ var ObjectName = ({ name: name2, dimmed = false, styles: styles2 = {} }) => {
35558
+ const themeStyles = useStyles("ObjectName");
35559
+ const appliedStyles = {
35560
+ ...themeStyles.base,
35561
+ ...dimmed ? themeStyles["dimmed"] : {},
35562
+ ...styles2
35563
+ };
35564
+ return /* @__PURE__ */ ReactExports.createElement("span", { style: appliedStyles }, name2);
35565
+ };
35566
+ var ObjectValue = ({ object: object2, styles: styles2 }) => {
35567
+ const themeStyles = useStyles("ObjectValue");
35568
+ const mkStyle = (key) => ({ ...themeStyles[key], ...styles2 });
35569
+ switch (typeof object2) {
35570
+ case "bigint":
35571
+ return /* @__PURE__ */ ReactExports.createElement("span", { style: mkStyle("objectValueNumber") }, String(object2), "n");
35572
+ case "number":
35573
+ return /* @__PURE__ */ ReactExports.createElement("span", { style: mkStyle("objectValueNumber") }, String(object2));
35574
+ case "string":
35575
+ return /* @__PURE__ */ ReactExports.createElement("span", { style: mkStyle("objectValueString") }, '"', object2, '"');
35576
+ case "boolean":
35577
+ return /* @__PURE__ */ ReactExports.createElement("span", { style: mkStyle("objectValueBoolean") }, String(object2));
35578
+ case "undefined":
35579
+ return /* @__PURE__ */ ReactExports.createElement("span", { style: mkStyle("objectValueUndefined") }, "undefined");
35580
+ case "object":
35581
+ if (object2 === null) {
35582
+ return /* @__PURE__ */ ReactExports.createElement("span", { style: mkStyle("objectValueNull") }, "null");
35583
+ }
35584
+ if (object2 instanceof Date) {
35585
+ return /* @__PURE__ */ ReactExports.createElement("span", null, object2.toString());
35586
+ }
35587
+ if (object2 instanceof RegExp) {
35588
+ return /* @__PURE__ */ ReactExports.createElement("span", { style: mkStyle("objectValueRegExp") }, object2.toString());
35589
+ }
35590
+ if (Array.isArray(object2)) {
35591
+ return /* @__PURE__ */ ReactExports.createElement("span", null, `Array(${object2.length})`);
35592
+ }
35593
+ if (!object2.constructor) {
35594
+ return /* @__PURE__ */ ReactExports.createElement("span", null, "Object");
35595
+ }
35596
+ if (typeof object2.constructor.isBuffer === "function" && object2.constructor.isBuffer(object2)) {
35597
+ return /* @__PURE__ */ ReactExports.createElement("span", null, `Buffer[${object2.length}]`);
35598
+ }
35599
+ return /* @__PURE__ */ ReactExports.createElement("span", null, object2.constructor.name);
35600
+ case "function":
35601
+ return /* @__PURE__ */ ReactExports.createElement("span", null, /* @__PURE__ */ ReactExports.createElement("span", { style: mkStyle("objectValueFunctionPrefix") }, "ƒ "), /* @__PURE__ */ ReactExports.createElement("span", { style: mkStyle("objectValueFunctionName") }, object2.name, "()"));
35602
+ case "symbol":
35603
+ return /* @__PURE__ */ ReactExports.createElement("span", { style: mkStyle("objectValueSymbol") }, object2.toString());
35604
+ default:
35605
+ return /* @__PURE__ */ ReactExports.createElement("span", null);
35606
+ }
35607
+ };
35608
+ var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
35609
+ var propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
35610
+ function getPropertyValue(object2, propertyName) {
35611
+ const propertyDescriptor = Object.getOwnPropertyDescriptor(object2, propertyName);
35612
+ if (propertyDescriptor.get) {
35613
+ try {
35614
+ return propertyDescriptor.get();
35615
+ } catch {
35616
+ return propertyDescriptor.get;
35617
+ }
35618
+ }
35619
+ return object2[propertyName];
35620
+ }
35621
+ function intersperse(arr, sep2) {
35622
+ if (arr.length === 0) {
35623
+ return [];
35624
+ }
35625
+ return arr.slice(1).reduce((xs, x2) => xs.concat([sep2, x2]), [arr[0]]);
35626
+ }
35627
+ var ObjectPreview = ({ data }) => {
35628
+ const styles2 = useStyles("ObjectPreview");
35629
+ const object2 = data;
35630
+ if (typeof object2 !== "object" || object2 === null || object2 instanceof Date || object2 instanceof RegExp) {
35631
+ return /* @__PURE__ */ ReactExports.createElement(ObjectValue, { object: object2 });
35632
+ }
35633
+ if (Array.isArray(object2)) {
35634
+ const maxProperties = styles2.arrayMaxProperties;
35635
+ const previewArray = object2.slice(0, maxProperties).map((element2, index2) => /* @__PURE__ */ ReactExports.createElement(ObjectValue, { key: index2, object: element2 }));
35636
+ if (object2.length > maxProperties) {
35637
+ previewArray.push(/* @__PURE__ */ ReactExports.createElement("span", { key: "ellipsis" }, "…"));
35638
+ }
35639
+ const arrayLength = object2.length;
35640
+ return /* @__PURE__ */ ReactExports.createElement(ReactExports.Fragment, null, /* @__PURE__ */ ReactExports.createElement("span", { style: styles2.objectDescription }, arrayLength === 0 ? `` : `(${arrayLength}) `), /* @__PURE__ */ ReactExports.createElement("span", { style: styles2.preview }, "[", intersperse(previewArray, ", "), "]"));
35641
+ } else {
35642
+ const maxProperties = styles2.objectMaxProperties;
35643
+ const propertyNodes = [];
35644
+ for (const propertyName in object2) {
35645
+ if (hasOwnProperty$1.call(object2, propertyName)) {
35646
+ let ellipsis;
35647
+ if (propertyNodes.length === maxProperties - 1 && Object.keys(object2).length > maxProperties) {
35648
+ ellipsis = /* @__PURE__ */ ReactExports.createElement("span", { key: "ellipsis" }, "…");
35649
+ }
35650
+ const propertyValue2 = getPropertyValue(object2, propertyName);
35651
+ propertyNodes.push(
35652
+ /* @__PURE__ */ ReactExports.createElement("span", { key: propertyName }, /* @__PURE__ */ ReactExports.createElement(ObjectName, { name: propertyName || `""` }), ": ", /* @__PURE__ */ ReactExports.createElement(ObjectValue, { object: propertyValue2 }), ellipsis)
35653
+ );
35654
+ if (ellipsis) break;
35655
+ }
35656
+ }
35657
+ const objectConstructorName = object2.constructor ? object2.constructor.name : "Object";
35658
+ return /* @__PURE__ */ ReactExports.createElement(ReactExports.Fragment, null, /* @__PURE__ */ ReactExports.createElement("span", { style: styles2.objectDescription }, objectConstructorName === "Object" ? "" : `${objectConstructorName} `), /* @__PURE__ */ ReactExports.createElement("span", { style: styles2.preview }, "{", intersperse(propertyNodes, ", "), "}"));
35659
+ }
35660
+ };
35661
+ var ObjectRootLabel = ({ name: name2, data }) => {
35662
+ if (typeof name2 === "string") {
35663
+ return /* @__PURE__ */ ReactExports.createElement("span", null, /* @__PURE__ */ ReactExports.createElement(ObjectName, { name: name2 }), /* @__PURE__ */ ReactExports.createElement("span", null, ": "), /* @__PURE__ */ ReactExports.createElement(ObjectPreview, { data }));
35664
+ } else {
35665
+ return /* @__PURE__ */ ReactExports.createElement(ObjectPreview, { data });
35666
+ }
35667
+ };
35668
+ var ObjectLabel = ({ name: name2, data, isNonenumerable = false }) => {
35669
+ const object2 = data;
35670
+ return /* @__PURE__ */ ReactExports.createElement("span", null, typeof name2 === "string" ? /* @__PURE__ */ ReactExports.createElement(ObjectName, { name: name2, dimmed: isNonenumerable }) : /* @__PURE__ */ ReactExports.createElement(ObjectPreview, { data: name2 }), /* @__PURE__ */ ReactExports.createElement("span", null, ": "), /* @__PURE__ */ ReactExports.createElement(ObjectValue, { object: object2 }));
35671
+ };
35672
+ var createIterator = (showNonenumerable, sortObjectKeys) => {
35673
+ const objectIterator = function* (data) {
35674
+ const shouldIterate = typeof data === "object" && data !== null || typeof data === "function";
35675
+ if (!shouldIterate) return;
35676
+ const dataIsArray = Array.isArray(data);
35677
+ if (!dataIsArray && data[Symbol.iterator]) {
35678
+ let i = 0;
35679
+ for (const entry2 of data) {
35680
+ if (Array.isArray(entry2) && entry2.length === 2) {
35681
+ const [k2, v2] = entry2;
35682
+ yield {
35683
+ name: k2,
35684
+ data: v2
35685
+ };
35686
+ } else {
35687
+ yield {
35688
+ name: i.toString(),
35689
+ data: entry2
35690
+ };
35691
+ }
35692
+ i++;
35693
+ }
35694
+ } else {
35695
+ const keys2 = Object.getOwnPropertyNames(data);
35696
+ if (sortObjectKeys === true && !dataIsArray) {
35697
+ keys2.sort();
35698
+ } else if (typeof sortObjectKeys === "function") {
35699
+ keys2.sort(sortObjectKeys);
35700
+ }
35701
+ for (const propertyName of keys2) {
35702
+ if (propertyIsEnumerable.call(data, propertyName)) {
35703
+ const propertyValue2 = getPropertyValue(data, propertyName);
35704
+ yield {
35705
+ name: propertyName || `""`,
35706
+ data: propertyValue2
35707
+ };
35708
+ } else if (showNonenumerable) {
35709
+ let propertyValue2;
35710
+ try {
35711
+ propertyValue2 = getPropertyValue(data, propertyName);
35712
+ } catch (e) {
35713
+ }
35714
+ if (propertyValue2 !== void 0) {
35715
+ yield {
35716
+ name: propertyName,
35717
+ data: propertyValue2,
35718
+ isNonenumerable: true
35719
+ };
35720
+ }
35721
+ }
35722
+ }
35723
+ if (showNonenumerable && data !== Object.prototype) {
35724
+ yield {
35725
+ name: "__proto__",
35726
+ data: Object.getPrototypeOf(data),
35727
+ isNonenumerable: true
35728
+ };
35729
+ }
35730
+ }
35731
+ };
35732
+ return objectIterator;
35733
+ };
35734
+ var defaultNodeRenderer = ({ depth, name: name2, data, isNonenumerable }) => depth === 0 ? /* @__PURE__ */ ReactExports.createElement(ObjectRootLabel, { name: name2, data }) : /* @__PURE__ */ ReactExports.createElement(ObjectLabel, { name: name2, data, isNonenumerable });
35735
+ var ObjectInspector = ({ showNonenumerable = false, sortObjectKeys, nodeRenderer, ...treeViewProps }) => {
35736
+ const dataIterator = createIterator(showNonenumerable, sortObjectKeys);
35737
+ const renderer = nodeRenderer ? nodeRenderer : defaultNodeRenderer;
35738
+ return /* @__PURE__ */ ReactExports.createElement(TreeView, { nodeRenderer: renderer, dataIterator, ...treeViewProps });
35739
+ };
35740
+ var themedObjectInspector = themeAcceptor(ObjectInspector);
35741
+ __toESM(require_is_dom());
35742
+ const useDarkMode = () => {
35743
+ const [isDark, setIsDark] = reactExports.useState(() => {
35744
+ if (typeof document === "undefined")
35745
+ return false;
35746
+ return document.documentElement.classList.contains("dark");
35747
+ });
35748
+ reactExports.useEffect(() => {
35749
+ if (typeof document === "undefined")
35750
+ return;
35751
+ const observer = new MutationObserver(() => {
35752
+ setIsDark(document.documentElement.classList.contains("dark"));
35753
+ });
35754
+ observer.observe(document.documentElement, {
35755
+ attributes: true,
35756
+ attributeFilter: ["class"]
35757
+ });
35758
+ return () => observer.disconnect();
35759
+ }, []);
35760
+ return isDark;
35761
+ };
35715
35762
  const inspectorThemeExtendedLight = {
35716
35763
  OBJECT_VALUE_DATE_COLOR: "#a21caf"
35717
35764
  // fuchsia-700
@@ -37045,16 +37092,69 @@ function ErrorStackBlock({ value }) {
37045
37092
  const copyText = message2 ? `${message2}
37046
37093
 
37047
37094
  ${stack}` : stack;
37048
- return jsxRuntimeExports.jsxs("div", { className: "relative overflow-x-auto rounded-md border p-3 pt-9", style: { borderColor: "var(--ds-gray-300)" }, children: [jsxRuntimeExports.jsx("button", { type: "button", "aria-label": "Copy error", title: "Copy", className: "!absolute !right-2 !top-2 !flex !h-6 !w-6 !items-center !justify-center !rounded-md !border !bg-[var(--ds-background-100)] !text-[var(--ds-gray-800)] transition-transform transition-colors duration-100 hover:!bg-[var(--ds-gray-alpha-200)] active:!scale-95 active:!bg-[var(--ds-gray-alpha-300)]", style: { borderColor: "var(--ds-gray-300)" }, onClick: () => {
37095
+ return jsxRuntimeExports.jsxs("div", { className: "relative overflow-hidden rounded-md border", style: {
37096
+ borderColor: "var(--ds-red-400)",
37097
+ background: "var(--ds-red-100)"
37098
+ }, children: [jsxRuntimeExports.jsx("button", { type: "button", "aria-label": "Copy error", title: "Copy", className: "!absolute !right-2 !top-2 !flex !h-6 !w-6 !items-center !justify-center !rounded-md !border transition-transform transition-colors duration-100 hover:!bg-[var(--ds-red-200)] active:!scale-95", style: {
37099
+ borderColor: "var(--ds-red-400)",
37100
+ background: "var(--ds-red-100)",
37101
+ color: "var(--ds-red-900)"
37102
+ }, onClick: () => {
37049
37103
  navigator.clipboard.writeText(copyText).then(() => {
37050
37104
  toast.success("Copied to clipboard");
37051
37105
  }).catch(() => {
37052
37106
  toast.error("Failed to copy");
37053
37107
  });
37054
- }, children: jsxRuntimeExports.jsx(Copy, { size: 12 }) }), message2 && jsxRuntimeExports.jsx("p", { className: "pb-2 mb-2 text-xs font-semibold font-mono", style: {
37108
+ }, children: jsxRuntimeExports.jsx(Copy, { size: 12 }) }), message2 && jsxRuntimeExports.jsxs("div", { className: "flex items-start gap-2 px-3 py-2.5 pr-10", style: {
37055
37109
  color: "var(--ds-red-900)",
37056
- borderBottom: "1px solid var(--ds-gray-300)"
37057
- }, children: message2 }), jsxRuntimeExports.jsx("pre", { className: "text-xs font-mono whitespace-pre-wrap break-words overflow-auto m-0", style: { color: "var(--ds-gray-1000)" }, children: stack })] });
37110
+ borderBottom: "1px solid var(--ds-red-400)"
37111
+ }, children: [jsxRuntimeExports.jsx(CircleAlert, { className: "h-4 w-4 shrink-0", style: { marginTop: 1 } }), jsxRuntimeExports.jsx("p", { className: "text-xs font-semibold m-0 break-words", children: message2 })] }), jsxRuntimeExports.jsx("pre", { className: "px-3 py-2.5 text-xs font-mono whitespace-pre-wrap break-words overflow-auto m-0", style: {
37112
+ color: "var(--ds-red-900)",
37113
+ background: "var(--ds-red-200)"
37114
+ }, children: stack })] });
37115
+ }
37116
+ const STYLES$1 = `.wf-load-more{appearance:none;-webkit-appearance:none;border:none;display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;border-radius:6px;font-size:13px;font-weight:500;line-height:20px;color:var(--ds-gray-1000);background:var(--ds-background-100);box-shadow:0 0 0 1px var(--ds-gray-400);cursor:pointer;white-space:nowrap;gap:6px;transition:background 150ms}.wf-load-more:hover{background:var(--ds-gray-alpha-200)}.wf-load-more:disabled{opacity:.6;cursor:default}.wf-load-more:disabled:hover{background:var(--ds-background-100)}`;
37117
+ function LoadMoreButton({ loading = false, onClick, label = "Load more", loadingLabel = "Loading..." }) {
37118
+ return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("style", { dangerouslySetInnerHTML: { __html: STYLES$1 } }), jsxRuntimeExports.jsxs("button", { type: "button", onClick, disabled: loading, className: "wf-load-more", children: [loading && jsxRuntimeExports.jsx(Spinner, { size: 14 }), loading ? loadingLabel : label] })] });
37119
+ }
37120
+ const STYLES = `.wf-menu-btn{appearance:none;-webkit-appearance:none;border:none;display:inline-flex;align-items:center;justify-content:center;height:40px;padding:0 12px;border-radius:6px;font-size:14px;font-weight:500;line-height:20px;color:var(--ds-gray-1000);background:var(--ds-background-100);box-shadow:0 0 0 1px var(--ds-gray-400);cursor:pointer;white-space:nowrap;transition:background 150ms}.wf-menu-btn:hover{background:var(--ds-gray-alpha-200)}.wf-menu-item{appearance:none;-webkit-appearance:none;border:none;display:flex;align-items:center;width:100%;height:40px;padding:0 8px;border-radius:6px;font-size:14px;color:var(--ds-gray-1000);background:transparent;cursor:pointer;transition:background 150ms}.wf-menu-item:hover{background:var(--ds-gray-alpha-100)}`;
37121
+ function MenuDropdown({ options, value, onChange }) {
37122
+ var _a3, _b;
37123
+ const [open, setOpen] = reactExports.useState(false);
37124
+ const ref = reactExports.useRef(null);
37125
+ const label = ((_a3 = options.find((o) => o.value === value)) == null ? void 0 : _a3.label) ?? ((_b = options[0]) == null ? void 0 : _b.label) ?? "";
37126
+ reactExports.useEffect(() => {
37127
+ if (!open)
37128
+ return;
37129
+ function handleClickOutside(e) {
37130
+ if (ref.current && !ref.current.contains(e.target)) {
37131
+ setOpen(false);
37132
+ }
37133
+ }
37134
+ document.addEventListener("mousedown", handleClickOutside);
37135
+ return () => document.removeEventListener("mousedown", handleClickOutside);
37136
+ }, [open]);
37137
+ return jsxRuntimeExports.jsxs("div", { ref, style: { position: "relative", flexShrink: 0 }, children: [jsxRuntimeExports.jsx("style", { dangerouslySetInnerHTML: { __html: STYLES } }), jsxRuntimeExports.jsxs("button", { type: "button", className: "wf-menu-btn", onClick: () => setOpen(!open), children: [jsxRuntimeExports.jsx("span", { children: label }), jsxRuntimeExports.jsx("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", style: {
37138
+ marginLeft: 16,
37139
+ marginRight: -4,
37140
+ color: "var(--ds-gray-900)"
37141
+ }, children: jsxRuntimeExports.jsx("path", { d: "M4.5 6L8 9.5L11.5 6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })] }), open && jsxRuntimeExports.jsx("div", { style: {
37142
+ position: "absolute",
37143
+ right: 0,
37144
+ top: "100%",
37145
+ marginTop: 4,
37146
+ minWidth: 140,
37147
+ padding: 4,
37148
+ borderRadius: 12,
37149
+ background: "var(--ds-background-100)",
37150
+ boxShadow: "var(--ds-shadow-menu, var(--ds-shadow-medium))",
37151
+ zIndex: 2001
37152
+ }, role: "menu", children: options.map((option) => jsxRuntimeExports.jsx("button", { type: "button", role: "menuitem", className: "wf-menu-item", style: {
37153
+ fontWeight: option.value === value ? 500 : 400
37154
+ }, onClick: () => {
37155
+ onChange(option.value);
37156
+ setOpen(false);
37157
+ }, children: option.label }, option.value)) })] });
37058
37158
  }
37059
37159
  function Skeleton$2({ className, style: style2, ...props }) {
37060
37160
  return jsxRuntimeExports.jsx("div", { ...props, className: cn$4("rounded-md", className), style: { backgroundColor: "var(--ds-gray-200)", ...style2 } });
@@ -37220,7 +37320,7 @@ function TreeGutter({ isFirst, isLast, isRunLevel: isRun, statusDotColor, pulse
37220
37320
  zIndex: 0
37221
37321
  } })] });
37222
37322
  }
37223
- function CopyableCell({ value, className }) {
37323
+ function CopyableCell({ value, className, style: styleProp }) {
37224
37324
  const [copied, setCopied] = reactExports.useState(false);
37225
37325
  const resetCopiedTimeoutRef = reactExports.useRef(null);
37226
37326
  reactExports.useEffect(() => {
@@ -37243,7 +37343,7 @@ function CopyableCell({ value, className }) {
37243
37343
  }, 1500);
37244
37344
  });
37245
37345
  }, [value]);
37246
- return jsxRuntimeExports.jsxs("div", { className: `group/copy flex items-center gap-1 flex-1 min-w-0 px-4 ${className ?? ""}`, children: [jsxRuntimeExports.jsx("span", { className: "overflow-hidden text-ellipsis whitespace-nowrap", children: value || "-" }), value ? jsxRuntimeExports.jsx("button", { type: "button", onClick: handleCopy, className: "flex-shrink-0 opacity-0 group-hover/copy:opacity-100 transition-opacity p-0.5 rounded hover:bg-[var(--ds-gray-alpha-200)]", style: BUTTON_RESET_STYLE, "aria-label": `Copy ${value}`, children: copied ? jsxRuntimeExports.jsx(Check, { className: "h-3 w-3", style: { color: "var(--ds-green-700)" } }) : jsxRuntimeExports.jsx(Copy, { className: "h-3 w-3", style: { color: "var(--ds-gray-700)" } }) }) : null] });
37346
+ return jsxRuntimeExports.jsxs("div", { className: `group/copy flex items-center gap-1 min-w-0 px-4 ${className ?? ""}`, style: styleProp, children: [jsxRuntimeExports.jsx("span", { className: "overflow-hidden text-ellipsis whitespace-nowrap", children: value || "-" }), value ? jsxRuntimeExports.jsx("button", { type: "button", onClick: handleCopy, className: "flex-shrink-0 opacity-0 group-hover/copy:opacity-100 transition-opacity p-0.5 rounded hover:bg-[var(--ds-gray-alpha-200)]", style: BUTTON_RESET_STYLE, "aria-label": `Copy ${value}`, children: copied ? jsxRuntimeExports.jsx(Check, { className: "h-3 w-3", style: { color: "var(--ds-green-700)" } }) : jsxRuntimeExports.jsx(Copy, { className: "h-3 w-3", style: { color: "var(--ds-gray-700)" } }) }) : null] });
37247
37347
  }
37248
37348
  function deepParseJson(value) {
37249
37349
  if (typeof value === "string") {
@@ -37321,18 +37421,19 @@ function PayloadBlock({ data, eventType }) {
37321
37421
  }
37322
37422
  return jsxRuntimeExports.jsxs("div", { className: "relative group/payload", children: [jsxRuntimeExports.jsx("div", { className: "overflow-x-auto p-2 text-[11px]", style: { color: "var(--ds-gray-1000)" }, children: jsxRuntimeExports.jsx(DataInspector, { data: cleaned, expandLevel: 2 }) }), jsxRuntimeExports.jsx("button", { type: "button", onClick: handleCopy, className: "absolute bottom-2 right-2 opacity-0 group-hover/payload:opacity-100 transition-opacity flex items-center gap-1 px-2 py-1 rounded-md text-xs hover:bg-[var(--ds-gray-alpha-200)]", style: { ...BUTTON_RESET_STYLE, color: "var(--ds-gray-700)" }, "aria-label": "Copy payload", children: copied ? jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(Check, { className: "h-3 w-3", style: { color: "var(--ds-green-700)" } }), jsxRuntimeExports.jsx("span", { style: { color: "var(--ds-green-700)" }, children: "Copied" })] }) : jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(Copy, { className: "h-3 w-3" }), jsxRuntimeExports.jsx("span", { children: "Copy" })] }) })] });
37323
37423
  }
37324
- function EventRow({ event, index: index2, isFirst, isLast, activeGroupKey, selectedGroupKey, selectedGroupRange, correlationNameMap, workflowName, durationMap, onSelectGroup, onHoverGroup, onLoadEventData, encryptionKey }) {
37325
- const [isExpanded, setIsExpanded] = reactExports.useState(false);
37424
+ const SORT_OPTIONS = [
37425
+ { value: "desc", label: "Newest" },
37426
+ { value: "asc", label: "Oldest" }
37427
+ ];
37428
+ function RowsSkeleton() {
37429
+ return jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-hidden", children: Array.from({ length: 8 }, (_2, i) => jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3 px-4", style: { height: 40 }, children: [jsxRuntimeExports.jsx(Skeleton$2, { className: "h-2 w-2 flex-shrink-0", style: { borderRadius: "50%" } }), jsxRuntimeExports.jsx(Skeleton$2, { className: "h-3", style: { width: 90 } }), jsxRuntimeExports.jsx(Skeleton$2, { className: "h-3", style: { width: 100 } }), jsxRuntimeExports.jsx(Skeleton$2, { className: "h-3", style: { width: 80 } }), jsxRuntimeExports.jsx(Skeleton$2, { className: "h-3 flex-1" }), jsxRuntimeExports.jsx(Skeleton$2, { className: "h-3 flex-1" })] }, i)) });
37430
+ }
37431
+ function EventRow({ event, index: index2, isFirst, isLast, isExpanded, onToggleExpand, activeGroupKey, selectedGroupKey, selectedGroupRange, correlationNameMap, workflowName, durationMap, onSelectGroup, onHoverGroup, onLoadEventData, cachedEventData, onCacheEventData, encryptionKey }) {
37326
37432
  const [isLoading, setIsLoading] = reactExports.useState(false);
37327
- const [loadedEventData, setLoadedEventData] = reactExports.useState(null);
37433
+ const [loadedEventData, setLoadedEventData] = reactExports.useState(cachedEventData);
37328
37434
  const [loadError, setLoadError] = reactExports.useState(null);
37329
- const [hasAttemptedLoad, setHasAttemptedLoad] = reactExports.useState(false);
37330
- const rowGroupKey = event.correlationId ?? (isRunLevel(event.eventType) ? "__run__" : void 0);
37331
- reactExports.useEffect(() => {
37332
- if (selectedGroupKey !== void 0 && selectedGroupKey !== rowGroupKey) {
37333
- setIsExpanded(false);
37334
- }
37335
- }, [selectedGroupKey, rowGroupKey]);
37435
+ const [hasAttemptedLoad, setHasAttemptedLoad] = reactExports.useState(cachedEventData !== null);
37436
+ const rowGroupKey = isRunLevel(event.eventType) ? "__run__" : event.correlationId ?? void 0;
37336
37437
  const statusDotColor = getStatusDotColor(event.eventType);
37337
37438
  const createdAt = new Date(event.createdAt);
37338
37439
  const hasExistingEventData = "eventData" in event && event.eventData != null;
@@ -37359,9 +37460,10 @@ function EventRow({ event, index: index2, isFirst, isLast, activeGroupKey, selec
37359
37460
  setLoadError("Event details unavailable");
37360
37461
  return;
37361
37462
  }
37362
- const eventData2 = await onLoadEventData(event);
37363
- if (eventData2 !== null && eventData2 !== void 0) {
37364
- setLoadedEventData(eventData2);
37463
+ const data = await onLoadEventData(event);
37464
+ if (data !== null && data !== void 0) {
37465
+ setLoadedEventData(data);
37466
+ onCacheEventData(event.eventId, data);
37365
37467
  }
37366
37468
  } catch (err) {
37367
37469
  setLoadError(err instanceof Error ? err.message : "Failed to load event details");
@@ -37369,7 +37471,18 @@ function EventRow({ event, index: index2, isFirst, isLast, activeGroupKey, selec
37369
37471
  setIsLoading(false);
37370
37472
  setHasAttemptedLoad(true);
37371
37473
  }
37372
- }, [event, loadedEventData, hasExistingEventData, onLoadEventData]);
37474
+ }, [
37475
+ event,
37476
+ loadedEventData,
37477
+ hasExistingEventData,
37478
+ onLoadEventData,
37479
+ onCacheEventData
37480
+ ]);
37481
+ reactExports.useEffect(() => {
37482
+ if (isExpanded && loadedEventData === null && !hasExistingEventData && !isLoading && !hasAttemptedLoad) {
37483
+ loadEventDetails();
37484
+ }
37485
+ }, []);
37373
37486
  reactExports.useEffect(() => {
37374
37487
  if (encryptionKey && hasAttemptedLoad && onLoadEventData) {
37375
37488
  setLoadedEventData(null);
@@ -37377,6 +37490,7 @@ function EventRow({ event, index: index2, isFirst, isLast, activeGroupKey, selec
37377
37490
  onLoadEventData(event).then((data) => {
37378
37491
  if (data !== null && data !== void 0) {
37379
37492
  setLoadedEventData(data);
37493
+ onCacheEventData(event.eventId, data);
37380
37494
  }
37381
37495
  setHasAttemptedLoad(true);
37382
37496
  }).catch(() => {
@@ -37384,33 +37498,34 @@ function EventRow({ event, index: index2, isFirst, isLast, activeGroupKey, selec
37384
37498
  });
37385
37499
  }
37386
37500
  }, [encryptionKey]);
37387
- const handleExpandToggle = reactExports.useCallback((e) => {
37388
- e.stopPropagation();
37389
- const newExpanded = !isExpanded;
37390
- setIsExpanded(newExpanded);
37391
- if (newExpanded && loadedEventData === null && !hasExistingEventData) {
37392
- loadEventDetails();
37393
- }
37394
- }, [isExpanded, loadedEventData, hasExistingEventData, loadEventDetails]);
37395
37501
  const handleRowClick = reactExports.useCallback(() => {
37396
- if (selectedGroupKey === rowGroupKey) {
37397
- onSelectGroup(void 0);
37398
- } else {
37399
- onSelectGroup(rowGroupKey);
37502
+ onSelectGroup(rowGroupKey === selectedGroupKey ? void 0 : rowGroupKey);
37503
+ onToggleExpand(event.eventId);
37504
+ if (!isExpanded && loadedEventData === null && !hasExistingEventData) {
37505
+ loadEventDetails();
37400
37506
  }
37401
- }, [selectedGroupKey, rowGroupKey, onSelectGroup]);
37507
+ }, [
37508
+ selectedGroupKey,
37509
+ rowGroupKey,
37510
+ onSelectGroup,
37511
+ onToggleExpand,
37512
+ event.eventId,
37513
+ isExpanded,
37514
+ loadedEventData,
37515
+ hasExistingEventData,
37516
+ loadEventDetails
37517
+ ]);
37402
37518
  const eventData = hasExistingEventData ? event.eventData : loadedEventData;
37403
37519
  const contentOpacity = isDimmed ? 0.3 : 1;
37404
37520
  return jsxRuntimeExports.jsxs("div", { "data-event-id": event.eventId, onMouseEnter: () => onHoverGroup(rowGroupKey), onMouseLeave: () => onHoverGroup(void 0), children: [jsxRuntimeExports.jsxs("div", { role: "button", tabIndex: 0, onClick: handleRowClick, onKeyDown: (e) => {
37405
37521
  if (e.key === "Enter" || e.key === " ")
37406
37522
  handleRowClick();
37407
- }, className: "w-full text-left flex items-center gap-0 text-sm hover:bg-[var(--ds-gray-alpha-100)] transition-colors cursor-pointer", style: { minHeight: 40 }, children: [jsxRuntimeExports.jsx(TreeGutter, { isFirst, isLast: isLast && !isExpanded, isRunLevel: isRun, statusDotColor, pulse: isPulsing, hasSelection: hasActive, showBranch, showLaneLine, isLaneStart, isLaneEnd }), jsxRuntimeExports.jsxs("div", { className: "flex items-center flex-1 min-w-0", style: { opacity: contentOpacity, transition: "opacity 150ms" }, children: [jsxRuntimeExports.jsx("button", { type: "button", onClick: handleExpandToggle, className: "flex items-center justify-center w-5 h-5 flex-shrink-0 rounded hover:bg-[var(--ds-gray-alpha-200)] transition-colors", style: {
37408
- ...BUTTON_RESET_STYLE,
37409
- border: "1px solid var(--ds-gray-alpha-400)"
37410
- }, "aria-label": isExpanded ? "Collapse details" : "Expand details", children: jsxRuntimeExports.jsx(ChevronRight, { className: "h-3 w-3 transition-transform", style: {
37411
- color: "var(--ds-gray-700)",
37523
+ }, className: "w-full text-left flex items-center gap-0 text-[13px] hover:bg-[var(--ds-gray-alpha-100)] transition-colors cursor-pointer", style: { minHeight: 40 }, children: [jsxRuntimeExports.jsx(TreeGutter, { isFirst, isLast: isLast && !isExpanded, isRunLevel: isRun, statusDotColor, pulse: isPulsing, hasSelection: hasActive, showBranch, showLaneLine, isLaneStart, isLaneEnd }), jsxRuntimeExports.jsxs("div", { className: "flex items-center flex-1 min-w-0", style: { opacity: contentOpacity, transition: "opacity 150ms" }, children: [jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center w-5 h-5 flex-shrink-0 rounded", style: {
37524
+ border: "1px solid var(--ds-gray-400)"
37525
+ }, children: jsxRuntimeExports.jsx(ChevronRight, { className: "h-3 w-3 transition-transform", style: {
37526
+ color: "var(--ds-gray-900)",
37412
37527
  transform: isExpanded ? "rotate(90deg)" : "rotate(0deg)"
37413
- } }) }), jsxRuntimeExports.jsx("div", { className: "text-xs tabular-nums flex-1 min-w-0 px-4", style: { color: "var(--ds-gray-900)" }, children: formatEventTime(createdAt) }), jsxRuntimeExports.jsx("div", { className: "text-xs font-medium flex-1 min-w-0 px-4", children: jsxRuntimeExports.jsxs("span", { className: "inline-flex items-center gap-1.5", style: { color: "var(--ds-gray-900)" }, children: [jsxRuntimeExports.jsxs("span", { style: {
37528
+ } }) }), jsxRuntimeExports.jsx("div", { className: "tabular-nums min-w-0 px-4", style: { color: "var(--ds-gray-900)", flex: "2 1 0%" }, children: formatEventTime(createdAt) }), jsxRuntimeExports.jsx("div", { className: "font-medium min-w-0 px-4", style: { flex: "2 1 0%" }, children: jsxRuntimeExports.jsxs("span", { className: "inline-flex items-center gap-1.5", style: { color: "var(--ds-gray-900)" }, children: [jsxRuntimeExports.jsxs("span", { style: {
37414
37529
  position: "relative",
37415
37530
  display: "inline-flex",
37416
37531
  width: 6,
@@ -37429,7 +37544,7 @@ function EventRow({ event, index: index2, isFirst, isLast, activeGroupKey, selec
37429
37544
  height: 6,
37430
37545
  borderRadius: "50%",
37431
37546
  backgroundColor: statusDotColor
37432
- } })] }), formatEventType(event.eventType)] }) }), jsxRuntimeExports.jsx("div", { className: "text-xs flex-1 min-w-0 px-4 overflow-hidden text-ellipsis whitespace-nowrap", title: eventName2 !== "-" ? eventName2 : void 0, children: eventName2 }), jsxRuntimeExports.jsx(CopyableCell, { value: event.correlationId || "", className: "font-mono text-xs" }), jsxRuntimeExports.jsx(CopyableCell, { value: event.eventId, className: "font-mono text-xs" })] })] }), isExpanded && jsxRuntimeExports.jsxs("div", { className: "flex", children: [jsxRuntimeExports.jsx(TreeGutter, { isFirst: false, isLast, isRunLevel: isRun, hasSelection: hasActive, showBranch: false, showLaneLine: showLaneLine && !isLaneEnd, isLaneStart: false, isLaneEnd: false, continuationOnly: true }), jsxRuntimeExports.jsx("div", { className: "w-5 flex-shrink-0" }), jsxRuntimeExports.jsxs("div", { className: "flex-1 my-1.5 mr-3 ml-2 py-2 rounded-md border overflow-hidden", style: {
37547
+ } })] }), formatEventType(event.eventType)] }) }), jsxRuntimeExports.jsx("div", { className: "min-w-0 px-4 overflow-hidden text-ellipsis whitespace-nowrap", style: { flex: "2 1 0%" }, title: eventName2 !== "-" ? eventName2 : void 0, children: eventName2 }), jsxRuntimeExports.jsx(CopyableCell, { value: event.correlationId || "", className: "font-mono", style: { flex: "3 1 0%" } }), jsxRuntimeExports.jsx(CopyableCell, { value: event.eventId, className: "font-mono", style: { flex: "3 1 0%" } })] })] }), isExpanded && jsxRuntimeExports.jsxs("div", { className: "flex", children: [jsxRuntimeExports.jsx(TreeGutter, { isFirst: false, isLast, isRunLevel: isRun, hasSelection: hasActive, showBranch: false, showLaneLine: showLaneLine && !isLaneEnd, isLaneStart: false, isLaneEnd: false, continuationOnly: true }), jsxRuntimeExports.jsx("div", { className: "w-5 flex-shrink-0" }), jsxRuntimeExports.jsxs("div", { className: "flex-1 my-1.5 mr-3 ml-2 py-2 rounded-md border overflow-hidden", style: {
37433
37548
  borderColor: "var(--ds-gray-alpha-200)",
37434
37549
  opacity: contentOpacity,
37435
37550
  transition: "opacity 150ms"
@@ -37439,11 +37554,36 @@ function EventRow({ event, index: index2, isFirst, isLast, activeGroupKey, selec
37439
37554
  color: "var(--ds-red-900)"
37440
37555
  }, children: loadError }) : isLoading || !hasExistingEventData && !hasAttemptedLoad && event.correlationId ? jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2 p-3", children: [jsxRuntimeExports.jsx(Skeleton$2, { className: "h-3", style: { width: "75%" } }), jsxRuntimeExports.jsx(Skeleton$2, { className: "h-3", style: { width: "50%" } }), jsxRuntimeExports.jsx(Skeleton$2, { className: "h-3", style: { width: "60%" } })] }) : jsxRuntimeExports.jsx("div", { className: "p-2 text-xs", style: { color: "var(--ds-gray-900)" }, children: "No data" })] })] })] });
37441
37556
  }
37442
- function EventListView({ events: events2, run, onLoadEventData, hasMoreEvents = false, isLoadingMoreEvents = false, onLoadMoreEvents, encryptionKey }) {
37557
+ function EventListView({ events: events2, run, onLoadEventData, hasMoreEvents = false, isLoadingMoreEvents = false, onLoadMoreEvents, encryptionKey, isLoading = false, sortOrder: sortOrderProp, onSortOrderChange, onDecrypt, isDecrypting = false }) {
37558
+ const [internalSortOrder, setInternalSortOrder] = reactExports.useState("asc");
37559
+ const effectiveSortOrder = sortOrderProp ?? internalSortOrder;
37560
+ const handleSortOrderChange = reactExports.useCallback((order2) => {
37561
+ if (onSortOrderChange) {
37562
+ onSortOrderChange(order2);
37563
+ } else {
37564
+ setInternalSortOrder(order2);
37565
+ }
37566
+ }, [onSortOrderChange]);
37443
37567
  const sortedEvents2 = reactExports.useMemo(() => {
37444
37568
  if (!events2 || events2.length === 0)
37445
37569
  return [];
37446
- return [...events2].sort((a2, b2) => new Date(a2.createdAt).getTime() - new Date(b2.createdAt).getTime());
37570
+ const dir = effectiveSortOrder === "desc" ? -1 : 1;
37571
+ return [...events2].sort((a2, b2) => dir * (new Date(a2.createdAt).getTime() - new Date(b2.createdAt).getTime()));
37572
+ }, [events2, effectiveSortOrder]);
37573
+ const hasEncryptedData = reactExports.useMemo(() => {
37574
+ if (!events2)
37575
+ return false;
37576
+ for (const event of events2) {
37577
+ const ed = event.eventData;
37578
+ if (!ed || typeof ed !== "object")
37579
+ continue;
37580
+ const data = ed;
37581
+ for (const val of Object.values(data)) {
37582
+ if (isEncryptedMarker(val))
37583
+ return true;
37584
+ }
37585
+ }
37586
+ return false;
37447
37587
  }, [events2]);
37448
37588
  const { correlationNameMap, workflowName } = reactExports.useMemo(() => buildNameMaps(events2 ?? null, run ?? null), [events2, run]);
37449
37589
  const durationMap = reactExports.useMemo(() => buildDurationMap(sortedEvents2), [sortedEvents2]);
@@ -37456,6 +37596,49 @@ function EventListView({ events: events2, run, onLoadEventData, hasMoreEvents =
37456
37596
  setHoveredGroupKey(groupKey);
37457
37597
  }, []);
37458
37598
  const activeGroupKey = selectedGroupKey ?? hoveredGroupKey;
37599
+ const [expandedEventIds, setExpandedEventIds] = reactExports.useState(() => /* @__PURE__ */ new Set());
37600
+ const toggleEventExpanded = reactExports.useCallback((eventId) => {
37601
+ setExpandedEventIds((prev) => {
37602
+ const next2 = new Set(prev);
37603
+ if (next2.has(eventId)) {
37604
+ next2.delete(eventId);
37605
+ } else {
37606
+ next2.add(eventId);
37607
+ }
37608
+ return next2;
37609
+ });
37610
+ }, []);
37611
+ const eventDataCacheRef = reactExports.useRef(/* @__PURE__ */ new Map());
37612
+ const cacheEventData = reactExports.useCallback((eventId, data) => {
37613
+ eventDataCacheRef.current.set(eventId, data);
37614
+ }, []);
37615
+ const eventGroupKeyMap = reactExports.useMemo(() => {
37616
+ const map2 = /* @__PURE__ */ new Map();
37617
+ for (const ev of sortedEvents2) {
37618
+ const gk = isRunLevel(ev.eventType) ? "__run__" : ev.correlationId ?? "";
37619
+ if (gk)
37620
+ map2.set(ev.eventId, gk);
37621
+ }
37622
+ return map2;
37623
+ }, [sortedEvents2]);
37624
+ reactExports.useEffect(() => {
37625
+ if (selectedGroupKey === void 0)
37626
+ return;
37627
+ setExpandedEventIds((prev) => {
37628
+ if (prev.size === 0)
37629
+ return prev;
37630
+ let changed = false;
37631
+ const next2 = /* @__PURE__ */ new Set();
37632
+ for (const eventId of prev) {
37633
+ if (eventGroupKeyMap.get(eventId) === selectedGroupKey) {
37634
+ next2.add(eventId);
37635
+ } else {
37636
+ changed = true;
37637
+ }
37638
+ }
37639
+ return changed ? next2 : prev;
37640
+ });
37641
+ }, [selectedGroupKey, eventGroupKeyMap]);
37459
37642
  const selectedGroupRange = reactExports.useMemo(() => {
37460
37643
  if (!activeGroupKey || activeGroupKey === "__run__")
37461
37644
  return null;
@@ -37476,15 +37659,23 @@ function EventListView({ events: events2, run, onLoadEventData, hasMoreEvents =
37476
37659
  const entries = [];
37477
37660
  for (let i = 0; i < sortedEvents2.length; i++) {
37478
37661
  const ev = sortedEvents2[i];
37662
+ const isRun = isRunLevel(ev.eventType);
37663
+ const name2 = isRun ? workflowName ?? "" : ev.correlationId ? correlationNameMap.get(ev.correlationId) ?? "" : "";
37479
37664
  entries.push({
37480
- text: [ev.eventId, ev.correlationId ?? ""].join(" ").toLowerCase(),
37481
- groupKey: ev.correlationId ?? (isRunLevel(ev.eventType) ? "__run__" : void 0),
37665
+ fields: [
37666
+ ev.eventId,
37667
+ ev.correlationId ?? "",
37668
+ ev.eventType,
37669
+ formatEventType(ev.eventType),
37670
+ name2
37671
+ ].map((f2) => f2.toLowerCase()),
37672
+ groupKey: ev.correlationId ?? (isRun ? "__run__" : void 0),
37482
37673
  eventId: ev.eventId,
37483
37674
  index: i
37484
37675
  });
37485
37676
  }
37486
37677
  return entries;
37487
- }, [sortedEvents2]);
37678
+ }, [sortedEvents2, correlationNameMap, workflowName]);
37488
37679
  reactExports.useEffect(() => {
37489
37680
  var _a3;
37490
37681
  const q2 = searchQuery.trim().toLowerCase();
@@ -37492,27 +37683,55 @@ function EventListView({ events: events2, run, onLoadEventData, hasMoreEvents =
37492
37683
  setSelectedGroupKey(void 0);
37493
37684
  return;
37494
37685
  }
37495
- const match2 = searchIndex.find((entry2) => entry2.text.includes(q2));
37496
- if (match2) {
37497
- setSelectedGroupKey(match2.groupKey);
37686
+ let bestMatch = null;
37687
+ let bestScore = 0;
37688
+ for (const entry2 of searchIndex) {
37689
+ for (const field of entry2.fields) {
37690
+ if (field && field.includes(q2)) {
37691
+ const score = q2.length / field.length;
37692
+ if (score > bestScore) {
37693
+ bestScore = score;
37694
+ bestMatch = entry2;
37695
+ }
37696
+ }
37697
+ }
37698
+ }
37699
+ if (bestMatch) {
37700
+ setSelectedGroupKey(bestMatch.groupKey);
37498
37701
  (_a3 = virtuosoRef.current) == null ? void 0 : _a3.scrollToIndex({
37499
- index: match2.index,
37702
+ index: bestMatch.index,
37500
37703
  align: "center",
37501
37704
  behavior: "smooth"
37502
37705
  });
37503
37706
  }
37504
37707
  }, [searchQuery, searchIndex]);
37505
- if (!events2 || events2.length === 0) {
37708
+ const hasHadEventsRef = reactExports.useRef(false);
37709
+ if (sortedEvents2.length > 0) {
37710
+ hasHadEventsRef.current = true;
37711
+ }
37712
+ const isInitialLoad = isLoading && !hasHadEventsRef.current;
37713
+ const isRefetching = isLoading && hasHadEventsRef.current && sortedEvents2.length === 0;
37714
+ if (isInitialLoad) {
37715
+ return jsxRuntimeExports.jsxs("div", { className: "h-full flex flex-col overflow-hidden", children: [jsxRuntimeExports.jsx("div", { style: { padding: 6 }, children: jsxRuntimeExports.jsx(Skeleton$2, { style: { height: 40, borderRadius: 6 } }) }), jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-0 h-10 border-b flex-shrink-0 px-4", style: { borderColor: "var(--ds-gray-alpha-200)" }, children: [jsxRuntimeExports.jsx(Skeleton$2, { className: "h-3", style: { width: 60 } }), jsxRuntimeExports.jsx("div", { style: { flex: 1 } }), jsxRuntimeExports.jsx(Skeleton$2, { className: "h-3", style: { width: 80 } }), jsxRuntimeExports.jsx("div", { style: { flex: 1 } }), jsxRuntimeExports.jsx(Skeleton$2, { className: "h-3", style: { width: 50 } }), jsxRuntimeExports.jsx("div", { style: { flex: 1 } }), jsxRuntimeExports.jsx(Skeleton$2, { className: "h-3", style: { width: 90 } }), jsxRuntimeExports.jsx("div", { style: { flex: 1 } }), jsxRuntimeExports.jsx(Skeleton$2, { className: "h-3", style: { width: 70 } })] }), jsxRuntimeExports.jsx(RowsSkeleton, {})] });
37716
+ }
37717
+ if (!isLoading && (!events2 || events2.length === 0)) {
37506
37718
  return jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center h-full text-sm", style: { color: "var(--ds-gray-700)" }, children: "No events found" });
37507
37719
  }
37508
- return jsxRuntimeExports.jsxs("div", { className: "h-full flex flex-col overflow-hidden", children: [jsxRuntimeExports.jsx("style", { children: `@keyframes workflow-dot-pulse{0%{transform:scale(1);opacity:.7}70%,100%{transform:scale(2.2);opacity:0}}` }), jsxRuntimeExports.jsx("div", { style: { padding: 6, backgroundColor: "var(--ds-background-100)" }, children: jsxRuntimeExports.jsxs("label", { style: {
37720
+ return jsxRuntimeExports.jsxs("div", { className: "h-full flex flex-col overflow-hidden", children: [jsxRuntimeExports.jsx("style", { children: `@keyframes workflow-dot-pulse{0%{transform:scale(1);opacity:.7}70%,100%{transform:scale(2.2);opacity:0}}` }), jsxRuntimeExports.jsxs("div", { style: {
37721
+ padding: 6,
37722
+ backgroundColor: "var(--ds-background-100)",
37723
+ display: "flex",
37724
+ gap: 6
37725
+ }, children: [jsxRuntimeExports.jsxs("label", { style: {
37509
37726
  display: "flex",
37510
37727
  alignItems: "center",
37511
37728
  justifyContent: "center",
37512
37729
  borderRadius: 6,
37513
37730
  boxShadow: "0 0 0 1px var(--ds-gray-alpha-400)",
37514
37731
  background: "var(--ds-background-100)",
37515
- height: 40
37732
+ height: 40,
37733
+ flex: 1,
37734
+ minWidth: 0
37516
37735
  }, children: [jsxRuntimeExports.jsx("div", { style: {
37517
37736
  width: 40,
37518
37737
  height: 40,
@@ -37521,7 +37740,7 @@ function EventListView({ events: events2, run, onLoadEventData, hasMoreEvents =
37521
37740
  justifyContent: "center",
37522
37741
  color: "var(--ds-gray-800)",
37523
37742
  flexShrink: 0
37524
- }, children: jsxRuntimeExports.jsxs("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", focusable: "false", children: [jsxRuntimeExports.jsx("circle", { cx: "7", cy: "7", r: "4.5", stroke: "currentColor", strokeWidth: "1.5" }), jsxRuntimeExports.jsx("path", { d: "M11.5 11.5L14 14", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })] }) }), jsxRuntimeExports.jsx("input", { type: "search", placeholder: "Search by event ID or correlation ID…", value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), style: {
37743
+ }, children: jsxRuntimeExports.jsxs("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", focusable: "false", children: [jsxRuntimeExports.jsx("circle", { cx: "7", cy: "7", r: "4.5", stroke: "currentColor", strokeWidth: "1.5" }), jsxRuntimeExports.jsx("path", { d: "M11.5 11.5L14 14", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })] }) }), jsxRuntimeExports.jsx("input", { type: "search", placeholder: "Search by name, event type, or ID…", value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), style: {
37525
37744
  marginLeft: -16,
37526
37745
  paddingInline: 12,
37527
37746
  fontFamily: "inherit",
@@ -37531,27 +37750,23 @@ function EventListView({ events: events2, run, onLoadEventData, hasMoreEvents =
37531
37750
  outline: "none",
37532
37751
  height: 40,
37533
37752
  width: "100%"
37534
- } })] }) }), jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-0 text-sm font-medium h-10 border-b flex-shrink-0", style: {
37753
+ } })] }), jsxRuntimeExports.jsx(MenuDropdown, { options: SORT_OPTIONS, value: effectiveSortOrder, onChange: handleSortOrderChange }), (hasEncryptedData || encryptionKey) && onDecrypt && jsxRuntimeExports.jsx(DecryptButton, { decrypted: !!encryptionKey, loading: isDecrypting, onClick: onDecrypt })] }), jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-0 text-[13px] font-medium h-10 border-b flex-shrink-0", style: {
37535
37754
  borderColor: "var(--ds-gray-alpha-200)",
37536
37755
  color: "var(--ds-gray-900)",
37537
37756
  backgroundColor: "var(--ds-background-100)"
37538
- }, children: [jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", style: { width: GUTTER_WIDTH } }), jsxRuntimeExports.jsx("div", { className: "w-5 flex-shrink-0" }), jsxRuntimeExports.jsx("div", { className: "flex-1 min-w-0 px-4", children: "Time" }), jsxRuntimeExports.jsx("div", { className: "flex-1 min-w-0 px-4", children: "Event Type" }), jsxRuntimeExports.jsx("div", { className: "flex-1 min-w-0 px-4", children: "Name" }), jsxRuntimeExports.jsx("div", { className: "flex-1 min-w-0 px-4", children: "Correlation ID" }), jsxRuntimeExports.jsx("div", { className: "flex-1 min-w-0 px-4", children: "Event ID" })] }), jsxRuntimeExports.jsx(Yr, { ref: virtuosoRef, totalCount: sortedEvents2.length, overscan: 20, defaultItemHeight: 40, endReached: () => {
37757
+ }, children: [jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", style: { width: GUTTER_WIDTH } }), jsxRuntimeExports.jsx("div", { className: "w-5 flex-shrink-0" }), jsxRuntimeExports.jsx("div", { className: "min-w-0 px-4", style: { flex: "2 1 0%" }, children: "Time" }), jsxRuntimeExports.jsx("div", { className: "min-w-0 px-4", style: { flex: "2 1 0%" }, children: "Event Type" }), jsxRuntimeExports.jsx("div", { className: "min-w-0 px-4", style: { flex: "2 1 0%" }, children: "Name" }), jsxRuntimeExports.jsx("div", { className: "min-w-0 px-4", style: { flex: "3 1 0%" }, children: "Correlation ID" }), jsxRuntimeExports.jsx("div", { className: "min-w-0 px-4", style: { flex: "3 1 0%" }, children: "Event ID" })] }), isRefetching ? jsxRuntimeExports.jsx(RowsSkeleton, {}) : jsxRuntimeExports.jsx(Yr, { ref: virtuosoRef, totalCount: sortedEvents2.length, overscan: 20, defaultItemHeight: 40, endReached: () => {
37539
37758
  if (!hasMoreEvents || isLoadingMoreEvents) {
37540
37759
  return;
37541
37760
  }
37542
37761
  void (onLoadMoreEvents == null ? void 0 : onLoadMoreEvents());
37543
37762
  }, itemContent: (index2) => {
37544
- return jsxRuntimeExports.jsx(EventRow, { event: sortedEvents2[index2], index: index2, isFirst: index2 === 0, isLast: index2 === sortedEvents2.length - 1, activeGroupKey, selectedGroupKey, selectedGroupRange, correlationNameMap, workflowName, durationMap, onSelectGroup, onHoverGroup, onLoadEventData, encryptionKey });
37545
- }, components: {
37546
- Footer: () => jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [hasMoreEvents && jsxRuntimeExports.jsx("div", { className: "px-3 pt-3 flex justify-center", children: jsxRuntimeExports.jsx("button", { type: "button", onClick: () => void (onLoadMoreEvents == null ? void 0 : onLoadMoreEvents()), disabled: isLoadingMoreEvents, className: "h-8 px-3 text-xs rounded-md border transition-colors disabled:opacity-60 disabled:cursor-not-allowed", style: {
37547
- borderColor: "var(--ds-gray-alpha-400)",
37548
- color: "var(--ds-gray-900)",
37549
- backgroundColor: "var(--ds-background-100)"
37550
- }, children: isLoadingMoreEvents ? "Loading more events..." : "Load more" }) }), jsxRuntimeExports.jsxs("div", { className: "mt-4 pt-3 border-t text-xs px-3", style: {
37551
- borderColor: "var(--ds-gray-alpha-200)",
37552
- color: "var(--ds-gray-900)"
37553
- }, children: [sortedEvents2.length, " event", sortedEvents2.length !== 1 ? "s" : "", " total"] })] })
37554
- }, style: { flex: 1, minHeight: 0 } })] });
37763
+ const ev = sortedEvents2[index2];
37764
+ return jsxRuntimeExports.jsx(EventRow, { event: ev, index: index2, isFirst: index2 === 0, isLast: index2 === sortedEvents2.length - 1, isExpanded: expandedEventIds.has(ev.eventId), onToggleExpand: toggleEventExpanded, activeGroupKey, selectedGroupKey, selectedGroupRange, correlationNameMap, workflowName, durationMap, onSelectGroup, onHoverGroup, onLoadEventData, cachedEventData: eventDataCacheRef.current.get(ev.eventId) ?? null, onCacheEventData: cacheEventData, encryptionKey });
37765
+ }, style: { flex: 1, minHeight: 0 } }), jsxRuntimeExports.jsxs("div", { className: "relative flex-shrink-0 flex items-center h-10 border-t px-4 text-xs", style: {
37766
+ borderColor: "var(--ds-gray-alpha-200)",
37767
+ color: "var(--ds-gray-900)",
37768
+ backgroundColor: "var(--ds-background-100)"
37769
+ }, children: [jsxRuntimeExports.jsxs("span", { children: [sortedEvents2.length, " event", sortedEvents2.length !== 1 ? "s" : "", " loaded"] }), hasMoreEvents && jsxRuntimeExports.jsx("div", { className: "absolute inset-0 flex items-center justify-center pointer-events-none", children: jsxRuntimeExports.jsx("div", { className: "pointer-events-auto", children: jsxRuntimeExports.jsx(LoadMoreButton, { loading: isLoadingMoreEvents, onClick: () => void (onLoadMoreEvents == null ? void 0 : onLoadMoreEvents()) }) }) })] })] });
37555
37770
  }
37556
37771
  function ResolveHookModal({ isOpen, onClose, onSubmit, isSubmitting = false }) {
37557
37772
  var _a3;
@@ -64427,7 +64642,7 @@ var tn = f("block", "before:content-[counter(line)]", "before:inline-block", "be
64427
64642
  var et = ({ className: e, language: t, style: o, isIncomplete: n, ...s2 }) => jsxRuntimeExports.jsx("div", { className: f("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2", e), "data-incomplete": n || void 0, "data-language": t, "data-streamdown": "code-block", style: { contentVisibility: "auto", containIntrinsicSize: "auto 200px", ...o }, ...s2 });
64428
64643
  var Se = reactExports.createContext({ code: "" }), de$1 = () => reactExports.useContext(Se);
64429
64644
  var ot = ({ language: e }) => jsxRuntimeExports.jsx("div", { className: "flex h-8 items-center text-muted-foreground text-xs", "data-language": e, "data-streamdown": "code-block-header", children: jsxRuntimeExports.jsx("span", { className: "ml-1 font-mono lowercase", children: e }) });
64430
- var cn$1 = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-7BMdhIzo.js").then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
64645
+ var cn$1 = /\n+$/, dn = reactExports.lazy(() => import("./highlighted-body-B3W2YXNL-WkqeTqm-.js").then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
64431
64646
  let i = reactExports.useMemo(() => e.replace(cn$1, ""), [e]), c = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: i.split(`
64432
64647
  `).map((a2) => [{ content: a2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [i]);
64433
64648
  return jsxRuntimeExports.jsx(Se.Provider, { value: { code: e }, children: jsxRuntimeExports.jsxs(et, { isIncomplete: s2, language: t, children: [jsxRuntimeExports.jsx(ot, { language: t }), n ? jsxRuntimeExports.jsx("div", { className: "pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end", children: jsxRuntimeExports.jsx("div", { className: "pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur", "data-streamdown": "code-block-actions", children: n }) }) : null, jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: jsxRuntimeExports.jsx(Qe, { className: o, language: t, result: c, ...r2 }), children: jsxRuntimeExports.jsx(dn, { className: o, code: i, language: t, raw: c, ...r2 }) })] }) });
@@ -64749,7 +64964,7 @@ var Dt = ({ children: e, className: t, onDownload: o, onError: n }) => {
64749
64964
  }, []), jsxRuntimeExports.jsxs("div", { className: "relative", ref: i, children: [jsxRuntimeExports.jsx("button", { className: f("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50", t), disabled: c, onClick: () => r2(!s2), title: "Download table", type: "button", children: e != null ? e : jsxRuntimeExports.jsx(Z, { size: 14 }) }), s2 ? jsxRuntimeExports.jsxs("div", { className: "absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg", children: [jsxRuntimeExports.jsx("button", { className: "w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40", onClick: () => a2("csv"), title: "Download table as CSV", type: "button", children: "CSV" }), jsxRuntimeExports.jsx("button", { className: "w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40", onClick: () => a2("markdown"), title: "Download table as Markdown", type: "button", children: "Markdown" })] }) : null] });
64750
64965
  };
64751
64966
  var Vt = ({ children: e, className: t, showControls: o, ...n }) => jsxRuntimeExports.jsxs("div", { className: "my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2", "data-streamdown": "table-wrapper", children: [o ? jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-end gap-1", children: [jsxRuntimeExports.jsx(Ht, {}), jsxRuntimeExports.jsx(Dt, {})] }) : null, jsxRuntimeExports.jsx("div", { className: "border-collapse overflow-x-auto overscroll-y-auto rounded-md border border-border bg-background", children: jsxRuntimeExports.jsx("table", { className: f("w-full divide-y divide-border", t), "data-streamdown": "table", ...n, children: e }) })] });
64752
- var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-C-mhM4Cx.js").then((e) => ({ default: e.Mermaid }))), Kn = /language-([^\s]+)/;
64967
+ var Jn = reactExports.lazy(() => import("./mermaid-3ZIDBTTL-ClaETQoK.js").then((e) => ({ default: e.Mermaid }))), Kn = /language-([^\s]+)/;
64753
64968
  function ke(e, t) {
64754
64969
  if (!(e != null && e.position || t != null && t.position)) return true;
64755
64970
  if (!(e != null && e.position && (t != null && t.position))) return false;
@@ -65787,7 +66002,7 @@ function isWorkflowRun(data) {
65787
66002
  function isHook(data) {
65788
66003
  return data !== null && typeof data === "object" && "hookId" in data;
65789
66004
  }
65790
- function EntityDetailPanel({ run, onStreamClick, spanDetailData, spanDetailError, spanDetailLoading, onSpanSelect, onWakeUpSleep, onLoadEventData, onResolveHook, encryptionKey, onDecrypt, selectedSpan }) {
66005
+ function EntityDetailPanel({ run, onStreamClick, spanDetailData, spanDetailError, spanDetailLoading, onSpanSelect, onWakeUpSleep, onLoadEventData, onResolveHook, encryptionKey, onDecrypt, isDecrypting = false, selectedSpan }) {
65791
66006
  const [stoppingSleep, setStoppingSleep] = reactExports.useState(false);
65792
66007
  const [showResolveHookModal, setShowResolveHookModal] = reactExports.useState(false);
65793
66008
  const [resolvingHook, setResolvingHook] = reactExports.useState(false);
@@ -65980,12 +66195,7 @@ function EntityDetailPanel({ run, onStreamClick, spanDetailData, spanDetailError
65980
66195
  backgroundColor: "var(--ds-background-100)"
65981
66196
  }, children: resourceLabel }), jsxRuntimeExports.jsx("span", { className: "text-[13px]", style: {
65982
66197
  color: run.completedAt ? "var(--ds-gray-700)" : "var(--ds-green-800)"
65983
- }, children: runStateLabel })] }), jsxRuntimeExports.jsx("p", { className: "mt-1 truncate font-mono text-[13px]", style: { color: "var(--ds-gray-700)" }, title: resourceId, children: resourceId })] }), (hasEncryptedFields || encryptionKey) && onDecrypt && jsxRuntimeExports.jsxs("button", { type: "button", onClick: onDecrypt, disabled: !!encryptionKey, className: "inline-flex items-center gap-1 rounded-md border px-2 py-1 text-xs font-medium transition-colors flex-shrink-0", style: {
65984
- borderColor: encryptionKey ? "var(--ds-green-400)" : "var(--ds-gray-300)",
65985
- color: encryptionKey ? "var(--ds-green-900)" : "var(--ds-gray-900)",
65986
- backgroundColor: encryptionKey ? "var(--ds-green-100)" : "var(--ds-background-100)",
65987
- cursor: encryptionKey ? "default" : "pointer"
65988
- }, children: [encryptionKey ? jsxRuntimeExports.jsx(LockOpen, { className: "h-3 w-3" }) : jsxRuntimeExports.jsx(Lock, { className: "h-3 w-3" }), encryptionKey ? "Decrypted" : "Decrypt"] })] }) }), jsxRuntimeExports.jsxs("div", { className: "flex-1 overflow-y-auto px-3 pt-3 pb-8", children: [hasPendingActions && jsxRuntimeExports.jsxs("div", { className: "mb-4 rounded-lg border p-2", style: {
66198
+ }, children: runStateLabel })] }), jsxRuntimeExports.jsx("p", { className: "mt-1 truncate font-mono text-[13px]", style: { color: "var(--ds-gray-700)" }, title: resourceId, children: resourceId })] }), (hasEncryptedFields || encryptionKey) && onDecrypt && jsxRuntimeExports.jsx(DecryptButton, { decrypted: !!encryptionKey, loading: isDecrypting, onClick: onDecrypt })] }) }), jsxRuntimeExports.jsxs("div", { className: "flex-1 overflow-y-auto px-3 pt-3 pb-8", children: [hasPendingActions && jsxRuntimeExports.jsxs("div", { className: "mb-4 rounded-lg border p-2", style: {
65989
66199
  borderColor: "var(--ds-gray-300)",
65990
66200
  backgroundColor: "var(--ds-gray-100)"
65991
66201
  }, children: [jsxRuntimeExports.jsx("p", { className: "mb-2 px-1 text-[13px] font-medium uppercase tracking-wide", style: { color: "var(--ds-gray-700)" }, children: "Actions" }), jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2", children: [resource === "sleep" && canWakeUp && jsxRuntimeExports.jsxs("button", { type: "button", onClick: handleWakeUp, disabled: stoppingSleep, className: clsx("flex items-center justify-center gap-2 rounded-md px-3 py-2 text-sm font-medium", "disabled:opacity-50 disabled:cursor-not-allowed transition-colors", stoppingSleep ? "opacity-50 cursor-not-allowed" : "cursor-pointer"), style: {
@@ -69841,17 +70051,17 @@ function PanelResizeHandle({ onResize }) {
69841
70051
  }, [onResize]);
69842
70052
  return jsxRuntimeExports.jsx("div", { className: "absolute left-0 top-0 bottom-0 w-1 cursor-col-resize hover:bg-blue-400/50 z-10", onPointerDown: handlePointerDown });
69843
70053
  }
69844
- function TraceViewerFooter({ hasMore, isLive }) {
70054
+ function TraceViewerFooter({ hasMore, isLive, isInitialLoading }) {
69845
70055
  const style2 = { color: "var(--ds-gray-900)" };
69846
- if (hasMore) {
69847
- return jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-center gap-2 py-3 text-xs", style: style2, children: [jsxRuntimeExports.jsxs("svg", { className: "h-3.5 w-3.5 animate-spin", viewBox: "0 0 24 24", fill: "none", children: [jsxRuntimeExports.jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), jsxRuntimeExports.jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z" })] }), "Loading more events…"] });
70056
+ if (hasMore || isInitialLoading) {
70057
+ return jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-center gap-2 py-3 text-xs", style: style2, children: [jsxRuntimeExports.jsx(Spinner, { size: 14 }), "Loading more events…"] });
69848
70058
  }
69849
70059
  if (isLive) {
69850
70060
  return jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center py-3 text-xs", style: style2, children: "Waiting for more events…" });
69851
70061
  }
69852
70062
  return jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center py-3 text-xs", style: style2, children: "End of run" });
69853
70063
  }
69854
- const WorkflowTraceViewer = ({ run, events: events2, isLoading, error: error2, spanDetailData, spanDetailLoading, spanDetailError, onWakeUpSleep, onResolveHook, onCancelRun, onStreamClick, onSpanSelect, onLoadEventData, onLoadMoreSpans, hasMoreSpans = false, isLoadingMoreSpans = false, encryptionKey, onDecrypt }) => {
70064
+ const WorkflowTraceViewer = ({ run, events: events2, isLoading, error: error2, spanDetailData, spanDetailLoading, spanDetailError, onWakeUpSleep, onResolveHook, onCancelRun, onStreamClick, onSpanSelect, onLoadEventData, onLoadMoreSpans, hasMoreSpans = false, isLoadingMoreSpans = false, encryptionKey, onDecrypt, isDecrypting = false }) => {
69855
70065
  const [selectedSpan, setSelectedSpan] = reactExports.useState(null);
69856
70066
  const [panelWidth, setPanelWidth] = reactExports.useState(DEFAULT_PANEL_WIDTH);
69857
70067
  const [deselectTrigger, setDeselectTrigger] = reactExports.useState(0);
@@ -69951,7 +70161,7 @@ const WorkflowTraceViewer = ({ run, events: events2, isLoading, error: error2, s
69951
70161
  if (!trace2) {
69952
70162
  return jsxRuntimeExports.jsxs("div", { className: "relative w-full h-full", children: [jsxRuntimeExports.jsx("div", { className: "border-b border-gray-alpha-400 w-full" }), jsxRuntimeExports.jsx(Skeleton$2, { className: "w-full ml-2 mt-1 mb-1 h-[56px]" }), jsxRuntimeExports.jsxs("div", { className: "p-2 relative w-full", children: [jsxRuntimeExports.jsx(Skeleton$2, { className: "w-full mt-6 h-[20px]" }), jsxRuntimeExports.jsx(Skeleton$2, { className: "w-[10%] mt-2 ml-6 h-[20px]" }), jsxRuntimeExports.jsx(Skeleton$2, { className: "w-[10%] mt-2 ml-12 h-[20px]" }), jsxRuntimeExports.jsx(Skeleton$2, { className: "w-[20%] mt-2 ml-16 h-[20px]" })] })] });
69953
70163
  }
69954
- return jsxRuntimeExports.jsxs("div", { className: "relative w-full h-full flex", children: [jsxRuntimeExports.jsx("div", { className: "flex-1 min-w-0 relative", children: jsxRuntimeExports.jsxs(TraceViewerContextProvider, { customSpanClassNameFunc: getCustomSpanClassName, customSpanEventClassNameFunc: getCustomSpanEventClassName, children: [jsxRuntimeExports.jsx(SelectionBridge, { onSelectionChange: handleSelectionChange }), jsxRuntimeExports.jsx(DeselectBridge, { triggerDeselect: deselectTrigger }), jsxRuntimeExports.jsx(SelectBridge, { selectRequest }), jsxRuntimeExports.jsx(TraceViewerWithContextMenu, { trace: trace2, run, isLive, onWakeUpSleep, onCancelRun, onResolveHook, onLoadMoreSpans, hasMoreSpans, isLoadingMoreSpans, children: jsxRuntimeExports.jsx(TraceViewerTimeline, { eagerRender: true, height: "100%", isLive, trace: trace2, knownDurationMs: traceWithMeta == null ? void 0 : traceWithMeta.knownDurationMs, hasMoreData: hasMoreSpans, footer: jsxRuntimeExports.jsx(TraceViewerFooter, { hasMore: hasMoreSpans, isLive }) }) })] }) }), selectedSpan && jsxRuntimeExports.jsxs("div", { className: "relative border-l flex-shrink-0 flex flex-col", style: {
70164
+ return jsxRuntimeExports.jsxs("div", { className: "relative w-full h-full flex", children: [jsxRuntimeExports.jsx("div", { className: "flex-1 min-w-0 relative", children: jsxRuntimeExports.jsxs(TraceViewerContextProvider, { customSpanClassNameFunc: getCustomSpanClassName, customSpanEventClassNameFunc: getCustomSpanEventClassName, children: [jsxRuntimeExports.jsx(SelectionBridge, { onSelectionChange: handleSelectionChange }), jsxRuntimeExports.jsx(DeselectBridge, { triggerDeselect: deselectTrigger }), jsxRuntimeExports.jsx(SelectBridge, { selectRequest }), jsxRuntimeExports.jsx(TraceViewerWithContextMenu, { trace: trace2, run, isLive, onWakeUpSleep, onCancelRun, onResolveHook, onLoadMoreSpans, hasMoreSpans, isLoadingMoreSpans, children: jsxRuntimeExports.jsx(TraceViewerTimeline, { eagerRender: true, height: "100%", isLive, trace: trace2, knownDurationMs: traceWithMeta == null ? void 0 : traceWithMeta.knownDurationMs, hasMoreData: hasMoreSpans || Boolean(isLoading), footer: jsxRuntimeExports.jsx(TraceViewerFooter, { hasMore: hasMoreSpans, isLive, isInitialLoading: Boolean(isLoading) }) }) })] }) }), selectedSpan && jsxRuntimeExports.jsxs("div", { className: "relative border-l flex-shrink-0 flex flex-col", style: {
69955
70165
  width: panelWidth,
69956
70166
  borderColor: "var(--ds-gray-200)",
69957
70167
  backgroundColor: "var(--ds-background-100)"
@@ -70021,7 +70231,7 @@ const WorkflowTraceViewer = ({ run, events: events2, isLoading, error: error2, s
70021
70231
  e.currentTarget.style.background = "var(--ds-gray-alpha-100)";
70022
70232
  }, onMouseLeave: (e) => {
70023
70233
  e.currentTarget.style.background = "transparent";
70024
- }, children: jsxRuntimeExports.jsx(X$3, { size: 16 }) }) })] }), jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-y-auto", children: jsxRuntimeExports.jsx(ErrorBoundary, { title: "Failed to load entity details", children: jsxRuntimeExports.jsx(EntityDetailPanel, { run, onStreamClick, spanDetailData: spanDetailData ?? null, spanDetailError, spanDetailLoading, onSpanSelect: handleSpanSelect, onWakeUpSleep, onLoadEventData, onResolveHook, encryptionKey, onDecrypt, selectedSpan }) }) })] })] });
70234
+ }, children: jsxRuntimeExports.jsx(X$3, { size: 16 }) }) })] }), jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-y-auto", children: jsxRuntimeExports.jsx(ErrorBoundary, { title: "Failed to load entity details", children: jsxRuntimeExports.jsx(EntityDetailPanel, { run, onStreamClick, spanDetailData: spanDetailData ?? null, spanDetailError, spanDetailLoading, onSpanSelect: handleSpanSelect, onWakeUpSleep, onLoadEventData, onResolveHook, encryptionKey, onDecrypt, isDecrypting, selectedSpan }) }) })] })] });
70025
70235
  };
70026
70236
  function deserializeChunkText(text2) {
70027
70237
  try {
@@ -70051,26 +70261,23 @@ const ChunkRow = ReactExports.memo(function ChunkRow2({ chunk, index: index2 })
70051
70261
  function StreamSkeleton() {
70052
70262
  return jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-3 animate-in fade-in", children: [jsxRuntimeExports.jsx(Skeleton$2, { style: { width: 120, height: 16, borderRadius: 4 } }), [1, 2, 3, 4].map((i) => jsxRuntimeExports.jsx(Skeleton$2, { style: { height: 56, borderRadius: 6 } }, i))] });
70053
70263
  }
70054
- function StreamViewer({ streamId, chunks, isLive, error: error2, isLoading }) {
70055
- const [hasMoreBelow, setHasMoreBelow] = reactExports.useState(false);
70056
- const scrollRef = reactExports.useRef(null);
70057
- const checkScrollPosition = reactExports.useCallback(() => {
70058
- if (scrollRef.current) {
70059
- const { scrollTop, scrollHeight, clientHeight } = scrollRef.current;
70060
- const isAtBottom = scrollHeight - scrollTop - clientHeight < 10;
70061
- setHasMoreBelow(!isAtBottom && scrollHeight > clientHeight);
70062
- }
70063
- }, []);
70264
+ function StreamViewer({ streamId: _streamId, chunks, isLive, error: error2, isLoading, onScrollEnd }) {
70265
+ const virtuosoRef = reactExports.useRef(null);
70266
+ const prevChunkCountRef = reactExports.useRef(0);
70064
70267
  reactExports.useEffect(() => {
70065
- if (scrollRef.current) {
70066
- scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
70268
+ var _a3;
70269
+ if (chunks.length > prevChunkCountRef.current && chunks.length > 0) {
70270
+ (_a3 = virtuosoRef.current) == null ? void 0 : _a3.scrollToIndex({
70271
+ index: chunks.length - 1,
70272
+ align: "end"
70273
+ });
70067
70274
  }
70068
- checkScrollPosition();
70069
- }, [chunks.length, checkScrollPosition]);
70275
+ prevChunkCountRef.current = chunks.length;
70276
+ }, [chunks.length]);
70070
70277
  if (isLoading && chunks.length === 0) {
70071
- return jsxRuntimeExports.jsx("div", { className: "flex flex-col h-full pb-4", children: jsxRuntimeExports.jsx(StreamSkeleton, {}) });
70278
+ return jsxRuntimeExports.jsx("div", { className: "flex flex-col h-full", children: jsxRuntimeExports.jsx(StreamSkeleton, {}) });
70072
70279
  }
70073
- return jsxRuntimeExports.jsxs("div", { className: "flex flex-col h-full pb-4", children: [isLive && jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1.5 mb-3 px-1", children: [jsxRuntimeExports.jsx("span", { className: "inline-block w-2 h-2 rounded-full", style: { backgroundColor: "var(--ds-green-600)" } }), jsxRuntimeExports.jsx("span", { className: "text-xs", style: { color: "var(--ds-green-700)" }, children: "Live" })] }), chunks.length > 0 && jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 mb-2 px-1", children: [jsxRuntimeExports.jsx("span", { className: "text-[13px] font-medium", style: { color: "var(--ds-gray-900)" }, children: "Stream Chunks" }), jsxRuntimeExports.jsxs("span", { className: "text-xs tabular-nums", style: { color: "var(--ds-gray-600)" }, children: ["(", chunks.length, ")"] })] }), jsxRuntimeExports.jsxs("div", { className: "relative flex-1 min-h-[200px]", children: [jsxRuntimeExports.jsx("div", { ref: scrollRef, onScroll: checkScrollPosition, className: "absolute inset-0 overflow-auto flex flex-col gap-2", children: error2 ? jsxRuntimeExports.jsxs("div", { className: "text-[11px] rounded-md border p-3", style: {
70280
+ return jsxRuntimeExports.jsxs("div", { className: "flex flex-col h-full", children: [isLive && jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1.5 mb-2 px-1", children: [jsxRuntimeExports.jsx("span", { className: "inline-block w-2 h-2 rounded-full", style: { backgroundColor: "var(--ds-green-600)" } }), jsxRuntimeExports.jsx("span", { className: "text-xs", style: { color: "var(--ds-green-700)" }, children: "Live" })] }), chunks.length > 0 && jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 mb-2 px-1", children: [jsxRuntimeExports.jsx("span", { className: "text-[13px] font-medium", style: { color: "var(--ds-gray-900)" }, children: "Stream Chunks" }), jsxRuntimeExports.jsxs("span", { className: "text-xs tabular-nums", style: { color: "var(--ds-gray-600)" }, children: ["(", chunks.length, ")"] })] }), jsxRuntimeExports.jsx("div", { className: "flex-1 min-h-0", children: error2 ? jsxRuntimeExports.jsxs("div", { className: "text-[11px] rounded-md border p-3", style: {
70074
70281
  borderColor: "var(--ds-red-300)",
70075
70282
  backgroundColor: "var(--ds-red-100)",
70076
70283
  color: "var(--ds-red-700)"
@@ -70078,9 +70285,7 @@ function StreamViewer({ streamId, chunks, isLive, error: error2, isLoading }) {
70078
70285
  borderColor: "var(--ds-gray-300)",
70079
70286
  backgroundColor: "var(--ds-gray-100)",
70080
70287
  color: "var(--ds-gray-600)"
70081
- }, children: isLive ? "Waiting for stream data..." : "Stream is empty" }) : chunks.map((chunk, index2) => jsxRuntimeExports.jsx(ChunkRow, { chunk, index: index2 }, `${streamId}-chunk-${chunk.id}`)) }), hasMoreBelow && jsxRuntimeExports.jsx("div", { className: "absolute bottom-0 left-0 right-0 h-8 pointer-events-none", style: {
70082
- background: "linear-gradient(to top, var(--ds-background-100), transparent)"
70083
- } })] })] });
70288
+ }, children: isLive ? "Waiting for stream data..." : "Stream is empty" }) : jsxRuntimeExports.jsx(Yr, { ref: virtuosoRef, totalCount: chunks.length, overscan: 10, endReached: () => onScrollEnd == null ? void 0 : onScrollEnd(), itemContent: (index2) => jsxRuntimeExports.jsx("div", { style: { paddingBottom: 8 }, children: jsxRuntimeExports.jsx(ChunkRow, { chunk: chunks[index2], index: index2 }) }), style: { flex: 1, minHeight: 0 } }) })] });
70084
70289
  }
70085
70290
  function analyzeEvents(events2) {
70086
70291
  if (!events2 || events2.length === 0) {
@@ -89523,8 +89728,8 @@ function requireGetVercelOidcToken$1() {
89523
89728
  }
89524
89729
  try {
89525
89730
  const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([
89526
- await import("./token-util-YAVqVR6-.js").then((n) => n.t),
89527
- await import("./token-mzBpVePm.js").then((n) => n.t)
89731
+ await import("./token-util-D-4jXUkD.js").then((n) => n.t),
89732
+ await import("./token-Bjyd4X_e.js").then((n) => n.t)
89528
89733
  ]);
89529
89734
  if (!token || isExpired(getTokenPayload(token))) {
89530
89735
  await refreshToken();
@@ -115634,17 +115839,84 @@ const LOCAL_QUEUE_MAX_VISIBILITY = parseInt(process.env.WORKFLOW_LOCAL_QUEUE_MAX
115634
115839
  const MAX_SAFE_TIMEOUT_MS = 2147483647;
115635
115840
  const DEFAULT_CONCURRENCY_LIMIT = 1e3;
115636
115841
  const WORKFLOW_LOCAL_QUEUE_CONCURRENCY = parseInt(process.env.WORKFLOW_LOCAL_QUEUE_CONCURRENCY ?? "0", 10) || DEFAULT_CONCURRENCY_LIMIT;
115637
- function createQueue$2(config2) {
115842
+ function getQueueRoute(queueName) {
115843
+ if (queueName.startsWith("__wkf_step_")) {
115844
+ return { pathname: "step", prefix: "__wkf_step_" };
115845
+ }
115846
+ if (queueName.startsWith("__wkf_workflow_")) {
115847
+ return { pathname: "flow", prefix: "__wkf_workflow_" };
115848
+ }
115849
+ throw new Error("Unknown queue name prefix");
115850
+ }
115851
+ function createQueueExecutor(config2) {
115638
115852
  const httpAgent = new undiciExports.Agent({
115639
115853
  headersTimeout: 0,
115640
115854
  connections: 1e3,
115641
115855
  keepAliveTimeout: 3e4
115642
115856
  });
115857
+ const directHandlers = /* @__PURE__ */ new Map();
115858
+ const executeMessage = async ({ queueName, messageId, attempt, body: body2, headers: extraHeaders }) => {
115859
+ const { pathname, prefix } = getQueueRoute(queueName);
115860
+ const headers2 = {
115861
+ ...extraHeaders,
115862
+ "content-type": "application/json",
115863
+ "x-vqs-queue-name": queueName,
115864
+ "x-vqs-message-id": messageId,
115865
+ "x-vqs-message-attempt": String(attempt)
115866
+ };
115867
+ const directHandler = directHandlers.get(prefix);
115868
+ let response2;
115869
+ if (directHandler) {
115870
+ const req = new Request("http://localhost/.well-known/workflow/v1/" + pathname, {
115871
+ method: "POST",
115872
+ headers: headers2,
115873
+ body: body2
115874
+ });
115875
+ response2 = await directHandler(req);
115876
+ } else {
115877
+ const baseUrl = await resolveBaseUrl$1(config2);
115878
+ response2 = await fetch(`${baseUrl}/.well-known/workflow/v1/${pathname}`, {
115879
+ method: "POST",
115880
+ duplex: "half",
115881
+ dispatcher: httpAgent,
115882
+ headers: headers2,
115883
+ body: body2
115884
+ });
115885
+ }
115886
+ const text2 = await response2.text();
115887
+ if (!response2.ok) {
115888
+ return {
115889
+ type: "error",
115890
+ status: response2.status,
115891
+ text: text2,
115892
+ headers: Object.fromEntries(response2.headers.entries())
115893
+ };
115894
+ }
115895
+ try {
115896
+ const timeoutSeconds = Number(JSON.parse(text2).timeoutSeconds);
115897
+ if (Number.isFinite(timeoutSeconds) && timeoutSeconds >= 0) {
115898
+ return { type: "reschedule", timeoutSeconds };
115899
+ }
115900
+ } catch {
115901
+ }
115902
+ return { type: "completed" };
115903
+ };
115904
+ return {
115905
+ executeMessage,
115906
+ registerHandler(prefix, handler) {
115907
+ directHandlers.set(prefix, handler);
115908
+ },
115909
+ async close() {
115910
+ await httpAgent.close();
115911
+ }
115912
+ };
115913
+ }
115914
+ function createQueue$2(config2) {
115915
+ const executor = createQueueExecutor(config2);
115643
115916
  const transport = new JsonTransport();
115644
115917
  const generateId2 = monotonicFactory();
115645
115918
  const semaphore = new libExports.Sema(WORKFLOW_LOCAL_QUEUE_CONCURRENCY);
115646
115919
  const inflightMessages = /* @__PURE__ */ new Map();
115647
- const directHandlers = /* @__PURE__ */ new Map();
115648
115920
  const queue = async (queueName, message2, opts) => {
115649
115921
  const cleanup = [];
115650
115922
  if (opts == null ? void 0 : opts.idempotencyKey) {
@@ -115654,17 +115926,7 @@ function createQueue$2(config2) {
115654
115926
  }
115655
115927
  }
115656
115928
  const body2 = transport.serialize(message2);
115657
- let pathname;
115658
- let prefix;
115659
- if (queueName.startsWith("__wkf_step_")) {
115660
- pathname = `step`;
115661
- prefix = "__wkf_step_";
115662
- } else if (queueName.startsWith("__wkf_workflow_")) {
115663
- pathname = `flow`;
115664
- prefix = "__wkf_workflow_";
115665
- } else {
115666
- throw new Error("Unknown queue name prefix");
115667
- }
115929
+ getQueueRoute(queueName);
115668
115930
  const messageId = MessageId.parse(`msg_${generateId2()}`);
115669
115931
  if (opts == null ? void 0 : opts.idempotencyKey) {
115670
115932
  const key = opts.idempotencyKey;
@@ -115681,55 +115943,31 @@ function createQueue$2(config2) {
115681
115943
  }
115682
115944
  try {
115683
115945
  let defaultRetriesLeft = 3;
115684
- const directHandler = directHandlers.get(prefix);
115685
115946
  for (let attempt = 0; defaultRetriesLeft > 0; attempt++) {
115686
115947
  defaultRetriesLeft--;
115687
- let response2;
115688
- const headers2 = {
115689
- ...opts == null ? void 0 : opts.headers,
115690
- "content-type": "application/json",
115691
- "x-vqs-queue-name": queueName,
115692
- "x-vqs-message-id": messageId,
115693
- "x-vqs-message-attempt": String(attempt + 1)
115694
- };
115695
- if (directHandler) {
115696
- const req = new Request("http://localhost/.well-known/workflow/v1/" + pathname, {
115697
- method: "POST",
115698
- headers: headers2,
115699
- body: body2
115700
- });
115701
- response2 = await directHandler(req);
115702
- } else {
115703
- const baseUrl = await resolveBaseUrl$1(config2);
115704
- response2 = await fetch(`${baseUrl}/.well-known/workflow/v1/${pathname}`, {
115705
- method: "POST",
115706
- duplex: "half",
115707
- dispatcher: httpAgent,
115708
- headers: headers2,
115709
- body: body2
115710
- });
115948
+ const result = await executor.executeMessage({
115949
+ queueName,
115950
+ messageId,
115951
+ attempt: attempt + 1,
115952
+ body: body2,
115953
+ headers: opts == null ? void 0 : opts.headers
115954
+ });
115955
+ if (result.type === "completed") {
115956
+ return;
115711
115957
  }
115712
- const text2 = await response2.text();
115713
- if (response2.ok) {
115714
- try {
115715
- const timeoutSeconds = Number(JSON.parse(text2).timeoutSeconds);
115716
- if (Number.isFinite(timeoutSeconds) && timeoutSeconds >= 0) {
115717
- if (timeoutSeconds > 0) {
115718
- const timeoutMs = Math.min(timeoutSeconds * 1e3, MAX_SAFE_TIMEOUT_MS);
115719
- await setTimeout$1(timeoutMs);
115720
- }
115721
- defaultRetriesLeft++;
115722
- continue;
115723
- }
115724
- } catch {
115958
+ if (result.type === "reschedule") {
115959
+ if (result.timeoutSeconds > 0) {
115960
+ const timeoutMs = Math.min(result.timeoutSeconds * 1e3, MAX_SAFE_TIMEOUT_MS);
115961
+ await setTimeout$1(timeoutMs);
115725
115962
  }
115726
- return;
115963
+ defaultRetriesLeft++;
115964
+ continue;
115727
115965
  }
115728
115966
  console.error(`[local world] Failed to queue message`, {
115729
115967
  queueName,
115730
- text: text2,
115731
- status: response2.status,
115732
- headers: Object.fromEntries(response2.headers.entries()),
115968
+ text: result.text,
115969
+ status: result.status,
115970
+ headers: result.headers,
115733
115971
  body: body2.toString()
115734
115972
  });
115735
115973
  }
@@ -115792,11 +116030,9 @@ function createQueue$2(config2) {
115792
116030
  queue,
115793
116031
  createQueueHandler,
115794
116032
  getDeploymentId,
115795
- registerHandler(prefix, handler) {
115796
- directHandlers.set(prefix, handler);
115797
- },
116033
+ registerHandler: executor.registerHandler,
115798
116034
  async close() {
115799
- await httpAgent.close();
116035
+ await executor.close();
115800
116036
  }
115801
116037
  };
115802
116038
  }
@@ -115993,6 +116229,18 @@ async function deleteJSON(filePath) {
115993
116229
  throw error2;
115994
116230
  }
115995
116231
  }
116232
+ async function writeExclusive(filePath, data) {
116233
+ await ensureDir(path$2.dirname(filePath));
116234
+ try {
116235
+ await promises.writeFile(filePath, data, { flag: "wx" });
116236
+ return true;
116237
+ } catch (error2) {
116238
+ if (error2.code === "EEXIST") {
116239
+ return false;
116240
+ }
116241
+ throw error2;
116242
+ }
116243
+ }
115996
116244
  async function listJSONFiles(dirPath) {
115997
116245
  return listFilesByExtension(dirPath, ".json");
115998
116246
  }
@@ -116133,6 +116381,9 @@ function filterHookData$1(hook, resolveData) {
116133
116381
  }
116134
116382
  return hook;
116135
116383
  }
116384
+ function hashToken(token) {
116385
+ return createHash("sha256").update(token).digest("hex");
116386
+ }
116136
116387
  const monotonicUlid$1 = monotonicFactory(() => Math.random());
116137
116388
  const getObjectCreatedAt = (idPrefix) => (filename) => {
116138
116389
  const replaceRegex = new RegExp(`^${idPrefix}_`, "g");
@@ -116214,6 +116465,8 @@ async function deleteAllHooksForRun(basedir, runId) {
116214
116465
  const hookPath = path$2.join(hooksDir, `${file2}.json`);
116215
116466
  const hook = await readJSON(hookPath, HookSchema);
116216
116467
  if (hook && hook.runId === runId) {
116468
+ const constraintPath = path$2.join(hooksDir, "tokens", `${hashToken(hook.token)}.json`);
116469
+ await deleteJSON(constraintPath);
116217
116470
  await deleteJSON(hookPath);
116218
116471
  }
116219
116472
  }
@@ -116615,18 +116868,13 @@ function createEventsStorage(basedir) {
116615
116868
  data.eventType === "hook_created" && "eventData" in data
116616
116869
  ) {
116617
116870
  const hookData = data.eventData;
116618
- const hooksDir = path$2.join(basedir, "hooks");
116619
- const hookFiles = await listJSONFiles(hooksDir);
116620
- let hasConflict = false;
116621
- for (const file2 of hookFiles) {
116622
- const existingHookPath = path$2.join(hooksDir, `${file2}.json`);
116623
- const existingHook = await readJSON(existingHookPath, HookSchema);
116624
- if (existingHook && existingHook.token === hookData.token) {
116625
- hasConflict = true;
116626
- break;
116627
- }
116628
- }
116629
- if (hasConflict) {
116871
+ const constraintPath = path$2.join(basedir, "hooks", "tokens", `${hashToken(hookData.token)}.json`);
116872
+ const tokenClaimed = await writeExclusive(constraintPath, JSON.stringify({
116873
+ token: hookData.token,
116874
+ hookId: data.correlationId,
116875
+ runId: effectiveRunId
116876
+ }));
116877
+ if (!tokenClaimed) {
116630
116878
  const conflictEvent = {
116631
116879
  eventType: "hook_conflict",
116632
116880
  correlationId: data.correlationId,
@@ -116667,6 +116915,11 @@ function createEventsStorage(basedir) {
116667
116915
  await writeJSON(hookPath, hook);
116668
116916
  } else if (data.eventType === "hook_disposed") {
116669
116917
  const hookPath = path$2.join(basedir, "hooks", `${data.correlationId}.json`);
116918
+ const existingHook = await readJSON(hookPath, HookSchema);
116919
+ if (existingHook) {
116920
+ const disposedConstraintPath = path$2.join(basedir, "hooks", "tokens", `${hashToken(existingHook.token)}.json`);
116921
+ await deleteJSON(disposedConstraintPath);
116922
+ }
116670
116923
  await deleteJSON(hookPath);
116671
116924
  } else if (data.eventType === "wait_created" && "eventData" in data) {
116672
116925
  const waitData = data.eventData;
@@ -117227,8 +117480,8 @@ function requireGetVercelOidcToken() {
117227
117480
  }
117228
117481
  try {
117229
117482
  const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([
117230
- await import("./token-util-D7WmNSMO.js").then((n) => n.t),
117231
- await import("./token-BRJJ012D.js").then((n) => n.t)
117483
+ await import("./token-util-Dp_pg92C.js").then((n) => n.t),
117484
+ await import("./token-CTJIoJEi.js").then((n) => n.t)
117232
117485
  ]);
117233
117486
  if (!token || isExpired(getTokenPayload(token), options == null ? void 0 : options.expirationBufferMs)) {
117234
117487
  await refreshToken(options);
@@ -117957,7 +118210,7 @@ const PeerService = SemanticConvention("peer.service");
117957
118210
  const RpcSystem = SemanticConvention("rpc.system");
117958
118211
  const RpcService = SemanticConvention("rpc.service");
117959
118212
  const RpcMethod = SemanticConvention("rpc.method");
117960
- const version$1 = "4.1.0-beta.42";
118213
+ const version$1 = "4.1.0-beta.43";
117961
118214
  const DEFAULT_RESOLVE_DATA_OPTION = "all";
117962
118215
  function deserializeError(obj) {
117963
118216
  const { error: error2, ...rest } = obj;
@@ -118270,6 +118523,46 @@ function createQueue$1(config2) {
118270
118523
  };
118271
118524
  return { queue, createQueueHandler, getDeploymentId };
118272
118525
  }
118526
+ const ResolveLatestDeploymentResponseSchema = object$1({
118527
+ id: string$1()
118528
+ });
118529
+ function createResolveLatestDeploymentId(config2) {
118530
+ return async function resolveLatestDeploymentId() {
118531
+ const currentDeploymentId = process.env.VERCEL_DEPLOYMENT_ID;
118532
+ if (!currentDeploymentId) {
118533
+ throw new Error("Cannot resolve latest deployment: VERCEL_DEPLOYMENT_ID environment variable is not set");
118534
+ }
118535
+ const oidcToken = await distExports.getVercelOidcToken().catch(() => null);
118536
+ const token = (config2 == null ? void 0 : config2.token) ?? oidcToken ?? process.env.VERCEL_TOKEN;
118537
+ if (!token) {
118538
+ throw new Error("Cannot resolve latest deployment: no OIDC token or VERCEL_TOKEN available");
118539
+ }
118540
+ const url2 = `https://api.vercel.com/v1/workflow/resolve-latest-deployment/${encodeURIComponent(currentDeploymentId)}`;
118541
+ const response2 = await fetch(url2, {
118542
+ method: "GET",
118543
+ headers: {
118544
+ authorization: `Bearer ${token}`
118545
+ },
118546
+ // @ts-expect-error -- undici dispatcher is accepted by Node.js fetch but not in @types/node's RequestInit
118547
+ dispatcher: getDispatcher()
118548
+ });
118549
+ if (!response2.ok) {
118550
+ let body2;
118551
+ try {
118552
+ body2 = await response2.text();
118553
+ } catch {
118554
+ body2 = "<unable to read response body>";
118555
+ }
118556
+ throw new Error(`Failed to resolve latest deployment for ${currentDeploymentId}: HTTP ${response2.status} ${response2.statusText}${body2 ? ` — ${body2}` : ""}`);
118557
+ }
118558
+ const data = await response2.json();
118559
+ const result = ResolveLatestDeploymentResponseSchema.safeParse(data);
118560
+ if (!result.success) {
118561
+ throw new Error(`Invalid response from Vercel API: expected { id: string }. Zod error: ${result.error.message}`);
118562
+ }
118563
+ return result.data.id;
118564
+ };
118565
+ }
118273
118566
  function isRefDescriptor(value) {
118274
118567
  return typeof value === "object" && value !== null && "_type" in value && "_ref" in value && typeof value._ref === "string" && value._type === "RemoteRef";
118275
118568
  }
@@ -118427,7 +118720,7 @@ async function getWorkflowRun(id2, params, config2) {
118427
118720
  const searchParams = new URLSearchParams();
118428
118721
  searchParams.set("remoteRefBehavior", remoteRefBehavior);
118429
118722
  const queryString = searchParams.toString();
118430
- const endpoint = `/v2/runs/${id2}${queryString ? `?${queryString}` : ""}`;
118723
+ const endpoint = `/v2/runs/${encodeURIComponent(id2)}${queryString ? `?${queryString}` : ""}`;
118431
118724
  try {
118432
118725
  const run = await makeRequest({
118433
118726
  endpoint,
@@ -118449,7 +118742,7 @@ async function cancelWorkflowRunV1(id2, params, config2) {
118449
118742
  const searchParams = new URLSearchParams();
118450
118743
  searchParams.set("remoteRefBehavior", remoteRefBehavior);
118451
118744
  const queryString = searchParams.toString();
118452
- const endpoint = `/v1/runs/${id2}/cancel${queryString ? `?${queryString}` : ""}`;
118745
+ const endpoint = `/v1/runs/${encodeURIComponent(id2)}/cancel${queryString ? `?${queryString}` : ""}`;
118453
118746
  try {
118454
118747
  const run = await makeRequest({
118455
118748
  endpoint,
@@ -118548,7 +118841,7 @@ async function listWorkflowRunSteps(params, config2) {
118548
118841
  const remoteRefBehavior = resolveData === "none" ? "lazy" : "resolve";
118549
118842
  searchParams.set("remoteRefBehavior", remoteRefBehavior);
118550
118843
  const queryString = searchParams.toString();
118551
- const endpoint = `/v2/runs/${runId}/steps${queryString ? `?${queryString}` : ""}`;
118844
+ const endpoint = `/v2/runs/${encodeURIComponent(runId)}/steps${queryString ? `?${queryString}` : ""}`;
118552
118845
  const response2 = await makeRequest({
118553
118846
  endpoint,
118554
118847
  options: { method: "GET" },
@@ -118566,7 +118859,7 @@ async function getStep(runId, stepId, params, config2) {
118566
118859
  const searchParams = new URLSearchParams();
118567
118860
  searchParams.set("remoteRefBehavior", remoteRefBehavior);
118568
118861
  const queryString = searchParams.toString();
118569
- const endpoint = runId ? `/v2/runs/${runId}/steps/${stepId}${queryString ? `?${queryString}` : ""}` : `/v2/steps/${stepId}${queryString ? `?${queryString}` : ""}`;
118862
+ const endpoint = runId ? `/v2/runs/${encodeURIComponent(runId)}/steps/${encodeURIComponent(stepId)}${queryString ? `?${queryString}` : ""}` : `/v2/steps/${encodeURIComponent(stepId)}${queryString ? `?${queryString}` : ""}`;
118570
118863
  const step = await makeRequest({
118571
118864
  endpoint,
118572
118865
  options: { method: "GET" },
@@ -118703,7 +118996,7 @@ async function getEvent(runId, eventId, params, config2) {
118703
118996
  const searchParams = new URLSearchParams();
118704
118997
  searchParams.set("remoteRefBehavior", remoteRefBehavior);
118705
118998
  const queryString = searchParams.toString();
118706
- const endpoint = `/v2/runs/${runId}/events/${eventId}${queryString ? `?${queryString}` : ""}`;
118999
+ const endpoint = `/v2/runs/${encodeURIComponent(runId)}/events/${encodeURIComponent(eventId)}${queryString ? `?${queryString}` : ""}`;
118707
119000
  const event = await makeRequest({
118708
119001
  endpoint,
118709
119002
  options: { method: "GET" },
@@ -118736,7 +119029,7 @@ async function getWorkflowRunEvents(params, config2) {
118736
119029
  searchParams.set("remoteRefBehavior", "lazy");
118737
119030
  const queryString = searchParams.toString();
118738
119031
  const query = queryString ? `?${queryString}` : "";
118739
- const endpoint = correlationId ? `/v2/events${query}` : `/v2/runs/${runId}/events${query}`;
119032
+ const endpoint = correlationId ? `/v2/events${query}` : `/v2/runs/${encodeURIComponent(runId)}/events${query}`;
118740
119033
  let refResolveConcurrency;
118741
119034
  const response2 = await makeRequest({
118742
119035
  endpoint,
@@ -118787,7 +119080,7 @@ async function createWorkflowRunEvent(id2, data, params, config2) {
118787
119080
  return { run };
118788
119081
  }
118789
119082
  const wireResult2 = await makeRequest({
118790
- endpoint: `/v1/runs/${id2}/events`,
119083
+ endpoint: `/v1/runs/${encodeURIComponent(id2)}/events`,
118791
119084
  options: { method: "POST" },
118792
119085
  data,
118793
119086
  config: config2,
@@ -118801,7 +119094,7 @@ async function createWorkflowRunEvent(id2, data, params, config2) {
118801
119094
  throw new WorkflowAPIError(validationError, { status: 400 });
118802
119095
  }
118803
119096
  }
118804
- const runIdPath = id2 === null ? "null" : id2;
119097
+ const runIdPath = id2 === null ? "null" : encodeURIComponent(id2);
118805
119098
  const remoteRefBehavior = eventsNeedingResolve.has(data.eventType) ? "resolve" : "lazy";
118806
119099
  if (remoteRefBehavior === "resolve") {
118807
119100
  const wireResult2 = await makeRequest({
@@ -118872,7 +119165,7 @@ async function listHooks(params, config2) {
118872
119165
  }
118873
119166
  async function getHook(hookId, params, config2) {
118874
119167
  const resolveData = (params == null ? void 0 : params.resolveData) || "all";
118875
- const endpoint = `/v2/hooks/${hookId}`;
119168
+ const endpoint = `/v2/hooks/${encodeURIComponent(hookId)}`;
118876
119169
  const hook = await makeRequest({
118877
119170
  endpoint,
118878
119171
  options: { method: "GET" },
@@ -118974,7 +119267,7 @@ function createStorage(config2) {
118974
119267
  }
118975
119268
  function getStreamUrl(name2, runId, httpConfig) {
118976
119269
  if (runId) {
118977
- return new URL(`${httpConfig.baseUrl}/v2/runs/${runId}/stream/${encodeURIComponent(name2)}`);
119270
+ return new URL(`${httpConfig.baseUrl}/v2/runs/${encodeURIComponent(runId)}/stream/${encodeURIComponent(name2)}`);
118978
119271
  }
118979
119272
  return new URL(`${httpConfig.baseUrl}/v2/stream/${encodeURIComponent(name2)}`);
118980
119273
  }
@@ -119053,7 +119346,7 @@ function createStreamer(config2) {
119053
119346
  },
119054
119347
  async listStreamsByRunId(runId) {
119055
119348
  const httpConfig = await getHttpConfig(config2);
119056
- const url2 = new URL(`${httpConfig.baseUrl}/v2/runs/${runId}/streams`);
119349
+ const url2 = new URL(`${httpConfig.baseUrl}/v2/runs/${encodeURIComponent(runId)}/streams`);
119057
119350
  const response2 = await fetch(url2, {
119058
119351
  headers: httpConfig.headers
119059
119352
  });
@@ -119071,7 +119364,8 @@ function createVercelWorld(config2) {
119071
119364
  ...createQueue$1(config2),
119072
119365
  ...createStorage(config2),
119073
119366
  ...createStreamer(config2),
119074
- getEncryptionKeyForRun: createGetEncryptionKeyForRun(projectId, (_b = config2 == null ? void 0 : config2.projectConfig) == null ? void 0 : _b.teamId, config2 == null ? void 0 : config2.token)
119367
+ getEncryptionKeyForRun: createGetEncryptionKeyForRun(projectId, (_b = config2 == null ? void 0 : config2.projectConfig) == null ? void 0 : _b.teamId, config2 == null ? void 0 : config2.token),
119368
+ resolveLatestDeploymentId: createResolveLatestDeploymentId(config2)
119075
119369
  };
119076
119370
  }
119077
119371
  const require$1 = createRequire$1(join$1(process.cwd(), "index.js"));
@@ -119087,7 +119381,7 @@ const createWorld = () => {
119087
119381
  "WORKFLOW_VERCEL_AUTH_TOKEN",
119088
119382
  "WORKFLOW_VERCEL_ENV"
119089
119383
  ].filter((key) => process.env[key]);
119090
- if (staleEnvVars.length > 0) {
119384
+ if (staleEnvVars.length > 0 && process.env.VERCEL === "1") {
119091
119385
  console.warn(`[workflow] Warning: ${staleEnvVars.join(", ")} env var(s) are set but have no effect at runtime. These are only used by the Workflow CLI. Remove them from your Vercel project environment variables.`);
119092
119386
  }
119093
119387
  return createVercelWorld();
@@ -119278,28 +119572,6 @@ function getQueueOverhead(message2) {
119278
119572
  return;
119279
119573
  }
119280
119574
  }
119281
- async function withServerErrorRetry(fn2) {
119282
- const delays = [500, 1e3, 2e3];
119283
- for (let attempt = 0; attempt <= delays.length; attempt++) {
119284
- try {
119285
- return await fn2();
119286
- } catch (err) {
119287
- if (WorkflowAPIError.is(err) && err.status !== void 0 && err.status >= 500 && attempt < delays.length) {
119288
- runtimeLogger.warn("Server error (5xx) from workflow-server, retrying in-process", {
119289
- status: err.status,
119290
- attempt: attempt + 1,
119291
- maxRetries: delays.length,
119292
- nextDelayMs: delays[attempt],
119293
- url: err.url
119294
- });
119295
- await new Promise((resolve2) => setTimeout(resolve2, delays[attempt]));
119296
- continue;
119297
- }
119298
- throw err;
119299
- }
119300
- }
119301
- throw new Error("withServerErrorRetry: unreachable");
119302
- }
119303
119575
  var headers;
119304
119576
  var hasRequiredHeaders;
119305
119577
  function requireHeaders() {
@@ -122312,7 +122584,7 @@ async function resumeHook$2(tokenOrHook, payload, encryptionKeyOverride) {
122312
122584
  });
122313
122585
  });
122314
122586
  }
122315
- const version = "4.2.0-beta.68";
122587
+ const version = "4.2.0-beta.70";
122316
122588
  const ulid = monotonicFactory();
122317
122589
  async function start$1(workflow, argsOrOptions, options) {
122318
122590
  return await waitedUntil(() => {
@@ -122337,7 +122609,13 @@ async function start$1(workflow, argsOrOptions, options) {
122337
122609
  ...WorkflowArgumentsCount(args.length)
122338
122610
  });
122339
122611
  const world = (opts == null ? void 0 : opts.world) ?? getWorld();
122340
- const deploymentId = opts.deploymentId ?? await world.getDeploymentId();
122612
+ let deploymentId = opts.deploymentId ?? await world.getDeploymentId();
122613
+ if (deploymentId === "latest") {
122614
+ if (!world.resolveLatestDeploymentId) {
122615
+ throw new WorkflowRuntimeError("deploymentId 'latest' requires a World that implements resolveLatestDeploymentId()");
122616
+ }
122617
+ deploymentId = await world.resolveLatestDeploymentId();
122618
+ }
122341
122619
  const ops = [];
122342
122620
  const runId = `wrun_${ulid()}`;
122343
122621
  const traceCarrier = await serializeTraceCarrier();
@@ -122553,6 +122831,17 @@ class Run {
122553
122831
  specVersion: SPEC_VERSION_CURRENT
122554
122832
  });
122555
122833
  }
122834
+ /**
122835
+ * Whether the workflow run exists.
122836
+ */
122837
+ get exists() {
122838
+ return this.world.runs.get(this.runId, { resolveData: "none" }).then(() => true).catch((error2) => {
122839
+ if (WorkflowRunNotFoundError.is(error2)) {
122840
+ return false;
122841
+ }
122842
+ throw error2;
122843
+ });
122844
+ }
122556
122845
  /**
122557
122846
  * The status of the workflow run.
122558
122847
  */
@@ -122690,18 +122979,18 @@ getWorldHandlers().createQueueHandler("__wkf_step_", async (message_, metadata)
122690
122979
  });
122691
122980
  let step;
122692
122981
  try {
122693
- const startResult = await withServerErrorRetry(() => world.events.create(workflowRunId, {
122982
+ const startResult = await world.events.create(workflowRunId, {
122694
122983
  eventType: "step_started",
122695
122984
  specVersion: SPEC_VERSION_CURRENT,
122696
122985
  correlationId: stepId
122697
- }));
122986
+ });
122698
122987
  if (!startResult.step) {
122699
122988
  throw new WorkflowRuntimeError(`step_started event for "${stepId}" did not return step entity`);
122700
122989
  }
122701
122990
  step = startResult.step;
122702
122991
  } catch (err) {
122703
122992
  if (WorkflowAPIError.is(err)) {
122704
- if (WorkflowAPIError.is(err) && err.status === 429) {
122993
+ if (err.status === 429) {
122705
122994
  const retryRetryAfter = Math.max(1, typeof err.retryAfter === "number" ? err.retryAfter : 1);
122706
122995
  runtimeLogger.warn("Throttled again on retry, deferring to queue", {
122707
122996
  retryAfterSeconds: retryRetryAfter
@@ -122810,28 +123099,57 @@ getWorldHandlers().createQueueHandler("__wkf_step_", async (message_, metadata)
122810
123099
  });
122811
123100
  return;
122812
123101
  }
122813
- try {
122814
- const attempt = step.attempt;
122815
- if (!step.startedAt) {
122816
- throw new WorkflowRuntimeError(`Step "${stepId}" has no "startedAt" timestamp`);
122817
- }
122818
- const stepStartedAt = step.startedAt;
122819
- const ops = [];
122820
- const rawKey = await ((_e2 = world.getEncryptionKeyForRun) == null ? void 0 : _e2.call(world, workflowRunId));
122821
- const encryptionKey = rawKey ? await importKey(rawKey) : void 0;
122822
- const hydratedInput = await trace$2("step.hydrate", {}, async (hydrateSpan) => {
122823
- const startTime = Date.now();
122824
- const result2 = await hydrateStepArguments(step.input, workflowRunId, encryptionKey, ops);
122825
- const durationMs = Date.now() - startTime;
122826
- hydrateSpan == null ? void 0 : hydrateSpan.setAttributes({
122827
- ...StepArgumentsCount(result2.args.length),
122828
- ...QueueDeserializeTimeMs(durationMs)
123102
+ const attempt = step.attempt;
123103
+ if (!step.startedAt) {
123104
+ const errorMessage = `Step "${stepId}" has no "startedAt" timestamp`;
123105
+ runtimeLogger.error("Fatal runtime error during step setup", {
123106
+ workflowRunId,
123107
+ stepId,
123108
+ error: errorMessage
123109
+ });
123110
+ try {
123111
+ await world.events.create(workflowRunId, {
123112
+ eventType: "step_failed",
123113
+ specVersion: SPEC_VERSION_CURRENT,
123114
+ correlationId: stepId,
123115
+ eventData: {
123116
+ error: errorMessage,
123117
+ stack: new Error(errorMessage).stack ?? ""
123118
+ }
122829
123119
  });
122830
- return result2;
123120
+ } catch (failErr) {
123121
+ if (WorkflowAPIError.is(failErr) && failErr.status === 409) {
123122
+ return;
123123
+ }
123124
+ throw failErr;
123125
+ }
123126
+ await queueMessage(world, getWorkflowQueueName(workflowName), {
123127
+ runId: workflowRunId,
123128
+ traceCarrier: await serializeTraceCarrier(),
123129
+ requestedAt: /* @__PURE__ */ new Date()
123130
+ });
123131
+ return;
123132
+ }
123133
+ const stepStartedAt = step.startedAt;
123134
+ const ops = [];
123135
+ const rawKey = await ((_e2 = world.getEncryptionKeyForRun) == null ? void 0 : _e2.call(world, workflowRunId));
123136
+ const encryptionKey = rawKey ? await importKey(rawKey) : void 0;
123137
+ const hydratedInput = await trace$2("step.hydrate", {}, async (hydrateSpan) => {
123138
+ const startTime = Date.now();
123139
+ const result2 = await hydrateStepArguments(step.input, workflowRunId, encryptionKey, ops);
123140
+ const durationMs = Date.now() - startTime;
123141
+ hydrateSpan == null ? void 0 : hydrateSpan.setAttributes({
123142
+ ...StepArgumentsCount(result2.args.length),
123143
+ ...QueueDeserializeTimeMs(durationMs)
122831
123144
  });
122832
- const args = hydratedInput.args;
122833
- const thisVal = hydratedInput.thisVal ?? null;
122834
- const executionStartTime = Date.now();
123145
+ return result2;
123146
+ });
123147
+ const args = hydratedInput.args;
123148
+ const thisVal = hydratedInput.thisVal ?? null;
123149
+ let userCodeError;
123150
+ let userCodeFailed = false;
123151
+ const executionStartTime = Date.now();
123152
+ try {
122835
123153
  result = await trace$2("step.execute", {}, async () => {
122836
123154
  return await contextStorage.run({
122837
123155
  stepMetadata: {
@@ -122853,63 +123171,29 @@ getWorldHandlers().createQueueHandler("__wkf_step_", async (message_, metadata)
122853
123171
  encryptionKey
122854
123172
  }, () => stepFn.apply(thisVal, args));
122855
123173
  });
122856
- const executionTimeMs = Date.now() - executionStartTime;
122857
- span == null ? void 0 : span.setAttributes({
122858
- ...QueueExecutionTimeMs(executionTimeMs)
122859
- });
122860
- result = await trace$2("step.dehydrate", {}, async (dehydrateSpan) => {
122861
- const startTime = Date.now();
122862
- const dehydrated = await dehydrateStepReturnValue(result, workflowRunId, encryptionKey, ops);
122863
- const durationMs = Date.now() - startTime;
122864
- dehydrateSpan == null ? void 0 : dehydrateSpan.setAttributes({
122865
- ...QueueSerializeTimeMs(durationMs),
122866
- ...StepResultType(typeof dehydrated)
122867
- });
122868
- return dehydrated;
122869
- });
122870
- functionsExports.waitUntil(Promise.all(ops).catch((err) => {
122871
- const isAbortError = (err == null ? void 0 : err.name) === "AbortError" || (err == null ? void 0 : err.name) === "ResponseAborted";
122872
- if (!isAbortError)
122873
- throw err;
122874
- }));
122875
- let stepCompleted409 = false;
122876
- const [, traceCarrier] = await Promise.all([
122877
- withServerErrorRetry(() => world.events.create(workflowRunId, {
122878
- eventType: "step_completed",
122879
- specVersion: SPEC_VERSION_CURRENT,
122880
- correlationId: stepId,
122881
- eventData: {
122882
- result
122883
- }
122884
- })).catch((err) => {
122885
- if (WorkflowAPIError.is(err) && err.status === 409) {
122886
- runtimeLogger.warn("Tried completing step, but step has already finished.", {
122887
- workflowRunId,
122888
- stepId,
122889
- stepName,
122890
- message: err.message
122891
- });
122892
- stepCompleted409 = true;
122893
- return;
122894
- }
123174
+ } catch (err) {
123175
+ userCodeError = err;
123176
+ userCodeFailed = true;
123177
+ }
123178
+ const executionTimeMs = Date.now() - executionStartTime;
123179
+ span == null ? void 0 : span.setAttributes({
123180
+ ...QueueExecutionTimeMs(executionTimeMs)
123181
+ });
123182
+ if (userCodeFailed) {
123183
+ const err = userCodeError;
123184
+ if (WorkflowAPIError.is(err)) {
123185
+ if (err.status === 410) {
123186
+ stepLogger.info("Workflow run already completed, skipping step", {
123187
+ workflowRunId,
123188
+ stepId,
123189
+ message: err.message
123190
+ });
123191
+ return;
123192
+ }
123193
+ if (err.status !== void 0 && err.status >= 500) {
122895
123194
  throw err;
122896
- }),
122897
- serializeTraceCarrier()
122898
- ]);
122899
- if (stepCompleted409) {
122900
- return;
123195
+ }
122901
123196
  }
122902
- span == null ? void 0 : span.setAttributes({
122903
- ...StepStatus("completed"),
122904
- ...StepResultType(typeof result)
122905
- });
122906
- await queueMessage(world, getWorkflowQueueName(workflowName), {
122907
- runId: workflowRunId,
122908
- traceCarrier,
122909
- requestedAt: /* @__PURE__ */ new Date()
122910
- });
122911
- return;
122912
- } catch (err) {
122913
123197
  const normalizedError = await normalizeUnknownError(err);
122914
123198
  const normalizedStack = normalizedError.stack || getErrorStack(err) || "";
122915
123199
  if (err instanceof Error) {
@@ -122925,26 +123209,6 @@ getWorldHandlers().createQueueHandler("__wkf_step_", async (message_, metadata)
122925
123209
  ...ErrorCategory(errorCategory),
122926
123210
  ...ErrorRetryable(!isFatal)
122927
123211
  });
122928
- if (WorkflowAPIError.is(err)) {
122929
- if (err.status === 410) {
122930
- stepLogger.info("Workflow run already completed, skipping step", {
122931
- workflowRunId,
122932
- stepId,
122933
- message: err.message
122934
- });
122935
- return;
122936
- }
122937
- if (err.status !== void 0 && err.status >= 500) {
122938
- runtimeLogger.warn("Persistent server error (5xx) during step, deferring to queue retry", {
122939
- status: err.status,
122940
- workflowRunId,
122941
- stepId,
122942
- error: err.message,
122943
- url: err.url
122944
- });
122945
- throw err;
122946
- }
122947
- }
122948
123212
  if (isFatal) {
122949
123213
  stepLogger.error("Encountered FatalError while executing step, bubbling up to parent workflow", {
122950
123214
  workflowRunId,
@@ -122952,7 +123216,7 @@ getWorldHandlers().createQueueHandler("__wkf_step_", async (message_, metadata)
122952
123216
  errorStack: normalizedStack
122953
123217
  });
122954
123218
  try {
122955
- await withServerErrorRetry(() => world.events.create(workflowRunId, {
123219
+ await world.events.create(workflowRunId, {
122956
123220
  eventType: "step_failed",
122957
123221
  specVersion: SPEC_VERSION_CURRENT,
122958
123222
  correlationId: stepId,
@@ -122960,7 +123224,7 @@ getWorldHandlers().createQueueHandler("__wkf_step_", async (message_, metadata)
122960
123224
  error: normalizedError.message,
122961
123225
  stack: normalizedStack
122962
123226
  }
122963
- }));
123227
+ });
122964
123228
  } catch (stepFailErr) {
122965
123229
  if (WorkflowAPIError.is(stepFailErr) && stepFailErr.status === 409) {
122966
123230
  runtimeLogger.warn("Tried failing step, but step has already finished.", {
@@ -122995,7 +123259,7 @@ getWorldHandlers().createQueueHandler("__wkf_step_", async (message_, metadata)
122995
123259
  });
122996
123260
  const errorMessage = `Step "${stepName}" failed after ${maxRetries2} ${pluralize("retry", "retries", maxRetries2)}: ${normalizedError.message}`;
122997
123261
  try {
122998
- await withServerErrorRetry(() => world.events.create(workflowRunId, {
123262
+ await world.events.create(workflowRunId, {
122999
123263
  eventType: "step_failed",
123000
123264
  specVersion: SPEC_VERSION_CURRENT,
123001
123265
  correlationId: stepId,
@@ -123003,7 +123267,7 @@ getWorldHandlers().createQueueHandler("__wkf_step_", async (message_, metadata)
123003
123267
  error: errorMessage,
123004
123268
  stack: normalizedStack
123005
123269
  }
123006
- }));
123270
+ });
123007
123271
  } catch (stepFailErr) {
123008
123272
  if (WorkflowAPIError.is(stepFailErr) && stepFailErr.status === 409) {
123009
123273
  runtimeLogger.warn("Tried failing step, but step has already finished.", {
@@ -123037,7 +123301,7 @@ getWorldHandlers().createQueueHandler("__wkf_step_", async (message_, metadata)
123037
123301
  });
123038
123302
  }
123039
123303
  try {
123040
- await withServerErrorRetry(() => world.events.create(workflowRunId, {
123304
+ await world.events.create(workflowRunId, {
123041
123305
  eventType: "step_retrying",
123042
123306
  specVersion: SPEC_VERSION_CURRENT,
123043
123307
  correlationId: stepId,
@@ -123048,7 +123312,7 @@ getWorldHandlers().createQueueHandler("__wkf_step_", async (message_, metadata)
123048
123312
  retryAfter: err.retryAfter
123049
123313
  }
123050
123314
  }
123051
- }));
123315
+ });
123052
123316
  } catch (stepRetryErr) {
123053
123317
  if (WorkflowAPIError.is(stepRetryErr) && stepRetryErr.status === 409) {
123054
123318
  runtimeLogger.warn("Tried retrying step, but step has already finished.", {
@@ -123074,10 +123338,62 @@ getWorldHandlers().createQueueHandler("__wkf_step_", async (message_, metadata)
123074
123338
  return { timeoutSeconds };
123075
123339
  }
123076
123340
  }
123341
+ await queueMessage(world, getWorkflowQueueName(workflowName), {
123342
+ runId: workflowRunId,
123343
+ traceCarrier: await serializeTraceCarrier(),
123344
+ requestedAt: /* @__PURE__ */ new Date()
123345
+ });
123346
+ return;
123077
123347
  }
123348
+ result = await trace$2("step.dehydrate", {}, async (dehydrateSpan) => {
123349
+ const startTime = Date.now();
123350
+ const dehydrated = await dehydrateStepReturnValue(result, workflowRunId, encryptionKey, ops);
123351
+ const durationMs = Date.now() - startTime;
123352
+ dehydrateSpan == null ? void 0 : dehydrateSpan.setAttributes({
123353
+ ...QueueSerializeTimeMs(durationMs),
123354
+ ...StepResultType(typeof dehydrated)
123355
+ });
123356
+ return dehydrated;
123357
+ });
123358
+ functionsExports.waitUntil(Promise.all(ops).catch((err) => {
123359
+ const isAbortError = (err == null ? void 0 : err.name) === "AbortError" || (err == null ? void 0 : err.name) === "ResponseAborted";
123360
+ if (!isAbortError)
123361
+ throw err;
123362
+ }));
123363
+ let stepCompleted409 = false;
123364
+ const [, traceCarrier] = await Promise.all([
123365
+ world.events.create(workflowRunId, {
123366
+ eventType: "step_completed",
123367
+ specVersion: SPEC_VERSION_CURRENT,
123368
+ correlationId: stepId,
123369
+ eventData: {
123370
+ result
123371
+ }
123372
+ }).catch((err) => {
123373
+ if (WorkflowAPIError.is(err) && err.status === 409) {
123374
+ runtimeLogger.warn("Tried completing step, but step has already finished.", {
123375
+ workflowRunId,
123376
+ stepId,
123377
+ stepName,
123378
+ message: err.message
123379
+ });
123380
+ stepCompleted409 = true;
123381
+ return;
123382
+ }
123383
+ throw err;
123384
+ }),
123385
+ serializeTraceCarrier()
123386
+ ]);
123387
+ if (stepCompleted409) {
123388
+ return;
123389
+ }
123390
+ span == null ? void 0 : span.setAttributes({
123391
+ ...StepStatus("completed"),
123392
+ ...StepResultType(typeof result)
123393
+ });
123078
123394
  await queueMessage(world, getWorkflowQueueName(workflowName), {
123079
123395
  runId: workflowRunId,
123080
- traceCarrier: await serializeTraceCarrier(),
123396
+ traceCarrier,
123081
123397
  requestedAt: /* @__PURE__ */ new Date()
123082
123398
  });
123083
123399
  });
@@ -129736,8 +130052,8 @@ async function pollResource(opts) {
129736
130052
  return false;
129737
130053
  }
129738
130054
  const LIVE_POLL_LIMIT = 100;
129739
- const INITIAL_PAGE_SIZE = 500;
129740
- const LOAD_MORE_PAGE_SIZE = 100;
130055
+ const INITIAL_PAGE_SIZE$1 = 500;
130056
+ const LOAD_MORE_PAGE_SIZE$1 = 100;
129741
130057
  const LIVE_UPDATE_INTERVAL_MS = 5e3;
129742
130058
  function useWorkflowTraceViewerData(env2, runId, options = {}) {
129743
130059
  const { live = false } = options;
@@ -129762,7 +130078,7 @@ function useWorkflowTraceViewerData(env2, runId, options = {}) {
129762
130078
  unwrapServerActionResult(
129763
130079
  fetchEvents$1(env2, runId, {
129764
130080
  sortOrder: "asc",
129765
- limit: INITIAL_PAGE_SIZE,
130081
+ limit: INITIAL_PAGE_SIZE$1,
129766
130082
  withData: true
129767
130083
  })
129768
130084
  )
@@ -129797,7 +130113,7 @@ function useWorkflowTraceViewerData(env2, runId, options = {}) {
129797
130113
  fetchEvents$1(env2, runId, {
129798
130114
  cursor: eventsCursor,
129799
130115
  sortOrder: "asc",
129800
- limit: LOAD_MORE_PAGE_SIZE,
130116
+ limit: LOAD_MORE_PAGE_SIZE$1,
129801
130117
  withData: true
129802
130118
  })
129803
130119
  );
@@ -145926,6 +146242,117 @@ function useStreamReader(env2, streamId, runId, encryptionKey) {
145926
146242
  }, [env2, streamId, runId, encryptionKey]);
145927
146243
  return { chunks, isLive, error: error2 };
145928
146244
  }
146245
+ const INITIAL_PAGE_SIZE = 100;
146246
+ const LOAD_MORE_PAGE_SIZE = 100;
146247
+ function useEventsListData(env2, runId, options = {}) {
146248
+ const { sortOrder = "asc", encryptionKey, enabled = true } = options;
146249
+ const [events2, setEvents] = reactExports.useState([]);
146250
+ const [loading, setLoading] = reactExports.useState(true);
146251
+ const [error2, setError] = reactExports.useState(null);
146252
+ const [cursor, setCursor] = reactExports.useState();
146253
+ const [hasMore, setHasMore] = reactExports.useState(false);
146254
+ const [loadingMore, setLoadingMore] = reactExports.useState(false);
146255
+ const isFetchingRef = reactExports.useRef(false);
146256
+ const encryptionKeyRef = reactExports.useRef(encryptionKey);
146257
+ encryptionKeyRef.current = encryptionKey;
146258
+ const fetchInitial = reactExports.useCallback(async () => {
146259
+ if (isFetchingRef.current) return;
146260
+ isFetchingRef.current = true;
146261
+ setLoading(true);
146262
+ setError(null);
146263
+ setEvents([]);
146264
+ setCursor(void 0);
146265
+ setHasMore(false);
146266
+ try {
146267
+ const { error: fetchError, result } = await unwrapServerActionResult(
146268
+ fetchEvents$1(env2, runId, {
146269
+ sortOrder,
146270
+ limit: INITIAL_PAGE_SIZE,
146271
+ withData: true
146272
+ })
146273
+ );
146274
+ if (fetchError) {
146275
+ setError(fetchError);
146276
+ } else {
146277
+ const hydrated = result.data.map(hydrateResourceIO);
146278
+ const key = encryptionKeyRef.current;
146279
+ if (key) {
146280
+ const decrypted = await Promise.all(
146281
+ hydrated.map((ev) => hydrateResourceIOWithKey(ev, key))
146282
+ );
146283
+ setEvents(decrypted);
146284
+ } else {
146285
+ setEvents(hydrated);
146286
+ }
146287
+ setCursor(result.hasMore ? result.cursor : void 0);
146288
+ setHasMore(Boolean(result.hasMore));
146289
+ }
146290
+ } catch (err) {
146291
+ setError(err);
146292
+ } finally {
146293
+ setLoading(false);
146294
+ isFetchingRef.current = false;
146295
+ }
146296
+ }, [env2, runId, sortOrder]);
146297
+ reactExports.useEffect(() => {
146298
+ if (enabled) fetchInitial();
146299
+ }, [fetchInitial, enabled]);
146300
+ reactExports.useEffect(() => {
146301
+ if (!encryptionKey || events2.length === 0) return;
146302
+ let cancelled = false;
146303
+ Promise.all(events2.map((ev) => hydrateResourceIOWithKey(ev, encryptionKey))).then((decrypted) => {
146304
+ if (!cancelled) setEvents(decrypted);
146305
+ }).catch(() => {
146306
+ });
146307
+ return () => {
146308
+ cancelled = true;
146309
+ };
146310
+ }, [encryptionKey]);
146311
+ const loadMore = reactExports.useCallback(async () => {
146312
+ if (loadingMore || !cursor) return;
146313
+ setLoadingMore(true);
146314
+ try {
146315
+ const { error: fetchError, result } = await unwrapServerActionResult(
146316
+ fetchEvents$1(env2, runId, {
146317
+ cursor,
146318
+ sortOrder,
146319
+ limit: LOAD_MORE_PAGE_SIZE,
146320
+ withData: true
146321
+ })
146322
+ );
146323
+ if (fetchError) {
146324
+ setError(fetchError);
146325
+ } else {
146326
+ if (result.data.length > 0) {
146327
+ const hydrated = result.data.map(hydrateResourceIO);
146328
+ const key = encryptionKeyRef.current;
146329
+ if (key) {
146330
+ const decrypted = await Promise.all(
146331
+ hydrated.map((ev) => hydrateResourceIOWithKey(ev, key))
146332
+ );
146333
+ setEvents((prev) => [...prev, ...decrypted]);
146334
+ } else {
146335
+ setEvents((prev) => [...prev, ...hydrated]);
146336
+ }
146337
+ }
146338
+ setCursor(result.hasMore ? result.cursor : void 0);
146339
+ setHasMore(Boolean(result.hasMore));
146340
+ }
146341
+ } catch (err) {
146342
+ setError(err);
146343
+ } finally {
146344
+ setLoadingMore(false);
146345
+ }
146346
+ }, [env2, runId, sortOrder, cursor, loadingMore]);
146347
+ return {
146348
+ events: events2,
146349
+ loading,
146350
+ error: error2,
146351
+ hasMore,
146352
+ loadingMore,
146353
+ loadMore
146354
+ };
146355
+ }
145929
146356
  function LiveStatus({ hasError, errorMessage }) {
145930
146357
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip, { children: [
145931
146358
  /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1.5", children: [
@@ -146954,6 +147381,18 @@ function RunDetailView({
146954
147381
  const run = runData ?? {};
146955
147382
  const [encryptionKey, setEncryptionKey] = reactExports.useState(null);
146956
147383
  encryptionKeyRef.current = encryptionKey;
147384
+ const [eventsSortOrder, setEventsSortOrder] = reactExports.useState("asc");
147385
+ const {
147386
+ events: eventsListData,
147387
+ loading: eventsListLoading,
147388
+ hasMore: hasMoreEventsTab,
147389
+ loadingMore: loadingMoreEventsTab,
147390
+ loadMore: loadMoreEventsTab
147391
+ } = useEventsListData(env2, runId, {
147392
+ sortOrder: eventsSortOrder,
147393
+ encryptionKey: encryptionKey ?? void 0,
147394
+ enabled: activeTab === "events"
147395
+ });
146957
147396
  const [spanSelection, setSpanSelection] = reactExports.useState(
146958
147397
  null
146959
147398
  );
@@ -146974,21 +147413,27 @@ function RunDetailView({
146974
147413
  encryptionKey: encryptionKey ?? void 0
146975
147414
  }
146976
147415
  );
147416
+ const [isDecrypting, setIsDecrypting] = reactExports.useState(false);
146977
147417
  const handleDecrypt = reactExports.useCallback(async () => {
146978
147418
  if (encryptionKey) {
146979
147419
  refreshSpanDetail();
146980
147420
  return;
146981
147421
  }
146982
- const { error: keyError, result: keyResult } = await unwrapServerActionResult(getEncryptionKeyForRun$1(env2, runId));
146983
- if (keyError) {
146984
- toast.error(`Failed to fetch encryption key: ${keyError.message}`);
146985
- return;
146986
- }
146987
- if (!keyResult) {
146988
- toast.error("Encryption is not configured for this deployment.");
146989
- return;
147422
+ setIsDecrypting(true);
147423
+ try {
147424
+ const { error: keyError, result: keyResult } = await unwrapServerActionResult(getEncryptionKeyForRun$1(env2, runId));
147425
+ if (keyError) {
147426
+ toast.error(`Failed to fetch encryption key: ${keyError.message}`);
147427
+ return;
147428
+ }
147429
+ if (!keyResult) {
147430
+ toast.error("Encryption is not configured for this deployment.");
147431
+ return;
147432
+ }
147433
+ setEncryptionKey(keyResult);
147434
+ } finally {
147435
+ setIsDecrypting(false);
146990
147436
  }
146991
- setEncryptionKey(keyResult);
146992
147437
  }, [encryptionKey, env2, runId, refreshSpanDetail]);
146993
147438
  const handleSpanSelect = reactExports.useCallback((info) => {
146994
147439
  setSpanSelection(info);
@@ -147206,16 +147651,25 @@ function RunDetailView({
147206
147651
  hasMoreSpans: hasMoreTraceData,
147207
147652
  isLoadingMoreSpans: isLoadingMoreTraceData,
147208
147653
  encryptionKey: encryptionKey ?? void 0,
147209
- onDecrypt: handleDecrypt
147654
+ onDecrypt: handleDecrypt,
147655
+ isDecrypting
147210
147656
  }
147211
147657
  ) }) }) }),
147212
147658
  /* @__PURE__ */ jsxRuntimeExports.jsx(TabsContent, { value: "events", className: "mt-0 flex-1 min-h-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary, { title: "Failed to load events list", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
147213
147659
  EventListView,
147214
147660
  {
147215
- events: allEvents,
147661
+ events: eventsListData,
147216
147662
  run,
147217
147663
  onLoadEventData: handleLoadEventData,
147218
- encryptionKey: encryptionKey ?? void 0
147664
+ hasMoreEvents: hasMoreEventsTab,
147665
+ isLoadingMoreEvents: loadingMoreEventsTab,
147666
+ onLoadMoreEvents: loadMoreEventsTab,
147667
+ encryptionKey: encryptionKey ?? void 0,
147668
+ isLoading: eventsListLoading,
147669
+ sortOrder: eventsSortOrder,
147670
+ onSortOrderChange: setEventsSortOrder,
147671
+ onDecrypt: handleDecrypt,
147672
+ isDecrypting
147219
147673
  }
147220
147674
  ) }) }) }),
147221
147675
  /* @__PURE__ */ jsxRuntimeExports.jsx(TabsContent, { value: "streams", className: "mt-0 flex-1 min-h-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary, { title: "Failed to load stream data", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "h-full flex gap-4", children: [
@@ -147268,13 +147722,46 @@ function RunDetailView({
147268
147722
  ]
147269
147723
  }
147270
147724
  ),
147271
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 min-w-0", children: selectedStreamId ? /* @__PURE__ */ jsxRuntimeExports.jsx(
147725
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 min-w-0", children: selectedStreamId ? (streamError == null ? void 0 : streamError.includes("encrypted")) && !encryptionKey ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
147726
+ "div",
147727
+ {
147728
+ className: "h-full flex flex-col items-center justify-center gap-3 rounded-lg border p-4",
147729
+ style: {
147730
+ borderColor: "var(--ds-gray-300)",
147731
+ backgroundColor: "var(--ds-gray-100)"
147732
+ },
147733
+ children: [
147734
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
147735
+ Lock,
147736
+ {
147737
+ className: "h-6 w-6",
147738
+ style: { color: "var(--ds-gray-700)" }
147739
+ }
147740
+ ),
147741
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
147742
+ "div",
147743
+ {
147744
+ className: "text-sm",
147745
+ style: { color: "var(--ds-gray-900)" },
147746
+ children: "This stream is encrypted."
147747
+ }
147748
+ ),
147749
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
147750
+ DecryptButton,
147751
+ {
147752
+ onClick: handleDecrypt,
147753
+ loading: isDecrypting
147754
+ }
147755
+ )
147756
+ ]
147757
+ }
147758
+ ) : /* @__PURE__ */ jsxRuntimeExports.jsx(
147272
147759
  StreamViewer,
147273
147760
  {
147274
147761
  streamId: selectedStreamId,
147275
147762
  chunks: streamChunks,
147276
147763
  isLive: streamIsLive,
147277
- error: streamError
147764
+ error: (streamError == null ? void 0 : streamError.includes("encrypted")) ? null : streamError
147278
147765
  }
147279
147766
  ) : /* @__PURE__ */ jsxRuntimeExports.jsx(
147280
147767
  "div",
@@ -147478,7 +147965,7 @@ const route4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
147478
147965
  __proto__: null,
147479
147966
  loader
147480
147967
  }, Symbol.toStringTag, { value: "Module" }));
147481
- const serverManifest = { "entry": { "module": "/assets/entry.client-BjpmGyLC.js", "imports": ["/assets/index-DklpUtP3.js"], "css": [] }, "routes": { "root": { "id": "root", "parentId": void 0, "path": "", "index": void 0, "caseSensitive": void 0, "hasAction": true, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": false, "module": "/assets/root-D-041AAq.js", "imports": ["/assets/index-DklpUtP3.js", "/assets/mermaid-3ZIDBTTL-RlQIshou.js"], "css": ["/assets/root-9gRDb_Jz.css", "/assets/mermaid-3ZIDBTTL-DKxHcEOp.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/home": { "id": "routes/home", "parentId": "root", "path": void 0, "index": true, "caseSensitive": void 0, "hasAction": false, "hasLoader": false, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": false, "module": "/assets/home-Xl3EX8M3.js", "imports": ["/assets/index-DklpUtP3.js", "/assets/use-workflow-graph-C-GqGBPl.js", "/assets/mermaid-3ZIDBTTL-RlQIshou.js"], "css": ["/assets/use-workflow-graph-yls6qlc0.css", "/assets/mermaid-3ZIDBTTL-DKxHcEOp.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/run-detail": { "id": "routes/run-detail", "parentId": "root", "path": "run/:runId", "index": void 0, "caseSensitive": void 0, "hasAction": false, "hasLoader": false, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": false, "module": "/assets/run-detail-BPOihWwO.js", "imports": ["/assets/index-DklpUtP3.js", "/assets/use-workflow-graph-C-GqGBPl.js", "/assets/mermaid-3ZIDBTTL-RlQIshou.js", "/assets/encryption-8OvC6eoJ.js"], "css": ["/assets/use-workflow-graph-yls6qlc0.css", "/assets/mermaid-3ZIDBTTL-DKxHcEOp.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/api.rpc": { "id": "routes/api.rpc", "parentId": "root", "path": "api/rpc", "index": void 0, "caseSensitive": void 0, "hasAction": true, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": false, "hasErrorBoundary": false, "module": "/assets/api.rpc-l0sNRNKZ.js", "imports": [], "css": [], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/api.stream.$streamId": { "id": "routes/api.stream.$streamId", "parentId": "root", "path": "api/stream/:streamId", "index": void 0, "caseSensitive": void 0, "hasAction": false, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": false, "hasErrorBoundary": false, "module": "/assets/api.stream._streamId-l0sNRNKZ.js", "imports": [], "css": [], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 } }, "url": "/assets/manifest-0e172cba.js", "version": "0e172cba", "sri": void 0 };
147968
+ const serverManifest = { "entry": { "module": "/assets/entry.client-BjpmGyLC.js", "imports": ["/assets/index-DklpUtP3.js"], "css": [] }, "routes": { "root": { "id": "root", "parentId": void 0, "path": "", "index": void 0, "caseSensitive": void 0, "hasAction": true, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": false, "module": "/assets/root-EzkmXyJV.js", "imports": ["/assets/index-DklpUtP3.js", "/assets/mermaid-3ZIDBTTL-BMFG0Hnn.js"], "css": ["/assets/root-SL7uvdv2.css", "/assets/mermaid-3ZIDBTTL-DKxHcEOp.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/home": { "id": "routes/home", "parentId": "root", "path": void 0, "index": true, "caseSensitive": void 0, "hasAction": false, "hasLoader": false, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": false, "module": "/assets/home-C-j1J39E.js", "imports": ["/assets/index-DklpUtP3.js", "/assets/use-workflow-graph-DXipnqlR.js", "/assets/mermaid-3ZIDBTTL-BMFG0Hnn.js"], "css": ["/assets/use-workflow-graph-yls6qlc0.css", "/assets/mermaid-3ZIDBTTL-DKxHcEOp.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/run-detail": { "id": "routes/run-detail", "parentId": "root", "path": "run/:runId", "index": void 0, "caseSensitive": void 0, "hasAction": false, "hasLoader": false, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": true, "hasErrorBoundary": false, "module": "/assets/run-detail-C0ZpSKc-.js", "imports": ["/assets/index-DklpUtP3.js", "/assets/use-workflow-graph-DXipnqlR.js", "/assets/mermaid-3ZIDBTTL-BMFG0Hnn.js", "/assets/encryption-8OvC6eoJ.js"], "css": ["/assets/use-workflow-graph-yls6qlc0.css", "/assets/mermaid-3ZIDBTTL-DKxHcEOp.css"], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/api.rpc": { "id": "routes/api.rpc", "parentId": "root", "path": "api/rpc", "index": void 0, "caseSensitive": void 0, "hasAction": true, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": false, "hasErrorBoundary": false, "module": "/assets/api.rpc-l0sNRNKZ.js", "imports": [], "css": [], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 }, "routes/api.stream.$streamId": { "id": "routes/api.stream.$streamId", "parentId": "root", "path": "api/stream/:streamId", "index": void 0, "caseSensitive": void 0, "hasAction": false, "hasLoader": true, "hasClientAction": false, "hasClientLoader": false, "hasClientMiddleware": false, "hasDefaultExport": false, "hasErrorBoundary": false, "module": "/assets/api.stream._streamId-l0sNRNKZ.js", "imports": [], "css": [], "clientActionModule": void 0, "clientLoaderModule": void 0, "clientMiddlewareModule": void 0, "hydrateFallbackModule": void 0 } }, "url": "/assets/manifest-41615f41.js", "version": "41615f41", "sri": void 0 };
147482
147969
  const assetsBuildDirectory = "build/client";
147483
147970
  const basename = "/";
147484
147971
  const future = { "unstable_optimizeDeps": false, "unstable_subResourceIntegrity": false, "unstable_trailingSlashAwareDataRequests": false, "unstable_previewServerPrerendering": false, "v8_middleware": false, "v8_splitRouteModules": false, "v8_viteEnvironmentApi": false };