@workflow/web 5.0.0-beta.38 → 5.0.0-beta.39

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 (27) hide show
  1. package/README.md +1 -0
  2. package/build/client/assets/app-BqwHo5GR.css +1 -0
  3. package/build/client/assets/{arrow-up-right-BRTGGI7c.js → arrow-up-right-Ccx_FPfU.js} +1 -1
  4. package/build/client/assets/{highlighted-body-B3W2YXNL-DwhUiBi7.js → highlighted-body-B3W2YXNL-DMawUm9n.js} +1 -1
  5. package/build/client/assets/{home-DBrnNvHF.js → home-B6O_uPSC.js} +3 -3
  6. package/build/client/assets/{loader-circle-WvWWlrvM.js → loader-circle-BrO0dxVn.js} +1 -1
  7. package/build/client/assets/{manifest-70ec0eba.js → manifest-7e8691f4.js} +1 -1
  8. package/build/client/assets/{mermaid-3ZIDBTTL-xYKZZytQ.js → mermaid-3ZIDBTTL-D20ZkB54.js} +473 -1549
  9. package/build/client/assets/mermaid-3ZIDBTTL-D8CjRQta.css +1 -0
  10. package/build/client/assets/root-CxZylOIf.css +1 -0
  11. package/build/client/assets/{root-Cimnh7R3.js → root-dudvdmvf.js} +3 -3
  12. package/build/client/assets/{run-detail-Dr7nmBuO.js → run-detail-DtCCxxv2.js} +224 -210
  13. package/build/client/assets/{workflow-graph-viewer-tTf4FHzV.js → workflow-graph-viewer-B01nH75E.js} +2 -2
  14. package/build/client/assets/{zstd-browser-decoder-B15ptsR4.js → zstd-browser-decoder-Dw3HhTgO.js} +1 -1
  15. package/build/server/assets/{app-BUMjG2-y.js → app-Bd12Opaf.js} +7017 -7304
  16. package/build/server/assets/{highlighted-body-B3W2YXNL-Bkx5Bh9I.js → highlighted-body-B3W2YXNL-CFlRme7u.js} +1 -1
  17. package/build/server/assets/{index-DVvcuTAp.js → index-B6SJpqpo.js} +62 -59
  18. package/build/server/assets/{mermaid-3ZIDBTTL-CSJYRI2g.js → mermaid-3ZIDBTTL-CQsU8DGa.js} +1 -1
  19. package/build/server/assets/{token-BXRDO8X7.js → token-XJr1pjmC.js} +1 -1
  20. package/build/server/assets/{token-util-2RA-Rh-5.js → token-util-BJaMxWWP.js} +1 -1
  21. package/build/server/assets/{zstd-browser-decoder-Cqnyq-Ly.js → zstd-browser-decoder-DL7Vc3pV.js} +1 -1
  22. package/build/server/index.js +3 -3
  23. package/package.json +7 -7
  24. package/build/client/assets/app-_i85JgUF.css +0 -1
  25. package/build/client/assets/mermaid-3ZIDBTTL-DDxQhcP4.css +0 -1
  26. package/build/client/assets/root-CINgYZFD.css +0 -1
  27. package/build/client/assets/worker-CqHKTA7D.js +0 -115
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/zstd-browser-decoder-B15ptsR4.js","assets/index-PFjW8YjQ.js","assets/highlighted-body-B3W2YXNL-DwhUiBi7.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/zstd-browser-decoder-Dw3HhTgO.js","assets/index-PFjW8YjQ.js","assets/highlighted-body-B3W2YXNL-DMawUm9n.js"])))=>i.map(i=>d[i]);
2
2
  var __defProp = Object.defineProperty;
3
3
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
4
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -577,21 +577,21 @@ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
577
577
  function getOppositePlacement(placement) {
578
578
  return placement.replace(/left|right|bottom|top/g, (side) => oppositeSideMap[side]);
579
579
  }
580
- function expandPaddingObject(padding2) {
580
+ function expandPaddingObject(padding) {
581
581
  return {
582
582
  top: 0,
583
583
  right: 0,
584
584
  bottom: 0,
585
585
  left: 0,
586
- ...padding2
586
+ ...padding
587
587
  };
588
588
  }
589
- function getPaddingObject(padding2) {
590
- return typeof padding2 !== "number" ? expandPaddingObject(padding2) : {
591
- top: padding2,
592
- right: padding2,
593
- bottom: padding2,
594
- left: padding2
589
+ function getPaddingObject(padding) {
590
+ return typeof padding !== "number" ? expandPaddingObject(padding) : {
591
+ top: padding,
592
+ right: padding,
593
+ bottom: padding,
594
+ left: padding
595
595
  };
596
596
  }
597
597
  function rectToClientRect(rect) {
@@ -768,9 +768,9 @@ async function detectOverflow(state, options) {
768
768
  rootBoundary = "viewport",
769
769
  elementContext = "floating",
770
770
  altBoundary = false,
771
- padding: padding2 = 0
771
+ padding = 0
772
772
  } = evaluate(options, state);
773
- const paddingObject = getPaddingObject(padding2);
773
+ const paddingObject = getPaddingObject(padding);
774
774
  const altContext = elementContext === "floating" ? "reference" : "floating";
775
775
  const element2 = elements[altBoundary ? altContext : elementContext];
776
776
  const clippingClientRect = rectToClientRect(await platform2.getClippingRect({
@@ -821,12 +821,12 @@ const arrow$3 = (options) => ({
821
821
  } = state;
822
822
  const {
823
823
  element: element2,
824
- padding: padding2 = 0
824
+ padding = 0
825
825
  } = evaluate(options, state) || {};
826
826
  if (element2 == null) {
827
827
  return {};
828
828
  }
829
- const paddingObject = getPaddingObject(padding2);
829
+ const paddingObject = getPaddingObject(padding);
830
830
  const coords = {
831
831
  x: x2,
832
832
  y: y2
@@ -2310,13 +2310,13 @@ const arrow$1 = (options) => {
2310
2310
  fn(state) {
2311
2311
  const {
2312
2312
  element: element2,
2313
- padding: padding2
2313
+ padding
2314
2314
  } = typeof options === "function" ? options(state) : options;
2315
2315
  if (element2 && isRef(element2)) {
2316
2316
  if (element2.current != null) {
2317
2317
  return arrow$2({
2318
2318
  element: element2.current,
2319
- padding: padding2
2319
+ padding
2320
2320
  }).fn(state);
2321
2321
  }
2322
2322
  return {};
@@ -2324,7 +2324,7 @@ const arrow$1 = (options) => {
2324
2324
  if (element2) {
2325
2325
  return arrow$2({
2326
2326
  element: element2,
2327
- padding: padding2
2327
+ padding
2328
2328
  }).fn(state);
2329
2329
  }
2330
2330
  return {};
@@ -2692,11 +2692,11 @@ var Portal$1 = reactExports.forwardRef((props, forwardedRef) => {
2692
2692
  return container ? ReactDOM.createPortal(/* @__PURE__ */ jsxRuntimeExports.jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
2693
2693
  });
2694
2694
  Portal$1.displayName = PORTAL_NAME$1;
2695
- function useStateMachine(initialState2, machine) {
2695
+ function useStateMachine(initialState, machine) {
2696
2696
  return reactExports.useReducer((state, event) => {
2697
2697
  const nextState = machine[state][event];
2698
2698
  return nextState ?? state;
2699
- }, initialState2);
2699
+ }, initialState);
2700
2700
  }
2701
2701
  var Presence = (props) => {
2702
2702
  const { present, children: children2 } = props;
@@ -2712,8 +2712,8 @@ function usePresence(present) {
2712
2712
  const stylesRef = reactExports.useRef(null);
2713
2713
  const prevPresentRef = reactExports.useRef(present);
2714
2714
  const prevAnimationNameRef = reactExports.useRef("none");
2715
- const initialState2 = present ? "mounted" : "unmounted";
2716
- const [state, send] = useStateMachine(initialState2, {
2715
+ const initialState = present ? "mounted" : "unmounted";
2716
+ const [state, send] = useStateMachine(initialState, {
2717
2717
  mounted: {
2718
2718
  UNMOUNT: "unmounted",
2719
2719
  ANIMATION_OUT: "unmountSuspended"
@@ -3280,31 +3280,31 @@ function getExitSideFromRect(point2, rect) {
3280
3280
  throw new Error("unreachable");
3281
3281
  }
3282
3282
  }
3283
- function getPaddedExitPoints(exitPoint, exitSide, padding2 = 5) {
3283
+ function getPaddedExitPoints(exitPoint, exitSide, padding = 5) {
3284
3284
  const paddedExitPoints = [];
3285
3285
  switch (exitSide) {
3286
3286
  case "top":
3287
3287
  paddedExitPoints.push(
3288
- { x: exitPoint.x - padding2, y: exitPoint.y + padding2 },
3289
- { x: exitPoint.x + padding2, y: exitPoint.y + padding2 }
3288
+ { x: exitPoint.x - padding, y: exitPoint.y + padding },
3289
+ { x: exitPoint.x + padding, y: exitPoint.y + padding }
3290
3290
  );
3291
3291
  break;
3292
3292
  case "bottom":
3293
3293
  paddedExitPoints.push(
3294
- { x: exitPoint.x - padding2, y: exitPoint.y - padding2 },
3295
- { x: exitPoint.x + padding2, y: exitPoint.y - padding2 }
3294
+ { x: exitPoint.x - padding, y: exitPoint.y - padding },
3295
+ { x: exitPoint.x + padding, y: exitPoint.y - padding }
3296
3296
  );
3297
3297
  break;
3298
3298
  case "left":
3299
3299
  paddedExitPoints.push(
3300
- { x: exitPoint.x + padding2, y: exitPoint.y - padding2 },
3301
- { x: exitPoint.x + padding2, y: exitPoint.y + padding2 }
3300
+ { x: exitPoint.x + padding, y: exitPoint.y - padding },
3301
+ { x: exitPoint.x + padding, y: exitPoint.y + padding }
3302
3302
  );
3303
3303
  break;
3304
3304
  case "right":
3305
3305
  paddedExitPoints.push(
3306
- { x: exitPoint.x - padding2, y: exitPoint.y - padding2 },
3307
- { x: exitPoint.x - padding2, y: exitPoint.y + padding2 }
3306
+ { x: exitPoint.x - padding, y: exitPoint.y - padding },
3307
+ { x: exitPoint.x - padding, y: exitPoint.y + padding }
3308
3308
  );
3309
3309
  break;
3310
3310
  }
@@ -6691,7 +6691,7 @@ const hasA11yProp = (props) => {
6691
6691
  */
6692
6692
  const Icon = reactExports.forwardRef(
6693
6693
  ({
6694
- color: color5 = "currentColor",
6694
+ color: color2 = "currentColor",
6695
6695
  size: size2 = 24,
6696
6696
  strokeWidth = 2,
6697
6697
  absoluteStrokeWidth,
@@ -6706,7 +6706,7 @@ const Icon = reactExports.forwardRef(
6706
6706
  ...defaultAttributes,
6707
6707
  width: size2,
6708
6708
  height: size2,
6709
- stroke: color5,
6709
+ stroke: color2,
6710
6710
  strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size2) : strokeWidth,
6711
6711
  className: mergeClasses("lucide", className),
6712
6712
  ...!children2 && !hasA11yProp(rest) && { "aria-hidden": "true" },
@@ -15290,7 +15290,15 @@ AllEventsSchema.and(object({
15290
15290
  eventId: string$2(),
15291
15291
  createdAt: date(),
15292
15292
  occurredAt: date().optional(),
15293
- specVersion: number$3().optional()
15293
+ specVersion: number$3().optional(),
15294
+ /**
15295
+ * Lazy hook resume idempotency key, persisted on `hook_received` events so
15296
+ * the queue consumer can detect that the producer's concurrent direct write
15297
+ * already landed in the run_started preload and skip its own re-ensure.
15298
+ * Mirrors {@link CreateEventParams.resumeId}; absent on all other events and
15299
+ * on legacy (non-lazy) resumes.
15300
+ */
15301
+ resumeId: string$2().optional()
15294
15302
  }));
15295
15303
  const WorkflowRunStatusSchema = _enum([
15296
15304
  "pending",
@@ -15539,7 +15547,9 @@ object({
15539
15547
  retryAfter: NullableDateSchema,
15540
15548
  errorCode: NullableStringSchema,
15541
15549
  workflowCoreVersion: NullableStringSchema,
15542
- workflowEncryptionEnabled: NullableBooleanSchema
15550
+ workflowEncryptionEnabled: NullableBooleanSchema,
15551
+ /** Compute instance of the latest attempt's `step_started`. */
15552
+ computeInstanceId: NullableStringSchema
15543
15553
  });
15544
15554
  object({
15545
15555
  runId: string$2(),
@@ -15556,6 +15566,8 @@ object({
15556
15566
  region: NullableStringSchema,
15557
15567
  vercelId: NullableStringSchema,
15558
15568
  requestId: NullableStringSchema,
15569
+ /** Compute instance that wrote the event. See CreateEventParams. */
15570
+ computeInstanceId: NullableStringSchema,
15559
15571
  resumeAt: NullableDateSchema,
15560
15572
  retryAfter: NullableDateSchema,
15561
15573
  errorCode: NullableStringSchema,
@@ -15612,7 +15624,50 @@ const RunInputSchema = object({
15612
15624
  * `start()` option so resilient run creation validates the same way as
15613
15625
  * the original `run_created` attempt.
15614
15626
  */
15615
- allowReservedAttributes: literal(true).optional()
15627
+ allowReservedAttributes: literal(true).optional(),
15628
+ /**
15629
+ * The environment the creating client's writes are attributed to, as
15630
+ * reported by {@link World.getEnvironment} at `start()` time (on Vercel:
15631
+ * `'production' | 'preview' | 'development'`).
15632
+ *
15633
+ * This exists so the resilient-start path can be checked for a tenant
15634
+ * mismatch. `start()` writes `run_created` under the caller's own
15635
+ * credentials while pinning the queue message to a deployment, and those
15636
+ * two can disagree: if the message is consumed by a deployment in a
15637
+ * DIFFERENT environment, that consumer's `run_started` re-creates the run
15638
+ * under ITS tenant, so the same client-minted `wrun_` id ends up existing
15639
+ * in two environments — one stuck pending forever, the other executing.
15640
+ * Carrying the creator's environment lets the consumer compare it against
15641
+ * its own and refuse the delivery instead of forking the run.
15642
+ *
15643
+ * Absent for worlds with no environment dimension (local, Postgres), and
15644
+ * for older SDKs — consumers must treat it as advisory and skip the check
15645
+ * when it is missing.
15646
+ */
15647
+ environment: string$2().optional()
15648
+ });
15649
+ const HookResumeInputSchema = object({
15650
+ /** Stable idempotency key minted once per `resumeHook()` call. */
15651
+ resumeId: string$2(),
15652
+ /** The hook being resumed. */
15653
+ hookId: string$2(),
15654
+ /**
15655
+ * The hook's token, written into the `hook_received` event's `eventData` so
15656
+ * the consumer's re-ensured event carries the same token the producer would
15657
+ * — replay validates `eventData.token` against the `createHook` token.
15658
+ */
15659
+ token: string$2(),
15660
+ /** The serialized resume payload, reused verbatim from the direct write. */
15661
+ payload: unknown$1(),
15662
+ /**
15663
+ * Content digest of `payload`, computed once by the producer over the
15664
+ * serialized bytes and forwarded verbatim on both the direct `events.create`
15665
+ * and this queue message. The consumer forwards it back to the server so both
15666
+ * writers of the same `resumeId` record an identical digest on the
15667
+ * `(runId, resumeId)` constraint — required because the v4 payload ref is not
15668
+ * content-stable server-side.
15669
+ */
15670
+ payloadDigest: string$2()
15616
15671
  });
15617
15672
  const WorkflowInvokePayloadSchema = object({
15618
15673
  runId: string$2(),
@@ -15623,6 +15678,14 @@ const WorkflowInvokePayloadSchema = object({
15623
15678
  eventId: string$2(),
15624
15679
  count: number$3().int().positive()
15625
15680
  }).optional(),
15681
+ /**
15682
+ * Re-invocations so far in this chain of stale-snapshot (precondition)
15683
+ * rejections. Counted on the message because the in-process restart budget
15684
+ * lives in the invocation closure and the queue's delivery count resets on
15685
+ * every fresh enqueue, so without this a permanently fenced run would cycle
15686
+ * forever instead of failing.
15687
+ */
15688
+ preconditionReinvocations: number$3().int().positive().optional(),
15626
15689
  /** Number of times this message has been re-enqueued due to server errors (5xx) */
15627
15690
  serverErrorRetryCount: number$3().int().optional(),
15628
15691
  /** Step ID for inline step execution in combined handler. If provided, the flow execution
@@ -15631,7 +15694,13 @@ const WorkflowInvokePayloadSchema = object({
15631
15694
  /** Step name, sent alongside stepId to avoid loading the event log just to resolve the name. */
15632
15695
  stepName: string$2().optional(),
15633
15696
  /** Run creation data, only present on the first queue delivery from start() */
15634
- runInput: RunInputSchema.optional()
15697
+ runInput: RunInputSchema.optional(),
15698
+ /**
15699
+ * Lazy hook resume data, only present when `resumeHook()` takes the parallel
15700
+ * fast path. A consumer that understands this field idempotently ensures the
15701
+ * `hook_received` event exists (keyed by `resumeId`) before replaying.
15702
+ */
15703
+ hookInput: HookResumeInputSchema.optional()
15635
15704
  });
15636
15705
  const HealthCheckPayloadSchema = object({
15637
15706
  __healthCheck: literal(true),
@@ -15664,7 +15733,23 @@ const HookResumeContextSchema = object({
15664
15733
  // the run or fetching its symmetric key. Absent on runs created before
15665
15734
  // sealed envelopes and on projects with encryption disabled, where the
15666
15735
  // resume falls back to the symmetric per-run key.
15667
- encryptionPublicKey: string$2().optional()
15736
+ encryptionPublicKey: string$2().optional(),
15737
+ // Feature marker: the version of the lazy-hook-resume consumer protocol the
15738
+ // run's creating deployment supports. Present (>= 1) means that deployment's
15739
+ // `@workflow/core` re-ensures the `hook_received` event from the queue
15740
+ // message's `hookInput` on replay, so `resumeHook()`'s parallel fast path is
15741
+ // safe to use. Because a run is pinned to its creating deployment, this
15742
+ // marker is a reliable per-run attestation — unlike inferring support from a
15743
+ // version compare against a predicted release cutoff. Absent on runs created
15744
+ // before the marker existed (fall back to the sequential path).
15745
+ hookResumeInputVersion: number$3().optional()
15746
+ });
15747
+ const HookResumeCapabilitiesSchema = object({
15748
+ // Present (>= HOOK_RESUME_DEDUP_VERSION) when the live backend enforces the
15749
+ // `(runId, resumeId)` dedup constraint AND no server-side kill switch is
15750
+ // active. Absent against an older/rolled-back server or when the kill switch
15751
+ // is engaged.
15752
+ hookResumeDedupVersion: number$3()
15668
15753
  });
15669
15754
  object({
15670
15755
  runId: string$2(),
@@ -15682,7 +15767,15 @@ object({
15682
15767
  // Present when the server stored it (new hooks) or synthesized it from the
15683
15768
  // run (old hooks). Absent only against an old server, where the resume path
15684
15769
  // falls back to `runs.get`.
15685
- resumeContext: HookResumeContextSchema.optional()
15770
+ resumeContext: HookResumeContextSchema.optional(),
15771
+ // Backend dedup capability, computed FRESH by the server on every by-token
15772
+ // lookup — RESPONSE-ONLY and TRANSIENT. Never persisted on the hook entity
15773
+ // and never part of `resumeContext`, so a server rollback or kill switch
15774
+ // takes effect on the very next lookup (the field simply stops appearing).
15775
+ // `resumeHook()` gates its parallel fast path on this being present and
15776
+ // current. Absent against an older/rolled-back server or when the kill switch
15777
+ // is active.
15778
+ resumeCapabilities: HookResumeCapabilitiesSchema.optional()
15686
15779
  });
15687
15780
  const zodJsonSchema = lazy(() => {
15688
15781
  return union([
@@ -15748,10 +15841,55 @@ function decode_legacy(base642) {
15748
15841
  const native = typeof Uint8Array.fromBase64 === "function";
15749
15842
  const buffer = typeof process === "object" && ((_a2 = process.versions) == null ? void 0 : _a2.node) !== void 0;
15750
15843
  const decode64 = native ? decode_native : buffer ? decode_buffer : decode_legacy;
15751
- function parse$3(serialized, revivers) {
15844
+ function merge_operations(defaults, overrides) {
15845
+ return defaults;
15846
+ }
15847
+ const parse_operations = {
15848
+ fromPrimitive: (primitive) => primitive,
15849
+ fromISOString: (iso) => new Date(iso),
15850
+ fromStringValue: (tag, text2) => {
15851
+ if (tag === "URL") return new URL(text2);
15852
+ if (tag === "URLSearchParams") return new URLSearchParams(text2);
15853
+ return Temporal[tag.slice(9)].from(text2);
15854
+ },
15855
+ fromArrayBuffer: (buffer2) => buffer2,
15856
+ fromRegExpInfo: (source, flags) => new RegExp(source, flags),
15857
+ fromViewInfo: (tag, buffer2, byteOffset, length) => {
15858
+ const Constructor = (
15859
+ /** @type {any} */
15860
+ globalThis[tag]
15861
+ );
15862
+ return byteOffset !== void 0 ? new Constructor(buffer2, byteOffset, length) : new Constructor(buffer2);
15863
+ },
15864
+ box: (value) => Object(value),
15865
+ createArray: (length) => new Array(length),
15866
+ createSparseArray: (length) => {
15867
+ const array2 = [];
15868
+ array2[MAX_ARRAY_INDEX] = void 0;
15869
+ delete array2[MAX_ARRAY_INDEX];
15870
+ array2.length = length;
15871
+ return array2;
15872
+ },
15873
+ createObject: () => ({}),
15874
+ createNullPrototypeObject: () => /* @__PURE__ */ Object.create(null),
15875
+ createSet: () => /* @__PURE__ */ new Set(),
15876
+ createMap: () => /* @__PURE__ */ new Map(),
15877
+ set: (target2, key, value) => {
15878
+ target2[key] = value;
15879
+ },
15880
+ addValue: (set, value) => {
15881
+ set.add(value);
15882
+ },
15883
+ addEntry: (map2, key, value) => {
15884
+ map2.set(key, value);
15885
+ }
15886
+ };
15887
+ const default_parse_operations = Object.freeze(parse_operations);
15888
+ function parse$3(serialized, revivers, options) {
15752
15889
  return unflatten(JSON.parse(serialized), revivers);
15753
15890
  }
15754
- function unflatten(parsed, revivers) {
15891
+ function unflatten(parsed, revivers, options) {
15892
+ const ops = merge_operations(default_parse_operations);
15755
15893
  if (typeof parsed === "number") return hydrate(parsed, true);
15756
15894
  if (!Array.isArray(parsed) || parsed.length === 0) {
15757
15895
  throw new Error("Invalid input");
@@ -15763,18 +15901,18 @@ function unflatten(parsed, revivers) {
15763
15901
  const hydrated = Array(values.length);
15764
15902
  let hydrating = null;
15765
15903
  function hydrate(index2, standalone = false) {
15766
- if (index2 === UNDEFINED) return void 0;
15767
- if (index2 === NAN) return NaN;
15768
- if (index2 === POSITIVE_INFINITY) return Infinity;
15769
- if (index2 === NEGATIVE_INFINITY) return -Infinity;
15770
- if (index2 === NEGATIVE_ZERO) return -0;
15904
+ if (index2 === UNDEFINED) return ops.fromPrimitive(void 0);
15905
+ if (index2 === NAN) return ops.fromPrimitive(NaN);
15906
+ if (index2 === POSITIVE_INFINITY) return ops.fromPrimitive(Infinity);
15907
+ if (index2 === NEGATIVE_INFINITY) return ops.fromPrimitive(-Infinity);
15908
+ if (index2 === NEGATIVE_ZERO) return ops.fromPrimitive(-0);
15771
15909
  if (standalone || typeof index2 !== "number") {
15772
15910
  throw new Error(`Invalid input`);
15773
15911
  }
15774
15912
  if (index2 in hydrated) return hydrated[index2];
15775
15913
  const value = values[index2];
15776
15914
  if (!value || typeof value !== "object") {
15777
- hydrated[index2] = value;
15915
+ hydrated[index2] = ops.fromPrimitive(value);
15778
15916
  } else if (Array.isArray(value)) {
15779
15917
  if (typeof value[0] === "string") {
15780
15918
  const type = value[0];
@@ -15784,6 +15922,9 @@ function unflatten(parsed, revivers) {
15784
15922
  if (typeof i !== "number") {
15785
15923
  i = values.push(value[1]) - 1;
15786
15924
  }
15925
+ if (Object.hasOwn(hydrated, i)) {
15926
+ return hydrated[index2] = reviver(hydrated[i]);
15927
+ }
15787
15928
  hydrating ?? (hydrating = /* @__PURE__ */ new Set());
15788
15929
  if (hydrating.has(i)) {
15789
15930
  throw new Error("Invalid circular reference");
@@ -15795,44 +15936,44 @@ function unflatten(parsed, revivers) {
15795
15936
  }
15796
15937
  switch (type) {
15797
15938
  case "Date":
15798
- hydrated[index2] = new Date(value[1]);
15939
+ hydrated[index2] = ops.fromISOString(value[1]);
15799
15940
  break;
15800
15941
  case "Set":
15801
- const set = /* @__PURE__ */ new Set();
15942
+ const set = ops.createSet();
15802
15943
  hydrated[index2] = set;
15803
15944
  for (let i = 1; i < value.length; i += 1) {
15804
- set.add(hydrate(value[i]));
15945
+ ops.addValue(set, hydrate(value[i]));
15805
15946
  }
15806
15947
  break;
15807
15948
  case "Map":
15808
- const map2 = /* @__PURE__ */ new Map();
15949
+ const map2 = ops.createMap();
15809
15950
  hydrated[index2] = map2;
15810
15951
  for (let i = 1; i < value.length; i += 2) {
15811
- map2.set(hydrate(value[i]), hydrate(value[i + 1]));
15952
+ ops.addEntry(map2, hydrate(value[i]), hydrate(value[i + 1]));
15812
15953
  }
15813
15954
  break;
15814
15955
  case "RegExp":
15815
- hydrated[index2] = new RegExp(value[1], value[2]);
15956
+ hydrated[index2] = ops.fromRegExpInfo(value[1], value[2]);
15816
15957
  break;
15817
15958
  case "Object": {
15818
15959
  const wrapped_index = value[1];
15819
15960
  if (typeof values[wrapped_index] === "object" && values[wrapped_index][0] !== "BigInt") {
15820
15961
  throw new Error("Invalid input");
15821
15962
  }
15822
- hydrated[index2] = Object(hydrate(wrapped_index));
15963
+ hydrated[index2] = ops.box(hydrate(wrapped_index));
15823
15964
  break;
15824
15965
  }
15825
15966
  case "BigInt":
15826
- hydrated[index2] = BigInt(value[1]);
15967
+ hydrated[index2] = ops.fromPrimitive(BigInt(value[1]));
15827
15968
  break;
15828
15969
  case "null":
15829
- const obj = /* @__PURE__ */ Object.create(null);
15970
+ const obj = ops.createNullPrototypeObject();
15830
15971
  hydrated[index2] = obj;
15831
15972
  for (let i = 1; i < value.length; i += 2) {
15832
15973
  if (value[i] === "__proto__") {
15833
15974
  throw new Error("Cannot parse an object with a `__proto__` property");
15834
15975
  }
15835
- obj[value[i]] = hydrate(value[i + 1]);
15976
+ ops.set(obj, value[i], hydrate(value[i + 1]));
15836
15977
  }
15837
15978
  break;
15838
15979
  case "Int8Array":
@@ -15851,9 +15992,8 @@ function unflatten(parsed, revivers) {
15851
15992
  if (values[value[1]][0] !== "ArrayBuffer") {
15852
15993
  throw new Error("Invalid data");
15853
15994
  }
15854
- const TypedArrayConstructor = globalThis[type];
15855
15995
  const buffer2 = hydrate(value[1]);
15856
- hydrated[index2] = value[2] !== void 0 ? new TypedArrayConstructor(buffer2, value[2], value[3]) : new TypedArrayConstructor(buffer2);
15996
+ hydrated[index2] = ops.fromViewInfo(type, buffer2, value[2], value[3]);
15857
15997
  break;
15858
15998
  }
15859
15999
  case "ArrayBuffer": {
@@ -15861,10 +16001,11 @@ function unflatten(parsed, revivers) {
15861
16001
  if (typeof base642 !== "string") {
15862
16002
  throw new Error("Invalid ArrayBuffer encoding");
15863
16003
  }
15864
- const arraybuffer = decode64(base642);
15865
- hydrated[index2] = arraybuffer;
16004
+ hydrated[index2] = ops.fromArrayBuffer(decode64(base642));
15866
16005
  break;
15867
16006
  }
16007
+ case "URL":
16008
+ case "URLSearchParams":
15868
16009
  case "Temporal.Duration":
15869
16010
  case "Temporal.Instant":
15870
16011
  case "Temporal.PlainDate":
@@ -15873,18 +16014,7 @@ function unflatten(parsed, revivers) {
15873
16014
  case "Temporal.PlainMonthDay":
15874
16015
  case "Temporal.PlainYearMonth":
15875
16016
  case "Temporal.ZonedDateTime": {
15876
- const temporalName = type.slice(9);
15877
- hydrated[index2] = Temporal[temporalName].from(value[1]);
15878
- break;
15879
- }
15880
- case "URL": {
15881
- const url = new URL(value[1]);
15882
- hydrated[index2] = url;
15883
- break;
15884
- }
15885
- case "URLSearchParams": {
15886
- const url = new URLSearchParams(value[1]);
15887
- hydrated[index2] = url;
16017
+ hydrated[index2] = ops.fromStringValue(type, value[1]);
15888
16018
  break;
15889
16019
  }
15890
16020
  default:
@@ -15895,36 +16025,32 @@ function unflatten(parsed, revivers) {
15895
16025
  if (!is_valid_array_len(len)) {
15896
16026
  throw new Error("Invalid input");
15897
16027
  }
15898
- const array2 = [];
16028
+ const array2 = ops.createSparseArray(len);
15899
16029
  hydrated[index2] = array2;
15900
- array2[MAX_ARRAY_INDEX] = void 0;
15901
- delete array2[MAX_ARRAY_INDEX];
15902
16030
  for (let i = 2; i < value.length; i += 2) {
15903
16031
  const idx = value[i];
15904
16032
  if (!is_valid_array_index(idx) || idx >= len) {
15905
16033
  throw new Error("Invalid input");
15906
16034
  }
15907
- array2[idx] = hydrate(value[i + 1]);
16035
+ ops.set(array2, idx, hydrate(value[i + 1]));
15908
16036
  }
15909
- array2.length = len;
15910
16037
  } else {
15911
- const array2 = new Array(value.length);
16038
+ const array2 = ops.createArray(value.length);
15912
16039
  hydrated[index2] = array2;
15913
16040
  for (let i = 0; i < value.length; i += 1) {
15914
16041
  const n = value[i];
15915
16042
  if (n === HOLE) continue;
15916
- array2[i] = hydrate(n);
16043
+ ops.set(array2, i, hydrate(n));
15917
16044
  }
15918
16045
  }
15919
16046
  } else {
15920
- const object2 = {};
16047
+ const object2 = ops.createObject();
15921
16048
  hydrated[index2] = object2;
15922
16049
  for (const key of Object.keys(value)) {
15923
16050
  if (key === "__proto__") {
15924
16051
  throw new Error("Cannot parse an object with a `__proto__` property");
15925
16052
  }
15926
- const n = value[key];
15927
- object2[key] = hydrate(n);
16053
+ ops.set(object2, key, hydrate(value[key]));
15928
16054
  }
15929
16055
  }
15930
16056
  return hydrated[index2];
@@ -16081,7 +16207,9 @@ function appendFramedDetails(title, details) {
16081
16207
  const head = isLast ? "╰▶ " : "├▶ ";
16082
16208
  const cont = isLast ? " " : "│ ";
16083
16209
  const text2 = `${detail.label}: ${detail.value}`;
16084
- text2.split("\n").forEach((line, i) => lines.push(`${i === 0 ? head : cont}${line}`));
16210
+ text2.split("\n").forEach((line, i) => {
16211
+ lines.push(`${i === 0 ? head : cont}${line}`);
16212
+ });
16085
16213
  });
16086
16214
  return lines.join("\n");
16087
16215
  }
@@ -17265,7 +17393,7 @@ async function hydrateResourceIOAsync(resource, key) {
17265
17393
  return { hydrateDataWithKey: hydrateDataWithKey3, deriveRunPayloadKeys: deriveRunPayloadKeys3 };
17266
17394
  }, true ? void 0 : void 0);
17267
17395
  const { ensureZstdDecoderRegistered } = await __vitePreload(async () => {
17268
- const { ensureZstdDecoderRegistered: ensureZstdDecoderRegistered2 } = await import("./zstd-browser-decoder-B15ptsR4.js");
17396
+ const { ensureZstdDecoderRegistered: ensureZstdDecoderRegistered2 } = await import("./zstd-browser-decoder-Dw3HhTgO.js");
17269
17397
  return { ensureZstdDecoderRegistered: ensureZstdDecoderRegistered2 };
17270
17398
  }, true ? __vite__mapDeps([0,1]) : void 0);
17271
17399
  ensureZstdDecoderRegistered();
@@ -17737,7 +17865,7 @@ function getDefaultSwipeDirections(position2) {
17737
17865
  }
17738
17866
  const Toast = (props) => {
17739
17867
  var _toast_classNames, _toast_classNames1, _toast_classNames2, _toast_classNames3, _toast_classNames4, _toast_classNames5, _toast_classNames6, _toast_classNames7, _toast_classNames8;
17740
- const { invert: ToasterInvert, toast: toast2, unstyled, interacting, setHeights, visibleToasts, heights, index: index2, toasts, expanded: expanded2, removeToast, defaultRichColors, closeButton: closeButtonFromToaster, style: style2, cancelButtonStyle, actionButtonStyle, className = "", descriptionClassName = "", duration: durationFromToaster, position: position2, gap, expandByDefault, classNames, icons, closeButtonAriaLabel = "Close toast" } = props;
17868
+ const { invert: ToasterInvert, toast: toast2, unstyled, interacting, setHeights, visibleToasts, heights, index: index2, toasts, expanded, removeToast, defaultRichColors, closeButton: closeButtonFromToaster, style: style2, cancelButtonStyle, actionButtonStyle, className = "", descriptionClassName = "", duration: durationFromToaster, position: position2, gap, expandByDefault, classNames, icons, closeButtonAriaLabel = "Close toast" } = props;
17741
17869
  const [swipeDirection, setSwipeDirection] = ReactExports.useState(null);
17742
17870
  const [swipeOutDirection, setSwipeOutDirection] = ReactExports.useState(null);
17743
17871
  const [mounted, setMounted] = ReactExports.useState(false);
@@ -17888,14 +18016,14 @@ const Toast = (props) => {
17888
18016
  deleteToast();
17889
18017
  }, remainingTime.current);
17890
18018
  };
17891
- if (expanded2 || interacting || isDocumentHidden) {
18019
+ if (expanded || interacting || isDocumentHidden) {
17892
18020
  pauseTimer();
17893
18021
  } else {
17894
18022
  startTimer();
17895
18023
  }
17896
18024
  return () => clearTimeout(timeoutId);
17897
18025
  }, [
17898
- expanded2,
18026
+ expanded,
17899
18027
  interacting,
17900
18028
  toast2,
17901
18029
  toastType,
@@ -17949,7 +18077,7 @@ const Toast = (props) => {
17949
18077
  "data-invert": invert,
17950
18078
  "data-swipe-out": swipeOut,
17951
18079
  "data-swipe-direction": swipeOutDirection,
17952
- "data-expanded": Boolean(expanded2 || expandByDefault && mounted),
18080
+ "data-expanded": Boolean(expanded || expandByDefault && mounted),
17953
18081
  "data-testid": toast2.testId,
17954
18082
  style: {
17955
18083
  "--index": index2,
@@ -18171,7 +18299,7 @@ const Toaster = /* @__PURE__ */ ReactExports.forwardRef(function Toaster2(props,
18171
18299
  position2
18172
18300
  ]);
18173
18301
  const [heights, setHeights] = ReactExports.useState([]);
18174
- const [expanded2, setExpanded] = ReactExports.useState(false);
18302
+ const [expanded, setExpanded] = ReactExports.useState(false);
18175
18303
  const [interacting, setInteracting] = ReactExports.useState(false);
18176
18304
  const [actualTheme, setActualTheme] = ReactExports.useState(theme !== "system" ? theme : typeof window !== "undefined" ? window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : "light");
18177
18305
  const listRef = ReactExports.useRef(null);
@@ -18393,7 +18521,7 @@ const Toaster = /* @__PURE__ */ ReactExports.forwardRef(function Toaster2(props,
18393
18521
  setHeights,
18394
18522
  expandByDefault: expand,
18395
18523
  gap,
18396
- expanded: expanded2,
18524
+ expanded,
18397
18525
  swipeDirections: props.swipeDirections
18398
18526
  });
18399
18527
  }));
@@ -18629,8 +18757,8 @@ const buttonVariants$1 = cva([
18629
18757
  ghost: "[--themed-bg:_transparent] [--themed-fg:_var(--ds-gray-1000)] [--themed-hover-bg:_var(--ds-gray-alpha-100)]"
18630
18758
  },
18631
18759
  size: {
18632
- default: "h-10 px-4 text-[14px]",
18633
- sm: "h-8 px-3 text-[14px]",
18760
+ default: "h-10 px-4 text-button-14",
18761
+ sm: "h-8 px-3 text-button-14",
18634
18762
  xs: "h-6 px-1.5 py-0.5 text-button-12 rounded-[4px]",
18635
18763
  icon: "h-8 w-8"
18636
18764
  }
@@ -18752,7 +18880,7 @@ const JSON_VIEW_STYLES = `
18752
18880
  .${CLS.collapsedContent}::after { content: '...'; }
18753
18881
  `;
18754
18882
  const KEYFRAMES = `@keyframes wf-spinner-fade{0%{opacity:1}100%{opacity:.15}}`;
18755
- function Spinner({ size: size2 = 14, color: color5 }) {
18883
+ function Spinner({ size: size2 = 14, color: color2 }) {
18756
18884
  const config2 = size2 <= 12 ? {
18757
18885
  angle: 45,
18758
18886
  delays: [-875, -750, -625, -500, -375, -250, -125, 0],
@@ -18799,7 +18927,7 @@ function Spinner({ size: size2 = 14, color: color5 }) {
18799
18927
  marginLeft: -config2.lineW / 2,
18800
18928
  marginTop: -config2.lineH / 2,
18801
18929
  borderRadius: 1,
18802
- backgroundColor: color5 ?? "var(--ds-gray-700)",
18930
+ backgroundColor: color2 ?? "var(--ds-gray-700)",
18803
18931
  transform: `rotate(${i * config2.angle}deg) translate(${size2 * 0.36}px)`,
18804
18932
  animation: `wf-spinner-fade ${config2.duration}ms linear infinite`,
18805
18933
  animationDelay: `${delay}ms`
@@ -18907,8 +19035,8 @@ function DecodedBytesChunk({ decodedText, source }) {
18907
19035
  }, onClick: () => setSelectedView("bytes"), "aria-pressed": selectedView === "bytes", "aria-label": "Show raw bytes summary", children: "Bytes" })] }) })] });
18908
19036
  }
18909
19037
  function DecodedBytesInspector({ decodedText, source }) {
18910
- const [expanded2, setExpanded] = reactExports.useState(false);
18911
- return jsxRuntimeExports.jsxs("div", { className: "font-mono", children: [jsxRuntimeExports.jsxs("button", { type: "button", className: "flex max-w-full items-start gap-1 text-left", style: { color: "var(--ds-gray-1000)" }, onClick: () => setExpanded((value) => !value), title: `${source.type} decoded as ${source.encoding.toUpperCase()} text`, children: [jsxRuntimeExports.jsx("span", { className: "select-none", style: { color: "var(--ds-gray-700)" }, children: expanded2 ? "▼" : "▶" }), jsxRuntimeExports.jsx("span", { className: "min-w-0 break-words", children: source.rawSummary })] }), expanded2 && jsxRuntimeExports.jsxs("div", { className: "mt-1 pl-5", children: [jsxRuntimeExports.jsx("span", { style: { color: "var(--ds-gray-700)" }, children: "decoded: " }), jsxRuntimeExports.jsx("span", { className: "whitespace-pre-wrap break-words", style: { color: "var(--ds-green-900)" }, children: JSON.stringify(decodedText) })] })] });
19038
+ const [expanded, setExpanded] = reactExports.useState(false);
19039
+ return jsxRuntimeExports.jsxs("div", { className: "font-mono", children: [jsxRuntimeExports.jsxs("button", { type: "button", className: "flex max-w-full items-start gap-1 text-left", style: { color: "var(--ds-gray-1000)" }, onClick: () => setExpanded((value) => !value), title: `${source.type} decoded as ${source.encoding.toUpperCase()} text`, children: [jsxRuntimeExports.jsx("span", { className: "select-none", style: { color: "var(--ds-gray-700)" }, children: expanded ? "▼" : "▶" }), jsxRuntimeExports.jsx("span", { className: "min-w-0 break-words", children: source.rawSummary })] }), expanded && jsxRuntimeExports.jsxs("div", { className: "mt-1 pl-5", children: [jsxRuntimeExports.jsx("span", { style: { color: "var(--ds-gray-700)" }, children: "decoded: " }), jsxRuntimeExports.jsx("span", { className: "whitespace-pre-wrap break-words", style: { color: "var(--ds-green-900)" }, children: JSON.stringify(decodedText) })] })] });
18912
19040
  }
18913
19041
  function BytesDisplayValue({ display }) {
18914
19042
  if (display.decodedFrom) {
@@ -19026,7 +19154,7 @@ function moveExpanderFocus(outerRef, direction) {
19026
19154
  }
19027
19155
  function ExpandableContainer({ field, entries, open: open2, close, prefix, ctx, isLast }) {
19028
19156
  const { level, shouldExpand, outerRef } = ctx;
19029
- const [expanded2, setExpanded] = reactExports.useState(() => shouldExpand(level));
19157
+ const [expanded, setExpanded] = reactExports.useState(() => shouldExpand(level));
19030
19158
  const rowRef = reactExports.useRef(null);
19031
19159
  const contentsId = reactExports.useId();
19032
19160
  if (entries.length === 0) {
@@ -19059,7 +19187,7 @@ function ExpandableContainer({ field, entries, open: open2, close, prefix, ctx,
19059
19187
  }
19060
19188
  };
19061
19189
  const lastIndex = entries.length - 1;
19062
- return jsxRuntimeExports.jsxs("div", { className: CLS.child, role: "treeitem", "aria-expanded": expanded2, "aria-controls": expanded2 ? contentsId : void 0, "data-json-expander": true, ref: rowRef, tabIndex: level === 0 ? 0 : -1, onClick, onKeyDown, children: [jsxRuntimeExports.jsx("span", { className: expanded2 ? CLS.collapseIcon : CLS.expandIcon, "aria-hidden": "true" }), field !== void 0 && jsxRuntimeExports.jsx("span", { className: CLS.clickableLabel, children: `${formatField(field)}:` }), prefix ? jsxRuntimeExports.jsx("span", { className: CLS.className, children: prefix }) : null, jsxRuntimeExports.jsx("span", { className: CLS.punctuation, children: open2 }), expanded2 ? jsxRuntimeExports.jsx("ul", { id: contentsId, className: CLS.childFields, role: "group", children: entries.map(([childField, childValue], index2) => jsxRuntimeExports.jsx(DataRender, { field: childField, value: childValue, isLast: index2 === lastIndex, ctx: { ...ctx, level: level + 1 } }, childField ?? index2)) }) : jsxRuntimeExports.jsx("span", { className: CLS.collapsedContent, "aria-hidden": "true" }), jsxRuntimeExports.jsx("span", { className: CLS.punctuation, children: close }), jsxRuntimeExports.jsx(Comma, { isLast })] });
19190
+ return jsxRuntimeExports.jsxs("div", { className: CLS.child, role: "treeitem", "aria-expanded": expanded, "aria-controls": expanded ? contentsId : void 0, "data-json-expander": true, ref: rowRef, tabIndex: level === 0 ? 0 : -1, onClick, onKeyDown, children: [jsxRuntimeExports.jsx("span", { className: expanded ? CLS.collapseIcon : CLS.expandIcon, "aria-hidden": "true" }), field !== void 0 && jsxRuntimeExports.jsx("span", { className: CLS.clickableLabel, children: `${formatField(field)}:` }), prefix ? jsxRuntimeExports.jsx("span", { className: CLS.className, children: prefix }) : null, jsxRuntimeExports.jsx("span", { className: CLS.punctuation, children: open2 }), expanded ? jsxRuntimeExports.jsx("ul", { id: contentsId, className: CLS.childFields, role: "group", children: entries.map(([childField, childValue], index2) => jsxRuntimeExports.jsx(DataRender, { field: childField, value: childValue, isLast: index2 === lastIndex, ctx: { ...ctx, level: level + 1 } }, childField ?? index2)) }) : jsxRuntimeExports.jsx("span", { className: CLS.collapsedContent, "aria-hidden": "true" }), jsxRuntimeExports.jsx("span", { className: CLS.punctuation, children: close }), jsxRuntimeExports.jsx(Comma, { isLast })] });
19063
19191
  }
19064
19192
  function DataRender({ field, value, isLast, ctx }) {
19065
19193
  if (isBytesDisplay(value)) {
@@ -19995,7 +20123,7 @@ function ContextCardTrigger({ content: content2, children: children2, side = "ri
19995
20123
  opacity: Number(visible)
19996
20124
  }, children: content2 }) }, id), portalRef.current) : null] });
19997
20125
  }
19998
- function Skeleton$1({ className, style: style2, ...props }) {
20126
+ function Skeleton({ className, style: style2, ...props }) {
19999
20127
  return jsxRuntimeExports.jsx("div", { ...props, className: cn$4("rounded-md", className), style: { backgroundColor: "var(--ds-gray-200)", ...style2 } });
20000
20128
  }
20001
20129
  const TIME_UNITS = [
@@ -20081,12 +20209,12 @@ function ZoneDateTimeRow({ date: date2, zone }) {
20081
20209
  minute: "2-digit",
20082
20210
  second: "2-digit"
20083
20211
  });
20084
- return jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-3", children: [jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1.5", children: [jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center h-4 px-1.5 bg-gray-200 rounded-xs", children: jsxRuntimeExports.jsx("span", { className: "text-[12px] font-mono text-gray-900", children: formattedZone }) }), jsxRuntimeExports.jsx("span", { className: "text-[13px] text-gray-1000", children: formattedDate })] }), jsxRuntimeExports.jsx("span", { className: "tabular-nums text-[12px] font-mono text-gray-900", children: formattedTime })] });
20212
+ return jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-3", children: [jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1.5", children: [jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center h-4 px-1.5 bg-gray-200 rounded-xs", children: jsxRuntimeExports.jsx("span", { className: "text-label-12-mono text-gray-900", children: formattedZone }) }), jsxRuntimeExports.jsx("span", { className: "text-label-13 text-gray-1000", children: formattedDate })] }), jsxRuntimeExports.jsx("span", { className: "tabular-nums text-label-12-mono text-gray-900", children: formattedTime })] });
20085
20213
  }
20086
20214
  function RelativeTimeContextCardContent({ date: date2 }) {
20087
20215
  const localTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
20088
20216
  const timeAgo = useTimeAgo(date2);
20089
- return jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-3 min-w-[300px]", children: [jsxRuntimeExports.jsx("div", { className: "flex flex-col gap-3", children: jsxRuntimeExports.jsx("span", { className: "tabular-nums text-[13px] text-gray-900", children: timeAgo }) }), jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2", children: [jsxRuntimeExports.jsx(ZoneDateTimeRow, { date: date2, zone: "UTC" }), jsxRuntimeExports.jsx(ZoneDateTimeRow, { date: date2, zone: localTimezone })] })] });
20217
+ return jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-3 min-w-[300px]", children: [jsxRuntimeExports.jsx("div", { className: "flex flex-col gap-3", children: jsxRuntimeExports.jsx("span", { className: "tabular-nums text-label-13 text-gray-900", children: timeAgo }) }), jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2", children: [jsxRuntimeExports.jsx(ZoneDateTimeRow, { date: date2, zone: "UTC" }), jsxRuntimeExports.jsx(ZoneDateTimeRow, { date: date2, zone: localTimezone })] })] });
20090
20218
  }
20091
20219
  function DefaultTimeText({ date: date2 }) {
20092
20220
  const shortTimeAgo = useShortTimeAgo(date2);
@@ -20274,7 +20402,7 @@ function toResult$1(value) {
20274
20402
  }
20275
20403
  return value === null || value === void 0 ? empty$2 : [value];
20276
20404
  }
20277
- function visit(tree, testOrVisitor, visitorOrReverse, maybeReverse) {
20405
+ function visit$1(tree, testOrVisitor, visitorOrReverse, maybeReverse) {
20278
20406
  let reverse;
20279
20407
  let test;
20280
20408
  let visitor;
@@ -20308,7 +20436,7 @@ function harden({ defaultOrigin = "", allowedLinkPrefixes = [], allowedImagePref
20308
20436
  return (tree) => {
20309
20437
  const visitor = createVisitor(defaultOrigin, allowedLinkPrefixes, allowedImagePrefixes, allowDataImages, allowedProtocols, blockedImageClass, blockedLinkClass, linkBlockPolicy, imageBlockPolicy);
20310
20438
  stripNullChildren(tree);
20311
- visit(tree, visitor);
20439
+ visit$1(tree, visitor);
20312
20440
  };
20313
20441
  }
20314
20442
  function parseUrl(url, defaultOrigin) {
@@ -20514,7 +20642,7 @@ const createVisitor = (defaultOrigin, allowedLinkPrefixes, allowedImagePrefixes,
20514
20642
  const transformedUrl = transformUrl(node2.properties.href, allowedLinkPrefixes, defaultOrigin, false, false, allowedProtocols);
20515
20643
  if (transformedUrl === null) {
20516
20644
  node2[SEEN] = true;
20517
- visit(node2, visitor);
20645
+ visit$1(node2, visitor);
20518
20646
  if (parent && typeof index2 === "number") {
20519
20647
  const result = resolveLinkBlockPolicy(node2, linkBlockPolicy, blockedLinkClass);
20520
20648
  if (result.type === "remove") {
@@ -20535,7 +20663,7 @@ const createVisitor = (defaultOrigin, allowedLinkPrefixes, allowedImagePrefixes,
20535
20663
  const transformedUrl = transformUrl(node2.properties.src, allowedImagePrefixes, defaultOrigin, allowDataImages, true, allowedProtocols);
20536
20664
  if (transformedUrl === null) {
20537
20665
  node2[SEEN] = true;
20538
- visit(node2, visitor);
20666
+ visit$1(node2, visitor);
20539
20667
  if (parent && typeof index2 === "number") {
20540
20668
  const result = resolveImageBlockPolicy(node2, imageBlockPolicy, blockedImageClass);
20541
20669
  if (result.type === "remove") {
@@ -31650,7 +31778,7 @@ function raw(tree, options) {
31650
31778
  file: state.options.file
31651
31779
  });
31652
31780
  if (state.stitches) {
31653
- visit(result, "comment", function(node2, index2, parent) {
31781
+ visit$1(result, "comment", function(node2, index2, parent) {
31654
31782
  const stitch2 = (
31655
31783
  /** @type {Stitch} */
31656
31784
  /** @type {unknown} */
@@ -32422,88 +32550,13 @@ function escapeStringRegexp(string2) {
32422
32550
  }
32423
32551
  return string2.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
32424
32552
  }
32425
- function color(d2) {
32426
- return d2;
32427
- }
32428
- const empty$1 = [];
32429
- const CONTINUE = true;
32430
- const EXIT = false;
32431
- const SKIP = "skip";
32432
- function visitParents(tree, test, visitor, reverse) {
32433
- let check;
32434
- {
32435
- check = test;
32436
- }
32437
- const is = convert(check);
32438
- const step = 1;
32439
- factory(tree, void 0, [])();
32440
- function factory(node2, index2, parents) {
32441
- const value = (
32442
- /** @type {Record<string, unknown>} */
32443
- node2 && typeof node2 === "object" ? node2 : {}
32444
- );
32445
- if (typeof value.type === "string") {
32446
- const name2 = (
32447
- // `hast`
32448
- typeof value.tagName === "string" ? value.tagName : (
32449
- // `xast`
32450
- typeof value.name === "string" ? value.name : void 0
32451
- )
32452
- );
32453
- Object.defineProperty(visit2, "name", {
32454
- value: "node (" + color(node2.type + (name2 ? "<" + name2 + ">" : "")) + ")"
32455
- });
32456
- }
32457
- return visit2;
32458
- function visit2() {
32459
- let result = empty$1;
32460
- let subresult;
32461
- let offset2;
32462
- let grandparents;
32463
- if (is(node2, index2, parents[parents.length - 1] || void 0)) {
32464
- result = toResult(visitor(node2, parents));
32465
- if (result[0] === EXIT) {
32466
- return result;
32467
- }
32468
- }
32469
- if ("children" in node2 && node2.children) {
32470
- const nodeAsParent = (
32471
- /** @type {UnistParent} */
32472
- node2
32473
- );
32474
- if (nodeAsParent.children && result[0] !== SKIP) {
32475
- offset2 = -1 + step;
32476
- grandparents = parents.concat(nodeAsParent);
32477
- while (offset2 > -1 && offset2 < nodeAsParent.children.length) {
32478
- const child = nodeAsParent.children[offset2];
32479
- subresult = factory(child, offset2, grandparents)();
32480
- if (subresult[0] === EXIT) {
32481
- return subresult;
32482
- }
32483
- offset2 = typeof subresult[1] === "number" ? subresult[1] : offset2 + step;
32484
- }
32485
- }
32486
- }
32487
- return result;
32488
- }
32489
- }
32490
- }
32491
- function toResult(value) {
32492
- if (Array.isArray(value)) {
32493
- return value;
32494
- }
32495
- if (typeof value === "number") {
32496
- return [CONTINUE, value];
32497
- }
32498
- return value === null || value === void 0 ? empty$1 : [value];
32499
- }
32500
32553
  function findAndReplace(tree, list2, options) {
32501
32554
  const settings = options || {};
32502
32555
  const ignored = convert(settings.ignore || []);
32503
32556
  const pairs = toPairs(list2);
32504
32557
  let pairIndex = -1;
32505
32558
  while (++pairIndex < pairs.length) {
32506
- visitParents(tree, "text", visitor);
32559
+ visitParents$1(tree, "text", visitor);
32507
32560
  }
32508
32561
  function visitor(node2, parents) {
32509
32562
  let index2 = -1;
@@ -33124,18 +33177,18 @@ function formatCodeAsIndented(node2, state) {
33124
33177
  );
33125
33178
  }
33126
33179
  function checkFence(state) {
33127
- const marker2 = state.options.fence || "`";
33128
- if (marker2 !== "`" && marker2 !== "~") {
33180
+ const marker = state.options.fence || "`";
33181
+ if (marker !== "`" && marker !== "~") {
33129
33182
  throw new Error(
33130
- "Cannot serialize code with `" + marker2 + "` for `options.fence`, expected `` ` `` or `~`"
33183
+ "Cannot serialize code with `" + marker + "` for `options.fence`, expected `` ` `` or `~`"
33131
33184
  );
33132
33185
  }
33133
- return marker2;
33186
+ return marker;
33134
33187
  }
33135
33188
  function code$2(node2, _2, state, info) {
33136
- const marker2 = checkFence(state);
33189
+ const marker = checkFence(state);
33137
33190
  const raw2 = node2.value || "";
33138
- const suffix = marker2 === "`" ? "GraveAccent" : "Tilde";
33191
+ const suffix = marker === "`" ? "GraveAccent" : "Tilde";
33139
33192
  if (formatCodeAsIndented(node2, state)) {
33140
33193
  const exit3 = state.enter("codeIndented");
33141
33194
  const value2 = state.indentLines(raw2, map);
@@ -33143,7 +33196,7 @@ function code$2(node2, _2, state, info) {
33143
33196
  return value2;
33144
33197
  }
33145
33198
  const tracker = state.createTracker(info);
33146
- const sequence = marker2.repeat(Math.max(longestStreak(raw2, marker2) + 1, 3));
33199
+ const sequence = marker.repeat(Math.max(longestStreak(raw2, marker) + 1, 3));
33147
33200
  const exit2 = state.enter("codeFenced");
33148
33201
  let value = tracker.move(sequence);
33149
33202
  if (node2.lang) {
@@ -33183,13 +33236,13 @@ function map(line, _2, blank) {
33183
33236
  return (blank ? "" : " ") + line;
33184
33237
  }
33185
33238
  function checkQuote(state) {
33186
- const marker2 = state.options.quote || '"';
33187
- if (marker2 !== '"' && marker2 !== "'") {
33239
+ const marker = state.options.quote || '"';
33240
+ if (marker !== '"' && marker !== "'") {
33188
33241
  throw new Error(
33189
- "Cannot serialize title with `" + marker2 + "` for `options.quote`, expected `\"`, or `'`"
33242
+ "Cannot serialize title with `" + marker + "` for `options.quote`, expected `\"`, or `'`"
33190
33243
  );
33191
33244
  }
33192
- return marker2;
33245
+ return marker;
33193
33246
  }
33194
33247
  function definition$1(node2, _2, state, info) {
33195
33248
  const quote = checkQuote(state);
@@ -33246,13 +33299,13 @@ function definition$1(node2, _2, state, info) {
33246
33299
  return value;
33247
33300
  }
33248
33301
  function checkEmphasis(state) {
33249
- const marker2 = state.options.emphasis || "*";
33250
- if (marker2 !== "*" && marker2 !== "_") {
33302
+ const marker = state.options.emphasis || "*";
33303
+ if (marker !== "*" && marker !== "_") {
33251
33304
  throw new Error(
33252
- "Cannot serialize emphasis with `" + marker2 + "` for `options.emphasis`, expected `*`, or `_`"
33305
+ "Cannot serialize emphasis with `" + marker + "` for `options.emphasis`, expected `*`, or `_`"
33253
33306
  );
33254
33307
  }
33255
- return marker2;
33308
+ return marker;
33256
33309
  }
33257
33310
  function encodeCharacterReference(code2) {
33258
33311
  return "&#x" + code2.toString(16).toUpperCase() + ";";
@@ -33265,7 +33318,7 @@ function classifyCharacter(code2) {
33265
33318
  return 2;
33266
33319
  }
33267
33320
  }
33268
- function encodeInfo(outside, inside, marker2) {
33321
+ function encodeInfo(outside, inside, marker) {
33269
33322
  const outsideKind = classifyCharacter(outside);
33270
33323
  const insideKind = classifyCharacter(inside);
33271
33324
  if (outsideKind === void 0) {
@@ -33273,7 +33326,7 @@ function encodeInfo(outside, inside, marker2) {
33273
33326
  // Letter inside:
33274
33327
  // we have to encode *both* letters for `_` as it is looser.
33275
33328
  // it already forms for `*` (and GFMs `~`).
33276
- marker2 === "_" ? { inside: true, outside: true } : { inside: false, outside: false }
33329
+ marker === "_" ? { inside: true, outside: true } : { inside: false, outside: false }
33277
33330
  ) : insideKind === 1 ? (
33278
33331
  // Whitespace inside: encode both (letter, whitespace).
33279
33332
  { inside: true, outside: true }
@@ -33307,13 +33360,13 @@ function encodeInfo(outside, inside, marker2) {
33307
33360
  }
33308
33361
  emphasis$1.peek = emphasisPeek;
33309
33362
  function emphasis$1(node2, _2, state, info) {
33310
- const marker2 = checkEmphasis(state);
33363
+ const marker = checkEmphasis(state);
33311
33364
  const exit2 = state.enter("emphasis");
33312
33365
  const tracker = state.createTracker(info);
33313
- const before = tracker.move(marker2);
33366
+ const before = tracker.move(marker);
33314
33367
  let between = tracker.move(
33315
33368
  state.containerPhrasing(node2, {
33316
- after: marker2,
33369
+ after: marker,
33317
33370
  before,
33318
33371
  ...tracker.current()
33319
33372
  })
@@ -33322,17 +33375,17 @@ function emphasis$1(node2, _2, state, info) {
33322
33375
  const open2 = encodeInfo(
33323
33376
  info.before.charCodeAt(info.before.length - 1),
33324
33377
  betweenHead,
33325
- marker2
33378
+ marker
33326
33379
  );
33327
33380
  if (open2.inside) {
33328
33381
  between = encodeCharacterReference(betweenHead) + between.slice(1);
33329
33382
  }
33330
33383
  const betweenTail = between.charCodeAt(between.length - 1);
33331
- const close = encodeInfo(info.after.charCodeAt(0), betweenTail, marker2);
33384
+ const close = encodeInfo(info.after.charCodeAt(0), betweenTail, marker);
33332
33385
  if (close.inside) {
33333
33386
  between = between.slice(0, -1) + encodeCharacterReference(betweenTail);
33334
33387
  }
33335
- const after = tracker.move(marker2);
33388
+ const after = tracker.move(marker);
33336
33389
  exit2();
33337
33390
  state.attentionEncodeSurroundingInfo = {
33338
33391
  after: close.outside,
@@ -33380,7 +33433,7 @@ function node(value) {
33380
33433
  }
33381
33434
  function formatHeadingAsSetext(node2, state) {
33382
33435
  let literalWithBreak = false;
33383
- visit(node2, function(node3) {
33436
+ visit$1(node2, function(node3) {
33384
33437
  if ("value" in node3 && /\r?\n|\r/.test(node3.value) || node3.type === "break") {
33385
33438
  literalWithBreak = true;
33386
33439
  return EXIT$1;
@@ -33687,13 +33740,13 @@ function linkReferencePeek() {
33687
33740
  return "[";
33688
33741
  }
33689
33742
  function checkBullet(state) {
33690
- const marker2 = state.options.bullet || "*";
33691
- if (marker2 !== "*" && marker2 !== "+" && marker2 !== "-") {
33743
+ const marker = state.options.bullet || "*";
33744
+ if (marker !== "*" && marker !== "+" && marker !== "-") {
33692
33745
  throw new Error(
33693
- "Cannot serialize items with `" + marker2 + "` for `options.bullet`, expected `*`, `+`, or `-`"
33746
+ "Cannot serialize items with `" + marker + "` for `options.bullet`, expected `*`, `+`, or `-`"
33694
33747
  );
33695
33748
  }
33696
- return marker2;
33749
+ return marker;
33697
33750
  }
33698
33751
  function checkBulletOther(state) {
33699
33752
  const bullet = checkBullet(state);
@@ -33714,22 +33767,22 @@ function checkBulletOther(state) {
33714
33767
  return bulletOther;
33715
33768
  }
33716
33769
  function checkBulletOrdered(state) {
33717
- const marker2 = state.options.bulletOrdered || ".";
33718
- if (marker2 !== "." && marker2 !== ")") {
33770
+ const marker = state.options.bulletOrdered || ".";
33771
+ if (marker !== "." && marker !== ")") {
33719
33772
  throw new Error(
33720
- "Cannot serialize items with `" + marker2 + "` for `options.bulletOrdered`, expected `.` or `)`"
33773
+ "Cannot serialize items with `" + marker + "` for `options.bulletOrdered`, expected `.` or `)`"
33721
33774
  );
33722
33775
  }
33723
- return marker2;
33776
+ return marker;
33724
33777
  }
33725
33778
  function checkRule(state) {
33726
- const marker2 = state.options.rule || "*";
33727
- if (marker2 !== "*" && marker2 !== "-" && marker2 !== "_") {
33779
+ const marker = state.options.rule || "*";
33780
+ if (marker !== "*" && marker !== "-" && marker !== "_") {
33728
33781
  throw new Error(
33729
- "Cannot serialize rules with `" + marker2 + "` for `options.rule`, expected `*`, `-`, or `_`"
33782
+ "Cannot serialize rules with `" + marker + "` for `options.rule`, expected `*`, `-`, or `_`"
33730
33783
  );
33731
33784
  }
33732
- return marker2;
33785
+ return marker;
33733
33786
  }
33734
33787
  function list$2(node2, parent, state, info) {
33735
33788
  const exit2 = state.enter("list");
@@ -33847,23 +33900,23 @@ function root$2(node2, _2, state, info) {
33847
33900
  return container.call(state, node2, info);
33848
33901
  }
33849
33902
  function checkStrong(state) {
33850
- const marker2 = state.options.strong || "*";
33851
- if (marker2 !== "*" && marker2 !== "_") {
33903
+ const marker = state.options.strong || "*";
33904
+ if (marker !== "*" && marker !== "_") {
33852
33905
  throw new Error(
33853
- "Cannot serialize strong with `" + marker2 + "` for `options.strong`, expected `*`, or `_`"
33906
+ "Cannot serialize strong with `" + marker + "` for `options.strong`, expected `*`, or `_`"
33854
33907
  );
33855
33908
  }
33856
- return marker2;
33909
+ return marker;
33857
33910
  }
33858
33911
  strong$1.peek = strongPeek;
33859
33912
  function strong$1(node2, _2, state, info) {
33860
- const marker2 = checkStrong(state);
33913
+ const marker = checkStrong(state);
33861
33914
  const exit2 = state.enter("strong");
33862
33915
  const tracker = state.createTracker(info);
33863
- const before = tracker.move(marker2 + marker2);
33916
+ const before = tracker.move(marker + marker);
33864
33917
  let between = tracker.move(
33865
33918
  state.containerPhrasing(node2, {
33866
- after: marker2,
33919
+ after: marker,
33867
33920
  before,
33868
33921
  ...tracker.current()
33869
33922
  })
@@ -33872,17 +33925,17 @@ function strong$1(node2, _2, state, info) {
33872
33925
  const open2 = encodeInfo(
33873
33926
  info.before.charCodeAt(info.before.length - 1),
33874
33927
  betweenHead,
33875
- marker2
33928
+ marker
33876
33929
  );
33877
33930
  if (open2.inside) {
33878
33931
  between = encodeCharacterReference(betweenHead) + between.slice(1);
33879
33932
  }
33880
33933
  const betweenTail = between.charCodeAt(between.length - 1);
33881
- const close = encodeInfo(info.after.charCodeAt(0), betweenTail, marker2);
33934
+ const close = encodeInfo(info.after.charCodeAt(0), betweenTail, marker);
33882
33935
  if (close.inside) {
33883
33936
  between = between.slice(0, -1) + encodeCharacterReference(betweenTail);
33884
33937
  }
33885
- const after = tracker.move(marker2 + marker2);
33938
+ const after = tracker.move(marker + marker);
33886
33939
  exit2();
33887
33940
  state.attentionEncodeSurroundingInfo = {
33888
33941
  after: close.outside,
@@ -34036,10 +34089,10 @@ function replace($0, $1) {
34036
34089
  }
34037
34090
  function gfmTableToMarkdown(options) {
34038
34091
  const settings = options || {};
34039
- const padding2 = settings.tableCellPadding;
34092
+ const padding = settings.tableCellPadding;
34040
34093
  const alignDelimiters = settings.tablePipeAlign;
34041
34094
  const stringLength = settings.stringLength;
34042
- const around = padding2 ? " " : "|";
34095
+ const around = padding ? " " : "|";
34043
34096
  return {
34044
34097
  unsafe: [
34045
34098
  { character: "\r", inConstruct: "tableCell" },
@@ -34092,7 +34145,7 @@ function gfmTableToMarkdown(options) {
34092
34145
  // @ts-expect-error: `markdown-table` types should support `null`.
34093
34146
  alignDelimiters,
34094
34147
  // @ts-expect-error: `markdown-table` types should support `null`.
34095
- padding: padding2,
34148
+ padding,
34096
34149
  // @ts-expect-error: `markdown-table` types should support `null`.
34097
34150
  stringLength
34098
34151
  });
@@ -34779,15 +34832,15 @@ function tokenizeAttention(effects, ok2) {
34779
34832
  const attentionMarkers2 = this.parser.constructs.attentionMarkers.null;
34780
34833
  const previous2 = this.previous;
34781
34834
  const before = classifyCharacter(previous2);
34782
- let marker2;
34835
+ let marker;
34783
34836
  return start;
34784
34837
  function start(code2) {
34785
- marker2 = code2;
34838
+ marker = code2;
34786
34839
  effects.enter("attentionSequence");
34787
34840
  return inside(code2);
34788
34841
  }
34789
34842
  function inside(code2) {
34790
- if (code2 === marker2) {
34843
+ if (code2 === marker) {
34791
34844
  effects.consume(code2);
34792
34845
  return inside;
34793
34846
  }
@@ -34795,8 +34848,8 @@ function tokenizeAttention(effects, ok2) {
34795
34848
  const after = classifyCharacter(code2);
34796
34849
  const open2 = !after || after === 2 && before || attentionMarkers2.includes(code2);
34797
34850
  const close = !before || before === 2 && after || attentionMarkers2.includes(previous2);
34798
- token._open = Boolean(marker2 === 42 ? open2 : open2 && (before || !close));
34799
- token._close = Boolean(marker2 === 42 ? close : close && (after || !open2));
34851
+ token._open = Boolean(marker === 42 ? open2 : open2 && (before || !close));
34852
+ token._close = Boolean(marker === 42 ? close : close && (after || !open2));
34800
34853
  return ok2(code2);
34801
34854
  }
34802
34855
  }
@@ -35097,7 +35150,7 @@ function tokenizeCodeFenced(effects, ok2, nok) {
35097
35150
  };
35098
35151
  let initialPrefix = 0;
35099
35152
  let sizeOpen = 0;
35100
- let marker2;
35153
+ let marker;
35101
35154
  return start;
35102
35155
  function start(code2) {
35103
35156
  return beforeSequenceOpen(code2);
@@ -35105,14 +35158,14 @@ function tokenizeCodeFenced(effects, ok2, nok) {
35105
35158
  function beforeSequenceOpen(code2) {
35106
35159
  const tail = self2.events[self2.events.length - 1];
35107
35160
  initialPrefix = tail && tail[1].type === "linePrefix" ? tail[2].sliceSerialize(tail[1], true).length : 0;
35108
- marker2 = code2;
35161
+ marker = code2;
35109
35162
  effects.enter("codeFenced");
35110
35163
  effects.enter("codeFencedFence");
35111
35164
  effects.enter("codeFencedFenceSequence");
35112
35165
  return sequenceOpen(code2);
35113
35166
  }
35114
35167
  function sequenceOpen(code2) {
35115
- if (code2 === marker2) {
35168
+ if (code2 === marker) {
35116
35169
  sizeOpen++;
35117
35170
  effects.consume(code2);
35118
35171
  return sequenceOpen;
@@ -35145,7 +35198,7 @@ function tokenizeCodeFenced(effects, ok2, nok) {
35145
35198
  effects.exit("codeFencedFenceInfo");
35146
35199
  return factorySpace(effects, metaBefore, "whitespace")(code2);
35147
35200
  }
35148
- if (code2 === 96 && code2 === marker2) {
35201
+ if (code2 === 96 && code2 === marker) {
35149
35202
  return nok(code2);
35150
35203
  }
35151
35204
  effects.consume(code2);
@@ -35167,7 +35220,7 @@ function tokenizeCodeFenced(effects, ok2, nok) {
35167
35220
  effects.exit("codeFencedFenceMeta");
35168
35221
  return infoBefore(code2);
35169
35222
  }
35170
- if (code2 === 96 && code2 === marker2) {
35223
+ if (code2 === 96 && code2 === marker) {
35171
35224
  return nok(code2);
35172
35225
  }
35173
35226
  effects.consume(code2);
@@ -35218,14 +35271,14 @@ function tokenizeCodeFenced(effects, ok2, nok) {
35218
35271
  return markdownSpace(code2) ? factorySpace(effects2, beforeSequenceClose, "linePrefix", self2.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(code2) : beforeSequenceClose(code2);
35219
35272
  }
35220
35273
  function beforeSequenceClose(code2) {
35221
- if (code2 === marker2) {
35274
+ if (code2 === marker) {
35222
35275
  effects2.enter("codeFencedFenceSequence");
35223
35276
  return sequenceClose(code2);
35224
35277
  }
35225
35278
  return nok2(code2);
35226
35279
  }
35227
35280
  function sequenceClose(code2) {
35228
- if (code2 === marker2) {
35281
+ if (code2 === marker) {
35229
35282
  size2++;
35230
35283
  effects2.consume(code2);
35231
35284
  return sequenceClose;
@@ -35996,7 +36049,7 @@ function factoryLabel(effects, ok2, nok, type, markerType, stringType) {
35996
36049
  }
35997
36050
  }
35998
36051
  function factoryTitle(effects, ok2, nok, type, markerType, stringType) {
35999
- let marker2;
36052
+ let marker;
36000
36053
  return start;
36001
36054
  function start(code2) {
36002
36055
  if (code2 === 34 || code2 === 39 || code2 === 40) {
@@ -36004,13 +36057,13 @@ function factoryTitle(effects, ok2, nok, type, markerType, stringType) {
36004
36057
  effects.enter(markerType);
36005
36058
  effects.consume(code2);
36006
36059
  effects.exit(markerType);
36007
- marker2 = code2 === 40 ? 41 : code2;
36060
+ marker = code2 === 40 ? 41 : code2;
36008
36061
  return begin;
36009
36062
  }
36010
36063
  return nok(code2);
36011
36064
  }
36012
36065
  function begin(code2) {
36013
- if (code2 === marker2) {
36066
+ if (code2 === marker) {
36014
36067
  effects.enter(markerType);
36015
36068
  effects.consume(code2);
36016
36069
  effects.exit(markerType);
@@ -36021,9 +36074,9 @@ function factoryTitle(effects, ok2, nok, type, markerType, stringType) {
36021
36074
  return atBreak(code2);
36022
36075
  }
36023
36076
  function atBreak(code2) {
36024
- if (code2 === marker2) {
36077
+ if (code2 === marker) {
36025
36078
  effects.exit(stringType);
36026
- return begin(marker2);
36079
+ return begin(marker);
36027
36080
  }
36028
36081
  if (code2 === null) {
36029
36082
  return nok(code2);
@@ -36040,7 +36093,7 @@ function factoryTitle(effects, ok2, nok, type, markerType, stringType) {
36040
36093
  return inside(code2);
36041
36094
  }
36042
36095
  function inside(code2) {
36043
- if (code2 === marker2 || code2 === null || markdownLineEnding(code2)) {
36096
+ if (code2 === marker || code2 === null || markdownLineEnding(code2)) {
36044
36097
  effects.exit("chunkString");
36045
36098
  return atBreak(code2);
36046
36099
  }
@@ -36048,7 +36101,7 @@ function factoryTitle(effects, ok2, nok, type, markerType, stringType) {
36048
36101
  return code2 === 92 ? escape : inside;
36049
36102
  }
36050
36103
  function escape(code2) {
36051
- if (code2 === marker2 || code2 === 92) {
36104
+ if (code2 === marker || code2 === 92) {
36052
36105
  effects.consume(code2);
36053
36106
  return inside;
36054
36107
  }
@@ -36359,7 +36412,7 @@ function resolveToHtmlFlow(events) {
36359
36412
  }
36360
36413
  function tokenizeHtmlFlow(effects, ok2, nok) {
36361
36414
  const self2 = this;
36362
- let marker2;
36415
+ let marker;
36363
36416
  let closingTag;
36364
36417
  let buffer2;
36365
36418
  let index2;
@@ -36386,7 +36439,7 @@ function tokenizeHtmlFlow(effects, ok2, nok) {
36386
36439
  }
36387
36440
  if (code2 === 63) {
36388
36441
  effects.consume(code2);
36389
- marker2 = 3;
36442
+ marker = 3;
36390
36443
  return self2.interrupt ? ok2 : continuationDeclarationInside;
36391
36444
  }
36392
36445
  if (asciiAlpha(code2)) {
@@ -36399,18 +36452,18 @@ function tokenizeHtmlFlow(effects, ok2, nok) {
36399
36452
  function declarationOpen(code2) {
36400
36453
  if (code2 === 45) {
36401
36454
  effects.consume(code2);
36402
- marker2 = 2;
36455
+ marker = 2;
36403
36456
  return commentOpenInside;
36404
36457
  }
36405
36458
  if (code2 === 91) {
36406
36459
  effects.consume(code2);
36407
- marker2 = 5;
36460
+ marker = 5;
36408
36461
  index2 = 0;
36409
36462
  return cdataOpenInside;
36410
36463
  }
36411
36464
  if (asciiAlpha(code2)) {
36412
36465
  effects.consume(code2);
36413
- marker2 = 4;
36466
+ marker = 4;
36414
36467
  return self2.interrupt ? ok2 : continuationDeclarationInside;
36415
36468
  }
36416
36469
  return nok(code2);
@@ -36446,18 +36499,18 @@ function tokenizeHtmlFlow(effects, ok2, nok) {
36446
36499
  const slash = code2 === 47;
36447
36500
  const name2 = buffer2.toLowerCase();
36448
36501
  if (!slash && !closingTag && htmlRawNames.includes(name2)) {
36449
- marker2 = 1;
36502
+ marker = 1;
36450
36503
  return self2.interrupt ? ok2(code2) : continuation(code2);
36451
36504
  }
36452
36505
  if (htmlBlockNames.includes(buffer2.toLowerCase())) {
36453
- marker2 = 6;
36506
+ marker = 6;
36454
36507
  if (slash) {
36455
36508
  effects.consume(code2);
36456
36509
  return basicSelfClosing;
36457
36510
  }
36458
36511
  return self2.interrupt ? ok2(code2) : continuation(code2);
36459
36512
  }
36460
- marker2 = 7;
36513
+ marker = 7;
36461
36514
  return self2.interrupt && !self2.parser.lazy[self2.now().line] ? nok(code2) : closingTag ? completeClosingTagAfter(code2) : completeAttributeNameBefore(code2);
36462
36515
  }
36463
36516
  if (code2 === 45 || asciiAlphanumeric(code2)) {
@@ -36572,27 +36625,27 @@ function tokenizeHtmlFlow(effects, ok2, nok) {
36572
36625
  return nok(code2);
36573
36626
  }
36574
36627
  function continuation(code2) {
36575
- if (code2 === 45 && marker2 === 2) {
36628
+ if (code2 === 45 && marker === 2) {
36576
36629
  effects.consume(code2);
36577
36630
  return continuationCommentInside;
36578
36631
  }
36579
- if (code2 === 60 && marker2 === 1) {
36632
+ if (code2 === 60 && marker === 1) {
36580
36633
  effects.consume(code2);
36581
36634
  return continuationRawTagOpen;
36582
36635
  }
36583
- if (code2 === 62 && marker2 === 4) {
36636
+ if (code2 === 62 && marker === 4) {
36584
36637
  effects.consume(code2);
36585
36638
  return continuationClose;
36586
36639
  }
36587
- if (code2 === 63 && marker2 === 3) {
36640
+ if (code2 === 63 && marker === 3) {
36588
36641
  effects.consume(code2);
36589
36642
  return continuationDeclarationInside;
36590
36643
  }
36591
- if (code2 === 93 && marker2 === 5) {
36644
+ if (code2 === 93 && marker === 5) {
36592
36645
  effects.consume(code2);
36593
36646
  return continuationCdataInside;
36594
36647
  }
36595
- if (markdownLineEnding(code2) && (marker2 === 6 || marker2 === 7)) {
36648
+ if (markdownLineEnding(code2) && (marker === 6 || marker === 7)) {
36596
36649
  effects.exit("htmlFlowData");
36597
36650
  return effects.check(blankLineBefore, continuationAfter, continuationStart)(code2);
36598
36651
  }
@@ -36662,7 +36715,7 @@ function tokenizeHtmlFlow(effects, ok2, nok) {
36662
36715
  effects.consume(code2);
36663
36716
  return continuationClose;
36664
36717
  }
36665
- if (code2 === 45 && marker2 === 2) {
36718
+ if (code2 === 45 && marker === 2) {
36666
36719
  effects.consume(code2);
36667
36720
  return continuationDeclarationInside;
36668
36721
  }
@@ -36712,7 +36765,7 @@ const htmlText = {
36712
36765
  };
36713
36766
  function tokenizeHtmlText(effects, ok2, nok) {
36714
36767
  const self2 = this;
36715
- let marker2;
36768
+ let marker;
36716
36769
  let index2;
36717
36770
  let returnState;
36718
36771
  return start;
@@ -36940,7 +36993,7 @@ function tokenizeHtmlText(effects, ok2, nok) {
36940
36993
  }
36941
36994
  if (code2 === 34 || code2 === 39) {
36942
36995
  effects.consume(code2);
36943
- marker2 = code2;
36996
+ marker = code2;
36944
36997
  return tagOpenAttributeValueQuoted;
36945
36998
  }
36946
36999
  if (markdownLineEnding(code2)) {
@@ -36955,9 +37008,9 @@ function tokenizeHtmlText(effects, ok2, nok) {
36955
37008
  return tagOpenAttributeValueUnquoted;
36956
37009
  }
36957
37010
  function tagOpenAttributeValueQuoted(code2) {
36958
- if (code2 === marker2) {
37011
+ if (code2 === marker) {
36959
37012
  effects.consume(code2);
36960
- marker2 = void 0;
37013
+ marker = void 0;
36961
37014
  return tagOpenAttributeValueQuotedAfter;
36962
37015
  }
36963
37016
  if (code2 === null) {
@@ -37302,18 +37355,18 @@ const thematicBreak$1 = {
37302
37355
  };
37303
37356
  function tokenizeThematicBreak(effects, ok2, nok) {
37304
37357
  let size2 = 0;
37305
- let marker2;
37358
+ let marker;
37306
37359
  return start;
37307
37360
  function start(code2) {
37308
37361
  effects.enter("thematicBreak");
37309
37362
  return before(code2);
37310
37363
  }
37311
37364
  function before(code2) {
37312
- marker2 = code2;
37365
+ marker = code2;
37313
37366
  return atBreak(code2);
37314
37367
  }
37315
37368
  function atBreak(code2) {
37316
- if (code2 === marker2) {
37369
+ if (code2 === marker) {
37317
37370
  effects.enter("thematicBreakSequence");
37318
37371
  return sequence(code2);
37319
37372
  }
@@ -37324,7 +37377,7 @@ function tokenizeThematicBreak(effects, ok2, nok) {
37324
37377
  return nok(code2);
37325
37378
  }
37326
37379
  function sequence(code2) {
37327
- if (code2 === marker2) {
37380
+ if (code2 === marker) {
37328
37381
  effects.consume(code2);
37329
37382
  size2++;
37330
37383
  return sequence;
@@ -37513,7 +37566,7 @@ function resolveToSetextUnderline(events, context) {
37513
37566
  }
37514
37567
  function tokenizeSetextUnderline(effects, ok2, nok) {
37515
37568
  const self2 = this;
37516
- let marker2;
37569
+ let marker;
37517
37570
  return start;
37518
37571
  function start(code2) {
37519
37572
  let index2 = self2.events.length;
@@ -37526,7 +37579,7 @@ function tokenizeSetextUnderline(effects, ok2, nok) {
37526
37579
  }
37527
37580
  if (!self2.parser.lazy[self2.now().line] && (self2.interrupt || paragraph2)) {
37528
37581
  effects.enter("setextHeadingLine");
37529
- marker2 = code2;
37582
+ marker = code2;
37530
37583
  return before(code2);
37531
37584
  }
37532
37585
  return nok(code2);
@@ -37536,7 +37589,7 @@ function tokenizeSetextUnderline(effects, ok2, nok) {
37536
37589
  return inside(code2);
37537
37590
  }
37538
37591
  function inside(code2) {
37539
- if (code2 === marker2) {
37592
+ if (code2 === marker) {
37540
37593
  effects.consume(code2);
37541
37594
  return inside;
37542
37595
  }
@@ -37629,17 +37682,17 @@ function resolveToPotentialGfmFootnoteCall(events, context) {
37629
37682
  start: Object.assign({}, events[index2 + 3][1].start),
37630
37683
  end: Object.assign({}, events[events.length - 1][1].end)
37631
37684
  };
37632
- const marker2 = {
37685
+ const marker = {
37633
37686
  type: "gfmFootnoteCallMarker",
37634
37687
  start: Object.assign({}, events[index2 + 3][1].end),
37635
37688
  end: Object.assign({}, events[index2 + 3][1].end)
37636
37689
  };
37637
- marker2.end.column++;
37638
- marker2.end.offset++;
37639
- marker2.end._bufferIndex++;
37690
+ marker.end.column++;
37691
+ marker.end.offset++;
37692
+ marker.end._bufferIndex++;
37640
37693
  const string2 = {
37641
37694
  type: "gfmFootnoteCallString",
37642
- start: Object.assign({}, marker2.end),
37695
+ start: Object.assign({}, marker.end),
37643
37696
  end: Object.assign({}, events[events.length - 1][1].start)
37644
37697
  };
37645
37698
  const chunk = {
@@ -37657,8 +37710,8 @@ function resolveToPotentialGfmFootnoteCall(events, context) {
37657
37710
  events[index2 + 3],
37658
37711
  events[index2 + 4],
37659
37712
  // The `^`.
37660
- ["enter", marker2, context],
37661
- ["exit", marker2, context],
37713
+ ["enter", marker, context],
37714
+ ["exit", marker, context],
37662
37715
  // Everything in between.
37663
37716
  ["enter", string2, context],
37664
37717
  ["enter", chunk, context],
@@ -38894,9 +38947,9 @@ function name(name2, options) {
38894
38947
  }
38895
38948
  const re$2 = /[ \t\n\f\r]/g;
38896
38949
  function whitespace(thing) {
38897
- return typeof thing === "object" ? thing.type === "text" ? empty(thing.value) : false : empty(thing);
38950
+ return typeof thing === "object" ? thing.type === "text" ? empty$1(thing.value) : false : empty$1(thing);
38898
38951
  }
38899
- function empty(value) {
38952
+ function empty$1(value) {
38900
38953
  return value.replace(re$2, "") === "";
38901
38954
  }
38902
38955
  var cjs$1 = {};
@@ -41921,7 +41974,7 @@ function createState(tree, options) {
41921
41974
  patch,
41922
41975
  wrap: wrap$1
41923
41976
  };
41924
- visit(tree, function(node2) {
41977
+ visit$1(tree, function(node2) {
41925
41978
  if (node2.type === "definition" || node2.type === "footnoteDefinition") {
41926
41979
  const map2 = node2.type === "definition" ? definitionById : footnoteById;
41927
41980
  const id = String(node2.identifier).toUpperCase();
@@ -43623,6 +43676,104 @@ function isUint8Array(value) {
43623
43676
  value && typeof value === "object" && "byteLength" in value && "byteOffset" in value
43624
43677
  );
43625
43678
  }
43679
+ function color(d2) {
43680
+ return d2;
43681
+ }
43682
+ const empty = [];
43683
+ const CONTINUE = true;
43684
+ const EXIT = false;
43685
+ const SKIP = "skip";
43686
+ function visitParents(tree, test, visitor, reverse) {
43687
+ let check;
43688
+ if (typeof test === "function" && typeof visitor !== "function") {
43689
+ reverse = visitor;
43690
+ visitor = test;
43691
+ } else {
43692
+ check = test;
43693
+ }
43694
+ const is = convert(check);
43695
+ const step = reverse ? -1 : 1;
43696
+ factory(tree, void 0, [])();
43697
+ function factory(node2, index2, parents) {
43698
+ const value = (
43699
+ /** @type {Record<string, unknown>} */
43700
+ node2 && typeof node2 === "object" ? node2 : {}
43701
+ );
43702
+ if (typeof value.type === "string") {
43703
+ const name2 = (
43704
+ // `hast`
43705
+ typeof value.tagName === "string" ? value.tagName : (
43706
+ // `xast`
43707
+ typeof value.name === "string" ? value.name : void 0
43708
+ )
43709
+ );
43710
+ Object.defineProperty(visit2, "name", {
43711
+ value: "node (" + color(node2.type + (name2 ? "<" + name2 + ">" : "")) + ")"
43712
+ });
43713
+ }
43714
+ return visit2;
43715
+ function visit2() {
43716
+ let result = empty;
43717
+ let subresult;
43718
+ let offset2;
43719
+ let grandparents;
43720
+ if (!test || is(node2, index2, parents[parents.length - 1] || void 0)) {
43721
+ result = toResult(visitor(node2, parents));
43722
+ if (result[0] === EXIT) {
43723
+ return result;
43724
+ }
43725
+ }
43726
+ if ("children" in node2 && node2.children) {
43727
+ const nodeAsParent = (
43728
+ /** @type {UnistParent} */
43729
+ node2
43730
+ );
43731
+ if (nodeAsParent.children && result[0] !== SKIP) {
43732
+ offset2 = (reverse ? nodeAsParent.children.length : -1) + step;
43733
+ grandparents = parents.concat(nodeAsParent);
43734
+ while (offset2 > -1 && offset2 < nodeAsParent.children.length) {
43735
+ const child = nodeAsParent.children[offset2];
43736
+ subresult = factory(child, offset2, grandparents)();
43737
+ if (subresult[0] === EXIT) {
43738
+ return subresult;
43739
+ }
43740
+ offset2 = typeof subresult[1] === "number" ? subresult[1] : offset2 + step;
43741
+ }
43742
+ }
43743
+ }
43744
+ return result;
43745
+ }
43746
+ }
43747
+ }
43748
+ function toResult(value) {
43749
+ if (Array.isArray(value)) {
43750
+ return value;
43751
+ }
43752
+ if (typeof value === "number") {
43753
+ return [CONTINUE, value];
43754
+ }
43755
+ return value === null || value === void 0 ? empty : [value];
43756
+ }
43757
+ function visit(tree, testOrVisitor, visitorOrReverse, maybeReverse) {
43758
+ let reverse;
43759
+ let test;
43760
+ let visitor;
43761
+ if (typeof testOrVisitor === "function" && typeof visitorOrReverse !== "function") {
43762
+ test = void 0;
43763
+ visitor = testOrVisitor;
43764
+ reverse = visitorOrReverse;
43765
+ } else {
43766
+ test = testOrVisitor;
43767
+ visitor = visitorOrReverse;
43768
+ reverse = maybeReverse;
43769
+ }
43770
+ visitParents(tree, test, overload, reverse);
43771
+ function overload(node2, parents) {
43772
+ const parent = parents[parents.length - 1];
43773
+ const index2 = parent ? parent.children.indexOf(node2) : void 0;
43774
+ return visitor(node2, index2, parent);
43775
+ }
43776
+ }
43626
43777
  function M() {
43627
43778
  return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
43628
43779
  }
@@ -44823,7 +44974,7 @@ var Ye = /\s/, qo = /^\s+$/, _o = /* @__PURE__ */ new Set(["code", "pre", "svg",
44823
44974
  }, Uo = (e, t, o, n) => ({ type: "element", tagName: "span", properties: { "data-sd-animate": true, style: `--sd-animation:sd-${t};--sd-duration:${o}ms;--sd-easing:${n}` }, children: [{ type: "text", value: e }] }), Xo = (e, t, o) => {
44824
44975
  let n = t.at(-1);
44825
44976
  if (!(n && "children" in n)) return;
44826
- if (Wo(t)) return SKIP;
44977
+ if (Wo(t)) return SKIP$1;
44827
44978
  let s2 = n, r2 = s2.children.indexOf(e);
44828
44979
  if (r2 === -1) return;
44829
44980
  let i = e.value;
@@ -44835,7 +44986,7 @@ function Q(e) {
44835
44986
  var n, s2, r2, i;
44836
44987
  let t = { animation: (n = e == null ? void 0 : e.animation) != null ? n : "fadeIn", duration: (s2 = e == null ? void 0 : e.duration) != null ? s2 : 150, easing: (r2 = e == null ? void 0 : e.easing) != null ? r2 : "ease", sep: (i = e == null ? void 0 : e.sep) != null ? i : "word" };
44837
44988
  return { name: "animate", type: "animate", rehypePlugin: () => (c) => {
44838
- visitParents(c, "text", (a2, l) => Xo(a2, l, t));
44989
+ visitParents$1(c, "text", (a2, l) => Xo(a2, l, t));
44839
44990
  } };
44840
44991
  }
44841
44992
  Q();
@@ -44868,7 +45019,7 @@ var tn = f("block", "before:content-[counter(line)]", "before:inline-block", "be
44868
45019
  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 });
44869
45020
  var Se = reactExports.createContext({ code: "" }), de = () => reactExports.useContext(Se);
44870
45021
  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 }) });
44871
- var cn$1 = /\n+$/, dn = reactExports.lazy(() => __vitePreload(() => import("./highlighted-body-B3W2YXNL-DwhUiBi7.js"), true ? __vite__mapDeps([2,1]) : void 0).then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
45022
+ var cn$1 = /\n+$/, dn = reactExports.lazy(() => __vitePreload(() => import("./highlighted-body-B3W2YXNL-DMawUm9n.js"), true ? __vite__mapDeps([2,1]) : void 0).then((e) => ({ default: e.HighlightedCodeBlockBody }))), rt = ({ code: e, language: t, className: o, children: n, isIncomplete: s2 = false, ...r2 }) => {
44872
45023
  let i = reactExports.useMemo(() => e.replace(cn$1, ""), [e]), c = reactExports.useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: i.split(`
44873
45024
  `).map((a2) => [{ content: a2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [i]);
44874
45025
  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 }) })] }) });
@@ -45647,1236 +45798,6 @@ function useSidebarData() {
45647
45798
  function useSidebarDataOptional() {
45648
45799
  return reactExports.useContext(SidebarDataContext);
45649
45800
  }
45650
- const MAP_HEIGHT = 56;
45651
- const TIMELINE_PADDING = 8;
45652
- const ROW_PADDING = 2;
45653
- const ROW_HEIGHT = 24;
45654
- const MARKER_HEIGHT = 24;
45655
- const initialState = {
45656
- root: {
45657
- startTime: 0,
45658
- endTime: 1,
45659
- duration: 1,
45660
- depth: 0,
45661
- children: []
45662
- },
45663
- spanMap: {},
45664
- resourceMap: {},
45665
- filter: "",
45666
- selected: null,
45667
- baseScale: 1,
45668
- scaleRatio: 1,
45669
- scale: 1,
45670
- width: 640,
45671
- height: 480,
45672
- timelineWidth: 640,
45673
- timelineHeight: 480,
45674
- panelWidth: 380,
45675
- panelHeight: 480,
45676
- scrollbarWidth: 0,
45677
- timelineRef: { current: null },
45678
- scrollSnapshotRef: { current: void 0 },
45679
- memoCacheRef: { current: /* @__PURE__ */ new Map() },
45680
- getQuickLinks: () => [],
45681
- withPanel: false,
45682
- isMobile: false
45683
- };
45684
- const TraceViewerContext = reactExports.createContext({
45685
- state: initialState,
45686
- dispatch: () => {
45687
- }
45688
- });
45689
- TraceViewerContext.displayName = "TraceViewerContext";
45690
- const useTraceViewer = () => reactExports.useContext(TraceViewerContext);
45691
- reactExports.createContext(null);
45692
- const traceNode = "_traceNode_1ytrx_1";
45693
- const childRow = "_childRow_1ytrx_5";
45694
- const spanNode = "_spanNode_1ytrx_11";
45695
- const huge = "_huge_1ytrx_31";
45696
- const spanName = "_spanName_1ytrx_34";
45697
- const spanSpacer = "_spanSpacer_1ytrx_40";
45698
- const spanDuration = "_spanDuration_1ytrx_44";
45699
- const small = "_small_1ytrx_62";
45700
- const xHover = "_xHover_1ytrx_62";
45701
- const spanNodeEvent = "_spanNodeEvent_1ytrx_118";
45702
- const eventDiamond = "_eventDiamond_1ytrx_124";
45703
- const customEventColor = "_customEventColor_1ytrx_140";
45704
- const hoverInfo = "_hoverInfo_1ytrx_145";
45705
- const eventName = "_eventName_1ytrx_149";
45706
- const eventTimestamp = "_eventTimestamp_1ytrx_153";
45707
- const alignStart = "_alignStart_1ytrx_174";
45708
- const alignEnd = "_alignEnd_1ytrx_178";
45709
- const colorVercel = "_colorVercel_1ytrx_205";
45710
- const color0 = "_color0_1ytrx_213";
45711
- const color1 = "_color1_1ytrx_220";
45712
- const color2 = "_color2_1ytrx_227";
45713
- const color3 = "_color3_1ytrx_234";
45714
- const color4 = "_color4_1ytrx_241";
45715
- const colorHighlight = "_colorHighlight_1ytrx_248";
45716
- const unlit = "_unlit_1ytrx_256";
45717
- const mapContainer = "_mapContainer_1ytrx_262";
45718
- const spanDetailPanel = "_spanDetailPanel_1ytrx_329";
45719
- const spanDetailPanelResizer = "_spanDetailPanelResizer_1ytrx_338";
45720
- const spanDetailPanelTop = "_spanDetailPanelTop_1ytrx_353";
45721
- const spanDetailPanelBody = "_spanDetailPanelBody_1ytrx_362";
45722
- const spanDetailPanelTopInfo = "_spanDetailPanelTopInfo_1ytrx_375";
45723
- const spanNameDetailPanel = "_spanNameDetailPanel_1ytrx_389";
45724
- const spanDetailPanelTruncatedHeading = "_spanDetailPanelTruncatedHeading_1ytrx_395";
45725
- const spanDetailPanelName = "_spanDetailPanelName_1ytrx_405";
45726
- const spanDetailPanelDuration = "_spanDetailPanelDuration_1ytrx_416";
45727
- const spanDetailPanelCorner = "_spanDetailPanelCorner_1ytrx_427";
45728
- const spanDetailPanelCornerInner = "_spanDetailPanelCornerInner_1ytrx_437";
45729
- const spanDetailPanelCloseVerticalRule = "_spanDetailPanelCloseVerticalRule_1ytrx_445";
45730
- const spanDetailPanelClose = "_spanDetailPanelClose_1ytrx_445";
45731
- const spanDetailPanelAttribute = "_spanDetailPanelAttribute_1ytrx_467";
45732
- const spanDetailPanelAttributeKey = "_spanDetailPanelAttributeKey_1ytrx_484";
45733
- const spanDetailPanelAttributeValue = "_spanDetailPanelAttributeValue_1ytrx_492";
45734
- const spanDetailPanelQuickLink = "_spanDetailPanelQuickLink_1ytrx_503";
45735
- const spanDetailPanelQuickLinkLabel = "_spanDetailPanelQuickLinkLabel_1ytrx_506";
45736
- const detailGroup = "_detailGroup_1ytrx_519";
45737
- const expanded = "_expanded_1ytrx_533";
45738
- const collapsed = "_collapsed_1ytrx_534";
45739
- const ancestorGroup = "_ancestorGroup_1ytrx_535";
45740
- const detailHeading = "_detailHeading_1ytrx_539";
45741
- const buttonLink = "_buttonLink_1ytrx_562";
45742
- const note = "_note_1ytrx_581";
45743
- const skeleton = "_skeleton_1ytrx_589";
45744
- const skeletonRounded = "_skeletonRounded_1ytrx_595";
45745
- const detailHeadingIcon = "_detailHeadingIcon_1ytrx_599";
45746
- const infraSpanDescription = "_infraSpanDescription_1ytrx_603";
45747
- const ancestorNode = "_ancestorNode_1ytrx_613";
45748
- const ancestorText = "_ancestorText_1ytrx_629";
45749
- const ancestorName = "_ancestorName_1ytrx_639";
45750
- const ancestorDuration = "_ancestorDuration_1ytrx_644";
45751
- const ancestorLineContainer = "_ancestorLineContainer_1ytrx_649";
45752
- const ancestorLine = "_ancestorLine_1ytrx_649";
45753
- const zoomButtonGroup = "_zoomButtonGroup_1ytrx_701";
45754
- const zoomButton = "_zoomButton_1ytrx_701";
45755
- const divider = "_divider_1ytrx_751";
45756
- const markersContainer = "_markersContainer_1ytrx_758";
45757
- const markers = "_markers_1ytrx_758";
45758
- const marker = "_marker_1ytrx_758";
45759
- const notch = "_notch_1ytrx_792";
45760
- const markerLabel = "_markerLabel_1ytrx_798";
45761
- const markerClockTime = "_markerClockTime_1ytrx_807";
45762
- const eventMarkersContainer = "_eventMarkersContainer_1ytrx_816";
45763
- const eventMarkers = "_eventMarkers_1ytrx_816";
45764
- const eventMarker = "_eventMarker_1ytrx_816";
45765
- const cursorMarkerStickyParent = "_cursorMarkerStickyParent_1ytrx_839";
45766
- const cursorMarkerLabelContainer = "_cursorMarkerLabelContainer_1ytrx_848";
45767
- const cursorMarkerLabel = "_cursorMarkerLabel_1ytrx_848";
45768
- const cursorMarkerContainer = "_cursorMarkerContainer_1ytrx_898";
45769
- const cursorMarker = "_cursorMarker_1ytrx_839";
45770
- const cursorSelection = "_cursorSelection_1ytrx_916";
45771
- const traceViewer = "_traceViewer_1ytrx_966";
45772
- const mapCanvas = "_mapCanvas_1ytrx_972";
45773
- const zoomButtonTraceViewer = "_zoomButtonTraceViewer_1ytrx_988";
45774
- const timeline = "_timeline_1ytrx_1011";
45775
- const searchBar = "_searchBar_1ytrx_1019";
45776
- const searchInput = "_searchInput_1ytrx_1031";
45777
- const searchInputLabel = "_searchInputLabel_1ytrx_1038";
45778
- const searchInputPrefix = "_searchInputPrefix_1ytrx_1063";
45779
- const mapThumb = "_mapThumb_1ytrx_1101";
45780
- const spanDetailPanelTraceViewer = "_spanDetailPanelTraceViewer_1ytrx_1115";
45781
- const traceViewerContent = "_traceViewerContent_1ytrx_1134";
45782
- const inert = "_inert_1ytrx_1144";
45783
- const hidden = "_hidden_1ytrx_1180";
45784
- const mobile = "_mobile_1ytrx_1184";
45785
- const spanRunning = "_spanRunning_1ytrx_1194";
45786
- const spanPending = "_spanPending_1ytrx_1195";
45787
- const spanCompleted = "_spanCompleted_1ytrx_1203";
45788
- const spanCancelled = "_spanCancelled_1ytrx_1211";
45789
- const spanFailed = "_spanFailed_1ytrx_1219";
45790
- const spanPendingStriped = "_spanPendingStriped_1ytrx_1228";
45791
- const hasQueuedTime = "_hasQueuedTime_1ytrx_1242";
45792
- const spanSleep = "_spanSleep_1ytrx_1254";
45793
- const spanHook = "_spanHook_1ytrx_1263";
45794
- const segmentLayer = "_segmentLayer_1ytrx_1275";
45795
- const segment = "_segment_1ytrx_1275";
45796
- const segmentLabel = "_segmentLabel_1ytrx_1291";
45797
- const segmentTag = "_segmentTag_1ytrx_1306";
45798
- const segQueued = "_segQueued_1ytrx_1314";
45799
- const segRunning = "_segRunning_1ytrx_1325";
45800
- const segFailed = "_segFailed_1ytrx_1330";
45801
- const segRetrying = "_segRetrying_1ytrx_1335";
45802
- const segSucceeded = "_segSucceeded_1ytrx_1346";
45803
- const segWaiting = "_segWaiting_1ytrx_1351";
45804
- const segSleeping = "_segSleeping_1ytrx_1362";
45805
- const segReceived = "_segReceived_1ytrx_1367";
45806
- const boundaryMarker = "_boundaryMarker_1ytrx_1372";
45807
- const boundaryLine = "_boundaryLine_1ytrx_1373";
45808
- const hasSegments = "_hasSegments_1ytrx_1395";
45809
- const eventFailed = "_eventFailed_1ytrx_1432";
45810
- const eventRetrying = "_eventRetrying_1ytrx_1441";
45811
- const eventHook = "_eventHook_1ytrx_1450";
45812
- const eventDefault = "_eventDefault_1ytrx_1459";
45813
- const styles$1 = {
45814
- traceNode,
45815
- childRow,
45816
- spanNode,
45817
- huge,
45818
- spanName,
45819
- spanSpacer,
45820
- spanDuration,
45821
- small,
45822
- xHover,
45823
- spanNodeEvent,
45824
- eventDiamond,
45825
- customEventColor,
45826
- hoverInfo,
45827
- eventName,
45828
- eventTimestamp,
45829
- alignStart,
45830
- alignEnd,
45831
- colorVercel,
45832
- color0,
45833
- color1,
45834
- color2,
45835
- color3,
45836
- color4,
45837
- colorHighlight,
45838
- unlit,
45839
- mapContainer,
45840
- spanDetailPanel,
45841
- spanDetailPanelResizer,
45842
- spanDetailPanelTop,
45843
- spanDetailPanelBody,
45844
- spanDetailPanelTopInfo,
45845
- spanNameDetailPanel,
45846
- spanDetailPanelTruncatedHeading,
45847
- spanDetailPanelName,
45848
- spanDetailPanelDuration,
45849
- spanDetailPanelCorner,
45850
- spanDetailPanelCornerInner,
45851
- spanDetailPanelCloseVerticalRule,
45852
- spanDetailPanelClose,
45853
- spanDetailPanelAttribute,
45854
- spanDetailPanelAttributeKey,
45855
- spanDetailPanelAttributeValue,
45856
- spanDetailPanelQuickLink,
45857
- spanDetailPanelQuickLinkLabel,
45858
- detailGroup,
45859
- expanded,
45860
- collapsed,
45861
- ancestorGroup,
45862
- detailHeading,
45863
- buttonLink,
45864
- note,
45865
- skeleton,
45866
- skeletonRounded,
45867
- detailHeadingIcon,
45868
- infraSpanDescription,
45869
- ancestorNode,
45870
- ancestorText,
45871
- ancestorName,
45872
- ancestorDuration,
45873
- ancestorLineContainer,
45874
- ancestorLine,
45875
- zoomButtonGroup,
45876
- "zoom-buttons-fade-in": "_zoom-buttons-fade-in_1ytrx_1",
45877
- zoomButton,
45878
- divider,
45879
- markersContainer,
45880
- markers,
45881
- marker,
45882
- notch,
45883
- markerLabel,
45884
- markerClockTime,
45885
- eventMarkersContainer,
45886
- eventMarkers,
45887
- eventMarker,
45888
- cursorMarkerStickyParent,
45889
- cursorMarkerLabelContainer,
45890
- cursorMarkerLabel,
45891
- cursorMarkerContainer,
45892
- cursorMarker,
45893
- cursorSelection,
45894
- traceViewer,
45895
- "span-skeleton": "_span-skeleton_1ytrx_1",
45896
- mapCanvas,
45897
- zoomButtonTraceViewer,
45898
- timeline,
45899
- searchBar,
45900
- searchInput,
45901
- searchInputLabel,
45902
- searchInputPrefix,
45903
- mapThumb,
45904
- spanDetailPanelTraceViewer,
45905
- traceViewerContent,
45906
- inert,
45907
- hidden,
45908
- mobile,
45909
- spanRunning,
45910
- spanPending,
45911
- spanCompleted,
45912
- spanCancelled,
45913
- spanFailed,
45914
- spanPendingStriped,
45915
- hasQueuedTime,
45916
- spanSleep,
45917
- spanHook,
45918
- segmentLayer,
45919
- segment,
45920
- segmentLabel,
45921
- segmentTag,
45922
- segQueued,
45923
- segRunning,
45924
- segFailed,
45925
- segRetrying,
45926
- segSucceeded,
45927
- segWaiting,
45928
- segSleeping,
45929
- segReceived,
45930
- boundaryMarker,
45931
- boundaryLine,
45932
- hasSegments,
45933
- eventFailed,
45934
- eventRetrying,
45935
- eventHook,
45936
- eventDefault
45937
- };
45938
- function getHighResInMs([seconds, nanoseconds]) {
45939
- return seconds * 1e3 + nanoseconds / 1e6;
45940
- }
45941
- const SEGMENT_CLASS_MAP = {
45942
- queued: "segQueued",
45943
- running: "segRunning",
45944
- failed: "segFailed",
45945
- retrying: "segRetrying",
45946
- succeeded: "segSucceeded",
45947
- waiting: "segWaiting",
45948
- sleeping: "segSleeping",
45949
- received: "segReceived"
45950
- };
45951
- function clampFraction$1(value) {
45952
- return Math.max(0, Math.min(1, value));
45953
- }
45954
- function timeToFraction$1(time2, spanStart, spanDuration2) {
45955
- if (spanDuration2 <= 0)
45956
- return 0;
45957
- return clampFraction$1((time2 - spanStart) / spanDuration2);
45958
- }
45959
- function sortedEvents(events) {
45960
- return [...events].sort((a2, b2) => a2.timestamp - b2.timestamp);
45961
- }
45962
- function computeStepSegments(node2) {
45963
- const events = node2.events ? sortedEvents(node2.events) : [];
45964
- const { startTime, duration: duration2 } = node2;
45965
- const segments = [];
45966
- if (duration2 <= 0)
45967
- return segments;
45968
- const marks = events.filter((e) => [
45969
- "step_started",
45970
- "step_retrying",
45971
- "step_failed",
45972
- "step_completed"
45973
- ].includes(e.event.name)).map((e) => ({ time: e.timestamp, type: e.event.name }));
45974
- if (marks.length === 0) {
45975
- segments.push({ startFraction: 0, endFraction: 1, status: "running" });
45976
- return segments;
45977
- }
45978
- const firstMark = marks[0];
45979
- const firstFraction = timeToFraction$1(firstMark.time, startTime, duration2);
45980
- if (firstFraction > 1e-3) {
45981
- segments.push({
45982
- startFraction: 0,
45983
- endFraction: firstFraction,
45984
- status: "queued"
45985
- });
45986
- }
45987
- for (let i = 0; i < marks.length; i++) {
45988
- const mark2 = marks[i];
45989
- const markFraction = timeToFraction$1(mark2.time, startTime, duration2);
45990
- const nextMark = marks[i + 1];
45991
- const nextFraction = nextMark ? timeToFraction$1(nextMark.time, startTime, duration2) : 1;
45992
- if (mark2.type === "step_started") {
45993
- const isLastMark = i === marks.length - 1;
45994
- if (isLastMark) {
45995
- segments.push({
45996
- startFraction: markFraction,
45997
- endFraction: 1,
45998
- status: "succeeded"
45999
- });
46000
- } else {
46001
- const nextType = nextMark.type;
46002
- const attemptStatus = nextType === "step_retrying" || nextType === "step_failed" ? "failed" : nextType === "step_completed" ? "succeeded" : "running";
46003
- segments.push({
46004
- startFraction: markFraction,
46005
- endFraction: nextFraction,
46006
- status: attemptStatus
46007
- });
46008
- }
46009
- } else if (mark2.type === "step_retrying") {
46010
- segments.push({
46011
- startFraction: markFraction,
46012
- endFraction: nextFraction,
46013
- status: "retrying"
46014
- });
46015
- } else if (mark2.type === "step_failed") {
46016
- if (markFraction < 0.999) {
46017
- segments.push({
46018
- startFraction: markFraction,
46019
- endFraction: 1,
46020
- status: "failed"
46021
- });
46022
- }
46023
- } else if (mark2.type === "step_completed") ;
46024
- }
46025
- return segments;
46026
- }
46027
- function computeHookSegments(node2) {
46028
- const events = node2.events ? sortedEvents(node2.events) : [];
46029
- const { startTime, duration: duration2 } = node2;
46030
- const segments = [];
46031
- if (duration2 <= 0)
46032
- return segments;
46033
- const receivedEvent = events.find((e) => e.event.name === "hook_received");
46034
- const disposedEvent = events.find((e) => e.event.name === "hook_disposed");
46035
- if (!receivedEvent && !disposedEvent) {
46036
- segments.push({ startFraction: 0, endFraction: 1, status: "waiting" });
46037
- return segments;
46038
- }
46039
- const receivedFraction = receivedEvent ? timeToFraction$1(receivedEvent.timestamp, startTime, duration2) : null;
46040
- const disposedFraction = disposedEvent ? timeToFraction$1(disposedEvent.timestamp, startTime, duration2) : null;
46041
- if (receivedFraction !== null && receivedFraction > 1e-3) {
46042
- segments.push({
46043
- startFraction: 0,
46044
- endFraction: receivedFraction,
46045
- status: "waiting"
46046
- });
46047
- } else if (receivedFraction === null && disposedFraction !== null) {
46048
- segments.push({
46049
- startFraction: 0,
46050
- endFraction: disposedFraction,
46051
- status: "waiting"
46052
- });
46053
- }
46054
- if (receivedFraction !== null) {
46055
- const end = disposedFraction ?? 1;
46056
- segments.push({
46057
- startFraction: receivedFraction,
46058
- endFraction: end,
46059
- status: "received"
46060
- });
46061
- }
46062
- if (disposedFraction !== null && disposedFraction < 0.999) {
46063
- segments.push({
46064
- startFraction: disposedFraction,
46065
- endFraction: 1,
46066
- status: "succeeded"
46067
- });
46068
- }
46069
- return segments;
46070
- }
46071
- function computeSleepSegments(node2) {
46072
- const events = node2.events ? sortedEvents(node2.events) : [];
46073
- const { startTime, duration: duration2 } = node2;
46074
- const segments = [];
46075
- if (duration2 <= 0)
46076
- return segments;
46077
- const completedEvent = events.find((e) => e.event.name === "wait_completed");
46078
- if (!completedEvent) {
46079
- segments.push({ startFraction: 0, endFraction: 1, status: "sleeping" });
46080
- return segments;
46081
- }
46082
- const completedFraction = timeToFraction$1(completedEvent.timestamp, startTime, duration2);
46083
- if (completedFraction > 1e-3) {
46084
- segments.push({
46085
- startFraction: 0,
46086
- endFraction: completedFraction,
46087
- status: "sleeping"
46088
- });
46089
- }
46090
- segments.push({
46091
- startFraction: completedFraction,
46092
- endFraction: 1,
46093
- status: "succeeded"
46094
- });
46095
- return segments;
46096
- }
46097
- function computeRunSegments(node2) {
46098
- var _a3;
46099
- const events = node2.events ? sortedEvents(node2.events) : [];
46100
- const { startTime, duration: duration2, activeStartTime } = node2;
46101
- const segments = [];
46102
- if (duration2 <= 0)
46103
- return segments;
46104
- const hasRunCreated = events.some((e) => e.event.name === "run_created");
46105
- if (!hasRunCreated) {
46106
- const runData = (_a3 = node2.span.attributes) == null ? void 0 : _a3.data;
46107
- const runStatus = runData == null ? void 0 : runData.status;
46108
- return computeV1RunSegments$1(startTime, duration2, activeStartTime, runStatus);
46109
- }
46110
- const failedEvent = events.find((e) => e.event.name === "run_failed");
46111
- const completedEvent = events.find((e) => e.event.name === "run_completed");
46112
- let cursor = 0;
46113
- if (activeStartTime && activeStartTime > startTime) {
46114
- const queuedFraction = timeToFraction$1(activeStartTime, startTime, duration2);
46115
- if (queuedFraction > 1e-3) {
46116
- segments.push({
46117
- startFraction: 0,
46118
- endFraction: queuedFraction,
46119
- status: "queued"
46120
- });
46121
- cursor = queuedFraction;
46122
- }
46123
- }
46124
- if (failedEvent) {
46125
- const failedFraction = timeToFraction$1(failedEvent.timestamp, startTime, duration2);
46126
- if (failedFraction > cursor + 1e-3) {
46127
- segments.push({
46128
- startFraction: cursor,
46129
- endFraction: failedFraction,
46130
- status: "running"
46131
- });
46132
- }
46133
- segments.push({
46134
- startFraction: failedFraction,
46135
- endFraction: 1,
46136
- status: "failed"
46137
- });
46138
- } else if (completedEvent) {
46139
- const completedFraction = timeToFraction$1(completedEvent.timestamp, startTime, duration2);
46140
- if (completedFraction > cursor + 1e-3) {
46141
- segments.push({
46142
- startFraction: cursor,
46143
- endFraction: completedFraction,
46144
- status: "running"
46145
- });
46146
- }
46147
- segments.push({
46148
- startFraction: completedFraction,
46149
- endFraction: 1,
46150
- status: "succeeded"
46151
- });
46152
- } else {
46153
- segments.push({
46154
- startFraction: cursor,
46155
- endFraction: 1,
46156
- status: "running"
46157
- });
46158
- }
46159
- return segments;
46160
- }
46161
- function computeV1RunSegments$1(startTime, duration2, activeStartTime, runStatus) {
46162
- const segments = [];
46163
- let cursor = 0;
46164
- if (activeStartTime && activeStartTime > startTime) {
46165
- const queuedFraction = timeToFraction$1(activeStartTime, startTime, duration2);
46166
- if (queuedFraction > 1e-3) {
46167
- segments.push({
46168
- startFraction: 0,
46169
- endFraction: queuedFraction,
46170
- status: "queued"
46171
- });
46172
- cursor = queuedFraction;
46173
- }
46174
- }
46175
- if (runStatus === "failed") {
46176
- segments.push({
46177
- startFraction: cursor,
46178
- endFraction: 1,
46179
- status: "failed"
46180
- });
46181
- } else if (runStatus === "completed" || runStatus === "cancelled") {
46182
- segments.push({
46183
- startFraction: cursor,
46184
- endFraction: 1,
46185
- status: "succeeded"
46186
- });
46187
- } else {
46188
- segments.push({
46189
- startFraction: cursor,
46190
- endFraction: 1,
46191
- status: "running"
46192
- });
46193
- }
46194
- return segments;
46195
- }
46196
- const EVENT_LABELS = {
46197
- step_started: "Started",
46198
- step_retrying: "Retrying",
46199
- step_failed: "Failed",
46200
- hook_created: "Created",
46201
- hook_received: "Received",
46202
- hook_disposed: "Resolved",
46203
- wait_created: "Sleep started",
46204
- wait_completed: "Sleep completed",
46205
- run_completed: "Completed",
46206
- run_failed: "Run failed",
46207
- step_completed: "Completed"
46208
- };
46209
- function computeBoundaries(node2, relevantEventNames) {
46210
- const events = node2.events ? sortedEvents(node2.events) : [];
46211
- const { startTime, duration: duration2 } = node2;
46212
- if (duration2 <= 0)
46213
- return [];
46214
- const boundaries = [];
46215
- for (const e of events) {
46216
- if (!relevantEventNames.includes(e.event.name))
46217
- continue;
46218
- const fraction = timeToFraction$1(e.timestamp, startTime, duration2);
46219
- if (fraction < 0.01 || fraction > 0.99)
46220
- continue;
46221
- boundaries.push({
46222
- fraction,
46223
- label: EVENT_LABELS[e.event.name] ?? e.event.name,
46224
- offsetMs: e.timestamp - startTime
46225
- });
46226
- }
46227
- return boundaries;
46228
- }
46229
- function computeSegments(resourceType, node2) {
46230
- switch (resourceType) {
46231
- case "step":
46232
- return {
46233
- segments: computeStepSegments(node2),
46234
- boundaries: computeBoundaries(node2, [
46235
- "step_started",
46236
- "step_retrying",
46237
- "step_failed",
46238
- "step_completed"
46239
- ])
46240
- };
46241
- case "hook":
46242
- return {
46243
- segments: computeHookSegments(node2),
46244
- boundaries: computeBoundaries(node2, [
46245
- "hook_created",
46246
- "hook_received",
46247
- "hook_disposed"
46248
- ])
46249
- };
46250
- case "sleep":
46251
- return {
46252
- segments: computeSleepSegments(node2),
46253
- boundaries: computeBoundaries(node2, ["wait_created", "wait_completed"])
46254
- };
46255
- case "run":
46256
- return {
46257
- segments: computeRunSegments(node2),
46258
- boundaries: computeBoundaries(node2, ["run_completed", "run_failed"])
46259
- };
46260
- default:
46261
- return { segments: [], boundaries: [] };
46262
- }
46263
- }
46264
- function getDuration(node2) {
46265
- if (node2.isInstrumentationHint) {
46266
- return "Get Started";
46267
- }
46268
- return formatDuration(node2.duration);
46269
- }
46270
- const SEGMENT_LABELS = {
46271
- queued: "Queued",
46272
- running: "",
46273
- failed: "Failed",
46274
- retrying: "Retry wait",
46275
- succeeded: "Executed",
46276
- waiting: "Waiting",
46277
- sleeping: "Sleeping",
46278
- received: "Received"
46279
- };
46280
- function SegmentLayer({ segments, spanDuration: spanDuration2 }) {
46281
- if (segments.length === 0)
46282
- return null;
46283
- return jsxRuntimeExports.jsx("div", { className: styles$1.segmentLayer, children: segments.map((seg, i) => {
46284
- const className = styles$1[SEGMENT_CLASS_MAP[seg.status]];
46285
- const segDuration = (seg.endFraction - seg.startFraction) * spanDuration2;
46286
- const label = SEGMENT_LABELS[seg.status];
46287
- const style2 = {
46288
- left: `${seg.startFraction * 100}%`,
46289
- width: `${(seg.endFraction - seg.startFraction) * 100}%`
46290
- };
46291
- return jsxRuntimeExports.jsx("div", { className: `${styles$1.segment} ${String(className)}`, style: style2, title: label ? `${label} ${formatDuration(segDuration)}` : formatDuration(segDuration) }, `seg-${seg.status}-${String(i)}`);
46292
- }) });
46293
- }
46294
- function getSegmentTags(segments, spanDuration2) {
46295
- const tags = [];
46296
- for (let i = 0; i < segments.length; i++) {
46297
- const seg = segments[i];
46298
- const label = SEGMENT_LABELS[seg.status];
46299
- if (!label)
46300
- continue;
46301
- let segDuration = (seg.endFraction - seg.startFraction) * spanDuration2;
46302
- if (segDuration < 1 && (seg.status === "succeeded" || seg.status === "failed") && i > 0) {
46303
- const prev = segments[i - 1];
46304
- if (prev.status === "running") {
46305
- segDuration = (prev.endFraction - prev.startFraction) * spanDuration2;
46306
- }
46307
- }
46308
- if (segDuration < 1)
46309
- continue;
46310
- tags.push({ label, duration: formatDuration(segDuration) });
46311
- }
46312
- return tags;
46313
- }
46314
- function TextContent({ node: node2, layout, durationMs, segmentTags }) {
46315
- const duration2 = node2.isInstrumentationHint ? getDuration(node2) : formatDuration(durationMs ?? node2.duration);
46316
- if (layout.isSmall && !layout.isHovered) {
46317
- return null;
46318
- }
46319
- const showTags = segmentTags && segmentTags.length > 0 && (layout.isHovered || layout.width > 200);
46320
- return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsxs("span", { className: styles$1.spanName, children: [node2.label || node2.span.name, showTags ? segmentTags.map((tag, i) => jsxRuntimeExports.jsxs("span", { className: styles$1.segmentTag, children: [" · ", tag.label, " ", tag.duration] }, i)) : null] }), layout.isHuge ? jsxRuntimeExports.jsx("span", { className: styles$1.spanSpacer }) : null, layout.isHovered || layout.width > 128 ? jsxRuntimeExports.jsx("span", { className: styles$1.spanDuration, children: duration2 }) : null] });
46321
- }
46322
- function DefaultContent({ node: node2, layout }) {
46323
- return jsxRuntimeExports.jsx(TextContent, { node: node2, layout });
46324
- }
46325
- function WorkflowContent({ resourceType, node: node2, layout, durationMs }) {
46326
- const spanDuration2 = durationMs ?? node2.duration;
46327
- const { segments } = computeSegments(resourceType, node2);
46328
- const segmentTags = getSegmentTags(segments, spanDuration2);
46329
- return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(SegmentLayer, { segments, spanDuration: spanDuration2 }), jsxRuntimeExports.jsx(TextContent, { durationMs: spanDuration2, node: node2, layout, segmentTags })] });
46330
- }
46331
- function RunContent(props) {
46332
- return jsxRuntimeExports.jsx(WorkflowContent, { resourceType: "run", ...props });
46333
- }
46334
- function StepContent(props) {
46335
- return jsxRuntimeExports.jsx(WorkflowContent, { resourceType: "step", ...props });
46336
- }
46337
- function HookContent(props) {
46338
- return jsxRuntimeExports.jsx(WorkflowContent, { resourceType: "hook", ...props });
46339
- }
46340
- function SleepContent(props) {
46341
- return jsxRuntimeExports.jsx(WorkflowContent, { resourceType: "sleep", ...props });
46342
- }
46343
- function SpanContent({ resourceType, ...props }) {
46344
- switch (resourceType) {
46345
- case "run":
46346
- return jsxRuntimeExports.jsx(RunContent, { ...props });
46347
- case "step":
46348
- return jsxRuntimeExports.jsx(StepContent, { ...props });
46349
- case "hook":
46350
- return jsxRuntimeExports.jsx(HookContent, { ...props });
46351
- case "sleep":
46352
- return jsxRuntimeExports.jsx(SleepContent, { ...props });
46353
- default:
46354
- return jsxRuntimeExports.jsx(DefaultContent, { ...props });
46355
- }
46356
- }
46357
- const MIN_SPAN_WIDTH = 4;
46358
- function getResourceType(node2) {
46359
- var _a3;
46360
- const resource = (_a3 = node2.span.attributes) == null ? void 0 : _a3.resource;
46361
- if (resource === "run" || resource === "step" || resource === "hook" || resource === "sleep") {
46362
- return resource;
46363
- }
46364
- return "default";
46365
- }
46366
- function computeIsSmall(actualWidth) {
46367
- return actualWidth < 64;
46368
- }
46369
- function computeIsHuge(actualWidth) {
46370
- return actualWidth >= 500;
46371
- }
46372
- function computeIsHovered(node2, isHuge) {
46373
- return node2.isHovered && !isHuge && node2.isHighlighted !== false;
46374
- }
46375
- function computeIsNearRightSide(node2, root2, scrollSnapshotRef, isHovered) {
46376
- if (!isHovered)
46377
- return false;
46378
- let visibleDuration = root2.duration;
46379
- let visibleEndTime = root2.endTime;
46380
- const snapshot = scrollSnapshotRef.current;
46381
- if (snapshot) {
46382
- visibleDuration = snapshot.endTime - snapshot.startTime;
46383
- visibleEndTime = snapshot.endTime;
46384
- }
46385
- return visibleEndTime - node2.startTime < 0.25 * visibleDuration;
46386
- }
46387
- function computeDefaultLayout(node2, root2, scale, scrollSnapshotRef) {
46388
- const left = (node2.startTime - root2.startTime) * scale;
46389
- let top = MARKER_HEIGHT + (ROW_HEIGHT + ROW_PADDING) * node2.row;
46390
- const actualWidth = node2.duration * scale;
46391
- const width = Math.max(actualWidth, MIN_SPAN_WIDTH);
46392
- let height = ROW_HEIGHT;
46393
- const isHuge = computeIsHuge(actualWidth);
46394
- const isSmall = computeIsSmall(actualWidth);
46395
- const isHovered = computeIsHovered(node2, isHuge);
46396
- const isExpanded = isHovered || Boolean(node2.isSelected);
46397
- if (isSmall && !isExpanded) {
46398
- height *= 0.4;
46399
- top += (ROW_HEIGHT - height) * 0.5;
46400
- }
46401
- const isNearRightSide = computeIsNearRightSide(node2, root2, scrollSnapshotRef, isExpanded);
46402
- return {
46403
- width,
46404
- actualWidth,
46405
- height,
46406
- top,
46407
- left,
46408
- isSmall,
46409
- isHuge,
46410
- isHovered,
46411
- isExpanded,
46412
- isNearRightSide
46413
- };
46414
- }
46415
- function getRunLayout(node2, root2, scale, scrollSnapshotRef) {
46416
- return computeDefaultLayout(node2, root2, scale, scrollSnapshotRef);
46417
- }
46418
- function getStepLayout(node2, root2, scale, scrollSnapshotRef) {
46419
- return computeDefaultLayout(node2, root2, scale, scrollSnapshotRef);
46420
- }
46421
- function getHookLayout(node2, root2, scale, scrollSnapshotRef) {
46422
- return computeDefaultLayout(node2, root2, scale, scrollSnapshotRef);
46423
- }
46424
- function getSleepLayout(node2, root2, scale, scrollSnapshotRef) {
46425
- return computeDefaultLayout(node2, root2, scale, scrollSnapshotRef);
46426
- }
46427
- function getSpanLayout(resourceType, node2, root2, scale, scrollSnapshotRef) {
46428
- switch (resourceType) {
46429
- case "run":
46430
- return getRunLayout(node2, root2, scale, scrollSnapshotRef);
46431
- case "step":
46432
- return getStepLayout(node2, root2, scale, scrollSnapshotRef);
46433
- case "hook":
46434
- return getHookLayout(node2, root2, scale, scrollSnapshotRef);
46435
- case "sleep":
46436
- return getSleepLayout(node2, root2, scale, scrollSnapshotRef);
46437
- default:
46438
- return computeDefaultLayout(node2, root2, scale, scrollSnapshotRef);
46439
- }
46440
- }
46441
- const getSpanColorClassName = (node2) => {
46442
- if (node2.isVercel)
46443
- return String(styles$1.colorVercel);
46444
- return String(styles$1[`color${node2.resourceIndex % 5}`]);
46445
- };
46446
- function getTerminalTimestamp(resourceType, node2) {
46447
- const events = node2.events;
46448
- if (!(events == null ? void 0 : events.length))
46449
- return void 0;
46450
- switch (resourceType) {
46451
- case "hook":
46452
- for (let i = events.length; i--; ) {
46453
- if (events[i].event.name === "hook_disposed") {
46454
- return events[i].timestamp;
46455
- }
46456
- }
46457
- return void 0;
46458
- case "sleep":
46459
- for (let i = events.length; i--; ) {
46460
- if (events[i].event.name === "wait_completed") {
46461
- return events[i].timestamp;
46462
- }
46463
- }
46464
- return void 0;
46465
- case "run":
46466
- for (let i = events.length; i--; ) {
46467
- const name2 = events[i].event.name;
46468
- if (name2 === "run_completed" || name2 === "run_failed" || name2 === "run_cancelled") {
46469
- return events[i].timestamp;
46470
- }
46471
- }
46472
- return void 0;
46473
- case "step":
46474
- for (let i = events.length; i--; ) {
46475
- const name2 = events[i].event.name;
46476
- if (name2 === "step_completed" || name2 === "step_failed") {
46477
- return events[i].timestamp;
46478
- }
46479
- if (name2 === "step_started" || name2 === "step_retrying") {
46480
- return void 0;
46481
- }
46482
- }
46483
- return void 0;
46484
- default:
46485
- return void 0;
46486
- }
46487
- }
46488
- reactExports.memo(function SpanNodes({ root: root2, scale, spans, isLive = false, scrollSnapshotRef, cache, customSpanClassNameFunc, customSpanEventClassNameFunc }) {
46489
- return spans.map((x2) => jsxRuntimeExports.jsx(SpanComponent, { cacheKey: cache.get(x2.span.spanId), customSpanEventClassNameFunc, customSpanClassNameFunc, node: x2, root: root2, scale, traceIsLive: isLive, scrollSnapshotRef }, x2.span.spanId));
46490
- });
46491
- function getSpanStyle(layout, node2, root2, scale) {
46492
- const expanded2 = layout.isExpanded;
46493
- return {
46494
- // Use actualWidth for CSS variable so hover expansion is accurate
46495
- "--span-width": `${Math.max(layout.actualWidth, 1)}px`,
46496
- minWidth: expanded2 ? layout.width : void 0,
46497
- width: expanded2 ? void 0 : layout.width,
46498
- height: layout.height,
46499
- maxWidth: expanded2 && !layout.isNearRightSide ? (root2.endTime - node2.startTime) * scale : void 0,
46500
- containIntrinsicWidth: expanded2 ? void 0 : layout.width,
46501
- containIntrinsicHeight: layout.height,
46502
- left: layout.isNearRightSide ? void 0 : layout.left,
46503
- right: layout.isNearRightSide ? (root2.endTime - node2.endTime) * scale : void 0,
46504
- top: layout.top
46505
- };
46506
- }
46507
- const SpanComponent = reactExports.memo(function SpanComponent2({ node: node2, root: root2, scale, traceIsLive = false, scrollSnapshotRef, customSpanClassNameFunc, customSpanEventClassNameFunc }) {
46508
- var _a3;
46509
- const ref = reactExports.useRef(null);
46510
- reactExports.useEffect(() => {
46511
- node2.ref = ref;
46512
- return () => {
46513
- node2.ref = void 0;
46514
- };
46515
- }, [node2]);
46516
- const { span } = node2;
46517
- const resourceType = getResourceType(node2);
46518
- const [liveNow, setLiveNow] = reactExports.useState(0);
46519
- const customClassName = customSpanClassNameFunc ? customSpanClassNameFunc(node2) : "";
46520
- const isWorkflowSpan = resourceType !== "default";
46521
- const data = (_a3 = span.attributes) == null ? void 0 : _a3.data;
46522
- const terminalTimestamp = getTerminalTimestamp(resourceType, node2);
46523
- const hasTerminalEvent = terminalTimestamp != null;
46524
- const isCompletedByData = resourceType === "hook" ? Boolean(data == null ? void 0 : data.disposedAt) : Boolean(data == null ? void 0 : data.completedAt);
46525
- const isCompleted = isCompletedByData || hasTerminalEvent;
46526
- const isLive = traceIsLive && isWorkflowSpan && !isCompleted;
46527
- reactExports.useEffect(() => {
46528
- if (!isLive)
46529
- return;
46530
- setLiveNow(Date.now());
46531
- const interval = setInterval(() => {
46532
- setLiveNow(Date.now());
46533
- }, 250);
46534
- return () => clearInterval(interval);
46535
- }, [isLive]);
46536
- const canonicalStartTime = getHighResInMs(span.startTime);
46537
- const canonicalEndTime = getHighResInMs(span.endTime);
46538
- const canonicalDuration = getHighResInMs(span.duration);
46539
- const canonicalActiveStartTime = span.activeStartTime ? getHighResInMs(span.activeStartTime) : void 0;
46540
- const durationMs = terminalTimestamp != null ? Math.max(0, terminalTimestamp - canonicalStartTime) : isLive ? Math.max(0, (liveNow || Date.now()) - canonicalStartTime) : canonicalDuration;
46541
- const duration2 = node2.isInstrumentationHint ? "Get Started" : formatDuration(durationMs);
46542
- const baseNode = {
46543
- ...node2,
46544
- startTime: canonicalStartTime,
46545
- endTime: canonicalEndTime,
46546
- duration: canonicalDuration,
46547
- activeStartTime: canonicalActiveStartTime
46548
- };
46549
- const segmentNode = isLive ? {
46550
- ...baseNode,
46551
- duration: durationMs,
46552
- endTime: canonicalStartTime + durationMs
46553
- } : baseNode;
46554
- const hasSegments2 = isWorkflowSpan && computeSegments(resourceType, segmentNode).segments.length > 0;
46555
- const layout = getSpanLayout(resourceType, segmentNode, root2, scale, scrollSnapshotRef);
46556
- if (isLive) {
46557
- const elapsed = durationMs;
46558
- const liveActualWidth = elapsed * scale;
46559
- const liveWidth = Math.max(liveActualWidth, 4);
46560
- layout.actualWidth = liveActualWidth;
46561
- layout.width = liveWidth;
46562
- layout.isSmall = liveActualWidth < 64;
46563
- layout.isHuge = liveActualWidth >= 500;
46564
- if (!layout.isSmall) {
46565
- layout.height = ROW_HEIGHT;
46566
- layout.top = MARKER_HEIGHT + (ROW_HEIGHT + ROW_PADDING) * segmentNode.row;
46567
- }
46568
- }
46569
- reactExports.useEffect(() => {
46570
- if (!isLive || !ref.current)
46571
- return;
46572
- let rafId = 0;
46573
- const tick = () => {
46574
- const $el = ref.current;
46575
- if (!$el)
46576
- return;
46577
- const elapsed = Date.now() - canonicalStartTime;
46578
- const w2 = Math.max(elapsed * scale, 2);
46579
- $el.style.width = `${w2}px`;
46580
- $el.style.setProperty("--span-width", `${w2}px`);
46581
- rafId = requestAnimationFrame(tick);
46582
- };
46583
- rafId = requestAnimationFrame(tick);
46584
- return () => cancelAnimationFrame(rafId);
46585
- }, [isLive, canonicalStartTime, scale]);
46586
- const renderNode = segmentNode;
46587
- return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("button", { "aria-label": `${span.name} - ${duration2}`, className: clsx(styles$1.spanNode, layout.isHuge && styles$1.huge, layout.isSmall && styles$1.small, layout.isExpanded && styles$1.xHover, node2.isHighlighted ? styles$1.colorHighlight : getSpanColorClassName(node2), node2.isHighlighted === false && styles$1.unlit, customClassName, hasSegments2 && styles$1.hasSegments), "data-span-id": span.spanId, "data-start-time": segmentNode.startTime - root2.startTime, "data-right-side": layout.isNearRightSide, "data-selected": node2.isSelected ? "" : void 0, ref, style: getSpanStyle(layout, segmentNode, root2, scale), type: "button", children: jsxRuntimeExports.jsx(SpanContent, { durationMs, resourceType, node: renderNode, layout }) }), segmentNode.events && !layout.isSmall ? segmentNode.events.map((x2) => jsxRuntimeExports.jsx(SpanEventComponent, { customSpanEventClassNameFunc, event: x2, node: segmentNode, root: root2, scale, asBoundary: isWorkflowSpan }, x2.key)) : null] });
46588
- });
46589
- const BOUNDARY_LABELS = {
46590
- step_started: "Started",
46591
- step_retrying: "Retrying",
46592
- step_failed: "Failed",
46593
- hook_created: "Created",
46594
- hook_received: "Received",
46595
- hook_disposed: "Resolved",
46596
- wait_created: "Sleep started",
46597
- wait_completed: "Sleep completed",
46598
- run_started: "Started",
46599
- run_completed: "Completed",
46600
- run_failed: "Run failed",
46601
- step_completed: "Completed",
46602
- attr_set: "Attributes set"
46603
- };
46604
- const SpanEventComponent = reactExports.memo(function SpanEventComponent2({ event, node: node2, root: root2, scale, customSpanEventClassNameFunc, asBoundary = false }) {
46605
- const ref = reactExports.useRef(null);
46606
- reactExports.useEffect(() => {
46607
- event.ref = ref;
46608
- return () => {
46609
- event.ref = void 0;
46610
- };
46611
- }, [event]);
46612
- const { event: { name: name2 } } = event;
46613
- const timestamp = formatDuration(event.timestamp - root2.startTime);
46614
- const displayLabel = asBoundary ? BOUNDARY_LABELS[name2] ?? name2 : name2;
46615
- const isForwardEvent = asBoundary && (name2 === "step_started" || name2 === "run_started" || name2 === "step_retrying");
46616
- const isTerminalEvent = asBoundary && (name2 === "step_completed" || name2 === "run_completed");
46617
- let phaseDuration = null;
46618
- let phaseLabel = null;
46619
- if ((isForwardEvent || isTerminalEvent) && node2.events) {
46620
- const sortedNodeEvents = [...node2.events].sort((a2, b2) => a2.timestamp - b2.timestamp);
46621
- const currentIdx = sortedNodeEvents.findIndex((e) => e.key === event.key);
46622
- if (isTerminalEvent) {
46623
- let prevStartTime = null;
46624
- for (let i = currentIdx - 1; i >= 0; i--) {
46625
- if (sortedNodeEvents[i].event.name === "step_started") {
46626
- prevStartTime = sortedNodeEvents[i].timestamp;
46627
- break;
46628
- }
46629
- }
46630
- if (prevStartTime !== null) {
46631
- phaseDuration = formatDuration(event.timestamp - prevStartTime);
46632
- phaseLabel = "Executed";
46633
- }
46634
- } else {
46635
- const nextEvent = sortedNodeEvents[currentIdx + 1];
46636
- const endTime = nextEvent ? nextEvent.timestamp : node2.endTime;
46637
- phaseDuration = formatDuration(endTime - event.timestamp);
46638
- phaseLabel = name2 === "step_retrying" ? "Waited" : "Executed";
46639
- }
46640
- }
46641
- const left = (event.timestamp - root2.startTime) * scale;
46642
- const top = MARKER_HEIGHT + (ROW_HEIGHT + ROW_PADDING) * node2.row;
46643
- const isLeftAligned = node2.duration <= 0 || (event.timestamp - node2.startTime) / node2.duration < 0.5;
46644
- const customClassName = customSpanEventClassNameFunc ? customSpanEventClassNameFunc(event) : "";
46645
- return jsxRuntimeExports.jsxs("div", { title: phaseDuration ? `${displayLabel} ${timestamp}
46646
- ${phaseLabel} ${phaseDuration}` : `${displayLabel} ${timestamp}`, className: clsx(styles$1.spanNodeEvent, customClassName, asBoundary && styles$1.boundaryMarker, node2.isHighlighted ? styles$1.colorHighlight : getSpanColorClassName(node2), node2.isHighlighted === false && styles$1.unlit), "data-hovered": event.isHovered, ref, style: {
46647
- left,
46648
- top
46649
- }, children: [jsxRuntimeExports.jsx("div", { className: clsx(styles$1.hoverInfo, isLeftAligned ? styles$1.alignStart : styles$1.alignEnd), children: asBoundary ? jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("span", { className: styles$1.eventName, children: displayLabel }), jsxRuntimeExports.jsx("span", { className: styles$1.eventTimestamp, children: timestamp }), phaseDuration ? jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("span", { className: styles$1.eventName, children: phaseLabel }), jsxRuntimeExports.jsx("span", { className: styles$1.eventTimestamp, children: phaseDuration })] }) : null] }) : jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("span", { className: styles$1.eventName, children: name2 }), jsxRuntimeExports.jsx("span", { className: styles$1.eventTimestamp, children: timestamp })] }) }), asBoundary ? jsxRuntimeExports.jsx("div", { className: styles$1.boundaryLine }) : jsxRuntimeExports.jsx("div", { className: styles$1.eventDiamond })] });
46650
- });
46651
- const colorTokenMap = {
46652
- "gray-700": "var(--ds-gray-700)",
46653
- "gray-900": "var(--ds-gray-900)"
46654
- };
46655
- function IconChevronDown({ size: size2 = 16 }) {
46656
- return jsxRuntimeExports.jsxs("svg", { width: size2, height: size2, viewBox: "0 0 24 24", fill: "none", "aria-hidden": true, className: styles$1.detailHeadingIcon, children: [jsxRuntimeExports.jsx("title", { children: "Chevron Down" }), jsxRuntimeExports.jsx("path", { d: "M6 9l6 6 6-6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })] });
46657
- }
46658
- function IconExternalSmall({ size: size2 = 16, color: color5 = "gray-900" }) {
46659
- const style2 = { color: colorTokenMap[color5] || color5 };
46660
- return jsxRuntimeExports.jsxs("svg", { width: size2, height: size2, viewBox: "0 0 24 24", fill: "none", style: style2, "aria-hidden": true, children: [jsxRuntimeExports.jsx("title", { children: "External Small" }), jsxRuntimeExports.jsx("path", { d: "M14 4h6m0 0v6m0-6L10 14", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), jsxRuntimeExports.jsx("path", { d: "M20 14v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })] });
46661
- }
46662
- function Link(props) {
46663
- const { as: asProp, className, href, children: children2, ...rest } = props;
46664
- const Element2 = asProp || "a";
46665
- if (Element2 === "span" || !href) {
46666
- return jsxRuntimeExports.jsx("span", { className, ...rest, children: children2 });
46667
- }
46668
- return jsxRuntimeExports.jsx("a", { className, href, ...rest, children: children2 });
46669
- }
46670
- function Skeleton({ width, height, rounded }) {
46671
- return jsxRuntimeExports.jsx("span", { className: clsx(styles$1.skeleton, rounded && styles$1.skeletonRounded), style: { width, height }, "aria-hidden": true });
46672
- }
46673
- const EXPANDED_STORAGE_KEY_PREFIX = "vc-trace-span-exp:";
46674
- function DetailGroup({ name: name2, className = "", children: children2 }) {
46675
- const [isExpanded, setIsExpanded] = reactExports.useState(() => {
46676
- if (!("localStorage" in globalThis))
46677
- return true;
46678
- return localStorage.getItem(`${EXPANDED_STORAGE_KEY_PREFIX}${name2}`) !== "0";
46679
- });
46680
- const toggleExpanded = reactExports.useCallback(() => {
46681
- setIsExpanded((x2) => {
46682
- const willBeExpanded = !x2;
46683
- localStorage.setItem(`${EXPANDED_STORAGE_KEY_PREFIX}${name2}`, String(Number(willBeExpanded)));
46684
- return willBeExpanded;
46685
- });
46686
- }, [name2]);
46687
- return jsxRuntimeExports.jsxs("div", { className: clsx(styles$1.detailGroup, isExpanded ? styles$1.expanded : styles$1.collapsed, className), children: [jsxRuntimeExports.jsxs("button", { className: styles$1.detailHeading, onClick: toggleExpanded, type: "button", children: [jsxRuntimeExports.jsx("span", { children: name2 }), jsxRuntimeExports.jsx(IconChevronDown, {})] }), isExpanded ? children2 : null] });
46688
- }
46689
- reactExports.memo(function EntrySpanLinks({ getQuickLinks, span }) {
46690
- const links = getQuickLinks(span);
46691
- if (!links.length)
46692
- return null;
46693
- return jsxRuntimeExports.jsx(DetailGroup, { name: "Links", children: links.map(({ key, value }) => jsxRuntimeExports.jsx(EntrySpanLink, { link: value, name: key }, key)) });
46694
- });
46695
- function usePromise(promise) {
46696
- const [_2, setLatest] = reactExports.useState({});
46697
- const fulfilled = promise.__resolvedValue !== void 0 || promise.__rejectedValue !== void 0;
46698
- reactExports.useEffect(() => {
46699
- if (fulfilled)
46700
- return;
46701
- promise.then((value) => {
46702
- promise.__resolvedValue = value;
46703
- }).catch((err) => {
46704
- promise.__rejectedValue = err;
46705
- }).finally(() => setLatest({}));
46706
- }, [promise, fulfilled]);
46707
- return promise.__resolvedValue;
46708
- }
46709
- function EntrySpanLink({ name: name2, link: linkPromise }) {
46710
- const link2 = usePromise(linkPromise);
46711
- return jsxRuntimeExports.jsxs(Link, { as: link2 ? void 0 : "span", className: clsx(styles$1.spanDetailPanelAttribute, styles$1.spanDetailPanelQuickLink), href: (link2 == null ? void 0 : link2.href) || "", children: [jsxRuntimeExports.jsx("span", { className: styles$1.spanDetailPanelAttributeKey, children: name2 }), jsxRuntimeExports.jsx("span", { className: clsx(styles$1.spanDetailPanelAttributeValue, styles$1.spanDetailPanelQuickLinkLabel), children: link2 ? jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [link2.label, link2.icon || jsxRuntimeExports.jsx(IconExternalSmall, { color: "gray-900" })] }) : jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(Skeleton, { height: 18, width: 32 + name2.length * 8 }), jsxRuntimeExports.jsx(Skeleton, { height: 18, rounded: true, width: 18 })] }) })] });
46712
- }
46713
- function useImmediateStyle(ref) {
46714
- const styleRef = reactExports.useRef({});
46715
- const setStyle = reactExports.useCallback((propertyName, value) => {
46716
- styleRef.current[propertyName] = value;
46717
- if (!ref.current)
46718
- return;
46719
- if (!value) {
46720
- ref.current.style.removeProperty(propertyName);
46721
- return;
46722
- }
46723
- ref.current.style.setProperty(propertyName, value);
46724
- }, [ref]);
46725
- return { setStyle, styleRef, style: { ...styleRef.current } };
46726
- }
46727
- const getDpi = () => {
46728
- if ("devicePixelRatio" in globalThis) {
46729
- return globalThis.devicePixelRatio || 1;
46730
- }
46731
- return 1;
46732
- };
46733
- const useDpi = () => {
46734
- const [dpi, setDpi] = reactExports.useState(1);
46735
- reactExports.useLayoutEffect(() => {
46736
- const onChange = () => setDpi(getDpi());
46737
- const media = matchMedia(`(resolution: ${dpi}dppx)`);
46738
- media.addEventListener("change", onChange);
46739
- onChange();
46740
- return () => {
46741
- media.removeEventListener("change", onChange);
46742
- };
46743
- }, [dpi]);
46744
- return dpi;
46745
- };
46746
- const padding = TIMELINE_PADDING;
46747
- reactExports.memo(function MiniMap({ timelineRef, rows, scale }) {
46748
- const { state: { root: root2, baseScale, timelineWidth, width: fullWidth, scrollbarWidth } } = useTraceViewer();
46749
- const mapWidth = fullWidth + TIMELINE_PADDING * 2;
46750
- const dpi = useDpi();
46751
- const containerRef = reactExports.useRef(null);
46752
- const canvasRef = reactExports.useRef(null);
46753
- const thumbRatio = fullWidth / (fullWidth - scrollbarWidth) * Math.min(fullWidth / timelineWidth, baseScale / scale);
46754
- const thumbWidth = Math.min(fullWidth, (timelineWidth - scrollbarWidth) * thumbRatio);
46755
- reactExports.useEffect(() => {
46756
- let isHeld = false;
46757
- let clientX = 0;
46758
- let rect;
46759
- const isValidEventTarget = (target2) => {
46760
- var _a3;
46761
- return Boolean((_a3 = containerRef.current) == null ? void 0 : _a3.contains(target2));
46762
- };
46763
- let nextFrame = 0;
46764
- const onFrame = () => {
46765
- if (!isHeld || !rect)
46766
- return;
46767
- const $timeline = timelineRef.current;
46768
- if (!$timeline)
46769
- return;
46770
- const x2 = clientX - thumbWidth * 0.5 - rect.left;
46771
- $timeline.scrollLeft = x2 / thumbRatio;
46772
- };
46773
- const onPointerMove = (event) => {
46774
- ({ clientX } = event);
46775
- cancelAnimationFrame(nextFrame);
46776
- nextFrame = requestAnimationFrame(onFrame);
46777
- };
46778
- const onPointerDown = (event) => {
46779
- var _a3;
46780
- if (!isValidEventTarget(event.target))
46781
- return;
46782
- isHeld = true;
46783
- rect = (_a3 = containerRef.current) == null ? void 0 : _a3.getBoundingClientRect();
46784
- onPointerMove(event);
46785
- };
46786
- const onPointerUp = () => {
46787
- isHeld = false;
46788
- rect = void 0;
46789
- };
46790
- const onTouchStart = (event) => {
46791
- if (!isValidEventTarget(event.target))
46792
- return;
46793
- if (event.cancelable) {
46794
- event.preventDefault();
46795
- }
46796
- };
46797
- const onTouchMove = (event) => {
46798
- if (!isHeld)
46799
- return;
46800
- if (event.cancelable) {
46801
- event.preventDefault();
46802
- }
46803
- };
46804
- window.addEventListener("pointerdown", onPointerDown);
46805
- window.addEventListener("pointermove", onPointerMove);
46806
- window.addEventListener("pointerup", onPointerUp);
46807
- window.addEventListener("blur", onPointerUp);
46808
- window.addEventListener("touchstart", onTouchStart, { passive: false });
46809
- window.addEventListener("touchmove", onTouchMove, { passive: false });
46810
- return () => {
46811
- window.removeEventListener("pointerdown", onPointerDown);
46812
- window.removeEventListener("pointermove", onPointerMove);
46813
- window.removeEventListener("pointerup", onPointerUp);
46814
- window.removeEventListener("blur", onPointerUp);
46815
- window.removeEventListener("touchstart", onTouchStart);
46816
- window.removeEventListener("touchmove", onTouchMove);
46817
- cancelAnimationFrame(nextFrame);
46818
- };
46819
- }, [timelineRef, thumbRatio, thumbWidth]);
46820
- reactExports.useEffect(() => {
46821
- const canvas = canvasRef.current;
46822
- const ctx = canvas == null ? void 0 : canvas.getContext("2d");
46823
- if (!canvas || !ctx)
46824
- return;
46825
- const render = () => {
46826
- ctx.resetTransform();
46827
- ctx.clearRect(0, 0, canvas.width, canvas.height);
46828
- ctx.scale(dpi, dpi);
46829
- const gap = 1;
46830
- const height = 3;
46831
- const ratio = (mapWidth - padding * 2) / root2.duration;
46832
- ctx.fillStyle = "#ccc";
46833
- ctx.beginPath();
46834
- for (const row of rows) {
46835
- for (const span of row) {
46836
- const y2 = padding - gap + (gap + height) * span.row;
46837
- if (y2 >= MAP_HEIGHT - height - padding)
46838
- break;
46839
- const x2 = padding + (span.startTime - root2.startTime) * ratio;
46840
- const width = span.duration * ratio;
46841
- ctx.roundRect(x2, y2, width, height, height);
46842
- }
46843
- }
46844
- ctx.fill();
46845
- };
46846
- const nextFrame = requestAnimationFrame(render);
46847
- return () => cancelAnimationFrame(nextFrame);
46848
- }, [dpi, root2, mapWidth, rows]);
46849
- const thumbRef = reactExports.useRef(null);
46850
- const { style: thumbStyle, setStyle: setThumbStyle } = useImmediateStyle(thumbRef);
46851
- reactExports.useLayoutEffect(() => {
46852
- const $timeline = timelineRef.current;
46853
- if (!$timeline)
46854
- return;
46855
- let nextFrame = 0;
46856
- const onFrame = () => {
46857
- setThumbStyle("transform", `translateX(${padding + $timeline.scrollLeft * thumbRatio}px)`);
46858
- };
46859
- onFrame();
46860
- const onScroll = () => {
46861
- cancelAnimationFrame(nextFrame);
46862
- nextFrame = requestAnimationFrame(onFrame);
46863
- };
46864
- $timeline.addEventListener("scroll", onScroll);
46865
- return () => {
46866
- cancelAnimationFrame(nextFrame);
46867
- $timeline.removeEventListener("scroll", onScroll);
46868
- };
46869
- }, [timelineRef, thumbRatio, setThumbStyle]);
46870
- return jsxRuntimeExports.jsxs("div", { className: styles$1.mapContainer, ref: containerRef, style: {
46871
- width: thumbWidth > 0 ? mapWidth : "100%",
46872
- height: MAP_HEIGHT
46873
- }, children: [jsxRuntimeExports.jsx("canvas", { className: styles$1.mapCanvas, height: MAP_HEIGHT * dpi, ref: canvasRef, style: { width: mapWidth, height: MAP_HEIGHT }, width: mapWidth * dpi }), jsxRuntimeExports.jsx("div", { className: styles$1.mapThumb, ref: thumbRef, style: {
46874
- transform: thumbStyle.transform,
46875
- width: thumbWidth > 0 ? thumbWidth : `calc(100% - ${TIMELINE_PADDING * 2}px)`,
46876
- top: 2,
46877
- height: MAP_HEIGHT - 4
46878
- } })] });
46879
- });
46880
45801
  const STREAM_SKELETON_ROWS = [
46881
45802
  { id: "stream-skeleton-row-1", width: "72%" },
46882
45803
  { id: "stream-skeleton-row-2", width: "58%" },
@@ -46884,7 +45805,7 @@ const STREAM_SKELETON_ROWS = [
46884
45805
  { id: "stream-skeleton-row-4", width: "64%" }
46885
45806
  ];
46886
45807
  function StreamViewerSkeleton() {
46887
- return jsxRuntimeExports.jsxs("output", { "aria-busy": "true", "aria-label": "Loading stream", className: "flex h-full min-h-0 w-full flex-col overflow-hidden bg-background-100", children: [jsxRuntimeExports.jsx("span", { className: "sr-only", children: "Loading stream…" }), jsxRuntimeExports.jsx("div", { className: "flex h-10 min-h-10 items-center border-b border-gray-alpha-400 px-3", children: jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3 w-10" }) }), jsxRuntimeExports.jsx("div", { className: "flex flex-col", children: STREAM_SKELETON_ROWS.map((row) => jsxRuntimeExports.jsxs("div", { className: "flex h-10 items-center gap-2 border-b border-gray-alpha-400 px-3", children: [jsxRuntimeExports.jsx(Skeleton$1, { className: "h-3", style: { width: row.width } }), jsxRuntimeExports.jsx(Skeleton$1, { className: "h-4 w-4 shrink-0 rounded-sm" })] }, row.id)) })] });
45808
+ return jsxRuntimeExports.jsxs("output", { "aria-busy": "true", "aria-label": "Loading stream", className: "flex h-full min-h-0 w-full flex-col overflow-hidden bg-background-100", children: [jsxRuntimeExports.jsx("span", { className: "sr-only", children: "Loading stream…" }), jsxRuntimeExports.jsx("div", { className: "flex h-10 min-h-10 items-center border-b border-gray-alpha-400 px-3", children: jsxRuntimeExports.jsx(Skeleton, { className: "h-3 w-10" }) }), jsxRuntimeExports.jsx("div", { className: "flex flex-col", children: STREAM_SKELETON_ROWS.map((row) => jsxRuntimeExports.jsxs("div", { className: "flex h-10 items-center gap-2 border-b border-gray-alpha-400 px-3", children: [jsxRuntimeExports.jsx(Skeleton, { className: "h-3", style: { width: row.width } }), jsxRuntimeExports.jsx(Skeleton, { className: "h-4 w-4 shrink-0 rounded-sm" })] }, row.id)) })] });
46888
45809
  }
46889
45810
  const ChunkRow = ReactExports.memo(function ChunkRow2({ chunk }) {
46890
45811
  return jsxRuntimeExports.jsxs("div", { className: "flex w-full items-start gap-1 border-b border-gray-alpha-400 px-3 py-2", children: [jsxRuntimeExports.jsx("div", { className: "min-w-0 flex-1", children: typeof chunk.value === "string" ? jsxRuntimeExports.jsx("span", { className: "whitespace-pre-wrap break-words text-label-12 font-mono text-gray-1000", children: chunk.value }) : jsxRuntimeExports.jsx(DataInspector, { data: chunk.value, expandLevel: 1 }) }), jsxRuntimeExports.jsx(CopyButton, { copyText: serializeForClipboard(chunk.value), ariaLabel: "Copy chunk", className: "shrink-0 -mr-1 [&>div]:h-4 [&>div]:w-4 [&_svg]:h-4 [&_svg]:w-4" })] });
@@ -47078,10 +45999,10 @@ function getPathValue(source, path2) {
47078
45999
  if (!source || typeof source !== "object")
47079
46000
  return void 0;
47080
46001
  let current = source;
47081
- for (const segment2 of path2.split(".")) {
47082
- if (!segment2)
46002
+ for (const segment of path2.split(".")) {
46003
+ if (!segment)
47083
46004
  return void 0;
47084
- current = getOwnProperty(current, segment2);
46005
+ current = getOwnProperty(current, segment);
47085
46006
  if (current === void 0)
47086
46007
  return void 0;
47087
46008
  }
@@ -47101,6 +46022,9 @@ function valueToSearchString(value) {
47101
46022
  return String(value);
47102
46023
  }
47103
46024
  }
46025
+ function getHighResInMs([seconds, nanoseconds]) {
46026
+ return seconds * 1e3 + nanoseconds / 1e6;
46027
+ }
47104
46028
  function computeRootBounds(spans) {
47105
46029
  let minStart = Number.POSITIVE_INFINITY;
47106
46030
  let maxEnd = Number.NEGATIVE_INFINITY;
@@ -47189,20 +46113,20 @@ function computeTimeMarkers(viewDuration, offset2) {
47189
46113
  const interval = pickInterval(viewDuration, maxTicks);
47190
46114
  const fractionDigits = interval >= MS_IN_SECOND ? 0 : Math.ceil(-Math.log10(interval / MS_IN_SECOND));
47191
46115
  const firstTick = Math.ceil(offset2 / interval) * interval;
47192
- const markers2 = [];
46116
+ const markers = [];
47193
46117
  for (let t = firstTick; t <= offset2 + viewDuration; t += interval) {
47194
46118
  const position2 = (t - offset2) / viewDuration;
47195
46119
  if (position2 < -0.01 || position2 > 1.01)
47196
46120
  continue;
47197
- markers2.push({
46121
+ markers.push({
47198
46122
  position: Math.min(Math.max(position2, 0), 1),
47199
46123
  label: fractionDigits === 0 ? formatDuration(Math.abs(t), true) : formatDurationPrecise(Math.abs(t), fractionDigits),
47200
46124
  value: t
47201
46125
  });
47202
- if (markers2.length >= MAX_MARKERS)
46126
+ if (markers.length >= MAX_MARKERS)
47203
46127
  break;
47204
46128
  }
47205
- return markers2;
46129
+ return markers;
47206
46130
  }
47207
46131
  function toViewportFrac(ms2, viewStart, range) {
47208
46132
  return Math.min(Math.max((ms2 - viewStart) / range, 0), 1);
@@ -47291,10 +46215,10 @@ function getResourceColor(resource) {
47291
46215
  function clampFraction(value) {
47292
46216
  return Math.max(0, Math.min(1, value));
47293
46217
  }
47294
- function timeToFraction(time2, spanStart, spanDuration2) {
47295
- if (spanDuration2 <= 0)
46218
+ function timeToFraction(time2, spanStart, spanDuration) {
46219
+ if (spanDuration <= 0)
47296
46220
  return 0;
47297
- return clampFraction((time2 - spanStart) / spanDuration2);
46221
+ return clampFraction((time2 - spanStart) / spanDuration);
47298
46222
  }
47299
46223
  function sortedEventMarks(events, relevantNames) {
47300
46224
  return events.filter((e) => relevantNames.includes(e.name)).map((e) => ({ time: getHighResInMs(e.timestamp), type: e.name })).sort((a2, b2) => a2.time - b2.time);
@@ -47472,12 +46396,12 @@ function computeSpanMarkers(span) {
47472
46396
  timeMs: mark2.time
47473
46397
  }));
47474
46398
  }
47475
- function computeOffscreenMarkers(markers2, visibleStartMs, visibleEndMs) {
46399
+ function computeOffscreenMarkers(markers, visibleStartMs, visibleEndMs) {
47476
46400
  let leftCount = 0;
47477
46401
  let rightCount = 0;
47478
46402
  let nearestLeft = Number.NEGATIVE_INFINITY;
47479
46403
  let nearestRight = Number.POSITIVE_INFINITY;
47480
- for (const { timeMs } of markers2) {
46404
+ for (const { timeMs } of markers) {
47481
46405
  if (timeMs < visibleStartMs) {
47482
46406
  leftCount++;
47483
46407
  if (timeMs > nearestLeft)
@@ -47565,11 +46489,11 @@ function scrollRowIntoView(listEl, index2, rowHeight, opts) {
47565
46489
  behavior: opts == null ? void 0 : opts.behavior
47566
46490
  });
47567
46491
  }
47568
- function projectMarkers(markers2, visibleStartMs, visibleEndMs) {
46492
+ function projectMarkers(markers, visibleStartMs, visibleEndMs) {
47569
46493
  const visibleDurationMs = visibleEndMs - visibleStartMs;
47570
46494
  if (visibleDurationMs <= 0)
47571
46495
  return [];
47572
- return markers2.flatMap((m2) => {
46496
+ return markers.flatMap((m2) => {
47573
46497
  if (m2.timeMs < visibleStartMs || m2.timeMs > visibleEndMs) {
47574
46498
  return [];
47575
46499
  }
@@ -47597,8 +46521,8 @@ function cullCollidingMarkers(projected, pixelWidth) {
47597
46521
  function MarkerTick({ className }) {
47598
46522
  return jsxRuntimeExports.jsx("span", { className: cn$4("block w-[3px] rounded-full bg-gray-1000", className) });
47599
46523
  }
47600
- function MarkerLayer({ markers: markers2 }) {
47601
- return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: markers2.map((m2) => jsxRuntimeExports.jsx("span", { className: "pointer-events-auto absolute top-0 bottom-0 z-10 flex w-8 -translate-x-1/2 items-center justify-center", style: { left: `clamp(8px, ${m2.leftPct}%, calc(100% - 8px))` }, children: jsxRuntimeExports.jsx(TimestampTooltip, { date: m2.timeMs, children: jsxRuntimeExports.jsx("span", { className: "flex h-6 w-8 items-center justify-center", children: jsxRuntimeExports.jsx(MarkerTick, { className: "h-3" }) }) }) }, m2.timeMs)) });
46524
+ function MarkerLayer({ markers }) {
46525
+ return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: markers.map((m2) => jsxRuntimeExports.jsx("span", { className: "pointer-events-auto absolute top-0 bottom-0 z-10 flex w-8 -translate-x-1/2 items-center justify-center", style: { left: `clamp(8px, ${m2.leftPct}%, calc(100% - 8px))` }, children: jsxRuntimeExports.jsx(TimestampTooltip, { date: m2.timeMs, children: jsxRuntimeExports.jsx("span", { className: "flex h-6 w-8 items-center justify-center", children: jsxRuntimeExports.jsx(MarkerTick, { className: "h-3" }) }) }) }, m2.timeMs)) });
47602
46526
  }
47603
46527
  function OffscreenMarkerIndicator({ direction, count: count2, targetMs, onReveal }) {
47604
46528
  const Chevron = direction === "right" ? ArrowRight : ArrowLeft;
@@ -47752,9 +46676,9 @@ const TimelineBar = reactExports.memo(function TimelineBar2({ span, viewStart, v
47752
46676
  const baseSegments = reactExports.useMemo(() => computeSpanSegments(span), [span]);
47753
46677
  const segments = reactExports.useMemo(() => geometry.mode.kind === "full" ? projectSegments(baseSegments, startMs, totalDurationMs, geometry) : [], [geometry, baseSegments, startMs, totalDurationMs]);
47754
46678
  const baseMarkers = reactExports.useMemo(() => computeSpanMarkers(span), [span]);
47755
- const markers2 = reactExports.useMemo(() => geometry.mode.kind === "full" ? cullCollidingMarkers(projectMarkers(baseMarkers, geometry.visibleStartMs, geometry.visibleEndMs), geometry.visiblePixelWidth) : [], [geometry, baseMarkers]);
46679
+ const markers = reactExports.useMemo(() => geometry.mode.kind === "full" ? cullCollidingMarkers(projectMarkers(baseMarkers, geometry.visibleStartMs, geometry.visibleEndMs), geometry.visiblePixelWidth) : [], [geometry, baseMarkers]);
47756
46680
  const offscreen = reactExports.useMemo(() => geometry.mode.kind === "full" ? computeOffscreenMarkers(baseMarkers, geometry.visibleStartMs, geometry.visibleEndMs) : { left: null, right: null }, [geometry, baseMarkers]);
47757
- const hasMarkers = markers2.length > 0 || offscreen.left !== null || offscreen.right !== null;
46681
+ const hasMarkers = markers.length > 0 || offscreen.left !== null || offscreen.right !== null;
47758
46682
  const isErrored = isSpanErrored(span);
47759
46683
  const colors = getResourceColor(span.resource);
47760
46684
  const fallbackBg = isErrored ? colors.errorBg ?? "var(--ds-red-200)" : colors.bg;
@@ -47764,7 +46688,7 @@ const TimelineBar = reactExports.memo(function TimelineBar2({ span, viewStart, v
47764
46688
  const handleClick = reactExports.useCallback(() => {
47765
46689
  onSelect(span.spanId);
47766
46690
  }, [onSelect, span.spanId]);
47767
- return jsxRuntimeExports.jsx("div", { role: "treeitem", "aria-selected": isSelected, "aria-expanded": isSelected, "aria-level": 1, className: cn$4("group/timeline-row h-10 relative flex items-center hover:bg-gray-100 aria-selected:bg-gray-100 aria-selected:hover:bg-gray-200 transition-opacity", isDimmed && "opacity-35"), onClick: handleClick, children: jsxRuntimeExports.jsxs("div", { className: "absolute inset-y-0", style: TIMELINE_INSET_STYLE, children: [jsxRuntimeExports.jsx("div", { className: "absolute top-1/2 h-6 -translate-y-1/2 overflow-hidden rounded-[0.25rem]", style: getBarPositionStyle(geometry), children: geometry.mode.kind === "arrow" ? jsxRuntimeExports.jsx(BoundaryArrow, { direction: geometry.mode.direction }) : geometry.mode.kind === "tiny" ? jsxRuntimeExports.jsx("div", { className: "h-6 rounded-[0.25rem] border", style: { background: fallbackBg, borderColor: fallbackBorder } }) : segments.length > 0 ? jsxRuntimeExports.jsx(SegmentBar, { segments, showLabels: !hasMarkers }) : jsxRuntimeExports.jsx(PlainBar, { bg: fallbackBg, border: fallbackBorder, label: showTotalLabel ? totalLabel : null }) }), hasMarkers ? jsxRuntimeExports.jsxs("div", { className: "pointer-events-none absolute top-1/2 h-6 -translate-y-1/2", style: getBarPositionStyle(geometry), children: [markers2.length > 0 ? jsxRuntimeExports.jsx(MarkerLayer, { markers: markers2 }) : null, offscreen.left ? jsxRuntimeExports.jsx(OffscreenMarkerIndicator, { direction: "left", count: offscreen.left.count, targetMs: offscreen.left.nearestMs, onReveal: onRevealTime }) : null, offscreen.right ? jsxRuntimeExports.jsx(OffscreenMarkerIndicator, { direction: "right", count: offscreen.right.count, targetMs: offscreen.right.nearestMs, onReveal: onRevealTime }) : null, showTotalLabel ? jsxRuntimeExports.jsx(DurationLabel, {
46691
+ return jsxRuntimeExports.jsx("div", { role: "treeitem", "aria-selected": isSelected, "aria-expanded": isSelected, "aria-level": 1, className: cn$4("group/timeline-row h-10 relative flex items-center hover:bg-gray-100 aria-selected:bg-gray-100 aria-selected:hover:bg-gray-200 transition-opacity", isDimmed && "opacity-35"), onClick: handleClick, children: jsxRuntimeExports.jsxs("div", { className: "absolute inset-y-0", style: TIMELINE_INSET_STYLE, children: [jsxRuntimeExports.jsx("div", { className: "absolute top-1/2 h-6 -translate-y-1/2 overflow-hidden rounded-[0.25rem]", style: getBarPositionStyle(geometry), children: geometry.mode.kind === "arrow" ? jsxRuntimeExports.jsx(BoundaryArrow, { direction: geometry.mode.direction }) : geometry.mode.kind === "tiny" ? jsxRuntimeExports.jsx("div", { className: "h-6 rounded-[0.25rem] border", style: { background: fallbackBg, borderColor: fallbackBorder } }) : segments.length > 0 ? jsxRuntimeExports.jsx(SegmentBar, { segments, showLabels: !hasMarkers }) : jsxRuntimeExports.jsx(PlainBar, { bg: fallbackBg, border: fallbackBorder, label: showTotalLabel ? totalLabel : null }) }), hasMarkers ? jsxRuntimeExports.jsxs("div", { className: "pointer-events-none absolute top-1/2 h-6 -translate-y-1/2", style: getBarPositionStyle(geometry), children: [markers.length > 0 ? jsxRuntimeExports.jsx(MarkerLayer, { markers }) : null, offscreen.left ? jsxRuntimeExports.jsx(OffscreenMarkerIndicator, { direction: "left", count: offscreen.left.count, targetMs: offscreen.left.nearestMs, onReveal: onRevealTime }) : null, offscreen.right ? jsxRuntimeExports.jsx(OffscreenMarkerIndicator, { direction: "right", count: offscreen.right.count, targetMs: offscreen.right.nearestMs, onReveal: onRevealTime }) : null, showTotalLabel ? jsxRuntimeExports.jsx(DurationLabel, {
47768
46692
  label: totalLabel,
47769
46693
  // Shift clear of the left edge indicator so it isn't covered.
47770
46694
  className: offscreen.left ? "pl-10" : void 0
@@ -47795,10 +46719,10 @@ const DeltaMeasureLine = reactExports.memo(function DeltaMeasureLine2({ delta, a
47795
46719
  height: guideBottom - guideTop
47796
46720
  } }), jsxRuntimeExports.jsx("div", { className: "absolute h-px bg-amber-800", style: { left: startX, width: Math.max(endX - startX, 1), top: lineY } }), jsxRuntimeExports.jsx("span", { className: cn$4("absolute -translate-y-1/2 font-mono text-[10px] font-medium leading-none tabular-nums whitespace-nowrap rounded-xs bg-background-100 px-1 py-0.5 text-amber-800", labelPlacement.translate), style: { left: labelPlacement.left, top: lineY }, children: label })] });
47797
46721
  });
47798
- function TimelineHeader({ markers: markers2, hoverInfo: hoverInfo2 }) {
47799
- return jsxRuntimeExports.jsx("div", { className: "relative bg-background-100 border-b border-gray-alpha-400 h-10 min-h-10 flex items-end px-4 pb-1", children: jsxRuntimeExports.jsxs("div", { className: "relative h-full flex-1", children: [markers2.map((m2) => jsxRuntimeExports.jsx("span", { className: "absolute bottom-1 font-mono text-xs font-normal leading-4 text-gray-900 whitespace-nowrap", style: { left: `${m2.position * 100}%` }, children: m2.label }, String(m2.value))), hoverInfo2 && jsxRuntimeExports.jsx("span", { className: "absolute top-1 pointer-events-none z-10 font-mono text-[11px] leading-4 text-gray-1000 whitespace-nowrap bg-background-100 border border-gray-alpha-400 rounded px-1 -translate-x-1/2", style: { left: `${hoverInfo2.fraction * 100}%` }, children: hoverInfo2.label })] }) });
46722
+ function TimelineHeader({ markers, hoverInfo }) {
46723
+ return jsxRuntimeExports.jsx("div", { className: "relative bg-background-100 border-b border-gray-alpha-400 h-10 min-h-10 flex items-end px-4 pb-1", children: jsxRuntimeExports.jsxs("div", { className: "relative h-full flex-1", children: [markers.map((m2) => jsxRuntimeExports.jsx("span", { className: "absolute bottom-1 text-label-12-mono text-gray-900 whitespace-nowrap", style: { left: `${m2.position * 100}%` }, children: m2.label }, String(m2.value))), hoverInfo && jsxRuntimeExports.jsx("span", { className: "absolute top-1 pointer-events-none z-10 font-mono text-[11px] leading-4 text-gray-1000 whitespace-nowrap bg-background-100 border border-gray-alpha-400 rounded px-1 -translate-x-1/2", style: { left: `${hoverInfo.fraction * 100}%` }, children: hoverInfo.label })] }) });
47800
46724
  }
47801
- function Timeline({ spans, viewStart, viewEnd, markers: markers2, selectedId, searchResult, onSelect, onRevealTime, hover, altHeld = false }) {
46725
+ function Timeline({ spans, viewStart, viewEnd, markers, selectedId, searchResult, onSelect, onRevealTime, hover, altHeld = false }) {
47802
46726
  const containerRef = reactExports.useRef(null);
47803
46727
  const [containerWidth, setContainerWidth] = reactExports.useState(0);
47804
46728
  const viewDuration = viewEnd - viewStart;
@@ -47837,9 +46761,9 @@ function Timeline({ spans, viewStart, viewEnd, markers: markers2, selectedId, se
47837
46761
  const delta = computeSpanDelta(anchorSpan, hoveredSpan, viewStart, viewEnd);
47838
46762
  return delta ? { delta, anchorRowIndex: anchorIndex, hoveredRowIndex: hover.rowIndex } : null;
47839
46763
  }, [altHeld, anchorIndex, hover, spans, viewStart, viewEnd]);
47840
- return jsxRuntimeExports.jsxs("div", { ref: containerRef, className: "relative h-full overflow-hidden", style: { minHeight: spans.length * ROW_HEIGHT_PX }, children: [jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "absolute inset-y-0 pointer-events-none", style: TIMELINE_INSET_STYLE, children: markers2.map((marker2) => (
46764
+ return jsxRuntimeExports.jsxs("div", { ref: containerRef, className: "relative h-full overflow-hidden", style: { minHeight: spans.length * ROW_HEIGHT_PX }, children: [jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "absolute inset-y-0 pointer-events-none", style: TIMELINE_INSET_STYLE, children: markers.map((marker) => (
47841
46765
  // Skip the "0s" origin marker since the left edge already implies it.
47842
- Math.abs(marker2.value) > 1e-6 ? jsxRuntimeExports.jsx("div", { className: "absolute top-0 bottom-0 w-px bg-gray-alpha-300", style: { left: `${marker2.position * 100}%` } }, String(marker2.value)) : null
46766
+ Math.abs(marker.value) > 1e-6 ? jsxRuntimeExports.jsx("div", { className: "absolute top-0 bottom-0 w-px bg-gray-alpha-300", style: { left: `${marker.position * 100}%` } }, String(marker.value)) : null
47843
46767
  )) }), hover != null && jsxRuntimeExports.jsx("div", { className: "absolute inset-y-0 pointer-events-none z-10", style: TIMELINE_INSET_STYLE, children: jsxRuntimeExports.jsx("div", { className: "absolute top-0 bottom-0 w-px bg-gray-alpha-500", style: { left: `${hover.fraction * 100}%` } }) }), jsxRuntimeExports.jsx("div", { style: { transform: `translateY(${start * ROW_HEIGHT_PX}px)` }, children: spans.slice(start, end).map((span) => jsxRuntimeExports.jsx(TimelineBar, { span, viewStart, viewDuration, containerWidth: timelineWidth, isSelected: selectedId === span.spanId, isDimmed: isSpanDimmedBySearch(span.spanId, searchResult), onSelect, onRevealTime }, span.spanId)) }), altHeld && anchorIndex < 0 && jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "absolute inset-y-0 pointer-events-none", style: TIMELINE_INSET_STYLE, children: gapMeasurements.map((gap) => jsxRuntimeExports.jsx(DeltaMeasureLine, { ...gap, timelineWidth }, gap.anchorRowIndex)) }), measurement && jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "absolute inset-y-0 pointer-events-none z-20", style: TIMELINE_INSET_STYLE, children: jsxRuntimeExports.jsx(DeltaMeasureLine, { ...measurement, timelineWidth }) })] });
47844
46768
  }
47845
46769
  const CANVAS_PAD_Y_PX = 6;
@@ -50560,7 +49484,7 @@ export {
50560
49484
  RESERVED_ATTRIBUTE_KEY_PREFIX as a2,
50561
49485
  Spinner as a3,
50562
49486
  ContextCardProvider as a4,
50563
- Skeleton$1 as a5,
49487
+ Skeleton as a5,
50564
49488
  DecryptClickContext as a6,
50565
49489
  Yr as a7,
50566
49490
  isEncryptedMarker$1 as a8,
@@ -50594,11 +49518,11 @@ export {
50594
49518
  apiBase as a_,
50595
49519
  formatDuration as aa,
50596
49520
  DataInspector as ab,
50597
- isHookLifecycleEventType as ac,
50598
- isTerminalStepEventType as ad,
50599
- isWaitEventType as ae,
50600
- isStepEventType as af,
50601
- _r as ag,
49521
+ _r as ac,
49522
+ isHookLifecycleEventType as ad,
49523
+ isTerminalStepEventType as ae,
49524
+ isWaitEventType as af,
49525
+ isStepEventType as ag,
50602
49526
  RunClickContext as ah,
50603
49527
  StreamClickContext as ai,
50604
49528
  Collapsible as aj,