treege 3.0.0-beta.82 → 3.0.0-beta.83

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.
@@ -1,31 +1,31 @@
1
- import { A as e, C as t, D as n, E as r, F as i, L as a, M as o, N as s, S as c, T as l, _ as u, b as d, g as f, h as p, j as m, k as h, m as g, s as _, w as v, y } from "./ThemeContext-BgTIhoK6.js";
2
- import * as b from "react";
3
- import { createContext as x, forwardRef as S, useCallback as C, useContext as w, useEffect as T, useMemo as ee, useRef as E, useState as D } from "react";
4
- import { Fragment as te, jsx as O, jsxs as k } from "react/jsx-runtime";
5
- import { Check as ne, CheckIcon as A, ChevronDownIcon as j, ChevronLeftIcon as M, ChevronRightIcon as re, ChevronUpIcon as ie, ChevronsUpDown as ae, CircleIcon as N, File as P, FileUp as F, Loader2 as I, MapPin as L, SearchIcon as oe, X as se, XIcon as ce } from "lucide-react";
6
- import { Slot as R } from "@radix-ui/react-slot";
7
- import { cva as z } from "class-variance-authority";
8
- import { clsx as le } from "clsx";
9
- import { extendTailwindMerge as ue } from "tailwind-merge";
10
- import * as B from "@radix-ui/react-checkbox";
11
- import * as de from "@radix-ui/react-label";
12
- import * as fe from "@radix-ui/react-popover";
1
+ import { D as e, E as t, F as n, L as r, M as i, N as a, O as o, P as s, S as c, T as l, _ as u, g as d, h as f, j as p, k as m, s as h, v as g, w as _, x as v, y, z as b } from "./ThemeContext-BnPOFQC7.js";
2
+ import * as x from "react";
3
+ import { createContext as S, forwardRef as C, useCallback as w, useContext as T, useEffect as E, useMemo as ee, useRef as D, useState as O } from "react";
4
+ import { Fragment as te, jsx as k, jsxs as A } from "react/jsx-runtime";
5
+ import { Check as ne, CheckIcon as re, ChevronDownIcon as j, ChevronLeftIcon as ie, ChevronRightIcon as ae, ChevronUpIcon as M, ChevronsUpDown as oe, CircleIcon as N, File as P, FileUp as se, Loader2 as F, MapPin as I, SearchIcon as ce, X as le, XIcon as L } from "lucide-react";
6
+ import { Slot as ue } from "@radix-ui/react-slot";
7
+ import { cva as R } from "class-variance-authority";
8
+ import { clsx as de } from "clsx";
9
+ import { extendTailwindMerge as z } from "tailwind-merge";
10
+ import * as fe from "@radix-ui/react-checkbox";
11
+ import * as pe from "@radix-ui/react-label";
12
+ import * as B from "@radix-ui/react-popover";
13
13
  import * as V from "@radix-ui/react-select";
14
14
  import * as H from "@radix-ui/react-tooltip";
15
- import * as pe from "@radix-ui/react-separator";
15
+ import * as me from "@radix-ui/react-separator";
16
16
  import { Command as U } from "cmdk";
17
17
  import * as W from "@radix-ui/react-dialog";
18
- import { DayPicker as me, getDefaultClassNames as he } from "react-day-picker";
19
- import * as ge from "@radix-ui/react-radio-group";
20
- import * as _e from "@radix-ui/react-switch";
18
+ import { DayPicker as he, getDefaultClassNames as ge } from "react-day-picker";
19
+ import * as _e from "@radix-ui/react-radio-group";
20
+ import * as G from "@radix-ui/react-switch";
21
21
  //#region src/shared/lib/utils.ts
22
- var G = ue({ prefix: "tg" });
22
+ var ve = z({ prefix: "tg" });
23
23
  function K(...e) {
24
- return G(le(e));
24
+ return ve(de(e));
25
25
  }
26
26
  //#endregion
27
27
  //#region src/shared/components/ui/button.tsx
28
- var ve = z("tg:inline-flex tg:items-center tg:justify-center tg:gap-2 tg:whitespace-nowrap tg:rounded-md tg:text-sm tg:font-medium tg:transition-all tg:disabled:pointer-events-none tg:disabled:opacity-50 tg:[&_svg]:pointer-events-none tg:[&_svg:not([class*='size-'])]:size-4 tg:shrink-0 tg:[&_svg]:shrink-0 tg:outline-none tg:focus-visible:border-ring tg:focus-visible:ring-ring/50 tg:focus-visible:ring-[3px] tg:aria-invalid:ring-destructive/20 tg:dark:aria-invalid:ring-destructive/40 tg:aria-invalid:border-destructive", {
28
+ var ye = R("tg:inline-flex tg:items-center tg:justify-center tg:gap-2 tg:whitespace-nowrap tg:rounded-md tg:text-sm tg:font-medium tg:transition-all tg:disabled:pointer-events-none tg:disabled:opacity-50 tg:[&_svg]:pointer-events-none tg:[&_svg:not([class*='size-'])]:size-4 tg:shrink-0 tg:[&_svg]:shrink-0 tg:outline-none tg:focus-visible:border-ring tg:focus-visible:ring-ring/50 tg:focus-visible:ring-[3px] tg:aria-invalid:ring-destructive/20 tg:dark:aria-invalid:ring-destructive/40 tg:aria-invalid:border-destructive", {
29
29
  defaultVariants: {
30
30
  size: "default",
31
31
  variant: "default"
@@ -52,9 +52,9 @@ var ve = z("tg:inline-flex tg:items-center tg:justify-center tg:gap-2 tg:whitesp
52
52
  }
53
53
  });
54
54
  function q({ className: e, variant: t, size: n, asChild: r = !1, ...i }) {
55
- return /* @__PURE__ */ O(r ? R : "button", {
55
+ return /* @__PURE__ */ k(r ? ue : "button", {
56
56
  "data-slot": "button",
57
- className: K(ve({
57
+ className: K(ye({
58
58
  className: e,
59
59
  size: n,
60
60
  variant: t
@@ -64,36 +64,36 @@ function q({ className: e, variant: t, size: n, asChild: r = !1, ...i }) {
64
64
  }
65
65
  //#endregion
66
66
  //#region src/shared/components/ui/checkbox.tsx
67
- function ye({ className: e, ...t }) {
68
- return /* @__PURE__ */ O(B.Root, {
67
+ function be({ className: e, ...t }) {
68
+ return /* @__PURE__ */ k(fe.Root, {
69
69
  "data-slot": "checkbox",
70
70
  className: K("tg:peer tg:size-4 tg:shrink-0 tg:rounded-[4px] tg:border tg:border-input tg:shadow-xs tg:outline-none tg:transition-shadow tg:focus-visible:border-ring tg:focus-visible:ring-[3px] tg:focus-visible:ring-ring/50 tg:disabled:cursor-not-allowed tg:disabled:opacity-50 tg:aria-invalid:border-destructive tg:aria-invalid:ring-destructive/20 tg:data-[state=checked]:border-primary tg:data-[state=checked]:bg-primary tg:data-[state=checked]:text-primary-foreground tg:dark:bg-input/30 tg:dark:data-[state=checked]:bg-primary tg:dark:aria-invalid:ring-destructive/40", e),
71
71
  ...t,
72
- children: /* @__PURE__ */ O(B.Indicator, {
72
+ children: /* @__PURE__ */ k(fe.Indicator, {
73
73
  "data-slot": "checkbox-indicator",
74
74
  className: "tg:grid tg:place-content-center tg:text-current tg:transition-none",
75
- children: /* @__PURE__ */ O(A, { className: "tg:size-3.5" })
75
+ children: /* @__PURE__ */ k(re, { className: "tg:size-3.5" })
76
76
  })
77
77
  });
78
78
  }
79
79
  //#endregion
80
80
  //#region src/shared/components/ui/form.tsx
81
81
  function J({ className: e, ...t }) {
82
- return /* @__PURE__ */ O("div", {
82
+ return /* @__PURE__ */ k("div", {
83
83
  "data-slot": "form-item",
84
84
  className: K("tg:grid tg:gap-2", e),
85
85
  ...t
86
86
  });
87
87
  }
88
88
  function Y({ className: e, ...t }) {
89
- return /* @__PURE__ */ O("p", {
89
+ return /* @__PURE__ */ k("p", {
90
90
  "data-slot": "form-description",
91
91
  className: K("tg:text-muted-foreground tg:text-xs", e),
92
92
  ...t
93
93
  });
94
94
  }
95
95
  function X({ className: e, ...t }) {
96
- return /* @__PURE__ */ O("p", {
96
+ return /* @__PURE__ */ k("p", {
97
97
  "data-slot": "form-error",
98
98
  className: K("tg:text-destructive tg:text-xs", e),
99
99
  ...t
@@ -102,7 +102,7 @@ function X({ className: e, ...t }) {
102
102
  //#endregion
103
103
  //#region src/shared/components/ui/input.tsx
104
104
  function Z({ className: e, type: t, ...n }) {
105
- return /* @__PURE__ */ O("input", {
105
+ return /* @__PURE__ */ k("input", {
106
106
  type: t,
107
107
  "data-slot": "input",
108
108
  className: K("tg:h-9 tg:w-full tg:min-w-0 tg:rounded-md tg:border tg:border-input tg:bg-transparent tg:px-3 tg:py-1 tg:text-base tg:shadow-xs tg:outline-none tg:transition-[color,box-shadow] tg:selection:bg-primary tg:selection:text-primary-foreground tg:file:inline-flex tg:file:h-7 tg:file:border-0 tg:file:bg-transparent tg:file:font-medium tg:file:text-foreground tg:file:text-sm tg:placeholder:text-muted-foreground tg:disabled:pointer-events-none tg:disabled:cursor-not-allowed tg:disabled:opacity-50 tg:md:text-sm tg:dark:bg-input/30", "tg:focus-visible:border-ring tg:focus-visible:ring-[3px] tg:focus-visible:ring-ring/50", "tg:aria-invalid:border-destructive tg:aria-invalid:ring-destructive/20 tg:dark:aria-invalid:ring-destructive/40", e),
@@ -111,145 +111,189 @@ function Z({ className: e, type: t, ...n }) {
111
111
  }
112
112
  //#endregion
113
113
  //#region src/shared/components/ui/label.tsx
114
- var Q = ({ className: e, ...t }) => /* @__PURE__ */ O(de.Root, {
114
+ var Q = ({ className: e, ...t }) => /* @__PURE__ */ k(pe.Root, {
115
115
  "data-slot": "label",
116
116
  className: K("tg:flex tg:select-none tg:items-center tg:gap-2 tg:font-medium tg:text-muted-foreground tg:text-sm tg:leading-none tg:peer-disabled:cursor-not-allowed tg:peer-disabled:opacity-50 tg:group-data-[disabled=true]:pointer-events-none tg:group-data-[disabled=true]:opacity-50", e),
117
117
  ...t
118
- }), be = x(null), xe = () => w(be), $ = ({ container: e, children: t }) => /* @__PURE__ */ O(be.Provider, {
118
+ }), xe = S(null), $ = () => T(xe), Se = ({ container: e, children: t }) => /* @__PURE__ */ k(xe.Provider, {
119
119
  value: e,
120
120
  children: t
121
121
  });
122
122
  //#endregion
123
123
  //#region src/shared/components/ui/popover.tsx
124
- function Se({ ...e }) {
125
- return /* @__PURE__ */ O(fe.Root, {
124
+ function Ce({ ...e }) {
125
+ return /* @__PURE__ */ k(B.Root, {
126
126
  "data-slot": "popover",
127
127
  ...e
128
128
  });
129
129
  }
130
- function Ce({ ...e }) {
131
- return /* @__PURE__ */ O(fe.Trigger, {
130
+ function we({ ...e }) {
131
+ return /* @__PURE__ */ k(B.Trigger, {
132
132
  "data-slot": "popover-trigger",
133
133
  ...e
134
134
  });
135
135
  }
136
- function we({ className: e, align: t = "center", sideOffset: n = 4, disablePortal: r = !1, container: i, ...a }) {
137
- let o = xe(), s = i ?? o, c = /* @__PURE__ */ O(fe.Content, {
136
+ function Te({ className: e, align: t = "center", sideOffset: n = 4, disablePortal: r = !1, container: i, ...a }) {
137
+ let o = $(), s = i ?? o, c = /* @__PURE__ */ k(B.Content, {
138
138
  "data-slot": "popover-content",
139
139
  align: t,
140
140
  sideOffset: n,
141
141
  className: K("tg:data-[state=closed]:fade-out-0 tg:data-[state=open]:fade-in-0 tg:data-[state=closed]:zoom-out-95 tg:data-[state=open]:zoom-in-95 tg:data-[side=bottom]:slide-in-from-top-2 tg:data-[side=left]:slide-in-from-right-2 tg:data-[side=right]:slide-in-from-left-2 tg:data-[side=top]:slide-in-from-bottom-2 tg:z-[2000] tg:w-72 tg:origin-(--radix-popover-content-transform-origin) tg:rounded-md tg:border tg:bg-popover tg:p-4 tg:text-popover-foreground tg:shadow-md tg:outline-hidden tg:data-[state=closed]:animate-out tg:data-[state=open]:animate-in", e),
142
142
  ...a
143
143
  });
144
- return r ? c : /* @__PURE__ */ O(fe.Portal, {
144
+ return r ? c : /* @__PURE__ */ k(B.Portal, {
145
145
  container: s ?? void 0,
146
146
  children: c
147
147
  });
148
148
  }
149
149
  //#endregion
150
150
  //#region src/shared/components/ui/select.tsx
151
- var Te = ({ ...e }) => /* @__PURE__ */ O(V.Root, {
151
+ var Ee = ({ ...e }) => /* @__PURE__ */ k(V.Root, {
152
152
  "data-slot": "select",
153
153
  ...e
154
- }), Ee = ({ ...e }) => /* @__PURE__ */ O(V.Group, {
154
+ }), De = ({ ...e }) => /* @__PURE__ */ k(V.Group, {
155
155
  "data-slot": "select-group",
156
156
  ...e
157
- }), De = ({ ...e }) => /* @__PURE__ */ O(V.Value, {
157
+ }), Oe = ({ ...e }) => /* @__PURE__ */ k(V.Value, {
158
158
  "data-slot": "select-value",
159
159
  ...e
160
- }), Oe = ({ className: e, size: t = "default", children: n, ...r }) => /* @__PURE__ */ k(V.Trigger, {
160
+ }), ke = ({ className: e, size: t = "default", children: n, ...r }) => /* @__PURE__ */ A(V.Trigger, {
161
161
  "data-slot": "select-trigger",
162
162
  "data-size": t,
163
163
  className: K("tg:flex tg:w-fit tg:items-center tg:justify-between tg:gap-2 tg:whitespace-nowrap tg:rounded-md tg:border tg:border-input tg:bg-transparent tg:px-3 tg:py-2 tg:text-sm tg:shadow-xs tg:outline-none tg:transition-[color,box-shadow] tg:focus-visible:border-ring tg:focus-visible:ring-[3px] tg:focus-visible:ring-ring/50 tg:disabled:cursor-not-allowed tg:disabled:opacity-50 tg:aria-invalid:border-destructive tg:aria-invalid:ring-destructive/20 tg:data-[size=default]:h-9 tg:data-[size=sm]:h-8 tg:data-[placeholder]:text-muted-foreground tg:*:data-[slot=select-value]:line-clamp-1 tg:*:data-[slot=select-value]:flex tg:*:data-[slot=select-value]:items-center tg:*:data-[slot=select-value]:gap-2 tg:dark:bg-input/30 tg:dark:aria-invalid:ring-destructive/40 tg:dark:hover:bg-input/50 tg:[&_svg:not([class*='size-'])]:size-4 tg:[&_svg:not([class*='text-'])]:text-muted-foreground tg:[&_svg]:pointer-events-none tg:[&_svg]:shrink-0", e),
164
164
  ...r,
165
- children: [n, /* @__PURE__ */ O(V.Icon, {
165
+ children: [n, /* @__PURE__ */ k(V.Icon, {
166
166
  asChild: !0,
167
- children: /* @__PURE__ */ O(j, { className: "tg:size-4 tg:opacity-50" })
167
+ children: /* @__PURE__ */ k(j, { className: "tg:size-4 tg:opacity-50" })
168
168
  })]
169
- }), ke = ({ className: e, children: t, position: n = "popper", ...r }) => /* @__PURE__ */ O(V.Portal, {
170
- container: xe() ?? void 0,
171
- children: /* @__PURE__ */ k(V.Content, {
169
+ }), Ae = ({ className: e, children: t, position: n = "popper", ...r }) => /* @__PURE__ */ k(V.Portal, {
170
+ container: $() ?? void 0,
171
+ children: /* @__PURE__ */ A(V.Content, {
172
172
  "data-slot": "select-content",
173
173
  className: K("tg:data-[state=closed]:fade-out-0 tg:data-[state=open]:fade-in-0 tg:data-[state=closed]:zoom-out-95 tg:data-[state=open]:zoom-in-95 tg:data-[side=bottom]:slide-in-from-top-2 tg:data-[side=left]:slide-in-from-right-2 tg:data-[side=right]:slide-in-from-left-2 tg:data-[side=top]:slide-in-from-bottom-2 tg:relative tg:z-[2000] tg:max-h-(--radix-select-content-available-height) tg:min-w-[8rem] tg:origin-(--radix-select-content-transform-origin) tg:overflow-y-auto tg:overflow-x-hidden tg:rounded-md tg:border tg:bg-popover tg:text-popover-foreground tg:shadow-md tg:data-[state=closed]:animate-out tg:data-[state=open]:animate-in", n === "popper" && "tg:data-[side=left]:-translate-x-1 tg:data-[side=top]:-translate-y-1 tg:data-[side=right]:translate-x-1 tg:data-[side=bottom]:translate-y-1", e),
174
174
  position: n,
175
175
  ...r,
176
176
  children: [
177
- /* @__PURE__ */ O(Ne, {}),
178
- /* @__PURE__ */ O(V.Viewport, {
177
+ /* @__PURE__ */ k(Pe, {}),
178
+ /* @__PURE__ */ k(V.Viewport, {
179
179
  className: K("tg:p-1", n === "popper" && "tg:h-[var(--radix-select-trigger-height)] tg:w-full tg:min-w-[var(--radix-select-trigger-width)] tg:scroll-my-1"),
180
180
  children: t
181
181
  }),
182
- /* @__PURE__ */ O(Pe, {})
182
+ /* @__PURE__ */ k(Fe, {})
183
183
  ]
184
184
  })
185
- }), Ae = ({ className: e, htmlFor: t, children: n, ...r }) => /* @__PURE__ */ O(V.Label, {
185
+ }), je = ({ className: e, htmlFor: t, children: n, ...r }) => /* @__PURE__ */ k(V.Label, {
186
186
  "data-slot": "select-label",
187
187
  className: K("tg:pb-1.5 tg:font-medium tg:text-muted-foreground tg:text-sm", e),
188
188
  ...r,
189
- children: /* @__PURE__ */ O("label", {
189
+ children: /* @__PURE__ */ k("label", {
190
190
  htmlFor: t,
191
191
  children: n
192
192
  })
193
- }), je = ({ className: e, children: t, ...n }) => /* @__PURE__ */ k(V.Item, {
193
+ }), Me = ({ className: e, children: t, ...n }) => /* @__PURE__ */ A(V.Item, {
194
194
  "data-slot": "select-item",
195
195
  className: K("tg:relative tg:flex tg:w-full tg:cursor-pointer tg:select-none tg:items-center tg:gap-2 tg:rounded-sm tg:py-1.5 tg:pr-8 tg:pl-2 tg:text-sm tg:outline-hidden tg:focus:bg-accent tg:focus:text-accent-foreground tg:data-[disabled]:pointer-events-none tg:data-[disabled]:opacity-50 tg:[&_svg:not([class*='size-'])]:size-4 tg:[&_svg:not([class*='text-'])]:text-muted-foreground tg:[&_svg]:pointer-events-none tg:[&_svg]:shrink-0 tg:*:[span]:last:flex tg:*:[span]:last:items-center tg:*:[span]:last:gap-2", e),
196
196
  ...n,
197
- children: [/* @__PURE__ */ O("span", {
197
+ children: [/* @__PURE__ */ k("span", {
198
198
  className: "tg:absolute tg:right-2 tg:flex tg:size-3.5 tg:items-center tg:justify-center",
199
- children: /* @__PURE__ */ O(V.ItemIndicator, { children: /* @__PURE__ */ O(A, { className: "tg:size-4" }) })
200
- }), /* @__PURE__ */ O(V.ItemText, { children: t })]
201
- }), Me = ({ className: e, ...t }) => /* @__PURE__ */ O(V.Separator, {
199
+ children: /* @__PURE__ */ k(V.ItemIndicator, { children: /* @__PURE__ */ k(re, { className: "tg:size-4" }) })
200
+ }), /* @__PURE__ */ k(V.ItemText, { children: t })]
201
+ }), Ne = ({ className: e, ...t }) => /* @__PURE__ */ k(V.Separator, {
202
202
  "data-slot": "select-separator",
203
203
  className: K("tg:-mx-1 tg:pointer-events-none tg:my-1 tg:h-px tg:bg-border", e),
204
204
  ...t
205
- }), Ne = ({ className: e, ...t }) => /* @__PURE__ */ O(V.ScrollUpButton, {
205
+ }), Pe = ({ className: e, ...t }) => /* @__PURE__ */ k(V.ScrollUpButton, {
206
206
  "data-slot": "select-scroll-up-button",
207
207
  className: K("tg:flex tg:cursor-default tg:items-center tg:justify-center tg:py-1", e),
208
208
  ...t,
209
- children: /* @__PURE__ */ O(ie, { className: "tg:size-4" })
210
- }), Pe = ({ className: e, ...t }) => /* @__PURE__ */ O(V.ScrollDownButton, {
209
+ children: /* @__PURE__ */ k(M, { className: "tg:size-4" })
210
+ }), Fe = ({ className: e, ...t }) => /* @__PURE__ */ k(V.ScrollDownButton, {
211
211
  "data-slot": "select-scroll-down-button",
212
212
  className: K("tg:flex tg:cursor-default tg:items-center tg:justify-center tg:py-1", e),
213
213
  ...t,
214
- children: /* @__PURE__ */ O(j, { className: "tg:size-4" })
215
- });
214
+ children: /* @__PURE__ */ k(j, { className: "tg:size-4" })
215
+ }), Ie = {
216
+ address: "address",
217
+ autocomplete: "autocomplete",
218
+ checkbox: "checkbox",
219
+ date: "date",
220
+ daterange: "daterange",
221
+ file: "file",
222
+ hidden: "hidden",
223
+ http: "http",
224
+ number: "number",
225
+ password: "password",
226
+ radio: "radio",
227
+ select: "select",
228
+ submit: "submit",
229
+ switch: "switch",
230
+ text: "text",
231
+ textarea: "textarea",
232
+ time: "time",
233
+ timerange: "timerange"
234
+ }, Le = [
235
+ Ie.radio,
236
+ Ie.select,
237
+ Ie.checkbox,
238
+ Ie.autocomplete
239
+ ];
216
240
  //#endregion
217
241
  //#region src/shared/components/ui/tooltip.tsx
218
- function Fe({ delayDuration: e = 0, ...t }) {
219
- return /* @__PURE__ */ O(H.Provider, {
242
+ function Re({ delayDuration: e = 0, ...t }) {
243
+ return /* @__PURE__ */ k(H.Provider, {
220
244
  "data-slot": "tooltip-provider",
221
245
  delayDuration: e,
222
246
  ...t
223
247
  });
224
248
  }
225
- function Ie({ ...e }) {
226
- return /* @__PURE__ */ O(Fe, { children: /* @__PURE__ */ O(H.Root, {
249
+ function ze({ ...e }) {
250
+ return /* @__PURE__ */ k(Re, { children: /* @__PURE__ */ k(H.Root, {
227
251
  "data-slot": "tooltip",
228
252
  ...e
229
253
  }) });
230
254
  }
231
- function Le({ ...e }) {
232
- return /* @__PURE__ */ O(H.Trigger, {
255
+ function Be({ ...e }) {
256
+ return /* @__PURE__ */ k(H.Trigger, {
233
257
  "data-slot": "tooltip-trigger",
234
258
  ...e
235
259
  });
236
260
  }
237
- function Re({ className: e, sideOffset: t = 0, children: n, ...r }) {
238
- return /* @__PURE__ */ O(H.Portal, {
239
- container: xe() ?? void 0,
240
- children: /* @__PURE__ */ k(H.Content, {
261
+ function Ve({ className: e, sideOffset: t = 0, children: n, ...r }) {
262
+ return /* @__PURE__ */ k(H.Portal, {
263
+ container: $() ?? void 0,
264
+ children: /* @__PURE__ */ A(H.Content, {
241
265
  "data-slot": "tooltip-content",
242
266
  sideOffset: t,
243
267
  className: K("tg:fade-in-0 tg:zoom-in-95 tg:data-[state=closed]:fade-out-0 tg:data-[state=closed]:zoom-out-95 tg:data-[side=bottom]:slide-in-from-top-2 tg:data-[side=left]:slide-in-from-right-2 tg:data-[side=right]:slide-in-from-left-2 tg:data-[side=top]:slide-in-from-bottom-2 tg:z-[2000] tg:w-fit tg:origin-(--radix-tooltip-content-transform-origin) tg:animate-in tg:text-balance tg:rounded-md tg:bg-foreground tg:px-3 tg:py-1.5 tg:text-background tg:text-xs tg:data-[state=closed]:animate-out", e),
244
268
  ...r,
245
- children: [n, /* @__PURE__ */ O(H.Arrow, { className: "tg:z-[2000] tg:size-2.5 tg:translate-y-[calc(-50%_-_2px)] tg:rotate-45 tg:rounded-[2px] tg:bg-foreground tg:fill-foreground" })]
269
+ children: [n, /* @__PURE__ */ k(H.Arrow, { className: "tg:z-[2000] tg:size-2.5 tg:translate-y-[calc(-50%_-_2px)] tg:rotate-45 tg:rounded-[2px] tg:bg-foreground tg:fill-foreground" })]
246
270
  })
247
271
  });
248
272
  }
249
273
  //#endregion
274
+ //#region src/shared/components/ui/badge.tsx
275
+ var He = R("tg:inline-flex tg:w-fit tg:shrink-0 tg:items-center tg:justify-center tg:gap-1 tg:overflow-hidden tg:rounded-full tg:border tg:border-transparent tg:px-2 tg:py-0.5 tg:text-xs tg:font-medium tg:whitespace-nowrap tg:transition-[color,box-shadow] tg:focus-visible:border-ring tg:focus-visible:ring-[3px] tg:focus-visible:ring-ring/50 tg:aria-invalid:border-destructive tg:aria-invalid:ring-destructive/20 tg:dark:aria-invalid:ring-destructive/40 tg:[&>svg]:pointer-events-none tg:[&>svg]:size-3", {
276
+ defaultVariants: { variant: "default" },
277
+ variants: { variant: {
278
+ blue: "tg:bg-blue-500 tg:text-white tg:dark:bg-blue-600",
279
+ default: "tg:border-transparent tg:bg-primary tg:text-primary-foreground tg:[a&]:hover:bg-primary/90",
280
+ destructive: "tg:border-transparent tg:bg-destructive tg:text-white tg:[a&]:hover:bg-destructive/90 tg:focus-visible:ring-destructive/20 tg:dark:focus-visible:ring-destructive/40 tg:dark:bg-destructive/60",
281
+ outline: "tg:border-foreground/30 tg:text-foreground tg:[a&]:hover:bg-accent tg:[a&]:hover:text-accent-foreground",
282
+ purple: "tg:bg-purple-600 tg:hover:bg-purple-700 tg:text-white",
283
+ secondary: "tg:border-transparent tg:bg-secondary tg:text-secondary-foreground tg:[a&]:hover:bg-secondary/90"
284
+ } }
285
+ });
286
+ function Ue({ className: e, variant: t, asChild: n = !1, ...r }) {
287
+ return /* @__PURE__ */ k(n ? ue : "span", {
288
+ "data-slot": "badge",
289
+ className: K(He({ variant: t }), e),
290
+ ...r
291
+ });
292
+ }
293
+ //#endregion
250
294
  //#region src/shared/components/ui/separator.tsx
251
- function ze({ className: e, orientation: t = "horizontal", decorative: n = !0, ...r }) {
252
- return /* @__PURE__ */ O(pe.Root, {
295
+ function We({ className: e, orientation: t = "horizontal", decorative: n = !0, ...r }) {
296
+ return /* @__PURE__ */ k(me.Root, {
253
297
  "data-slot": "separator",
254
298
  decorative: n,
255
299
  orientation: t,
@@ -259,57 +303,57 @@ function ze({ className: e, orientation: t = "horizontal", decorative: n = !0, .
259
303
  }
260
304
  //#endregion
261
305
  //#region src/renderer/features/TreegeRenderer/web/components/DefaultInputLabel.tsx
262
- var Be = ({ label: e, required: t, htmlFor: n, id: r, className: i }) => e ? /* @__PURE__ */ k(Q, {
306
+ var Ge = ({ label: e, required: t, htmlFor: n, id: r, className: i }) => e ? /* @__PURE__ */ A(Q, {
263
307
  htmlFor: n,
264
308
  id: r,
265
309
  className: i,
266
- children: [e, t && /* @__PURE__ */ O("span", {
310
+ children: [e, t && /* @__PURE__ */ k("span", {
267
311
  className: "tg:text-red-500",
268
312
  children: "*"
269
313
  })]
270
314
  }) : null;
271
315
  //#endregion
272
316
  //#region src/shared/components/ui/dialog.tsx
273
- function Ve({ ...e }) {
274
- return /* @__PURE__ */ O(W.Root, {
317
+ function Ke({ ...e }) {
318
+ return /* @__PURE__ */ k(W.Root, {
275
319
  "data-slot": "dialog",
276
320
  ...e
277
321
  });
278
322
  }
279
- function He({ ...e }) {
280
- return /* @__PURE__ */ O(W.Trigger, {
323
+ function qe({ ...e }) {
324
+ return /* @__PURE__ */ k(W.Trigger, {
281
325
  "data-slot": "dialog-trigger",
282
326
  ...e
283
327
  });
284
328
  }
285
- function Ue({ ...e }) {
286
- return /* @__PURE__ */ O(W.Portal, {
329
+ function Je({ ...e }) {
330
+ return /* @__PURE__ */ k(W.Portal, {
287
331
  "data-slot": "dialog-portal",
288
332
  ...e
289
333
  });
290
334
  }
291
- function We({ className: e, ...t }) {
292
- return /* @__PURE__ */ O(W.Overlay, {
335
+ function Ye({ className: e, ...t }) {
336
+ return /* @__PURE__ */ k(W.Overlay, {
293
337
  "data-slot": "dialog-overlay",
294
338
  className: K("tg:data-[state=closed]:fade-out-0 tg:data-[state=open]:fade-in-0 tg:fixed tg:inset-0 tg:z-[2000] tg:bg-black/50 tg:data-[state=closed]:animate-out tg:data-[state=open]:animate-in", e),
295
339
  ...t
296
340
  });
297
341
  }
298
- function Ge({ className: e, children: t, showCloseButton: n = !0, ...r }) {
299
- let [i, a] = b.useState(null);
300
- return /* @__PURE__ */ k(Ue, {
342
+ function Xe({ className: e, children: t, showCloseButton: n = !0, ...r }) {
343
+ let [i, a] = x.useState(null);
344
+ return /* @__PURE__ */ A(Je, {
301
345
  "data-slot": "dialog-portal",
302
- children: [/* @__PURE__ */ O(We, {}), /* @__PURE__ */ O(W.Content, {
346
+ children: [/* @__PURE__ */ k(Ye, {}), /* @__PURE__ */ k(W.Content, {
303
347
  ref: a,
304
348
  "data-slot": "dialog-content",
305
349
  className: K("tg:data-[state=closed]:fade-out-0 tg:data-[state=open]:fade-in-0 tg:data-[state=closed]:zoom-out-95 tg:data-[state=open]:zoom-in-95 tg:fixed tg:top-[50%] tg:left-[50%] tg:z-[2000] tg:grid tg:w-full tg:max-w-[calc(100%-2rem)] tg:translate-x-[-50%] tg:translate-y-[-50%] tg:gap-4 tg:rounded-lg tg:border tg:bg-background tg:p-6 tg:shadow-lg tg:duration-200 tg:data-[state=closed]:animate-out tg:data-[state=open]:animate-in tg:sm:max-w-lg", e),
306
350
  ...r,
307
- children: /* @__PURE__ */ k($, {
351
+ children: /* @__PURE__ */ A(Se, {
308
352
  container: i,
309
- children: [t, n && /* @__PURE__ */ k(W.Close, {
353
+ children: [t, n && /* @__PURE__ */ A(W.Close, {
310
354
  "data-slot": "dialog-close",
311
355
  className: "tg:absolute tg:top-4 tg:right-4 tg:rounded-xs tg:opacity-70 tg:ring-offset-background tg:transition-opacity tg:hover:opacity-100 tg:focus:outline-hidden tg:focus:ring-2 tg:focus:ring-ring tg:focus:ring-offset-2 tg:disabled:pointer-events-none tg:data-[state=open]:bg-accent tg:data-[state=open]:text-muted-foreground tg:[&_svg:not([class*='size-'])]:size-4 tg:[&_svg]:pointer-events-none tg:[&_svg]:shrink-0",
312
- children: [/* @__PURE__ */ O(ce, {}), /* @__PURE__ */ O("span", {
356
+ children: [/* @__PURE__ */ k(L, {}), /* @__PURE__ */ k("span", {
313
357
  className: "tg:sr-only",
314
358
  children: "Close"
315
359
  })]
@@ -318,29 +362,29 @@ function Ge({ className: e, children: t, showCloseButton: n = !0, ...r }) {
318
362
  })]
319
363
  });
320
364
  }
321
- function Ke({ className: e, ...t }) {
322
- return /* @__PURE__ */ O("div", {
365
+ function Ze({ className: e, ...t }) {
366
+ return /* @__PURE__ */ k("div", {
323
367
  "data-slot": "dialog-header",
324
368
  className: K("tg:flex tg:flex-col tg:gap-2 tg:text-center tg:sm:text-left", e),
325
369
  ...t
326
370
  });
327
371
  }
328
- function qe({ className: e, ...t }) {
329
- return /* @__PURE__ */ O("div", {
372
+ function Qe({ className: e, ...t }) {
373
+ return /* @__PURE__ */ k("div", {
330
374
  "data-slot": "dialog-footer",
331
375
  className: K("tg:flex tg:flex-col-reverse tg:gap-2 tg:sm:flex-row tg:sm:justify-end", e),
332
376
  ...t
333
377
  });
334
378
  }
335
- function Je({ className: e, ...t }) {
336
- return /* @__PURE__ */ O(W.Title, {
379
+ function $e({ className: e, ...t }) {
380
+ return /* @__PURE__ */ k(W.Title, {
337
381
  "data-slot": "dialog-title",
338
382
  className: K("tg:font-semibold tg:text-lg tg:leading-none", e),
339
383
  ...t
340
384
  });
341
385
  }
342
- function Ye({ className: e, ...t }) {
343
- return /* @__PURE__ */ O(W.Description, {
386
+ function et({ className: e, ...t }) {
387
+ return /* @__PURE__ */ k(W.Description, {
344
388
  "data-slot": "dialog-description",
345
389
  className: K("tg:text-muted-foreground tg:text-sm", e),
346
390
  ...t
@@ -348,47 +392,47 @@ function Ye({ className: e, ...t }) {
348
392
  }
349
393
  //#endregion
350
394
  //#region src/shared/components/ui/command.tsx
351
- function Xe({ className: e, ...t }) {
352
- return /* @__PURE__ */ O(U, {
395
+ function tt({ className: e, ...t }) {
396
+ return /* @__PURE__ */ k(U, {
353
397
  "data-slot": "command",
354
398
  className: K("tg:flex tg:h-full tg:w-full tg:flex-col tg:overflow-hidden tg:rounded-md tg:bg-popover tg:text-popover-foreground", e),
355
399
  ...t
356
400
  });
357
401
  }
358
- function Ze({ className: e, ...t }) {
359
- return /* @__PURE__ */ k("div", {
402
+ function nt({ className: e, ...t }) {
403
+ return /* @__PURE__ */ A("div", {
360
404
  "data-slot": "command-input-wrapper",
361
405
  className: "tg:flex tg:h-9 tg:items-center tg:gap-2 tg:border-b tg:px-3",
362
- children: [/* @__PURE__ */ O(oe, { className: "tg:size-4 tg:shrink-0 tg:opacity-50" }), /* @__PURE__ */ O(U.Input, {
406
+ children: [/* @__PURE__ */ k(ce, { className: "tg:size-4 tg:shrink-0 tg:opacity-50" }), /* @__PURE__ */ k(U.Input, {
363
407
  "data-slot": "command-input",
364
408
  className: K("tg:flex tg:h-10 tg:w-full tg:rounded-md tg:bg-transparent tg:py-3 tg:text-sm tg:outline-hidden tg:placeholder:text-muted-foreground tg:disabled:cursor-not-allowed tg:disabled:opacity-50", e),
365
409
  ...t
366
410
  })]
367
411
  });
368
412
  }
369
- function Qe({ className: e, ...t }) {
370
- return /* @__PURE__ */ O(U.List, {
413
+ function rt({ className: e, ...t }) {
414
+ return /* @__PURE__ */ k(U.List, {
371
415
  "data-slot": "command-list",
372
416
  className: K("tg:max-h-[300px] tg:scroll-py-1 tg:overflow-y-auto tg:overflow-x-hidden", e),
373
417
  ...t
374
418
  });
375
419
  }
376
- function $e({ ...e }) {
377
- return /* @__PURE__ */ O(U.Empty, {
420
+ function it({ ...e }) {
421
+ return /* @__PURE__ */ k(U.Empty, {
378
422
  "data-slot": "command-empty",
379
423
  className: "tg:py-6 tg:text-center tg:text-sm",
380
424
  ...e
381
425
  });
382
426
  }
383
- function et({ className: e, ...t }) {
384
- return /* @__PURE__ */ O(U.Group, {
427
+ function at({ className: e, ...t }) {
428
+ return /* @__PURE__ */ k(U.Group, {
385
429
  "data-slot": "command-group",
386
430
  className: K("tg:overflow-hidden tg:p-1 tg:text-foreground tg:[&_[cmdk-group-heading]]:px-2 tg:[&_[cmdk-group-heading]]:py-1.5 tg:[&_[cmdk-group-heading]]:font-medium tg:[&_[cmdk-group-heading]]:text-muted-foreground tg:[&_[cmdk-group-heading]]:text-xs", e),
387
431
  ...t
388
432
  });
389
433
  }
390
- function tt({ className: e, ...t }) {
391
- return /* @__PURE__ */ O(U.Item, {
434
+ function ot({ className: e, ...t }) {
435
+ return /* @__PURE__ */ k(U.Item, {
392
436
  "data-slot": "command-item",
393
437
  className: K("tg:relative tg:flex tg:cursor-default tg:select-none tg:items-center tg:gap-2 tg:rounded-sm tg:px-2 tg:py-1.5 tg:text-sm tg:outline-hidden tg:data-[disabled=true]:pointer-events-none tg:data-[selected=true]:bg-accent tg:data-[selected=true]:text-accent-foreground tg:data-[disabled=true]:opacity-50 tg:[&_svg:not([class*='size-'])]:size-4 tg:[&_svg:not([class*='text-'])]:text-muted-foreground tg:[&_svg]:pointer-events-none tg:[&_svg]:shrink-0", e),
394
438
  ...t
@@ -396,7 +440,7 @@ function tt({ className: e, ...t }) {
396
440
  }
397
441
  //#endregion
398
442
  //#region src/renderer/features/TreegeRenderer/web/components/inputs/DefaultAddressInput.tsx
399
- var nt = async (e, t) => {
443
+ var st = async (e, t) => {
400
444
  if (!e || e.trim().length < 3) return [];
401
445
  try {
402
446
  let n = await fetch(`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(e)}&format=jsonv2&addressdetails=1&limit=5`, { headers: {
@@ -411,7 +455,7 @@ var nt = async (e, t) => {
411
455
  } catch (e) {
412
456
  return console.error("Nominatim fetch error:", e), [];
413
457
  }
414
- }, rt = (e) => !e || e.trim().length < 3 ? Promise.resolve([]) : new Promise((t) => {
458
+ }, ct = (e) => !e || e.trim().length < 3 ? Promise.resolve([]) : new Promise((t) => {
415
459
  if (!window.google?.maps?.places) {
416
460
  console.warn("Google Places SDK not loaded yet"), t([]);
417
461
  return;
@@ -426,86 +470,86 @@ var nt = async (e, t) => {
426
470
  value: e.description
427
471
  })));
428
472
  });
429
- }), it = ({ field: e, extra: t }) => {
430
- let [n, r] = D(""), [i, o] = D([]), [c, l] = D(!1), { id: u, name: d, value: f, placeholder: p } = e, { InputLabel: m, node: h, setValue: g, error: _, label: v, helperText: y } = t, { googleApiKey: b, language: x } = a(), S = s(), w = C((e) => {
431
- g(e.value), r(e.value), l(!1);
432
- }, [g]), ee = C((e) => {
433
- g(e), r(e), e.length >= 3 && l(!0);
434
- }, [g]);
435
- return T(() => {
436
- if (!n || n.trim().length < 3) {
473
+ }), lt = ({ field: e, extra: t }) => {
474
+ let [r, i] = O(""), [a, o] = O([]), [s, c] = O(!1), { id: l, name: u, value: d, placeholder: f } = e, { InputLabel: p, node: m, setValue: h, error: g, label: _, helperText: v } = t, { googleApiKey: y, language: x } = b(), S = n(), C = w((e) => {
475
+ h(e.value), i(e.value), c(!1);
476
+ }, [h]), T = w((e) => {
477
+ h(e), i(e), e.length >= 3 && c(!0);
478
+ }, [h]);
479
+ return E(() => {
480
+ if (!r || r.trim().length < 3) {
437
481
  o([]);
438
482
  return;
439
483
  }
440
484
  let e = setTimeout(async () => {
441
- o(b ? await rt(n) : await nt(n, x));
485
+ o(y ? await ct(r) : await st(r, x));
442
486
  }, 300);
443
487
  return () => clearTimeout(e);
444
488
  }, [
445
- n,
446
- b,
489
+ r,
490
+ y,
447
491
  x
448
- ]), /* @__PURE__ */ k(te, { children: [b && /* @__PURE__ */ O("script", {
492
+ ]), /* @__PURE__ */ A(te, { children: [y && /* @__PURE__ */ k("script", {
449
493
  async: !0,
450
- src: `https://maps.googleapis.com/maps/api/js?key=${b}&libraries=places`
451
- }), /* @__PURE__ */ k(J, {
494
+ src: `https://maps.googleapis.com/maps/api/js?key=${y}&libraries=places`
495
+ }), /* @__PURE__ */ A(J, {
452
496
  className: "tg:mb-4",
453
497
  children: [
454
- /* @__PURE__ */ O(m, {
455
- htmlFor: u,
456
- label: v,
457
- required: h.data.required
498
+ /* @__PURE__ */ k(p, {
499
+ htmlFor: l,
500
+ label: _,
501
+ required: m.data.required
458
502
  }),
459
- /* @__PURE__ */ k("div", {
503
+ /* @__PURE__ */ A("div", {
460
504
  className: "tg:relative",
461
505
  children: [
462
- /* @__PURE__ */ O(Z, {
506
+ /* @__PURE__ */ k(Z, {
463
507
  type: "text",
464
- id: u,
465
- name: d,
466
- "aria-label": v || h.data.name,
467
- value: f || "",
468
- onChange: (e) => ee(e.target.value),
508
+ id: l,
509
+ name: u,
510
+ "aria-label": _ || m.data.name,
511
+ value: d || "",
512
+ onChange: (e) => T(e.target.value),
469
513
  onFocus: () => {
470
- i.length > 0 && l(!0);
514
+ a.length > 0 && c(!0);
471
515
  },
472
- placeholder: p || S("renderer.defaultAddressInput.enterAddress"),
516
+ placeholder: f || S("renderer.defaultAddressInput.enterAddress"),
473
517
  className: "tg:pr-10",
474
518
  autoComplete: "off"
475
519
  }),
476
- /* @__PURE__ */ O(L, { className: "tg:pointer-events-none tg:absolute tg:top-1/2 tg:right-3 tg:h-4 tg:w-4 tg:-translate-y-1/2 tg:text-muted-foreground" }),
477
- c && /* @__PURE__ */ O("div", {
520
+ /* @__PURE__ */ k(I, { className: "tg:pointer-events-none tg:absolute tg:top-1/2 tg:right-3 tg:h-4 tg:w-4 tg:-translate-y-1/2 tg:text-muted-foreground" }),
521
+ s && /* @__PURE__ */ k("div", {
478
522
  className: "tg:absolute tg:z-50 tg:mt-1 tg:w-full tg:rounded-md tg:border tg:bg-popover tg:shadow-md",
479
- children: /* @__PURE__ */ O(Xe, { children: /* @__PURE__ */ k(Qe, { children: [/* @__PURE__ */ O($e, { children: S("renderer.defaultAddressInput.noAddressesFound") }), /* @__PURE__ */ O(et, { children: i.map((e, t) => /* @__PURE__ */ k(tt, {
523
+ children: /* @__PURE__ */ k(tt, { children: /* @__PURE__ */ A(rt, { children: [/* @__PURE__ */ k(it, { children: S("renderer.defaultAddressInput.noAddressesFound") }), /* @__PURE__ */ k(at, { children: a.map((e, t) => /* @__PURE__ */ A(ot, {
480
524
  value: e.value,
481
- onSelect: () => w(e),
525
+ onSelect: () => C(e),
482
526
  onMouseDown: (e) => e.preventDefault(),
483
- children: [/* @__PURE__ */ O(L, { className: "tg:mr-2 tg:h-4 tg:w-4" }), e.label]
527
+ children: [/* @__PURE__ */ k(I, { className: "tg:mr-2 tg:h-4 tg:w-4" }), e.label]
484
528
  }, t)) })] }) })
485
529
  })
486
530
  ]
487
531
  }),
488
- _ && /* @__PURE__ */ O(X, { children: _ }),
489
- y && !_ && /* @__PURE__ */ O(Y, { children: y })
532
+ g && /* @__PURE__ */ k(X, { children: g }),
533
+ v && !g && /* @__PURE__ */ k(Y, { children: v })
490
534
  ]
491
535
  })] });
492
- }, at = ({ missing: e }) => /* @__PURE__ */ k(te, { children: [/* @__PURE__ */ O("p", {
536
+ }, ut = ({ missing: e }) => /* @__PURE__ */ A(te, { children: [/* @__PURE__ */ k("p", {
493
537
  className: "tg:font-medium",
494
- children: s()("renderer.dependencyHint.title")
495
- }), /* @__PURE__ */ O("ul", {
538
+ children: n()("renderer.dependencyHint.title")
539
+ }), /* @__PURE__ */ k("ul", {
496
540
  className: "tg:mt-1 tg:list-disc tg:pl-4",
497
- children: e.map((e) => /* @__PURE__ */ O("li", { children: e.label }, e.id))
498
- })] }), ot = ({ missing: e, children: t }) => e.length === 0 ? /* @__PURE__ */ O(te, { children: t }) : /* @__PURE__ */ O(Fe, { children: /* @__PURE__ */ k(Ie, { children: [/* @__PURE__ */ O(Le, {
541
+ children: e.map((e) => /* @__PURE__ */ k("li", { children: e.label }, e.id))
542
+ })] }), dt = ({ missing: e, children: t }) => e.length === 0 ? /* @__PURE__ */ k(te, { children: t }) : /* @__PURE__ */ k(Re, { children: /* @__PURE__ */ A(ze, { children: [/* @__PURE__ */ k(Be, {
499
543
  asChild: !0,
500
- children: /* @__PURE__ */ O("div", {
544
+ children: /* @__PURE__ */ k("div", {
501
545
  className: "tg:w-full",
502
546
  children: t
503
547
  })
504
- }), /* @__PURE__ */ O(Re, { children: /* @__PURE__ */ O(at, { missing: e }) })] }) }), st = ({ missing: e }) => e.length === 0 ? null : /* @__PURE__ */ O("div", {
548
+ }), /* @__PURE__ */ k(Ve, { children: /* @__PURE__ */ k(ut, { missing: e }) })] }) }), ft = ({ missing: e }) => e.length === 0 ? null : /* @__PURE__ */ k("div", {
505
549
  className: "tg:text-muted-foreground tg:text-sm",
506
- children: /* @__PURE__ */ O(at, { missing: e })
550
+ children: /* @__PURE__ */ k(ut, { missing: e })
507
551
  });
508
- z("tg:group/item tg:flex tg:flex-wrap tg:items-center tg:rounded-md tg:border tg:border-transparent tg:text-sm tg:outline-none tg:transition-colors tg:duration-100 tg:focus-visible:border-ring tg:focus-visible:ring-[3px] tg:focus-visible:ring-ring/50 tg:[a]:transition-colors tg:[a]:hover:bg-accent/50", {
552
+ R("tg:group/item tg:flex tg:flex-wrap tg:items-center tg:rounded-md tg:border tg:border-transparent tg:text-sm tg:outline-none tg:transition-colors tg:duration-100 tg:focus-visible:border-ring tg:focus-visible:ring-[3px] tg:focus-visible:ring-ring/50 tg:[a]:transition-colors tg:[a]:hover:bg-accent/50", {
509
553
  defaultVariants: {
510
554
  size: "default",
511
555
  variant: "default"
@@ -522,7 +566,7 @@ z("tg:group/item tg:flex tg:flex-wrap tg:items-center tg:rounded-md tg:border tg
522
566
  }
523
567
  }
524
568
  });
525
- var ct = z("tg:flex tg:shrink-0 tg:items-center tg:justify-center tg:gap-2 tg:group-has-[[data-slot=item-description]]/item:translate-y-0.5 tg:group-has-[[data-slot=item-description]]/item:self-start tg:[&_svg]:pointer-events-none", {
569
+ var pt = R("tg:flex tg:shrink-0 tg:items-center tg:justify-center tg:gap-2 tg:group-has-[[data-slot=item-description]]/item:translate-y-0.5 tg:group-has-[[data-slot=item-description]]/item:self-start tg:[&_svg]:pointer-events-none", {
526
570
  defaultVariants: { variant: "default" },
527
571
  variants: { variant: {
528
572
  default: "tg:bg-transparent",
@@ -530,33 +574,33 @@ var ct = z("tg:flex tg:shrink-0 tg:items-center tg:justify-center tg:gap-2 tg:gr
530
574
  image: "tg:size-10 tg:overflow-hidden tg:rounded-sm tg:[&_img]:size-full tg:[&_img]:object-cover"
531
575
  } }
532
576
  });
533
- function lt({ className: e, variant: t = "default", ...n }) {
534
- return /* @__PURE__ */ O("div", {
577
+ function mt({ className: e, variant: t = "default", ...n }) {
578
+ return /* @__PURE__ */ k("div", {
535
579
  "data-slot": "item-media",
536
580
  "data-variant": t,
537
- className: K(ct({
581
+ className: K(pt({
538
582
  className: e,
539
583
  variant: t
540
584
  })),
541
585
  ...n
542
586
  });
543
587
  }
544
- function ut({ className: e, ...t }) {
545
- return /* @__PURE__ */ O("div", {
588
+ function ht({ className: e, ...t }) {
589
+ return /* @__PURE__ */ k("div", {
546
590
  "data-slot": "item-content",
547
591
  className: K("tg:flex tg:flex-1 tg:flex-col tg:gap-1 tg:[&+[data-slot=item-content]]:flex-none", e),
548
592
  ...t
549
593
  });
550
594
  }
551
- function dt({ className: e, ...t }) {
552
- return /* @__PURE__ */ O("div", {
595
+ function gt({ className: e, ...t }) {
596
+ return /* @__PURE__ */ k("div", {
553
597
  "data-slot": "item-title",
554
598
  className: K("tg:flex tg:w-fit tg:items-center tg:gap-2 tg:font-medium tg:text-sm tg:leading-snug", e),
555
599
  ...t
556
600
  });
557
601
  }
558
- function ft({ className: e, ...t }) {
559
- return /* @__PURE__ */ O("p", {
602
+ function _t({ className: e, ...t }) {
603
+ return /* @__PURE__ */ k("p", {
560
604
  "data-slot": "item-description",
561
605
  className: K("tg:line-clamp-2 tg:text-balance tg:font-normal tg:text-muted-foreground tg:text-sm tg:leading-normal", "tg:[&>a]:underline tg:[&>a]:underline-offset-4 tg:[&>a:hover]:text-primary", e),
562
606
  ...t
@@ -564,149 +608,149 @@ function ft({ className: e, ...t }) {
564
608
  }
565
609
  //#endregion
566
610
  //#region src/renderer/features/TreegeRenderer/web/components/OptionItemContent.tsx
567
- var pt = ({ label: e, description: t, image: n }) => /* @__PURE__ */ k(te, { children: [n && /* @__PURE__ */ O(lt, {
611
+ var vt = ({ label: e, description: t, image: n }) => /* @__PURE__ */ A(te, { children: [n && /* @__PURE__ */ k(mt, {
568
612
  variant: "image",
569
- children: /* @__PURE__ */ O("img", {
613
+ children: /* @__PURE__ */ k("img", {
570
614
  src: n,
571
615
  alt: ""
572
616
  })
573
- }), /* @__PURE__ */ k(ut, {
617
+ }), /* @__PURE__ */ A(ht, {
574
618
  className: "tg:min-w-0 tg:gap-0",
575
- children: [/* @__PURE__ */ O(dt, {
619
+ children: [/* @__PURE__ */ k(gt, {
576
620
  className: "tg:block tg:w-full tg:truncate tg:font-normal",
577
621
  children: e
578
- }), t && /* @__PURE__ */ O(ft, {
622
+ }), t && /* @__PURE__ */ k(_t, {
579
623
  className: "tg:line-clamp-1",
580
624
  children: t
581
625
  })]
582
- })] }), mt = /\{\{([\w-]+)}}/g, ht = (t) => {
583
- let [i, o] = D({
626
+ })] }), yt = /\{\{([\w-]+)}}/g, bt = (e) => {
627
+ let [n, r] = O({
584
628
  error: null,
585
629
  fetched: null,
586
630
  isLoading: !1
587
- }), { baseUrl: s, formValues: l, headers: u } = a(), f = t.data.optionsSource, p = t.data.options, g = ee(() => {
588
- if (!(f?.url && f.mapping?.valueField && f.mapping?.labelField) || !Array.from(f.url.matchAll(mt), (e) => e[1]).every((e) => {
631
+ }), { baseUrl: s, formValues: l, headers: u } = b(), d = e.data.optionsSource, f = e.data.options, h = ee(() => {
632
+ if (!(d?.url && d.mapping?.valueField && d.mapping?.labelField) || !Array.from(d.url.matchAll(yt), (e) => e[1]).every((e) => {
589
633
  let t = l[e];
590
634
  return t != null && t !== "";
591
635
  })) return null;
592
- let t = f.method ?? "GET", r = {
636
+ let e = d.method ?? "GET", t = {
593
637
  body: [
594
638
  "POST",
595
639
  "PUT",
596
640
  "PATCH"
597
- ].includes(t) ? c(f.body, l, []) : void 0,
598
- headers: n(e(u, l), e(f.headers, l)),
599
- mapping: f.mapping,
600
- method: t,
601
- queryParams: e(f.queryParams, l) ?? {},
602
- responsePath: f.responsePath,
603
- url: m(h(f.url, l, { encode: !0 }), s)
641
+ ].includes(e) ? _(d.body, l, []) : void 0,
642
+ headers: m(i(u, l), i(d.headers, l)),
643
+ mapping: d.mapping,
644
+ method: e,
645
+ queryParams: i(d.queryParams, l) ?? {},
646
+ responsePath: d.responsePath,
647
+ url: a(p(d.url, l, { encode: !0 }), s)
604
648
  };
605
- return JSON.stringify(r);
649
+ return JSON.stringify(t);
606
650
  }, [
607
651
  s,
608
- f,
652
+ d,
609
653
  l,
610
654
  u
611
655
  ]);
612
- T(() => {
613
- if (!g) {
614
- o({
656
+ E(() => {
657
+ if (!h) {
658
+ r({
615
659
  error: null,
616
660
  fetched: null,
617
661
  isLoading: !1
618
662
  });
619
663
  return;
620
664
  }
621
- let e = JSON.parse(g), t = new AbortController();
622
- return o((e) => ({
665
+ let e = JSON.parse(h), n = new AbortController();
666
+ return r((e) => ({
623
667
  ...e,
624
668
  error: null,
625
669
  isLoading: !0
626
670
  })), (async () => {
627
- let n = await r({
671
+ let i = await o({
628
672
  body: e.body,
629
673
  headers: e.headers,
630
674
  method: e.method,
631
675
  queryParams: e.queryParams,
632
- signal: t.signal,
676
+ signal: n.signal,
633
677
  url: e.url
634
678
  });
635
- if (!t.signal.aborted) {
636
- if (!n.success) {
637
- o({
638
- error: n.error ?? "Fetch failed",
679
+ if (!n.signal.aborted) {
680
+ if (!i.success) {
681
+ r({
682
+ error: i.error ?? "Fetch failed",
639
683
  fetched: null,
640
684
  isLoading: !1
641
685
  });
642
686
  return;
643
687
  }
644
- o({
688
+ r({
645
689
  error: null,
646
- fetched: v(n.data, e.responsePath, e.mapping),
690
+ fetched: t(i.data, e.responsePath, e.mapping),
647
691
  isLoading: !1
648
692
  });
649
693
  }
650
- })(), () => t.abort();
651
- }, [g]);
652
- let _ = t.data.normalizeOptionLabels !== !1, y = ee(() => i.fetched ? _ ? i.fetched.map((e) => ({
694
+ })(), () => n.abort();
695
+ }, [h]);
696
+ let g = e.data.normalizeOptionLabels !== !1, v = ee(() => n.fetched ? g ? n.fetched.map((e) => ({
653
697
  ...e,
654
- label: d(e.label)
655
- })) : i.fetched : p ?? [], [
656
- i.fetched,
657
- p,
658
- _
698
+ label: c(e.label)
699
+ })) : n.fetched : f ?? [], [
700
+ n.fetched,
701
+ f,
702
+ g
659
703
  ]);
660
704
  return {
661
- error: i.error,
662
- isLoading: i.isLoading,
663
- options: y
705
+ error: n.error,
706
+ isLoading: n.isLoading,
707
+ options: v
664
708
  };
665
- }, gt = ({ field: e, extra: t }) => {
666
- let [n, r] = D(!1), { id: i, value: a, placeholder: o } = e, { InputLabel: c, node: l, setValue: u, error: d, label: f, helperText: p, missingDependencies: m } = t, { options: h, isLoading: g, error: _ } = ht(l), v = s(), y = `${i}-trigger`, b = `${i}-error`, x = h.find((e) => e.value === a);
667
- return /* @__PURE__ */ k(J, {
709
+ }, xt = ({ field: e, extra: t }) => {
710
+ let [r, i] = O(!1), { id: a, value: o, placeholder: s } = e, { InputLabel: c, node: l, setValue: u, error: d, label: f, helperText: p, missingDependencies: m } = t, { options: h, isLoading: g, error: _ } = bt(l), v = n(), y = `${a}-trigger`, b = `${a}-error`, x = h.find((e) => e.value === o);
711
+ return /* @__PURE__ */ A(J, {
668
712
  className: "tg:mb-4",
669
713
  children: [
670
- /* @__PURE__ */ O(c, {
714
+ /* @__PURE__ */ k(c, {
671
715
  htmlFor: y,
672
716
  label: f,
673
717
  required: l.data.required
674
718
  }),
675
- /* @__PURE__ */ O(ot, {
719
+ /* @__PURE__ */ k(dt, {
676
720
  missing: m,
677
- children: /* @__PURE__ */ k("div", {
721
+ children: /* @__PURE__ */ A("div", {
678
722
  className: "tg:relative",
679
723
  children: [
680
- /* @__PURE__ */ k(Se, {
681
- open: n,
682
- onOpenChange: r,
683
- children: [/* @__PURE__ */ O(Ce, {
724
+ /* @__PURE__ */ A(Ce, {
725
+ open: r,
726
+ onOpenChange: i,
727
+ children: [/* @__PURE__ */ k(we, {
684
728
  asChild: !0,
685
- children: /* @__PURE__ */ k(q, {
729
+ children: /* @__PURE__ */ A(q, {
686
730
  id: y,
687
731
  variant: "outline",
688
732
  role: "combobox",
689
733
  "aria-label": f || l.data.name,
690
- "aria-expanded": n,
734
+ "aria-expanded": r,
691
735
  "aria-invalid": !!d || void 0,
692
736
  "aria-describedby": d ? b : void 0,
693
737
  disabled: g || m.length > 0,
694
- className: K("tg:w-full tg:justify-between tg:font-normal", (a || g) && "tg:pr-14"),
695
- children: [/* @__PURE__ */ O("span", {
738
+ className: K("tg:w-full tg:justify-between tg:font-normal", (o || g) && "tg:pr-14"),
739
+ children: [/* @__PURE__ */ k("span", {
696
740
  className: "tg:flex tg:items-center tg:gap-2 tg:truncate",
697
- children: a ? x?.label ? v(x.label) : a : o || v("renderer.defaultAutocompleteInput.selectOption")
698
- }), /* @__PURE__ */ O(ae, { className: "tg:ml-2 tg:size-4 tg:shrink-0 tg:opacity-50" })]
741
+ children: o ? x?.label ? v(x.label) : o : s || v("renderer.defaultAutocompleteInput.selectOption")
742
+ }), /* @__PURE__ */ k(oe, { className: "tg:ml-2 tg:size-4 tg:shrink-0 tg:opacity-50" })]
699
743
  })
700
- }), /* @__PURE__ */ O(we, {
744
+ }), /* @__PURE__ */ k(Te, {
701
745
  className: "tg:w-(--radix-popover-trigger-width) tg:p-0",
702
746
  align: "start",
703
- children: /* @__PURE__ */ k(Xe, { children: [/* @__PURE__ */ O(Ze, { placeholder: o || v("renderer.defaultAutocompleteInput.search") }), /* @__PURE__ */ k(Qe, { children: [/* @__PURE__ */ O($e, { children: v("renderer.defaultAutocompleteInput.noResults") }), /* @__PURE__ */ O(et, { children: h.map((e) => /* @__PURE__ */ k(tt, {
747
+ children: /* @__PURE__ */ A(tt, { children: [/* @__PURE__ */ k(nt, { placeholder: s || v("renderer.defaultAutocompleteInput.search") }), /* @__PURE__ */ A(rt, { children: [/* @__PURE__ */ k(it, { children: v("renderer.defaultAutocompleteInput.noResults") }), /* @__PURE__ */ k(at, { children: h.map((e) => /* @__PURE__ */ A(ot, {
704
748
  value: e.value,
705
749
  disabled: e.disabled,
706
750
  onSelect: () => {
707
- u(e.value === a ? "" : e.value), r(!1);
751
+ u(e.value === o ? "" : e.value), i(!1);
708
752
  },
709
- children: [/* @__PURE__ */ O(ne, { className: K("tg:mr-2 tg:size-4", a === e.value ? "tg:opacity-100" : "tg:opacity-0") }), /* @__PURE__ */ O(pt, {
753
+ children: [/* @__PURE__ */ k(ne, { className: K("tg:mr-2 tg:size-4", o === e.value ? "tg:opacity-100" : "tg:opacity-0") }), /* @__PURE__ */ k(vt, {
710
754
  label: v(e.label) || e.value,
711
755
  description: v(e.description),
712
756
  image: e.image
@@ -714,120 +758,120 @@ var pt = ({ label: e, description: t, image: n }) => /* @__PURE__ */ k(te, { chi
714
758
  }, e.value)) })] })] })
715
759
  })]
716
760
  }),
717
- g && /* @__PURE__ */ O(I, { className: "tg:-translate-y-1/2 tg:pointer-events-none tg:absolute tg:top-1/2 tg:right-8 tg:size-4 tg:animate-spin tg:text-muted-foreground" }),
718
- a && !g && m.length === 0 && /* @__PURE__ */ O("button", {
761
+ g && /* @__PURE__ */ k(F, { className: "tg:-translate-y-1/2 tg:pointer-events-none tg:absolute tg:top-1/2 tg:right-8 tg:size-4 tg:animate-spin tg:text-muted-foreground" }),
762
+ o && !g && m.length === 0 && /* @__PURE__ */ k("button", {
719
763
  type: "button",
720
764
  "aria-label": v("common.clear"),
721
765
  onClick: () => u(""),
722
766
  className: "tg:-translate-y-1/2 tg:absolute tg:top-1/2 tg:right-8 tg:rounded-sm tg:p-0.5 tg:text-muted-foreground tg:opacity-70 tg:transition-opacity tg:hover:opacity-100",
723
- children: /* @__PURE__ */ O(se, { className: "tg:size-4" })
767
+ children: /* @__PURE__ */ k(le, { className: "tg:size-4" })
724
768
  })
725
769
  ]
726
770
  })
727
771
  }),
728
- d && /* @__PURE__ */ O(X, {
772
+ d && /* @__PURE__ */ k(X, {
729
773
  id: b,
730
774
  children: d
731
775
  }),
732
- _ && !d && /* @__PURE__ */ O(X, { children: _ }),
733
- p && !d && !_ && /* @__PURE__ */ O(Y, { children: p })
776
+ _ && !d && /* @__PURE__ */ k(X, { children: _ }),
777
+ p && !d && !_ && /* @__PURE__ */ k(Y, { children: p })
734
778
  ]
735
779
  });
736
- }, _t = ({ field: e, extra: t }) => {
737
- let { id: n, name: r, value: i } = e, { InputLabel: o, node: c, setValue: l, error: u, label: d, helperText: f, renderOptionExtras: p, compactOptions: m, missingDependencies: h } = t, { options: g, isLoading: _, error: v } = ht(c), { optionsDisplayLimit: y } = a(), b = s();
738
- if (g.length > 0 || c.data.optionsSource) {
739
- let e = `${n}-label`, t = Array.isArray(i) ? i.map(String) : [], a = y ? g.slice(0, y) : g, s = g.length - a.length, x = (e, n) => {
740
- l(n ? [...t, e] : t.filter((t) => t !== e));
780
+ }, St = ({ field: e, extra: t }) => {
781
+ let { id: r, name: i, value: a } = e, { InputLabel: o, node: s, setValue: c, error: l, label: u, helperText: d, renderOptionExtras: f, compactOptions: p, missingDependencies: m } = t, { options: h, isLoading: g, error: _ } = bt(s), { optionsDisplayLimit: v } = b(), y = n();
782
+ if (h.length > 0 || s.data.optionsSource) {
783
+ let e = `${r}-label`, t = Array.isArray(a) ? a.map(String) : [], n = v ? h.slice(0, v) : h, b = h.length - n.length, x = (e, n) => {
784
+ c(n ? [...t, e] : t.filter((t) => t !== e));
741
785
  };
742
- return /* @__PURE__ */ k(J, {
786
+ return /* @__PURE__ */ A(J, {
743
787
  className: "tg:mb-4",
744
788
  children: [
745
- /* @__PURE__ */ O(o, {
789
+ /* @__PURE__ */ k(o, {
746
790
  className: "tg:mb-1",
747
791
  id: e,
748
- label: d,
749
- required: c.data.required
792
+ label: u,
793
+ required: s.data.required
750
794
  }),
751
- /* @__PURE__ */ O(st, { missing: h }),
752
- _ && /* @__PURE__ */ k("div", {
795
+ /* @__PURE__ */ k(ft, { missing: m }),
796
+ g && /* @__PURE__ */ A("div", {
753
797
  className: "tg:flex tg:items-center tg:gap-2 tg:py-2 tg:text-muted-foreground tg:text-sm",
754
- children: [/* @__PURE__ */ O(I, { className: "tg:h-4 tg:w-4 tg:animate-spin" }), /* @__PURE__ */ O("span", { children: b("renderer.defaultCheckboxInput.loadingOptions") })]
798
+ children: [/* @__PURE__ */ k(F, { className: "tg:h-4 tg:w-4 tg:animate-spin" }), /* @__PURE__ */ k("span", { children: y("renderer.defaultCheckboxInput.loadingOptions") })]
755
799
  }),
756
- /* @__PURE__ */ k("div", {
800
+ /* @__PURE__ */ A("div", {
757
801
  role: "group",
758
- "aria-labelledby": d ? e : void 0,
759
- "aria-label": d ? void 0 : c.data.name,
802
+ "aria-labelledby": u ? e : void 0,
803
+ "aria-label": u ? void 0 : s.data.name,
760
804
  className: "tg:min-w-0 tg:space-y-2",
761
- children: [a.map((e, i) => {
762
- let a = b(e.description);
763
- return /* @__PURE__ */ k("div", {
764
- className: K("tg:group/option tg:pointer-events-auto tg:relative tg:flex tg:items-start tg:gap-3", m && "tg:pr-22"),
805
+ children: [n.map((e, n) => {
806
+ let a = y(e.description);
807
+ return /* @__PURE__ */ A("div", {
808
+ className: K("tg:group/option tg:pointer-events-auto tg:relative tg:flex tg:items-start tg:gap-3", p && "tg:pr-22"),
765
809
  children: [
766
- /* @__PURE__ */ O(ye, {
767
- id: `${n}-${e.value}`,
768
- name: r,
810
+ /* @__PURE__ */ k(be, {
811
+ id: `${r}-${e.value}`,
812
+ name: i,
769
813
  checked: t.includes(String(e.value)),
770
814
  onCheckedChange: (t) => x(String(e.value), !!t),
771
815
  disabled: e.disabled,
772
816
  className: "tg:mt-0.5"
773
817
  }),
774
- e.image && /* @__PURE__ */ O("img", {
818
+ e.image && /* @__PURE__ */ k("img", {
775
819
  src: e.image,
776
820
  alt: "",
777
821
  className: "tg:h-8 tg:w-8 tg:shrink-0 tg:rounded tg:object-cover"
778
822
  }),
779
- /* @__PURE__ */ k("div", {
780
- className: K("tg:flex tg:flex-col", m && "tg:min-w-0 tg:flex-1 tg:overflow-hidden"),
781
- children: [/* @__PURE__ */ O(Q, {
782
- htmlFor: `${n}-${e.value}`,
783
- className: K("tg:cursor-pointer tg:font-normal tg:text-sm", m && "tg:block tg:max-w-full tg:truncate"),
784
- children: b(e.label) ? b(e.label) : e.value
785
- }), a && /* @__PURE__ */ O("span", {
786
- className: K("tg:text-muted-foreground tg:text-xs", m && "tg:block tg:max-w-full tg:truncate"),
823
+ /* @__PURE__ */ A("div", {
824
+ className: K("tg:flex tg:flex-col", p && "tg:min-w-0 tg:flex-1 tg:overflow-hidden"),
825
+ children: [/* @__PURE__ */ k(Q, {
826
+ htmlFor: `${r}-${e.value}`,
827
+ className: K("tg:cursor-pointer tg:font-normal tg:text-sm", p && "tg:block tg:max-w-full tg:truncate"),
828
+ children: y(e.label) ? y(e.label) : e.value
829
+ }), a && /* @__PURE__ */ k("span", {
830
+ className: K("tg:text-muted-foreground tg:text-xs", p && "tg:block tg:max-w-full tg:truncate"),
787
831
  children: a
788
832
  })]
789
833
  }),
790
- p?.({
791
- index: i,
834
+ f?.({
835
+ index: n,
792
836
  option: e
793
837
  })
794
838
  ]
795
- }, e.value + i);
796
- }), s > 0 && /* @__PURE__ */ O("div", {
839
+ }, e.value + n);
840
+ }), b > 0 && /* @__PURE__ */ k("div", {
797
841
  className: "tg:px-2 tg:text-muted-foreground tg:text-xs",
798
842
  children: "…"
799
843
  })]
800
844
  }),
801
- u && /* @__PURE__ */ O(X, { children: u }),
802
- v && !u && /* @__PURE__ */ O(X, { children: v }),
803
- f && !u && !v && /* @__PURE__ */ O(Y, { children: f })
845
+ l && /* @__PURE__ */ k(X, { children: l }),
846
+ _ && !l && /* @__PURE__ */ k(X, { children: _ }),
847
+ d && !l && !_ && /* @__PURE__ */ k(Y, { children: d })
804
848
  ]
805
849
  });
806
850
  }
807
- return /* @__PURE__ */ k(J, {
851
+ return /* @__PURE__ */ A(J, {
808
852
  className: "tg:mb-4",
809
- children: [/* @__PURE__ */ k("div", {
853
+ children: [/* @__PURE__ */ A("div", {
810
854
  className: "tg:flex tg:items-center tg:gap-3",
811
- children: [/* @__PURE__ */ O(ye, {
812
- id: n,
813
- name: r,
814
- "aria-label": d || c.data.name,
815
- checked: typeof i == "boolean" ? i : !1,
816
- onCheckedChange: (e) => l(!!e)
817
- }), /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O(o, {
818
- htmlFor: n,
819
- label: d,
820
- required: c.data.required,
855
+ children: [/* @__PURE__ */ k(be, {
856
+ id: r,
857
+ name: i,
858
+ "aria-label": u || s.data.name,
859
+ checked: typeof a == "boolean" ? a : !1,
860
+ onCheckedChange: (e) => c(!!e)
861
+ }), /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k(o, {
862
+ htmlFor: r,
863
+ label: u,
864
+ required: s.data.required,
821
865
  className: "tg:cursor-pointer tg:font-medium tg:text-sm"
822
- }), f && !u && /* @__PURE__ */ O(Y, { children: f })] })]
823
- }), u && /* @__PURE__ */ O(X, { children: u })]
866
+ }), d && !l && /* @__PURE__ */ k(Y, { children: d })] })]
867
+ }), l && /* @__PURE__ */ k(X, { children: l })]
824
868
  });
825
869
  };
826
870
  //#endregion
827
871
  //#region src/shared/components/ui/calendar.tsx
828
- function vt({ className: e, classNames: t, showOutsideDays: n = !0, captionLayout: r = "label", buttonVariant: i = "ghost", formatters: a, components: o, ...s }) {
829
- let c = he();
830
- return /* @__PURE__ */ O(me, {
872
+ function Ct({ className: e, classNames: t, showOutsideDays: n = !0, captionLayout: r = "label", buttonVariant: i = "ghost", formatters: a, components: o, ...s }) {
873
+ let c = ge();
874
+ return /* @__PURE__ */ k(he, {
831
875
  showOutsideDays: n,
832
876
  className: K("tg:group/calendar tg:bg-background tg:p-3 tg:[--cell-size:--spacing(8)] tg:[[data-slot=card-content]_&]:bg-transparent tg:[[data-slot=popover-content]_&]:bg-transparent", String.raw`tg:rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw`tg:rtl:**:[.rdp-button\_previous>svg]:rotate-180`, e),
833
877
  captionLayout: r,
@@ -836,8 +880,8 @@ function vt({ className: e, classNames: t, showOutsideDays: n = !0, captionLayou
836
880
  ...a
837
881
  },
838
882
  classNames: {
839
- button_next: K(ve({ variant: i }), "tg:size-(--cell-size) tg:aria-disabled:opacity-50 tg:p-0 tg:select-none", c.button_next),
840
- button_previous: K(ve({ variant: i }), "tg:size-(--cell-size) tg:aria-disabled:opacity-50 tg:p-0 tg:select-none", c.button_previous),
883
+ button_next: K(ye({ variant: i }), "tg:size-(--cell-size) tg:aria-disabled:opacity-50 tg:p-0 tg:select-none", c.button_next),
884
+ button_previous: K(ye({ variant: i }), "tg:size-(--cell-size) tg:aria-disabled:opacity-50 tg:p-0 tg:select-none", c.button_previous),
841
885
  caption_label: K("tg:select-none tg:font-medium", r === "label" ? "tg:text-sm" : "tg:rounded-md tg:pl-2 tg:pr-1 tg:flex tg:items-center tg:gap-1 tg:text-sm tg:h-8 tg:[&>svg]:text-muted-foreground tg:[&>svg]:size-3.5", c.caption_label),
842
886
  day: K("tg:relative tg:w-full tg:h-full tg:p-0 tg:text-center tg:[&:first-child[data-selected=true]_button]:rounded-l-md tg:[&:last-child[data-selected=true]_button]:rounded-r-md tg:group/day tg:aspect-square tg:select-none", c.day),
843
887
  disabled: K("tg:text-muted-foreground tg:opacity-50", c.disabled),
@@ -864,20 +908,20 @@ function vt({ className: e, classNames: t, showOutsideDays: n = !0, captionLayou
864
908
  ...t
865
909
  },
866
910
  components: {
867
- Chevron: ({ className: e, orientation: t, ...n }) => O(t === "left" ? M : t === "right" ? re : j, {
911
+ Chevron: ({ className: e, orientation: t, ...n }) => k(t === "left" ? ie : t === "right" ? ae : j, {
868
912
  className: K("tg:size-4", e),
869
913
  ...n
870
914
  }),
871
- DayButton: yt,
872
- Root: ({ className: e, rootRef: t, ...n }) => /* @__PURE__ */ O("div", {
915
+ DayButton: wt,
916
+ Root: ({ className: e, rootRef: t, ...n }) => /* @__PURE__ */ k("div", {
873
917
  "data-slot": "calendar",
874
918
  ref: t,
875
919
  className: K(e),
876
920
  ...n
877
921
  }),
878
- WeekNumber: ({ children: e, ...t }) => /* @__PURE__ */ O("td", {
922
+ WeekNumber: ({ children: e, ...t }) => /* @__PURE__ */ k("td", {
879
923
  ...t,
880
- children: /* @__PURE__ */ O("div", {
924
+ children: /* @__PURE__ */ k("div", {
881
925
  className: "tg:flex tg:size-(--cell-size) tg:items-center tg:justify-center tg:text-center",
882
926
  children: e
883
927
  })
@@ -887,11 +931,11 @@ function vt({ className: e, classNames: t, showOutsideDays: n = !0, captionLayou
887
931
  ...s
888
932
  });
889
933
  }
890
- function yt({ className: e, day: t, modifiers: n, ...r }) {
891
- let i = he(), a = b.useRef(null);
892
- return b.useEffect(() => {
934
+ function wt({ className: e, day: t, modifiers: n, ...r }) {
935
+ let i = ge(), a = x.useRef(null);
936
+ return x.useEffect(() => {
893
937
  n.focused && a.current?.focus();
894
- }, [n.focused]), /* @__PURE__ */ O(q, {
938
+ }, [n.focused]), /* @__PURE__ */ k(q, {
895
939
  ref: a,
896
940
  variant: "ghost",
897
941
  size: "icon",
@@ -906,33 +950,33 @@ function yt({ className: e, day: t, modifiers: n, ...r }) {
906
950
  }
907
951
  //#endregion
908
952
  //#region src/renderer/features/TreegeRenderer/web/components/inputs/DefaultDateInput.tsx
909
- var bt = ({ field: e, extra: t }) => {
910
- let [n, r] = D(!1), { id: i, name: a, value: o, placeholder: c } = e, { InputLabel: l, node: u, setValue: d, error: f, label: p, helperText: m } = t, h = s(), g = o ? new Date(o) : void 0;
911
- return /* @__PURE__ */ k(J, {
953
+ var Tt = ({ field: e, extra: t }) => {
954
+ let [r, i] = O(!1), { id: a, name: o, value: s, placeholder: c } = e, { InputLabel: l, node: u, setValue: d, error: f, label: p, helperText: m } = t, h = n(), g = s ? new Date(s) : void 0;
955
+ return /* @__PURE__ */ A(J, {
912
956
  className: "tg:mb-4",
913
957
  children: [
914
- /* @__PURE__ */ O(l, {
915
- htmlFor: i,
958
+ /* @__PURE__ */ k(l, {
959
+ htmlFor: a,
916
960
  label: p,
917
961
  required: u.data.required
918
962
  }),
919
- /* @__PURE__ */ k(Se, {
920
- open: n,
921
- onOpenChange: r,
922
- children: [/* @__PURE__ */ O(Ce, {
963
+ /* @__PURE__ */ A(Ce, {
964
+ open: r,
965
+ onOpenChange: i,
966
+ children: [/* @__PURE__ */ k(we, {
923
967
  asChild: !0,
924
- children: /* @__PURE__ */ k(q, {
968
+ children: /* @__PURE__ */ A(q, {
925
969
  variant: "outline",
926
- id: i,
927
- name: a,
970
+ id: a,
971
+ name: o,
928
972
  "aria-label": p || u.data.name,
929
973
  className: "tg:w-full tg:justify-between tg:font-normal",
930
- children: [g ? g.toLocaleDateString() : c || h("renderer.defaultInputs.selectDate"), /* @__PURE__ */ O(j, { className: "tg:size-4" })]
974
+ children: [g ? g.toLocaleDateString() : c || h("renderer.defaultInputs.selectDate"), /* @__PURE__ */ k(j, { className: "tg:size-4" })]
931
975
  })
932
- }), /* @__PURE__ */ O(we, {
976
+ }), /* @__PURE__ */ k(Te, {
933
977
  className: "tg:w-auto tg:overflow-hidden tg:p-0",
934
978
  align: "start",
935
- children: /* @__PURE__ */ O(vt, {
979
+ children: /* @__PURE__ */ k(Ct, {
936
980
  mode: "single",
937
981
  selected: g,
938
982
  captionLayout: "dropdown",
@@ -944,41 +988,41 @@ var bt = ({ field: e, extra: t }) => {
944
988
  return !1;
945
989
  },
946
990
  onSelect: (e) => {
947
- d(e ? e.toISOString() : ""), r(!1);
991
+ d(e ? e.toISOString() : ""), i(!1);
948
992
  }
949
993
  })
950
994
  })]
951
995
  }),
952
- f && /* @__PURE__ */ O(X, { children: f }),
953
- m && !f && /* @__PURE__ */ O(Y, { children: m })
996
+ f && /* @__PURE__ */ k(X, { children: f }),
997
+ m && !f && /* @__PURE__ */ k(Y, { children: m })
954
998
  ]
955
999
  });
956
- }, xt = ({ field: e, extra: t }) => {
957
- let [n, r] = D(!1), { id: i, value: a } = e, { InputLabel: o, node: c, setValue: l, error: u, label: d, helperText: f } = t, p = s(), m = Array.isArray(a) ? a : [], h = m[0] ? new Date(m[0]) : void 0, g = m[1] ? new Date(m[1]) : void 0;
958
- return /* @__PURE__ */ k(J, {
1000
+ }, Et = ({ field: e, extra: t }) => {
1001
+ let [r, i] = O(!1), { id: a, value: o } = e, { InputLabel: s, node: c, setValue: l, error: u, label: d, helperText: f } = t, p = n(), m = Array.isArray(o) ? o : [], h = m[0] ? new Date(m[0]) : void 0, g = m[1] ? new Date(m[1]) : void 0;
1002
+ return /* @__PURE__ */ A(J, {
959
1003
  className: "tg:mb-4",
960
1004
  children: [
961
- /* @__PURE__ */ O(o, {
962
- htmlFor: i,
1005
+ /* @__PURE__ */ k(s, {
1006
+ htmlFor: a,
963
1007
  label: d,
964
1008
  required: c.data.required
965
1009
  }),
966
- /* @__PURE__ */ k(Se, {
967
- open: n,
968
- onOpenChange: r,
969
- children: [/* @__PURE__ */ O(Ce, {
1010
+ /* @__PURE__ */ A(Ce, {
1011
+ open: r,
1012
+ onOpenChange: i,
1013
+ children: [/* @__PURE__ */ k(we, {
970
1014
  asChild: !0,
971
- children: /* @__PURE__ */ k(q, {
972
- id: i,
1015
+ children: /* @__PURE__ */ A(q, {
1016
+ id: a,
973
1017
  variant: "outline",
974
1018
  "aria-label": d || c.data.name,
975
1019
  className: "tg:w-full tg:justify-between tg:font-normal",
976
- children: [h && g ? `${h.toLocaleDateString()} - ${g.toLocaleDateString()}` : h ? h.toLocaleDateString() : p("renderer.defaultInputs.selectDateRange"), /* @__PURE__ */ O(j, { className: "tg:size-4" })]
1020
+ children: [h && g ? `${h.toLocaleDateString()} - ${g.toLocaleDateString()}` : h ? h.toLocaleDateString() : p("renderer.defaultInputs.selectDateRange"), /* @__PURE__ */ k(j, { className: "tg:size-4" })]
977
1021
  })
978
- }), /* @__PURE__ */ O(we, {
1022
+ }), /* @__PURE__ */ k(Te, {
979
1023
  className: "tg:w-auto tg:overflow-hidden tg:p-0",
980
1024
  align: "start",
981
- children: /* @__PURE__ */ O(vt, {
1025
+ children: /* @__PURE__ */ k(Ct, {
982
1026
  mode: "range",
983
1027
  min: 1,
984
1028
  selected: {
@@ -998,283 +1042,290 @@ var bt = ({ field: e, extra: t }) => {
998
1042
  l([t.toISOString(), void 0]);
999
1043
  return;
1000
1044
  }
1001
- l([e?.from ? e.from.toISOString() : void 0, e?.to ? e.to.toISOString() : void 0]), e?.from && e?.to && r(!1);
1045
+ l([e?.from ? e.from.toISOString() : void 0, e?.to ? e.to.toISOString() : void 0]), e?.from && e?.to && i(!1);
1002
1046
  },
1003
1047
  numberOfMonths: 2
1004
1048
  })
1005
1049
  })]
1006
1050
  }),
1007
- u && /* @__PURE__ */ O(X, { children: u }),
1008
- f && !u && /* @__PURE__ */ O(Y, { children: f })
1051
+ u && /* @__PURE__ */ k(X, { children: u }),
1052
+ f && !u && /* @__PURE__ */ k(Y, { children: f })
1009
1053
  ]
1010
1054
  });
1011
- }, St = ({ field: e, extra: t }) => {
1012
- let { id: n, name: r, value: i } = e, { InputLabel: a, node: o, setValue: c, error: l, label: d, helperText: m } = t, h = s(), _ = E(null), v = u(i), y = o.data.multiple, b = async (e) => {
1055
+ }, Dt = ({ field: e, extra: t }) => {
1056
+ let { id: r, name: i, value: a } = e, { InputLabel: o, node: s, setValue: c, error: l, label: p, helperText: m } = t, h = n(), _ = D(null), v = y(a), b = s.data.multiple, x = async (e) => {
1013
1057
  let { files: t } = e.target;
1014
1058
  if (!(!t || t.length === 0)) {
1015
- if (y) {
1016
- let e = await p(Array.from(t));
1059
+ if (b) {
1060
+ let e = await d(Array.from(t));
1017
1061
  c([...v, ...e]);
1018
- } else c(await g(t[0]));
1062
+ } else c(await f(t[0]));
1019
1063
  e.target.value = "";
1020
1064
  }
1021
- }, x = (e) => {
1065
+ }, S = (e) => {
1022
1066
  let t = v.filter((t, n) => n !== e);
1023
1067
  c(t.length > 0 ? t : null);
1024
1068
  };
1025
- return /* @__PURE__ */ k(J, {
1069
+ return /* @__PURE__ */ A(J, {
1026
1070
  className: "tg:mb-4",
1027
1071
  children: [
1028
- /* @__PURE__ */ O(a, {
1029
- htmlFor: n,
1030
- label: d,
1031
- required: o.data.required
1072
+ /* @__PURE__ */ k(o, {
1073
+ htmlFor: r,
1074
+ label: p,
1075
+ required: s.data.required
1032
1076
  }),
1033
- v.length > 0 && /* @__PURE__ */ O("ul", {
1077
+ v.length > 0 && /* @__PURE__ */ k("ul", {
1034
1078
  className: "tg:flex tg:flex-col tg:gap-2",
1035
- children: v.map((e, t) => /* @__PURE__ */ k("li", {
1079
+ children: v.map((e, t) => /* @__PURE__ */ A("li", {
1036
1080
  className: "tg:flex tg:items-center tg:gap-2 tg:rounded-md tg:border tg:bg-card tg:px-3 tg:py-2 tg:text-sm",
1037
1081
  children: [
1038
- /* @__PURE__ */ O(P, { className: "tg:size-4 tg:shrink-0 tg:text-muted-foreground" }),
1039
- /* @__PURE__ */ O("span", {
1082
+ /* @__PURE__ */ k(P, { className: "tg:size-4 tg:shrink-0 tg:text-muted-foreground" }),
1083
+ g(e.data) ? /* @__PURE__ */ k("a", {
1084
+ href: e.data,
1085
+ target: "_blank",
1086
+ rel: "noreferrer",
1087
+ className: "tg:flex-1 tg:truncate tg:text-primary tg:underline tg:underline-offset-2",
1088
+ title: e.name,
1089
+ children: e.name
1090
+ }) : /* @__PURE__ */ k("span", {
1040
1091
  className: "tg:flex-1 tg:truncate",
1041
1092
  title: e.name,
1042
1093
  children: e.name
1043
1094
  }),
1044
- e.size > 0 && /* @__PURE__ */ O("span", {
1095
+ e.size > 0 && /* @__PURE__ */ k("span", {
1045
1096
  className: "tg:shrink-0 tg:text-muted-foreground tg:text-xs",
1046
- children: f(e.size)
1097
+ children: u(e.size)
1047
1098
  }),
1048
- /* @__PURE__ */ O(q, {
1099
+ /* @__PURE__ */ k(q, {
1049
1100
  type: "button",
1050
1101
  variant: "ghost",
1051
1102
  size: "icon-sm",
1052
- onClick: () => x(t),
1103
+ onClick: () => S(t),
1053
1104
  "aria-label": h("renderer.defaultInputs.removeFile"),
1054
- children: /* @__PURE__ */ O(se, { className: "tg:size-4" })
1105
+ children: /* @__PURE__ */ k(le, { className: "tg:size-4" })
1055
1106
  })
1056
1107
  ]
1057
1108
  }, `${e.name}-${t}`))
1058
1109
  }),
1059
- /* @__PURE__ */ O("input", {
1110
+ /* @__PURE__ */ k("input", {
1060
1111
  ref: _,
1061
1112
  type: "file",
1062
- name: r,
1063
- id: n,
1113
+ name: i,
1114
+ id: r,
1064
1115
  className: "tg:hidden",
1065
- onChange: b,
1066
- multiple: y
1116
+ onChange: x,
1117
+ multiple: b
1067
1118
  }),
1068
- /* @__PURE__ */ k(q, {
1119
+ /* @__PURE__ */ A(q, {
1069
1120
  type: "button",
1070
1121
  variant: "outline",
1071
1122
  onClick: () => _.current?.click(),
1072
- "aria-label": d || o.data.name,
1073
- children: [/* @__PURE__ */ O(F, { className: "tg:size-4" }), v.length === 0 ? h(y ? "renderer.defaultInputs.selectFiles" : "renderer.defaultInputs.selectFile") : h(y ? "renderer.defaultInputs.addMoreFiles" : "renderer.defaultInputs.replaceFile")]
1123
+ "aria-label": p || s.data.name,
1124
+ children: [/* @__PURE__ */ k(se, { className: "tg:size-4" }), v.length === 0 ? h(b ? "renderer.defaultInputs.selectFiles" : "renderer.defaultInputs.selectFile") : h(b ? "renderer.defaultInputs.addMoreFiles" : "renderer.defaultInputs.replaceFile")]
1074
1125
  }),
1075
- l && /* @__PURE__ */ O(X, { children: l }),
1076
- m && !l && /* @__PURE__ */ O(Y, { children: m })
1126
+ l && /* @__PURE__ */ k(X, { children: l }),
1127
+ m && !l && /* @__PURE__ */ k(Y, { children: m })
1077
1128
  ]
1078
1129
  });
1079
- }, Ct = ({ field: e }) => {
1130
+ }, Ot = ({ field: e }) => {
1080
1131
  let { id: t, name: n, value: r } = e;
1081
- return /* @__PURE__ */ O(Z, {
1132
+ return /* @__PURE__ */ k(Z, {
1082
1133
  type: "hidden",
1083
1134
  id: t,
1084
1135
  name: n,
1085
1136
  value: r ?? ""
1086
1137
  });
1087
- }, wt = (e) => {
1138
+ }, kt = (e) => {
1088
1139
  let t = e.matchAll(/{{([\w-]+)}}/g);
1089
1140
  return Array.from(t, (e) => e[1]);
1090
- }, Tt = (e, t) => wt(e).every((e) => {
1141
+ }, At = (e, t) => kt(e).every((e) => {
1091
1142
  let n = t[e];
1092
1143
  return n != null && n !== "";
1093
- }), Et = (e, t, n = !1) => e.replace(/{{([\w-]+)}}/g, (e, r) => {
1144
+ }), jt = (e, t, n = !1) => e.replace(/{{([\w-]+)}}/g, (e, r) => {
1094
1145
  let i = t[r], a = i == null ? "" : String(i);
1095
1146
  return n ? encodeURIComponent(a) : a;
1096
- }), Dt = ({ field: r, extra: u }) => {
1097
- let [d, f] = D(!1), [p, h] = D(null), [g, v] = D([]), [b, x] = D(""), [S, w] = D(!1), { id: A, name: j, value: M, placeholder: re } = r, { InputLabel: ie, node: N, setValue: P, error: F, label: L, helperText: oe, missingDependencies: ce } = u, { formValues: R, inputNodes: z, headers: le, baseUrl: ue } = a(), { httpConfig: B } = N.data, de = E(!1), fe = E(!1), V = E(""), H = s(), pe = E(B), U = E(R), W = E(z), me = E(le), he = E(ue), ge = E(P), _e = E(null), G = E(null), ve = E(N.data.normalizeOptionLabels !== !1), ye = ee(() => B?.url ? wt(B.url) : [], [B?.url]), Q = ye.length > 0, be = ee(() => ye.map((e) => `${e}:${String(R[e] ?? "")}`).join("|"), [ye, R]), xe = ee(() => B?.url ? Q ? Tt(B.url, R) : !0 : !1, [
1098
- B?.url,
1099
- Q,
1100
- R
1101
- ]), $ = C(async (r) => {
1147
+ }), Mt = ({ field: t, extra: o }) => {
1148
+ let [c, u] = O(!1), [d, f] = O(null), [p, g] = O([]), [y, x] = O(""), [S, C] = O(!1), { id: T, name: re, value: j, placeholder: ie } = t, { InputLabel: ae, node: M, setValue: N, error: P, label: se, helperText: I, missingDependencies: ce } = o, { formValues: L, inputNodes: ue, headers: R, baseUrl: de } = b(), { httpConfig: z } = M.data, fe = D(!1), pe = D(!1), B = D(""), V = n(), H = D(z), me = D(L), U = D(ue), W = D(R), he = D(de), ge = D(N), _e = D(null), G = D(null), ve = D(M.data.normalizeOptionLabels !== !1), ye = ee(() => z?.url ? kt(z.url) : [], [z?.url]), be = ye.length > 0, Q = ee(() => ye.map((e) => `${e}:${String(L[e] ?? "")}`).join("|"), [ye, L]), xe = ee(() => z?.url ? be ? At(z.url, L) : !0 : !1, [
1149
+ z?.url,
1150
+ be,
1151
+ L
1152
+ ]), $ = w(async (t) => {
1102
1153
  G.current && G.current.abort();
1103
- let a = new AbortController();
1104
- G.current = a;
1105
- let s = pe.current, u = U.current, d = ge.current;
1106
- if (!s?.url) {
1107
- h(H("renderer.defaultHttpInput.noUrlConfigured")), G.current = null;
1154
+ let n = new AbortController();
1155
+ G.current = n;
1156
+ let o = H.current, c = me.current, d = ge.current;
1157
+ if (!o?.url) {
1158
+ f(V("renderer.defaultHttpInput.noUrlConfigured")), G.current = null;
1108
1159
  return;
1109
1160
  }
1110
- if (s.url && !Tt(s.url, u)) {
1161
+ if (o.url && !At(o.url, c)) {
1111
1162
  G.current = null;
1112
1163
  return;
1113
1164
  }
1114
- f(!0), h(null);
1165
+ u(!0), f(null);
1115
1166
  try {
1116
- let f = m(Et(s.url, u, !0), he.current), p = t(s.searchParam && r ? `${f}${f.includes("?") ? "&" : "?"}${s.searchParam}=${encodeURIComponent(r)}` : f, e(s.queryParams, u)), g = n({ "Content-Type": "application/json" }, e(me.current, u), e(s.headers, u)), b = [
1167
+ let u = a(jt(o.url, c, !0), he.current), p = l(o.searchParam && t ? `${u}${u.includes("?") ? "&" : "?"}${o.searchParam}=${encodeURIComponent(t)}` : u, i(o.queryParams, c)), y = m({ "Content-Type": "application/json" }, i(W.current, c), i(o.headers, c)), b = [
1117
1168
  "POST",
1118
1169
  "PUT",
1119
1170
  "PATCH"
1120
- ].includes(s.method || "") ? s.sendAllFormValues ? JSON.stringify(_(u, W.current)) : c(s.body, u, W.current) : void 0, x = setTimeout(() => a.abort(), 3e4), S = await fetch(p, {
1171
+ ].includes(o.method || "") ? o.sendAllFormValues ? JSON.stringify(h(c, U.current)) : _(o.body, c, U.current) : void 0, x = setTimeout(() => n.abort(), 3e4), S = await fetch(p, {
1121
1172
  body: b || void 0,
1122
- headers: Object.fromEntries(Object.entries(g).filter(([, e]) => e)),
1123
- method: s.method || "GET",
1124
- signal: a.signal
1173
+ headers: Object.fromEntries(Object.entries(y).filter(([, e]) => e)),
1174
+ method: o.method || "GET",
1175
+ signal: n.signal
1125
1176
  });
1126
1177
  if (clearTimeout(x), !S.ok) {
1127
- h(`HTTP Error ${S.status}: ${S.statusText}`);
1178
+ f(`HTTP Error ${S.status}: ${S.statusText}`);
1128
1179
  return;
1129
1180
  }
1130
- let C = o(await S.text());
1181
+ let C = s(await S.text());
1131
1182
  if (!C.ok) {
1132
- h(H("renderer.defaultHttpInput.invalidJson"));
1183
+ f(V("renderer.defaultHttpInput.invalidJson"));
1133
1184
  return;
1134
1185
  }
1135
- let w = i(C.value), T = s.responsePath ? l(w, s.responsePath) : w;
1136
- if (s.responseMapping && Array.isArray(T)) {
1137
- let { valueField: e = "value", labelField: t = "label", descriptionField: n, imageField: r } = s.responseMapping, i = ve.current;
1138
- v(T.map((a) => {
1139
- let o = n ? l(a, n) : void 0, s = r ? l(a, r) : void 0, c = String(l(a, t) || "");
1186
+ let w = r(C.value), T = o.responsePath ? e(w, o.responsePath) : w;
1187
+ if (o.responseMapping && Array.isArray(T)) {
1188
+ let { valueField: t = "value", labelField: n = "label", descriptionField: r, imageField: i } = o.responseMapping, a = ve.current;
1189
+ g(T.map((o) => {
1190
+ let s = r ? e(o, r) : void 0, c = i ? e(o, i) : void 0, l = String(e(o, n) || "");
1140
1191
  return {
1141
- description: o != null && o !== "" ? String(o) : void 0,
1142
- image: typeof s == "string" && s !== "" ? s : void 0,
1143
- label: i ? y(c) : c,
1144
- value: String(l(a, e) || "")
1192
+ description: s != null && s !== "" ? String(s) : void 0,
1193
+ image: typeof c == "string" && c !== "" ? c : void 0,
1194
+ label: a ? v(l) : l,
1195
+ value: String(e(o, t) || "")
1145
1196
  };
1146
1197
  }));
1147
1198
  } else d(typeof T == "string" ? T : JSON.stringify(T));
1148
1199
  } catch (e) {
1149
1200
  if (e instanceof Error && e.name === "AbortError") return;
1150
- h(e instanceof Error ? e.message : H("renderer.defaultHttpInput.fetchFailed")), console.error("HTTP Input fetch error:", e);
1201
+ f(e instanceof Error ? e.message : V("renderer.defaultHttpInput.fetchFailed")), console.error("HTTP Input fetch error:", e);
1151
1202
  } finally {
1152
- G.current === a && (f(!1), G.current = null);
1203
+ G.current === n && (u(!1), G.current = null);
1153
1204
  }
1154
- }, [H]);
1155
- if (T(() => {
1156
- pe.current = B, U.current = R, W.current = z, me.current = le, he.current = ue, ge.current = P, _e.current = $, ve.current = N.data.normalizeOptionLabels !== !1;
1205
+ }, [V]);
1206
+ if (E(() => {
1207
+ H.current = z, me.current = L, U.current = ue, W.current = R, he.current = de, ge.current = N, _e.current = $, ve.current = M.data.normalizeOptionLabels !== !1;
1157
1208
  }, [
1158
- B,
1159
- R,
1160
1209
  z,
1161
- le,
1210
+ L,
1162
1211
  ue,
1163
- P,
1212
+ R,
1213
+ de,
1214
+ N,
1164
1215
  $,
1165
- N.data.normalizeOptionLabels
1166
- ]), T(() => () => {
1167
- G.current && G.current.abort(), de.current = !1, fe.current = !1;
1168
- }, []), T(() => {
1169
- if (de.current) return;
1170
- de.current = !0;
1171
- let e = pe.current, t = U.current, n = _e.current, r = e?.url && Tt(e.url, t);
1172
- e?.fetchOnMount && r && n && (n(), e.url && (V.current = wt(e.url).map((e) => `${e}:${String(t[e] ?? "")}`).join("|")));
1173
- }, []), T(() => {
1174
- if (!de.current || !Q || V.current === be || !xe) return;
1216
+ M.data.normalizeOptionLabels
1217
+ ]), E(() => () => {
1218
+ G.current && G.current.abort(), fe.current = !1, pe.current = !1;
1219
+ }, []), E(() => {
1220
+ if (fe.current) return;
1221
+ fe.current = !0;
1222
+ let e = H.current, t = me.current, n = _e.current, r = e?.url && At(e.url, t);
1223
+ e?.fetchOnMount && r && n && (n(), e.url && (B.current = kt(e.url).map((e) => `${e}:${String(t[e] ?? "")}`).join("|")));
1224
+ }, []), E(() => {
1225
+ if (!fe.current || !be || B.current === Q || !xe) return;
1175
1226
  let e = setTimeout(() => {
1176
- $(), V.current = be;
1227
+ $(), B.current = Q;
1177
1228
  }, 500);
1178
1229
  return () => clearTimeout(e);
1179
1230
  }, [
1180
- be,
1181
1231
  Q,
1232
+ be,
1182
1233
  xe,
1183
1234
  $
1184
- ]), T(() => {
1185
- if (!fe.current) {
1186
- fe.current = !0;
1235
+ ]), E(() => {
1236
+ if (!pe.current) {
1237
+ pe.current = !0;
1187
1238
  return;
1188
1239
  }
1189
- let e = pe.current, t = U.current, n = _e.current, r = e?.url && Tt(e.url, t);
1190
- e?.fetchOnMount && r && n && (n(), e.url && (V.current = wt(e.url).map((e) => `${e}:${String(t[e] ?? "")}`).join("|")));
1240
+ let e = H.current, t = me.current, n = _e.current, r = e?.url && At(e.url, t);
1241
+ e?.fetchOnMount && r && n && (n(), e.url && (B.current = kt(e.url).map((e) => `${e}:${String(t[e] ?? "")}`).join("|")));
1191
1242
  }, [ee(() => JSON.stringify({
1192
- body: B?.body,
1193
- fetchOnMount: B?.fetchOnMount,
1194
- headers: B?.headers,
1195
- method: B?.method,
1196
- queryParams: B?.queryParams,
1197
- responseMapping: B?.responseMapping,
1198
- responsePath: B?.responsePath,
1199
- searchParam: B?.searchParam,
1200
- sendAllFormValues: B?.sendAllFormValues,
1201
- url: B?.url
1202
- }), [B])]), T(() => {
1203
- if (!(B?.searchParam && b)) return;
1243
+ body: z?.body,
1244
+ fetchOnMount: z?.fetchOnMount,
1245
+ headers: z?.headers,
1246
+ method: z?.method,
1247
+ queryParams: z?.queryParams,
1248
+ responseMapping: z?.responseMapping,
1249
+ responsePath: z?.responsePath,
1250
+ searchParam: z?.searchParam,
1251
+ sendAllFormValues: z?.sendAllFormValues,
1252
+ url: z?.url
1253
+ }), [z])]), E(() => {
1254
+ if (!(z?.searchParam && y)) return;
1204
1255
  let e = setTimeout(() => {
1205
- $(b);
1256
+ $(y);
1206
1257
  }, 300);
1207
1258
  return () => clearTimeout(e);
1208
1259
  }, [
1209
- b,
1210
- B?.searchParam,
1260
+ y,
1261
+ z?.searchParam,
1211
1262
  $
1212
- ]), B?.responseMapping) {
1213
- let e = Array.isArray(M) ? M[0] : M, t = g.find((t) => t.value === e);
1214
- if (B.searchParam) {
1215
- let n = d && B?.showLoading, r = t?.label || re || H("renderer.defaultHttpInput.search");
1216
- return /* @__PURE__ */ k(J, {
1263
+ ]), z?.responseMapping) {
1264
+ let e = Array.isArray(j) ? j[0] : j, t = p.find((t) => t.value === e);
1265
+ if (z.searchParam) {
1266
+ let n = c && z?.showLoading, r = t?.label || ie || V("renderer.defaultHttpInput.search");
1267
+ return /* @__PURE__ */ A(J, {
1217
1268
  className: "tg:mb-4",
1218
1269
  children: [
1219
- /* @__PURE__ */ O(ie, {
1220
- htmlFor: A,
1221
- label: L,
1222
- required: N.data.required
1270
+ /* @__PURE__ */ k(ae, {
1271
+ htmlFor: T,
1272
+ label: se,
1273
+ required: M.data.required
1223
1274
  }),
1224
- /* @__PURE__ */ O(ot, {
1275
+ /* @__PURE__ */ k(dt, {
1225
1276
  missing: ce,
1226
- children: /* @__PURE__ */ k("div", {
1277
+ children: /* @__PURE__ */ A("div", {
1227
1278
  className: "tg:relative",
1228
1279
  children: [
1229
- /* @__PURE__ */ k(Se, {
1280
+ /* @__PURE__ */ A(Ce, {
1230
1281
  open: S,
1231
- onOpenChange: w,
1232
- children: [/* @__PURE__ */ O(Ce, {
1282
+ onOpenChange: C,
1283
+ children: [/* @__PURE__ */ k(we, {
1233
1284
  asChild: !0,
1234
- children: /* @__PURE__ */ k(q, {
1235
- id: A,
1285
+ children: /* @__PURE__ */ A(q, {
1286
+ id: T,
1236
1287
  variant: "outline",
1237
1288
  role: "combobox",
1238
- "aria-label": L || N.data.name,
1289
+ "aria-label": se || M.data.name,
1239
1290
  "aria-expanded": S,
1240
1291
  disabled: ce.length > 0,
1241
1292
  className: K("tg:w-full tg:justify-between", (e || n) && "tg:pr-14"),
1242
- children: [/* @__PURE__ */ O("span", {
1293
+ children: [/* @__PURE__ */ k("span", {
1243
1294
  className: "tg:truncate",
1244
1295
  children: r
1245
- }), /* @__PURE__ */ O(ae, { className: "tg:ml-2 tg:h-4 tg:w-4 tg:shrink-0 tg:opacity-50" })]
1296
+ }), /* @__PURE__ */ k(oe, { className: "tg:ml-2 tg:h-4 tg:w-4 tg:shrink-0 tg:opacity-50" })]
1246
1297
  })
1247
- }), /* @__PURE__ */ O(we, {
1298
+ }), /* @__PURE__ */ k(Te, {
1248
1299
  className: "tg:w-[var(--radix-popover-trigger-width)] tg:p-0",
1249
1300
  align: "start",
1250
- children: /* @__PURE__ */ k(Xe, {
1301
+ children: /* @__PURE__ */ A(tt, {
1251
1302
  shouldFilter: !1,
1252
- children: [/* @__PURE__ */ O(Ze, {
1253
- placeholder: H("renderer.defaultHttpInput.search"),
1254
- value: b,
1303
+ children: [/* @__PURE__ */ k(nt, {
1304
+ placeholder: V("renderer.defaultHttpInput.search"),
1305
+ value: y,
1255
1306
  onValueChange: (e) => {
1256
- x(e), h(null);
1307
+ x(e), f(null);
1257
1308
  }
1258
- }), /* @__PURE__ */ k(Qe, { children: [
1259
- d && /* @__PURE__ */ O("div", {
1309
+ }), /* @__PURE__ */ A(rt, { children: [
1310
+ c && /* @__PURE__ */ k("div", {
1260
1311
  className: "tg:flex tg:items-center tg:justify-center tg:p-4",
1261
- children: /* @__PURE__ */ O(I, { className: "tg:h-4 tg:w-4 tg:animate-spin" })
1312
+ children: /* @__PURE__ */ k(F, { className: "tg:h-4 tg:w-4 tg:animate-spin" })
1262
1313
  }),
1263
- !d && p && /* @__PURE__ */ k("div", {
1314
+ !c && d && /* @__PURE__ */ A("div", {
1264
1315
  className: "tg:p-4 tg:text-destructive tg:text-sm",
1265
- children: [/* @__PURE__ */ O("div", { children: p }), /* @__PURE__ */ O("button", {
1316
+ children: [/* @__PURE__ */ k("div", { children: d }), /* @__PURE__ */ k("button", {
1266
1317
  type: "button",
1267
- onClick: () => $(b),
1318
+ onClick: () => $(y),
1268
1319
  className: "tg:mt-2 tg:block tg:text-primary tg:hover:underline",
1269
- children: H("renderer.defaultHttpInput.retry")
1320
+ children: V("renderer.defaultHttpInput.retry")
1270
1321
  })]
1271
1322
  }),
1272
- !(d || p) && /* @__PURE__ */ k(te, { children: [/* @__PURE__ */ O($e, { children: H("renderer.defaultHttpInput.noResults") }), /* @__PURE__ */ O(et, { children: g.map((e) => /* @__PURE__ */ k(tt, {
1323
+ !(c || d) && /* @__PURE__ */ A(te, { children: [/* @__PURE__ */ k(it, { children: V("renderer.defaultHttpInput.noResults") }), /* @__PURE__ */ k(at, { children: p.map((e) => /* @__PURE__ */ A(ot, {
1273
1324
  value: e.value,
1274
1325
  onSelect: () => {
1275
- P(e.value === M ? "" : e.value), w(!1);
1326
+ N(e.value === j ? "" : e.value), C(!1);
1276
1327
  },
1277
- children: [/* @__PURE__ */ O(ne, { className: K("tg:mr-2 tg:h-4 tg:w-4", M === e.value ? "tg:opacity-100" : "tg:opacity-0") }), /* @__PURE__ */ O(pt, {
1328
+ children: [/* @__PURE__ */ k(ne, { className: K("tg:mr-2 tg:h-4 tg:w-4", j === e.value ? "tg:opacity-100" : "tg:opacity-0") }), /* @__PURE__ */ k(vt, {
1278
1329
  label: e.label,
1279
1330
  description: e.description,
1280
1331
  image: e.image
@@ -1284,110 +1335,110 @@ var bt = ({ field: e, extra: t }) => {
1284
1335
  })
1285
1336
  })]
1286
1337
  }),
1287
- n && /* @__PURE__ */ O(I, { className: "tg:-translate-y-1/2 tg:pointer-events-none tg:absolute tg:top-1/2 tg:right-8 tg:size-4 tg:animate-spin tg:text-muted-foreground" }),
1288
- e && !n && ce.length === 0 && /* @__PURE__ */ O("button", {
1338
+ n && /* @__PURE__ */ k(F, { className: "tg:-translate-y-1/2 tg:pointer-events-none tg:absolute tg:top-1/2 tg:right-8 tg:size-4 tg:animate-spin tg:text-muted-foreground" }),
1339
+ e && !n && ce.length === 0 && /* @__PURE__ */ k("button", {
1289
1340
  type: "button",
1290
- "aria-label": H("common.clear"),
1291
- onClick: () => P(""),
1341
+ "aria-label": V("common.clear"),
1342
+ onClick: () => N(""),
1292
1343
  className: "tg:-translate-y-1/2 tg:absolute tg:top-1/2 tg:right-8 tg:rounded-sm tg:p-0.5 tg:text-muted-foreground tg:opacity-70 tg:transition-opacity tg:hover:opacity-100",
1293
- children: /* @__PURE__ */ O(se, { className: "tg:size-4" })
1344
+ children: /* @__PURE__ */ k(le, { className: "tg:size-4" })
1294
1345
  })
1295
1346
  ]
1296
1347
  })
1297
1348
  }),
1298
- F && /* @__PURE__ */ O(X, { children: F }),
1299
- oe && !F && /* @__PURE__ */ O(Y, { children: oe })
1349
+ P && /* @__PURE__ */ k(X, { children: P }),
1350
+ I && !P && /* @__PURE__ */ k(Y, { children: I })
1300
1351
  ]
1301
1352
  });
1302
1353
  }
1303
- let n = d && B?.showLoading, r = ce.length === 0 && g.length === 0 && !n ? p ?? H("renderer.defaultHttpInput.noDataAvailable") : void 0, i = Array.isArray(M) ? M[0] ?? "" : M ?? "", a = /* @__PURE__ */ k("div", {
1354
+ let n = c && z?.showLoading, r = ce.length === 0 && p.length === 0 && !n ? d ?? V("renderer.defaultHttpInput.noDataAvailable") : void 0, i = Array.isArray(j) ? j[0] ?? "" : j ?? "", a = /* @__PURE__ */ A("div", {
1304
1355
  className: "tg:relative",
1305
1356
  children: [
1306
- /* @__PURE__ */ k(Te, {
1357
+ /* @__PURE__ */ A(Ee, {
1307
1358
  value: i,
1308
- onValueChange: (e) => P(e),
1309
- disabled: n || g.length === 0,
1310
- name: j,
1311
- children: [/* @__PURE__ */ O(Oe, {
1312
- id: A,
1313
- name: j,
1314
- "aria-label": L || N.data.name,
1359
+ onValueChange: (e) => N(e),
1360
+ disabled: n || p.length === 0,
1361
+ name: re,
1362
+ children: [/* @__PURE__ */ k(ke, {
1363
+ id: T,
1364
+ name: re,
1365
+ "aria-label": se || M.data.name,
1315
1366
  className: K("tg:w-full", (i || n) && "tg:pr-14"),
1316
- children: /* @__PURE__ */ O(De, { placeholder: re || H("renderer.defaultHttpInput.selectOption") })
1317
- }), /* @__PURE__ */ O(ke, { children: /* @__PURE__ */ O(Ee, { children: g.map((e, t) => /* @__PURE__ */ O(je, {
1367
+ children: /* @__PURE__ */ k(Oe, { placeholder: ie || V("renderer.defaultHttpInput.selectOption") })
1368
+ }), /* @__PURE__ */ k(Ae, { children: /* @__PURE__ */ k(De, { children: p.map((e, t) => /* @__PURE__ */ k(Me, {
1318
1369
  value: e.value,
1319
- children: /* @__PURE__ */ O(pt, {
1370
+ children: /* @__PURE__ */ k(vt, {
1320
1371
  label: e.label,
1321
1372
  description: e.description,
1322
1373
  image: e.image
1323
1374
  })
1324
1375
  }, e.value + t)) }) })]
1325
1376
  }),
1326
- n && /* @__PURE__ */ O(I, { className: "tg:-translate-y-1/2 tg:pointer-events-none tg:absolute tg:top-1/2 tg:right-8 tg:size-4 tg:animate-spin tg:text-muted-foreground" }),
1327
- i && !n && /* @__PURE__ */ O("button", {
1377
+ n && /* @__PURE__ */ k(F, { className: "tg:-translate-y-1/2 tg:pointer-events-none tg:absolute tg:top-1/2 tg:right-8 tg:size-4 tg:animate-spin tg:text-muted-foreground" }),
1378
+ i && !n && /* @__PURE__ */ k("button", {
1328
1379
  type: "button",
1329
- "aria-label": H("common.clear"),
1330
- onClick: () => P(""),
1380
+ "aria-label": V("common.clear"),
1381
+ onClick: () => N(""),
1331
1382
  className: "tg:-translate-y-1/2 tg:absolute tg:top-1/2 tg:right-8 tg:rounded-sm tg:p-0.5 tg:text-muted-foreground tg:opacity-70 tg:transition-opacity tg:hover:opacity-100",
1332
- children: /* @__PURE__ */ O(se, { className: "tg:size-4" })
1383
+ children: /* @__PURE__ */ k(le, { className: "tg:size-4" })
1333
1384
  })
1334
1385
  ]
1335
1386
  });
1336
- return /* @__PURE__ */ k(J, {
1387
+ return /* @__PURE__ */ A(J, {
1337
1388
  className: "tg:mb-4",
1338
1389
  children: [
1339
- /* @__PURE__ */ O(ie, {
1340
- htmlFor: A,
1341
- label: L,
1342
- required: N.data.required
1390
+ /* @__PURE__ */ k(ae, {
1391
+ htmlFor: T,
1392
+ label: se,
1393
+ required: M.data.required
1343
1394
  }),
1344
- /* @__PURE__ */ O(ot, {
1395
+ /* @__PURE__ */ k(dt, {
1345
1396
  missing: ce,
1346
- children: r ? /* @__PURE__ */ O(Fe, { children: /* @__PURE__ */ k(Ie, { children: [/* @__PURE__ */ O(Le, {
1397
+ children: r ? /* @__PURE__ */ k(Re, { children: /* @__PURE__ */ A(ze, { children: [/* @__PURE__ */ k(Be, {
1347
1398
  asChild: !0,
1348
- children: /* @__PURE__ */ O("div", {
1399
+ children: /* @__PURE__ */ k("div", {
1349
1400
  className: "tg:w-full",
1350
1401
  children: a
1351
1402
  })
1352
- }), /* @__PURE__ */ O(Re, { children: /* @__PURE__ */ O("p", { children: r }) })] }) }) : a
1403
+ }), /* @__PURE__ */ k(Ve, { children: /* @__PURE__ */ k("p", { children: r }) })] }) }) : a
1353
1404
  }),
1354
- F && /* @__PURE__ */ O(X, { children: F }),
1355
- oe && !F && /* @__PURE__ */ O(Y, { children: oe })
1405
+ P && /* @__PURE__ */ k(X, { children: P }),
1406
+ I && !P && /* @__PURE__ */ k(Y, { children: I })
1356
1407
  ]
1357
1408
  });
1358
1409
  }
1359
- return /* @__PURE__ */ k(J, {
1410
+ return /* @__PURE__ */ A(J, {
1360
1411
  className: "tg:mb-4",
1361
1412
  children: [
1362
- /* @__PURE__ */ O(ie, {
1363
- htmlFor: A,
1364
- label: L,
1365
- required: N.data.required
1413
+ /* @__PURE__ */ k(ae, {
1414
+ htmlFor: T,
1415
+ label: se,
1416
+ required: M.data.required
1366
1417
  }),
1367
- /* @__PURE__ */ O(Z, {
1418
+ /* @__PURE__ */ k(Z, {
1368
1419
  type: "text",
1369
- name: j,
1370
- id: A,
1371
- "aria-label": L || N.data.name,
1372
- value: typeof M == "string" ? M : JSON.stringify(M),
1420
+ name: re,
1421
+ id: T,
1422
+ "aria-label": se || M.data.name,
1423
+ value: typeof j == "string" ? j : JSON.stringify(j),
1373
1424
  readOnly: !0,
1374
1425
  disabled: !0
1375
1426
  }),
1376
- F && /* @__PURE__ */ O(X, { children: F }),
1377
- oe && !F && /* @__PURE__ */ O(Y, { children: oe })
1427
+ P && /* @__PURE__ */ k(X, { children: P }),
1428
+ I && !P && /* @__PURE__ */ k(Y, { children: I })
1378
1429
  ]
1379
1430
  });
1380
- }, Ot = ({ field: e, extra: t }) => {
1431
+ }, Nt = ({ field: e, extra: t }) => {
1381
1432
  let { id: n, name: r, value: i, placeholder: a } = e, { InputLabel: o, node: s, setValue: c, error: l, label: u, helperText: d } = t;
1382
- return /* @__PURE__ */ k(J, {
1433
+ return /* @__PURE__ */ A(J, {
1383
1434
  className: "tg:mb-4",
1384
1435
  children: [
1385
- /* @__PURE__ */ O(o, {
1436
+ /* @__PURE__ */ k(o, {
1386
1437
  htmlFor: n,
1387
1438
  label: u,
1388
1439
  required: s.data.required
1389
1440
  }),
1390
- /* @__PURE__ */ O(Z, {
1441
+ /* @__PURE__ */ k(Z, {
1391
1442
  id: n,
1392
1443
  type: "number",
1393
1444
  name: r,
@@ -1396,21 +1447,21 @@ var bt = ({ field: e, extra: t }) => {
1396
1447
  onChange: (e) => c(e.target.value === "" ? null : Number(e.target.value)),
1397
1448
  placeholder: a
1398
1449
  }),
1399
- l && /* @__PURE__ */ O(X, { children: l }),
1400
- d && !l && /* @__PURE__ */ O(Y, { children: d })
1450
+ l && /* @__PURE__ */ k(X, { children: l }),
1451
+ d && !l && /* @__PURE__ */ k(Y, { children: d })
1401
1452
  ]
1402
1453
  });
1403
- }, kt = ({ field: e, extra: t }) => {
1454
+ }, Pt = ({ field: e, extra: t }) => {
1404
1455
  let { id: n, name: r, value: i, placeholder: a } = e, { InputLabel: o, node: s, setValue: c, error: l, label: u, helperText: d } = t;
1405
- return /* @__PURE__ */ k(J, {
1456
+ return /* @__PURE__ */ A(J, {
1406
1457
  className: "tg:mb-4",
1407
1458
  children: [
1408
- /* @__PURE__ */ O(o, {
1459
+ /* @__PURE__ */ k(o, {
1409
1460
  htmlFor: n,
1410
1461
  label: u,
1411
1462
  required: s.data.required
1412
1463
  }),
1413
- /* @__PURE__ */ O(Z, {
1464
+ /* @__PURE__ */ k(Z, {
1414
1465
  id: n,
1415
1466
  name: r,
1416
1467
  type: "password",
@@ -1420,11 +1471,11 @@ var bt = ({ field: e, extra: t }) => {
1420
1471
  placeholder: a,
1421
1472
  autoComplete: "new-password"
1422
1473
  }),
1423
- l && /* @__PURE__ */ O(X, { children: l }),
1424
- d && !l && /* @__PURE__ */ O(Y, { children: d })
1474
+ l && /* @__PURE__ */ k(X, { children: l }),
1475
+ d && !l && /* @__PURE__ */ k(Y, { children: d })
1425
1476
  ]
1426
1477
  });
1427
- }, At = z("tg:group/field tg:flex tg:w-full tg:gap-3 tg:data-[invalid=true]:text-destructive", {
1478
+ }, Ft = R("tg:group/field tg:flex tg:w-full tg:gap-3 tg:data-[invalid=true]:text-destructive", {
1428
1479
  defaultVariants: { orientation: "vertical" },
1429
1480
  variants: { orientation: {
1430
1481
  horizontal: [
@@ -1440,38 +1491,38 @@ var bt = ({ field: e, extra: t }) => {
1440
1491
  vertical: ["tg:flex-col tg:[&>*]:w-full tg:[&>.sr-only]:w-auto"]
1441
1492
  } }
1442
1493
  });
1443
- function jt({ className: e, orientation: t = "vertical", ...n }) {
1444
- return /* @__PURE__ */ O("div", {
1494
+ function It({ className: e, orientation: t = "vertical", ...n }) {
1495
+ return /* @__PURE__ */ k("div", {
1445
1496
  role: "group",
1446
1497
  "data-slot": "field",
1447
1498
  "data-orientation": t,
1448
- className: K(At({ orientation: t }), e),
1499
+ className: K(Ft({ orientation: t }), e),
1449
1500
  ...n
1450
1501
  });
1451
1502
  }
1452
- function Mt({ className: e, ...t }) {
1453
- return /* @__PURE__ */ O("div", {
1503
+ function Lt({ className: e, ...t }) {
1504
+ return /* @__PURE__ */ k("div", {
1454
1505
  "data-slot": "field-content",
1455
1506
  className: K("tg:group/field-content tg:flex tg:flex-1 tg:flex-col tg:gap-1.5 tg:leading-snug", e),
1456
1507
  ...t
1457
1508
  });
1458
1509
  }
1459
- function Nt({ className: e, ...t }) {
1460
- return /* @__PURE__ */ O(Q, {
1510
+ function Rt({ className: e, ...t }) {
1511
+ return /* @__PURE__ */ k(Q, {
1461
1512
  "data-slot": "field-label",
1462
1513
  className: K("tg:group/field-label tg:peer/field-label tg:flex tg:w-fit tg:gap-2 tg:leading-snug tg:group-data-[disabled=true]/field:opacity-50", "tg:has-[>[data-slot=field]]:w-full tg:has-[>[data-slot=field]]:flex-col tg:has-[>[data-slot=field]]:rounded-md tg:has-[>[data-slot=field]]:border tg:[&>*]:data-[slot=field]:p-4", "tg:has-data-[state=checked]:border-primary tg:has-data-[state=checked]:bg-primary/5 tg:dark:has-data-[state=checked]:bg-primary/10", e),
1463
1514
  ...t
1464
1515
  });
1465
1516
  }
1466
- function Pt({ className: e, ...t }) {
1467
- return /* @__PURE__ */ O("div", {
1517
+ function zt({ className: e, ...t }) {
1518
+ return /* @__PURE__ */ k("div", {
1468
1519
  "data-slot": "field-label",
1469
1520
  className: K("tg:flex tg:w-fit tg:items-center tg:gap-2 tg:font-medium tg:text-sm tg:leading-snug tg:group-data-[disabled=true]/field:opacity-50", e),
1470
1521
  ...t
1471
1522
  });
1472
1523
  }
1473
- function Ft({ className: e, ...t }) {
1474
- return /* @__PURE__ */ O("p", {
1524
+ function Bt({ className: e, ...t }) {
1525
+ return /* @__PURE__ */ k("p", {
1475
1526
  "data-slot": "field-description",
1476
1527
  className: K("tg:font-normal tg:text-muted-foreground tg:text-sm tg:leading-normal tg:group-has-[[data-orientation=horizontal]]/field:text-balance", "tg:last:mt-0 tg:nth-last-2:-mt-1 tg:[[data-variant=legend]+&]:-mt-1.5", "tg:[&>a]:underline tg:[&>a]:underline-offset-4 tg:[&>a:hover]:text-primary", e),
1477
1528
  ...t
@@ -1479,189 +1530,189 @@ function Ft({ className: e, ...t }) {
1479
1530
  }
1480
1531
  //#endregion
1481
1532
  //#region src/shared/components/ui/radio-group.tsx
1482
- function It({ className: e, ...t }) {
1483
- return /* @__PURE__ */ O(ge.Root, {
1533
+ function Vt({ className: e, ...t }) {
1534
+ return /* @__PURE__ */ k(_e.Root, {
1484
1535
  "data-slot": "radio-group",
1485
1536
  className: K("tg:grid tg:gap-3", e),
1486
1537
  ...t
1487
1538
  });
1488
1539
  }
1489
- function Lt({ className: e, ...t }) {
1490
- return /* @__PURE__ */ O(ge.Item, {
1540
+ function Ht({ className: e, ...t }) {
1541
+ return /* @__PURE__ */ k(_e.Item, {
1491
1542
  "data-slot": "radio-group-item",
1492
1543
  className: K("tg:aspect-square tg:size-4 tg:shrink-0 tg:rounded-full tg:border tg:border-input tg:text-primary tg:shadow-xs tg:outline-none tg:transition-[color,box-shadow] tg:focus-visible:border-ring tg:focus-visible:ring-[3px] tg:focus-visible:ring-ring/50 tg:disabled:cursor-not-allowed tg:disabled:opacity-50 tg:aria-invalid:border-destructive tg:aria-invalid:ring-destructive/20 tg:dark:bg-input/30 tg:dark:aria-invalid:ring-destructive/40", e),
1493
1544
  ...t,
1494
- children: /* @__PURE__ */ O(ge.Indicator, {
1545
+ children: /* @__PURE__ */ k(_e.Indicator, {
1495
1546
  "data-slot": "radio-group-indicator",
1496
1547
  className: "tg:relative tg:flex tg:items-center tg:justify-center",
1497
- children: /* @__PURE__ */ O(N, { className: "tg:-translate-x-1/2 tg:-translate-y-1/2 tg:absolute tg:top-1/2 tg:left-1/2 tg:size-2 tg:fill-primary" })
1548
+ children: /* @__PURE__ */ k(N, { className: "tg:-translate-x-1/2 tg:-translate-y-1/2 tg:absolute tg:top-1/2 tg:left-1/2 tg:size-2 tg:fill-primary" })
1498
1549
  })
1499
1550
  });
1500
1551
  }
1501
1552
  //#endregion
1502
1553
  //#region src/renderer/features/TreegeRenderer/web/components/inputs/DefaultRadioInput.tsx
1503
- var Rt = ({ field: e, extra: t }) => {
1504
- let { id: n, name: r, value: i } = e, { InputLabel: o, node: c, setValue: l, error: u, label: d, helperText: f, renderOptionExtras: p, compactOptions: m, missingDependencies: h } = t, { options: g, isLoading: _, error: v } = ht(c), { optionsDisplayLimit: y } = a(), b = s(), x = i ? String(i) : "", S = c.data.variant !== "default", C = `${n}-label`, w = y ? g.slice(0, y) : g, T = g.length - w.length;
1505
- return /* @__PURE__ */ k(J, {
1554
+ var Ut = ({ field: e, extra: t }) => {
1555
+ let { id: r, name: i, value: a } = e, { InputLabel: o, node: s, setValue: c, error: l, label: u, helperText: d, renderOptionExtras: f, compactOptions: p, missingDependencies: m } = t, { options: h, isLoading: g, error: _ } = bt(s), { optionsDisplayLimit: v } = b(), y = n(), x = a ? String(a) : "", S = s.data.variant !== "default", C = `${r}-label`, w = v ? h.slice(0, v) : h, T = h.length - w.length;
1556
+ return /* @__PURE__ */ A(J, {
1506
1557
  className: "tg:mb-4",
1507
1558
  children: [
1508
- /* @__PURE__ */ O(o, {
1559
+ /* @__PURE__ */ k(o, {
1509
1560
  className: "tg:mb-1",
1510
1561
  id: C,
1511
- label: d,
1512
- required: c.data.required
1562
+ label: u,
1563
+ required: s.data.required
1513
1564
  }),
1514
- /* @__PURE__ */ O(st, { missing: h }),
1515
- _ && /* @__PURE__ */ k("div", {
1565
+ /* @__PURE__ */ k(ft, { missing: m }),
1566
+ g && /* @__PURE__ */ A("div", {
1516
1567
  className: "tg:flex tg:items-center tg:gap-2 tg:py-2 tg:text-muted-foreground tg:text-sm",
1517
- children: [/* @__PURE__ */ O(I, { className: "tg:h-4 tg:w-4 tg:animate-spin" }), /* @__PURE__ */ O("span", { children: b("renderer.defaultRadioInput.loadingOptions") })]
1568
+ children: [/* @__PURE__ */ k(F, { className: "tg:h-4 tg:w-4 tg:animate-spin" }), /* @__PURE__ */ k("span", { children: y("renderer.defaultRadioInput.loadingOptions") })]
1518
1569
  }),
1519
- /* @__PURE__ */ k(It, {
1570
+ /* @__PURE__ */ A(Vt, {
1520
1571
  value: x,
1521
- onValueChange: (e) => l(e),
1522
- "aria-labelledby": d ? C : void 0,
1523
- "aria-label": d ? void 0 : c.data.name,
1524
- name: r,
1572
+ onValueChange: (e) => c(e),
1573
+ "aria-labelledby": u ? C : void 0,
1574
+ "aria-label": u ? void 0 : s.data.name,
1575
+ name: i,
1525
1576
  className: K("tg:min-w-0", S && "tg:flex tg:flex-col tg:gap-2"),
1526
1577
  children: [w.map((e, t) => {
1527
- let r = `${n}-${e.value}`, i = b(e.label) || e.value, a = b(e.description), o = String(e.value);
1528
- return S ? /* @__PURE__ */ k(Nt, {
1529
- htmlFor: r,
1530
- className: K("tg:group/option tg:pointer-events-auto tg:relative", m && "tg:group-hover/option:pr-16"),
1531
- children: [/* @__PURE__ */ k(jt, {
1578
+ let n = `${r}-${e.value}`, i = y(e.label) || e.value, a = y(e.description), o = String(e.value);
1579
+ return S ? /* @__PURE__ */ A(Rt, {
1580
+ htmlFor: n,
1581
+ className: K("tg:group/option tg:pointer-events-auto tg:relative", p && "tg:group-hover/option:pr-16"),
1582
+ children: [/* @__PURE__ */ A(It, {
1532
1583
  orientation: "horizontal",
1533
1584
  "data-disabled": e.disabled || void 0,
1534
1585
  children: [
1535
- e.image && /* @__PURE__ */ O("img", {
1586
+ e.image && /* @__PURE__ */ k("img", {
1536
1587
  src: e.image,
1537
1588
  alt: "",
1538
1589
  className: "tg:h-10 tg:w-10 tg:shrink-0 tg:self-center tg:rounded tg:object-cover"
1539
1590
  }),
1540
- /* @__PURE__ */ k(Mt, {
1541
- className: K(m && "tg:min-w-0 tg:flex-1 tg:overflow-hidden"),
1542
- children: [/* @__PURE__ */ O(Pt, {
1543
- className: K(m && "tg:block tg:max-w-full tg:truncate"),
1591
+ /* @__PURE__ */ A(Lt, {
1592
+ className: K(p && "tg:min-w-0 tg:flex-1 tg:overflow-hidden"),
1593
+ children: [/* @__PURE__ */ k(zt, {
1594
+ className: K(p && "tg:block tg:max-w-full tg:truncate"),
1544
1595
  children: i
1545
- }), a && /* @__PURE__ */ O(Ft, {
1546
- className: K(m && "tg:block tg:max-w-full tg:truncate"),
1596
+ }), a && /* @__PURE__ */ k(Bt, {
1597
+ className: K(p && "tg:block tg:max-w-full tg:truncate"),
1547
1598
  children: a
1548
1599
  })]
1549
1600
  }),
1550
- /* @__PURE__ */ O(Lt, {
1601
+ /* @__PURE__ */ k(Ht, {
1551
1602
  value: o,
1552
- id: r,
1603
+ id: n,
1553
1604
  disabled: e.disabled,
1554
- className: K(m && "tg:ml-auto tg:shrink-0 tg:group-hover/option:invisible")
1605
+ className: K(p && "tg:ml-auto tg:shrink-0 tg:group-hover/option:invisible")
1555
1606
  })
1556
1607
  ]
1557
- }), p?.({
1608
+ }), f?.({
1558
1609
  index: t,
1559
1610
  option: e,
1560
1611
  variant: "card"
1561
1612
  })]
1562
- }, e.value + t) : /* @__PURE__ */ k("div", {
1563
- className: K("tg:group/option tg:pointer-events-auto tg:relative tg:flex tg:items-start tg:space-x-2", m && "tg:min-w-0 tg:pr-22"),
1613
+ }, e.value + t) : /* @__PURE__ */ A("div", {
1614
+ className: K("tg:group/option tg:pointer-events-auto tg:relative tg:flex tg:items-start tg:space-x-2", p && "tg:min-w-0 tg:pr-22"),
1564
1615
  children: [
1565
- /* @__PURE__ */ O(Lt, {
1616
+ /* @__PURE__ */ k(Ht, {
1566
1617
  value: o,
1567
- id: r,
1618
+ id: n,
1568
1619
  disabled: e.disabled,
1569
1620
  className: "tg:mt-0.5"
1570
1621
  }),
1571
- e.image && /* @__PURE__ */ O("img", {
1622
+ e.image && /* @__PURE__ */ k("img", {
1572
1623
  src: e.image,
1573
1624
  alt: "",
1574
1625
  className: "tg:h-8 tg:w-8 tg:rounded tg:object-cover"
1575
1626
  }),
1576
- /* @__PURE__ */ k("div", {
1577
- className: K("tg:flex tg:flex-col", m && "tg:min-w-0 tg:flex-1 tg:overflow-hidden"),
1578
- children: [/* @__PURE__ */ O(Q, {
1579
- htmlFor: r,
1580
- className: K("tg:cursor-pointer tg:font-normal tg:text-sm", m && "tg:block tg:max-w-full tg:truncate"),
1627
+ /* @__PURE__ */ A("div", {
1628
+ className: K("tg:flex tg:flex-col", p && "tg:min-w-0 tg:flex-1 tg:overflow-hidden"),
1629
+ children: [/* @__PURE__ */ k(Q, {
1630
+ htmlFor: n,
1631
+ className: K("tg:cursor-pointer tg:font-normal tg:text-sm", p && "tg:block tg:max-w-full tg:truncate"),
1581
1632
  children: i
1582
- }), a && /* @__PURE__ */ O("span", {
1583
- className: K("tg:text-muted-foreground tg:text-xs", m && "tg:block tg:max-w-full tg:truncate"),
1633
+ }), a && /* @__PURE__ */ k("span", {
1634
+ className: K("tg:text-muted-foreground tg:text-xs", p && "tg:block tg:max-w-full tg:truncate"),
1584
1635
  children: a
1585
1636
  })]
1586
1637
  }),
1587
- p?.({
1638
+ f?.({
1588
1639
  index: t,
1589
1640
  option: e,
1590
1641
  variant: "default"
1591
1642
  })
1592
1643
  ]
1593
1644
  }, e.value + t);
1594
- }), T > 0 && /* @__PURE__ */ O("div", {
1645
+ }), T > 0 && /* @__PURE__ */ k("div", {
1595
1646
  className: "tg:px-2 tg:py-1 tg:text-muted-foreground tg:text-xs",
1596
1647
  children: "…"
1597
1648
  })]
1598
1649
  }),
1599
- u && /* @__PURE__ */ O(X, { children: u }),
1600
- v && !u && /* @__PURE__ */ O(X, { children: v }),
1601
- f && !u && !v && /* @__PURE__ */ O(Y, { children: f })
1650
+ l && /* @__PURE__ */ k(X, { children: l }),
1651
+ _ && !l && /* @__PURE__ */ k(X, { children: _ }),
1652
+ d && !l && !_ && /* @__PURE__ */ k(Y, { children: d })
1602
1653
  ]
1603
1654
  });
1604
- }, zt = ({ field: e, extra: t }) => {
1605
- let { id: n, name: r, value: i, placeholder: a } = e, { InputLabel: o, node: c, setValue: l, error: u, label: d, helperText: f, missingDependencies: p } = t, { options: m, isLoading: h, error: g } = ht(c), _ = s(), v = i ? String(i) : "";
1606
- return /* @__PURE__ */ k(J, {
1655
+ }, Wt = ({ field: e, extra: t }) => {
1656
+ let { id: r, name: i, value: a, placeholder: o } = e, { InputLabel: s, node: c, setValue: l, error: u, label: d, helperText: f, missingDependencies: p } = t, { options: m, isLoading: h, error: g } = bt(c), _ = n(), v = a ? String(a) : "";
1657
+ return /* @__PURE__ */ A(J, {
1607
1658
  className: "tg:mb-4",
1608
1659
  children: [
1609
- /* @__PURE__ */ O(o, {
1610
- htmlFor: n,
1660
+ /* @__PURE__ */ k(s, {
1661
+ htmlFor: r,
1611
1662
  label: d,
1612
1663
  required: c.data.required
1613
1664
  }),
1614
- /* @__PURE__ */ O(ot, {
1665
+ /* @__PURE__ */ k(dt, {
1615
1666
  missing: p,
1616
- children: /* @__PURE__ */ k("div", {
1667
+ children: /* @__PURE__ */ A("div", {
1617
1668
  className: "tg:relative",
1618
1669
  children: [
1619
- /* @__PURE__ */ k(Te, {
1620
- name: r,
1670
+ /* @__PURE__ */ A(Ee, {
1671
+ name: i,
1621
1672
  value: v,
1622
1673
  onValueChange: (e) => l(e),
1623
1674
  disabled: h || p.length > 0,
1624
- children: [/* @__PURE__ */ O(Oe, {
1625
- id: n,
1626
- name: r,
1675
+ children: [/* @__PURE__ */ k(ke, {
1676
+ id: r,
1677
+ name: i,
1627
1678
  "aria-label": d || c.data.name,
1628
1679
  className: K("tg:w-full", (v || h) && "tg:pr-14"),
1629
- children: /* @__PURE__ */ O(De, { placeholder: a || _("renderer.defaultSelectInput.selectOption") })
1630
- }), /* @__PURE__ */ O(ke, { children: /* @__PURE__ */ O(Ee, { children: m.map((e, t) => /* @__PURE__ */ O(je, {
1680
+ children: /* @__PURE__ */ k(Oe, { placeholder: o || _("renderer.defaultSelectInput.selectOption") })
1681
+ }), /* @__PURE__ */ k(Ae, { children: /* @__PURE__ */ k(De, { children: m.map((e, t) => /* @__PURE__ */ k(Me, {
1631
1682
  value: String(e.value),
1632
1683
  disabled: e.disabled,
1633
- children: /* @__PURE__ */ O(pt, {
1684
+ children: /* @__PURE__ */ k(vt, {
1634
1685
  label: _(e.label) || e.value,
1635
1686
  description: _(e.description),
1636
1687
  image: e.image
1637
1688
  })
1638
1689
  }, `${e.value}-${t}`)) }) })]
1639
1690
  }),
1640
- h && /* @__PURE__ */ O(I, { className: "tg:-translate-y-1/2 tg:pointer-events-none tg:absolute tg:top-1/2 tg:right-8 tg:size-4 tg:animate-spin tg:text-muted-foreground" }),
1641
- v && !h && p.length === 0 && /* @__PURE__ */ O("button", {
1691
+ h && /* @__PURE__ */ k(F, { className: "tg:-translate-y-1/2 tg:pointer-events-none tg:absolute tg:top-1/2 tg:right-8 tg:size-4 tg:animate-spin tg:text-muted-foreground" }),
1692
+ v && !h && p.length === 0 && /* @__PURE__ */ k("button", {
1642
1693
  type: "button",
1643
1694
  "aria-label": _("common.clear"),
1644
1695
  onClick: () => l(""),
1645
1696
  className: "tg:-translate-y-1/2 tg:absolute tg:top-1/2 tg:right-8 tg:rounded-sm tg:p-0.5 tg:text-muted-foreground tg:opacity-70 tg:transition-opacity tg:hover:opacity-100",
1646
- children: /* @__PURE__ */ O(se, { className: "tg:size-4" })
1697
+ children: /* @__PURE__ */ k(le, { className: "tg:size-4" })
1647
1698
  })
1648
1699
  ]
1649
1700
  })
1650
1701
  }),
1651
- u && /* @__PURE__ */ O(X, { children: u }),
1652
- g && !u && /* @__PURE__ */ O(X, { children: g }),
1653
- f && !u && !g && /* @__PURE__ */ O(Y, { children: f })
1702
+ u && /* @__PURE__ */ k(X, { children: u }),
1703
+ g && !u && /* @__PURE__ */ k(X, { children: g }),
1704
+ f && !u && !g && /* @__PURE__ */ k(Y, { children: f })
1654
1705
  ]
1655
1706
  });
1656
- }, Bt = (e) => null;
1707
+ }, Gt = (e) => null;
1657
1708
  //#endregion
1658
1709
  //#region src/shared/components/ui/switch.tsx
1659
- function Vt({ className: e, ...t }) {
1660
- return /* @__PURE__ */ O(_e.Root, {
1710
+ function Kt({ className: e, ...t }) {
1711
+ return /* @__PURE__ */ k(G.Root, {
1661
1712
  "data-slot": "switch",
1662
1713
  className: K("tg:peer tg:inline-flex tg:h-[1.15rem] tg:w-8 tg:shrink-0 tg:items-center tg:rounded-full tg:border tg:border-transparent tg:shadow-xs tg:outline-none tg:transition-all tg:focus-visible:border-ring tg:focus-visible:ring-[3px] tg:focus-visible:ring-ring/50 tg:disabled:cursor-not-allowed tg:disabled:opacity-50 tg:data-[state=checked]:bg-primary tg:data-[state=unchecked]:bg-input tg:dark:data-[state=unchecked]:bg-input/80", e),
1663
1714
  ...t,
1664
- children: /* @__PURE__ */ O(_e.Thumb, {
1715
+ children: /* @__PURE__ */ k(G.Thumb, {
1665
1716
  "data-slot": "switch-thumb",
1666
1717
  className: K("tg:pointer-events-none tg:block tg:size-4 tg:rounded-full tg:bg-background tg:ring-0 tg:transition-transform tg:data-[state=checked]:translate-x-[calc(100%-2px)] tg:data-[state=unchecked]:translate-x-0 tg:dark:data-[state=checked]:bg-primary-foreground tg:dark:data-[state=unchecked]:bg-foreground")
1667
1718
  })
@@ -1669,32 +1720,32 @@ function Vt({ className: e, ...t }) {
1669
1720
  }
1670
1721
  //#endregion
1671
1722
  //#region src/renderer/features/TreegeRenderer/web/components/inputs/DefaultSwitchInput.tsx
1672
- var Ht = ({ field: e, extra: t }) => {
1723
+ var qt = ({ field: e, extra: t }) => {
1673
1724
  let { id: n, name: r, value: i } = e, { InputLabel: a, node: o, setValue: s, error: c, label: l, helperText: u } = t;
1674
- return /* @__PURE__ */ k(J, {
1725
+ return /* @__PURE__ */ A(J, {
1675
1726
  className: "tg:mb-4",
1676
1727
  children: [
1677
- /* @__PURE__ */ O(a, {
1728
+ /* @__PURE__ */ k(a, {
1678
1729
  htmlFor: n,
1679
1730
  label: l,
1680
1731
  required: o.data.required
1681
1732
  }),
1682
- /* @__PURE__ */ O(Vt, {
1733
+ /* @__PURE__ */ k(Kt, {
1683
1734
  id: n,
1684
1735
  name: r,
1685
1736
  "aria-label": l || o.data.name,
1686
1737
  checked: i,
1687
1738
  onCheckedChange: s
1688
1739
  }),
1689
- u && !c && /* @__PURE__ */ O(Y, { children: u }),
1690
- c && /* @__PURE__ */ O(X, { children: c })
1740
+ u && !c && /* @__PURE__ */ k(Y, { children: u }),
1741
+ c && /* @__PURE__ */ k(X, { children: c })
1691
1742
  ]
1692
1743
  });
1693
1744
  };
1694
1745
  //#endregion
1695
1746
  //#region src/shared/components/ui/textarea.tsx
1696
- function Ut({ className: e, ...t }) {
1697
- return /* @__PURE__ */ O("textarea", {
1747
+ function Jt({ className: e, ...t }) {
1748
+ return /* @__PURE__ */ k("textarea", {
1698
1749
  "data-slot": "textarea",
1699
1750
  className: K("tg:field-sizing-content tg:flex tg:min-h-16 tg:w-full tg:rounded-md tg:border tg:border-input tg:bg-transparent tg:px-3 tg:py-2 tg:text-base tg:shadow-xs tg:outline-none tg:transition-[color,box-shadow] tg:placeholder:text-muted-foreground tg:focus-visible:border-ring tg:focus-visible:ring-[3px] tg:focus-visible:ring-ring/50 tg:disabled:cursor-not-allowed tg:disabled:opacity-50 tg:aria-invalid:border-destructive tg:aria-invalid:ring-destructive/20 tg:md:text-sm tg:dark:bg-input/30 tg:dark:aria-invalid:ring-destructive/40", e),
1700
1751
  ...t
@@ -1702,17 +1753,17 @@ function Ut({ className: e, ...t }) {
1702
1753
  }
1703
1754
  //#endregion
1704
1755
  //#region src/renderer/features/TreegeRenderer/web/components/inputs/DefaultTextAreaInput.tsx
1705
- var Wt = ({ field: e, extra: t }) => {
1756
+ var Yt = ({ field: e, extra: t }) => {
1706
1757
  let { id: n, name: r, value: i, placeholder: a } = e, { InputLabel: o, node: s, setValue: c, error: l, label: u, helperText: d } = t;
1707
- return /* @__PURE__ */ k(J, {
1758
+ return /* @__PURE__ */ A(J, {
1708
1759
  className: "tg:mb-4",
1709
1760
  children: [
1710
- /* @__PURE__ */ O(o, {
1761
+ /* @__PURE__ */ k(o, {
1711
1762
  htmlFor: n,
1712
1763
  label: u,
1713
1764
  required: s.data.required
1714
1765
  }),
1715
- /* @__PURE__ */ O(Ut, {
1766
+ /* @__PURE__ */ k(Jt, {
1716
1767
  id: n,
1717
1768
  name: r,
1718
1769
  "aria-label": u || s.data.name,
@@ -1722,21 +1773,21 @@ var Wt = ({ field: e, extra: t }) => {
1722
1773
  className: "tg:w-full tg:rounded-md tg:border tg:px-3 tg:py-2",
1723
1774
  rows: 4
1724
1775
  }),
1725
- l && /* @__PURE__ */ O(X, { children: l }),
1726
- d && !l && /* @__PURE__ */ O(Y, { children: d })
1776
+ l && /* @__PURE__ */ k(X, { children: l }),
1777
+ d && !l && /* @__PURE__ */ k(Y, { children: d })
1727
1778
  ]
1728
1779
  });
1729
- }, Gt = ({ field: e, extra: t }) => {
1780
+ }, Xt = ({ field: e, extra: t }) => {
1730
1781
  let { id: n, name: r, value: i, placeholder: a } = e, { InputLabel: o, node: s, setValue: c, error: l, label: u, helperText: d } = t;
1731
- return /* @__PURE__ */ k(J, {
1782
+ return /* @__PURE__ */ A(J, {
1732
1783
  className: "tg:mb-4",
1733
1784
  children: [
1734
- /* @__PURE__ */ O(o, {
1785
+ /* @__PURE__ */ k(o, {
1735
1786
  htmlFor: n,
1736
1787
  label: u,
1737
1788
  required: s.data.required
1738
1789
  }),
1739
- /* @__PURE__ */ O(Z, {
1790
+ /* @__PURE__ */ k(Z, {
1740
1791
  type: "text",
1741
1792
  id: n,
1742
1793
  name: r,
@@ -1745,21 +1796,21 @@ var Wt = ({ field: e, extra: t }) => {
1745
1796
  onChange: (e) => c(e.target.value),
1746
1797
  placeholder: a
1747
1798
  }),
1748
- l && /* @__PURE__ */ O(X, { children: l }),
1749
- d && !l && /* @__PURE__ */ O(Y, { children: d })
1799
+ l && /* @__PURE__ */ k(X, { children: l }),
1800
+ d && !l && /* @__PURE__ */ k(Y, { children: d })
1750
1801
  ]
1751
1802
  });
1752
- }, Kt = ({ field: e, extra: t }) => {
1803
+ }, Zt = ({ field: e, extra: t }) => {
1753
1804
  let { id: n, name: r, value: i, placeholder: a } = e, { InputLabel: o, node: s, setValue: c, error: l, label: u, helperText: d } = t;
1754
- return /* @__PURE__ */ k(J, {
1805
+ return /* @__PURE__ */ A(J, {
1755
1806
  className: "tg:mb-4",
1756
1807
  children: [
1757
- /* @__PURE__ */ O(o, {
1808
+ /* @__PURE__ */ k(o, {
1758
1809
  htmlFor: n,
1759
1810
  label: u,
1760
1811
  required: s.data.required
1761
1812
  }),
1762
- /* @__PURE__ */ O(Z, {
1813
+ /* @__PURE__ */ k(Z, {
1763
1814
  type: "time",
1764
1815
  id: n,
1765
1816
  name: r,
@@ -1769,43 +1820,43 @@ var Wt = ({ field: e, extra: t }) => {
1769
1820
  placeholder: a,
1770
1821
  className: "tg:bg-background tg:[color-scheme:light] tg:dark:[color-scheme:dark]"
1771
1822
  }),
1772
- l && /* @__PURE__ */ O(X, { children: l }),
1773
- d && !l && /* @__PURE__ */ O(Y, { children: d })
1823
+ l && /* @__PURE__ */ k(X, { children: l }),
1824
+ d && !l && /* @__PURE__ */ k(Y, { children: d })
1774
1825
  ]
1775
1826
  });
1776
- }, qt = ({ field: e, extra: t }) => {
1777
- let { id: n, name: r, value: i } = e, { InputLabel: a, node: o, setValue: c, error: l, label: u, helperText: d } = t, f = s(), p = Array.isArray(i) ? i : [], m = p[0] || "", h = p[1] || "", g = (e) => {
1827
+ }, Qt = ({ field: e, extra: t }) => {
1828
+ let { id: r, name: i, value: a } = e, { InputLabel: o, node: s, setValue: c, error: l, label: u, helperText: d } = t, f = n(), p = Array.isArray(a) ? a : [], m = p[0] || "", h = p[1] || "", g = (e) => {
1778
1829
  c([e, h]);
1779
1830
  }, _ = (e) => {
1780
1831
  c([m, e]);
1781
1832
  };
1782
- return /* @__PURE__ */ k(J, {
1833
+ return /* @__PURE__ */ A(J, {
1783
1834
  className: "tg:mb-4",
1784
1835
  children: [
1785
- /* @__PURE__ */ O(a, {
1786
- htmlFor: `${n}-start`,
1836
+ /* @__PURE__ */ k(o, {
1837
+ htmlFor: `${r}-start`,
1787
1838
  label: u,
1788
- required: o.data.required
1839
+ required: s.data.required
1789
1840
  }),
1790
- /* @__PURE__ */ k("div", {
1841
+ /* @__PURE__ */ A("div", {
1791
1842
  className: "tg:flex tg:gap-2",
1792
- children: [/* @__PURE__ */ O(Z, {
1793
- id: `${n}-start`,
1794
- name: `${r}-start`,
1795
- "aria-label": `${u || o.data.name} - ${f("renderer.defaultInputs.startTime")}`,
1843
+ children: [/* @__PURE__ */ k(Z, {
1844
+ id: `${r}-start`,
1845
+ name: `${i}-start`,
1846
+ "aria-label": `${u || s.data.name} - ${f("renderer.defaultInputs.startTime")}`,
1796
1847
  "aria-invalid": !!l,
1797
- "aria-describedby": l ? `${o.id}-error` : void 0,
1848
+ "aria-describedby": l ? `${s.id}-error` : void 0,
1798
1849
  type: "time",
1799
1850
  value: m,
1800
1851
  onChange: (e) => g(e.target.value),
1801
1852
  placeholder: f("renderer.defaultInputs.startTime"),
1802
1853
  className: "tg:flex-1 tg:bg-background tg:[color-scheme:light] tg:dark:[color-scheme:dark]"
1803
- }), /* @__PURE__ */ O(Z, {
1804
- id: `${n}-end`,
1805
- name: `${r}-end`,
1806
- "aria-label": `${u || o.data.name} - ${f("renderer.defaultInputs.endTime")}`,
1854
+ }), /* @__PURE__ */ k(Z, {
1855
+ id: `${r}-end`,
1856
+ name: `${i}-end`,
1857
+ "aria-label": `${u || s.data.name} - ${f("renderer.defaultInputs.endTime")}`,
1807
1858
  "aria-invalid": !!l,
1808
- "aria-describedby": l ? `${o.id}-error` : void 0,
1859
+ "aria-describedby": l ? `${s.id}-error` : void 0,
1809
1860
  type: "time",
1810
1861
  value: h,
1811
1862
  onChange: (e) => _(e.target.value),
@@ -1813,46 +1864,46 @@ var Wt = ({ field: e, extra: t }) => {
1813
1864
  className: "tg:flex-1 tg:bg-background tg:[color-scheme:light] tg:dark:[color-scheme:dark]"
1814
1865
  })]
1815
1866
  }),
1816
- l && /* @__PURE__ */ O(X, { children: l }),
1817
- d && !l && /* @__PURE__ */ O(Y, { children: d })
1867
+ l && /* @__PURE__ */ k(X, { children: l }),
1868
+ d && !l && /* @__PURE__ */ k(Y, { children: d })
1818
1869
  ]
1819
1870
  });
1820
- }, Jt = {
1821
- address: it,
1822
- autocomplete: gt,
1823
- checkbox: _t,
1824
- date: bt,
1825
- daterange: xt,
1826
- file: St,
1827
- hidden: Ct,
1828
- http: Dt,
1829
- number: Ot,
1830
- password: kt,
1831
- radio: Rt,
1832
- select: zt,
1833
- submit: Bt,
1834
- switch: Ht,
1835
- text: Gt,
1836
- textarea: Wt,
1837
- time: Kt,
1838
- timerange: qt
1839
- }, Yt = S(({ label: e, id: t, disabled: n, isSubmitting: r, onBlur: i, onClick: a, onFocus: o, onPointerDown: c, onPointerLeave: l, onPointerMove: u, ...d }, f) => {
1840
- let p = s();
1841
- return /* @__PURE__ */ k("button", {
1871
+ }, $t = {
1872
+ address: lt,
1873
+ autocomplete: xt,
1874
+ checkbox: St,
1875
+ date: Tt,
1876
+ daterange: Et,
1877
+ file: Dt,
1878
+ hidden: Ot,
1879
+ http: Mt,
1880
+ number: Nt,
1881
+ password: Pt,
1882
+ radio: Ut,
1883
+ select: Wt,
1884
+ submit: Gt,
1885
+ switch: qt,
1886
+ text: Xt,
1887
+ textarea: Yt,
1888
+ time: Zt,
1889
+ timerange: Qt
1890
+ }, en = C(({ label: e, id: t, disabled: r, isSubmitting: i, onBlur: a, onClick: o, onFocus: s, onPointerDown: c, onPointerLeave: l, onPointerMove: u, ...d }, f) => {
1891
+ let p = n();
1892
+ return /* @__PURE__ */ A("button", {
1842
1893
  ref: f,
1843
1894
  id: t,
1844
- onBlur: i,
1845
- onClick: a,
1846
- onFocus: o,
1895
+ onBlur: a,
1896
+ onClick: o,
1897
+ onFocus: s,
1847
1898
  onPointerDown: c,
1848
- disabled: n || r,
1899
+ disabled: r || i,
1849
1900
  onPointerLeave: l,
1850
1901
  onPointerMove: u,
1851
1902
  type: "submit",
1852
1903
  className: "tg:inline-flex tg:items-center tg:justify-center tg:gap-2 tg:rounded-md tg:bg-gray-900 tg:px-4 tg:py-2 tg:font-medium tg:text-sm tg:text-white tg:transition-colors tg:hover:bg-gray-800 tg:focus:outline-none tg:focus:ring-2 tg:focus:ring-gray-900 tg:focus:ring-offset-2 tg:disabled:cursor-not-allowed tg:disabled:opacity-50 tg:dark:bg-white tg:dark:text-gray-900 tg:dark:focus:ring-white tg:dark:hover:bg-gray-100",
1853
1904
  ...d,
1854
- children: [r && /* @__PURE__ */ O(I, { className: "tg:h-4 tg:w-4 tg:animate-spin" }), e || p("renderer.defaultSubmitButton.submit")]
1905
+ children: [i && /* @__PURE__ */ k(F, { className: "tg:h-4 tg:w-4 tg:animate-spin" }), e || p("renderer.defaultSubmitButton.submit")]
1855
1906
  });
1856
1907
  });
1857
1908
  //#endregion
1858
- export { Ce as $, Ve as A, Re as B, it as C, Ze as D, et as E, Je as F, Ee as G, Le as H, He as I, Me as J, je as K, Be as L, Ye as M, qe as N, tt as O, Ke as P, we as Q, ze as R, gt as S, $e as T, Te as U, Fe as V, ke as W, De as X, Oe as Y, Se as Z, Ct as _, Gt as a, J as at, bt as b, Ht as c, K as ct, Rt as d, $ as et, It as f, Dt as g, Ot as h, Kt as i, Y as it, Ge as j, Qe as k, Vt as l, kt as m, Jt as n, Q as nt, Wt as o, ye as ot, Lt as p, Ae as q, qt as r, Z as rt, Ut as s, q as st, Yt as t, xe as tt, zt as u, St as v, Xe as w, _t as x, xt as y, Ie as z };
1909
+ export { Oe as $, Ke as A, ze as B, lt as C, nt as D, at as E, $e as F, Le as G, Re as H, qe as I, De as J, Ee as K, Ge as L, et as M, Qe as N, ot as O, Ze as P, ke as Q, We as R, xt as S, it as T, Be as U, Ve as V, Ie as W, je as X, Me as Y, Ne as Z, Ot as _, Xt as a, Q as at, Tt as b, qt as c, J as ct, Ut as d, K as dt, Ce as et, Vt as f, Mt as g, Nt as h, Zt as i, $ as it, Xe as j, rt as k, Kt as l, be as lt, Pt as m, $t as n, we as nt, Yt as o, Z as ot, Ht as p, Ae as q, Qt as r, Se as rt, Jt as s, Y as st, en as t, Te as tt, Wt as u, q as ut, Dt as v, tt as w, St as x, Et as y, Ue as z };