@llmnative/runner 1.4.0 → 1.5.0

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/ui.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  import { RUNNER_KEY_PROVIDERS as e, RunnerError as t } from "./client.mjs";
2
2
  import { RUNNER_REQUIREMENTS as n, checkRunner as r, installCommand as i, isDomain as a, lookupDomain as o, verifiedInstallCommands as s } from "./steps.mjs";
3
3
  import { useCallback as c, useEffect as l, useMemo as u, useState as d } from "react";
4
- import { ActionButton as f, Alert as p, Badge as m, Card as h, Code as g, DescriptionList as _, Form as v, LoadingButton as y, Modal as b, ModalYesNo as x, Password as S, Select as C, SortableList as w, String as T, Switch as E, TextArea as D } from "@llmnative/react";
5
- import { Fragment as O, jsx as k, jsxs as A } from "react/jsx-runtime";
6
- import { createPortal as j } from "react-dom";
4
+ import { ActionButton as f, Alert as p, Badge as m, Card as h, Code as g, ConnectionBoard as _, ConnectionList as v, DescriptionList as y, Form as b, LoadingButton as x, Modal as S, ModalYesNo as C, Password as w, Select as T, String as E, Switch as D, TextArea as O } from "@llmnative/react";
5
+ import { Fragment as k, jsx as A, jsxs as j } from "react/jsx-runtime";
6
+ import { createPortal as M } from "react-dom";
7
7
  // src/ui/texts.ts
8
- var M = {
8
+ var N = {
9
9
  accountsTitleUser: "My subscriptions",
10
10
  accountsTitleTenant: "Subscriptions of the tenant",
11
11
  accountsIntroUser: "Connect your own subscription: it is used only for your requests. Without one, the API keys of the workspace are used.",
@@ -34,6 +34,11 @@ var M = {
34
34
  termsNote: "A Pro or Max subscription is personal: connect only your own.",
35
35
  accountsSection: "{name} ({count})",
36
36
  accountsByUse: "API keys of the providers by use ({count})",
37
+ boxClaudeCode: "A Claude subscription (Pro, Max, Team): signed in with Anthropic.",
38
+ boxOpencodeGo: "The OpenCode Go subscription, with its API key.",
39
+ boxByUse: "Paid by use, with an API key of {provider}.",
40
+ groupSubscriptions: "Subscriptions",
41
+ groupUsage: "Pay as you go",
37
42
  accountsAdd: "Add subscription",
38
43
  accountsAvailable: "Available",
39
44
  accountsAddedOn: "Added on {date}",
@@ -171,7 +176,7 @@ var M = {
171
176
  consoleRemember: "Remember on this browser",
172
177
  close: "Close",
173
178
  cancel: "Cancel"
174
- }, N = {
179
+ }, P = {
175
180
  accountsTitleUser: "I miei abbonamenti",
176
181
  accountsTitleTenant: "Abbonamenti del tenant",
177
182
  accountsIntroUser: "Collega il tuo abbonamento: lo usano solo le tue richieste. Senza, si usano le API key del workspace.",
@@ -200,6 +205,11 @@ var M = {
200
205
  termsNote: "Un abbonamento Pro o Max è personale: collega solo il tuo.",
201
206
  accountsSection: "{name} ({count})",
202
207
  accountsByUse: "API key dei provider a consumo ({count})",
208
+ boxClaudeCode: "Un abbonamento Claude (Pro, Max, Team): si accede con Anthropic.",
209
+ boxOpencodeGo: "L'abbonamento OpenCode Go, con la sua API key.",
210
+ boxByUse: "A consumo, con una API key di {provider}.",
211
+ groupSubscriptions: "Abbonamenti",
212
+ groupUsage: "A consumo",
203
213
  accountsAdd: "Aggiungi abbonamento",
204
214
  accountsAvailable: "Disponibile",
205
215
  accountsAddedOn: "Aggiunto il {date}",
@@ -337,18 +347,18 @@ var M = {
337
347
  consoleRemember: "Ricorda su questo browser",
338
348
  close: "Chiudi",
339
349
  cancel: "Annulla"
340
- }, P = {
341
- en: M,
342
- it: N
350
+ }, F = {
351
+ en: N,
352
+ it: P
343
353
  };
344
- function F(e, t) {
345
- let n = e && e.toLowerCase().startsWith("it") ? N : M;
354
+ function I(e, t) {
355
+ let n = e && e.toLowerCase().startsWith("it") ? P : N;
346
356
  return t ? {
347
357
  ...n,
348
358
  ...t
349
359
  } : n;
350
360
  }
351
- var I = (e, t) => e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : e), L = {
361
+ var L = (e, t) => e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : e), R = {
352
362
  "claude-code": "Claude Code",
353
363
  "opencode-go": "OpenCode Go",
354
364
  opencode: "OpenCode Zen",
@@ -358,264 +368,202 @@ var I = (e, t) => e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : e),
358
368
  mistral: "Mistral",
359
369
  deepseek: "DeepSeek",
360
370
  openrouter: "OpenRouter"
361
- }, R = ["claude-code", "opencode-go"], z = (e) => L[e] ?? e, B = (e) => new Date(e).toLocaleDateString(void 0, { dateStyle: "medium" }), ee = (e) => new Date(e).toLocaleString(void 0, {
371
+ }, z = ["claude-code", "opencode-go"], B = (e) => R[e] ?? e, V = (e) => new Date(e).toLocaleDateString(void 0, { dateStyle: "medium" }), ee = (e) => new Date(e).toLocaleString(void 0, {
362
372
  dateStyle: "short",
363
373
  timeStyle: "short"
364
374
  });
365
- function V({ client: n, scope: r, locale: i, texts: a, onChange: o, providers: s, renderProvider: u, onStack: f }) {
366
- let m = F(i, a), g = s ?? (r === "tenant" ? [
367
- ...R,
375
+ function H({ client: n, scope: r, locale: i, texts: a, onChange: o, providers: s, renderProvider: u, onStack: g }) {
376
+ let v = I(i, a), y = s ?? (r === "tenant" ? [
377
+ ...z,
368
378
  "opencode",
369
379
  ...e
370
- ] : R), _ = R.filter((e) => g.includes(e)), v = g.filter((e) => !R.includes(e)), [y, b] = d(null), [x, S] = d(null), C = c(async () => {
380
+ ] : z), [b, x] = d(null), [C, w] = d(null), [T, E] = d(null), [D, O] = d(!1), k = (e) => {
381
+ E(e), g?.(e !== null);
382
+ }, M = c(async () => {
371
383
  try {
372
384
  let { accounts: e } = await n.accounts.list();
373
- return b(e), S(null), e;
385
+ return x(e), w(null), e;
374
386
  } catch (e) {
375
- return S(e instanceof t ? e.code : String(e)), b([]), [];
387
+ return w(e instanceof t ? e.code : String(e)), x([]), [];
376
388
  }
377
389
  }, [n]);
378
390
  l(() => {
379
- C();
380
- }, [C]);
381
- let w = async (e) => {
382
- let t = e ?? await C();
383
- e && b(e), o?.(t);
384
- };
385
- return /* @__PURE__ */ k(h, {
386
- title: r === "user" ? m.accountsTitleUser : m.accountsTitleTenant,
387
- loading: y === null,
391
+ M();
392
+ }, [M]);
393
+ let N = async (e) => {
394
+ let t = e ?? await M();
395
+ e && x(e), o?.(t);
396
+ }, P = (e) => (b ?? []).filter((t) => t.provider === e), F = (e) => e === "claude-code" ? v.boxClaudeCode : e === "opencode-go" ? v.boxOpencodeGo : L(v.boxByUse, { provider: B(e) });
397
+ return /* @__PURE__ */ j(h, {
398
+ title: r === "user" ? v.accountsTitleUser : v.accountsTitleTenant,
399
+ loading: b === null,
388
400
  loaderMinHeight: 120,
389
- children: /* @__PURE__ */ A("div", {
390
- className: "flex flex-col gap-6",
401
+ children: [/* @__PURE__ */ j("div", {
402
+ className: "flex flex-col gap-4",
391
403
  children: [
392
- /* @__PURE__ */ k("p", {
404
+ /* @__PURE__ */ A("p", {
393
405
  className: "text-sm text-muted-foreground",
394
- children: r === "user" ? m.accountsIntroUser : m.accountsIntroTenant
406
+ children: r === "user" ? v.accountsIntroUser : v.accountsIntroTenant
395
407
  }),
396
- x && /* @__PURE__ */ k(p, {
408
+ C && /* @__PURE__ */ A(p, {
397
409
  variant: "danger",
398
- children: I(m.error, { error: x })
410
+ children: L(v.error, { error: C })
399
411
  }),
400
- y && _.map((e) => /* @__PURE__ */ k(H, {
401
- client: n,
402
- t: m,
403
- provider: e,
404
- accounts: y.filter((t) => t.provider === e),
405
- onChanged: w,
406
- onStack: f,
407
- extra: u?.(e, y.filter((t) => t.provider === e))
408
- }, e)),
409
- y && v.length > 0 && /* @__PURE__ */ k(H, {
410
- client: n,
411
- t: m,
412
- provider: v,
413
- accounts: y.filter((e) => v.includes(e.provider)),
414
- onChanged: w,
415
- onStack: f
412
+ b && /* @__PURE__ */ A(_, {
413
+ items: y.map((e) => {
414
+ let t = P(e), n = t.filter((e) => e.noCreditUntil);
415
+ return {
416
+ id: e,
417
+ label: B(e),
418
+ description: F(e),
419
+ icon: e === "claude-code" ? "user" : "key-round",
420
+ group: z.includes(e) ? "subscription" : "usage",
421
+ count: t.length,
422
+ status: t.length > 0 && n.length === t.length ? /* @__PURE__ */ A(m, {
423
+ variant: "warning",
424
+ children: L(v.accountsNoCredit, { at: ee(n.map((e) => e.noCreditUntil).sort()[0]) })
425
+ }) : void 0
426
+ };
427
+ }),
428
+ titles: {
429
+ subscription: v.groupSubscriptions,
430
+ usage: v.groupUsage
431
+ },
432
+ onOpen: (e) => k(e)
416
433
  }),
417
- /* @__PURE__ */ k("p", {
434
+ /* @__PURE__ */ A("p", {
418
435
  className: "text-xs text-muted-foreground",
419
- children: m.termsNote
436
+ children: v.termsNote
420
437
  })
421
438
  ]
422
- })
439
+ }), T && b && /* @__PURE__ */ A(S, {
440
+ title: B(T),
441
+ position: "right",
442
+ size: "lg",
443
+ stackedBehind: D,
444
+ onClose: () => k(null),
445
+ footer: /* @__PURE__ */ A(f, {
446
+ variant: "link",
447
+ label: v.close,
448
+ onClick: () => k(null)
449
+ }),
450
+ children: /* @__PURE__ */ A(te, {
451
+ client: n,
452
+ t: v,
453
+ provider: T,
454
+ accounts: P(T),
455
+ onChanged: N,
456
+ onStack: O,
457
+ extra: u?.(T, P(T))
458
+ })
459
+ })]
423
460
  });
424
461
  }
425
- function H({ client: e, t: n, provider: r, accounts: i, onChanged: a, onStack: o, extra: s }) {
426
- let c = typeof r == "string" ? r : void 0, l = c ? I(n.accountsSection, {
427
- name: z(c),
428
- count: String(i.length)
429
- }) : I(n.accountsByUse, { count: String(i.length) }), [u, h] = d(!1), [g, _] = d(null), v = (e) => {
430
- _(e), o?.(e !== null);
431
- }, [y, b] = d(null), [S, C] = d(null), T = (e, t) => e.label || I(n.accountsUnnamed, { n: String(t + 1) }), E = (e) => C(I(n.error, { error: e instanceof t ? e.code : String(e) }));
432
- return /* @__PURE__ */ A("section", {
433
- className: "flex flex-col gap-3",
462
+ function te({ client: e, t: n, provider: r, accounts: i, onChanged: a, onStack: o, extra: s }) {
463
+ let [c, l] = d(null), u = (e) => l(L(n.error, { error: e instanceof t ? e.code : String(e) })), f = (e) => i.find((t) => t.id === e);
464
+ return /* @__PURE__ */ j("div", {
465
+ className: "flex flex-col gap-5",
434
466
  children: [
435
- /* @__PURE__ */ A("div", {
436
- className: "flex flex-wrap items-center justify-between gap-3",
437
- children: [/* @__PURE__ */ k("h5", {
438
- className: "text-sm font-semibold",
439
- children: l
440
- }), !u && /* @__PURE__ */ k(f, {
441
- icon: "plus",
442
- variant: "outline-primary",
443
- label: c ? n.accountsAdd : n.keyConnect,
444
- onClick: () => {
445
- C(null), h(!0);
446
- }
447
- })]
467
+ /* @__PURE__ */ A("p", {
468
+ className: "text-sm text-muted-foreground",
469
+ children: r === "claude-code" ? n.boxClaudeCode : r === "opencode-go" ? n.boxOpencodeGo : L(n.boxByUse, { provider: B(r) })
448
470
  }),
449
- S && /* @__PURE__ */ k(p, {
471
+ c && /* @__PURE__ */ A(p, {
450
472
  variant: "danger",
451
- children: S
473
+ children: c
452
474
  }),
453
- /* @__PURE__ */ k(w, {
454
- items: i,
455
- getKey: (e) => `${e.provider}/${e.id}`,
456
- label: l,
457
- numbered: !!c && i.length > 1,
458
- disabled: !c,
459
- emptyState: /* @__PURE__ */ k("p", {
460
- className: "text-sm text-muted-foreground",
461
- children: n.accountsEmpty
475
+ /* @__PURE__ */ A(v, {
476
+ items: i.map((e) => ({
477
+ id: e.id,
478
+ label: e.label,
479
+ icon: e.provider === "claude-code" ? "user" : "key-round",
480
+ meta: L(n.accountsAddedOn, { date: V(e.at) }),
481
+ exhaustedUntil: e.noCreditUntil
482
+ })),
483
+ title: L(n.accountsSection, {
484
+ name: B(r),
485
+ count: String(i.length)
462
486
  }),
463
- onReorder: (t) => {
464
- c && e.accounts.order(c, t.map((e) => e.id)).then((e) => a(e), E);
487
+ emptyText: n.accountsEmpty,
488
+ unnamed: n.accountsUnnamed,
489
+ orderHint: n.accountsOrderHint,
490
+ addLabel: r === "claude-code" ? n.accountsAdd : n.keyConnect,
491
+ onStack: o,
492
+ onReorder: (t) => e.accounts.order(r, t).then((e) => a(e), u),
493
+ onRename: async (t, n) => {
494
+ await a(await e.accounts.rename(r, t, n));
465
495
  },
466
- renderItem: (e, t) => ({
467
- icon: e.provider === "claude-code" ? "user" : "key",
468
- title: T(e, t),
469
- meta: [c ? void 0 : z(e.provider), I(n.accountsAddedOn, { date: B(e.at) })].filter(Boolean).join(" · "),
470
- badge: e.noCreditUntil ? /* @__PURE__ */ k(m, {
471
- variant: "warning",
472
- children: I(n.accountsNoCredit, { at: ee(e.noCreditUntil) })
473
- }) : /* @__PURE__ */ k(m, {
474
- variant: "success",
475
- children: n.accountsAvailable
476
- }),
477
- trailing: /* @__PURE__ */ A("div", {
478
- className: "flex items-center gap-1",
479
- children: [/* @__PURE__ */ k(f, {
480
- icon: "pencil",
481
- variant: "link",
482
- ariaLabel: I(n.accountsRenameAria, { name: T(e, t) }),
483
- onClick: () => v(e)
484
- }), /* @__PURE__ */ k(f, {
485
- icon: "trash-2",
486
- variant: "link",
487
- ariaLabel: I(n.accountsRemoveAria, { name: T(e, t) }),
488
- onClick: () => b(e)
489
- })]
490
- })
491
- })
492
- }),
493
- c && i.length > 1 && /* @__PURE__ */ k("p", {
494
- className: "text-xs text-muted-foreground",
495
- children: n.accountsOrderHint
496
- }),
497
- u && (c === "claude-code" ? /* @__PURE__ */ k(ne, {
498
- client: e,
499
- t: n,
500
- others: i.length,
501
- onDone: async () => {
502
- h(!1), await a();
503
- },
504
- onCancel: () => h(!1)
505
- }) : /* @__PURE__ */ k(re, {
506
- client: e,
507
- t: n,
508
- providers: c ? [c] : r,
509
- onDone: async () => {
510
- h(!1), await a();
496
+ onRemove: async (t) => {
497
+ await e.accounts.remove(f(t).provider, t).catch(u), await a();
511
498
  },
512
- onCancel: () => h(!1)
513
- })),
514
- s,
515
- g && /* @__PURE__ */ k(te, {
516
- client: e,
517
- t: n,
518
- account: g,
519
- onClose: () => v(null),
520
- onDone: async (e) => {
521
- v(null), await a(e);
522
- }
499
+ renderAdd: (t) => r === "claude-code" ? /* @__PURE__ */ A(ne, {
500
+ client: e,
501
+ t: n,
502
+ others: i.length,
503
+ onDone: async () => {
504
+ t(), await a();
505
+ },
506
+ onCancel: t
507
+ }) : /* @__PURE__ */ A(re, {
508
+ client: e,
509
+ t: n,
510
+ providers: [r],
511
+ onDone: async () => {
512
+ t(), await a();
513
+ },
514
+ onCancel: t
515
+ })
523
516
  }),
524
- y && /* @__PURE__ */ k(x, {
525
- title: n.accountsRemove,
526
- danger: !0,
527
- onClose: () => b(null),
528
- onYes: async () => (await e.accounts.remove(y.provider, y.id).catch(() => !1), b(null), await a(), !0),
529
- children: I(n.accountsRemoveConfirm, { name: y.label ?? z(y.provider) })
530
- })
517
+ s
531
518
  ]
532
519
  });
533
520
  }
534
- function te({ client: e, t: n, account: r, onClose: i, onDone: a }) {
535
- let [o, s] = d(r.label ?? ""), [c, l] = d(null);
536
- return /* @__PURE__ */ A(b, {
537
- title: n.accountsRenameTitle,
538
- position: "right",
539
- size: "sm",
540
- onClose: i,
541
- footer: /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k(f, {
542
- variant: "link",
543
- label: n.cancel,
544
- onClick: i
545
- }), /* @__PURE__ */ k(y, {
546
- variant: "primary",
547
- label: n.accountsSave,
548
- onClick: async () => {
549
- try {
550
- await a(await e.accounts.rename(r.provider, r.id, o.trim()));
551
- } catch (e) {
552
- l(I(n.error, { error: e instanceof t ? e.code : String(e) }));
553
- }
554
- }
555
- })] }),
556
- children: [c && /* @__PURE__ */ k(p, {
557
- variant: "danger",
558
- children: c
559
- }), /* @__PURE__ */ k(v, {
560
- appearance: "empty",
561
- showNotice: !1,
562
- defaultValues: { label: r.label ?? "" },
563
- onSubmit: () => !1,
564
- children: /* @__PURE__ */ k(T, {
565
- name: "label",
566
- label: n.accountsName,
567
- placeholder: n.claudeLabelPlaceholder,
568
- onChange: ({ value: e }) => s(String(e ?? ""))
569
- })
570
- })]
571
- });
572
- }
573
521
  function ne({ client: e, t: n, others: r, onDone: i, onCancel: a }) {
574
- let [o, s] = d(!1), [c, u] = d(null), [m, g] = d(!1), [_, b] = d(""), [x, C] = d(""), [w, E] = d(""), [D, j] = d(null);
522
+ let [o, s] = d(!1), [c, u] = d(null), [m, g] = d(!1), [_, v] = d(""), [y, S] = d(""), [C, T] = d(""), [D, O] = d(null);
575
523
  return l(() => {
576
524
  if (o) return;
577
525
  let t = !1;
578
- return e.accounts.startClaudeLogin().then(({ url: e }) => !t && u(e)).catch(() => !t && j(n.claudeNoLink)), () => {
526
+ return e.accounts.startClaudeLogin().then(({ url: e }) => !t && u(e)).catch(() => !t && O(n.claudeNoLink)), () => {
579
527
  t = !0;
580
528
  };
581
529
  }, [
582
530
  e,
583
531
  n,
584
532
  o
585
- ]), /* @__PURE__ */ A(h, {
533
+ ]), /* @__PURE__ */ j(h, {
586
534
  headerClassName: "px-4 py-3",
587
535
  bodyClassName: "flex flex-col gap-3",
588
- header: /* @__PURE__ */ k("span", {
536
+ header: /* @__PURE__ */ A("span", {
589
537
  className: "text-sm font-medium",
590
538
  children: n.claudeConnect
591
539
  }),
592
540
  children: [
593
- r > 0 && /* @__PURE__ */ k(p, {
541
+ r > 0 && /* @__PURE__ */ A(p, {
594
542
  variant: "warning",
595
543
  children: n.claudeMultiWarning
596
544
  }),
597
- D && /* @__PURE__ */ k(p, {
545
+ D && /* @__PURE__ */ A(p, {
598
546
  variant: "danger",
599
547
  children: D
600
548
  }),
601
- o ? /* @__PURE__ */ k("p", {
549
+ o ? /* @__PURE__ */ A("p", {
602
550
  className: "text-sm",
603
551
  children: n.claudeTokenIntro
604
- }) : /* @__PURE__ */ A(O, { children: [
605
- /* @__PURE__ */ k("p", {
552
+ }) : /* @__PURE__ */ j(k, { children: [
553
+ /* @__PURE__ */ A("p", {
606
554
  className: "text-sm",
607
555
  children: n.claudeStep1
608
556
  }),
609
- /* @__PURE__ */ A("div", {
557
+ /* @__PURE__ */ j("div", {
610
558
  className: "grid grid-cols-2 gap-2",
611
- children: [/* @__PURE__ */ k(f, {
559
+ children: [/* @__PURE__ */ A(f, {
612
560
  icon: "external-link",
613
561
  variant: "outline-primary",
614
562
  className: "w-full justify-center whitespace-nowrap",
615
563
  label: n.claudeOpen,
616
564
  disabled: !c,
617
565
  onClick: () => c && window.open(c, "_blank", "noopener,noreferrer")
618
- }), /* @__PURE__ */ k(f, {
566
+ }), /* @__PURE__ */ A(f, {
619
567
  icon: m ? "check" : "copy",
620
568
  variant: "outline-secondary",
621
569
  className: "w-full justify-center whitespace-nowrap",
@@ -626,58 +574,58 @@ function ne({ client: e, t: n, others: r, onDone: i, onCancel: a }) {
626
574
  }
627
575
  })]
628
576
  }),
629
- /* @__PURE__ */ k("p", {
577
+ /* @__PURE__ */ A("p", {
630
578
  className: "text-sm",
631
579
  children: n.claudeStep2
632
580
  })
633
581
  ] }),
634
- /* @__PURE__ */ A(v, {
582
+ /* @__PURE__ */ j(b, {
635
583
  appearance: "empty",
636
584
  showNotice: !1,
637
585
  onSubmit: () => !1,
638
- children: [o ? /* @__PURE__ */ k(S, {
586
+ children: [o ? /* @__PURE__ */ A(w, {
639
587
  name: "token",
640
588
  label: n.claudeToken,
641
589
  placeholder: "sk-ant-oat01-…",
642
590
  autoComplete: "off",
643
- onChange: ({ value: e }) => C(String(e ?? ""))
644
- }) : /* @__PURE__ */ k(T, {
591
+ onChange: ({ value: e }) => S(String(e ?? ""))
592
+ }) : /* @__PURE__ */ A(E, {
645
593
  name: "code",
646
594
  label: n.claudeCode,
647
595
  autoComplete: "off",
648
- onChange: ({ value: e }) => b(String(e ?? ""))
649
- }), /* @__PURE__ */ k(T, {
596
+ onChange: ({ value: e }) => v(String(e ?? ""))
597
+ }), /* @__PURE__ */ A(E, {
650
598
  name: "label",
651
599
  label: n.accountsName,
652
600
  placeholder: n.claudeLabelPlaceholder,
653
- onChange: ({ value: e }) => E(String(e ?? ""))
601
+ onChange: ({ value: e }) => T(String(e ?? ""))
654
602
  })]
655
603
  }),
656
- /* @__PURE__ */ k(f, {
604
+ /* @__PURE__ */ A(f, {
657
605
  variant: "link",
658
606
  className: "h-auto self-start p-0 text-xs",
659
607
  label: o ? n.claudeBackToLogin : n.claudeManual,
660
608
  onClick: () => {
661
- s(!o), j(null);
609
+ s(!o), O(null);
662
610
  }
663
611
  }),
664
- /* @__PURE__ */ A("div", {
612
+ /* @__PURE__ */ j("div", {
665
613
  className: "flex flex-wrap justify-end gap-2",
666
- children: [/* @__PURE__ */ k(f, {
614
+ children: [/* @__PURE__ */ A(f, {
667
615
  label: n.cancel,
668
616
  variant: "link",
669
617
  onClick: a
670
- }), /* @__PURE__ */ k(y, {
618
+ }), /* @__PURE__ */ A(x, {
671
619
  label: n.claudeFinish,
672
620
  variant: "primary",
673
- disabled: o ? !x.trim() : !c || !_.trim(),
621
+ disabled: o ? !y.trim() : !c || !_.trim(),
674
622
  onClick: async () => {
675
- j(null);
623
+ O(null);
676
624
  try {
677
- o ? await e.accounts.addClaudeToken(x.trim(), w.trim() || void 0) : await e.accounts.finishClaudeLogin(_.trim(), w.trim() || void 0), i();
625
+ o ? await e.accounts.addClaudeToken(y.trim(), C.trim() || void 0) : await e.accounts.finishClaudeLogin(_.trim(), C.trim() || void 0), i();
678
626
  } catch (r) {
679
627
  let i = r instanceof t && r.code === "refused";
680
- j(i ? n.claudeRefused : I(n.error, { error: r instanceof t ? r.code : String(r) })), i && !o && (u(null), g(!1), e.accounts.startClaudeLogin().then(({ url: e }) => u(e)).catch(() => j(n.claudeNoLink)));
628
+ O(i ? n.claudeRefused : L(n.error, { error: r instanceof t ? r.code : String(r) })), i && !o && (u(null), g(!1), e.accounts.startClaudeLogin().then(({ url: e }) => u(e)).catch(() => O(n.claudeNoLink)));
681
629
  }
682
630
  }
683
631
  })]
@@ -687,53 +635,53 @@ function ne({ client: e, t: n, others: r, onDone: i, onCancel: a }) {
687
635
  }
688
636
  function re({ client: e, t: n, providers: r, onDone: i, onCancel: a }) {
689
637
  let [o, s] = d(r[0]), [c, l] = d(""), [u, m] = d(""), [g, _] = d(null);
690
- return /* @__PURE__ */ A(h, {
638
+ return /* @__PURE__ */ j(h, {
691
639
  headerClassName: "px-4 py-3",
692
640
  bodyClassName: "flex flex-col gap-3",
693
- header: /* @__PURE__ */ k("span", {
641
+ header: /* @__PURE__ */ A("span", {
694
642
  className: "text-sm font-medium",
695
- children: r.length === 1 ? I(n.keyAddOf, { provider: z(r[0]) }) : n.keyConnect
643
+ children: r.length === 1 ? L(n.keyAddOf, { provider: B(r[0]) }) : n.keyConnect
696
644
  }),
697
645
  children: [
698
- g && /* @__PURE__ */ k(p, {
646
+ g && /* @__PURE__ */ A(p, {
699
647
  variant: "danger",
700
648
  children: g
701
649
  }),
702
- /* @__PURE__ */ A(v, {
650
+ /* @__PURE__ */ j(b, {
703
651
  appearance: "empty",
704
652
  showNotice: !1,
705
653
  onSubmit: () => !1,
706
654
  children: [
707
- r.length > 1 && /* @__PURE__ */ k(C, {
655
+ r.length > 1 && /* @__PURE__ */ A(T, {
708
656
  name: "provider",
709
657
  label: n.keyProvider,
710
658
  defaultValue: o,
711
659
  options: r.map((e) => ({
712
- label: z(e),
660
+ label: B(e),
713
661
  value: e
714
662
  })),
715
663
  onChange: ({ value: e }) => s(String(e ?? r[0]))
716
664
  }),
717
- /* @__PURE__ */ k(S, {
665
+ /* @__PURE__ */ A(w, {
718
666
  name: "key",
719
- label: I(n.keyLabel, { provider: z(o) }),
667
+ label: L(n.keyLabel, { provider: B(o) }),
720
668
  autoComplete: "off",
721
669
  onChange: ({ value: e }) => l(String(e ?? ""))
722
670
  }),
723
- /* @__PURE__ */ k(T, {
671
+ /* @__PURE__ */ A(E, {
724
672
  name: "label",
725
673
  label: n.accountsName,
726
674
  onChange: ({ value: e }) => m(String(e ?? ""))
727
675
  })
728
676
  ]
729
677
  }),
730
- /* @__PURE__ */ A("div", {
678
+ /* @__PURE__ */ j("div", {
731
679
  className: "flex flex-wrap justify-end gap-2",
732
- children: [/* @__PURE__ */ k(f, {
680
+ children: [/* @__PURE__ */ A(f, {
733
681
  label: n.cancel,
734
682
  variant: "link",
735
683
  onClick: a
736
- }), /* @__PURE__ */ k(y, {
684
+ }), /* @__PURE__ */ A(x, {
737
685
  label: n.opencodeAdd,
738
686
  variant: "primary",
739
687
  disabled: !c.trim(),
@@ -741,7 +689,7 @@ function re({ client: e, t: n, providers: r, onDone: i, onCancel: a }) {
741
689
  try {
742
690
  await e.accounts.addKey(o, c.trim(), u.trim() || void 0), i();
743
691
  } catch (e) {
744
- _(I(n.error, { error: e instanceof t ? e.code : String(e) }));
692
+ _(L(n.error, { error: e instanceof t ? e.code : String(e) }));
745
693
  }
746
694
  }
747
695
  })]
@@ -751,11 +699,11 @@ function re({ client: e, t: n, providers: r, onDone: i, onCancel: a }) {
751
699
  }
752
700
  // src/ui/InstallGuide.tsx
753
701
  function U({ title: e, children: t, done: n }) {
754
- return /* @__PURE__ */ A("section", {
702
+ return /* @__PURE__ */ j("section", {
755
703
  className: "flex flex-col gap-2 border-l-2 border-border pl-4",
756
- children: [/* @__PURE__ */ A("h4", {
704
+ children: [/* @__PURE__ */ j("h4", {
757
705
  className: "flex items-center gap-2 text-sm font-semibold",
758
- children: [e, n && /* @__PURE__ */ k(m, {
706
+ children: [e, n && /* @__PURE__ */ A(m, {
759
707
  variant: "success",
760
708
  children: "✓"
761
709
  })]
@@ -763,15 +711,15 @@ function U({ title: e, children: t, done: n }) {
763
711
  });
764
712
  }
765
713
  function W({ locale: e, texts: t, onPair: c, lookup: l = (e) => o(e), check: u = r, version: m }) {
766
- let h = F(e, t), [_, b] = d(""), [x, S] = d(null), [C, w] = d(null), [E, D] = d(""), [O, j] = d(!1), [M, N] = d(null), P = a(_), L = `https://${_.trim().toLowerCase()}`, R = n;
767
- return /* @__PURE__ */ A("div", {
714
+ let h = I(e, t), [_, v] = d(""), [y, S] = d(null), [C, w] = d(null), [T, D] = d(""), [O, k] = d(!1), [M, N] = d(null), P = a(_), F = `https://${_.trim().toLowerCase()}`, R = n;
715
+ return /* @__PURE__ */ j("div", {
768
716
  className: "flex flex-col gap-5",
769
717
  children: [
770
- /* @__PURE__ */ k(U, {
718
+ /* @__PURE__ */ A(U, {
771
719
  title: h.guideServerTitle,
772
- children: /* @__PURE__ */ k("p", {
720
+ children: /* @__PURE__ */ A("p", {
773
721
  className: "text-sm",
774
- children: I(h.guideServer, {
722
+ children: L(h.guideServer, {
775
723
  systems: R.systems.join(", "),
776
724
  cpus: R.cpus,
777
725
  memory: R.memoryGb,
@@ -780,40 +728,40 @@ function W({ locale: e, texts: t, onPair: c, lookup: l = (e) => o(e), check: u =
780
728
  })
781
729
  })
782
730
  }),
783
- /* @__PURE__ */ A(U, {
731
+ /* @__PURE__ */ j(U, {
784
732
  title: h.guideDnsTitle,
785
- done: !!x?.ips.length,
733
+ done: !!y?.ips.length,
786
734
  children: [
787
- /* @__PURE__ */ k("p", {
735
+ /* @__PURE__ */ A("p", {
788
736
  className: "text-sm",
789
737
  children: h.guideDns
790
738
  }),
791
- /* @__PURE__ */ k(v, {
739
+ /* @__PURE__ */ A(b, {
792
740
  appearance: "empty",
793
741
  showNotice: !1,
794
742
  onSubmit: () => !1,
795
- children: /* @__PURE__ */ k(T, {
743
+ children: /* @__PURE__ */ A(E, {
796
744
  name: "domain",
797
745
  label: h.guideDomain,
798
746
  placeholder: "runner.example.com",
799
747
  autoComplete: "off",
800
748
  onChange: ({ value: e }) => {
801
- b(String(e ?? "")), S(null), w(null);
749
+ v(String(e ?? "")), S(null), w(null);
802
750
  }
803
751
  })
804
752
  }),
805
- /* @__PURE__ */ A("div", {
753
+ /* @__PURE__ */ j("div", {
806
754
  className: "flex flex-wrap items-center gap-2",
807
- children: [/* @__PURE__ */ k(y, {
755
+ children: [/* @__PURE__ */ A(x, {
808
756
  label: h.guideCheckDns,
809
757
  variant: "outline-secondary",
810
758
  disabled: !P,
811
759
  onClick: async () => S({ ips: await l(_.trim().toLowerCase()).catch(() => []) })
812
- }), x && (x.ips.length ? /* @__PURE__ */ k(p, {
760
+ }), y && (y.ips.length ? /* @__PURE__ */ A(p, {
813
761
  variant: "success",
814
762
  appearance: "text",
815
- children: I(h.guideDnsOk, { ips: x.ips.join(", ") })
816
- }) : /* @__PURE__ */ k(p, {
763
+ children: L(h.guideDnsOk, { ips: y.ips.join(", ") })
764
+ }) : /* @__PURE__ */ A(p, {
817
765
  variant: "warning",
818
766
  appearance: "text",
819
767
  children: h.guideDnsMissing
@@ -821,21 +769,21 @@ function W({ locale: e, texts: t, onPair: c, lookup: l = (e) => o(e), check: u =
821
769
  })
822
770
  ]
823
771
  }),
824
- /* @__PURE__ */ k(U, {
772
+ /* @__PURE__ */ A(U, {
825
773
  title: h.guideAccessTitle,
826
- children: /* @__PURE__ */ k("p", {
774
+ children: /* @__PURE__ */ A("p", {
827
775
  className: "text-sm",
828
776
  children: h.guideAccess
829
777
  })
830
778
  }),
831
- /* @__PURE__ */ A(U, {
779
+ /* @__PURE__ */ j(U, {
832
780
  title: h.guideInstallTitle,
833
781
  children: [
834
- /* @__PURE__ */ k("p", {
782
+ /* @__PURE__ */ A("p", {
835
783
  className: "text-sm",
836
784
  children: h.guideInstall
837
785
  }),
838
- /* @__PURE__ */ k(g, {
786
+ /* @__PURE__ */ A(g, {
839
787
  language: "bash",
840
788
  showCopy: !0,
841
789
  children: i({
@@ -843,12 +791,12 @@ function W({ locale: e, texts: t, onPair: c, lookup: l = (e) => o(e), check: u =
843
791
  ...m ? { version: m } : {}
844
792
  })
845
793
  }),
846
- /* @__PURE__ */ k("div", { children: /* @__PURE__ */ k(f, {
794
+ /* @__PURE__ */ A("div", { children: /* @__PURE__ */ A(f, {
847
795
  label: h.guideVerified,
848
796
  variant: "link",
849
- onClick: () => j((e) => !e)
797
+ onClick: () => k((e) => !e)
850
798
  }) }),
851
- O && /* @__PURE__ */ k(g, {
799
+ O && /* @__PURE__ */ A(g, {
852
800
  language: "bash",
853
801
  showCopy: !0,
854
802
  children: s({
@@ -858,19 +806,19 @@ function W({ locale: e, texts: t, onPair: c, lookup: l = (e) => o(e), check: u =
858
806
  })
859
807
  ]
860
808
  }),
861
- /* @__PURE__ */ A(U, {
809
+ /* @__PURE__ */ j(U, {
862
810
  title: h.guidePairTitle,
863
811
  done: C?.ok,
864
812
  children: [
865
- /* @__PURE__ */ k("p", {
813
+ /* @__PURE__ */ A("p", {
866
814
  className: "text-sm",
867
815
  children: h.guidePair
868
816
  }),
869
- /* @__PURE__ */ k(v, {
817
+ /* @__PURE__ */ A(b, {
870
818
  appearance: "empty",
871
819
  showNotice: !1,
872
820
  onSubmit: () => !1,
873
- children: /* @__PURE__ */ k(T, {
821
+ children: /* @__PURE__ */ A(E, {
874
822
  name: "code",
875
823
  label: h.addCode,
876
824
  placeholder: "ABCD-EFGH",
@@ -878,55 +826,55 @@ function W({ locale: e, texts: t, onPair: c, lookup: l = (e) => o(e), check: u =
878
826
  onChange: ({ value: e }) => D(String(e ?? ""))
879
827
  })
880
828
  }),
881
- C && /* @__PURE__ */ k(p, {
829
+ C && /* @__PURE__ */ A(p, {
882
830
  variant: C.ok ? "success" : "warning",
883
831
  appearance: "text",
884
832
  children: C.text
885
833
  }),
886
- M && /* @__PURE__ */ k(p, {
834
+ M && /* @__PURE__ */ A(p, {
887
835
  variant: "danger",
888
836
  children: M
889
837
  }),
890
- /* @__PURE__ */ A("div", {
838
+ /* @__PURE__ */ j("div", {
891
839
  className: "flex flex-wrap gap-2",
892
- children: [/* @__PURE__ */ k(y, {
840
+ children: [/* @__PURE__ */ A(x, {
893
841
  label: h.guideCheckHealth,
894
842
  variant: "outline-secondary",
895
843
  disabled: !P,
896
844
  onClick: async () => {
897
- let e = await u(L);
845
+ let e = await u(F);
898
846
  w(e.ok ? {
899
847
  ok: !0,
900
- text: I(h.guideHealthOk, {
848
+ text: L(h.guideHealthOk, {
901
849
  version: e.version,
902
- url: L
850
+ url: F
903
851
  })
904
852
  } : {
905
853
  ok: !1,
906
- text: I(h.guideHealthKo, { url: L })
854
+ text: L(h.guideHealthKo, { url: F })
907
855
  });
908
856
  }
909
- }), /* @__PURE__ */ k(y, {
857
+ }), /* @__PURE__ */ A(x, {
910
858
  label: h.addConnect,
911
859
  variant: "primary",
912
- disabled: !P || E.trim().length < 8,
860
+ disabled: !P || T.trim().length < 8,
913
861
  onClick: async () => {
914
862
  try {
915
863
  N(null), await c({
916
- url: L,
917
- code: E.trim()
864
+ url: F,
865
+ code: T.trim()
918
866
  });
919
867
  } catch (e) {
920
- N(I(h.error, { error: e.message }));
868
+ N(L(h.error, { error: e.message }));
921
869
  }
922
870
  }
923
871
  })]
924
872
  })
925
873
  ]
926
874
  }),
927
- /* @__PURE__ */ k(U, {
875
+ /* @__PURE__ */ A(U, {
928
876
  title: h.guideTroubleTitle,
929
- children: /* @__PURE__ */ k("p", {
877
+ children: /* @__PURE__ */ A("p", {
930
878
  className: "text-sm text-muted-foreground",
931
879
  children: h.guideTrouble
932
880
  })
@@ -936,7 +884,7 @@ function W({ locale: e, texts: t, onPair: c, lookup: l = (e) => o(e), check: u =
936
884
  }
937
885
  // src/ui/RunnersSettings.tsx
938
886
  function ie({ fleet: e, locale: t, texts: n }) {
939
- let r = F(t, n), [i, a] = d(null), [o, s] = d(null), [u, g] = d(!1), [_, y] = d(null), [b, S] = d(null), w = c(async () => {
887
+ let r = I(t, n), [i, a] = d(null), [o, s] = d(null), [u, g] = d(!1), [_, v] = d(null), [y, x] = d(null), S = c(async () => {
940
888
  try {
941
889
  let t = await e.list();
942
890
  a(t);
@@ -946,25 +894,25 @@ function ie({ fleet: e, locale: t, texts: n }) {
946
894
  status: n[t]
947
895
  }))), e.tenants && s(await e.tenants.list());
948
896
  } catch (e) {
949
- S(I(r.error, { error: e.message })), a([]);
897
+ x(L(r.error, { error: e.message })), a([]);
950
898
  }
951
899
  }, [e, r]);
952
900
  l(() => {
953
- w();
954
- }, [w]);
955
- let T = async (t, n) => {
956
- await e.update(t, n), await w();
901
+ S();
902
+ }, [S]);
903
+ let w = async (t, n) => {
904
+ await e.update(t, n), await S();
957
905
  };
958
- return /* @__PURE__ */ A("div", {
906
+ return /* @__PURE__ */ j("div", {
959
907
  className: "flex flex-col gap-4",
960
908
  children: [
961
- /* @__PURE__ */ k(h, {
962
- header: /* @__PURE__ */ A("div", {
909
+ /* @__PURE__ */ A(h, {
910
+ header: /* @__PURE__ */ j("div", {
963
911
  className: "flex flex-wrap items-center gap-2",
964
- children: [/* @__PURE__ */ k("h3", {
912
+ children: [/* @__PURE__ */ A("h3", {
965
913
  className: "flex-1 text-base font-semibold",
966
914
  children: r.runnersTitle
967
- }), /* @__PURE__ */ k(f, {
915
+ }), /* @__PURE__ */ A(f, {
968
916
  icon: "plus",
969
917
  label: r.runnersAdd,
970
918
  variant: "primary",
@@ -973,64 +921,64 @@ function ie({ fleet: e, locale: t, texts: n }) {
973
921
  }),
974
922
  loading: i === null,
975
923
  loaderMinHeight: 120,
976
- children: /* @__PURE__ */ A("div", {
924
+ children: /* @__PURE__ */ j("div", {
977
925
  className: "flex flex-col gap-3",
978
926
  children: [
979
- /* @__PURE__ */ k("p", {
927
+ /* @__PURE__ */ A("p", {
980
928
  className: "text-sm text-muted-foreground",
981
929
  children: r.runnersIntro
982
930
  }),
983
- b && /* @__PURE__ */ k(p, {
931
+ y && /* @__PURE__ */ A(p, {
984
932
  variant: "danger",
985
- children: b
933
+ children: y
986
934
  }),
987
- i?.length === 0 && /* @__PURE__ */ k("p", {
935
+ i?.length === 0 && /* @__PURE__ */ A("p", {
988
936
  className: "text-sm text-muted-foreground",
989
937
  children: r.runnersEmpty
990
938
  }),
991
- i?.map((e) => /* @__PURE__ */ A("div", {
939
+ i?.map((e) => /* @__PURE__ */ j("div", {
992
940
  className: "flex flex-col gap-2 rounded-md border border-border p-3",
993
- children: [/* @__PURE__ */ A("div", {
941
+ children: [/* @__PURE__ */ j("div", {
994
942
  className: "flex flex-wrap items-center gap-2",
995
943
  children: [
996
- /* @__PURE__ */ k("span", {
944
+ /* @__PURE__ */ A("span", {
997
945
  className: "font-medium",
998
946
  children: e.name
999
947
  }),
1000
- /* @__PURE__ */ k("span", {
948
+ /* @__PURE__ */ A("span", {
1001
949
  className: "text-xs text-muted-foreground",
1002
950
  children: e.url
1003
951
  }),
1004
- e.status === null && /* @__PURE__ */ k(m, {
952
+ e.status === null && /* @__PURE__ */ A(m, {
1005
953
  variant: "danger",
1006
954
  children: r.runnersUnreachable
1007
955
  }),
1008
- e.status && /* @__PURE__ */ k(m, {
956
+ e.status && /* @__PURE__ */ A(m, {
1009
957
  variant: "secondary",
1010
- children: I(r.runnersVersion, { version: e.status.version })
958
+ children: L(r.runnersVersion, { version: e.status.version })
1011
959
  }),
1012
- e.status && /* @__PURE__ */ k(m, {
960
+ e.status && /* @__PURE__ */ A(m, {
1013
961
  variant: "info",
1014
- children: I(r.runnersLoad, {
962
+ children: L(r.runnersLoad, {
1015
963
  chats: e.status.load.chats,
1016
964
  max: e.status.load.maxChats
1017
965
  })
1018
966
  }),
1019
- e.status && /* @__PURE__ */ k(m, {
967
+ e.status && /* @__PURE__ */ A(m, {
1020
968
  variant: "light",
1021
- children: I(r.runnersTenants, { count: e.status.tenants.length })
969
+ children: L(r.runnersTenants, { count: e.status.tenants.length })
1022
970
  }),
1023
- /* @__PURE__ */ k("div", {
971
+ /* @__PURE__ */ A("div", {
1024
972
  className: "ml-auto",
1025
- children: /* @__PURE__ */ k(f, {
973
+ children: /* @__PURE__ */ A(f, {
1026
974
  icon: "trash",
1027
975
  label: r.runnersRemove,
1028
976
  variant: "outline-danger",
1029
- onClick: () => y(e)
977
+ onClick: () => v(e)
1030
978
  })
1031
979
  })
1032
980
  ]
1033
- }), /* @__PURE__ */ k(v, {
981
+ }), /* @__PURE__ */ A(b, {
1034
982
  appearance: "empty",
1035
983
  showNotice: !1,
1036
984
  onSubmit: () => !1,
@@ -1038,18 +986,18 @@ function ie({ fleet: e, locale: t, texts: n }) {
1038
986
  isDefault: e.isDefault ? "true" : "",
1039
987
  draining: e.draining ? "true" : ""
1040
988
  },
1041
- children: /* @__PURE__ */ A("div", {
989
+ children: /* @__PURE__ */ j("div", {
1042
990
  className: "flex flex-wrap gap-4",
1043
- children: [/* @__PURE__ */ k(E, {
991
+ children: [/* @__PURE__ */ A(D, {
1044
992
  name: "isDefault",
1045
993
  label: r.runnersDefault,
1046
994
  valueChecked: "true",
1047
- onChange: ({ value: t }) => void T(e.id, { isDefault: !!t })
1048
- }), /* @__PURE__ */ k(E, {
995
+ onChange: ({ value: t }) => void w(e.id, { isDefault: !!t })
996
+ }), /* @__PURE__ */ A(D, {
1049
997
  name: "draining",
1050
998
  label: r.runnersDraining,
1051
999
  valueChecked: "true",
1052
- onChange: ({ value: t }) => void T(e.id, { draining: !!t })
1000
+ onChange: ({ value: t }) => void w(e.id, { draining: !!t })
1053
1001
  })]
1054
1002
  })
1055
1003
  })]
@@ -1057,26 +1005,26 @@ function ie({ fleet: e, locale: t, texts: n }) {
1057
1005
  ]
1058
1006
  })
1059
1007
  }),
1060
- e.tenants && i && i.length > 0 && /* @__PURE__ */ k(h, {
1008
+ e.tenants && i && i.length > 0 && /* @__PURE__ */ A(h, {
1061
1009
  title: r.distributionTitle,
1062
1010
  loading: o === null,
1063
1011
  loaderMinHeight: 80,
1064
- children: /* @__PURE__ */ A("div", {
1012
+ children: /* @__PURE__ */ j("div", {
1065
1013
  className: "flex flex-col gap-2",
1066
- children: [/* @__PURE__ */ k("p", {
1014
+ children: [/* @__PURE__ */ A("p", {
1067
1015
  className: "text-sm text-muted-foreground",
1068
1016
  children: r.distributionIntro
1069
- }), /* @__PURE__ */ k(v, {
1017
+ }), /* @__PURE__ */ A(b, {
1070
1018
  appearance: "empty",
1071
1019
  showNotice: !1,
1072
1020
  onSubmit: () => !1,
1073
1021
  defaultValues: Object.fromEntries((o ?? []).map((e) => [`runner_${e.id}`, e.runnerId ?? ""])),
1074
- children: (o ?? []).map((t) => /* @__PURE__ */ A("div", {
1022
+ children: (o ?? []).map((t) => /* @__PURE__ */ j("div", {
1075
1023
  className: "flex flex-wrap items-center gap-2",
1076
- children: [/* @__PURE__ */ k("span", {
1024
+ children: [/* @__PURE__ */ A("span", {
1077
1025
  className: "min-w-40 flex-1 text-sm",
1078
1026
  children: t.name
1079
- }), /* @__PURE__ */ k(C, {
1027
+ }), /* @__PURE__ */ A(T, {
1080
1028
  name: `runner_${t.id}`,
1081
1029
  title: r.distributionRunner,
1082
1030
  placeholderOption: {
@@ -1088,34 +1036,34 @@ function ie({ fleet: e, locale: t, texts: n }) {
1088
1036
  value: e.id
1089
1037
  })),
1090
1038
  onChange: ({ value: n }) => {
1091
- n && e.tenants.assign(t.id, String(n)).then(w);
1039
+ n && e.tenants.assign(t.id, String(n)).then(S);
1092
1040
  }
1093
1041
  })]
1094
1042
  }, t.id))
1095
1043
  })]
1096
1044
  })
1097
1045
  }),
1098
- u && /* @__PURE__ */ k(q, {
1046
+ u && /* @__PURE__ */ A(q, {
1099
1047
  fleet: e,
1100
1048
  t: r,
1101
1049
  locale: t,
1102
1050
  onClose: () => g(!1),
1103
1051
  onAdded: async () => {
1104
- g(!1), await w();
1052
+ g(!1), await S();
1105
1053
  }
1106
1054
  }),
1107
- _ && /* @__PURE__ */ k(x, {
1055
+ _ && /* @__PURE__ */ A(C, {
1108
1056
  title: r.runnersRemove,
1109
1057
  danger: !0,
1110
- onClose: () => y(null),
1111
- onYes: async () => (await e.remove(_.id).catch((e) => S(I(r.error, { error: e.message }))), y(null), await w(), !0),
1112
- children: I(r.runnersRemoveConfirm, { name: _.name })
1058
+ onClose: () => v(null),
1059
+ onYes: async () => (await e.remove(_.id).catch((e) => x(L(r.error, { error: e.message }))), v(null), await S(), !0),
1060
+ children: L(r.runnersRemoveConfirm, { name: _.name })
1113
1061
  })
1114
1062
  ]
1115
1063
  });
1116
1064
  }
1117
1065
  function G({ target: e, children: t }) {
1118
- return e ? j(t, e) : null;
1066
+ return e ? M(t, e) : null;
1119
1067
  }
1120
1068
  var K = (e) => {
1121
1069
  try {
@@ -1125,44 +1073,44 @@ var K = (e) => {
1125
1073
  }
1126
1074
  };
1127
1075
  function q({ fleet: e, t, locale: n, onClose: r, onAdded: i, position: a }) {
1128
- let [o, s] = d("choose"), [l, u] = d(null), [m, h] = d(null), g = c((e) => u(I(t.error, { error: e.message })), [t]);
1129
- return /* @__PURE__ */ k(b, {
1076
+ let [o, s] = d("choose"), [l, u] = d(null), [m, h] = d(null), g = c((e) => u(L(t.error, { error: e.message })), [t]);
1077
+ return /* @__PURE__ */ A(S, {
1130
1078
  title: t.addTitle,
1131
1079
  ...a === "right" ? { position: "right" } : {},
1132
1080
  size: "lg",
1133
1081
  onClose: r,
1134
- footer: o === "choose" || o === "guided" ? !1 : /* @__PURE__ */ k("div", {
1082
+ footer: o === "choose" || o === "guided" ? !1 : /* @__PURE__ */ A("div", {
1135
1083
  ref: h,
1136
1084
  className: "flex w-full flex-wrap items-center justify-end gap-3"
1137
1085
  }),
1138
- children: /* @__PURE__ */ A("div", {
1086
+ children: /* @__PURE__ */ j("div", {
1139
1087
  className: "flex flex-col gap-4",
1140
1088
  children: [
1141
- l && /* @__PURE__ */ k(p, {
1089
+ l && /* @__PURE__ */ A(p, {
1142
1090
  variant: "danger",
1143
1091
  children: l
1144
1092
  }),
1145
- o === "choose" && /* @__PURE__ */ A("div", {
1093
+ o === "choose" && /* @__PURE__ */ j("div", {
1146
1094
  className: "grid gap-3 sm:grid-cols-3",
1147
1095
  children: [
1148
- e.install && /* @__PURE__ */ k(J, {
1096
+ e.install && /* @__PURE__ */ A(J, {
1149
1097
  title: t.addAutomatic,
1150
1098
  hint: t.addAutomaticHint,
1151
1099
  onClick: () => s("automatic")
1152
1100
  }),
1153
- /* @__PURE__ */ k(J, {
1101
+ /* @__PURE__ */ A(J, {
1154
1102
  title: t.addGuided,
1155
1103
  hint: t.addGuidedHint,
1156
1104
  onClick: () => s("guided")
1157
1105
  }),
1158
- /* @__PURE__ */ k(J, {
1106
+ /* @__PURE__ */ A(J, {
1159
1107
  title: t.addExisting,
1160
1108
  hint: t.addExistingHint,
1161
1109
  onClick: () => s("existing")
1162
1110
  })
1163
1111
  ]
1164
1112
  }),
1165
- o !== "choose" && /* @__PURE__ */ k("div", { children: /* @__PURE__ */ k(f, {
1113
+ o !== "choose" && /* @__PURE__ */ A("div", { children: /* @__PURE__ */ A(f, {
1166
1114
  icon: "arrow-left",
1167
1115
  label: t.addBack,
1168
1116
  variant: "link",
@@ -1170,7 +1118,7 @@ function q({ fleet: e, t, locale: n, onClose: r, onAdded: i, position: a }) {
1170
1118
  s("choose"), u(null);
1171
1119
  }
1172
1120
  }) }),
1173
- o === "automatic" && e.install && /* @__PURE__ */ k(ce, {
1121
+ o === "automatic" && e.install && /* @__PURE__ */ A(ce, {
1174
1122
  t,
1175
1123
  footer: m,
1176
1124
  localKeys: !!e.localKeys,
@@ -1182,7 +1130,7 @@ function q({ fleet: e, t, locale: n, onClose: r, onAdded: i, position: a }) {
1182
1130
  onDone: i,
1183
1131
  onError: g
1184
1132
  }),
1185
- o === "guided" && /* @__PURE__ */ k(W, {
1133
+ o === "guided" && /* @__PURE__ */ A(W, {
1186
1134
  locale: n,
1187
1135
  texts: t,
1188
1136
  onPair: async ({ url: t, code: n }) => {
@@ -1193,7 +1141,7 @@ function q({ fleet: e, t, locale: n, onClose: r, onAdded: i, position: a }) {
1193
1141
  }));
1194
1142
  }
1195
1143
  }),
1196
- o === "existing" && /* @__PURE__ */ k(se, {
1144
+ o === "existing" && /* @__PURE__ */ A(se, {
1197
1145
  t,
1198
1146
  footer: m,
1199
1147
  pairing: e.startPairing && e.pairingStatus ? {
@@ -1220,14 +1168,14 @@ function q({ fleet: e, t, locale: n, onClose: r, onAdded: i, position: a }) {
1220
1168
  });
1221
1169
  }
1222
1170
  function J({ title: e, hint: t, onClick: n }) {
1223
- return /* @__PURE__ */ A("button", {
1171
+ return /* @__PURE__ */ j("button", {
1224
1172
  type: "button",
1225
1173
  onClick: n,
1226
1174
  className: "rounded-lg border border-border p-4 text-left transition-colors hover:border-primary hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
1227
- children: [/* @__PURE__ */ k("span", {
1175
+ children: [/* @__PURE__ */ A("span", {
1228
1176
  className: "block font-medium",
1229
1177
  children: e
1230
- }), /* @__PURE__ */ k("span", {
1178
+ }), /* @__PURE__ */ A("span", {
1231
1179
  className: "mt-1 block text-sm text-muted-foreground",
1232
1180
  children: t
1233
1181
  })]
@@ -1238,7 +1186,7 @@ var Y = (e) => (/^https?:\/\//.test(e.trim()) ? e.trim() : `https://${e.trim()}`
1238
1186
  minute: "2-digit"
1239
1187
  }), oe = 5;
1240
1188
  function se({ t: e, footer: t, pairing: n, onAdded: r, onError: i, onClearError: a, onConnect: o }) {
1241
- let [s, c] = d(""), [u, m] = d(""), [h, g] = d(!n), [_, b] = d(null), [x, S] = d(null);
1189
+ let [s, c] = d(""), [u, m] = d(""), [h, g] = d(!n), [_, v] = d(null), [y, S] = d(null);
1242
1190
  return l(() => {
1243
1191
  if (!_ || !n) return;
1244
1192
  let e = !1, t = 0, a, o = async () => {
@@ -1250,7 +1198,7 @@ function se({ t: e, footer: t, pairing: n, onAdded: r, onError: i, onClearError:
1250
1198
  return;
1251
1199
  }
1252
1200
  if (i.status !== "pending") {
1253
- S(i.status), b(null);
1201
+ S(i.status), v(null);
1254
1202
  return;
1255
1203
  }
1256
1204
  } catch (n) {
@@ -1266,28 +1214,28 @@ function se({ t: e, footer: t, pairing: n, onAdded: r, onError: i, onClearError:
1266
1214
  n,
1267
1215
  r,
1268
1216
  i
1269
- ]), _ ? /* @__PURE__ */ A("div", {
1217
+ ]), _ ? /* @__PURE__ */ j("div", {
1270
1218
  className: "flex flex-col gap-3",
1271
1219
  children: [
1272
- /* @__PURE__ */ k("h4", {
1220
+ /* @__PURE__ */ A("h4", {
1273
1221
  className: "font-semibold",
1274
1222
  children: e.pairWaitingTitle
1275
1223
  }),
1276
- /* @__PURE__ */ k("p", {
1224
+ /* @__PURE__ */ A("p", {
1277
1225
  className: "text-sm text-muted-foreground",
1278
1226
  children: e.pairWaitingHint
1279
1227
  }),
1280
- /* @__PURE__ */ k("div", {
1228
+ /* @__PURE__ */ A("div", {
1281
1229
  className: "rounded-lg border border-border p-4 text-center font-mono text-3xl font-semibold tracking-widest",
1282
1230
  children: _.code
1283
1231
  }),
1284
- /* @__PURE__ */ k("p", {
1232
+ /* @__PURE__ */ A("p", {
1285
1233
  className: "text-sm text-muted-foreground",
1286
- children: I(e.pairWaiting, { at: ae(_.expiresAt) })
1234
+ children: L(e.pairWaiting, { at: ae(_.expiresAt) })
1287
1235
  }),
1288
- /* @__PURE__ */ k(G, {
1236
+ /* @__PURE__ */ A(G, {
1289
1237
  target: t,
1290
- children: /* @__PURE__ */ k(f, {
1238
+ children: /* @__PURE__ */ A(f, {
1291
1239
  icon: "external-link",
1292
1240
  label: e.pairOpen,
1293
1241
  variant: "primary",
@@ -1295,14 +1243,14 @@ function se({ t: e, footer: t, pairing: n, onAdded: r, onError: i, onClearError:
1295
1243
  })
1296
1244
  })
1297
1245
  ]
1298
- }) : /* @__PURE__ */ A("div", {
1246
+ }) : /* @__PURE__ */ j("div", {
1299
1247
  className: "flex flex-col gap-3",
1300
1248
  children: [
1301
- x && /* @__PURE__ */ k(p, {
1302
- variant: x === "denied" ? "danger" : "warning",
1303
- children: x === "denied" ? e.pairDenied : e.pairExpired
1249
+ y && /* @__PURE__ */ A(p, {
1250
+ variant: y === "denied" ? "danger" : "warning",
1251
+ children: y === "denied" ? e.pairDenied : e.pairExpired
1304
1252
  }),
1305
- /* @__PURE__ */ A(v, {
1253
+ /* @__PURE__ */ j(b, {
1306
1254
  appearance: "empty",
1307
1255
  showNotice: !1,
1308
1256
  onSubmit: () => !1,
@@ -1310,12 +1258,12 @@ function se({ t: e, footer: t, pairing: n, onAdded: r, onError: i, onClearError:
1310
1258
  url: s,
1311
1259
  code: u
1312
1260
  },
1313
- children: [/* @__PURE__ */ k(T, {
1261
+ children: [/* @__PURE__ */ A(E, {
1314
1262
  name: "url",
1315
1263
  label: e.addUrl,
1316
1264
  placeholder: "https://runner.example.com",
1317
1265
  onChange: ({ value: e }) => c(String(e ?? ""))
1318
- }), h && /* @__PURE__ */ k(T, {
1266
+ }), h && /* @__PURE__ */ A(E, {
1319
1267
  name: "code",
1320
1268
  label: e.addCode,
1321
1269
  placeholder: "ABCD-EFGH",
@@ -1323,26 +1271,26 @@ function se({ t: e, footer: t, pairing: n, onAdded: r, onError: i, onClearError:
1323
1271
  onChange: ({ value: e }) => m(String(e ?? ""))
1324
1272
  })]
1325
1273
  }),
1326
- /* @__PURE__ */ A(G, {
1274
+ /* @__PURE__ */ j(G, {
1327
1275
  target: t,
1328
- children: [n && /* @__PURE__ */ k(f, {
1276
+ children: [n && /* @__PURE__ */ A(f, {
1329
1277
  label: h ? e.pairWithApproval : e.pairWithCode,
1330
1278
  variant: "link",
1331
1279
  onClick: () => g((e) => !e)
1332
- }), h ? /* @__PURE__ */ k(y, {
1280
+ }), h ? /* @__PURE__ */ A(x, {
1333
1281
  label: e.addConnect,
1334
1282
  variant: "primary",
1335
1283
  disabled: !s.trim() || u.trim().length < 8,
1336
1284
  onClick: () => o(Y(s), u.trim())
1337
- }) : /* @__PURE__ */ k(y, {
1338
- label: x ? e.pairAgain : e.pairNext,
1285
+ }) : /* @__PURE__ */ A(x, {
1286
+ label: y ? e.pairAgain : e.pairNext,
1339
1287
  variant: "primary",
1340
1288
  disabled: !s.trim(),
1341
1289
  onClick: async () => {
1342
1290
  S(null), a();
1343
1291
  try {
1344
1292
  let e = Y(s);
1345
- b(await n.start({
1293
+ v(await n.start({
1346
1294
  name: K(e),
1347
1295
  url: e
1348
1296
  }));
@@ -1379,43 +1327,43 @@ function ce({ t: e, footer: t, localKeys: n, install: r, onDone: i, onError: a }
1379
1327
  ...n,
1380
1328
  [e]: String(t ?? "")
1381
1329
  })), _ = o.host.trim() && o.domain.trim() && (o.auth === "local" || o.username.trim()) && (o.auth === "local" || (o.auth === "key" ? o.privateKey.trim() : o.password));
1382
- return /* @__PURE__ */ A("div", {
1330
+ return /* @__PURE__ */ j("div", {
1383
1331
  className: "flex flex-col gap-3",
1384
1332
  children: [
1385
- !p && /* @__PURE__ */ A(v, {
1333
+ !p && /* @__PURE__ */ j(b, {
1386
1334
  appearance: "empty",
1387
1335
  showNotice: !1,
1388
1336
  onSubmit: () => !1,
1389
1337
  defaultValues: o,
1390
1338
  children: [
1391
- /* @__PURE__ */ k(T, {
1339
+ /* @__PURE__ */ A(E, {
1392
1340
  name: "domain",
1393
1341
  label: e.guideDomain,
1394
1342
  placeholder: "runner.example.com",
1395
1343
  onChange: g("domain")
1396
1344
  }),
1397
- /* @__PURE__ */ A("div", {
1345
+ /* @__PURE__ */ j("div", {
1398
1346
  className: "grid gap-3 sm:grid-cols-3",
1399
1347
  children: [
1400
- /* @__PURE__ */ k(T, {
1348
+ /* @__PURE__ */ A(E, {
1401
1349
  name: "host",
1402
1350
  label: e.addHost,
1403
1351
  placeholder: "203.0.113.10",
1404
1352
  onChange: g("host")
1405
1353
  }),
1406
- /* @__PURE__ */ k(T, {
1354
+ /* @__PURE__ */ A(E, {
1407
1355
  name: "port",
1408
1356
  label: e.addPort,
1409
1357
  onChange: g("port")
1410
1358
  }),
1411
- /* @__PURE__ */ k(T, {
1359
+ /* @__PURE__ */ A(E, {
1412
1360
  name: "username",
1413
1361
  label: e.addUser,
1414
1362
  onChange: g("username")
1415
1363
  })
1416
1364
  ]
1417
1365
  }),
1418
- /* @__PURE__ */ k(C, {
1366
+ /* @__PURE__ */ A(T, {
1419
1367
  name: "auth",
1420
1368
  label: e.addAuth,
1421
1369
  options: [
@@ -1434,16 +1382,16 @@ function ce({ t: e, footer: t, localKeys: n, install: r, onDone: i, onError: a }
1434
1382
  ],
1435
1383
  onChange: g("auth")
1436
1384
  }),
1437
- o.auth === "local" && /* @__PURE__ */ k("p", {
1385
+ o.auth === "local" && /* @__PURE__ */ A("p", {
1438
1386
  className: "text-xs text-muted-foreground",
1439
1387
  children: e.addLocalKeyHint
1440
1388
  }),
1441
- o.auth === "local" ? null : o.auth === "key" ? /* @__PURE__ */ k(D, {
1389
+ o.auth === "local" ? null : o.auth === "key" ? /* @__PURE__ */ A(O, {
1442
1390
  name: "privateKey",
1443
1391
  label: e.addKey,
1444
1392
  placeholder: "-----BEGIN OPENSSH PRIVATE KEY-----",
1445
1393
  onChange: g("privateKey")
1446
- }) : /* @__PURE__ */ k(S, {
1394
+ }) : /* @__PURE__ */ A(w, {
1447
1395
  name: "password",
1448
1396
  label: e.addPassword,
1449
1397
  autoComplete: "off",
@@ -1451,24 +1399,24 @@ function ce({ t: e, footer: t, localKeys: n, install: r, onDone: i, onError: a }
1451
1399
  })
1452
1400
  ]
1453
1401
  }),
1454
- /* @__PURE__ */ k("p", {
1402
+ /* @__PURE__ */ A("p", {
1455
1403
  className: "text-xs text-muted-foreground",
1456
1404
  children: e.addCredentialsNote
1457
1405
  }),
1458
- p && /* @__PURE__ */ k("div", {
1406
+ p && /* @__PURE__ */ A("div", {
1459
1407
  className: "flex flex-wrap gap-1",
1460
- children: X.map((e) => /* @__PURE__ */ k(m, {
1408
+ children: X.map((e) => /* @__PURE__ */ A(m, {
1461
1409
  variant: u === e ? "primary" : X.indexOf(e) < X.indexOf(u ?? "check") ? "success" : "light",
1462
1410
  children: e
1463
1411
  }, e))
1464
1412
  }),
1465
- c.length > 0 && /* @__PURE__ */ k("pre", {
1413
+ c.length > 0 && /* @__PURE__ */ A("pre", {
1466
1414
  className: "max-h-64 overflow-auto rounded-md bg-muted p-2 text-xs",
1467
1415
  children: c.slice(-200).join("\n")
1468
1416
  }),
1469
- /* @__PURE__ */ k(G, {
1417
+ /* @__PURE__ */ A(G, {
1470
1418
  target: t,
1471
- children: /* @__PURE__ */ k(y, {
1419
+ children: /* @__PURE__ */ A(x, {
1472
1420
  label: p ? e.addInstalling : e.addInstall,
1473
1421
  variant: "primary",
1474
1422
  disabled: !_ || p,
@@ -1500,48 +1448,48 @@ var Z = (e) => (e / 1024 ** 3).toFixed(1), Q = (e) => new Date(e).toLocaleString
1500
1448
  timeStyle: "short"
1501
1449
  });
1502
1450
  function le({ client: e, locale: n, texts: r, onSignOut: i, approve: a }) {
1503
- let o = F(n, r), [s, u] = d(null), [m, b] = d(null), [x, S] = d(null), [C, w] = d({
1451
+ let o = I(n, r), [s, u] = d(null), [m, _] = d(null), [v, S] = d(null), [C, w] = d({
1504
1452
  id: "",
1505
1453
  name: ""
1506
- }), [E, D] = d(null), O = c(async () => {
1454
+ }), [T, D] = d(null), O = c(async () => {
1507
1455
  try {
1508
- u(await e.platform.status()), b(null);
1456
+ u(await e.platform.status()), _(null);
1509
1457
  } catch (e) {
1510
- b(I(o.error, { error: e instanceof t ? e.code : String(e) }));
1458
+ _(L(o.error, { error: e instanceof t ? e.code : String(e) }));
1511
1459
  }
1512
1460
  }, [e, o]);
1513
1461
  return l(() => {
1514
1462
  O();
1515
- }, [O]), /* @__PURE__ */ A("div", {
1463
+ }, [O]), /* @__PURE__ */ j("div", {
1516
1464
  className: "mx-auto flex max-w-4xl flex-col gap-4 p-4",
1517
1465
  children: [
1518
- /* @__PURE__ */ A("div", {
1466
+ /* @__PURE__ */ j("div", {
1519
1467
  className: "flex items-center gap-2",
1520
- children: [/* @__PURE__ */ k("h1", {
1468
+ children: [/* @__PURE__ */ A("h1", {
1521
1469
  className: "flex-1 text-xl font-semibold",
1522
1470
  children: o.consoleTitle
1523
- }), i && /* @__PURE__ */ k(f, {
1471
+ }), i && /* @__PURE__ */ A(f, {
1524
1472
  icon: "log-out",
1525
1473
  label: o.consoleSignOut,
1526
1474
  variant: "outline-secondary",
1527
1475
  onClick: i
1528
1476
  })]
1529
1477
  }),
1530
- m && /* @__PURE__ */ k(p, {
1478
+ m && /* @__PURE__ */ A(p, {
1531
1479
  variant: "danger",
1532
1480
  children: m
1533
1481
  }),
1534
- /* @__PURE__ */ k(fe, {
1482
+ /* @__PURE__ */ A(fe, {
1535
1483
  client: e,
1536
1484
  t: o,
1537
1485
  approve: a,
1538
1486
  onAnswered: O
1539
1487
  }),
1540
- /* @__PURE__ */ k(h, {
1488
+ /* @__PURE__ */ A(h, {
1541
1489
  title: o.consoleStatus,
1542
1490
  loading: !s && !m,
1543
1491
  loaderMinHeight: 100,
1544
- children: s && /* @__PURE__ */ k(_, { items: [
1492
+ children: s && /* @__PURE__ */ A(y, { items: [
1545
1493
  {
1546
1494
  label: "Version",
1547
1495
  value: s.version
@@ -1556,7 +1504,7 @@ function le({ client: e, locale: n, texts: r, onSignOut: i, approve: a }) {
1556
1504
  },
1557
1505
  {
1558
1506
  label: "Machine",
1559
- value: I(o.consoleMachine, {
1507
+ value: L(o.consoleMachine, {
1560
1508
  memory: Z(s.machine.availableBytes),
1561
1509
  total: Z(s.machine.totalBytes),
1562
1510
  cpus: s.machine.cpus
@@ -1568,27 +1516,27 @@ function le({ client: e, locale: n, texts: r, onSignOut: i, approve: a }) {
1568
1516
  }
1569
1517
  ] })
1570
1518
  }),
1571
- /* @__PURE__ */ k(h, {
1519
+ /* @__PURE__ */ A(h, {
1572
1520
  title: o.consolePairing,
1573
- children: /* @__PURE__ */ A("div", {
1521
+ children: /* @__PURE__ */ j("div", {
1574
1522
  className: "flex flex-col gap-2",
1575
1523
  children: [
1576
- /* @__PURE__ */ k("p", {
1524
+ /* @__PURE__ */ A("p", {
1577
1525
  className: "text-sm text-muted-foreground",
1578
1526
  children: o.consolePairingHint
1579
1527
  }),
1580
- x && /* @__PURE__ */ k(g, {
1528
+ v && /* @__PURE__ */ A(g, {
1581
1529
  showCopy: !0,
1582
- children: x.code
1530
+ children: v.code
1583
1531
  }),
1584
- x && /* @__PURE__ */ k("p", {
1532
+ v && /* @__PURE__ */ A("p", {
1585
1533
  className: "text-xs text-muted-foreground",
1586
- children: I(o.consoleCode, {
1587
- code: x.code,
1588
- at: Q(x.expiresAt)
1534
+ children: L(o.consoleCode, {
1535
+ code: v.code,
1536
+ at: Q(v.expiresAt)
1589
1537
  })
1590
1538
  }),
1591
- /* @__PURE__ */ k("div", { children: /* @__PURE__ */ k(y, {
1539
+ /* @__PURE__ */ A("div", { children: /* @__PURE__ */ A(x, {
1592
1540
  label: o.consoleNewCode,
1593
1541
  variant: "outline-primary",
1594
1542
  onClick: async () => S(await e.createPairing())
@@ -1596,24 +1544,24 @@ function le({ client: e, locale: n, texts: r, onSignOut: i, approve: a }) {
1596
1544
  ]
1597
1545
  })
1598
1546
  }),
1599
- /* @__PURE__ */ k(ue, {
1547
+ /* @__PURE__ */ A(ue, {
1600
1548
  client: e,
1601
1549
  t: o
1602
1550
  }),
1603
- /* @__PURE__ */ k(h, {
1551
+ /* @__PURE__ */ A(h, {
1604
1552
  title: o.consoleTenants,
1605
- children: /* @__PURE__ */ A("div", {
1553
+ children: /* @__PURE__ */ j("div", {
1606
1554
  className: "flex flex-col gap-3",
1607
1555
  children: [
1608
- E && /* @__PURE__ */ k(p, {
1556
+ T && /* @__PURE__ */ A(p, {
1609
1557
  variant: "warning",
1610
1558
  onClose: () => D(null),
1611
- children: /* @__PURE__ */ k("span", {
1559
+ children: /* @__PURE__ */ A("span", {
1612
1560
  className: "break-all",
1613
- children: I(o.consoleKeyShown, { key: E })
1561
+ children: L(o.consoleKeyShown, { key: T })
1614
1562
  })
1615
1563
  }),
1616
- s?.tenants.map((t) => /* @__PURE__ */ k(de, {
1564
+ s?.tenants.map((t) => /* @__PURE__ */ A(de, {
1617
1565
  client: e,
1618
1566
  tenant: t,
1619
1567
  t: o,
@@ -1621,14 +1569,14 @@ function le({ client: e, locale: n, texts: r, onSignOut: i, approve: a }) {
1621
1569
  onKey: D,
1622
1570
  onChange: O
1623
1571
  }, t.id)),
1624
- /* @__PURE__ */ k(v, {
1572
+ /* @__PURE__ */ A(b, {
1625
1573
  appearance: "empty",
1626
1574
  showNotice: !1,
1627
1575
  onSubmit: () => !1,
1628
- children: /* @__PURE__ */ A("div", {
1576
+ children: /* @__PURE__ */ j("div", {
1629
1577
  className: "grid gap-2 sm:grid-cols-[1fr_1fr_auto] sm:items-end",
1630
1578
  children: [
1631
- /* @__PURE__ */ k(T, {
1579
+ /* @__PURE__ */ A(E, {
1632
1580
  name: "tenantId",
1633
1581
  label: o.consoleTenantId,
1634
1582
  placeholder: "acme",
@@ -1637,7 +1585,7 @@ function le({ client: e, locale: n, texts: r, onSignOut: i, approve: a }) {
1637
1585
  id: String(e ?? "")
1638
1586
  }))
1639
1587
  }),
1640
- /* @__PURE__ */ k(T, {
1588
+ /* @__PURE__ */ A(E, {
1641
1589
  name: "tenantName",
1642
1590
  label: o.consoleTenantName,
1643
1591
  placeholder: "Acme",
@@ -1646,7 +1594,7 @@ function le({ client: e, locale: n, texts: r, onSignOut: i, approve: a }) {
1646
1594
  name: String(e ?? "")
1647
1595
  }))
1648
1596
  }),
1649
- /* @__PURE__ */ k(y, {
1597
+ /* @__PURE__ */ A(x, {
1650
1598
  label: o.consoleCreate,
1651
1599
  variant: "primary",
1652
1600
  disabled: !/^[a-z0-9][a-z0-9-]{0,62}$/.test(C.id),
@@ -1655,7 +1603,7 @@ function le({ client: e, locale: n, texts: r, onSignOut: i, approve: a }) {
1655
1603
  let t = await e.platform.createTenant(C.id, { name: C.name || void 0 });
1656
1604
  t.key && D(t.key), await O();
1657
1605
  } catch (e) {
1658
- b(I(o.error, { error: e instanceof t ? e.code : String(e) }));
1606
+ _(L(o.error, { error: e instanceof t ? e.code : String(e) }));
1659
1607
  }
1660
1608
  }
1661
1609
  })
@@ -1672,36 +1620,36 @@ function ue({ client: e, t }) {
1672
1620
  let [n, r] = d(null), [i, a] = d({}), [o, s] = d(null), u = c(async () => r(await e.platform.platformKeys()), [e]);
1673
1621
  return l(() => {
1674
1622
  u();
1675
- }, [u]), /* @__PURE__ */ A(h, {
1623
+ }, [u]), /* @__PURE__ */ j(h, {
1676
1624
  title: t.consolePlatforms,
1677
1625
  loading: !n,
1678
1626
  loaderMinHeight: 60,
1679
- children: [/* @__PURE__ */ A("div", {
1627
+ children: [/* @__PURE__ */ j("div", {
1680
1628
  className: "flex flex-col gap-3",
1681
1629
  children: [
1682
- /* @__PURE__ */ k("p", {
1630
+ /* @__PURE__ */ A("p", {
1683
1631
  className: "text-sm text-muted-foreground",
1684
1632
  children: t.consolePlatformsHint
1685
1633
  }),
1686
- n && !n.length && /* @__PURE__ */ k("p", {
1634
+ n && !n.length && /* @__PURE__ */ A("p", {
1687
1635
  className: "text-sm text-muted-foreground",
1688
1636
  children: t.consolePlatformsEmpty
1689
1637
  }),
1690
1638
  n?.map((n) => {
1691
1639
  let r = i[n.id] ?? n.project ?? "";
1692
- return /* @__PURE__ */ k(v, {
1640
+ return /* @__PURE__ */ A(b, {
1693
1641
  appearance: "empty",
1694
1642
  showNotice: !1,
1695
1643
  onSubmit: () => !1,
1696
- children: /* @__PURE__ */ A("div", {
1644
+ children: /* @__PURE__ */ j("div", {
1697
1645
  className: "grid gap-2 rounded-md border border-border p-3 sm:grid-cols-[1fr_12rem_auto] sm:items-end",
1698
1646
  children: [
1699
- /* @__PURE__ */ A("div", {
1647
+ /* @__PURE__ */ j("div", {
1700
1648
  className: "flex flex-col gap-1",
1701
- children: [/* @__PURE__ */ k("span", {
1649
+ children: [/* @__PURE__ */ A("span", {
1702
1650
  className: "font-medium",
1703
1651
  children: n.name
1704
- }), /* @__PURE__ */ A("span", {
1652
+ }), /* @__PURE__ */ j("span", {
1705
1653
  className: "text-xs text-muted-foreground",
1706
1654
  children: [
1707
1655
  Q(n.createdAt),
@@ -1710,7 +1658,7 @@ function ue({ client: e, t }) {
1710
1658
  ]
1711
1659
  })]
1712
1660
  }),
1713
- /* @__PURE__ */ k(T, {
1661
+ /* @__PURE__ */ A(E, {
1714
1662
  name: `project-${n.id}`,
1715
1663
  label: t.consolePlatformProject,
1716
1664
  value: r,
@@ -1720,16 +1668,16 @@ function ue({ client: e, t }) {
1720
1668
  [n.id]: String(e ?? "").trim()
1721
1669
  }))
1722
1670
  }),
1723
- /* @__PURE__ */ A("div", {
1671
+ /* @__PURE__ */ j("div", {
1724
1672
  className: "flex gap-2",
1725
- children: [/* @__PURE__ */ k(y, {
1673
+ children: [/* @__PURE__ */ A(x, {
1726
1674
  label: t.consolePlatformSave,
1727
1675
  variant: "outline-primary",
1728
1676
  disabled: r === (n.project ?? "") || r !== "" && !/^[a-z0-9]{1,32}$/.test(r),
1729
1677
  onClick: async () => {
1730
1678
  await e.setKeyProject(n.id, r || null), await u();
1731
1679
  }
1732
- }), /* @__PURE__ */ k(f, {
1680
+ }), /* @__PURE__ */ A(f, {
1733
1681
  icon: "trash",
1734
1682
  label: t.consoleRevoke,
1735
1683
  variant: "outline-danger",
@@ -1741,33 +1689,33 @@ function ue({ client: e, t }) {
1741
1689
  }, n.id);
1742
1690
  })
1743
1691
  ]
1744
- }), o && /* @__PURE__ */ k(x, {
1692
+ }), o && /* @__PURE__ */ A(C, {
1745
1693
  title: t.consoleRevoke,
1746
1694
  danger: !0,
1747
1695
  onClose: () => s(null),
1748
1696
  onYes: async () => (await e.platform.revokePlatformKey(o.id), s(null), await u(), !0),
1749
- children: I(t.consolePlatformRevokeConfirm, { name: o.name })
1697
+ children: L(t.consolePlatformRevokeConfirm, { name: o.name })
1750
1698
  })]
1751
1699
  });
1752
1700
  }
1753
1701
  function de({ client: e, tenant: t, t: n, locale: r, onKey: i, onChange: a }) {
1754
- let [o, s] = d(!1), [p, h] = d(null), [g, _] = d(!1), v = u(() => e.as({ tenant: t.id }), [e, t.id]), b = c(async () => h(await e.platform.keys(t.id)), [e, t.id]);
1702
+ let [o, s] = d(!1), [p, h] = d(null), [g, _] = d(!1), v = u(() => e.as({ tenant: t.id }), [e, t.id]), y = c(async () => h(await e.platform.keys(t.id)), [e, t.id]);
1755
1703
  return l(() => {
1756
- o && b();
1757
- }, [o, b]), /* @__PURE__ */ A("div", {
1704
+ o && y();
1705
+ }, [o, y]), /* @__PURE__ */ j("div", {
1758
1706
  className: "rounded-md border border-border p-3",
1759
1707
  children: [
1760
- /* @__PURE__ */ A("div", {
1708
+ /* @__PURE__ */ j("div", {
1761
1709
  className: "flex flex-wrap items-center gap-2",
1762
1710
  children: [
1763
- /* @__PURE__ */ A("button", {
1711
+ /* @__PURE__ */ j("button", {
1764
1712
  type: "button",
1765
1713
  className: "flex-1 text-left font-medium",
1766
1714
  onClick: () => s((e) => !e),
1767
1715
  children: [
1768
1716
  t.name,
1769
1717
  " ",
1770
- /* @__PURE__ */ A("span", {
1718
+ /* @__PURE__ */ j("span", {
1771
1719
  className: "text-xs text-muted-foreground",
1772
1720
  children: [
1773
1721
  "(",
@@ -1777,11 +1725,11 @@ function de({ client: e, tenant: t, t: n, locale: r, onKey: i, onChange: a }) {
1777
1725
  })
1778
1726
  ]
1779
1727
  }),
1780
- t.usersWithAccounts !== void 0 && /* @__PURE__ */ A(m, {
1728
+ t.usersWithAccounts !== void 0 && /* @__PURE__ */ j(m, {
1781
1729
  variant: "light",
1782
1730
  children: [t.usersWithAccounts, " 👤"]
1783
1731
  }),
1784
- /* @__PURE__ */ k(f, {
1732
+ /* @__PURE__ */ A(f, {
1785
1733
  icon: "trash",
1786
1734
  label: n.consoleRemoveTenant,
1787
1735
  variant: "outline-danger",
@@ -1789,34 +1737,34 @@ function de({ client: e, tenant: t, t: n, locale: r, onKey: i, onChange: a }) {
1789
1737
  })
1790
1738
  ]
1791
1739
  }),
1792
- o && /* @__PURE__ */ A("div", {
1740
+ o && /* @__PURE__ */ j("div", {
1793
1741
  className: "mt-3 flex flex-col gap-3",
1794
1742
  children: [
1795
- /* @__PURE__ */ k("h4", {
1743
+ /* @__PURE__ */ A("h4", {
1796
1744
  className: "text-sm font-semibold",
1797
1745
  children: n.consoleKeys
1798
1746
  }),
1799
- p?.map((r) => /* @__PURE__ */ A("div", {
1747
+ p?.map((r) => /* @__PURE__ */ j("div", {
1800
1748
  className: "flex flex-wrap items-center gap-2 text-sm",
1801
1749
  children: [
1802
- /* @__PURE__ */ k("span", {
1750
+ /* @__PURE__ */ A("span", {
1803
1751
  className: "flex-1",
1804
1752
  children: r.name
1805
1753
  }),
1806
- r.permissions.map((e) => /* @__PURE__ */ k(m, {
1754
+ r.permissions.map((e) => /* @__PURE__ */ A(m, {
1807
1755
  variant: "info",
1808
1756
  children: e
1809
1757
  }, e)),
1810
- /* @__PURE__ */ k(f, {
1758
+ /* @__PURE__ */ A(f, {
1811
1759
  label: n.consoleRevoke,
1812
1760
  variant: "outline-danger",
1813
1761
  onClick: async () => {
1814
- await e.platform.revokeKey(t.id, r.id), await b();
1762
+ await e.platform.revokeKey(t.id, r.id), await y();
1815
1763
  }
1816
1764
  })
1817
1765
  ]
1818
1766
  }, r.id)),
1819
- /* @__PURE__ */ k("div", { children: /* @__PURE__ */ k(y, {
1767
+ /* @__PURE__ */ A("div", { children: /* @__PURE__ */ A(x, {
1820
1768
  label: n.consoleNewKey,
1821
1769
  variant: "outline-secondary",
1822
1770
  onClick: async () => {
@@ -1829,14 +1777,14 @@ function de({ client: e, tenant: t, t: n, locale: r, onKey: i, onChange: a }) {
1829
1777
  "accounts",
1830
1778
  "act-as-user"
1831
1779
  ]
1832
- })).key), await b();
1780
+ })).key), await y();
1833
1781
  }
1834
1782
  }) }),
1835
- /* @__PURE__ */ k("h4", {
1783
+ /* @__PURE__ */ A("h4", {
1836
1784
  className: "text-sm font-semibold",
1837
1785
  children: n.consoleAccounts
1838
1786
  }),
1839
- /* @__PURE__ */ k(V, {
1787
+ /* @__PURE__ */ A(H, {
1840
1788
  client: v,
1841
1789
  scope: "tenant",
1842
1790
  locale: r,
@@ -1844,12 +1792,12 @@ function de({ client: e, tenant: t, t: n, locale: r, onKey: i, onChange: a }) {
1844
1792
  })
1845
1793
  ]
1846
1794
  }),
1847
- g && /* @__PURE__ */ k(x, {
1795
+ g && /* @__PURE__ */ A(C, {
1848
1796
  title: n.consoleRemoveTenant,
1849
1797
  danger: !0,
1850
1798
  onClose: () => _(!1),
1851
1799
  onYes: async () => (await e.platform.removeTenant(t.id), _(!1), await a(), !0),
1852
- children: I(n.consoleRemoveTenantConfirm, { name: t.name })
1800
+ children: L(n.consoleRemoveTenantConfirm, { name: t.name })
1853
1801
  })
1854
1802
  ]
1855
1803
  });
@@ -1868,22 +1816,22 @@ function fe({ client: e, t, approve: n, onAnswered: r }) {
1868
1816
  u();
1869
1817
  let e = setInterval(() => void u(), 5e3);
1870
1818
  return () => clearInterval(e);
1871
- }, [u]), !n && !i?.length && !o ? null : /* @__PURE__ */ k(h, {
1819
+ }, [u]), !n && !i?.length && !o ? null : /* @__PURE__ */ A(h, {
1872
1820
  title: t.consoleRequests,
1873
1821
  loading: i === null,
1874
1822
  loaderMinHeight: 80,
1875
- children: /* @__PURE__ */ A("div", {
1823
+ children: /* @__PURE__ */ j("div", {
1876
1824
  className: "flex flex-col gap-3",
1877
1825
  children: [
1878
- /* @__PURE__ */ k("p", {
1826
+ /* @__PURE__ */ A("p", {
1879
1827
  className: "text-sm text-muted-foreground",
1880
1828
  children: t.consoleRequestsHint
1881
1829
  }),
1882
- o && /* @__PURE__ */ k(p, {
1830
+ o && /* @__PURE__ */ A(p, {
1883
1831
  variant: o.variant,
1884
1832
  children: o.text
1885
1833
  }),
1886
- i?.length === 0 && !o && /* @__PURE__ */ k("p", {
1834
+ i?.length === 0 && !o && /* @__PURE__ */ A("p", {
1887
1835
  className: "text-sm text-muted-foreground",
1888
1836
  children: t.consoleRequestsEmpty
1889
1837
  }),
@@ -1892,42 +1840,42 @@ function fe({ client: e, t, approve: n, onAnswered: r }) {
1892
1840
  let a = await e.answerPairing(i.code, n);
1893
1841
  s(n ? {
1894
1842
  variant: "success",
1895
- text: I(t.consoleApproved, { name: a.name })
1843
+ text: L(t.consoleApproved, { name: a.name })
1896
1844
  } : {
1897
1845
  variant: "info",
1898
1846
  text: t.consoleDenied
1899
1847
  }), await u(), await r();
1900
1848
  };
1901
- return /* @__PURE__ */ A("div", {
1849
+ return /* @__PURE__ */ j("div", {
1902
1850
  className: `flex flex-col gap-2 rounded-md border p-3 ${a ? "border-primary" : "border-border"}`,
1903
1851
  children: [
1904
- a && /* @__PURE__ */ k(m, {
1852
+ a && /* @__PURE__ */ A(m, {
1905
1853
  variant: "primary",
1906
1854
  children: t.consoleRequestMatch
1907
1855
  }),
1908
- /* @__PURE__ */ k("div", {
1856
+ /* @__PURE__ */ A("div", {
1909
1857
  className: "font-mono text-2xl font-semibold tracking-widest",
1910
1858
  children: i.code
1911
1859
  }),
1912
- /* @__PURE__ */ k("p", {
1860
+ /* @__PURE__ */ A("p", {
1913
1861
  className: "text-sm",
1914
- children: I(t.consoleRequestFrom, {
1862
+ children: L(t.consoleRequestFrom, {
1915
1863
  name: i.name,
1916
1864
  from: i.from ?? "?",
1917
1865
  at: Q(i.createdAt)
1918
1866
  })
1919
1867
  }),
1920
- /* @__PURE__ */ k("p", {
1868
+ /* @__PURE__ */ A("p", {
1921
1869
  className: "text-sm text-muted-foreground",
1922
- children: i.project ? I(t.consoleRequestProject, { project: i.project }) : t.consoleRequestAll
1870
+ children: i.project ? L(t.consoleRequestProject, { project: i.project }) : t.consoleRequestAll
1923
1871
  }),
1924
- /* @__PURE__ */ A("div", {
1872
+ /* @__PURE__ */ j("div", {
1925
1873
  className: "flex flex-wrap gap-2",
1926
- children: [/* @__PURE__ */ k(y, {
1874
+ children: [/* @__PURE__ */ A(x, {
1927
1875
  label: t.consoleApprove,
1928
1876
  variant: "primary",
1929
1877
  onClick: () => o(!0)
1930
- }), /* @__PURE__ */ k(y, {
1878
+ }), /* @__PURE__ */ A(x, {
1931
1879
  label: t.consoleDeny,
1932
1880
  variant: "outline-danger",
1933
1881
  onClick: () => o(!1)
@@ -1940,6 +1888,6 @@ function fe({ client: e, t, approve: n, onAnswered: r }) {
1940
1888
  })
1941
1889
  });
1942
1890
  }
1943
- export { q as AddRunner, W as InstallGuide, V as RunnerAccounts, le as RunnerConsole, ie as RunnersSettings, I as fill, P as runnerTexts, F as textsFor };
1891
+ export { q as AddRunner, W as InstallGuide, H as RunnerAccounts, le as RunnerConsole, ie as RunnersSettings, L as fill, F as runnerTexts, I as textsFor };
1944
1892
 
1945
1893
  //# sourceMappingURL=ui.mjs.map