treege 3.0.0-beta.8 → 3.0.0-beta40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/LICENSE +18 -12
  2. package/README.md +213 -30
  3. package/dist/DefaultInputs-8yJMEyMh.js +1557 -0
  4. package/dist/ThemeContext-Ejgu9Mwr.js +1603 -0
  5. package/dist/editor/components/input/ComboboxWithCreate.d.ts +2 -1
  6. package/dist/editor/constants/defaultNode.d.ts +1 -1
  7. package/dist/editor/constants/edgeTypes.d.ts +3 -2
  8. package/dist/editor/constants/inputTypeIcons.d.ts +3 -0
  9. package/dist/editor/constants/nodeSpacing.d.ts +33 -0
  10. package/dist/editor/constants/nodeTypes.d.ts +5 -5
  11. package/dist/editor/context/TreegeEditorContext.d.ts +53 -1
  12. package/dist/editor/features/TreegeEditor/TreegeEditor.d.ts +1 -1
  13. package/dist/editor/features/TreegeEditor/dialogs/ChangeNodeTypeDialog.d.ts +2 -0
  14. package/dist/editor/features/TreegeEditor/dialogs/DeleteNodeDialog.d.ts +2 -0
  15. package/dist/editor/features/TreegeEditor/edges/ConditionalEdge.d.ts +2 -2
  16. package/dist/editor/features/TreegeEditor/edges/DefaultEdge.d.ts +3 -0
  17. package/dist/editor/features/TreegeEditor/forms/SubmitConfigForm.d.ts +7 -0
  18. package/dist/editor/features/TreegeEditor/inputs/ComboboxPattern.d.ts +2 -1
  19. package/dist/editor/features/TreegeEditor/inputs/OptionImageField.d.ts +6 -0
  20. package/dist/editor/features/TreegeEditor/nodes/GroupNode.d.ts +2 -2
  21. package/dist/editor/features/TreegeEditor/nodes/TreegeNode.d.ts +6 -0
  22. package/dist/editor/features/TreegeEditor/nodes/components/BottomHandleDropdown.d.ts +6 -0
  23. package/dist/editor/features/TreegeEditor/nodes/components/NodeInputPreview.d.ts +7 -0
  24. package/dist/editor/features/TreegeEditor/nodes/components/NodeLabelInput.d.ts +9 -0
  25. package/dist/editor/features/TreegeEditor/nodes/components/NodeMoreMenu.d.ts +6 -0
  26. package/dist/editor/features/TreegeEditor/nodes/components/NodeTypeBadge.d.ts +7 -0
  27. package/dist/editor/features/TreegeEditor/nodes/components/OptionsEditor.d.ts +7 -0
  28. package/dist/editor/features/TreegeEditor/nodes/components/RequiredBadge.d.ts +6 -0
  29. package/dist/editor/features/TreegeEditor/nodes/layout/NodeWrapper.d.ts +2 -1
  30. package/dist/editor/features/TreegeEditor/panel/AIGeneratorDialog.d.ts +16 -0
  31. package/dist/editor/hooks/useAutoLayout.d.ts +15 -0
  32. package/dist/editor/hooks/useFlowActions.d.ts +5 -2
  33. package/dist/editor/hooks/useFlowConnections.d.ts +4 -0
  34. package/dist/editor/hooks/useNodesSelection.d.ts +5 -5
  35. package/dist/editor/types/ai.d.ts +65 -0
  36. package/dist/editor/types/editor.d.ts +9 -8
  37. package/dist/editor/utils/aiFlowGenerator.d.ts +5 -0
  38. package/dist/editor/utils/dagreLayout.d.ts +17 -0
  39. package/dist/editor/utils/edge.d.ts +14 -0
  40. package/dist/editor/utils/image.d.ts +7 -0
  41. package/dist/editor/utils/inputTypeIcon.d.ts +6 -0
  42. package/dist/editor-DWJ95r4g.js +4001 -0
  43. package/dist/editor.js +3 -7
  44. package/dist/main.js +4 -52
  45. package/dist/renderer/context/TreegeRendererContext.d.ts +4 -1
  46. package/dist/renderer/features/TreegeRenderer/native/TreegeRenderer.d.ts +19 -11
  47. package/dist/renderer/features/TreegeRenderer/native/components/DefaultFormWrapper.d.ts +7 -7
  48. package/dist/renderer/features/TreegeRenderer/native/components/DefaultGroup.d.ts +7 -7
  49. package/dist/renderer/features/TreegeRenderer/native/components/DefaultInputs.d.ts +21 -15
  50. package/dist/renderer/features/TreegeRenderer/native/components/DefaultSubmitButton.d.ts +9 -7
  51. package/dist/renderer/features/TreegeRenderer/native/components/DefaultSubmitButtonWrapper.d.ts +11 -0
  52. package/dist/renderer/features/TreegeRenderer/native/components/DefaultUI.d.ts +8 -7
  53. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultAddressInput.d.ts +3 -0
  54. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultAutocompleteInput.d.ts +3 -0
  55. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultCheckboxInput.d.ts +3 -0
  56. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultDateInput.d.ts +3 -0
  57. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultDateRangeInput.d.ts +3 -0
  58. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultFileInput.d.ts +3 -0
  59. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultHiddenInput.d.ts +3 -0
  60. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultHttpInput.d.ts +3 -0
  61. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultNumberInput.d.ts +3 -0
  62. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultPasswordInput.d.ts +3 -0
  63. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultRadioInput.d.ts +3 -0
  64. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultSelectInput.d.ts +3 -0
  65. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultSwitchInput.d.ts +3 -0
  66. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultTextInput.d.ts +3 -0
  67. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultTextareaInput.d.ts +3 -0
  68. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultTimeInput.d.ts +3 -0
  69. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultTimeRangeInput.d.ts +3 -0
  70. package/dist/renderer/features/TreegeRenderer/useTreegeRenderer.d.ts +84 -24
  71. package/dist/renderer/features/TreegeRenderer/web/TreegeRenderer.d.ts +1 -1
  72. package/dist/renderer/features/TreegeRenderer/web/components/DefaultSubmitButton.d.ts +1 -1
  73. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultAddressInput.d.ts +1 -1
  74. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultAutocompleteInput.d.ts +1 -1
  75. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultCheckboxInput.d.ts +1 -1
  76. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultDateInput.d.ts +1 -1
  77. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultDateRangeInput.d.ts +1 -1
  78. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultFileInput.d.ts +1 -1
  79. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultHiddenInput.d.ts +1 -1
  80. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultHttpInput.d.ts +1 -1
  81. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultNumberInput.d.ts +1 -1
  82. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultPasswordInput.d.ts +1 -1
  83. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultRadioInput.d.ts +1 -1
  84. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultSelectInput.d.ts +1 -1
  85. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultSubmitInput.d.ts +3 -0
  86. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultSwitchInput.d.ts +1 -1
  87. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultTextAreaInput.d.ts +1 -1
  88. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultTextInput.d.ts +1 -1
  89. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultTimeInput.d.ts +1 -1
  90. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultTimeRangeInput.d.ts +1 -1
  91. package/dist/renderer/hooks/useRenderNode.d.ts +55 -0
  92. package/dist/renderer/hooks/useSubmitHandler.d.ts +34 -0
  93. package/dist/renderer/hooks/useTranslate.d.ts +6 -4
  94. package/dist/renderer/index.d.ts +2 -0
  95. package/dist/renderer/index.native.d.ts +19 -0
  96. package/dist/renderer/types/renderer.d.ts +60 -6
  97. package/dist/renderer/utils/form.d.ts +22 -2
  98. package/dist/renderer/utils/http.d.ts +101 -0
  99. package/dist/renderer/utils/node.d.ts +18 -1
  100. package/dist/renderer/utils/sanitize.d.ts +85 -0
  101. package/dist/renderer/utils/sanitize.native.d.ts +69 -0
  102. package/dist/renderer/utils/submit.d.ts +47 -0
  103. package/dist/renderer-native.d.ts +2 -0
  104. package/dist/renderer-native.js +3496 -0
  105. package/dist/renderer.js +3 -45
  106. package/dist/shared/components/ui/badge.d.ts +2 -2
  107. package/dist/shared/components/ui/button.d.ts +2 -2
  108. package/dist/shared/components/ui/collapsible.d.ts +1 -1
  109. package/dist/shared/components/ui/command.d.ts +1 -1
  110. package/dist/shared/components/ui/dropdown-menu.d.ts +1 -1
  111. package/dist/shared/components/ui/form.d.ts +1 -1
  112. package/dist/shared/components/ui/popover.d.ts +4 -2
  113. package/dist/shared/components/ui/select.d.ts +3 -1
  114. package/dist/shared/components/ui/sheet.d.ts +1 -1
  115. package/dist/shared/components/ui/tooltip.d.ts +1 -1
  116. package/dist/shared/constants/colors.d.ts +45 -0
  117. package/dist/shared/constants/inputType.d.ts +1 -0
  118. package/dist/shared/context/ThemeContext.d.ts +2 -0
  119. package/dist/shared/context/ThemeContext.native.d.ts +22 -0
  120. package/dist/shared/hooks/useThemeColors.d.ts +37 -0
  121. package/dist/shared/locales/ar.json.d.ts +117 -10
  122. package/dist/shared/locales/de.json.d.ts +118 -11
  123. package/dist/shared/locales/en.json.d.ts +119 -12
  124. package/dist/shared/locales/es.json.d.ts +118 -11
  125. package/dist/shared/locales/fr.json.d.ts +118 -11
  126. package/dist/shared/locales/it.json.d.ts +118 -11
  127. package/dist/shared/locales/pt.json.d.ts +118 -11
  128. package/dist/shared/types/edge.d.ts +6 -0
  129. package/dist/shared/types/node.d.ts +64 -0
  130. package/package.json +38 -12
  131. package/dist/ThemeContext-BIvs8Kw-.js +0 -758
  132. package/dist/TreegeEditor-Lv5Tn9_F.js +0 -2152
  133. package/dist/TreegeRenderer-D3EvsEfJ.js +0 -1413
  134. package/dist/editor/features/TreegeEditor/inputs/SelectInputType.d.ts +0 -7
  135. package/dist/editor/features/TreegeEditor/nodes/FlowNode.d.ts +0 -6
  136. package/dist/editor/features/TreegeEditor/nodes/InputNode.d.ts +0 -6
  137. package/dist/editor/features/TreegeEditor/nodes/UINode.d.ts +0 -6
@@ -0,0 +1,3496 @@
1
+ import { C as e, D as t, N as n, O as r, S as i, _ as a, a as o, b as s, c, g as l, h as u, i as d, l as f, m as p, n as m, o as h, p as g, r as _, s as v, t as y, u as b, v as x, w as S, x as C, y as w } from "./ThemeContext-Ejgu9Mwr.js";
2
+ import { jsx as T, jsxs as E } from "react/jsx-runtime";
3
+ import { useCallback as ee, useEffect as D, useMemo as O, useRef as k, useState as A } from "react";
4
+ import { ActivityIndicator as j, Alert as M, FlatList as N, Image as P, Modal as F, ScrollView as I, StyleSheet as L, Switch as te, Text as R, TextInput as z, TouchableOpacity as B, View as V } from "react-native";
5
+ //#region src/renderer/features/TreegeRenderer/native/components/DefaultFormWrapper.tsx
6
+ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
7
+ style: re.container,
8
+ children: e
9
+ }), re = L.create({ container: { padding: 16 } }), ie = ({ children: e, node: t }) => {
10
+ let n = b(), { colors: r } = m(), i = n(t.data.label);
11
+ return /* @__PURE__ */ E(V, {
12
+ style: ae.container,
13
+ children: [i && /* @__PURE__ */ T(R, {
14
+ style: [ae.label, { color: r.text }],
15
+ children: i
16
+ }), /* @__PURE__ */ T(V, {
17
+ style: ae.content,
18
+ children: e
19
+ })]
20
+ });
21
+ }, ae = L.create({
22
+ container: { marginBottom: 16 },
23
+ content: { gap: 8 },
24
+ label: {
25
+ fontSize: 16,
26
+ fontWeight: "600",
27
+ marginBottom: 12
28
+ }
29
+ }), oe = async (e, t) => {
30
+ if (!e || e.trim().length < 3) return [];
31
+ try {
32
+ let n = await fetch(`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(e)}&format=jsonv2&addressdetails=1&limit=5`, { headers: {
33
+ Accept: "application/json",
34
+ "User-Agent": "Treege Renderer",
35
+ ...t && { "Accept-Language": t }
36
+ } });
37
+ return n.ok ? (await n.json()).map((e) => ({
38
+ label: e.display_name,
39
+ value: e.display_name
40
+ })) : [];
41
+ } catch (e) {
42
+ return console.error("Nominatim fetch error:", e), [];
43
+ }
44
+ }, se = async (e, t) => {
45
+ if (!e || e.trim().length < 3) return [];
46
+ try {
47
+ let n = await fetch(`https://maps.googleapis.com/maps/api/place/autocomplete/json?input=${encodeURIComponent(e)}&key=${t}`);
48
+ if (!n.ok) return console.warn("Google Places API request failed:", n.status), [];
49
+ let r = await n.json();
50
+ return r.status !== "OK" && r.status !== "ZERO_RESULTS" ? (console.warn("Google Places API status:", r.status), []) : (r.predictions || []).map((e) => ({
51
+ label: e.description,
52
+ value: e.description
53
+ }));
54
+ } catch (e) {
55
+ return console.error("Google Places fetch error:", e), [];
56
+ }
57
+ }, H = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o, id: s, name: c }) => {
58
+ let [l, u] = A(""), [d, f] = A([]), [h, g] = A(!1), [_, v] = A(!1), { language: y, googleApiKey: x } = p(), S = b(), { colors: C } = m(), w = ee((e) => {
59
+ n(e.value), u(""), g(!1), f([]);
60
+ }, [n]), O = () => {
61
+ g(!1);
62
+ };
63
+ return D(() => {
64
+ if (!l || l.trim().length < 3) {
65
+ f([]), v(!1);
66
+ return;
67
+ }
68
+ v(!0);
69
+ let e = setTimeout(async () => {
70
+ f(x ? await se(l, x) : await oe(l, y)), v(!1);
71
+ }, 300);
72
+ return () => {
73
+ clearTimeout(e), v(!1);
74
+ };
75
+ }, [
76
+ l,
77
+ y,
78
+ x
79
+ ]), /* @__PURE__ */ E(V, {
80
+ style: U.container,
81
+ children: [
82
+ /* @__PURE__ */ E(R, {
83
+ style: [U.label, { color: C.textSecondary }],
84
+ children: [i || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
85
+ style: { color: C.error },
86
+ children: "*"
87
+ })]
88
+ }),
89
+ /* @__PURE__ */ E(B, {
90
+ style: [
91
+ U.trigger,
92
+ {
93
+ backgroundColor: C.input,
94
+ borderColor: C.border
95
+ },
96
+ r && { borderColor: C.error }
97
+ ],
98
+ onPress: () => g(!0),
99
+ activeOpacity: .7,
100
+ children: [/* @__PURE__ */ T(R, {
101
+ style: [
102
+ U.triggerText,
103
+ { color: C.text },
104
+ !t && { color: C.textMuted }
105
+ ],
106
+ numberOfLines: 1,
107
+ children: t || a || S("renderer.defaultAddressInput.enterAddress")
108
+ }), /* @__PURE__ */ T(R, {
109
+ style: U.icon,
110
+ children: "📍"
111
+ })]
112
+ }),
113
+ /* @__PURE__ */ T(F, {
114
+ visible: h,
115
+ transparent: !0,
116
+ animationType: "fade",
117
+ onRequestClose: O,
118
+ children: /* @__PURE__ */ T(B, {
119
+ style: U.modalOverlay,
120
+ activeOpacity: 1,
121
+ onPress: O,
122
+ children: /* @__PURE__ */ E(B, {
123
+ style: [U.modalContent, { backgroundColor: C.card }],
124
+ activeOpacity: 1,
125
+ onPress: () => {},
126
+ children: [
127
+ /* @__PURE__ */ E(V, {
128
+ style: [U.modalHeader, { borderBottomColor: C.separator }],
129
+ children: [/* @__PURE__ */ T(R, {
130
+ style: [U.modalTitle, { color: C.text }],
131
+ children: i || e.data.name
132
+ }), /* @__PURE__ */ T(B, {
133
+ onPress: O,
134
+ children: /* @__PURE__ */ T(R, {
135
+ style: [U.closeButton, { color: C.textMuted }],
136
+ children: "✕"
137
+ })
138
+ })]
139
+ }),
140
+ /* @__PURE__ */ E(V, {
141
+ style: U.searchContainer,
142
+ children: [/* @__PURE__ */ T(z, {
143
+ style: [U.searchInput, {
144
+ backgroundColor: C.muted,
145
+ borderColor: C.border,
146
+ color: C.text
147
+ }],
148
+ placeholder: a || S("renderer.defaultAddressInput.enterAddress"),
149
+ placeholderTextColor: C.textMuted,
150
+ value: l,
151
+ onChangeText: u,
152
+ autoFocus: !0,
153
+ autoCapitalize: "none",
154
+ autoCorrect: !1
155
+ }), _ && /* @__PURE__ */ T(j, {
156
+ size: "small",
157
+ color: C.primary,
158
+ style: U.searchLoader
159
+ })]
160
+ }),
161
+ _ ? /* @__PURE__ */ E(V, {
162
+ style: U.loadingContainer,
163
+ children: [/* @__PURE__ */ T(j, {
164
+ size: "small",
165
+ color: C.primary
166
+ }), /* @__PURE__ */ T(R, {
167
+ style: [U.loadingText, { color: C.textMuted }],
168
+ children: S("renderer.defaultAddressInput.searching")
169
+ })]
170
+ }) : /* @__PURE__ */ T(N, {
171
+ data: d,
172
+ keyExtractor: (e, t) => t.toString(),
173
+ style: U.suggestionsList,
174
+ contentContainerStyle: U.suggestionsListContent,
175
+ keyboardShouldPersistTaps: "handled",
176
+ ListEmptyComponent: l.length >= 3 ? /* @__PURE__ */ T(V, {
177
+ style: U.emptyContainer,
178
+ children: /* @__PURE__ */ T(R, {
179
+ style: [U.emptyText, { color: C.textMuted }],
180
+ children: S("renderer.defaultAddressInput.noAddressesFound")
181
+ })
182
+ }) : /* @__PURE__ */ T(V, {
183
+ style: U.emptyContainer,
184
+ children: /* @__PURE__ */ T(R, {
185
+ style: [U.emptyText, { color: C.textMuted }],
186
+ children: S("renderer.defaultAddressInput.typeMinChars")
187
+ })
188
+ }),
189
+ renderItem: ({ item: e }) => /* @__PURE__ */ E(B, {
190
+ style: U.suggestionItem,
191
+ onPress: () => w(e),
192
+ activeOpacity: .7,
193
+ children: [/* @__PURE__ */ T(R, {
194
+ style: U.suggestionIcon,
195
+ children: "📍"
196
+ }), /* @__PURE__ */ T(R, {
197
+ style: [U.suggestionText, { color: C.text }],
198
+ numberOfLines: 2,
199
+ children: e.label
200
+ })]
201
+ })
202
+ })
203
+ ]
204
+ })
205
+ })
206
+ }),
207
+ r && /* @__PURE__ */ T(R, {
208
+ style: [U.error, { color: C.error }],
209
+ children: r
210
+ }),
211
+ o && !r && /* @__PURE__ */ T(R, {
212
+ style: [U.helperText, { color: C.textMuted }],
213
+ children: o
214
+ })
215
+ ]
216
+ });
217
+ }, U = L.create({
218
+ closeButton: {
219
+ fontSize: 24,
220
+ fontWeight: "300"
221
+ },
222
+ container: { marginBottom: 16 },
223
+ emptyContainer: {
224
+ alignItems: "center",
225
+ paddingVertical: 24
226
+ },
227
+ emptyText: { fontSize: 14 },
228
+ error: {
229
+ fontSize: 12,
230
+ marginTop: 4
231
+ },
232
+ helperText: {
233
+ fontSize: 12,
234
+ marginTop: 4
235
+ },
236
+ icon: { fontSize: 16 },
237
+ label: {
238
+ fontSize: 14,
239
+ fontWeight: "500",
240
+ marginBottom: 8
241
+ },
242
+ loadingContainer: {
243
+ alignItems: "center",
244
+ flexDirection: "row",
245
+ justifyContent: "center",
246
+ paddingVertical: 24
247
+ },
248
+ loadingText: {
249
+ fontSize: 14,
250
+ marginLeft: 8
251
+ },
252
+ modalContent: {
253
+ borderRadius: 12,
254
+ maxHeight: "80%",
255
+ padding: 16,
256
+ width: "90%"
257
+ },
258
+ modalHeader: {
259
+ alignItems: "center",
260
+ borderBottomWidth: 1,
261
+ flexDirection: "row",
262
+ justifyContent: "space-between",
263
+ marginBottom: 12,
264
+ paddingBottom: 12
265
+ },
266
+ modalOverlay: {
267
+ alignItems: "center",
268
+ backgroundColor: "rgba(0, 0, 0, 0.5)",
269
+ flex: 1,
270
+ justifyContent: "center"
271
+ },
272
+ modalTitle: {
273
+ fontSize: 18,
274
+ fontWeight: "600"
275
+ },
276
+ searchContainer: {
277
+ marginBottom: 12,
278
+ position: "relative"
279
+ },
280
+ searchInput: {
281
+ borderRadius: 6,
282
+ borderWidth: 1,
283
+ fontSize: 14,
284
+ paddingHorizontal: 12,
285
+ paddingRight: 40,
286
+ paddingVertical: 10
287
+ },
288
+ searchLoader: {
289
+ position: "absolute",
290
+ right: 12,
291
+ top: "50%",
292
+ transform: [{ translateY: -10 }]
293
+ },
294
+ suggestionIcon: {
295
+ fontSize: 16,
296
+ marginRight: 8
297
+ },
298
+ suggestionItem: {
299
+ alignItems: "center",
300
+ borderRadius: 6,
301
+ flexDirection: "row",
302
+ paddingHorizontal: 12,
303
+ paddingVertical: 12
304
+ },
305
+ suggestionsList: {
306
+ flexGrow: 0,
307
+ flexShrink: 1
308
+ },
309
+ suggestionsListContent: { flexGrow: 0 },
310
+ suggestionText: {
311
+ flex: 1,
312
+ fontSize: 14
313
+ },
314
+ trigger: {
315
+ alignItems: "center",
316
+ borderRadius: 6,
317
+ borderWidth: 1,
318
+ flexDirection: "row",
319
+ justifyContent: "space-between",
320
+ paddingHorizontal: 12,
321
+ paddingVertical: 10
322
+ },
323
+ triggerText: {
324
+ flex: 1,
325
+ fontSize: 14
326
+ }
327
+ }), ce = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o }) => {
328
+ let [s, c] = A(!1), [l, u] = A(""), d = b(), { colors: f } = m(), p = e.data.options || [], h = p.find((e) => e.value === t), g = O(() => {
329
+ if (!l.trim()) return p;
330
+ let e = l.toLowerCase();
331
+ return p.filter((t) => d(t.label).toLowerCase().includes(e) || t.value.toLowerCase().includes(e));
332
+ }, [
333
+ p,
334
+ l,
335
+ d
336
+ ]), _ = (e) => {
337
+ n(e === t ? "" : e), c(!1), u("");
338
+ }, v = () => {
339
+ c(!1), u("");
340
+ };
341
+ return /* @__PURE__ */ E(V, {
342
+ style: W.container,
343
+ children: [
344
+ /* @__PURE__ */ E(R, {
345
+ style: [W.label, { color: f.textSecondary }],
346
+ children: [i || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
347
+ style: { color: f.error },
348
+ children: "*"
349
+ })]
350
+ }),
351
+ /* @__PURE__ */ E(B, {
352
+ style: [
353
+ W.trigger,
354
+ {
355
+ backgroundColor: f.input,
356
+ borderColor: f.border
357
+ },
358
+ r && { borderColor: f.error }
359
+ ],
360
+ onPress: () => c(!0),
361
+ activeOpacity: .7,
362
+ children: [/* @__PURE__ */ T(R, {
363
+ style: [
364
+ W.triggerText,
365
+ { color: f.text },
366
+ !t && { color: f.textMuted }
367
+ ],
368
+ numberOfLines: 1,
369
+ children: t && h ? d(h.label) : a || d("renderer.defaultAutocompleteInput.selectOption")
370
+ }), /* @__PURE__ */ T(R, {
371
+ style: [W.arrow, { color: f.textMuted }],
372
+ children: "▼"
373
+ })]
374
+ }),
375
+ /* @__PURE__ */ T(F, {
376
+ visible: s,
377
+ transparent: !0,
378
+ animationType: "fade",
379
+ onRequestClose: v,
380
+ children: /* @__PURE__ */ T(B, {
381
+ style: W.modalOverlay,
382
+ activeOpacity: 1,
383
+ onPress: v,
384
+ children: /* @__PURE__ */ E(B, {
385
+ style: [W.modalContent, { backgroundColor: f.card }],
386
+ activeOpacity: 1,
387
+ onPress: () => {},
388
+ children: [
389
+ /* @__PURE__ */ E(V, {
390
+ style: [W.modalHeader, { borderBottomColor: f.separator }],
391
+ children: [/* @__PURE__ */ T(R, {
392
+ style: [W.modalTitle, { color: f.text }],
393
+ children: i || e.data.name
394
+ }), /* @__PURE__ */ T(B, {
395
+ onPress: v,
396
+ children: /* @__PURE__ */ T(R, {
397
+ style: [W.closeButton, { color: f.textMuted }],
398
+ children: "✕"
399
+ })
400
+ })]
401
+ }),
402
+ /* @__PURE__ */ T(V, {
403
+ style: W.searchContainer,
404
+ children: /* @__PURE__ */ T(z, {
405
+ style: [W.searchInput, {
406
+ backgroundColor: f.muted,
407
+ borderColor: f.border,
408
+ color: f.text
409
+ }],
410
+ placeholder: a || d("renderer.defaultAutocompleteInput.search"),
411
+ placeholderTextColor: f.textMuted,
412
+ value: l,
413
+ onChangeText: u,
414
+ autoFocus: !0,
415
+ autoCapitalize: "none",
416
+ autoCorrect: !1
417
+ })
418
+ }),
419
+ /* @__PURE__ */ T(N, {
420
+ data: g,
421
+ keyExtractor: (e) => e.value,
422
+ style: W.optionsList,
423
+ contentContainerStyle: W.optionsListContent,
424
+ ListEmptyComponent: /* @__PURE__ */ T(V, {
425
+ style: W.emptyContainer,
426
+ children: /* @__PURE__ */ T(R, {
427
+ style: [W.emptyText, { color: f.textMuted }],
428
+ children: d("renderer.defaultAutocompleteInput.noResults")
429
+ })
430
+ }),
431
+ renderItem: ({ item: e }) => {
432
+ let n = e.value === t;
433
+ return /* @__PURE__ */ E(B, {
434
+ style: [W.option, n && { backgroundColor: f.primaryLight }],
435
+ onPress: () => _(e.value),
436
+ disabled: e.disabled,
437
+ activeOpacity: .7,
438
+ children: [/* @__PURE__ */ T(R, {
439
+ style: [
440
+ W.optionText,
441
+ { color: f.text },
442
+ e.disabled && { color: f.textMuted }
443
+ ],
444
+ children: d(e.label)
445
+ }), n && /* @__PURE__ */ T(R, {
446
+ style: [W.checkmark, { color: f.primary }],
447
+ children: "✓"
448
+ })]
449
+ });
450
+ }
451
+ })
452
+ ]
453
+ })
454
+ })
455
+ }),
456
+ r && /* @__PURE__ */ T(R, {
457
+ style: [W.error, { color: f.error }],
458
+ children: r
459
+ }),
460
+ o && !r && /* @__PURE__ */ T(R, {
461
+ style: [W.helperText, { color: f.textMuted }],
462
+ children: o
463
+ })
464
+ ]
465
+ });
466
+ }, W = L.create({
467
+ arrow: { fontSize: 12 },
468
+ checkmark: {
469
+ fontSize: 18,
470
+ fontWeight: "700"
471
+ },
472
+ closeButton: {
473
+ fontSize: 24,
474
+ fontWeight: "300"
475
+ },
476
+ container: { marginBottom: 16 },
477
+ emptyContainer: {
478
+ alignItems: "center",
479
+ paddingVertical: 24
480
+ },
481
+ emptyText: { fontSize: 14 },
482
+ error: {
483
+ fontSize: 12,
484
+ marginTop: 4
485
+ },
486
+ helperText: {
487
+ fontSize: 12,
488
+ marginTop: 4
489
+ },
490
+ label: {
491
+ fontSize: 14,
492
+ fontWeight: "500",
493
+ marginBottom: 8
494
+ },
495
+ modalContent: {
496
+ borderRadius: 12,
497
+ maxHeight: "80%",
498
+ padding: 16,
499
+ width: "90%"
500
+ },
501
+ modalHeader: {
502
+ alignItems: "center",
503
+ borderBottomWidth: 1,
504
+ flexDirection: "row",
505
+ justifyContent: "space-between",
506
+ marginBottom: 12,
507
+ paddingBottom: 12
508
+ },
509
+ modalOverlay: {
510
+ alignItems: "center",
511
+ backgroundColor: "rgba(0, 0, 0, 0.5)",
512
+ flex: 1,
513
+ justifyContent: "center"
514
+ },
515
+ modalTitle: {
516
+ fontSize: 18,
517
+ fontWeight: "600"
518
+ },
519
+ option: {
520
+ alignItems: "center",
521
+ borderRadius: 6,
522
+ flexDirection: "row",
523
+ justifyContent: "space-between",
524
+ paddingHorizontal: 12,
525
+ paddingVertical: 12
526
+ },
527
+ optionsList: {
528
+ flexGrow: 0,
529
+ flexShrink: 1
530
+ },
531
+ optionsListContent: { flexGrow: 0 },
532
+ optionText: {
533
+ flex: 1,
534
+ fontSize: 14
535
+ },
536
+ searchContainer: { marginBottom: 12 },
537
+ searchInput: {
538
+ borderRadius: 6,
539
+ borderWidth: 1,
540
+ fontSize: 14,
541
+ paddingHorizontal: 12,
542
+ paddingVertical: 10
543
+ },
544
+ trigger: {
545
+ alignItems: "center",
546
+ borderRadius: 6,
547
+ borderWidth: 1,
548
+ flexDirection: "row",
549
+ justifyContent: "space-between",
550
+ paddingHorizontal: 12,
551
+ paddingVertical: 10
552
+ },
553
+ triggerText: {
554
+ flex: 1,
555
+ fontSize: 14
556
+ }
557
+ }), le = ({ node: e, value: t, setValue: n, error: r, label: i, helperText: a }) => {
558
+ let o = b(), { colors: s } = m(), c = e.data.options || [], l = c.length > 0, u = Array.isArray(t) ? t : [], d = typeof t == "boolean" ? t : !1, f = (e) => {
559
+ n(l ? u.includes(e) ? u.filter((t) => t !== e) : [...u, e] : !d);
560
+ }, p = (e) => l ? u.includes(e) : d;
561
+ return /* @__PURE__ */ E(V, {
562
+ style: G.container,
563
+ children: [
564
+ /* @__PURE__ */ E(R, {
565
+ style: [G.label, { color: s.textSecondary }],
566
+ children: [i || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
567
+ style: { color: s.error },
568
+ children: "*"
569
+ })]
570
+ }),
571
+ c.length > 0 ? c.map((e) => {
572
+ let t = o(e.description);
573
+ return /* @__PURE__ */ E(B, {
574
+ style: G.option,
575
+ onPress: () => f(e.value),
576
+ disabled: e.disabled,
577
+ activeOpacity: .7,
578
+ accessible: !0,
579
+ accessibilityRole: "checkbox",
580
+ accessibilityState: {
581
+ checked: p(e.value),
582
+ disabled: e.disabled
583
+ },
584
+ accessibilityLabel: o(e.label) || e.value,
585
+ children: [/* @__PURE__ */ T(V, {
586
+ style: [
587
+ G.checkbox,
588
+ {
589
+ backgroundColor: s.input,
590
+ borderColor: s.border
591
+ },
592
+ p(e.value) && {
593
+ backgroundColor: s.primary,
594
+ borderColor: s.primary
595
+ }
596
+ ],
597
+ children: p(e.value) && /* @__PURE__ */ T(R, {
598
+ style: G.checkmark,
599
+ children: "✓"
600
+ })
601
+ }), /* @__PURE__ */ E(V, {
602
+ style: G.optionTextContainer,
603
+ children: [/* @__PURE__ */ T(R, {
604
+ style: [
605
+ G.optionLabel,
606
+ { color: s.textSecondary },
607
+ e.disabled && { color: s.textMuted }
608
+ ],
609
+ children: o(e.label) || e.value
610
+ }), t && /* @__PURE__ */ T(R, {
611
+ style: [G.optionDescription, { color: s.textMuted }],
612
+ children: t
613
+ })]
614
+ })]
615
+ }, e.value);
616
+ }) : /* @__PURE__ */ E(B, {
617
+ style: G.option,
618
+ onPress: () => f(""),
619
+ activeOpacity: .7,
620
+ accessible: !0,
621
+ accessibilityRole: "checkbox",
622
+ accessibilityState: { checked: d },
623
+ accessibilityLabel: i || e.data.name,
624
+ children: [/* @__PURE__ */ T(V, {
625
+ style: [
626
+ G.checkbox,
627
+ {
628
+ backgroundColor: s.input,
629
+ borderColor: s.border
630
+ },
631
+ d && {
632
+ backgroundColor: s.primary,
633
+ borderColor: s.primary
634
+ }
635
+ ],
636
+ children: d && /* @__PURE__ */ T(R, {
637
+ style: G.checkmark,
638
+ children: "✓"
639
+ })
640
+ }), /* @__PURE__ */ T(R, {
641
+ style: [G.optionLabel, { color: s.textSecondary }],
642
+ children: i || e.data.name
643
+ })]
644
+ }),
645
+ r && /* @__PURE__ */ T(R, {
646
+ style: [G.error, { color: s.error }],
647
+ children: r
648
+ }),
649
+ a && !r && /* @__PURE__ */ T(R, {
650
+ style: [G.helperText, { color: s.textMuted }],
651
+ children: a
652
+ })
653
+ ]
654
+ });
655
+ }, G = L.create({
656
+ checkbox: {
657
+ alignItems: "center",
658
+ borderRadius: 4,
659
+ borderWidth: 2,
660
+ height: 20,
661
+ justifyContent: "center",
662
+ marginRight: 12,
663
+ width: 20
664
+ },
665
+ checkmark: {
666
+ color: "#FFFFFF",
667
+ fontSize: 14,
668
+ fontWeight: "700"
669
+ },
670
+ container: { marginBottom: 16 },
671
+ error: {
672
+ fontSize: 12,
673
+ marginTop: 4
674
+ },
675
+ helperText: {
676
+ fontSize: 12,
677
+ marginTop: 4
678
+ },
679
+ label: {
680
+ fontSize: 14,
681
+ fontWeight: "500",
682
+ marginBottom: 8
683
+ },
684
+ option: {
685
+ alignItems: "flex-start",
686
+ flexDirection: "row",
687
+ marginBottom: 8
688
+ },
689
+ optionDescription: {
690
+ fontSize: 12,
691
+ marginTop: 2
692
+ },
693
+ optionLabel: { fontSize: 14 },
694
+ optionTextContainer: { flex: 1 }
695
+ }), ue = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o }) => {
696
+ let [s, c] = A(!1), l = b(), { colors: u } = m(), d = t ? new Date(t) : void 0, { year: f, month: p, today: h } = O(() => {
697
+ let e = d || /* @__PURE__ */ new Date(), t = e.getFullYear(), n = e.getMonth(), r = /* @__PURE__ */ new Date();
698
+ return r.setHours(0, 0, 0, 0), {
699
+ month: n,
700
+ today: r,
701
+ year: t
702
+ };
703
+ }, [d]), [g, _] = A(f), [v, y] = A(p), x = [
704
+ "January",
705
+ "February",
706
+ "March",
707
+ "April",
708
+ "May",
709
+ "June",
710
+ "July",
711
+ "August",
712
+ "September",
713
+ "October",
714
+ "November",
715
+ "December"
716
+ ], S = O(() => {
717
+ let e = new Date(g, v, 1).getDay(), t = new Date(g, v + 1, 0).getDate(), n = new Date(g, v, 0).getDate(), r = [];
718
+ for (let t = e - 1; t >= 0; t--) r.push({
719
+ date: new Date(g, v - 1, n - t),
720
+ day: n - t,
721
+ isCurrentMonth: !1
722
+ });
723
+ for (let e = 1; e <= t; e++) r.push({
724
+ date: new Date(g, v, e),
725
+ day: e,
726
+ isCurrentMonth: !0
727
+ });
728
+ let i = 42 - r.length;
729
+ for (let e = 1; e <= i; e++) r.push({
730
+ date: new Date(g, v + 1, e),
731
+ day: e,
732
+ isCurrentMonth: !1
733
+ });
734
+ return r;
735
+ }, [g, v]), C = ee((t) => {
736
+ e.data.disablePast && t < h || (n(t.toISOString()), c(!1));
737
+ }, [
738
+ e.data.disablePast,
739
+ h,
740
+ n
741
+ ]), w = () => {
742
+ v === 0 ? (y(11), _(g - 1)) : y(v - 1);
743
+ }, D = () => {
744
+ v === 11 ? (y(0), _(g + 1)) : y(v + 1);
745
+ }, k = () => d ? d.toLocaleDateString() : a || l("renderer.defaultInputs.selectDate"), j = (t) => e.data.disablePast ? t < h : !1, M = (e) => d ? e.getDate() === d.getDate() && e.getMonth() === d.getMonth() && e.getFullYear() === d.getFullYear() : !1;
746
+ return /* @__PURE__ */ E(V, {
747
+ style: K.container,
748
+ children: [
749
+ /* @__PURE__ */ E(R, {
750
+ style: [K.label, { color: u.textSecondary }],
751
+ children: [i || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
752
+ style: { color: u.error },
753
+ children: "*"
754
+ })]
755
+ }),
756
+ /* @__PURE__ */ E(B, {
757
+ style: [
758
+ K.trigger,
759
+ {
760
+ backgroundColor: u.input,
761
+ borderColor: u.border
762
+ },
763
+ r && { borderColor: u.error }
764
+ ],
765
+ onPress: () => c(!0),
766
+ activeOpacity: .7,
767
+ children: [/* @__PURE__ */ T(R, {
768
+ style: [
769
+ K.triggerText,
770
+ { color: u.text },
771
+ !t && { color: u.textMuted }
772
+ ],
773
+ numberOfLines: 1,
774
+ children: k()
775
+ }), /* @__PURE__ */ T(R, {
776
+ style: K.icon,
777
+ children: "📅"
778
+ })]
779
+ }),
780
+ /* @__PURE__ */ T(F, {
781
+ visible: s,
782
+ transparent: !0,
783
+ animationType: "fade",
784
+ onRequestClose: () => c(!1),
785
+ children: /* @__PURE__ */ T(B, {
786
+ style: K.modalOverlay,
787
+ activeOpacity: 1,
788
+ onPress: () => c(!1),
789
+ children: /* @__PURE__ */ E(B, {
790
+ style: [K.modalContent, { backgroundColor: u.card }],
791
+ activeOpacity: 1,
792
+ onPress: () => {},
793
+ children: [
794
+ /* @__PURE__ */ E(V, {
795
+ style: [K.modalHeader, { borderBottomColor: u.separator }],
796
+ children: [/* @__PURE__ */ T(R, {
797
+ style: [K.modalTitle, { color: u.text }],
798
+ children: i || e.data.name
799
+ }), /* @__PURE__ */ T(B, {
800
+ onPress: () => c(!1),
801
+ children: /* @__PURE__ */ T(R, {
802
+ style: [K.closeButton, { color: u.textMuted }],
803
+ children: "✕"
804
+ })
805
+ })]
806
+ }),
807
+ /* @__PURE__ */ E(V, {
808
+ style: K.calendarHeader,
809
+ children: [
810
+ /* @__PURE__ */ T(B, {
811
+ onPress: w,
812
+ style: K.navButton,
813
+ children: /* @__PURE__ */ T(R, {
814
+ style: [K.navButtonText, { color: u.primary }],
815
+ children: "‹"
816
+ })
817
+ }),
818
+ /* @__PURE__ */ E(R, {
819
+ style: [K.monthYear, { color: u.text }],
820
+ children: [
821
+ x[v],
822
+ " ",
823
+ g
824
+ ]
825
+ }),
826
+ /* @__PURE__ */ T(B, {
827
+ onPress: D,
828
+ style: K.navButton,
829
+ children: /* @__PURE__ */ T(R, {
830
+ style: [K.navButtonText, { color: u.primary }],
831
+ children: "›"
832
+ })
833
+ })
834
+ ]
835
+ }),
836
+ /* @__PURE__ */ T(V, {
837
+ style: K.weekDays,
838
+ children: [
839
+ "Sun",
840
+ "Mon",
841
+ "Tue",
842
+ "Wed",
843
+ "Thu",
844
+ "Fri",
845
+ "Sat"
846
+ ].map((e) => /* @__PURE__ */ T(R, {
847
+ style: [K.weekDay, { color: u.textMuted }],
848
+ children: e
849
+ }, e))
850
+ }),
851
+ /* @__PURE__ */ T(N, {
852
+ data: S,
853
+ keyExtractor: (e, t) => `${e.date.getTime()}-${t}`,
854
+ numColumns: 7,
855
+ scrollEnabled: !1,
856
+ style: K.calendar,
857
+ contentContainerStyle: K.calendarContent,
858
+ renderItem: ({ item: e }) => {
859
+ let t = j(e.date), n = M(e.date);
860
+ return /* @__PURE__ */ T(B, {
861
+ style: [
862
+ K.dayCell,
863
+ !e.isCurrentMonth && K.dayCellOtherMonth,
864
+ n && {
865
+ backgroundColor: u.primary,
866
+ borderRadius: 20
867
+ },
868
+ t && K.dayCellDisabled
869
+ ],
870
+ onPress: () => C(e.date),
871
+ disabled: t,
872
+ activeOpacity: .7,
873
+ children: /* @__PURE__ */ T(R, {
874
+ style: [
875
+ K.dayText,
876
+ { color: u.text },
877
+ !e.isCurrentMonth && { color: u.textMuted },
878
+ n && {
879
+ color: u.background,
880
+ fontWeight: "600"
881
+ },
882
+ t && { color: u.textMuted }
883
+ ],
884
+ children: e.day
885
+ })
886
+ });
887
+ }
888
+ })
889
+ ]
890
+ })
891
+ })
892
+ }),
893
+ r && /* @__PURE__ */ T(R, {
894
+ style: [K.error, { color: u.error }],
895
+ children: r
896
+ }),
897
+ o && !r && /* @__PURE__ */ T(R, {
898
+ style: [K.helperText, { color: u.textMuted }],
899
+ children: o
900
+ })
901
+ ]
902
+ });
903
+ }, K = L.create({
904
+ calendar: {
905
+ flexGrow: 0,
906
+ flexShrink: 1
907
+ },
908
+ calendarContent: { flexGrow: 0 },
909
+ calendarHeader: {
910
+ alignItems: "center",
911
+ flexDirection: "row",
912
+ justifyContent: "space-between",
913
+ marginBottom: 16,
914
+ paddingHorizontal: 8
915
+ },
916
+ closeButton: {
917
+ fontSize: 24,
918
+ fontWeight: "300"
919
+ },
920
+ container: { marginBottom: 16 },
921
+ dayCell: {
922
+ alignItems: "center",
923
+ aspectRatio: 1,
924
+ flex: 1,
925
+ justifyContent: "center",
926
+ margin: 2,
927
+ maxWidth: "14.28%"
928
+ },
929
+ dayCellDisabled: { opacity: .3 },
930
+ dayCellOtherMonth: { opacity: .3 },
931
+ dayText: { fontSize: 14 },
932
+ error: {
933
+ fontSize: 12,
934
+ marginTop: 4
935
+ },
936
+ helperText: {
937
+ fontSize: 12,
938
+ marginTop: 4
939
+ },
940
+ icon: { fontSize: 16 },
941
+ label: {
942
+ fontSize: 14,
943
+ fontWeight: "500",
944
+ marginBottom: 8
945
+ },
946
+ modalContent: {
947
+ borderRadius: 12,
948
+ maxHeight: "80%",
949
+ padding: 16,
950
+ width: "90%"
951
+ },
952
+ modalHeader: {
953
+ alignItems: "center",
954
+ borderBottomWidth: 1,
955
+ flexDirection: "row",
956
+ justifyContent: "space-between",
957
+ marginBottom: 16,
958
+ paddingBottom: 12
959
+ },
960
+ modalOverlay: {
961
+ alignItems: "center",
962
+ backgroundColor: "rgba(0, 0, 0, 0.5)",
963
+ flex: 1,
964
+ justifyContent: "center"
965
+ },
966
+ modalTitle: {
967
+ fontSize: 18,
968
+ fontWeight: "600"
969
+ },
970
+ monthYear: {
971
+ fontSize: 16,
972
+ fontWeight: "600"
973
+ },
974
+ navButton: { padding: 8 },
975
+ navButtonText: {
976
+ fontSize: 24,
977
+ fontWeight: "600"
978
+ },
979
+ trigger: {
980
+ alignItems: "center",
981
+ borderRadius: 6,
982
+ borderWidth: 1,
983
+ flexDirection: "row",
984
+ justifyContent: "space-between",
985
+ paddingHorizontal: 12,
986
+ paddingVertical: 10
987
+ },
988
+ triggerText: {
989
+ flex: 1,
990
+ fontSize: 14
991
+ },
992
+ weekDay: {
993
+ flex: 1,
994
+ fontSize: 12,
995
+ fontWeight: "600",
996
+ maxWidth: "14.28%",
997
+ textAlign: "center"
998
+ },
999
+ weekDays: {
1000
+ flexDirection: "row",
1001
+ marginBottom: 8
1002
+ }
1003
+ }), de = ({ node: e, value: t, setValue: n, error: r, label: i, helperText: a }) => {
1004
+ let [o, s] = A(!1), [c, l] = A(!0), u = b(), { colors: d } = m(), f = Array.isArray(t) ? t : [], p = f[0] ? new Date(f[0]) : void 0, h = f[1] ? new Date(f[1]) : void 0, { year: g, month: _, today: v } = O(() => {
1005
+ let e = p || /* @__PURE__ */ new Date(), t = e.getFullYear(), n = e.getMonth(), r = /* @__PURE__ */ new Date();
1006
+ return r.setHours(0, 0, 0, 0), {
1007
+ month: n,
1008
+ today: r,
1009
+ year: t
1010
+ };
1011
+ }, [p]), [y, x] = A(g), [S, C] = A(_), w = [
1012
+ "January",
1013
+ "February",
1014
+ "March",
1015
+ "April",
1016
+ "May",
1017
+ "June",
1018
+ "July",
1019
+ "August",
1020
+ "September",
1021
+ "October",
1022
+ "November",
1023
+ "December"
1024
+ ], D = O(() => {
1025
+ let e = new Date(y, S, 1).getDay(), t = new Date(y, S + 1, 0).getDate(), n = new Date(y, S, 0).getDate(), r = [];
1026
+ for (let t = e - 1; t >= 0; t--) r.push({
1027
+ date: new Date(y, S - 1, n - t),
1028
+ day: n - t,
1029
+ isCurrentMonth: !1
1030
+ });
1031
+ for (let e = 1; e <= t; e++) r.push({
1032
+ date: new Date(y, S, e),
1033
+ day: e,
1034
+ isCurrentMonth: !0
1035
+ });
1036
+ let i = 42 - r.length;
1037
+ for (let e = 1; e <= i; e++) r.push({
1038
+ date: new Date(y, S + 1, e),
1039
+ day: e,
1040
+ isCurrentMonth: !1
1041
+ });
1042
+ return r;
1043
+ }, [y, S]), k = ee((t) => {
1044
+ e.data.disablePast && t < v || (c ? (n([t.toISOString(), h?.toISOString()]), l(!1)) : (n(p && t < p ? [t.toISOString(), p.toISOString()] : [p?.toISOString(), t.toISOString()]), s(!1), l(!0)));
1045
+ }, [
1046
+ e.data.disablePast,
1047
+ v,
1048
+ c,
1049
+ p,
1050
+ h,
1051
+ n
1052
+ ]), j = () => {
1053
+ S === 0 ? (C(11), x(y - 1)) : C(S - 1);
1054
+ }, M = () => {
1055
+ S === 11 ? (C(0), x(y + 1)) : C(S + 1);
1056
+ }, P = () => p && h ? `${p.toLocaleDateString()} - ${h.toLocaleDateString()}` : p ? p.toLocaleDateString() : u("renderer.defaultInputs.selectDateRange"), I = (t) => e.data.disablePast ? t < v : !1, L = (e) => p && h ? e >= p && e <= h : !1, te = (e) => {
1057
+ if (!(p || h)) return !1;
1058
+ let t = p && e.getDate() === p.getDate() && e.getMonth() === p.getMonth() && e.getFullYear() === p.getFullYear(), n = h && e.getDate() === h.getDate() && e.getMonth() === h.getMonth() && e.getFullYear() === h.getFullYear();
1059
+ return t || n;
1060
+ };
1061
+ return /* @__PURE__ */ E(V, {
1062
+ style: q.container,
1063
+ children: [
1064
+ /* @__PURE__ */ E(R, {
1065
+ style: [q.label, { color: d.textSecondary }],
1066
+ children: [i || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
1067
+ style: { color: d.error },
1068
+ children: "*"
1069
+ })]
1070
+ }),
1071
+ /* @__PURE__ */ E(B, {
1072
+ style: [
1073
+ q.trigger,
1074
+ {
1075
+ backgroundColor: d.input,
1076
+ borderColor: d.border
1077
+ },
1078
+ r && { borderColor: d.error }
1079
+ ],
1080
+ onPress: () => s(!0),
1081
+ activeOpacity: .7,
1082
+ children: [/* @__PURE__ */ T(R, {
1083
+ style: [
1084
+ q.triggerText,
1085
+ { color: d.text },
1086
+ !p && { color: d.textMuted }
1087
+ ],
1088
+ numberOfLines: 1,
1089
+ children: P()
1090
+ }), /* @__PURE__ */ T(R, {
1091
+ style: q.icon,
1092
+ children: "📅"
1093
+ })]
1094
+ }),
1095
+ /* @__PURE__ */ T(F, {
1096
+ visible: o,
1097
+ transparent: !0,
1098
+ animationType: "fade",
1099
+ onRequestClose: () => s(!1),
1100
+ children: /* @__PURE__ */ T(B, {
1101
+ style: q.modalOverlay,
1102
+ activeOpacity: 1,
1103
+ onPress: () => s(!1),
1104
+ children: /* @__PURE__ */ E(B, {
1105
+ style: [q.modalContent, { backgroundColor: d.card }],
1106
+ activeOpacity: 1,
1107
+ onPress: () => {},
1108
+ children: [
1109
+ /* @__PURE__ */ E(V, {
1110
+ style: [q.modalHeader, { borderBottomColor: d.separator }],
1111
+ children: [/* @__PURE__ */ T(R, {
1112
+ style: [q.modalTitle, { color: d.text }],
1113
+ children: i || e.data.name
1114
+ }), /* @__PURE__ */ T(B, {
1115
+ onPress: () => s(!1),
1116
+ children: /* @__PURE__ */ T(R, {
1117
+ style: [q.closeButton, { color: d.textMuted }],
1118
+ children: "✕"
1119
+ })
1120
+ })]
1121
+ }),
1122
+ /* @__PURE__ */ T(V, {
1123
+ style: [q.rangeIndicator, { backgroundColor: d.primaryLight }],
1124
+ children: /* @__PURE__ */ T(R, {
1125
+ style: [q.rangeIndicatorText, { color: d.primary }],
1126
+ children: u(c ? "renderer.defaultInputs.startDate" : "renderer.defaultInputs.endDate")
1127
+ })
1128
+ }),
1129
+ /* @__PURE__ */ E(V, {
1130
+ style: q.calendarHeader,
1131
+ children: [
1132
+ /* @__PURE__ */ T(B, {
1133
+ onPress: j,
1134
+ style: q.navButton,
1135
+ children: /* @__PURE__ */ T(R, {
1136
+ style: [q.navButtonText, { color: d.primary }],
1137
+ children: "‹"
1138
+ })
1139
+ }),
1140
+ /* @__PURE__ */ E(R, {
1141
+ style: [q.monthYear, { color: d.text }],
1142
+ children: [
1143
+ w[S],
1144
+ " ",
1145
+ y
1146
+ ]
1147
+ }),
1148
+ /* @__PURE__ */ T(B, {
1149
+ onPress: M,
1150
+ style: q.navButton,
1151
+ children: /* @__PURE__ */ T(R, {
1152
+ style: [q.navButtonText, { color: d.primary }],
1153
+ children: "›"
1154
+ })
1155
+ })
1156
+ ]
1157
+ }),
1158
+ /* @__PURE__ */ T(V, {
1159
+ style: q.weekDays,
1160
+ children: [
1161
+ "Sun",
1162
+ "Mon",
1163
+ "Tue",
1164
+ "Wed",
1165
+ "Thu",
1166
+ "Fri",
1167
+ "Sat"
1168
+ ].map((e) => /* @__PURE__ */ T(R, {
1169
+ style: [q.weekDay, { color: d.textMuted }],
1170
+ children: e
1171
+ }, e))
1172
+ }),
1173
+ /* @__PURE__ */ T(N, {
1174
+ data: D,
1175
+ keyExtractor: (e, t) => `${e.date.getTime()}-${t}`,
1176
+ numColumns: 7,
1177
+ scrollEnabled: !1,
1178
+ style: q.calendar,
1179
+ contentContainerStyle: q.calendarContent,
1180
+ renderItem: ({ item: e }) => {
1181
+ let t = I(e.date), n = L(e.date), r = te(e.date);
1182
+ return /* @__PURE__ */ T(B, {
1183
+ style: [
1184
+ q.dayCell,
1185
+ !e.isCurrentMonth && q.dayCellOtherMonth,
1186
+ n && { backgroundColor: d.primaryLight },
1187
+ r && {
1188
+ backgroundColor: d.primary,
1189
+ borderRadius: 20
1190
+ },
1191
+ t && q.dayCellDisabled
1192
+ ],
1193
+ onPress: () => k(e.date),
1194
+ disabled: t,
1195
+ activeOpacity: .7,
1196
+ children: /* @__PURE__ */ T(R, {
1197
+ style: [
1198
+ q.dayText,
1199
+ { color: d.text },
1200
+ !e.isCurrentMonth && { color: d.textMuted },
1201
+ n && { color: d.primary },
1202
+ r && {
1203
+ color: d.background,
1204
+ fontWeight: "600"
1205
+ },
1206
+ t && { color: d.textMuted }
1207
+ ],
1208
+ children: e.day
1209
+ })
1210
+ });
1211
+ }
1212
+ })
1213
+ ]
1214
+ })
1215
+ })
1216
+ }),
1217
+ r && /* @__PURE__ */ T(R, {
1218
+ style: [q.error, { color: d.error }],
1219
+ children: r
1220
+ }),
1221
+ a && !r && /* @__PURE__ */ T(R, {
1222
+ style: [q.helperText, { color: d.textMuted }],
1223
+ children: a
1224
+ })
1225
+ ]
1226
+ });
1227
+ }, q = L.create({
1228
+ calendar: {
1229
+ flexGrow: 0,
1230
+ flexShrink: 1
1231
+ },
1232
+ calendarContent: { flexGrow: 0 },
1233
+ calendarHeader: {
1234
+ alignItems: "center",
1235
+ flexDirection: "row",
1236
+ justifyContent: "space-between",
1237
+ marginBottom: 16,
1238
+ paddingHorizontal: 8
1239
+ },
1240
+ closeButton: {
1241
+ fontSize: 24,
1242
+ fontWeight: "300"
1243
+ },
1244
+ container: { marginBottom: 16 },
1245
+ dayCell: {
1246
+ alignItems: "center",
1247
+ aspectRatio: 1,
1248
+ flex: 1,
1249
+ justifyContent: "center",
1250
+ margin: 2,
1251
+ maxWidth: "14.28%"
1252
+ },
1253
+ dayCellDisabled: { opacity: .3 },
1254
+ dayCellOtherMonth: { opacity: .3 },
1255
+ dayText: { fontSize: 14 },
1256
+ error: {
1257
+ fontSize: 12,
1258
+ marginTop: 4
1259
+ },
1260
+ helperText: {
1261
+ fontSize: 12,
1262
+ marginTop: 4
1263
+ },
1264
+ icon: { fontSize: 16 },
1265
+ label: {
1266
+ fontSize: 14,
1267
+ fontWeight: "500",
1268
+ marginBottom: 8
1269
+ },
1270
+ modalContent: {
1271
+ borderRadius: 12,
1272
+ maxHeight: "80%",
1273
+ padding: 16,
1274
+ width: "90%"
1275
+ },
1276
+ modalHeader: {
1277
+ alignItems: "center",
1278
+ borderBottomWidth: 1,
1279
+ flexDirection: "row",
1280
+ justifyContent: "space-between",
1281
+ marginBottom: 12,
1282
+ paddingBottom: 12
1283
+ },
1284
+ modalOverlay: {
1285
+ alignItems: "center",
1286
+ backgroundColor: "rgba(0, 0, 0, 0.5)",
1287
+ flex: 1,
1288
+ justifyContent: "center"
1289
+ },
1290
+ modalTitle: {
1291
+ fontSize: 18,
1292
+ fontWeight: "600"
1293
+ },
1294
+ monthYear: {
1295
+ fontSize: 16,
1296
+ fontWeight: "600"
1297
+ },
1298
+ navButton: { padding: 8 },
1299
+ navButtonText: {
1300
+ fontSize: 24,
1301
+ fontWeight: "600"
1302
+ },
1303
+ rangeIndicator: {
1304
+ alignItems: "center",
1305
+ borderRadius: 6,
1306
+ marginBottom: 12,
1307
+ paddingVertical: 8
1308
+ },
1309
+ rangeIndicatorText: {
1310
+ fontSize: 14,
1311
+ fontWeight: "600"
1312
+ },
1313
+ trigger: {
1314
+ alignItems: "center",
1315
+ borderRadius: 6,
1316
+ borderWidth: 1,
1317
+ flexDirection: "row",
1318
+ justifyContent: "space-between",
1319
+ paddingHorizontal: 12,
1320
+ paddingVertical: 10
1321
+ },
1322
+ triggerText: {
1323
+ flex: 1,
1324
+ fontSize: 14
1325
+ },
1326
+ weekDay: {
1327
+ flex: 1,
1328
+ fontSize: 12,
1329
+ fontWeight: "600",
1330
+ maxWidth: "14.28%",
1331
+ textAlign: "center"
1332
+ },
1333
+ weekDays: {
1334
+ flexDirection: "row",
1335
+ marginBottom: 8
1336
+ }
1337
+ }), fe = ({ node: e, value: t, setValue: n, error: r, label: i, helperText: a }) => {
1338
+ let [o, s] = A(null), [c, l] = A(!0), u = b(), { colors: d } = m(), f = Array.isArray(t) ? t : t ? [t] : [], p = e.data.multiple, h = ee(async () => {
1339
+ if (o) try {
1340
+ let e = (await o({ allowMultiSelection: p })).map((e) => ({
1341
+ data: e.uri,
1342
+ lastModified: Date.now(),
1343
+ name: e.name,
1344
+ size: e.size,
1345
+ type: e.type || "application/octet-stream"
1346
+ }));
1347
+ n(p ? [...f, ...e] : e[0] || null);
1348
+ } catch (e) {
1349
+ e.code !== "DOCUMENT_PICKER_CANCELED" && M.alert("Error", u("renderer.defaultInputs.filePickerError"));
1350
+ }
1351
+ }, [
1352
+ o,
1353
+ f,
1354
+ p,
1355
+ n,
1356
+ u
1357
+ ]), g = ee((e) => {
1358
+ let t = f.filter((t, n) => n !== e);
1359
+ n(t.length > 0 ? t : null);
1360
+ }, [f, n]), _ = (e) => e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
1361
+ return D(() => {
1362
+ (async () => {
1363
+ try {
1364
+ let { pick: e } = await import("react-native-document-picker");
1365
+ s(() => e);
1366
+ } catch {
1367
+ s(null);
1368
+ } finally {
1369
+ l(!1);
1370
+ }
1371
+ })();
1372
+ }, []), c ? null : o ? /* @__PURE__ */ E(V, {
1373
+ style: J.container,
1374
+ children: [
1375
+ /* @__PURE__ */ E(R, {
1376
+ style: [J.label, { color: d.textSecondary }],
1377
+ children: [i || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
1378
+ style: { color: d.error },
1379
+ children: "*"
1380
+ })]
1381
+ }),
1382
+ f.length > 0 && /* @__PURE__ */ T(V, {
1383
+ style: J.filesList,
1384
+ children: f.map((e, t) => /* @__PURE__ */ E(V, {
1385
+ style: [J.fileItem, {
1386
+ backgroundColor: d.card,
1387
+ borderColor: d.separator
1388
+ }],
1389
+ children: [
1390
+ /* @__PURE__ */ T(V, {
1391
+ style: [J.fileIcon, { backgroundColor: d.muted }],
1392
+ children: /* @__PURE__ */ T(R, {
1393
+ style: J.fileIconText,
1394
+ children: "📄"
1395
+ })
1396
+ }),
1397
+ /* @__PURE__ */ E(V, {
1398
+ style: J.fileInfo,
1399
+ children: [/* @__PURE__ */ T(R, {
1400
+ style: [J.fileName, { color: d.text }],
1401
+ numberOfLines: 1,
1402
+ children: e.name
1403
+ }), e.size > 0 && /* @__PURE__ */ T(R, {
1404
+ style: [J.fileSize, { color: d.textMuted }],
1405
+ children: _(e.size)
1406
+ })]
1407
+ }),
1408
+ /* @__PURE__ */ T(B, {
1409
+ style: J.removeButton,
1410
+ onPress: () => g(t),
1411
+ activeOpacity: .7,
1412
+ children: /* @__PURE__ */ T(R, {
1413
+ style: [J.removeButtonText, { color: d.textMuted }],
1414
+ children: "✕"
1415
+ })
1416
+ })
1417
+ ]
1418
+ }, `${e.name}-${t}`))
1419
+ }),
1420
+ /* @__PURE__ */ T(B, {
1421
+ style: [J.pickButton, {
1422
+ backgroundColor: d.input,
1423
+ borderColor: d.border
1424
+ }],
1425
+ onPress: h,
1426
+ activeOpacity: .7,
1427
+ children: /* @__PURE__ */ T(R, {
1428
+ style: [J.pickButtonText, { color: d.textMuted }],
1429
+ children: f.length === 0 ? u(p ? "renderer.defaultInputs.selectFiles" : "renderer.defaultInputs.selectFile") : u(p ? "renderer.defaultInputs.addMoreFiles" : "renderer.defaultInputs.replaceFile")
1430
+ })
1431
+ }),
1432
+ r && /* @__PURE__ */ T(R, {
1433
+ style: [J.error, { color: d.error }],
1434
+ children: r
1435
+ }),
1436
+ a && !r && /* @__PURE__ */ T(R, {
1437
+ style: [J.helperText, { color: d.textMuted }],
1438
+ children: a
1439
+ })
1440
+ ]
1441
+ }) : /* @__PURE__ */ E(V, {
1442
+ style: J.container,
1443
+ children: [
1444
+ /* @__PURE__ */ E(R, {
1445
+ style: [J.label, { color: d.textSecondary }],
1446
+ children: [i || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
1447
+ style: { color: d.error },
1448
+ children: "*"
1449
+ })]
1450
+ }),
1451
+ /* @__PURE__ */ T(V, {
1452
+ style: [J.unavailableContainer, {
1453
+ backgroundColor: d.errorLight,
1454
+ borderColor: d.error
1455
+ }],
1456
+ children: /* @__PURE__ */ T(R, {
1457
+ style: [J.unavailableText, { color: d.error }],
1458
+ children: u("renderer.defaultInputs.filePickerUnavailable")
1459
+ })
1460
+ }),
1461
+ a && /* @__PURE__ */ T(R, {
1462
+ style: [J.helperText, { color: d.textMuted }],
1463
+ children: a
1464
+ })
1465
+ ]
1466
+ });
1467
+ }, J = L.create({
1468
+ container: { marginBottom: 16 },
1469
+ error: {
1470
+ fontSize: 12,
1471
+ marginTop: 4
1472
+ },
1473
+ fileIcon: {
1474
+ alignItems: "center",
1475
+ borderRadius: 6,
1476
+ height: 40,
1477
+ justifyContent: "center",
1478
+ width: 40
1479
+ },
1480
+ fileIconText: { fontSize: 20 },
1481
+ fileInfo: {
1482
+ flex: 1,
1483
+ marginLeft: 12
1484
+ },
1485
+ fileItem: {
1486
+ alignItems: "center",
1487
+ borderRadius: 6,
1488
+ borderWidth: 1,
1489
+ flexDirection: "row",
1490
+ marginBottom: 8,
1491
+ padding: 12
1492
+ },
1493
+ fileName: {
1494
+ fontSize: 14,
1495
+ fontWeight: "500"
1496
+ },
1497
+ fileSize: {
1498
+ fontSize: 12,
1499
+ marginTop: 2
1500
+ },
1501
+ filesList: { marginBottom: 12 },
1502
+ helperText: {
1503
+ fontSize: 12,
1504
+ marginTop: 4
1505
+ },
1506
+ label: {
1507
+ fontSize: 14,
1508
+ fontWeight: "500",
1509
+ marginBottom: 8
1510
+ },
1511
+ pickButton: {
1512
+ alignItems: "center",
1513
+ borderRadius: 6,
1514
+ borderStyle: "dashed",
1515
+ borderWidth: 2,
1516
+ justifyContent: "center",
1517
+ paddingVertical: 16
1518
+ },
1519
+ pickButtonText: {
1520
+ fontSize: 14,
1521
+ fontWeight: "500"
1522
+ },
1523
+ removeButton: { padding: 4 },
1524
+ removeButtonText: { fontSize: 18 },
1525
+ unavailableContainer: {
1526
+ alignItems: "center",
1527
+ borderRadius: 6,
1528
+ borderWidth: 1,
1529
+ justifyContent: "center",
1530
+ paddingVertical: 16
1531
+ },
1532
+ unavailableText: {
1533
+ fontSize: 12,
1534
+ textAlign: "center"
1535
+ }
1536
+ }), pe = (e) => null, me = (e) => e.replace(/<[^>]*>/g, ""), he = (e) => e.replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, "\"").replace(/&#x27;/g, "'").replace(/&#x2F;/g, "/"), ge = (e, t = {}) => e == null || e === "" ? "" : he(me(String(e))), _e = 100, ve = (e, t = {}, n = 0, r = /* @__PURE__ */ new WeakSet()) => {
1537
+ if (n > _e) return console.warn(`sanitizeHttpResponse: Maximum depth (${_e}) exceeded.`), typeof e == "string" ? ge(e, t) : "[Max Depth Exceeded]";
1538
+ if (e == null) return e;
1539
+ if (typeof e == "string") return ge(e, t);
1540
+ if (Array.isArray(e)) return e.map((e) => ve(e, t, n + 1, r));
1541
+ if (typeof e == "object") {
1542
+ if (r.has(e)) return console.warn("sanitizeHttpResponse: Circular reference detected. Breaking cycle to prevent infinite recursion."), "[Circular Reference]";
1543
+ r.add(e);
1544
+ let i = {};
1545
+ for (let [a, o] of Object.entries(e)) i[a] = ve(o, t, n + 1, r);
1546
+ return r.delete(e), i;
1547
+ }
1548
+ return e;
1549
+ }, ye = (e, t) => t ? t.split(".").reduce((e, t) => {
1550
+ if (e == null) return;
1551
+ let n = t.match(/^(\w+)\[(\d+)]$/);
1552
+ if (n) {
1553
+ let [, t, r] = n, i = e[t];
1554
+ return Array.isArray(i) ? i[Number.parseInt(r, 10)] : i;
1555
+ }
1556
+ return e[t];
1557
+ }, e) : e, be = (e) => {
1558
+ let t = e.matchAll(/{{([\w-]+)}}/g);
1559
+ return Array.from(t, (e) => e[1]);
1560
+ }, xe = (e, t) => be(e).every((e) => {
1561
+ let n = t[e];
1562
+ return n != null && n !== "";
1563
+ }), Se = (e, t, n = !1) => e.replace(/{{([\w-]+)}}/g, (e, r) => {
1564
+ let i = t[r], a = i == null ? "" : String(i);
1565
+ return n ? encodeURIComponent(a) : a;
1566
+ }), Ce = ({ node: e, value: t, setValue: n, error: r, label: a, placeholder: o, helperText: s, id: c, name: l }) => {
1567
+ let [u, d] = A(!1), [f, h] = A(null), [g, _] = A([]), [v, y] = A(""), [x, C] = A(!1), { formValues: w, inputNodes: M } = p(), P = b(), { colors: I } = m(), { httpConfig: L } = e.data, te = k(!1), ne = k(""), re = k(L), ie = k(w), ae = k(M), oe = k(n), se = k(null), H = k(null), U = O(() => L?.url ? be(L.url) : [], [L?.url]), ce = U.length > 0, W = O(() => U.map((e) => `${e}:${String(w[e] ?? "")}`).join("|"), [U, w]), le = O(() => L?.url ? ce ? xe(L.url, w) : !0 : !1, [
1568
+ L?.url,
1569
+ ce,
1570
+ w
1571
+ ]), G = ee(async (e) => {
1572
+ H.current && H.current.abort();
1573
+ let t = new AbortController();
1574
+ H.current = t;
1575
+ let n = re.current, r = ie.current, a = oe.current;
1576
+ if (!n?.url) {
1577
+ h(P("renderer.defaultHttpInput.noUrlConfigured")), H.current = null;
1578
+ return;
1579
+ }
1580
+ if (n.url && !xe(n.url, r)) {
1581
+ H.current = null;
1582
+ return;
1583
+ }
1584
+ d(!0), h(null);
1585
+ try {
1586
+ let o = Se(n.url, r, !0), s = n.searchParam && e ? `${o}${o.includes("?") ? "&" : "?"}${n.searchParam}=${encodeURIComponent(e)}` : o, c = {};
1587
+ n.headers?.forEach((e) => {
1588
+ c[e.key] = Se(e.value, r);
1589
+ });
1590
+ let l = [
1591
+ "POST",
1592
+ "PUT",
1593
+ "PATCH"
1594
+ ].includes(n.method || "") ? n.sendAllFormValues ? JSON.stringify(i(r, ae.current)) : n.body ? Se(n.body, r) : void 0 : void 0, u = setTimeout(() => t.abort(), 3e4), f = await fetch(s, {
1595
+ body: l || void 0,
1596
+ headers: {
1597
+ "Content-Type": "application/json",
1598
+ ...c
1599
+ },
1600
+ method: n.method || "GET",
1601
+ signal: t.signal
1602
+ });
1603
+ if (clearTimeout(u), !f.ok) {
1604
+ h(`HTTP Error ${f.status}: ${f.statusText}`), d(!1);
1605
+ return;
1606
+ }
1607
+ let p = ve(await f.json()), m = n.responsePath ? ye(p, n.responsePath) : p;
1608
+ if (n.responseMapping && Array.isArray(m)) {
1609
+ let { valueField: e = "value", labelField: t = "label" } = n.responseMapping;
1610
+ _(m.map((n) => ({
1611
+ label: String(ye(n, t) || ""),
1612
+ value: String(ye(n, e) || "")
1613
+ })));
1614
+ } else a(typeof m == "string" ? m : JSON.stringify(m));
1615
+ } catch (e) {
1616
+ if (e instanceof Error && e.name === "AbortError") return;
1617
+ h(e instanceof Error ? e.message : P("renderer.defaultHttpInput.fetchFailed")), console.error("HTTP Input fetch error:", e);
1618
+ } finally {
1619
+ d(!1), H.current = null;
1620
+ }
1621
+ }, [P]);
1622
+ if (D(() => {
1623
+ re.current = L, ie.current = w, ae.current = M, oe.current = n, se.current = G;
1624
+ }, [
1625
+ L,
1626
+ w,
1627
+ M,
1628
+ n,
1629
+ G
1630
+ ]), D(() => () => {
1631
+ H.current && H.current.abort();
1632
+ }, []), D(() => {
1633
+ if (te.current) return;
1634
+ te.current = !0;
1635
+ let e = re.current, t = ie.current, n = se.current, r = e?.url && xe(e.url, t);
1636
+ e?.fetchOnMount && r && n && (n(), e.url && (ne.current = be(e.url).map((e) => `${e}:${String(t[e] ?? "")}`).join("|")));
1637
+ }, []), D(() => {
1638
+ if (!te.current || !ce || ne.current === W || !le) return;
1639
+ let e = setTimeout(() => {
1640
+ G(), ne.current = W;
1641
+ }, 500);
1642
+ return () => clearTimeout(e);
1643
+ }, [
1644
+ W,
1645
+ ce,
1646
+ le,
1647
+ G
1648
+ ]), D(() => {
1649
+ if (!(L?.searchParam && v)) return;
1650
+ let e = setTimeout(() => {
1651
+ G(v);
1652
+ }, 300);
1653
+ return () => clearTimeout(e);
1654
+ }, [
1655
+ v,
1656
+ L?.searchParam,
1657
+ G
1658
+ ]), L?.responseMapping) {
1659
+ let i = Array.isArray(t) ? t[0] : t, c = g.find((e) => e.value === i);
1660
+ if (L.searchParam) {
1661
+ let t = u && L?.showLoading;
1662
+ return /* @__PURE__ */ E(V, {
1663
+ style: Y.container,
1664
+ children: [
1665
+ /* @__PURE__ */ E(R, {
1666
+ style: [Y.label, { color: I.textSecondary }],
1667
+ children: [a || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
1668
+ style: { color: I.error },
1669
+ children: "*"
1670
+ })]
1671
+ }),
1672
+ /* @__PURE__ */ E(B, {
1673
+ style: [
1674
+ Y.trigger,
1675
+ {
1676
+ backgroundColor: I.input,
1677
+ borderColor: I.border
1678
+ },
1679
+ r && { borderColor: I.error }
1680
+ ],
1681
+ onPress: () => C(!0),
1682
+ activeOpacity: .7,
1683
+ children: [t ? /* @__PURE__ */ E(V, {
1684
+ style: Y.loadingTrigger,
1685
+ children: [/* @__PURE__ */ T(j, {
1686
+ size: "small",
1687
+ color: I.primary
1688
+ }), /* @__PURE__ */ T(R, {
1689
+ style: [Y.triggerText, { color: I.textMuted }],
1690
+ numberOfLines: 1,
1691
+ children: c?.label || o || P("renderer.defaultHttpInput.search")
1692
+ })]
1693
+ }) : /* @__PURE__ */ T(R, {
1694
+ style: [
1695
+ Y.triggerText,
1696
+ { color: I.text },
1697
+ !c && { color: I.textMuted }
1698
+ ],
1699
+ numberOfLines: 1,
1700
+ children: c?.label || o || P("renderer.defaultHttpInput.search")
1701
+ }), /* @__PURE__ */ T(R, {
1702
+ style: [Y.arrow, { color: I.textMuted }],
1703
+ children: "▼"
1704
+ })]
1705
+ }),
1706
+ /* @__PURE__ */ T(F, {
1707
+ visible: x,
1708
+ transparent: !0,
1709
+ animationType: "fade",
1710
+ onRequestClose: () => C(!1),
1711
+ children: /* @__PURE__ */ T(B, {
1712
+ style: Y.modalOverlay,
1713
+ activeOpacity: 1,
1714
+ onPress: () => C(!1),
1715
+ children: /* @__PURE__ */ E(B, {
1716
+ style: [Y.modalContent, { backgroundColor: I.card }],
1717
+ activeOpacity: 1,
1718
+ onPress: () => {},
1719
+ children: [
1720
+ /* @__PURE__ */ E(V, {
1721
+ style: [Y.modalHeader, { borderBottomColor: I.separator }],
1722
+ children: [/* @__PURE__ */ T(R, {
1723
+ style: [Y.modalTitle, { color: I.text }],
1724
+ children: a || e.data.name
1725
+ }), /* @__PURE__ */ T(B, {
1726
+ onPress: () => C(!1),
1727
+ children: /* @__PURE__ */ T(R, {
1728
+ style: [Y.closeButton, { color: I.textMuted }],
1729
+ children: "✕"
1730
+ })
1731
+ })]
1732
+ }),
1733
+ /* @__PURE__ */ T(V, {
1734
+ style: Y.searchContainer,
1735
+ children: /* @__PURE__ */ T(z, {
1736
+ style: [Y.searchInput, {
1737
+ backgroundColor: I.muted,
1738
+ borderColor: I.border,
1739
+ color: I.text
1740
+ }],
1741
+ placeholder: P("renderer.defaultHttpInput.search"),
1742
+ placeholderTextColor: I.textMuted,
1743
+ value: v,
1744
+ onChangeText: (e) => {
1745
+ y(e), h(null);
1746
+ },
1747
+ autoFocus: !0,
1748
+ autoCapitalize: "none",
1749
+ autoCorrect: !1
1750
+ })
1751
+ }),
1752
+ u ? /* @__PURE__ */ T(V, {
1753
+ style: Y.loadingContainer,
1754
+ children: /* @__PURE__ */ T(j, {
1755
+ size: "small",
1756
+ color: I.primary
1757
+ })
1758
+ }) : f ? /* @__PURE__ */ E(V, {
1759
+ style: Y.errorContainer,
1760
+ children: [/* @__PURE__ */ T(R, {
1761
+ style: [Y.errorText, { color: I.error }],
1762
+ children: f
1763
+ }), /* @__PURE__ */ T(B, {
1764
+ onPress: () => G(v),
1765
+ style: Y.retryButton,
1766
+ children: /* @__PURE__ */ T(R, {
1767
+ style: [Y.retryButtonText, { color: I.primary }],
1768
+ children: P("renderer.defaultHttpInput.retry")
1769
+ })
1770
+ })]
1771
+ }) : /* @__PURE__ */ T(N, {
1772
+ data: g,
1773
+ keyExtractor: (e) => e.value,
1774
+ style: Y.optionsList,
1775
+ contentContainerStyle: Y.optionsListContent,
1776
+ ListEmptyComponent: /* @__PURE__ */ T(V, {
1777
+ style: Y.emptyContainer,
1778
+ children: /* @__PURE__ */ T(R, {
1779
+ style: [Y.emptyText, { color: I.textMuted }],
1780
+ children: P("renderer.defaultHttpInput.noResults")
1781
+ })
1782
+ }),
1783
+ renderItem: ({ item: e }) => {
1784
+ let t = e.value === i;
1785
+ return /* @__PURE__ */ E(B, {
1786
+ style: [Y.option, t && { backgroundColor: I.primaryLight }],
1787
+ onPress: () => {
1788
+ n(e.value), C(!1);
1789
+ },
1790
+ activeOpacity: .7,
1791
+ children: [/* @__PURE__ */ T(R, {
1792
+ style: [Y.optionText, { color: I.text }],
1793
+ children: e.label
1794
+ }), t && /* @__PURE__ */ T(R, {
1795
+ style: [Y.checkmark, { color: I.primary }],
1796
+ children: "✓"
1797
+ })]
1798
+ });
1799
+ }
1800
+ })
1801
+ ]
1802
+ })
1803
+ })
1804
+ }),
1805
+ r && /* @__PURE__ */ T(R, {
1806
+ style: [Y.error, { color: I.error }],
1807
+ children: r
1808
+ }),
1809
+ s && !r && /* @__PURE__ */ T(R, {
1810
+ style: [Y.helperText, { color: I.textMuted }],
1811
+ children: s
1812
+ })
1813
+ ]
1814
+ });
1815
+ }
1816
+ let l = u && L?.showLoading, d = U.filter((e) => {
1817
+ let t = w[e];
1818
+ return t == null || t === "";
1819
+ }), p = d.map((e) => S(e, M) || e), m = g.length === 0 && !l ? f || (d.length > 0 ? `${P("renderer.defaultHttpInput.waitingForRequiredFields")}: ${p.join(", ")}` : P("renderer.defaultHttpInput.noDataAvailable")) : void 0;
1820
+ return /* @__PURE__ */ E(V, {
1821
+ style: Y.container,
1822
+ children: [
1823
+ /* @__PURE__ */ E(R, {
1824
+ style: [Y.label, { color: I.textSecondary }],
1825
+ children: [a || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
1826
+ style: { color: I.error },
1827
+ children: "*"
1828
+ })]
1829
+ }),
1830
+ /* @__PURE__ */ E(B, {
1831
+ style: [
1832
+ Y.trigger,
1833
+ {
1834
+ backgroundColor: I.input,
1835
+ borderColor: I.border
1836
+ },
1837
+ r && { borderColor: I.error },
1838
+ (l || g.length === 0) && { backgroundColor: I.muted }
1839
+ ],
1840
+ onPress: () => C(!0),
1841
+ disabled: l || g.length === 0,
1842
+ activeOpacity: .7,
1843
+ children: [
1844
+ l && /* @__PURE__ */ T(j, {
1845
+ size: "small",
1846
+ color: I.primary,
1847
+ style: Y.triggerLoader
1848
+ }),
1849
+ /* @__PURE__ */ T(R, {
1850
+ style: [
1851
+ Y.triggerText,
1852
+ { color: I.text },
1853
+ !c && { color: I.textMuted }
1854
+ ],
1855
+ numberOfLines: 1,
1856
+ children: c?.label || o || P("renderer.defaultHttpInput.selectOption")
1857
+ }),
1858
+ /* @__PURE__ */ T(R, {
1859
+ style: [Y.arrow, { color: I.textMuted }],
1860
+ children: "▼"
1861
+ })
1862
+ ]
1863
+ }),
1864
+ m && /* @__PURE__ */ T(R, {
1865
+ style: [Y.disabledMessage, { color: I.error }],
1866
+ children: m
1867
+ }),
1868
+ /* @__PURE__ */ T(F, {
1869
+ visible: x,
1870
+ transparent: !0,
1871
+ animationType: "fade",
1872
+ onRequestClose: () => C(!1),
1873
+ children: /* @__PURE__ */ T(B, {
1874
+ style: Y.modalOverlay,
1875
+ activeOpacity: 1,
1876
+ onPress: () => C(!1),
1877
+ children: /* @__PURE__ */ E(B, {
1878
+ style: [Y.modalContent, { backgroundColor: I.card }],
1879
+ activeOpacity: 1,
1880
+ onPress: () => {},
1881
+ children: [/* @__PURE__ */ E(V, {
1882
+ style: [Y.modalHeader, { borderBottomColor: I.separator }],
1883
+ children: [/* @__PURE__ */ T(R, {
1884
+ style: [Y.modalTitle, { color: I.text }],
1885
+ children: a || e.data.name
1886
+ }), /* @__PURE__ */ T(B, {
1887
+ onPress: () => C(!1),
1888
+ children: /* @__PURE__ */ T(R, {
1889
+ style: [Y.closeButton, { color: I.textMuted }],
1890
+ children: "✕"
1891
+ })
1892
+ })]
1893
+ }), /* @__PURE__ */ T(N, {
1894
+ data: g,
1895
+ keyExtractor: (e) => e.value,
1896
+ style: Y.optionsList,
1897
+ contentContainerStyle: Y.optionsListContent,
1898
+ renderItem: ({ item: e }) => {
1899
+ let t = e.value === i;
1900
+ return /* @__PURE__ */ E(B, {
1901
+ style: [Y.option, t && { backgroundColor: I.primaryLight }],
1902
+ onPress: () => {
1903
+ n(e.value), C(!1);
1904
+ },
1905
+ activeOpacity: .7,
1906
+ children: [/* @__PURE__ */ T(R, {
1907
+ style: [Y.optionText, { color: I.text }],
1908
+ children: e.label
1909
+ }), t && /* @__PURE__ */ T(R, {
1910
+ style: [Y.checkmark, { color: I.primary }],
1911
+ children: "✓"
1912
+ })]
1913
+ });
1914
+ }
1915
+ })]
1916
+ })
1917
+ })
1918
+ }),
1919
+ r && /* @__PURE__ */ T(R, {
1920
+ style: [Y.error, { color: I.error }],
1921
+ children: r
1922
+ }),
1923
+ s && !r && /* @__PURE__ */ T(R, {
1924
+ style: [Y.helperText, { color: I.textMuted }],
1925
+ children: s
1926
+ })
1927
+ ]
1928
+ });
1929
+ }
1930
+ return /* @__PURE__ */ E(V, {
1931
+ style: Y.container,
1932
+ children: [
1933
+ /* @__PURE__ */ E(R, {
1934
+ style: [Y.label, { color: I.textSecondary }],
1935
+ children: [a || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
1936
+ style: { color: I.error },
1937
+ children: "*"
1938
+ })]
1939
+ }),
1940
+ /* @__PURE__ */ T(z, {
1941
+ style: [Y.input, {
1942
+ backgroundColor: I.muted,
1943
+ borderColor: I.border,
1944
+ color: I.textMuted
1945
+ }],
1946
+ value: typeof t == "string" ? t : JSON.stringify(t),
1947
+ editable: !1
1948
+ }),
1949
+ r && /* @__PURE__ */ T(R, {
1950
+ style: [Y.error, { color: I.error }],
1951
+ children: r
1952
+ }),
1953
+ s && !r && /* @__PURE__ */ T(R, {
1954
+ style: [Y.helperText, { color: I.textMuted }],
1955
+ children: s
1956
+ })
1957
+ ]
1958
+ });
1959
+ }, Y = L.create({
1960
+ arrow: { fontSize: 12 },
1961
+ checkmark: {
1962
+ fontSize: 18,
1963
+ fontWeight: "700"
1964
+ },
1965
+ closeButton: {
1966
+ fontSize: 24,
1967
+ fontWeight: "300"
1968
+ },
1969
+ container: { marginBottom: 16 },
1970
+ disabledMessage: {
1971
+ fontSize: 12,
1972
+ marginTop: 4
1973
+ },
1974
+ emptyContainer: {
1975
+ alignItems: "center",
1976
+ paddingVertical: 24
1977
+ },
1978
+ emptyText: { fontSize: 14 },
1979
+ error: {
1980
+ fontSize: 12,
1981
+ marginTop: 4
1982
+ },
1983
+ errorContainer: {
1984
+ alignItems: "center",
1985
+ paddingVertical: 16
1986
+ },
1987
+ errorText: {
1988
+ fontSize: 14,
1989
+ textAlign: "center"
1990
+ },
1991
+ helperText: {
1992
+ fontSize: 12,
1993
+ marginTop: 4
1994
+ },
1995
+ input: {
1996
+ borderRadius: 6,
1997
+ borderWidth: 1,
1998
+ fontSize: 14,
1999
+ paddingHorizontal: 12,
2000
+ paddingVertical: 10
2001
+ },
2002
+ label: {
2003
+ fontSize: 14,
2004
+ fontWeight: "500",
2005
+ marginBottom: 8
2006
+ },
2007
+ loadingContainer: {
2008
+ alignItems: "center",
2009
+ paddingVertical: 24
2010
+ },
2011
+ loadingTrigger: {
2012
+ alignItems: "center",
2013
+ flex: 1,
2014
+ flexDirection: "row",
2015
+ gap: 8
2016
+ },
2017
+ modalContent: {
2018
+ borderRadius: 12,
2019
+ maxHeight: "80%",
2020
+ padding: 16,
2021
+ width: "90%"
2022
+ },
2023
+ modalHeader: {
2024
+ alignItems: "center",
2025
+ borderBottomWidth: 1,
2026
+ flexDirection: "row",
2027
+ justifyContent: "space-between",
2028
+ marginBottom: 12,
2029
+ paddingBottom: 12
2030
+ },
2031
+ modalOverlay: {
2032
+ alignItems: "center",
2033
+ backgroundColor: "rgba(0, 0, 0, 0.5)",
2034
+ flex: 1,
2035
+ justifyContent: "center"
2036
+ },
2037
+ modalTitle: {
2038
+ fontSize: 18,
2039
+ fontWeight: "600"
2040
+ },
2041
+ option: {
2042
+ alignItems: "center",
2043
+ borderRadius: 6,
2044
+ flexDirection: "row",
2045
+ justifyContent: "space-between",
2046
+ paddingHorizontal: 12,
2047
+ paddingVertical: 12
2048
+ },
2049
+ optionsList: {
2050
+ flexGrow: 0,
2051
+ flexShrink: 1
2052
+ },
2053
+ optionsListContent: { flexGrow: 0 },
2054
+ optionText: {
2055
+ flex: 1,
2056
+ fontSize: 14
2057
+ },
2058
+ retryButton: { marginTop: 12 },
2059
+ retryButtonText: {
2060
+ fontSize: 14,
2061
+ textDecorationLine: "underline"
2062
+ },
2063
+ searchContainer: { marginBottom: 12 },
2064
+ searchInput: {
2065
+ borderRadius: 6,
2066
+ borderWidth: 1,
2067
+ fontSize: 14,
2068
+ paddingHorizontal: 12,
2069
+ paddingVertical: 10
2070
+ },
2071
+ trigger: {
2072
+ alignItems: "center",
2073
+ borderRadius: 6,
2074
+ borderWidth: 1,
2075
+ flexDirection: "row",
2076
+ justifyContent: "space-between",
2077
+ paddingHorizontal: 12,
2078
+ paddingVertical: 10
2079
+ },
2080
+ triggerLoader: { marginRight: 8 },
2081
+ triggerText: {
2082
+ flex: 1,
2083
+ fontSize: 14
2084
+ }
2085
+ }), we = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o, name: s }) => {
2086
+ let { colors: c } = m(), [l, u] = A(t?.toString() ?? "");
2087
+ return D(() => {
2088
+ u(t?.toString() ?? "");
2089
+ }, [t]), /* @__PURE__ */ E(V, {
2090
+ style: Te.container,
2091
+ children: [
2092
+ /* @__PURE__ */ E(R, {
2093
+ style: [Te.label, { color: c.textSecondary }],
2094
+ children: [i || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
2095
+ style: { color: c.error },
2096
+ children: "*"
2097
+ })]
2098
+ }),
2099
+ /* @__PURE__ */ T(z, {
2100
+ style: [
2101
+ Te.input,
2102
+ {
2103
+ backgroundColor: c.input,
2104
+ borderColor: c.border,
2105
+ color: c.text
2106
+ },
2107
+ r && { borderColor: c.error }
2108
+ ],
2109
+ value: l,
2110
+ onChangeText: (e) => {
2111
+ if (u(e), e.trim() === "") {
2112
+ n(null);
2113
+ return;
2114
+ }
2115
+ let t = Number(e);
2116
+ Number.isNaN(t) || n(t);
2117
+ },
2118
+ placeholder: a,
2119
+ placeholderTextColor: c.textMuted,
2120
+ keyboardType: "numeric",
2121
+ accessibilityLabel: s
2122
+ }),
2123
+ r && /* @__PURE__ */ T(R, {
2124
+ style: [Te.error, { color: c.error }],
2125
+ children: r
2126
+ }),
2127
+ o && !r && /* @__PURE__ */ T(R, {
2128
+ style: [Te.helperText, { color: c.textMuted }],
2129
+ children: o
2130
+ })
2131
+ ]
2132
+ });
2133
+ }, Te = L.create({
2134
+ container: { marginBottom: 16 },
2135
+ error: {
2136
+ fontSize: 12,
2137
+ marginTop: 4
2138
+ },
2139
+ helperText: {
2140
+ fontSize: 12,
2141
+ marginTop: 4
2142
+ },
2143
+ input: {
2144
+ borderRadius: 6,
2145
+ borderWidth: 1,
2146
+ fontSize: 14,
2147
+ paddingHorizontal: 12,
2148
+ paddingVertical: 8
2149
+ },
2150
+ label: {
2151
+ fontSize: 14,
2152
+ fontWeight: "500",
2153
+ marginBottom: 8
2154
+ }
2155
+ }), Ee = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o, name: s }) => {
2156
+ let { colors: c } = m(), [l, u] = A(!1);
2157
+ return /* @__PURE__ */ E(V, {
2158
+ style: De.container,
2159
+ children: [
2160
+ /* @__PURE__ */ E(R, {
2161
+ style: [De.label, { color: c.textSecondary }],
2162
+ children: [i || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
2163
+ style: { color: c.error },
2164
+ children: "*"
2165
+ })]
2166
+ }),
2167
+ /* @__PURE__ */ E(V, {
2168
+ style: De.inputWrapper,
2169
+ children: [/* @__PURE__ */ T(z, {
2170
+ style: [
2171
+ De.input,
2172
+ {
2173
+ backgroundColor: c.input,
2174
+ borderColor: c.border,
2175
+ color: c.text
2176
+ },
2177
+ r && { borderColor: c.error }
2178
+ ],
2179
+ value: t ?? "",
2180
+ onChangeText: n,
2181
+ placeholder: a,
2182
+ placeholderTextColor: c.textMuted,
2183
+ secureTextEntry: !l,
2184
+ accessibilityLabel: s
2185
+ }), /* @__PURE__ */ T(B, {
2186
+ style: De.toggleButton,
2187
+ onPress: () => u(!l),
2188
+ activeOpacity: .7,
2189
+ children: /* @__PURE__ */ T(R, {
2190
+ style: [De.toggleText, { color: c.primary }],
2191
+ children: l ? "Hide" : "Show"
2192
+ })
2193
+ })]
2194
+ }),
2195
+ r && /* @__PURE__ */ T(R, {
2196
+ style: [De.error, { color: c.error }],
2197
+ children: r
2198
+ }),
2199
+ o && !r && /* @__PURE__ */ T(R, {
2200
+ style: [De.helperText, { color: c.textMuted }],
2201
+ children: o
2202
+ })
2203
+ ]
2204
+ });
2205
+ }, De = L.create({
2206
+ container: { marginBottom: 16 },
2207
+ error: {
2208
+ fontSize: 12,
2209
+ marginTop: 4
2210
+ },
2211
+ helperText: {
2212
+ fontSize: 12,
2213
+ marginTop: 4
2214
+ },
2215
+ input: {
2216
+ borderRadius: 6,
2217
+ borderWidth: 1,
2218
+ flex: 1,
2219
+ fontSize: 14,
2220
+ paddingHorizontal: 12,
2221
+ paddingVertical: 8
2222
+ },
2223
+ inputWrapper: {
2224
+ alignItems: "center",
2225
+ flexDirection: "row",
2226
+ position: "relative"
2227
+ },
2228
+ label: {
2229
+ fontSize: 14,
2230
+ fontWeight: "500",
2231
+ marginBottom: 8
2232
+ },
2233
+ toggleButton: {
2234
+ paddingHorizontal: 12,
2235
+ paddingVertical: 8,
2236
+ position: "absolute",
2237
+ right: 0
2238
+ },
2239
+ toggleText: {
2240
+ fontSize: 12,
2241
+ fontWeight: "600"
2242
+ }
2243
+ }), Oe = ({ node: e, value: t, setValue: n, error: r, label: i, helperText: a }) => {
2244
+ let o = b(), { colors: s } = m(), c = e.data.options || [], l = t || "", u = e.data.variant === "card", d = (e) => {
2245
+ n(e);
2246
+ };
2247
+ return /* @__PURE__ */ E(V, {
2248
+ style: X.container,
2249
+ children: [
2250
+ /* @__PURE__ */ E(R, {
2251
+ style: [X.label, { color: s.textSecondary }],
2252
+ children: [i || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
2253
+ style: { color: s.error },
2254
+ children: "*"
2255
+ })]
2256
+ }),
2257
+ c.map((e) => {
2258
+ let t = l === e.value, n = o(e.label) || e.value, r = o(e.description);
2259
+ return u ? /* @__PURE__ */ E(B, {
2260
+ style: [
2261
+ X.card,
2262
+ {
2263
+ backgroundColor: s.input,
2264
+ borderColor: s.border
2265
+ },
2266
+ t && {
2267
+ backgroundColor: `${s.primary}10`,
2268
+ borderColor: s.primary
2269
+ },
2270
+ e.disabled && { opacity: .5 }
2271
+ ],
2272
+ onPress: () => d(e.value),
2273
+ disabled: e.disabled,
2274
+ activeOpacity: .7,
2275
+ children: [
2276
+ /* @__PURE__ */ T(V, {
2277
+ style: [
2278
+ X.radio,
2279
+ {
2280
+ backgroundColor: s.input,
2281
+ borderColor: s.border
2282
+ },
2283
+ t && { borderColor: s.primary }
2284
+ ],
2285
+ children: t && /* @__PURE__ */ T(V, { style: [X.radioInner, { backgroundColor: s.primary }] })
2286
+ }),
2287
+ e.image && /* @__PURE__ */ T(P, {
2288
+ source: { uri: e.image },
2289
+ style: X.cardImage
2290
+ }),
2291
+ /* @__PURE__ */ E(V, {
2292
+ style: X.cardTextContainer,
2293
+ children: [/* @__PURE__ */ T(R, {
2294
+ style: [X.cardLabel, { color: s.textSecondary }],
2295
+ children: n
2296
+ }), r && /* @__PURE__ */ T(R, {
2297
+ style: [X.cardDescription, { color: s.textMuted }],
2298
+ children: r
2299
+ })]
2300
+ })
2301
+ ]
2302
+ }, e.value) : /* @__PURE__ */ E(B, {
2303
+ style: X.option,
2304
+ onPress: () => d(e.value),
2305
+ disabled: e.disabled,
2306
+ activeOpacity: .7,
2307
+ children: [
2308
+ /* @__PURE__ */ T(V, {
2309
+ style: [
2310
+ X.radio,
2311
+ {
2312
+ backgroundColor: s.input,
2313
+ borderColor: s.border
2314
+ },
2315
+ t && { borderColor: s.primary }
2316
+ ],
2317
+ children: t && /* @__PURE__ */ T(V, { style: [X.radioInner, { backgroundColor: s.primary }] })
2318
+ }),
2319
+ e.image && /* @__PURE__ */ T(P, {
2320
+ source: { uri: e.image },
2321
+ style: X.image
2322
+ }),
2323
+ /* @__PURE__ */ E(V, {
2324
+ style: X.optionTextContainer,
2325
+ children: [/* @__PURE__ */ T(R, {
2326
+ style: [
2327
+ X.optionLabel,
2328
+ { color: s.textSecondary },
2329
+ e.disabled && { color: s.textMuted }
2330
+ ],
2331
+ children: n
2332
+ }), r && /* @__PURE__ */ T(R, {
2333
+ style: [X.optionDescription, { color: s.textMuted }],
2334
+ children: r
2335
+ })]
2336
+ })
2337
+ ]
2338
+ }, e.value);
2339
+ }),
2340
+ r && /* @__PURE__ */ T(R, {
2341
+ style: [X.error, { color: s.error }],
2342
+ children: r
2343
+ }),
2344
+ a && !r && /* @__PURE__ */ T(R, {
2345
+ style: [X.helperText, { color: s.textMuted }],
2346
+ children: a
2347
+ })
2348
+ ]
2349
+ });
2350
+ }, X = L.create({
2351
+ card: {
2352
+ alignItems: "flex-start",
2353
+ borderRadius: 8,
2354
+ borderWidth: 1,
2355
+ flexDirection: "row",
2356
+ marginBottom: 8,
2357
+ padding: 12
2358
+ },
2359
+ cardDescription: {
2360
+ fontSize: 12,
2361
+ marginTop: 2
2362
+ },
2363
+ cardImage: {
2364
+ borderRadius: 4,
2365
+ height: 40,
2366
+ marginRight: 12,
2367
+ width: 40
2368
+ },
2369
+ cardLabel: {
2370
+ fontSize: 14,
2371
+ fontWeight: "500"
2372
+ },
2373
+ cardTextContainer: { flex: 1 },
2374
+ container: { marginBottom: 16 },
2375
+ error: {
2376
+ fontSize: 12,
2377
+ marginTop: 4
2378
+ },
2379
+ helperText: {
2380
+ fontSize: 12,
2381
+ marginTop: 4
2382
+ },
2383
+ image: {
2384
+ borderRadius: 4,
2385
+ height: 32,
2386
+ marginRight: 8,
2387
+ width: 32
2388
+ },
2389
+ label: {
2390
+ fontSize: 14,
2391
+ fontWeight: "500",
2392
+ marginBottom: 8
2393
+ },
2394
+ option: {
2395
+ alignItems: "center",
2396
+ flexDirection: "row",
2397
+ marginBottom: 8
2398
+ },
2399
+ optionDescription: {
2400
+ fontSize: 12,
2401
+ marginTop: 2
2402
+ },
2403
+ optionLabel: { fontSize: 14 },
2404
+ optionTextContainer: { flex: 1 },
2405
+ radio: {
2406
+ alignItems: "center",
2407
+ borderRadius: 10,
2408
+ borderWidth: 2,
2409
+ height: 20,
2410
+ justifyContent: "center",
2411
+ marginRight: 12,
2412
+ width: 20
2413
+ },
2414
+ radioInner: {
2415
+ borderRadius: 5,
2416
+ height: 10,
2417
+ width: 10
2418
+ }
2419
+ }), ke = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o }) => {
2420
+ let [s, c] = A(!1), l = b(), { colors: u } = m(), d = e.data.options || [], f = e.data.multiple, p = Array.isArray(t) ? t : t ? [t] : [], h = (e) => {
2421
+ f ? n(p.includes(e) ? p.filter((t) => t !== e) : [...p, e]) : (n(e), c(!1));
2422
+ };
2423
+ return /* @__PURE__ */ E(V, {
2424
+ style: Z.container,
2425
+ children: [
2426
+ /* @__PURE__ */ E(R, {
2427
+ style: [Z.label, { color: u.textSecondary }],
2428
+ children: [i || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
2429
+ style: { color: u.error },
2430
+ children: "*"
2431
+ })]
2432
+ }),
2433
+ /* @__PURE__ */ E(B, {
2434
+ style: [
2435
+ Z.trigger,
2436
+ {
2437
+ backgroundColor: u.input,
2438
+ borderColor: u.border
2439
+ },
2440
+ r && { borderColor: u.error }
2441
+ ],
2442
+ onPress: () => c(!0),
2443
+ activeOpacity: .7,
2444
+ children: [/* @__PURE__ */ T(R, {
2445
+ style: [
2446
+ Z.triggerText,
2447
+ { color: u.text },
2448
+ p.length === 0 && { color: u.textMuted }
2449
+ ],
2450
+ children: (() => {
2451
+ if (p.length === 0) return a || "Select...";
2452
+ if (f) return d.filter((e) => p.includes(e.value)).map((e) => l(e.label) || e.value).join(", ");
2453
+ let e = d.find((e) => e.value === p[0]);
2454
+ return e ? l(e.label) || e.value : a || "Select...";
2455
+ })()
2456
+ }), /* @__PURE__ */ T(R, {
2457
+ style: [Z.arrow, { color: u.textMuted }],
2458
+ children: "▼"
2459
+ })]
2460
+ }),
2461
+ /* @__PURE__ */ T(F, {
2462
+ visible: s,
2463
+ transparent: !0,
2464
+ animationType: "fade",
2465
+ onRequestClose: () => c(!1),
2466
+ children: /* @__PURE__ */ T(B, {
2467
+ style: Z.modalOverlay,
2468
+ activeOpacity: 1,
2469
+ onPress: () => c(!1),
2470
+ children: /* @__PURE__ */ E(V, {
2471
+ style: [Z.modalContent, { backgroundColor: u.card }],
2472
+ onStartShouldSetResponder: () => !0,
2473
+ children: [
2474
+ /* @__PURE__ */ E(V, {
2475
+ style: [Z.modalHeader, { borderBottomColor: u.border }],
2476
+ children: [/* @__PURE__ */ T(R, {
2477
+ style: [Z.modalTitle, { color: u.text }],
2478
+ children: i || e.data.name
2479
+ }), /* @__PURE__ */ T(B, {
2480
+ onPress: () => c(!1),
2481
+ children: /* @__PURE__ */ T(R, {
2482
+ style: [Z.closeButton, { color: u.textMuted }],
2483
+ children: "✕"
2484
+ })
2485
+ })]
2486
+ }),
2487
+ /* @__PURE__ */ T(I, {
2488
+ style: Z.optionsList,
2489
+ children: d.map((e) => {
2490
+ let t = p.includes(e.value);
2491
+ return /* @__PURE__ */ E(B, {
2492
+ style: [Z.option, t && { backgroundColor: `${u.primary}20` }],
2493
+ onPress: () => h(e.value),
2494
+ disabled: e.disabled,
2495
+ activeOpacity: .7,
2496
+ children: [/* @__PURE__ */ T(R, {
2497
+ style: [
2498
+ Z.optionText,
2499
+ { color: u.textSecondary },
2500
+ e.disabled && { color: u.textMuted }
2501
+ ],
2502
+ children: l(e.label) || e.value
2503
+ }), t && /* @__PURE__ */ T(R, {
2504
+ style: [Z.checkmark, { color: u.primary }],
2505
+ children: "✓"
2506
+ })]
2507
+ }, e.value);
2508
+ })
2509
+ }),
2510
+ f && /* @__PURE__ */ T(B, {
2511
+ style: [Z.doneButton, { backgroundColor: u.primary }],
2512
+ onPress: () => c(!1),
2513
+ children: /* @__PURE__ */ T(R, {
2514
+ style: Z.doneButtonText,
2515
+ children: "Done"
2516
+ })
2517
+ })
2518
+ ]
2519
+ })
2520
+ })
2521
+ }),
2522
+ r && /* @__PURE__ */ T(R, {
2523
+ style: [Z.error, { color: u.error }],
2524
+ children: r
2525
+ }),
2526
+ o && !r && /* @__PURE__ */ T(R, {
2527
+ style: [Z.helperText, { color: u.textMuted }],
2528
+ children: o
2529
+ })
2530
+ ]
2531
+ });
2532
+ }, Z = L.create({
2533
+ arrow: { fontSize: 12 },
2534
+ checkmark: {
2535
+ fontSize: 18,
2536
+ fontWeight: "700"
2537
+ },
2538
+ closeButton: {
2539
+ fontSize: 24,
2540
+ fontWeight: "300"
2541
+ },
2542
+ container: { marginBottom: 16 },
2543
+ doneButton: {
2544
+ alignItems: "center",
2545
+ borderRadius: 6,
2546
+ marginTop: 12,
2547
+ paddingVertical: 12
2548
+ },
2549
+ doneButtonText: {
2550
+ color: "#FFFFFF",
2551
+ fontSize: 16,
2552
+ fontWeight: "600"
2553
+ },
2554
+ error: {
2555
+ fontSize: 12,
2556
+ marginTop: 4
2557
+ },
2558
+ helperText: {
2559
+ fontSize: 12,
2560
+ marginTop: 4
2561
+ },
2562
+ label: {
2563
+ fontSize: 14,
2564
+ fontWeight: "500",
2565
+ marginBottom: 8
2566
+ },
2567
+ modalContent: {
2568
+ borderRadius: 12,
2569
+ maxHeight: "80%",
2570
+ padding: 16,
2571
+ width: "90%"
2572
+ },
2573
+ modalHeader: {
2574
+ alignItems: "center",
2575
+ borderBottomWidth: 1,
2576
+ flexDirection: "row",
2577
+ justifyContent: "space-between",
2578
+ marginBottom: 12,
2579
+ paddingBottom: 12
2580
+ },
2581
+ modalOverlay: {
2582
+ alignItems: "center",
2583
+ backgroundColor: "rgba(0, 0, 0, 0.5)",
2584
+ flex: 1,
2585
+ justifyContent: "center"
2586
+ },
2587
+ modalTitle: {
2588
+ fontSize: 18,
2589
+ fontWeight: "600"
2590
+ },
2591
+ option: {
2592
+ alignItems: "center",
2593
+ borderRadius: 6,
2594
+ flexDirection: "row",
2595
+ justifyContent: "space-between",
2596
+ paddingHorizontal: 12,
2597
+ paddingVertical: 12
2598
+ },
2599
+ optionsList: { maxHeight: 300 },
2600
+ optionText: { fontSize: 14 },
2601
+ trigger: {
2602
+ alignItems: "center",
2603
+ borderRadius: 6,
2604
+ borderWidth: 1,
2605
+ flexDirection: "row",
2606
+ justifyContent: "space-between",
2607
+ paddingHorizontal: 12,
2608
+ paddingVertical: 10
2609
+ },
2610
+ triggerText: {
2611
+ flex: 1,
2612
+ fontSize: 14
2613
+ }
2614
+ }), Ae = ({ node: e, value: t, setValue: n, error: r, label: i, helperText: a }) => {
2615
+ let { colors: o } = m(), s = !!t;
2616
+ return /* @__PURE__ */ E(V, {
2617
+ style: je.container,
2618
+ children: [
2619
+ /* @__PURE__ */ E(V, {
2620
+ style: je.row,
2621
+ children: [/* @__PURE__ */ T(V, {
2622
+ style: je.labelContainer,
2623
+ children: /* @__PURE__ */ E(R, {
2624
+ style: [je.label, { color: o.textSecondary }],
2625
+ children: [i || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
2626
+ style: { color: o.error },
2627
+ children: "*"
2628
+ })]
2629
+ })
2630
+ }), /* @__PURE__ */ T(te, {
2631
+ trackColor: {
2632
+ false: o.border,
2633
+ true: `${o.primary}80`
2634
+ },
2635
+ thumbColor: s ? o.primary : o.card,
2636
+ ios_backgroundColor: o.border,
2637
+ onValueChange: n,
2638
+ value: s
2639
+ })]
2640
+ }),
2641
+ r && /* @__PURE__ */ T(R, {
2642
+ style: [je.error, { color: o.error }],
2643
+ children: r
2644
+ }),
2645
+ a && !r && /* @__PURE__ */ T(R, {
2646
+ style: [je.helperText, { color: o.textMuted }],
2647
+ children: a
2648
+ })
2649
+ ]
2650
+ });
2651
+ }, je = L.create({
2652
+ container: { marginBottom: 16 },
2653
+ error: {
2654
+ fontSize: 12,
2655
+ marginTop: 4
2656
+ },
2657
+ helperText: {
2658
+ fontSize: 12,
2659
+ marginTop: 4
2660
+ },
2661
+ label: {
2662
+ fontSize: 14,
2663
+ fontWeight: "500"
2664
+ },
2665
+ labelContainer: { flex: 1 },
2666
+ row: {
2667
+ alignItems: "center",
2668
+ flexDirection: "row",
2669
+ justifyContent: "space-between"
2670
+ }
2671
+ }), Me = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o, name: s }) => {
2672
+ let { colors: c } = m();
2673
+ return /* @__PURE__ */ E(V, {
2674
+ style: Ne.container,
2675
+ children: [
2676
+ /* @__PURE__ */ E(R, {
2677
+ style: [Ne.label, { color: c.textSecondary }],
2678
+ children: [i || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
2679
+ style: { color: c.error },
2680
+ children: "*"
2681
+ })]
2682
+ }),
2683
+ /* @__PURE__ */ T(z, {
2684
+ style: [
2685
+ Ne.textarea,
2686
+ {
2687
+ backgroundColor: c.input,
2688
+ borderColor: c.border,
2689
+ color: c.text
2690
+ },
2691
+ r && { borderColor: c.error }
2692
+ ],
2693
+ value: t ?? "",
2694
+ onChangeText: n,
2695
+ placeholder: a,
2696
+ placeholderTextColor: c.textMuted,
2697
+ multiline: !0,
2698
+ numberOfLines: 4,
2699
+ textAlignVertical: "top",
2700
+ accessibilityLabel: s
2701
+ }),
2702
+ r && /* @__PURE__ */ T(R, {
2703
+ style: [Ne.error, { color: c.error }],
2704
+ children: r
2705
+ }),
2706
+ o && !r && /* @__PURE__ */ T(R, {
2707
+ style: [Ne.helperText, { color: c.textMuted }],
2708
+ children: o
2709
+ })
2710
+ ]
2711
+ });
2712
+ }, Ne = L.create({
2713
+ container: { marginBottom: 16 },
2714
+ error: {
2715
+ fontSize: 12,
2716
+ marginTop: 4
2717
+ },
2718
+ helperText: {
2719
+ fontSize: 12,
2720
+ marginTop: 4
2721
+ },
2722
+ label: {
2723
+ fontSize: 14,
2724
+ fontWeight: "500",
2725
+ marginBottom: 8
2726
+ },
2727
+ textarea: {
2728
+ borderRadius: 6,
2729
+ borderWidth: 1,
2730
+ fontSize: 14,
2731
+ minHeight: 100,
2732
+ paddingHorizontal: 12,
2733
+ paddingVertical: 8
2734
+ }
2735
+ }), Pe = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o, name: s }) => {
2736
+ let { colors: c } = m();
2737
+ return /* @__PURE__ */ E(V, {
2738
+ style: Fe.container,
2739
+ children: [
2740
+ /* @__PURE__ */ E(R, {
2741
+ style: [Fe.label, { color: c.textSecondary }],
2742
+ children: [i || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
2743
+ style: { color: c.error },
2744
+ children: "*"
2745
+ })]
2746
+ }),
2747
+ /* @__PURE__ */ T(z, {
2748
+ style: [
2749
+ Fe.input,
2750
+ {
2751
+ backgroundColor: c.input,
2752
+ borderColor: c.border,
2753
+ color: c.text
2754
+ },
2755
+ r && { borderColor: c.error }
2756
+ ],
2757
+ value: t ?? "",
2758
+ onChangeText: n,
2759
+ placeholder: a,
2760
+ placeholderTextColor: c.textMuted,
2761
+ accessibilityLabel: s
2762
+ }),
2763
+ r && /* @__PURE__ */ T(R, {
2764
+ style: [Fe.error, { color: c.error }],
2765
+ children: r
2766
+ }),
2767
+ o && !r && /* @__PURE__ */ T(R, {
2768
+ style: [Fe.helperText, { color: c.textMuted }],
2769
+ children: o
2770
+ })
2771
+ ]
2772
+ });
2773
+ }, Fe = L.create({
2774
+ container: { marginBottom: 16 },
2775
+ error: {
2776
+ fontSize: 12,
2777
+ marginTop: 4
2778
+ },
2779
+ helperText: {
2780
+ fontSize: 12,
2781
+ marginTop: 4
2782
+ },
2783
+ input: {
2784
+ borderRadius: 6,
2785
+ borderWidth: 1,
2786
+ fontSize: 14,
2787
+ paddingHorizontal: 12,
2788
+ paddingVertical: 8
2789
+ },
2790
+ label: {
2791
+ fontSize: 14,
2792
+ fontWeight: "500",
2793
+ marginBottom: 8
2794
+ }
2795
+ }), Ie = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o }) => {
2796
+ let [s, c] = A(!1), { colors: l } = m(), u = (t || "").split(":"), d = Number.parseInt(u[0], 10), f = Number.parseInt(u[1], 10), p = Number.isNaN(d) ? 0 : d, h = Number.isNaN(f) ? 0 : f, [g, _] = A(p || 0), [v, y] = A(h || 0), b = k(null), x = k(null), S = Array.from({ length: 24 }, (e, t) => t), C = Array.from({ length: 60 }, (e, t) => t), w = () => t || a || "Select time", D = ee(() => {
2797
+ n(`${String(g).padStart(2, "0")}:${String(v).padStart(2, "0")}`), c(!1);
2798
+ }, [
2799
+ g,
2800
+ v,
2801
+ n
2802
+ ]);
2803
+ return /* @__PURE__ */ E(V, {
2804
+ style: Q.container,
2805
+ children: [
2806
+ /* @__PURE__ */ E(R, {
2807
+ style: [Q.label, { color: l.textSecondary }],
2808
+ children: [i || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
2809
+ style: { color: l.error },
2810
+ children: "*"
2811
+ })]
2812
+ }),
2813
+ /* @__PURE__ */ E(B, {
2814
+ style: [
2815
+ Q.trigger,
2816
+ {
2817
+ backgroundColor: l.input,
2818
+ borderColor: l.border
2819
+ },
2820
+ r && { borderColor: l.error }
2821
+ ],
2822
+ onPress: () => {
2823
+ _(p || 0), y(h || 0), c(!0);
2824
+ },
2825
+ activeOpacity: .7,
2826
+ children: [/* @__PURE__ */ T(R, {
2827
+ style: [
2828
+ Q.triggerText,
2829
+ { color: l.text },
2830
+ !t && { color: l.textMuted }
2831
+ ],
2832
+ numberOfLines: 1,
2833
+ children: w()
2834
+ }), /* @__PURE__ */ T(R, {
2835
+ style: Q.icon,
2836
+ children: "🕐"
2837
+ })]
2838
+ }),
2839
+ /* @__PURE__ */ T(F, {
2840
+ visible: s,
2841
+ transparent: !0,
2842
+ animationType: "fade",
2843
+ onRequestClose: () => c(!1),
2844
+ children: /* @__PURE__ */ T(B, {
2845
+ style: Q.modalOverlay,
2846
+ activeOpacity: 1,
2847
+ onPress: () => c(!1),
2848
+ children: /* @__PURE__ */ E(B, {
2849
+ style: [Q.modalContent, { backgroundColor: l.card }],
2850
+ activeOpacity: 1,
2851
+ onPress: () => {},
2852
+ children: [
2853
+ /* @__PURE__ */ E(V, {
2854
+ style: [Q.modalHeader, { borderBottomColor: l.separator }],
2855
+ children: [/* @__PURE__ */ T(R, {
2856
+ style: [Q.modalTitle, { color: l.text }],
2857
+ children: i || e.data.name
2858
+ }), /* @__PURE__ */ T(B, {
2859
+ onPress: () => c(!1),
2860
+ children: /* @__PURE__ */ T(R, {
2861
+ style: [Q.closeButton, { color: l.textMuted }],
2862
+ children: "✕"
2863
+ })
2864
+ })]
2865
+ }),
2866
+ /* @__PURE__ */ E(V, {
2867
+ style: Q.pickerContainer,
2868
+ children: [
2869
+ /* @__PURE__ */ E(V, {
2870
+ style: Q.pickerColumn,
2871
+ children: [/* @__PURE__ */ T(R, {
2872
+ style: [Q.pickerLabel, { color: l.textMuted }],
2873
+ children: "Hour"
2874
+ }), /* @__PURE__ */ T(I, {
2875
+ ref: b,
2876
+ style: Q.picker,
2877
+ contentContainerStyle: Q.pickerContent,
2878
+ showsVerticalScrollIndicator: !1,
2879
+ children: S.map((e) => /* @__PURE__ */ T(B, {
2880
+ style: [Q.pickerItem, g === e && { backgroundColor: l.primary }],
2881
+ onPress: () => _(e),
2882
+ activeOpacity: .7,
2883
+ children: /* @__PURE__ */ T(R, {
2884
+ style: [
2885
+ Q.pickerItemText,
2886
+ { color: l.text },
2887
+ g === e && {
2888
+ color: l.background,
2889
+ fontWeight: "600"
2890
+ }
2891
+ ],
2892
+ children: String(e).padStart(2, "0")
2893
+ })
2894
+ }, e))
2895
+ })]
2896
+ }),
2897
+ /* @__PURE__ */ T(R, {
2898
+ style: [Q.pickerSeparator, { color: l.text }],
2899
+ children: ":"
2900
+ }),
2901
+ /* @__PURE__ */ E(V, {
2902
+ style: Q.pickerColumn,
2903
+ children: [/* @__PURE__ */ T(R, {
2904
+ style: [Q.pickerLabel, { color: l.textMuted }],
2905
+ children: "Minute"
2906
+ }), /* @__PURE__ */ T(I, {
2907
+ ref: x,
2908
+ style: Q.picker,
2909
+ contentContainerStyle: Q.pickerContent,
2910
+ showsVerticalScrollIndicator: !1,
2911
+ children: C.map((e) => /* @__PURE__ */ T(B, {
2912
+ style: [Q.pickerItem, v === e && { backgroundColor: l.primary }],
2913
+ onPress: () => y(e),
2914
+ activeOpacity: .7,
2915
+ children: /* @__PURE__ */ T(R, {
2916
+ style: [
2917
+ Q.pickerItemText,
2918
+ { color: l.text },
2919
+ v === e && {
2920
+ color: l.background,
2921
+ fontWeight: "600"
2922
+ }
2923
+ ],
2924
+ children: String(e).padStart(2, "0")
2925
+ })
2926
+ }, e))
2927
+ })]
2928
+ })
2929
+ ]
2930
+ }),
2931
+ /* @__PURE__ */ T(B, {
2932
+ style: [Q.confirmButton, { backgroundColor: l.primary }],
2933
+ onPress: D,
2934
+ activeOpacity: .7,
2935
+ children: /* @__PURE__ */ T(R, {
2936
+ style: [Q.confirmButtonText, { color: l.background }],
2937
+ children: "Confirm"
2938
+ })
2939
+ })
2940
+ ]
2941
+ })
2942
+ })
2943
+ }),
2944
+ r && /* @__PURE__ */ T(R, {
2945
+ style: [Q.error, { color: l.error }],
2946
+ children: r
2947
+ }),
2948
+ o && !r && /* @__PURE__ */ T(R, {
2949
+ style: [Q.helperText, { color: l.textMuted }],
2950
+ children: o
2951
+ })
2952
+ ]
2953
+ });
2954
+ }, Q = L.create({
2955
+ closeButton: {
2956
+ fontSize: 24,
2957
+ fontWeight: "300"
2958
+ },
2959
+ confirmButton: {
2960
+ alignItems: "center",
2961
+ borderRadius: 6,
2962
+ marginTop: 16,
2963
+ paddingVertical: 12
2964
+ },
2965
+ confirmButtonText: {
2966
+ fontSize: 16,
2967
+ fontWeight: "600"
2968
+ },
2969
+ container: { marginBottom: 16 },
2970
+ error: {
2971
+ fontSize: 12,
2972
+ marginTop: 4
2973
+ },
2974
+ helperText: {
2975
+ fontSize: 12,
2976
+ marginTop: 4
2977
+ },
2978
+ icon: { fontSize: 16 },
2979
+ label: {
2980
+ fontSize: 14,
2981
+ fontWeight: "500",
2982
+ marginBottom: 8
2983
+ },
2984
+ modalContent: {
2985
+ borderRadius: 12,
2986
+ padding: 16,
2987
+ width: "80%"
2988
+ },
2989
+ modalHeader: {
2990
+ alignItems: "center",
2991
+ borderBottomWidth: 1,
2992
+ flexDirection: "row",
2993
+ justifyContent: "space-between",
2994
+ marginBottom: 16,
2995
+ paddingBottom: 12
2996
+ },
2997
+ modalOverlay: {
2998
+ alignItems: "center",
2999
+ backgroundColor: "rgba(0, 0, 0, 0.5)",
3000
+ flex: 1,
3001
+ justifyContent: "center"
3002
+ },
3003
+ modalTitle: {
3004
+ fontSize: 18,
3005
+ fontWeight: "600"
3006
+ },
3007
+ picker: { maxHeight: 200 },
3008
+ pickerColumn: { flex: 1 },
3009
+ pickerContainer: {
3010
+ alignItems: "center",
3011
+ flexDirection: "row",
3012
+ gap: 8
3013
+ },
3014
+ pickerContent: { paddingVertical: 8 },
3015
+ pickerItem: {
3016
+ alignItems: "center",
3017
+ borderRadius: 6,
3018
+ marginVertical: 2,
3019
+ paddingVertical: 10
3020
+ },
3021
+ pickerItemText: { fontSize: 18 },
3022
+ pickerLabel: {
3023
+ fontSize: 12,
3024
+ fontWeight: "600",
3025
+ marginBottom: 8,
3026
+ textAlign: "center"
3027
+ },
3028
+ pickerSeparator: {
3029
+ fontSize: 24,
3030
+ fontWeight: "600"
3031
+ },
3032
+ trigger: {
3033
+ alignItems: "center",
3034
+ borderRadius: 6,
3035
+ borderWidth: 1,
3036
+ flexDirection: "row",
3037
+ justifyContent: "space-between",
3038
+ paddingHorizontal: 12,
3039
+ paddingVertical: 10
3040
+ },
3041
+ triggerText: {
3042
+ flex: 1,
3043
+ fontSize: 14
3044
+ }
3045
+ }), Le = ({ node: e, value: t, setValue: n, error: r, label: i, helperText: a }) => {
3046
+ let [o, s] = A(!1), [c, l] = A(!0), u = b(), { colors: d } = m(), f = Array.isArray(t) ? t : [], p = f[0] || "", h = f[1] || "", g = p.split(":"), _ = Number.parseInt(g[0], 10), v = Number.parseInt(g[1], 10), y = Number.isNaN(_) ? 0 : _, x = Number.isNaN(v) ? 0 : v, S = h.split(":"), C = Number.parseInt(S[0], 10), w = Number.parseInt(S[1], 10), D = Number.isNaN(C) ? 0 : C, O = Number.isNaN(w) ? 0 : w, [k, j] = A(0), [M, N] = A(0), P = Array.from({ length: 24 }, (e, t) => t), L = Array.from({ length: 60 }, (e, t) => t), te = () => p && h ? `${p} - ${h}` : p || u("renderer.defaultInputs.selectDateRange"), z = ee(() => {
3047
+ let e = `${String(k).padStart(2, "0")}:${String(M).padStart(2, "0")}`;
3048
+ c ? (n([e, h]), l(!1), j(D || 0), N(O || 0)) : (n([p, e]), s(!1), l(!0));
3049
+ }, [
3050
+ c,
3051
+ k,
3052
+ M,
3053
+ p,
3054
+ h,
3055
+ D,
3056
+ O,
3057
+ n
3058
+ ]);
3059
+ return /* @__PURE__ */ E(V, {
3060
+ style: $.container,
3061
+ children: [
3062
+ /* @__PURE__ */ E(R, {
3063
+ style: [$.label, { color: d.textSecondary }],
3064
+ children: [i || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
3065
+ style: { color: d.error },
3066
+ children: "*"
3067
+ })]
3068
+ }),
3069
+ /* @__PURE__ */ E(B, {
3070
+ style: [
3071
+ $.trigger,
3072
+ {
3073
+ backgroundColor: d.input,
3074
+ borderColor: d.border
3075
+ },
3076
+ r && { borderColor: d.error }
3077
+ ],
3078
+ onPress: () => {
3079
+ j(y || 0), N(x || 0), l(!0), s(!0);
3080
+ },
3081
+ activeOpacity: .7,
3082
+ children: [/* @__PURE__ */ T(R, {
3083
+ style: [
3084
+ $.triggerText,
3085
+ { color: d.text },
3086
+ !p && { color: d.textMuted }
3087
+ ],
3088
+ numberOfLines: 1,
3089
+ children: te()
3090
+ }), /* @__PURE__ */ T(R, {
3091
+ style: $.icon,
3092
+ children: "🕐"
3093
+ })]
3094
+ }),
3095
+ /* @__PURE__ */ T(F, {
3096
+ visible: o,
3097
+ transparent: !0,
3098
+ animationType: "fade",
3099
+ onRequestClose: () => s(!1),
3100
+ children: /* @__PURE__ */ T(B, {
3101
+ style: $.modalOverlay,
3102
+ activeOpacity: 1,
3103
+ onPress: () => s(!1),
3104
+ children: /* @__PURE__ */ E(B, {
3105
+ style: [$.modalContent, { backgroundColor: d.card }],
3106
+ activeOpacity: 1,
3107
+ onPress: () => {},
3108
+ children: [
3109
+ /* @__PURE__ */ E(V, {
3110
+ style: [$.modalHeader, { borderBottomColor: d.separator }],
3111
+ children: [/* @__PURE__ */ T(R, {
3112
+ style: [$.modalTitle, { color: d.text }],
3113
+ children: i || e.data.name
3114
+ }), /* @__PURE__ */ T(B, {
3115
+ onPress: () => s(!1),
3116
+ children: /* @__PURE__ */ T(R, {
3117
+ style: [$.closeButton, { color: d.textMuted }],
3118
+ children: "✕"
3119
+ })
3120
+ })]
3121
+ }),
3122
+ /* @__PURE__ */ T(V, {
3123
+ style: [$.rangeIndicator, { backgroundColor: d.primaryLight }],
3124
+ children: /* @__PURE__ */ T(R, {
3125
+ style: [$.rangeIndicatorText, { color: d.primary }],
3126
+ children: u(c ? "renderer.defaultInputs.startTime" : "renderer.defaultInputs.endTime")
3127
+ })
3128
+ }),
3129
+ /* @__PURE__ */ E(V, {
3130
+ style: $.pickerContainer,
3131
+ children: [
3132
+ /* @__PURE__ */ E(V, {
3133
+ style: $.pickerColumn,
3134
+ children: [/* @__PURE__ */ T(R, {
3135
+ style: [$.pickerLabel, { color: d.textMuted }],
3136
+ children: "Hour"
3137
+ }), /* @__PURE__ */ T(I, {
3138
+ style: $.picker,
3139
+ contentContainerStyle: $.pickerContent,
3140
+ showsVerticalScrollIndicator: !1,
3141
+ children: P.map((e) => /* @__PURE__ */ T(B, {
3142
+ style: [$.pickerItem, k === e && { backgroundColor: d.primary }],
3143
+ onPress: () => j(e),
3144
+ activeOpacity: .7,
3145
+ children: /* @__PURE__ */ T(R, {
3146
+ style: [
3147
+ $.pickerItemText,
3148
+ { color: d.text },
3149
+ k === e && {
3150
+ color: d.background,
3151
+ fontWeight: "600"
3152
+ }
3153
+ ],
3154
+ children: String(e).padStart(2, "0")
3155
+ })
3156
+ }, e))
3157
+ })]
3158
+ }),
3159
+ /* @__PURE__ */ T(R, {
3160
+ style: [$.pickerSeparator, { color: d.text }],
3161
+ children: ":"
3162
+ }),
3163
+ /* @__PURE__ */ E(V, {
3164
+ style: $.pickerColumn,
3165
+ children: [/* @__PURE__ */ T(R, {
3166
+ style: [$.pickerLabel, { color: d.textMuted }],
3167
+ children: "Minute"
3168
+ }), /* @__PURE__ */ T(I, {
3169
+ style: $.picker,
3170
+ contentContainerStyle: $.pickerContent,
3171
+ showsVerticalScrollIndicator: !1,
3172
+ children: L.map((e) => /* @__PURE__ */ T(B, {
3173
+ style: [$.pickerItem, M === e && { backgroundColor: d.primary }],
3174
+ onPress: () => N(e),
3175
+ activeOpacity: .7,
3176
+ children: /* @__PURE__ */ T(R, {
3177
+ style: [
3178
+ $.pickerItemText,
3179
+ { color: d.text },
3180
+ M === e && {
3181
+ color: d.background,
3182
+ fontWeight: "600"
3183
+ }
3184
+ ],
3185
+ children: String(e).padStart(2, "0")
3186
+ })
3187
+ }, e))
3188
+ })]
3189
+ })
3190
+ ]
3191
+ }),
3192
+ /* @__PURE__ */ T(B, {
3193
+ style: [$.confirmButton, { backgroundColor: d.primary }],
3194
+ onPress: z,
3195
+ activeOpacity: .7,
3196
+ children: /* @__PURE__ */ T(R, {
3197
+ style: [$.confirmButtonText, { color: d.background }],
3198
+ children: c ? "Next" : "Confirm"
3199
+ })
3200
+ })
3201
+ ]
3202
+ })
3203
+ })
3204
+ }),
3205
+ r && /* @__PURE__ */ T(R, {
3206
+ style: [$.error, { color: d.error }],
3207
+ children: r
3208
+ }),
3209
+ a && !r && /* @__PURE__ */ T(R, {
3210
+ style: [$.helperText, { color: d.textMuted }],
3211
+ children: a
3212
+ })
3213
+ ]
3214
+ });
3215
+ }, $ = L.create({
3216
+ closeButton: {
3217
+ fontSize: 24,
3218
+ fontWeight: "300"
3219
+ },
3220
+ confirmButton: {
3221
+ alignItems: "center",
3222
+ borderRadius: 6,
3223
+ marginTop: 16,
3224
+ paddingVertical: 12
3225
+ },
3226
+ confirmButtonText: {
3227
+ fontSize: 16,
3228
+ fontWeight: "600"
3229
+ },
3230
+ container: { marginBottom: 16 },
3231
+ error: {
3232
+ fontSize: 12,
3233
+ marginTop: 4
3234
+ },
3235
+ helperText: {
3236
+ fontSize: 12,
3237
+ marginTop: 4
3238
+ },
3239
+ icon: { fontSize: 16 },
3240
+ label: {
3241
+ fontSize: 14,
3242
+ fontWeight: "500",
3243
+ marginBottom: 8
3244
+ },
3245
+ modalContent: {
3246
+ borderRadius: 12,
3247
+ padding: 16,
3248
+ width: "80%"
3249
+ },
3250
+ modalHeader: {
3251
+ alignItems: "center",
3252
+ borderBottomWidth: 1,
3253
+ flexDirection: "row",
3254
+ justifyContent: "space-between",
3255
+ marginBottom: 12,
3256
+ paddingBottom: 12
3257
+ },
3258
+ modalOverlay: {
3259
+ alignItems: "center",
3260
+ backgroundColor: "rgba(0, 0, 0, 0.5)",
3261
+ flex: 1,
3262
+ justifyContent: "center"
3263
+ },
3264
+ modalTitle: {
3265
+ fontSize: 18,
3266
+ fontWeight: "600"
3267
+ },
3268
+ picker: { maxHeight: 200 },
3269
+ pickerColumn: { flex: 1 },
3270
+ pickerContainer: {
3271
+ alignItems: "center",
3272
+ flexDirection: "row",
3273
+ gap: 8
3274
+ },
3275
+ pickerContent: { paddingVertical: 8 },
3276
+ pickerItem: {
3277
+ alignItems: "center",
3278
+ borderRadius: 6,
3279
+ marginVertical: 2,
3280
+ paddingVertical: 10
3281
+ },
3282
+ pickerItemText: { fontSize: 18 },
3283
+ pickerLabel: {
3284
+ fontSize: 12,
3285
+ fontWeight: "600",
3286
+ marginBottom: 8,
3287
+ textAlign: "center"
3288
+ },
3289
+ pickerSeparator: {
3290
+ fontSize: 24,
3291
+ fontWeight: "600"
3292
+ },
3293
+ rangeIndicator: {
3294
+ alignItems: "center",
3295
+ borderRadius: 6,
3296
+ marginBottom: 12,
3297
+ paddingVertical: 8
3298
+ },
3299
+ rangeIndicatorText: {
3300
+ fontSize: 14,
3301
+ fontWeight: "600"
3302
+ },
3303
+ trigger: {
3304
+ alignItems: "center",
3305
+ borderRadius: 6,
3306
+ borderWidth: 1,
3307
+ flexDirection: "row",
3308
+ justifyContent: "space-between",
3309
+ paddingHorizontal: 12,
3310
+ paddingVertical: 10
3311
+ },
3312
+ triggerText: {
3313
+ flex: 1,
3314
+ fontSize: 14
3315
+ }
3316
+ }), Re = ({ node: e }) => /* @__PURE__ */ E(R, { children: [
3317
+ "TODO: Implement ",
3318
+ e.data.type,
3319
+ " input for React Native"
3320
+ ] }), ze = {
3321
+ address: H,
3322
+ autocomplete: ce,
3323
+ checkbox: le,
3324
+ date: ue,
3325
+ daterange: de,
3326
+ file: fe,
3327
+ hidden: pe,
3328
+ http: Ce,
3329
+ number: we,
3330
+ password: Ee,
3331
+ radio: Oe,
3332
+ select: ke,
3333
+ submit: Re,
3334
+ switch: Ae,
3335
+ text: Pe,
3336
+ textarea: Me,
3337
+ time: Ie,
3338
+ timerange: Le
3339
+ }, Be = ({ children: e = "Submit", disabled: t, isSubmitting: n, onPress: r }) => {
3340
+ let { colors: i } = m();
3341
+ return /* @__PURE__ */ T(B, {
3342
+ style: [
3343
+ Ve.button,
3344
+ { backgroundColor: i.primary },
3345
+ (t || n) && {
3346
+ backgroundColor: i.primaryDisabled,
3347
+ opacity: .6
3348
+ }
3349
+ ],
3350
+ disabled: t || n,
3351
+ onPress: r,
3352
+ activeOpacity: .7,
3353
+ children: n ? /* @__PURE__ */ T(j, { color: i.primaryForeground }) : /* @__PURE__ */ T(R, {
3354
+ style: [Ve.buttonText, { color: i.primaryForeground }],
3355
+ children: e
3356
+ })
3357
+ });
3358
+ }, Ve = L.create({
3359
+ button: {
3360
+ alignItems: "center",
3361
+ borderRadius: 6,
3362
+ justifyContent: "center",
3363
+ marginTop: 16,
3364
+ paddingHorizontal: 24,
3365
+ paddingVertical: 12
3366
+ },
3367
+ buttonText: {
3368
+ fontSize: 16,
3369
+ fontWeight: "600"
3370
+ }
3371
+ }), He = ({ children: e }) => e, Ue = ({ node: e }) => {
3372
+ let t = b(), { colors: n } = m(), r = t(e.data?.label);
3373
+ return /* @__PURE__ */ T(R, {
3374
+ style: [Ge.title, { color: n.text }],
3375
+ children: r
3376
+ });
3377
+ }, We = () => {
3378
+ let { colors: e } = m();
3379
+ return /* @__PURE__ */ T(V, { style: [Ge.divider, { backgroundColor: e.separator }] });
3380
+ }, Ge = L.create({
3381
+ divider: {
3382
+ height: 1,
3383
+ marginBottom: 16,
3384
+ marginTop: 0
3385
+ },
3386
+ title: {
3387
+ fontSize: 20,
3388
+ fontWeight: "700",
3389
+ marginBottom: 16
3390
+ }
3391
+ }), Ke = {
3392
+ divider: We,
3393
+ title: Ue
3394
+ }, qe = ({ components: e, contentContainerStyle: t, flows: n, googleApiKey: r, initialValues: i, language: a, onChange: o, onSubmit: s, style: c, theme: l, validate: u, validationMode: f }) => {
3395
+ let { colors: p } = m(), { canSubmit: h, clearSubmitMessage: v, config: y, formErrors: b, formValues: x, handleSubmit: S, inputNodes: C, isSubmitting: w, mergedFlow: ee, missingRequiredFields: D, setFieldValue: O, submitMessage: k, t: A, visibleNodes: j, visibleRootNodes: M } = d({
3396
+ components: e,
3397
+ flows: n,
3398
+ googleApiKey: r,
3399
+ initialValues: i,
3400
+ language: a,
3401
+ onChange: o,
3402
+ onSubmit: s,
3403
+ theme: l,
3404
+ validate: u,
3405
+ validationMode: f
3406
+ }), { FormWrapper: N, SubmitButton: P, SubmitButtonWrapper: F, renderNode: L } = _({
3407
+ config: y,
3408
+ DefaultFormWrapper: ne,
3409
+ DefaultGroup: ie,
3410
+ DefaultSubmitButton: Be,
3411
+ DefaultSubmitButtonWrapper: He,
3412
+ defaultInputRenderers: ze,
3413
+ defaultUI: Ke,
3414
+ formErrors: b,
3415
+ formValues: x,
3416
+ missingRequiredFields: D,
3417
+ setFieldValue: O,
3418
+ visibleNodes: j
3419
+ });
3420
+ return /* @__PURE__ */ T(I, {
3421
+ nestedScrollEnabled: !0,
3422
+ style: [
3423
+ Ye.container,
3424
+ { backgroundColor: p.background },
3425
+ c
3426
+ ],
3427
+ contentContainerStyle: t,
3428
+ children: /* @__PURE__ */ E(g, {
3429
+ value: {
3430
+ flows: ee,
3431
+ formErrors: b,
3432
+ formValues: x,
3433
+ googleApiKey: y.googleApiKey,
3434
+ inputNodes: C,
3435
+ language: y.language,
3436
+ setFieldValue: O
3437
+ },
3438
+ children: [/* @__PURE__ */ E(N, {
3439
+ onSubmit: S,
3440
+ children: [
3441
+ M.map((e) => L(e)),
3442
+ h && /* @__PURE__ */ T(F, {
3443
+ missingFields: D,
3444
+ children: /* @__PURE__ */ T(P, {
3445
+ onPress: S,
3446
+ disabled: w,
3447
+ isSubmitting: w,
3448
+ children: A("renderer.defaultSubmitButton.submit")
3449
+ })
3450
+ }),
3451
+ /* @__PURE__ */ T(R, {
3452
+ style: [Ye.poweredBy, { color: p.textMuted }],
3453
+ children: "Powered by Treege"
3454
+ })
3455
+ ]
3456
+ }), k && /* @__PURE__ */ E(V, {
3457
+ style: [Ye.message, { backgroundColor: k.type === "success" ? p.successBg : p.errorBg }],
3458
+ children: [/* @__PURE__ */ T(R, {
3459
+ style: [Ye.messageText, { color: k.type === "success" ? p.success : p.error }],
3460
+ children: k.message
3461
+ }), /* @__PURE__ */ T(R, {
3462
+ style: [Ye.messageClose, { color: k.type === "success" ? p.success : p.error }],
3463
+ onPress: v,
3464
+ children: A("common.close")
3465
+ })]
3466
+ })]
3467
+ })
3468
+ });
3469
+ }, Je = (e) => /* @__PURE__ */ T(y, {
3470
+ theme: e.theme,
3471
+ storageKey: "treege-renderer-theme",
3472
+ children: /* @__PURE__ */ T(qe, { ...e })
3473
+ }), Ye = L.create({
3474
+ container: { flex: 1 },
3475
+ message: {
3476
+ borderRadius: 6,
3477
+ marginVertical: 16,
3478
+ padding: 16
3479
+ },
3480
+ messageClose: {
3481
+ fontSize: 14,
3482
+ marginTop: 8,
3483
+ textDecorationLine: "underline"
3484
+ },
3485
+ messageText: {
3486
+ fontSize: 14,
3487
+ fontWeight: "500"
3488
+ },
3489
+ poweredBy: {
3490
+ fontSize: 12,
3491
+ paddingVertical: 8,
3492
+ textAlign: "center"
3493
+ }
3494
+ });
3495
+ //#endregion
3496
+ export { H as DefaultAddressInput, ce as DefaultAutocompleteInput, le as DefaultCheckboxInput, ue as DefaultDateInput, de as DefaultDateRangeInput, We as DefaultDividerUI, fe as DefaultFileInput, pe as DefaultHiddenInput, Ce as DefaultHttpInput, we as DefaultNumberInput, Ee as DefaultPasswordInput, Oe as DefaultRadioInput, ke as DefaultSelectInput, Re as DefaultSubmitInput, Ae as DefaultSwitchInput, Pe as DefaultTextInput, Me as DefaultTextareaInput, Ie as DefaultTimeInput, Le as DefaultTimeRangeInput, Ue as DefaultTitleUI, o as TreegeConfigProvider, Je as TreegeRenderer, w as applyReferenceTransformation, s as calculateReferenceFieldUpdates, C as checkFormFieldHasValue, i as convertFormValuesToNamedFormat, ze as defaultInputRenderers, Ke as defaultUI, t as evaluateCondition, r as evaluateConditions, v as fileToSerializable, c as filesToSerializable, u as findStartNode, l as getFlowRenderState, n as getTranslatedText, e as isFieldEmpty, a as isStartNode, x as mergeFlows, ge as sanitize, ve as sanitizeHttpResponse, f as serializableToFile, h as useTreegeConfig, d as useTreegeRenderer };