@termix-ssh/plugin-sdk 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/README.md +8 -1
  3. package/cli/commands/changelog.mjs +25 -0
  4. package/cli/commands/dev.mjs +158 -0
  5. package/cli/commands/validate.mjs +16 -24
  6. package/cli/index.mjs +8 -0
  7. package/cli/lib/tmxplug.mjs +1 -1
  8. package/dist/backend.d.ts +6 -2
  9. package/dist/changelog.d.ts +62 -0
  10. package/dist/changelog.js +187 -0
  11. package/dist/frontend.d.ts +67 -1
  12. package/dist/host/{chunk-F3SDZDDG.js → chunk-LKYAVM4T.js} +17 -2
  13. package/dist/host/{chunk-XH5NXL6Y.js → chunk-SS43S6VI.js} +7816 -7344
  14. package/dist/host/{chunk-XGWE7BTJ.js → chunk-XKMRKQFN.js} +6 -1
  15. package/dist/host/{linked-server-FZGWQW32.js → linked-server-DW5P3NLZ.js} +1 -1
  16. package/dist/host/{rbac-api-6KDMBVDZ.js → rbac-api-JKISXZEP.js} +1 -1
  17. package/dist/host/testing-host.js +38 -5
  18. package/dist/host/types/src/types/credential-sidebar-preferences.d.ts +12 -1
  19. package/dist/host/types/src/types/host-sidebar-preferences.d.ts +18 -1
  20. package/dist/host/types/src/types/onboarding.d.ts +29 -0
  21. package/dist/host/types/src/types/plugin-onboarding.d.ts +39 -0
  22. package/dist/host/types/src/types/ui-preferences.d.ts +13 -4
  23. package/dist/host/types/src/types/ui-types.d.ts +1 -1
  24. package/dist/host/types/src/ui/api/plugins-api.d.ts +211 -0
  25. package/dist/host/types/src/ui/api/system-status-api.d.ts +24 -0
  26. package/dist/host/types/src/ui/components/connection/ConnectionLogPanel.d.ts +2 -1
  27. package/dist/host/types/src/ui/components/connection/ConnectionScreen.d.ts +5 -5
  28. package/dist/host/types/src/ui/components/list-kit.d.ts +102 -0
  29. package/dist/host/types/src/ui/components/panel-layout.d.ts +6 -1
  30. package/dist/host/types/src/ui/components/surface/surface-scope.d.ts +5 -1
  31. package/dist/host/types/src/ui/contexts/UiPreferencesContext.d.ts +15 -2
  32. package/dist/host/types/src/ui/hooks/use-installed-plugins.d.ts +6 -0
  33. package/dist/host/types/src/ui/hooks/use-permissions.d.ts +2 -0
  34. package/dist/host/types/src/ui/lib/embedded-frame.d.ts +14 -0
  35. package/dist/host/types/src/ui/onboarding/onboarding-registry.d.ts +49 -0
  36. package/dist/host/types/src/ui/plugin-host/sdk-ui.d.ts +1 -0
  37. package/dist/host/types/src/ui/plugins/open-plugins.d.ts +5 -0
  38. package/dist/host/types/src/ui/settings/settings-fields-util.d.ts +10 -0
  39. package/dist/host/types/src/ui/sidebar/host-contributions.d.ts +2 -0
  40. package/dist/host/types/src/ui/sidebar/rail-items.d.ts +10 -0
  41. package/dist/host/ui.js +1097 -787
  42. package/dist/host/{use-permissions-NULZL43J.js → use-permissions-5CZEA3P4.js} +3 -1
  43. package/dist/manifest.d.ts +19 -2
  44. package/dist/manifest.js +82 -1
  45. package/dist/testing/setup.js +8 -0
  46. package/dist/testing.d.ts +12 -0
  47. package/dist/vitest-preset.d.ts +3 -0
  48. package/dist/vitest-preset.js +6 -0
  49. package/package.json +7 -3
  50. package/schema/manifest.schema.json +12 -1
  51. package/cli/lib/changelog.mjs +0 -126
  52. package/schema/changelog.schema.json +0 -67
package/dist/host/ui.js CHANGED
@@ -5,6 +5,7 @@ import {
5
5
  Anchor2,
6
6
  ArrowLeft,
7
7
  BackButton,
8
+ Button,
8
9
  Cancel,
9
10
  Check,
10
11
  Checkbox,
@@ -34,6 +35,7 @@ import {
34
35
  LoaderCircle,
35
36
  Overlay2,
36
37
  PANEL,
38
+ PLUGINS_CHANGED_EVENT,
37
39
  PROMPT_BUTTON,
38
40
  PROMPT_DESTRUCTIVE_BUTTON,
39
41
  PROMPT_PRIMARY_BUTTON,
@@ -95,15 +97,15 @@ import {
95
97
  ViewToggle,
96
98
  Viewport,
97
99
  X,
100
+ buttonVariants,
98
101
  challengeSecondFactor,
99
102
  changeAppLanguage,
100
- clsx,
101
103
  cn,
102
104
  createPluginApp,
105
+ cva,
103
106
  dist_exports,
104
107
  dist_exports2,
105
108
  dist_exports3,
106
- dist_exports4,
107
109
  getLoginMethods,
108
110
  getPlugins,
109
111
  getPollingEnvironmentMultiplier,
@@ -131,11 +133,12 @@ import {
131
133
  usePluginScope,
132
134
  useSecondFactors,
133
135
  useSettingsComponents,
136
+ useSurfaceClose,
134
137
  useSurfaceKind,
135
138
  useTheme,
136
139
  verifySecondFactor
137
- } from "./chunk-XH5NXL6Y.js";
138
- import "./chunk-XGWE7BTJ.js";
140
+ } from "./chunk-SS43S6VI.js";
141
+ import "./chunk-XKMRKQFN.js";
139
142
  import {
140
143
  TabProvider,
141
144
  buildOriginWsUrl,
@@ -151,6 +154,7 @@ import {
151
154
  getPasswordLoginAllowed,
152
155
  getPasswordResetAllowed,
153
156
  getPluginRecord,
157
+ getPluginStoreState,
154
158
  getRecentActivity,
155
159
  getRegistrationAllowed,
156
160
  getSSHHosts,
@@ -173,51 +177,9 @@ import {
173
177
  useTabs,
174
178
  useTabsSafe,
175
179
  verifyPasswordResetCode
176
- } from "./chunk-F3SDZDDG.js";
180
+ } from "./chunk-LKYAVM4T.js";
177
181
  import "./chunk-YC2MAKSP.js";
178
182
 
179
- // node_modules/class-variance-authority/dist/index.mjs
180
- var falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
181
- var cx = clsx;
182
- var cva = (base2, config2) => (props) => {
183
- var _config_compoundVariants;
184
- if ((config2 === null || config2 === void 0 ? void 0 : config2.variants) == null) return cx(base2, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
185
- const { variants, defaultVariants } = config2;
186
- const getVariantClassNames = Object.keys(variants).map((variant) => {
187
- const variantProp = props === null || props === void 0 ? void 0 : props[variant];
188
- const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
189
- if (variantProp === null) return null;
190
- const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
191
- return variants[variant][variantKey];
192
- });
193
- const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param) => {
194
- let [key, value] = param;
195
- if (value === void 0) {
196
- return acc;
197
- }
198
- acc[key] = value;
199
- return acc;
200
- }, {});
201
- const getCompoundVariantClassNames = config2 === null || config2 === void 0 ? void 0 : (_config_compoundVariants = config2.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param) => {
202
- let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;
203
- return Object.entries(compoundVariantOptions).every((param2) => {
204
- let [key, value] = param2;
205
- return Array.isArray(value) ? value.includes({
206
- ...defaultVariants,
207
- ...propsWithoutUndefined
208
- }[key]) : {
209
- ...defaultVariants,
210
- ...propsWithoutUndefined
211
- }[key] === value;
212
- }) ? [
213
- ...acc,
214
- cvClass,
215
- cvClassName
216
- ] : acc;
217
- }, []);
218
- return cx(base2, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
219
- };
220
-
221
183
  // src/ui/components/alert.tsx
222
184
  import { jsx } from "react/jsx-runtime";
223
185
  var alertVariants = cva(
@@ -279,79 +241,28 @@ function AlertDescription({
279
241
  );
280
242
  }
281
243
 
282
- // src/ui/components/button.tsx
283
- import { jsx as jsx2 } from "react/jsx-runtime";
284
- var buttonVariants = cva(
285
- "group/button inline-flex shrink-0 items-center justify-center rounded-none border border-transparent bg-clip-padding text-xs font-medium whitespace-nowrap transition-[color,background-color,border-color,opacity,box-shadow,transform] outline-none select-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
286
- {
287
- variants: {
288
- variant: {
289
- default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
290
- outline: "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
291
- secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
292
- ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
293
- destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
294
- link: "text-primary underline-offset-4 hover:underline"
295
- },
296
- size: {
297
- default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
298
- xs: "h-6 gap-1 rounded-none px-2 text-xs has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
299
- sm: "h-7 gap-1 rounded-none px-2.5 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
300
- lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
301
- icon: "size-8",
302
- "icon-xs": "size-6 rounded-none [&_svg:not([class*='size-'])]:size-3",
303
- "icon-sm": "size-7 rounded-none",
304
- "icon-lg": "size-9"
305
- }
306
- },
307
- defaultVariants: {
308
- variant: "default",
309
- size: "default"
310
- }
311
- }
312
- );
313
- function Button({
314
- className,
315
- variant = "default",
316
- size = "default",
317
- asChild = false,
318
- ...props
319
- }) {
320
- const Comp = asChild ? dist_exports.Root : "button";
321
- return /* @__PURE__ */ jsx2(
322
- Comp,
323
- {
324
- "data-slot": "button",
325
- "data-variant": variant,
326
- "data-size": size,
327
- className: cn(buttonVariants({ variant, size, className })),
328
- ...props
329
- }
330
- );
331
- }
332
-
333
244
  // src/ui/components/alert-dialog.tsx
334
- import { jsx as jsx3, jsxs } from "react/jsx-runtime";
245
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
335
246
  function AlertDialog({
336
247
  ...props
337
248
  }) {
338
- return /* @__PURE__ */ jsx3(Root2, { "data-slot": "alert-dialog", ...props });
249
+ return /* @__PURE__ */ jsx2(Root2, { "data-slot": "alert-dialog", ...props });
339
250
  }
340
251
  function AlertDialogTrigger({
341
252
  ...props
342
253
  }) {
343
- return /* @__PURE__ */ jsx3(Trigger2, { "data-slot": "alert-dialog-trigger", ...props });
254
+ return /* @__PURE__ */ jsx2(Trigger2, { "data-slot": "alert-dialog-trigger", ...props });
344
255
  }
345
256
  function AlertDialogPortal({
346
257
  ...props
347
258
  }) {
348
- return /* @__PURE__ */ jsx3(Portal2, { "data-slot": "alert-dialog-portal", ...props });
259
+ return /* @__PURE__ */ jsx2(Portal2, { "data-slot": "alert-dialog-portal", ...props });
349
260
  }
350
261
  function AlertDialogOverlay({
351
262
  className,
352
263
  ...props
353
264
  }) {
354
- return /* @__PURE__ */ jsx3(
265
+ return /* @__PURE__ */ jsx2(
355
266
  Overlay2,
356
267
  {
357
268
  "data-slot": "alert-dialog-overlay",
@@ -368,8 +279,8 @@ function AlertDialogContent({
368
279
  ...props
369
280
  }) {
370
281
  return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
371
- /* @__PURE__ */ jsx3(AlertDialogOverlay, {}),
372
- /* @__PURE__ */ jsx3(
282
+ /* @__PURE__ */ jsx2(AlertDialogOverlay, {}),
283
+ /* @__PURE__ */ jsx2(
373
284
  Content2,
374
285
  {
375
286
  "data-slot": "alert-dialog-content",
@@ -386,7 +297,7 @@ function AlertDialogHeader({
386
297
  className,
387
298
  ...props
388
299
  }) {
389
- return /* @__PURE__ */ jsx3(
300
+ return /* @__PURE__ */ jsx2(
390
301
  "div",
391
302
  {
392
303
  "data-slot": "alert-dialog-header",
@@ -399,7 +310,7 @@ function AlertDialogFooter({
399
310
  className,
400
311
  ...props
401
312
  }) {
402
- return /* @__PURE__ */ jsx3(
313
+ return /* @__PURE__ */ jsx2(
403
314
  "div",
404
315
  {
405
316
  "data-slot": "alert-dialog-footer",
@@ -415,7 +326,7 @@ function AlertDialogTitle({
415
326
  className,
416
327
  ...props
417
328
  }) {
418
- return /* @__PURE__ */ jsx3(
329
+ return /* @__PURE__ */ jsx2(
419
330
  Title2,
420
331
  {
421
332
  "data-slot": "alert-dialog-title",
@@ -428,7 +339,7 @@ function AlertDialogDescription({
428
339
  className,
429
340
  ...props
430
341
  }) {
431
- return /* @__PURE__ */ jsx3(
342
+ return /* @__PURE__ */ jsx2(
432
343
  Description2,
433
344
  {
434
345
  "data-slot": "alert-dialog-description",
@@ -441,7 +352,7 @@ function AlertDialogAction({
441
352
  className,
442
353
  ...props
443
354
  }) {
444
- return /* @__PURE__ */ jsx3(
355
+ return /* @__PURE__ */ jsx2(
445
356
  Action,
446
357
  {
447
358
  className: cn(buttonVariants(), className),
@@ -453,7 +364,7 @@ function AlertDialogCancel({
453
364
  className,
454
365
  ...props
455
366
  }) {
456
- return /* @__PURE__ */ jsx3(
367
+ return /* @__PURE__ */ jsx2(
457
368
  Cancel,
458
369
  {
459
370
  className: cn(buttonVariants({ variant: "outline" }), className),
@@ -463,7 +374,7 @@ function AlertDialogCancel({
463
374
  }
464
375
 
465
376
  // src/ui/components/badge.tsx
466
- import { jsx as jsx4 } from "react/jsx-runtime";
377
+ import { jsx as jsx3 } from "react/jsx-runtime";
467
378
  var badgeVariants = cva(
468
379
  "inline-flex items-center justify-center rounded-none border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
469
380
  {
@@ -487,7 +398,7 @@ function Badge({
487
398
  ...props
488
399
  }) {
489
400
  const Comp = asChild ? Slot : "span";
490
- return /* @__PURE__ */ jsx4(
401
+ return /* @__PURE__ */ jsx3(
491
402
  Comp,
492
403
  {
493
404
  "data-slot": "badge",
@@ -498,13 +409,13 @@ function Badge({
498
409
  }
499
410
 
500
411
  // src/ui/components/card.tsx
501
- import { jsx as jsx5 } from "react/jsx-runtime";
412
+ import { jsx as jsx4 } from "react/jsx-runtime";
502
413
  function Card({
503
414
  className,
504
415
  size = "default",
505
416
  ...props
506
417
  }) {
507
- return /* @__PURE__ */ jsx5(
418
+ return /* @__PURE__ */ jsx4(
508
419
  "div",
509
420
  {
510
421
  "data-slot": "card",
@@ -518,7 +429,7 @@ function Card({
518
429
  );
519
430
  }
520
431
  function CardHeader({ className, ...props }) {
521
- return /* @__PURE__ */ jsx5(
432
+ return /* @__PURE__ */ jsx4(
522
433
  "div",
523
434
  {
524
435
  "data-slot": "card-header",
@@ -531,7 +442,7 @@ function CardHeader({ className, ...props }) {
531
442
  );
532
443
  }
533
444
  function CardTitle({ className, ...props }) {
534
- return /* @__PURE__ */ jsx5(
445
+ return /* @__PURE__ */ jsx4(
535
446
  "div",
536
447
  {
537
448
  "data-slot": "card-title",
@@ -544,7 +455,7 @@ function CardTitle({ className, ...props }) {
544
455
  );
545
456
  }
546
457
  function CardDescription({ className, ...props }) {
547
- return /* @__PURE__ */ jsx5(
458
+ return /* @__PURE__ */ jsx4(
548
459
  "div",
549
460
  {
550
461
  "data-slot": "card-description",
@@ -554,7 +465,7 @@ function CardDescription({ className, ...props }) {
554
465
  );
555
466
  }
556
467
  function CardAction({ className, ...props }) {
557
- return /* @__PURE__ */ jsx5(
468
+ return /* @__PURE__ */ jsx4(
558
469
  "div",
559
470
  {
560
471
  "data-slot": "card-action",
@@ -567,7 +478,7 @@ function CardAction({ className, ...props }) {
567
478
  );
568
479
  }
569
480
  function CardContent({ className, ...props }) {
570
- return /* @__PURE__ */ jsx5(
481
+ return /* @__PURE__ */ jsx4(
571
482
  "div",
572
483
  {
573
484
  "data-slot": "card-content",
@@ -577,7 +488,7 @@ function CardContent({ className, ...props }) {
577
488
  );
578
489
  }
579
490
  function CardFooter({ className, ...props }) {
580
- return /* @__PURE__ */ jsx5(
491
+ return /* @__PURE__ */ jsx4(
581
492
  "div",
582
493
  {
583
494
  "data-slot": "card-footer",
@@ -591,12 +502,12 @@ function CardFooter({ className, ...props }) {
591
502
  }
592
503
 
593
504
  // src/ui/components/checkbox.tsx
594
- import { jsx as jsx6 } from "react/jsx-runtime";
505
+ import { jsx as jsx5 } from "react/jsx-runtime";
595
506
  function Checkbox2({
596
507
  className,
597
508
  ...props
598
509
  }) {
599
- return /* @__PURE__ */ jsx6(
510
+ return /* @__PURE__ */ jsx5(
600
511
  Checkbox,
601
512
  {
602
513
  "data-slot": "checkbox",
@@ -605,12 +516,12 @@ function Checkbox2({
605
516
  className
606
517
  ),
607
518
  ...props,
608
- children: /* @__PURE__ */ jsx6(
519
+ children: /* @__PURE__ */ jsx5(
609
520
  CheckboxIndicator,
610
521
  {
611
522
  "data-slot": "checkbox-indicator",
612
523
  className: "flex items-center justify-center text-current transition-none",
613
- children: /* @__PURE__ */ jsx6(Check, { className: "size-3.5" })
524
+ children: /* @__PURE__ */ jsx5(Check, { className: "size-3.5" })
614
525
  }
615
526
  )
616
527
  }
@@ -619,33 +530,33 @@ function Checkbox2({
619
530
 
620
531
  // src/ui/components/dialog.tsx
621
532
  import { useTranslation } from "react-i18next";
622
- import { jsx as jsx7, jsxs as jsxs2 } from "react/jsx-runtime";
533
+ import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
623
534
  function Dialog({
624
535
  ...props
625
536
  }) {
626
- return /* @__PURE__ */ jsx7(dist_exports2.Root, { "data-slot": "dialog", ...props });
537
+ return /* @__PURE__ */ jsx6(dist_exports.Root, { "data-slot": "dialog", ...props });
627
538
  }
628
539
  function DialogTrigger({
629
540
  ...props
630
541
  }) {
631
- return /* @__PURE__ */ jsx7(dist_exports2.Trigger, { "data-slot": "dialog-trigger", ...props });
542
+ return /* @__PURE__ */ jsx6(dist_exports.Trigger, { "data-slot": "dialog-trigger", ...props });
632
543
  }
633
544
  function DialogPortal({
634
545
  ...props
635
546
  }) {
636
- return /* @__PURE__ */ jsx7(dist_exports2.Portal, { "data-slot": "dialog-portal", ...props });
547
+ return /* @__PURE__ */ jsx6(dist_exports.Portal, { "data-slot": "dialog-portal", ...props });
637
548
  }
638
549
  function DialogClose({
639
550
  ...props
640
551
  }) {
641
- return /* @__PURE__ */ jsx7(dist_exports2.Close, { "data-slot": "dialog-close", ...props });
552
+ return /* @__PURE__ */ jsx6(dist_exports.Close, { "data-slot": "dialog-close", ...props });
642
553
  }
643
554
  function DialogOverlay({
644
555
  className,
645
556
  ...props
646
557
  }) {
647
- return /* @__PURE__ */ jsx7(
648
- dist_exports2.Overlay,
558
+ return /* @__PURE__ */ jsx6(
559
+ dist_exports.Overlay,
649
560
  {
650
561
  "data-slot": "dialog-overlay",
651
562
  className: cn(
@@ -664,9 +575,9 @@ function DialogContent({
664
575
  }) {
665
576
  const { t: t2 } = useTranslation();
666
577
  return /* @__PURE__ */ jsxs2(DialogPortal, { children: [
667
- /* @__PURE__ */ jsx7(DialogOverlay, {}),
578
+ /* @__PURE__ */ jsx6(DialogOverlay, {}),
668
579
  /* @__PURE__ */ jsxs2(
669
- dist_exports2.Content,
580
+ dist_exports.Content,
670
581
  {
671
582
  "data-slot": "dialog-content",
672
583
  className: cn(
@@ -676,15 +587,15 @@ function DialogContent({
676
587
  ...props,
677
588
  children: [
678
589
  children,
679
- showCloseButton && /* @__PURE__ */ jsx7(dist_exports2.Close, { "data-slot": "dialog-close", asChild: true, children: /* @__PURE__ */ jsxs2(
590
+ showCloseButton && /* @__PURE__ */ jsx6(dist_exports.Close, { "data-slot": "dialog-close", asChild: true, children: /* @__PURE__ */ jsxs2(
680
591
  Button,
681
592
  {
682
593
  variant: "ghost",
683
594
  className: "absolute top-2 right-2",
684
595
  size: "icon-sm",
685
596
  children: [
686
- /* @__PURE__ */ jsx7(X, {}),
687
- /* @__PURE__ */ jsx7("span", { className: "sr-only", children: t2("common.close") })
597
+ /* @__PURE__ */ jsx6(X, {}),
598
+ /* @__PURE__ */ jsx6("span", { className: "sr-only", children: t2("common.close") })
688
599
  ]
689
600
  }
690
601
  ) })
@@ -694,7 +605,7 @@ function DialogContent({
694
605
  ] });
695
606
  }
696
607
  function DialogHeader({ className, ...props }) {
697
- return /* @__PURE__ */ jsx7(
608
+ return /* @__PURE__ */ jsx6(
698
609
  "div",
699
610
  {
700
611
  "data-slot": "dialog-header",
@@ -721,7 +632,7 @@ function DialogFooter({
721
632
  ...props,
722
633
  children: [
723
634
  children,
724
- showCloseButton && /* @__PURE__ */ jsx7(dist_exports2.Close, { asChild: true, children: /* @__PURE__ */ jsx7(Button, { variant: "outline", children: t2("common.close") }) })
635
+ showCloseButton && /* @__PURE__ */ jsx6(dist_exports.Close, { asChild: true, children: /* @__PURE__ */ jsx6(Button, { variant: "outline", children: t2("common.close") }) })
725
636
  ]
726
637
  }
727
638
  );
@@ -730,8 +641,8 @@ function DialogTitle({
730
641
  className,
731
642
  ...props
732
643
  }) {
733
- return /* @__PURE__ */ jsx7(
734
- dist_exports2.Title,
644
+ return /* @__PURE__ */ jsx6(
645
+ dist_exports.Title,
735
646
  {
736
647
  "data-slot": "dialog-title",
737
648
  className: cn("font-heading text-sm font-medium", className),
@@ -743,8 +654,8 @@ function DialogDescription({
743
654
  className,
744
655
  ...props
745
656
  }) {
746
- return /* @__PURE__ */ jsx7(
747
- dist_exports2.Description,
657
+ return /* @__PURE__ */ jsx6(
658
+ dist_exports.Description,
748
659
  {
749
660
  "data-slot": "dialog-description",
750
661
  className: cn(
@@ -757,22 +668,22 @@ function DialogDescription({
757
668
  }
758
669
 
759
670
  // src/ui/components/dropdown-menu.tsx
760
- import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
671
+ import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
761
672
  function DropdownMenu({
762
673
  ...props
763
674
  }) {
764
- return /* @__PURE__ */ jsx8(dist_exports3.Root, { "data-slot": "dropdown-menu", ...props });
675
+ return /* @__PURE__ */ jsx7(dist_exports2.Root, { "data-slot": "dropdown-menu", ...props });
765
676
  }
766
677
  function DropdownMenuPortal({
767
678
  ...props
768
679
  }) {
769
- return /* @__PURE__ */ jsx8(dist_exports3.Portal, { "data-slot": "dropdown-menu-portal", ...props });
680
+ return /* @__PURE__ */ jsx7(dist_exports2.Portal, { "data-slot": "dropdown-menu-portal", ...props });
770
681
  }
771
682
  function DropdownMenuTrigger({
772
683
  ...props
773
684
  }) {
774
- return /* @__PURE__ */ jsx8(
775
- dist_exports3.Trigger,
685
+ return /* @__PURE__ */ jsx7(
686
+ dist_exports2.Trigger,
776
687
  {
777
688
  "data-slot": "dropdown-menu-trigger",
778
689
  ...props
@@ -785,8 +696,8 @@ function DropdownMenuContent({
785
696
  sideOffset = 4,
786
697
  ...props
787
698
  }) {
788
- return /* @__PURE__ */ jsx8(dist_exports3.Portal, { children: /* @__PURE__ */ jsx8(
789
- dist_exports3.Content,
699
+ return /* @__PURE__ */ jsx7(dist_exports2.Portal, { children: /* @__PURE__ */ jsx7(
700
+ dist_exports2.Content,
790
701
  {
791
702
  "data-slot": "dropdown-menu-content",
792
703
  sideOffset,
@@ -802,7 +713,7 @@ function DropdownMenuContent({
802
713
  function DropdownMenuGroup({
803
714
  ...props
804
715
  }) {
805
- return /* @__PURE__ */ jsx8(dist_exports3.Group, { "data-slot": "dropdown-menu-group", ...props });
716
+ return /* @__PURE__ */ jsx7(dist_exports2.Group, { "data-slot": "dropdown-menu-group", ...props });
806
717
  }
807
718
  function DropdownMenuItem({
808
719
  className,
@@ -810,8 +721,8 @@ function DropdownMenuItem({
810
721
  variant = "default",
811
722
  ...props
812
723
  }) {
813
- return /* @__PURE__ */ jsx8(
814
- dist_exports3.Item,
724
+ return /* @__PURE__ */ jsx7(
725
+ dist_exports2.Item,
815
726
  {
816
727
  "data-slot": "dropdown-menu-item",
817
728
  "data-inset": inset,
@@ -832,7 +743,7 @@ function DropdownMenuCheckboxItem({
832
743
  ...props
833
744
  }) {
834
745
  return /* @__PURE__ */ jsxs3(
835
- dist_exports3.CheckboxItem,
746
+ dist_exports2.CheckboxItem,
836
747
  {
837
748
  "data-slot": "dropdown-menu-checkbox-item",
838
749
  "data-inset": inset,
@@ -843,12 +754,12 @@ function DropdownMenuCheckboxItem({
843
754
  checked,
844
755
  ...props,
845
756
  children: [
846
- /* @__PURE__ */ jsx8(
757
+ /* @__PURE__ */ jsx7(
847
758
  "span",
848
759
  {
849
760
  className: "pointer-events-none absolute right-2 flex items-center justify-center",
850
761
  "data-slot": "dropdown-menu-checkbox-item-indicator",
851
- children: /* @__PURE__ */ jsx8(dist_exports3.ItemIndicator, { children: /* @__PURE__ */ jsx8(Check, {}) })
762
+ children: /* @__PURE__ */ jsx7(dist_exports2.ItemIndicator, { children: /* @__PURE__ */ jsx7(Check, {}) })
852
763
  }
853
764
  ),
854
765
  children
@@ -859,8 +770,8 @@ function DropdownMenuCheckboxItem({
859
770
  function DropdownMenuRadioGroup({
860
771
  ...props
861
772
  }) {
862
- return /* @__PURE__ */ jsx8(
863
- dist_exports3.RadioGroup,
773
+ return /* @__PURE__ */ jsx7(
774
+ dist_exports2.RadioGroup,
864
775
  {
865
776
  "data-slot": "dropdown-menu-radio-group",
866
777
  ...props
@@ -874,7 +785,7 @@ function DropdownMenuRadioItem({
874
785
  ...props
875
786
  }) {
876
787
  return /* @__PURE__ */ jsxs3(
877
- dist_exports3.RadioItem,
788
+ dist_exports2.RadioItem,
878
789
  {
879
790
  "data-slot": "dropdown-menu-radio-item",
880
791
  "data-inset": inset,
@@ -884,12 +795,12 @@ function DropdownMenuRadioItem({
884
795
  ),
885
796
  ...props,
886
797
  children: [
887
- /* @__PURE__ */ jsx8(
798
+ /* @__PURE__ */ jsx7(
888
799
  "span",
889
800
  {
890
801
  className: "pointer-events-none absolute right-2 flex items-center justify-center",
891
802
  "data-slot": "dropdown-menu-radio-item-indicator",
892
- children: /* @__PURE__ */ jsx8(dist_exports3.ItemIndicator, { children: /* @__PURE__ */ jsx8(Check, {}) })
803
+ children: /* @__PURE__ */ jsx7(dist_exports2.ItemIndicator, { children: /* @__PURE__ */ jsx7(Check, {}) })
893
804
  }
894
805
  ),
895
806
  children
@@ -902,8 +813,8 @@ function DropdownMenuLabel({
902
813
  inset,
903
814
  ...props
904
815
  }) {
905
- return /* @__PURE__ */ jsx8(
906
- dist_exports3.Label,
816
+ return /* @__PURE__ */ jsx7(
817
+ dist_exports2.Label,
907
818
  {
908
819
  "data-slot": "dropdown-menu-label",
909
820
  "data-inset": inset,
@@ -919,8 +830,8 @@ function DropdownMenuSeparator({
919
830
  className,
920
831
  ...props
921
832
  }) {
922
- return /* @__PURE__ */ jsx8(
923
- dist_exports3.Separator,
833
+ return /* @__PURE__ */ jsx7(
834
+ dist_exports2.Separator,
924
835
  {
925
836
  "data-slot": "dropdown-menu-separator",
926
837
  className: cn("-mx-1 h-px bg-border", className),
@@ -932,7 +843,7 @@ function DropdownMenuShortcut({
932
843
  className,
933
844
  ...props
934
845
  }) {
935
- return /* @__PURE__ */ jsx8(
846
+ return /* @__PURE__ */ jsx7(
936
847
  "span",
937
848
  {
938
849
  "data-slot": "dropdown-menu-shortcut",
@@ -947,7 +858,7 @@ function DropdownMenuShortcut({
947
858
  function DropdownMenuSub({
948
859
  ...props
949
860
  }) {
950
- return /* @__PURE__ */ jsx8(dist_exports3.Sub, { "data-slot": "dropdown-menu-sub", ...props });
861
+ return /* @__PURE__ */ jsx7(dist_exports2.Sub, { "data-slot": "dropdown-menu-sub", ...props });
951
862
  }
952
863
  function DropdownMenuSubTrigger({
953
864
  className,
@@ -956,7 +867,7 @@ function DropdownMenuSubTrigger({
956
867
  ...props
957
868
  }) {
958
869
  return /* @__PURE__ */ jsxs3(
959
- dist_exports3.SubTrigger,
870
+ dist_exports2.SubTrigger,
960
871
  {
961
872
  "data-slot": "dropdown-menu-sub-trigger",
962
873
  "data-inset": inset,
@@ -967,7 +878,7 @@ function DropdownMenuSubTrigger({
967
878
  ...props,
968
879
  children: [
969
880
  children,
970
- /* @__PURE__ */ jsx8(ChevronRight, { className: "ml-auto" })
881
+ /* @__PURE__ */ jsx7(ChevronRight, { className: "ml-auto" })
971
882
  ]
972
883
  }
973
884
  );
@@ -978,8 +889,8 @@ function DropdownMenuSubContent({
978
889
  alignOffset = -4,
979
890
  ...props
980
891
  }) {
981
- return /* @__PURE__ */ jsx8(
982
- dist_exports3.SubContent,
892
+ return /* @__PURE__ */ jsx7(
893
+ dist_exports2.SubContent,
983
894
  {
984
895
  "data-slot": "dropdown-menu-sub-content",
985
896
  sideOffset,
@@ -994,9 +905,9 @@ function DropdownMenuSubContent({
994
905
  }
995
906
 
996
907
  // src/ui/components/input.tsx
997
- import { jsx as jsx9 } from "react/jsx-runtime";
908
+ import { jsx as jsx8 } from "react/jsx-runtime";
998
909
  function Input({ className, type, ...props }) {
999
- return /* @__PURE__ */ jsx9(
910
+ return /* @__PURE__ */ jsx8(
1000
911
  "input",
1001
912
  {
1002
913
  type,
@@ -1012,12 +923,12 @@ function Input({ className, type, ...props }) {
1012
923
  }
1013
924
 
1014
925
  // src/ui/components/label.tsx
1015
- import { jsx as jsx10 } from "react/jsx-runtime";
926
+ import { jsx as jsx9 } from "react/jsx-runtime";
1016
927
  function Label({
1017
928
  className,
1018
929
  ...props
1019
930
  }) {
1020
- return /* @__PURE__ */ jsx10(
931
+ return /* @__PURE__ */ jsx9(
1021
932
  Root,
1022
933
  {
1023
934
  "data-slot": "label",
@@ -1032,11 +943,11 @@ function Label({
1032
943
 
1033
944
  // src/ui/components/password-input.tsx
1034
945
  import * as React from "react";
1035
- import { jsx as jsx11, jsxs as jsxs4 } from "react/jsx-runtime";
946
+ import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
1036
947
  var PasswordInput = React.forwardRef(({ className, ...props }, ref) => {
1037
948
  const [showPassword, setShowPassword] = React.useState(false);
1038
949
  return /* @__PURE__ */ jsxs4("div", { className: "relative w-full", children: [
1039
- /* @__PURE__ */ jsx11(
950
+ /* @__PURE__ */ jsx10(
1040
951
  Input,
1041
952
  {
1042
953
  ref,
@@ -1045,14 +956,14 @@ var PasswordInput = React.forwardRef(({ className, ...props }, ref) => {
1045
956
  ...props
1046
957
  }
1047
958
  ),
1048
- /* @__PURE__ */ jsx11(
959
+ /* @__PURE__ */ jsx10(
1049
960
  "button",
1050
961
  {
1051
962
  type: "button",
1052
963
  onClick: () => setShowPassword((prev) => !prev),
1053
964
  className: "absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition",
1054
965
  "aria-label": showPassword ? "Hide password" : "Show password",
1055
- children: showPassword ? /* @__PURE__ */ jsx11(EyeOff, { className: "h-5 w-5" }) : /* @__PURE__ */ jsx11(Eye, { className: "h-5 w-5" })
966
+ children: showPassword ? /* @__PURE__ */ jsx10(EyeOff, { className: "h-5 w-5" }) : /* @__PURE__ */ jsx10(Eye, { className: "h-5 w-5" })
1056
967
  }
1057
968
  )
1058
969
  ] });
@@ -1060,16 +971,16 @@ var PasswordInput = React.forwardRef(({ className, ...props }, ref) => {
1060
971
  PasswordInput.displayName = "PasswordInput";
1061
972
 
1062
973
  // src/ui/components/popover.tsx
1063
- import { jsx as jsx12 } from "react/jsx-runtime";
974
+ import { jsx as jsx11 } from "react/jsx-runtime";
1064
975
  function Popover({
1065
976
  ...props
1066
977
  }) {
1067
- return /* @__PURE__ */ jsx12(Root22, { "data-slot": "popover", ...props });
978
+ return /* @__PURE__ */ jsx11(Root22, { "data-slot": "popover", ...props });
1068
979
  }
1069
980
  function PopoverTrigger({
1070
981
  ...props
1071
982
  }) {
1072
- return /* @__PURE__ */ jsx12(Trigger, { "data-slot": "popover-trigger", ...props });
983
+ return /* @__PURE__ */ jsx11(Trigger, { "data-slot": "popover-trigger", ...props });
1073
984
  }
1074
985
  function PopoverContent({
1075
986
  className,
@@ -1077,7 +988,7 @@ function PopoverContent({
1077
988
  sideOffset = 4,
1078
989
  ...props
1079
990
  }) {
1080
- return /* @__PURE__ */ jsx12(Portal, { children: /* @__PURE__ */ jsx12(
991
+ return /* @__PURE__ */ jsx11(Portal, { children: /* @__PURE__ */ jsx11(
1081
992
  Content22,
1082
993
  {
1083
994
  "data-slot": "popover-content",
@@ -1094,11 +1005,11 @@ function PopoverContent({
1094
1005
  function PopoverAnchor({
1095
1006
  ...props
1096
1007
  }) {
1097
- return /* @__PURE__ */ jsx12(Anchor2, { "data-slot": "popover-anchor", ...props });
1008
+ return /* @__PURE__ */ jsx11(Anchor2, { "data-slot": "popover-anchor", ...props });
1098
1009
  }
1099
1010
 
1100
1011
  // src/ui/components/scroll-area.tsx
1101
- import { jsx as jsx13, jsxs as jsxs5 } from "react/jsx-runtime";
1012
+ import { jsx as jsx12, jsxs as jsxs5 } from "react/jsx-runtime";
1102
1013
  function ScrollArea({
1103
1014
  className,
1104
1015
  children,
@@ -1111,7 +1022,7 @@ function ScrollArea({
1111
1022
  className: cn("relative", className),
1112
1023
  ...props,
1113
1024
  children: [
1114
- /* @__PURE__ */ jsx13(
1025
+ /* @__PURE__ */ jsx12(
1115
1026
  Viewport,
1116
1027
  {
1117
1028
  "data-slot": "scroll-area-viewport",
@@ -1119,8 +1030,8 @@ function ScrollArea({
1119
1030
  children
1120
1031
  }
1121
1032
  ),
1122
- /* @__PURE__ */ jsx13(ScrollBar, {}),
1123
- /* @__PURE__ */ jsx13(Corner, {})
1033
+ /* @__PURE__ */ jsx12(ScrollBar, {}),
1034
+ /* @__PURE__ */ jsx12(Corner, {})
1124
1035
  ]
1125
1036
  }
1126
1037
  );
@@ -1130,7 +1041,7 @@ function ScrollBar({
1130
1041
  orientation = "vertical",
1131
1042
  ...props
1132
1043
  }) {
1133
- return /* @__PURE__ */ jsx13(
1044
+ return /* @__PURE__ */ jsx12(
1134
1045
  ScrollAreaScrollbar,
1135
1046
  {
1136
1047
  "data-slot": "scroll-area-scrollbar",
@@ -1142,7 +1053,7 @@ function ScrollBar({
1142
1053
  className
1143
1054
  ),
1144
1055
  ...props,
1145
- children: /* @__PURE__ */ jsx13(
1056
+ children: /* @__PURE__ */ jsx12(
1146
1057
  ScrollAreaThumb,
1147
1058
  {
1148
1059
  "data-slot": "scroll-area-thumb",
@@ -1154,21 +1065,21 @@ function ScrollBar({
1154
1065
  }
1155
1066
 
1156
1067
  // src/ui/components/select.tsx
1157
- import { jsx as jsx14, jsxs as jsxs6 } from "react/jsx-runtime";
1068
+ import { jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
1158
1069
  function Select2({
1159
1070
  ...props
1160
1071
  }) {
1161
- return /* @__PURE__ */ jsx14(Select, { "data-slot": "select", ...props });
1072
+ return /* @__PURE__ */ jsx13(Select, { "data-slot": "select", ...props });
1162
1073
  }
1163
1074
  function SelectGroup2({
1164
1075
  ...props
1165
1076
  }) {
1166
- return /* @__PURE__ */ jsx14(SelectGroup, { "data-slot": "select-group", ...props });
1077
+ return /* @__PURE__ */ jsx13(SelectGroup, { "data-slot": "select-group", ...props });
1167
1078
  }
1168
1079
  function SelectValue2({
1169
1080
  ...props
1170
1081
  }) {
1171
- return /* @__PURE__ */ jsx14(SelectValue, { "data-slot": "select-value", ...props });
1082
+ return /* @__PURE__ */ jsx13(SelectValue, { "data-slot": "select-value", ...props });
1172
1083
  }
1173
1084
  function SelectTrigger2({
1174
1085
  className,
@@ -1188,7 +1099,7 @@ function SelectTrigger2({
1188
1099
  ...props,
1189
1100
  children: [
1190
1101
  children,
1191
- /* @__PURE__ */ jsx14(SelectIcon, { asChild: true, children: /* @__PURE__ */ jsx14(ChevronDown, { className: "size-4 opacity-50" }) })
1102
+ /* @__PURE__ */ jsx13(SelectIcon, { asChild: true, children: /* @__PURE__ */ jsx13(ChevronDown, { className: "size-4 opacity-50" }) })
1192
1103
  ]
1193
1104
  }
1194
1105
  );
@@ -1199,7 +1110,7 @@ function SelectContent2({
1199
1110
  position = "popper",
1200
1111
  ...props
1201
1112
  }) {
1202
- return /* @__PURE__ */ jsx14(SelectPortal, { children: /* @__PURE__ */ jsxs6(
1113
+ return /* @__PURE__ */ jsx13(SelectPortal, { children: /* @__PURE__ */ jsxs6(
1203
1114
  SelectContent,
1204
1115
  {
1205
1116
  "data-slot": "select-content",
@@ -1211,8 +1122,8 @@ function SelectContent2({
1211
1122
  position,
1212
1123
  ...props,
1213
1124
  children: [
1214
- /* @__PURE__ */ jsx14(SelectScrollUpButton2, {}),
1215
- /* @__PURE__ */ jsx14(
1125
+ /* @__PURE__ */ jsx13(SelectScrollUpButton2, {}),
1126
+ /* @__PURE__ */ jsx13(
1216
1127
  SelectViewport,
1217
1128
  {
1218
1129
  className: cn(
@@ -1222,7 +1133,7 @@ function SelectContent2({
1222
1133
  children
1223
1134
  }
1224
1135
  ),
1225
- /* @__PURE__ */ jsx14(SelectScrollDownButton2, {})
1136
+ /* @__PURE__ */ jsx13(SelectScrollDownButton2, {})
1226
1137
  ]
1227
1138
  }
1228
1139
  ) });
@@ -1231,7 +1142,7 @@ function SelectLabel2({
1231
1142
  className,
1232
1143
  ...props
1233
1144
  }) {
1234
- return /* @__PURE__ */ jsx14(
1145
+ return /* @__PURE__ */ jsx13(
1235
1146
  SelectLabel,
1236
1147
  {
1237
1148
  "data-slot": "select-label",
@@ -1255,8 +1166,8 @@ function SelectItem2({
1255
1166
  ),
1256
1167
  ...props,
1257
1168
  children: [
1258
- /* @__PURE__ */ jsx14("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx14(SelectItemIndicator, { children: /* @__PURE__ */ jsx14(Check, { className: "size-4" }) }) }),
1259
- /* @__PURE__ */ jsx14(SelectItemText, { children })
1169
+ /* @__PURE__ */ jsx13("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx13(SelectItemIndicator, { children: /* @__PURE__ */ jsx13(Check, { className: "size-4" }) }) }),
1170
+ /* @__PURE__ */ jsx13(SelectItemText, { children })
1260
1171
  ]
1261
1172
  }
1262
1173
  );
@@ -1265,7 +1176,7 @@ function SelectSeparator2({
1265
1176
  className,
1266
1177
  ...props
1267
1178
  }) {
1268
- return /* @__PURE__ */ jsx14(
1179
+ return /* @__PURE__ */ jsx13(
1269
1180
  SelectSeparator,
1270
1181
  {
1271
1182
  "data-slot": "select-separator",
@@ -1278,7 +1189,7 @@ function SelectScrollUpButton2({
1278
1189
  className,
1279
1190
  ...props
1280
1191
  }) {
1281
- return /* @__PURE__ */ jsx14(
1192
+ return /* @__PURE__ */ jsx13(
1282
1193
  SelectScrollUpButton,
1283
1194
  {
1284
1195
  "data-slot": "select-scroll-up-button",
@@ -1287,7 +1198,7 @@ function SelectScrollUpButton2({
1287
1198
  className
1288
1199
  ),
1289
1200
  ...props,
1290
- children: /* @__PURE__ */ jsx14(ChevronUp, { className: "size-4" })
1201
+ children: /* @__PURE__ */ jsx13(ChevronUp, { className: "size-4" })
1291
1202
  }
1292
1203
  );
1293
1204
  }
@@ -1295,7 +1206,7 @@ function SelectScrollDownButton2({
1295
1206
  className,
1296
1207
  ...props
1297
1208
  }) {
1298
- return /* @__PURE__ */ jsx14(
1209
+ return /* @__PURE__ */ jsx13(
1299
1210
  SelectScrollDownButton,
1300
1211
  {
1301
1212
  "data-slot": "select-scroll-down-button",
@@ -1304,7 +1215,7 @@ function SelectScrollDownButton2({
1304
1215
  className
1305
1216
  ),
1306
1217
  ...props,
1307
- children: /* @__PURE__ */ jsx14(ChevronDown, { className: "size-4" })
1218
+ children: /* @__PURE__ */ jsx13(ChevronDown, { className: "size-4" })
1308
1219
  }
1309
1220
  );
1310
1221
  }
@@ -1312,7 +1223,7 @@ function SelectScrollDownButton2({
1312
1223
  // src/ui/components/select2.tsx
1313
1224
  import { useTranslation as useTranslation2 } from "react-i18next";
1314
1225
  import * as React2 from "react";
1315
- import { jsx as jsx15, jsxs as jsxs7 } from "react/jsx-runtime";
1226
+ import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
1316
1227
  function getText(children) {
1317
1228
  return React2.Children.toArray(children).map((child) => {
1318
1229
  if (typeof child === "string" || typeof child === "number") {
@@ -1392,7 +1303,7 @@ function Select22({
1392
1303
  if (!open) setQuery("");
1393
1304
  }, [open]);
1394
1305
  return /* @__PURE__ */ jsxs7(Popover, { open, onOpenChange: setOpen, children: [
1395
- /* @__PURE__ */ jsx15(
1306
+ /* @__PURE__ */ jsx14(
1396
1307
  "select",
1397
1308
  {
1398
1309
  name: name2,
@@ -1406,7 +1317,7 @@ function Select22({
1406
1317
  children
1407
1318
  }
1408
1319
  ),
1409
- /* @__PURE__ */ jsx15(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs7(
1320
+ /* @__PURE__ */ jsx14(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs7(
1410
1321
  "button",
1411
1322
  {
1412
1323
  type: "button",
@@ -1418,7 +1329,7 @@ function Select22({
1418
1329
  "aria-expanded": open,
1419
1330
  "aria-required": required,
1420
1331
  className: cn(
1421
- "border-input bg-background text-foreground flex h-9 w-full items-center justify-between gap-2 rounded-none border px-3 py-2 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
1332
+ "border-input bg-transparent dark:bg-input/30 dark:hover:bg-input/50 text-foreground flex h-9 w-full items-center justify-between gap-2 rounded-none border px-3 py-2 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
1422
1333
  className
1423
1334
  ),
1424
1335
  onKeyDown: (event) => {
@@ -1429,7 +1340,7 @@ function Select22({
1429
1340
  },
1430
1341
  ...props,
1431
1342
  children: [
1432
- /* @__PURE__ */ jsx15(
1343
+ /* @__PURE__ */ jsx14(
1433
1344
  "span",
1434
1345
  {
1435
1346
  className: cn(
@@ -1439,7 +1350,7 @@ function Select22({
1439
1350
  children: selected?.label || placeholder2 || "Select an option"
1440
1351
  }
1441
1352
  ),
1442
- /* @__PURE__ */ jsx15(ChevronDown, { className: "size-4 shrink-0 text-muted-foreground opacity-70" })
1353
+ /* @__PURE__ */ jsx14(ChevronDown, { className: "size-4 shrink-0 text-muted-foreground opacity-70" })
1443
1354
  ]
1444
1355
  }
1445
1356
  ) }),
@@ -1453,8 +1364,8 @@ function Select22({
1453
1364
  ),
1454
1365
  children: [
1455
1366
  /* @__PURE__ */ jsxs7("div", { className: "flex items-center border-b border-border px-2", children: [
1456
- /* @__PURE__ */ jsx15(Search, { className: "mr-2 size-4 shrink-0 text-muted-foreground" }),
1457
- /* @__PURE__ */ jsx15(
1367
+ /* @__PURE__ */ jsx14(Search, { className: "mr-2 size-4 shrink-0 text-muted-foreground" }),
1368
+ /* @__PURE__ */ jsx14(
1458
1369
  "input",
1459
1370
  {
1460
1371
  value: query,
@@ -1465,16 +1376,16 @@ function Select22({
1465
1376
  }
1466
1377
  )
1467
1378
  ] }),
1468
- /* @__PURE__ */ jsx15(
1379
+ /* @__PURE__ */ jsx14(
1469
1380
  "div",
1470
1381
  {
1471
1382
  role: "listbox",
1472
1383
  className: "max-h-64 overflow-y-auto p-1 thin-scrollbar",
1473
- children: filteredOptions.length === 0 ? /* @__PURE__ */ jsx15("div", { className: "px-2 py-6 text-center text-sm text-muted-foreground", children: t2("common.noResults") }) : filteredOptions.map((option, index) => {
1384
+ children: filteredOptions.length === 0 ? /* @__PURE__ */ jsx14("div", { className: "px-2 py-6 text-center text-sm text-muted-foreground", children: t2("common.noResults") }) : filteredOptions.map((option, index) => {
1474
1385
  const showGroup = option.group && filteredOptions.slice(0, index).every((previous) => previous.group !== option.group);
1475
1386
  const isSelected = option.value === currentValue;
1476
1387
  return /* @__PURE__ */ jsxs7(React2.Fragment, { children: [
1477
- showGroup && /* @__PURE__ */ jsx15("div", { className: "px-2 py-1.5 text-xs font-medium text-muted-foreground", children: option.group }),
1388
+ showGroup && /* @__PURE__ */ jsx14("div", { className: "px-2 py-1.5 text-xs font-medium text-muted-foreground", children: option.group }),
1478
1389
  /* @__PURE__ */ jsxs7(
1479
1390
  "button",
1480
1391
  {
@@ -1488,8 +1399,8 @@ function Select22({
1488
1399
  ),
1489
1400
  onClick: () => selectValue(option.value),
1490
1401
  children: [
1491
- /* @__PURE__ */ jsx15("span", { className: "min-w-0 flex-1 truncate", children: option.label }),
1492
- isSelected && /* @__PURE__ */ jsx15(Check, { className: "size-4 shrink-0" })
1402
+ /* @__PURE__ */ jsx14("span", { className: "min-w-0 flex-1 truncate", children: option.label }),
1403
+ isSelected && /* @__PURE__ */ jsx14(Check, { className: "size-4 shrink-0" })
1493
1404
  ]
1494
1405
  }
1495
1406
  )
@@ -1504,9 +1415,9 @@ function Select22({
1504
1415
  }
1505
1416
 
1506
1417
  // src/ui/components/skeleton.tsx
1507
- import { jsx as jsx16 } from "react/jsx-runtime";
1418
+ import { jsx as jsx15 } from "react/jsx-runtime";
1508
1419
  function Skeleton({ className, ...props }) {
1509
- return /* @__PURE__ */ jsx16(
1420
+ return /* @__PURE__ */ jsx15(
1510
1421
  "div",
1511
1422
  {
1512
1423
  "data-slot": "skeleton",
@@ -1518,7 +1429,7 @@ function Skeleton({ className, ...props }) {
1518
1429
 
1519
1430
  // src/ui/components/slider.tsx
1520
1431
  import * as React3 from "react";
1521
- import { jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
1432
+ import { jsx as jsx16, jsxs as jsxs8 } from "react/jsx-runtime";
1522
1433
  function Slider2({
1523
1434
  className,
1524
1435
  defaultValue,
@@ -1545,14 +1456,14 @@ function Slider2({
1545
1456
  ),
1546
1457
  ...props,
1547
1458
  children: [
1548
- /* @__PURE__ */ jsx17(
1459
+ /* @__PURE__ */ jsx16(
1549
1460
  SliderTrack,
1550
1461
  {
1551
1462
  "data-slot": "slider-track",
1552
1463
  className: cn(
1553
1464
  "bg-input relative grow overflow-hidden rounded-none data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
1554
1465
  ),
1555
- children: /* @__PURE__ */ jsx17(
1466
+ children: /* @__PURE__ */ jsx16(
1556
1467
  SliderRange,
1557
1468
  {
1558
1469
  "data-slot": "slider-range",
@@ -1564,7 +1475,7 @@ function Slider2({
1564
1475
  )
1565
1476
  }
1566
1477
  ),
1567
- Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ jsx17(
1478
+ Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ jsx16(
1568
1479
  SliderThumb,
1569
1480
  {
1570
1481
  "data-slot": "slider-thumb",
@@ -1579,12 +1490,12 @@ function Slider2({
1579
1490
  }
1580
1491
 
1581
1492
  // src/ui/components/switch.tsx
1582
- import { jsx as jsx18 } from "react/jsx-runtime";
1493
+ import { jsx as jsx17 } from "react/jsx-runtime";
1583
1494
  function Switch2({
1584
1495
  className,
1585
1496
  ...props
1586
1497
  }) {
1587
- return /* @__PURE__ */ jsx18(
1498
+ return /* @__PURE__ */ jsx17(
1588
1499
  Switch,
1589
1500
  {
1590
1501
  "data-slot": "switch",
@@ -1593,7 +1504,7 @@ function Switch2({
1593
1504
  className
1594
1505
  ),
1595
1506
  ...props,
1596
- children: /* @__PURE__ */ jsx18(
1507
+ children: /* @__PURE__ */ jsx17(
1597
1508
  SwitchThumb,
1598
1509
  {
1599
1510
  "data-slot": "switch-thumb",
@@ -1608,10 +1519,10 @@ function Switch2({
1608
1519
 
1609
1520
  // src/ui/components/textarea.tsx
1610
1521
  import * as React4 from "react";
1611
- import { jsx as jsx19 } from "react/jsx-runtime";
1522
+ import { jsx as jsx18 } from "react/jsx-runtime";
1612
1523
  var Textarea = React4.forwardRef(
1613
1524
  ({ className, ...props }, ref) => {
1614
- return /* @__PURE__ */ jsx19(
1525
+ return /* @__PURE__ */ jsx18(
1615
1526
  "textarea",
1616
1527
  {
1617
1528
  className: cn(
@@ -1627,13 +1538,13 @@ var Textarea = React4.forwardRef(
1627
1538
  Textarea.displayName = "Textarea";
1628
1539
 
1629
1540
  // src/ui/components/tooltip.tsx
1630
- import { jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
1541
+ import { jsx as jsx19, jsxs as jsxs9 } from "react/jsx-runtime";
1631
1542
  function TooltipProvider({
1632
1543
  delayDuration = 0,
1633
1544
  ...props
1634
1545
  }) {
1635
- return /* @__PURE__ */ jsx20(
1636
- dist_exports4.Provider,
1546
+ return /* @__PURE__ */ jsx19(
1547
+ dist_exports3.Provider,
1637
1548
  {
1638
1549
  "data-slot": "tooltip-provider",
1639
1550
  delayDuration,
@@ -1644,12 +1555,12 @@ function TooltipProvider({
1644
1555
  function Tooltip({
1645
1556
  ...props
1646
1557
  }) {
1647
- return /* @__PURE__ */ jsx20(dist_exports4.Root, { "data-slot": "tooltip", ...props });
1558
+ return /* @__PURE__ */ jsx19(dist_exports3.Root, { "data-slot": "tooltip", ...props });
1648
1559
  }
1649
1560
  function TooltipTrigger({
1650
1561
  ...props
1651
1562
  }) {
1652
- return /* @__PURE__ */ jsx20(dist_exports4.Trigger, { "data-slot": "tooltip-trigger", ...props });
1563
+ return /* @__PURE__ */ jsx19(dist_exports3.Trigger, { "data-slot": "tooltip-trigger", ...props });
1653
1564
  }
1654
1565
  function TooltipContent({
1655
1566
  className,
@@ -1657,8 +1568,8 @@ function TooltipContent({
1657
1568
  children,
1658
1569
  ...props
1659
1570
  }) {
1660
- return /* @__PURE__ */ jsx20(dist_exports4.Portal, { children: /* @__PURE__ */ jsxs9(
1661
- dist_exports4.Content,
1571
+ return /* @__PURE__ */ jsx19(dist_exports3.Portal, { children: /* @__PURE__ */ jsxs9(
1572
+ dist_exports3.Content,
1662
1573
  {
1663
1574
  "data-slot": "tooltip-content",
1664
1575
  sideOffset,
@@ -1669,7 +1580,7 @@ function TooltipContent({
1669
1580
  ...props,
1670
1581
  children: [
1671
1582
  children,
1672
- /* @__PURE__ */ jsx20(dist_exports4.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-none bg-foreground fill-foreground" })
1583
+ /* @__PURE__ */ jsx19(dist_exports3.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-none bg-foreground fill-foreground" })
1673
1584
  ]
1674
1585
  }
1675
1586
  ) });
@@ -1678,7 +1589,7 @@ function TooltipContent({
1678
1589
  // src/ui/lib/host-defaults-context.tsx
1679
1590
  import { createContext, useContext } from "react";
1680
1591
  import { useTranslation as useTranslation3 } from "react-i18next";
1681
- import { Fragment as Fragment2, jsx as jsx21, jsxs as jsxs10 } from "react/jsx-runtime";
1592
+ import { Fragment as Fragment2, jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
1682
1593
  var HostDefaultsContext = createContext(null);
1683
1594
  function useHostDefaults() {
1684
1595
  return useContext(HostDefaultsContext);
@@ -1728,14 +1639,14 @@ function HostDefaultBadge({ settingKey }) {
1728
1639
  title: defaults3 ? t2("hostDefaults.clearTitle", { source: from }) : t2("hostDefaults.resetTitle", { source: from }),
1729
1640
  className: "inline-flex items-center gap-0.5 border border-accent-brand/40 px-1 text-[10px] font-medium normal-case tracking-normal text-accent-brand hover:bg-accent-brand/10",
1730
1641
  children: [
1731
- defaults3 ? /* @__PURE__ */ jsx21(X, { className: "size-2.5" }) : /* @__PURE__ */ jsx21(RotateCcw, { className: "size-2.5" }),
1642
+ defaults3 ? /* @__PURE__ */ jsx20(X, { className: "size-2.5" }) : /* @__PURE__ */ jsx20(RotateCcw, { className: "size-2.5" }),
1732
1643
  defaults3 ? t2("hostDefaults.setHere") : t2("hostDefaults.custom")
1733
1644
  ]
1734
1645
  }
1735
1646
  );
1736
1647
  }
1737
1648
  if (own || source?.level === "builtin") return null;
1738
- return /* @__PURE__ */ jsx21(
1649
+ return /* @__PURE__ */ jsx20(
1739
1650
  "span",
1740
1651
  {
1741
1652
  title: source ? t2("hostDefaults.inheritedTitle", { source: from }) : t2("hostDefaults.notSetTitle"),
@@ -1753,12 +1664,12 @@ function DefaultsOnly({
1753
1664
  if (context?.mode === "defaults" && fullKey && !context.isAvailable(fullKey)) {
1754
1665
  return null;
1755
1666
  }
1756
- return /* @__PURE__ */ jsx21(Fragment2, { children });
1667
+ return /* @__PURE__ */ jsx20(Fragment2, { children });
1757
1668
  }
1758
1669
 
1759
1670
  // src/ui/components/section-card.tsx
1760
1671
  import { useState as useState3 } from "react";
1761
- import { jsx as jsx22, jsxs as jsxs11 } from "react/jsx-runtime";
1672
+ import { jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
1762
1673
  function SectionCard({
1763
1674
  title,
1764
1675
  icon,
@@ -1774,11 +1685,11 @@ function SectionCard({
1774
1685
  className: `flex flex-col border border-border bg-card overflow-hidden ${className ?? ""}`,
1775
1686
  children: [
1776
1687
  /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-2 px-4 py-2.5 border-b border-border shrink-0", children: [
1777
- /* @__PURE__ */ jsx22("span", { className: "text-muted-foreground", children: icon }),
1778
- /* @__PURE__ */ jsx22("span", { className: "text-[10px] font-semibold uppercase tracking-widest text-muted-foreground flex-1", children: title }),
1779
- action && /* @__PURE__ */ jsx22("div", { className: "ml-auto", children: action })
1688
+ /* @__PURE__ */ jsx21("span", { className: "text-muted-foreground", children: icon }),
1689
+ /* @__PURE__ */ jsx21("span", { className: "text-[10px] font-semibold uppercase tracking-widest text-muted-foreground flex-1", children: title }),
1690
+ action && /* @__PURE__ */ jsx21("div", { className: "ml-auto", children: action })
1780
1691
  ] }),
1781
- /* @__PURE__ */ jsx22("div", { className: "px-3 md:px-4 py-1", children })
1692
+ /* @__PURE__ */ jsx21("div", { className: "px-3 md:px-4 py-1", children })
1782
1693
  ]
1783
1694
  }
1784
1695
  );
@@ -1791,21 +1702,21 @@ function SettingRow({
1791
1702
  rowId,
1792
1703
  children
1793
1704
  }) {
1794
- return /* @__PURE__ */ jsx22(DefaultsOnly, { settingKey: defaultKey ?? "", children: /* @__PURE__ */ jsxs11(
1705
+ return /* @__PURE__ */ jsx21(DefaultsOnly, { settingKey: defaultKey ?? "", children: /* @__PURE__ */ jsxs11(
1795
1706
  "div",
1796
1707
  {
1797
- "data-setting-row": rowId,
1708
+ "data-setting-row": rowId ?? "",
1798
1709
  className: "flex items-center justify-between gap-3 py-3 border-b border-border last:border-0 [.gap-4>&]:py-0 [.gap-4>&]:border-0",
1799
1710
  children: [
1800
1711
  /* @__PURE__ */ jsxs11("div", { className: "flex flex-col gap-0.5 min-w-0 flex-1", children: [
1801
1712
  /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-1.5 flex-wrap", children: [
1802
- /* @__PURE__ */ jsx22("span", { className: "text-sm font-medium leading-snug", children: label }),
1803
- badge && /* @__PURE__ */ jsx22("span", { className: "text-[10px] font-bold text-warning border border-warning/40 px-1 shrink-0", children: badge }),
1804
- defaultKey && /* @__PURE__ */ jsx22(HostDefaultBadge, { settingKey: defaultKey })
1713
+ /* @__PURE__ */ jsx21("span", { className: "text-sm font-medium leading-snug", children: label }),
1714
+ badge && /* @__PURE__ */ jsx21("span", { className: "text-[10px] font-bold text-warning border border-warning/40 px-1 shrink-0", children: badge }),
1715
+ defaultKey && /* @__PURE__ */ jsx21(HostDefaultBadge, { settingKey: defaultKey })
1805
1716
  ] }),
1806
- description && /* @__PURE__ */ jsx22("span", { className: "text-xs text-muted-foreground leading-snug", children: description })
1717
+ description && /* @__PURE__ */ jsx21("span", { className: "text-xs text-muted-foreground leading-snug", children: description })
1807
1718
  ] }),
1808
- /* @__PURE__ */ jsx22("div", { className: "shrink-0", children })
1719
+ /* @__PURE__ */ jsx21("div", { className: "shrink-0", children })
1809
1720
  ]
1810
1721
  }
1811
1722
  ) });
@@ -1818,7 +1729,7 @@ function FakeSwitch({
1818
1729
  }) {
1819
1730
  const [internalOn, setInternalOn] = useState3(defaultChecked);
1820
1731
  const on = checked !== void 0 ? checked : internalOn;
1821
- return /* @__PURE__ */ jsx22(
1732
+ return /* @__PURE__ */ jsx21(
1822
1733
  "button",
1823
1734
  {
1824
1735
  type: "button",
@@ -1831,7 +1742,7 @@ function FakeSwitch({
1831
1742
  onChange?.(next);
1832
1743
  },
1833
1744
  className: `relative inline-flex h-5 w-9 shrink-0 cursor-pointer items-center border-2 transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${on ? "bg-accent-brand border-accent-brand" : "bg-muted border-border"}`,
1834
- children: /* @__PURE__ */ jsx22(
1745
+ children: /* @__PURE__ */ jsx21(
1835
1746
  "span",
1836
1747
  {
1837
1748
  className: `pointer-events-none inline-block h-3 w-3 bg-background shadow-sm transition-transform ${on ? "translate-x-4" : "translate-x-0.5"}`
@@ -1842,7 +1753,7 @@ function FakeSwitch({
1842
1753
  }
1843
1754
 
1844
1755
  // src/ui/components/metric-card.tsx
1845
- import { jsx as jsx23, jsxs as jsxs12 } from "react/jsx-runtime";
1756
+ import { jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
1846
1757
  var DEFAULT_SCROLL_MAX = 360;
1847
1758
  function MetricCard({
1848
1759
  title,
@@ -1855,11 +1766,11 @@ function MetricCard({
1855
1766
  }) {
1856
1767
  return /* @__PURE__ */ jsxs12("div", { className: "flex min-h-0 flex-col overflow-hidden border border-border bg-card", children: [
1857
1768
  /* @__PURE__ */ jsxs12("div", { className: "flex shrink-0 items-center gap-2 border-b border-border px-4 py-2.5", children: [
1858
- /* @__PURE__ */ jsx23("span", { className: "text-muted-foreground", children: icon }),
1859
- /* @__PURE__ */ jsx23("span", { className: "flex-1 truncate text-xs font-semibold uppercase tracking-widest text-muted-foreground", children: title }),
1860
- action && /* @__PURE__ */ jsx23("div", { className: "ml-auto shrink-0", children: action })
1769
+ /* @__PURE__ */ jsx22("span", { className: "text-muted-foreground", children: icon }),
1770
+ /* @__PURE__ */ jsx22("span", { className: "flex-1 truncate text-xs font-semibold uppercase tracking-widest text-muted-foreground", children: title }),
1771
+ action && /* @__PURE__ */ jsx22("div", { className: "ml-auto shrink-0", children: action })
1861
1772
  ] }),
1862
- /* @__PURE__ */ jsx23(
1773
+ /* @__PURE__ */ jsx22(
1863
1774
  "div",
1864
1775
  {
1865
1776
  className: cn(
@@ -1913,7 +1824,7 @@ function gaugeArc(value, radius, sweepDeg = 270) {
1913
1824
  }
1914
1825
 
1915
1826
  // src/ui/components/charts/Sparkline.tsx
1916
- import { jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
1827
+ import { jsx as jsx23, jsxs as jsxs13 } from "react/jsx-runtime";
1917
1828
  function Sparkline({
1918
1829
  data,
1919
1830
  domain,
@@ -1929,7 +1840,7 @@ function Sparkline({
1929
1840
  domain
1930
1841
  );
1931
1842
  const last2 = coords[coords.length - 1];
1932
- return /* @__PURE__ */ jsx24(
1843
+ return /* @__PURE__ */ jsx23(
1933
1844
  "div",
1934
1845
  {
1935
1846
  className: cn(
@@ -1946,12 +1857,12 @@ function Sparkline({
1946
1857
  preserveAspectRatio: "none",
1947
1858
  "aria-hidden": "true",
1948
1859
  children: [
1949
- /* @__PURE__ */ jsx24("defs", { children: /* @__PURE__ */ jsxs13("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
1950
- /* @__PURE__ */ jsx24("stop", { offset: "0%", stopColor: "currentColor", stopOpacity: "0.28" }),
1951
- /* @__PURE__ */ jsx24("stop", { offset: "100%", stopColor: "currentColor", stopOpacity: "0" })
1860
+ /* @__PURE__ */ jsx23("defs", { children: /* @__PURE__ */ jsxs13("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
1861
+ /* @__PURE__ */ jsx23("stop", { offset: "0%", stopColor: "currentColor", stopOpacity: "0.28" }),
1862
+ /* @__PURE__ */ jsx23("stop", { offset: "100%", stopColor: "currentColor", stopOpacity: "0" })
1952
1863
  ] }) }),
1953
- /* @__PURE__ */ jsx24("path", { d: areaPath, fill: `url(#${gradientId})` }),
1954
- /* @__PURE__ */ jsx24(
1864
+ /* @__PURE__ */ jsx23("path", { d: areaPath, fill: `url(#${gradientId})` }),
1865
+ /* @__PURE__ */ jsx23(
1955
1866
  "path",
1956
1867
  {
1957
1868
  d: linePath,
@@ -1964,7 +1875,7 @@ function Sparkline({
1964
1875
  className: "opacity-80"
1965
1876
  }
1966
1877
  ),
1967
- showLastDot && last2 && /* @__PURE__ */ jsx24(
1878
+ showLastDot && last2 && /* @__PURE__ */ jsx23(
1968
1879
  "circle",
1969
1880
  {
1970
1881
  cx: last2[0],
@@ -1982,7 +1893,7 @@ function Sparkline({
1982
1893
  }
1983
1894
 
1984
1895
  // src/ui/components/charts/RadialGauge.tsx
1985
- import { jsx as jsx25, jsxs as jsxs14 } from "react/jsx-runtime";
1896
+ import { jsx as jsx24, jsxs as jsxs14 } from "react/jsx-runtime";
1986
1897
  function RadialGauge({
1987
1898
  value,
1988
1899
  label,
@@ -1994,7 +1905,7 @@ function RadialGauge({
1994
1905
  }) {
1995
1906
  const pct = value === null ? 0 : Math.min(100, Math.max(0, value));
1996
1907
  const radius = (size - strokeWidth) / 2;
1997
- const cx2 = size / 2;
1908
+ const cx = size / 2;
1998
1909
  const cy = size / 2;
1999
1910
  const startAngle = 135;
2000
1911
  const { trackLen, valueLen, circumference } = gaugeArc(value, radius, 270);
@@ -2015,10 +1926,10 @@ function RadialGauge({
2015
1926
  style: { transform: `rotate(${startAngle}deg)` },
2016
1927
  "aria-hidden": "true",
2017
1928
  children: [
2018
- /* @__PURE__ */ jsx25(
1929
+ /* @__PURE__ */ jsx24(
2019
1930
  "circle",
2020
1931
  {
2021
- cx: cx2,
1932
+ cx,
2022
1933
  cy,
2023
1934
  r: radius,
2024
1935
  fill: "none",
@@ -2028,10 +1939,10 @@ function RadialGauge({
2028
1939
  strokeLinecap: "round"
2029
1940
  }
2030
1941
  ),
2031
- /* @__PURE__ */ jsx25(
1942
+ /* @__PURE__ */ jsx24(
2032
1943
  "circle",
2033
1944
  {
2034
- cx: cx2,
1945
+ cx,
2035
1946
  cy,
2036
1947
  r: radius,
2037
1948
  fill: "none",
@@ -2046,7 +1957,7 @@ function RadialGauge({
2046
1957
  }
2047
1958
  ),
2048
1959
  /* @__PURE__ */ jsxs14("div", { className: "absolute inset-0 flex flex-col items-center justify-center", children: [
2049
- /* @__PURE__ */ jsx25(
1960
+ /* @__PURE__ */ jsx24(
2050
1961
  "span",
2051
1962
  {
2052
1963
  className: cn(
@@ -2056,7 +1967,7 @@ function RadialGauge({
2056
1967
  children: display
2057
1968
  }
2058
1969
  ),
2059
- caption && /* @__PURE__ */ jsx25("span", { className: "mt-1 text-[10px] font-semibold uppercase tracking-widest text-muted-foreground", children: caption })
1970
+ caption && /* @__PURE__ */ jsx24("span", { className: "mt-1 text-[10px] font-semibold uppercase tracking-widest text-muted-foreground", children: caption })
2060
1971
  ] })
2061
1972
  ]
2062
1973
  }
@@ -2064,7 +1975,7 @@ function RadialGauge({
2064
1975
  }
2065
1976
 
2066
1977
  // src/ui/components/charts/BarSeries.tsx
2067
- import { jsx as jsx26, jsxs as jsxs15 } from "react/jsx-runtime";
1978
+ import { jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
2068
1979
  function BarSeries({
2069
1980
  items,
2070
1981
  max,
@@ -2072,14 +1983,14 @@ function BarSeries({
2072
1983
  colorClassName = "bg-accent-brand"
2073
1984
  }) {
2074
1985
  const domainMax = max ?? Math.max(1, ...items.map((i2) => i2.value));
2075
- return /* @__PURE__ */ jsx26("div", { className: cn("flex flex-col gap-2", className), children: items.map((item, i2) => {
1986
+ return /* @__PURE__ */ jsx25("div", { className: cn("flex flex-col gap-2", className), children: items.map((item, i2) => {
2076
1987
  const pct = Math.min(100, Math.max(0, item.value / domainMax * 100));
2077
1988
  return /* @__PURE__ */ jsxs15("div", { className: "flex flex-col gap-1", children: [
2078
1989
  /* @__PURE__ */ jsxs15("div", { className: "flex items-center justify-between gap-2", children: [
2079
- /* @__PURE__ */ jsx26("span", { className: "truncate text-xs text-muted-foreground", children: item.label }),
2080
- /* @__PURE__ */ jsx26("span", { className: "shrink-0 font-mono text-[11px] font-semibold", children: item.valueLabel ?? item.value })
1990
+ /* @__PURE__ */ jsx25("span", { className: "truncate text-xs text-muted-foreground", children: item.label }),
1991
+ /* @__PURE__ */ jsx25("span", { className: "shrink-0 font-mono text-[11px] font-semibold", children: item.valueLabel ?? item.value })
2081
1992
  ] }),
2082
- /* @__PURE__ */ jsx26("div", { className: "h-1.5 w-full overflow-hidden bg-muted", children: /* @__PURE__ */ jsx26(
1993
+ /* @__PURE__ */ jsx25("div", { className: "h-1.5 w-full overflow-hidden bg-muted", children: /* @__PURE__ */ jsx25(
2083
1994
  "div",
2084
1995
  {
2085
1996
  className: cn(
@@ -2094,7 +2005,7 @@ function BarSeries({
2094
2005
  }
2095
2006
 
2096
2007
  // src/ui/components/charts/StatRow.tsx
2097
- import { jsx as jsx27, jsxs as jsxs16 } from "react/jsx-runtime";
2008
+ import { jsx as jsx26, jsxs as jsxs16 } from "react/jsx-runtime";
2098
2009
  function StatRow({
2099
2010
  label,
2100
2011
  value,
@@ -2109,8 +2020,8 @@ function StatRow({
2109
2020
  className
2110
2021
  ),
2111
2022
  children: [
2112
- /* @__PURE__ */ jsx27("span", { className: "shrink-0 text-muted-foreground", children: label }),
2113
- /* @__PURE__ */ jsx27(
2023
+ /* @__PURE__ */ jsx26("span", { className: "shrink-0 text-muted-foreground", children: label }),
2024
+ /* @__PURE__ */ jsx26(
2114
2025
  "span",
2115
2026
  {
2116
2027
  className: cn(
@@ -2131,14 +2042,14 @@ function MiniStat({
2131
2042
  className
2132
2043
  }) {
2133
2044
  return /* @__PURE__ */ jsxs16("div", { className: cn("flex flex-col gap-0.5", className), children: [
2134
- /* @__PURE__ */ jsx27("span", { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: caption }),
2135
- /* @__PURE__ */ jsx27("span", { className: cn("text-sm font-bold leading-none", valueClassName), children: value })
2045
+ /* @__PURE__ */ jsx26("span", { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: caption }),
2046
+ /* @__PURE__ */ jsx26("span", { className: cn("text-sm font-bold leading-none", valueClassName), children: value })
2136
2047
  ] });
2137
2048
  }
2138
2049
 
2139
2050
  // src/ui/components/charts/LineChart.tsx
2140
2051
  import { useRef, useState as useState4, useEffect as useEffect2, useCallback } from "react";
2141
- import { jsx as jsx28, jsxs as jsxs17 } from "react/jsx-runtime";
2052
+ import { jsx as jsx27, jsxs as jsxs17 } from "react/jsx-runtime";
2142
2053
  var Y_LABEL_W = 44;
2143
2054
  var X_LABEL_H = 20;
2144
2055
  var TOP_PAD = 6;
@@ -2248,7 +2159,7 @@ function LineChart({
2248
2159
  yTicks.map((tick, ti) => {
2249
2160
  const y = valToY(tick, drawH, domain);
2250
2161
  return /* @__PURE__ */ jsxs17("g", { children: [
2251
- /* @__PURE__ */ jsx28(
2162
+ /* @__PURE__ */ jsx27(
2252
2163
  "line",
2253
2164
  {
2254
2165
  x1: Y_LABEL_W,
@@ -2260,7 +2171,7 @@ function LineChart({
2260
2171
  strokeOpacity: 0.6
2261
2172
  }
2262
2173
  ),
2263
- /* @__PURE__ */ jsx28(
2174
+ /* @__PURE__ */ jsx27(
2264
2175
  "text",
2265
2176
  {
2266
2177
  x: Y_LABEL_W - 6,
@@ -2273,7 +2184,7 @@ function LineChart({
2273
2184
  )
2274
2185
  ] }, ti);
2275
2186
  }),
2276
- /* @__PURE__ */ jsx28(
2187
+ /* @__PURE__ */ jsx27(
2277
2188
  "line",
2278
2189
  {
2279
2190
  x1: Y_LABEL_W,
@@ -2284,7 +2195,7 @@ function LineChart({
2284
2195
  strokeWidth: 1
2285
2196
  }
2286
2197
  ),
2287
- /* @__PURE__ */ jsx28(
2198
+ /* @__PURE__ */ jsx27(
2288
2199
  "line",
2289
2200
  {
2290
2201
  x1: Y_LABEL_W,
@@ -2298,7 +2209,7 @@ function LineChart({
2298
2209
  chartW > 0 && series.map((s) => {
2299
2210
  const d = buildLinePath(s.data, chartW, drawH, domain);
2300
2211
  if (!d) return null;
2301
- return /* @__PURE__ */ jsx28(
2212
+ return /* @__PURE__ */ jsx27(
2302
2213
  "path",
2303
2214
  {
2304
2215
  d,
@@ -2312,7 +2223,7 @@ function LineChart({
2312
2223
  s.key
2313
2224
  );
2314
2225
  }),
2315
- tooltip !== null && timestamps.length > 1 && chartW > 0 && /* @__PURE__ */ jsx28(
2226
+ tooltip !== null && timestamps.length > 1 && chartW > 0 && /* @__PURE__ */ jsx27(
2316
2227
  "line",
2317
2228
  {
2318
2229
  x1: Y_LABEL_W + tooltip.index / (timestamps.length - 1) * chartW,
@@ -2329,7 +2240,7 @@ function LineChart({
2329
2240
  const isFirst = li === 0;
2330
2241
  const isLast = li === xTickIndices.length - 1;
2331
2242
  const x = Y_LABEL_W + i2 / Math.max(1, timestamps.length - 1) * chartW;
2332
- return /* @__PURE__ */ jsx28(
2243
+ return /* @__PURE__ */ jsx27(
2333
2244
  "text",
2334
2245
  {
2335
2246
  x,
@@ -2355,11 +2266,11 @@ function LineChart({
2355
2266
  transform: tooltip.x > width / 2 ? "translateX(-100%)" : void 0
2356
2267
  },
2357
2268
  children: [
2358
- /* @__PURE__ */ jsx28("div", { className: "mb-1 font-medium text-muted-foreground", children: formatTimestamp(timestamps[tooltip.index], rangeMs) }),
2269
+ /* @__PURE__ */ jsx27("div", { className: "mb-1 font-medium text-muted-foreground", children: formatTimestamp(timestamps[tooltip.index], rangeMs) }),
2359
2270
  series.map((s) => {
2360
2271
  const v = s.data[tooltip.index];
2361
2272
  return /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-1.5", children: [
2362
- /* @__PURE__ */ jsx28(
2273
+ /* @__PURE__ */ jsx27(
2363
2274
  "span",
2364
2275
  {
2365
2276
  className: "inline-block h-1.5 w-3 rounded-full shrink-0",
@@ -2370,7 +2281,7 @@ function LineChart({
2370
2281
  s.label,
2371
2282
  ":"
2372
2283
  ] }),
2373
- /* @__PURE__ */ jsx28("span", { className: "font-medium", children: v != null ? yFormatter(v) : "--" })
2284
+ /* @__PURE__ */ jsx27("span", { className: "font-medium", children: v != null ? yFormatter(v) : "--" })
2374
2285
  ] }, s.key);
2375
2286
  })
2376
2287
  ]
@@ -2480,7 +2391,7 @@ function heightToRowSpan(height, rowUnit, rowGap) {
2480
2391
  }
2481
2392
 
2482
2393
  // src/ui/components/card-grid/CardGridCanvas.tsx
2483
- import { Fragment as Fragment3, jsx as jsx29, jsxs as jsxs18 } from "react/jsx-runtime";
2394
+ import { Fragment as Fragment3, jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
2484
2395
  var ROW_UNIT = 8;
2485
2396
  var ROW_GAP = 12;
2486
2397
  function DropZone({
@@ -2491,7 +2402,7 @@ function DropZone({
2491
2402
  }) {
2492
2403
  const [over, setOver] = useState6(false);
2493
2404
  if (!active2) return null;
2494
- return /* @__PURE__ */ jsx29(
2405
+ return /* @__PURE__ */ jsx28(
2495
2406
  "div",
2496
2407
  {
2497
2408
  className: cn(
@@ -2519,42 +2430,42 @@ function TileChrome({
2519
2430
  }) {
2520
2431
  const { t: t2 } = useTranslation4();
2521
2432
  return /* @__PURE__ */ jsxs18(Fragment3, { children: [
2522
- /* @__PURE__ */ jsx29("div", { className: "pointer-events-none absolute inset-0 z-10 border-2 border-dashed border-accent-brand/30" }),
2433
+ /* @__PURE__ */ jsx28("div", { className: "pointer-events-none absolute inset-0 z-10 border-2 border-dashed border-accent-brand/30" }),
2523
2434
  /* @__PURE__ */ jsxs18("div", { className: "absolute top-2 right-2 z-20 flex items-center gap-1", children: [
2524
- /* @__PURE__ */ jsx29(
2435
+ /* @__PURE__ */ jsx28(
2525
2436
  "div",
2526
2437
  {
2527
2438
  className: "flex size-6 cursor-grab items-center justify-center border border-border bg-card active:cursor-grabbing",
2528
2439
  title: t2("cardGrid.dragToMove"),
2529
- children: /* @__PURE__ */ jsx29(GripVertical, { className: "size-3 text-muted-foreground" })
2440
+ children: /* @__PURE__ */ jsx28(GripVertical, { className: "size-3 text-muted-foreground" })
2530
2441
  }
2531
2442
  ),
2532
- columns > 1 && /* @__PURE__ */ jsx29(
2443
+ columns > 1 && /* @__PURE__ */ jsx28(
2533
2444
  "button",
2534
2445
  {
2535
2446
  onClick: onCycleWidth,
2536
2447
  className: "flex size-6 items-center justify-center border border-border bg-card transition-colors hover:border-accent-brand/40 hover:bg-accent-brand/10",
2537
2448
  title: t2("cardGrid.changeWidth"),
2538
- children: /* @__PURE__ */ jsx29(Columns2, { className: "size-3 text-muted-foreground" })
2449
+ children: /* @__PURE__ */ jsx28(Columns2, { className: "size-3 text-muted-foreground" })
2539
2450
  }
2540
2451
  ),
2541
- /* @__PURE__ */ jsx29(
2452
+ /* @__PURE__ */ jsx28(
2542
2453
  "button",
2543
2454
  {
2544
2455
  onClick: onRemove,
2545
2456
  className: "flex size-6 items-center justify-center border border-border bg-card transition-colors hover:border-destructive/40 hover:bg-destructive/10",
2546
2457
  title: t2("cardGrid.removeCard", { label }),
2547
- children: /* @__PURE__ */ jsx29(Trash, { className: "size-3 text-muted-foreground" })
2458
+ children: /* @__PURE__ */ jsx28(Trash, { className: "size-3 text-muted-foreground" })
2548
2459
  }
2549
2460
  )
2550
2461
  ] }),
2551
- /* @__PURE__ */ jsx29(
2462
+ /* @__PURE__ */ jsx28(
2552
2463
  "div",
2553
2464
  {
2554
2465
  onMouseDown: onResizeStart,
2555
2466
  className: "group/resize absolute bottom-0 left-0 right-0 z-20 flex h-2.5 cursor-row-resize items-center justify-center",
2556
2467
  title: t2("cardGrid.dragToResize"),
2557
- children: /* @__PURE__ */ jsx29("div", { className: "h-0.5 w-12 rounded-full bg-border transition-colors group-hover/resize:bg-accent-brand/60" })
2468
+ children: /* @__PURE__ */ jsx28("div", { className: "h-0.5 w-12 rounded-full bg-border transition-colors group-hover/resize:bg-accent-brand/60" })
2558
2469
  }
2559
2470
  )
2560
2471
  ] });
@@ -2568,7 +2479,7 @@ function AddTray({
2568
2479
  const available = catalog.filter((c) => !presentIds.has(c.id));
2569
2480
  if (available.length === 0) return null;
2570
2481
  return /* @__PURE__ */ jsxs18("div", { className: "mt-3 flex flex-wrap items-center gap-2", children: [
2571
- /* @__PURE__ */ jsx29("span", { className: "text-[10px] font-semibold uppercase tracking-widest text-muted-foreground", children: t2("cardGrid.addCard") }),
2482
+ /* @__PURE__ */ jsx28("span", { className: "text-[10px] font-semibold uppercase tracking-widest text-muted-foreground", children: t2("cardGrid.addCard") }),
2572
2483
  available.map((card) => /* @__PURE__ */ jsxs18(
2573
2484
  "button",
2574
2485
  {
@@ -2576,7 +2487,7 @@ function AddTray({
2576
2487
  title: card.description,
2577
2488
  className: "flex items-center gap-1.5 border border-dashed border-border px-2.5 py-1 text-xs text-muted-foreground transition-colors hover:border-accent-brand/60 hover:bg-accent-brand/5 hover:text-foreground",
2578
2489
  children: [
2579
- /* @__PURE__ */ jsx29(Plus, { className: "size-3 text-accent-brand" }),
2490
+ /* @__PURE__ */ jsx28(Plus, { className: "size-3 text-accent-brand" }),
2580
2491
  card.label
2581
2492
  ]
2582
2493
  },
@@ -2637,7 +2548,7 @@ function MasonryTile({
2637
2548
  gridRow: `span ${rows} / span ${rows}`
2638
2549
  },
2639
2550
  children: [
2640
- /* @__PURE__ */ jsx29(
2551
+ /* @__PURE__ */ jsx28(
2641
2552
  "div",
2642
2553
  {
2643
2554
  ref: innerRef,
@@ -2649,7 +2560,7 @@ function MasonryTile({
2649
2560
  children
2650
2561
  }
2651
2562
  ),
2652
- editMode && /* @__PURE__ */ jsx29(
2563
+ editMode && /* @__PURE__ */ jsx28(
2653
2564
  TileChrome,
2654
2565
  {
2655
2566
  columns: effectiveColumns,
@@ -2751,11 +2662,11 @@ function CardGridCanvas({
2751
2662
  );
2752
2663
  const handleDragOver = (e) => e.preventDefault();
2753
2664
  if (isMobile) {
2754
- return /* @__PURE__ */ jsx29("div", { className: cn("flex flex-col gap-3", className), children: sorted.map((slot) => /* @__PURE__ */ jsx29("div", { className: "w-full", children: renderCard(slot.id) }, slot.id)) });
2665
+ return /* @__PURE__ */ jsx28("div", { className: cn("flex flex-col gap-3", className), children: sorted.map((slot) => /* @__PURE__ */ jsx28("div", { className: "w-full", children: renderCard(slot.id) }, slot.id)) });
2755
2666
  }
2756
2667
  const effectiveColumns = clampColumns(columns);
2757
2668
  return /* @__PURE__ */ jsxs18("div", { className: cn("flex flex-col", className), children: [
2758
- /* @__PURE__ */ jsx29(
2669
+ /* @__PURE__ */ jsx28(
2759
2670
  "div",
2760
2671
  {
2761
2672
  className: "grid items-start",
@@ -2770,7 +2681,7 @@ function CardGridCanvas({
2770
2681
  const span = Math.min(slot.colSpan, effectiveColumns);
2771
2682
  const isDragging = dragState?.id === slot.id;
2772
2683
  const rows = rowSpans[slot.id] ?? 24;
2773
- return /* @__PURE__ */ jsx29(
2684
+ return /* @__PURE__ */ jsx28(
2774
2685
  MasonryTile,
2775
2686
  {
2776
2687
  slot,
@@ -2799,8 +2710,8 @@ function CardGridCanvas({
2799
2710
  }
2800
2711
  ),
2801
2712
  editMode && /* @__PURE__ */ jsxs18(Fragment3, { children: [
2802
- sorted.length === 0 && /* @__PURE__ */ jsx29("div", { className: "flex items-center justify-center border border-dashed border-border/40 py-10 text-xs text-muted-foreground/40", children: t2("cardGrid.empty") }),
2803
- /* @__PURE__ */ jsx29(
2713
+ sorted.length === 0 && /* @__PURE__ */ jsx28("div", { className: "flex items-center justify-center border border-dashed border-border/40 py-10 text-xs text-muted-foreground/40", children: t2("cardGrid.empty") }),
2714
+ /* @__PURE__ */ jsx28(
2804
2715
  AddTray,
2805
2716
  {
2806
2717
  catalog: cardCatalog,
@@ -2809,7 +2720,7 @@ function CardGridCanvas({
2809
2720
  }
2810
2721
  )
2811
2722
  ] }),
2812
- editMode && /* @__PURE__ */ jsx29(
2723
+ editMode && /* @__PURE__ */ jsx28(
2813
2724
  DropZone,
2814
2725
  {
2815
2726
  order: sorted.length,
@@ -2826,10 +2737,10 @@ function ColumnCountStepper({
2826
2737
  }) {
2827
2738
  const { t: t2 } = useTranslation4();
2828
2739
  return /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-1.5", children: [
2829
- /* @__PURE__ */ jsx29(StretchHorizontal, { className: "size-3.5 text-muted-foreground" }),
2830
- /* @__PURE__ */ jsx29("span", { className: "text-[10px] font-semibold uppercase tracking-widest text-muted-foreground", children: t2("cardGrid.columns") }),
2740
+ /* @__PURE__ */ jsx28(StretchHorizontal, { className: "size-3.5 text-muted-foreground" }),
2741
+ /* @__PURE__ */ jsx28("span", { className: "text-[10px] font-semibold uppercase tracking-widest text-muted-foreground", children: t2("cardGrid.columns") }),
2831
2742
  /* @__PURE__ */ jsxs18("div", { className: "flex items-center border border-border", children: [
2832
- /* @__PURE__ */ jsx29(
2743
+ /* @__PURE__ */ jsx28(
2833
2744
  "button",
2834
2745
  {
2835
2746
  className: "flex size-6 items-center justify-center text-muted-foreground transition-colors hover:bg-muted disabled:opacity-30",
@@ -2838,8 +2749,8 @@ function ColumnCountStepper({
2838
2749
  children: "\u2212"
2839
2750
  }
2840
2751
  ),
2841
- /* @__PURE__ */ jsx29("span", { className: "w-6 text-center text-xs font-bold tabular-nums", children: columns }),
2842
- /* @__PURE__ */ jsx29(
2752
+ /* @__PURE__ */ jsx28("span", { className: "w-6 text-center text-xs font-bold tabular-nums", children: columns }),
2753
+ /* @__PURE__ */ jsx28(
2843
2754
  "button",
2844
2755
  {
2845
2756
  className: "flex size-6 items-center justify-center text-muted-foreground transition-colors hover:bg-muted disabled:opacity-30",
@@ -2860,7 +2771,7 @@ import { useEffect as useEffect5, useRef as useRef3, useState as useState8 } fro
2860
2771
 
2861
2772
  // src/ui/ssh/connection-log/ConnectionLogContext.tsx
2862
2773
  import { createContext as createContext2, useContext as useContext2, useState as useState7, useCallback as useCallback3 } from "react";
2863
- import { jsx as jsx30 } from "react/jsx-runtime";
2774
+ import { jsx as jsx29 } from "react/jsx-runtime";
2864
2775
  var ConnectionLogContext = createContext2(void 0);
2865
2776
  function ConnectionLogProvider({
2866
2777
  children
@@ -2899,7 +2810,7 @@ function ConnectionLogProvider({
2899
2810
  const toggleExpanded = useCallback3(() => {
2900
2811
  setIsExpanded((prev) => !prev);
2901
2812
  }, []);
2902
- return /* @__PURE__ */ jsx30(
2813
+ return /* @__PURE__ */ jsx29(
2903
2814
  ConnectionLogContext.Provider,
2904
2815
  {
2905
2816
  value: {
@@ -3001,7 +2912,7 @@ function legacyPaste() {
3001
2912
 
3002
2913
  // src/ui/components/connection/ConnectionLogPanel.tsx
3003
2914
  import { toast } from "sonner";
3004
- import { jsx as jsx31, jsxs as jsxs19 } from "react/jsx-runtime";
2915
+ import { jsx as jsx30, jsxs as jsxs19 } from "react/jsx-runtime";
3005
2916
  var COLLAPSED_HEIGHT = "h-[136px]";
3006
2917
  var EXPANDED_HEIGHT = "h-[46%] min-h-[220px]";
3007
2918
  var DOT = {
@@ -3020,7 +2931,6 @@ function ConnectionLogPanel({
3020
2931
  isConnecting,
3021
2932
  isConnected,
3022
2933
  hasConnectionError,
3023
- position = "bottom",
3024
2934
  className
3025
2935
  }) {
3026
2936
  const { t: t2 } = useTranslation5();
@@ -3077,13 +2987,13 @@ function ConnectionLogPanel({
3077
2987
  {
3078
2988
  className: cn(
3079
2989
  "relative z-10 flex shrink-0 flex-col bg-surface-dim/60",
3080
- position === "bottom" ? "border-t border-border" : "border-b border-border",
2990
+ "border-t border-border",
3081
2991
  expanded ? EXPANDED_HEIGHT : COLLAPSED_HEIGHT,
3082
2992
  "transition-[height] duration-200",
3083
2993
  className
3084
2994
  ),
3085
2995
  children: [
3086
- /* @__PURE__ */ jsxs19("div", { className: "flex h-9 shrink-0 items-center gap-2 border-b border-border/60 px-2 pr-1.5", children: [
2996
+ /* @__PURE__ */ jsxs19("div", { className: "flex h-9 shrink-0 items-center gap-2 border-b border-border px-2 pr-1.5", children: [
3087
2997
  /* @__PURE__ */ jsxs19(
3088
2998
  "button",
3089
2999
  {
@@ -3092,13 +3002,13 @@ function ConnectionLogPanel({
3092
3002
  "aria-expanded": expanded,
3093
3003
  className: "flex min-w-0 items-center gap-1.5 px-1.5 py-1 text-foreground-secondary transition-colors hover:text-foreground",
3094
3004
  children: [
3095
- expanded ? /* @__PURE__ */ jsx31(ChevronDown, { className: "size-3.5 shrink-0" }) : /* @__PURE__ */ jsx31(ChevronUp, { className: "size-3.5 shrink-0" }),
3096
- /* @__PURE__ */ jsx31("span", { className: "text-[10px] font-semibold uppercase tracking-widest", children: t2("sshAuth.connectionLogTitle") })
3005
+ expanded ? /* @__PURE__ */ jsx30(ChevronDown, { className: "size-3.5 shrink-0" }) : /* @__PURE__ */ jsx30(ChevronUp, { className: "size-3.5 shrink-0" }),
3006
+ /* @__PURE__ */ jsx30("span", { className: "text-[10px] font-semibold uppercase tracking-widest", children: t2("sshAuth.connectionLogTitle") })
3097
3007
  ]
3098
3008
  }
3099
3009
  ),
3100
- /* @__PURE__ */ jsx31("span", { className: "text-xs tabular-nums text-muted-foreground", children: logs.length }),
3101
- logs.length > 0 && /* @__PURE__ */ jsx31(
3010
+ /* @__PURE__ */ jsx30("span", { className: "text-xs tabular-nums text-muted-foreground", children: logs.length }),
3011
+ logs.length > 0 && /* @__PURE__ */ jsx30(
3102
3012
  Button,
3103
3013
  {
3104
3014
  variant: "ghost",
@@ -3106,18 +3016,18 @@ function ConnectionLogPanel({
3106
3016
  onClick: copyLogsToClipboard,
3107
3017
  title: t2("sshAuth.connectionLogCopy"),
3108
3018
  className: "ml-auto text-muted-foreground",
3109
- children: copied ? /* @__PURE__ */ jsx31(Check, { className: "size-3.5 text-accent-brand" }) : /* @__PURE__ */ jsx31(Copy, { className: "size-3.5" })
3019
+ children: copied ? /* @__PURE__ */ jsx30(Check, { className: "size-3.5 text-accent-brand" }) : /* @__PURE__ */ jsx30(Copy, { className: "size-3.5" })
3110
3020
  }
3111
3021
  )
3112
3022
  ] }),
3113
- /* @__PURE__ */ jsx31("div", { className: "thin-scrollbar min-h-0 flex-1 overflow-y-auto overflow-x-hidden", children: logs.length === 0 ? /* @__PURE__ */ jsx31("p", { className: "px-3 py-4 text-xs text-muted-foreground", children: isConnecting ? t2("sshAuth.connectionLogWaiting") : t2("sshAuth.connectionLogEmpty") }) : /* @__PURE__ */ jsx31("div", { className: "px-2 py-1.5 font-mono text-[11px] leading-[1.7]", children: logs.map((log, index) => /* @__PURE__ */ jsxs19(
3023
+ /* @__PURE__ */ jsx30("div", { className: "thin-scrollbar min-h-0 flex-1 overflow-y-auto overflow-x-hidden", children: logs.length === 0 ? /* @__PURE__ */ jsx30("p", { className: "px-3 py-4 text-xs text-muted-foreground", children: isConnecting ? t2("sshAuth.connectionLogWaiting") : t2("sshAuth.connectionLogEmpty") }) : /* @__PURE__ */ jsx30("div", { className: "px-2 py-1.5 font-mono text-[11px] leading-[1.7]", children: logs.map((log, index) => /* @__PURE__ */ jsxs19(
3114
3024
  "div",
3115
3025
  {
3116
3026
  ref: index === logs.length - 1 ? lastLogRef : null,
3117
3027
  className: "flex items-baseline gap-2 px-1 hover:bg-foreground/[0.03]",
3118
3028
  children: [
3119
- /* @__PURE__ */ jsx31("span", { className: "shrink-0 tabular-nums text-muted-foreground/70", children: log.timestamp.toLocaleTimeString([], { hour12: false }) }),
3120
- /* @__PURE__ */ jsx31(
3029
+ /* @__PURE__ */ jsx30("span", { className: "shrink-0 tabular-nums text-muted-foreground/70", children: log.timestamp.toLocaleTimeString([], { hour12: false }) }),
3030
+ /* @__PURE__ */ jsx30(
3121
3031
  "span",
3122
3032
  {
3123
3033
  className: cn(
@@ -3126,7 +3036,7 @@ function ConnectionLogPanel({
3126
3036
  )
3127
3037
  }
3128
3038
  ),
3129
- /* @__PURE__ */ jsx31(
3039
+ /* @__PURE__ */ jsx30(
3130
3040
  "span",
3131
3041
  {
3132
3042
  className: cn(
@@ -3146,12 +3056,11 @@ function ConnectionLogPanel({
3146
3056
  }
3147
3057
 
3148
3058
  // src/ui/components/connection/ConnectionScreen.tsx
3149
- import { jsx as jsx32, jsxs as jsxs20 } from "react/jsx-runtime";
3059
+ import { jsx as jsx31, jsxs as jsxs20 } from "react/jsx-runtime";
3150
3060
  function ConnectionScreen({
3151
3061
  status,
3152
3062
  message,
3153
3063
  detail,
3154
- errorMessage,
3155
3064
  errorDetail,
3156
3065
  unavailable,
3157
3066
  backgroundColor,
@@ -3159,29 +3068,34 @@ function ConnectionScreen({
3159
3068
  maxAttempts = 0,
3160
3069
  nextRetryInMs = null,
3161
3070
  onManualRetry,
3162
- retryLabel,
3163
3071
  disconnectedMessage,
3072
+ onClose,
3164
3073
  extraActions,
3165
3074
  logPosition = "bottom",
3166
3075
  emptyState,
3167
3076
  className
3168
3077
  }) {
3169
3078
  const { t: t2 } = useTranslation6();
3079
+ const surfaceClose = useSurfaceClose();
3080
+ const logs = useOptionalConnectionLog()?.logs;
3081
+ const close = onClose === false ? null : onClose ?? surfaceClose;
3170
3082
  if (status === "connected" && !emptyState && !unavailable) {
3171
3083
  return null;
3172
3084
  }
3173
3085
  const connecting = status === "connecting" && !unavailable;
3174
3086
  const failed = status === "error" || status === "disconnected";
3175
3087
  const retrying = status === "error" && attempt > 0 && !!nextRetryInMs && nextRetryInMs > 0;
3176
- const showRetryButton = (failed || !!unavailable) && !!onManualRetry;
3088
+ const stopped = failed || !!unavailable;
3089
+ const showRetryButton = stopped && !!onManualRetry;
3090
+ const showClose = stopped && !!close;
3091
+ const reason = errorDetail || [...logs ?? []].reverse().find((entry) => entry.type === "error")?.message || null;
3177
3092
  const showLog = !emptyState && (status !== "connected" || !!unavailable);
3178
3093
  let headline = message;
3179
3094
  if (unavailable) headline = unavailable.title;
3180
- else if (status === "disconnected")
3181
- headline = disconnectedMessage || t2("connection.disconnected");
3182
3095
  else if (retrying) headline = t2("connection.failedRetrying");
3183
- else if (status === "error")
3184
- headline = errorMessage || t2("connection.failed");
3096
+ else if (status === "disconnected" && disconnectedMessage)
3097
+ headline = disconnectedMessage;
3098
+ else if (failed) headline = t2("connection.failed");
3185
3099
  const showCountdown = attempt > 0 && (connecting || retrying);
3186
3100
  return /* @__PURE__ */ jsxs20(
3187
3101
  "div",
@@ -3195,19 +3109,19 @@ function ConnectionScreen({
3195
3109
  ),
3196
3110
  style: { backgroundColor: backgroundColor || "var(--bg-base)" },
3197
3111
  children: [
3198
- /* @__PURE__ */ jsx32("div", { className: "flex min-h-0 flex-1 items-center justify-center p-6", children: emptyState ? emptyState : /* @__PURE__ */ jsxs20("div", { className: "flex max-w-md flex-col items-center gap-3.5 text-center", children: [
3199
- /* @__PURE__ */ jsx32(
3112
+ /* @__PURE__ */ jsx31("div", { className: "flex min-h-0 flex-1 items-center justify-center p-6", children: emptyState ? emptyState : /* @__PURE__ */ jsxs20("div", { className: "flex max-w-md flex-col items-center gap-3.5 text-center", children: [
3113
+ /* @__PURE__ */ jsx31(
3200
3114
  ConnectionMark,
3201
3115
  {
3202
3116
  state: unavailable ? "unavailable" : connecting || retrying ? "busy" : "failed"
3203
3117
  }
3204
3118
  ),
3205
3119
  /* @__PURE__ */ jsxs20("div", { className: "space-y-1.5", children: [
3206
- headline && /* @__PURE__ */ jsx32("p", { className: "text-sm font-semibold tracking-tight text-foreground", children: headline }),
3207
- detail && /* @__PURE__ */ jsx32("p", { className: "font-mono text-xs text-muted-foreground", children: detail }),
3208
- unavailable?.hint && /* @__PURE__ */ jsx32("p", { className: "text-xs leading-snug text-muted-foreground", children: unavailable.hint }),
3209
- failed && !unavailable && errorDetail && /* @__PURE__ */ jsx32("p", { className: "line-clamp-3 text-xs leading-snug text-destructive/80", children: errorDetail }),
3210
- showCountdown && /* @__PURE__ */ jsx32("p", { className: "text-xs tabular-nums text-muted-foreground", children: nextRetryInMs && nextRetryInMs > 0 ? t2("connection.retryingIn", {
3120
+ headline && /* @__PURE__ */ jsx31("p", { className: "text-sm font-semibold tracking-tight text-foreground", children: headline }),
3121
+ detail && /* @__PURE__ */ jsx31("p", { className: "font-mono text-xs text-muted-foreground", children: detail }),
3122
+ unavailable?.hint && /* @__PURE__ */ jsx31("p", { className: "text-xs leading-snug text-muted-foreground", children: unavailable.hint }),
3123
+ failed && !unavailable && reason && /* @__PURE__ */ jsx31("p", { className: "line-clamp-3 text-xs leading-snug text-destructive/80", children: reason }),
3124
+ showCountdown && /* @__PURE__ */ jsx31("p", { className: "text-xs tabular-nums text-muted-foreground", children: nextRetryInMs && nextRetryInMs > 0 ? t2("connection.retryingIn", {
3211
3125
  seconds: Math.ceil(nextRetryInMs / 1e3),
3212
3126
  attempt,
3213
3127
  max: maxAttempts
@@ -3216,7 +3130,7 @@ function ConnectionScreen({
3216
3130
  max: maxAttempts
3217
3131
  }) })
3218
3132
  ] }),
3219
- (showRetryButton || (failed || unavailable) && extraActions || unavailable?.action) && /* @__PURE__ */ jsxs20("div", { className: "flex flex-wrap justify-center gap-2 pt-0.5", children: [
3133
+ (showRetryButton || showClose || stopped && extraActions || unavailable?.action) && /* @__PURE__ */ jsxs20("div", { className: "flex flex-wrap justify-center gap-2 pt-0.5", children: [
3220
3134
  showRetryButton && /* @__PURE__ */ jsxs20(
3221
3135
  Button,
3222
3136
  {
@@ -3225,21 +3139,34 @@ function ConnectionScreen({
3225
3139
  onClick: onManualRetry,
3226
3140
  className: "gap-2 font-semibold",
3227
3141
  children: [
3228
- /* @__PURE__ */ jsx32(RefreshCw, { className: "size-3.5" }),
3229
- retrying ? t2("connection.retryNow") : retryLabel || t2("connection.reconnect")
3142
+ /* @__PURE__ */ jsx31(RefreshCw, { className: "size-3.5" }),
3143
+ retrying ? t2("connection.retryNow") : t2("connection.reconnect")
3230
3144
  ]
3231
3145
  }
3232
3146
  ),
3233
3147
  unavailable?.action,
3234
- (failed || unavailable) && extraActions
3148
+ stopped && extraActions,
3149
+ showClose && /* @__PURE__ */ jsxs20(
3150
+ Button,
3151
+ {
3152
+ variant: "outline",
3153
+ size: "sm",
3154
+ onClick: close,
3155
+ className: "gap-2 font-semibold",
3156
+ children: [
3157
+ /* @__PURE__ */ jsx31(X, { className: "size-3.5" }),
3158
+ t2("connection.close")
3159
+ ]
3160
+ }
3161
+ )
3235
3162
  ] })
3236
3163
  ] }) }),
3237
- showLog && /* @__PURE__ */ jsx32(
3164
+ showLog && /* @__PURE__ */ jsx31(
3238
3165
  ConnectionLogPanel,
3239
3166
  {
3240
3167
  isConnecting: connecting,
3241
3168
  isConnected: false,
3242
- hasConnectionError: failed || !!unavailable,
3169
+ hasConnectionError: stopped,
3243
3170
  position: logPosition
3244
3171
  }
3245
3172
  )
@@ -3252,7 +3179,7 @@ function ConnectionMark({
3252
3179
  }) {
3253
3180
  return /* @__PURE__ */ jsxs20("div", { className: "relative size-9", "aria-hidden": "true", children: [
3254
3181
  /* @__PURE__ */ jsxs20("svg", { viewBox: "0 0 36 36", className: "size-full", children: [
3255
- /* @__PURE__ */ jsx32(
3182
+ /* @__PURE__ */ jsx31(
3256
3183
  "circle",
3257
3184
  {
3258
3185
  cx: "18",
@@ -3263,7 +3190,7 @@ function ConnectionMark({
3263
3190
  className: "stroke-border"
3264
3191
  }
3265
3192
  ),
3266
- state === "busy" && /* @__PURE__ */ jsx32(
3193
+ state === "busy" && /* @__PURE__ */ jsx31(
3267
3194
  "circle",
3268
3195
  {
3269
3196
  cx: "18",
@@ -3277,7 +3204,7 @@ function ConnectionMark({
3277
3204
  }
3278
3205
  )
3279
3206
  ] }),
3280
- state !== "busy" && /* @__PURE__ */ jsx32(
3207
+ state !== "busy" && /* @__PURE__ */ jsx31(
3281
3208
  "span",
3282
3209
  {
3283
3210
  className: cn(
@@ -3290,7 +3217,7 @@ function ConnectionMark({
3290
3217
  }
3291
3218
 
3292
3219
  // src/ui/components/FullScreenAppWrapper.tsx
3293
- import { useEffect as useEffect11, useState as useState14 } from "react";
3220
+ import { useEffect as useEffect10, useState as useState13 } from "react";
3294
3221
 
3295
3222
  // src/ui/components/sidebar.tsx
3296
3223
  import { useTranslation as useTranslation8 } from "react-i18next";
@@ -3298,31 +3225,31 @@ import * as React7 from "react";
3298
3225
 
3299
3226
  // src/ui/components/sheet.tsx
3300
3227
  import { useTranslation as useTranslation7 } from "react-i18next";
3301
- import { jsx as jsx33, jsxs as jsxs21 } from "react/jsx-runtime";
3228
+ import { jsx as jsx32, jsxs as jsxs21 } from "react/jsx-runtime";
3302
3229
  function Sheet({ ...props }) {
3303
- return /* @__PURE__ */ jsx33(dist_exports2.Root, { "data-slot": "sheet", ...props });
3230
+ return /* @__PURE__ */ jsx32(dist_exports.Root, { "data-slot": "sheet", ...props });
3304
3231
  }
3305
3232
  function SheetTrigger({
3306
3233
  ...props
3307
3234
  }) {
3308
- return /* @__PURE__ */ jsx33(dist_exports2.Trigger, { "data-slot": "sheet-trigger", ...props });
3235
+ return /* @__PURE__ */ jsx32(dist_exports.Trigger, { "data-slot": "sheet-trigger", ...props });
3309
3236
  }
3310
3237
  function SheetClose({
3311
3238
  ...props
3312
3239
  }) {
3313
- return /* @__PURE__ */ jsx33(dist_exports2.Close, { "data-slot": "sheet-close", ...props });
3240
+ return /* @__PURE__ */ jsx32(dist_exports.Close, { "data-slot": "sheet-close", ...props });
3314
3241
  }
3315
3242
  function SheetPortal({
3316
3243
  ...props
3317
3244
  }) {
3318
- return /* @__PURE__ */ jsx33(dist_exports2.Portal, { "data-slot": "sheet-portal", ...props });
3245
+ return /* @__PURE__ */ jsx32(dist_exports.Portal, { "data-slot": "sheet-portal", ...props });
3319
3246
  }
3320
3247
  function SheetOverlay({
3321
3248
  className,
3322
3249
  ...props
3323
3250
  }) {
3324
- return /* @__PURE__ */ jsx33(
3325
- dist_exports2.Overlay,
3251
+ return /* @__PURE__ */ jsx32(
3252
+ dist_exports.Overlay,
3326
3253
  {
3327
3254
  "data-slot": "sheet-overlay",
3328
3255
  className: cn(
@@ -3342,9 +3269,9 @@ function SheetContent({
3342
3269
  }) {
3343
3270
  const { t: t2 } = useTranslation7();
3344
3271
  return /* @__PURE__ */ jsxs21(SheetPortal, { children: [
3345
- /* @__PURE__ */ jsx33(SheetOverlay, {}),
3272
+ /* @__PURE__ */ jsx32(SheetOverlay, {}),
3346
3273
  /* @__PURE__ */ jsxs21(
3347
- dist_exports2.Content,
3274
+ dist_exports.Content,
3348
3275
  {
3349
3276
  "data-slot": "sheet-content",
3350
3277
  "data-side": side,
@@ -3355,15 +3282,15 @@ function SheetContent({
3355
3282
  ...props,
3356
3283
  children: [
3357
3284
  children,
3358
- showCloseButton && /* @__PURE__ */ jsx33(dist_exports2.Close, { "data-slot": "sheet-close", asChild: true, children: /* @__PURE__ */ jsxs21(
3285
+ showCloseButton && /* @__PURE__ */ jsx32(dist_exports.Close, { "data-slot": "sheet-close", asChild: true, children: /* @__PURE__ */ jsxs21(
3359
3286
  Button,
3360
3287
  {
3361
3288
  variant: "ghost",
3362
3289
  className: "absolute top-3 right-3",
3363
3290
  size: "icon-sm",
3364
3291
  children: [
3365
- /* @__PURE__ */ jsx33(X, {}),
3366
- /* @__PURE__ */ jsx33("span", { className: "sr-only", children: t2("common.close") })
3292
+ /* @__PURE__ */ jsx32(X, {}),
3293
+ /* @__PURE__ */ jsx32("span", { className: "sr-only", children: t2("common.close") })
3367
3294
  ]
3368
3295
  }
3369
3296
  ) })
@@ -3373,7 +3300,7 @@ function SheetContent({
3373
3300
  ] });
3374
3301
  }
3375
3302
  function SheetHeader({ className, ...props }) {
3376
- return /* @__PURE__ */ jsx33(
3303
+ return /* @__PURE__ */ jsx32(
3377
3304
  "div",
3378
3305
  {
3379
3306
  "data-slot": "sheet-header",
@@ -3383,7 +3310,7 @@ function SheetHeader({ className, ...props }) {
3383
3310
  );
3384
3311
  }
3385
3312
  function SheetFooter({ className, ...props }) {
3386
- return /* @__PURE__ */ jsx33(
3313
+ return /* @__PURE__ */ jsx32(
3387
3314
  "div",
3388
3315
  {
3389
3316
  "data-slot": "sheet-footer",
@@ -3396,8 +3323,8 @@ function SheetTitle({
3396
3323
  className,
3397
3324
  ...props
3398
3325
  }) {
3399
- return /* @__PURE__ */ jsx33(
3400
- dist_exports2.Title,
3326
+ return /* @__PURE__ */ jsx32(
3327
+ dist_exports.Title,
3401
3328
  {
3402
3329
  "data-slot": "sheet-title",
3403
3330
  className: cn(
@@ -3412,8 +3339,8 @@ function SheetDescription({
3412
3339
  className,
3413
3340
  ...props
3414
3341
  }) {
3415
- return /* @__PURE__ */ jsx33(
3416
- dist_exports2.Description,
3342
+ return /* @__PURE__ */ jsx32(
3343
+ dist_exports.Description,
3417
3344
  {
3418
3345
  "data-slot": "sheet-description",
3419
3346
  className: cn("text-xs/relaxed text-muted-foreground", className),
@@ -3423,7 +3350,7 @@ function SheetDescription({
3423
3350
  }
3424
3351
 
3425
3352
  // src/ui/components/sidebar.tsx
3426
- import { jsx as jsx34, jsxs as jsxs22 } from "react/jsx-runtime";
3353
+ import { jsx as jsx33, jsxs as jsxs22 } from "react/jsx-runtime";
3427
3354
  var SIDEBAR_COOKIE_NAME = "sidebar_state";
3428
3355
  var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
3429
3356
  var SIDEBAR_WIDTH = "16rem";
@@ -3481,7 +3408,7 @@ function SidebarProvider({
3481
3408
  }),
3482
3409
  [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
3483
3410
  );
3484
- return /* @__PURE__ */ jsx34(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx34(
3411
+ return /* @__PURE__ */ jsx33(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx33(
3485
3412
  "div",
3486
3413
  {
3487
3414
  "data-slot": "sidebar-wrapper",
@@ -3520,8 +3447,23 @@ var sidebarMenuButtonVariants = cva(
3520
3447
  }
3521
3448
  );
3522
3449
 
3450
+ // src/ui/lib/embedded-frame.ts
3451
+ function isInMobileWebView() {
3452
+ return /Termix-Mobile\/(Android|iOS)/.test(navigator.userAgent) || !!window.ReactNativeWebView;
3453
+ }
3454
+ function isInElectronWebView() {
3455
+ if (isInMobileWebView()) return false;
3456
+ if (window.IS_ELECTRON_WEBVIEW) return true;
3457
+ try {
3458
+ if (window.self !== window.top) return true;
3459
+ } catch {
3460
+ return true;
3461
+ }
3462
+ return false;
3463
+ }
3464
+
3523
3465
  // src/ui/auth/Auth.tsx
3524
- import { useState as useState13, useEffect as useEffect10, useCallback as useCallback6, useRef as useRef4 } from "react";
3466
+ import { useState as useState12, useEffect as useEffect9, useCallback as useCallback6, useRef as useRef4 } from "react";
3525
3467
  import { toast as toast2 } from "sonner";
3526
3468
  import { useTranslation as useTranslation11 } from "react-i18next";
3527
3469
 
@@ -3541,22 +3483,46 @@ async function getEmbeddedServerFailure() {
3541
3483
  }
3542
3484
 
3543
3485
  // src/ui/lib/plugin-icon.tsx
3544
- import { jsx as jsx35 } from "react/jsx-runtime";
3486
+ import { jsx as jsx34 } from "react/jsx-runtime";
3545
3487
  function PluginIcon({
3546
3488
  name: name2,
3547
3489
  ...props
3548
3490
  }) {
3549
3491
  const Icon = name2 && icons_exports[name2] || Puzzle;
3550
- return /* @__PURE__ */ jsx35(Icon, { ...props });
3492
+ return /* @__PURE__ */ jsx34(Icon, { ...props });
3551
3493
  }
3552
3494
 
3553
3495
  // src/ui/settings/HostPluginSections.tsx
3554
- import { useEffect as useEffect7, useMemo as useMemo4, useState as useState10 } from "react";
3496
+ import { useMemo as useMemo4 } from "react";
3555
3497
  import { useTranslation as useTranslation10 } from "react-i18next";
3556
3498
 
3499
+ // src/ui/hooks/use-installed-plugins.ts
3500
+ import { useEffect as useEffect7, useState as useState10 } from "react";
3501
+ function useInstalledPlugins() {
3502
+ const [plugins, setPlugins] = useState10([]);
3503
+ useEffect7(() => {
3504
+ let cancelled = false;
3505
+ let request = 0;
3506
+ const load = () => {
3507
+ const current = ++request;
3508
+ void getPlugins().then((loaded) => {
3509
+ if (!cancelled && current === request) setPlugins(loaded);
3510
+ }).catch(() => {
3511
+ });
3512
+ };
3513
+ load();
3514
+ window.addEventListener(PLUGINS_CHANGED_EVENT, load);
3515
+ return () => {
3516
+ cancelled = true;
3517
+ window.removeEventListener(PLUGINS_CHANGED_EVENT, load);
3518
+ };
3519
+ }, []);
3520
+ return plugins;
3521
+ }
3522
+
3557
3523
  // src/ui/settings/SettingsFields.tsx
3558
3524
  import { useTranslation as useTranslation9 } from "react-i18next";
3559
- import { Fragment as Fragment4, jsx as jsx36, jsxs as jsxs23 } from "react/jsx-runtime";
3525
+ import { Fragment as Fragment4, jsx as jsx35, jsxs as jsxs23 } from "react/jsx-runtime";
3560
3526
  function SettingsFieldRow({
3561
3527
  pluginId,
3562
3528
  field,
@@ -3573,7 +3539,7 @@ function SettingsFieldRow({
3573
3539
  if (field.type === "custom") {
3574
3540
  const Component = getSettingsComponent(pluginId, field.component);
3575
3541
  if (!Component) return null;
3576
- return /* @__PURE__ */ jsx36(
3542
+ return /* @__PURE__ */ jsx35(
3577
3543
  Component,
3578
3544
  {
3579
3545
  pluginId,
@@ -3587,9 +3553,9 @@ function SettingsFieldRow({
3587
3553
  const readOnly2 = disabled || !running;
3588
3554
  const description = field.descriptionKey ? /* @__PURE__ */ jsxs23(Fragment4, { children: [
3589
3555
  label(field.descriptionKey),
3590
- error && /* @__PURE__ */ jsx36("span", { className: "block text-destructive mt-0.5", children: error })
3591
- ] }) : error ? /* @__PURE__ */ jsx36("span", { className: "text-destructive", children: error }) : void 0;
3592
- const control = /* @__PURE__ */ jsx36(
3556
+ error && /* @__PURE__ */ jsx35("span", { className: "block text-destructive mt-0.5", children: error })
3557
+ ] }) : error ? /* @__PURE__ */ jsx35("span", { className: "text-destructive", children: error }) : void 0;
3558
+ const control = /* @__PURE__ */ jsx35(
3593
3559
  FieldControl,
3594
3560
  {
3595
3561
  pluginId,
@@ -3600,7 +3566,7 @@ function SettingsFieldRow({
3600
3566
  }
3601
3567
  );
3602
3568
  if (field.type === "boolean") {
3603
- return /* @__PURE__ */ jsx36(
3569
+ return /* @__PURE__ */ jsx35(
3604
3570
  SettingRow,
3605
3571
  {
3606
3572
  label: label(field.labelKey),
@@ -3611,14 +3577,14 @@ function SettingsFieldRow({
3611
3577
  }
3612
3578
  );
3613
3579
  }
3614
- return /* @__PURE__ */ jsx36(DefaultsOnly, { settingKey: defaultKey ?? "", children: /* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-1.5 py-3 border-b border-border last:border-0 min-w-0", children: [
3580
+ return /* @__PURE__ */ jsx35(DefaultsOnly, { settingKey: defaultKey ?? "", children: /* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-1.5 py-3 border-b border-border last:border-0 min-w-0", children: [
3615
3581
  /* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-1.5 flex-wrap", children: [
3616
- /* @__PURE__ */ jsx36("span", { className: "text-sm font-medium leading-snug", children: label(field.labelKey) }),
3617
- error && /* @__PURE__ */ jsx36("span", { className: "text-[10px] font-bold text-warning border border-warning/40 px-1 shrink-0", children: t2("common.error") }),
3618
- defaultKey && /* @__PURE__ */ jsx36(HostDefaultBadge, { settingKey: defaultKey })
3582
+ /* @__PURE__ */ jsx35("span", { className: "text-sm font-medium leading-snug", children: label(field.labelKey) }),
3583
+ error && /* @__PURE__ */ jsx35("span", { className: "text-[10px] font-bold text-warning border border-warning/40 px-1 shrink-0", children: t2("common.error") }),
3584
+ defaultKey && /* @__PURE__ */ jsx35(HostDefaultBadge, { settingKey: defaultKey })
3619
3585
  ] }),
3620
- description && /* @__PURE__ */ jsx36("span", { className: "text-xs text-muted-foreground leading-snug", children: description }),
3621
- /* @__PURE__ */ jsx36("div", { className: "min-w-0", children: control })
3586
+ description && /* @__PURE__ */ jsx35("span", { className: "text-xs text-muted-foreground leading-snug", children: description }),
3587
+ /* @__PURE__ */ jsx35("div", { className: "min-w-0", children: control })
3622
3588
  ] }) });
3623
3589
  }
3624
3590
  function FieldControl({
@@ -3633,7 +3599,7 @@ function FieldControl({
3633
3599
  const placeholder2 = field.placeholderKey ? label(field.placeholderKey) : void 0;
3634
3600
  switch (field.type) {
3635
3601
  case "boolean":
3636
- return /* @__PURE__ */ jsx36(
3602
+ return /* @__PURE__ */ jsx35(
3637
3603
  FakeSwitch,
3638
3604
  {
3639
3605
  checked: value === true,
@@ -3642,7 +3608,7 @@ function FieldControl({
3642
3608
  }
3643
3609
  );
3644
3610
  case "number":
3645
- return /* @__PURE__ */ jsx36(
3611
+ return /* @__PURE__ */ jsx35(
3646
3612
  Input,
3647
3613
  {
3648
3614
  type: "number",
@@ -3666,19 +3632,19 @@ function FieldControl({
3666
3632
  value: typeof value === "string" ? value : "",
3667
3633
  onValueChange: (next) => setValue(field.key, next),
3668
3634
  children: [
3669
- /* @__PURE__ */ jsx36(SelectTrigger2, { className: "h-8 w-full min-w-0 text-sm", children: /* @__PURE__ */ jsx36(SelectValue2, { placeholder: placeholder2 }) }),
3670
- /* @__PURE__ */ jsx36(SelectContent2, { children: (field.options ?? []).map((option) => /* @__PURE__ */ jsx36(SelectItem2, { value: option.value, children: label(option.labelKey) }, option.value)) })
3635
+ /* @__PURE__ */ jsx35(SelectTrigger2, { className: "h-8 w-full min-w-0 text-sm", children: /* @__PURE__ */ jsx35(SelectValue2, { placeholder: placeholder2 }) }),
3636
+ /* @__PURE__ */ jsx35(SelectContent2, { children: (field.options ?? []).map((option) => /* @__PURE__ */ jsx35(SelectItem2, { value: option.value, children: label(option.labelKey) }, option.value)) })
3671
3637
  ]
3672
3638
  }
3673
3639
  );
3674
3640
  case "multiselect": {
3675
3641
  const selected = Array.isArray(value) ? value : [];
3676
- return /* @__PURE__ */ jsx36("div", { className: "flex flex-col gap-1.5", children: (field.options ?? []).map((option) => /* @__PURE__ */ jsxs23(
3642
+ return /* @__PURE__ */ jsx35("div", { className: "flex flex-col gap-1.5", children: (field.options ?? []).map((option) => /* @__PURE__ */ jsxs23(
3677
3643
  "label",
3678
3644
  {
3679
3645
  className: "flex items-center gap-2 text-xs text-muted-foreground",
3680
3646
  children: [
3681
- /* @__PURE__ */ jsx36(
3647
+ /* @__PURE__ */ jsx35(
3682
3648
  Checkbox2,
3683
3649
  {
3684
3650
  disabled: readOnly2,
@@ -3689,14 +3655,14 @@ function FieldControl({
3689
3655
  )
3690
3656
  }
3691
3657
  ),
3692
- /* @__PURE__ */ jsx36("span", { children: label(option.labelKey) })
3658
+ /* @__PURE__ */ jsx35("span", { children: label(option.labelKey) })
3693
3659
  ]
3694
3660
  },
3695
3661
  option.value
3696
3662
  )) });
3697
3663
  }
3698
3664
  case "secret":
3699
- return /* @__PURE__ */ jsx36(
3665
+ return /* @__PURE__ */ jsx35(
3700
3666
  SecretControl,
3701
3667
  {
3702
3668
  field,
@@ -3708,7 +3674,7 @@ function FieldControl({
3708
3674
  );
3709
3675
  case "textarea":
3710
3676
  case "json":
3711
- return /* @__PURE__ */ jsx36(
3677
+ return /* @__PURE__ */ jsx35(
3712
3678
  Textarea,
3713
3679
  {
3714
3680
  className: "w-full text-sm font-mono min-h-16",
@@ -3719,7 +3685,7 @@ function FieldControl({
3719
3685
  }
3720
3686
  );
3721
3687
  default:
3722
- return /* @__PURE__ */ jsx36(
3688
+ return /* @__PURE__ */ jsx35(
3723
3689
  Input,
3724
3690
  {
3725
3691
  className: "h-8 w-full text-sm",
@@ -3743,8 +3709,8 @@ function SecretControl({
3743
3709
  const stored = redacted && value.set;
3744
3710
  if (redacted) {
3745
3711
  return /* @__PURE__ */ jsxs23("div", { className: "flex flex-wrap items-center gap-2", children: [
3746
- /* @__PURE__ */ jsx36("span", { className: "text-xs text-muted-foreground", children: stored ? t2("settings.secretSet") : t2("settings.secretNotSet") }),
3747
- /* @__PURE__ */ jsx36(
3712
+ /* @__PURE__ */ jsx35("span", { className: "text-xs text-muted-foreground", children: stored ? t2("settings.secretSet") : t2("settings.secretNotSet") }),
3713
+ /* @__PURE__ */ jsx35(
3748
3714
  Button,
3749
3715
  {
3750
3716
  variant: "outline",
@@ -3758,7 +3724,7 @@ function SecretControl({
3758
3724
  ] });
3759
3725
  }
3760
3726
  return /* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-2 min-w-0", children: [
3761
- /* @__PURE__ */ jsx36("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsx36(
3727
+ /* @__PURE__ */ jsx35("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsx35(
3762
3728
  PasswordInput,
3763
3729
  {
3764
3730
  className: "h-8 w-full text-sm",
@@ -3768,7 +3734,7 @@ function SecretControl({
3768
3734
  onChange: (event) => setValue(field.key, event.target.value)
3769
3735
  }
3770
3736
  ) }),
3771
- /* @__PURE__ */ jsx36(
3737
+ /* @__PURE__ */ jsx35(
3772
3738
  Button,
3773
3739
  {
3774
3740
  variant: "ghost",
@@ -3791,19 +3757,9 @@ function hasVisibleFields(fields) {
3791
3757
  }
3792
3758
 
3793
3759
  // src/ui/settings/HostPluginSections.tsx
3794
- import { jsx as jsx37, jsxs as jsxs24 } from "react/jsx-runtime";
3760
+ import { jsx as jsx36, jsxs as jsxs24 } from "react/jsx-runtime";
3795
3761
  function usePluginHostSections() {
3796
- const [plugins, setPlugins] = useState10([]);
3797
- useEffect7(() => {
3798
- let cancelled = false;
3799
- void getPlugins().then((loaded) => {
3800
- if (!cancelled) setPlugins(loaded);
3801
- }).catch(() => {
3802
- });
3803
- return () => {
3804
- cancelled = true;
3805
- };
3806
- }, []);
3762
+ const plugins = useInstalledPlugins();
3807
3763
  return useMemo4(
3808
3764
  () => plugins.filter((plugin) => {
3809
3765
  if (!plugin.enabled) return false;
@@ -3829,7 +3785,7 @@ function HostPluginSections({
3829
3785
  setValue
3830
3786
  }) {
3831
3787
  if (plugins.length === 0) return null;
3832
- return /* @__PURE__ */ jsx37("div", { className: "flex flex-col gap-2", children: plugins.map((plugin) => /* @__PURE__ */ jsx37(
3788
+ return /* @__PURE__ */ jsx36("div", { className: "flex flex-col gap-2", children: plugins.map((plugin) => /* @__PURE__ */ jsx36(
3833
3789
  HostPluginSection,
3834
3790
  {
3835
3791
  plugin,
@@ -3847,7 +3803,7 @@ function HostFeatureFields({
3847
3803
  const plugin = usePluginHostSections().find((p) => p.id === pluginId);
3848
3804
  if (!plugin) return null;
3849
3805
  const values = form?.pluginSettings ?? {};
3850
- return /* @__PURE__ */ jsx37(
3806
+ return /* @__PURE__ */ jsx36(
3851
3807
  HostPluginSection,
3852
3808
  {
3853
3809
  plugin,
@@ -3881,10 +3837,10 @@ function HostPluginSection({
3881
3837
  SectionCard,
3882
3838
  {
3883
3839
  title: plugin.name,
3884
- icon: /* @__PURE__ */ jsx37(PluginIcon, { name: plugin.icon, className: "size-3.5" }),
3840
+ icon: /* @__PURE__ */ jsx36(PluginIcon, { name: plugin.icon, className: "size-3.5" }),
3885
3841
  children: [
3886
- !running && /* @__PURE__ */ jsx37("div", { className: "my-3 border border-warning/40 bg-warning/10 px-3 py-2 text-xs text-warning", children: t2("settings.featureUnavailable", { name: plugin.name }) }),
3887
- enableKey && /* @__PURE__ */ jsx37(
3842
+ !running && /* @__PURE__ */ jsx36("div", { className: "my-3 border border-warning/40 bg-warning/10 px-3 py-2 text-xs text-warning", children: t2("settings.featureUnavailable", { name: plugin.name }) }),
3843
+ enableKey && /* @__PURE__ */ jsx36(
3888
3844
  SettingsFieldRow,
3889
3845
  {
3890
3846
  pluginId: plugin.id,
@@ -3900,7 +3856,7 @@ function HostPluginSection({
3900
3856
  defaultKey: `${plugin.id}.${enableKey}`
3901
3857
  }
3902
3858
  ),
3903
- enabled && host.fields.filter((field) => isFieldShown(field, shown)).map((field) => /* @__PURE__ */ jsx37(
3859
+ enabled && host.fields.filter((field) => isFieldShown(field, shown)).map((field) => /* @__PURE__ */ jsx36(
3904
3860
  SettingsFieldRow,
3905
3861
  {
3906
3862
  pluginId: plugin.id,
@@ -3918,7 +3874,7 @@ function HostPluginSection({
3918
3874
  }
3919
3875
 
3920
3876
  // src/ui/sidebar/host-defaults/catalog.ts
3921
- import { useEffect as useEffect8, useMemo as useMemo5, useState as useState11 } from "react";
3877
+ import { useMemo as useMemo5 } from "react";
3922
3878
 
3923
3879
  // src/types/host-defaults.ts
3924
3880
  var HOST_DEFAULTS_LEVELS = [
@@ -4141,7 +4097,7 @@ var CORE_EDITOR_KEYS = CORE_HOST_DEFAULTS.map(
4141
4097
  );
4142
4098
 
4143
4099
  // src/ui/settings/host-feature-tabs.tsx
4144
- import { jsx as jsx38 } from "react/jsx-runtime";
4100
+ import { jsx as jsx37 } from "react/jsx-runtime";
4145
4101
  var TAB_PREFIX = "feature:";
4146
4102
  function hostFeatureTabId(pluginId) {
4147
4103
  return `${TAB_PREFIX}${pluginId}`;
@@ -4195,8 +4151,8 @@ function syncHostFeatureTabs(plugins) {
4195
4151
  label: plugin.name,
4196
4152
  // Nothing but the plugin's host settings, so it works for defaults too.
4197
4153
  defaults: ownSections.has(plugin.id) ? "only" : true,
4198
- icon: icon ? ({ className }) => /* @__PURE__ */ jsx38(PluginIcon, { name: icon, className }) : void 0,
4199
- component: ({ form, setField }) => /* @__PURE__ */ jsx38(
4154
+ icon: icon ? ({ className }) => /* @__PURE__ */ jsx37(PluginIcon, { name: icon, className }) : void 0,
4155
+ component: ({ form, setField }) => /* @__PURE__ */ jsx37(
4200
4156
  HostPluginSections,
4201
4157
  {
4202
4158
  plugins: [plugin],
@@ -4450,6 +4406,26 @@ function enqueue(task) {
4450
4406
  queue = queue.then(task, task);
4451
4407
  return queue;
4452
4408
  }
4409
+ function syncPlugins(summaries) {
4410
+ return enqueue(async () => {
4411
+ let list = summaries;
4412
+ if (!list) {
4413
+ try {
4414
+ list = await currentDeps().fetchPlugins();
4415
+ } catch (error) {
4416
+ console.error("[plugins] could not load the plugin list", error);
4417
+ if (!getPluginStoreState().loaded) setPluginSummaries([]);
4418
+ markPluginsSettled();
4419
+ return;
4420
+ }
4421
+ }
4422
+ await reconcile(list);
4423
+ markPluginsSettled();
4424
+ });
4425
+ }
4426
+ import.meta.hot?.on("termix:plugins-reloaded", () => {
4427
+ if (started) void syncPlugins();
4428
+ });
4453
4429
  async function fetchPreLoginPlugins() {
4454
4430
  const response = await fetch(getBackendUrl("/plugins/public-manifest"));
4455
4431
  if (!response.ok) return [];
@@ -4485,11 +4461,11 @@ import {
4485
4461
  createContext as createContext4,
4486
4462
  useCallback as useCallback5,
4487
4463
  useContext as useContext4,
4488
- useEffect as useEffect9,
4464
+ useEffect as useEffect8,
4489
4465
  useMemo as useMemo6,
4490
- useState as useState12
4466
+ useState as useState11
4491
4467
  } from "react";
4492
- import { jsx as jsx39 } from "react/jsx-runtime";
4468
+ import { jsx as jsx38 } from "react/jsx-runtime";
4493
4469
  var DEFAULT_APP_NAME = "Termix";
4494
4470
  var BrandingContext = createContext4({
4495
4471
  ready: false,
@@ -4504,14 +4480,14 @@ function useBranding() {
4504
4480
  }
4505
4481
 
4506
4482
  // src/ui/auth/auth-bits.tsx
4507
- import { jsx as jsx40, jsxs as jsxs25 } from "react/jsx-runtime";
4483
+ import { jsx as jsx39, jsxs as jsxs25 } from "react/jsx-runtime";
4508
4484
  function BrandPanel({
4509
4485
  logo,
4510
4486
  appName,
4511
4487
  tagline
4512
4488
  }) {
4513
4489
  return /* @__PURE__ */ jsxs25("div", { className: "relative hidden w-[46%] max-w-[560px] shrink-0 select-none flex-col justify-between overflow-hidden border-r border-border bg-sidebar p-10 lg:flex", children: [
4514
- /* @__PURE__ */ jsx40(
4490
+ /* @__PURE__ */ jsx39(
4515
4491
  "div",
4516
4492
  {
4517
4493
  className: "absolute inset-0 opacity-70",
@@ -4521,16 +4497,16 @@ function BrandPanel({
4521
4497
  }
4522
4498
  }
4523
4499
  ),
4524
- /* @__PURE__ */ jsx40("div", { className: "absolute inset-x-0 top-0 h-px bg-accent-brand/60" }),
4500
+ /* @__PURE__ */ jsx39("div", { className: "absolute inset-x-0 top-0 h-px bg-accent-brand/60" }),
4525
4501
  /* @__PURE__ */ jsxs25("div", { className: "relative flex items-center gap-3", children: [
4526
- logo && /* @__PURE__ */ jsx40("img", { src: logo, alt: "", className: "size-8 object-contain" }),
4527
- /* @__PURE__ */ jsx40("span", { className: "font-mono text-lg font-bold uppercase tracking-[0.35em]", children: appName })
4502
+ logo && /* @__PURE__ */ jsx39("img", { src: logo, alt: "", className: "size-8 object-contain" }),
4503
+ /* @__PURE__ */ jsx39("span", { className: "font-mono text-lg font-bold uppercase tracking-[0.35em]", children: appName })
4528
4504
  ] }),
4529
4505
  /* @__PURE__ */ jsxs25("div", { className: "relative max-w-[380px]", children: [
4530
- /* @__PURE__ */ jsx40("h2", { className: "text-2xl font-semibold leading-tight tracking-tight", children: tagline }),
4531
- /* @__PURE__ */ jsx40("div", { className: "mt-4 h-px w-10 bg-accent-brand" })
4506
+ /* @__PURE__ */ jsx39("h2", { className: "text-2xl font-semibold leading-tight tracking-tight", children: tagline }),
4507
+ /* @__PURE__ */ jsx39("div", { className: "mt-4 h-px w-10 bg-accent-brand" })
4532
4508
  ] }),
4533
- /* @__PURE__ */ jsx40("div", { className: "relative h-3" })
4509
+ /* @__PURE__ */ jsx39("div", { className: "relative h-3" })
4534
4510
  ] });
4535
4511
  }
4536
4512
  function CompactBrand({
@@ -4538,8 +4514,8 @@ function CompactBrand({
4538
4514
  appName
4539
4515
  }) {
4540
4516
  return /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2.5 lg:hidden", children: [
4541
- logo && /* @__PURE__ */ jsx40("img", { src: logo, alt: "", className: "size-7 object-contain" }),
4542
- /* @__PURE__ */ jsx40("span", { className: "font-mono text-sm font-bold uppercase tracking-[0.3em]", children: appName })
4517
+ logo && /* @__PURE__ */ jsx39("img", { src: logo, alt: "", className: "size-7 object-contain" }),
4518
+ /* @__PURE__ */ jsx39("span", { className: "font-mono text-sm font-bold uppercase tracking-[0.3em]", children: appName })
4543
4519
  ] });
4544
4520
  }
4545
4521
 
@@ -4563,7 +4539,7 @@ function removeSilentSigninFromSearch(search) {
4563
4539
  }
4564
4540
 
4565
4541
  // src/ui/auth/Auth.tsx
4566
- import { Fragment as Fragment5, jsx as jsx41, jsxs as jsxs26 } from "react/jsx-runtime";
4542
+ import { Fragment as Fragment5, jsx as jsx40, jsxs as jsxs26 } from "react/jsx-runtime";
4567
4543
  var LANGUAGES = [
4568
4544
  { code: "en", label: "English" },
4569
4545
  { code: "af", label: "Afrikaans" },
@@ -4608,8 +4584,8 @@ function LanguageRow({
4608
4584
  className
4609
4585
  }) {
4610
4586
  return /* @__PURE__ */ jsxs26("div", { className: cn("flex items-center justify-between gap-4", className), children: [
4611
- /* @__PURE__ */ jsx41("span", { className: "text-xs text-muted-foreground shrink-0", children: label }),
4612
- /* @__PURE__ */ jsx41(
4587
+ /* @__PURE__ */ jsx40("span", { className: "text-xs text-muted-foreground shrink-0", children: label }),
4588
+ /* @__PURE__ */ jsx40(
4613
4589
  Select22,
4614
4590
  {
4615
4591
  value,
@@ -4618,7 +4594,7 @@ function LanguageRow({
4618
4594
  align: "end",
4619
4595
  contentClassName: "w-56",
4620
4596
  className: "h-8 w-40 shrink-0 px-2.5 text-xs",
4621
- children: LANGUAGES.map((lang) => /* @__PURE__ */ jsx41("option", { value: lang.code, children: lang.label }, lang.code))
4597
+ children: LANGUAGES.map((lang) => /* @__PURE__ */ jsx40("option", { value: lang.code, children: lang.label }, lang.code))
4622
4598
  }
4623
4599
  )
4624
4600
  ] });
@@ -4641,17 +4617,6 @@ function storeAuth(username) {
4641
4617
  JSON.stringify({ loggedIn: true, username })
4642
4618
  );
4643
4619
  }
4644
- var isInMobileWebView = () => /Termix-Mobile\/(Android|iOS)/.test(navigator.userAgent) || !!window.ReactNativeWebView;
4645
- var isInElectronWebView = () => {
4646
- if (isInMobileWebView()) return false;
4647
- if (window.IS_ELECTRON_WEBVIEW) return true;
4648
- try {
4649
- if (window.self !== window.top) return true;
4650
- } catch {
4651
- return true;
4652
- }
4653
- return false;
4654
- };
4655
4620
  function PasswordInput2({
4656
4621
  value,
4657
4622
  onChange,
@@ -4659,9 +4624,9 @@ function PasswordInput2({
4659
4624
  disabled,
4660
4625
  id
4661
4626
  }) {
4662
- const [show, setShow] = useState13(false);
4627
+ const [show, setShow] = useState12(false);
4663
4628
  return /* @__PURE__ */ jsxs26("div", { className: "relative", children: [
4664
- /* @__PURE__ */ jsx41(
4629
+ /* @__PURE__ */ jsx40(
4665
4630
  Input,
4666
4631
  {
4667
4632
  id,
@@ -4673,14 +4638,14 @@ function PasswordInput2({
4673
4638
  className: "pr-9 font-mono"
4674
4639
  }
4675
4640
  ),
4676
- /* @__PURE__ */ jsx41(
4641
+ /* @__PURE__ */ jsx40(
4677
4642
  "button",
4678
4643
  {
4679
4644
  type: "button",
4680
4645
  tabIndex: -1,
4681
4646
  onClick: () => setShow((o) => !o),
4682
4647
  className: "absolute right-2.5 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors",
4683
- children: show ? /* @__PURE__ */ jsx41(EyeOff, { className: "size-4" }) : /* @__PURE__ */ jsx41(Eye, { className: "size-4" })
4648
+ children: show ? /* @__PURE__ */ jsx40(EyeOff, { className: "size-4" }) : /* @__PURE__ */ jsx40(Eye, { className: "size-4" })
4684
4649
  }
4685
4650
  )
4686
4651
  ] });
@@ -4689,7 +4654,7 @@ function FieldLabel({
4689
4654
  htmlFor,
4690
4655
  children
4691
4656
  }) {
4692
- return /* @__PURE__ */ jsx41(
4657
+ return /* @__PURE__ */ jsx40(
4693
4658
  "label",
4694
4659
  {
4695
4660
  htmlFor,
@@ -4704,7 +4669,7 @@ function Field({
4704
4669
  children
4705
4670
  }) {
4706
4671
  return /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-1.5", children: [
4707
- /* @__PURE__ */ jsx41(FieldLabel, { htmlFor, children: label }),
4672
+ /* @__PURE__ */ jsx40(FieldLabel, { htmlFor, children: label }),
4708
4673
  children
4709
4674
  ] });
4710
4675
  }
@@ -4712,22 +4677,22 @@ function Auth({ onLogin }) {
4712
4677
  const { t: t2 } = useTranslation11();
4713
4678
  const branding = useBranding();
4714
4679
  const localDesktopAuth = isElectron() && !isInElectronWebView();
4715
- const [view, setView] = useState13("login");
4716
- const [loading, setLoading] = useState13(false);
4717
- const [username, setUsername] = useState13("");
4718
- const [password, setPassword] = useState13("");
4719
- const [confirmPassword, setConfirmPassword] = useState13("");
4720
- const [rememberMe, setRememberMe] = useState13(() => {
4680
+ const [view, setView] = useState12("login");
4681
+ const [loading, setLoading] = useState12(false);
4682
+ const [username, setUsername] = useState12("");
4683
+ const [password, setPassword] = useState12("");
4684
+ const [confirmPassword, setConfirmPassword] = useState12("");
4685
+ const [rememberMe, setRememberMe] = useState12(() => {
4721
4686
  try {
4722
4687
  return localStorage.getItem("rememberMe") === "true";
4723
4688
  } catch {
4724
4689
  return false;
4725
4690
  }
4726
4691
  });
4727
- const [pendingToken, setPendingToken] = useState13("");
4728
- const [secondFactors, setSecondFactors] = useState13([]);
4729
- const [activeFactorId, setActiveFactorId] = useState13("");
4730
- const [authPluginsLoading, setAuthPluginsLoading] = useState13(true);
4692
+ const [pendingToken, setPendingToken] = useState12("");
4693
+ const [secondFactors, setSecondFactors] = useState12([]);
4694
+ const [activeFactorId, setActiveFactorId] = useState12("");
4695
+ const [authPluginsLoading, setAuthPluginsLoading] = useState12(true);
4731
4696
  const retryAuthPlugins = async () => {
4732
4697
  setAuthPluginsLoading(true);
4733
4698
  try {
@@ -4744,12 +4709,12 @@ function Auth({ onLogin }) {
4744
4709
  labelKey: ui.titleKey
4745
4710
  }));
4746
4711
  const currentFactorId = activeFactorId || shownFactors[0]?.id || "";
4747
- const [resetStep, setResetStep] = useState13("email");
4748
- const [resetCode, setResetCode] = useState13("");
4749
- const [newPassword, setNewPassword] = useState13("");
4750
- const [confirmNewPassword, setConfirmNewPassword] = useState13("");
4751
- const [resetTempToken, setResetTempToken] = useState13("");
4752
- const [language2, setLanguage] = useState13(
4712
+ const [resetStep, setResetStep] = useState12("email");
4713
+ const [resetCode, setResetCode] = useState12("");
4714
+ const [newPassword, setNewPassword] = useState12("");
4715
+ const [confirmNewPassword, setConfirmNewPassword] = useState12("");
4716
+ const [resetTempToken, setResetTempToken] = useState12("");
4717
+ const [language2, setLanguage] = useState12(
4753
4718
  () => normalizeLanguageCode(localStorage.getItem("i18nextLng"))
4754
4719
  );
4755
4720
  function handleLanguageChange(code2) {
@@ -4757,11 +4722,11 @@ function Auth({ onLogin }) {
4757
4722
  void changeAppLanguage(language3).then((language4) => setLanguage(language4)).catch(() => {
4758
4723
  });
4759
4724
  }
4760
- const [registrationAllowed, setRegistrationAllowed] = useState13(true);
4761
- const [passwordLoginAllowed, setPasswordLoginAllowed] = useState13(true);
4762
- const [passwordResetAllowed, setPasswordResetAllowed] = useState13(true);
4763
- const [authMethods, setAuthMethods] = useState13([]);
4764
- const [authMethodsLoaded, setAuthMethodsLoaded] = useState13(false);
4725
+ const [registrationAllowed, setRegistrationAllowed] = useState12(true);
4726
+ const [passwordLoginAllowed, setPasswordLoginAllowed] = useState12(true);
4727
+ const [passwordResetAllowed, setPasswordResetAllowed] = useState12(true);
4728
+ const [authMethods, setAuthMethods] = useState12([]);
4729
+ const [authMethodsLoaded, setAuthMethodsLoaded] = useState12(false);
4765
4730
  const inlineMethodIds = new Set(
4766
4731
  loginMethodUIs.filter((ui) => ui.placement === "inline").map((ui) => ui.id)
4767
4732
  );
@@ -4773,19 +4738,19 @@ function Auth({ onLogin }) {
4773
4738
  );
4774
4739
  const silentSigninHandledRef = useRef4(false);
4775
4740
  const proxySigninHandledRef = useRef4(false);
4776
- const [firstUser, setFirstUser] = useState13(false);
4777
- const [dbConnectionFailed, setDbConnectionFailed] = useState13(false);
4778
- const [dbHealthChecking, setDbHealthChecking] = useState13(
4741
+ const [firstUser, setFirstUser] = useState12(false);
4742
+ const [dbConnectionFailed, setDbConnectionFailed] = useState12(false);
4743
+ const [dbHealthChecking, setDbHealthChecking] = useState12(
4779
4744
  () => !localDesktopAuth || !hasDesktopManualLogout()
4780
4745
  );
4781
- const [webviewAuthSuccess, setWebviewAuthSuccess] = useState13(false);
4782
- const [desktopManualLogoutActive, setDesktopManualLogoutActive] = useState13(
4746
+ const [webviewAuthSuccess, setWebviewAuthSuccess] = useState12(false);
4747
+ const [desktopManualLogoutActive, setDesktopManualLogoutActive] = useState12(
4783
4748
  () => localDesktopAuth && hasDesktopManualLogout()
4784
4749
  );
4785
- const [desktopAutoSessionDone, setDesktopAutoSessionDone] = useState13(!localDesktopAuth || hasDesktopManualLogout() ? true : null);
4786
- const [desktopAutoSessionRetries, setDesktopAutoSessionRetries] = useState13(0);
4787
- const [embeddedServerFailure, setEmbeddedServerFailure] = useState13(null);
4788
- useEffect10(() => {
4750
+ const [desktopAutoSessionDone, setDesktopAutoSessionDone] = useState12(!localDesktopAuth || hasDesktopManualLogout() ? true : null);
4751
+ const [desktopAutoSessionRetries, setDesktopAutoSessionRetries] = useState12(0);
4752
+ const [embeddedServerFailure, setEmbeddedServerFailure] = useState12(null);
4753
+ useEffect9(() => {
4789
4754
  if (proxySigninHandledRef.current || isElectron()) return;
4790
4755
  proxySigninHandledRef.current = true;
4791
4756
  requestTrustedProxyLogin().then((result) => {
@@ -4799,13 +4764,13 @@ function Auth({ onLogin }) {
4799
4764
  }).catch(() => {
4800
4765
  });
4801
4766
  }, [onLogin]);
4802
- useEffect10(() => {
4767
+ useEffect9(() => {
4803
4768
  try {
4804
4769
  localStorage.setItem("rememberMe", rememberMe.toString());
4805
4770
  } catch {
4806
4771
  }
4807
4772
  }, [rememberMe]);
4808
- useEffect10(() => {
4773
+ useEffect9(() => {
4809
4774
  if (!isInElectronWebView()) return;
4810
4775
  const handleExternalBrowserResult = (event) => {
4811
4776
  if (event.source !== window.parent) return;
@@ -4825,7 +4790,7 @@ function Auth({ onLogin }) {
4825
4790
  window.addEventListener("message", handleExternalBrowserResult);
4826
4791
  return () => window.removeEventListener("message", handleExternalBrowserResult);
4827
4792
  }, [t2]);
4828
- useEffect10(() => {
4793
+ useEffect9(() => {
4829
4794
  if (localDesktopAuth) {
4830
4795
  setAuthMethodsLoaded(true);
4831
4796
  return;
@@ -4839,7 +4804,7 @@ function Auth({ onLogin }) {
4839
4804
  }).finally(() => setAuthPluginsLoading(false));
4840
4805
  getLoginMethods().then((methods) => setAuthMethods(methods)).catch(() => setAuthMethods([])).finally(() => setAuthMethodsLoaded(true));
4841
4806
  }, [localDesktopAuth]);
4842
- useEffect10(() => {
4807
+ useEffect9(() => {
4843
4808
  if (desktopAutoSessionDone !== true) return;
4844
4809
  if (localDesktopAuth) {
4845
4810
  setDbHealthChecking(false);
@@ -4877,7 +4842,7 @@ function Auth({ onLogin }) {
4877
4842
  if (retryTimer) clearTimeout(retryTimer);
4878
4843
  };
4879
4844
  }, [desktopAutoSessionDone, localDesktopAuth]);
4880
- useEffect10(() => {
4845
+ useEffect9(() => {
4881
4846
  if (desktopAutoSessionDone !== null) return;
4882
4847
  if (embeddedServerFailure) return;
4883
4848
  let cancelled = false;
@@ -4925,13 +4890,13 @@ function Auth({ onLogin }) {
4925
4890
  embeddedServerFailure,
4926
4891
  onLogin
4927
4892
  ]);
4928
- useEffect10(() => {
4893
+ useEffect9(() => {
4929
4894
  if (!authMethodsLoaded) return;
4930
4895
  if (!passwordLoginAllowed && externalMethods.length > 0 && view === "login") {
4931
4896
  setView("external");
4932
4897
  }
4933
4898
  }, [authMethodsLoaded, passwordLoginAllowed, externalMethods.length, view]);
4934
- useEffect10(() => {
4899
+ useEffect9(() => {
4935
4900
  const urlParams = new URLSearchParams(window.location.search);
4936
4901
  const success = urlParams.get("success");
4937
4902
  const error = urlParams.get("error");
@@ -5326,10 +5291,10 @@ function Auth({ onLogin }) {
5326
5291
  };
5327
5292
  if (ui) {
5328
5293
  const Component = ui.component;
5329
- return /* @__PURE__ */ jsx41(Component, { ...props }, method.id);
5294
+ return /* @__PURE__ */ jsx40(Component, { ...props }, method.id);
5330
5295
  }
5331
5296
  if (method.kind === "redirect") {
5332
- return method.instances.map((instance) => /* @__PURE__ */ jsx41(
5297
+ return method.instances.map((instance) => /* @__PURE__ */ jsx40(
5333
5298
  Button,
5334
5299
  {
5335
5300
  onClick: () => void startRedirect(method.id, instance.id),
@@ -5342,7 +5307,7 @@ function Auth({ onLogin }) {
5342
5307
  }
5343
5308
  return null;
5344
5309
  }
5345
- useEffect10(() => {
5310
+ useEffect9(() => {
5346
5311
  if (!authMethodsLoaded || silentSigninHandledRef.current) return;
5347
5312
  const autoStart = externalMethods.filter((method) => method.kind === "redirect").flatMap(
5348
5313
  (method) => method.instances.filter((instance) => instance.autoStart).map((instance) => ({ method, instance }))
@@ -5374,12 +5339,12 @@ function Auth({ onLogin }) {
5374
5339
  const detail = embeddedServerFailure.reason === "port-in-use" ? embeddedServerFailure.port !== null ? t2("messages.embeddedServerPortInUse", {
5375
5340
  port: embeddedServerFailure.port
5376
5341
  }) : t2("messages.embeddedServerPortInUseUnknownPort") : t2("messages.embeddedServerCrashed");
5377
- return /* @__PURE__ */ jsx41("div", { className: "fixed inset-0 flex items-center justify-center bg-background p-6", children: /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-5 p-6 border border-border bg-card max-w-sm w-full", children: [
5342
+ return /* @__PURE__ */ jsx40("div", { className: "fixed inset-0 flex items-center justify-center bg-background p-6", children: /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-5 p-6 border border-border bg-card max-w-sm w-full", children: [
5378
5343
  /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-1", children: [
5379
- /* @__PURE__ */ jsx41("p", { className: "font-bold text-destructive", children: t2("errors.embeddedServerFailed") }),
5380
- /* @__PURE__ */ jsx41("p", { className: "text-sm text-muted-foreground", children: detail })
5344
+ /* @__PURE__ */ jsx40("p", { className: "font-bold text-destructive", children: t2("errors.embeddedServerFailed") }),
5345
+ /* @__PURE__ */ jsx40("p", { className: "text-sm text-muted-foreground", children: detail })
5381
5346
  ] }),
5382
- /* @__PURE__ */ jsx41(
5347
+ /* @__PURE__ */ jsx40(
5383
5348
  LanguageRow,
5384
5349
  {
5385
5350
  label: t2("common.language"),
@@ -5391,21 +5356,29 @@ function Auth({ onLogin }) {
5391
5356
  ] }) });
5392
5357
  }
5393
5358
  if (isElectron() && !isInElectronWebView() && desktopAutoSessionDone === null) {
5394
- return /* @__PURE__ */ jsx41("div", { className: "fixed inset-0 flex items-center justify-center bg-background", children: /* @__PURE__ */ jsx41("div", { className: "w-5 h-5 border-2 border-primary border-t-transparent rounded-full animate-spin" }) });
5359
+ return /* @__PURE__ */ jsx40("div", { className: "fixed inset-0 flex items-center justify-center bg-background", children: /* @__PURE__ */ jsx40("div", { className: "w-5 h-5 border-2 border-primary border-t-transparent rounded-full animate-spin" }) });
5395
5360
  }
5396
5361
  if (webviewAuthSuccess || isInElectronWebView() && webviewAuthSuccess)
5397
- return /* @__PURE__ */ jsx41("div", { className: "fixed inset-0 flex items-center justify-center bg-background", children: /* @__PURE__ */ jsxs26("div", { className: "text-center", children: [
5398
- /* @__PURE__ */ jsx41(CircleCheck, { className: "size-12 text-accent-brand mx-auto mb-4" }),
5399
- /* @__PURE__ */ jsx41("p", { className: "text-muted-foreground", children: t2("auth.redirectingToApp") })
5362
+ return /* @__PURE__ */ jsx40("div", { className: "fixed inset-0 flex items-center justify-center bg-background", children: /* @__PURE__ */ jsxs26("div", { className: "text-center", children: [
5363
+ /* @__PURE__ */ jsx40(CircleCheck, { className: "size-12 text-accent-brand mx-auto mb-4" }),
5364
+ /* @__PURE__ */ jsx40("p", { className: "text-muted-foreground", children: t2("auth.redirectingToApp") })
5400
5365
  ] }) });
5401
5366
  if (dbConnectionFailed)
5402
- return /* @__PURE__ */ jsx41("div", { className: "fixed inset-0 flex items-center justify-center bg-background p-6", children: /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-5 p-6 border border-border bg-card max-w-sm w-full", children: [
5367
+ return /* @__PURE__ */ jsx40("div", { className: "fixed inset-0 flex items-center justify-center bg-background p-6", children: /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-5 p-6 border border-border bg-card max-w-sm w-full", children: [
5403
5368
  /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-1", children: [
5404
- /* @__PURE__ */ jsx41("p", { className: "font-bold text-destructive", children: t2("errors.databaseConnection") }),
5405
- /* @__PURE__ */ jsx41("p", { className: "text-sm text-muted-foreground", children: t2("messages.databaseConnectionFailed") })
5369
+ /* @__PURE__ */ jsx40("p", { className: "font-bold text-destructive", children: t2("errors.databaseConnection") }),
5370
+ /* @__PURE__ */ jsx40("p", { className: "text-sm text-muted-foreground", children: t2("messages.databaseConnectionFailed") })
5406
5371
  ] }),
5407
- /* @__PURE__ */ jsx41(Button, { onClick: () => window.location.reload(), children: t2("common.refresh") }),
5408
- /* @__PURE__ */ jsx41(
5372
+ /* @__PURE__ */ jsx40(
5373
+ Button,
5374
+ {
5375
+ variant: "outline",
5376
+ onClick: () => window.location.reload(),
5377
+ className: "border-accent-brand/40 text-accent-brand hover:bg-accent-brand/10 hover:text-accent-brand dark:border-accent-brand/40 dark:bg-transparent dark:hover:bg-accent-brand/10",
5378
+ children: t2("common.refresh")
5379
+ }
5380
+ ),
5381
+ /* @__PURE__ */ jsx40(
5409
5382
  LanguageRow,
5410
5383
  {
5411
5384
  label: t2("common.language"),
@@ -5416,10 +5389,10 @@ function Auth({ onLogin }) {
5416
5389
  )
5417
5390
  ] }) });
5418
5391
  if (dbHealthChecking)
5419
- return /* @__PURE__ */ jsx41("div", { className: "fixed inset-0 flex items-center justify-center bg-background", children: /* @__PURE__ */ jsx41("div", { className: "w-5 h-5 border-2 border-primary border-t-transparent rounded-full animate-spin" }) });
5392
+ return /* @__PURE__ */ jsx40("div", { className: "fixed inset-0 flex items-center justify-center bg-background", children: /* @__PURE__ */ jsx40("div", { className: "w-5 h-5 border-2 border-primary border-t-transparent rounded-full animate-spin" }) });
5420
5393
  if (localDesktopAuth)
5421
- return /* @__PURE__ */ jsx41("div", { className: "fixed inset-0 flex flex-col bg-background overflow-hidden", children: /* @__PURE__ */ jsxs26("div", { className: "flex flex-1 overflow-hidden", children: [
5422
- /* @__PURE__ */ jsx41(
5394
+ return /* @__PURE__ */ jsx40("div", { className: "fixed inset-0 flex flex-col bg-background overflow-hidden", children: /* @__PURE__ */ jsxs26("div", { className: "flex flex-1 overflow-hidden", children: [
5395
+ /* @__PURE__ */ jsx40(
5423
5396
  BrandPanel,
5424
5397
  {
5425
5398
  logo: branding.logo,
@@ -5427,14 +5400,14 @@ function Auth({ onLogin }) {
5427
5400
  tagline: branding.tagline || t2("auth.tagline")
5428
5401
  }
5429
5402
  ),
5430
- /* @__PURE__ */ jsx41("div", { className: "flex flex-1 items-center justify-center p-6 overflow-y-auto relative", children: /* @__PURE__ */ jsxs26("div", { className: "w-full max-w-[380px] flex flex-col gap-6 border border-border bg-card p-5", children: [
5431
- /* @__PURE__ */ jsx41(CompactBrand, { logo: branding.logo, appName: branding.appName }),
5403
+ /* @__PURE__ */ jsx40("div", { className: "flex flex-1 items-center justify-center p-6 overflow-y-auto relative", children: /* @__PURE__ */ jsxs26("div", { className: "w-full max-w-[380px] flex flex-col gap-6 border border-border bg-card p-5", children: [
5404
+ /* @__PURE__ */ jsx40(CompactBrand, { logo: branding.logo, appName: branding.appName }),
5432
5405
  /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-5", children: [
5433
5406
  /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-1", children: [
5434
- /* @__PURE__ */ jsx41("h1", { className: "text-xl font-bold", children: desktopManualLogoutActive ? t2("auth.localDesktopSignedOut") : t2("auth.localDesktopUnavailable") }),
5435
- /* @__PURE__ */ jsx41("p", { className: "text-xs text-muted-foreground leading-relaxed", children: desktopManualLogoutActive ? t2("auth.localDesktopSignedOutDesc") : t2("auth.localDesktopUnavailableDesc") })
5407
+ /* @__PURE__ */ jsx40("h1", { className: "text-xl font-bold", children: desktopManualLogoutActive ? t2("auth.localDesktopSignedOut") : t2("auth.localDesktopUnavailable") }),
5408
+ /* @__PURE__ */ jsx40("p", { className: "text-xs text-muted-foreground leading-relaxed", children: desktopManualLogoutActive ? t2("auth.localDesktopSignedOutDesc") : t2("auth.localDesktopUnavailableDesc") })
5436
5409
  ] }),
5437
- /* @__PURE__ */ jsx41(
5410
+ /* @__PURE__ */ jsx40(
5438
5411
  Button,
5439
5412
  {
5440
5413
  type: "button",
@@ -5444,8 +5417,8 @@ function Auth({ onLogin }) {
5444
5417
  children: desktopManualLogoutActive ? t2("auth.continueLocalDesktop") : t2("auth.retryLocalDesktop")
5445
5418
  }
5446
5419
  ),
5447
- /* @__PURE__ */ jsx41(Separator, {}),
5448
- /* @__PURE__ */ jsx41(
5420
+ /* @__PURE__ */ jsx40(Separator, {}),
5421
+ /* @__PURE__ */ jsx40(
5449
5422
  LanguageRow,
5450
5423
  {
5451
5424
  label: t2("common.language"),
@@ -5474,8 +5447,8 @@ function Auth({ onLogin }) {
5474
5447
  show: externalMethods.length > 0
5475
5448
  }
5476
5449
  ];
5477
- return /* @__PURE__ */ jsx41("div", { className: "fixed inset-0 flex flex-col bg-background overflow-hidden", children: /* @__PURE__ */ jsxs26("div", { className: "flex flex-1 overflow-hidden", children: [
5478
- /* @__PURE__ */ jsx41(
5450
+ return /* @__PURE__ */ jsx40("div", { className: "fixed inset-0 flex flex-col bg-background overflow-hidden", children: /* @__PURE__ */ jsxs26("div", { className: "flex flex-1 overflow-hidden", children: [
5451
+ /* @__PURE__ */ jsx40(
5479
5452
  BrandPanel,
5480
5453
  {
5481
5454
  logo: branding.logo,
@@ -5483,18 +5456,18 @@ function Auth({ onLogin }) {
5483
5456
  tagline: branding.tagline || t2("auth.tagline")
5484
5457
  }
5485
5458
  ),
5486
- /* @__PURE__ */ jsx41("div", { className: "flex flex-1 items-center justify-center p-6 overflow-y-auto relative", children: /* @__PURE__ */ jsxs26("div", { className: "w-full max-w-[380px] flex flex-col gap-6 border border-border bg-card p-5", children: [
5487
- /* @__PURE__ */ jsx41(CompactBrand, { logo: branding.logo, appName: branding.appName }),
5459
+ /* @__PURE__ */ jsx40("div", { className: "flex flex-1 items-center justify-center p-6 overflow-y-auto relative", children: /* @__PURE__ */ jsxs26("div", { className: "w-full max-w-[380px] flex flex-col gap-6 border border-border bg-card p-5", children: [
5460
+ /* @__PURE__ */ jsx40(CompactBrand, { logo: branding.logo, appName: branding.appName }),
5488
5461
  view === "second-factor" && /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-5", children: [
5489
5462
  /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-1", children: [
5490
- /* @__PURE__ */ jsx41("h1", { className: "text-xl font-bold", children: t2("auth.twoFactorAuth") }),
5491
- /* @__PURE__ */ jsx41("p", { className: "text-xs text-muted-foreground", children: t2("auth.enterCode") })
5463
+ /* @__PURE__ */ jsx40("h1", { className: "text-xl font-bold", children: t2("auth.twoFactorAuth") }),
5464
+ /* @__PURE__ */ jsx40("p", { className: "text-xs text-muted-foreground", children: t2("auth.enterCode") })
5492
5465
  ] }),
5493
- shownFactors.length > 1 && /* @__PURE__ */ jsx41("div", { className: "flex border border-border overflow-hidden", children: shownFactors.map((factor) => {
5466
+ shownFactors.length > 1 && /* @__PURE__ */ jsx40("div", { className: "flex border border-border overflow-hidden", children: shownFactors.map((factor) => {
5494
5467
  const ui = secondFactorUIs.find(
5495
5468
  (candidate) => candidate.id === factor.id
5496
5469
  );
5497
- return /* @__PURE__ */ jsx41(
5470
+ return /* @__PURE__ */ jsx40(
5498
5471
  "button",
5499
5472
  {
5500
5473
  type: "button",
@@ -5511,23 +5484,25 @@ function Auth({ onLogin }) {
5511
5484
  );
5512
5485
  if (!ui) {
5513
5486
  return /* @__PURE__ */ jsxs26("div", { className: "space-y-2", "aria-live": "polite", children: [
5514
- /* @__PURE__ */ jsx41("p", { className: "text-xs text-muted-foreground", children: t2(
5487
+ /* @__PURE__ */ jsx40("p", { className: "text-xs text-muted-foreground", children: t2(
5515
5488
  authPluginsLoading ? "common.loading" : "auth.secondFactorNoUI"
5516
5489
  ) }),
5517
- /* @__PURE__ */ jsx41(
5490
+ /* @__PURE__ */ jsx40(
5518
5491
  Button,
5519
5492
  {
5493
+ variant: "outline",
5520
5494
  type: "button",
5521
5495
  disabled: authPluginsLoading,
5522
5496
  onClick: () => void retryAuthPlugins().catch(() => {
5523
5497
  }),
5498
+ className: "border-accent-brand/40 text-accent-brand hover:bg-accent-brand/10 hover:text-accent-brand dark:border-accent-brand/40 dark:bg-transparent dark:hover:bg-accent-brand/10",
5524
5499
  children: t2("auth.retrySecondFactorUI")
5525
5500
  }
5526
5501
  )
5527
5502
  ] });
5528
5503
  }
5529
5504
  const Component = ui.component;
5530
- return /* @__PURE__ */ jsx41(
5505
+ return /* @__PURE__ */ jsx40(
5531
5506
  Component,
5532
5507
  {
5533
5508
  factorId: currentFactorId,
@@ -5551,16 +5526,16 @@ function Auth({ onLogin }) {
5551
5526
  onClick: () => switchView("login"),
5552
5527
  className: "flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors w-fit",
5553
5528
  children: [
5554
- /* @__PURE__ */ jsx41(ArrowLeft, { className: "size-3.5" }),
5529
+ /* @__PURE__ */ jsx40(ArrowLeft, { className: "size-3.5" }),
5555
5530
  t2("common.back")
5556
5531
  ]
5557
5532
  }
5558
5533
  ),
5559
5534
  /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-1", children: [
5560
- /* @__PURE__ */ jsx41("h1", { className: "text-xl font-bold", children: t2("auth.forgotPassword") }),
5561
- /* @__PURE__ */ jsx41("p", { className: "text-xs text-muted-foreground", children: t2("auth.resetCodeDesc") })
5535
+ /* @__PURE__ */ jsx40("h1", { className: "text-xl font-bold", children: t2("auth.forgotPassword") }),
5536
+ /* @__PURE__ */ jsx40("p", { className: "text-xs text-muted-foreground", children: t2("auth.resetCodeDesc") })
5562
5537
  ] }),
5563
- /* @__PURE__ */ jsx41("div", { className: "flex items-center gap-2", children: ["email", "code", "newpass"].map(
5538
+ /* @__PURE__ */ jsx40("div", { className: "flex items-center gap-2", children: ["email", "code", "newpass"].map(
5564
5539
  (step, i2) => {
5565
5540
  const stepIdx = ["email", "code", "newpass"].indexOf(
5566
5541
  resetStep
@@ -5572,14 +5547,14 @@ function Auth({ onLogin }) {
5572
5547
  {
5573
5548
  className: "flex items-center gap-2 flex-1",
5574
5549
  children: [
5575
- /* @__PURE__ */ jsx41(
5550
+ /* @__PURE__ */ jsx40(
5576
5551
  "div",
5577
5552
  {
5578
5553
  className: `size-5 flex items-center justify-center text-[10px] font-bold border transition-colors ${done ? "bg-accent-brand border-accent-brand text-background" : active2 ? "border-accent-brand text-accent-brand" : "border-border text-muted-foreground"}`,
5579
- children: done ? /* @__PURE__ */ jsx41(CircleCheck, { className: "size-3" }) : i2 + 1
5554
+ children: done ? /* @__PURE__ */ jsx40(CircleCheck, { className: "size-3" }) : i2 + 1
5580
5555
  }
5581
5556
  ),
5582
- i2 < 2 && /* @__PURE__ */ jsx41(
5557
+ i2 < 2 && /* @__PURE__ */ jsx40(
5583
5558
  "div",
5584
5559
  {
5585
5560
  className: `h-px flex-1 transition-colors ${done ? "bg-accent-brand" : "bg-border"}`
@@ -5597,7 +5572,7 @@ function Auth({ onLogin }) {
5597
5572
  onSubmit: handleResetInitiate,
5598
5573
  className: "flex flex-col gap-4",
5599
5574
  children: [
5600
- /* @__PURE__ */ jsx41(Field, { label: t2("common.username"), htmlFor: "reset-user", children: /* @__PURE__ */ jsx41(
5575
+ /* @__PURE__ */ jsx40(Field, { label: t2("common.username"), htmlFor: "reset-user", children: /* @__PURE__ */ jsx40(
5601
5576
  Input,
5602
5577
  {
5603
5578
  id: "reset-user",
@@ -5607,7 +5582,7 @@ function Auth({ onLogin }) {
5607
5582
  disabled: loading
5608
5583
  }
5609
5584
  ) }),
5610
- /* @__PURE__ */ jsx41(
5585
+ /* @__PURE__ */ jsx40(
5611
5586
  Button,
5612
5587
  {
5613
5588
  type: "submit",
@@ -5625,7 +5600,7 @@ function Auth({ onLogin }) {
5625
5600
  onSubmit: handleResetVerify,
5626
5601
  className: "flex flex-col gap-4",
5627
5602
  children: [
5628
- /* @__PURE__ */ jsx41(Field, { label: t2("auth.resetCode"), htmlFor: "reset-code", children: /* @__PURE__ */ jsx41(
5603
+ /* @__PURE__ */ jsx40(Field, { label: t2("auth.resetCode"), htmlFor: "reset-code", children: /* @__PURE__ */ jsx40(
5629
5604
  Input,
5630
5605
  {
5631
5606
  id: "reset-code",
@@ -5637,7 +5612,7 @@ function Auth({ onLogin }) {
5637
5612
  disabled: loading
5638
5613
  }
5639
5614
  ) }),
5640
- /* @__PURE__ */ jsx41(
5615
+ /* @__PURE__ */ jsx40(
5641
5616
  Button,
5642
5617
  {
5643
5618
  type: "submit",
@@ -5646,7 +5621,7 @@ function Auth({ onLogin }) {
5646
5621
  children: loading ? t2("common.loading") : t2("auth.verifyCodeButton")
5647
5622
  }
5648
5623
  ),
5649
- /* @__PURE__ */ jsx41(
5624
+ /* @__PURE__ */ jsx40(
5650
5625
  Button,
5651
5626
  {
5652
5627
  type: "button",
@@ -5666,7 +5641,7 @@ function Auth({ onLogin }) {
5666
5641
  onSubmit: handleResetComplete,
5667
5642
  className: "flex flex-col gap-4",
5668
5643
  children: [
5669
- /* @__PURE__ */ jsx41(Field, { label: t2("auth.newPassword"), htmlFor: "new-pass", children: /* @__PURE__ */ jsx41(
5644
+ /* @__PURE__ */ jsx40(Field, { label: t2("auth.newPassword"), htmlFor: "new-pass", children: /* @__PURE__ */ jsx40(
5670
5645
  PasswordInput2,
5671
5646
  {
5672
5647
  id: "new-pass",
@@ -5675,12 +5650,12 @@ function Auth({ onLogin }) {
5675
5650
  disabled: loading
5676
5651
  }
5677
5652
  ) }),
5678
- /* @__PURE__ */ jsx41(
5653
+ /* @__PURE__ */ jsx40(
5679
5654
  Field,
5680
5655
  {
5681
5656
  label: t2("auth.confirmNewPassword"),
5682
5657
  htmlFor: "confirm-new-pass",
5683
- children: /* @__PURE__ */ jsx41(
5658
+ children: /* @__PURE__ */ jsx40(
5684
5659
  PasswordInput2,
5685
5660
  {
5686
5661
  id: "confirm-new-pass",
@@ -5691,7 +5666,7 @@ function Auth({ onLogin }) {
5691
5666
  )
5692
5667
  }
5693
5668
  ),
5694
- /* @__PURE__ */ jsx41(
5669
+ /* @__PURE__ */ jsx40(
5695
5670
  Button,
5696
5671
  {
5697
5672
  type: "submit",
@@ -5705,7 +5680,7 @@ function Auth({ onLogin }) {
5705
5680
  )
5706
5681
  ] }),
5707
5682
  (view === "login" || view === "register" || view === "external") && /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-5", children: [
5708
- /* @__PURE__ */ jsx41("div", { className: "flex border border-border overflow-hidden", children: TAB_ITEMS.filter((item) => item.show).map((item) => /* @__PURE__ */ jsx41(
5683
+ /* @__PURE__ */ jsx40("div", { className: "flex border border-border overflow-hidden", children: TAB_ITEMS.filter((item) => item.show).map((item) => /* @__PURE__ */ jsx40(
5709
5684
  "button",
5710
5685
  {
5711
5686
  onClick: () => switchView(item.id),
@@ -5715,12 +5690,12 @@ function Auth({ onLogin }) {
5715
5690
  item.id
5716
5691
  )) }),
5717
5692
  /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-1", children: [
5718
- /* @__PURE__ */ jsx41("h1", { className: "text-xl font-bold", children: view === "login" ? t2("auth.loginTitle") : view === "register" ? t2("auth.registerTitle") : t2("auth.loginWithExternal") }),
5719
- /* @__PURE__ */ jsx41("p", { className: "text-xs text-muted-foreground", children: view === "login" ? t2("auth.loginSubtitle", "") : view === "register" ? t2("auth.registerSubtitle", "") : t2("auth.loginWithExternalDesc") })
5693
+ /* @__PURE__ */ jsx40("h1", { className: "text-xl font-bold", children: view === "login" ? t2("auth.loginTitle") : view === "register" ? t2("auth.registerTitle") : t2("auth.loginWithExternal") }),
5694
+ /* @__PURE__ */ jsx40("p", { className: "text-xs text-muted-foreground", children: view === "login" ? t2("auth.loginSubtitle", "") : view === "register" ? t2("auth.registerSubtitle", "") : t2("auth.loginWithExternalDesc") })
5720
5695
  ] }),
5721
5696
  view === "external" && /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-4", children: [
5722
5697
  /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2", children: [
5723
- /* @__PURE__ */ jsx41(
5698
+ /* @__PURE__ */ jsx40(
5724
5699
  Checkbox2,
5725
5700
  {
5726
5701
  id: "rememberSSO",
@@ -5728,7 +5703,7 @@ function Auth({ onLogin }) {
5728
5703
  onCheckedChange: (v) => setRememberMe(v === true)
5729
5704
  }
5730
5705
  ),
5731
- /* @__PURE__ */ jsx41(
5706
+ /* @__PURE__ */ jsx40(
5732
5707
  "label",
5733
5708
  {
5734
5709
  htmlFor: "rememberSSO",
@@ -5745,9 +5720,9 @@ function Auth({ onLogin }) {
5745
5720
  ] })
5746
5721
  ] }),
5747
5722
  view === "login" && /* @__PURE__ */ jsxs26("form", { onSubmit: handleLogin, className: "flex flex-col gap-4", children: [
5748
- /* @__PURE__ */ jsx41(Field, { label: t2("common.username"), htmlFor: "login-user", children: /* @__PURE__ */ jsxs26("div", { className: "relative", children: [
5749
- /* @__PURE__ */ jsx41(User, { className: "absolute left-2.5 top-1/2 -translate-y-1/2 size-4 text-muted-foreground pointer-events-none" }),
5750
- /* @__PURE__ */ jsx41(
5723
+ /* @__PURE__ */ jsx40(Field, { label: t2("common.username"), htmlFor: "login-user", children: /* @__PURE__ */ jsxs26("div", { className: "relative", children: [
5724
+ /* @__PURE__ */ jsx40(User, { className: "absolute left-2.5 top-1/2 -translate-y-1/2 size-4 text-muted-foreground pointer-events-none" }),
5725
+ /* @__PURE__ */ jsx40(
5751
5726
  Input,
5752
5727
  {
5753
5728
  id: "login-user",
@@ -5760,7 +5735,7 @@ function Auth({ onLogin }) {
5760
5735
  }
5761
5736
  )
5762
5737
  ] }) }),
5763
- /* @__PURE__ */ jsx41(Field, { label: t2("common.password"), htmlFor: "login-pass", children: /* @__PURE__ */ jsx41(
5738
+ /* @__PURE__ */ jsx40(Field, { label: t2("common.password"), htmlFor: "login-pass", children: /* @__PURE__ */ jsx40(
5764
5739
  PasswordInput2,
5765
5740
  {
5766
5741
  id: "login-pass",
@@ -5771,7 +5746,7 @@ function Auth({ onLogin }) {
5771
5746
  ) }),
5772
5747
  /* @__PURE__ */ jsxs26("div", { className: "flex items-center justify-between", children: [
5773
5748
  /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2", children: [
5774
- /* @__PURE__ */ jsx41(
5749
+ /* @__PURE__ */ jsx40(
5775
5750
  Checkbox2,
5776
5751
  {
5777
5752
  id: "rememberMe",
@@ -5780,7 +5755,7 @@ function Auth({ onLogin }) {
5780
5755
  disabled: loading
5781
5756
  }
5782
5757
  ),
5783
- /* @__PURE__ */ jsx41(
5758
+ /* @__PURE__ */ jsx40(
5784
5759
  "label",
5785
5760
  {
5786
5761
  htmlFor: "rememberMe",
@@ -5789,7 +5764,7 @@ function Auth({ onLogin }) {
5789
5764
  }
5790
5765
  )
5791
5766
  ] }),
5792
- passwordResetAllowed && /* @__PURE__ */ jsx41(
5767
+ passwordResetAllowed && /* @__PURE__ */ jsx40(
5793
5768
  "button",
5794
5769
  {
5795
5770
  type: "button",
@@ -5799,14 +5774,14 @@ function Auth({ onLogin }) {
5799
5774
  }
5800
5775
  )
5801
5776
  ] }),
5802
- /* @__PURE__ */ jsx41(
5777
+ /* @__PURE__ */ jsx40(
5803
5778
  Button,
5804
5779
  {
5805
5780
  type: "submit",
5806
5781
  className: "w-full bg-accent-brand hover:bg-accent-brand/90 text-background font-bold h-10",
5807
5782
  disabled: loading,
5808
5783
  children: loading ? t2("common.loading") : /* @__PURE__ */ jsxs26("span", { className: "flex items-center gap-2", children: [
5809
- /* @__PURE__ */ jsx41(KeyRound, { className: "size-4" }),
5784
+ /* @__PURE__ */ jsx40(KeyRound, { className: "size-4" }),
5810
5785
  t2("common.login")
5811
5786
  ] })
5812
5787
  }
@@ -5819,9 +5794,9 @@ function Auth({ onLogin }) {
5819
5794
  onSubmit: handleRegister,
5820
5795
  className: "flex flex-col gap-4",
5821
5796
  children: [
5822
- /* @__PURE__ */ jsx41(Field, { label: t2("common.username"), htmlFor: "reg-user", children: /* @__PURE__ */ jsxs26("div", { className: "relative", children: [
5823
- /* @__PURE__ */ jsx41(User, { className: "absolute left-2.5 top-1/2 -translate-y-1/2 size-4 text-muted-foreground pointer-events-none" }),
5824
- /* @__PURE__ */ jsx41(
5797
+ /* @__PURE__ */ jsx40(Field, { label: t2("common.username"), htmlFor: "reg-user", children: /* @__PURE__ */ jsxs26("div", { className: "relative", children: [
5798
+ /* @__PURE__ */ jsx40(User, { className: "absolute left-2.5 top-1/2 -translate-y-1/2 size-4 text-muted-foreground pointer-events-none" }),
5799
+ /* @__PURE__ */ jsx40(
5825
5800
  Input,
5826
5801
  {
5827
5802
  id: "reg-user",
@@ -5834,7 +5809,7 @@ function Auth({ onLogin }) {
5834
5809
  }
5835
5810
  )
5836
5811
  ] }) }),
5837
- /* @__PURE__ */ jsx41(Field, { label: t2("common.password"), htmlFor: "reg-pass", children: /* @__PURE__ */ jsx41(
5812
+ /* @__PURE__ */ jsx40(Field, { label: t2("common.password"), htmlFor: "reg-pass", children: /* @__PURE__ */ jsx40(
5838
5813
  PasswordInput2,
5839
5814
  {
5840
5815
  id: "reg-pass",
@@ -5844,12 +5819,12 @@ function Auth({ onLogin }) {
5844
5819
  disabled: loading
5845
5820
  }
5846
5821
  ) }),
5847
- /* @__PURE__ */ jsx41(
5822
+ /* @__PURE__ */ jsx40(
5848
5823
  Field,
5849
5824
  {
5850
5825
  label: t2("common.confirmPassword"),
5851
5826
  htmlFor: "reg-confirm",
5852
- children: /* @__PURE__ */ jsx41(
5827
+ children: /* @__PURE__ */ jsx40(
5853
5828
  PasswordInput2,
5854
5829
  {
5855
5830
  id: "reg-confirm",
@@ -5860,14 +5835,14 @@ function Auth({ onLogin }) {
5860
5835
  )
5861
5836
  }
5862
5837
  ),
5863
- /* @__PURE__ */ jsx41(
5838
+ /* @__PURE__ */ jsx40(
5864
5839
  Button,
5865
5840
  {
5866
5841
  type: "submit",
5867
5842
  className: "w-full bg-accent-brand hover:bg-accent-brand/90 text-background font-bold h-10",
5868
5843
  disabled: loading,
5869
5844
  children: loading ? t2("common.loading") : /* @__PURE__ */ jsxs26("span", { className: "flex items-center gap-2", children: [
5870
- /* @__PURE__ */ jsx41(Shield, { className: "size-4" }),
5845
+ /* @__PURE__ */ jsx40(Shield, { className: "size-4" }),
5871
5846
  t2("auth.signUp")
5872
5847
  ] })
5873
5848
  }
@@ -5875,11 +5850,11 @@ function Auth({ onLogin }) {
5875
5850
  ]
5876
5851
  }
5877
5852
  ),
5878
- /* @__PURE__ */ jsx41(Separator, {}),
5879
- /* @__PURE__ */ jsx41("p", { className: "text-center text-xs text-muted-foreground", children: view === "login" && registrationAllowed ? /* @__PURE__ */ jsxs26(Fragment5, { children: [
5853
+ /* @__PURE__ */ jsx40(Separator, {}),
5854
+ /* @__PURE__ */ jsx40("p", { className: "text-center text-xs text-muted-foreground", children: view === "login" && registrationAllowed ? /* @__PURE__ */ jsxs26(Fragment5, { children: [
5880
5855
  t2("auth.noAccount", "Don't have an account?"),
5881
5856
  " ",
5882
- /* @__PURE__ */ jsx41(
5857
+ /* @__PURE__ */ jsx40(
5883
5858
  "button",
5884
5859
  {
5885
5860
  onClick: () => switchView("register"),
@@ -5890,7 +5865,7 @@ function Auth({ onLogin }) {
5890
5865
  ] }) : view === "register" && passwordLoginAllowed && !firstUser ? /* @__PURE__ */ jsxs26(Fragment5, { children: [
5891
5866
  t2("auth.hasAccount", "Already have an account?"),
5892
5867
  " ",
5893
- /* @__PURE__ */ jsx41(
5868
+ /* @__PURE__ */ jsx40(
5894
5869
  "button",
5895
5870
  {
5896
5871
  onClick: () => switchView("login"),
@@ -5899,7 +5874,7 @@ function Auth({ onLogin }) {
5899
5874
  }
5900
5875
  )
5901
5876
  ] }) : null }),
5902
- /* @__PURE__ */ jsx41(
5877
+ /* @__PURE__ */ jsx40(
5903
5878
  LanguageRow,
5904
5879
  {
5905
5880
  label: t2("common.language"),
@@ -5915,10 +5890,10 @@ function Auth({ onLogin }) {
5915
5890
 
5916
5891
  // src/ui/components/sonner.tsx
5917
5892
  import { Toaster as Sonner } from "sonner";
5918
- import { jsx as jsx42 } from "react/jsx-runtime";
5893
+ import { jsx as jsx41 } from "react/jsx-runtime";
5919
5894
  var Toaster = ({ ...props }) => {
5920
5895
  const { theme: theme2 = "system" } = useTheme();
5921
- return /* @__PURE__ */ jsx42(
5896
+ return /* @__PURE__ */ jsx41(
5922
5897
  Sonner,
5923
5898
  {
5924
5899
  theme: theme2,
@@ -5956,18 +5931,18 @@ var Toaster = ({ ...props }) => {
5956
5931
 
5957
5932
  // src/ui/components/FullScreenAppWrapper.tsx
5958
5933
  import { useTranslation as useTranslation12 } from "react-i18next";
5959
- import { Fragment as Fragment6, jsx as jsx43, jsxs as jsxs27 } from "react/jsx-runtime";
5934
+ import { Fragment as Fragment6, jsx as jsx42, jsxs as jsxs27 } from "react/jsx-runtime";
5960
5935
  var FullScreenAppWrapper = ({
5961
5936
  hostId,
5962
5937
  children
5963
5938
  }) => {
5964
5939
  const { t: t2 } = useTranslation12();
5965
- const [hostConfig, setHostConfig] = useState14(null);
5966
- const [loading, setLoading] = useState14(true);
5967
- const [isAuthenticated, setIsAuthenticated] = useState14(false);
5968
- const [authLoading, setAuthLoading] = useState14(true);
5969
- const [, setIsAdmin] = useState14(false);
5970
- useEffect11(() => {
5940
+ const [hostConfig, setHostConfig] = useState13(null);
5941
+ const [loading, setLoading] = useState13(true);
5942
+ const [isAuthenticated, setIsAuthenticated] = useState13(false);
5943
+ const [authLoading, setAuthLoading] = useState13(true);
5944
+ const [, setIsAdmin] = useState13(false);
5945
+ useEffect10(() => {
5971
5946
  const handleSessionExpired = () => {
5972
5947
  setIsAuthenticated(false);
5973
5948
  setIsAdmin(false);
@@ -5976,7 +5951,7 @@ var FullScreenAppWrapper = ({
5976
5951
  dbHealthMonitor.on("session-expired", handleSessionExpired);
5977
5952
  return () => dbHealthMonitor.off("session-expired", handleSessionExpired);
5978
5953
  }, []);
5979
- useEffect11(() => {
5954
+ useEffect10(() => {
5980
5955
  let cancelled = false;
5981
5956
  let retryTimer = null;
5982
5957
  const maxAttempts = 10;
@@ -6033,7 +6008,7 @@ var FullScreenAppWrapper = ({
6033
6008
  if (retryTimer) clearTimeout(retryTimer);
6034
6009
  };
6035
6010
  }, []);
6036
- useEffect11(() => {
6011
+ useEffect10(() => {
6037
6012
  const fetchHost = async () => {
6038
6013
  if (!hostId || !isAuthenticated) {
6039
6014
  setLoading(false);
@@ -6060,17 +6035,17 @@ var FullScreenAppWrapper = ({
6060
6035
  window.location.reload();
6061
6036
  };
6062
6037
  if (authLoading) {
6063
- return /* @__PURE__ */ jsx43("div", { className: "relative w-full h-screen overflow-hidden", children: /* @__PURE__ */ jsx43(ConnectionScreen, { status: "connecting", message: t2("common.loading") }) });
6038
+ return /* @__PURE__ */ jsx42("div", { className: "relative w-full h-screen overflow-hidden", children: /* @__PURE__ */ jsx42(ConnectionScreen, { status: "connecting", message: t2("common.loading") }) });
6064
6039
  }
6065
6040
  if (!isAuthenticated) {
6066
- return /* @__PURE__ */ jsx43(SidebarProvider, { children: /* @__PURE__ */ jsx43(TabProvider, { children: /* @__PURE__ */ jsx43(Fragment6, { children: /* @__PURE__ */ jsxs27(
6041
+ return /* @__PURE__ */ jsx42(SidebarProvider, { children: /* @__PURE__ */ jsx42(TabProvider, { children: /* @__PURE__ */ jsx42(Fragment6, { children: /* @__PURE__ */ jsxs27(
6067
6042
  "div",
6068
6043
  {
6069
6044
  className: "w-full h-screen overflow-hidden flex items-center justify-center",
6070
6045
  style: { backgroundColor: "var(--bg-base)" },
6071
6046
  children: [
6072
- /* @__PURE__ */ jsx43(Auth, { onLogin: handleAuthSuccess }),
6073
- /* @__PURE__ */ jsx43(
6047
+ /* @__PURE__ */ jsx42(Auth, { onLogin: handleAuthSuccess }),
6048
+ /* @__PURE__ */ jsx42(
6074
6049
  Toaster,
6075
6050
  {
6076
6051
  position: "bottom-right",
@@ -6085,7 +6060,7 @@ var FullScreenAppWrapper = ({
6085
6060
  ) }) }) });
6086
6061
  }
6087
6062
  const phase = loading ? "loading" : !hostConfig && hostId ? "not-found" : "ready";
6088
- return /* @__PURE__ */ jsx43(SidebarProvider, { children: /* @__PURE__ */ jsx43(TabProvider, { children: /* @__PURE__ */ jsx43(Fragment6, { children: /* @__PURE__ */ jsx43(
6063
+ return /* @__PURE__ */ jsx42(SidebarProvider, { children: /* @__PURE__ */ jsx42(TabProvider, { children: /* @__PURE__ */ jsx42(Fragment6, { children: /* @__PURE__ */ jsx42(
6089
6064
  "div",
6090
6065
  {
6091
6066
  className: "w-full h-screen overflow-hidden",
@@ -6096,9 +6071,9 @@ var FullScreenAppWrapper = ({
6096
6071
  };
6097
6072
 
6098
6073
  // src/ui/ssh/dialogs/TOTPDialog.tsx
6099
- import { useEffect as useEffect12, useState as useState15 } from "react";
6074
+ import { useEffect as useEffect11, useState as useState14 } from "react";
6100
6075
  import { useTranslation as useTranslation13 } from "react-i18next";
6101
- import { jsx as jsx44, jsxs as jsxs28 } from "react/jsx-runtime";
6076
+ import { jsx as jsx43, jsxs as jsxs28 } from "react/jsx-runtime";
6102
6077
  var CODE_INPUT = "rounded-none bg-muted/50 border-border text-center text-sm tracking-widest";
6103
6078
  function TOTPDialog({
6104
6079
  isOpen,
@@ -6110,13 +6085,14 @@ function TOTPDialog({
6110
6085
  backgroundColor
6111
6086
  }) {
6112
6087
  const { t: t2 } = useTranslation13();
6113
- const [pushSubmitted, setPushSubmitted] = useState15(false);
6114
- useEffect12(() => {
6088
+ const [pushSubmitted, setPushSubmitted] = useState14(false);
6089
+ useEffect11(() => {
6115
6090
  if (isOpen && !waiting) {
6116
6091
  setPushSubmitted(false);
6117
6092
  }
6118
6093
  }, [isOpen, waiting]);
6119
6094
  if (!isOpen) return null;
6095
+ const isPassword = mode === "password";
6120
6096
  const isPush = mode === "push";
6121
6097
  const isMenu = mode === "menu";
6122
6098
  const isTotp = !isPush && !isMenu && mode !== "password";
@@ -6132,30 +6108,40 @@ function TOTPDialog({
6132
6108
  const input = e.currentTarget.elements.namedItem(
6133
6109
  "totpCode"
6134
6110
  );
6135
- if (input?.value.trim()) {
6136
- onSubmit(input.value.trim());
6137
- }
6111
+ const value = isPassword ? input?.value : input?.value.trim();
6112
+ if (value) onSubmit(value);
6138
6113
  };
6139
- const title = isPush ? t2("sshAuth.mfaPushRequired") : isMenu ? t2("sshAuth.mfaPromptRequired") : t2("sshAuth.totpRequired");
6114
+ const title = isPush ? t2("sshAuth.mfaPushRequired") : isPassword ? t2("common.password") : isMenu ? t2("sshAuth.mfaPromptRequired") : t2("sshAuth.totpRequired");
6140
6115
  const label = prompt || (isTotp ? t2("sshAuth.totpCodeLabel") : void 0);
6141
- const cancel = /* @__PURE__ */ jsx44("button", { type: "button", onClick: onCancel, className: PROMPT_BUTTON, children: t2("common.cancel") });
6142
- return /* @__PURE__ */ jsx44(
6116
+ const cancel = /* @__PURE__ */ jsx43("button", { type: "button", onClick: onCancel, className: PROMPT_BUTTON, children: t2("common.cancel") });
6117
+ return /* @__PURE__ */ jsx43(
6143
6118
  PanePrompt,
6144
6119
  {
6145
6120
  open: true,
6146
6121
  layer: "connection",
6147
6122
  backgroundColor,
6148
- icon: /* @__PURE__ */ jsx44(Shield, { className: "size-4" }),
6123
+ icon: /* @__PURE__ */ jsx43(Shield, { className: "size-4" }),
6149
6124
  title,
6150
6125
  description: label,
6151
6126
  children: showWaiting ? /* @__PURE__ */ jsxs28("div", { className: "flex flex-col gap-3", children: [
6152
6127
  /* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-3 py-1", children: [
6153
- /* @__PURE__ */ jsx44(LoaderCircle, { className: "size-4 animate-spin text-accent-brand shrink-0" }),
6154
- /* @__PURE__ */ jsx44("p", { className: "text-xs text-muted-foreground", children: t2("sshAuth.mfaWaitingApproval") })
6128
+ /* @__PURE__ */ jsx43(LoaderCircle, { className: "size-4 animate-spin text-accent-brand shrink-0" }),
6129
+ /* @__PURE__ */ jsx43("p", { className: "text-xs text-muted-foreground", children: t2("sshAuth.mfaWaitingApproval") })
6155
6130
  ] }),
6156
- /* @__PURE__ */ jsx44("div", { className: "flex justify-end gap-2", children: cancel })
6131
+ /* @__PURE__ */ jsx43("div", { className: "flex justify-end gap-2", children: cancel })
6157
6132
  ] }) : /* @__PURE__ */ jsxs28("form", { onSubmit: handleSubmit, className: "flex flex-col gap-3", children: [
6158
- isPush ? null : isMenu ? /* @__PURE__ */ jsx44(
6133
+ isPush ? null : isPassword ? /* @__PURE__ */ jsx43(
6134
+ Input,
6135
+ {
6136
+ id: "totpCode",
6137
+ name: "totpCode",
6138
+ type: "password",
6139
+ autoComplete: "current-password",
6140
+ autoFocus: true,
6141
+ placeholder: t2("placeholders.enterPassword"),
6142
+ className: "rounded-none bg-muted/50 border-border text-sm"
6143
+ }
6144
+ ) : isMenu ? /* @__PURE__ */ jsx43(
6159
6145
  Input,
6160
6146
  {
6161
6147
  id: "totpCode",
@@ -6165,7 +6151,7 @@ function TOTPDialog({
6165
6151
  placeholder: t2("sshAuth.mfaMenuPlaceholder"),
6166
6152
  className: CODE_INPUT
6167
6153
  }
6168
- ) : allowsPushKeyword ? /* @__PURE__ */ jsx44(
6154
+ ) : allowsPushKeyword ? /* @__PURE__ */ jsx43(
6169
6155
  Input,
6170
6156
  {
6171
6157
  id: "totpCode",
@@ -6175,7 +6161,7 @@ function TOTPDialog({
6175
6161
  placeholder: t2("sshAuth.mfaCodeOrPushPlaceholder"),
6176
6162
  className: CODE_INPUT
6177
6163
  }
6178
- ) : /* @__PURE__ */ jsx44(
6164
+ ) : /* @__PURE__ */ jsx43(
6179
6165
  Input,
6180
6166
  {
6181
6167
  id: "totpCode",
@@ -6191,7 +6177,7 @@ function TOTPDialog({
6191
6177
  ),
6192
6178
  /* @__PURE__ */ jsxs28("div", { className: "flex justify-end gap-2", children: [
6193
6179
  cancel,
6194
- /* @__PURE__ */ jsx44("button", { type: "submit", className: PROMPT_PRIMARY_BUTTON, children: isPush ? t2("sshAuth.mfaSendRequest") : t2("sshAuth.totpVerify") })
6180
+ /* @__PURE__ */ jsx43("button", { type: "submit", className: PROMPT_PRIMARY_BUTTON, children: isPush ? t2("sshAuth.mfaSendRequest") : isPassword ? t2("common.connect") : t2("sshAuth.totpVerify") })
6195
6181
  ] })
6196
6182
  ] })
6197
6183
  }
@@ -6199,15 +6185,15 @@ function TOTPDialog({
6199
6185
  }
6200
6186
 
6201
6187
  // src/ui/ssh/dialogs/SSHAuthDialog.tsx
6202
- import { useState as useState17 } from "react";
6188
+ import { useState as useState16 } from "react";
6203
6189
 
6204
6190
  // src/ui/components/tabs.tsx
6205
- import { jsx as jsx45 } from "react/jsx-runtime";
6191
+ import { jsx as jsx44 } from "react/jsx-runtime";
6206
6192
  function Tabs({
6207
6193
  className,
6208
6194
  ...props
6209
6195
  }) {
6210
- return /* @__PURE__ */ jsx45(
6196
+ return /* @__PURE__ */ jsx44(
6211
6197
  Root23,
6212
6198
  {
6213
6199
  "data-slot": "tabs",
@@ -6220,7 +6206,7 @@ function TabsList({
6220
6206
  className,
6221
6207
  ...props
6222
6208
  }) {
6223
- return /* @__PURE__ */ jsx45(
6209
+ return /* @__PURE__ */ jsx44(
6224
6210
  List,
6225
6211
  {
6226
6212
  "data-slot": "tabs-list",
@@ -6236,7 +6222,7 @@ function TabsTrigger({
6236
6222
  className,
6237
6223
  ...props
6238
6224
  }) {
6239
- return /* @__PURE__ */ jsx45(
6225
+ return /* @__PURE__ */ jsx44(
6240
6226
  Trigger3,
6241
6227
  {
6242
6228
  "data-slot": "tabs-trigger",
@@ -6252,7 +6238,7 @@ function TabsContent({
6252
6238
  className,
6253
6239
  ...props
6254
6240
  }) {
6255
- return /* @__PURE__ */ jsx45(
6241
+ return /* @__PURE__ */ jsx44(
6256
6242
  Content,
6257
6243
  {
6258
6244
  "data-slot": "tabs-content",
@@ -6297,7 +6283,7 @@ function _objectWithoutPropertiesLoose(r, e) {
6297
6283
  import React10, { useRef as useRef5, forwardRef as forwardRef3, useImperativeHandle, useCallback as useCallback7 } from "react";
6298
6284
 
6299
6285
  // node_modules/@uiw/react-codemirror/esm/useCodeMirror.js
6300
- import { useEffect as useEffect13, useLayoutEffect as useLayoutEffect2, useState as useState16 } from "react";
6286
+ import { useEffect as useEffect12, useLayoutEffect as useLayoutEffect2, useState as useState15 } from "react";
6301
6287
 
6302
6288
  // node_modules/@marijn/find-cluster-break/src/index.js
6303
6289
  var rangeFrom = [];
@@ -20399,25 +20385,25 @@ var gutterView = /* @__PURE__ */ ViewPlugin.fromClass(class {
20399
20385
  for (let b of line.type) {
20400
20386
  if (b.type == BlockType.Text && first) {
20401
20387
  advanceCursor(lineClasses, classSet, b.from);
20402
- for (let cx2 of contexts)
20403
- cx2.line(this.view, b, classSet);
20388
+ for (let cx of contexts)
20389
+ cx.line(this.view, b, classSet);
20404
20390
  first = false;
20405
20391
  } else if (b.widget) {
20406
- for (let cx2 of contexts)
20407
- cx2.widget(this.view, b);
20392
+ for (let cx of contexts)
20393
+ cx.widget(this.view, b);
20408
20394
  }
20409
20395
  }
20410
20396
  } else if (line.type == BlockType.Text) {
20411
20397
  advanceCursor(lineClasses, classSet, line.from);
20412
- for (let cx2 of contexts)
20413
- cx2.line(this.view, line, classSet);
20398
+ for (let cx of contexts)
20399
+ cx.line(this.view, line, classSet);
20414
20400
  } else if (line.widget) {
20415
- for (let cx2 of contexts)
20416
- cx2.widget(this.view, line);
20401
+ for (let cx of contexts)
20402
+ cx.widget(this.view, line);
20417
20403
  }
20418
20404
  }
20419
- for (let cx2 of contexts)
20420
- cx2.finish();
20405
+ for (let cx of contexts)
20406
+ cx.finish();
20421
20407
  if (detach) {
20422
20408
  this.view.scrollDOM.insertBefore(this.dom, after);
20423
20409
  if (this.domAfter)
@@ -23371,12 +23357,12 @@ var ParseContext = class _ParseContext {
23371
23357
  let parser = {
23372
23358
  parsedPos: from,
23373
23359
  advance() {
23374
- let cx2 = currentContext;
23375
- if (cx2) {
23360
+ let cx = currentContext;
23361
+ if (cx) {
23376
23362
  for (let r of ranges)
23377
- cx2.tempSkipped.push(r);
23363
+ cx.tempSkipped.push(r);
23378
23364
  if (until)
23379
- cx2.scheduleOn = cx2.scheduleOn ? Promise.all([cx2.scheduleOn, until]) : until;
23365
+ cx.scheduleOn = cx.scheduleOn ? Promise.all([cx.scheduleOn, until]) : until;
23380
23366
  }
23381
23367
  this.parsedPos = to;
23382
23368
  return new Tree(NodeType.none, [], [], to - from);
@@ -23475,15 +23461,15 @@ var parseWorker = /* @__PURE__ */ ViewPlugin.fromClass(class ParseWorker {
23475
23461
  this.scheduleWork();
23476
23462
  }
23477
23463
  update(update) {
23478
- let cx2 = this.view.state.field(Language.state).context;
23479
- if (cx2.updateViewport(update.view.viewport) || this.view.viewport.to > cx2.treeLen)
23464
+ let cx = this.view.state.field(Language.state).context;
23465
+ if (cx.updateViewport(update.view.viewport) || this.view.viewport.to > cx.treeLen)
23480
23466
  this.scheduleWork();
23481
23467
  if (update.docChanged || update.selectionSet) {
23482
23468
  if (this.view.hasFocus)
23483
23469
  this.chunkBudget += 50;
23484
23470
  this.scheduleWork();
23485
23471
  }
23486
- this.checkAsyncSchedule(cx2);
23472
+ this.checkAsyncSchedule(cx);
23487
23473
  }
23488
23474
  scheduleWork() {
23489
23475
  if (this.working)
@@ -23521,11 +23507,11 @@ var parseWorker = /* @__PURE__ */ ViewPlugin.fromClass(class ParseWorker {
23521
23507
  this.scheduleWork();
23522
23508
  this.checkAsyncSchedule(field.context);
23523
23509
  }
23524
- checkAsyncSchedule(cx2) {
23525
- if (cx2.scheduleOn) {
23510
+ checkAsyncSchedule(cx) {
23511
+ if (cx.scheduleOn) {
23526
23512
  this.workScheduled++;
23527
- cx2.scheduleOn.then(() => this.scheduleWork()).catch((err) => logException(this.view.state, err)).then(() => this.workScheduled--);
23528
- cx2.scheduleOn = null;
23513
+ cx.scheduleOn.then(() => this.scheduleWork()).catch((err) => logException(this.view.state, err)).then(() => this.workScheduled--);
23514
+ cx.scheduleOn = null;
23529
23515
  }
23530
23516
  }
23531
23517
  destroy() {
@@ -23673,7 +23659,7 @@ var IndentContext = class {
23673
23659
  }
23674
23660
  };
23675
23661
  var indentNodeProp = /* @__PURE__ */ new NodeProp();
23676
- function syntaxIndentation(cx2, ast, pos) {
23662
+ function syntaxIndentation(cx, ast, pos) {
23677
23663
  let stack = ast.resolveStack(pos);
23678
23664
  let inner = ast.resolveInner(pos, -1).resolve(pos, 0).enterUnfinishedNodesBefore(pos);
23679
23665
  if (inner != stack.node) {
@@ -23683,18 +23669,18 @@ function syntaxIndentation(cx2, ast, pos) {
23683
23669
  for (let i2 = add2.length - 1; i2 >= 0; i2--)
23684
23670
  stack = { node: add2[i2], next: stack };
23685
23671
  }
23686
- return indentFor(stack, cx2, pos);
23672
+ return indentFor(stack, cx, pos);
23687
23673
  }
23688
- function indentFor(stack, cx2, pos) {
23674
+ function indentFor(stack, cx, pos) {
23689
23675
  for (let cur2 = stack; cur2; cur2 = cur2.next) {
23690
23676
  let strategy = indentStrategy(cur2.node);
23691
23677
  if (strategy)
23692
- return strategy(TreeIndentContext.create(cx2, pos, cur2));
23678
+ return strategy(TreeIndentContext.create(cx, pos, cur2));
23693
23679
  }
23694
23680
  return 0;
23695
23681
  }
23696
- function ignoreClosed(cx2) {
23697
- return cx2.pos == cx2.options.simulateBreak && cx2.options.simulateDoubleBreak;
23682
+ function ignoreClosed(cx) {
23683
+ return cx.pos == cx.options.simulateBreak && cx.options.simulateDoubleBreak;
23698
23684
  }
23699
23685
  function indentStrategy(tree) {
23700
23686
  let strategy = tree.type.prop(indentNodeProp);
@@ -23703,7 +23689,7 @@ function indentStrategy(tree) {
23703
23689
  let first = tree.firstChild, close;
23704
23690
  if (first && (close = first.type.prop(NodeProp.closedBy))) {
23705
23691
  let last2 = tree.lastChild, closed = last2 && close.indexOf(last2.name) > -1;
23706
- return (cx2) => delimitedStrategy(cx2, true, 1, void 0, closed && !ignoreClosed(cx2) ? last2.from : void 0);
23692
+ return (cx) => delimitedStrategy(cx, true, 1, void 0, closed && !ignoreClosed(cx) ? last2.from : void 0);
23707
23693
  }
23708
23694
  return tree.parent == null ? topIndent : null;
23709
23695
  }
@@ -25511,8 +25497,8 @@ function newlineAndIndent(atEof) {
25511
25497
  let explode = !atEof && from == to && isBetweenBrackets(state, from);
25512
25498
  if (atEof)
25513
25499
  from = to = (to <= line.to ? line : state.doc.lineAt(to)).to;
25514
- let cx2 = new IndentContext(state, { simulateBreak: from, simulateDoubleBreak: !!explode });
25515
- let indent = getIndentation(cx2, from);
25500
+ let cx = new IndentContext(state, { simulateBreak: from, simulateDoubleBreak: !!explode });
25501
+ let indent = getIndentation(cx, from);
25516
25502
  if (indent == null)
25517
25503
  indent = countColumn(/^\s*/.exec(state.doc.lineAt(from).text)[0], state.tabSize);
25518
25504
  while (to < line.to && /\s/.test(line.text[to - line.from]))
@@ -25523,7 +25509,7 @@ function newlineAndIndent(atEof) {
25523
25509
  from = line.from;
25524
25510
  let insert2 = ["", indentString(state, indent)];
25525
25511
  if (explode)
25526
- insert2.push(indentString(state, cx2.lineIndent(line.from, -1)));
25512
+ insert2.push(indentString(state, cx.lineIndent(line.from, -1)));
25527
25513
  return {
25528
25514
  changes: { from, to, insert: Text.of(insert2) },
25529
25515
  range: EditorSelection.cursor(from + 1 + insert2[1].length)
@@ -29352,13 +29338,13 @@ var TYPING_TIMOUT = 200;
29352
29338
  var emptyExtensions = [];
29353
29339
  function useCodeMirror(props) {
29354
29340
  var value = props.value, selection2 = props.selection, onChange = props.onChange, onStatistics = props.onStatistics, onCreateEditor = props.onCreateEditor, onUpdate = props.onUpdate, _props$extensions = props.extensions, extensions = _props$extensions === void 0 ? emptyExtensions : _props$extensions, autoFocus = props.autoFocus, _props$theme = props.theme, theme2 = _props$theme === void 0 ? "light" : _props$theme, _props$height = props.height, height = _props$height === void 0 ? null : _props$height, _props$minHeight = props.minHeight, minHeight = _props$minHeight === void 0 ? null : _props$minHeight, _props$maxHeight = props.maxHeight, maxHeight = _props$maxHeight === void 0 ? null : _props$maxHeight, _props$width = props.width, width = _props$width === void 0 ? null : _props$width, _props$minWidth = props.minWidth, minWidth = _props$minWidth === void 0 ? null : _props$minWidth, _props$maxWidth = props.maxWidth, maxWidth = _props$maxWidth === void 0 ? null : _props$maxWidth, _props$placeholder = props.placeholder, placeholderStr = _props$placeholder === void 0 ? "" : _props$placeholder, _props$editable = props.editable, editable2 = _props$editable === void 0 ? true : _props$editable, _props$readOnly = props.readOnly, readOnly2 = _props$readOnly === void 0 ? false : _props$readOnly, _props$indentWithTab = props.indentWithTab, defaultIndentWithTab = _props$indentWithTab === void 0 ? true : _props$indentWithTab, _props$basicSetup = props.basicSetup, defaultBasicSetup = _props$basicSetup === void 0 ? true : _props$basicSetup, root = props.root, initialState = props.initialState;
29355
- var _useState = useState16(), container = _useState[0], setContainer = _useState[1];
29356
- var _useState2 = useState16(), view = _useState2[0], setView = _useState2[1];
29357
- var _useState3 = useState16(), state = _useState3[0], setState = _useState3[1];
29358
- var typingLatch = useState16(() => ({
29341
+ var _useState = useState15(), container = _useState[0], setContainer = _useState[1];
29342
+ var _useState2 = useState15(), view = _useState2[0], setView = _useState2[1];
29343
+ var _useState3 = useState15(), state = _useState3[0], setState = _useState3[1];
29344
+ var typingLatch = useState15(() => ({
29359
29345
  current: null
29360
29346
  }))[0];
29361
- var pendingUpdate = useState16(() => ({
29347
+ var pendingUpdate = useState15(() => ({
29362
29348
  current: null
29363
29349
  }))[0];
29364
29350
  var defaultThemeOption = getDimensionTheme(height, minHeight, maxHeight, width, minWidth, maxWidth);
@@ -29424,12 +29410,12 @@ function useCodeMirror(props) {
29424
29410
  }
29425
29411
  };
29426
29412
  }, [container, state]);
29427
- useEffect13(() => {
29413
+ useEffect12(() => {
29428
29414
  if (props.container) {
29429
29415
  setContainer(props.container);
29430
29416
  }
29431
29417
  }, [props.container]);
29432
- useEffect13(() => () => {
29418
+ useEffect12(() => () => {
29433
29419
  if (view) {
29434
29420
  view.destroy();
29435
29421
  setView(void 0);
@@ -29439,19 +29425,19 @@ function useCodeMirror(props) {
29439
29425
  typingLatch.current = null;
29440
29426
  }
29441
29427
  }, [view]);
29442
- useEffect13(() => {
29428
+ useEffect12(() => {
29443
29429
  if (autoFocus && view) {
29444
29430
  view.focus();
29445
29431
  }
29446
29432
  }, [autoFocus, view]);
29447
- useEffect13(() => {
29433
+ useEffect12(() => {
29448
29434
  if (view) {
29449
29435
  view.dispatch({
29450
29436
  effects: StateEffect.reconfigure.of(getExtensions)
29451
29437
  });
29452
29438
  }
29453
29439
  }, [theme2, extensions, height, minHeight, maxHeight, width, minWidth, maxWidth, placeholderStr, editable2, readOnly2, defaultIndentWithTab, defaultBasicSetup, onChange, onUpdate]);
29454
- useEffect13(() => {
29440
+ useEffect12(() => {
29455
29441
  if (value === void 0) {
29456
29442
  return;
29457
29443
  }
@@ -29539,7 +29525,7 @@ ReactCodeMirror.displayName = "CodeMirror";
29539
29525
  var esm_default = ReactCodeMirror;
29540
29526
 
29541
29527
  // src/ui/ssh/dialogs/SSHAuthDialog.tsx
29542
- import { jsx as jsx46, jsxs as jsxs29 } from "react/jsx-runtime";
29528
+ import { jsx as jsx45, jsxs as jsxs29 } from "react/jsx-runtime";
29543
29529
  function SSHAuthDialog({
29544
29530
  isOpen,
29545
29531
  reason,
@@ -29549,11 +29535,11 @@ function SSHAuthDialog({
29549
29535
  backgroundColor
29550
29536
  }) {
29551
29537
  const { t: t2 } = useTranslation14();
29552
- const [authTab, setAuthTab] = useState17("password");
29553
- const [password, setPassword] = useState17("");
29554
- const [sshKey, setSshKey] = useState17("");
29555
- const [keyPassword, setKeyPassword] = useState17("");
29556
- const [loading, setLoading] = useState17(false);
29538
+ const [authTab, setAuthTab] = useState16("password");
29539
+ const [password, setPassword] = useState16("");
29540
+ const [sshKey, setSshKey] = useState16("");
29541
+ const [keyPassword, setKeyPassword] = useState16("");
29542
+ const [loading, setLoading] = useState16(false);
29557
29543
  if (!isOpen) return null;
29558
29544
  const hostDisplay = hostInfo.name ? `${hostInfo.name} (${hostInfo.username}@${hostInfo.ip}:${hostInfo.port})` : `${hostInfo.username}@${hostInfo.ip}:${hostInfo.port}`;
29559
29545
  const getReasonMessage = () => {
@@ -29610,15 +29596,15 @@ function SSHAuthDialog({
29610
29596
  }
29611
29597
  }
29612
29598
  };
29613
- return /* @__PURE__ */ jsx46(
29599
+ return /* @__PURE__ */ jsx45(
29614
29600
  PanePrompt,
29615
29601
  {
29616
29602
  open: true,
29617
29603
  layer: "connection",
29618
29604
  backgroundColor,
29619
- icon: /* @__PURE__ */ jsx46(Shield, { className: "size-4" }),
29605
+ icon: /* @__PURE__ */ jsx45(Shield, { className: "size-4" }),
29620
29606
  title: t2("auth.sshAuthenticationRequired"),
29621
- description: /* @__PURE__ */ jsx46("span", { className: "font-mono", children: hostDisplay }),
29607
+ description: /* @__PURE__ */ jsx45("span", { className: "font-mono", children: hostDisplay }),
29622
29608
  className: "max-w-xl",
29623
29609
  children: /* @__PURE__ */ jsxs29("form", { onSubmit: handleSubmit, children: [
29624
29610
  /* @__PURE__ */ jsxs29("div", { className: "flex flex-col gap-3", children: [
@@ -29627,21 +29613,21 @@ function SSHAuthDialog({
29627
29613
  {
29628
29614
  className: `flex items-start gap-3 p-3 border ${reason === "auth_failed" ? "border-destructive/20 bg-destructive/10" : "border-border bg-muted/10"}`,
29629
29615
  children: [
29630
- /* @__PURE__ */ jsx46(
29616
+ /* @__PURE__ */ jsx45(
29631
29617
  CircleAlert,
29632
29618
  {
29633
29619
  className: `size-4 shrink-0 mt-0.5 ${reason === "auth_failed" ? "text-destructive" : "text-accent-brand"}`
29634
29620
  }
29635
29621
  ),
29636
29622
  /* @__PURE__ */ jsxs29("div", { children: [
29637
- /* @__PURE__ */ jsx46(
29623
+ /* @__PURE__ */ jsx45(
29638
29624
  "p",
29639
29625
  {
29640
29626
  className: `text-[10px] font-bold uppercase tracking-widest ${reason === "auth_failed" ? "text-destructive" : ""}`,
29641
29627
  children: getReasonMessage()
29642
29628
  }
29643
29629
  ),
29644
- /* @__PURE__ */ jsx46(
29630
+ /* @__PURE__ */ jsx45(
29645
29631
  "p",
29646
29632
  {
29647
29633
  className: `text-xs mt-1 ${reason === "auth_failed" ? "text-destructive/80" : "text-muted-foreground"}`,
@@ -29659,7 +29645,7 @@ function SSHAuthDialog({
29659
29645
  onValueChange: (v) => setAuthTab(v),
29660
29646
  children: [
29661
29647
  /* @__PURE__ */ jsxs29(TabsList, { className: "w-full rounded-none", children: [
29662
- /* @__PURE__ */ jsx46(
29648
+ /* @__PURE__ */ jsx45(
29663
29649
  TabsTrigger,
29664
29650
  {
29665
29651
  value: "password",
@@ -29667,7 +29653,7 @@ function SSHAuthDialog({
29667
29653
  children: t2("credentials.password")
29668
29654
  }
29669
29655
  ),
29670
- /* @__PURE__ */ jsx46(
29656
+ /* @__PURE__ */ jsx45(
29671
29657
  TabsTrigger,
29672
29658
  {
29673
29659
  value: "key",
@@ -29677,8 +29663,8 @@ function SSHAuthDialog({
29677
29663
  )
29678
29664
  ] }),
29679
29665
  /* @__PURE__ */ jsxs29(TabsContent, { value: "password", className: "mt-3 flex flex-col gap-2", children: [
29680
- /* @__PURE__ */ jsx46(Label, { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: t2("credentials.password") }),
29681
- /* @__PURE__ */ jsx46(
29666
+ /* @__PURE__ */ jsx45(Label, { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: t2("credentials.password") }),
29667
+ /* @__PURE__ */ jsx45(
29682
29668
  PasswordInput,
29683
29669
  {
29684
29670
  placeholder: t2("placeholders.enterPassword"),
@@ -29688,13 +29674,13 @@ function SSHAuthDialog({
29688
29674
  className: "rounded-none bg-muted/50 border-border text-xs"
29689
29675
  }
29690
29676
  ),
29691
- /* @__PURE__ */ jsx46("p", { className: "text-[10px] text-muted-foreground", children: t2("auth.sshPasswordDescription") })
29677
+ /* @__PURE__ */ jsx45("p", { className: "text-[10px] text-muted-foreground", children: t2("auth.sshPasswordDescription") })
29692
29678
  ] }),
29693
29679
  /* @__PURE__ */ jsxs29(TabsContent, { value: "key", className: "mt-3 flex flex-col gap-3", children: [
29694
29680
  /* @__PURE__ */ jsxs29("div", { className: "flex flex-col gap-2", children: [
29695
- /* @__PURE__ */ jsx46(Label, { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: t2("credentials.sshPrivateKey") }),
29681
+ /* @__PURE__ */ jsx45(Label, { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: t2("credentials.sshPrivateKey") }),
29696
29682
  /* @__PURE__ */ jsxs29("div", { className: "relative", children: [
29697
- /* @__PURE__ */ jsx46(
29683
+ /* @__PURE__ */ jsx45(
29698
29684
  "input",
29699
29685
  {
29700
29686
  id: "key-upload",
@@ -29711,13 +29697,13 @@ function SSHAuthDialog({
29711
29697
  variant: "outline",
29712
29698
  className: "w-full justify-start rounded-none text-[10px] font-bold uppercase tracking-widest border-border",
29713
29699
  children: [
29714
- /* @__PURE__ */ jsx46(Upload, { className: "size-3.5 mr-2" }),
29715
- /* @__PURE__ */ jsx46("span", { className: "truncate", children: t2("credentials.uploadPrivateKeyFile") })
29700
+ /* @__PURE__ */ jsx45(Upload, { className: "size-3.5 mr-2" }),
29701
+ /* @__PURE__ */ jsx45("span", { className: "truncate", children: t2("credentials.uploadPrivateKeyFile") })
29716
29702
  ]
29717
29703
  }
29718
29704
  )
29719
29705
  ] }),
29720
- /* @__PURE__ */ jsx46(
29706
+ /* @__PURE__ */ jsx45(
29721
29707
  esm_default,
29722
29708
  {
29723
29709
  value: sshKey,
@@ -29754,7 +29740,7 @@ function SSHAuthDialog({
29754
29740
  t2("common.optional"),
29755
29741
  ")"
29756
29742
  ] }),
29757
- /* @__PURE__ */ jsx46(
29743
+ /* @__PURE__ */ jsx45(
29758
29744
  PasswordInput,
29759
29745
  {
29760
29746
  placeholder: t2("placeholders.keyPassword"),
@@ -29763,7 +29749,7 @@ function SSHAuthDialog({
29763
29749
  className: "rounded-none bg-muted/50 border-border text-xs"
29764
29750
  }
29765
29751
  ),
29766
- /* @__PURE__ */ jsx46("p", { className: "text-[10px] text-muted-foreground", children: t2("auth.sshKeyPasswordDescription") })
29752
+ /* @__PURE__ */ jsx45("p", { className: "text-[10px] text-muted-foreground", children: t2("auth.sshKeyPasswordDescription") })
29767
29753
  ] }),
29768
29754
  /* @__PURE__ */ jsxs29("div", { className: "flex flex-col gap-2", children: [
29769
29755
  /* @__PURE__ */ jsxs29(Label, { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: [
@@ -29772,7 +29758,7 @@ function SSHAuthDialog({
29772
29758
  t2("common.optional"),
29773
29759
  ")"
29774
29760
  ] }),
29775
- /* @__PURE__ */ jsx46(
29761
+ /* @__PURE__ */ jsx45(
29776
29762
  PasswordInput,
29777
29763
  {
29778
29764
  placeholder: t2("placeholders.enterPassword"),
@@ -29788,7 +29774,7 @@ function SSHAuthDialog({
29788
29774
  )
29789
29775
  ] }),
29790
29776
  /* @__PURE__ */ jsxs29("div", { className: "flex justify-end gap-2 pt-3", children: [
29791
- /* @__PURE__ */ jsx46(
29777
+ /* @__PURE__ */ jsx45(
29792
29778
  "button",
29793
29779
  {
29794
29780
  type: "button",
@@ -29798,7 +29784,7 @@ function SSHAuthDialog({
29798
29784
  children: t2("common.cancel")
29799
29785
  }
29800
29786
  ),
29801
- /* @__PURE__ */ jsx46(
29787
+ /* @__PURE__ */ jsx45(
29802
29788
  "button",
29803
29789
  {
29804
29790
  type: "submit",
@@ -29814,10 +29800,10 @@ function SSHAuthDialog({
29814
29800
  }
29815
29801
 
29816
29802
  // src/ui/ssh/dialogs/BrowserSignInDialog.tsx
29817
- import { useState as useState18 } from "react";
29803
+ import { useState as useState17 } from "react";
29818
29804
  import { useTranslation as useTranslation15 } from "react-i18next";
29819
29805
  import { toast as toast3 } from "sonner";
29820
- import { jsx as jsx47, jsxs as jsxs30 } from "react/jsx-runtime";
29806
+ import { jsx as jsx46, jsxs as jsxs30 } from "react/jsx-runtime";
29821
29807
  function BrowserSignInDialog({
29822
29808
  isOpen,
29823
29809
  label,
@@ -29829,7 +29815,7 @@ function BrowserSignInDialog({
29829
29815
  backgroundColor
29830
29816
  }) {
29831
29817
  const { t: t2 } = useTranslation15();
29832
- const [copied, setCopied] = useState18(false);
29818
+ const [copied, setCopied] = useState17(false);
29833
29819
  if (!isOpen) return null;
29834
29820
  const handleCopyUrl = async () => {
29835
29821
  const ok = await copyToClipboard(url);
@@ -29841,24 +29827,24 @@ function BrowserSignInDialog({
29841
29827
  toast3.error(t2("common.copyFailed"));
29842
29828
  }
29843
29829
  };
29844
- return /* @__PURE__ */ jsx47(
29830
+ return /* @__PURE__ */ jsx46(
29845
29831
  PanePrompt,
29846
29832
  {
29847
29833
  open: true,
29848
29834
  layer: "connection",
29849
29835
  backgroundColor,
29850
- icon: /* @__PURE__ */ jsx47(Shield, { className: "size-4" }),
29836
+ icon: /* @__PURE__ */ jsx46(Shield, { className: "size-4" }),
29851
29837
  title: t2("sshAuth.browserSignInRequired", { provider: label }),
29852
29838
  className: "max-w-md",
29853
29839
  children: /* @__PURE__ */ jsxs30("div", { className: "flex flex-col gap-3", children: [
29854
29840
  code2 && code2 !== "N/A" && /* @__PURE__ */ jsxs30("div", { className: "flex flex-col gap-1.5", children: [
29855
- /* @__PURE__ */ jsx47("p", { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: t2("sshAuth.browserSignInCode") }),
29856
- /* @__PURE__ */ jsx47("div", { className: "border border-border bg-muted/10 p-4 text-center", children: /* @__PURE__ */ jsx47("div", { className: "text-2xl font-mono font-bold tracking-wider text-accent-brand", children: code2 }) })
29841
+ /* @__PURE__ */ jsx46("p", { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: t2("sshAuth.browserSignInCode") }),
29842
+ /* @__PURE__ */ jsx46("div", { className: "border border-border bg-muted/10 p-4 text-center", children: /* @__PURE__ */ jsx46("div", { className: "text-2xl font-mono font-bold tracking-wider text-accent-brand", children: code2 }) })
29857
29843
  ] }),
29858
29844
  /* @__PURE__ */ jsxs30("div", { className: "flex flex-col gap-1.5", children: [
29859
- /* @__PURE__ */ jsx47("p", { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: t2("sshAuth.browserSignInUrl") }),
29845
+ /* @__PURE__ */ jsx46("p", { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: t2("sshAuth.browserSignInUrl") }),
29860
29846
  /* @__PURE__ */ jsxs30("div", { className: "flex gap-2", children: [
29861
- /* @__PURE__ */ jsx47(
29847
+ /* @__PURE__ */ jsx46(
29862
29848
  Input,
29863
29849
  {
29864
29850
  type: "text",
@@ -29867,7 +29853,7 @@ function BrowserSignInDialog({
29867
29853
  className: "rounded-none bg-muted/50 border-border text-xs font-mono flex-1"
29868
29854
  }
29869
29855
  ),
29870
- /* @__PURE__ */ jsx47(
29856
+ /* @__PURE__ */ jsx46(
29871
29857
  "button",
29872
29858
  {
29873
29859
  type: "button",
@@ -29875,13 +29861,13 @@ function BrowserSignInDialog({
29875
29861
  className: `${PROMPT_BUTTON} h-9 w-9 shrink-0 px-0`,
29876
29862
  title: t2("common.copy"),
29877
29863
  "aria-label": t2("common.copy"),
29878
- children: copied ? /* @__PURE__ */ jsx47(Check, { className: "size-4 text-accent-brand" }) : /* @__PURE__ */ jsx47(Copy, { className: "size-4" })
29864
+ children: copied ? /* @__PURE__ */ jsx46(Check, { className: "size-4 text-accent-brand" }) : /* @__PURE__ */ jsx46(Copy, { className: "size-4" })
29879
29865
  }
29880
29866
  )
29881
29867
  ] })
29882
29868
  ] }),
29883
29869
  /* @__PURE__ */ jsxs30("div", { className: "flex flex-wrap justify-end gap-2", children: [
29884
- /* @__PURE__ */ jsx47(
29870
+ /* @__PURE__ */ jsx46(
29885
29871
  "button",
29886
29872
  {
29887
29873
  type: "button",
@@ -29890,7 +29876,7 @@ function BrowserSignInDialog({
29890
29876
  children: t2("common.cancel")
29891
29877
  }
29892
29878
  ),
29893
- /* @__PURE__ */ jsx47("button", { type: "button", onClick: onContinue, className: PROMPT_BUTTON, children: t2("sshAuth.browserSignInContinue") }),
29879
+ /* @__PURE__ */ jsx46("button", { type: "button", onClick: onContinue, className: PROMPT_BUTTON, children: t2("sshAuth.browserSignInContinue") }),
29894
29880
  /* @__PURE__ */ jsxs30(
29895
29881
  "button",
29896
29882
  {
@@ -29898,7 +29884,7 @@ function BrowserSignInDialog({
29898
29884
  onClick: onOpenUrl,
29899
29885
  className: PROMPT_PRIMARY_BUTTON,
29900
29886
  children: [
29901
- /* @__PURE__ */ jsx47(ExternalLink, { className: "size-3.5" }),
29887
+ /* @__PURE__ */ jsx46(ExternalLink, { className: "size-3.5" }),
29902
29888
  t2("sshAuth.browserSignInOpen")
29903
29889
  ]
29904
29890
  }
@@ -29930,7 +29916,7 @@ var FOLDER_COLORS = [
29930
29916
 
29931
29917
  // src/ui/components/manager-card.tsx
29932
29918
  import { useTranslation as useTranslation16 } from "react-i18next";
29933
- import { jsx as jsx48, jsxs as jsxs31 } from "react/jsx-runtime";
29919
+ import { jsx as jsx47, jsxs as jsxs31 } from "react/jsx-runtime";
29934
29920
  function ManagerCardShell({
29935
29921
  title,
29936
29922
  icon,
@@ -29943,7 +29929,7 @@ function ManagerCardShell({
29943
29929
  headerExtra
29944
29930
  }) {
29945
29931
  const { t: t2 } = useTranslation16();
29946
- return /* @__PURE__ */ jsx48(
29932
+ return /* @__PURE__ */ jsx47(
29947
29933
  MetricCard,
29948
29934
  {
29949
29935
  title,
@@ -29951,21 +29937,21 @@ function ManagerCardShell({
29951
29937
  scroll: true,
29952
29938
  action: /* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-1", children: [
29953
29939
  headerExtra,
29954
- /* @__PURE__ */ jsx48(
29940
+ /* @__PURE__ */ jsx47(
29955
29941
  "button",
29956
29942
  {
29957
29943
  onClick: onRefresh,
29958
29944
  className: "flex size-6 items-center justify-center text-muted-foreground transition-colors hover:text-foreground",
29959
29945
  title: t2("managerCard.refresh"),
29960
- children: /* @__PURE__ */ jsx48(RefreshCw, { className: `size-3 ${loading ? "animate-spin" : ""}` })
29946
+ children: /* @__PURE__ */ jsx47(RefreshCw, { className: `size-3 ${loading ? "animate-spin" : ""}` })
29961
29947
  }
29962
29948
  )
29963
29949
  ] }),
29964
29950
  children: error ? /* @__PURE__ */ jsxs31("div", { className: "flex flex-col items-center gap-2 py-6 text-center", children: [
29965
- /* @__PURE__ */ jsx48(TriangleAlert, { className: "size-6 text-warning" }),
29966
- /* @__PURE__ */ jsx48("span", { className: "text-xs text-muted-foreground", children: error.message }),
29967
- error.code === "SUDO_REQUIRED" && /* @__PURE__ */ jsx48("span", { className: "text-[10px] text-muted-foreground", children: t2("managerCard.sudoHint") }),
29968
- /* @__PURE__ */ jsx48(
29951
+ /* @__PURE__ */ jsx47(TriangleAlert, { className: "size-6 text-warning" }),
29952
+ /* @__PURE__ */ jsx47("span", { className: "text-xs text-muted-foreground", children: error.message }),
29953
+ error.code === "SUDO_REQUIRED" && /* @__PURE__ */ jsx47("span", { className: "text-[10px] text-muted-foreground", children: t2("managerCard.sudoHint") }),
29954
+ /* @__PURE__ */ jsx47(
29969
29955
  Button,
29970
29956
  {
29971
29957
  variant: "outline",
@@ -29975,7 +29961,7 @@ function ManagerCardShell({
29975
29961
  children: t2("managerCard.retry")
29976
29962
  }
29977
29963
  )
29978
- ] }) : empty2 ? /* @__PURE__ */ jsx48("div", { className: "flex items-center justify-center py-8 text-xs text-muted-foreground/50", children: emptyMessage ?? t2("managerCard.noData") }) : children
29964
+ ] }) : empty2 ? /* @__PURE__ */ jsx47("div", { className: "flex items-center justify-center py-8 text-xs text-muted-foreground/50", children: emptyMessage ?? t2("managerCard.noData") }) : children
29979
29965
  }
29980
29966
  );
29981
29967
  }
@@ -29989,8 +29975,8 @@ function ManagerSearch({
29989
29975
  const { t: t2 } = useTranslation16();
29990
29976
  return /* @__PURE__ */ jsxs31("div", { className: "mb-2 flex items-center gap-1.5", children: [
29991
29977
  /* @__PURE__ */ jsxs31("div", { className: "relative flex-1", children: [
29992
- /* @__PURE__ */ jsx48(Search, { className: "pointer-events-none absolute left-2 top-1/2 size-3 -translate-y-1/2 text-muted-foreground/60" }),
29993
- /* @__PURE__ */ jsx48(
29978
+ /* @__PURE__ */ jsx47(Search, { className: "pointer-events-none absolute left-2 top-1/2 size-3 -translate-y-1/2 text-muted-foreground/60" }),
29979
+ /* @__PURE__ */ jsx47(
29994
29980
  "input",
29995
29981
  {
29996
29982
  value,
@@ -30000,13 +29986,13 @@ function ManagerSearch({
30000
29986
  }
30001
29987
  )
30002
29988
  ] }),
30003
- count != null && /* @__PURE__ */ jsx48("span", { className: "shrink-0 text-[10px] tabular-nums text-muted-foreground", children: count }),
29989
+ count != null && /* @__PURE__ */ jsx47("span", { className: "shrink-0 text-[10px] tabular-nums text-muted-foreground", children: count }),
30004
29990
  extra
30005
29991
  ] });
30006
29992
  }
30007
29993
 
30008
29994
  // src/ui/hooks/use-adaptive-polling.ts
30009
- import { useEffect as useEffect14, useRef as useRef6 } from "react";
29995
+ import { useEffect as useEffect13, useRef as useRef6 } from "react";
30010
29996
  function useAdaptivePolling(poll, policy, enabled = true, options = {}) {
30011
29997
  const pollRef = useRef6(poll);
30012
29998
  const errorRef = useRef6(options.onError);
@@ -30020,7 +30006,7 @@ function useAdaptivePolling(poll, policy, enabled = true, options = {}) {
30020
30006
  maxRequestDutyCycle
30021
30007
  } = policy;
30022
30008
  const runImmediately = options.runImmediately;
30023
- useEffect14(
30009
+ useEffect13(
30024
30010
  () => runAdaptivePolling(
30025
30011
  () => pollRef.current(),
30026
30012
  {
@@ -30050,13 +30036,13 @@ function useAdaptivePolling(poll, policy, enabled = true, options = {}) {
30050
30036
  }
30051
30037
 
30052
30038
  // src/ui/lib/widget-title.tsx
30053
- import { jsx as jsx49, jsxs as jsxs32 } from "react/jsx-runtime";
30039
+ import { jsx as jsx48, jsxs as jsxs32 } from "react/jsx-runtime";
30054
30040
  function WidgetTitle({ title, icon, fallback }) {
30055
30041
  const label = title || fallback;
30056
30042
  if (!label) return null;
30057
30043
  return /* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-1.5 px-2 py-1.5 border-b border-border/50 shrink-0", children: [
30058
- icon && /* @__PURE__ */ jsx49("span", { className: "text-accent-brand shrink-0", children: icon }),
30059
- /* @__PURE__ */ jsx49("span", { className: "text-[10px] font-semibold text-muted-foreground uppercase tracking-wider truncate", children: label })
30044
+ icon && /* @__PURE__ */ jsx48("span", { className: "text-accent-brand shrink-0", children: icon }),
30045
+ /* @__PURE__ */ jsx48("span", { className: "text-[10px] font-semibold text-muted-foreground uppercase tracking-wider truncate", children: label })
30060
30046
  ] });
30061
30047
  }
30062
30048
 
@@ -30098,7 +30084,7 @@ function runVisibleInterval(tick, intervalMs) {
30098
30084
  }
30099
30085
 
30100
30086
  // src/ui/components/empty-state.tsx
30101
- import { jsx as jsx50, jsxs as jsxs33 } from "react/jsx-runtime";
30087
+ import { jsx as jsx49, jsxs as jsxs33 } from "react/jsx-runtime";
30102
30088
  function EmptyState({
30103
30089
  icon: Icon,
30104
30090
  title,
@@ -30113,9 +30099,9 @@ function EmptyState({
30113
30099
  {
30114
30100
  className: `flex flex-col items-center justify-center gap-2 px-4 py-8 text-center ${className ?? ""}`,
30115
30101
  children: [
30116
- Icon && /* @__PURE__ */ jsx50(Icon, { className: "size-5 shrink-0 text-muted-foreground/40" }),
30117
- /* @__PURE__ */ jsx50("span", { className: "text-xs text-muted-foreground", children: title }),
30118
- guided && hint && /* @__PURE__ */ jsx50("span", { className: "max-w-xs text-[11px] leading-snug text-muted-foreground/70", children: hint }),
30102
+ Icon && /* @__PURE__ */ jsx49(Icon, { className: "size-5 shrink-0 text-muted-foreground/40" }),
30103
+ /* @__PURE__ */ jsx49("span", { className: "text-xs text-muted-foreground", children: title }),
30104
+ guided && hint && /* @__PURE__ */ jsx49("span", { className: "max-w-xs text-[11px] leading-snug text-muted-foreground/70", children: hint }),
30119
30105
  guided && action
30120
30106
  ]
30121
30107
  }
@@ -30124,7 +30110,7 @@ function EmptyState({
30124
30110
 
30125
30111
  // src/ui/ssh/dialogs/PassphraseDialog.tsx
30126
30112
  import { useTranslation as useTranslation17 } from "react-i18next";
30127
- import { jsx as jsx51, jsxs as jsxs34 } from "react/jsx-runtime";
30113
+ import { jsx as jsx50, jsxs as jsxs34 } from "react/jsx-runtime";
30128
30114
  function PassphraseDialog({
30129
30115
  isOpen,
30130
30116
  onSubmit,
@@ -30144,18 +30130,18 @@ function PassphraseDialog({
30144
30130
  onSubmit(input.value);
30145
30131
  }
30146
30132
  };
30147
- return /* @__PURE__ */ jsx51(
30133
+ return /* @__PURE__ */ jsx50(
30148
30134
  PanePrompt,
30149
30135
  {
30150
30136
  open: true,
30151
30137
  layer: "connection",
30152
30138
  backgroundColor,
30153
- icon: /* @__PURE__ */ jsx51(KeyRound, { className: "size-4" }),
30139
+ icon: /* @__PURE__ */ jsx50(KeyRound, { className: "size-4" }),
30154
30140
  title: t2("auth.passphraseRequired"),
30155
- description: /* @__PURE__ */ jsx51("span", { className: "font-mono", children: hostDisplay }),
30141
+ description: /* @__PURE__ */ jsx50("span", { className: "font-mono", children: hostDisplay }),
30156
30142
  children: /* @__PURE__ */ jsxs34("form", { onSubmit: handleSubmit, className: "flex flex-col gap-3", children: [
30157
30143
  /* @__PURE__ */ jsxs34("div", { className: "flex flex-col gap-1.5", children: [
30158
- /* @__PURE__ */ jsx51(
30144
+ /* @__PURE__ */ jsx50(
30159
30145
  PasswordInput,
30160
30146
  {
30161
30147
  id: "passphrase",
@@ -30165,11 +30151,11 @@ function PassphraseDialog({
30165
30151
  className: "rounded-none bg-muted/50 border-border text-xs"
30166
30152
  }
30167
30153
  ),
30168
- /* @__PURE__ */ jsx51("p", { className: "text-[10px] text-muted-foreground", children: t2("auth.passphraseRequiredDescription") })
30154
+ /* @__PURE__ */ jsx50("p", { className: "text-[10px] text-muted-foreground", children: t2("auth.passphraseRequiredDescription") })
30169
30155
  ] }),
30170
30156
  /* @__PURE__ */ jsxs34("div", { className: "flex justify-end gap-2", children: [
30171
- /* @__PURE__ */ jsx51("button", { type: "button", onClick: onCancel, className: PROMPT_BUTTON, children: t2("common.cancel") }),
30172
- /* @__PURE__ */ jsx51("button", { type: "submit", className: PROMPT_PRIMARY_BUTTON, children: t2("common.connect") })
30157
+ /* @__PURE__ */ jsx50("button", { type: "button", onClick: onCancel, className: PROMPT_BUTTON, children: t2("common.cancel") }),
30158
+ /* @__PURE__ */ jsx50("button", { type: "submit", className: PROMPT_PRIMARY_BUTTON, children: t2("common.connect") })
30173
30159
  ] })
30174
30160
  ] })
30175
30161
  }
@@ -30177,9 +30163,9 @@ function PassphraseDialog({
30177
30163
  }
30178
30164
 
30179
30165
  // src/ui/ssh/dialogs/HostKeyVerificationDialog.tsx
30180
- import { useState as useState19 } from "react";
30166
+ import { useState as useState18 } from "react";
30181
30167
  import { useTranslation as useTranslation18 } from "react-i18next";
30182
- import { Fragment as Fragment7, jsx as jsx52, jsxs as jsxs35 } from "react/jsx-runtime";
30168
+ import { Fragment as Fragment7, jsx as jsx51, jsxs as jsxs35 } from "react/jsx-runtime";
30183
30169
  var formatFingerprint = (fp) => fp.match(/.{1,2}/g)?.join(":") || fp;
30184
30170
  function FingerprintRow({
30185
30171
  label,
@@ -30189,10 +30175,10 @@ function FingerprintRow({
30189
30175
  }) {
30190
30176
  const { t: t2 } = useTranslation18();
30191
30177
  return /* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-1.5", children: [
30192
- /* @__PURE__ */ jsx52("p", { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: label }),
30178
+ /* @__PURE__ */ jsx51("p", { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: label }),
30193
30179
  /* @__PURE__ */ jsxs35("div", { className: "flex items-center gap-2", children: [
30194
- /* @__PURE__ */ jsx52("div", { className: "flex-1 bg-muted/50 border border-border p-3 font-mono text-xs break-all", children: formatFingerprint(value) }),
30195
- /* @__PURE__ */ jsx52(
30180
+ /* @__PURE__ */ jsx51("div", { className: "flex-1 bg-muted/50 border border-border p-3 font-mono text-xs break-all", children: formatFingerprint(value) }),
30181
+ /* @__PURE__ */ jsx51(
30196
30182
  "button",
30197
30183
  {
30198
30184
  type: "button",
@@ -30200,7 +30186,7 @@ function FingerprintRow({
30200
30186
  title: t2("common.copy"),
30201
30187
  "aria-label": t2("common.copy"),
30202
30188
  className: `${PROMPT_BUTTON} size-8 shrink-0 px-0`,
30203
- children: copied ? /* @__PURE__ */ jsx52(Check, { className: "size-4 text-accent-brand" }) : /* @__PURE__ */ jsx52(Copy, { className: "size-4" })
30189
+ children: copied ? /* @__PURE__ */ jsx51(Check, { className: "size-4 text-accent-brand" }) : /* @__PURE__ */ jsx51(Copy, { className: "size-4" })
30204
30190
  }
30205
30191
  )
30206
30192
  ] })
@@ -30220,8 +30206,8 @@ function HostKeyVerificationDialog({
30220
30206
  backgroundColor
30221
30207
  }) {
30222
30208
  const { t: t2 } = useTranslation18();
30223
- const [copiedFingerprint, setCopiedFingerprint] = useState19(false);
30224
- const [copiedOldFingerprint, setCopiedOldFingerprint] = useState19(false);
30209
+ const [copiedFingerprint, setCopiedFingerprint] = useState18(false);
30210
+ const [copiedOldFingerprint, setCopiedOldFingerprint] = useState18(false);
30225
30211
  if (!isOpen) return null;
30226
30212
  const copyFingerprint = (text, isOld = false) => {
30227
30213
  copyToClipboard(text);
@@ -30234,14 +30220,14 @@ function HostKeyVerificationDialog({
30234
30220
  }
30235
30221
  };
30236
30222
  const changed = scenario === "changed";
30237
- return /* @__PURE__ */ jsx52(
30223
+ return /* @__PURE__ */ jsx51(
30238
30224
  PanePrompt,
30239
30225
  {
30240
30226
  open: true,
30241
30227
  layer: "connection",
30242
30228
  backgroundColor,
30243
30229
  tone: changed ? "destructive" : "default",
30244
- icon: changed ? /* @__PURE__ */ jsx52(TriangleAlert, { className: "size-4" }) : /* @__PURE__ */ jsx52(Shield, { className: "size-4" }),
30230
+ icon: changed ? /* @__PURE__ */ jsx51(TriangleAlert, { className: "size-4" }) : /* @__PURE__ */ jsx51(Shield, { className: "size-4" }),
30245
30231
  title: changed ? t2("hostKey.keyChangedWarning") : t2("hostKey.verifyNewHost"),
30246
30232
  description: /* @__PURE__ */ jsxs35("span", { className: "font-mono", children: [
30247
30233
  hostname || ip,
@@ -30250,8 +30236,8 @@ function HostKeyVerificationDialog({
30250
30236
  ] }),
30251
30237
  className: "max-w-lg",
30252
30238
  actions: /* @__PURE__ */ jsxs35(Fragment7, { children: [
30253
- /* @__PURE__ */ jsx52("button", { type: "button", onClick: onReject, className: PROMPT_BUTTON, children: t2("common.cancel") }),
30254
- /* @__PURE__ */ jsx52(
30239
+ /* @__PURE__ */ jsx51("button", { type: "button", onClick: onReject, className: PROMPT_BUTTON, children: t2("common.cancel") }),
30240
+ /* @__PURE__ */ jsx51(
30255
30241
  "button",
30256
30242
  {
30257
30243
  type: "button",
@@ -30261,15 +30247,15 @@ function HostKeyVerificationDialog({
30261
30247
  }
30262
30248
  )
30263
30249
  ] }),
30264
- children: /* @__PURE__ */ jsx52("div", { className: "flex flex-col gap-3", children: changed ? /* @__PURE__ */ jsxs35(Fragment7, { children: [
30250
+ children: /* @__PURE__ */ jsx51("div", { className: "flex flex-col gap-3", children: changed ? /* @__PURE__ */ jsxs35(Fragment7, { children: [
30265
30251
  /* @__PURE__ */ jsxs35("div", { className: "flex items-start gap-3 p-3 border border-destructive/20 bg-destructive/10", children: [
30266
- /* @__PURE__ */ jsx52(TriangleAlert, { className: "size-4 text-destructive shrink-0 mt-0.5" }),
30252
+ /* @__PURE__ */ jsx51(TriangleAlert, { className: "size-4 text-destructive shrink-0 mt-0.5" }),
30267
30253
  /* @__PURE__ */ jsxs35("div", { children: [
30268
- /* @__PURE__ */ jsx52("p", { className: "text-[10px] font-bold uppercase tracking-widest text-destructive", children: t2("hostKey.securityWarning") }),
30269
- /* @__PURE__ */ jsx52("p", { className: "text-xs text-destructive/80 mt-1", children: t2("hostKey.keyChangedDescription") })
30254
+ /* @__PURE__ */ jsx51("p", { className: "text-[10px] font-bold uppercase tracking-widest text-destructive", children: t2("hostKey.securityWarning") }),
30255
+ /* @__PURE__ */ jsx51("p", { className: "text-xs text-destructive/80 mt-1", children: t2("hostKey.keyChangedDescription") })
30270
30256
  ] })
30271
30257
  ] }),
30272
- /* @__PURE__ */ jsx52(
30258
+ /* @__PURE__ */ jsx51(
30273
30259
  FingerprintRow,
30274
30260
  {
30275
30261
  label: t2("hostKey.previousKey"),
@@ -30278,7 +30264,7 @@ function HostKeyVerificationDialog({
30278
30264
  onCopy: () => copyFingerprint(oldFingerprint || "", true)
30279
30265
  }
30280
30266
  ),
30281
- /* @__PURE__ */ jsx52(
30267
+ /* @__PURE__ */ jsx51(
30282
30268
  FingerprintRow,
30283
30269
  {
30284
30270
  label: t2("hostKey.newFingerprint"),
@@ -30289,13 +30275,13 @@ function HostKeyVerificationDialog({
30289
30275
  )
30290
30276
  ] }) : /* @__PURE__ */ jsxs35(Fragment7, { children: [
30291
30277
  /* @__PURE__ */ jsxs35("div", { className: "flex items-start gap-3 p-3 border border-border bg-muted/10", children: [
30292
- /* @__PURE__ */ jsx52(Shield, { className: "size-4 text-accent-brand shrink-0 mt-0.5" }),
30278
+ /* @__PURE__ */ jsx51(Shield, { className: "size-4 text-accent-brand shrink-0 mt-0.5" }),
30293
30279
  /* @__PURE__ */ jsxs35("div", { children: [
30294
- /* @__PURE__ */ jsx52("p", { className: "text-[10px] font-bold uppercase tracking-widest", children: t2("hostKey.firstConnectionTitle") }),
30295
- /* @__PURE__ */ jsx52("p", { className: "text-xs text-muted-foreground mt-1", children: t2("hostKey.firstConnectionDescription") })
30280
+ /* @__PURE__ */ jsx51("p", { className: "text-[10px] font-bold uppercase tracking-widest", children: t2("hostKey.firstConnectionTitle") }),
30281
+ /* @__PURE__ */ jsx51("p", { className: "text-xs text-muted-foreground mt-1", children: t2("hostKey.firstConnectionDescription") })
30296
30282
  ] })
30297
30283
  ] }),
30298
- /* @__PURE__ */ jsx52(
30284
+ /* @__PURE__ */ jsx51(
30299
30285
  FingerprintRow,
30300
30286
  {
30301
30287
  label: `${t2("hostKey.fingerprint")} (${algorithm.toUpperCase()})`,
@@ -30304,7 +30290,7 @@ function HostKeyVerificationDialog({
30304
30290
  onCopy: () => copyFingerprint(fingerprint)
30305
30291
  }
30306
30292
  ),
30307
- /* @__PURE__ */ jsx52("p", { className: "text-[10px] text-muted-foreground", children: t2("hostKey.verifyInstructions") })
30293
+ /* @__PURE__ */ jsx51("p", { className: "text-[10px] text-muted-foreground", children: t2("hostKey.verifyInstructions") })
30308
30294
  ] }) })
30309
30295
  }
30310
30296
  );
@@ -30402,10 +30388,10 @@ function isTabJumpHotkey(e) {
30402
30388
 
30403
30389
  // src/ui/components/kbd.tsx
30404
30390
  import * as React12 from "react";
30405
- import { jsx as jsx53 } from "react/jsx-runtime";
30391
+ import { jsx as jsx52 } from "react/jsx-runtime";
30406
30392
  var Kbd = React12.forwardRef(
30407
30393
  ({ className, ...props }, ref) => {
30408
- return /* @__PURE__ */ jsx53(
30394
+ return /* @__PURE__ */ jsx52(
30409
30395
  "kbd",
30410
30396
  {
30411
30397
  ref,
@@ -30422,12 +30408,12 @@ Kbd.displayName = "Kbd";
30422
30408
  var KbdKey = ({
30423
30409
  className,
30424
30410
  ...props
30425
- }) => /* @__PURE__ */ jsx53("span", { className: cn("", className), ...props });
30411
+ }) => /* @__PURE__ */ jsx52("span", { className: cn("", className), ...props });
30426
30412
  KbdKey.displayName = "KbdKey";
30427
30413
  var KbdSeparator = ({
30428
30414
  className,
30429
30415
  ...props
30430
- }) => /* @__PURE__ */ jsx53("span", { className: cn("text-muted-foreground/50", className), ...props, children: "+" });
30416
+ }) => /* @__PURE__ */ jsx52("span", { className: cn("text-muted-foreground/50", className), ...props, children: "+" });
30431
30417
  KbdSeparator.displayName = "KbdSeparator";
30432
30418
 
30433
30419
  // src/ui/lib/local-adaptive-engine.ts
@@ -30801,8 +30787,325 @@ function createQuickConnectHost(input) {
30801
30787
  };
30802
30788
  }
30803
30789
 
30790
+ // src/ui/components/list-kit.tsx
30791
+ import { useState as useState19 } from "react";
30792
+ import { useTranslation as useTranslation19 } from "react-i18next";
30793
+ import { jsx as jsx53, jsxs as jsxs36 } from "react/jsx-runtime";
30794
+ var STRIPE = {
30795
+ brand: "bg-accent-brand/60",
30796
+ muted: "bg-muted-foreground/30",
30797
+ success: "bg-green-500/70",
30798
+ warning: "bg-warning/70",
30799
+ destructive: "bg-destructive/70",
30800
+ none: "bg-transparent"
30801
+ };
30802
+ function PanelList({
30803
+ empty: empty2,
30804
+ className,
30805
+ children
30806
+ }) {
30807
+ const hasRows = Array.isArray(children) ? children.flat().some(Boolean) : Boolean(children);
30808
+ return /* @__PURE__ */ jsx53(
30809
+ "div",
30810
+ {
30811
+ className: cn(
30812
+ "flex min-h-0 flex-1 flex-col overflow-y-auto thin-scrollbar",
30813
+ className
30814
+ ),
30815
+ children: hasRows ? children : empty2
30816
+ }
30817
+ );
30818
+ }
30819
+ function ListRow({
30820
+ title,
30821
+ icon,
30822
+ badges,
30823
+ meta: meta2,
30824
+ stripe = 0,
30825
+ tone = "brand",
30826
+ color,
30827
+ selected,
30828
+ active: active2,
30829
+ dimmed,
30830
+ leading,
30831
+ trailing,
30832
+ actions,
30833
+ onClick,
30834
+ className,
30835
+ children,
30836
+ ...rest
30837
+ }) {
30838
+ return /* @__PURE__ */ jsxs36(
30839
+ "div",
30840
+ {
30841
+ ...rest,
30842
+ role: onClick ? "button" : rest.role,
30843
+ tabIndex: onClick ? 0 : rest.tabIndex,
30844
+ onClick,
30845
+ onKeyDown: (e) => {
30846
+ rest.onKeyDown?.(e);
30847
+ if (!onClick || e.defaultPrevented || e.target !== e.currentTarget)
30848
+ return;
30849
+ if (e.key === "Enter" || e.key === " ") {
30850
+ e.preventDefault();
30851
+ onClick();
30852
+ }
30853
+ },
30854
+ "data-selected": selected || void 0,
30855
+ className: cn(
30856
+ "group/row relative flex items-stretch select-none border-b border-border/40 transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring",
30857
+ onClick && "cursor-pointer",
30858
+ selected ? "bg-accent-brand/10 hover:bg-accent-brand/15" : active2 ? "bg-muted/50" : stripe % 2 === 1 && "bg-muted/15",
30859
+ dimmed && "opacity-60",
30860
+ className
30861
+ ),
30862
+ children: [
30863
+ /* @__PURE__ */ jsx53(
30864
+ "div",
30865
+ {
30866
+ className: cn(
30867
+ "w-[3px] shrink-0",
30868
+ selected ? "bg-accent-brand" : !color && STRIPE[tone]
30869
+ ),
30870
+ style: color && !selected ? { backgroundColor: color } : void 0
30871
+ }
30872
+ ),
30873
+ leading,
30874
+ /* @__PURE__ */ jsxs36("div", { className: "flex min-w-0 flex-1 flex-col gap-[3.5px] py-[7px] pl-[8.75px] pr-[7px]", children: [
30875
+ /* @__PURE__ */ jsxs36("div", { className: "flex min-w-0 items-center gap-1.5", children: [
30876
+ icon && /* @__PURE__ */ jsx53("span", { className: "flex shrink-0 text-muted-foreground/60 [&_svg]:size-3", children: icon }),
30877
+ /* @__PURE__ */ jsx53("span", { className: "truncate text-[13px] font-semibold leading-none tracking-tight text-foreground", children: title }),
30878
+ badges
30879
+ ] }),
30880
+ meta2 && /* @__PURE__ */ jsx53("div", { className: "min-w-0 truncate text-[11px] leading-tight text-muted-foreground/80", children: meta2 }),
30881
+ children,
30882
+ actions && /* @__PURE__ */ jsx53(
30883
+ "div",
30884
+ {
30885
+ onClick: (e) => e.stopPropagation(),
30886
+ className: cn(
30887
+ "flex-wrap items-center gap-[1.75px] border-t border-border/30 pt-[3.5px]",
30888
+ active2 ? "flex" : "hidden group-hover/row:flex group-focus-within/row:flex pointer-coarse:flex"
30889
+ ),
30890
+ children: actions
30891
+ }
30892
+ )
30893
+ ] }),
30894
+ trailing && /* @__PURE__ */ jsx53("div", { className: "flex shrink-0 items-center pr-2", children: trailing })
30895
+ ]
30896
+ }
30897
+ );
30898
+ }
30899
+ function ListRowAction({
30900
+ label,
30901
+ tone = "default",
30902
+ className,
30903
+ children,
30904
+ ...rest
30905
+ }) {
30906
+ return /* @__PURE__ */ jsx53(
30907
+ "button",
30908
+ {
30909
+ type: "button",
30910
+ title: label,
30911
+ "aria-label": label,
30912
+ ...rest,
30913
+ className: cn(
30914
+ "flex size-[22.75px] items-center justify-center transition-colors hover:bg-muted disabled:pointer-events-none disabled:opacity-40 [&_svg]:size-3.5",
30915
+ tone === "brand" ? "text-accent-brand/80 hover:text-accent-brand" : tone === "destructive" ? "text-muted-foreground/60 hover:bg-destructive/10 hover:text-destructive" : "text-muted-foreground/60 hover:text-foreground",
30916
+ className
30917
+ ),
30918
+ children
30919
+ }
30920
+ );
30921
+ }
30922
+ function ListBadge({
30923
+ tone = "muted",
30924
+ className,
30925
+ children
30926
+ }) {
30927
+ return /* @__PURE__ */ jsx53(
30928
+ "span",
30929
+ {
30930
+ className: cn(
30931
+ "flex shrink-0 items-center gap-0.5 border px-1 py-px text-[9px] uppercase leading-none tracking-wider [&_svg]:size-2.5",
30932
+ tone === "brand" && "border-accent-brand/30 bg-accent-brand/10 text-accent-brand",
30933
+ tone === "warning" && "border-warning/30 bg-warning/10 text-warning",
30934
+ tone === "destructive" && "border-destructive/30 bg-destructive/10 text-destructive",
30935
+ tone === "success" && "border-green-500/30 bg-green-500/10 text-green-500",
30936
+ tone === "muted" && "border-border bg-muted/40 text-muted-foreground",
30937
+ className
30938
+ ),
30939
+ children
30940
+ }
30941
+ );
30942
+ }
30943
+ function ListRowFolder({
30944
+ name: name2,
30945
+ icon,
30946
+ count,
30947
+ open,
30948
+ onToggle,
30949
+ stripe = 0,
30950
+ actions,
30951
+ dropActive,
30952
+ onDropItem,
30953
+ emptyText,
30954
+ className,
30955
+ children
30956
+ }) {
30957
+ const [dragOver, setDragOver] = useState19(false);
30958
+ const empty2 = count === 0;
30959
+ return /* @__PURE__ */ jsxs36("div", { className: cn("border-b border-border/40", className), children: [
30960
+ /* @__PURE__ */ jsxs36(
30961
+ "div",
30962
+ {
30963
+ role: "button",
30964
+ tabIndex: 0,
30965
+ "aria-expanded": open,
30966
+ onClick: onToggle,
30967
+ onKeyDown: (e) => {
30968
+ if (e.target !== e.currentTarget) return;
30969
+ if (e.key === "Enter" || e.key === " ") {
30970
+ e.preventDefault();
30971
+ onToggle();
30972
+ }
30973
+ },
30974
+ onDragOver: (e) => {
30975
+ if (!dropActive) return;
30976
+ e.preventDefault();
30977
+ setDragOver(true);
30978
+ },
30979
+ onDragLeave: (e) => {
30980
+ if (e.currentTarget === e.target) setDragOver(false);
30981
+ },
30982
+ onDrop: (e) => {
30983
+ if (!dropActive) return;
30984
+ e.preventDefault();
30985
+ setDragOver(false);
30986
+ onDropItem?.();
30987
+ },
30988
+ className: cn(
30989
+ "group/folder flex w-full cursor-pointer select-none items-center gap-2 py-1.5 pl-2.5 pr-2 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring",
30990
+ open ? "bg-muted/40" : "hover:bg-muted/30",
30991
+ stripe % 2 === 1 && !open && "bg-muted/[0.08]",
30992
+ dragOver && dropActive && "bg-accent-brand/10 ring-1 ring-inset ring-accent-brand"
30993
+ ),
30994
+ children: [
30995
+ /* @__PURE__ */ jsx53(
30996
+ ChevronRight,
30997
+ {
30998
+ className: cn(
30999
+ "size-3.5 shrink-0 text-muted-foreground/60 transition-transform",
31000
+ open && "rotate-90"
31001
+ )
31002
+ }
31003
+ ),
31004
+ icon && /* @__PURE__ */ jsx53(
31005
+ "span",
31006
+ {
31007
+ className: cn(
31008
+ "flex shrink-0 [&_svg]:size-4",
31009
+ open ? "text-accent-brand" : "text-muted-foreground/70"
31010
+ ),
31011
+ children: icon
31012
+ }
31013
+ ),
31014
+ /* @__PURE__ */ jsx53("span", { className: "min-w-0 flex-1 truncate text-[13px] font-bold tracking-tight text-foreground", children: name2 }),
31015
+ count !== void 0 && /* @__PURE__ */ jsx53("span", { className: "shrink-0 bg-muted/70 px-1.5 py-[1px] text-[10px] tabular-nums text-muted-foreground/70", children: count }),
31016
+ actions && /* @__PURE__ */ jsx53(
31017
+ "div",
31018
+ {
31019
+ onClick: (e) => e.stopPropagation(),
31020
+ className: "flex shrink-0 items-center opacity-0 transition-opacity focus-within:opacity-100 group-hover/folder:opacity-100 pointer-coarse:opacity-100 has-[[data-state=open]]:opacity-100",
31021
+ children: actions
31022
+ }
31023
+ )
31024
+ ]
31025
+ }
31026
+ ),
31027
+ open && /* @__PURE__ */ jsx53("div", { className: "ml-[27px] border-l border-t border-border/50 border-t-border/40 [&>*:last-child]:border-b-0", children: empty2 && emptyText ? /* @__PURE__ */ jsx53("div", { className: "px-3 py-2 text-[11px] text-muted-foreground/60", children: emptyText }) : children })
31028
+ ] });
31029
+ }
31030
+ function AddButton({
31031
+ label,
31032
+ compact,
31033
+ className,
31034
+ ...rest
31035
+ }) {
31036
+ const { t: t2 } = useTranslation19();
31037
+ const text = label ?? t2("common.new");
31038
+ return /* @__PURE__ */ jsxs36(
31039
+ Button,
31040
+ {
31041
+ variant: "outline",
31042
+ size: compact ? "icon" : "default",
31043
+ title: text,
31044
+ "aria-label": text,
31045
+ ...rest,
31046
+ className: cn(
31047
+ "shrink-0 border-accent-brand/40 text-accent-brand hover:bg-accent-brand/10 hover:text-accent-brand dark:border-accent-brand/40 dark:bg-transparent dark:hover:bg-accent-brand/10",
31048
+ className
31049
+ ),
31050
+ children: [
31051
+ /* @__PURE__ */ jsx53(Plus, { className: "size-3.5" }),
31052
+ !compact && /* @__PURE__ */ jsx53("span", { children: text })
31053
+ ]
31054
+ }
31055
+ );
31056
+ }
31057
+ function FormFooter({
31058
+ onCancel,
31059
+ onSave,
31060
+ saveLabel,
31061
+ cancelLabel,
31062
+ saving,
31063
+ dirty,
31064
+ status,
31065
+ disabled,
31066
+ onDelete,
31067
+ deleteLabel,
31068
+ extra,
31069
+ saveType = "button",
31070
+ form
31071
+ }) {
31072
+ const { t: t2 } = useTranslation19();
31073
+ return /* @__PURE__ */ jsxs36("div", { className: "flex w-full min-w-0 items-center gap-2", children: [
31074
+ onDelete && /* @__PURE__ */ jsxs36(
31075
+ Button,
31076
+ {
31077
+ variant: "ghost",
31078
+ size: "sm",
31079
+ onClick: onDelete,
31080
+ disabled: saving,
31081
+ className: "text-destructive hover:bg-destructive/10 hover:text-destructive dark:hover:bg-destructive/10",
31082
+ children: [
31083
+ /* @__PURE__ */ jsx53(Trash, {}),
31084
+ deleteLabel ?? t2("common.delete")
31085
+ ]
31086
+ }
31087
+ ),
31088
+ /* @__PURE__ */ jsx53("div", { className: "min-w-0 flex-1 truncate text-[11px]", children: status ?? (dirty && /* @__PURE__ */ jsx53("span", { className: "text-warning", children: t2("common.unsavedChanges") })) }),
31089
+ onCancel && /* @__PURE__ */ jsx53(Button, { variant: "ghost", size: "sm", onClick: onCancel, disabled: saving, children: cancelLabel ?? t2("common.cancel") }),
31090
+ extra,
31091
+ (onSave || saveType === "submit") && /* @__PURE__ */ jsx53(
31092
+ Button,
31093
+ {
31094
+ type: saveType,
31095
+ form,
31096
+ variant: "outline",
31097
+ size: "sm",
31098
+ onClick: onSave,
31099
+ disabled: disabled || saving,
31100
+ className: "border-accent-brand/40 px-6 text-accent-brand hover:bg-accent-brand/10 hover:text-accent-brand dark:border-accent-brand/40 dark:bg-transparent dark:hover:bg-accent-brand/10",
31101
+ children: saving ? t2("common.saving") : saveLabel ?? t2("common.save")
31102
+ }
31103
+ )
31104
+ ] });
31105
+ }
31106
+
30804
31107
  // src/ui/components/data-view.tsx
30805
- import { jsx as jsx54, jsxs as jsxs36 } from "react/jsx-runtime";
31108
+ import { jsx as jsx54, jsxs as jsxs37 } from "react/jsx-runtime";
30806
31109
  var COLS = {
30807
31110
  1: "grid-cols-1",
30808
31111
  2: "grid-cols-2",
@@ -30856,7 +31159,7 @@ function DataView({
30856
31159
  }
30857
31160
  const template = listColumns.map((c) => c.width).join(" ");
30858
31161
  const rowHeight = density === "compact" ? "h-7" : "h-9";
30859
- return /* @__PURE__ */ jsxs36("div", { className: cn("border border-border bg-card", className), role: "table", children: [
31162
+ return /* @__PURE__ */ jsxs37("div", { className: cn("border border-border bg-card", className), role: "table", children: [
30860
31163
  /* @__PURE__ */ jsx54(
30861
31164
  "div",
30862
31165
  {
@@ -31001,7 +31304,7 @@ function usageBarColor(percent) {
31001
31304
  }
31002
31305
 
31003
31306
  // src/ui/components/meter.tsx
31004
- import { jsx as jsx56, jsxs as jsxs37 } from "react/jsx-runtime";
31307
+ import { jsx as jsx56, jsxs as jsxs38 } from "react/jsx-runtime";
31005
31308
  function Meter({
31006
31309
  percent,
31007
31310
  className
@@ -31021,7 +31324,7 @@ function UsagePair({
31021
31324
  detail
31022
31325
  }) {
31023
31326
  const clamped = Math.min(100, Math.max(0, percent));
31024
- return /* @__PURE__ */ jsxs37("div", { className: "flex min-w-0 items-center gap-2", children: [
31327
+ return /* @__PURE__ */ jsxs38("div", { className: "flex min-w-0 items-center gap-2", children: [
31025
31328
  label && /* @__PURE__ */ jsx56("span", { className: "w-10 shrink-0 text-[10px] uppercase text-muted-foreground", children: label }),
31026
31329
  /* @__PURE__ */ jsx56(Meter, { percent: clamped, className: "flex-1" }),
31027
31330
  /* @__PURE__ */ jsx56(
@@ -31039,8 +31342,8 @@ function UsagePair({
31039
31342
 
31040
31343
  // src/ui/components/form-fields.tsx
31041
31344
  import { useState as useState21 } from "react";
31042
- import { useTranslation as useTranslation19 } from "react-i18next";
31043
- import { jsx as jsx57, jsxs as jsxs38 } from "react/jsx-runtime";
31345
+ import { useTranslation as useTranslation20 } from "react-i18next";
31346
+ import { jsx as jsx57, jsxs as jsxs39 } from "react/jsx-runtime";
31044
31347
  function Field2({
31045
31348
  label,
31046
31349
  hint,
@@ -31050,8 +31353,8 @@ function Field2({
31050
31353
  className,
31051
31354
  children
31052
31355
  }) {
31053
- return /* @__PURE__ */ jsxs38("div", { className: cn("flex flex-col gap-1.5", className), children: [
31054
- (label || aside) && /* @__PURE__ */ jsxs38("div", { className: "flex items-center gap-2", children: [
31356
+ return /* @__PURE__ */ jsxs39("div", { "data-setting-row": "", className: cn("flex flex-col gap-1.5", className), children: [
31357
+ (label || aside) && /* @__PURE__ */ jsxs39("div", { className: "flex items-center gap-2", children: [
31055
31358
  /* @__PURE__ */ jsx57(
31056
31359
  "label",
31057
31360
  {
@@ -31148,7 +31451,7 @@ function SecretField({
31148
31451
  disabled,
31149
31452
  className
31150
31453
  }) {
31151
- const { t: t2 } = useTranslation19();
31454
+ const { t: t2 } = useTranslation20();
31152
31455
  const saved = isSecretSentinel(value);
31153
31456
  return /* @__PURE__ */ jsx57(
31154
31457
  Field2,
@@ -31182,7 +31485,7 @@ function SelectField({
31182
31485
  placeholder: placeholder2
31183
31486
  }) {
31184
31487
  const EMPTY = "__empty__";
31185
- return /* @__PURE__ */ jsx57(Field2, { label, hint, error, className, children: /* @__PURE__ */ jsxs38(
31488
+ return /* @__PURE__ */ jsx57(Field2, { label, hint, error, className, children: /* @__PURE__ */ jsxs39(
31186
31489
  Select2,
31187
31490
  {
31188
31491
  value: value === "" ? EMPTY : value,
@@ -31273,11 +31576,11 @@ function Repeater({
31273
31576
  hint,
31274
31577
  renderItem
31275
31578
  }) {
31276
- const { t: t2 } = useTranslation19();
31277
- return /* @__PURE__ */ jsxs38("div", { className: "flex flex-col gap-2 py-3", children: [
31278
- /* @__PURE__ */ jsxs38("div", { className: "flex items-center gap-2", children: [
31579
+ const { t: t2 } = useTranslation20();
31580
+ return /* @__PURE__ */ jsxs39("div", { className: "flex flex-col gap-2 py-3", children: [
31581
+ /* @__PURE__ */ jsxs39("div", { className: "flex items-center gap-2", children: [
31279
31582
  /* @__PURE__ */ jsx57("span", { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: label }),
31280
- /* @__PURE__ */ jsxs38(
31583
+ /* @__PURE__ */ jsxs39(
31281
31584
  Button,
31282
31585
  {
31283
31586
  type: "button",
@@ -31293,7 +31596,7 @@ function Repeater({
31293
31596
  )
31294
31597
  ] }),
31295
31598
  hint && /* @__PURE__ */ jsx57("span", { className: "text-[10px] text-muted-foreground", children: hint }),
31296
- items.length === 0 ? /* @__PURE__ */ jsx57("span", { className: "border border-dashed border-border px-3 py-2 text-[10px] text-muted-foreground", children: empty2 }) : /* @__PURE__ */ jsx57("div", { className: "flex flex-col gap-2", children: items.map((item, index) => /* @__PURE__ */ jsxs38(
31599
+ items.length === 0 ? /* @__PURE__ */ jsx57("span", { className: "border border-dashed border-border px-3 py-2 text-[10px] text-muted-foreground", children: empty2 }) : /* @__PURE__ */ jsx57("div", { className: "flex flex-col gap-2", children: items.map((item, index) => /* @__PURE__ */ jsxs39(
31297
31600
  "div",
31298
31601
  {
31299
31602
  className: "flex items-start gap-2 border border-border bg-muted/10 p-2",
@@ -31327,9 +31630,9 @@ function TagInput({
31327
31630
  onTagsChange,
31328
31631
  onInputChange
31329
31632
  }) {
31330
- const { t: t2 } = useTranslation19();
31331
- return /* @__PURE__ */ jsxs38("div", { className: "flex min-h-8 flex-wrap items-center gap-1 border border-input bg-background px-2 py-1 focus-within:border-ring focus-within:ring-1 focus-within:ring-ring/50 dark:bg-input/30", children: [
31332
- tags2.map((tag) => /* @__PURE__ */ jsxs38(
31633
+ const { t: t2 } = useTranslation20();
31634
+ return /* @__PURE__ */ jsxs39("div", { className: "flex min-h-8 flex-wrap items-center gap-1 border border-input bg-background px-2 py-1 focus-within:border-ring focus-within:ring-1 focus-within:ring-ring/50 dark:bg-input/30", children: [
31635
+ tags2.map((tag) => /* @__PURE__ */ jsxs39(
31333
31636
  "span",
31334
31637
  {
31335
31638
  className: "flex items-center gap-0.5 border border-border/60 bg-muted px-1.5 py-0.5 text-[10px] text-foreground",
@@ -31384,7 +31687,7 @@ import {
31384
31687
  useState as useState22
31385
31688
  } from "react";
31386
31689
  import { useConnectionRetry } from "@termix-ssh/plugin-sdk/frontend";
31387
- import { jsx as jsx58, jsxs as jsxs39 } from "react/jsx-runtime";
31690
+ import { jsx as jsx58, jsxs as jsxs40 } from "react/jsx-runtime";
31388
31691
  function messageOf(err) {
31389
31692
  return typeof err === "string" ? err : getErrorMessage(err);
31390
31693
  }
@@ -31534,7 +31837,7 @@ function Gate({
31534
31837
  gateRef.current = controller;
31535
31838
  const up = status === "connected" && !unavailable;
31536
31839
  const content2 = typeof children === "function" ? children(controller) : children;
31537
- return /* @__PURE__ */ jsx58(GateContext.Provider, { value: controller, children: /* @__PURE__ */ jsxs39("div", { className: `relative h-full w-full ${className ?? ""}`, children: [
31840
+ return /* @__PURE__ */ jsx58(GateContext.Provider, { value: controller, children: /* @__PURE__ */ jsxs40("div", { className: `relative h-full w-full ${className ?? ""}`, children: [
31538
31841
  (up || keepMounted) && content2,
31539
31842
  /* @__PURE__ */ jsx58(
31540
31843
  ConnectionScreen,
@@ -31558,6 +31861,7 @@ function Gate({
31558
31861
  }
31559
31862
  export {
31560
31863
  ActionSlot,
31864
+ AddButton,
31561
31865
  Alert,
31562
31866
  AlertDescription,
31563
31867
  AlertDialog,
@@ -31625,6 +31929,7 @@ export {
31625
31929
  FakeSwitch,
31626
31930
  Field2 as Field,
31627
31931
  FieldPair,
31932
+ FormFooter,
31628
31933
  FullScreenAppWrapper,
31629
31934
  GroupHeading,
31630
31935
  HostDefaultBadge,
@@ -31638,6 +31943,10 @@ export {
31638
31943
  KbdSeparator,
31639
31944
  Label,
31640
31945
  LineChart,
31946
+ ListBadge,
31947
+ ListRow,
31948
+ ListRowAction,
31949
+ ListRowFolder,
31641
31950
  ManagerCardShell,
31642
31951
  ManagerSearch,
31643
31952
  Meter,
@@ -31649,6 +31958,7 @@ export {
31649
31958
  PROMPT_DESTRUCTIVE_BUTTON,
31650
31959
  PROMPT_PRIMARY_BUTTON,
31651
31960
  PanePrompt,
31961
+ PanelList,
31652
31962
  PanelSearch,
31653
31963
  PanelShell,
31654
31964
  PassphraseDialog,