@w6w/ui 0.2.54 → 0.2.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,27 +1,27 @@
1
1
  "use client";
2
2
  var xn = Object.defineProperty;
3
3
  var Cn = (e, n, a) => n in e ? xn(e, n, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[n] = a;
4
- var ve = (e, n, a) => Cn(e, typeof n != "symbol" ? n + "" : n, a);
5
- import { U as Jt, bk as Sn, J as le, bz as $n, aM as ze, bJ as bt, aL as Se, aG as Tn, X as An, bK as Rn, aB as re, N as En, bL as _n, bM as On, aX as _e, bB as oe, bN as In, bO as Be, bP as Pn, bQ as Ln, bR as Mn } from "./node-samples-DkJL07EX.js";
6
- import { bS as ll, bx as il, aE as rl, bT as ol, bU as cl, bV as dl, bW as ul, aA as wl, bX as ml, bY as hl, b2 as pl, bE as fl, bm as gl, b3 as yl, bZ as vl, b_ as Nl, aH as bl, b$ as kl, c0 as xl, c1 as Cl, c2 as Sl, c3 as $l, c4 as Tl, c5 as Al, am as Rl, c6 as El, c7 as _l, c8 as Ol, c9 as Il, ca as Pl, cb as Ll, b1 as Ml, cc as Dl, Q as Ul, cd as Bl, ce as Fl, cf as Jl, cg as jl, ch as Kl, u as Wl, b0 as Vl } from "./node-samples-DkJL07EX.js";
4
+ var Ne = (e, n, a) => Cn(e, typeof n != "symbol" ? n + "" : n, a);
5
+ import { U as jt, bl as Sn, J as le, bA as $n, aN as ze, bN as bt, aM as Se, aH as Tn, X as An, bO as Rn, aC as re, N as En, bP as _n, bQ as On, aY as _e, bG as In, bC as oe, bR as Pn, bS as Fe, bT as Mn, bU as Ln, bV as Dn } from "./connection-app-meta-ZCPakGjD.js";
6
+ import { bE as sl, by as ll, aF as il, bW as rl, bX as ol, bY as cl, bZ as dl, aB as ul, b_ as wl, b$ as ml, b3 as hl, bI as pl, bn as fl, b4 as gl, c0 as yl, c1 as Nl, aI as vl, c2 as bl, c3 as kl, c4 as xl, c5 as Cl, c6 as Sl, c7 as $l, c8 as Tl, c9 as Al, an as Rl, ca as El, cb as _l, cc as Ol, cd as Il, ce as Pl, cf as Ml, b2 as Ll, cg as Dl, Q as Ul, ch as Fl, ci as Bl, cj as jl, ck as Jl, cl as Kl, u as Wl, b1 as Vl } from "./connection-app-meta-ZCPakGjD.js";
7
7
  import { jsx as t, jsxs as i, Fragment as E } from "react/jsx-runtime";
8
- import { useMemo as Ye, useState as b, useEffect as H, useId as Dn, useRef as jt } from "react";
9
- import { u as Un, b as Bn, c as Fn, a as Jn, I as Ge, C as $e } from "./CodeBlock-C-oIIYfC.js";
8
+ import { useMemo as Ye, useState as b, useEffect as H, useId as Un, useRef as Jt } from "react";
9
+ import { u as Fn, b as Bn, c as jn, a as Jn, I as Ge, C as $e } from "./CodeBlock-C-oIIYfC.js";
10
10
  import { i as Hl } from "./CodeBlock-C-oIIYfC.js";
11
- import { yaml as jn } from "@codemirror/lang-yaml";
12
- import { EditorView as Kn } from "@codemirror/view";
13
- import Wn from "@uiw/react-codemirror";
14
- class Ne extends Error {
11
+ import { yaml as Kn } from "@codemirror/lang-yaml";
12
+ import { EditorView as Wn } from "@codemirror/view";
13
+ import Vn from "@uiw/react-codemirror";
14
+ class ve extends Error {
15
15
  constructor(a, s, r, o) {
16
16
  super(r);
17
- ve(this, "status");
18
- ve(this, "code");
17
+ Ne(this, "status");
18
+ Ne(this, "code");
19
19
  /**
20
20
  * The parsed error response body, when the server sent one. Carries the
21
21
  * fields that ride alongside an error — e.g. an invoke's `logs` and
22
22
  * `apiCalls` — which the message alone would drop.
23
23
  */
24
- ve(this, "body");
24
+ Ne(this, "body");
25
25
  this.name = "ApiError", this.status = a, this.code = s, this.body = o;
26
26
  }
27
27
  }
@@ -34,30 +34,30 @@ function ms(e) {
34
34
  try {
35
35
  f = await a(`${n}${l}`, { ...c, headers: d });
36
36
  } catch (w) {
37
- throw new Ne(
37
+ throw new ve(
38
38
  0,
39
39
  "network_error",
40
40
  `Could not reach the w6w server (${(c == null ? void 0 : c.method) ?? "GET"} ${n}${l}). It may be down or unreachable. (${w.message})`
41
41
  );
42
42
  }
43
43
  const h = await f.text();
44
- let v = null;
44
+ let N = null;
45
45
  if (h)
46
46
  try {
47
- v = JSON.parse(h);
47
+ N = JSON.parse(h);
48
48
  } catch {
49
49
  if (!f.ok)
50
- throw new Ne(
50
+ throw new ve(
51
51
  f.status,
52
52
  "bad_response",
53
53
  `Server returned a non-JSON ${f.status} response: ${h.slice(0, 200)}`
54
54
  );
55
55
  }
56
56
  if (!f.ok) {
57
- const w = (v == null ? void 0 : v.error) ?? {};
58
- throw new Ne(f.status, w.code ?? "error", w.message ?? f.statusText, v);
57
+ const w = (N == null ? void 0 : N.error) ?? {};
58
+ throw new ve(f.status, w.code ?? "error", w.message ?? f.statusText, N);
59
59
  }
60
- return { status: f.status, data: v };
60
+ return { status: f.status, data: N };
61
61
  }
62
62
  async function o(l, c) {
63
63
  const { data: d } = await r(l, c);
@@ -86,7 +86,7 @@ function ms(e) {
86
86
  try {
87
87
  return await l();
88
88
  } catch (c) {
89
- if (c instanceof Ne && (c.code === "snapshot_expired" || c.code === "unknown_snapshot"))
89
+ if (c instanceof ve && (c.code === "snapshot_expired" || c.code === "unknown_snapshot"))
90
90
  return await l();
91
91
  throw c;
92
92
  }
@@ -96,8 +96,8 @@ function ms(e) {
96
96
  listAppsByIds: async (l) => {
97
97
  const c = Array.from(new Set(l)), d = [];
98
98
  for (let u = 0; u < c.length; u += 100) {
99
- const h = c.slice(u, u + 100).map(encodeURIComponent).join(","), v = await o(`/apps?ids=${h}`);
100
- d.push(...v.apps);
99
+ const h = c.slice(u, u + 100).map(encodeURIComponent).join(","), N = await o(`/apps?ids=${h}`);
100
+ d.push(...N.apps);
101
101
  }
102
102
  return d;
103
103
  },
@@ -285,7 +285,7 @@ function Xe({
285
285
  }
286
286
  ) : /* @__PURE__ */ t("div", { className: u, "aria-label": c, children: d });
287
287
  }
288
- function Fe(e) {
288
+ function Be(e) {
289
289
  const n = Date.parse(e);
290
290
  if (Number.isNaN(n)) return "";
291
291
  const a = Math.max(0, Math.round((Date.now() - n) / 1e3));
@@ -303,7 +303,7 @@ function kt(e) {
303
303
  a.key && a.default !== void 0 && (n[a.key] = a.default);
304
304
  return n;
305
305
  }
306
- function Vn(e) {
306
+ function qn(e) {
307
307
  var a, s, r;
308
308
  const n = e.indexOf("{");
309
309
  if (n >= 0)
@@ -320,10 +320,10 @@ function Vn(e) {
320
320
  function Kt(e) {
321
321
  return typeof e == "object" && e !== null && typeof e.status == "number" && typeof e.code == "string";
322
322
  }
323
- function qn(e) {
323
+ function Hn(e) {
324
324
  if (!Kt(e))
325
325
  return { headline: (e == null ? void 0 : e.message) ?? "The action failed to run." };
326
- const n = Vn(e.message ?? ""), a = `${e.status} ${e.code} ${e.message ?? ""}`.toLowerCase();
326
+ const n = qn(e.message ?? ""), a = `${e.status} ${e.code} ${e.message ?? ""}`.toLowerCase();
327
327
  return e.status === 401 || e.status === 403 || /\b(401|403)\b|forbidden|unauthorized|not authorized|permission|scope|access denied|invalid api key|invalid credential/.test(
328
328
  a
329
329
  ) ? {
@@ -332,11 +332,11 @@ function qn(e) {
332
332
  detail: n
333
333
  } : { headline: "The action returned an error.", detail: n };
334
334
  }
335
- function Hn(e) {
335
+ function zn(e) {
336
336
  const n = Kt(e) ? e.body ?? e.raw : null;
337
337
  return (n == null ? void 0 : n.apiCalls) ?? [];
338
338
  }
339
- function Je() {
339
+ function je() {
340
340
  const [e, n] = b(""), [a, s] = b(void 0), [r, o] = b(!1);
341
341
  return { text: e, value: a, invalid: r, onChange: (c) => {
342
342
  n(c);
@@ -366,20 +366,20 @@ function hs({
366
366
  onDeleted: u,
367
367
  embedded: f = !1
368
368
  }) {
369
- var vt;
370
- const h = Jt(), v = Ye(() => {
369
+ var Nt;
370
+ const h = jt(), N = Ye(() => {
371
371
  const p = [...n];
372
- return p.sort((T, M) => (T.title || T.key).localeCompare(M.title || M.key)), p;
373
- }, [n]), [w, m] = b((s == null ? void 0 : s.key) ?? ""), y = s ?? n.find((p) => p.key === w) ?? null, [g, A] = b(!1), [k, N] = b(null), [$, x] = b(void 0), [R, _] = b([]), U = Je(), O = Je(), S = Je(), [L, ee] = b(""), [F, J] = b(""), B = U.invalid || O.invalid || S.invalid, te = () => {
372
+ return p.sort((T, L) => (T.title || T.key).localeCompare(L.title || L.key)), p;
373
+ }, [n]), [w, m] = b((s == null ? void 0 : s.key) ?? ""), y = s ?? n.find((p) => p.key === w) ?? null, [g, A] = b(!1), [k, v] = b(null), [$, x] = b(void 0), [R, _] = b([]), U = je(), O = je(), S = je(), [M, ee] = b(""), [B, j] = b(""), F = U.invalid || O.invalid || S.invalid, te = () => {
374
374
  const p = {};
375
- return U.text.trim() !== "" && U.value !== void 0 && (p.body = U.value), O.text.trim() !== "" && O.value !== void 0 && (p.query = O.value), S.text.trim() !== "" && S.value !== void 0 && (p.headers = S.value), L && (p.target = L), F.trim() !== "" && (p.match = F.trim()), Object.keys(p).length > 0 ? p : void 0;
376
- }, [Y, X] = b("form"), [Oe, we] = b(""), [Ie, Q] = b(!1), [C, I] = b(!1), P = (y == null ? void 0 : y.key) ?? null, j = r ? { ...r } : kt(y), [rt, me] = b(() => ({
375
+ return U.text.trim() !== "" && U.value !== void 0 && (p.body = U.value), O.text.trim() !== "" && O.value !== void 0 && (p.query = O.value), S.text.trim() !== "" && S.value !== void 0 && (p.headers = S.value), M && (p.target = M), B.trim() !== "" && (p.match = B.trim()), Object.keys(p).length > 0 ? p : void 0;
376
+ }, [Y, X] = b("form"), [Oe, we] = b(""), [Ie, Q] = b(!1), [C, I] = b(!1), P = (y == null ? void 0 : y.key) ?? null, J = r ? { ...r } : kt(y), [rt, me] = b(() => ({
377
377
  key: P,
378
- values: j
379
- })), [K, ne] = b(l ?? null), [ot, he] = b(j);
378
+ values: J
379
+ })), [K, ne] = b(l ?? null), [ot, he] = b(J);
380
380
  if (rt.key !== P) {
381
381
  const p = kt(y);
382
- me({ key: P, values: p }), he(p), ne(l ?? null), N(null), x(void 0), _([]);
382
+ me({ key: P, values: p }), he(p), ne(l ?? null), v(null), x(void 0), _([]);
383
383
  }
384
384
  const [sn, ln] = b(l);
385
385
  l !== sn && (ln(l), ne(l ?? null));
@@ -388,7 +388,7 @@ function hs({
388
388
  const p = JSON.stringify(r ?? null) !== JSON.stringify(ct ?? null);
389
389
  if (rn(r), r && p) {
390
390
  const T = { ...r };
391
- me({ key: P, values: T }), he(T), N(null), x(void 0), _([]);
391
+ me({ key: P, values: T }), he(T), v(null), x(void 0), _([]);
392
392
  }
393
393
  }
394
394
  const W = rt.values, dt = (p) => me({ key: P, values: p }), ut = Ye(
@@ -401,20 +401,20 @@ function hs({
401
401
  const on = () => {
402
402
  we(JSON.stringify(W, null, 2)), Q(!1), X("json");
403
403
  }, cn = async (p) => {
404
- if (!y || B) return;
404
+ if (!y || F) return;
405
405
  const T = y.key;
406
- A(!0), N(null), x(void 0), _([]);
407
- let M;
406
+ A(!0), v(null), x(void 0), _([]);
407
+ let L;
408
408
  const Z = te();
409
409
  try {
410
410
  const V = await h.invokeAction(e, T, p, {
411
411
  connectionId: a,
412
412
  ...Z ? { overrides: Z } : {}
413
413
  });
414
- x(V.value), _(V.apiCalls ?? []), M = { ok: !0, summary: "OK", result: V.value };
414
+ x(V.value), _(V.apiCalls ?? []), L = { ok: !0, summary: "OK", result: V.value };
415
415
  } catch (V) {
416
- const Nt = qn(V);
417
- N(Nt), _(Hn(V)), M = { ok: !1, summary: Nt.headline };
416
+ const vt = Hn(V);
417
+ v(vt), _(zn(V)), L = { ok: !1, summary: vt.headline };
418
418
  } finally {
419
419
  A(!1);
420
420
  }
@@ -423,13 +423,13 @@ function hs({
423
423
  await h.recordTestRun(a, {
424
424
  savedTestId: K ?? null,
425
425
  actionKey: T,
426
- ok: M.ok,
427
- summary: M.summary.slice(0, 200),
428
- result: M.result
426
+ ok: L.ok,
427
+ summary: L.summary.slice(0, 200),
428
+ result: L.result
429
429
  }), De(), yn(), o == null || o();
430
430
  } catch {
431
431
  }
432
- }, dn = () => cn(W), [pe, wt] = b(null), [fe, ae] = b(null), [un, wn] = b(0), [mn, ge] = b(!1), [Pe, Le] = b(""), [hn, Me] = b(!1), De = () => wn((p) => p + 1);
432
+ }, dn = () => cn(W), [pe, wt] = b(null), [fe, ae] = b(null), [un, wn] = b(0), [mn, ge] = b(!1), [Pe, Me] = b(""), [hn, Le] = b(!1), De = () => wn((p) => p + 1);
433
433
  H(() => {
434
434
  if (!a) {
435
435
  wt(null);
@@ -448,14 +448,14 @@ function hs({
448
448
  return;
449
449
  }
450
450
  let T = !1;
451
- return p(a).then((M) => !T && Ue(M)).catch(() => !T && Ue(null)), () => {
451
+ return p(a).then((L) => !T && Ue(L)).catch(() => !T && Ue(null)), () => {
452
452
  T = !0;
453
453
  };
454
454
  }, [h, a, fn]);
455
- const ht = P ? (pn ?? []).filter((p) => p.actionKey === P).slice().sort((p, T) => Date.parse(T.occurredAt) - Date.parse(p.occurredAt)) : [], vn = () => {
456
- !a || !y || (Le(""), ae(null), ge(!0));
457
- }, Nn = () => {
458
- !a || !y || (K ? pt() : vn());
455
+ const ht = P ? (pn ?? []).filter((p) => p.actionKey === P).slice().sort((p, T) => Date.parse(T.occurredAt) - Date.parse(p.occurredAt)) : [], Nn = () => {
456
+ !a || !y || (Me(""), ae(null), ge(!0));
457
+ }, vn = () => {
458
+ !a || !y || (K ? pt() : Nn());
459
459
  }, pt = async () => {
460
460
  if (!(!a || !y))
461
461
  try {
@@ -471,13 +471,13 @@ function hs({
471
471
  values: W
472
472
  }), ne(p.id);
473
473
  }
474
- he({ ...W }), ge(!1), Le(""), De(), o == null || o(), d == null || d(p);
474
+ he({ ...W }), ge(!1), Me(""), De(), o == null || o(), d == null || d(p);
475
475
  } catch (p) {
476
476
  ae(p.message);
477
477
  }
478
478
  }, bn = (p) => {
479
479
  const T = { ...p.values };
480
- me({ key: P, values: T }), he(T), ne(p.id), X("form"), N(null), x(void 0), _([]);
480
+ me({ key: P, values: T }), he(T), ne(p.id), X("form"), v(null), x(void 0), _([]);
481
481
  }, kn = async () => {
482
482
  if (!a || !K) return;
483
483
  const p = K;
@@ -606,7 +606,7 @@ function hs({
606
606
  "select",
607
607
  {
608
608
  "aria-label": "Overrides target",
609
- value: L,
609
+ value: M,
610
610
  onChange: (p) => ee(p.target.value),
611
611
  children: [
612
612
  /* @__PURE__ */ t("option", { value: "", children: "— default (first) —" }),
@@ -624,9 +624,9 @@ function hs({
624
624
  {
625
625
  type: "text",
626
626
  "aria-label": "Overrides match",
627
- value: F,
627
+ value: B,
628
628
  placeholder: "Restrict to requests whose URL contains…",
629
- onChange: (p) => J(p.target.value)
629
+ onChange: (p) => j(p.target.value)
630
630
  }
631
631
  )
632
632
  ] }),
@@ -661,8 +661,8 @@ function hs({
661
661
  ),
662
662
  " ",
663
663
  p.lastRunSummary ? `${p.lastRunSummary} · ` : "",
664
- Fe(p.lastRunAt)
665
- ] }) : `saved ${Fe(p.updatedAt)}`,
664
+ Be(p.lastRunAt)
665
+ ] }) : `saved ${Be(p.updatedAt)}`,
666
666
  active: p.id === K,
667
667
  onClick: () => bn(p)
668
668
  }
@@ -693,14 +693,14 @@ function hs({
693
693
  ] }),
694
694
  subtitle: /* @__PURE__ */ i("span", { children: [
695
695
  p.summary ? `${p.summary} · ` : "",
696
- Fe(p.occurredAt)
696
+ Be(p.occurredAt)
697
697
  ] })
698
698
  }
699
699
  ) }, p.id))
700
700
  }
701
701
  )
702
702
  ] })
703
- ] }) : null, yt = (vt = pe == null ? void 0 : pe.find((p) => p.id === K)) == null ? void 0 : vt.name;
703
+ ] }) : null, yt = (Nt = pe == null ? void 0 : pe.find((p) => p.id === K)) == null ? void 0 : Nt.name;
704
704
  return /* @__PURE__ */ i("div", { className: `w6w-stack${f ? " w6w-tester-embedded-root" : ""}`, children: [
705
705
  !s && (n.length === 0 ? /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "This app exposes no actions." }) : (
706
706
  // biome-ignore lint/a11y/noLabelWithoutControl: Combobox renders its own <select>/<input> INSIDE this label, so the field text labels the control at runtime; the rule cannot see through the component boundary.
@@ -715,7 +715,7 @@ function hs({
715
715
  value: w,
716
716
  placeholder: "— pick an action —",
717
717
  onChange: m,
718
- options: v.map((p) => ({
718
+ options: N.map((p) => ({
719
719
  value: p.key,
720
720
  label: `${p.title ?? p.key} (${p.key})`
721
721
  }))
@@ -751,7 +751,7 @@ function hs({
751
751
  ] }) : null, T = $ !== void 0 ? /* @__PURE__ */ i("div", { className: "w6w-stack", style: { gap: "var(--w6w-sp-1)" }, children: [
752
752
  /* @__PURE__ */ t("strong", { className: "w6w-small", children: "Result" }),
753
753
  /* @__PURE__ */ t(ze, { value: $ })
754
- ] }) : null, M = /* @__PURE__ */ i("div", { className: "w6w-stack", style: { gap: "var(--w6w-sp-3)" }, children: [
754
+ ] }) : null, L = /* @__PURE__ */ i("div", { className: "w6w-stack", style: { gap: "var(--w6w-sp-3)" }, children: [
755
755
  ft,
756
756
  gt,
757
757
  p,
@@ -768,26 +768,26 @@ function hs({
768
768
  {
769
769
  type: "button",
770
770
  className: "w6w-btn",
771
- disabled: g || B,
771
+ disabled: g || F,
772
772
  onClick: dn,
773
773
  children: g ? "Running…" : "Run action"
774
774
  }
775
775
  ),
776
- a && /* @__PURE__ */ t("button", { type: "button", className: "w6w-btn w6w-btn-ghost", onClick: Nn, children: "Save test" }),
776
+ a && /* @__PURE__ */ t("button", { type: "button", className: "w6w-btn w6w-btn-ghost", onClick: vn, children: "Save test" }),
777
777
  a && K && /* @__PURE__ */ t(
778
778
  "button",
779
779
  {
780
780
  type: "button",
781
781
  className: "w6w-btn w6w-btn-ghost",
782
782
  style: { marginLeft: "auto", color: "var(--w6w-danger)" },
783
- onClick: () => Me(!0),
783
+ onClick: () => Le(!0),
784
784
  children: "Delete"
785
785
  }
786
786
  )
787
787
  ]
788
788
  }
789
789
  ), V = /* @__PURE__ */ i("div", { className: "w6w-stack", style: { gap: "var(--w6w-sp-3)" }, children: [
790
- M,
790
+ L,
791
791
  Z
792
792
  ] });
793
793
  return f ? /* @__PURE__ */ i("div", { className: "w6w-tester-embedded", children: [
@@ -829,11 +829,11 @@ function hs({
829
829
  alignItems: "flex-start"
830
830
  },
831
831
  children: [
832
- /* @__PURE__ */ t("div", { style: { flex: 1, minWidth: 0 }, children: M }),
832
+ /* @__PURE__ */ t("div", { style: { flex: 1, minWidth: 0 }, children: L }),
833
833
  /* @__PURE__ */ t("div", { style: { width: 260, flexShrink: 0 }, children: ye })
834
834
  ]
835
835
  }
836
- ) : M }),
836
+ ) : L }),
837
837
  Z
838
838
  ] })
839
839
  }
@@ -856,7 +856,7 @@ function hs({
856
856
  type: "text",
857
857
  value: Pe,
858
858
  placeholder: "e.g. valid sender",
859
- onChange: (p) => Le(p.target.value)
859
+ onChange: (p) => Me(p.target.value)
860
860
  }
861
861
  )
862
862
  ] }),
@@ -889,22 +889,22 @@ function hs({
889
889
  message: yt ? `Delete "${yt}"? This cannot be undone.` : "Delete this saved test? This cannot be undone.",
890
890
  confirmLabel: "Delete",
891
891
  onConfirm: () => {
892
- Me(!1), kn();
892
+ Le(!1), kn();
893
893
  },
894
- onClose: () => Me(!1)
894
+ onClose: () => Le(!1)
895
895
  }
896
896
  )
897
897
  ] }) : !s && /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "Pick an action above to test it." })
898
898
  ] });
899
899
  }
900
900
  function ps(e) {
901
- const n = An(e.theme), { copied: a, copy: s } = Un(e.value), r = Ye(() => [jn(), Kn.theme(Rn)], []);
901
+ const n = An(e.theme), { copied: a, copy: s } = Fn(e.value), r = Ye(() => [Kn(), Wn.theme(Rn)], []);
902
902
  function o(l) {
903
903
  e.onChange(l);
904
904
  }
905
905
  return /* @__PURE__ */ i("div", { className: "w6w-yaml-editor", "aria-label": e["aria-label"] ?? "YAML editor", children: [
906
906
  /* @__PURE__ */ t(
907
- Wn,
907
+ Vn,
908
908
  {
909
909
  value: e.value,
910
910
  onChange: o,
@@ -934,47 +934,47 @@ function ps(e) {
934
934
  className: `w6w-icon-btn w6w-copyable-btn${a ? " is-copied" : ""}`,
935
935
  "aria-label": "Copy",
936
936
  onClick: () => void s(),
937
- children: a ? /* @__PURE__ */ t(Bn, {}) : /* @__PURE__ */ t(Fn, {})
937
+ children: a ? /* @__PURE__ */ t(Bn, {}) : /* @__PURE__ */ t(jn, {})
938
938
  }
939
939
  ),
940
940
  /* @__PURE__ */ t("span", { className: "w6w-copyable-status", "aria-live": "polite", children: a ? "Copied" : "" })
941
941
  ] })
942
942
  ] });
943
943
  }
944
- const je = "…";
945
- function zn(e, n, a = "end") {
944
+ const Je = "…";
945
+ function Yn(e, n, a = "end") {
946
946
  if (n === void 0 || n < 1 || n >= e.length) return e;
947
947
  if (a === "start")
948
- return `${je}${e.slice(e.length - n)}`;
948
+ return `${Je}${e.slice(e.length - n)}`;
949
949
  if (a === "end")
950
- return `${e.slice(0, n)}${je}`;
950
+ return `${e.slice(0, n)}${Je}`;
951
951
  const s = Math.ceil(n / 2), r = n - s;
952
- return `${e.slice(0, s)}${je}${e.slice(e.length - r)}`;
952
+ return `${e.slice(0, s)}${Je}${e.slice(e.length - r)}`;
953
953
  }
954
- function Yn(e) {
955
- const { value: n, chars: a, crop: s = "end", label: r, className: o, copiedMs: l } = e, c = zn(n, a, s), d = ["w6w-copyable--bare", o].filter(Boolean).join(" ");
954
+ function Gn(e) {
955
+ const { value: n, chars: a, crop: s = "end", label: r, className: o, copiedMs: l } = e, c = Yn(n, a, s), d = ["w6w-copyable--bare", o].filter(Boolean).join(" ");
956
956
  return /* @__PURE__ */ t(Jn, { value: n, readOnly: !0, label: r, className: d, copiedMs: l, children: /* @__PURE__ */ t("span", { children: c }) });
957
957
  }
958
- const Gn = {
958
+ const Xn = {
959
959
  ok: "Operational",
960
960
  degraded: "Degraded",
961
961
  down: "Down",
962
962
  unknown: "Unknown"
963
963
  };
964
964
  function et({ state: e, label: n, ariaLabel: a }) {
965
- const s = n ?? Gn[e];
965
+ const s = n ?? Xn[e];
966
966
  return /* @__PURE__ */ i("span", { className: `w6w-health-pill w6w-health-pill-${e}`, "aria-label": a, children: [
967
967
  /* @__PURE__ */ t("span", { className: "w6w-health-pill-dot", "aria-hidden": "true" }),
968
968
  /* @__PURE__ */ t("span", { className: "w6w-health-pill-label", children: s })
969
969
  ] });
970
970
  }
971
- const Xn = {
971
+ const Qn = {
972
972
  ok: "Operational",
973
973
  degraded: "Degraded",
974
974
  down: "Down",
975
975
  unknown: "Unknown"
976
976
  };
977
- function Qn({ days: e, ariaLabel: n }) {
977
+ function Zn({ days: e, ariaLabel: n }) {
978
978
  return e.length === 0 ? null : /* @__PURE__ */ t(
979
979
  "div",
980
980
  {
@@ -985,7 +985,7 @@ function Qn({ days: e, ariaLabel: n }) {
985
985
  "span",
986
986
  {
987
987
  className: `w6w-uptime-cell w6w-uptime-cell-${a.state}`,
988
- title: a.label ?? `${a.day} — ${Xn[a.state]}`
988
+ title: a.label ?? `${a.day} — ${Qn[a.state]}`
989
989
  },
990
990
  `${a.day}-${s}`
991
991
  ))
@@ -1014,28 +1014,28 @@ function de(e) {
1014
1014
  const { memoryTotal: n, memoryAvailable: a } = e;
1015
1015
  return n === null || a === null || n <= 0 ? null : (n - a) / n;
1016
1016
  }
1017
- function Zn(e, n, a) {
1017
+ function ea(e, n, a) {
1018
1018
  return e < n ? n : e > a ? a : e;
1019
1019
  }
1020
- function ea(e, n, a, s) {
1020
+ function ta(e, n, a, s) {
1021
1021
  const r = e.length;
1022
1022
  if (r < 2) return "";
1023
1023
  const o = [];
1024
1024
  for (let l = 0; l < r; l++) {
1025
1025
  const c = e[l];
1026
1026
  if (c === null) continue;
1027
- const d = l / (r - 1) * n, u = s <= 0 ? a : a - Zn(c, 0, s) / s * a;
1027
+ const d = l / (r - 1) * n, u = s <= 0 ? a : a - ea(c, 0, s) / s * a;
1028
1028
  o.push(`${Number(d.toFixed(2))},${Number(u.toFixed(2))}`);
1029
1029
  }
1030
1030
  return o.join(" ");
1031
1031
  }
1032
- const ta = "—", Ct = 100, St = 24;
1032
+ const na = "—", Ct = 100, St = 24;
1033
1033
  function Qe({
1034
1034
  values: e,
1035
1035
  max: n,
1036
1036
  className: a
1037
1037
  }) {
1038
- const s = ea(e, Ct, St, n);
1038
+ const s = ta(e, Ct, St, n);
1039
1039
  return s === "" ? null : /* @__PURE__ */ t(
1040
1040
  "svg",
1041
1041
  {
@@ -1058,7 +1058,7 @@ function Qe({
1058
1058
  );
1059
1059
  }
1060
1060
  function Ke(e) {
1061
- return e === null ? ta : e.toFixed(2);
1061
+ return e === null ? na : e.toFixed(2);
1062
1062
  }
1063
1063
  function Te(e) {
1064
1064
  let n = 1;
@@ -1177,32 +1177,32 @@ function ys({ samples: e, onExpand: n }) {
1177
1177
  )
1178
1178
  ] });
1179
1179
  }
1180
- function vs({ samples: e }) {
1180
+ function Ns({ samples: e }) {
1181
1181
  const n = e[e.length - 1], a = z(ce(n)), s = z(de(n));
1182
1182
  return /* @__PURE__ */ t("span", { className: "w6w-server-resources w6w-server-resources--badge", children: `CPU ${a} · MEM ${s}` });
1183
1183
  }
1184
- const na = 1, aa = 1440 * 60 * 1e3;
1185
- function sa(e, n, a) {
1184
+ const aa = 1, sa = 1440 * 60 * 1e3;
1185
+ function la(e, n, a) {
1186
1186
  const s = n.startedAt ?? n.updatedAt;
1187
1187
  if (s === void 0) return null;
1188
- const r = Date.parse(s), o = n.resolvedAt !== void 0 ? Date.parse(n.resolvedAt) : n.startedAt !== void 0 ? a : r, l = Date.parse(`${e.from}T00:00:00.000Z`), c = Date.parse(`${e.to}T00:00:00.000Z`) + aa, d = c - l;
1188
+ const r = Date.parse(s), o = n.resolvedAt !== void 0 ? Date.parse(n.resolvedAt) : n.startedAt !== void 0 ? a : r, l = Date.parse(`${e.from}T00:00:00.000Z`), c = Date.parse(`${e.to}T00:00:00.000Z`) + sa, d = c - l;
1189
1189
  if (o < l || r >= c) return null;
1190
- const u = r < l, f = o > c, h = Math.max(r, l), v = Math.min(o, c), w = (h - l) / d * 100, m = (v - h) / d * 100, y = Math.max(m, na);
1190
+ const u = r < l, f = o > c, h = Math.max(r, l), N = Math.min(o, c), w = (h - l) / d * 100, m = (N - h) / d * 100, y = Math.max(m, aa);
1191
1191
  return { leftPct: w, widthPct: y, clippedStart: u, clippedEnd: f };
1192
1192
  }
1193
- const la = {
1193
+ const ia = {
1194
1194
  ok: "Operational",
1195
1195
  degraded: "Degraded",
1196
1196
  down: "Down",
1197
1197
  unknown: "Unknown"
1198
- }, ia = "This vendor publishes no incident history.", ra = "No incidents in this window.";
1199
- function oa(e) {
1198
+ }, ra = "This vendor publishes no incident history.", oa = "No incidents in this window.";
1199
+ function ca(e) {
1200
1200
  const n = e.startedAt ?? e.updatedAt, a = [e.title];
1201
1201
  return e.components !== void 0 && e.components.length > 0 && a.push(`(${e.components.join(", ")})`), n !== void 0 && a.push(
1202
1202
  e.resolvedAt !== void 0 ? `${n} – ${e.resolvedAt}` : `${n} – ongoing`
1203
1203
  ), a.join(" ");
1204
1204
  }
1205
- function Ns({
1205
+ function vs({
1206
1206
  window: e,
1207
1207
  days: n,
1208
1208
  incidents: a,
@@ -1210,30 +1210,30 @@ function Ns({
1210
1210
  nowMs: r = Date.now(),
1211
1211
  ariaLabel: o
1212
1212
  }) {
1213
- const l = n.length, c = l > 0 ? 100 / l : 0, d = a === void 0 ? s ?? ia : a.length === 0 ? s ?? ra : null;
1213
+ const l = n.length, c = l > 0 ? 100 / l : 0, d = a === void 0 ? s ?? ra : a.length === 0 ? s ?? oa : null;
1214
1214
  return /* @__PURE__ */ t("div", { className: "w6w-history-timeline", role: "img", "aria-label": o ?? `${l}-day history`, children: /* @__PURE__ */ i("div", { className: "w6w-history-plot", children: [
1215
1215
  /* @__PURE__ */ t("div", { className: "w6w-history-lane w6w-history-lane-execution", children: n.map((u, f) => /* @__PURE__ */ t(
1216
1216
  "span",
1217
1217
  {
1218
1218
  className: `w6w-history-cell w6w-history-cell-${u.state}`,
1219
1219
  style: { left: `${f * c}%`, width: `${c}%` },
1220
- title: u.label ?? `${u.day} — ${la[u.state]}`
1220
+ title: u.label ?? `${u.day} — ${ia[u.state]}`
1221
1221
  },
1222
1222
  `${u.day}-${f}`
1223
1223
  )) }),
1224
1224
  /* @__PURE__ */ t("div", { className: "w6w-history-lane w6w-history-lane-vendor", children: d !== null ? /* @__PURE__ */ t("span", { className: "w6w-history-empty", title: d, children: d }) : a == null ? void 0 : a.map((u, f) => {
1225
- const h = sa(e, u, r);
1225
+ const h = la(e, u, r);
1226
1226
  if (h === null) return null;
1227
- const v = [
1227
+ const N = [
1228
1228
  h.clippedStart ? "w6w-history-bar-clip-start" : "",
1229
1229
  h.clippedEnd ? "w6w-history-bar-clip-end" : ""
1230
1230
  ].filter(Boolean).join(" ");
1231
1231
  return /* @__PURE__ */ t(
1232
1232
  "span",
1233
1233
  {
1234
- className: `w6w-history-bar w6w-history-bar-${u.state}${v ? ` ${v}` : ""}`,
1234
+ className: `w6w-history-bar w6w-history-bar-${u.state}${N ? ` ${N}` : ""}`,
1235
1235
  style: { left: `${h.leftPct}%`, width: `${h.widthPct}%` },
1236
- title: oa(u)
1236
+ title: ca(u)
1237
1237
  },
1238
1238
  u.id ?? `${u.title}-${f}`
1239
1239
  );
@@ -1245,7 +1245,7 @@ function Ns({
1245
1245
  ] }) });
1246
1246
  }
1247
1247
  function bs({ label: e, children: n, className: a }) {
1248
- const [s, r] = b(!1), o = Dn();
1248
+ const [s, r] = b(!1), o = Un();
1249
1249
  return /* @__PURE__ */ i("span", { className: ["w6w-info-tip", a ?? ""].filter(Boolean).join(" "), children: [
1250
1250
  /* @__PURE__ */ t(
1251
1251
  re,
@@ -1275,14 +1275,14 @@ function qt(e) {
1275
1275
  );
1276
1276
  }
1277
1277
  function ks(e) {
1278
- const { branch: n, shortSha: a, lastSyncLabel: s, onSyncNow: r, syncing: o, className: l, ...c } = e, [d, u] = b(!1), f = jt(null);
1278
+ const { branch: n, shortSha: a, lastSyncLabel: s, onSyncNow: r, syncing: o, className: l, ...c } = e, [d, u] = b(!1), f = Jt(null);
1279
1279
  return H(() => {
1280
1280
  if (!d) return;
1281
1281
  const h = (w) => {
1282
1282
  f.current && !f.current.contains(w.target) && u(!1);
1283
- }, v = (w) => w.key === "Escape" && u(!1);
1284
- return document.addEventListener("mousedown", h), document.addEventListener("keydown", v), () => {
1285
- document.removeEventListener("mousedown", h), document.removeEventListener("keydown", v);
1283
+ }, N = (w) => w.key === "Escape" && u(!1);
1284
+ return document.addEventListener("mousedown", h), document.addEventListener("keydown", N), () => {
1285
+ document.removeEventListener("mousedown", h), document.removeEventListener("keydown", N);
1286
1286
  };
1287
1287
  }, [d]), /* @__PURE__ */ i(
1288
1288
  "div",
@@ -1333,7 +1333,7 @@ function ks(e) {
1333
1333
  }
1334
1334
  );
1335
1335
  }
1336
- const ca = {
1336
+ const da = {
1337
1337
  pending: "Pending",
1338
1338
  running: "Running",
1339
1339
  succeeded: "Succeeded",
@@ -1343,25 +1343,25 @@ const ca = {
1343
1343
  canceled: "Canceled"
1344
1344
  };
1345
1345
  function nt({ state: e, label: n, ariaLabel: a }) {
1346
- const s = n ?? ca[e];
1346
+ const s = n ?? da[e];
1347
1347
  return /* @__PURE__ */ i("span", { className: `w6w-step-pill w6w-step-pill-${e}`, "aria-label": a, children: [
1348
1348
  /* @__PURE__ */ t("span", { className: "w6w-step-pill-dot", "aria-hidden": "true" }),
1349
1349
  /* @__PURE__ */ t("span", { className: "w6w-step-pill-label", children: s })
1350
1350
  ] });
1351
1351
  }
1352
- const da = "—", We = 1e3, Ve = 6e4;
1352
+ const ua = "—", We = 1e3, Ve = 6e4;
1353
1353
  function at(e) {
1354
- return e == null || !Number.isFinite(e) || e < 0 ? da : e < We ? `${Math.round(e)} ms` : e < Ve ? `${(e / We).toFixed(1)} s` : `${Math.floor(e / Ve)}m ${Math.round(e % Ve / We)}s`;
1354
+ return e == null || !Number.isFinite(e) || e < 0 ? ua : e < We ? `${Math.round(e)} ms` : e < Ve ? `${(e / We).toFixed(1)} s` : `${Math.floor(e / Ve)}m ${Math.round(e % Ve / We)}s`;
1355
1355
  }
1356
1356
  function Ae(e) {
1357
1357
  const n = new Date(e);
1358
1358
  return Number.isNaN(n.getTime()) ? e : n.toLocaleString(void 0, { dateStyle: "medium", timeStyle: "short" });
1359
1359
  }
1360
- const ua = {
1360
+ const wa = {
1361
1361
  function: "Function",
1362
1362
  endpoint: "Endpoint",
1363
1363
  workflow: "Workflow"
1364
- }, wa = {
1364
+ }, ma = {
1365
1365
  manual: "Manual",
1366
1366
  schedule: "Schedule",
1367
1367
  webhook: "Webhook",
@@ -1370,7 +1370,7 @@ const ua = {
1370
1370
  };
1371
1371
  function $t(e) {
1372
1372
  if (!e.trigger) return null;
1373
- const n = wa[e.trigger] ?? e.trigger;
1373
+ const n = ma[e.trigger] ?? e.trigger;
1374
1374
  return e.triggerNodeId ? `${n} · ${e.triggerNodeId}` : n;
1375
1375
  }
1376
1376
  function xs({
@@ -1387,7 +1387,7 @@ function xs({
1387
1387
  onRerun: f,
1388
1388
  rerunningId: h = null
1389
1389
  }) {
1390
- const v = d || u ? /* @__PURE__ */ i("div", { className: "w6w-execution-list-pager", children: [
1390
+ const N = d || u ? /* @__PURE__ */ i("div", { className: "w6w-execution-list-pager", children: [
1391
1391
  /* @__PURE__ */ t(
1392
1392
  "button",
1393
1393
  {
@@ -1430,7 +1430,7 @@ function xs({
1430
1430
  )
1431
1431
  ] }),
1432
1432
  subtitle: /* @__PURE__ */ i(E, { children: [
1433
- s ? `${ua[m.kind]} · ${Ae(m.startedAt)}` : m.id,
1433
+ s ? `${wa[m.kind]} · ${Ae(m.startedAt)}` : m.id,
1434
1434
  $t(m) && /* @__PURE__ */ t("span", { className: "w6w-execution-trigger", "data-testid": "execution-row-trigger", children: ` · ${$t(m)}` }),
1435
1435
  m.inputPreview && /* @__PURE__ */ i(E, { children: [
1436
1436
  " · ",
@@ -1464,10 +1464,10 @@ function xs({
1464
1464
  )
1465
1465
  ] }, m.id)) }), /* @__PURE__ */ i("div", { className: "w6w-execution-list", "data-testid": "execution-list", children: [
1466
1466
  w,
1467
- v
1467
+ N
1468
1468
  ] });
1469
1469
  }
1470
- function ma(e) {
1470
+ function ha(e) {
1471
1471
  const n = En(e.app, e.action);
1472
1472
  return {
1473
1473
  trigger: e.trigger === !0 || (n == null ? void 0 : n.group) === "trigger",
@@ -1485,7 +1485,7 @@ function Ht(e) {
1485
1485
  };
1486
1486
  return e.map((a) => ({ step: a, time: n(a) })).sort((a, s) => a.time === s.time ? 0 : a.time - s.time).map(({ step: a }) => a);
1487
1487
  }
1488
- function ha({
1488
+ function pa({
1489
1489
  steps: e,
1490
1490
  emptyLabel: n,
1491
1491
  onDismiss: a,
@@ -1494,15 +1494,15 @@ function ha({
1494
1494
  }) {
1495
1495
  const o = a ? /* @__PURE__ */ t("div", { className: "w6w-execution-log-head", children: /* @__PURE__ */ t(re, { label: "Dismiss run log", "data-testid": "execution-log-dismiss", onClick: a, children: "×" }) }) : null, l = r ?? [], c = s || l.length > 0 ? /* @__PURE__ */ i("div", { className: "w6w-execution-log-errors w6w-stack", children: [
1496
1496
  s && /* @__PURE__ */ t(Ze, { error: s }),
1497
- l.map((h, v) => /* @__PURE__ */ t(
1497
+ l.map((h, N) => /* @__PURE__ */ t(
1498
1498
  Ze,
1499
1499
  {
1500
1500
  label: h.label ?? h.stepId,
1501
1501
  error: h.error
1502
1502
  },
1503
- `${h.stepId}:${v}`
1503
+ `${h.stepId}:${N}`
1504
1504
  ))
1505
- ] }) : null, d = Ht(e.filter((h) => !Tt(h))), u = e.filter(Tt), f = u.length > 0 ? /* @__PURE__ */ t(fa, { steps: u }) : null;
1505
+ ] }) : null, d = Ht(e.filter((h) => !Tt(h))), u = e.filter(Tt), f = u.length > 0 ? /* @__PURE__ */ t(ga, { steps: u }) : null;
1506
1506
  return d.length === 0 ? /* @__PURE__ */ i(E, { children: [
1507
1507
  o,
1508
1508
  c,
@@ -1515,12 +1515,12 @@ function ha({
1515
1515
  f
1516
1516
  ] });
1517
1517
  }
1518
- const Tt = (e) => e.status === "skipped" && e.skipReason === "not_on_path", pa = {
1518
+ const Tt = (e) => e.status === "skipped" && e.skipReason === "not_on_path", fa = {
1519
1519
  condition: "condition false",
1520
1520
  stopped: "run stopped",
1521
1521
  disabled: "disabled"
1522
1522
  };
1523
- function fa({ steps: e }) {
1523
+ function ga({ steps: e }) {
1524
1524
  const n = e.length;
1525
1525
  return /* @__PURE__ */ i("details", { className: "w6w-execution-log-off-path", "data-testid": "execution-log-off-path", children: [
1526
1526
  /* @__PURE__ */ t("summary", { className: "w6w-muted w6w-small", children: `${n} ${n === 1 ? "step" : "steps"} on other paths, not part of this run` }),
@@ -1529,7 +1529,7 @@ function fa({ steps: e }) {
1529
1529
  }
1530
1530
  function zt({ step: e }) {
1531
1531
  var d, u;
1532
- const [n, a] = b(!1), s = e.node ? ma(e.node) : null, r = /* @__PURE__ */ i("div", { className: "w6w-execution-log-row-header", children: [
1532
+ const [n, a] = b(!1), s = e.node ? ha(e.node) : null, r = /* @__PURE__ */ i("div", { className: "w6w-execution-log-row-header", children: [
1533
1533
  /* @__PURE__ */ t(nt, { state: e.status }),
1534
1534
  s && /* @__PURE__ */ t(
1535
1535
  "span",
@@ -1543,9 +1543,9 @@ function zt({ step: e }) {
1543
1543
  /* @__PURE__ */ t("span", { className: "w6w-execution-log-row-label", children: e.label ?? e.id }),
1544
1544
  s && /* @__PURE__ */ t("span", { className: "w6w-execution-log-row-uses", "data-testid": "execution-log-uses", children: s.appName === s.actionName ? s.appName : `${s.appName} · ${s.actionName}` })
1545
1545
  ] }),
1546
- e.status === "skipped" && e.skipReason && e.skipReason !== "not_on_path" && /* @__PURE__ */ t("span", { className: "w6w-execution-log-skip-reason", "data-testid": "execution-log-skip-reason", children: pa[e.skipReason] }),
1546
+ e.status === "skipped" && e.skipReason && e.skipReason !== "not_on_path" && /* @__PURE__ */ t("span", { className: "w6w-execution-log-skip-reason", "data-testid": "execution-log-skip-reason", children: fa[e.skipReason] }),
1547
1547
  /* @__PURE__ */ t(va, { startedAt: e.startedAt, finishedAt: e.finishedAt })
1548
- ] }), o = e.error ? /* @__PURE__ */ t(Ze, { error: e.error }) : null, l = Array.isArray(e.iterations) ? /* @__PURE__ */ t(ga, { step: e }) : null, c = xa(e) ? /* @__PURE__ */ t(Ca, { step: e }) : null;
1548
+ ] }), o = e.error ? /* @__PURE__ */ t(Ze, { error: e.error }) : null, l = Array.isArray(e.iterations) ? /* @__PURE__ */ t(ya, { step: e }) : null, c = Ca(e) ? /* @__PURE__ */ t(Sa, { step: e }) : null;
1549
1549
  return e.input === void 0 && e.output === void 0 && !e.meta && !c && !((d = e.logs) != null && d.length) ? /* @__PURE__ */ i("li", { className: "w6w-execution-log-row", children: [
1550
1550
  /* @__PURE__ */ t("div", { className: "w6w-section", children: r }),
1551
1551
  o,
@@ -1554,7 +1554,7 @@ function zt({ step: e }) {
1554
1554
  /* @__PURE__ */ i("details", { className: "w6w-section", open: n, onToggle: (f) => a(f.currentTarget.open), children: [
1555
1555
  /* @__PURE__ */ t("summary", { className: "w6w-section-summary", children: r }),
1556
1556
  n && /* @__PURE__ */ i("div", { className: "w6w-execution-log-row-body w6w-section-body w6w-stack", children: [
1557
- /* @__PURE__ */ t(ba, { input: e.input }),
1557
+ /* @__PURE__ */ t(ka, { input: e.input }),
1558
1558
  /* @__PURE__ */ t(At, { title: "Input", value: e.input }),
1559
1559
  /* @__PURE__ */ t(At, { title: "Output", value: e.output }),
1560
1560
  !!((u = e.logs) != null && u.length) && /* @__PURE__ */ i("div", { className: "w6w-execution-log-json w6w-stack", children: [
@@ -1573,10 +1573,10 @@ function zt({ step: e }) {
1573
1573
  l
1574
1574
  ] });
1575
1575
  }
1576
- function ga({ step: e }) {
1576
+ function ya({ step: e }) {
1577
1577
  var u, f;
1578
- const n = [...e.iterations ?? []].sort((h, v) => h.index - v.index), a = e.iterationsTotal ?? n.length, s = e.iterationsFailed ?? n.filter((h) => h.status === "failed").length, r = n.find((h) => h.status === "failed"), o = (r == null ? void 0 : r.index) ?? ((u = n[n.length - 1]) == null ? void 0 : u.index), l = [], c = /* @__PURE__ */ new Map();
1579
- for (const h of Ht(n.flatMap((v) => v.steps)))
1578
+ const n = [...e.iterations ?? []].sort((h, N) => h.index - N.index), a = e.iterationsTotal ?? n.length, s = e.iterationsFailed ?? n.filter((h) => h.status === "failed").length, r = n.find((h) => h.status === "failed"), o = (r == null ? void 0 : r.index) ?? ((u = n[n.length - 1]) == null ? void 0 : u.index), l = [], c = /* @__PURE__ */ new Map();
1579
+ for (const h of Ht(n.flatMap((N) => N.steps)))
1580
1580
  c.has(h.id) || (l.push(h.id), c.set(h.id, h.label ?? h.id));
1581
1581
  const d = (r == null ? void 0 : r.failedNodeId) ?? ((f = r == null ? void 0 : r.steps.find((h) => h.status === "failed")) == null ? void 0 : f.id);
1582
1582
  return /* @__PURE__ */ i("div", { className: "w6w-execution-log-foreach w6w-stack", children: [
@@ -1607,7 +1607,7 @@ function ga({ step: e }) {
1607
1607
  h.index
1608
1608
  )) }),
1609
1609
  /* @__PURE__ */ t("ul", { className: "w6w-execution-log-subrows", children: l.map((h) => /* @__PURE__ */ t(
1610
- ya,
1610
+ Na,
1611
1611
  {
1612
1612
  id: h,
1613
1613
  label: c.get(h) ?? h,
@@ -1618,7 +1618,7 @@ function ga({ step: e }) {
1618
1618
  )) })
1619
1619
  ] });
1620
1620
  }
1621
- function ya({
1621
+ function Na({
1622
1622
  id: e,
1623
1623
  label: n,
1624
1624
  iterations: a,
@@ -1653,7 +1653,7 @@ function Ze({ error: e, label: n }) {
1653
1653
  }
1654
1654
  function va({ startedAt: e, finishedAt: n }) {
1655
1655
  if (e && n) {
1656
- const a = Na(e, n);
1656
+ const a = ba(e, n);
1657
1657
  return /* @__PURE__ */ i("span", { className: "w6w-execution-log-timing", children: [
1658
1658
  e,
1659
1659
  " → ",
@@ -1670,7 +1670,7 @@ function va({ startedAt: e, finishedAt: n }) {
1670
1670
  e
1671
1671
  ] }) : /* @__PURE__ */ t("span", { className: "w6w-execution-log-timing", children: "—" });
1672
1672
  }
1673
- function Na(e, n) {
1673
+ function ba(e, n) {
1674
1674
  const a = Date.parse(e), s = Date.parse(n);
1675
1675
  if (!Number.isFinite(a) || !Number.isFinite(s) || s < a) return null;
1676
1676
  const r = s - a;
@@ -1713,7 +1713,7 @@ function Rt(e) {
1713
1713
  result: typeof e.condition == "boolean" ? e.condition : void 0
1714
1714
  };
1715
1715
  }
1716
- function ba({ input: e }) {
1716
+ function ka({ input: e }) {
1717
1717
  const n = [], a = Rt(e);
1718
1718
  if (a && n.push({ trace: a }), Re(e) && Array.isArray(e.routes))
1719
1719
  for (const s of e.routes) {
@@ -1780,10 +1780,10 @@ const _t = {
1780
1780
  forbidden_key: "Not written — the value uses a reserved key name",
1781
1781
  log_truncated: "Later state changes aren't shown — the run's state log reached its limit"
1782
1782
  };
1783
- function ka(e) {
1783
+ function xa(e) {
1784
1784
  return Object.hasOwn(_t, e) ? _t[e] : e;
1785
1785
  }
1786
- function xa(e) {
1786
+ function Ca(e) {
1787
1787
  const n = Array.isArray(e.stateWrites) && e.stateWrites.length > 0, a = e.stateAfter;
1788
1788
  return n || typeof a == "object" && a !== null && Object.keys(a).length > 0;
1789
1789
  }
@@ -1793,7 +1793,7 @@ function It(e) {
1793
1793
  const n = JSON.stringify(e) ?? String(e);
1794
1794
  return n.length > Ot ? `${n.slice(0, Ot)}…` : n;
1795
1795
  }
1796
- function Ca({ step: e }) {
1796
+ function Sa({ step: e }) {
1797
1797
  const n = Array.isArray(e.stateWrites) ? e.stateWrites : [], a = e.stateAfter;
1798
1798
  return /* @__PURE__ */ i("div", { className: "w6w-execution-log-state w6w-stack", "data-testid": "execution-log-state", children: [
1799
1799
  /* @__PURE__ */ t("strong", { className: "w6w-small", children: "State" }),
@@ -1805,7 +1805,7 @@ function Ca({ step: e }) {
1805
1805
  className: "w6w-execution-log-state-write w6w-execution-log-state-warning w6w-small",
1806
1806
  "data-testid": "execution-log-state-write",
1807
1807
  "data-warning": s.warning,
1808
- children: `${l}: ${ka(s.warning)}`
1808
+ children: `${l}: ${xa(s.warning)}`
1809
1809
  },
1810
1810
  r
1811
1811
  ) : /* @__PURE__ */ t(
@@ -1824,14 +1824,14 @@ function Ca({ step: e }) {
1824
1824
  ] })
1825
1825
  ] });
1826
1826
  }
1827
- const Sa = { status: "", kind: "", from: "", to: "", q: "" }, $a = [
1827
+ const $a = { status: "", kind: "", from: "", to: "", q: "" }, Ta = [
1828
1828
  { value: "", label: "Any status" },
1829
1829
  { value: "queued", label: "Queued" },
1830
1830
  { value: "running", label: "Running" },
1831
1831
  { value: "succeeded", label: "Succeeded" },
1832
1832
  { value: "failed", label: "Failed" },
1833
1833
  { value: "canceled", label: "Canceled" }
1834
- ], Ta = [
1834
+ ], Aa = [
1835
1835
  { value: "", label: "Any type" },
1836
1836
  { value: "function", label: "Function" },
1837
1837
  { value: "endpoint", label: "Endpoint" },
@@ -1868,7 +1868,7 @@ function Cs({
1868
1868
  value: e.status,
1869
1869
  disabled: r,
1870
1870
  onChange: (l) => n({ ...e, status: l.target.value }),
1871
- children: $a.map((l) => /* @__PURE__ */ t("option", { value: l.value, children: l.label }, l.value))
1871
+ children: Ta.map((l) => /* @__PURE__ */ t("option", { value: l.value, children: l.label }, l.value))
1872
1872
  }
1873
1873
  ),
1874
1874
  a && /* @__PURE__ */ t(
@@ -1880,7 +1880,7 @@ function Cs({
1880
1880
  value: e.kind,
1881
1881
  disabled: r,
1882
1882
  onChange: (l) => n({ ...e, kind: l.target.value }),
1883
- children: Ta.map((l) => /* @__PURE__ */ t("option", { value: l.value, children: l.label }, l.value))
1883
+ children: Aa.map((l) => /* @__PURE__ */ t("option", { value: l.value, children: l.label }, l.value))
1884
1884
  }
1885
1885
  ),
1886
1886
  /* @__PURE__ */ t(
@@ -1914,7 +1914,7 @@ function Cs({
1914
1914
  className: "w6w-btn w6w-btn-ghost w6w-execution-filters-clear",
1915
1915
  "data-testid": "execution-filter-clear",
1916
1916
  disabled: r,
1917
- onClick: () => n({ ...Sa }),
1917
+ onClick: () => n({ ...$a }),
1918
1918
  children: "Clear"
1919
1919
  }
1920
1920
  )
@@ -1931,7 +1931,7 @@ function Ss({ stats: e, label: n }) {
1931
1931
  {
1932
1932
  testid: "execution-stat-success-rate",
1933
1933
  label: "Success rate",
1934
- value: Aa(e == null ? void 0 : e.successRate)
1934
+ value: Ra(e == null ? void 0 : e.successRate)
1935
1935
  },
1936
1936
  {
1937
1937
  testid: "execution-stat-failed",
@@ -1956,15 +1956,15 @@ function Ss({ stats: e, label: n }) {
1956
1956
  ] }, s.testid)) })
1957
1957
  ] });
1958
1958
  }
1959
- function Aa(e) {
1959
+ function Ra(e) {
1960
1960
  return e == null || !Number.isFinite(e) ? Ce : `${Math.round(e * 100)}%`;
1961
1961
  }
1962
- const Ra = {
1962
+ const Ea = {
1963
1963
  function: "Function",
1964
1964
  endpoint: "Endpoint",
1965
1965
  workflow: "Workflow"
1966
1966
  };
1967
- function Ea(e) {
1967
+ function _a(e) {
1968
1968
  return JSON.stringify(e, null, 2) ?? "null";
1969
1969
  }
1970
1970
  function $s({
@@ -2002,7 +2002,7 @@ function $s({
2002
2002
  }
2003
2003
  ),
2004
2004
  e ? /* @__PURE__ */ t(
2005
- _a,
2005
+ Oa,
2006
2006
  {
2007
2007
  execution: e,
2008
2008
  onClose: s,
@@ -2014,7 +2014,7 @@ function $s({
2014
2014
  ) : n ? /* @__PURE__ */ t("p", { className: "w6w-muted", "data-testid": "execution-detail-loading", children: "Loading…" }) : /* @__PURE__ */ t("p", { className: "w6w-muted", "data-testid": "execution-detail-empty", children: "No execution selected." })
2015
2015
  ] });
2016
2016
  }
2017
- function _a({
2017
+ function Oa({
2018
2018
  execution: e,
2019
2019
  onClose: n,
2020
2020
  onOpenInEditor: a,
@@ -2029,7 +2029,7 @@ function _a({
2029
2029
  /* @__PURE__ */ t("h3", { className: "w6w-execution-detail-name", children: e.callableName }),
2030
2030
  /* @__PURE__ */ i("div", { className: "w6w-execution-detail-meta", children: [
2031
2031
  /* @__PURE__ */ t(nt, { state: e.status }),
2032
- /* @__PURE__ */ t("span", { className: "w6w-execution-detail-kind w6w-muted w6w-small", children: Ra[e.kind] })
2032
+ /* @__PURE__ */ t("span", { className: "w6w-execution-detail-kind w6w-muted w6w-small", children: Ea[e.kind] })
2033
2033
  ] })
2034
2034
  ] }),
2035
2035
  (s || a || n) && /* @__PURE__ */ i("div", { className: "w6w-execution-detail-actions", children: [
@@ -2095,7 +2095,7 @@ function _a({
2095
2095
  "data-testid": "execution-detail-steps",
2096
2096
  children: [
2097
2097
  /* @__PURE__ */ t("strong", { className: "w6w-small", children: "Nodes" }),
2098
- /* @__PURE__ */ t(ha, { steps: e.steps, emptyLabel: "No nodes ran." })
2098
+ /* @__PURE__ */ t(pa, { steps: e.steps, emptyLabel: "No nodes ran." })
2099
2099
  ]
2100
2100
  }
2101
2101
  ),
@@ -2113,10 +2113,10 @@ function qe({ label: e, value: n }) {
2113
2113
  function He({ title: e, testid: n, value: a }) {
2114
2114
  return /* @__PURE__ */ i("section", { className: "w6w-execution-detail-section w6w-stack", "data-testid": n, children: [
2115
2115
  /* @__PURE__ */ t("strong", { className: "w6w-small", children: e }),
2116
- /* @__PURE__ */ t($e, { code: Ea(a), language: "json" })
2116
+ /* @__PURE__ */ t($e, { code: _a(a), language: "json" })
2117
2117
  ] });
2118
2118
  }
2119
- function Oa(e) {
2119
+ function Ia(e) {
2120
2120
  const n = [];
2121
2121
  for (const a of e)
2122
2122
  a.p95Ms !== null && n.push({
@@ -2132,18 +2132,18 @@ function Oa(e) {
2132
2132
  function Ts(e) {
2133
2133
  return e.attention === "now" || e.attention === "recent";
2134
2134
  }
2135
- function Ia(e) {
2135
+ function Pa(e) {
2136
2136
  const n = { now: [], recent: [], clear: [] };
2137
2137
  for (const a of e)
2138
2138
  a.attention === "now" ? n.now.push(a) : a.attention === "recent" ? n.recent.push(a) : n.clear.push(a);
2139
2139
  return n;
2140
2140
  }
2141
- function Pa(e) {
2141
+ function Ma(e) {
2142
2142
  return e.uptime.map((n) => ({ day: n.day, state: n.state }));
2143
2143
  }
2144
2144
  const Pt = 3, La = 5;
2145
- function Ma(e, n = {}) {
2146
- const a = n.compact ?? !1, { now: s, recent: r } = Ia(e), o = s.length + r.length, l = a ? s.slice(0, Pt) : s, c = a ? r.slice(0, Math.max(0, Pt - l.length)) : r, d = a ? e.slice(0, n.limit ?? La) : [...e];
2145
+ function Da(e, n = {}) {
2146
+ const a = n.compact ?? !1, { now: s, recent: r } = Pa(e), o = s.length + r.length, l = a ? s.slice(0, Pt) : s, c = a ? r.slice(0, Math.max(0, Pt - l.length)) : r, d = a ? e.slice(0, n.limit ?? La) : [...e];
2147
2147
  return {
2148
2148
  attentionCount: o,
2149
2149
  shownNow: l,
@@ -2154,25 +2154,25 @@ function Ma(e, n = {}) {
2154
2154
  };
2155
2155
  }
2156
2156
  const be = 640, se = 340, D = { top: 16, right: 24, bottom: 40, left: 56 };
2157
- function Lt(e) {
2157
+ function Mt(e) {
2158
2158
  if (e <= 0) return 1;
2159
2159
  const n = 10 ** Math.floor(Math.log10(e)), a = [1, 2, 5, 10];
2160
2160
  for (const s of a)
2161
2161
  if (e <= s * n) return s * n;
2162
2162
  return 10 * n;
2163
2163
  }
2164
- function Mt(e, n = 5) {
2164
+ function Lt(e, n = 5) {
2165
2165
  return Array.from({ length: n + 1 }, (a, s) => Math.round(e * s / n));
2166
2166
  }
2167
- function Da({
2167
+ function Ua({
2168
2168
  services: e,
2169
2169
  getHref: n,
2170
2170
  onOpen: a
2171
2171
  }) {
2172
- const s = Oa(e);
2172
+ const s = Ia(e);
2173
2173
  if (s.length === 0)
2174
2174
  return /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "No timed calls in this window yet." });
2175
- const r = Lt(Math.max(...s.map((g) => g.calls))), o = Lt(Math.max(...s.map((g) => g.p95Ms))), l = Math.max(1, ...s.map((g) => g.errorCount)), c = be - D.left - D.right, d = se - D.top - D.bottom, u = (g) => D.left + g / r * c, f = (g) => D.top + g / o * d, h = (g) => 16 + g / l * 14, v = Mt(r), w = Mt(o), m = 18, y = D.top + d / 2;
2175
+ const r = Mt(Math.max(...s.map((g) => g.calls))), o = Mt(Math.max(...s.map((g) => g.p95Ms))), l = Math.max(1, ...s.map((g) => g.errorCount)), c = be - D.left - D.right, d = se - D.top - D.bottom, u = (g) => D.left + g / r * c, f = (g) => D.top + g / o * d, h = (g) => 16 + g / l * 14, N = Lt(r), w = Lt(o), m = 18, y = D.top + d / 2;
2176
2176
  return /* @__PURE__ */ i("div", { className: "w6w-rel-scatter", children: [
2177
2177
  /* @__PURE__ */ i(
2178
2178
  "svg",
@@ -2205,7 +2205,7 @@ function Da({
2205
2205
  ),
2206
2206
  /* @__PURE__ */ t("text", { x: D.left - 8, y: f(g), className: "w6w-rel-scatter-axis-label", textAnchor: "end", children: g })
2207
2207
  ] }, `y-${g}`)),
2208
- v.map((g) => /* @__PURE__ */ t(
2208
+ N.map((g) => /* @__PURE__ */ t(
2209
2209
  "text",
2210
2210
  {
2211
2211
  x: u(g),
@@ -2238,12 +2238,12 @@ function Da({
2238
2238
  }
2239
2239
  ),
2240
2240
  s.map((g) => {
2241
- const A = h(g.errorCount), k = u(g.calls), N = f(g.p95Ms), $ = /* @__PURE__ */ i(E, { children: [
2241
+ const A = h(g.errorCount), k = u(g.calls), v = f(g.p95Ms), $ = /* @__PURE__ */ i(E, { children: [
2242
2242
  /* @__PURE__ */ t(
2243
2243
  "circle",
2244
2244
  {
2245
2245
  cx: k,
2246
- cy: N,
2246
+ cy: v,
2247
2247
  r: A / 2 + 2.5,
2248
2248
  className: `w6w-rel-scatter-ring w6w-rel-scatter-ring-${g.state}`,
2249
2249
  children: /* @__PURE__ */ i("title", { children: [
@@ -2262,7 +2262,7 @@ function Da({
2262
2262
  "circle",
2263
2263
  {
2264
2264
  cx: k,
2265
- cy: N,
2265
+ cy: v,
2266
2266
  r: A / 2,
2267
2267
  className: `w6w-rel-scatter-point w6w-rel-scatter-point-${g.state}`
2268
2268
  }
@@ -2338,7 +2338,7 @@ function Xt({ vendor: e }) {
2338
2338
  !n && e.message && /* @__PURE__ */ t("span", { className: "w6w-rel-vendor-msg w6w-small", children: e.message })
2339
2339
  ] });
2340
2340
  }
2341
- function Ua({ service: e, getHref: n, onOpen: a }) {
2341
+ function Fa({ service: e, getHref: n, onOpen: a }) {
2342
2342
  return /* @__PURE__ */ i(
2343
2343
  Yt,
2344
2344
  {
@@ -2421,9 +2421,9 @@ function Ba({
2421
2421
  /* @__PURE__ */ t("span", { className: "w6w-rel-idle-note", children: "No calls in this window" })
2422
2422
  ) : /* @__PURE__ */ i(E, { children: [
2423
2423
  /* @__PURE__ */ t(
2424
- Qn,
2424
+ Zn,
2425
2425
  {
2426
- days: Pa(e),
2426
+ days: Ma(e),
2427
2427
  ariaLabel: `${e.displayName}, ${e.uptime.length}-day status, oldest day first`
2428
2428
  }
2429
2429
  ),
@@ -2450,14 +2450,14 @@ function As({
2450
2450
  onShowAll: u,
2451
2451
  slots: f
2452
2452
  }) {
2453
- const h = a ?? (n == null ? void 0 : n.days) ?? 30, v = e.length > 0 && e.every((R) => R.calls > 0 && R.state === "ok"), {
2453
+ const h = a ?? (n == null ? void 0 : n.days) ?? 30, N = e.length > 0 && e.every((R) => R.calls > 0 && R.state === "ok"), {
2454
2454
  attentionCount: w,
2455
2455
  shownNow: m,
2456
2456
  shownRecent: y,
2457
2457
  hiddenAttentionCount: g,
2458
2458
  shownTable: A,
2459
2459
  hiddenTableCount: k
2460
- } = Ma(e, { compact: s, limit: o }), N = r ?? !s, $ = d !== void 0 || u !== void 0, x = (R) => {
2460
+ } = Da(e, { compact: s, limit: o }), v = r ?? !s, $ = d !== void 0 || u !== void 0, x = (R) => {
2461
2461
  const _ = R.startsWith("Show") ? "w6w-muted w6w-small" : void 0;
2462
2462
  return d !== void 0 ? /* @__PURE__ */ t("a", { href: d, className: _, onClick: u, children: R }) : u ? /* @__PURE__ */ t(
2463
2463
  "button",
@@ -2488,7 +2488,7 @@ function As({
2488
2488
  ] }),
2489
2489
  /* @__PURE__ */ i("div", { className: s ? "w6w-rel-card" : void 0, children: [
2490
2490
  /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small w6w-rel-intro", children: "Connected services across your account. Performance for the selected project." }),
2491
- v && /* @__PURE__ */ i("div", { className: s ? "w6w-rel-allclear" : "w6w-rel-card w6w-rel-allclear", children: [
2491
+ N && /* @__PURE__ */ i("div", { className: s ? "w6w-rel-allclear" : "w6w-rel-card w6w-rel-allclear", children: [
2492
2492
  /* @__PURE__ */ t("h4", { children: "All clear" }),
2493
2493
  /* @__PURE__ */ i("p", { children: [
2494
2494
  "Every service you called in the last ",
@@ -2511,7 +2511,7 @@ function As({
2511
2511
  w
2512
2512
  ] })
2513
2513
  ] }),
2514
- /* @__PURE__ */ t("div", { className: "w6w-rel-issues", children: [...m, ...y].map((R) => /* @__PURE__ */ t(Ua, { service: R, getHref: l, onOpen: c }, R.appId)) }),
2514
+ /* @__PURE__ */ t("div", { className: "w6w-rel-issues", children: [...m, ...y].map((R) => /* @__PURE__ */ t(Fa, { service: R, getHref: l, onOpen: c }, R.appId)) }),
2515
2515
  g > 0 && /* @__PURE__ */ i("p", { className: "w6w-muted w6w-small w6w-rel-more-note", children: [
2516
2516
  g,
2517
2517
  " more ",
@@ -2524,9 +2524,9 @@ function As({
2524
2524
  ] })
2525
2525
  ] })
2526
2526
  ] }),
2527
- N && /* @__PURE__ */ i("div", { className: "w6w-rel-group", children: [
2527
+ v && /* @__PURE__ */ i("div", { className: "w6w-rel-group", children: [
2528
2528
  /* @__PURE__ */ t("h4", { className: "w6w-rel-group-head", children: "Performance across your APIs" }),
2529
- /* @__PURE__ */ t(Da, { services: e, getHref: l, onOpen: c })
2529
+ /* @__PURE__ */ t(Ua, { services: e, getHref: l, onOpen: c })
2530
2530
  ] }),
2531
2531
  A.length > 0 && /* @__PURE__ */ i("div", { className: "w6w-rel-group", children: [
2532
2532
  /* @__PURE__ */ i("h4", { className: "w6w-rel-group-head", children: [
@@ -2568,7 +2568,7 @@ function As({
2568
2568
  ] })
2569
2569
  ] });
2570
2570
  }
2571
- function Fa(e, n) {
2571
+ function ja(e, n) {
2572
2572
  return e.render ? e.render(n) : String(n[e.key] ?? "");
2573
2573
  }
2574
2574
  function ue(e) {
@@ -2582,18 +2582,18 @@ function ue(e) {
2582
2582
  children: [
2583
2583
  /* @__PURE__ */ t("thead", { children: /* @__PURE__ */ t("tr", { children: n.map((f) => /* @__PURE__ */ t("th", { style: { width: f.width, textAlign: f.align }, scope: "col", children: f.header }, f.key)) }) }),
2584
2584
  /* @__PURE__ */ t("tbody", { children: a.map((f) => {
2585
- var v;
2585
+ var N;
2586
2586
  const h = o == null ? void 0 : o(f);
2587
2587
  return (
2588
2588
  // biome-ignore lint/a11y/useKeyWithClickEvents: row click is a mouse convenience; keyboard users reach the row through its cell anchors (getRowHref) or the column's own controls.
2589
2589
  /* @__PURE__ */ t(
2590
2590
  "tr",
2591
2591
  {
2592
- "data-testid": (v = e.rowTestId) == null ? void 0 : v.call(e, f),
2592
+ "data-testid": (N = e.rowTestId) == null ? void 0 : N.call(e, f),
2593
2593
  className: r ? "w6w-data-table-row-clickable" : void 0,
2594
2594
  onClick: r ? (w) => r(f, w) : void 0,
2595
2595
  children: n.map((w) => {
2596
- const m = Fa(w, f);
2596
+ const m = ja(w, f);
2597
2597
  return /* @__PURE__ */ t("td", { style: { textAlign: w.align }, children: h !== void 0 && w.link !== !1 ? /* @__PURE__ */ t("a", { className: "w6w-data-table-link", href: h, children: m }) : m }, w.key);
2598
2598
  })
2599
2599
  },
@@ -2632,24 +2632,24 @@ function Rs({
2632
2632
  onCreate: u,
2633
2633
  creating: f,
2634
2634
  onImport: h,
2635
- onOpen: v,
2635
+ onOpen: N,
2636
2636
  getHref: w,
2637
2637
  showArchived: m,
2638
2638
  onShowArchivedChange: y,
2639
2639
  slots: g
2640
2640
  }) {
2641
- const [A, k] = b(!1), N = m !== void 0, $ = N ? m : A, x = $ ? e : e.filter((S) => !S.archived), R = v !== void 0 || w !== void 0, _ = (S) => {
2642
- N || k(S), y == null || y(S);
2641
+ const [A, k] = b(!1), v = m !== void 0, $ = v ? m : A, x = $ ? e : e.filter((S) => !S.archived), R = N !== void 0 || w !== void 0, _ = (S) => {
2642
+ v || k(S), y == null || y(S);
2643
2643
  }, U = [
2644
2644
  {
2645
2645
  key: "main",
2646
2646
  header: "Name",
2647
2647
  render: (S) => {
2648
- const L = /* @__PURE__ */ i("span", { className: "w6w-callable-list-main", title: R ? o : void 0, children: [
2648
+ const M = /* @__PURE__ */ i("span", { className: "w6w-callable-list-main", title: R ? o : void 0, children: [
2649
2649
  /* @__PURE__ */ t("span", { children: S.title }),
2650
2650
  S.description != null && /* @__PURE__ */ t("span", { className: "w6w-muted w6w-small w6w-callable-list-row-desc", children: S.description })
2651
2651
  ] });
2652
- return v && !w ? /* @__PURE__ */ t("button", { type: "button", className: "w6w-callable-list-open", children: L }) : L;
2652
+ return N && !w ? /* @__PURE__ */ t("button", { type: "button", className: "w6w-callable-list-open", children: M }) : M;
2653
2653
  }
2654
2654
  },
2655
2655
  {
@@ -2724,24 +2724,13 @@ function Rs({
2724
2724
  rowKey: (S) => S.id,
2725
2725
  loading: c,
2726
2726
  getRowHref: w ? (S) => w(S.id) : void 0,
2727
- onRowClick: v ? (S, L) => v(S.id, L) : void 0
2727
+ onRowClick: N ? (S, M) => N(S.id, M) : void 0
2728
2728
  }
2729
2729
  )
2730
2730
  ] })
2731
2731
  ] });
2732
2732
  }
2733
- function Ja(e, n) {
2734
- if (e.app) return e.app;
2735
- if (e.app !== null)
2736
- return n.get(e.appId);
2737
- }
2738
- function Es(e) {
2739
- const n = /* @__PURE__ */ new Set();
2740
- for (const a of e)
2741
- a.app === void 0 && n.add(a.appId);
2742
- return [...n];
2743
- }
2744
- function _s({
2733
+ function Es({
2745
2734
  connections: e,
2746
2735
  appsById: n,
2747
2736
  loading: a,
@@ -2753,12 +2742,12 @@ function _s({
2753
2742
  busy: d,
2754
2743
  slots: u
2755
2744
  }) {
2756
- const f = n ?? /* @__PURE__ */ new Map(), h = l !== void 0 || c !== void 0, v = [
2745
+ const f = n ?? /* @__PURE__ */ new Map(), h = l !== void 0 || c !== void 0, N = [
2757
2746
  {
2758
2747
  key: "name",
2759
2748
  header: "Name",
2760
2749
  render: (w) => {
2761
- const m = Ja(w, f), y = w.displayName || w.id;
2750
+ const m = In(w, f), y = w.displayName || w.id;
2762
2751
  return /* @__PURE__ */ i("span", { className: "w6w-connection-cell-name", children: [
2763
2752
  /* @__PURE__ */ t(
2764
2753
  _e,
@@ -2801,7 +2790,7 @@ function _s({
2801
2790
  ] })
2802
2791
  }
2803
2792
  ];
2804
- return h && v.push({
2793
+ return h && N.push({
2805
2794
  key: "actions",
2806
2795
  header: "",
2807
2796
  align: "right",
@@ -2839,7 +2828,7 @@ function _s({
2839
2828
  e.length === 0 && !a ? /* @__PURE__ */ t(Ee, { testId: "w6w-connection-list-empty", children: (u == null ? void 0 : u.empty) ?? "No connections yet." }) : /* @__PURE__ */ t(
2840
2829
  ue,
2841
2830
  {
2842
- columns: v,
2831
+ columns: N,
2843
2832
  rows: e,
2844
2833
  rowKey: (w) => w.id,
2845
2834
  loading: a,
@@ -2849,35 +2838,35 @@ function _s({
2849
2838
  )
2850
2839
  ] });
2851
2840
  }
2852
- function Os({ connection: e, onClose: n, onSaved: a }) {
2853
- const s = Jt(), r = s.updateConnection, o = e.builtIn === !0, l = !o && typeof r == "function", [c, d] = b(e.displayName ?? ""), [u, f] = b({}), [h, v] = b(null), [w, m] = b(null), [y, g] = b(!1), [A, k] = b({}), [N, $] = b(!1), [x, R] = b(!1), [_, U] = b(null), [O, S] = b(null);
2841
+ function _s({ connection: e, onClose: n, onSaved: a }) {
2842
+ const s = jt(), r = s.updateConnection, o = e.builtIn === !0, l = !o && typeof r == "function", [c, d] = b(e.displayName ?? ""), [u, f] = b({}), [h, N] = b(null), [w, m] = b(null), [y, g] = b(!1), [A, k] = b({}), [v, $] = b(!1), [x, R] = b(!1), [_, U] = b(null), [O, S] = b(null);
2854
2843
  H(() => {
2855
2844
  if (!l) return;
2856
2845
  let C = !1;
2857
- return v(null), s.getAppAuth(e.appId).then((I) => !C && v(I)).catch((I) => !C && m(I.message)), () => {
2846
+ return N(null), s.getAppAuth(e.appId).then((I) => !C && N(I)).catch((I) => !C && m(I.message)), () => {
2858
2847
  C = !0;
2859
2848
  };
2860
2849
  }, [s, l, e.appId]);
2861
- const L = h == null ? void 0 : h.find((C) => C.key === e.authKey), ee = (L == null ? void 0 : L.type) === "oauth2", F = ee ? [] : (L == null ? void 0 : L.fields) ?? [], J = e.credentialId, B = !!J && typeof s.rotateCredential == "function" && !ee, te = B && (L != null && L.serviceAccount) ? In(L.serviceAccount) : [];
2850
+ const M = h == null ? void 0 : h.find((C) => C.key === e.authKey), ee = (M == null ? void 0 : M.type) === "oauth2", B = ee ? [] : (M == null ? void 0 : M.fields) ?? [], j = e.credentialId, F = !!j && typeof s.rotateCredential == "function" && !ee, te = F && (M != null && M.serviceAccount) ? Pn(M.serviceAccount) : [];
2862
2851
  H(() => {
2863
- if (!l || !B || !J || typeof s.getCredential != "function") return;
2852
+ if (!l || !F || !j || typeof s.getCredential != "function") return;
2864
2853
  let C = !1;
2865
- return s.getCredential(J).then((I) => !C && U(I.connectionCount)).catch(() => {
2854
+ return s.getCredential(j).then((I) => !C && U(I.connectionCount)).catch(() => {
2866
2855
  }), () => {
2867
2856
  C = !0;
2868
2857
  };
2869
- }, [s, l, B, J]);
2858
+ }, [s, l, F, j]);
2870
2859
  function Y() {
2871
- if (B) {
2860
+ if (F) {
2872
2861
  const P = {};
2873
2862
  c !== (e.displayName ?? "") && (P.displayName = c);
2874
- const j = Mn(te, A);
2875
- return j && (P.binding = j), P.displayName === void 0 && P.binding === void 0 ? null : P;
2863
+ const J = Dn(te, A);
2864
+ return J && (P.binding = J), P.displayName === void 0 && P.binding === void 0 ? null : P;
2876
2865
  }
2877
2866
  const C = {};
2878
- for (const P of F) {
2879
- const j = u[P.key];
2880
- j !== void 0 && j !== "" && (C[P.key] = j);
2867
+ for (const P of B) {
2868
+ const J = u[P.key];
2869
+ J !== void 0 && J !== "" && (C[P.key] = J);
2881
2870
  }
2882
2871
  const I = {};
2883
2872
  return c !== (e.displayName ?? "") && (I.displayName = c), Object.keys(C).length > 0 && (I.credential = C), I.displayName === void 0 && I.credential === void 0 ? null : I;
@@ -2888,7 +2877,7 @@ function Os({ connection: e, onClose: n, onSaved: a }) {
2888
2877
  const C = Y();
2889
2878
  if (!C) {
2890
2879
  m(
2891
- B ? "Nothing to update — change the name or a binding field." : "Nothing to update — change the name or a credential field."
2880
+ F ? "Nothing to update — change the name or a binding field." : "Nothing to update — change the name or a credential field."
2892
2881
  );
2893
2882
  return;
2894
2883
  }
@@ -2902,20 +2891,20 @@ function Os({ connection: e, onClose: n, onSaved: a }) {
2902
2891
  g(!1);
2903
2892
  }
2904
2893
  }
2905
- const Oe = F.some(
2894
+ const Oe = B.some(
2906
2895
  (C) => C.required && (u[C.key] === void 0 || u[C.key] === "")
2907
2896
  );
2908
2897
  async function we() {
2909
- if (!J || !s.rotateCredential || y) return;
2898
+ if (!j || !s.rotateCredential || y) return;
2910
2899
  m(null);
2911
- const C = Ln(F, u);
2900
+ const C = Ln(B, u);
2912
2901
  if ("error" in C) {
2913
2902
  m(C.error);
2914
2903
  return;
2915
2904
  }
2916
2905
  g(!0);
2917
2906
  try {
2918
- await s.rotateCredential(J, { source: C.values }), f({}), $(!1), R(!0), S(null);
2907
+ await s.rotateCredential(j, { source: C.values }), f({}), $(!1), R(!0), S(null);
2919
2908
  } catch (I) {
2920
2909
  m(I.message);
2921
2910
  } finally {
@@ -2923,16 +2912,16 @@ function Os({ connection: e, onClose: n, onSaved: a }) {
2923
2912
  }
2924
2913
  }
2925
2914
  async function Ie() {
2926
- if (!(!J || !s.testCredential)) {
2915
+ if (!(!j || !s.testCredential)) {
2927
2916
  m(null);
2928
2917
  try {
2929
- S(await s.testCredential(J));
2918
+ S(await s.testCredential(j));
2930
2919
  } catch (C) {
2931
2920
  m(C.message);
2932
2921
  }
2933
2922
  }
2934
2923
  }
2935
- const Q = Pn(X, { enabled: l && !y });
2924
+ const Q = Mn(X, { enabled: l && !y });
2936
2925
  return /* @__PURE__ */ t(Se, { title: "Edit connection", onClose: n, children: /* @__PURE__ */ i("div", { className: "w6w-stepconfig", children: [
2937
2926
  /* @__PURE__ */ t("div", { className: "w6w-modal-body", children: /* @__PURE__ */ i("div", { className: "w6w-stack", children: [
2938
2927
  o && /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "This connection is built in — it has no stored credential to edit." }),
@@ -2960,10 +2949,10 @@ function Os({ connection: e, onClose: n, onSaved: a }) {
2960
2949
  ] }),
2961
2950
  h === null && !w && /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "Loading auth fields…" }),
2962
2951
  ee && /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "This is an OAuth connection. You can rename it here; its credential is renewed by re-authorizing it." }),
2963
- B && te.length > 0 && /* @__PURE__ */ i(E, { children: [
2952
+ F && te.length > 0 && /* @__PURE__ */ i(E, { children: [
2964
2953
  /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "Leave a binding field blank to keep it unchanged." }),
2965
2954
  /* @__PURE__ */ t(
2966
- Be,
2955
+ Fe,
2967
2956
  {
2968
2957
  mode: "edit",
2969
2958
  fields: te,
@@ -2973,7 +2962,7 @@ function Os({ connection: e, onClose: n, onSaved: a }) {
2973
2962
  }
2974
2963
  )
2975
2964
  ] }),
2976
- B && /* @__PURE__ */ i("div", { className: "w6w-stack", "data-w6w": "credential-section", children: [
2965
+ F && /* @__PURE__ */ i("div", { className: "w6w-stack", "data-w6w": "credential-section", children: [
2977
2966
  typeof s.testCredential == "function" && /* @__PURE__ */ i("div", { children: [
2978
2967
  /* @__PURE__ */ t(
2979
2968
  "button",
@@ -2995,15 +2984,15 @@ function Os({ connection: e, onClose: n, onSaved: a }) {
2995
2984
  e.lastTestOk === !0 ? "passed" : e.lastTestOk === !1 ? "failed" : "never tested"
2996
2985
  ] }),
2997
2986
  x && /* @__PURE__ */ t("p", { className: "w6w-small", children: "Credential rotated." }),
2998
- N ? /* @__PURE__ */ i(E, { children: [
2987
+ v ? /* @__PURE__ */ i(E, { children: [
2999
2988
  /* @__PURE__ */ i("p", { className: "w6w-muted w6w-small", children: [
3000
2989
  "Enter the full new credential; it replaces the stored one.",
3001
2990
  _ !== null && ` It is used by ${_} connection${_ === 1 ? "" : "s"}, and all of them switch to it.`
3002
2991
  ] }),
3003
2992
  /* @__PURE__ */ t(
3004
- Be,
2993
+ Fe,
3005
2994
  {
3006
- fields: F,
2995
+ fields: B,
3007
2996
  values: u,
3008
2997
  onChange: f
3009
2998
  }
@@ -3042,13 +3031,13 @@ function Os({ connection: e, onClose: n, onSaved: a }) {
3042
3031
  }
3043
3032
  )
3044
3033
  ] }),
3045
- !B && F.length > 0 && /* @__PURE__ */ i(E, { children: [
3034
+ !F && B.length > 0 && /* @__PURE__ */ i(E, { children: [
3046
3035
  /* @__PURE__ */ t("p", { className: "w6w-muted w6w-small", children: "Leave a field blank to keep it unchanged. Filled fields replace the stored credential." }),
3047
3036
  /* @__PURE__ */ t(
3048
- Be,
3037
+ Fe,
3049
3038
  {
3050
3039
  mode: "edit",
3051
- fields: F,
3040
+ fields: B,
3052
3041
  values: u,
3053
3042
  onChange: f,
3054
3043
  enterSubmitProps: Q
@@ -3064,7 +3053,7 @@ function Os({ connection: e, onClose: n, onSaved: a }) {
3064
3053
  ] })
3065
3054
  ] }) });
3066
3055
  }
3067
- function Is({ conn: e, app: n, children: a }) {
3056
+ function Os({ conn: e, app: n, children: a }) {
3068
3057
  return /* @__PURE__ */ i("div", { className: "w6w-connection-header", "data-testid": "connection-header", children: [
3069
3058
  /* @__PURE__ */ t(
3070
3059
  _e,
@@ -3079,7 +3068,7 @@ function Is({ conn: e, app: n, children: a }) {
3079
3068
  /* @__PURE__ */ i("div", { className: "w6w-connection-header-main", children: [
3080
3069
  /* @__PURE__ */ t("h2", { className: "w6w-connection-header-title", children: e.displayName || e.id }),
3081
3070
  /* @__PURE__ */ i("p", { className: "w6w-muted w6w-small w6w-connection-header-meta", children: [
3082
- /* @__PURE__ */ t(Yn, { value: e.id, className: "w6w-connection-id-copy" }),
3071
+ /* @__PURE__ */ t(Gn, { value: e.id, className: "w6w-connection-id-copy" }),
3083
3072
  " · App",
3084
3073
  " ",
3085
3074
  /* @__PURE__ */ t("code", { children: e.appId }),
@@ -3107,12 +3096,12 @@ function Is({ conn: e, app: n, children: a }) {
3107
3096
  a && /* @__PURE__ */ t("div", { className: "w6w-connection-header-actions", children: a })
3108
3097
  ] });
3109
3098
  }
3110
- const ja = (e) => String(e);
3099
+ const Ja = (e) => String(e);
3111
3100
  function Ut(e) {
3112
3101
  const n = Math.min(100, Math.max(0, e));
3113
3102
  return Number(n.toFixed(4));
3114
3103
  }
3115
- function Ps({
3104
+ function Is({
3116
3105
  label: e,
3117
3106
  used: n,
3118
3107
  limit: a,
@@ -3121,7 +3110,7 @@ function Ps({
3121
3110
  className: o,
3122
3111
  testId: l
3123
3112
  }) {
3124
- const c = r ?? ja, d = Number.isFinite(s) && s > 0, u = a > 0 ? Ut(n / a * 100) : 100, f = d && a > 0 ? Ut(Math.min(100 - u, s / a * 100)) : 0, h = n >= a, v = `${c(n)} / ${c(a)}`, w = ["w6w-budget-meter"];
3113
+ const c = r ?? Ja, d = Number.isFinite(s) && s > 0, u = a > 0 ? Ut(n / a * 100) : 100, f = d && a > 0 ? Ut(Math.min(100 - u, s / a * 100)) : 0, h = n >= a, N = `${c(n)} / ${c(a)}`, w = ["w6w-budget-meter"];
3125
3114
  return h && w.push("w6w-budget-meter-over"), o && w.push(o), /* @__PURE__ */ i(
3126
3115
  "div",
3127
3116
  {
@@ -3131,12 +3120,12 @@ function Ps({
3131
3120
  "aria-valuemin": 0,
3132
3121
  "aria-valuenow": n,
3133
3122
  "aria-valuemax": a,
3134
- "aria-valuetext": v,
3123
+ "aria-valuetext": N,
3135
3124
  "data-testid": l,
3136
3125
  children: [
3137
3126
  /* @__PURE__ */ i("div", { className: "w6w-budget-meter-head", children: [
3138
3127
  /* @__PURE__ */ t("span", { className: "w6w-budget-meter-label", children: e }),
3139
- /* @__PURE__ */ t("span", { className: "w6w-budget-meter-value", children: v })
3128
+ /* @__PURE__ */ t("span", { className: "w6w-budget-meter-value", children: N })
3140
3129
  ] }),
3141
3130
  /* @__PURE__ */ i("div", { className: "w6w-budget-meter-track", children: [
3142
3131
  /* @__PURE__ */ t("div", { className: "w6w-budget-meter-used", style: { width: `${u}%` } }),
@@ -3150,13 +3139,13 @@ const Ka = {
3150
3139
  kv: "Key-value",
3151
3140
  doc: "Document",
3152
3141
  table: "Table"
3153
- }, Ls = ["kv", "doc", "table"], Qt = ["string", "number", "integer", "boolean", "date", "datetime"], Wa = 5242880;
3142
+ }, Ps = ["kv", "doc", "table"], Qt = ["string", "number", "integer", "boolean", "date", "datetime"], Wa = 5242880;
3154
3143
  function Ms(e) {
3155
3144
  var a;
3156
3145
  const n = (a = e.schema) == null ? void 0 : a.valueType;
3157
3146
  return typeof n == "string" && Qt.includes(n) ? n : "string";
3158
3147
  }
3159
- function Ds(e) {
3148
+ function Ls(e) {
3160
3149
  var s, r;
3161
3150
  if (e.kind !== "table") return null;
3162
3151
  const n = (s = e.schema) == null ? void 0 : s.columns;
@@ -3164,7 +3153,7 @@ function Ds(e) {
3164
3153
  const a = (r = e.schema) == null ? void 0 : r.key;
3165
3154
  return typeof a == "string" ? { columns: n, key: a } : { columns: n };
3166
3155
  }
3167
- function Us(e, n) {
3156
+ function Ds(e, n) {
3168
3157
  const a = e == null ? void 0 : e.match(/filename="([^"]*)"/), s = a == null ? void 0 : a[1];
3169
3158
  return s !== void 0 && s !== "" ? s : `${n}.csv`;
3170
3159
  }
@@ -3229,7 +3218,7 @@ function it(e, n) {
3229
3218
  const a = JSON.stringify(n);
3230
3219
  return a === void 0 ? "" : a;
3231
3220
  }
3232
- function Bs(e, n) {
3221
+ function Us(e, n) {
3233
3222
  switch (e) {
3234
3223
  case "string":
3235
3224
  return typeof n == "string";
@@ -3314,15 +3303,15 @@ function Za(e) {
3314
3303
  const a = G(e.field);
3315
3304
  return a !== void 0 ? { kind: "field", field: a } : { kind: "form" };
3316
3305
  }
3317
- function Bt(e) {
3306
+ function Ft(e) {
3318
3307
  return e + 2;
3319
3308
  }
3320
- const nn = "\0new", an = "Changed by someone else since you loaded it.", Ft = "Enter a JSON object or array.", es = "The file is larger than 5 MB.";
3309
+ const nn = "\0new", an = "Changed by someone else since you loaded it.", Bt = "Enter a JSON object or array.", es = "The file is larger than 5 MB.";
3321
3310
  function ts(e) {
3322
3311
  const n = e.value;
3323
3312
  return n !== null && typeof n == "object" && !Array.isArray(n) ? n : {};
3324
3313
  }
3325
- function Js(e, n) {
3314
+ function Bs(e, n) {
3326
3315
  const a = ts(e), s = {};
3327
3316
  for (const r of n) s[r.name] = it(r.type, a[r.name]);
3328
3317
  return { id: e.key, version: e.version, cells: s };
@@ -3333,13 +3322,13 @@ function js(e) {
3333
3322
  n[a.name] = a.default === void 0 ? "" : it(a.type, a.default);
3334
3323
  return { id: nn, version: null, cells: n };
3335
3324
  }
3336
- function Ks(e, n, a) {
3325
+ function Js(e, n, a) {
3337
3326
  const s = [];
3338
3327
  for (const r of a)
3339
3328
  (e.cells[r.name] ?? "") !== (n.cells[r.name] ?? "") && s.push(r.name);
3340
3329
  return s;
3341
3330
  }
3342
- function Ws(e, n) {
3331
+ function Ks(e, n) {
3343
3332
  const a = {}, s = {};
3344
3333
  for (const r of n) {
3345
3334
  const o = lt(r.type, e.cells[r.name] ?? "", r.required);
@@ -3347,14 +3336,14 @@ function Ws(e, n) {
3347
3336
  }
3348
3337
  return Object.keys(s).length > 0 ? { ok: !1, errors: s } : { ok: !0, value: a };
3349
3338
  }
3350
- function Vs(e, n) {
3339
+ function Ws(e, n) {
3351
3340
  if (e === null) return;
3352
3341
  const a = Date.parse(e);
3353
3342
  if (!Number.isFinite(a)) return;
3354
3343
  const s = Math.ceil((a - n) / 1e3);
3355
3344
  return s > 0 ? s : void 0;
3356
3345
  }
3357
- function qs(e, n, a) {
3346
+ function Vs(e, n, a) {
3358
3347
  if (e.id === nn)
3359
3348
  return a === void 0 ? { kind: "insert", value: n } : { kind: "insert", value: n, ttlSeconds: a };
3360
3349
  const s = {
@@ -3365,11 +3354,11 @@ function qs(e, n, a) {
3365
3354
  };
3366
3355
  return a === void 0 ? s : { ...s, ttlSeconds: a };
3367
3356
  }
3368
- function Hs(e, n) {
3357
+ function qs(e, n) {
3369
3358
  const a = Za(e);
3370
3359
  return a.kind !== "cell" || !n.some((s) => s.name === a.column) ? null : { [a.column]: e.message };
3371
3360
  }
3372
- function zs(e) {
3361
+ function Hs(e) {
3373
3362
  return e.status === 409 && e.code === "version_conflict";
3374
3363
  }
3375
3364
  function ns(e) {
@@ -3377,16 +3366,16 @@ function ns(e) {
3377
3366
  try {
3378
3367
  n = JSON.parse(e);
3379
3368
  } catch {
3380
- return { ok: !1, message: Ft };
3369
+ return { ok: !1, message: Bt };
3381
3370
  }
3382
- return n === null || typeof n != "object" ? { ok: !1, message: Ft } : { ok: !0, value: n };
3371
+ return n === null || typeof n != "object" ? { ok: !1, message: Bt } : { ok: !0, value: n };
3383
3372
  }
3384
- function Ys(e, n) {
3373
+ function zs(e, n) {
3385
3374
  if (e === "string") return { ok: !0, value: n };
3386
3375
  const a = lt(e, n, !0);
3387
3376
  return a.ok ? { ok: !0, value: a.value } : { ok: !1, message: a.message };
3388
3377
  }
3389
- function Gs(e) {
3378
+ function Ys(e) {
3390
3379
  if (e.status === 200) {
3391
3380
  let s = 0;
3392
3381
  try {
@@ -3401,9 +3390,9 @@ function Gs(e) {
3401
3390
  };
3402
3391
  }
3403
3392
  const n = Qa(e);
3404
- return n.row === void 0 ? { ok: !1, message: n.message } : { ok: !1, message: `${n.column ? `Line ${Bt(n.row)}, column ${n.column}` : `Line ${Bt(n.row)}`}: ${n.message}` };
3393
+ return n.row === void 0 ? { ok: !1, message: n.message } : { ok: !1, message: `${n.column ? `Line ${Ft(n.row)}, column ${n.column}` : `Line ${Ft(n.row)}`}: ${n.message}` };
3405
3394
  }
3406
- function Xs({
3395
+ function Gs({
3407
3396
  stores: e,
3408
3397
  loading: n,
3409
3398
  error: a,
@@ -3415,7 +3404,7 @@ function Xs({
3415
3404
  formatSize: d,
3416
3405
  slots: u
3417
3406
  }) {
3418
- const f = d ?? Vt, h = o !== void 0 || l !== void 0, v = [
3407
+ const f = d ?? Vt, h = o !== void 0 || l !== void 0, N = [
3419
3408
  { key: "name", header: "Name", render: (w) => /* @__PURE__ */ t("strong", { children: w.name }) },
3420
3409
  { key: "kind", header: "Kind", render: (w) => Ka[w.kind] },
3421
3410
  { key: "entries", header: "Entries", align: "right", render: (w) => String(w.entryCount) },
@@ -3426,7 +3415,7 @@ function Xs({
3426
3415
  render: (w) => new Date(w.updatedAt).toLocaleString()
3427
3416
  }
3428
3417
  ];
3429
- return h && v.push({
3418
+ return h && N.push({
3430
3419
  key: "actions",
3431
3420
  header: "",
3432
3421
  align: "right",
@@ -3464,7 +3453,7 @@ function Xs({
3464
3453
  e.length === 0 && !n ? /* @__PURE__ */ t(Ee, { testId: "w6w-data-store-list-empty", children: (u == null ? void 0 : u.empty) ?? "No data stores yet." }) : /* @__PURE__ */ t(
3465
3454
  ue,
3466
3455
  {
3467
- columns: v,
3456
+ columns: N,
3468
3457
  rows: e,
3469
3458
  rowKey: (w) => w.id,
3470
3459
  loading: n,
@@ -3481,7 +3470,7 @@ function ss(e, n) {
3481
3470
  const { default: a, ...s } = e, r = lt(e.type, n, !1);
3482
3471
  return r.ok ? r.value === void 0 ? { column: s } : { column: { ...s, default: r.value } } : { column: s, error: r.message };
3483
3472
  }
3484
- function Qs(e) {
3473
+ function Xs(e) {
3485
3474
  const { columns: n, onChange: a, keyColumn: s, onKeyColumnChange: r, columnErrors: o } = e, [l, c] = b({}), d = n.filter(as), u = d.some((m) => m.name === s) ? s : "";
3486
3475
  H(() => {
3487
3476
  s !== "" && u === "" && r("");
@@ -3492,16 +3481,16 @@ function Qs(e) {
3492
3481
  function h(m, y) {
3493
3482
  a(n.map((g, A) => A === m ? { ...g, ...y } : g));
3494
3483
  }
3495
- function v(m, y, g, A) {
3496
- const k = { ...n[m], ...A, type: y }, { column: N, error: $ } = ss(k, g);
3497
- c((x) => ({ ...x, [m]: $ === void 0 ? { text: g } : { text: g, error: $ } })), a(n.map((x, R) => R === m ? N : x));
3484
+ function N(m, y, g, A) {
3485
+ const k = { ...n[m], ...A, type: y }, { column: v, error: $ } = ss(k, g);
3486
+ c((x) => ({ ...x, [m]: $ === void 0 ? { text: g } : { text: g, error: $ } })), a(n.map((x, R) => R === m ? v : x));
3498
3487
  }
3499
3488
  function w(m) {
3500
3489
  c((y) => {
3501
3490
  const g = {};
3502
3491
  for (const [A, k] of Object.entries(y)) {
3503
- const N = Number(A);
3504
- N < m ? g[N] = k : N > m && (g[N - 1] = k);
3492
+ const v = Number(A);
3493
+ v < m ? g[v] = k : v > m && (g[v - 1] = k);
3505
3494
  }
3506
3495
  return g;
3507
3496
  }), a(n.filter((y, g) => g !== m));
@@ -3533,7 +3522,7 @@ function Qs(e) {
3533
3522
  {
3534
3523
  value: m.type,
3535
3524
  "aria-label": "Column type",
3536
- onChange: (k) => v(y, k.target.value, A),
3525
+ onChange: (k) => N(y, k.target.value, A),
3537
3526
  children: Qt.map((k) => /* @__PURE__ */ t("option", { value: k, children: k }, k))
3538
3527
  }
3539
3528
  ),
@@ -3556,7 +3545,7 @@ function Qs(e) {
3556
3545
  value: A,
3557
3546
  placeholder: "default",
3558
3547
  "aria-label": "Column default",
3559
- onChange: (k) => v(y, m.type, k.target.value)
3548
+ onChange: (k) => N(y, m.type, k.target.value)
3560
3549
  }
3561
3550
  ),
3562
3551
  /* @__PURE__ */ t(
@@ -3595,7 +3584,7 @@ function Qs(e) {
3595
3584
  ] })
3596
3585
  ] });
3597
3586
  }
3598
- function Zs({ result: e, busy: n, onImport: a, onRefuse: s, onExport: r }) {
3587
+ function Qs({ result: e, busy: n, onImport: a, onRefuse: s, onExport: r }) {
3599
3588
  function o(l) {
3600
3589
  var u;
3601
3590
  const c = l.target, d = (u = c.files) == null ? void 0 : u[0];
@@ -3634,7 +3623,7 @@ function Zs({ result: e, busy: n, onImport: a, onRefuse: s, onExport: r }) {
3634
3623
  e !== null && /* @__PURE__ */ t("div", { className: e.ok ? "w6w-result" : "w6w-result w6w-error", "data-testid": "csv-result", children: e.message })
3635
3624
  ] });
3636
3625
  }
3637
- function el({
3626
+ function Zs({
3638
3627
  rows: e,
3639
3628
  empty: n,
3640
3629
  loading: a,
@@ -3723,7 +3712,7 @@ function el({
3723
3712
  )
3724
3713
  ] });
3725
3714
  }
3726
- function tl({
3715
+ function el({
3727
3716
  kind: e,
3728
3717
  isNew: n,
3729
3718
  entryKey: a,
@@ -3736,14 +3725,14 @@ function tl({
3736
3725
  onTextChange: u,
3737
3726
  onKeyChange: f,
3738
3727
  onDelete: h,
3739
- onSave: v,
3728
+ onSave: N,
3740
3729
  onCancel: w,
3741
3730
  onReload: m
3742
3731
  }) {
3743
- const [y, g] = b(n), [A, k] = b(!1), N = jt(null);
3732
+ const [y, g] = b(n), [A, k] = b(!1), v = Jt(null);
3744
3733
  H(() => {
3745
3734
  var O;
3746
- n || (O = N.current) == null || O.focus();
3735
+ n || (O = v.current) == null || O.focus();
3747
3736
  }, [n]);
3748
3737
  const $ = e === "doc" ? "document" : "entry", x = e === "doc" ? ns(o) : void 0, R = x !== void 0 && !x.ok, _ = l || (A && x && !x.ok ? x.message : null), U = /* @__PURE__ */ i(E, { children: [
3749
3738
  n ? /* @__PURE__ */ i("label", { className: "w6w-field", children: [
@@ -3825,7 +3814,7 @@ function tl({
3825
3814
  /* @__PURE__ */ t(
3826
3815
  "button",
3827
3816
  {
3828
- ref: N,
3817
+ ref: v,
3829
3818
  className: "w6w-btn w6w-btn-ghost",
3830
3819
  type: "button",
3831
3820
  disabled: d,
@@ -3840,7 +3829,7 @@ function tl({
3840
3829
  type: "button",
3841
3830
  "data-testid": "entry-save",
3842
3831
  disabled: !!c || !!d || R || n && !(s != null && s.trim()),
3843
- onClick: v,
3832
+ onClick: N,
3844
3833
  children: "Save"
3845
3834
  }
3846
3835
  ) : /* @__PURE__ */ t(
@@ -3859,7 +3848,7 @@ function tl({
3859
3848
  );
3860
3849
  }
3861
3850
  const ke = (e) => e.isNew ? "new" : e.id;
3862
- function nl({
3851
+ function tl({
3863
3852
  columns: e,
3864
3853
  keyColumn: n,
3865
3854
  rows: a,
@@ -3872,33 +3861,33 @@ function nl({
3872
3861
  onSave: u,
3873
3862
  onDelete: f,
3874
3863
  onReload: h,
3875
- onAddRow: v,
3864
+ onAddRow: N,
3876
3865
  onLoadMore: w,
3877
3866
  onSearch: m
3878
3867
  }) {
3879
- const [y, g] = b(l ?? ""), A = (N) => {
3880
- N.preventDefault(), m(y);
3868
+ const [y, g] = b(l ?? ""), A = (v) => {
3869
+ v.preventDefault(), m(y);
3881
3870
  }, k = [
3882
- ...e.map((N) => ({
3883
- key: N.name,
3871
+ ...e.map((v) => ({
3872
+ key: v.name,
3884
3873
  header: /* @__PURE__ */ i(E, { children: [
3885
- N.name,
3874
+ v.name,
3886
3875
  " ",
3887
- /* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children: N.type })
3876
+ /* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children: v.type })
3888
3877
  ] }),
3889
3878
  render: ($) => {
3890
3879
  var R;
3891
- const x = (R = $.cellErrors) == null ? void 0 : R[N.name];
3880
+ const x = (R = $.cellErrors) == null ? void 0 : R[v.name];
3892
3881
  return /* @__PURE__ */ i("div", { className: "w6w-data-cell", children: [
3893
3882
  /* @__PURE__ */ t(
3894
3883
  "input",
3895
3884
  {
3896
3885
  "data-row": ke($),
3897
- "data-column": N.name,
3898
- value: $.cells[N.name] ?? "",
3899
- readOnly: N.name === n && !$.isNew,
3900
- "aria-label": `${N.name} (${N.type})`,
3901
- onChange: (_) => d($.id, N.name, _.target.value)
3886
+ "data-column": v.name,
3887
+ value: $.cells[v.name] ?? "",
3888
+ readOnly: v.name === n && !$.isNew,
3889
+ "aria-label": `${v.name} (${v.type})`,
3890
+ onChange: (_) => d($.id, v.name, _.target.value)
3902
3891
  }
3903
3892
  ),
3904
3893
  x !== void 0 && /* @__PURE__ */ t(
@@ -3906,7 +3895,7 @@ function nl({
3906
3895
  {
3907
3896
  className: "w6w-data-cell-error",
3908
3897
  "data-row": ke($),
3909
- "data-column": N.name,
3898
+ "data-column": v.name,
3910
3899
  children: x
3911
3900
  }
3912
3901
  )
@@ -3916,22 +3905,22 @@ function nl({
3916
3905
  {
3917
3906
  key: "actions",
3918
3907
  header: "",
3919
- render: (N) => /* @__PURE__ */ i("div", { className: "w6w-data-row-actions", children: [
3920
- /* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children: N.version === null ? "" : `v${N.version}` }),
3908
+ render: (v) => /* @__PURE__ */ i("div", { className: "w6w-data-row-actions", children: [
3909
+ /* @__PURE__ */ t("span", { className: "w6w-muted w6w-small", children: v.version === null ? "" : `v${v.version}` }),
3921
3910
  /* @__PURE__ */ t(
3922
3911
  "button",
3923
3912
  {
3924
3913
  className: "w6w-btn",
3925
3914
  type: "button",
3926
- "data-row": ke(N),
3915
+ "data-row": ke(v),
3927
3916
  "data-testid": "row-save",
3928
- disabled: !N.isNew && !N.dirty || !!N.conflict,
3929
- onClick: () => u(N.id),
3917
+ disabled: !v.isNew && !v.dirty || !!v.conflict,
3918
+ onClick: () => u(v.id),
3930
3919
  children: "Save"
3931
3920
  }
3932
3921
  ),
3933
- /* @__PURE__ */ t(oe, { label: "Delete entry", onClick: () => f(N.id) }),
3934
- N.conflict && /* @__PURE__ */ i("div", { className: "w6w-error", "data-row": ke(N), "data-testid": "row-conflict", children: [
3922
+ /* @__PURE__ */ t(oe, { label: "Delete entry", onClick: () => f(v.id) }),
3923
+ v.conflict && /* @__PURE__ */ i("div", { className: "w6w-error", "data-row": ke(v), "data-testid": "row-conflict", children: [
3935
3924
  an,
3936
3925
  " ",
3937
3926
  /* @__PURE__ */ t(
@@ -3940,7 +3929,7 @@ function nl({
3940
3929
  className: "w6w-btn w6w-btn-ghost",
3941
3930
  type: "button",
3942
3931
  "data-testid": "row-reload",
3943
- onClick: () => h(N.id),
3932
+ onClick: () => h(v.id),
3944
3933
  children: "Reload"
3945
3934
  }
3946
3935
  )
@@ -3959,7 +3948,7 @@ function nl({
3959
3948
  value: y,
3960
3949
  placeholder: "Key prefix",
3961
3950
  "aria-label": "Key prefix",
3962
- onChange: (N) => g(N.target.value)
3951
+ onChange: (v) => g(v.target.value)
3963
3952
  }
3964
3953
  ),
3965
3954
  /* @__PURE__ */ t("button", { className: "w6w-btn w6w-btn-ghost", type: "submit", children: "Search" }),
@@ -3969,7 +3958,7 @@ function nl({
3969
3958
  className: "w6w-btn w6w-btn-ghost",
3970
3959
  type: "button",
3971
3960
  "data-testid": "grid-add-row",
3972
- onClick: v,
3961
+ onClick: N,
3973
3962
  children: "Add row"
3974
3963
  }
3975
3964
  )
@@ -3979,7 +3968,7 @@ function nl({
3979
3968
  {
3980
3969
  columns: k,
3981
3970
  rows: a,
3982
- rowKey: (N) => N.id,
3971
+ rowKey: (v) => v.id,
3983
3972
  empty: (
3984
3973
  // A div, not a <p>: `empty` is any node and callers often pass a <p>.
3985
3974
  /* @__PURE__ */ t("div", { className: "w6w-muted w6w-small", children: r ? "Loading…" : o ?? "No rows match this key prefix." })
@@ -4001,97 +3990,97 @@ function nl({
4001
3990
  export {
4002
3991
  Pt as ATTENTION_DISPLAY_CAP,
4003
3992
  hs as ActionTestForm,
4004
- ll as AddConnectionModal,
3993
+ sl as AddConnectionModal,
4005
3994
  bt as ApiCallsPanel,
4006
- Ne as ApiError,
3995
+ ve as ApiError,
4007
3996
  _e as AppIcon,
4008
- il as AppPicker,
4009
- Be as AuthFieldsForm,
4010
- Ps as BudgetMeter,
3997
+ ll as AppPicker,
3998
+ Fe as AuthFieldsForm,
3999
+ Is as BudgetMeter,
4011
4000
  Va as CELL_PROBLEM_COPY,
4012
4001
  Wa as CSV_MAX_BYTES,
4013
4002
  es as CSV_TOO_LARGE_COPY,
4014
4003
  Rs as CallableList,
4015
- rl as CanvasLayer,
4004
+ il as CanvasLayer,
4016
4005
  $e as CodeBlock,
4017
- ol as CodeEditor,
4018
- Qs as ColumnsEditor,
4006
+ rl as CodeEditor,
4007
+ Xs as ColumnsEditor,
4019
4008
  $n as Combobox,
4020
4009
  Tn as ConfirmModal,
4021
- Is as ConnectionHeader,
4022
- _s as ConnectionList,
4010
+ Os as ConnectionHeader,
4011
+ Es as ConnectionList,
4023
4012
  Jn as Copyable,
4024
- Yn as CopyableText,
4025
- cl as CredentialPicker,
4026
- Zs as CsvPanel,
4013
+ Gn as CopyableText,
4014
+ ol as CredentialPicker,
4015
+ Qs as CsvPanel,
4027
4016
  ie as DATA_STORE_ERROR_FALLBACK,
4028
- Ls as DATA_STORE_KINDS,
4017
+ Ps as DATA_STORE_KINDS,
4029
4018
  Ka as DATA_STORE_KIND_LABEL,
4030
4019
  Xa as DATA_STORE_NETWORK_ERROR,
4031
- Ft as DOC_VALUE_COPY,
4032
- tl as DataEntryEditor,
4033
- el as DataEntryList,
4034
- Xs as DataStoreList,
4020
+ Bt as DOC_VALUE_COPY,
4021
+ el as DataEntryEditor,
4022
+ Zs as DataEntryList,
4023
+ Gs as DataStoreList,
4035
4024
  ue as DataTable,
4036
- nl as DataTableGrid,
4025
+ tl as DataTableGrid,
4037
4026
  oe as DeleteButton,
4038
4027
  qt as EditButton,
4039
- Os as EditConnectionModal,
4028
+ _s as EditConnectionModal,
4040
4029
  Ee as EmptyState,
4041
4030
  $s as ExecutionDetail,
4042
4031
  Cs as ExecutionFilters,
4043
4032
  xs as ExecutionList,
4044
- ha as ExecutionLogPanel,
4033
+ pa as ExecutionLogPanel,
4045
4034
  Ss as ExecutionStats,
4046
- dl as ExpressionEditorModal,
4047
- ul as ExpressionInput,
4048
- wl as ExpressionOptionsProvider,
4049
- ml as HTML_PREVIEW_CSP,
4035
+ cl as ExpressionEditorModal,
4036
+ dl as ExpressionInput,
4037
+ ul as ExpressionOptionsProvider,
4038
+ wl as HTML_PREVIEW_CSP,
4050
4039
  et as HealthStatusPill,
4051
- Ns as HistoryTimeline,
4052
- hl as HtmlPreview,
4040
+ vs as HistoryTimeline,
4041
+ ml as HtmlPreview,
4053
4042
  Ge as Icon,
4054
4043
  re as IconButton,
4055
4044
  bs as InfoTip,
4056
4045
  le as JsonEditor,
4057
- pl as LastUsedNote,
4046
+ hl as LastUsedNote,
4058
4047
  Xe as ListItem,
4059
- fl as Markdown,
4048
+ pl as Markdown,
4060
4049
  Se as Modal,
4061
4050
  nn as NEW_ROW_ID,
4062
- gl as NodeConfigForm,
4051
+ fl as NodeConfigForm,
4063
4052
  Sn as ParamsForm,
4064
- yl as PropertyEntryForm,
4053
+ gl as PropertyEntryForm,
4065
4054
  La as RECENT_DISPLAY_CAP,
4066
- vl as RESULT_RENDER_MAX_CHARS,
4067
- Da as ReliabilityChart,
4055
+ yl as RESULT_RENDER_MAX_CHARS,
4056
+ Ua as ReliabilityChart,
4068
4057
  As as ReliabilityList,
4069
4058
  ks as RepoSyncIndicator,
4070
4059
  ze as ResultViewer,
4071
4060
  Nl as RetryPolicyFields,
4072
4061
  Qt as SCALAR_TYPES,
4073
- vs as ServerResourcesBadge,
4062
+ Ns as ServerResourcesBadge,
4074
4063
  fs as ServerResourcesCard,
4075
4064
  gs as ServerResourcesCardSmall,
4076
4065
  ys as ServerResourcesRail,
4077
- bl as StepBuilderModal,
4066
+ vl as StepBuilderModal,
4078
4067
  nt as StepStatusPill,
4079
- Qn as UptimeStrip,
4068
+ Zn as UptimeStrip,
4080
4069
  an as VERSION_CONFLICT_COPY,
4081
- kl as W6WUIProvider,
4070
+ bl as W6WUIProvider,
4082
4071
  ps as YamlEditor,
4083
- Ws as buildRowValue,
4084
- Hs as cellErrorsOf,
4085
- Es as connectionAppIdsToLookUp,
4072
+ Ks as buildRowValue,
4073
+ qs as cellErrorsOf,
4074
+ kl as connectionAppIdsToLookUp,
4086
4075
  ms as createW6WApi,
4087
- zn as cropText,
4088
- Us as csvFilenameOf,
4089
- Gs as csvImportMessage,
4090
- Bt as csvLineOf,
4076
+ Yn as cropText,
4077
+ Ds as csvFilenameOf,
4078
+ Ys as csvImportMessage,
4079
+ Ft as csvLineOf,
4091
4080
  xl as detectResultFormat,
4092
- Ks as dirtyColumns,
4093
- Ma as displayBoard,
4094
- Js as draftFromEntry,
4081
+ Js as dirtyColumns,
4082
+ Da as displayBoard,
4083
+ Bs as draftFromEntry,
4095
4084
  Cl as effectiveNodeOutput,
4096
4085
  Sl as effectiveNodeOutputs,
4097
4086
  Za as errorPlacement,
@@ -4102,13 +4091,13 @@ export {
4102
4091
  Al as htmlPreviewSrcDoc,
4103
4092
  Hl as iconNames,
4104
4093
  Rl as indexNodeSamples,
4105
- Bs as isCellValue,
4094
+ Us as isCellValue,
4106
4095
  El as isExprValue,
4107
4096
  _l as isFormResolvedOptions,
4108
4097
  Ol as isSecretValue,
4109
4098
  Il as isTestRequired,
4110
- zs as isVersionConflict,
4111
- Ys as kvValueOf,
4099
+ Hs as isVersionConflict,
4100
+ zs as kvValueOf,
4112
4101
  Ms as kvValueTypeOf,
4113
4102
  Fs as locateDataStoreError,
4114
4103
  Qa as locateRawResponseError,
@@ -4116,28 +4105,28 @@ export {
4116
4105
  js as newRowDraft,
4117
4106
  lt as parseCell,
4118
4107
  ns as parseDocText,
4119
- Ia as partitionBoard,
4120
- Oa as performancePoints,
4108
+ Pa as partitionBoard,
4109
+ Ia as performancePoints,
4121
4110
  Pl as previewNodeOutputs,
4122
- Vs as remainingTtlSeconds,
4123
- Ll as rememberableInput,
4124
- Ml as requiredParamsFilled,
4125
- Ja as resolveConnectionAppMeta,
4111
+ Ws as remainingTtlSeconds,
4112
+ Ml as rememberableInput,
4113
+ Ll as requiredParamsFilled,
4114
+ In as resolveConnectionAppMeta,
4126
4115
  Dl as resultCopyText,
4127
4116
  ts as rowValueOf,
4128
- qs as rowWriteOf,
4117
+ Vs as rowWriteOf,
4129
4118
  it as serializeCell,
4130
4119
  Ul as shapeToSkeleton,
4131
- Bl as shouldUseCombobox,
4132
- Fl as splitFrontmatter,
4133
- Jl as startOAuthPopup,
4134
- Ds as tableSchemaOf,
4135
- jl as testInputSavesSettled,
4120
+ Fl as shouldUseCombobox,
4121
+ Bl as splitFrontmatter,
4122
+ jl as startOAuthPopup,
4123
+ Ls as tableSchemaOf,
4124
+ Jl as testInputSavesSettled,
4136
4125
  Kl as trackTestInputSave,
4137
- Pa as uptimeDays,
4138
- Pn as useEnterSubmit,
4126
+ Ma as uptimeDays,
4127
+ Mn as useEnterSubmit,
4139
4128
  Wl as useExpressionOptions,
4140
4129
  Vl as useRememberedTestInput,
4141
- Jt as useW6WApi
4130
+ jt as useW6WApi
4142
4131
  };
4143
4132
  //# sourceMappingURL=index.mjs.map